motionary 10.2.0 → 10.3.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/CHANGELOG.md +22 -0
- package/README.md +32 -0
- package/dist/chunks/{keyframes-W-474DMc.js → keyframes-DVAC5sQI.js} +2 -2
- package/dist/chunks/{keyframes-W-474DMc.js.map → keyframes-DVAC5sQI.js.map} +1 -1
- package/dist/chunks/{keyframes-ZheOkpt0.cjs → keyframes-Dw9zwVQa.cjs} +2 -2
- package/dist/chunks/{keyframes-ZheOkpt0.cjs.map → keyframes-Dw9zwVQa.cjs.map} +1 -1
- package/dist/chunks/{registry-BIEjKngP.js → registry-46AAzyeC.js} +2 -2
- package/dist/chunks/{registry-BIEjKngP.js.map → registry-46AAzyeC.js.map} +1 -1
- package/dist/chunks/{registry-eJgpFAzI.cjs → registry-CSVil2qJ.cjs} +2 -2
- package/dist/chunks/{registry-eJgpFAzI.cjs.map → registry-CSVil2qJ.cjs.map} +1 -1
- package/dist/chunks/{ticker-CM_56oVy.js → ticker-COOYAyQy.js} +2 -2
- package/dist/chunks/{ticker-CM_56oVy.js.map → ticker-COOYAyQy.js.map} +1 -1
- package/dist/chunks/{ticker-D4o6enH0.cjs → ticker-gHv6pNfx.cjs} +2 -2
- package/dist/chunks/{ticker-D4o6enH0.cjs.map → ticker-gHv6pNfx.cjs.map} +1 -1
- package/dist/chunks/{tween-CBuWYpI-.cjs → tween-CFN0WcOb.cjs} +13 -3
- package/dist/chunks/tween-CFN0WcOb.cjs.map +1 -0
- package/dist/chunks/{tween-CqX1JBuj.js → tween-CGyolmzB.js} +13 -3
- package/dist/chunks/tween-CGyolmzB.js.map +1 -0
- package/dist/components/widgets.cjs +403 -202
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +42 -2
- package/dist/components/widgets.d.ts +42 -2
- package/dist/components/widgets.js +402 -203
- package/dist/components/widgets.js.map +1 -1
- package/dist/llms-full.txt +97 -1
- package/dist/llms.txt +6 -2
- package/dist/manifest.json +234 -1
- package/dist/runtime/format-css.cjs +4 -4
- package/dist/runtime/format-css.js +4 -4
- package/dist/runtime/format-motion.cjs +4 -4
- package/dist/runtime/format-motion.js +4 -4
- package/dist/runtime/format-sprite.cjs +225 -0
- package/dist/runtime/format-sprite.cjs.map +1 -0
- package/dist/runtime/format-sprite.d.cts +224 -0
- package/dist/runtime/format-sprite.d.ts +224 -0
- package/dist/runtime/format-sprite.iife.js +2 -0
- package/dist/runtime/format-sprite.iife.js.map +1 -0
- package/dist/runtime/format-sprite.js +215 -0
- package/dist/runtime/format-sprite.js.map +1 -0
- package/dist/runtime/format-svg.cjs +3 -3
- package/dist/runtime/format-svg.cjs.map +1 -1
- package/dist/runtime/format-svg.iife.js.map +1 -1
- package/dist/runtime/format-svg.js +3 -3
- package/dist/runtime/format-svg.js.map +1 -1
- package/dist/runtime/scroll.cjs +2 -2
- package/dist/runtime/scroll.js +2 -2
- package/dist/runtime/text.cjs +147 -0
- package/dist/runtime/text.cjs.map +1 -0
- package/dist/runtime/text.d.cts +65 -0
- package/dist/runtime/text.d.ts +65 -0
- package/dist/runtime/text.iife.js +2 -0
- package/dist/runtime/text.iife.js.map +1 -0
- package/dist/runtime/text.js +143 -0
- package/dist/runtime/text.js.map +1 -0
- package/dist/runtime.cjs +3 -3
- package/dist/runtime.d.cts +9 -2
- package/dist/runtime.d.ts +9 -2
- package/dist/runtime.iife.js +1 -1
- package/dist/runtime.iife.js.map +1 -1
- package/dist/runtime.js +5 -5
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +1 -1
- package/docs/components/README.md +3 -1
- package/docs/components/usa-route-transition.md +38 -0
- package/docs/components/usa-text-splitter.md +60 -0
- package/docs/components.md +45 -0
- package/docs/runtime/format-sprite.md +60 -0
- package/docs/runtime/text.md +59 -0
- package/package.json +21 -1
- package/dist/chunks/tween-CBuWYpI-.cjs.map +0 -1
- package/dist/chunks/tween-CqX1JBuj.js.map +0 -1
package/docs/ROADMAP.md
CHANGED
|
@@ -52,7 +52,7 @@ Store 卡片显示 **「Requires: motionary/runtime/<module>」** 徽章(官
|
|
|
52
52
|
- 主线 B:**scroll 模块**(`motionary/runtime/scroll`)—— pin、scrub、markers、start / end 规则(自研,功能对标 ScrollTrigger,但不复制其代码或 API)。
|
|
53
53
|
- 格式:SVG SMIL 回放、路径变形、CSS 动画 SVG(`motionary/runtime/format-svg`)。
|
|
54
54
|
- 新组件:动效检查器面板、`<usa-scroll-scene>`(Requires: motionary/runtime/scroll)。
|
|
55
|
-
- **v10.3** — View Transitions 2.0:跨文档页面转场、共享元素动画。
|
|
55
|
+
- ✅ **v10.3** — View Transitions 2.0:跨文档页面转场、共享元素动画。
|
|
56
56
|
- 主线 B:**text 模块** —— 逐字 / 逐词 / 逐行拆分(保留可访问文本)。
|
|
57
57
|
- 格式:精灵图(TexturePacker / Aseprite JSON)、图片序列(`motionary/runtime/format-sprite`)。
|
|
58
58
|
- 新组件:路由转场容器、`<usa-text-splitter>`(`<usa-split-text>` 已被 4.x 文本组件占用)。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Motionary components (
|
|
1
|
+
# Motionary components (195)
|
|
2
2
|
|
|
3
3
|
One page per `<usa-*>` element, generated from the source. Machine-readable: `motionary/manifest.json` · Pages `/components.json` · `/llms.txt` · `/llms-full.txt`. How to use these with an AI assistant: [AGENTS.md](../../AGENTS.md) and [the prompt guide](../ai-prompt-guide.md).
|
|
4
4
|
|
|
@@ -8,6 +8,7 @@ One page per `<usa-*>` element, generated from the source. Machine-readable: `mo
|
|
|
8
8
|
- [`<usa-dialog>`](usa-dialog.md) — Modal & drawer
|
|
9
9
|
- [`<usa-disclosure>`](usa-disclosure.md) — Accordion 2.0
|
|
10
10
|
- [`<usa-modal>`](usa-modal.md) — Modal dialog
|
|
11
|
+
- [`<usa-route-transition>`](usa-route-transition.md) — Route transition container
|
|
11
12
|
- [`<usa-sheet>`](usa-sheet.md) — Drawer / bottom sheet
|
|
12
13
|
- [`<usa-view-switch>`](usa-view-switch.md) — View switch
|
|
13
14
|
|
|
@@ -207,6 +208,7 @@ One page per `<usa-*>` element, generated from the source. Machine-readable: `mo
|
|
|
207
208
|
- [`<usa-shimmer-text>`](usa-shimmer-text.md) — Shimmer text
|
|
208
209
|
- [`<usa-split-text>`](usa-split-text.md) — Split-text reveal
|
|
209
210
|
- [`<usa-text-rotate>`](usa-text-rotate.md) — Rotating words
|
|
211
|
+
- [`<usa-text-splitter>`](usa-text-splitter.md) — Text splitter · Requires: motionary/runtime/text
|
|
210
212
|
- [`<usa-typewriter>`](usa-typewriter.md) — Typewriter
|
|
211
213
|
- [`<usa-wave-text>`](usa-wave-text.md) — Wave text
|
|
212
214
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-route-transition>` — Route transition container
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
10.3: View Transitions 2.0 — link clicks swap the container’s content with the target page (fetched) or an inline <template data-route>, animated with the View Transitions API (Web Animations fallback); data-shared elements morph between routes; cross-document enables native MPA transitions.
|
|
6
|
+
|
|
7
|
+
- **Category:** transitions · **since** 10.3
|
|
8
|
+
- **Import:** `import { defineRouteTransition } from 'motionary/components/widgets'` then `defineRouteTransition();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `effect`, `engine`, `cross-document`
|
|
11
|
+
- **Events:** `usa:navigate`, `usa:navigated`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `navigate()`
|
|
14
|
+
- **Source:** [src/components/widgets/route-transition.ts](../../src/components/widgets/route-transition.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-route-transition id="app" effect="slide" cross-document>
|
|
20
|
+
<nav><a href="/">Home</a> <a href="/about">About</a></nav>
|
|
21
|
+
<h1 data-shared="title">Home</h1>
|
|
22
|
+
</usa-route-transition>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineRouteTransition } from 'motionary/components/widgets';
|
|
29
|
+
|
|
30
|
+
defineRouteTransition(); // registers <usa-route-transition>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-route-transition id="app" effect="slide" cross-document>
|
|
34
|
+
<nav><a href="/">Home</a> <a href="/about">About</a></nav>
|
|
35
|
+
<h1 data-shared="title">Home</h1>
|
|
36
|
+
</usa-route-transition>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# `<usa-text-splitter>` — Text splitter
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
10.3: splits its text into characters, words or lines and animates them in with a stagger (rise, fade, blur, flip, wave) when it scrolls into view — accessible, grapheme-aware. Requires motionary/runtime/text — npm i motionary, then use(text) before it mounts.
|
|
6
|
+
|
|
7
|
+
- **Category:** text · **since** 10.3
|
|
8
|
+
- **Import:** `import { defineTextSplitter } from 'motionary/components/widgets'` then `defineTextSplitter();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `split`, `effect`, `stagger`, `duration`, `loop`, `trigger`
|
|
11
|
+
- **Events:** `usa:split`, `usa:done`, `usa:runtime-missing`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `replay()`, `pieces()`
|
|
14
|
+
- **Source:** [src/components/widgets/text-splitter.ts](../../src/components/widgets/text-splitter.ts)
|
|
15
|
+
|
|
16
|
+
## Prerequisites — Requires: motionary/runtime/text
|
|
17
|
+
|
|
18
|
+
1. **Install:** `npm i motionary`
|
|
19
|
+
2. **Import order & registration:** Register the core first, then the module: use(text) also registers the core. CDN: load runtime.iife.js, then runtime/text.iife.js (it registers itself).
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import { use } from 'motionary/runtime';
|
|
23
|
+
import { text } from 'motionary/runtime/text';
|
|
24
|
+
import { defineTextSplitter } from 'motionary/components/widgets';
|
|
25
|
+
|
|
26
|
+
use(text);
|
|
27
|
+
defineTextSplitter(); // registers <usa-text-splitter> — after the prerequisites
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
3. **CDN:**
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
34
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/text.iife.js"></script>
|
|
35
|
+
<!-- then the component bundles -->
|
|
36
|
+
<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
|
|
37
|
+
<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Minimal example
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<usa-text-splitter split="chars" effect="rise" stagger="30">Motion, made simple.</usa-text-splitter>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## ES module
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
import { use } from 'motionary/runtime';
|
|
50
|
+
import { text } from 'motionary/runtime/text';
|
|
51
|
+
|
|
52
|
+
use(text);
|
|
53
|
+
import { defineTextSplitter } from 'motionary/components/widgets';
|
|
54
|
+
|
|
55
|
+
defineTextSplitter(); // registers <usa-text-splitter>
|
|
56
|
+
|
|
57
|
+
/* then use it in your HTML:
|
|
58
|
+
<usa-text-splitter split="chars" effect="rise" stagger="30">Motion, made simple.</usa-text-splitter>
|
|
59
|
+
*/
|
|
60
|
+
```
|
package/docs/components.md
CHANGED
|
@@ -1407,6 +1407,36 @@ defineScrollScene(); // registers <usa-scroll-scene> — after the prerequisites
|
|
|
1407
1407
|
</usa-scroll-scene>
|
|
1408
1408
|
```
|
|
1409
1409
|
|
|
1410
|
+
### `<usa-text-splitter>` — Requires: motionary/runtime/text
|
|
1411
|
+
|
|
1412
|
+
- **Install:** `npm i motionary`
|
|
1413
|
+
- **Import order & registration:** Register the core first, then the module: use(text) also registers the core. CDN: load runtime.iife.js, then runtime/text.iife.js (it registers itself).
|
|
1414
|
+
|
|
1415
|
+
```js
|
|
1416
|
+
import { use } from 'motionary/runtime';
|
|
1417
|
+
import { text } from 'motionary/runtime/text';
|
|
1418
|
+
import { defineTextSplitter } from 'motionary/components/widgets';
|
|
1419
|
+
|
|
1420
|
+
use(text);
|
|
1421
|
+
defineTextSplitter(); // registers <usa-text-splitter> — after the prerequisites
|
|
1422
|
+
```
|
|
1423
|
+
|
|
1424
|
+
- **CDN:**
|
|
1425
|
+
|
|
1426
|
+
```html
|
|
1427
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
1428
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/text.iife.js"></script>
|
|
1429
|
+
<!-- then the component bundles -->
|
|
1430
|
+
<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
|
|
1431
|
+
<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
|
|
1432
|
+
```
|
|
1433
|
+
|
|
1434
|
+
- **Minimal example:**
|
|
1435
|
+
|
|
1436
|
+
```html
|
|
1437
|
+
<usa-text-splitter split="chars" effect="rise" stagger="30">Motion, made simple.</usa-text-splitter>
|
|
1438
|
+
```
|
|
1439
|
+
|
|
1410
1440
|
<!-- prereqs:end -->
|
|
1411
1441
|
|
|
1412
1442
|
### v10.2 Scroll scenes (`motionary/runtime/scroll`) + SVG loader + `data-motion` in core: `<usa-scroll-scene>`, `<usa-motion-inspector>` (`components/widgets`)
|
|
@@ -1426,6 +1456,21 @@ defineScrollScene(); // registers <usa-scroll-scene> — after the prerequisites
|
|
|
1426
1456
|
|
|
1427
1457
|
Declarative motion with just the core: `applyMotionAttributes(createMotion())` + `data-motion="enter: fade-up 600ms"`.
|
|
1428
1458
|
|
|
1459
|
+
### v10.3 View Transitions 2.0 + text splitting (`motionary/runtime/text`) + sprite sheets: `<usa-route-transition>`, `<usa-text-splitter>` (`components/widgets`)
|
|
1460
|
+
|
|
1461
|
+
```html
|
|
1462
|
+
<usa-route-transition id="app" effect="slide" cross-document>
|
|
1463
|
+
<nav><a href="/">Home</a> <a href="/about">About</a></nav>
|
|
1464
|
+
<h1 data-shared="title">Home</h1>
|
|
1465
|
+
</usa-route-transition>
|
|
1466
|
+
<usa-text-splitter split="chars" effect="rise" stagger="30">Motion, made simple.</usa-text-splitter>
|
|
1467
|
+
```
|
|
1468
|
+
|
|
1469
|
+
| Element | Attributes | Methods / events |
|
|
1470
|
+
|---|---|---|
|
|
1471
|
+
| `<usa-route-transition>` | `effect` (fade, slide, zoom), `engine` (auto, view-transition, waapi), `selector`, `history` (push, replace, off), `links` (inside, document), `cross-document`; `[data-to]`, `<template data-route>`, `[data-shared]` | `navigate(url)`, `current`; `usa:navigate`, `usa:navigated` |
|
|
1472
|
+
| `<usa-text-splitter>` (Requires: motionary/runtime/text) | `split` (chars, words, lines), `effect` (rise, fade, blur, flip, wave), `stagger`, `duration`, `trigger` (view, load, hover), `loop` | `replay()`, `pieces()`; `usa:split`, `usa:done`, `usa:runtime-missing` |
|
|
1473
|
+
|
|
1429
1474
|
## Frameworks
|
|
1430
1475
|
|
|
1431
1476
|
Custom elements work in every framework. Register once (e.g. in your entry file), then use the tags.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# motionary/runtime/format-sprite — Sprite sheets & image sequences
|
|
2
|
+
|
|
3
|
+
> Generated from `showcase/catalog/prereqs.js` by `scripts/gen-runtime-docs.mjs` — edit the data, not this page.
|
|
4
|
+
|
|
5
|
+
Play TexturePacker / Aseprite sprite sheets and numbered image sequences on a canvas or an element background, as runtime timelines (scrubbable).
|
|
6
|
+
|
|
7
|
+
Part of Motionary's own zero-dependency runtime. Size budget: **3.0 KB gzip** (enforced in CI).
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
1. **Install:** `npm i motionary`
|
|
12
|
+
2. **Import path:** `motionary/runtime/format-sprite`
|
|
13
|
+
3. **CDN:**
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
17
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-sprite.iife.js"></script>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
ESM from a CDN: `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-sprite.js`
|
|
21
|
+
|
|
22
|
+
4. **Import order & registration:** Register the core first, then the module: use(formatSprite) also registers the core. CDN: load runtime.iife.js, then runtime/format-sprite.iife.js (it registers itself).
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { use } from 'motionary/runtime';
|
|
26
|
+
import { formatSprite } from 'motionary/runtime/format-sprite';
|
|
27
|
+
use(formatSprite);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { use } from 'motionary/runtime';
|
|
34
|
+
import { formatSprite, parseSpriteSheet, spritePlayer } from 'motionary/runtime/format-sprite';
|
|
35
|
+
use(formatSprite);
|
|
36
|
+
const sheet = parseSpriteSheet(await (await fetch('/slime.json')).json());
|
|
37
|
+
const img = new Image(); img.src = '/slime.png'; await img.decode();
|
|
38
|
+
spritePlayer(document.querySelector('canvas'), sheet, img, { tag: 'bounce' });
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Exports
|
|
42
|
+
|
|
43
|
+
`formatSprite` · `parseSpriteSheet` · `gridSheet` · `frameOrder` · `drawFrame` · `spritePlayer` · `imageSequence` · `preloadImages` · `sequencePlayer`
|
|
44
|
+
|
|
45
|
+
## Compatibility
|
|
46
|
+
|
|
47
|
+
| Feature | Supported | Notes |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| TexturePacker JSON (hash + array) | ✅ yes | trimmed (spriteSourceSize / sourceSize) and rotated frames |
|
|
50
|
+
| Aseprite JSON (hash + array), per-frame duration | ✅ yes | |
|
|
51
|
+
| Aseprite frameTags: forward / reverse / pingpong / pingpong_reverse | ✅ yes | |
|
|
52
|
+
| plain grid sheets | ✅ yes | gridSheet(cols, rows, w, h) |
|
|
53
|
+
| image sequences (frame_{0001}.webp) | ✅ yes | preloading, cover-fit drawing, scrub via progress |
|
|
54
|
+
| multipack (several atlas images) | ✕ no | load each sheet separately |
|
|
55
|
+
| Aseprite slices / layers | ✕ no | frames only |
|
|
56
|
+
| SSR / workers | ◐ partial | parsing is pure; players need a canvas (OffscreenCanvas works) |
|
|
57
|
+
|
|
58
|
+
## Components that need it
|
|
59
|
+
|
|
60
|
+
_None yet._
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# motionary/runtime/text — Text splitting
|
|
2
|
+
|
|
3
|
+
> Generated from `showcase/catalog/prereqs.js` by `scripts/gen-runtime-docs.mjs` — edit the data, not this page.
|
|
4
|
+
|
|
5
|
+
Split text into characters (grapheme-aware), words and lines for animation while keeping it accessible (aria-label with the full text, pieces hidden from assistive tech).
|
|
6
|
+
|
|
7
|
+
Part of Motionary's own zero-dependency runtime. Size budget: **2.5 KB gzip** (enforced in CI).
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
1. **Install:** `npm i motionary`
|
|
12
|
+
2. **Import path:** `motionary/runtime/text`
|
|
13
|
+
3. **CDN:**
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
17
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/text.iife.js"></script>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
ESM from a CDN: `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/text.js`
|
|
21
|
+
|
|
22
|
+
4. **Import order & registration:** Register the core first, then the module: use(text) also registers the core. CDN: load runtime.iife.js, then runtime/text.iife.js (it registers itself).
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { use } from 'motionary/runtime';
|
|
26
|
+
import { text } from 'motionary/runtime/text';
|
|
27
|
+
use(text);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { use, tween } from 'motionary/runtime';
|
|
34
|
+
import { text, splitText } from 'motionary/runtime/text';
|
|
35
|
+
use(text);
|
|
36
|
+
const { chars } = splitText(document.querySelector('h1'), { type: 'chars,words' });
|
|
37
|
+
tween(chars, { from: { y: '1em', opacity: 0 }, to: { y: '0em', opacity: 1 }, stagger: 30 });
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Exports
|
|
41
|
+
|
|
42
|
+
`text` · `splitText` · `segment`
|
|
43
|
+
|
|
44
|
+
## Compatibility
|
|
45
|
+
|
|
46
|
+
| Feature | Supported | Notes |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| chars (grapheme clusters: emoji, combining marks, CJK) | ✅ yes | Intl.Segmenter when available, code points otherwise |
|
|
49
|
+
| words, whitespace preserved | ✅ yes | |
|
|
50
|
+
| lines (grouped by rendered position) | ✅ yes | wrapped in line spans for flat text; data-line on words inside nested markup |
|
|
51
|
+
| nested inline markup (a, em, strong…) kept | ✅ yes | |
|
|
52
|
+
| accessibility: aria-label + aria-hidden pieces, revert() | ✅ yes | |
|
|
53
|
+
| --i index custom property for CSS staggers | ✅ yes | |
|
|
54
|
+
| SSR / workers | ◐ partial | segment() is pure; splitText() needs a DOM |
|
|
55
|
+
| right-to-left line detection | ◐ partial | lines by vertical position (works for RTL; bidi runs not reordered) |
|
|
56
|
+
|
|
57
|
+
## Components that need it
|
|
58
|
+
|
|
59
|
+
- `<usa-text-splitter>` — Text splitter
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motionary",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
4
4
|
"description": "Motionary (formerly use-scroll-animate): dependency-free scroll animations + 94 animated Web Components — 214 scroll-reveal presets, card/click/button morphs, physics, page transitions, generative & sound-reactive backgrounds, cursor/gesture effects, themes, micro-interactions, <usa-player>, WebGL. React, Vue, Svelte, Solid, Angular or plain HTML.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -1258,6 +1258,26 @@
|
|
|
1258
1258
|
"default": "./dist/runtime/format-svg.cjs"
|
|
1259
1259
|
}
|
|
1260
1260
|
},
|
|
1261
|
+
"./runtime/text": {
|
|
1262
|
+
"import": {
|
|
1263
|
+
"types": "./dist/runtime/text.d.ts",
|
|
1264
|
+
"default": "./dist/runtime/text.js"
|
|
1265
|
+
},
|
|
1266
|
+
"require": {
|
|
1267
|
+
"types": "./dist/runtime/text.d.cts",
|
|
1268
|
+
"default": "./dist/runtime/text.cjs"
|
|
1269
|
+
}
|
|
1270
|
+
},
|
|
1271
|
+
"./runtime/format-sprite": {
|
|
1272
|
+
"import": {
|
|
1273
|
+
"types": "./dist/runtime/format-sprite.d.ts",
|
|
1274
|
+
"default": "./dist/runtime/format-sprite.js"
|
|
1275
|
+
},
|
|
1276
|
+
"require": {
|
|
1277
|
+
"types": "./dist/runtime/format-sprite.d.cts",
|
|
1278
|
+
"default": "./dist/runtime/format-sprite.cjs"
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1261
1281
|
"./manifest.json": "./dist/manifest.json",
|
|
1262
1282
|
"./manifest.schema.json": "./dist/manifest.schema.json",
|
|
1263
1283
|
"./components.css": "./dist/components.css",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tween-CBuWYpI-.cjs","sources":["../../src/runtime/ease.ts","../../src/runtime/tween.ts"],"sourcesContent":["/** Easing functions (t ∈ [0, 1] → progress). Original implementations of the standard Penner-style curves. */\nexport type Ease = (t: number) => number;\n\nconst out = (f: Ease): Ease => (t) => 1 - f(1 - t);\nconst inOut = (f: Ease): Ease => (t) => (t < 0.5 ? f(t * 2) / 2 : 1 - f((1 - t) * 2) / 2);\nconst pow = (p: number): Ease => (t) => Math.pow(t, p);\nconst sine: Ease = (t) => 1 - Math.cos((t * Math.PI) / 2);\nconst expo: Ease = (t) => (t === 0 ? 0 : Math.pow(2, 10 * t - 10));\nconst circ: Ease = (t) => 1 - Math.sqrt(1 - t * t);\nconst back = (s = 1.70158): Ease => (t) => t * t * ((s + 1) * t - s);\nconst elastic: Ease = (t) => (t === 0 || t === 1 ? t : -Math.pow(2, 10 * t - 10) * Math.sin((t * 10 - 10.75) * ((2 * Math.PI) / 3)));\nconst bounceOut: Ease = (t) => {\n const n = 7.5625, d = 2.75;\n if (t < 1 / d) return n * t * t;\n if (t < 2 / d) return n * (t -= 1.5 / d) * t + 0.75;\n if (t < 2.5 / d) return n * (t -= 2.25 / d) * t + 0.9375;\n return n * (t -= 2.625 / d) * t + 0.984375;\n};\n\n/** cubic-bezier(x1, y1, x2, y2), solved with Newton steps + bisection fallback. */\nexport function cubicBezier(x1: number, y1: number, x2: number, y2: number): Ease {\n const a = (p1: number, p2: number) => 1 - 3 * p2 + 3 * p1;\n const b = (p1: number, p2: number) => 3 * p2 - 6 * p1;\n const c = (p1: number) => 3 * p1;\n const at = (t: number, p1: number, p2: number) => ((a(p1, p2) * t + b(p1, p2)) * t + c(p1)) * t;\n const slope = (t: number, p1: number, p2: number) => 3 * a(p1, p2) * t * t + 2 * b(p1, p2) * t + c(p1);\n return (x) => {\n if (x <= 0 || x >= 1) return x <= 0 ? 0 : 1;\n let t = x;\n for (let i = 0; i < 6; i++) {\n const s = slope(t, x1, x2);\n if (Math.abs(s) < 1e-6) break;\n t -= (at(t, x1, x2) - x) / s;\n }\n if (t < 0 || t > 1 || Math.abs(at(t, x1, x2) - x) > 1e-4) {\n let lo = 0, hi = 1;\n t = x;\n for (let i = 0; i < 30; i++) {\n const v = at(t, x1, x2);\n if (Math.abs(v - x) < 1e-6) break;\n if (v < x) lo = t; else hi = t;\n t = (lo + hi) / 2;\n }\n }\n return at(t, y1, y2);\n };\n}\n\n/** steps(n, 'end' | 'start'). */\nexport const steps = (n: number, pos: 'start' | 'end' = 'end'): Ease => (t) => {\n const k = pos === 'start' ? Math.ceil(t * n) : Math.floor(t * n);\n return Math.min(1, Math.max(0, k / n));\n};\n\n/** Named eases: linear, quad/cubic/quart/quint, sine, expo, circ, back, elastic, bounce — each `.in`, `.out`, `.inOut` via 'name-in' | 'name-out' | 'name-in-out'. */\nconst BASE: Record<string, Ease> = { quad: pow(2), cubic: pow(3), quart: pow(4), quint: pow(5), sine, expo, circ, back: back(), elastic, bounce: out(bounceOut) };\nexport const EASES: Record<string, Ease> = { linear: (t) => t, ease: cubicBezier(0.25, 0.1, 0.25, 1), 'ease-in': cubicBezier(0.42, 0, 1, 1), 'ease-out': cubicBezier(0, 0, 0.58, 1), 'ease-in-out': cubicBezier(0.42, 0, 0.58, 1), smooth: cubicBezier(0.22, 1, 0.36, 1) };\nfor (const [k, f] of Object.entries(BASE)) {\n EASES[`${k}-in`] = f;\n EASES[`${k}-out`] = out(f);\n EASES[`${k}-in-out`] = inOut(f);\n}\n\n/** Resolve an ease: a function, a name ('cubic-out', 'ease-in-out', 'linear'), 'cubic-bezier(a,b,c,d)' or 'steps(n[, start|end])'. Unknown names throw. */\nexport function parseEase(e?: string | Ease): Ease {\n if (typeof e === 'function') return e;\n if (!e) return EASES['cubic-out'];\n const s = e.trim();\n if (EASES[s]) return EASES[s];\n let m = /^cubic-bezier\\(\\s*([-\\d.]+)\\s*,\\s*([-\\d.]+)\\s*,\\s*([-\\d.]+)\\s*,\\s*([-\\d.]+)\\s*\\)$/.exec(s);\n if (m) return cubicBezier(+m[1], +m[2], +m[3], +m[4]);\n m = /^steps\\(\\s*(\\d+)\\s*(?:,\\s*(jump-)?(start|end)\\s*)?\\)$/.exec(s);\n if (m) return steps(+m[1], (m[3] as 'start' | 'end') || 'end');\n if (s === 'step-start') return steps(1, 'start');\n if (s === 'step-end') return steps(1, 'end');\n throw new Error(`[motionary] unknown ease \"${s}\" — use a name from EASES, cubic-bezier(…) or steps(…)`);\n}\n","/**\n * Tween + timeline engine (original implementation). Times are in\n * milliseconds. Targets are plain objects (numeric props) or elements\n * (CSS: numbers with units, colours, `opacity`, custom properties, and the\n * transform shorthands `x y rotate scale scaleX scaleY skewX skewY`,\n * composed in that order). Driven by the shared ticker; a tween placed in a\n * timeline is driven by the timeline instead.\n */\nimport { getTicker } from './ticker';\nimport { parseEase, type Ease } from './ease';\n\nexport type Target = object | Element;\nexport type Props = Record<string, number | string>;\n\nexport interface PlayOptions {\n /** Delay before the first iteration, ms. */\n delay?: number;\n /** Extra iterations (-1 = forever). */\n repeat?: number;\n /** Alternate direction on every other iteration. */\n yoyo?: boolean;\n /** Start paused (`play()` to start). */\n paused?: boolean;\n onUpdate?: (progress: number) => void;\n onComplete?: () => void;\n}\n\nexport interface TweenOptions extends PlayOptions {\n to?: Props;\n from?: Props;\n /** ms (default 600). */\n duration?: number;\n ease?: string | Ease;\n /** Delay added per target index (ms) when several targets are given. */\n stagger?: number;\n}\n\nconst TRANSFORM = ['x', 'y', 'rotate', 'scale', 'scaleX', 'scaleY', 'skewX', 'skewY'];\nconst DEFAULT_UNIT: Record<string, string> = { x: 'px', y: 'px', rotate: 'deg', skewX: 'deg', skewY: 'deg', scale: '', scaleX: '', scaleY: '' };\ntype TState = Record<string, { v: number; u: string }>;\nconst tstate = new WeakMap<Element, TState>();\n\nconst isEl = (t: unknown): t is HTMLElement => typeof Element !== 'undefined' && t instanceof Element;\n\ninterface Num { kind: 'num'; v: number; u: string }\ninterface Col { kind: 'col'; c: number[] }\ntype Val = Num | Col;\n\n/** Parse '12px', '-3.5', '50%', '#0af', 'rgb(1 2 3 / .5)', 'rgba(…)'. */\nexport function parseValue(v: number | string): Val {\n if (typeof v === 'number') return { kind: 'num', v, u: '' };\n const s = v.trim();\n let m = /^#([0-9a-f]{3,8})$/i.exec(s);\n if (m) {\n let h = m[1];\n if (h.length <= 4) h = h.split('').map((c) => c + c).join('');\n const n = (i: number) => parseInt(h.slice(i, i + 2), 16);\n return { kind: 'col', c: [n(0), n(2), n(4), h.length === 8 ? n(6) / 255 : 1] };\n }\n m = /^rgba?\\(([^)]+)\\)$/i.exec(s);\n if (m) {\n const p = m[1].split(/[\\s,/]+/).filter(Boolean).map((x) => (x.endsWith('%') ? (parseFloat(x) / 100) * 255 : parseFloat(x)));\n return { kind: 'col', c: [p[0], p[1], p[2], p[3] === undefined ? 1 : p[3] > 1 ? p[3] / 255 : p[3]] };\n }\n if (s === 'transparent') return { kind: 'col', c: [0, 0, 0, 0] };\n m = /^(-?[\\d.]+(?:e-?\\d+)?)([a-z%]*)$/i.exec(s);\n if (m) return { kind: 'num', v: parseFloat(m[1]), u: m[2] };\n throw new Error(`[motionary] cannot tween value \"${s}\"`);\n}\n\nconst lerpVal = (a: Val, b: Val, p: number): string | number => {\n if (a.kind === 'col' || b.kind === 'col') {\n const ca = a.kind === 'col' ? a.c : [0, 0, 0, 0], cb = b.kind === 'col' ? b.c : [0, 0, 0, 0];\n const c = ca.map((x, i) => x + (cb[i] - x) * p);\n return `rgba(${Math.round(c[0])}, ${Math.round(c[1])}, ${Math.round(c[2])}, ${+c[3].toFixed(3)})`;\n }\n const v = a.v + (b.v - a.v) * p;\n const u = b.u || a.u;\n return u ? `${+v.toFixed(4)}${u}` : +v.toFixed(6);\n};\n\nconst kebab = (k: string) => (k.startsWith('--') ? k : k.replace(/[A-Z]/g, (c) => '-' + c.toLowerCase()));\n\nfunction readProp(t: Target, k: string): number | string {\n if (!isEl(t)) return (t as any)[k] ?? 0;\n if (TRANSFORM.includes(k)) {\n const s = tstate.get(t)?.[k];\n return s ? s.v + s.u : k.startsWith('scale') ? 1 : 0;\n }\n const inline = t.style.getPropertyValue(kebab(k));\n if (inline) return inline;\n const cs = typeof getComputedStyle === 'function' ? getComputedStyle(t).getPropertyValue(kebab(k)) : '';\n return cs || (k === 'opacity' ? 1 : 0);\n}\n\nfunction writeTransform(el: HTMLElement): void {\n const s = tstate.get(el)!;\n const g = (k: string, d: number) => (s[k] ? s[k].v : d);\n const u = (k: string) => (s[k]?.u ?? DEFAULT_UNIT[k]);\n const parts: string[] = [];\n if (s.x || s.y) parts.push(`translate(${g('x', 0)}${u('x') || 'px'}, ${g('y', 0)}${u('y') || 'px'})`);\n if (s.rotate) parts.push(`rotate(${g('rotate', 0)}${u('rotate') || 'deg'})`);\n if (s.scale) parts.push(`scale(${g('scale', 1)})`);\n if (s.scaleX || s.scaleY) parts.push(`scale(${g('scaleX', 1)}, ${g('scaleY', 1)})`);\n if (s.skewX) parts.push(`skewX(${g('skewX', 0)}${u('skewX') || 'deg'})`);\n if (s.skewY) parts.push(`skewY(${g('skewY', 0)}${u('skewY') || 'deg'})`);\n el.style.transform = parts.join(' ');\n}\n\nfunction writeProp(t: Target, k: string, v: string | number): void {\n if (!isEl(t)) {\n (t as any)[k] = typeof v === 'string' && typeof (t as any)[k] === 'number' ? parseFloat(v) : v;\n return;\n }\n if (TRANSFORM.includes(k)) {\n const p = parseValue(v) as Num;\n const s = tstate.get(t) || {};\n s[k] = { v: p.v, u: p.u };\n tstate.set(t, s);\n return;\n }\n t.style.setProperty(kebab(k), typeof v === 'number' && !['opacity', 'zIndex', 'z-index'].includes(k) && !k.startsWith('--') ? v + 'px' : String(v));\n}\n\n/** Common playback: delay, repeat, yoyo, direction, ticker attachment, promise. */\nexport abstract class Playable {\n delay: number;\n repeat: number;\n yoyo: boolean;\n /** Playback rate multiplier. */\n timeScale = 1;\n onUpdate?: (progress: number) => void;\n onComplete?: () => void;\n protected _t = 0;\n private _dir = 1;\n private _off: (() => void) | null = null;\n private _done = false;\n private _resolve!: () => void;\n /** Resolves on completion (forward end, or start when reversed). */\n finished: Promise<void>;\n /** Set when owned by a timeline (then the ticker never drives it). */\n parent: Timeline | null = null;\n\n constructor(o: PlayOptions) {\n this.delay = o.delay || 0;\n this.repeat = o.repeat || 0;\n this.yoyo = !!o.yoyo;\n this.onUpdate = o.onUpdate;\n this.onComplete = o.onComplete;\n this.finished = new Promise((r) => (this._resolve = r));\n }\n /** One iteration, ms. */\n abstract get duration(): number;\n /** Render at `ms` into one iteration. */\n protected abstract renderLocal(ms: number, iterationEnded: boolean): void;\n\n get totalDuration(): number {\n return this.repeat < 0 ? Infinity : this.delay + this.duration * (this.repeat + 1);\n }\n get time(): number {\n return this._t;\n }\n get progress(): number {\n const td = this.totalDuration;\n return td === Infinity ? ((this._t - this.delay) % this.duration) / this.duration : td ? this._t / td : 1;\n }\n set progress(p: number) {\n this.seek(p * (this.totalDuration === Infinity ? this.delay + this.duration : this.totalDuration));\n }\n get isActive(): boolean {\n return !!this._off;\n }\n get reversed(): boolean {\n return this._dir < 0;\n }\n\n /** Jump to `ms` (total time, including the delay) and render. */\n seek(ms: number): this {\n const td = this.totalDuration;\n this._t = Math.max(0, Math.min(ms, td));\n const t = this._t - this.delay;\n const d = this.duration || 0;\n if (t < 0) this.renderLocal(0, false);\n else if (!d) this.renderLocal(0, true);\n else {\n let it = d === Infinity ? 0 : Math.floor(t / d);\n let local = d === Infinity ? t : t - it * d;\n if (t >= td - this.delay && td !== Infinity) {\n it = this.repeat;\n local = d;\n }\n const back = this.yoyo && it % 2 === 1;\n this.renderLocal(back ? d - local : local, local === d);\n }\n this.onUpdate?.(this.progress);\n return this;\n }\n\n play(): this {\n this._dir = 1;\n if (this._t >= this.totalDuration) this._t = 0;\n return this.attach();\n }\n pause(): this {\n this._off?.();\n this._off = null;\n return this;\n }\n /** Play backwards from the current time. */\n reverse(): this {\n this._dir = -1;\n if (this._t <= 0) this._t = this.totalDuration === Infinity ? this.delay + this.duration : this.totalDuration;\n return this.attach();\n }\n restart(): this {\n this._done = false;\n this.seek(0);\n return this.play();\n }\n /** Stop and detach for good. */\n kill(): void {\n this.pause();\n this.parent?.remove(this);\n }\n /** Promise-like: `await tween(...)`. */\n then<R>(ok?: (v: void) => R, err?: (e: unknown) => R): Promise<R> {\n return this.finished.then(ok, err);\n }\n\n private attach(): this {\n if (this.parent || this._off) return this;\n this._done = false;\n this._off = getTicker().add((_, dt) => this.advance(dt));\n return this;\n }\n private advance(dt: number): void {\n const td = this.totalDuration;\n this.seek(this._t + dt * this._dir * this.timeScale);\n if ((this._dir > 0 && this._t >= td) || (this._dir < 0 && this._t <= 0)) this.complete();\n }\n protected complete(): void {\n this.pause();\n if (this._done) return;\n this._done = true;\n this.onComplete?.();\n this._resolve();\n }\n}\n\ninterface Track { k: string; from?: Val; to: Val; fromRaw?: number | string; toRaw: number | string }\n\n/** A tween of one target. */\nexport class Tween extends Playable {\n readonly target: Target;\n private _dur: number;\n private ease: Ease;\n private tracks: Track[] | null = null;\n private toProps: Props;\n private fromProps: Props;\n constructor(target: Target, o: TweenOptions) {\n super(o);\n this.target = target;\n this._dur = o.duration ?? 600;\n this.ease = parseEase(o.ease);\n this.toProps = o.to || {};\n this.fromProps = o.from || {};\n }\n get duration(): number {\n return this._dur;\n }\n /** Capture start values (first render). */\n private init(): Track[] {\n const keys = Array.from(new Set([...Object.keys(this.fromProps), ...Object.keys(this.toProps)]));\n return keys.map((k) => {\n const fromRaw = k in this.fromProps ? this.fromProps[k] : readProp(this.target, k);\n const toRaw = k in this.toProps ? this.toProps[k] : readProp(this.target, k);\n return { k, fromRaw, toRaw, from: parseValue(fromRaw), to: parseValue(toRaw) };\n });\n }\n protected renderLocal(ms: number, ended: boolean): void {\n this.tracks ||= this.init();\n const p = this._dur ? (ended ? this.ease(ms >= this._dur ? 1 : 0) : this.ease(ms / this._dur)) : 1;\n let tr = false;\n for (const t of this.tracks) {\n writeProp(this.target, t.k, lerpVal(t.from!, t.to, p));\n if (TRANSFORM.includes(t.k)) tr = true;\n }\n if (tr && isEl(this.target)) writeTransform(this.target);\n }\n}\n\ntype Child = { item: Playable | (() => void); start: number; fired?: boolean };\n\n/** Position: ms number, '<' (start of previous), '>' (end of previous, default), '+=200' / '-=200' (relative to the end), 'label', 'label+=100', '<+=100'. */\nexport type Position = number | string;\n\nexport interface TimelineOptions extends PlayOptions {\n /** Defaults merged into every `.to()`. */\n defaults?: Omit<TweenOptions, 'to' | 'from'>;\n}\n\n/** A sequence of tweens, nested timelines and callbacks. */\nexport class Timeline extends Playable {\n private children: Child[] = [];\n private labels: Record<string, number> = {};\n private prevStart = 0;\n private prevEnd = 0;\n private defaults: TimelineOptions['defaults'];\n private lastLocal = 0;\n constructor(o: TimelineOptions = {}) {\n super(o);\n this.defaults = o.defaults;\n }\n get duration(): number {\n let d = 0;\n for (const c of this.children) d = Math.max(d, c.start + (typeof c.item === 'function' ? 0 : c.item.totalDuration));\n return d;\n }\n private resolve(pos: Position | undefined): number {\n if (pos === undefined || pos === '>') return this.prevEnd;\n if (typeof pos === 'number') return Math.max(0, pos);\n const m = /^([<>]|[\\w-]+)?\\s*(?:([+-])=\\s*([\\d.]+))?$/.exec(pos.trim());\n if (!m) throw new Error(`[motionary] bad timeline position \"${pos}\"`);\n let base = this.prevEnd;\n if (m[1] === '<') base = this.prevStart;\n else if (m[1] && m[1] !== '>') {\n if (!(m[1] in this.labels)) throw new Error(`[motionary] unknown timeline label \"${m[1]}\"`);\n base = this.labels[m[1]];\n }\n const off = m[2] ? (m[2] === '+' ? 1 : -1) * parseFloat(m[3]) : 0;\n return Math.max(0, base + off);\n }\n /** Add a tween, timeline or callback at a position. */\n add(item: Playable | (() => void), position?: Position): this {\n const start = this.resolve(position);\n if (typeof item !== 'function') {\n item.pause();\n item.parent = this;\n }\n this.children.push({ item, start });\n this.prevStart = start;\n this.prevEnd = start + (typeof item === 'function' ? 0 : item.totalDuration);\n return this;\n }\n /** `tween(target, vars)` placed at `position` (stagger across several targets). */\n to(target: Target | Target[] | ArrayLike<Target>, vars: TweenOptions, position?: Position): this {\n const list = toList(target);\n const start = this.resolve(position);\n let end = start;\n list.forEach((t, i) => {\n const tw = new Tween(t, { ...this.defaults, ...vars, delay: (vars.delay || 0) + (vars.stagger || 0) * i, paused: true });\n tw.parent = this;\n this.children.push({ item: tw, start });\n end = Math.max(end, start + tw.totalDuration);\n });\n this.prevStart = start;\n this.prevEnd = end;\n return this;\n }\n call(fn: () => void, position?: Position): this {\n return this.add(fn, position);\n }\n label(name: string, position?: Position): this {\n this.labels[name] = this.resolve(position);\n return this;\n }\n /** Time of a label, ms. */\n labelTime(name: string): number | undefined {\n return this.labels[name];\n }\n remove(item: Playable): void {\n this.children = this.children.filter((c) => c.item !== item);\n }\n /** Children in start order (callbacks excluded). */\n getChildren(): Playable[] {\n return this.children.filter((c) => typeof c.item !== 'function').map((c) => c.item as Playable);\n }\n protected renderLocal(ms: number): void {\n const forward = ms >= this.lastLocal;\n const list = [...this.children].sort((a, b) => (forward ? a.start - b.start : b.start - a.start));\n for (const c of list) {\n if (typeof c.item === 'function') {\n if (forward && !c.fired && ms >= c.start && this.lastLocal <= c.start) {\n c.fired = true;\n c.item();\n } else if (!forward && ms < c.start) c.fired = false;\n continue;\n }\n const local = ms - c.start;\n const p = c.item as Playable & { _started?: boolean };\n if (local < 0) {\n if (p._started) p.seek(0);\n continue;\n }\n p._started = true;\n p.seek(Math.min(local, p.totalDuration));\n }\n this.lastLocal = ms;\n }\n}\n\nfunction toList(t: Target | Target[] | ArrayLike<Target>): Target[] {\n if (Array.isArray(t)) return t;\n if (t && typeof (t as ArrayLike<Target>).length === 'number' && !isEl(t)) return Array.from(t as ArrayLike<Target>);\n return [t as Target];\n}\n\n/**\n * Tween one or more targets. Returns a `Tween` (or a `Timeline` holding one\n * tween per target when several are given) that starts on the next frame\n * unless `paused`. `await` it for completion.\n */\nexport function tween(target: Target | Target[] | ArrayLike<Target>, o: TweenOptions): Playable {\n const list = toList(target);\n let p: Playable;\n if (list.length === 1) p = new Tween(list[0], o);\n else {\n const tl = new Timeline({ repeat: o.repeat, yoyo: o.yoyo, onUpdate: o.onUpdate, onComplete: o.onComplete, delay: o.delay });\n tl.to(list, { ...o, delay: 0, repeat: 0, yoyo: false, onUpdate: undefined, onComplete: undefined }, 0);\n p = tl;\n }\n if (!o.paused) p.play();\n return p;\n}\n\n/** A new timeline (plays on the next frame unless `paused`). */\nexport function timeline(o: TimelineOptions = {}): Timeline {\n const tl = new Timeline(o);\n if (!o.paused) tl.play();\n return tl;\n}\n"],"names":["getTicker"],"mappings":";;;;AAGA,MAAM,GAAG,GAAG,CAAC,CAAO,KAAW,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,KAAK,GAAG,CAAC,CAAO,KAAW,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;AACzF,MAAM,GAAG,GAAG,CAAC,CAAS,KAAW,CAAC,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AACtD,MAAM,IAAI,GAAS,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;AACzD,MAAM,IAAI,GAAS,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE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E,CAAC,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SAC3C;AACH,QAAA,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;AAC3H,QAAA,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QACtG,CAAC,GAAG,EAAE;IACR;IACA,IAAI,CAAC,CAAC,CAAC,MAAM;QAAE,CAAC,CAAC,IAAI,EAAE;AACvB,IAAA,OAAO,CAAC;AACV;AAEA;AACM,SAAU,QAAQ,CAAC,CAAA,GAAqB,EAAE,EAAA;AAC9C,IAAA,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,CAAC,CAAC;IAC1B,IAAI,CAAC,CAAC,CAAC,MAAM;QAAE,EAAE,CAAC,IAAI,EAAE;AACxB,IAAA,OAAO,EAAE;AACX;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tween-CqX1JBuj.js","sources":["../../src/runtime/ease.ts","../../src/runtime/tween.ts"],"sourcesContent":["/** Easing functions (t ∈ [0, 1] → progress). Original implementations of the standard Penner-style curves. */\nexport type Ease = (t: number) => number;\n\nconst out = (f: Ease): Ease => (t) => 1 - f(1 - t);\nconst inOut = (f: Ease): Ease => (t) => (t < 0.5 ? f(t * 2) / 2 : 1 - f((1 - t) * 2) / 2);\nconst pow = (p: number): Ease => (t) => Math.pow(t, p);\nconst sine: Ease = (t) => 1 - Math.cos((t * Math.PI) / 2);\nconst expo: Ease = (t) => (t === 0 ? 0 : Math.pow(2, 10 * t - 10));\nconst circ: Ease = (t) => 1 - Math.sqrt(1 - t * t);\nconst back = (s = 1.70158): Ease => (t) => t * t * ((s + 1) * t - s);\nconst elastic: Ease = (t) => (t === 0 || t === 1 ? t : -Math.pow(2, 10 * t - 10) * Math.sin((t * 10 - 10.75) * ((2 * Math.PI) / 3)));\nconst bounceOut: Ease = (t) => {\n const n = 7.5625, d = 2.75;\n if (t < 1 / d) return n * t * t;\n if (t < 2 / d) return n * (t -= 1.5 / d) * t + 0.75;\n if (t < 2.5 / d) return n * (t -= 2.25 / d) * t + 0.9375;\n return n * (t -= 2.625 / d) * t + 0.984375;\n};\n\n/** cubic-bezier(x1, y1, x2, y2), solved with Newton steps + bisection fallback. */\nexport function cubicBezier(x1: number, y1: number, x2: number, y2: number): Ease {\n const a = (p1: number, p2: number) => 1 - 3 * p2 + 3 * p1;\n const b = (p1: number, p2: number) => 3 * p2 - 6 * p1;\n const c = (p1: number) => 3 * p1;\n const at = (t: number, p1: number, p2: number) => ((a(p1, p2) * t + b(p1, p2)) * t + c(p1)) * t;\n const slope = (t: number, p1: number, p2: number) => 3 * a(p1, p2) * t * t + 2 * b(p1, p2) * t + c(p1);\n return (x) => {\n if (x <= 0 || x >= 1) return x <= 0 ? 0 : 1;\n let t = x;\n for (let i = 0; i < 6; i++) {\n const s = slope(t, x1, x2);\n if (Math.abs(s) < 1e-6) break;\n t -= (at(t, x1, x2) - x) / s;\n }\n if (t < 0 || t > 1 || Math.abs(at(t, x1, x2) - x) > 1e-4) {\n let lo = 0, hi = 1;\n t = x;\n for (let i = 0; i < 30; i++) {\n const v = at(t, x1, x2);\n if (Math.abs(v - x) < 1e-6) break;\n if (v < x) lo = t; else hi = t;\n t = (lo + hi) / 2;\n }\n }\n return at(t, y1, y2);\n };\n}\n\n/** steps(n, 'end' | 'start'). */\nexport const steps = (n: number, pos: 'start' | 'end' = 'end'): Ease => (t) => {\n const k = pos === 'start' ? Math.ceil(t * n) : Math.floor(t * n);\n return Math.min(1, Math.max(0, k / n));\n};\n\n/** Named eases: linear, quad/cubic/quart/quint, sine, expo, circ, back, elastic, bounce — each `.in`, `.out`, `.inOut` via 'name-in' | 'name-out' | 'name-in-out'. */\nconst BASE: Record<string, Ease> = { quad: pow(2), cubic: pow(3), quart: pow(4), quint: pow(5), sine, expo, circ, back: back(), elastic, bounce: out(bounceOut) };\nexport const EASES: Record<string, Ease> = { linear: (t) => t, ease: cubicBezier(0.25, 0.1, 0.25, 1), 'ease-in': cubicBezier(0.42, 0, 1, 1), 'ease-out': cubicBezier(0, 0, 0.58, 1), 'ease-in-out': cubicBezier(0.42, 0, 0.58, 1), smooth: cubicBezier(0.22, 1, 0.36, 1) };\nfor (const [k, f] of Object.entries(BASE)) {\n EASES[`${k}-in`] = f;\n EASES[`${k}-out`] = out(f);\n EASES[`${k}-in-out`] = inOut(f);\n}\n\n/** Resolve an ease: a function, a name ('cubic-out', 'ease-in-out', 'linear'), 'cubic-bezier(a,b,c,d)' or 'steps(n[, start|end])'. Unknown names throw. */\nexport function parseEase(e?: string | Ease): Ease {\n if (typeof e === 'function') return e;\n if (!e) return EASES['cubic-out'];\n const s = e.trim();\n if (EASES[s]) return EASES[s];\n let m = /^cubic-bezier\\(\\s*([-\\d.]+)\\s*,\\s*([-\\d.]+)\\s*,\\s*([-\\d.]+)\\s*,\\s*([-\\d.]+)\\s*\\)$/.exec(s);\n if (m) return cubicBezier(+m[1], +m[2], +m[3], +m[4]);\n m = /^steps\\(\\s*(\\d+)\\s*(?:,\\s*(jump-)?(start|end)\\s*)?\\)$/.exec(s);\n if (m) return steps(+m[1], (m[3] as 'start' | 'end') || 'end');\n if (s === 'step-start') return steps(1, 'start');\n if (s === 'step-end') return steps(1, 'end');\n throw new Error(`[motionary] unknown ease \"${s}\" — use a name from EASES, cubic-bezier(…) or steps(…)`);\n}\n","/**\n * Tween + timeline engine (original implementation). Times are in\n * milliseconds. Targets are plain objects (numeric props) or elements\n * (CSS: numbers with units, colours, `opacity`, custom properties, and the\n * transform shorthands `x y rotate scale scaleX scaleY skewX skewY`,\n * composed in that order). Driven by the shared ticker; a tween placed in a\n * timeline is driven by the timeline instead.\n */\nimport { getTicker } from './ticker';\nimport { parseEase, type Ease } from './ease';\n\nexport type Target = object | Element;\nexport type Props = Record<string, number | string>;\n\nexport interface PlayOptions {\n /** Delay before the first iteration, ms. */\n delay?: number;\n /** Extra iterations (-1 = forever). */\n repeat?: number;\n /** Alternate direction on every other iteration. */\n yoyo?: boolean;\n /** Start paused (`play()` to start). */\n paused?: boolean;\n onUpdate?: (progress: number) => void;\n onComplete?: () => void;\n}\n\nexport interface TweenOptions extends PlayOptions {\n to?: Props;\n from?: Props;\n /** ms (default 600). */\n duration?: number;\n ease?: string | Ease;\n /** Delay added per target index (ms) when several targets are given. */\n stagger?: number;\n}\n\nconst TRANSFORM = ['x', 'y', 'rotate', 'scale', 'scaleX', 'scaleY', 'skewX', 'skewY'];\nconst DEFAULT_UNIT: Record<string, string> = { x: 'px', y: 'px', rotate: 'deg', skewX: 'deg', skewY: 'deg', scale: '', scaleX: '', scaleY: '' };\ntype TState = Record<string, { v: number; u: string }>;\nconst tstate = new WeakMap<Element, TState>();\n\nconst isEl = (t: unknown): t is HTMLElement => typeof Element !== 'undefined' && t instanceof Element;\n\ninterface Num { kind: 'num'; v: number; u: string }\ninterface Col { kind: 'col'; c: number[] }\ntype Val = Num | Col;\n\n/** Parse '12px', '-3.5', '50%', '#0af', 'rgb(1 2 3 / .5)', 'rgba(…)'. */\nexport function parseValue(v: number | string): Val {\n if (typeof v === 'number') return { kind: 'num', v, u: '' };\n const s = v.trim();\n let m = /^#([0-9a-f]{3,8})$/i.exec(s);\n if (m) {\n let h = m[1];\n if (h.length <= 4) h = h.split('').map((c) => c + c).join('');\n const n = (i: number) => parseInt(h.slice(i, i + 2), 16);\n return { kind: 'col', c: [n(0), n(2), n(4), h.length === 8 ? n(6) / 255 : 1] };\n }\n m = /^rgba?\\(([^)]+)\\)$/i.exec(s);\n if (m) {\n const p = m[1].split(/[\\s,/]+/).filter(Boolean).map((x) => (x.endsWith('%') ? (parseFloat(x) / 100) * 255 : parseFloat(x)));\n return { kind: 'col', c: [p[0], p[1], p[2], p[3] === undefined ? 1 : p[3] > 1 ? p[3] / 255 : p[3]] };\n }\n if (s === 'transparent') return { kind: 'col', c: [0, 0, 0, 0] };\n m = /^(-?[\\d.]+(?:e-?\\d+)?)([a-z%]*)$/i.exec(s);\n if (m) return { kind: 'num', v: parseFloat(m[1]), u: m[2] };\n throw new Error(`[motionary] cannot tween value \"${s}\"`);\n}\n\nconst lerpVal = (a: Val, b: Val, p: number): string | number => {\n if (a.kind === 'col' || b.kind === 'col') {\n const ca = a.kind === 'col' ? a.c : [0, 0, 0, 0], cb = b.kind === 'col' ? b.c : [0, 0, 0, 0];\n const c = ca.map((x, i) => x + (cb[i] - x) * p);\n return `rgba(${Math.round(c[0])}, ${Math.round(c[1])}, ${Math.round(c[2])}, ${+c[3].toFixed(3)})`;\n }\n const v = a.v + (b.v - a.v) * p;\n const u = b.u || a.u;\n return u ? `${+v.toFixed(4)}${u}` : +v.toFixed(6);\n};\n\nconst kebab = (k: string) => (k.startsWith('--') ? k : k.replace(/[A-Z]/g, (c) => '-' + c.toLowerCase()));\n\nfunction readProp(t: Target, k: string): number | string {\n if (!isEl(t)) return (t as any)[k] ?? 0;\n if (TRANSFORM.includes(k)) {\n const s = tstate.get(t)?.[k];\n return s ? s.v + s.u : k.startsWith('scale') ? 1 : 0;\n }\n const inline = t.style.getPropertyValue(kebab(k));\n if (inline) return inline;\n const cs = typeof getComputedStyle === 'function' ? getComputedStyle(t).getPropertyValue(kebab(k)) : '';\n return cs || (k === 'opacity' ? 1 : 0);\n}\n\nfunction writeTransform(el: HTMLElement): void {\n const s = tstate.get(el)!;\n const g = (k: string, d: number) => (s[k] ? s[k].v : d);\n const u = (k: string) => (s[k]?.u ?? DEFAULT_UNIT[k]);\n const parts: string[] = [];\n if (s.x || s.y) parts.push(`translate(${g('x', 0)}${u('x') || 'px'}, ${g('y', 0)}${u('y') || 'px'})`);\n if (s.rotate) parts.push(`rotate(${g('rotate', 0)}${u('rotate') || 'deg'})`);\n if (s.scale) parts.push(`scale(${g('scale', 1)})`);\n if (s.scaleX || s.scaleY) parts.push(`scale(${g('scaleX', 1)}, ${g('scaleY', 1)})`);\n if (s.skewX) parts.push(`skewX(${g('skewX', 0)}${u('skewX') || 'deg'})`);\n if (s.skewY) parts.push(`skewY(${g('skewY', 0)}${u('skewY') || 'deg'})`);\n el.style.transform = parts.join(' ');\n}\n\nfunction writeProp(t: Target, k: string, v: string | number): void {\n if (!isEl(t)) {\n (t as any)[k] = typeof v === 'string' && typeof (t as any)[k] === 'number' ? parseFloat(v) : v;\n return;\n }\n if (TRANSFORM.includes(k)) {\n const p = parseValue(v) as Num;\n const s = tstate.get(t) || {};\n s[k] = { v: p.v, u: p.u };\n tstate.set(t, s);\n return;\n }\n t.style.setProperty(kebab(k), typeof v === 'number' && !['opacity', 'zIndex', 'z-index'].includes(k) && !k.startsWith('--') ? v + 'px' : String(v));\n}\n\n/** Common playback: delay, repeat, yoyo, direction, ticker attachment, promise. */\nexport abstract class Playable {\n delay: number;\n repeat: number;\n yoyo: boolean;\n /** Playback rate multiplier. */\n timeScale = 1;\n onUpdate?: (progress: number) => void;\n onComplete?: () => void;\n protected _t = 0;\n private _dir = 1;\n private _off: (() => void) | null = null;\n private _done = false;\n private _resolve!: () => void;\n /** Resolves on completion (forward end, or start when reversed). */\n finished: Promise<void>;\n /** Set when owned by a timeline (then the ticker never drives it). */\n parent: Timeline | null = null;\n\n constructor(o: PlayOptions) {\n this.delay = o.delay || 0;\n this.repeat = o.repeat || 0;\n this.yoyo = !!o.yoyo;\n this.onUpdate = o.onUpdate;\n this.onComplete = o.onComplete;\n this.finished = new Promise((r) => (this._resolve = r));\n }\n /** One iteration, ms. */\n abstract get duration(): number;\n /** Render at `ms` into one iteration. */\n protected abstract renderLocal(ms: number, iterationEnded: boolean): void;\n\n get totalDuration(): number {\n return this.repeat < 0 ? Infinity : this.delay + this.duration * (this.repeat + 1);\n }\n get time(): number {\n return this._t;\n }\n get progress(): number {\n const td = this.totalDuration;\n return td === Infinity ? ((this._t - this.delay) % this.duration) / this.duration : td ? this._t / td : 1;\n }\n set progress(p: number) {\n this.seek(p * (this.totalDuration === Infinity ? this.delay + this.duration : this.totalDuration));\n }\n get isActive(): boolean {\n return !!this._off;\n }\n get reversed(): boolean {\n return this._dir < 0;\n }\n\n /** Jump to `ms` (total time, including the delay) and render. */\n seek(ms: number): this {\n const td = this.totalDuration;\n this._t = Math.max(0, Math.min(ms, td));\n const t = this._t - this.delay;\n const d = this.duration || 0;\n if (t < 0) this.renderLocal(0, false);\n else if (!d) this.renderLocal(0, true);\n else {\n let it = d === Infinity ? 0 : Math.floor(t / d);\n let local = d === Infinity ? t : t - it * d;\n if (t >= td - this.delay && td !== Infinity) {\n it = this.repeat;\n local = d;\n }\n const back = this.yoyo && it % 2 === 1;\n this.renderLocal(back ? d - local : local, local === d);\n }\n this.onUpdate?.(this.progress);\n return this;\n }\n\n play(): this {\n this._dir = 1;\n if (this._t >= this.totalDuration) this._t = 0;\n return this.attach();\n }\n pause(): this {\n this._off?.();\n this._off = null;\n return this;\n }\n /** Play backwards from the current time. */\n reverse(): this {\n this._dir = -1;\n if (this._t <= 0) this._t = this.totalDuration === Infinity ? this.delay + this.duration : this.totalDuration;\n return this.attach();\n }\n restart(): this {\n this._done = false;\n this.seek(0);\n return this.play();\n }\n /** Stop and detach for good. */\n kill(): void {\n this.pause();\n this.parent?.remove(this);\n }\n /** Promise-like: `await tween(...)`. */\n then<R>(ok?: (v: void) => R, err?: (e: unknown) => R): Promise<R> {\n return this.finished.then(ok, err);\n }\n\n private attach(): this {\n if (this.parent || this._off) return this;\n this._done = false;\n this._off = getTicker().add((_, dt) => this.advance(dt));\n return this;\n }\n private advance(dt: number): void {\n const td = this.totalDuration;\n this.seek(this._t + dt * this._dir * this.timeScale);\n if ((this._dir > 0 && this._t >= td) || (this._dir < 0 && this._t <= 0)) this.complete();\n }\n protected complete(): void {\n this.pause();\n if (this._done) return;\n this._done = true;\n this.onComplete?.();\n this._resolve();\n }\n}\n\ninterface Track { k: string; from?: Val; to: Val; fromRaw?: number | string; toRaw: number | string }\n\n/** A tween of one target. */\nexport class Tween extends Playable {\n readonly target: Target;\n private _dur: number;\n private ease: Ease;\n private tracks: Track[] | null = null;\n private toProps: Props;\n private fromProps: Props;\n constructor(target: Target, o: TweenOptions) {\n super(o);\n this.target = target;\n this._dur = o.duration ?? 600;\n this.ease = parseEase(o.ease);\n this.toProps = o.to || {};\n this.fromProps = o.from || {};\n }\n get duration(): number {\n return this._dur;\n }\n /** Capture start values (first render). */\n private init(): Track[] {\n const keys = Array.from(new Set([...Object.keys(this.fromProps), ...Object.keys(this.toProps)]));\n return keys.map((k) => {\n const fromRaw = k in this.fromProps ? this.fromProps[k] : readProp(this.target, k);\n const toRaw = k in this.toProps ? this.toProps[k] : readProp(this.target, k);\n return { k, fromRaw, toRaw, from: parseValue(fromRaw), to: parseValue(toRaw) };\n });\n }\n protected renderLocal(ms: number, ended: boolean): void {\n this.tracks ||= this.init();\n const p = this._dur ? (ended ? this.ease(ms >= this._dur ? 1 : 0) : this.ease(ms / this._dur)) : 1;\n let tr = false;\n for (const t of this.tracks) {\n writeProp(this.target, t.k, lerpVal(t.from!, t.to, p));\n if (TRANSFORM.includes(t.k)) tr = true;\n }\n if (tr && isEl(this.target)) writeTransform(this.target);\n }\n}\n\ntype Child = { item: Playable | (() => void); start: number; fired?: boolean };\n\n/** Position: ms number, '<' (start of previous), '>' (end of previous, default), '+=200' / '-=200' (relative to the end), 'label', 'label+=100', '<+=100'. */\nexport type Position = number | string;\n\nexport interface TimelineOptions extends PlayOptions {\n /** Defaults merged into every `.to()`. */\n defaults?: Omit<TweenOptions, 'to' | 'from'>;\n}\n\n/** A sequence of tweens, nested timelines and callbacks. */\nexport class Timeline extends Playable {\n private children: Child[] = [];\n private labels: Record<string, number> = {};\n private prevStart = 0;\n private prevEnd = 0;\n private defaults: TimelineOptions['defaults'];\n private lastLocal = 0;\n constructor(o: TimelineOptions = {}) {\n super(o);\n this.defaults = o.defaults;\n }\n get duration(): number {\n let d = 0;\n for (const c of this.children) d = Math.max(d, c.start + (typeof c.item === 'function' ? 0 : c.item.totalDuration));\n return d;\n }\n private resolve(pos: Position | undefined): number {\n if (pos === undefined || pos === '>') return this.prevEnd;\n if (typeof pos === 'number') return Math.max(0, pos);\n const m = /^([<>]|[\\w-]+)?\\s*(?:([+-])=\\s*([\\d.]+))?$/.exec(pos.trim());\n if (!m) throw new Error(`[motionary] bad timeline position \"${pos}\"`);\n let base = this.prevEnd;\n if (m[1] === '<') base = this.prevStart;\n else if (m[1] && m[1] !== '>') {\n if (!(m[1] in this.labels)) throw new Error(`[motionary] unknown timeline label \"${m[1]}\"`);\n base = this.labels[m[1]];\n }\n const off = m[2] ? (m[2] === '+' ? 1 : -1) * parseFloat(m[3]) : 0;\n return Math.max(0, base + off);\n }\n /** Add a tween, timeline or callback at a position. */\n add(item: Playable | (() => void), position?: Position): this {\n const start = this.resolve(position);\n if (typeof item !== 'function') {\n item.pause();\n item.parent = this;\n }\n this.children.push({ item, start });\n this.prevStart = start;\n this.prevEnd = start + (typeof item === 'function' ? 0 : item.totalDuration);\n return this;\n }\n /** `tween(target, vars)` placed at `position` (stagger across several targets). */\n to(target: Target | Target[] | ArrayLike<Target>, vars: TweenOptions, position?: Position): this {\n const list = toList(target);\n const start = this.resolve(position);\n let end = start;\n list.forEach((t, i) => {\n const tw = new Tween(t, { ...this.defaults, ...vars, delay: (vars.delay || 0) + (vars.stagger || 0) * i, paused: true });\n tw.parent = this;\n this.children.push({ item: tw, start });\n end = Math.max(end, start + tw.totalDuration);\n });\n this.prevStart = start;\n this.prevEnd = end;\n return this;\n }\n call(fn: () => void, position?: Position): this {\n return this.add(fn, position);\n }\n label(name: string, position?: Position): this {\n this.labels[name] = this.resolve(position);\n return this;\n }\n /** Time of a label, ms. */\n labelTime(name: string): number | undefined {\n return this.labels[name];\n }\n remove(item: Playable): void {\n this.children = this.children.filter((c) => c.item !== item);\n }\n /** Children in start order (callbacks excluded). */\n getChildren(): Playable[] {\n return this.children.filter((c) => typeof c.item !== 'function').map((c) => c.item as Playable);\n }\n protected renderLocal(ms: number): void {\n const forward = ms >= this.lastLocal;\n const list = [...this.children].sort((a, b) => (forward ? a.start - b.start : b.start - a.start));\n for (const c of list) {\n if (typeof c.item === 'function') {\n if (forward && !c.fired && ms >= c.start && this.lastLocal <= c.start) {\n c.fired = true;\n c.item();\n } else if (!forward && ms < c.start) c.fired = false;\n continue;\n }\n const local = ms - c.start;\n const p = c.item as Playable & { _started?: boolean };\n if (local < 0) {\n if (p._started) p.seek(0);\n continue;\n }\n p._started = true;\n p.seek(Math.min(local, p.totalDuration));\n }\n this.lastLocal = ms;\n }\n}\n\nfunction toList(t: Target | Target[] | ArrayLike<Target>): Target[] {\n if (Array.isArray(t)) return t;\n if (t && typeof (t as ArrayLike<Target>).length === 'number' && !isEl(t)) return Array.from(t as ArrayLike<Target>);\n return [t as Target];\n}\n\n/**\n * Tween one or more targets. Returns a `Tween` (or a `Timeline` holding one\n * tween per target when several are given) that starts on the next frame\n * unless `paused`. `await` it for completion.\n */\nexport function tween(target: Target | Target[] | ArrayLike<Target>, o: TweenOptions): Playable {\n const list = toList(target);\n let p: Playable;\n if (list.length === 1) p = new Tween(list[0], o);\n else {\n const tl = new Timeline({ repeat: o.repeat, yoyo: o.yoyo, onUpdate: o.onUpdate, onComplete: o.onComplete, delay: o.delay });\n tl.to(list, { ...o, delay: 0, repeat: 0, yoyo: false, onUpdate: undefined, onComplete: undefined }, 0);\n p = tl;\n }\n if (!o.paused) p.play();\n return p;\n}\n\n/** A new timeline (plays on the next frame unless `paused`). */\nexport function timeline(o: TimelineOptions = {}): Timeline {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