Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# [<img src="/docs/docs/public/icon.png" width="30px" height="40px"> KeyframeKit][KeyframeKit]

Unlock full playback control over your CSS animations with JavaScript.
# <img src="docs/docs/public/icon.png" width="30px" height="30px"> KeyframeKit

[![NPM version][npm-version-src]][npm-version-href]
[![NPM downloads][npm-downloads-src]][npm-downloads-href]
[![Minified size][minified-size-src]][minified-size-href]
[![CI][ci-src]][ci-href]
[![Site][site-src]][site-href]

Unlock full playback control over your CSS animations with JavaScript.

## What is this?

A lightweight TypeScript library that converts CSS `@keyframes` animations into [Web Animations API]-compatible animations, letting you play CSS-defined animations from JavaScript with full playback control and hardware-accelerated performance.
[Read more][KeyframeKit article] | [Live Demo]
[Documentation][KeyframeKit Site] | [Live Demo]

## Installation

Expand Down Expand Up @@ -77,7 +77,7 @@ Instead of getting an animation from the document's stylesheets, you can also im
import { importStyleSheet, convertStyleSheetKeyframes } from 'keyframekit';

const styles = await importStyleSheet('./styles.css');
// note: on Chrome, Edge or Firefox (not Safari), you can just write:
// note: on Chrome, Edge or Firefox (soon Safari), you can just write:
// import styles from './styles.css' with { type: 'css' };

// get animation keyframes from stylesheet
Expand Down Expand Up @@ -135,7 +135,7 @@ attachedAnim.play();


<!-- References -->
[KeyframeKit]: https://keyframekit.berryscript.com
[KeyframeKit Site]: https://keyframekit.berryscript.com
[Web Animations API]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API
[KeyframeKit article]: https://barhatsor.medium.com/99573ef4738b
[Live Demo]: https://codepen.io/barhatsor/pen/JoRPNmz
Expand All @@ -146,11 +146,11 @@ attachedAnim.play();
[KeyframeKit License]: ./LICENSE

<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/keyframekit.svg
[npm-version-src]: https://img.shields.io/npm/v/keyframekit.svg?color=6367FF
[npm-version-href]: https://www.npmjs.com/package/keyframekit
[npm-downloads-src]: https://img.shields.io/npm/d18m/keyframekit
[npm-downloads-src]: https://img.shields.io/npm/d18m/keyframekit?color=8494FF
[npm-downloads-href]: https://www.npmjs.com/package/keyframekit
[minified-size-src]: https://img.shields.io/github/size/barhatsor/KeyframeKit/dist/index.min.js
[minified-size-src]: https://img.shields.io/github/size/barhatsor/KeyframeKit/dist/index.min.js?color=C9BEFF
[minified-size-href]: /dist/index.min.js
[ci-src]: https://github.com/barhatsor/KeyframeKit/actions/workflows/ci.yml/badge.svg
[ci-href]: https://github.com/barhatsor/KeyframeKit/actions/workflows/ci.yml
[site-src]: https://img.shields.io/badge/see_it-live-FFDBFD
[site-href]: https://keyframekit.berryscript.com
2 changes: 1 addition & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export declare class ConvertedKeyframes {
* [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#options)
*
* Note: to ease like CSS, leave out `easing`. If you set it, it eases the whole
* animation at once, on top of each keyframe's easing.
* animation at once, on top of each keyframe's easing. Instead, set per-keyframe easing.
*/
toKeyframeEffect(options: number | KeyframeEffectOptions | null): KeyframeEffectParameters;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.min.js.map

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions docs/docs/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ title: Get Started

# KeyframeKit

Unlock full playback control over your CSS animations with JavaScript.

[![NPM version][npm-version-src]][npm-version-href]
[![NPM downloads][npm-downloads-src]][npm-downloads-href]
[![Minified size][minified-size-src]][minified-size-href]
[![CI][ci-src]][ci-href]
[![Site][site-src]][site-href]
{class=badges}

Unlock full playback control over your CSS animations with JavaScript.

## What is this?

A lightweight TypeScript library that converts CSS `@keyframes` animations into [Web Animations API]-compatible animations, letting you play CSS-defined animations from JavaScript with full playback control and hardware-accelerated performance.\
[Read more][KeyframeKit article] | [Live Demo]
[Documentation][KeyframeKit Site] | [Live Demo]

## Installation

Expand Down Expand Up @@ -89,7 +89,7 @@ Instead of getting an animation from the document's stylesheets, you can also im
import { importStyleSheet, convertStyleSheetKeyframes } from 'keyframekit';

const styles = await importStyleSheet('./styles.css');
// note: on Chrome, Edge or Firefox (not Safari), you can just write:
// note: on Chrome, Edge or Firefox (soon Safari), you can just write:
// import styles from './styles.css' with { type: 'css' };

// get animation keyframes from stylesheet
Expand Down Expand Up @@ -147,8 +147,8 @@ attachedAnim.play();

<!-- References -->

[KeyframeKit Site]: /
[Web Animations API]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API
[KeyframeKit article]: https://barhatsor.medium.com/99573ef4738b
[Live Demo]: https://codepen.io/barhatsor/pen/JoRPNmz
[Using the Web Animations API (MDN)]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Using_the_Web_Animations_API
[Imported stylesheet @import issue]: https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418
Expand All @@ -158,11 +158,11 @@ attachedAnim.play();

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/keyframekit.svg
[npm-version-src]: https://img.shields.io/npm/v/keyframekit.svg?color=6367FF
[npm-version-href]: https://www.npmjs.com/package/keyframekit
[npm-downloads-src]: https://img.shields.io/npm/d18m/keyframekit
[npm-downloads-src]: https://img.shields.io/npm/d18m/keyframekit?color=8494FF
[npm-downloads-href]: https://www.npmjs.com/package/keyframekit
[minified-size-src]: https://img.shields.io/github/size/barhatsor/KeyframeKit/dist/index.min.js
[minified-size-src]: https://img.shields.io/github/size/barhatsor/KeyframeKit/dist/index.min.js?color=C9BEFF
[minified-size-href]: https://github.com/barhatsor/KeyframeKit/blob/main/dist/index.min.js
[ci-src]: https://github.com/barhatsor/KeyframeKit/actions/workflows/ci.yml/badge.svg
[ci-href]: https://github.com/barhatsor/KeyframeKit/actions/workflows/ci.yml
[site-src]: https://img.shields.io/badge/see_it-live-FFDBFD
[site-href]: /
2 changes: 1 addition & 1 deletion docs/docs/public/playground/KeyframeKit/dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export declare class ConvertedKeyframes {
* [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#options)
*
* Note: to ease like CSS, leave out `easing`. If you set it, it eases the whole
* animation at once, on top of each keyframe's easing.
* animation at once, on top of each keyframe's easing. Instead, set per-keyframe easing.
*/
toKeyframeEffect(options: number | KeyframeEffectOptions | null): KeyframeEffectParameters;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/public/playground/KeyframeKit/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/docs/public/playground/KeyframeKit/dist/index.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/docs/reference/ConvertedKeyframes.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Keyframe effect options.
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#options)

Note: to ease like CSS, leave out `easing`. If you set it, it eases the whole
animation at once, on top of each keyframe's easing.
animation at once, on top of each keyframe's easing. Instead, set per-keyframe easing.

#### Returns

Expand Down
2 changes: 1 addition & 1 deletion src/KeyframesFactory/data-types/ConvertedKeyframes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class ConvertedKeyframes {
* [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#options)
*
* Note: to ease like CSS, leave out `easing`. If you set it, it eases the whole
* animation at once, on top of each keyframe's easing.
* animation at once, on top of each keyframe's easing. Instead, set per-keyframe easing.
*/
toKeyframeEffect(
options: number | KeyframeEffectOptions | null
Expand Down
Loading