keyframekit 1.1.8 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/KeyframeKit.d.ts +3 -3
- package/dist/KeyframeKit.d.ts.map +1 -1
- package/dist/KeyframeKit.js +3 -3
- package/dist/KeyframeKit.js.map +1 -1
- package/dist/KeyframeKit.min.js +0 -1
- package/docs/.vitepress/config.ts +50 -1
- package/docs/.vitepress/theme/base-styles.css +59 -16
- package/docs/docs/get-started.md +3 -5
- package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.d.ts +3 -3
- package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.d.ts.map +1 -1
- package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.js +3 -3
- package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.js.map +1 -1
- package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.min.js +5 -0
- package/docs/docs/reference/classes/KeyframeEffectParameters.md +7 -0
- package/docs/docs/reference/classes/ParsedKeyframes.md +9 -0
- package/docs/docs/reference/interfaces/KeyframesFactory.md +12 -3
- package/docs/docs/reference/type-aliases/CSSStyleSheetSource.md +6 -0
- package/docs/docs/reference/type-aliases/KeyframeArgument.md +6 -0
- package/docs/docs/reference/type-aliases/ParsedKeyframesRules.md +7 -0
- package/docs/docs/reference/variables/default.md +5 -0
- package/docs/typedoc/plugin-markdown-see-also.js +262 -0
- package/docs/typedoc.config.js +4 -1
- package/package.json +2 -2
- package/rollup.config.js +14 -15
- package/src/KeyframeKit.ts +6 -6
- package/tsconfig.default.json +44 -0
- package/tsconfig.json +4 -41
- package/dist/KeyframeKit.min.js.map +0 -1
- /package/{vercel.json → docs/vercel.json} +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Unlock fine-grained control over your CSS animations with JavaScript.
|
|
4
4
|
|
|
5
|
-
[](/dist/KeyframeKit.min.js) [](https://www.npmjs.com/package/keyframekit) [](/LICENSE)
|
|
6
6
|
|
|
7
7
|
## About
|
|
8
8
|
|
|
@@ -10,10 +10,17 @@ The [Web Animations API][2] opens the browser's animation engine to developers a
|
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
13
|
+
### NPM
|
|
13
14
|
```sh
|
|
14
15
|
npm install keyframekit
|
|
15
16
|
```
|
|
16
17
|
|
|
18
|
+
### CDN
|
|
19
|
+
Import the module directly:
|
|
20
|
+
```js
|
|
21
|
+
import KeyframeKit from 'https://unpkg.com/keyframekit'
|
|
22
|
+
```
|
|
23
|
+
|
|
17
24
|
## Usage
|
|
18
25
|
|
|
19
26
|
### Playing CSS-defined animations with JS
|
package/dist/KeyframeKit.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export type CSSStyleSheetSource = CSSStyleSheet | StyleSheetList;
|
|
|
2
2
|
declare class KeyframesFactory {
|
|
3
3
|
#private;
|
|
4
4
|
readonly Error: {
|
|
5
|
-
/**
|
|
5
|
+
/** Thrown if keyframes rule name is not a string. */
|
|
6
6
|
readonly KeyframesRuleNameTypeError: {
|
|
7
7
|
new (message?: string): {
|
|
8
8
|
message: string;
|
|
@@ -30,7 +30,7 @@ declare class KeyframesFactory {
|
|
|
30
30
|
};
|
|
31
31
|
isError(error: unknown): error is Error;
|
|
32
32
|
};
|
|
33
|
-
/**
|
|
33
|
+
/** Thrown if source is not a `CSSStyleSheet` or a `StyleSheetList`. */
|
|
34
34
|
readonly SourceTypeError: {
|
|
35
35
|
new (message?: string): {
|
|
36
36
|
message: string;
|
|
@@ -58,7 +58,7 @@ declare class KeyframesFactory {
|
|
|
58
58
|
};
|
|
59
59
|
isError(error: unknown): error is Error;
|
|
60
60
|
};
|
|
61
|
-
/**
|
|
61
|
+
/** Thrown if the stylesheet could not be imported. */
|
|
62
62
|
readonly StyleSheetImportError: {
|
|
63
63
|
new (message?: string): {
|
|
64
64
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyframeKit.d.ts","sourceRoot":"","sources":["../src/KeyframeKit.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,cAAc,CAAC;AAEjE,cAAM,gBAAgB;;IAEpB,QAAQ,CAAC,KAAK;QACZ,
|
|
1
|
+
{"version":3,"file":"KeyframeKit.d.ts","sourceRoot":"","sources":["../src/KeyframeKit.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,cAAc,CAAC;AAEjE,cAAM,gBAAgB;;IAEpB,QAAQ,CAAC,KAAK;QACZ,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIrD,uEAAuE;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIvE,sDAAsD;;;;;;;;;;;;;;;;MAI7C;IAGX;;;;;OAKG;IACG,4BAA4B,CAAC,EAAE,QAA0B,EAAE,GAAE;QACjE,QAAQ,CAAC,EAAE,QAAQ,CAAA;KACf;IAWN;;;;;;OAMG;IACG,gBAAgB,CAAC,GAAG,EAAE,MAAM;IAwBlC;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;QACnD,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,mBAAmB,CAAA;KACxB,GAAG,eAAe,GAAG,SAAS;IA0E/B;;;;;OAKG;IACH,8BAA8B,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;QAC7C,EAAE,EAAE,mBAAmB,CAAA;KACxB,GAAG,oBAAoB;IAsExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QACtC,IAAI,EAAE,gBAAgB,CAAA;KACvB,GAAG,eAAe;CAoHpB;;AAED,wBAAsC;AACtC,YAAY,EAAE,gBAAgB,EAAE,CAAC;AAGjC,iFAAiF;AACjF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,EAAE,GAAG,wBAAwB,CAAC;AAErE,8EAA8E;AAC9E,qBAAa,wBAAwB;;IAEnC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,OAAO,EAAE,qBAAqB,CAAC;IAE/B;;;;OAIG;gBACS,EAAE,SAAS,EAAE,OAAY,EAAE,EAAE;QACvC,SAAS,EAAE,gBAAgB,CAAC;QAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAA;KACzC;IAKD;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAsB,EAAE,QAA4B,EAAE,EAAE;QACrF,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAC;QACzC,QAAQ,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;KACpC,GAAG,SAAS;CAqCd;AAGD,qBAAa,eAAe;IAE1B,SAAS,EAAE,QAAQ,EAAE,CAAC;gBAEV,SAAS,EAAE,QAAQ,EAAE;IAIjC;;;OAGG;IACH,gBAAgB,CACd,OAAO,EAAE,MAAM,GAAG,qBAAqB,GAAG,IAAI,GAC7C,wBAAwB;CAwB5B;AAGD,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,CAAA;CACpC,CAAC"}
|
package/dist/KeyframeKit.js
CHANGED
|
@@ -12,15 +12,15 @@ const CHARS = {
|
|
|
12
12
|
};
|
|
13
13
|
class KeyframesFactory {
|
|
14
14
|
Error = {
|
|
15
|
-
/**
|
|
15
|
+
/** Thrown if keyframes rule name is not a string. */
|
|
16
16
|
KeyframesRuleNameTypeError: class KeyframesRuleNameTypeError extends TypeError {
|
|
17
17
|
message = `Keyframes rule name must be a string.`;
|
|
18
18
|
},
|
|
19
|
-
/**
|
|
19
|
+
/** Thrown if source is not a `CSSStyleSheet` or a `StyleSheetList`. */
|
|
20
20
|
SourceTypeError: class SourceTypeError extends TypeError {
|
|
21
21
|
message = `Source must be either a CSSStyleSheet or a StyleSheetList.`;
|
|
22
22
|
},
|
|
23
|
-
/**
|
|
23
|
+
/** Thrown if the stylesheet could not be imported. */
|
|
24
24
|
StyleSheetImportError: class StyleSheetImportError extends Error {
|
|
25
25
|
message = `The stylesheet could not be imported.`;
|
|
26
26
|
}
|
package/dist/KeyframeKit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyframeKit.js","sourceRoot":"","sources":["../src/KeyframeKit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,MAAM,KAAK,GAAG;IACZ,YAAY,EAAE,GAAG;IACjB,YAAY,EAAE,GAAG;IACjB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,UAAU;CACjB,CAAC;AAKX,MAAM,gBAAgB;IAEX,KAAK,GAAG;QACf,
|
|
1
|
+
{"version":3,"file":"KeyframeKit.js","sourceRoot":"","sources":["../src/KeyframeKit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,MAAM,KAAK,GAAG;IACZ,YAAY,EAAE,GAAG;IACjB,YAAY,EAAE,GAAG;IACjB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,UAAU;CACjB,CAAC;AAKX,MAAM,gBAAgB;IAEX,KAAK,GAAG;QACf,qDAAqD;QACrD,0BAA0B,EAAE,MAAM,0BAA2B,SAAQ,SAAS;YAC5E,OAAO,GAAG,uCAAuC,CAAC;SACnD;QACD,uEAAuE;QACvE,eAAe,EAAE,MAAM,eAAgB,SAAQ,SAAS;YACtD,OAAO,GAAG,4DAA4D,CAAC;SACxE;QACD,sDAAsD;QACtD,qBAAqB,EAAE,MAAM,qBAAsB,SAAQ,KAAK;YAC9D,OAAO,GAAG,uCAAuC,CAAC;SACnD;KACO,CAAC;IAGX;;;;;OAKG;IACH,KAAK,CAAC,4BAA4B,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAE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AK,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAEzC,CAAC;AAED,KAAK,UAAU,mBAAmB,CAAC,EAAE,QAAQ,EAE5C;IAEC,IAAI,QAAQ,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;QACvC,OAAO;IACT,CAAC;IAED,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAErD,SAAS,kBAAkB;QACzB,IAAI,QAAQ,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG;QACf,kBAAkB;QAClB,kBAAkB;KACV,CAAC;IAEX,QAAQ,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAC,CAAC;IAEvC,MAAM,OAAO,CAAC;IAEd,QAAQ,CAAC,mBAAmB,CAAC,GAAG,QAAQ,CAAC,CAAC;AAE5C,CAAC"}
|
package/dist/KeyframeKit.min.js
CHANGED
|
@@ -3,4 +3,3 @@
|
|
|
3
3
|
* MIT License
|
|
4
4
|
*/
|
|
5
5
|
const e="%",t="-",s="--",r="-webkit-";var o=new class{Error={KeyframesRuleNameTypeError:class extends TypeError{message="Keyframes rule name must be a string."},SourceTypeError:class extends TypeError{message="Source must be either a CSSStyleSheet or a StyleSheetList."},StyleSheetImportError:class extends Error{message="The stylesheet could not be imported."}};async getDocumentStyleSheetsOnLoad({document:e=window.document}={}){return await async function({document:e}){if("complete"===e.readyState)return;const{promise:t,resolve:s}=Promise.withResolvers();function r(){"complete"===e.readyState&&s(null)}const o=["readystatechange",r];e.addEventListener(...o),await t,e.removeEventListener(...o)}({document:e}),e.styleSheets}async importStyleSheet(e){const t=await fetch(e);if(!t.ok)throw new this.Error.StyleSheetImportError;const s=await t.text(),r=e.split("/").slice(0,-1).join("/"),o=new CSSStyleSheet({baseURL:r});return await o.replace(s),o}getStyleSheetKeyframes({of:e,in:t}){if("string"!=typeof e)throw new this.Error.KeyframesRuleNameTypeError;if(t instanceof StyleSheetList)return this.#e({of:e,styleSheetList:t});if(t instanceof CSSStyleSheet)return this.#t({of:e,styleSheet:t});throw new this.Error.SourceTypeError}#e({of:e,styleSheetList:t}){for(const s of t){const t=this.#t({of:e,styleSheet:s});if(void 0!==t)return t}}#t({of:e,styleSheet:t}){for(const s of t.cssRules)if(s instanceof CSSKeyframesRule&&s.name===e){return this.parseKeyframesRule({rule:s})}}getAllStyleSheetKeyframesRules({in:e}){if(e instanceof StyleSheetList)return this.#s({styleSheetList:e});if(e instanceof CSSStyleSheet)return this.#r({styleSheet:e});throw new this.Error.SourceTypeError}#s({styleSheetList:e}){let t={};for(const s of e){const e=this.#r({styleSheet:s});t={...t,...e}}return t}#r({styleSheet:e}){let t={};for(const s of e.cssRules){if(!(s instanceof CSSKeyframesRule))continue;const e=this.parseKeyframesRule({rule:s});t[s.name]=e}return t}parseKeyframesRule({rule:t}){let s=[];for(const r of t){const t=l({of:r.keyText,suffix:e}),o=Number(t)/100;let n={};for(const e of r.style){const t=r.style.getPropertyValue(e);n[this.#o(e)]=t}const i={...n,offset:o};s.push(i)}return new i(s)}#o(e){if(this.#n(e))return e;if("float"===e)return"cssFloat";if("offset"===e)return"cssOffset";const t=this.#i(e);return this.#l(e,t)}#l(e,s=!1){let r="",o=!1;s&&(e=e.slice(1));for(const s of e)s===t?o=!0:o?(o=!1,r+=s.toUpperCase()):r+=s;return r}#n(e){return e.startsWith(s)&&e!==s}#i(e){return e.startsWith(r)}};class n{keyframes;options;constructor({keyframes:e,options:t={}}){this.keyframes=e,this.options=this.#a(t)}toAnimation({target:e,options:t={},timeline:s=document.timeline}){t=this.#a(t);const r={...this.options,...t},o=new KeyframeEffect(e,this.keyframes,r);return new Animation(o,s)}#a(e){return"number"==typeof e?{duration:e}:e}}class i{keyframes;constructor(e){this.keyframes=e}toKeyframeEffect(e){let t;return t=new n(null!==e?{keyframes:this.keyframes,options:e}:{keyframes:this.keyframes}),t}}function l({of:e,suffix:t}){return e.slice(0,-t.length)}export{n as KeyframeEffectParameters,i as ParsedKeyframes,o as default};
|
|
6
|
-
//# sourceMappingURL=KeyframeKit.min.js.map
|
|
@@ -58,7 +58,23 @@ export default defineConfig({
|
|
|
58
58
|
},
|
|
59
59
|
|
|
60
60
|
search: {
|
|
61
|
-
provider: 'local'
|
|
61
|
+
provider: 'local',
|
|
62
|
+
options: {
|
|
63
|
+
detailedView: false,
|
|
64
|
+
async _render(src, env, md) {
|
|
65
|
+
if (
|
|
66
|
+
// !env.relativePath.startsWith('reference') ||
|
|
67
|
+
env.relativePath === 'reference/index.md'
|
|
68
|
+
) return ''
|
|
69
|
+
|
|
70
|
+
src = src.split('## See Also')[0];
|
|
71
|
+
|
|
72
|
+
const html = await md.renderAsync(src, env)
|
|
73
|
+
//if (env.frontmatter?.search === false) return ''
|
|
74
|
+
|
|
75
|
+
return html
|
|
76
|
+
}
|
|
77
|
+
}
|
|
62
78
|
},
|
|
63
79
|
|
|
64
80
|
socialLinks: [
|
|
@@ -67,6 +83,39 @@ export default defineConfig({
|
|
|
67
83
|
|
|
68
84
|
footer: {
|
|
69
85
|
message: 'Created by <a href="https://berryscript.com" target="_blank">Ben Hatsor</a>. MIT License.'
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
docFooter: {
|
|
89
|
+
prev: false,
|
|
90
|
+
next: false
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
sidebarMenuLabel: 'Reference'
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
transformPageData(pageData) {
|
|
97
|
+
pageData.frontmatter.head ??= []
|
|
98
|
+
pageData.frontmatter.head.push([
|
|
99
|
+
'meta',
|
|
100
|
+
{
|
|
101
|
+
name: 'og:title',
|
|
102
|
+
content:
|
|
103
|
+
pageData.frontmatter.layout === 'home'
|
|
104
|
+
? `KeyframeKit`
|
|
105
|
+
: `${pageData.title} | KeyframeKit`
|
|
106
|
+
}
|
|
107
|
+
])
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
// fix vue parsing errors in code blocks
|
|
111
|
+
// https://github.com/vuejs/vitepress/discussions/3724#discussioncomment-8963669
|
|
112
|
+
markdown: {
|
|
113
|
+
config(md) {
|
|
114
|
+
const defaultCodeInline = md.renderer.rules.code_inline!
|
|
115
|
+
md.renderer.rules.code_inline = (tokens, idx, options, env, self) => {
|
|
116
|
+
tokens[idx].attrSet('v-pre', '')
|
|
117
|
+
return defaultCodeInline(tokens, idx, options, env, self)
|
|
118
|
+
}
|
|
70
119
|
}
|
|
71
120
|
},
|
|
72
121
|
|
|
@@ -39,39 +39,82 @@
|
|
|
39
39
|
|
|
40
40
|
.VPLocalSearchBox {
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
.shell {
|
|
43
|
+
padding: 0 !important;
|
|
44
|
+
gap: 12px !important;
|
|
45
|
+
}
|
|
43
46
|
|
|
44
47
|
.search-bar {
|
|
45
|
-
|
|
48
|
+
padding: 7px 12px !important;
|
|
49
|
+
font-size: 25px;
|
|
50
|
+
border: none !important;
|
|
51
|
+
border-bottom: 1px solid var(--vp-c-divider) !important;
|
|
52
|
+
border-radius: 0 !important;
|
|
46
53
|
}
|
|
47
54
|
|
|
48
|
-
.search-bar
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
/* background: transparent; */
|
|
52
|
-
background: var(--vp-c-bg-alt);
|
|
55
|
+
.search-bar .local-search-icon {
|
|
56
|
+
font-size: 23px;
|
|
57
|
+
background-color: var(--vp-c-text-2);
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
.search-bar .search-input {
|
|
56
61
|
font-family: inherit;
|
|
62
|
+
padding-left: 3px;
|
|
63
|
+
|
|
64
|
+
&::placeholder {
|
|
65
|
+
color: var(--vp-c-text-3);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.search-bar .search-actions .clear-button:disabled {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* .search-bar:has(+ .results:empty) .search-actions .toggle-layout-button,
|
|
74
|
+
.search-bar .search-actions:has(.clear-button:disabled) .toggle-layout-button { */
|
|
75
|
+
/* .search-bar .search-actions .toggle-layout-button {
|
|
76
|
+
display: none;
|
|
77
|
+
} */
|
|
78
|
+
|
|
79
|
+
.results {
|
|
80
|
+
padding: 12px;
|
|
81
|
+
padding-top: 0;
|
|
82
|
+
scroll-padding-bottom: 12px;
|
|
57
83
|
}
|
|
58
84
|
|
|
59
|
-
.
|
|
60
|
-
|
|
85
|
+
.results .result {
|
|
86
|
+
border: solid 2px transparent !important;
|
|
61
87
|
|
|
62
|
-
|
|
88
|
+
&.selected {
|
|
89
|
+
background-color: var(--vp-c-brand-soft);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.results .result .excerpt-wrapper {
|
|
94
|
+
mask-image: linear-gradient(transparent 0%, #000 8px, #000 calc(100% - 8px), transparent 100%);
|
|
95
|
+
|
|
96
|
+
.excerpt-gradient-bottom, .excerpt-gradient-top {
|
|
63
97
|
display: none;
|
|
64
98
|
}
|
|
65
99
|
}
|
|
66
100
|
|
|
67
|
-
.
|
|
68
|
-
|
|
69
|
-
|
|
101
|
+
.results .result .excerpt {
|
|
102
|
+
.vp-doc div[class*='language-'], .vp-block {
|
|
103
|
+
border-radius: 8px;
|
|
104
|
+
margin: 16px 0;
|
|
105
|
+
}
|
|
70
106
|
}
|
|
71
107
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
108
|
+
&:has(
|
|
109
|
+
.results:empty,
|
|
110
|
+
.search-bar .search-actions .clear-button:disabled
|
|
111
|
+
) {
|
|
112
|
+
.results {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
.search-bar {
|
|
116
|
+
border-bottom: none !important;
|
|
117
|
+
}
|
|
75
118
|
}
|
|
76
119
|
|
|
77
120
|
.search-keyboard-shortcuts {
|
package/docs/docs/get-started.md
CHANGED
|
@@ -11,11 +11,9 @@ The [Web Animations API][1] opens the browser's animation engine to developers a
|
|
|
11
11
|
```sh [npm]
|
|
12
12
|
npm install keyframekit
|
|
13
13
|
```
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
```sh [pnpm]
|
|
18
|
-
pnpm add keyframekit
|
|
14
|
+
```js [CDN]
|
|
15
|
+
/* Import the module directly: */
|
|
16
|
+
import KeyframeKit from 'https://unpkg.com/keyframekit'
|
|
19
17
|
```
|
|
20
18
|
:::
|
|
21
19
|
|
|
@@ -2,7 +2,7 @@ export type CSSStyleSheetSource = CSSStyleSheet | StyleSheetList;
|
|
|
2
2
|
declare class KeyframesFactory {
|
|
3
3
|
#private;
|
|
4
4
|
readonly Error: {
|
|
5
|
-
/**
|
|
5
|
+
/** Thrown if keyframes rule name is not a string. */
|
|
6
6
|
readonly KeyframesRuleNameTypeError: {
|
|
7
7
|
new (message?: string): {
|
|
8
8
|
message: string;
|
|
@@ -30,7 +30,7 @@ declare class KeyframesFactory {
|
|
|
30
30
|
};
|
|
31
31
|
isError(error: unknown): error is Error;
|
|
32
32
|
};
|
|
33
|
-
/**
|
|
33
|
+
/** Thrown if source is not a `CSSStyleSheet` or a `StyleSheetList`. */
|
|
34
34
|
readonly SourceTypeError: {
|
|
35
35
|
new (message?: string): {
|
|
36
36
|
message: string;
|
|
@@ -58,7 +58,7 @@ declare class KeyframesFactory {
|
|
|
58
58
|
};
|
|
59
59
|
isError(error: unknown): error is Error;
|
|
60
60
|
};
|
|
61
|
-
/**
|
|
61
|
+
/** Thrown if the stylesheet could not be imported. */
|
|
62
62
|
readonly StyleSheetImportError: {
|
|
63
63
|
new (message?: string): {
|
|
64
64
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyframeKit.d.ts","sourceRoot":"","sources":["../src/KeyframeKit.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,cAAc,C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AAqB,CAAC;IAE/B;;;;OAIG;gBACS,EAAE,SAAS,EAAE,OAAY,EAAE,EAAE;QACvC,SAAS,EAAE,gBAAgB,CAAC;QAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAA;KACzC;IAKD;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAsB,EAAE,QAA4B,EAAE,EAAE;QACrF,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAC;QACzC,QAAQ,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;KACpC,GAAG,SAAS;CAqCd;AAGD,qBAAa,eAAe;IAE1B,SAAS,EAAE,QAAQ,EAAE,CAAC;gBAEV,SAAS,EAAE,QAAQ,EAAE;IAIjC;;;OAGG;IACH,gBAAgB,CACd,OAAO,EAAE,MAAM,GAAG,qBAAqB,GAAG,IAAI,GAC7C,wBAAwB;CAwB5B;AAGD,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,CAAA;CACpC,CAAC"}
|
|
@@ -12,15 +12,15 @@ const CHARS = {
|
|
|
12
12
|
};
|
|
13
13
|
class KeyframesFactory {
|
|
14
14
|
Error = {
|
|
15
|
-
/**
|
|
15
|
+
/** Thrown if keyframes rule name is not a string. */
|
|
16
16
|
KeyframesRuleNameTypeError: class KeyframesRuleNameTypeError extends TypeError {
|
|
17
17
|
message = `Keyframes rule name must be a string.`;
|
|
18
18
|
},
|
|
19
|
-
/**
|
|
19
|
+
/** Thrown if source is not a `CSSStyleSheet` or a `StyleSheetList`. */
|
|
20
20
|
SourceTypeError: class SourceTypeError extends TypeError {
|
|
21
21
|
message = `Source must be either a CSSStyleSheet or a StyleSheetList.`;
|
|
22
22
|
},
|
|
23
|
-
/**
|
|
23
|
+
/** Thrown if the stylesheet could not be imported. */
|
|
24
24
|
StyleSheetImportError: class StyleSheetImportError extends Error {
|
|
25
25
|
message = `The stylesheet could not be imported.`;
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyframeKit.js","sourceRoot":"","sources":["../src/KeyframeKit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,MAAM,KAAK,GAAG;IACZ,YAAY,EAAE,GAAG;IACjB,YAAY,EAAE,GAAG;IACjB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,UAAU;CACjB,CAAC;AAKX,MAAM,gBAAgB;IAEX,KAAK,GAAG;QACf,
|
|
1
|
+
{"version":3,"file":"KeyframeKit.js","sourceRoot":"","sources":["../src/KeyframeKit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,MAAM,KAAK,GAAG;IACZ,YAAY,EAAE,GAAG;IACjB,YAAY,EAAE,GAAG;IACjB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,UAAU;CACjB,CAAC;AAKX,MAAM,gBAAgB;IAEX,KAAK,GAAG;QACf,qDAAqD;QACrD,0BAA0B,EAAE,MAAM,0BAA2B,SAAQ,SAAS;YAC5E,OAAO,GAAG,uCAAuC,CAAC;SACnD;QACD,uEAAuE;QACvE,eAAe,EAAE,MAAM,eAAgB,SAAQ,SAAS;YACtD,OAAO,GAAG,4DAA4D,CAAC;SACxE;QACD,sDAAsD;QACtD,qBAAqB,EAAE,MAAM,qBAAsB,SAAQ,KAAK;YAC9D,OAAO,GAAG,uCAAuC,CAAC;SACnD;KACO,CAAC;IAGX;;;;;OAKG;IACH,KAAK,CAAC,4BAA4B,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAE3D,EAAE;QAEJ,MAAM,mBAAmB,CAAC;YACxB,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,WAAW,CAAC;IAE9B,CAAC;IAGD;;;;;;OAMG;IACH,KAAK,CAAC,gBAAgB,CAAC,GAAW;QAEhC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,CAAC;IAED,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAErD,SAAS,kBAAkB;QACzB,IAAI,QAAQ,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG;QACf,kBAAkB;QAClB,kBAAkB;KACV,CAAC;IAEX,QAAQ,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAC,CAAC;IAEvC,MAAM,OAAO,CAAC;IAEd,QAAQ,CAAC,mBAAmB,CAAC,GAAG,QAAQ,CAAC,CAAC;AAE5C,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* KeyframeKit
|
|
3
|
+
* MIT License
|
|
4
|
+
*/
|
|
5
|
+
const e="%",t="-",s="--",r="-webkit-";var o=new class{Error={KeyframesRuleNameTypeError:class extends TypeError{message="Keyframes rule name must be a string."},SourceTypeError:class extends TypeError{message="Source must be either a CSSStyleSheet or a StyleSheetList."},StyleSheetImportError:class extends Error{message="The stylesheet could not be imported."}};async getDocumentStyleSheetsOnLoad({document:e=window.document}={}){return await async function({document:e}){if("complete"===e.readyState)return;const{promise:t,resolve:s}=Promise.withResolvers();function r(){"complete"===e.readyState&&s(null)}const o=["readystatechange",r];e.addEventListener(...o),await t,e.removeEventListener(...o)}({document:e}),e.styleSheets}async importStyleSheet(e){const t=await fetch(e);if(!t.ok)throw new this.Error.StyleSheetImportError;const s=await t.text(),r=e.split("/").slice(0,-1).join("/"),o=new CSSStyleSheet({baseURL:r});return await o.replace(s),o}getStyleSheetKeyframes({of:e,in:t}){if("string"!=typeof e)throw new this.Error.KeyframesRuleNameTypeError;if(t instanceof StyleSheetList)return this.#e({of:e,styleSheetList:t});if(t instanceof CSSStyleSheet)return this.#t({of:e,styleSheet:t});throw new this.Error.SourceTypeError}#e({of:e,styleSheetList:t}){for(const s of t){const t=this.#t({of:e,styleSheet:s});if(void 0!==t)return t}}#t({of:e,styleSheet:t}){for(const s of t.cssRules)if(s instanceof CSSKeyframesRule&&s.name===e){return this.parseKeyframesRule({rule:s})}}getAllStyleSheetKeyframesRules({in:e}){if(e instanceof StyleSheetList)return this.#s({styleSheetList:e});if(e instanceof CSSStyleSheet)return this.#r({styleSheet:e});throw new this.Error.SourceTypeError}#s({styleSheetList:e}){let t={};for(const s of e){const e=this.#r({styleSheet:s});t={...t,...e}}return t}#r({styleSheet:e}){let t={};for(const s of e.cssRules){if(!(s instanceof CSSKeyframesRule))continue;const e=this.parseKeyframesRule({rule:s});t[s.name]=e}return t}parseKeyframesRule({rule:t}){let s=[];for(const r of t){const t=l({of:r.keyText,suffix:e}),o=Number(t)/100;let n={};for(const e of r.style){const t=r.style.getPropertyValue(e);n[this.#o(e)]=t}const i={...n,offset:o};s.push(i)}return new i(s)}#o(e){if(this.#n(e))return e;if("float"===e)return"cssFloat";if("offset"===e)return"cssOffset";const t=this.#i(e);return this.#l(e,t)}#l(e,s=!1){let r="",o=!1;s&&(e=e.slice(1));for(const s of e)s===t?o=!0:o?(o=!1,r+=s.toUpperCase()):r+=s;return r}#n(e){return e.startsWith(s)&&e!==s}#i(e){return e.startsWith(r)}};class n{keyframes;options;constructor({keyframes:e,options:t={}}){this.keyframes=e,this.options=this.#a(t)}toAnimation({target:e,options:t={},timeline:s=document.timeline}){t=this.#a(t);const r={...this.options,...t},o=new KeyframeEffect(e,this.keyframes,r);return new Animation(o,s)}#a(e){return"number"==typeof e?{duration:e}:e}}class i{keyframes;constructor(e){this.keyframes=e}toKeyframeEffect(e){let t;return t=new n(null!==e?{keyframes:this.keyframes,options:e}:{keyframes:this.keyframes}),t}}function l({of:e,suffix:t}){return e.slice(0,-t.length)}export{n as KeyframeEffectParameters,i as ParsedKeyframes,o as default};
|
|
@@ -95,3 +95,10 @@ An element to attach the animation to.
|
|
|
95
95
|
Specifications:
|
|
96
96
|
- https://drafts.csswg.org/web-animations-1/#the-keyframeeffect-interface
|
|
97
97
|
- https://drafts.csswg.org/web-animations-1/#the-animation-interface
|
|
98
|
+
|
|
99
|
+
## See Also
|
|
100
|
+
|
|
101
|
+
### Referenced Here
|
|
102
|
+
- [KeyframeArgument](../type-aliases/KeyframeArgument.md)
|
|
103
|
+
### References This
|
|
104
|
+
- [ParsedKeyframes.toKeyframeEffect](ParsedKeyframes.md#tokeyframeeffect)
|
|
@@ -47,3 +47,12 @@ toKeyframeEffect(options: number | KeyframeEffectOptions | null): KeyframeEffect
|
|
|
47
47
|
#### Returns
|
|
48
48
|
|
|
49
49
|
[`KeyframeEffectParameters`](KeyframeEffectParameters.md)
|
|
50
|
+
|
|
51
|
+
## See Also
|
|
52
|
+
|
|
53
|
+
### Referenced Here
|
|
54
|
+
- [KeyframeEffectParameters](KeyframeEffectParameters.md)
|
|
55
|
+
### References This
|
|
56
|
+
- [KeyframesFactory.getStyleSheetKeyframes](../interfaces/KeyframesFactory.md#getstylesheetkeyframes)
|
|
57
|
+
- [KeyframesFactory.parseKeyframesRule](../interfaces/KeyframesFactory.md#parsekeyframesrule)
|
|
58
|
+
- [ParsedKeyframesRules](../type-aliases/ParsedKeyframesRules.md)
|
|
@@ -20,7 +20,7 @@ readonly Error: {
|
|
|
20
20
|
readonly KeyframesRuleNameTypeError: typeof KeyframesRuleNameTypeError;
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Thrown if keyframes rule name is not a string.
|
|
24
24
|
|
|
25
25
|
#### SourceTypeError
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ Keyframes rule name must be a string.
|
|
|
28
28
|
readonly SourceTypeError: typeof SourceTypeError;
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Thrown if source is not a `CSSStyleSheet` or a `StyleSheetList`.
|
|
32
32
|
|
|
33
33
|
#### StyleSheetImportError
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@ Source must be either a `CSSStyleSheet` or a `StyleSheetList`.
|
|
|
36
36
|
readonly StyleSheetImportError: typeof StyleSheetImportError;
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Thrown if the stylesheet could not be imported.
|
|
40
40
|
|
|
41
41
|
## Methods
|
|
42
42
|
|
|
@@ -178,3 +178,12 @@ The rule to convert.
|
|
|
178
178
|
#### Returns
|
|
179
179
|
|
|
180
180
|
[`ParsedKeyframes`](../classes/ParsedKeyframes.md)
|
|
181
|
+
|
|
182
|
+
## See Also
|
|
183
|
+
|
|
184
|
+
### Referenced Here
|
|
185
|
+
- [CSSStyleSheetSource](../type-aliases/CSSStyleSheetSource.md)
|
|
186
|
+
- [ParsedKeyframes](../classes/ParsedKeyframes.md)
|
|
187
|
+
- [ParsedKeyframesRules](../type-aliases/ParsedKeyframesRules.md)
|
|
188
|
+
### References This
|
|
189
|
+
- [default](../variables/default.md)
|
|
@@ -5,3 +5,9 @@
|
|
|
5
5
|
```ts
|
|
6
6
|
type CSSStyleSheetSource = CSSStyleSheet | StyleSheetList;
|
|
7
7
|
```
|
|
8
|
+
|
|
9
|
+
## See Also
|
|
10
|
+
|
|
11
|
+
### References This
|
|
12
|
+
- [KeyframesFactory.getAllStyleSheetKeyframesRules](../interfaces/KeyframesFactory.md#getallstylesheetkeyframesrules)
|
|
13
|
+
- [KeyframesFactory.getStyleSheetKeyframes](../interfaces/KeyframesFactory.md#getstylesheetkeyframes)
|
|
@@ -7,3 +7,9 @@ type KeyframeArgument = Keyframe[] | PropertyIndexedKeyframes;
|
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
https://drafts.csswg.org/web-animations-1/#processing-a-keyframes-argument
|
|
10
|
+
|
|
11
|
+
## See Also
|
|
12
|
+
|
|
13
|
+
### References This
|
|
14
|
+
- [KeyframeEffectParameters.constructor](../classes/KeyframeEffectParameters.md#constructor)
|
|
15
|
+
- [KeyframeEffectParameters.keyframes](../classes/KeyframeEffectParameters.md#keyframes)
|
|
@@ -13,3 +13,10 @@ type ParsedKeyframesRules = {
|
|
|
13
13
|
```ts
|
|
14
14
|
[ruleName: string]: ParsedKeyframes
|
|
15
15
|
```
|
|
16
|
+
|
|
17
|
+
## See Also
|
|
18
|
+
|
|
19
|
+
### Referenced Here
|
|
20
|
+
- [ParsedKeyframes](../classes/ParsedKeyframes.md)
|
|
21
|
+
### References This
|
|
22
|
+
- [KeyframesFactory.getAllStyleSheetKeyframesRules](../interfaces/KeyframesFactory.md#getallstylesheetkeyframesrules)
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import { MarkdownPageEvent } from 'typedoc-plugin-markdown';
|
|
3
|
+
import { Reflection, ReflectionKind } from 'typedoc';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Recursively collect IDs of all reflections directly referenced by a type node.
|
|
7
|
+
*
|
|
8
|
+
* @param {import('typedoc').SomeType | undefined} type
|
|
9
|
+
* @param {Set<number>} out
|
|
10
|
+
*/
|
|
11
|
+
function collectRefIds(type, out) {
|
|
12
|
+
if (!type) return;
|
|
13
|
+
switch (type.type) {
|
|
14
|
+
case 'reference': {
|
|
15
|
+
const r = type.reflection;
|
|
16
|
+
if (r) out.add(r.id);
|
|
17
|
+
for (const a of type.typeArguments ?? []) collectRefIds(a, out);
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
case 'union':
|
|
21
|
+
case 'intersection':
|
|
22
|
+
for (const t of type.types ?? []) collectRefIds(t, out);
|
|
23
|
+
break;
|
|
24
|
+
case 'array':
|
|
25
|
+
case 'optional':
|
|
26
|
+
case 'rest':
|
|
27
|
+
collectRefIds(type.elementType, out);
|
|
28
|
+
break;
|
|
29
|
+
case 'tuple':
|
|
30
|
+
for (const t of type.elements ?? []) collectRefIds(t, out);
|
|
31
|
+
break;
|
|
32
|
+
case 'namedTupleMember':
|
|
33
|
+
collectRefIds(type.element, out);
|
|
34
|
+
break;
|
|
35
|
+
case 'conditional':
|
|
36
|
+
collectRefIds(type.checkType, out);
|
|
37
|
+
collectRefIds(type.extendsType, out);
|
|
38
|
+
collectRefIds(type.trueType, out);
|
|
39
|
+
collectRefIds(type.falseType, out);
|
|
40
|
+
break;
|
|
41
|
+
case 'typeOperator':
|
|
42
|
+
collectRefIds(type.target, out);
|
|
43
|
+
break;
|
|
44
|
+
case 'mapped':
|
|
45
|
+
collectRefIds(type.parameterType, out);
|
|
46
|
+
collectRefIds(type.templateType, out);
|
|
47
|
+
collectRefIds(type.nameType, out);
|
|
48
|
+
break;
|
|
49
|
+
case 'predicate':
|
|
50
|
+
collectRefIds(type.targetType, out);
|
|
51
|
+
break;
|
|
52
|
+
case 'query':
|
|
53
|
+
collectRefIds(type.queryType, out);
|
|
54
|
+
break;
|
|
55
|
+
case 'indexedAccess':
|
|
56
|
+
collectRefIds(type.objectType, out);
|
|
57
|
+
collectRefIds(type.indexType, out);
|
|
58
|
+
break;
|
|
59
|
+
case 'reflection':
|
|
60
|
+
if (type.declaration) collectRefsInDecl(type.declaration, out);
|
|
61
|
+
break;
|
|
62
|
+
default:
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Collect all referenced reflection IDs within a DeclarationReflection
|
|
69
|
+
* (its own type, signatures, accessors, index signatures, type parameters).
|
|
70
|
+
*
|
|
71
|
+
* @param {import('typedoc').DeclarationReflection} decl
|
|
72
|
+
* @param {Set<number>} out
|
|
73
|
+
*/
|
|
74
|
+
function collectRefsInDecl(decl, out) {
|
|
75
|
+
collectRefIds(decl.type, out);
|
|
76
|
+
|
|
77
|
+
for (const sig of decl.signatures ?? []) {
|
|
78
|
+
collectRefIds(sig.type, out); // return type
|
|
79
|
+
for (const p of sig.parameters ?? []) collectRefIds(p.type, out);
|
|
80
|
+
for (const tp of sig.typeParameters ?? []) {
|
|
81
|
+
collectRefIds(tp.type, out);
|
|
82
|
+
collectRefIds(tp.default, out);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (decl.getSignature) collectRefIds(decl.getSignature.type, out);
|
|
87
|
+
if (decl.setSignature) {
|
|
88
|
+
collectRefIds(decl.setSignature.type, out);
|
|
89
|
+
for (const p of decl.setSignature.parameters ?? []) collectRefIds(p.type, out);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
for (const idx of decl.indexSignatures ?? []) {
|
|
93
|
+
collectRefIds(idx.type, out);
|
|
94
|
+
for (const p of idx.parameters ?? []) collectRefIds(p.type, out);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
for (const tp of decl.typeParameters ?? []) {
|
|
98
|
+
collectRefIds(tp.type, out);
|
|
99
|
+
collectRefIds(tp.default, out);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @typedef {object} SeeAlsoEntry
|
|
105
|
+
* @property {Map<number, Set<import('typedoc').DeclarationReflection>>} reverse
|
|
106
|
+
* Pages/members whose code references the current page's symbol.
|
|
107
|
+
* @property {Map<number, Set<import('typedoc').DeclarationReflection>>} forward
|
|
108
|
+
* Symbols/pages that the current page's code references.
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Build see-also maps with two directions computed in a single pass.
|
|
113
|
+
*
|
|
114
|
+
* For every type reference from referrer R (on page P) to symbol S (on page Q):
|
|
115
|
+
* Reverse — Q's see-also gets R (the referenced type's page links to whoever uses it)
|
|
116
|
+
* Forward — P's see-also gets S (the referrer's page links to the types it uses)
|
|
117
|
+
*
|
|
118
|
+
* @param {import('typedoc').ProjectReflection} project
|
|
119
|
+
* @param {import('typedoc').Router} router
|
|
120
|
+
* @returns {SeeAlsoEntry}
|
|
121
|
+
*/
|
|
122
|
+
function buildSeeAlsoMaps(project, router) {
|
|
123
|
+
/** @type {Map<number, Set<import('typedoc').DeclarationReflection>>} */
|
|
124
|
+
const reverse = new Map();
|
|
125
|
+
/** @type {Map<number, Set<import('typedoc').DeclarationReflection>>} */
|
|
126
|
+
const forward = new Map();
|
|
127
|
+
|
|
128
|
+
/** @type {Map<number, import('typedoc').DeclarationReflection>} */
|
|
129
|
+
const linkTargetMap = new Map();
|
|
130
|
+
/** @type {Map<number, import('typedoc').DeclarationReflection>} */
|
|
131
|
+
const pageOwnerMap = new Map();
|
|
132
|
+
|
|
133
|
+
for (const target of router.getLinkTargets()) {
|
|
134
|
+
if (!(target instanceof Reflection)) continue;
|
|
135
|
+
if (target.isProject()) continue;
|
|
136
|
+
const decl = /** @type {import('typedoc').DeclarationReflection} */ (target);
|
|
137
|
+
linkTargetMap.set(decl.id, decl);
|
|
138
|
+
if (router.hasOwnDocument(target)) {
|
|
139
|
+
pageOwnerMap.set(decl.id, decl);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Walk up to the nearest Declaration with a URL that isn't a TypeLiteral.
|
|
145
|
+
* Skips signatures and TypeLiteral (__type) nodes while keeping methods,
|
|
146
|
+
* properties, constructors, and other user-facing declarations.
|
|
147
|
+
*
|
|
148
|
+
* @param {import('typedoc').Reflection} refl
|
|
149
|
+
* @returns {import('typedoc').DeclarationReflection | undefined}
|
|
150
|
+
*/
|
|
151
|
+
function findLinkTarget(refl) {
|
|
152
|
+
/** @type {import('typedoc').Reflection | undefined} */
|
|
153
|
+
let cursor = refl;
|
|
154
|
+
while (cursor) {
|
|
155
|
+
if (cursor instanceof Reflection && linkTargetMap.has(cursor.id)) {
|
|
156
|
+
if (cursor.isDeclaration() && !cursor.kindOf(ReflectionKind.TypeLiteral)) {
|
|
157
|
+
return linkTargetMap.get(cursor.id);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
cursor = cursor.parent;
|
|
161
|
+
}
|
|
162
|
+
return undefined;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Walk up to the nearest page-owning reflection.
|
|
167
|
+
* @param {import('typedoc').Reflection} refl
|
|
168
|
+
* @returns {import('typedoc').DeclarationReflection | undefined}
|
|
169
|
+
*/
|
|
170
|
+
function findPageOwner(refl) {
|
|
171
|
+
/** @type {import('typedoc').Reflection | undefined} */
|
|
172
|
+
let cursor = refl;
|
|
173
|
+
while (cursor) {
|
|
174
|
+
if (cursor instanceof Reflection && pageOwnerMap.has(cursor.id)) {
|
|
175
|
+
return pageOwnerMap.get(cursor.id);
|
|
176
|
+
}
|
|
177
|
+
cursor = cursor.parent;
|
|
178
|
+
}
|
|
179
|
+
return undefined;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
for (const refl of Object.values(project.reflections)) {
|
|
183
|
+
if (refl.isProject()) continue;
|
|
184
|
+
const decl = /** @type {import('typedoc').DeclarationReflection} */ (refl);
|
|
185
|
+
|
|
186
|
+
const referrer = findLinkTarget(decl);
|
|
187
|
+
if (!referrer || referrer.isProject()) continue;
|
|
188
|
+
const referrerPage = findPageOwner(referrer);
|
|
189
|
+
if (!referrerPage) continue;
|
|
190
|
+
|
|
191
|
+
/** @type {Set<number>} */
|
|
192
|
+
const refIds = new Set();
|
|
193
|
+
collectRefsInDecl(decl, refIds);
|
|
194
|
+
|
|
195
|
+
for (const refId of refIds) {
|
|
196
|
+
const refRefl = project.getReflectionById(refId);
|
|
197
|
+
if (!refRefl) continue;
|
|
198
|
+
const refTarget = findLinkTarget(refRefl);
|
|
199
|
+
if (!refTarget) continue;
|
|
200
|
+
const refPage = findPageOwner(refTarget);
|
|
201
|
+
if (!refPage || refPage.id === referrerPage.id) continue;
|
|
202
|
+
|
|
203
|
+
if (!reverse.has(refPage.id)) reverse.set(refPage.id, new Set());
|
|
204
|
+
reverse.get(refPage.id)?.add(referrer);
|
|
205
|
+
|
|
206
|
+
if (!forward.has(referrerPage.id)) forward.set(referrerPage.id, new Set());
|
|
207
|
+
forward.get(referrerPage.id)?.add(refTarget);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return { reverse, forward };
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// ─── Plugin entry point ───────────────────────────────────────────────────────
|
|
215
|
+
|
|
216
|
+
/** @param {import('typedoc-plugin-markdown').MarkdownApplication} app */
|
|
217
|
+
export function load(app) {
|
|
218
|
+
|
|
219
|
+
/** @type {SeeAlsoEntry} */
|
|
220
|
+
let seeAlso = { reverse: new Map(), forward: new Map() };
|
|
221
|
+
|
|
222
|
+
app.renderer.preMarkdownRenderAsyncJobs.push(async (event) => {
|
|
223
|
+
const router = app.renderer.router;
|
|
224
|
+
if (!router || !event.project) return;
|
|
225
|
+
seeAlso = buildSeeAlsoMaps(event.project, router);
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
app.renderer.markdownHooks.on('page.end', ({ page, router }) => {
|
|
229
|
+
if (!page.isReflectionEvent()) return '';
|
|
230
|
+
|
|
231
|
+
const model = /** @type {import('typedoc').DeclarationReflection} */ (page.model);
|
|
232
|
+
const reverseRefs = seeAlso.reverse.get(model.id);
|
|
233
|
+
const forwardRefs = seeAlso.forward.get(model.id);
|
|
234
|
+
if (!reverseRefs?.size && !forwardRefs?.size) return '';
|
|
235
|
+
|
|
236
|
+
const byName = (/** @type {import('typedoc').DeclarationReflection} */ a, /** @type {import('typedoc').DeclarationReflection} */ b) =>
|
|
237
|
+
a.getFriendlyFullName().localeCompare(b.getFriendlyFullName());
|
|
238
|
+
|
|
239
|
+
const seen = new Set();
|
|
240
|
+
let linksText = '';
|
|
241
|
+
|
|
242
|
+
/** @param {import('typedoc').DeclarationReflection} ref */
|
|
243
|
+
const formatLink = (ref) => {
|
|
244
|
+
if (ref.id === model.id || seen.has(ref.id)) return;
|
|
245
|
+
seen.add(ref.id);
|
|
246
|
+
const url = router.relativeUrl(model, ref);
|
|
247
|
+
linksText += `\n- [${ref.getFriendlyFullName()}](${url})`;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
if (forwardRefs) {
|
|
251
|
+
linksText += '\n### Referenced Here';
|
|
252
|
+
[...forwardRefs].sort(byName).forEach(formatLink);
|
|
253
|
+
}
|
|
254
|
+
if (reverseRefs) {
|
|
255
|
+
linksText += '\n### References This';
|
|
256
|
+
[...reverseRefs].sort(byName).forEach(formatLink);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (!linksText) return '';
|
|
260
|
+
return `\n## See Also\n${linksText}\n`;
|
|
261
|
+
});
|
|
262
|
+
}
|
package/docs/typedoc.config.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @type {import('typedoc').TypeDocOptions & import('typedoc-plugin-markdown').PluginOptions & { inheritNone?: boolean }}
|
|
5
|
+
*/
|
|
4
6
|
export default {
|
|
5
7
|
"name": "KeyframeKit",
|
|
6
8
|
|
|
@@ -10,6 +12,7 @@ export default {
|
|
|
10
12
|
"typedoc-plugin-no-inherit",
|
|
11
13
|
"./typedoc/plugin-param-names.js",
|
|
12
14
|
"./typedoc/plugin-markdown-mdn-links-fix.js",
|
|
15
|
+
"./typedoc/plugin-markdown-see-also.js",
|
|
13
16
|
//"typedoc-plugin-inline-sources",
|
|
14
17
|
//"typedoc-plugin-remark",
|
|
15
18
|
//"typedoc-github-wiki-theme",
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keyframekit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Unlock fine-grained control over your CSS animations with JavaScript.",
|
|
5
5
|
"main": "./dist/KeyframeKit.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "tsc && rollup -c
|
|
7
|
+
"build": "tsc && rollup -c",
|
|
8
8
|
"docs:bump": "(cd docs && npm run bump)",
|
|
9
9
|
"docs:build": "(cd docs && npm run build)"
|
|
10
10
|
},
|
package/rollup.config.js
CHANGED
|
@@ -3,6 +3,20 @@ import terser from '@rollup/plugin-terser';
|
|
|
3
3
|
|
|
4
4
|
import MagicString from 'magic-string';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @type {import('rollup').RollupOptions}
|
|
8
|
+
*/
|
|
9
|
+
export default {
|
|
10
|
+
input: {
|
|
11
|
+
'KeyframeKit.min.js': 'src/KeyframeKit.ts'
|
|
12
|
+
},
|
|
13
|
+
output: {
|
|
14
|
+
dir: 'dist',
|
|
15
|
+
entryFileNames: '[name]'
|
|
16
|
+
},
|
|
17
|
+
plugins: [typescript({ sourceMap: false }), terser(), header()]
|
|
18
|
+
};
|
|
19
|
+
|
|
6
20
|
function header() {
|
|
7
21
|
|
|
8
22
|
return {
|
|
@@ -26,18 +40,3 @@ function header() {
|
|
|
26
40
|
};
|
|
27
41
|
|
|
28
42
|
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @type {import('rollup').RollupOptions}
|
|
32
|
-
*/
|
|
33
|
-
export default {
|
|
34
|
-
input: {
|
|
35
|
-
'KeyframeKit.min.js': 'src/KeyframeKit.ts'
|
|
36
|
-
},
|
|
37
|
-
output: {
|
|
38
|
-
dir: 'dist',
|
|
39
|
-
entryFileNames: '[name]',
|
|
40
|
-
sourcemap: true
|
|
41
|
-
},
|
|
42
|
-
plugins: [typescript(), terser(), header()]
|
|
43
|
-
};
|
package/src/KeyframeKit.ts
CHANGED
|
@@ -19,15 +19,15 @@ export type CSSStyleSheetSource = CSSStyleSheet | StyleSheetList;
|
|
|
19
19
|
class KeyframesFactory {
|
|
20
20
|
|
|
21
21
|
readonly Error = {
|
|
22
|
-
/**
|
|
22
|
+
/** Thrown if keyframes rule name is not a string. */
|
|
23
23
|
KeyframesRuleNameTypeError: class KeyframesRuleNameTypeError extends TypeError {
|
|
24
24
|
message = `Keyframes rule name must be a string.`;
|
|
25
25
|
},
|
|
26
|
-
/**
|
|
26
|
+
/** Thrown if source is not a `CSSStyleSheet` or a `StyleSheetList`. */
|
|
27
27
|
SourceTypeError: class SourceTypeError extends TypeError {
|
|
28
28
|
message = `Source must be either a CSSStyleSheet or a StyleSheetList.`;
|
|
29
29
|
},
|
|
30
|
-
/**
|
|
30
|
+
/** Thrown if the stylesheet could not be imported. */
|
|
31
31
|
StyleSheetImportError: class StyleSheetImportError extends Error {
|
|
32
32
|
message = `The stylesheet could not be imported.`;
|
|
33
33
|
}
|
|
@@ -271,6 +271,9 @@ class KeyframesFactory {
|
|
|
271
271
|
const offset = percent / 100;
|
|
272
272
|
|
|
273
273
|
|
|
274
|
+
/** https://drafts.csswg.org/web-animations-1/#processing-a-keyframes-argument */
|
|
275
|
+
type KeyframeProperties = { [propertyName: string]: string };
|
|
276
|
+
|
|
274
277
|
let parsedProperties: KeyframeProperties = {};
|
|
275
278
|
|
|
276
279
|
for (const propertyName of keyframe.style) {
|
|
@@ -371,9 +374,6 @@ class KeyframesFactory {
|
|
|
371
374
|
export default new KeyframesFactory();
|
|
372
375
|
export type { KeyframesFactory };
|
|
373
376
|
|
|
374
|
-
/** https://drafts.csswg.org/web-animations-1/#processing-a-keyframes-argument */
|
|
375
|
-
type KeyframeProperties = { [propertyName: string]: string };
|
|
376
|
-
|
|
377
377
|
|
|
378
378
|
/** https://drafts.csswg.org/web-animations-1/#processing-a-keyframes-argument */
|
|
379
379
|
export type KeyframeArgument = Keyframe[] | PropertyIndexedKeyframes;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
// File Layout
|
|
5
|
+
// "rootDir": "./src",
|
|
6
|
+
// "outDir": "./dist",
|
|
7
|
+
|
|
8
|
+
// Environment Settings
|
|
9
|
+
// See also https://aka.ms/tsconfig/module
|
|
10
|
+
"module": "nodenext",
|
|
11
|
+
"target": "esnext",
|
|
12
|
+
"types": [],
|
|
13
|
+
// For nodejs:
|
|
14
|
+
// "lib": ["esnext"],
|
|
15
|
+
// "types": ["node"],
|
|
16
|
+
// and npm install -D @types/node
|
|
17
|
+
|
|
18
|
+
// Other Outputs
|
|
19
|
+
"sourceMap": true,
|
|
20
|
+
"declaration": true,
|
|
21
|
+
"declarationMap": true,
|
|
22
|
+
|
|
23
|
+
// Stricter Typechecking Options
|
|
24
|
+
"noUncheckedIndexedAccess": true,
|
|
25
|
+
"exactOptionalPropertyTypes": true,
|
|
26
|
+
|
|
27
|
+
// Style Options
|
|
28
|
+
// "noImplicitReturns": true,
|
|
29
|
+
// "noImplicitOverride": true,
|
|
30
|
+
// "noUnusedLocals": true,
|
|
31
|
+
// "noUnusedParameters": true,
|
|
32
|
+
// "noFallthroughCasesInSwitch": true,
|
|
33
|
+
// "noPropertyAccessFromIndexSignature": true,
|
|
34
|
+
|
|
35
|
+
// Recommended Options
|
|
36
|
+
"strict": true,
|
|
37
|
+
"jsx": "react-jsx",
|
|
38
|
+
"verbatimModuleSyntax": true,
|
|
39
|
+
"isolatedModules": true,
|
|
40
|
+
"noUncheckedSideEffectImports": true,
|
|
41
|
+
"moduleDetection": "force",
|
|
42
|
+
"skipLibCheck": true,
|
|
43
|
+
}
|
|
44
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,47 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
],
|
|
6
|
-
"exclude": [],
|
|
2
|
+
"extends": "./tsconfig.default.json",
|
|
3
|
+
"module": "esnext",
|
|
4
|
+
|
|
5
|
+
"files": ["src/KeyframeKit.ts"],
|
|
7
6
|
"compilerOptions": {
|
|
8
|
-
// File Layout
|
|
9
7
|
"rootDir": "src",
|
|
10
8
|
"outDir": "dist",
|
|
11
|
-
|
|
12
|
-
// Environment Settings
|
|
13
|
-
// See also https://aka.ms/tsconfig/module
|
|
14
|
-
"module": "esnext",
|
|
15
|
-
"target": "esnext",
|
|
16
|
-
"types": [],
|
|
17
|
-
// For nodejs:
|
|
18
|
-
// "lib": ["esnext"],
|
|
19
|
-
// "types": ["node"],
|
|
20
|
-
// and npm install -D @types/node
|
|
21
|
-
|
|
22
|
-
// Other Outputs
|
|
23
|
-
"sourceMap": true,
|
|
24
|
-
"declaration": true,
|
|
25
|
-
"declarationMap": true,
|
|
26
|
-
|
|
27
|
-
// Stricter Typechecking Options
|
|
28
|
-
"noUncheckedIndexedAccess": true,
|
|
29
|
-
"exactOptionalPropertyTypes": true,
|
|
30
|
-
|
|
31
|
-
// Style Options
|
|
32
|
-
// "noImplicitReturns": true,
|
|
33
|
-
// "noImplicitOverride": true,
|
|
34
|
-
// "noUnusedLocals": true,
|
|
35
|
-
// "noUnusedParameters": true,
|
|
36
|
-
// "noFallthroughCasesInSwitch": true,
|
|
37
|
-
// "noPropertyAccessFromIndexSignature": true,
|
|
38
|
-
|
|
39
|
-
// Recommended Options
|
|
40
|
-
"strict": true,
|
|
41
|
-
"verbatimModuleSyntax": true,
|
|
42
|
-
"isolatedModules": true,
|
|
43
|
-
"noUncheckedSideEffectImports": true,
|
|
44
|
-
"moduleDetection": "force",
|
|
45
|
-
"skipLibCheck": true,
|
|
46
9
|
}
|
|
47
10
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KeyframeKit.min.js","sources":["../src/KeyframeKit.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAQA"}
|
|
File without changes
|