motionary 10.1.0 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +61 -0
- package/CHANGELOG.md +14 -0
- package/README.md +37 -0
- package/dist/chunks/{keyframes-CyH_abhI.js → keyframes-W-474DMc.js} +2 -2
- package/dist/chunks/{keyframes-CyH_abhI.js.map → keyframes-W-474DMc.js.map} +1 -1
- package/dist/chunks/{keyframes-cUdsXSXQ.cjs → keyframes-ZheOkpt0.cjs} +2 -2
- package/dist/chunks/{keyframes-cUdsXSXQ.cjs.map → keyframes-ZheOkpt0.cjs.map} +1 -1
- package/dist/chunks/{registry-jF8VIA_9.js → registry-BIEjKngP.js} +2 -2
- package/dist/chunks/{registry-jF8VIA_9.js.map → registry-BIEjKngP.js.map} +1 -1
- package/dist/chunks/{registry-C0xLNq3-.cjs → registry-eJgpFAzI.cjs} +2 -2
- package/dist/chunks/{registry-C0xLNq3-.cjs.map → registry-eJgpFAzI.cjs.map} +1 -1
- package/dist/chunks/ticker-CM_56oVy.js +70 -0
- package/dist/chunks/ticker-CM_56oVy.js.map +1 -0
- package/dist/chunks/ticker-D4o6enH0.cjs +72 -0
- package/dist/chunks/ticker-D4o6enH0.cjs.map +1 -0
- package/dist/chunks/{tween-JEthWrjo.cjs → tween-CBuWYpI-.cjs} +5 -72
- package/dist/chunks/tween-CBuWYpI-.cjs.map +1 -0
- package/dist/chunks/{tween-DDObu9iA.js → tween-CqX1JBuj.js} +5 -71
- package/dist/chunks/tween-CqX1JBuj.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 +401 -198
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +146 -2
- package/dist/components/widgets.d.ts +146 -2
- package/dist/components/widgets.js +399 -199
- package/dist/components/widgets.js.map +1 -1
- package/dist/llms-full.txt +98 -1
- package/dist/llms.txt +6 -2
- package/dist/manifest.json +259 -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-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.cjs +5 -4
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.d.cts +1 -1
- package/dist/runtime.d.ts +1 -1
- 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 +1 -1
- package/docs/ai-prompt-guide.md +54 -0
- package/docs/components/README.md +253 -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-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-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 +50 -0
- package/docs/runtime/format-svg.md +62 -0
- package/docs/runtime/scroll.md +61 -0
- package/package.json +25 -3
- package/dist/chunks/tween-DDObu9iA.js.map +0 -1
- package/dist/chunks/tween-JEthWrjo.cjs.map +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-distort>` — Hover distortion
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
The image bulges and splits into RGB around the pointer. Without WebGL (or a cross-origin image without CORS) it falls back to a gentle CSS zoom.
|
|
6
|
+
|
|
7
|
+
- **Category:** webgl
|
|
8
|
+
- **Import:** `import { defineDistort } from 'motionary/components/webgl'` then `defineDistort();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/webgl/elements.ts](../../src/components/webgl/elements.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-distort>
|
|
20
|
+
<img src="photo.jpg" alt="…">
|
|
21
|
+
</usa-distort>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineDistort } from 'motionary/components/webgl';
|
|
28
|
+
|
|
29
|
+
defineDistort(); // registers <usa-distort>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-distort>
|
|
33
|
+
<img src="photo.jpg" alt="…">
|
|
34
|
+
</usa-distort>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# `<usa-dock>` — macOS-style dock
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
6.6: items magnify with a smooth cosine falloff as the pointer moves along the dock, neighbours make room, labels pop above the hovered item and a click bounces it. Keyboard focus magnifies too.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 6.6
|
|
8
|
+
- **Import:** `import { defineDock } from 'motionary/components/widgets'` then `defineDock();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `orientation`, `magnify`, `range`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/dock.ts](../../src/components/widgets/dock.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-dock magnify="1.9" bounce label="Apps">
|
|
20
|
+
<button data-label="Finder" aria-label="Finder">🗂</button>
|
|
21
|
+
<button data-label="Music" aria-label="Music">🎵</button>
|
|
22
|
+
<a href="/mail" data-label="Mail" aria-label="Mail">✉️</a>
|
|
23
|
+
</usa-dock>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## ES module
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { defineDock } from 'motionary/components/widgets';
|
|
30
|
+
|
|
31
|
+
defineDock(); // registers <usa-dock>
|
|
32
|
+
|
|
33
|
+
/* then use it in your HTML:
|
|
34
|
+
<usa-dock magnify="1.9" bounce label="Apps">
|
|
35
|
+
<button data-label="Finder" aria-label="Finder">🗂</button>
|
|
36
|
+
<button data-label="Music" aria-label="Music">🎵</button>
|
|
37
|
+
<a href="/mail" data-label="Mail" aria-label="Mail">✉️</a>
|
|
38
|
+
</usa-dock>
|
|
39
|
+
*/
|
|
40
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-dot-network>` — Dot network
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
A dot grid that swells and links up with lines around the pointer.
|
|
6
|
+
|
|
7
|
+
- **Category:** background
|
|
8
|
+
- **Import:** `import { defineDotNetwork } from 'motionary/components/background'` then `defineDotNetwork();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `mount()`
|
|
14
|
+
- **Source:** [src/components/background/bg-fx.ts](../../src/components/background/bg-fx.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-dot-network gap="28">…</usa-dot-network>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineDotNetwork } from 'motionary/components/background';
|
|
26
|
+
|
|
27
|
+
defineDotNetwork(); // registers <usa-dot-network>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-dot-network gap="28">…</usa-dot-network>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-double-tap>` — Double tap
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
Double tap or double click a photo to pop a heart (or any emoji) at the tap point. L for keyboard users.
|
|
6
|
+
|
|
7
|
+
- **Category:** click
|
|
8
|
+
- **Import:** `import { defineDoubleTap } from 'motionary/components/click'` then `defineDoubleTap();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** `usa:double-tap`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `pop()`
|
|
14
|
+
- **Source:** [src/components/click/double-tap.ts](../../src/components/click/double-tap.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-double-tap>
|
|
20
|
+
<img src="photo.jpg" alt="…">
|
|
21
|
+
</usa-double-tap>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineDoubleTap } from 'motionary/components/click';
|
|
28
|
+
|
|
29
|
+
defineDoubleTap(); // registers <usa-double-tap>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-double-tap>
|
|
33
|
+
<img src="photo.jpg" alt="…">
|
|
34
|
+
</usa-double-tap>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-draggable>` — Draggable
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
Drag with mouse, touch, pen or arrow keys. spring-back returns home with a wobble; inertia glides after a flick; snap to a grid or points; rubber-band bounds.
|
|
6
|
+
|
|
7
|
+
- **Category:** physics
|
|
8
|
+
- **Import:** `import { defineDraggable } from 'motionary/components/physics'` then `defineDraggable();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `axis`, `disabled`, `preset`
|
|
11
|
+
- **Events:** `usa:settle`, `usa:drag-start`, `usa:drag`, `usa:drag-end`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `moveTo()`, `reset()`
|
|
14
|
+
- **Source:** [src/components/physics/draggable.ts](../../src/components/physics/draggable.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-draggable spring-back>
|
|
20
|
+
<div class="card">Drag me</div>
|
|
21
|
+
</usa-draggable>
|
|
22
|
+
<usa-draggable inertia snap="80" bounds="parent">…</usa-draggable>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineDraggable } from 'motionary/components/physics';
|
|
29
|
+
|
|
30
|
+
defineDraggable(); // registers <usa-draggable>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-draggable spring-back>
|
|
34
|
+
<div class="card">Drag me</div>
|
|
35
|
+
</usa-draggable>
|
|
36
|
+
<usa-draggable inertia snap="80" bounds="parent">…</usa-draggable>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-draw>` — Line drawing
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
Every stroke of the SVG inside draws itself — on view, hover, click or scrubbed with scroll — staggered between shapes, optional fill afterwards. No getTotalLength() needed.
|
|
6
|
+
|
|
7
|
+
- **Category:** svg
|
|
8
|
+
- **Import:** `import { defineDraw } from 'motionary/components/svg'` then `defineDraw();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** `usa:complete`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `play()`
|
|
14
|
+
- **Source:** [src/components/svg/draw.ts](../../src/components/svg/draw.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-draw duration="1800" stagger="0.3" fill>
|
|
20
|
+
<svg viewBox="0 0 100 40">…</svg>
|
|
21
|
+
</usa-draw>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineDraw } from 'motionary/components/svg';
|
|
28
|
+
|
|
29
|
+
defineDraw(); // registers <usa-draw>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-draw duration="1800" stagger="0.3" fill>
|
|
33
|
+
<svg viewBox="0 0 100 40">…</svg>
|
|
34
|
+
</usa-draw>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `<usa-drawer>` — Drawer
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
A side panel that springs in, drags / swipes closed, traps the page behind a backdrop and returns focus on close. Left, right, top or bottom.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui
|
|
8
|
+
- **Import:** `import { defineDrawer } from 'motionary/components/ui'` then `defineDrawer();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `show()`, `close()`
|
|
14
|
+
- **Source:** [src/components/ui/sheet.ts](../../src/components/ui/sheet.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<button onclick="nav.open = true">Menu</button>
|
|
20
|
+
<usa-drawer id="nav" side="left" label="Navigation">…</usa-drawer>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ES module
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { defineDrawer } from 'motionary/components/ui';
|
|
27
|
+
|
|
28
|
+
defineDrawer(); // registers <usa-drawer>
|
|
29
|
+
|
|
30
|
+
/* then use it in your HTML:
|
|
31
|
+
<button onclick="nav.open = true">Menu</button>
|
|
32
|
+
<usa-drawer id="nav" side="left" label="Navigation">…</usa-drawer>
|
|
33
|
+
*/
|
|
34
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `<usa-equalizer>` — Graphic equalizer
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
7.1: one vertical slider per band with springy caps and a smooth response curve drawn through them; presets glide every band to its gain.
|
|
6
|
+
|
|
7
|
+
- **Category:** interaction · **since** 7.1
|
|
8
|
+
- **Import:** `import { defineEqualizer } from 'motionary/components/widgets'` then `defineEqualizer();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `bands`
|
|
11
|
+
- **Events:** `usa:change`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `applyPreset()`
|
|
14
|
+
- **Source:** [src/components/widgets/equalizer.ts](../../src/components/widgets/equalizer.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-equalizer preset="rock" bands="60,150,400,1k,2.4k,6k,16k"></usa-equalizer>
|
|
20
|
+
<script>eq.applyPreset('vocal');</script>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ES module
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { defineEqualizer } from 'motionary/components/widgets';
|
|
27
|
+
|
|
28
|
+
defineEqualizer(); // registers <usa-equalizer>
|
|
29
|
+
|
|
30
|
+
/* then use it in your HTML:
|
|
31
|
+
<usa-equalizer preset="rock" bands="60,150,400,1k,2.4k,6k,16k"></usa-equalizer>
|
|
32
|
+
*/
|
|
33
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# `<usa-fab>` — FAB speed dial
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
A floating action button whose actions fan out with a staggered spring: up, down, left, right or radial.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui
|
|
8
|
+
- **Import:** `import { defineFab } from 'motionary/components/ui'` then `defineFab();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `direction`, `gap`
|
|
11
|
+
- **Events:** `usa:toggle`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `toggle()`
|
|
14
|
+
- **Source:** [src/components/ui/fab.ts](../../src/components/ui/fab.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-fab direction="up">
|
|
20
|
+
<button aria-label="Create">+</button>
|
|
21
|
+
<button aria-label="Photo">📷</button>
|
|
22
|
+
<button aria-label="Note">📝</button>
|
|
23
|
+
</usa-fab>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## ES module
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { defineFab } from 'motionary/components/ui';
|
|
30
|
+
|
|
31
|
+
defineFab(); // registers <usa-fab>
|
|
32
|
+
|
|
33
|
+
/* then use it in your HTML:
|
|
34
|
+
<usa-fab direction="up">
|
|
35
|
+
<button aria-label="Create">+</button>
|
|
36
|
+
<button aria-label="Photo">📷</button>
|
|
37
|
+
<button aria-label="Note">📝</button>
|
|
38
|
+
</usa-fab>
|
|
39
|
+
*/
|
|
40
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-festival-banner>` — Festival banner
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
8.1: an announcement banner with an ambient festive scene behind the text — lunar lanterns and sparkles, Christmas lights and snow, Halloween bats and moon, or fireworks.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.1
|
|
8
|
+
- **Import:** `import { defineFestivalBanner } from 'motionary/components/widgets'` then `defineFestivalBanner();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `theme`, `label`, `dismissible`
|
|
11
|
+
- **Events:** `usa:dismiss`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `dismiss()`
|
|
14
|
+
- **Source:** [src/components/widgets/festival-banner.ts](../../src/components/widgets/festival-banner.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-festival-banner theme="lunar" dismissible>🧧 Happy Lunar New Year — 20% off all week</usa-festival-banner>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineFestivalBanner } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
defineFestivalBanner(); // registers <usa-festival-banner>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-festival-banner theme="lunar" dismissible>🧧 Happy Lunar New Year — 20% off all week</usa-festival-banner>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `<usa-field>` — Animated field
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
7.7: a text input whose label floats up on focus, with a growing underline; validates on blur — invalid shakes and slides the message in, valid draws a check. strength adds a 4-step password meter.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 7.7
|
|
8
|
+
- **Import:** `import { defineField } from 'motionary/components/widgets'` then `defineField();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `label`, `hint`, `error`, `strength`
|
|
11
|
+
- **Events:** `usa:invalid`, `usa:valid`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `validate()`
|
|
14
|
+
- **Source:** [src/components/widgets/field.ts](../../src/components/widgets/field.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-field label="Email" type="email" name="email" required></usa-field>
|
|
20
|
+
<usa-field label="Password" type="password" name="pw" minlength="8" strength></usa-field>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ES module
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { defineField } from 'motionary/components/widgets';
|
|
27
|
+
|
|
28
|
+
defineField(); // registers <usa-field>
|
|
29
|
+
|
|
30
|
+
/* then use it in your HTML:
|
|
31
|
+
<usa-field label="Email" type="email" name="email" required></usa-field>
|
|
32
|
+
<usa-field label="Password" type="password" name="pw" minlength="8" strength></usa-field>
|
|
33
|
+
*/
|
|
34
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# `<usa-file-drop>` — File drop zone
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
6.9: dragging files over it lights marching-ants borders and lifts the icon; dropped (or browsed) files fly into a list with progress bars that end in a drawn check.
|
|
6
|
+
|
|
7
|
+
- **Category:** feedback · **since** 6.9
|
|
8
|
+
- **Import:** `import { defineFileDrop } from 'motionary/components/widgets'` then `defineFileDrop();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** `usa:files`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `setProgress()`, `addFiles()`, `clear()`
|
|
14
|
+
- **Source:** [src/components/widgets/file-drop.ts](../../src/components/widgets/file-drop.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-file-drop multiple accept="image/*" label="Drop images or browse"></usa-file-drop>
|
|
20
|
+
<script>
|
|
21
|
+
drop.addEventListener('usa:files', (e) => upload(e.detail.files, (i, p) => drop.setProgress(i, p)));
|
|
22
|
+
</script>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineFileDrop } from 'motionary/components/widgets';
|
|
29
|
+
|
|
30
|
+
defineFileDrop(); // registers <usa-file-drop>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-file-drop multiple accept="image/*" label="Drop images or browse"></usa-file-drop>
|
|
34
|
+
*/
|
|
35
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-fullpage>` — Full-page sections
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
Full-screen sections that snap one at a time, with keyboard paging, dot navigation and a usa:section event.
|
|
6
|
+
|
|
7
|
+
- **Category:** page
|
|
8
|
+
- **Import:** `import { defineFullpage } from 'motionary/components/page'` then `defineFullpage();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** `usa:section`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `go()`, `next()`, `prev()`
|
|
14
|
+
- **Source:** [src/components/page/fullpage.ts](../../src/components/page/fullpage.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-fullpage dots>
|
|
20
|
+
<section>One</section>
|
|
21
|
+
<section>Two</section>
|
|
22
|
+
</usa-fullpage>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { defineFullpage } from 'motionary/components/page';
|
|
29
|
+
|
|
30
|
+
defineFullpage(); // registers <usa-fullpage>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-fullpage dots>
|
|
34
|
+
<section>One</section>
|
|
35
|
+
<section>Two</section>
|
|
36
|
+
</usa-fullpage>
|
|
37
|
+
*/
|
|
38
|
+
```
|