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.
Files changed (72) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +32 -0
  3. package/dist/chunks/{keyframes-W-474DMc.js → keyframes-DVAC5sQI.js} +2 -2
  4. package/dist/chunks/{keyframes-W-474DMc.js.map → keyframes-DVAC5sQI.js.map} +1 -1
  5. package/dist/chunks/{keyframes-ZheOkpt0.cjs → keyframes-Dw9zwVQa.cjs} +2 -2
  6. package/dist/chunks/{keyframes-ZheOkpt0.cjs.map → keyframes-Dw9zwVQa.cjs.map} +1 -1
  7. package/dist/chunks/{registry-BIEjKngP.js → registry-46AAzyeC.js} +2 -2
  8. package/dist/chunks/{registry-BIEjKngP.js.map → registry-46AAzyeC.js.map} +1 -1
  9. package/dist/chunks/{registry-eJgpFAzI.cjs → registry-CSVil2qJ.cjs} +2 -2
  10. package/dist/chunks/{registry-eJgpFAzI.cjs.map → registry-CSVil2qJ.cjs.map} +1 -1
  11. package/dist/chunks/{ticker-CM_56oVy.js → ticker-COOYAyQy.js} +2 -2
  12. package/dist/chunks/{ticker-CM_56oVy.js.map → ticker-COOYAyQy.js.map} +1 -1
  13. package/dist/chunks/{ticker-D4o6enH0.cjs → ticker-gHv6pNfx.cjs} +2 -2
  14. package/dist/chunks/{ticker-D4o6enH0.cjs.map → ticker-gHv6pNfx.cjs.map} +1 -1
  15. package/dist/chunks/{tween-CBuWYpI-.cjs → tween-CFN0WcOb.cjs} +13 -3
  16. package/dist/chunks/tween-CFN0WcOb.cjs.map +1 -0
  17. package/dist/chunks/{tween-CqX1JBuj.js → tween-CGyolmzB.js} +13 -3
  18. package/dist/chunks/tween-CGyolmzB.js.map +1 -0
  19. package/dist/components/widgets.cjs +403 -202
  20. package/dist/components/widgets.cjs.map +1 -1
  21. package/dist/components/widgets.d.cts +42 -2
  22. package/dist/components/widgets.d.ts +42 -2
  23. package/dist/components/widgets.js +402 -203
  24. package/dist/components/widgets.js.map +1 -1
  25. package/dist/llms-full.txt +97 -1
  26. package/dist/llms.txt +6 -2
  27. package/dist/manifest.json +234 -1
  28. package/dist/runtime/format-css.cjs +4 -4
  29. package/dist/runtime/format-css.js +4 -4
  30. package/dist/runtime/format-motion.cjs +4 -4
  31. package/dist/runtime/format-motion.js +4 -4
  32. package/dist/runtime/format-sprite.cjs +225 -0
  33. package/dist/runtime/format-sprite.cjs.map +1 -0
  34. package/dist/runtime/format-sprite.d.cts +224 -0
  35. package/dist/runtime/format-sprite.d.ts +224 -0
  36. package/dist/runtime/format-sprite.iife.js +2 -0
  37. package/dist/runtime/format-sprite.iife.js.map +1 -0
  38. package/dist/runtime/format-sprite.js +215 -0
  39. package/dist/runtime/format-sprite.js.map +1 -0
  40. package/dist/runtime/format-svg.cjs +3 -3
  41. package/dist/runtime/format-svg.cjs.map +1 -1
  42. package/dist/runtime/format-svg.iife.js.map +1 -1
  43. package/dist/runtime/format-svg.js +3 -3
  44. package/dist/runtime/format-svg.js.map +1 -1
  45. package/dist/runtime/scroll.cjs +2 -2
  46. package/dist/runtime/scroll.js +2 -2
  47. package/dist/runtime/text.cjs +147 -0
  48. package/dist/runtime/text.cjs.map +1 -0
  49. package/dist/runtime/text.d.cts +65 -0
  50. package/dist/runtime/text.d.ts +65 -0
  51. package/dist/runtime/text.iife.js +2 -0
  52. package/dist/runtime/text.iife.js.map +1 -0
  53. package/dist/runtime/text.js +143 -0
  54. package/dist/runtime/text.js.map +1 -0
  55. package/dist/runtime.cjs +3 -3
  56. package/dist/runtime.d.cts +9 -2
  57. package/dist/runtime.d.ts +9 -2
  58. package/dist/runtime.iife.js +1 -1
  59. package/dist/runtime.iife.js.map +1 -1
  60. package/dist/runtime.js +5 -5
  61. package/dist/widgets.umd.js +1 -1
  62. package/dist/widgets.umd.js.map +1 -1
  63. package/docs/ROADMAP.md +1 -1
  64. package/docs/components/README.md +3 -1
  65. package/docs/components/usa-route-transition.md +38 -0
  66. package/docs/components/usa-text-splitter.md +60 -0
  67. package/docs/components.md +45 -0
  68. package/docs/runtime/format-sprite.md +60 -0
  69. package/docs/runtime/text.md +59 -0
  70. package/package.json +21 -1
  71. package/dist/chunks/tween-CBuWYpI-.cjs.map +0 -1
  72. package/dist/chunks/tween-CqX1JBuj.js.map +0 -1
@@ -1,4 +1,4 @@
1
- # Motionary 10.2.0 — full component reference
1
+ # Motionary 10.3.0 — full component reference
2
2
 
3
3
  Generated from the source. Machine-readable version: https://harrisoncn.github.io/Motionary/components.json (schema https://harrisoncn.github.io/Motionary/components.schema.json).
4
4
 
@@ -113,6 +113,51 @@ const f = morphPath('M0 0 L100 0 L50 80 Z', 'M50 0 A40 40 0 1 1 49.9 0 Z');
113
113
  path.setAttribute('d', f(0.5));
114
114
  ```
115
115
 
116
+ ### motionary/runtime/text — Text splitting
117
+
118
+ 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).
119
+
120
+ - Install: `npm i motionary`
121
+ - Import: `motionary/runtime/text`
122
+ - Register: `use(text);` — 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).
123
+ - CDN:
124
+
125
+ ```html
126
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
127
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/text.iife.js"></script>
128
+ ```
129
+
130
+ ```js
131
+ import { use, tween } from 'motionary/runtime';
132
+ import { text, splitText } from 'motionary/runtime/text';
133
+ use(text);
134
+ const { chars } = splitText(document.querySelector('h1'), { type: 'chars,words' });
135
+ tween(chars, { from: { y: '1em', opacity: 0 }, to: { y: '0em', opacity: 1 }, stagger: 30 });
136
+ ```
137
+
138
+ ### motionary/runtime/format-sprite — Sprite sheets & image sequences
139
+
140
+ Play TexturePacker / Aseprite sprite sheets and numbered image sequences on a canvas or an element background, as runtime timelines (scrubbable).
141
+
142
+ - Install: `npm i motionary`
143
+ - Import: `motionary/runtime/format-sprite`
144
+ - Register: `use(formatSprite);` — 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).
145
+ - CDN:
146
+
147
+ ```html
148
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
149
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-sprite.iife.js"></script>
150
+ ```
151
+
152
+ ```js
153
+ import { use } from 'motionary/runtime';
154
+ import { formatSprite, parseSpriteSheet, spritePlayer } from 'motionary/runtime/format-sprite';
155
+ use(formatSprite);
156
+ const sheet = parseSpriteSheet(await (await fetch('/slime.json')).json());
157
+ const img = new Image(); img.src = '/slime.png'; await img.decode();
158
+ spritePlayer(document.querySelector('canvas'), sheet, img, { tag: 'bounce' });
159
+ ```
160
+
116
161
  ## Components
117
162
 
118
163
  ### <usa-accordion> — Accordion
@@ -2233,6 +2278,23 @@ Ink ripple from the pointer — or from the centre for Space/Enter — on any bu
2233
2278
  <usa-ripple><button>Click me</button></usa-ripple>
2234
2279
  ```
2235
2280
 
2281
+ ### <usa-route-transition> — Route transition container
2282
+
2283
+ 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.
2284
+
2285
+ - Import: `import { defineRouteTransition } from 'motionary/components/widgets'; defineRouteTransition();`
2286
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2287
+ - Attributes: `effect`, `engine`, `cross-document`
2288
+ - Events: `usa:navigate`, `usa:navigated`
2289
+ - Methods: `navigate()`
2290
+
2291
+ ```html
2292
+ <usa-route-transition id="app" effect="slide" cross-document>
2293
+ <nav><a href="/">Home</a> <a href="/about">About</a></nav>
2294
+ <h1 data-shared="title">Home</h1>
2295
+ </usa-route-transition>
2296
+ ```
2297
+
2236
2298
  ### <usa-scene> — Cinematic scene
2237
2299
 
2238
2300
  9.1: a scroll-scrubbed cinematic shot — while the scene crosses the screen its image follows a camera move (dolly, pan, tilt, zoom, orbit) and captions fade in on cue.
@@ -2844,6 +2906,40 @@ Cycles words in place — the box keeps the width of the longest word, so nothin
2844
2906
  Build <usa-text-rotate words="fast|tiny|typed"></usa-text-rotate> apps
2845
2907
  ```
2846
2908
 
2909
+ ### <usa-text-splitter> — Text splitter
2910
+
2911
+ 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.
2912
+
2913
+ - Import: `import { defineTextSplitter } from 'motionary/components/widgets'; defineTextSplitter();`
2914
+ - CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
2915
+ - Attributes: `split`, `effect`, `stagger`, `duration`, `loop`, `trigger`
2916
+ - Events: `usa:split`, `usa:done`, `usa:runtime-missing`
2917
+ - Methods: `replay()`, `pieces()`
2918
+ - Requires: motionary/runtime/text
2919
+ - Install: `npm i motionary`
2920
+ - Order: 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).
2921
+
2922
+ ```js
2923
+ import { use } from 'motionary/runtime';
2924
+ import { text } from 'motionary/runtime/text';
2925
+ import { defineTextSplitter } from 'motionary/components/widgets';
2926
+
2927
+ use(text);
2928
+ defineTextSplitter(); // registers <usa-text-splitter> — after the prerequisites
2929
+ ```
2930
+
2931
+ ```html
2932
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
2933
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/text.iife.js"></script>
2934
+ <!-- then the component bundles -->
2935
+ <script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
2936
+ <script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
2937
+ ```
2938
+
2939
+ ```html
2940
+ <usa-text-splitter split="chars" effect="rise" stagger="30">Motion, made simple.</usa-text-splitter>
2941
+ ```
2942
+
2847
2943
  ### <usa-theme-surface> — Theme surface
2848
2944
 
2849
2945
  8.6: a themeable card that follows the nearest theme — light, dark, neon (pulsing glow edge), glass (frosted backdrop with a sheen) or soft neumorphic relief — and cross-fades when the theme changes.
package/dist/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
- # Motionary 10.2.0
1
+ # Motionary 10.3.0
2
2
 
3
- > Motionary is a zero-dependency motion library: scroll animations, 200+ presets and 193 animated Web Components (<usa-*>) that work in plain HTML and every framework, plus motionary/runtime — its own tween/timeline engine and format loaders.
3
+ > Motionary is a zero-dependency motion library: scroll animations, 200+ presets and 195 animated Web Components (<usa-*>) that work in plain HTML and every framework, plus motionary/runtime — its own tween/timeline engine and format loaders.
4
4
 
5
5
  Install: `npm i motionary` · CDN: https://unpkg.com/motionary@10/dist/components.umd.js (+ https://unpkg.com/motionary@10/dist/widgets.umd.js for 6.x+ widgets) · Manifest: https://harrisoncn.github.io/Motionary/components.json · Full text: https://harrisoncn.github.io/Motionary/llms-full.txt
6
6
 
@@ -13,6 +13,8 @@ Rules for using a component: (1) import its define function from `import.path` a
13
13
  - [motionary/runtime/format-motion](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-motion.md): Play Motion / Framer-style { initial, animate, transition } JSON (arrays as keyframes, times, repeatType, springs) with the runtime.
14
14
  - [motionary/runtime/scroll](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/scroll.md): Scroll-linked scenes: start / end rules, scrub (direct or smoothed), pin, markers, enter / leave callbacks and per-edge actions for a runtime tween or timeline.
15
15
  - [motionary/runtime/format-svg](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-svg.md): Replay SVG SMIL animations (animate, set, animateTransform, animateMotion) on the runtime timeline, morph between any two paths, and measure paths without the DOM.
16
+ - [motionary/runtime/text](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/text.md): 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).
17
+ - [motionary/runtime/format-sprite](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-sprite.md): Play TexturePacker / Aseprite sprite sheets and numbered image sequences on a canvas or an element background, as runtime timelines (scrubbable).
16
18
 
17
19
  ## Components
18
20
 
@@ -154,6 +156,7 @@ Rules for using a component: (1) import its define function from `import.path` a
154
156
  - `<usa-retro-button>` (motionary/components/widgets): 8.2: buttons in four eras with matching press motion — 8-bit pixel (stepped press), CRT phosphor (flicker), Y2K chrome pill (bounce) and Windows 95 bevel (sink)
155
157
  - `<usa-reveal>` (motionary/components/reveal): Fade, slide, zoom, blur or flip content in as it enters the viewport. 12 effects, replay on re-entry with repeat.
156
158
  - `<usa-ripple>` (motionary/components/interaction): Ink ripple from the pointer — or from the centre for Space/Enter — on any button, list item or card.
159
+ - `<usa-route-transition>` (motionary/components/widgets): 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
157
160
  - `<usa-scene>` (motionary/components/widgets): 9.1: a scroll-scrubbed cinematic shot — while the scene crosses the screen its image follows a camera move (dolly, pan, tilt, zoom, orbit) and captions fade in
158
161
  - `<usa-scramble>` (motionary/components/text): Decodes text out of random glyphs, left to right. Trigger on view, hover/focus or manually.
159
162
  - `<usa-scroll-highlight>` (motionary/components/text): Words light up one by one as you read down the page, or a highlighter marker sweeps behind the text.
@@ -191,6 +194,7 @@ Rules for using a component: (1) import its define function from `import.path` a
191
194
  - `<usa-tabs>` (motionary/components/ui): Accessible tabs whose indicator slides between tabs with a spring; panels slide in from the direction you moved. Line or pill indicator.
192
195
  - `<usa-terminal>` (motionary/components/widgets): 8.2: a retro terminal window that types its commands after the prompt with a blinking block cursor and prints the output line by line when it scrolls into view
193
196
  - `<usa-text-rotate>` (motionary/components/text): Cycles words in place — the box keeps the width of the longest word, so nothing around it reflows.
197
+ - `<usa-text-splitter>` (motionary/components/widgets; requires motionary/runtime/text): 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,
194
198
  - `<usa-theme-surface>` (motionary/components/widgets): 8.6: a themeable card that follows the nearest theme — light, dark, neon (pulsing glow edge), glass (frosted backdrop with a sheen) or soft neumorphic relief —
195
199
  - `<usa-theme-switcher>` (motionary/components/widgets): 8.6: a segmented switcher for the 8.6 theme system — light, dark, neon, glass and soft (neumorphism); a pill slides under the active option and the page change
196
200
  - `<usa-tilt>` (motionary/components/interaction): Tilts toward the pointer in 3D with an optional glare; exposes --usa-tilt-x/y for parallax layers inside.
@@ -3,7 +3,7 @@
3
3
  "format": "motionary/components",
4
4
  "schemaVersion": 1,
5
5
  "package": "motionary",
6
- "version": "10.2.0",
6
+ "version": "10.3.0",
7
7
  "homepage": "https://harrisoncn.github.io/Motionary/",
8
8
  "llms": "https://harrisoncn.github.io/Motionary/llms.txt",
9
9
  "cdn": {
@@ -358,6 +358,140 @@
358
358
  ]
359
359
  ],
360
360
  "example": "import { use } from 'motionary/runtime';\nimport { formatSvg, playSmil, morphPath } from 'motionary/runtime/format-svg';\nuse(formatSvg);\nconst player = playSmil(document.querySelector('svg'));\nplayer.timeline.timeScale = 0.5; // scrub / slow down / reverse like any runtime timeline\nconst f = morphPath('M0 0 L100 0 L50 80 Z', 'M50 0 A40 40 0 1 1 49.9 0 Z');\npath.setAttribute('d', f(0.5));"
361
+ },
362
+ {
363
+ "kind": "runtime",
364
+ "id": "text",
365
+ "label": "motionary/runtime/text",
366
+ "title": "Text splitting",
367
+ "summary": "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).",
368
+ "install": "npm i motionary",
369
+ "importPath": "motionary/runtime/text",
370
+ "import": "import { use } from 'motionary/runtime';\nimport { text } from 'motionary/runtime/text';",
371
+ "register": "use(text);",
372
+ "cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/text.iife.js\"></script>",
373
+ "cdnEsm": "https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/text.js",
374
+ "order": "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).",
375
+ "docs": "docs/runtime/text.md",
376
+ "budget": 2560,
377
+ "exports": [
378
+ "text",
379
+ "splitText",
380
+ "segment"
381
+ ],
382
+ "compat": [
383
+ [
384
+ "chars (grapheme clusters: emoji, combining marks, CJK)",
385
+ "yes",
386
+ "Intl.Segmenter when available, code points otherwise"
387
+ ],
388
+ [
389
+ "words, whitespace preserved",
390
+ "yes",
391
+ ""
392
+ ],
393
+ [
394
+ "lines (grouped by rendered position)",
395
+ "yes",
396
+ "wrapped in line spans for flat text; data-line on words inside nested markup"
397
+ ],
398
+ [
399
+ "nested inline markup (a, em, strong…) kept",
400
+ "yes",
401
+ ""
402
+ ],
403
+ [
404
+ "accessibility: aria-label + aria-hidden pieces, revert()",
405
+ "yes",
406
+ ""
407
+ ],
408
+ [
409
+ "--i index custom property for CSS staggers",
410
+ "yes",
411
+ ""
412
+ ],
413
+ [
414
+ "SSR / workers",
415
+ "partial",
416
+ "segment() is pure; splitText() needs a DOM"
417
+ ],
418
+ [
419
+ "right-to-left line detection",
420
+ "partial",
421
+ "lines by vertical position (works for RTL; bidi runs not reordered)"
422
+ ]
423
+ ],
424
+ "example": "import { use, tween } from 'motionary/runtime';\nimport { text, splitText } from 'motionary/runtime/text';\nuse(text);\nconst { chars } = splitText(document.querySelector('h1'), { type: 'chars,words' });\ntween(chars, { from: { y: '1em', opacity: 0 }, to: { y: '0em', opacity: 1 }, stagger: 30 });"
425
+ },
426
+ {
427
+ "kind": "runtime",
428
+ "id": "format-sprite",
429
+ "label": "motionary/runtime/format-sprite",
430
+ "title": "Sprite sheets & image sequences",
431
+ "summary": "Play TexturePacker / Aseprite sprite sheets and numbered image sequences on a canvas or an element background, as runtime timelines (scrubbable).",
432
+ "install": "npm i motionary",
433
+ "importPath": "motionary/runtime/format-sprite",
434
+ "import": "import { use } from 'motionary/runtime';\nimport { formatSprite } from 'motionary/runtime/format-sprite';",
435
+ "register": "use(formatSprite);",
436
+ "cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-sprite.iife.js\"></script>",
437
+ "cdnEsm": "https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-sprite.js",
438
+ "order": "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).",
439
+ "docs": "docs/runtime/format-sprite.md",
440
+ "budget": 3072,
441
+ "exports": [
442
+ "formatSprite",
443
+ "parseSpriteSheet",
444
+ "gridSheet",
445
+ "frameOrder",
446
+ "drawFrame",
447
+ "spritePlayer",
448
+ "imageSequence",
449
+ "preloadImages",
450
+ "sequencePlayer"
451
+ ],
452
+ "compat": [
453
+ [
454
+ "TexturePacker JSON (hash + array)",
455
+ "yes",
456
+ "trimmed (spriteSourceSize / sourceSize) and rotated frames"
457
+ ],
458
+ [
459
+ "Aseprite JSON (hash + array), per-frame duration",
460
+ "yes",
461
+ ""
462
+ ],
463
+ [
464
+ "Aseprite frameTags: forward / reverse / pingpong / pingpong_reverse",
465
+ "yes",
466
+ ""
467
+ ],
468
+ [
469
+ "plain grid sheets",
470
+ "yes",
471
+ "gridSheet(cols, rows, w, h)"
472
+ ],
473
+ [
474
+ "image sequences (frame_{0001}.webp)",
475
+ "yes",
476
+ "preloading, cover-fit drawing, scrub via progress"
477
+ ],
478
+ [
479
+ "multipack (several atlas images)",
480
+ "no",
481
+ "load each sheet separately"
482
+ ],
483
+ [
484
+ "Aseprite slices / layers",
485
+ "no",
486
+ "frames only"
487
+ ],
488
+ [
489
+ "SSR / workers",
490
+ "partial",
491
+ "parsing is pure; players need a canvas (OffscreenCanvas works)"
492
+ ]
493
+ ],
494
+ "example": "import { use } from 'motionary/runtime';\nimport { formatSprite, parseSpriteSheet, spritePlayer } from 'motionary/runtime/format-sprite';\nuse(formatSprite);\nconst sheet = parseSpriteSheet(await (await fetch('/slime.json')).json());\nconst img = new Image(); img.src = '/slime.png'; await img.decode();\nspritePlayer(document.querySelector('canvas'), sheet, img, { tag: 'bounce' });"
361
495
  }
362
496
  ],
363
497
  "components": [
@@ -5829,6 +5963,45 @@
5829
5963
  "prerequisites": null,
5830
5964
  "source": "src/components/interaction/ripple.ts"
5831
5965
  },
5966
+ {
5967
+ "id": "route-transition",
5968
+ "tag": "usa-route-transition",
5969
+ "title": "Route transition container",
5970
+ "description": "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.",
5971
+ "category": "transitions",
5972
+ "since": "10.3",
5973
+ "keywords": [
5974
+ "view transitions",
5975
+ "router",
5976
+ "mpa",
5977
+ "shared element",
5978
+ "page transition"
5979
+ ],
5980
+ "import": {
5981
+ "path": "motionary/components/widgets",
5982
+ "define": "defineRouteTransition",
5983
+ "register": "defineRouteTransition();"
5984
+ },
5985
+ "cdn": "https://unpkg.com/motionary@10/dist/widgets.umd.js",
5986
+ "attributes": [
5987
+ "effect",
5988
+ "engine",
5989
+ "cross-document"
5990
+ ],
5991
+ "events": [
5992
+ "usa:navigate",
5993
+ "usa:navigated"
5994
+ ],
5995
+ "slots": [],
5996
+ "methods": [
5997
+ "navigate"
5998
+ ],
5999
+ "example": "<usa-route-transition id=\"app\" effect=\"slide\" cross-document>\n <nav><a href=\"/\">Home</a> <a href=\"/about\">About</a></nav>\n <h1 data-shared=\"title\">Home</h1>\n</usa-route-transition>",
6000
+ "esm": "import { defineRouteTransition } from 'motionary/components/widgets';\n\ndefineRouteTransition(); // registers <usa-route-transition>\n\n/* then use it in your HTML:\n<usa-route-transition id=\"app\" effect=\"slide\" cross-document>\n <nav><a href=\"/\">Home</a> <a href=\"/about\">About</a></nav>\n <h1 data-shared=\"title\">Home</h1>\n</usa-route-transition>\n*/",
6001
+ "requires": [],
6002
+ "prerequisites": null,
6003
+ "source": "src/components/widgets/route-transition.ts"
6004
+ },
5832
6005
  {
5833
6006
  "id": "scene",
5834
6007
  "tag": "usa-scene",
@@ -7177,6 +7350,66 @@
7177
7350
  "prerequisites": null,
7178
7351
  "source": "src/components/text/text-rotate.ts"
7179
7352
  },
7353
+ {
7354
+ "id": "text-splitter",
7355
+ "tag": "usa-text-splitter",
7356
+ "title": "Text splitter",
7357
+ "description": "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.",
7358
+ "category": "text",
7359
+ "since": "10.3",
7360
+ "keywords": [
7361
+ "split text",
7362
+ "letters",
7363
+ "words",
7364
+ "lines",
7365
+ "stagger",
7366
+ "runtime"
7367
+ ],
7368
+ "import": {
7369
+ "path": "motionary/components/widgets",
7370
+ "define": "defineTextSplitter",
7371
+ "register": "defineTextSplitter();"
7372
+ },
7373
+ "cdn": "https://unpkg.com/motionary@10/dist/widgets.umd.js",
7374
+ "attributes": [
7375
+ "split",
7376
+ "effect",
7377
+ "stagger",
7378
+ "duration",
7379
+ "loop",
7380
+ "trigger"
7381
+ ],
7382
+ "events": [
7383
+ "usa:split",
7384
+ "usa:done",
7385
+ "usa:runtime-missing"
7386
+ ],
7387
+ "slots": [],
7388
+ "methods": [
7389
+ "replay",
7390
+ "pieces"
7391
+ ],
7392
+ "example": "<usa-text-splitter split=\"chars\" effect=\"rise\" stagger=\"30\">Motion, made simple.</usa-text-splitter>",
7393
+ "esm": "import { use } from 'motionary/runtime';\nimport { text } from 'motionary/runtime/text';\n\nuse(text);\nimport { defineTextSplitter } from 'motionary/components/widgets';\n\ndefineTextSplitter(); // registers <usa-text-splitter>\n\n/* then use it in your HTML:\n<usa-text-splitter split=\"chars\" effect=\"rise\" stagger=\"30\">Motion, made simple.</usa-text-splitter>\n*/",
7394
+ "requires": [
7395
+ "text"
7396
+ ],
7397
+ "prerequisites": {
7398
+ "badge": "Requires: motionary/runtime/text",
7399
+ "modules": [
7400
+ "motionary/runtime/text"
7401
+ ],
7402
+ "install": "npm i motionary",
7403
+ "importAndRegister": "import { use } from 'motionary/runtime';\nimport { text } from 'motionary/runtime/text';\nimport { defineTextSplitter } from 'motionary/components/widgets';\n\nuse(text);\ndefineTextSplitter(); // registers <usa-text-splitter> — after the prerequisites",
7404
+ "order": "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).",
7405
+ "cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/text.iife.js\"></script>\n<!-- then the component bundles -->\n<script src=\"https://unpkg.com/motionary@10/dist/components.umd.js\"></script>\n<script src=\"https://unpkg.com/motionary@10/dist/widgets.umd.js\"></script>",
7406
+ "example": "<usa-text-splitter split=\"chars\" effect=\"rise\" stagger=\"30\">Motion, made simple.</usa-text-splitter>",
7407
+ "docs": [
7408
+ "https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/text.md"
7409
+ ]
7410
+ },
7411
+ "source": "src/components/widgets/text-splitter.ts"
7412
+ },
7180
7413
  {
7181
7414
  "id": "theme-surface",
7182
7415
  "tag": "usa-theme-surface",
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var registry = require('../chunks/registry-eJgpFAzI.cjs');
4
- var keyframes = require('../chunks/keyframes-ZheOkpt0.cjs');
5
- require('../chunks/tween-CBuWYpI-.cjs');
6
- require('../chunks/ticker-D4o6enH0.cjs');
3
+ var registry = require('../chunks/registry-CSVil2qJ.cjs');
4
+ var keyframes = require('../chunks/keyframes-Dw9zwVQa.cjs');
5
+ require('../chunks/tween-CFN0WcOb.cjs');
6
+ require('../chunks/ticker-gHv6pNfx.cjs');
7
7
 
8
8
  /**
9
9
  * `motionary/runtime/format-css` (10.1) — import CSS `@keyframes` and Web
@@ -1,7 +1,7 @@
1
- import { R as RUNTIME_VERSION } from '../chunks/registry-BIEjKngP.js';
2
- import { f as framesToTimeline, d as distributeOffsets, c as camelProp } from '../chunks/keyframes-W-474DMc.js';
3
- import '../chunks/tween-CqX1JBuj.js';
4
- import '../chunks/ticker-CM_56oVy.js';
1
+ import { R as RUNTIME_VERSION } from '../chunks/registry-46AAzyeC.js';
2
+ import { f as framesToTimeline, d as distributeOffsets, c as camelProp } from '../chunks/keyframes-DVAC5sQI.js';
3
+ import '../chunks/tween-CGyolmzB.js';
4
+ import '../chunks/ticker-COOYAyQy.js';
5
5
 
6
6
  /**
7
7
  * `motionary/runtime/format-css` (10.1) — import CSS `@keyframes` and Web
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var registry = require('../chunks/registry-eJgpFAzI.cjs');
4
- var tween = require('../chunks/tween-CBuWYpI-.cjs');
5
- var keyframes = require('../chunks/keyframes-ZheOkpt0.cjs');
6
- require('../chunks/ticker-D4o6enH0.cjs');
3
+ var registry = require('../chunks/registry-CSVil2qJ.cjs');
4
+ var tween = require('../chunks/tween-CFN0WcOb.cjs');
5
+ var keyframes = require('../chunks/keyframes-Dw9zwVQa.cjs');
6
+ require('../chunks/ticker-gHv6pNfx.cjs');
7
7
 
8
8
  /**
9
9
  * `motionary/runtime/format-motion` (10.1) — play Motion / Framer-style
@@ -1,7 +1,7 @@
1
- import { R as RUNTIME_VERSION } from '../chunks/registry-BIEjKngP.js';
2
- import { c as cubicBezier, E as EASES, T as Timeline } from '../chunks/tween-CqX1JBuj.js';
3
- import { f as framesToTimeline } from '../chunks/keyframes-W-474DMc.js';
4
- import '../chunks/ticker-CM_56oVy.js';
1
+ import { R as RUNTIME_VERSION } from '../chunks/registry-46AAzyeC.js';
2
+ import { c as cubicBezier, E as EASES, T as Timeline } from '../chunks/tween-CGyolmzB.js';
3
+ import { f as framesToTimeline } from '../chunks/keyframes-DVAC5sQI.js';
4
+ import '../chunks/ticker-COOYAyQy.js';
5
5
 
6
6
  /**
7
7
  * `motionary/runtime/format-motion` (10.1) — play Motion / Framer-style