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/llms-full.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Motionary 10.
|
|
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
|
|
|
@@ -67,6 +67,97 @@ use(formatMotion);
|
|
|
67
67
|
playMotion(document.querySelector('.card'), { initial: { opacity: 0, y: 40 }, animate: { opacity: 1, y: 0 }, transition: { type: 'spring', stiffness: 180, damping: 14 } });
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
+
### motionary/runtime/scroll — Scroll scenes
|
|
71
|
+
|
|
72
|
+
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.
|
|
73
|
+
|
|
74
|
+
- Install: `npm i motionary`
|
|
75
|
+
- Import: `motionary/runtime/scroll`
|
|
76
|
+
- Register: `use(scroll);` — 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).
|
|
77
|
+
- CDN:
|
|
78
|
+
|
|
79
|
+
```html
|
|
80
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
81
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/scroll.iife.js"></script>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
```js
|
|
85
|
+
import { use, timeline } from 'motionary/runtime';
|
|
86
|
+
import { scroll, scrollScene } from 'motionary/runtime/scroll';
|
|
87
|
+
use(scroll);
|
|
88
|
+
const tl = timeline({ paused: true }).to('.card', { to: { x: 200, rotate: 8 } });
|
|
89
|
+
scrollScene({ trigger: '.section', start: 'top 80%', end: 'bottom 20%', scrub: 120, pin: true, markers: true, animation: tl });
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### motionary/runtime/format-svg — SVG loader: SMIL playback + path morphing
|
|
93
|
+
|
|
94
|
+
Replay SVG SMIL animations (animate, set, animateTransform, animateMotion) on the runtime timeline, morph between any two paths, and measure paths without the DOM.
|
|
95
|
+
|
|
96
|
+
- Install: `npm i motionary`
|
|
97
|
+
- Import: `motionary/runtime/format-svg`
|
|
98
|
+
- Register: `use(formatSvg);` — 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).
|
|
99
|
+
- CDN:
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
103
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-svg.iife.js"></script>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
import { use } from 'motionary/runtime';
|
|
108
|
+
import { formatSvg, playSmil, morphPath } from 'motionary/runtime/format-svg';
|
|
109
|
+
use(formatSvg);
|
|
110
|
+
const player = playSmil(document.querySelector('svg'));
|
|
111
|
+
player.timeline.timeScale = 0.5; // scrub / slow down / reverse like any runtime timeline
|
|
112
|
+
const f = morphPath('M0 0 L100 0 L50 80 Z', 'M50 0 A40 40 0 1 1 49.9 0 Z');
|
|
113
|
+
path.setAttribute('d', f(0.5));
|
|
114
|
+
```
|
|
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
|
+
|
|
70
161
|
## Components
|
|
71
162
|
|
|
72
163
|
### <usa-accordion> — Accordion
|
|
@@ -1570,6 +1661,20 @@ Morph an SVG path through a list of shapes (paths="A | B | C") on click, hover,
|
|
|
1570
1661
|
<section data-motion="enter: fade-up 500ms; click: confetti count=40">…</section>
|
|
1571
1662
|
```
|
|
1572
1663
|
|
|
1664
|
+
### <usa-motion-inspector> — Motion inspector
|
|
1665
|
+
|
|
1666
|
+
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.
|
|
1667
|
+
|
|
1668
|
+
- Import: `import { defineMotionInspector } from 'motionary/components/widgets'; defineMotionInspector();`
|
|
1669
|
+
- CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
|
|
1670
|
+
- Attributes: `scope`, `interval`
|
|
1671
|
+
- Events: `usa:change`
|
|
1672
|
+
- Methods: `refresh()`, `pauseAll()`, `playAll()`, `setRate()`, `animations()`
|
|
1673
|
+
|
|
1674
|
+
```html
|
|
1675
|
+
<usa-motion-inspector scope="#app" interval="500"></usa-motion-inspector>
|
|
1676
|
+
```
|
|
1677
|
+
|
|
1573
1678
|
### <usa-motion-prefs> — Motion preference panel
|
|
1574
1679
|
|
|
1575
1680
|
9.5: a motion settings panel for your users — motion level (full, gentle, minimal, none), animation speed, pause autoplaying video, no parallax — applied instantly to every Motionary animation and remembered.
|
|
@@ -2173,6 +2278,23 @@ Ink ripple from the pointer — or from the centre for Space/Enter — on any bu
|
|
|
2173
2278
|
<usa-ripple><button>Click me</button></usa-ripple>
|
|
2174
2279
|
```
|
|
2175
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
|
+
|
|
2176
2298
|
### <usa-scene> — Cinematic scene
|
|
2177
2299
|
|
|
2178
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.
|
|
@@ -2234,6 +2356,43 @@ Reading progress of the page or of one article. Compositor-only scaleX, role="pr
|
|
|
2234
2356
|
<usa-scroll-progress target="#post" position="bottom"></usa-scroll-progress>
|
|
2235
2357
|
```
|
|
2236
2358
|
|
|
2359
|
+
### <usa-scroll-scene> — Scroll scene
|
|
2360
|
+
|
|
2361
|
+
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.
|
|
2362
|
+
|
|
2363
|
+
- Import: `import { defineScrollScene } from 'motionary/components/widgets'; defineScrollScene();`
|
|
2364
|
+
- CDN: https://unpkg.com/motionary@10/dist/widgets.umd.js
|
|
2365
|
+
- Attributes: `start`, `end`, `scrub`, `pin`, `markers`, `stagger`, `toggle-class`, `preview`
|
|
2366
|
+
- Events: `usa:enter`, `usa:leave`, `usa:progress`, `usa:runtime-missing`
|
|
2367
|
+
- Methods: `refresh()`, `timeline()`
|
|
2368
|
+
- Requires: motionary/runtime/scroll
|
|
2369
|
+
- Install: `npm i motionary`
|
|
2370
|
+
- 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).
|
|
2371
|
+
|
|
2372
|
+
```js
|
|
2373
|
+
import { use } from 'motionary/runtime';
|
|
2374
|
+
import { scroll } from 'motionary/runtime/scroll';
|
|
2375
|
+
import { defineScrollScene } from 'motionary/components/widgets';
|
|
2376
|
+
|
|
2377
|
+
use(scroll);
|
|
2378
|
+
defineScrollScene(); // registers <usa-scroll-scene> — after the prerequisites
|
|
2379
|
+
```
|
|
2380
|
+
|
|
2381
|
+
```html
|
|
2382
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
2383
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/scroll.iife.js"></script>
|
|
2384
|
+
<!-- then the component bundles -->
|
|
2385
|
+
<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
|
|
2386
|
+
<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
|
|
2387
|
+
```
|
|
2388
|
+
|
|
2389
|
+
```html
|
|
2390
|
+
<usa-scroll-scene start="top 80%" end="bottom 20%" scrub="120" stagger="120">
|
|
2391
|
+
<h2 data-scrub="x: -80 -> 0; opacity: 0 -> 1">Scroll</h2>
|
|
2392
|
+
<p data-scrub="y: 40 -> 0; opacity: 0 -> 1">and it follows.</p>
|
|
2393
|
+
</usa-scroll-scene>
|
|
2394
|
+
```
|
|
2395
|
+
|
|
2237
2396
|
### <usa-scrolly> — Sticky scrollytelling
|
|
2238
2397
|
|
|
2239
2398
|
A pinned graphic while [data-step] blocks scroll past; the active step drives the graphic via attributes, a CSS variable and events.
|
|
@@ -2747,6 +2906,40 @@ Cycles words in place — the box keeps the width of the longest word, so nothin
|
|
|
2747
2906
|
Build <usa-text-rotate words="fast|tiny|typed"></usa-text-rotate> apps
|
|
2748
2907
|
```
|
|
2749
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
|
+
|
|
2750
2943
|
### <usa-theme-surface> — Theme surface
|
|
2751
2944
|
|
|
2752
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.
|
|
1
|
+
# Motionary 10.3.0
|
|
2
2
|
|
|
3
|
-
> Motionary is a zero-dependency motion library: scroll animations, 200+ presets and
|
|
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
|
|
|
@@ -11,6 +11,10 @@ Rules for using a component: (1) import its define function from `import.path` a
|
|
|
11
11
|
- [motionary/runtime](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/core.md): Shared ticker (one rAF loop), tween + timeline engine with easing, module registry with clear errors.
|
|
12
12
|
- [motionary/runtime/format-css](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-css.md): Import CSS @keyframes text or live CSSKeyframesRule objects and Web Animations API keyframes (array or property-indexed) into a runtime timeline.
|
|
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
|
+
- [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
|
+
- [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).
|
|
14
18
|
|
|
15
19
|
## Components
|
|
16
20
|
|
|
@@ -111,6 +115,7 @@ Rules for using a component: (1) import its define function from `import.path` a
|
|
|
111
115
|
- `<usa-modal>` (motionary/components/widgets): 6.3: native <dialog> (top layer, focus trap, Esc) with animated open / close and a blurred backdrop — scale, slide-up, flip, or origin: it grows out of the butt
|
|
112
116
|
- `<usa-morph>` (motionary/components/svg): Morph an SVG path through a list of shapes (paths="A | B | C") on click, hover, in view or automatically. Same-structure paths morph point by point.
|
|
113
117
|
- `<usa-motion>` (motionary/components/widgets): 9.0: the declarative motion DSL — describe motion as one readable string (“enter: fade-up 600ms stagger 80ms; hover: pop”) on <usa-motion> or any element’s data
|
|
118
|
+
- `<usa-motion-inspector>` (motionary/components/widgets): 10.2: a live panel listing the running animations in a scope (CSS animations, transitions, element.animate(), components) with state and progress, plus the moti
|
|
114
119
|
- `<usa-motion-prefs>` (motionary/components/widgets): 9.5: a motion settings panel for your users — motion level (full, gentle, minimal, none), animation speed, pause autoplaying video, no parallax — applied instan
|
|
115
120
|
- `<usa-motion-spec>` (motionary/components/widgets): 9.7: a motion spec sheet for design hand-off — each rule of a motion string with its trigger, a duration bar on a shared timeline and the easing curve, a Play p
|
|
116
121
|
- `<usa-motion-switch>` (motionary/components/page): Let users pick Off · Low · Normal · High for the whole app; scales every component, persists, and Off equals reduced motion.
|
|
@@ -151,10 +156,12 @@ Rules for using a component: (1) import its define function from `import.path` a
|
|
|
151
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)
|
|
152
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.
|
|
153
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
|
|
154
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
|
|
155
161
|
- `<usa-scramble>` (motionary/components/text): Decodes text out of random glyphs, left to right. Trigger on view, hover/focus or manually.
|
|
156
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.
|
|
157
163
|
- `<usa-scroll-progress>` (motionary/components/reveal): Reading progress of the page or of one article. Compositor-only scaleX, role="progressbar".
|
|
164
|
+
- `<usa-scroll-scene>` (motionary/components/widgets; requires motionary/runtime/scroll): 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"), wi
|
|
158
165
|
- `<usa-scrolly>` (motionary/components/reveal): A pinned graphic while [data-step] blocks scroll past; the active step drives the graphic via attributes, a CSS variable and events.
|
|
159
166
|
- `<usa-segmented>` (motionary/components/widgets): 6.7: an iOS-style thumb slides under the chosen segment with a spring and stretches while it travels. A real radio group: arrow keys, Home / End. iOS, pill or o
|
|
160
167
|
- `<usa-shader>` (motionary/components/webgl): A GPU shader behind your content: gradient, plasma, waves or aurora presets — or your own fragment shader in a <script type="x-shader/x-fragment">. Falls back t
|
|
@@ -187,6 +194,7 @@ Rules for using a component: (1) import its define function from `import.path` a
|
|
|
187
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.
|
|
188
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
|
|
189
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,
|
|
190
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 —
|
|
191
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
|
|
192
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.
|