motionary 10.1.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/AGENTS.md +61 -0
- package/CHANGELOG.md +36 -0
- package/README.md +69 -0
- package/dist/chunks/{keyframes-CyH_abhI.js → keyframes-DVAC5sQI.js} +2 -2
- package/dist/chunks/{keyframes-CyH_abhI.js.map → keyframes-DVAC5sQI.js.map} +1 -1
- package/dist/chunks/{keyframes-cUdsXSXQ.cjs → keyframes-Dw9zwVQa.cjs} +2 -2
- package/dist/chunks/{keyframes-cUdsXSXQ.cjs.map → keyframes-Dw9zwVQa.cjs.map} +1 -1
- package/dist/chunks/{registry-jF8VIA_9.js → registry-46AAzyeC.js} +2 -2
- package/dist/chunks/{registry-jF8VIA_9.js.map → registry-46AAzyeC.js.map} +1 -1
- package/dist/chunks/{registry-C0xLNq3-.cjs → registry-CSVil2qJ.cjs} +2 -2
- package/dist/chunks/{registry-C0xLNq3-.cjs.map → registry-CSVil2qJ.cjs.map} +1 -1
- package/dist/chunks/ticker-COOYAyQy.js +70 -0
- package/dist/chunks/ticker-COOYAyQy.js.map +1 -0
- package/dist/chunks/ticker-gHv6pNfx.cjs +72 -0
- package/dist/chunks/ticker-gHv6pNfx.cjs.map +1 -0
- package/dist/chunks/{tween-JEthWrjo.cjs → tween-CFN0WcOb.cjs} +16 -73
- package/dist/chunks/tween-CFN0WcOb.cjs.map +1 -0
- package/dist/chunks/{tween-DDObu9iA.js → tween-CGyolmzB.js} +16 -72
- package/dist/chunks/tween-CGyolmzB.js.map +1 -0
- package/dist/components/core.cjs +106 -0
- package/dist/components/core.cjs.map +1 -1
- package/dist/components/core.d.cts +44 -2
- package/dist/components/core.d.ts +44 -2
- package/dist/components/core.js +105 -1
- package/dist/components/core.js.map +1 -1
- package/dist/components/widgets.cjs +602 -198
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +186 -2
- package/dist/components/widgets.d.ts +186 -2
- package/dist/components/widgets.js +598 -199
- package/dist/components/widgets.js.map +1 -1
- package/dist/llms-full.txt +194 -1
- package/dist/llms.txt +10 -2
- package/dist/manifest.json +492 -1
- package/dist/runtime/format-css.cjs +4 -3
- package/dist/runtime/format-css.cjs.map +1 -1
- package/dist/runtime/format-css.js +4 -3
- package/dist/runtime/format-css.js.map +1 -1
- package/dist/runtime/format-motion.cjs +4 -3
- package/dist/runtime/format-motion.cjs.map +1 -1
- package/dist/runtime/format-motion.js +4 -3
- package/dist/runtime/format-motion.js.map +1 -1
- 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 +457 -0
- package/dist/runtime/format-svg.cjs.map +1 -0
- package/dist/runtime/format-svg.d.cts +214 -0
- package/dist/runtime/format-svg.d.ts +214 -0
- package/dist/runtime/format-svg.iife.js +2 -0
- package/dist/runtime/format-svg.iife.js.map +1 -0
- package/dist/runtime/format-svg.js +446 -0
- package/dist/runtime/format-svg.js.map +1 -0
- package/dist/runtime/scroll.cjs +301 -0
- package/dist/runtime/scroll.cjs.map +1 -0
- package/dist/runtime/scroll.d.cts +236 -0
- package/dist/runtime/scroll.d.ts +236 -0
- package/dist/runtime/scroll.iife.js +2 -0
- package/dist/runtime/scroll.iife.js.map +1 -0
- package/dist/runtime/scroll.js +292 -0
- package/dist/runtime/scroll.js.map +1 -0
- 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 +5 -4
- package/dist/runtime.cjs.map +1 -1
- 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 -4
- package/dist/runtime.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/ai-prompt-guide.md +54 -0
- package/docs/components/README.md +255 -0
- package/docs/components/usa-accordion.md +38 -0
- package/docs/components/usa-acrylic.md +38 -0
- package/docs/components/usa-add-to-cart.md +40 -0
- package/docs/components/usa-ambient.md +32 -0
- package/docs/components/usa-anim-icon.md +34 -0
- package/docs/components/usa-audio.md +38 -0
- package/docs/components/usa-aurora.md +36 -0
- package/docs/components/usa-auto-animate.md +44 -0
- package/docs/components/usa-auto-skeleton.md +38 -0
- package/docs/components/usa-avatar-stack.md +38 -0
- package/docs/components/usa-back-to-top.md +32 -0
- package/docs/components/usa-badge-wall.md +39 -0
- package/docs/components/usa-badge.md +36 -0
- package/docs/components/usa-bar-chart.md +33 -0
- package/docs/components/usa-bg-generator.md +32 -0
- package/docs/components/usa-blobs.md +32 -0
- package/docs/components/usa-bottom-sheet.md +32 -0
- package/docs/components/usa-button.md +78 -0
- package/docs/components/usa-card-stack.md +40 -0
- package/docs/components/usa-card.md +94 -0
- package/docs/components/usa-carousel-3d.md +40 -0
- package/docs/components/usa-carousel.md +40 -0
- package/docs/components/usa-cart-drawer.md +33 -0
- package/docs/components/usa-chapter-nav.md +40 -0
- package/docs/components/usa-chat-composer.md +33 -0
- package/docs/components/usa-check.md +32 -0
- package/docs/components/usa-checkbox.md +32 -0
- package/docs/components/usa-click.md +36 -0
- package/docs/components/usa-clock-control.md +37 -0
- package/docs/components/usa-code-export.md +36 -0
- package/docs/components/usa-color-picker.md +32 -0
- package/docs/components/usa-command-palette.md +39 -0
- package/docs/components/usa-compare.md +38 -0
- package/docs/components/usa-countdown.md +32 -0
- package/docs/components/usa-counter.md +32 -0
- package/docs/components/usa-cube-gallery.md +40 -0
- package/docs/components/usa-cube.md +36 -0
- package/docs/components/usa-cursor.md +32 -0
- package/docs/components/usa-date-picker.md +32 -0
- package/docs/components/usa-depth.md +44 -0
- package/docs/components/usa-dialog.md +40 -0
- package/docs/components/usa-disclosure.md +38 -0
- package/docs/components/usa-distort.md +36 -0
- package/docs/components/usa-dock.md +40 -0
- package/docs/components/usa-dot-network.md +32 -0
- package/docs/components/usa-double-tap.md +36 -0
- package/docs/components/usa-draggable.md +38 -0
- package/docs/components/usa-draw.md +36 -0
- package/docs/components/usa-drawer.md +34 -0
- package/docs/components/usa-equalizer.md +33 -0
- package/docs/components/usa-fab.md +40 -0
- package/docs/components/usa-festival-banner.md +32 -0
- package/docs/components/usa-field.md +34 -0
- package/docs/components/usa-file-drop.md +35 -0
- package/docs/components/usa-fullpage.md +38 -0
- package/docs/components/usa-fx.md +851 -0
- package/docs/components/usa-gauge.md +32 -0
- package/docs/components/usa-gen-art.md +32 -0
- package/docs/components/usa-gesture-fx.md +36 -0
- package/docs/components/usa-gesture-sticker.md +36 -0
- package/docs/components/usa-glitch.md +32 -0
- package/docs/components/usa-globe.md +33 -0
- package/docs/components/usa-gradient-text.md +32 -0
- package/docs/components/usa-grain.md +36 -0
- package/docs/components/usa-grid-glow.md +36 -0
- package/docs/components/usa-gyro-card.md +38 -0
- package/docs/components/usa-handwriting.md +32 -0
- package/docs/components/usa-hero-video.md +38 -0
- package/docs/components/usa-hold.md +32 -0
- package/docs/components/usa-hud-panel.md +38 -0
- package/docs/components/usa-hydrate.md +42 -0
- package/docs/components/usa-icon-morph.md +34 -0
- package/docs/components/usa-install-button.md +32 -0
- package/docs/components/usa-kanban.md +46 -0
- package/docs/components/usa-keyframe-editor.md +37 -0
- package/docs/components/usa-kpi.md +32 -0
- package/docs/components/usa-leaderboard.md +41 -0
- package/docs/components/usa-like.md +32 -0
- package/docs/components/usa-liquid-nav.md +36 -0
- package/docs/components/usa-liquid.md +36 -0
- package/docs/components/usa-loading-bar.md +35 -0
- package/docs/components/usa-location-card.md +34 -0
- package/docs/components/usa-lottie-icon.md +34 -0
- package/docs/components/usa-lottie.md +32 -0
- package/docs/components/usa-lyrics.md +38 -0
- package/docs/components/usa-magnetic.md +32 -0
- package/docs/components/usa-marquee.md +38 -0
- package/docs/components/usa-mask-reveal.md +36 -0
- package/docs/components/usa-masonry-flow.md +42 -0
- package/docs/components/usa-masonry.md +38 -0
- package/docs/components/usa-menu-toggle.md +34 -0
- package/docs/components/usa-menu.md +44 -0
- package/docs/components/usa-message-list.md +39 -0
- package/docs/components/usa-milestones.md +40 -0
- package/docs/components/usa-modal.md +42 -0
- package/docs/components/usa-morph.md +34 -0
- package/docs/components/usa-motion-inspector.md +32 -0
- package/docs/components/usa-motion-prefs.md +32 -0
- package/docs/components/usa-motion-spec.md +32 -0
- package/docs/components/usa-motion-switch.md +34 -0
- package/docs/components/usa-motion-theme.md +40 -0
- package/docs/components/usa-motion.md +42 -0
- package/docs/components/usa-music-player.md +36 -0
- package/docs/components/usa-native-preview.md +36 -0
- package/docs/components/usa-nav-morph.md +40 -0
- package/docs/components/usa-navbar.md +36 -0
- package/docs/components/usa-notification-bell.md +37 -0
- package/docs/components/usa-odometer.md +34 -0
- package/docs/components/usa-organic-card.md +36 -0
- package/docs/components/usa-otp.md +33 -0
- package/docs/components/usa-overscroll.md +36 -0
- package/docs/components/usa-pack.md +111 -0
- package/docs/components/usa-pagination.md +32 -0
- package/docs/components/usa-panorama.md +32 -0
- package/docs/components/usa-particles.md +32 -0
- package/docs/components/usa-pause-all.md +32 -0
- package/docs/components/usa-perf-monitor.md +32 -0
- package/docs/components/usa-pinch-zoom.md +36 -0
- package/docs/components/usa-player.md +38 -0
- package/docs/components/usa-plugin-card.md +61 -0
- package/docs/components/usa-plugin-store.md +36 -0
- package/docs/components/usa-popover.md +38 -0
- package/docs/components/usa-post-fx.md +36 -0
- package/docs/components/usa-presence.md +36 -0
- package/docs/components/usa-press.md +32 -0
- package/docs/components/usa-prize-wheel.md +32 -0
- package/docs/components/usa-product-gallery.md +40 -0
- package/docs/components/usa-progress-ring.md +38 -0
- package/docs/components/usa-progress.md +34 -0
- package/docs/components/usa-prop-panel.md +34 -0
- package/docs/components/usa-pull-cord.md +32 -0
- package/docs/components/usa-pull-refresh.md +37 -0
- package/docs/components/usa-radar.md +32 -0
- package/docs/components/usa-reactions.md +32 -0
- package/docs/components/usa-red-envelope.md +32 -0
- package/docs/components/usa-retro-button.md +34 -0
- package/docs/components/usa-reveal.md +36 -0
- package/docs/components/usa-ripple.md +32 -0
- package/docs/components/usa-route-transition.md +38 -0
- package/docs/components/usa-scene.md +38 -0
- package/docs/components/usa-scramble.md +32 -0
- package/docs/components/usa-scroll-highlight.md +34 -0
- package/docs/components/usa-scroll-progress.md +36 -0
- package/docs/components/usa-scroll-scene.md +66 -0
- package/docs/components/usa-scrolly.md +40 -0
- package/docs/components/usa-segmented.md +40 -0
- package/docs/components/usa-shader.md +74 -0
- package/docs/components/usa-sheet.md +42 -0
- package/docs/components/usa-shimmer-text.md +32 -0
- package/docs/components/usa-shortcut.md +34 -0
- package/docs/components/usa-skeleton-reveal.md +42 -0
- package/docs/components/usa-skeleton.md +36 -0
- package/docs/components/usa-sketch-chart.md +32 -0
- package/docs/components/usa-slider.md +32 -0
- package/docs/components/usa-sparkline.md +32 -0
- package/docs/components/usa-spatial-card.md +40 -0
- package/docs/components/usa-spinner.md +34 -0
- package/docs/components/usa-splash.md +36 -0
- package/docs/components/usa-split-text.md +32 -0
- package/docs/components/usa-spotlight.md +40 -0
- package/docs/components/usa-spring.md +42 -0
- package/docs/components/usa-stagger.md +40 -0
- package/docs/components/usa-star-rating.md +34 -0
- package/docs/components/usa-stepper.md +42 -0
- package/docs/components/usa-sticky-stack.md +40 -0
- package/docs/components/usa-sticky-wall.md +40 -0
- package/docs/components/usa-stories.md +38 -0
- package/docs/components/usa-story.md +80 -0
- package/docs/components/usa-suggestion-chips.md +32 -0
- package/docs/components/usa-swipe-deck.md +40 -0
- package/docs/components/usa-swipeable.md +36 -0
- package/docs/components/usa-switch.md +32 -0
- package/docs/components/usa-tab-bar.md +46 -0
- package/docs/components/usa-tabs.md +40 -0
- package/docs/components/usa-terminal.md +38 -0
- package/docs/components/usa-text-rotate.md +32 -0
- package/docs/components/usa-text-splitter.md +60 -0
- package/docs/components/usa-theme-surface.md +36 -0
- package/docs/components/usa-theme-switcher.md +32 -0
- package/docs/components/usa-tilt.md +36 -0
- package/docs/components/usa-timeline.md +40 -0
- package/docs/components/usa-tip.md +44 -0
- package/docs/components/usa-toast-stack.md +36 -0
- package/docs/components/usa-toaster.md +36 -0
- package/docs/components/usa-typewriter.md +32 -0
- package/docs/components/usa-upload-progress.md +33 -0
- package/docs/components/usa-video-card.md +40 -0
- package/docs/components/usa-view-switch.md +38 -0
- package/docs/components/usa-voice-button.md +33 -0
- package/docs/components/usa-volume-knob.md +32 -0
- package/docs/components/usa-water-ripple.md +36 -0
- package/docs/components/usa-wave-text.md +32 -0
- package/docs/components/usa-weather-card.md +32 -0
- package/docs/components/usa-worker-canvas.md +32 -0
- package/docs/components/usa-xp-bar.md +33 -0
- package/docs/components.md +95 -0
- package/docs/runtime/format-sprite.md +60 -0
- package/docs/runtime/format-svg.md +62 -0
- package/docs/runtime/scroll.md +61 -0
- package/docs/runtime/text.md +59 -0
- package/package.json +45 -3
- package/dist/chunks/tween-DDObu9iA.js.map +0 -1
- package/dist/chunks/tween-JEthWrjo.cjs.map +0 -1
package/dist/manifest.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"format": "motionary/components",
|
|
4
4
|
"schemaVersion": 1,
|
|
5
5
|
"package": "motionary",
|
|
6
|
-
"version": "10.
|
|
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": {
|
|
@@ -203,6 +203,295 @@
|
|
|
203
203
|
]
|
|
204
204
|
],
|
|
205
205
|
"example": "import { use } from 'motionary/runtime';\nimport { formatMotion, playMotion } from 'motionary/runtime/format-motion';\nuse(formatMotion);\nplayMotion(document.querySelector('.card'), { initial: { opacity: 0, y: 40 }, animate: { opacity: 1, y: 0 }, transition: { type: 'spring', stiffness: 180, damping: 14 } });"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"kind": "runtime",
|
|
209
|
+
"id": "scroll",
|
|
210
|
+
"label": "motionary/runtime/scroll",
|
|
211
|
+
"title": "Scroll scenes",
|
|
212
|
+
"summary": "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.",
|
|
213
|
+
"install": "npm i motionary",
|
|
214
|
+
"importPath": "motionary/runtime/scroll",
|
|
215
|
+
"import": "import { use } from 'motionary/runtime';\nimport { scroll } from 'motionary/runtime/scroll';",
|
|
216
|
+
"register": "use(scroll);",
|
|
217
|
+
"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/scroll.iife.js\"></script>",
|
|
218
|
+
"cdnEsm": "https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/scroll.js",
|
|
219
|
+
"order": "Register the core first, then the module: use(scroll) also registers the core. CDN: load runtime.iife.js, then runtime/scroll.iife.js (it registers itself).",
|
|
220
|
+
"docs": "docs/runtime/scroll.md",
|
|
221
|
+
"budget": 4608,
|
|
222
|
+
"exports": [
|
|
223
|
+
"scroll",
|
|
224
|
+
"scrollScene",
|
|
225
|
+
"ScrollScene",
|
|
226
|
+
"refreshScenes",
|
|
227
|
+
"killScenes",
|
|
228
|
+
"allScenes",
|
|
229
|
+
"parseEdge",
|
|
230
|
+
"resolveRule"
|
|
231
|
+
],
|
|
232
|
+
"compat": [
|
|
233
|
+
[
|
|
234
|
+
"start / end rules (\"top 80%\", \"center center\", \"top top+=80\", end \"+=600\")",
|
|
235
|
+
"yes",
|
|
236
|
+
"keywords, %, px, +=/-= offsets"
|
|
237
|
+
],
|
|
238
|
+
[
|
|
239
|
+
"scrub: direct (true) or smoothed (ms)",
|
|
240
|
+
"yes",
|
|
241
|
+
"drives any runtime tween / timeline"
|
|
242
|
+
],
|
|
243
|
+
[
|
|
244
|
+
"pin (fixed in the window, transform inside a scroll container)",
|
|
245
|
+
"yes",
|
|
246
|
+
"spacer keeps the layout"
|
|
247
|
+
],
|
|
248
|
+
[
|
|
249
|
+
"markers",
|
|
250
|
+
"yes",
|
|
251
|
+
"start / end + viewport lines"
|
|
252
|
+
],
|
|
253
|
+
[
|
|
254
|
+
"onEnter / onLeave / onEnterBack / onLeaveBack / onUpdate / onToggle",
|
|
255
|
+
"yes",
|
|
256
|
+
""
|
|
257
|
+
],
|
|
258
|
+
[
|
|
259
|
+
"actions per edge (play pause resume reverse restart reset complete none)",
|
|
260
|
+
"yes",
|
|
261
|
+
"default \"play none none reverse\""
|
|
262
|
+
],
|
|
263
|
+
[
|
|
264
|
+
"horizontal scenes, custom scroll containers",
|
|
265
|
+
"yes",
|
|
266
|
+
""
|
|
267
|
+
],
|
|
268
|
+
[
|
|
269
|
+
"snap, nested pins, pinned scroll containers",
|
|
270
|
+
"no",
|
|
271
|
+
"planned with the smooth module (10.4)"
|
|
272
|
+
],
|
|
273
|
+
[
|
|
274
|
+
"SSR",
|
|
275
|
+
"yes",
|
|
276
|
+
"safe to import; scenes need a window"
|
|
277
|
+
],
|
|
278
|
+
[
|
|
279
|
+
"Web Workers",
|
|
280
|
+
"no",
|
|
281
|
+
"needs the DOM"
|
|
282
|
+
]
|
|
283
|
+
],
|
|
284
|
+
"example": "import { use, timeline } from 'motionary/runtime';\nimport { scroll, scrollScene } from 'motionary/runtime/scroll';\nuse(scroll);\nconst tl = timeline({ paused: true }).to('.card', { to: { x: 200, rotate: 8 } });\nscrollScene({ trigger: '.section', start: 'top 80%', end: 'bottom 20%', scrub: 120, pin: true, markers: true, animation: tl });"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"kind": "runtime",
|
|
288
|
+
"id": "format-svg",
|
|
289
|
+
"label": "motionary/runtime/format-svg",
|
|
290
|
+
"title": "SVG loader: SMIL playback + path morphing",
|
|
291
|
+
"summary": "Replay SVG SMIL animations (animate, set, animateTransform, animateMotion) on the runtime timeline, morph between any two paths, and measure paths without the DOM.",
|
|
292
|
+
"install": "npm i motionary",
|
|
293
|
+
"importPath": "motionary/runtime/format-svg",
|
|
294
|
+
"import": "import { use } from 'motionary/runtime';\nimport { formatSvg } from 'motionary/runtime/format-svg';",
|
|
295
|
+
"register": "use(formatSvg);",
|
|
296
|
+
"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-svg.iife.js\"></script>",
|
|
297
|
+
"cdnEsm": "https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-svg.js",
|
|
298
|
+
"order": "Register the core first, then the module: use(formatSvg) also registers the core. CDN: load runtime.iife.js, then runtime/format-svg.iife.js (it registers itself).",
|
|
299
|
+
"docs": "docs/runtime/format-svg.md",
|
|
300
|
+
"budget": 5120,
|
|
301
|
+
"exports": [
|
|
302
|
+
"formatSvg",
|
|
303
|
+
"playSmil",
|
|
304
|
+
"readSmil",
|
|
305
|
+
"morphPath",
|
|
306
|
+
"parsePath",
|
|
307
|
+
"flattenPath",
|
|
308
|
+
"pathLength",
|
|
309
|
+
"pointAtLength",
|
|
310
|
+
"samplePath",
|
|
311
|
+
"smilTime"
|
|
312
|
+
],
|
|
313
|
+
"compat": [
|
|
314
|
+
[
|
|
315
|
+
"<animate> from / to / by / values, keyTimes, calcMode linear / discrete / spline + keySplines",
|
|
316
|
+
"yes",
|
|
317
|
+
""
|
|
318
|
+
],
|
|
319
|
+
[
|
|
320
|
+
"<set>",
|
|
321
|
+
"yes",
|
|
322
|
+
""
|
|
323
|
+
],
|
|
324
|
+
[
|
|
325
|
+
"<animateTransform> translate / scale / rotate / skewX / skewY",
|
|
326
|
+
"yes",
|
|
327
|
+
""
|
|
328
|
+
],
|
|
329
|
+
[
|
|
330
|
+
"<animateMotion> path / <mpath>, rotate auto / auto-reverse / angle",
|
|
331
|
+
"yes",
|
|
332
|
+
"paced along the path"
|
|
333
|
+
],
|
|
334
|
+
[
|
|
335
|
+
"dur, numeric begin offsets, repeatCount (incl. indefinite), repeatDur, fill freeze",
|
|
336
|
+
"yes",
|
|
337
|
+
""
|
|
338
|
+
],
|
|
339
|
+
[
|
|
340
|
+
"path morphing between any two paths (d attribute or morphPath())",
|
|
341
|
+
"yes",
|
|
342
|
+
"resampled to N points, start points aligned"
|
|
343
|
+
],
|
|
344
|
+
[
|
|
345
|
+
"path parsing incl. relative commands, S/T reflections, arcs",
|
|
346
|
+
"yes",
|
|
347
|
+
"no DOM needed (SSR / workers)"
|
|
348
|
+
],
|
|
349
|
+
[
|
|
350
|
+
"event / syncbase begin (click, a.end), accumulate, additive=\"sum\"",
|
|
351
|
+
"no",
|
|
352
|
+
"documented gap"
|
|
353
|
+
],
|
|
354
|
+
[
|
|
355
|
+
"CSS-animated SVG",
|
|
356
|
+
"yes",
|
|
357
|
+
"via motionary/runtime/format-css"
|
|
358
|
+
]
|
|
359
|
+
],
|
|
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' });"
|
|
206
495
|
}
|
|
207
496
|
],
|
|
208
497
|
"components": [
|
|
@@ -4173,6 +4462,47 @@
|
|
|
4173
4462
|
"prerequisites": null,
|
|
4174
4463
|
"source": "src/components/widgets/motion.ts"
|
|
4175
4464
|
},
|
|
4465
|
+
{
|
|
4466
|
+
"id": "motion-inspector",
|
|
4467
|
+
"tag": "usa-motion-inspector",
|
|
4468
|
+
"title": "Motion inspector",
|
|
4469
|
+
"description": "10.2: a live panel listing the running animations in a scope (CSS animations, transitions, element.animate(), components) with state and progress, plus the motionary/runtime ticker when present — pause / play all, 0.25× slow motion and per-row scrub.",
|
|
4470
|
+
"category": "ui",
|
|
4471
|
+
"since": "10.2",
|
|
4472
|
+
"keywords": [
|
|
4473
|
+
"devtools",
|
|
4474
|
+
"debug",
|
|
4475
|
+
"inspector",
|
|
4476
|
+
"animations",
|
|
4477
|
+
"slow motion"
|
|
4478
|
+
],
|
|
4479
|
+
"import": {
|
|
4480
|
+
"path": "motionary/components/widgets",
|
|
4481
|
+
"define": "defineMotionInspector",
|
|
4482
|
+
"register": "defineMotionInspector();"
|
|
4483
|
+
},
|
|
4484
|
+
"cdn": "https://unpkg.com/motionary@10/dist/widgets.umd.js",
|
|
4485
|
+
"attributes": [
|
|
4486
|
+
"scope",
|
|
4487
|
+
"interval"
|
|
4488
|
+
],
|
|
4489
|
+
"events": [
|
|
4490
|
+
"usa:change"
|
|
4491
|
+
],
|
|
4492
|
+
"slots": [],
|
|
4493
|
+
"methods": [
|
|
4494
|
+
"refresh",
|
|
4495
|
+
"pauseAll",
|
|
4496
|
+
"playAll",
|
|
4497
|
+
"setRate",
|
|
4498
|
+
"animations"
|
|
4499
|
+
],
|
|
4500
|
+
"example": "<usa-motion-inspector scope=\"#app\" interval=\"500\"></usa-motion-inspector>",
|
|
4501
|
+
"esm": "import { defineMotionInspector } from 'motionary/components/widgets';\n\ndefineMotionInspector(); // registers <usa-motion-inspector>\n\n/* then use it in your HTML:\n<usa-motion-inspector scope=\"#app\" interval=\"500\"></usa-motion-inspector>\n*/",
|
|
4502
|
+
"requires": [],
|
|
4503
|
+
"prerequisites": null,
|
|
4504
|
+
"source": "src/components/widgets/motion-inspector.ts"
|
|
4505
|
+
},
|
|
4176
4506
|
{
|
|
4177
4507
|
"id": "motion-prefs",
|
|
4178
4508
|
"tag": "usa-motion-prefs",
|
|
@@ -5633,6 +5963,45 @@
|
|
|
5633
5963
|
"prerequisites": null,
|
|
5634
5964
|
"source": "src/components/interaction/ripple.ts"
|
|
5635
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
|
+
},
|
|
5636
6005
|
{
|
|
5637
6006
|
"id": "scene",
|
|
5638
6007
|
"tag": "usa-scene",
|
|
@@ -5769,6 +6138,68 @@
|
|
|
5769
6138
|
"prerequisites": null,
|
|
5770
6139
|
"source": "src/components/reveal/scroll-progress.ts"
|
|
5771
6140
|
},
|
|
6141
|
+
{
|
|
6142
|
+
"id": "scroll-scene",
|
|
6143
|
+
"tag": "usa-scroll-scene",
|
|
6144
|
+
"title": "Scroll scene",
|
|
6145
|
+
"description": "10.2: a scroll-linked scene — children with data-scrub=\"opacity: 0 -> 1; x: -80 -> 0\" are tweened as you scroll, scrubbed directly or smoothed (scrub=\"120\"), with optional pin, markers and stagger. Requires motionary/runtime/scroll — npm i motionary, then use(scroll) before the scene mounts.",
|
|
6146
|
+
"category": "reveal",
|
|
6147
|
+
"since": "10.2",
|
|
6148
|
+
"keywords": [
|
|
6149
|
+
"scroll",
|
|
6150
|
+
"scrub",
|
|
6151
|
+
"pin",
|
|
6152
|
+
"parallax",
|
|
6153
|
+
"runtime"
|
|
6154
|
+
],
|
|
6155
|
+
"import": {
|
|
6156
|
+
"path": "motionary/components/widgets",
|
|
6157
|
+
"define": "defineScrollScene",
|
|
6158
|
+
"register": "defineScrollScene();"
|
|
6159
|
+
},
|
|
6160
|
+
"cdn": "https://unpkg.com/motionary@10/dist/widgets.umd.js",
|
|
6161
|
+
"attributes": [
|
|
6162
|
+
"start",
|
|
6163
|
+
"end",
|
|
6164
|
+
"scrub",
|
|
6165
|
+
"pin",
|
|
6166
|
+
"markers",
|
|
6167
|
+
"stagger",
|
|
6168
|
+
"toggle-class",
|
|
6169
|
+
"preview"
|
|
6170
|
+
],
|
|
6171
|
+
"events": [
|
|
6172
|
+
"usa:enter",
|
|
6173
|
+
"usa:leave",
|
|
6174
|
+
"usa:progress",
|
|
6175
|
+
"usa:runtime-missing"
|
|
6176
|
+
],
|
|
6177
|
+
"slots": [],
|
|
6178
|
+
"methods": [
|
|
6179
|
+
"refresh",
|
|
6180
|
+
"timeline"
|
|
6181
|
+
],
|
|
6182
|
+
"example": "<usa-scroll-scene start=\"top 80%\" end=\"bottom 20%\" scrub=\"120\" stagger=\"120\">\n <h2 data-scrub=\"x: -80 -> 0; opacity: 0 -> 1\">Scroll</h2>\n <p data-scrub=\"y: 40 -> 0; opacity: 0 -> 1\">and it follows.</p>\n</usa-scroll-scene>",
|
|
6183
|
+
"esm": "import { use } from 'motionary/runtime';\nimport { scroll } from 'motionary/runtime/scroll';\n\nuse(scroll);\nimport { defineScrollScene } from 'motionary/components/widgets';\n\ndefineScrollScene(); // registers <usa-scroll-scene>\n\n/* then use it in your HTML:\n<usa-scroll-scene start=\"top 80%\" end=\"bottom 20%\" scrub=\"120\" stagger=\"120\">\n <h2 data-scrub=\"x: -80 -> 0; opacity: 0 -> 1\">Scroll</h2>\n <p data-scrub=\"y: 40 -> 0; opacity: 0 -> 1\">and it follows.</p>\n</usa-scroll-scene>\n*/",
|
|
6184
|
+
"requires": [
|
|
6185
|
+
"scroll"
|
|
6186
|
+
],
|
|
6187
|
+
"prerequisites": {
|
|
6188
|
+
"badge": "Requires: motionary/runtime/scroll",
|
|
6189
|
+
"modules": [
|
|
6190
|
+
"motionary/runtime/scroll"
|
|
6191
|
+
],
|
|
6192
|
+
"install": "npm i motionary",
|
|
6193
|
+
"importAndRegister": "import { use } from 'motionary/runtime';\nimport { scroll } from 'motionary/runtime/scroll';\nimport { defineScrollScene } from 'motionary/components/widgets';\n\nuse(scroll);\ndefineScrollScene(); // registers <usa-scroll-scene> — after the prerequisites",
|
|
6194
|
+
"order": "Register the core first, then the module: use(scroll) also registers the core. CDN: load runtime.iife.js, then runtime/scroll.iife.js (it registers itself).",
|
|
6195
|
+
"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/scroll.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>",
|
|
6196
|
+
"example": "<usa-scroll-scene start=\"top 80%\" end=\"bottom 20%\" scrub=\"120\" stagger=\"120\">\n <h2 data-scrub=\"x: -80 -> 0; opacity: 0 -> 1\">Scroll</h2>\n <p data-scrub=\"y: 40 -> 0; opacity: 0 -> 1\">and it follows.</p>\n</usa-scroll-scene>",
|
|
6197
|
+
"docs": [
|
|
6198
|
+
"https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/scroll.md"
|
|
6199
|
+
]
|
|
6200
|
+
},
|
|
6201
|
+
"source": "src/components/widgets/scroll-scene.ts"
|
|
6202
|
+
},
|
|
5772
6203
|
{
|
|
5773
6204
|
"id": "scrolly",
|
|
5774
6205
|
"tag": "usa-scrolly",
|
|
@@ -6919,6 +7350,66 @@
|
|
|
6919
7350
|
"prerequisites": null,
|
|
6920
7351
|
"source": "src/components/text/text-rotate.ts"
|
|
6921
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
|
+
},
|
|
6922
7413
|
{
|
|
6923
7414
|
"id": "theme-surface",
|
|
6924
7415
|
"tag": "usa-theme-surface",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var registry = require('../chunks/registry-
|
|
4
|
-
var keyframes = require('../chunks/keyframes-
|
|
5
|
-
require('../chunks/tween-
|
|
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');
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* `motionary/runtime/format-css` (10.1) — import CSS `@keyframes` and Web
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-css.cjs","sources":["../../src/runtime/format-css.ts"],"sourcesContent":["/**\n * `motionary/runtime/format-css` (10.1) — import CSS `@keyframes` and Web\n * Animations API keyframes into the runtime timeline.\n *\n * - `parseKeyframes(cssText)` — every `@keyframes` block of a stylesheet\n * (incl. `-webkit-`), percentages / `from` / `to` / lists (`0%, 100%`),\n * per-frame `animation-timing-function`, `!important` ignored as in CSS.\n * - `fromCssRule(rule)` — a live `CSSKeyframesRule`.\n * - `fromWaapi(keyframes)` — array form (`[{ opacity: 0 }, { opacity: 1, offset: .8 }]`)\n * and property-indexed form (`{ opacity: [0, 1], easing: 'ease-out' }`), with\n * offsets distributed like the WAAPI.\n * - `playKeyframes(target, frames, { duration, … })` — a runtime `Timeline`.\n *\n * Unsupported (documented in docs/runtime/format-css.md): `composite: add / accumulate`,\n * `@property` typed interpolation, 3D / matrix transforms (switch discretely).\n */\nimport { RUNTIME_VERSION, type RuntimeModule } from './registry';\nimport { camelProp, distributeOffsets, framesToTimeline, type Frame, type KeyframesPlayOptions } from './keyframes';\nimport type { Target } from './tween';\n\nexport type { Frame, KeyframesPlayOptions } from './keyframes';\n\nexport interface KeyframesDef {\n name: string;\n frames: Frame[];\n}\n\n/** Strip comments. */\nconst clean = (css: string) => css.replace(/\\/\\*[\\s\\S]*?\\*\\//g, '');\n\nfunction block(css: string, open: number): [string, number] {\n let depth = 0;\n for (let i = open; i < css.length; i++) {\n if (css[i] === '{') depth++;\n else if (css[i] === '}' && --depth === 0) return [css.slice(open + 1, i), i + 1];\n }\n throw new Error('[motionary] format-css: unbalanced braces in @keyframes');\n}\n\nfunction decls(body: string): { props: Record<string, string>; easing?: string } {\n const props: Record<string, string> = {};\n let easing: string | undefined;\n // split on ';' outside parentheses\n let depth = 0, cur = '';\n const parts: string[] = [];\n for (const ch of body) {\n if (ch === '(') depth++;\n if (ch === ')') depth--;\n if (ch === ';' && !depth) { parts.push(cur); cur = ''; } else cur += ch;\n }\n parts.push(cur);\n for (const p of parts) {\n const i = p.indexOf(':');\n if (i < 0) continue;\n const k = p.slice(0, i).trim();\n const v = p.slice(i + 1).replace(/!important/i, '').trim();\n if (!k || !v) continue;\n if (k === 'animation-timing-function' || k === '-webkit-animation-timing-function') easing = v;\n else props[camelProp(k)] = v;\n }\n return { props, easing };\n}\n\nconst offsetOf = (sel: string): number => {\n const s = sel.trim().toLowerCase();\n if (s === 'from') return 0;\n if (s === 'to') return 1;\n const n = parseFloat(s);\n if (!s.endsWith('%') || !Number.isFinite(n)) throw new Error(`[motionary] format-css: bad keyframe selector \"${sel}\"`);\n return n / 100;\n};\n\n/** Parse the body of one `@keyframes` block. */\nexport function parseKeyframesBody(body: string): Frame[] {\n const frames: Frame[] = [];\n let i = 0;\n while (i < body.length) {\n const open = body.indexOf('{', i);\n if (open < 0) break;\n const sel = body.slice(i, open);\n const [inner, end] = block(body, open);\n const d = decls(inner);\n for (const part of sel.split(',')) if (part.trim()) frames.push({ offset: offsetOf(part), props: { ...d.props }, ...(d.easing ? { easing: d.easing } : {}) });\n i = end;\n }\n // merge duplicate offsets (later declarations win, as in CSS)\n const by = new Map<number, Frame>();\n for (const f of frames.sort((a, b) => a.offset - b.offset)) {\n const prev = by.get(f.offset);\n by.set(f.offset, prev ? { offset: f.offset, props: { ...prev.props, ...f.props }, easing: f.easing ?? prev.easing } : f);\n }\n return Array.from(by.values());\n}\n\n/** Every `@keyframes` block in a stylesheet's text. */\nexport function parseKeyframes(cssText: string): KeyframesDef[] {\n const css = clean(cssText);\n const out: KeyframesDef[] = [];\n const re = /@(?:-webkit-|-moz-)?keyframes\\s+([\"']?)([\\w-]+)\\1\\s*\\{/g;\n let m: RegExpExecArray | null;\n while ((m = re.exec(css))) {\n const [body, end] = block(css, m.index + m[0].length - 1);\n out.push({ name: m[2], frames: parseKeyframesBody(body) });\n re.lastIndex = end;\n }\n return out;\n}\n\n/** A live `CSSKeyframesRule` (e.g. from `document.styleSheets`). */\nexport function fromCssRule(rule: { name: string; cssText: string }): KeyframesDef {\n const css = rule.cssText;\n const open = css.indexOf('{');\n return { name: rule.name, frames: parseKeyframesBody(block(css, open)[0]) };\n}\n\ntype WaapiFrame = Record<string, unknown> & { offset?: number | null; easing?: string };\n\n/** WAAPI keyframes (array or property-indexed form) → frames. */\nexport function fromWaapi(kf: WaapiFrame[] | Record<string, unknown>): Frame[] {\n let list: WaapiFrame[];\n if (Array.isArray(kf)) list = kf;\n else {\n const n = Math.max(...Object.entries(kf).filter(([k]) => k !== 'easing' && k !== 'offset' && k !== 'composite').map(([, v]) => (Array.isArray(v) ? v.length : 1)));\n list = Array.from({ length: n }, (_, i) => {\n const f: WaapiFrame = {};\n for (const [k, v] of Object.entries(kf)) {\n if (k === 'composite') continue;\n const arr = Array.isArray(v) ? v : [v];\n if (k === 'offset') { if (arr[i] !== undefined) f.offset = arr[i] as number; continue; }\n if (k === 'easing') { const e = arr[Math.min(i, arr.length - 1)]; if (e !== undefined) f.easing = e as string; continue; }\n if (arr.length === 1 && n > 1) { if (i === n - 1) f[k] = arr[0]; continue; }\n if (arr[i] !== undefined) f[k] = arr[i];\n }\n return f;\n });\n }\n return distributeOffsets(list).map((f) => {\n const props: Record<string, string | number> = {};\n for (const [k, v] of Object.entries(f)) if (k !== 'offset' && k !== 'easing' && k !== 'composite' && (typeof v === 'string' || typeof v === 'number')) props[camelProp(k === 'cssFloat' ? 'float' : k)] = v;\n return { offset: f.offset, props, ...(f.easing ? { easing: f.easing } : {}) };\n });\n}\n\n/** Frames in WAAPI array form (for `element.animate()`). */\nexport function toWaapi(frames: Frame[]): Keyframe[] {\n return frames.map((f) => ({ ...f.props, offset: f.offset, ...(f.easing ? { easing: f.easing } : {}) })) as Keyframe[];\n}\n\n/** Play frames (or a `KeyframesDef`) on a target. Returns the runtime timeline (playing unless `paused: true`). */\nexport function playKeyframes(target: Target, frames: Frame[] | KeyframesDef, o: KeyframesPlayOptions = {}) {\n return framesToTimeline(target, Array.isArray(frames) ? frames : frames.frames, { ...o, paused: o.paused ?? false });\n}\n\nexport interface FormatCssApi {\n parseKeyframes: typeof parseKeyframes;\n fromCssRule: typeof fromCssRule;\n fromWaapi: typeof fromWaapi;\n toWaapi: typeof toWaapi;\n playKeyframes: typeof playKeyframes;\n}\n\n/** The module object for `use(formatCss)`. */\nexport const formatCss: RuntimeModule<FormatCssApi> = { id: 'format-css', version: RUNTIME_VERSION, requires: ['core'], api: { parseKeyframes, fromCssRule, fromWaapi, toWaapi, playKeyframes } };\n"],"names":["camelProp","distributeOffsets","framesToTimeline","RUNTIME_VERSION"],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAYH;AACA,MAAM,KAAK,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC;AAEnE,SAAS,KAAK,CAAC,GAAW,EAAE,IAAY,EAAA;IACtC,IAAI,KAAK,GAAG,CAAC;AACb,IAAA,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACtC,QAAA,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG;AAAE,YAAA,KAAK,EAAE;aACtB,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,EAAE,KAAK,KAAK,CAAC;AAAE,YAAA,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAClF;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`@keyframes` and Web\n * Animations API keyframes into the runtime timeline.\n *\n * - `parseKeyframes(cssText)` — every `@keyframes` block of a stylesheet\n * (incl. `-webkit-`), percentages / `from` / `to` / lists (`0%, 100%`),\n * per-frame `animation-timing-function`, `!important` ignored as in CSS.\n * - `fromCssRule(rule)` — a live `CSSKeyframesRule`.\n * - `fromWaapi(keyframes)` — array form (`[{ opacity: 0 }, { opacity: 1, offset: .8 }]`)\n * and property-indexed form (`{ opacity: [0, 1], easing: 'ease-out' }`), with\n * offsets distributed like the WAAPI.\n * - `playKeyframes(target, frames, { duration, … })` — a runtime `Timeline`.\n *\n * Unsupported (documented in docs/runtime/format-css.md): `composite: add / accumulate`,\n * `@property` typed interpolation, 3D / matrix transforms (switch discretely).\n */\nimport { RUNTIME_VERSION, type RuntimeModule } from './registry';\nimport { camelProp, distributeOffsets, framesToTimeline, type Frame, type KeyframesPlayOptions } from './keyframes';\nimport type { Target } from './tween';\n\nexport type { Frame, KeyframesPlayOptions } from './keyframes';\n\nexport interface KeyframesDef {\n name: string;\n frames: Frame[];\n}\n\n/** Strip comments. */\nconst clean = (css: string) => css.replace(/\\/\\*[\\s\\S]*?\\*\\//g, '');\n\nfunction block(css: string, open: number): [string, number] {\n let depth = 0;\n for (let i = open; i < css.length; i++) {\n if (css[i] === '{') depth++;\n else if (css[i] === '}' && --depth === 0) return [css.slice(open + 1, i), i + 1];\n }\n throw new Error('[motionary] format-css: unbalanced braces in @keyframes');\n}\n\nfunction decls(body: string): { props: Record<string, string>; easing?: string } {\n const props: Record<string, string> = {};\n let easing: string | undefined;\n // split on ';' outside parentheses\n let depth = 0, cur = '';\n const parts: string[] = [];\n for (const ch of body) {\n if (ch === '(') depth++;\n if (ch === ')') depth--;\n if (ch === ';' && !depth) { parts.push(cur); cur = ''; } else cur += ch;\n }\n parts.push(cur);\n for (const p of parts) {\n const i = p.indexOf(':');\n if (i < 0) continue;\n const k = p.slice(0, i).trim();\n const v = p.slice(i + 1).replace(/!important/i, '').trim();\n if (!k || !v) continue;\n if (k === 'animation-timing-function' || k === '-webkit-animation-timing-function') easing = v;\n else props[camelProp(k)] = v;\n }\n return { props, easing };\n}\n\nconst offsetOf = (sel: string): number => {\n const s = sel.trim().toLowerCase();\n if (s === 'from') return 0;\n if (s === 'to') return 1;\n const n = parseFloat(s);\n if (!s.endsWith('%') || !Number.isFinite(n)) throw new Error(`[motionary] format-css: bad keyframe selector \"${sel}\"`);\n return n / 100;\n};\n\n/** Parse the body of one `@keyframes` block. */\nexport function parseKeyframesBody(body: string): Frame[] {\n const frames: Frame[] = [];\n let i = 0;\n while (i < body.length) {\n const open = body.indexOf('{', i);\n if (open < 0) break;\n const sel = body.slice(i, open);\n const [inner, end] = block(body, open);\n const d = decls(inner);\n for (const part of sel.split(',')) if (part.trim()) frames.push({ offset: offsetOf(part), props: { ...d.props }, ...(d.easing ? { easing: d.easing } : {}) });\n i = end;\n }\n // merge duplicate offsets (later declarations win, as in CSS)\n const by = new Map<number, Frame>();\n for (const f of frames.sort((a, b) => a.offset - b.offset)) {\n const prev = by.get(f.offset);\n by.set(f.offset, prev ? { offset: f.offset, props: { ...prev.props, ...f.props }, easing: f.easing ?? prev.easing } : f);\n }\n return Array.from(by.values());\n}\n\n/** Every `@keyframes` block in a stylesheet's text. */\nexport function parseKeyframes(cssText: string): KeyframesDef[] {\n const css = clean(cssText);\n const out: KeyframesDef[] = [];\n const re = /@(?:-webkit-|-moz-)?keyframes\\s+([\"']?)([\\w-]+)\\1\\s*\\{/g;\n let m: RegExpExecArray | null;\n while ((m = re.exec(css))) {\n const [body, end] = block(css, m.index + m[0].length - 1);\n out.push({ name: m[2], frames: parseKeyframesBody(body) });\n re.lastIndex = end;\n }\n return out;\n}\n\n/** A live `CSSKeyframesRule` (e.g. from `document.styleSheets`). */\nexport function fromCssRule(rule: { name: string; cssText: string }): KeyframesDef {\n const css = rule.cssText;\n const open = css.indexOf('{');\n return { name: rule.name, frames: parseKeyframesBody(block(css, open)[0]) };\n}\n\ntype WaapiFrame = Record<string, unknown> & { offset?: number | null; easing?: string };\n\n/** WAAPI keyframes (array or property-indexed form) → frames. */\nexport function fromWaapi(kf: WaapiFrame[] | Record<string, unknown>): Frame[] {\n let list: WaapiFrame[];\n if (Array.isArray(kf)) list = kf;\n else {\n const n = Math.max(...Object.entries(kf).filter(([k]) => k !== 'easing' && k !== 'offset' && k !== 'composite').map(([, v]) => (Array.isArray(v) ? v.length : 1)));\n list = Array.from({ length: n }, (_, i) => {\n const f: WaapiFrame = {};\n for (const [k, v] of Object.entries(kf)) {\n if (k === 'composite') continue;\n const arr = Array.isArray(v) ? v : [v];\n if (k === 'offset') { if (arr[i] !== undefined) f.offset = arr[i] as number; continue; }\n if (k === 'easing') { const e = arr[Math.min(i, arr.length - 1)]; if (e !== undefined) f.easing = e as string; continue; }\n if (arr.length === 1 && n > 1) { if (i === n - 1) f[k] = arr[0]; continue; }\n if (arr[i] !== undefined) f[k] = arr[i];\n }\n return f;\n });\n }\n return distributeOffsets(list).map((f) => {\n const props: Record<string, string | number> = {};\n for (const [k, v] of Object.entries(f)) if (k !== 'offset' && k !== 'easing' && k !== 'composite' && (typeof v === 'string' || typeof v === 'number')) props[camelProp(k === 'cssFloat' ? 'float' : k)] = v;\n return { offset: f.offset, props, ...(f.easing ? { easing: f.easing } : {}) };\n });\n}\n\n/** Frames in WAAPI array form (for `element.animate()`). */\nexport function toWaapi(frames: Frame[]): Keyframe[] {\n return frames.map((f) => ({ ...f.props, offset: f.offset, ...(f.easing ? { easing: f.easing } : {}) })) as Keyframe[];\n}\n\n/** Play frames (or a `KeyframesDef`) on a target. Returns the runtime timeline (playing unless `paused: true`). */\nexport function playKeyframes(target: Target, frames: Frame[] | KeyframesDef, o: KeyframesPlayOptions = {}) {\n return framesToTimeline(target, Array.isArray(frames) ? frames : frames.frames, { ...o, paused: o.paused ?? false });\n}\n\nexport interface FormatCssApi {\n parseKeyframes: typeof parseKeyframes;\n fromCssRule: typeof fromCssRule;\n fromWaapi: typeof fromWaapi;\n toWaapi: typeof toWaapi;\n playKeyframes: typeof playKeyframes;\n}\n\n/** The module object for `use(formatCss)`. */\nexport const formatCss: RuntimeModule<FormatCssApi> = { id: 'format-css', version: RUNTIME_VERSION, requires: ['core'], api: { parseKeyframes, fromCssRule, fromWaapi, toWaapi, playKeyframes } };\n"],"names":["camelProp","distributeOffsets","framesToTimeline","RUNTIME_VERSION"],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAYH;AACA,MAAM,KAAK,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC;AAEnE,SAAS,KAAK,CAAC,GAAW,EAAE,IAAY,EAAA;IACtC,IAAI,KAAK,GAAG,CAAC;AACb,IAAA,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACtC,QAAA,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG;AAAE,YAAA,KAAK,EAAE;aACtB,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,EAAE,KAAK,KAAK,CAAC;AAAE,YAAA,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAClF;AACA,IAAA,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC;AAC5E;AAEA,SAAS,KAAK,CAAC,IAAY,EAAA;IACzB,MAAM,KAAK,GAA2B,EAAE;AACxC,IAAA,IAAI,MAA0B;;AAE9B,IAAA,IAAI,KAAK,GAAG,CAAC,EAAE,GAAG,GAAG,EAAE;IACvB,MAAM,KAAK,GAAa,EAAE;AAC1B,IAAA,KAAK,MAAM,EAAE,IAAI,IAAI,EAAE;QACrB,IAAI,EAAE,KAAK,GAAG;AAAE,YAAA,KAAK,EAAE;QACvB,IAAI,EAAE,KAAK,GAAG;AAAE,YAAA,KA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;IACrC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,MAAM,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAe;AACvH;AAEA;AACM,SAAU,aAAa,CAAC,MAAc,EAAE,MAA8B,EAAE,IAA0B,EAAE,EAAA;AACxG,IAAA,OAAOE,0BAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC;AACtH;AAUA;AACO,MAAM,SAAS,GAAgC,EAAE,EAAE,EAAE,YAAY,EAAE,OAAO,EAAEC,wBAAe,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE;;;;;;;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { R as RUNTIME_VERSION } from '../chunks/registry-
|
|
2
|
-
import { f as framesToTimeline, d as distributeOffsets, c as camelProp } from '../chunks/keyframes-
|
|
3
|
-
import '../chunks/tween-
|
|
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';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* `motionary/runtime/format-css` (10.1) — import CSS `@keyframes` and Web
|