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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-organic-card>` — Organic card
|
|
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.3: a card with a soft, living blob shape — its outline slowly breathes on screen, morphs on hover and comes in leaf, ocean, petal and sand tints.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.3
|
|
8
|
+
- **Import:** `import { defineOrganicCard } from 'motionary/components/widgets'` then `defineOrganicCard();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `tint`, `seed`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `morph()`
|
|
14
|
+
- **Source:** [src/components/widgets/organic-card.ts](../../src/components/widgets/organic-card.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-organic-card tint="ocean">
|
|
20
|
+
<h3>Deep sea</h3><p>Content…</p>
|
|
21
|
+
</usa-organic-card>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineOrganicCard } from 'motionary/components/widgets';
|
|
28
|
+
|
|
29
|
+
defineOrganicCard(); // registers <usa-organic-card>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-organic-card tint="ocean">
|
|
33
|
+
<h3>Deep sea</h3><p>Content…</p>
|
|
34
|
+
</usa-organic-card>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `<usa-otp>` — OTP code input
|
|
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: one-time-code boxes that auto-advance, step back on Backspace and take a pasted code; digits pop in, error() shakes the row red, success() sends a green wave across it.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 7.7
|
|
8
|
+
- **Import:** `import { defineOtp } from 'motionary/components/widgets'` then `defineOtp();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `length`, `mode`, `label`
|
|
11
|
+
- **Events:** `usa:complete`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `fillCode()`, `clear()`, `error()`, `success()`
|
|
14
|
+
- **Source:** [src/components/widgets/otp.ts](../../src/components/widgets/otp.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-otp length="6"></usa-otp>
|
|
20
|
+
<script>otp.addEventListener('usa:complete', (e) => check(e.detail.code) ? otp.success() : otp.error());</script>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ES module
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { defineOtp } from 'motionary/components/widgets';
|
|
27
|
+
|
|
28
|
+
defineOtp(); // registers <usa-otp>
|
|
29
|
+
|
|
30
|
+
/* then use it in your HTML:
|
|
31
|
+
<usa-otp length="6"></usa-otp>
|
|
32
|
+
*/
|
|
33
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-overscroll>` — Elastic overscroll
|
|
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 scroll container whose edges stretch with iOS-style rubber-band resistance and spring back — touch, trackpad and wheel.
|
|
6
|
+
|
|
7
|
+
- **Category:** physics
|
|
8
|
+
- **Import:** `import { defineOverscroll } from 'motionary/components/physics'` then `defineOverscroll();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `axis`, `disabled`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/physics/overscroll.ts](../../src/components/physics/overscroll.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-overscroll style="height: 240px">
|
|
20
|
+
<ul>…</ul>
|
|
21
|
+
</usa-overscroll>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { defineOverscroll } from 'motionary/components/physics';
|
|
28
|
+
|
|
29
|
+
defineOverscroll(); // registers <usa-overscroll>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-overscroll style="height: 240px">
|
|
33
|
+
<ul>…</ul>
|
|
34
|
+
</usa-overscroll>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# `<usa-pack>` — E-commerce pack
|
|
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
|
+
Product cards reveal and lift, “Add to cart” presses and flies the product into the cart (which bumps), prices count up, badges pulse.
|
|
6
|
+
|
|
7
|
+
- **Category:** packs
|
|
8
|
+
- **Import:** `import { definePack } from 'motionary/components/packs'` then `definePack();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `name`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/packs/pack-el.ts](../../src/components/packs/pack-el.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-pack name="ecommerce">
|
|
20
|
+
<article data-role="product">
|
|
21
|
+
<img src="shoe.jpg" alt="Runner">
|
|
22
|
+
<span data-role="price">$129</span>
|
|
23
|
+
<button data-role="add-to-cart">Add to cart</button>
|
|
24
|
+
</article>
|
|
25
|
+
<a data-role="cart" href="/cart">Cart</a>
|
|
26
|
+
</usa-pack>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## ES module
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
import { definePack } from 'motionary/components/packs';
|
|
33
|
+
|
|
34
|
+
definePack(); // registers <usa-pack>
|
|
35
|
+
|
|
36
|
+
/* then use it in your HTML:
|
|
37
|
+
<usa-pack name="ecommerce">
|
|
38
|
+
<article data-role="product">
|
|
39
|
+
<img src="shoe.jpg" alt="Runner">
|
|
40
|
+
<span data-role="price">$129</span>
|
|
41
|
+
<button data-role="add-to-cart">Add to cart</button>
|
|
42
|
+
</article>
|
|
43
|
+
<a data-role="cart" href="/cart">Cart</a>
|
|
44
|
+
</usa-pack>
|
|
45
|
+
*/
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Variants
|
|
49
|
+
|
|
50
|
+
### E-commerce pack
|
|
51
|
+
|
|
52
|
+
Product cards reveal and lift, “Add to cart” presses and flies the product into the cart (which bumps), prices count up, badges pulse.
|
|
53
|
+
|
|
54
|
+
```html
|
|
55
|
+
<usa-pack name="ecommerce">
|
|
56
|
+
<article data-role="product">
|
|
57
|
+
<img src="shoe.jpg" alt="Runner">
|
|
58
|
+
<span data-role="price">$129</span>
|
|
59
|
+
<button data-role="add-to-cart">Add to cart</button>
|
|
60
|
+
</article>
|
|
61
|
+
<a data-role="cart" href="/cart">Cart</a>
|
|
62
|
+
</usa-pack>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Portfolio pack
|
|
66
|
+
|
|
67
|
+
Headings and projects reveal in sequence, projects lift on hover, stats count up, the contact button pulses.
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<usa-pack name="portfolio">
|
|
71
|
+
<h2 data-role="heading">Selected work</h2>
|
|
72
|
+
<a data-role="project" href="/work/1">…</a>
|
|
73
|
+
<b data-role="stat">120</b> clients
|
|
74
|
+
<a data-role="contact" href="mailto:…">Say hi</a>
|
|
75
|
+
</usa-pack>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Dashboard pack
|
|
79
|
+
|
|
80
|
+
KPI cards reveal, numbers count up from zero, alerts pulse, action buttons press.
|
|
81
|
+
|
|
82
|
+
```html
|
|
83
|
+
<usa-pack name="dashboard">
|
|
84
|
+
<div data-role="card">Revenue <b data-role="stat">48,210</b></div>
|
|
85
|
+
<span data-role="alert">3 incidents</span>
|
|
86
|
+
</usa-pack>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Game UI pack
|
|
90
|
+
|
|
91
|
+
Buttons press, the score counts up and bumps, items float, a hit shakes, rewards pulse.
|
|
92
|
+
|
|
93
|
+
```html
|
|
94
|
+
<usa-pack name="game">
|
|
95
|
+
<b data-role="score">9,800</b>
|
|
96
|
+
<img data-role="item" src="gem.png" alt="Gem">
|
|
97
|
+
<button data-role="button">Play</button>
|
|
98
|
+
</usa-pack>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Landing page pack
|
|
102
|
+
|
|
103
|
+
Hero and features reveal in sequence, features lift, logos float gently, stats count up, the CTA pulses and presses.
|
|
104
|
+
|
|
105
|
+
```html
|
|
106
|
+
<usa-pack name="landing">
|
|
107
|
+
<header data-role="hero">…</header>
|
|
108
|
+
<section data-role="feature">…</section>
|
|
109
|
+
<a data-role="cta" href="/signup">Start free</a>
|
|
110
|
+
</usa-pack>
|
|
111
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-pagination>` — Pagination with sliding ink
|
|
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.7: the highlight springs to the chosen page (squashing on the way) and page numbers slide in from the direction of travel when the window shifts. Prev / next, ellipses, aria-current.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 6.7
|
|
8
|
+
- **Import:** `import { definePagination } from 'motionary/components/widgets'` then `definePagination();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `total`, `siblings`
|
|
11
|
+
- **Events:** `usa:change`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/pagination.ts](../../src/components/widgets/pagination.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-pagination total="20" page="1" siblings="1"></usa-pagination>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { definePagination } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
definePagination(); // registers <usa-pagination>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-pagination total="20" page="1" siblings="1"></usa-pagination>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-panorama>` — 360° panorama viewer
|
|
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.8: a 360° panorama — drag or swipe to look around with inertia, a slow auto-rotate, a compass for the heading and a “View in XR” badge when the browser offers WebXR.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 8.8
|
|
8
|
+
- **Import:** `import { definePanorama } from 'motionary/components/widgets'` then `definePanorama();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `src`, `autorotate`, `label`
|
|
11
|
+
- **Events:** `usa:xr`, `usa:xr-request`, `usa:look`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `lookAt()`
|
|
14
|
+
- **Source:** [src/components/widgets/panorama.ts](../../src/components/widgets/panorama.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-panorama src="pano-equirect.jpg" label="Lake at dawn" autorotate="6"></usa-panorama>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { definePanorama } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
definePanorama(); // registers <usa-panorama>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-panorama src="pano-equirect.jpg" label="Lake at dawn" autorotate="6"></usa-panorama>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-particles>` — Particles
|
|
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 canvas constellation that drifts away from the pointer. Runs only while visible, DPR ≤ 2, a still frame under reduced motion.
|
|
6
|
+
|
|
7
|
+
- **Category:** background
|
|
8
|
+
- **Import:** `import { defineParticles } from 'motionary/components/background'` then `defineParticles();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `count`, `color`, `size`, `speed`, `links`, `interactive`, `paused`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `reset()`
|
|
14
|
+
- **Source:** [src/components/background/particles.ts](../../src/components/background/particles.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-particles count="80" links="120" interactive></usa-particles>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { defineParticles } from 'motionary/components/background';
|
|
26
|
+
|
|
27
|
+
defineParticles(); // registers <usa-particles>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-particles count="80" links="120" interactive></usa-particles>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-pause-all>` — Pause all motion
|
|
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
|
+
9.5: one button that pauses all motion on the page (WCAG 2.2.2) — Motionary’s shared clock, every CSS / Web animation and autoplaying media — and resumes it again; `scope` limits it to one area.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 9.5
|
|
8
|
+
- **Import:** `import { definePauseAll } from 'motionary/components/widgets'` then `definePauseAll();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `label`, `scope`, `resume-label`
|
|
11
|
+
- **Events:** `usa:pause-all`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `toggle()`
|
|
14
|
+
- **Source:** [src/components/widgets/pause-all.ts](../../src/components/widgets/pause-all.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-pause-all></usa-pause-all>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { definePauseAll } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
definePauseAll(); // registers <usa-pause-all>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-pause-all></usa-pause-all>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `<usa-perf-monitor>` — Perf monitor
|
|
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
|
+
9.6: a live performance overlay for motion work — FPS with a sparkline, active Motionary animations, frame-loop callbacks, long tasks and the shared clock — flagging jank.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 9.6
|
|
8
|
+
- **Import:** `import { definePerfMonitor } from 'motionary/components/widgets'` then `definePerfMonitor();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `corner`, `warn`
|
|
11
|
+
- **Events:** `usa:jank`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** —
|
|
14
|
+
- **Source:** [src/components/widgets/perf-monitor.ts](../../src/components/widgets/perf-monitor.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-perf-monitor corner="bottom-right"></usa-perf-monitor>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ES module
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { definePerfMonitor } from 'motionary/components/widgets';
|
|
26
|
+
|
|
27
|
+
definePerfMonitor(); // registers <usa-perf-monitor>
|
|
28
|
+
|
|
29
|
+
/* then use it in your HTML:
|
|
30
|
+
<usa-perf-monitor corner="bottom-right"></usa-perf-monitor>
|
|
31
|
+
*/
|
|
32
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-pinch-zoom>` — Pinch zoom
|
|
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
|
+
Pinch with two fingers or Ctrl + wheel / trackpad pinch, pan while zoomed, double-tap to toggle; scale and position spring back inside the bounds.
|
|
6
|
+
|
|
7
|
+
- **Category:** gesture
|
|
8
|
+
- **Import:** `import { definePinchZoom } from 'motionary/components/gesture'` then `definePinchZoom();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** `usa:zoom`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `zoomTo()`
|
|
14
|
+
- **Source:** [src/components/gesture/pinch-zoom.ts](../../src/components/gesture/pinch-zoom.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-pinch-zoom max="4">
|
|
20
|
+
<img src="photo.jpg" alt="…">
|
|
21
|
+
</usa-pinch-zoom>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { definePinchZoom } from 'motionary/components/gesture';
|
|
28
|
+
|
|
29
|
+
definePinchZoom(); // registers <usa-pinch-zoom>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-pinch-zoom max="4">
|
|
33
|
+
<img src="photo.jpg" alt="…">
|
|
34
|
+
</usa-pinch-zoom>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-player>` — JSON animation player
|
|
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
|
+
5.9: <usa-player> plays a JSON animation — timeline presets, your own keyframes and any registered effect on a shared clock; play / pause / seek / rate / loop, scroll-scrubbing (trigger="scroll"). Export one from the Playground (<usa-player> JSON tab).
|
|
6
|
+
|
|
7
|
+
- **Category:** fx
|
|
8
|
+
- **Import:** `import { definePlayer } from 'motionary/components/effects'` then `definePlayer();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `src`, `trigger`, `loop`, `rate`
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `load()`, `play()`, `pause()`, `seek()`
|
|
14
|
+
- **Source:** [src/components/effects/player.ts](../../src/components/effects/player.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-player src="hero.json" trigger="view">
|
|
20
|
+
<h1>Title</h1>
|
|
21
|
+
<a class="cta">Start</a>
|
|
22
|
+
</usa-player>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { definePlayer } from 'motionary/components/effects';
|
|
29
|
+
|
|
30
|
+
definePlayer(); // registers <usa-player>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-player src="hero.json" trigger="view">
|
|
34
|
+
<h1>Title</h1>
|
|
35
|
+
<a class="cta">Start</a>
|
|
36
|
+
</usa-player>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# `<usa-plugin-card>` — Plugin detail card
|
|
2
|
+
|
|
3
|
+
> Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
|
|
4
|
+
|
|
5
|
+
10.1: a plugin’s name, version and author with a Motionary compatibility badge (semver `engine` range), a signature badge (SHA-256 integrity checked with Web Crypto), an animated download counter and expandable details. Requires motionary/runtime — npm i motionary, then use() before the card mounts.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 10.1
|
|
8
|
+
- **Import:** `import { definePluginCard } from 'motionary/components/widgets'` then `definePluginCard();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `name`, `title`, `version`, `author`, `engine`, `downloads`, `integrity`, `src`
|
|
11
|
+
- **Events:** `usa:toggle`, `usa:verified`, `usa:runtime-missing`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `toggle()`, `verify()`, `compat()`
|
|
14
|
+
- **Source:** [src/components/widgets/plugin-card.ts](../../src/components/widgets/plugin-card.ts)
|
|
15
|
+
|
|
16
|
+
## Prerequisites — Requires: motionary/runtime
|
|
17
|
+
|
|
18
|
+
1. **Install:** `npm i motionary`
|
|
19
|
+
2. **Import order & registration:** Import motionary/runtime and call use() once at start-up, before any runtime-powered component mounts. CDN: the IIFE registers itself (window.MotionaryRuntime).
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import { use } from 'motionary/runtime';
|
|
23
|
+
import { definePluginCard } from 'motionary/components/widgets';
|
|
24
|
+
|
|
25
|
+
use();
|
|
26
|
+
definePluginCard(); // registers <usa-plugin-card> — after the prerequisites
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
3. **CDN:**
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
33
|
+
<!-- then the component bundles -->
|
|
34
|
+
<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
|
|
35
|
+
<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Minimal example
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<usa-plugin-card name="retro" title="Retro" version="1.2.0" author="Motionary" engine="^10.0.0" downloads="12400">
|
|
42
|
+
<p>Pixel, CRT, VHS and Y2K effects.</p>
|
|
43
|
+
</usa-plugin-card>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## ES module
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
import { use } from 'motionary/runtime';
|
|
50
|
+
|
|
51
|
+
use();
|
|
52
|
+
import { definePluginCard } from 'motionary/components/widgets';
|
|
53
|
+
|
|
54
|
+
definePluginCard(); // registers <usa-plugin-card>
|
|
55
|
+
|
|
56
|
+
/* then use it in your HTML:
|
|
57
|
+
<usa-plugin-card name="retro" title="Retro" version="1.2.0" author="Motionary" engine="^10.0.0" downloads="12400">
|
|
58
|
+
<p>Pixel, CRT, VHS and Y2K effects.</p>
|
|
59
|
+
</usa-plugin-card>
|
|
60
|
+
*/
|
|
61
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-plugin-store>` — Plugin marketplace
|
|
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
|
+
9.0: the plugin marketplace as a component — search the catalogue of effect packs, see each plugin’s effects and install it with one click (imports and registers the pack).
|
|
6
|
+
|
|
7
|
+
- **Category:** ui · **since** 9.0
|
|
8
|
+
- **Import:** `import { definePluginStore } from 'motionary/components/widgets'` then `definePluginStore();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
|
|
10
|
+
- **Attributes:** `query`, `label`
|
|
11
|
+
- **Events:** `usa:install`, `usa:install-error`
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `search()`, `install()`
|
|
14
|
+
- **Source:** [src/components/widgets/plugin-store.ts](../../src/components/widgets/plugin-store.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-plugin-store query="neon"></usa-plugin-store>
|
|
20
|
+
<script type="module">
|
|
21
|
+
const store = document.querySelector('usa-plugin-store');
|
|
22
|
+
store.loader = (entry) => import(entry); // or map to your bundler imports
|
|
23
|
+
</script>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## ES module
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { definePluginStore } from 'motionary/components/widgets';
|
|
30
|
+
|
|
31
|
+
definePluginStore(); // registers <usa-plugin-store>
|
|
32
|
+
|
|
33
|
+
/* then use it in your HTML:
|
|
34
|
+
<usa-plugin-store query="neon"></usa-plugin-store>
|
|
35
|
+
*/
|
|
36
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<usa-popover>` — Popover
|
|
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
|
+
Click-to-open panel that springs from its trigger; Esc / outside click closes, focus returns.
|
|
6
|
+
|
|
7
|
+
- **Category:** ui
|
|
8
|
+
- **Import:** `import { definePopover } from 'motionary/components/ui'` then `definePopover();`
|
|
9
|
+
- **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
|
|
10
|
+
- **Attributes:** —
|
|
11
|
+
- **Events:** —
|
|
12
|
+
- **Slots:** —
|
|
13
|
+
- **Methods:** `toggle()`
|
|
14
|
+
- **Source:** [src/components/ui/popover.ts](../../src/components/ui/popover.ts)
|
|
15
|
+
|
|
16
|
+
## Minimal example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<usa-popover>
|
|
20
|
+
<button>Share</button>
|
|
21
|
+
<div data-popover>…</div>
|
|
22
|
+
</usa-popover>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ES module
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { definePopover } from 'motionary/components/ui';
|
|
29
|
+
|
|
30
|
+
definePopover(); // registers <usa-popover>
|
|
31
|
+
|
|
32
|
+
/* then use it in your HTML:
|
|
33
|
+
<usa-popover>
|
|
34
|
+
<button>Share</button>
|
|
35
|
+
<div data-popover>…</div>
|
|
36
|
+
</usa-popover>
|
|
37
|
+
*/
|
|
38
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `<usa-post-fx>` — Post-processing
|
|
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
|
+
Chainable GPU passes over an image (4.8): vignette, grain, chromatic aberration, scanlines, CRT, bloom, pixelate, duotone and glitch, with one intensity. Without WebGL the image gets an approximate CSS filter.
|
|
6
|
+
|
|
7
|
+
- **Category:** webgl
|
|
8
|
+
- **Import:** `import { definePostFx } from 'motionary/components/webgl'` then `definePostFx();`
|
|
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-post-fx effects="vignette grain" intensity="0.6">
|
|
20
|
+
<img src="photo.jpg" alt="…">
|
|
21
|
+
</usa-post-fx>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ES module
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { definePostFx } from 'motionary/components/webgl';
|
|
28
|
+
|
|
29
|
+
definePostFx(); // registers <usa-post-fx>
|
|
30
|
+
|
|
31
|
+
/* then use it in your HTML:
|
|
32
|
+
<usa-post-fx effects="vignette grain" intensity="0.6">
|
|
33
|
+
<img src="photo.jpg" alt="…">
|
|
34
|
+
</usa-post-fx>
|
|
35
|
+
*/
|
|
36
|
+
```
|