@yewdiel21/motion-kit 0.14.0 → 0.15.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/README.md +174 -155
- package/bin/motion-kit.mjs +3 -3
- package/dist/auto/index.d.ts +6 -3
- package/dist/auto/index.js +8 -2
- package/dist/auto/index.js.map +1 -1
- package/dist/{chunk-EY4BJKC4.js → chunk-6IRJYXJU.js} +2 -2
- package/dist/{chunk-CU6SXW3E.js → chunk-A6QQCF6V.js} +1309 -310
- package/dist/chunk-A6QQCF6V.js.map +1 -0
- package/dist/chunk-JXRS3OEA.js +3638 -0
- package/dist/chunk-JXRS3OEA.js.map +1 -0
- package/dist/css/components/add-to-cart.css +72 -0
- package/dist/css/components/bidirectional-slider.css +168 -0
- package/dist/css/components/data-table.css +121 -26
- package/dist/css/components/filter-builder.css +10 -15
- package/dist/css/components/heatmap-chart.css +391 -0
- package/dist/css/components/hover-card.css +8 -2
- package/dist/css/components/image-preview.css +90 -2
- package/dist/css/components/json-viewer.css +33 -1
- package/dist/css/components/nav.css +102 -102
- package/dist/css/components/orbit-menu.css +130 -0
- package/dist/css/components/pagination.css +10 -5
- package/dist/css/components/pie-chart.css +390 -0
- package/dist/css/components/pill-button.css +135 -0
- package/dist/css/components/radar-chart.css +370 -0
- package/dist/css/components/radial-chart.css +398 -0
- package/dist/css/components/sankey-chart.css +358 -0
- package/dist/css/components/scroll-island.css +111 -0
- package/dist/css/components/select.css +136 -0
- package/dist/css/components/toolbar.css +122 -0
- package/dist/css/components/tree-view.css +79 -0
- package/dist/css/components/voice-dots.css +70 -0
- package/dist/elements/index.d.ts +180 -7
- package/dist/elements/index.js +287 -6
- package/dist/elements/index.js.map +1 -1
- package/dist/{engine-Cn6IhE3z.d.ts → engine-5zRIssTO.d.ts} +11 -1
- package/dist/index.css +1832 -168
- package/dist/index.d.ts +4 -4
- package/dist/index.js +33 -3
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.ts +117 -11
- package/dist/react/index.js +314 -13
- package/dist/react/index.js.map +1 -1
- package/dist/{reduced-BBUusld6.d.ts → reduced-6X_bns60.d.ts} +1 -1
- package/dist/{reveal-DEvp6U6T.d.ts → reveal-BfyKKsw4.d.ts} +97 -4
- package/dist/store-CA2Qcun_.d.ts +453 -0
- package/package.json +9 -16
- package/registry.json +1096 -948
- package/src/auto/auto-init.ts +6 -0
- package/src/components/add-to-cart/README.md +34 -0
- package/src/components/add-to-cart/add-to-cart.css +71 -0
- package/src/components/add-to-cart/element.ts +20 -0
- package/src/components/add-to-cart/engine.ts +206 -0
- package/src/components/add-to-cart/react.tsx +29 -0
- package/src/components/bidirectional-slider/README.md +46 -0
- package/src/components/bidirectional-slider/bidirectional-slider.css +167 -0
- package/src/components/bidirectional-slider/element.ts +42 -0
- package/src/components/bidirectional-slider/engine.ts +289 -0
- package/src/components/bidirectional-slider/react.tsx +45 -0
- package/src/components/chart/README.md +10 -0
- package/src/components/chart/element.ts +2 -0
- package/src/components/chart/engine.ts +50 -23
- package/src/components/chart/parts.ts +237 -0
- package/src/components/chart/react.tsx +2 -2
- package/src/components/chart/use-chart.ts +55 -0
- package/src/components/data-table/README.md +3 -3
- package/src/components/data-table/data-table.css +121 -26
- package/src/components/data-table/engine.ts +81 -29
- package/src/components/editable-table/engine.ts +67 -11
- package/src/components/filter-builder/engine.ts +33 -2
- package/src/components/filter-builder/filter-builder.css +10 -15
- package/src/components/heatmap-chart/README.md +48 -0
- package/src/components/heatmap-chart/element.ts +21 -0
- package/src/components/heatmap-chart/engine.ts +281 -0
- package/src/components/heatmap-chart/heatmap-chart.css +93 -0
- package/src/components/heatmap-chart/react.tsx +14 -0
- package/src/components/hover-card/engine.ts +30 -1
- package/src/components/hover-card/hover-card.css +8 -2
- package/src/components/image-preview/element.ts +1 -1
- package/src/components/image-preview/engine.ts +95 -15
- package/src/components/image-preview/image-preview.css +90 -2
- package/src/components/image-preview/react.tsx +3 -3
- package/src/components/json-viewer/engine.ts +11 -2
- package/src/components/json-viewer/json-viewer.css +33 -1
- package/src/components/nav/README.md +12 -10
- package/src/components/nav/element.ts +5 -5
- package/src/components/nav/engine.ts +21 -14
- package/src/components/nav/nav.css +102 -102
- package/src/components/nav/react.tsx +4 -4
- package/src/components/orbit-menu/README.md +46 -0
- package/src/components/orbit-menu/element.ts +27 -0
- package/src/components/orbit-menu/engine.ts +179 -0
- package/src/components/orbit-menu/orbit-menu.css +129 -0
- package/src/components/orbit-menu/react.tsx +44 -0
- package/src/components/pagination/README.md +1 -1
- package/src/components/pagination/engine.ts +50 -4
- package/src/components/pagination/pagination.css +10 -5
- package/src/components/pie-chart/README.md +48 -0
- package/src/components/pie-chart/element.ts +30 -0
- package/src/components/pie-chart/engine.ts +283 -0
- package/src/components/pie-chart/pie-chart.css +92 -0
- package/src/components/pie-chart/react.tsx +14 -0
- package/src/components/pill-button/README.md +46 -0
- package/src/components/pill-button/element.ts +16 -0
- package/src/components/pill-button/engine.ts +77 -0
- package/src/components/pill-button/pill-button.css +134 -0
- package/src/components/pill-button/react.tsx +32 -0
- package/src/components/radar-chart/README.md +48 -0
- package/src/components/radar-chart/element.ts +30 -0
- package/src/components/radar-chart/engine.ts +327 -0
- package/src/components/radar-chart/radar-chart.css +72 -0
- package/src/components/radar-chart/react.tsx +14 -0
- package/src/components/radial-chart/README.md +48 -0
- package/src/components/radial-chart/element.ts +30 -0
- package/src/components/radial-chart/engine.ts +290 -0
- package/src/components/radial-chart/radial-chart.css +100 -0
- package/src/components/radial-chart/react.tsx +14 -0
- package/src/components/sankey-chart/README.md +48 -0
- package/src/components/sankey-chart/element.ts +31 -0
- package/src/components/sankey-chart/engine.ts +401 -0
- package/src/components/sankey-chart/react.tsx +14 -0
- package/src/components/sankey-chart/sankey-chart.css +60 -0
- package/src/components/scroll-island/README.md +34 -0
- package/src/components/scroll-island/element.ts +16 -0
- package/src/components/scroll-island/engine.ts +252 -0
- package/src/components/scroll-island/react.tsx +26 -0
- package/src/components/scroll-island/scroll-island.css +110 -0
- package/src/components/select/README.md +34 -0
- package/src/components/select/element.ts +26 -0
- package/src/components/select/engine.ts +267 -0
- package/src/components/select/react.tsx +33 -0
- package/src/components/select/select.css +135 -0
- package/src/components/toolbar/README.md +46 -0
- package/src/components/toolbar/element.ts +30 -0
- package/src/components/toolbar/engine.ts +230 -0
- package/src/components/toolbar/react.tsx +34 -0
- package/src/components/toolbar/toolbar.css +121 -0
- package/src/components/tree-view/element.ts +1 -1
- package/src/components/tree-view/engine.ts +174 -0
- package/src/components/tree-view/react.tsx +7 -3
- package/src/components/tree-view/tree-view.css +79 -0
- package/src/components/voice-dots/README.md +48 -0
- package/src/components/voice-dots/element.ts +45 -0
- package/src/components/voice-dots/engine.ts +243 -0
- package/src/components/voice-dots/react.tsx +52 -0
- package/src/components/voice-dots/voice-dots.css +69 -0
- package/src/elements/index.ts +39 -0
- package/src/index.ts +16 -0
- package/src/motion/liquid.ts +14 -4
- package/src/react/index.ts +14 -1
- package/dist/chunk-6P4P7NU6.js +0 -1401
- package/dist/chunk-6P4P7NU6.js.map +0 -1
- package/dist/chunk-CU6SXW3E.js.map +0 -1
- package/dist/store-DjkTBX7f.d.ts +0 -195
- /package/dist/{chunk-EY4BJKC4.js.map → chunk-6IRJYXJU.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,155 +1,174 @@
|
|
|
1
|
-
# @yewdiel21/motion-kit
|
|
2
|
-
|
|
3
|
-
Motion toolkit for vanilla JavaScript, Astro and React/Next.js. GSAP recipes, accessible UI components, 19 Material 3 themes, CSS controls and optional WebGL effects.
|
|
4
|
-
|
|
5
|
-
[Live playground](https://motion-kit-playground.vercel.app) — vanilla and React examples for every component.
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
npm install @yewdiel21/motion-kit gsap
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
For React components, install React 18 or newer. The theme generator additionally requires `@material/material-color-utilities@^0.3.0`.
|
|
14
|
-
|
|
15
|
-
## Vanilla / Astro
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
import '@yewdiel21/motion-kit/css';
|
|
19
|
-
import { autoInit } from '@yewdiel21/motion-kit/auto';
|
|
20
|
-
|
|
21
|
-
const destroy = autoInit(document);
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
```html
|
|
25
|
-
<div class="mk-segmented" data-mk="tabs">
|
|
26
|
-
<button data-mk-tab aria-selected="true">Today</button>
|
|
27
|
-
<button data-mk-tab>Week</button>
|
|
28
|
-
<span data-mk-indicator></span>
|
|
29
|
-
</div>
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Call `destroy()` before replacing the DOM. Add `MK_HEAD_SCRIPT` from `/auto` inline to `<head>` when using entrance recipes, and `defineElements()` from `/elements` to register the `mk-*` custom elements.
|
|
33
|
-
|
|
34
|
-
## React / Next.js
|
|
35
|
-
|
|
36
|
-
```tsx
|
|
37
|
-
'use client';
|
|
38
|
-
|
|
39
|
-
import '@yewdiel21/motion-kit/css';
|
|
40
|
-
import { useRef } from 'react';
|
|
41
|
-
import { useTabs } from '@yewdiel21/motion-kit/react';
|
|
42
|
-
|
|
43
|
-
export function Tabs() {
|
|
44
|
-
const ref = useRef<HTMLDivElement>(null);
|
|
45
|
-
useTabs(ref);
|
|
46
|
-
return (
|
|
47
|
-
<div ref={ref} className="mk-segmented">
|
|
48
|
-
<button data-mk-tab aria-selected="true">Today</button>
|
|
49
|
-
<button data-mk-tab>Week</button>
|
|
50
|
-
<span data-mk-indicator="" />
|
|
51
|
-
</div>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Hooks create the engine after mount and destroy it on unmount. Import themes separately from `/css/themes`, fonts from `/css/fonts`, and theme utilities from `/theme`.
|
|
57
|
-
|
|
58
|
-
## Copy source with the CLI
|
|
59
|
-
|
|
60
|
-
```sh
|
|
61
|
-
npx @yewdiel21/motion-kit list
|
|
62
|
-
npx @yewdiel21/motion-kit add tabs island drag-ruler --react --elements --dir src/motion-kit
|
|
63
|
-
npx @yewdiel21/motion-kit skill
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
The CLI copies the selected components, their dependencies and CSS. Each copied folder includes its README. It does not overwrite files without `--force`.
|
|
67
|
-
|
|
68
|
-
## Entry points
|
|
69
|
-
|
|
70
|
-
| Import | Contents |
|
|
71
|
-
|---|---|
|
|
72
|
-
| `@yewdiel21/motion-kit` | Factories, motion functions, easings and timing constants |
|
|
73
|
-
| `/auto` | Declarative `data-mk` initialization and head script |
|
|
74
|
-
| `/react` | Hooks and React components |
|
|
75
|
-
| `/elements` | Custom elements |
|
|
76
|
-
| `/theme` | Theme runtime and head script |
|
|
77
|
-
| `/theme/generate` | Optional Material 3 palette generator |
|
|
78
|
-
| `/gl` | Particle hero, liquid blend, matcap, shader grain and blur |
|
|
79
|
-
| `/css`, `/css/themes`, `/css/fonts` | Styles, theme palettes and font imports |
|
|
80
|
-
|
|
81
|
-
WebGL is optional. Keep accessible text and images in HTML; effects provide a fallback when graphics support is unavailable. Motion recipes respect reduced-motion preferences and return an idempotent `destroy()`.
|
|
82
|
-
|
|
83
|
-
Full component documentation and the playground source are in the [repository](https://github.com/YewdielMartinez/motion-kit). Each component README documents its markup, options and controls. License notices: `NOTICE`. License: `UNLICENSED`; all rights reserved.
|
|
84
|
-
|
|
85
|
-
## New in 0.14.0
|
|
86
|
-
|
|
87
|
-
Twenty-two application components with GSAP microinteractions, each with a factory, a React component, a custom element, its own stylesheet, a Spanish README and vanilla/React demos:
|
|
88
|
-
|
|
89
|
-
- Overlays and feedback: `tooltip` (automatic placement, an arrow that tracks its anchor), `popover` (an anchored, interactive panel that grows out of its trigger), `loading-button` (loading, success and error with a width glide), `empty-state` (drawn illustrations with an idle loop), `breadcrumb` (folds its middle into "…", glides when the path changes).
|
|
90
|
-
- Data at a glance: `stat-card` (a counted figure, trend badge, sparkline and target), `chart-tooltip` (a rich tooltip linked to `chart` or standalone).
|
|
91
|
-
- Inputs: `multi-select` (chips and search), `tag-input` (autocomplete and validation), `date-time-picker` (date and time in one field), `filter-builder` (conditions and nested AND/OR groups).
|
|
92
|
-
- Structures: `timeline`, `activity-feed` (live entries behind a "novedades" pill), `tree-view` (three-state checks, search, lazy children), `file-explorer` (tree, breadcrumb, list/grid, drag-and-drop), `json-viewer` (typed values, copy, flashes on new data), `virtual-list` (thousands of rows, measured heights, a position pill).
|
|
93
|
-
- Layout and data: `resizable-panel` (draggable separators with a rubber band and snap-to-collapse), `split-view`, `data-table` (sorting, search, filters, selection with bulk actions, pagination, row menus, columns), `editable-table` (in-place editing, validation and saving), `rich-text-editor` (toolbar, Markdown shortcuts, safe paste, links, counter).
|
|
94
|
-
|
|
95
|
-
New helpers: `place`, `matchesFilter`, `describeFilter`, `relativeTime`, `dayLabel`, `findNode`, `toggleCheck`, `searchTree`, `formatSize`, `sortEntries`, `createSizes`, `jsonPath`, `normaliseSizes`, `sanitizeHtml`, `toDateTimeValue`. `chart` gains an optional built-in tooltip and richer `mk:select` details; `breadcrumb` keeps a crumb that turns into a link in place.
|
|
96
|
-
|
|
97
|
-
## New in 0.13.0
|
|
98
|
-
|
|
99
|
-
Seven input components with GSAP microinteractions, each with a factory, a React component, a custom element, its own stylesheet and vanilla/React demos:
|
|
100
|
-
|
|
101
|
-
- `color-slider`: one channel (hue, saturation, brightness, lightness, red, green, blue, alpha) on a native range; gradient track, round thumb that grows when grabbed and a colour loupe.
|
|
102
|
-
- `color-area`: saturation × brightness square with drag, keyboard (two labelled ranges) and the same loupe.
|
|
103
|
-
- `color-field`: hex / rgb() / hsl() text with a live swatch; invalid input shakes and reverts.
|
|
104
|
-
- `color-picker`: a swatch button that grows into a panel (area, hue, alpha, field, presets, eyedropper), or the panel inline.
|
|
105
|
-
- `time-field`: segmented time (24 h or a.m./p.m.); digits roll, a focus pill glides, min/max validation.
|
|
106
|
-
- `range-calendar`: one or two months; two-click range with hover preview, a band that wipes in, unavailable days, full keyboard.
|
|
107
|
-
- `date-range-picker`: two segmented dates and a calendar popover that grows out of its button; presets and inline errors.
|
|
108
|
-
|
|
109
|
-
`command-search` now grows out of the button that opened it and folds back into it. New helpers: `parseColor`, `formatColor`, `toHex`, `toHsva`, `luminance`, `parseTime`, `formatTime`, `toRange`, `rangeKeys`.
|
|
110
|
-
|
|
111
|
-
## New in 0.12.0
|
|
112
|
-
|
|
113
|
-
Ten microinteraction components on the Melon Mind design line (neutral surfaces, sparse accent, glass and GSAP curves), each with a factory, a React component, a custom element, its own stylesheet and vanilla/React demos. All of them respect reduced motion.
|
|
114
|
-
|
|
115
|
-
- `credit-card`: the card fills in as you type (characters roll in, a frame follows the active field), detects the brand, checks Luhn and expiry, and turns over in 3D for the CVC.
|
|
116
|
-
- `command-search`: Ctrl/⌘ K palette with fuzzy matching, marked matches, groups, arrows and Enter; an `href` navigates unless `mk:select` is cancelled.
|
|
117
|
-
- `hold-confirm`: the button itself fills while held (pointer or Space/Enter); releasing early cancels, completion pops a check.
|
|
118
|
-
- `image-preview`: thumbnails open into a dialog that grows from the picture; arrows, swipe, double-click zoom, drag down or Escape to close.
|
|
119
|
-
- `like-button`: heart that squashes and pops with particles; the count rolls.
|
|
120
|
-
- `notification-bell`: the bell swings, the badge pops and a message rises beside it on the side with room.
|
|
121
|
-
- `password-strength`: four-segment meter, live rule checklist and show/hide toggle; can require a score through native validity.
|
|
122
|
-
- `scratch-card`: metallic canvas cover scratched with a finger or mouse; reveals at a threshold with confetti, plus a keyboard Reveal button.
|
|
123
|
-
- `star-rating`: native radios with hover preview, pop and sparkles; half stars when read-only.
|
|
124
|
-
- `swipe-actions`: rows slide to show actions on both sides; a long swipe runs the primary action, keyboard reaches every action.
|
|
125
|
-
|
|
126
|
-
Shared motion helpers are exported: `press`, `blurIn`, `blurOut`, `collapse`, `shake`, `ringPulse`, `burst` and `rollDigits`, plus the `click`, `playful`, `pop`, `wipe` and `shake` curves in `EASE`.
|
|
127
|
-
|
|
128
|
-
The 0.11 entries follow the same line: `code-block` is a dark editor with built-in syntax highlighting (ts/js/jsx, json, css, html/xml, shell) and `highlightLines`; `link-preview` adds a `row` variant; `progress` and `range-slider` glide between values; `chart` defaults to a monochrome single series with an end-value pill (`axis` and `endLabel` options) and animates its first draw and data updates; `hover-card`, `attachment`, `skeleton` and `questionnaire` adopt the glass and surfaces with tighter radii. Counts and ratings format numbers in the page language.
|
|
129
|
-
|
|
130
|
-
## New in 0.11.0
|
|
131
|
-
|
|
132
|
-
Ten everyday components, each with a factory, a React component, a custom element, its own stylesheet (`/css/components/<name>.css`) and vanilla/React demos in the playground. Data, uploads and persistence stay in your app.
|
|
133
|
-
|
|
134
|
-
- `attachment`: file chooser and drop zone with accept/size/count validation, cards with progress and status, image previews revoked on removal.
|
|
135
|
-
- `skeleton`: text, avatar, image or card placeholders with pulse or shimmer; the region reports `aria-busy` and keeps real content hidden until loaded.
|
|
136
|
-
- `questionnaire`: native-form steps (text, single and multiple choice) with per-step validation, focus on the first invalid field and a single completion; built on `steps`.
|
|
137
|
-
- `code-block`: title, language, line numbers and copy with success/error feedback; code is always text.
|
|
138
|
-
- `context-menu`: right click, Menu key, Shift+F10 or long press; placed inside the viewport, built on `menu`, focus returns to the opener.
|
|
139
|
-
- `drawer`: left/right side panel or bottom sheet on the dialog engine, with focus, Escape and scroll locking.
|
|
140
|
-
- `link-preview`: resource card or hover preview from app-supplied metadata; only http(s)/relative links.
|
|
141
|
-
- `progress`: bar or ring, determinate or indeterminate.
|
|
142
|
-
- `range-slider`: single value or interval on native range inputs.
|
|
143
|
-
- `chart`: SVG line, area and grouped/stacked bars with pointer/touch/keyboard tooltip and an accessible table, no chart runtime.
|
|
144
|
-
|
|
145
|
-
`hover-card` now flips and shifts to stay inside the viewport and repositions on scroll and resize; its API is unchanged (plus `reposition()`). `Dialog` gains an optional `anchor` box and a `drawer` variant used by the new surfaces.
|
|
146
|
-
|
|
147
|
-
## New in 0.10.0
|
|
148
|
-
|
|
149
|
-
Nineteen entries, each with vanilla and React demos in the playground:
|
|
150
|
-
|
|
151
|
-
- **Components** (factory, React and custom element): `quantity`, `pagination`, `hover-card`, `input-otp`, `studio-dock`, `trailer`, `calendar` (month and week views with events, ARIA grid) and `slot-picker` (day and time slots for bookings; accepts lists, maps or promises and submits through a hidden input).
|
|
152
|
-
- **Recipes** (factory, hook and `autoInit()`): `joined-cta`, `image-zoom`, `font-cycle`, `thumbnail-nav`, `action-button`, `film-hero`, `editorial-reveal`, `weight-hover` (requires a variable font), `sticker`, `scroll-dock` and `local-clock`.
|
|
153
|
-
- **CSS control**: `.mk-status`, an availability pill with a pulsing dot.
|
|
154
|
-
|
|
155
|
-
All new entries return an idempotent `destroy()`, support the keyboard and respect reduced motion. No original assets from the reference sites are included.
|
|
1
|
+
# @yewdiel21/motion-kit
|
|
2
|
+
|
|
3
|
+
Motion toolkit for vanilla JavaScript, Astro and React/Next.js. GSAP recipes, accessible UI components, 19 Material 3 themes, CSS controls and optional WebGL effects.
|
|
4
|
+
|
|
5
|
+
[Live playground](https://motion-kit-playground.vercel.app) — vanilla and React examples for every component.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @yewdiel21/motion-kit gsap
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For React components, install React 18 or newer. The theme generator additionally requires `@material/material-color-utilities@^0.3.0`.
|
|
14
|
+
|
|
15
|
+
## Vanilla / Astro
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import '@yewdiel21/motion-kit/css';
|
|
19
|
+
import { autoInit } from '@yewdiel21/motion-kit/auto';
|
|
20
|
+
|
|
21
|
+
const destroy = autoInit(document);
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<div class="mk-segmented" data-mk="tabs">
|
|
26
|
+
<button data-mk-tab aria-selected="true">Today</button>
|
|
27
|
+
<button data-mk-tab>Week</button>
|
|
28
|
+
<span data-mk-indicator></span>
|
|
29
|
+
</div>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Call `destroy()` before replacing the DOM. Add `MK_HEAD_SCRIPT` from `/auto` inline to `<head>` when using entrance recipes, and `defineElements()` from `/elements` to register the `mk-*` custom elements.
|
|
33
|
+
|
|
34
|
+
## React / Next.js
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
'use client';
|
|
38
|
+
|
|
39
|
+
import '@yewdiel21/motion-kit/css';
|
|
40
|
+
import { useRef } from 'react';
|
|
41
|
+
import { useTabs } from '@yewdiel21/motion-kit/react';
|
|
42
|
+
|
|
43
|
+
export function Tabs() {
|
|
44
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
45
|
+
useTabs(ref);
|
|
46
|
+
return (
|
|
47
|
+
<div ref={ref} className="mk-segmented">
|
|
48
|
+
<button data-mk-tab aria-selected="true">Today</button>
|
|
49
|
+
<button data-mk-tab>Week</button>
|
|
50
|
+
<span data-mk-indicator="" />
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Hooks create the engine after mount and destroy it on unmount. Import themes separately from `/css/themes`, fonts from `/css/fonts`, and theme utilities from `/theme`.
|
|
57
|
+
|
|
58
|
+
## Copy source with the CLI
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
npx @yewdiel21/motion-kit list
|
|
62
|
+
npx @yewdiel21/motion-kit add tabs island drag-ruler --react --elements --dir src/motion-kit
|
|
63
|
+
npx @yewdiel21/motion-kit skill
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The CLI copies the selected components, their dependencies and CSS. Each copied folder includes its README. It does not overwrite files without `--force`.
|
|
67
|
+
|
|
68
|
+
## Entry points
|
|
69
|
+
|
|
70
|
+
| Import | Contents |
|
|
71
|
+
|---|---|
|
|
72
|
+
| `@yewdiel21/motion-kit` | Factories, motion functions, easings and timing constants |
|
|
73
|
+
| `/auto` | Declarative `data-mk` initialization and head script |
|
|
74
|
+
| `/react` | Hooks and React components |
|
|
75
|
+
| `/elements` | Custom elements |
|
|
76
|
+
| `/theme` | Theme runtime and head script |
|
|
77
|
+
| `/theme/generate` | Optional Material 3 palette generator |
|
|
78
|
+
| `/gl` | Particle hero, liquid blend, matcap, shader grain and blur |
|
|
79
|
+
| `/css`, `/css/themes`, `/css/fonts` | Styles, theme palettes and font imports |
|
|
80
|
+
|
|
81
|
+
WebGL is optional. Keep accessible text and images in HTML; effects provide a fallback when graphics support is unavailable. Motion recipes respect reduced-motion preferences and return an idempotent `destroy()`.
|
|
82
|
+
|
|
83
|
+
Full component documentation and the playground source are in the [repository](https://github.com/YewdielMartinez/motion-kit). Each component README documents its markup, options and controls. License notices: `NOTICE`. License: `UNLICENSED`; all rights reserved.
|
|
84
|
+
|
|
85
|
+
## New in 0.14.0
|
|
86
|
+
|
|
87
|
+
Twenty-two application components with GSAP microinteractions, each with a factory, a React component, a custom element, its own stylesheet, a Spanish README and vanilla/React demos:
|
|
88
|
+
|
|
89
|
+
- Overlays and feedback: `tooltip` (automatic placement, an arrow that tracks its anchor), `popover` (an anchored, interactive panel that grows out of its trigger), `loading-button` (loading, success and error with a width glide), `empty-state` (drawn illustrations with an idle loop), `breadcrumb` (folds its middle into "…", glides when the path changes).
|
|
90
|
+
- Data at a glance: `stat-card` (a counted figure, trend badge, sparkline and target), `chart-tooltip` (a rich tooltip linked to `chart` or standalone).
|
|
91
|
+
- Inputs: `multi-select` (chips and search), `tag-input` (autocomplete and validation), `date-time-picker` (date and time in one field), `filter-builder` (conditions and nested AND/OR groups).
|
|
92
|
+
- Structures: `timeline`, `activity-feed` (live entries behind a "novedades" pill), `tree-view` (three-state checks, search, lazy children), `file-explorer` (tree, breadcrumb, list/grid, drag-and-drop), `json-viewer` (typed values, copy, flashes on new data), `virtual-list` (thousands of rows, measured heights, a position pill).
|
|
93
|
+
- Layout and data: `resizable-panel` (draggable separators with a rubber band and snap-to-collapse), `split-view`, `data-table` (sorting, search, filters, selection with bulk actions, pagination, row menus, columns), `editable-table` (in-place editing, validation and saving), `rich-text-editor` (toolbar, Markdown shortcuts, safe paste, links, counter).
|
|
94
|
+
|
|
95
|
+
New helpers: `place`, `matchesFilter`, `describeFilter`, `relativeTime`, `dayLabel`, `findNode`, `toggleCheck`, `searchTree`, `formatSize`, `sortEntries`, `createSizes`, `jsonPath`, `normaliseSizes`, `sanitizeHtml`, `toDateTimeValue`. `chart` gains an optional built-in tooltip and richer `mk:select` details; `breadcrumb` keeps a crumb that turns into a link in place.
|
|
96
|
+
|
|
97
|
+
## New in 0.13.0
|
|
98
|
+
|
|
99
|
+
Seven input components with GSAP microinteractions, each with a factory, a React component, a custom element, its own stylesheet and vanilla/React demos:
|
|
100
|
+
|
|
101
|
+
- `color-slider`: one channel (hue, saturation, brightness, lightness, red, green, blue, alpha) on a native range; gradient track, round thumb that grows when grabbed and a colour loupe.
|
|
102
|
+
- `color-area`: saturation × brightness square with drag, keyboard (two labelled ranges) and the same loupe.
|
|
103
|
+
- `color-field`: hex / rgb() / hsl() text with a live swatch; invalid input shakes and reverts.
|
|
104
|
+
- `color-picker`: a swatch button that grows into a panel (area, hue, alpha, field, presets, eyedropper), or the panel inline.
|
|
105
|
+
- `time-field`: segmented time (24 h or a.m./p.m.); digits roll, a focus pill glides, min/max validation.
|
|
106
|
+
- `range-calendar`: one or two months; two-click range with hover preview, a band that wipes in, unavailable days, full keyboard.
|
|
107
|
+
- `date-range-picker`: two segmented dates and a calendar popover that grows out of its button; presets and inline errors.
|
|
108
|
+
|
|
109
|
+
`command-search` now grows out of the button that opened it and folds back into it. New helpers: `parseColor`, `formatColor`, `toHex`, `toHsva`, `luminance`, `parseTime`, `formatTime`, `toRange`, `rangeKeys`.
|
|
110
|
+
|
|
111
|
+
## New in 0.12.0
|
|
112
|
+
|
|
113
|
+
Ten microinteraction components on the Melon Mind design line (neutral surfaces, sparse accent, glass and GSAP curves), each with a factory, a React component, a custom element, its own stylesheet and vanilla/React demos. All of them respect reduced motion.
|
|
114
|
+
|
|
115
|
+
- `credit-card`: the card fills in as you type (characters roll in, a frame follows the active field), detects the brand, checks Luhn and expiry, and turns over in 3D for the CVC.
|
|
116
|
+
- `command-search`: Ctrl/⌘ K palette with fuzzy matching, marked matches, groups, arrows and Enter; an `href` navigates unless `mk:select` is cancelled.
|
|
117
|
+
- `hold-confirm`: the button itself fills while held (pointer or Space/Enter); releasing early cancels, completion pops a check.
|
|
118
|
+
- `image-preview`: thumbnails open into a dialog that grows from the picture; arrows, swipe, double-click zoom, drag down or Escape to close.
|
|
119
|
+
- `like-button`: heart that squashes and pops with particles; the count rolls.
|
|
120
|
+
- `notification-bell`: the bell swings, the badge pops and a message rises beside it on the side with room.
|
|
121
|
+
- `password-strength`: four-segment meter, live rule checklist and show/hide toggle; can require a score through native validity.
|
|
122
|
+
- `scratch-card`: metallic canvas cover scratched with a finger or mouse; reveals at a threshold with confetti, plus a keyboard Reveal button.
|
|
123
|
+
- `star-rating`: native radios with hover preview, pop and sparkles; half stars when read-only.
|
|
124
|
+
- `swipe-actions`: rows slide to show actions on both sides; a long swipe runs the primary action, keyboard reaches every action.
|
|
125
|
+
|
|
126
|
+
Shared motion helpers are exported: `press`, `blurIn`, `blurOut`, `collapse`, `shake`, `ringPulse`, `burst` and `rollDigits`, plus the `click`, `playful`, `pop`, `wipe` and `shake` curves in `EASE`.
|
|
127
|
+
|
|
128
|
+
The 0.11 entries follow the same line: `code-block` is a dark editor with built-in syntax highlighting (ts/js/jsx, json, css, html/xml, shell) and `highlightLines`; `link-preview` adds a `row` variant; `progress` and `range-slider` glide between values; `chart` defaults to a monochrome single series with an end-value pill (`axis` and `endLabel` options) and animates its first draw and data updates; `hover-card`, `attachment`, `skeleton` and `questionnaire` adopt the glass and surfaces with tighter radii. Counts and ratings format numbers in the page language.
|
|
129
|
+
|
|
130
|
+
## New in 0.11.0
|
|
131
|
+
|
|
132
|
+
Ten everyday components, each with a factory, a React component, a custom element, its own stylesheet (`/css/components/<name>.css`) and vanilla/React demos in the playground. Data, uploads and persistence stay in your app.
|
|
133
|
+
|
|
134
|
+
- `attachment`: file chooser and drop zone with accept/size/count validation, cards with progress and status, image previews revoked on removal.
|
|
135
|
+
- `skeleton`: text, avatar, image or card placeholders with pulse or shimmer; the region reports `aria-busy` and keeps real content hidden until loaded.
|
|
136
|
+
- `questionnaire`: native-form steps (text, single and multiple choice) with per-step validation, focus on the first invalid field and a single completion; built on `steps`.
|
|
137
|
+
- `code-block`: title, language, line numbers and copy with success/error feedback; code is always text.
|
|
138
|
+
- `context-menu`: right click, Menu key, Shift+F10 or long press; placed inside the viewport, built on `menu`, focus returns to the opener.
|
|
139
|
+
- `drawer`: left/right side panel or bottom sheet on the dialog engine, with focus, Escape and scroll locking.
|
|
140
|
+
- `link-preview`: resource card or hover preview from app-supplied metadata; only http(s)/relative links.
|
|
141
|
+
- `progress`: bar or ring, determinate or indeterminate.
|
|
142
|
+
- `range-slider`: single value or interval on native range inputs.
|
|
143
|
+
- `chart`: SVG line, area and grouped/stacked bars with pointer/touch/keyboard tooltip and an accessible table, no chart runtime.
|
|
144
|
+
|
|
145
|
+
`hover-card` now flips and shifts to stay inside the viewport and repositions on scroll and resize; its API is unchanged (plus `reposition()`). `Dialog` gains an optional `anchor` box and a `drawer` variant used by the new surfaces.
|
|
146
|
+
|
|
147
|
+
## New in 0.10.0
|
|
148
|
+
|
|
149
|
+
Nineteen entries, each with vanilla and React demos in the playground:
|
|
150
|
+
|
|
151
|
+
- **Components** (factory, React and custom element): `quantity`, `pagination`, `hover-card`, `input-otp`, `studio-dock`, `trailer`, `calendar` (month and week views with events, ARIA grid) and `slot-picker` (day and time slots for bookings; accepts lists, maps or promises and submits through a hidden input).
|
|
152
|
+
- **Recipes** (factory, hook and `autoInit()`): `joined-cta`, `image-zoom`, `font-cycle`, `thumbnail-nav`, `action-button`, `film-hero`, `editorial-reveal`, `weight-hover` (requires a variable font), `sticker`, `scroll-dock` and `local-clock`.
|
|
153
|
+
- **CSS control**: `.mk-status`, an availability pill with a pulsing dot.
|
|
154
|
+
|
|
155
|
+
All new entries return an idempotent `destroy()`, support the keyboard and respect reduced motion. No original assets from the reference sites are included.
|
|
156
|
+
|
|
157
|
+
## Controles y gráficos · 0.15.0
|
|
158
|
+
|
|
159
|
+
- `pill-button`: el fondo de la píldora se reúne junto al icono; también tiene una variante inversa.
|
|
160
|
+
- `toolbar`: selector elástico tipo slime, orientación vertical u horizontal y etiquetas que siguen la selección.
|
|
161
|
+
- `bidirectional-slider`: volumen, balance o ajustes alrededor de un origen, con teclado y burbuja de valor.
|
|
162
|
+
- `orbit-menu`: acciones alrededor de un botón central, con entrada escalonada, foco y Escape.
|
|
163
|
+
- `voice-dots`: espera, escucha, pensamiento y habla; sigue un `MediaStream`, audio/video o niveles de tu aplicación.
|
|
164
|
+
- `chart`: línea, área, barras, combinación por serie y áreas por rangos con `lowerValues`.
|
|
165
|
+
- `pie-chart`, `radar-chart`, `radial-chart`, `sankey-chart` y `heatmap-chart`: datos animados, tooltips, selección por teclado y tablas accesibles.
|
|
166
|
+
|
|
167
|
+
Cada pieza incluye factory vanilla, custom element, componente React, estilos individuales, documentación y demos interactivas. Los gráficos nuevos comparten los tokens de color y actualizan sus datos sin desmontarse. Las animaciones respetan `prefers-reduced-motion`.
|
|
168
|
+
|
|
169
|
+
```tsx
|
|
170
|
+
import '@yewdiel21/motion-kit/css';
|
|
171
|
+
import { PillButton, Toolbar, VoiceDots, Chart, PieChart } from '@yewdiel21/motion-kit/react';
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Los cambios de 0.15 también incluyen `select`, `add-to-cart` y `scroll-island`, que ya estaban implementados antes de esta continuación.
|
package/bin/motion-kit.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// No dependencies: it reads src/, registry.json and skills/ shipped inside the package.
|
|
5
5
|
import { copyFileSync, cpSync, existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs';
|
|
6
6
|
import { homedir } from 'node:os';
|
|
7
|
-
import { dirname, join, posix, resolve } from 'node:path';
|
|
7
|
+
import { dirname, join, posix, relative, resolve } from 'node:path';
|
|
8
8
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
9
9
|
|
|
10
10
|
const PKG = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
@@ -129,7 +129,7 @@ function addThemes(ids) {
|
|
|
129
129
|
const dir = copyInto(ids.map((id) => `css/themes/${id}.css`));
|
|
130
130
|
out();
|
|
131
131
|
out('Next steps:');
|
|
132
|
-
out(` 1. Import the stylesheets after the tokens, e.g. import './${
|
|
132
|
+
out(` 1. Import the stylesheets after the tokens, e.g. import './${relative(process.cwd(), dir).split('\\').join('/')}/css/themes/${ids[0]}.css';`);
|
|
133
133
|
out(` 2. Set <html data-mk-theme="${ids[0]}"> (or call setTheme('${ids[0]}') from theme/theme.ts).`);
|
|
134
134
|
}
|
|
135
135
|
|
|
@@ -166,7 +166,7 @@ function add() {
|
|
|
166
166
|
];
|
|
167
167
|
const files = closure(start);
|
|
168
168
|
const dir = copyInto(files);
|
|
169
|
-
const rel =
|
|
169
|
+
const rel = relative(process.cwd(), dir).split('\\').join('/');
|
|
170
170
|
|
|
171
171
|
out();
|
|
172
172
|
out('Next steps:');
|
package/dist/auto/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createJoinedCta, a as createImageZoom, b as createFontCycle, d as createThumbnailNav, e as createActionButton, f as createFilmHero, g as createEditorialReveal, h as createDrawer, i as createWeightHover, j as createSticker, k as createScrollDock, l as createLocalClock, m as createSpringCards, C as CurvedCarouselInstance, n as createPile, o as createWords, p as createFlow, q as createPop, r as createFitText, s as createStretchFooter, t as createRadialMenu, u as createTabs, v as createCounter, w as createReveal, x as createReflow, y as createSlotText, z as createSortable, A as createMaskText, B as createCascade, D as createTextRoll, E as createLetters, F as createParallax, G as createDepthGrid, H as createFrameZoom, I as createContrast, J as createMarquee, K as createCardDock, L as createSnapStrip, M as createFillText, T as TicketMenuOptions, N as TicketMenuInstance, O as createInfiniteReel, P as createRepelBento, Q as createRotator, R as createDragRuler, S as createDockPill } from '../reduced-
|
|
2
|
-
export { U as MK_HEAD_SCRIPT } from '../reduced-
|
|
3
|
-
import { c as createStudioDock, a as createTrailer, b as createQuantity, d as createPagination, e as createHoverCard, f as createInputOtp, g as createCalendar, h as createSlotPicker, i as createCreditCard, j as createCommandSearch, k as createHoldConfirm, l as createImagePreview, m as createNotificationBell, n as createPasswordStrength, o as createScratchCard, p as createStarRating, q as createAttachment, r as createSkeleton, s as createQuestionnaire, t as createCodeBlock, u as createContextMenu, v as createLinkPreview, w as createProgress, x as createRangeSlider, y as createChart, z as createColorSlider, A as createColorArea, B as createColorField, C as createColorPicker, D as createTimeField, E as createRangeCalendar, F as createDateRangePicker, G as createTooltip, H as createPopover, I as createLoadingButton, J as createBreadcrumb, K as createEmptyState, L as createStatCard, M as createChartTooltip, N as createMultiSelect, O as createTagInput, P as createDateTimePicker, Q as createFilterBuilder, R as createTimeline, S as createActivityFeed, T as createTreeView, U as createFileExplorer, V as createJsonViewer, W as createVirtualList, X as createResizablePanel, Y as createSplitView, Z as createDataTable, _ as createEditableTable, $ as createRichTextEditor } from '../reveal-
|
|
1
|
+
import { c as createJoinedCta, a as createImageZoom, b as createFontCycle, d as createThumbnailNav, e as createActionButton, f as createFilmHero, g as createEditorialReveal, h as createDrawer, i as createWeightHover, j as createSticker, k as createScrollDock, l as createLocalClock, m as createSpringCards, C as CurvedCarouselInstance, n as createPile, o as createWords, p as createFlow, q as createPop, r as createFitText, s as createStretchFooter, t as createRadialMenu, u as createTabs, v as createCounter, w as createReveal, x as createReflow, y as createSlotText, z as createSortable, A as createMaskText, B as createCascade, D as createTextRoll, E as createLetters, F as createParallax, G as createDepthGrid, H as createFrameZoom, I as createContrast, J as createMarquee, K as createCardDock, L as createSnapStrip, M as createFillText, T as TicketMenuOptions, N as TicketMenuInstance, O as createInfiniteReel, P as createRepelBento, Q as createRotator, R as createDragRuler, S as createDockPill } from '../reduced-6X_bns60.js';
|
|
2
|
+
export { U as MK_HEAD_SCRIPT } from '../reduced-6X_bns60.js';
|
|
3
|
+
import { c as createStudioDock, a as createTrailer, b as createQuantity, d as createPagination, e as createHoverCard, f as createInputOtp, g as createCalendar, h as createSlotPicker, i as createCreditCard, j as createCommandSearch, k as createHoldConfirm, l as createImagePreview, m as createNotificationBell, n as createPasswordStrength, o as createScratchCard, p as createStarRating, q as createAttachment, r as createSkeleton, s as createQuestionnaire, t as createCodeBlock, u as createContextMenu, v as createLinkPreview, w as createProgress, x as createRangeSlider, y as createChart, z as createColorSlider, A as createColorArea, B as createColorField, C as createColorPicker, D as createTimeField, E as createRangeCalendar, F as createDateRangePicker, G as createTooltip, H as createPopover, I as createLoadingButton, J as createBreadcrumb, K as createEmptyState, L as createStatCard, M as createChartTooltip, N as createMultiSelect, O as createTagInput, P as createDateTimePicker, Q as createFilterBuilder, R as createTimeline, S as createActivityFeed, T as createTreeView, U as createFileExplorer, V as createJsonViewer, W as createVirtualList, X as createResizablePanel, Y as createSplitView, Z as createDataTable, _ as createEditableTable, $ as createRichTextEditor, a0 as createSelect, a1 as createAddToCart, a2 as createScrollIsland } from '../reveal-BfyKKsw4.js';
|
|
4
4
|
import { c as createLikeButton, a as createSwipeActions } from '../engine-QECQnGz1.js';
|
|
5
5
|
import { I as Instance } from '../types-BkS_raL8.js';
|
|
6
6
|
import 'gsap/SplitText';
|
|
@@ -70,6 +70,9 @@ declare const factories: {
|
|
|
70
70
|
'data-table': typeof createDataTable;
|
|
71
71
|
'editable-table': typeof createEditableTable;
|
|
72
72
|
'rich-text-editor': typeof createRichTextEditor;
|
|
73
|
+
select: typeof createSelect;
|
|
74
|
+
'add-to-cart': typeof createAddToCart;
|
|
75
|
+
'scroll-island': typeof createScrollIsland;
|
|
73
76
|
'weight-hover': typeof createWeightHover;
|
|
74
77
|
sticker: typeof createSticker;
|
|
75
78
|
'scroll-dock': typeof createScrollDock;
|
package/dist/auto/index.js
CHANGED
|
@@ -44,10 +44,11 @@ import {
|
|
|
44
44
|
createTicketMenu,
|
|
45
45
|
createWeightHover,
|
|
46
46
|
createWords
|
|
47
|
-
} from "../chunk-
|
|
47
|
+
} from "../chunk-6IRJYXJU.js";
|
|
48
48
|
import {
|
|
49
49
|
ScrollTrigger,
|
|
50
50
|
createActivityFeed,
|
|
51
|
+
createAddToCart,
|
|
51
52
|
createAttachment,
|
|
52
53
|
createBreadcrumb,
|
|
53
54
|
createCalendar,
|
|
@@ -90,6 +91,8 @@ import {
|
|
|
90
91
|
createResizablePanel,
|
|
91
92
|
createRichTextEditor,
|
|
92
93
|
createScratchCard,
|
|
94
|
+
createScrollIsland,
|
|
95
|
+
createSelect,
|
|
93
96
|
createSkeleton,
|
|
94
97
|
createSlotPicker,
|
|
95
98
|
createSplitView,
|
|
@@ -104,7 +107,7 @@ import {
|
|
|
104
107
|
createTrailer,
|
|
105
108
|
createTreeView,
|
|
106
109
|
createVirtualList
|
|
107
|
-
} from "../chunk-
|
|
110
|
+
} from "../chunk-A6QQCF6V.js";
|
|
108
111
|
import "../chunk-34EZ7DF4.js";
|
|
109
112
|
import {
|
|
110
113
|
MK_HEAD_SCRIPT
|
|
@@ -242,6 +245,9 @@ var factories = {
|
|
|
242
245
|
"data-table": createDataTable,
|
|
243
246
|
"editable-table": createEditableTable,
|
|
244
247
|
"rich-text-editor": createRichTextEditor,
|
|
248
|
+
"select": createSelect,
|
|
249
|
+
"add-to-cart": createAddToCart,
|
|
250
|
+
"scroll-island": createScrollIsland,
|
|
245
251
|
"weight-hover": createWeightHover,
|
|
246
252
|
"sticker": createSticker,
|
|
247
253
|
"scroll-dock": createScrollDock,
|
package/dist/auto/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/auto/parse-options.ts","../../src/auto/auto-init.ts"],"sourcesContent":["/** Attributes the recipes write themselves or use for children; never options. */\nconst RESERVED = new Set([\n '',\n 'ready',\n 'inview',\n 'carousel',\n 'open',\n 'card',\n 'slide',\n 'toggle',\n 'item',\n 'phantom',\n 'footerTitle',\n 'tab',\n 'indicator',\n 'chevron',\n 'text',\n 'role',\n 'motion',\n 'veil',\n 'swatch',\n 'part',\n 'sorting',\n 'sortableGroup',\n 'sortableLocked',\n 'cascade',\n 'on',\n 'tone',\n 'cursorZone',\n 'hidden',\n 'pressed',\n 'parallaxTarget',\n 'spread',\n 'expanded',\n 'settled',\n 'mode',\n 'active',\n 'islandToggle',\n 'islandPanel',\n 'islandItem',\n 'islandClose',\n 'reelTrack',\n 'reelCopy',\n 'dragging',\n 'dockItem',\n]);\n\nconst coerce = (value: string): unknown => {\n if (value === '' || value === 'true') return true;\n if (value === 'false') return false;\n if (/^-?\\d*\\.?\\d+$/.test(value)) return Number(value);\n return value;\n};\n\n/**\n * `data-mk-<option>` attributes → options object.\n * `data-mk-throw-boost=\"2.5\"` → `{ throwBoost: 2.5 }`, `data-mk-trigger=\"load\"` → `{ trigger: 'load' }`.\n */\nexport function parseOptions(el: HTMLElement): Record<string, unknown> {\n const options: Record<string, unknown> = {};\n for (const [key, raw] of Object.entries(el.dataset)) {\n if (!key.startsWith('mk') || key.length === 2) continue;\n const name = key.charAt(2).toLowerCase() + key.slice(3);\n if (RESERVED.has(name)) continue;\n options[name] = coerce(raw ?? '');\n }\n return options;\n}\n","import { createQuantity } from '../components/quantity/engine';\nimport { createPagination } from '../components/pagination/engine';\nimport { createHoverCard } from '../components/hover-card/engine';\nimport { createInputOtp } from '../components/input-otp/engine';\nimport { createJoinedCta } from '../recipes/joined-cta/create-joined-cta';\nimport { createImageZoom } from '../recipes/image-zoom/create-image-zoom';\nimport { createFontCycle } from '../recipes/font-cycle/create-font-cycle';\nimport { createThumbnailNav } from '../recipes/thumbnail-nav/create-thumbnail-nav';\nimport { createActionButton } from '../recipes/action-button/create-action-button';\nimport { createFilmHero } from '../recipes/film-hero/create-film-hero';\nimport { createEditorialReveal } from '../recipes/editorial-reveal/create-editorial-reveal';\nimport { createStudioDock } from '../components/studio-dock/engine';\nimport { createCalendar } from '../components/calendar/engine';\nimport { createSlotPicker } from '../components/slot-picker/engine';\nimport { createWeightHover } from '../recipes/weight-hover/create-weight-hover';\nimport { createSticker } from '../recipes/sticker/create-sticker';\nimport { createScrollDock } from '../recipes/scroll-dock/create-scroll-dock';\nimport { createLocalClock } from '../recipes/local-clock/create-local-clock';\nimport { createTrailer } from '../components/trailer/engine';\nimport { createCreditCard } from '../components/credit-card/engine';\nimport { createCommandSearch } from '../components/command-search/engine';\nimport { createHoldConfirm } from '../components/hold-confirm/engine';\nimport { createImagePreview } from '../components/image-preview/engine';\nimport { createLikeButton } from '../components/like-button/engine';\nimport { createNotificationBell } from '../components/notification-bell/engine';\nimport { createPasswordStrength } from '../components/password-strength/engine';\nimport { createScratchCard } from '../components/scratch-card/engine';\nimport { createStarRating } from '../components/star-rating/engine';\nimport { createSwipeActions } from '../components/swipe-actions/engine';\nimport { createAttachment } from '../components/attachment/engine';\nimport { createSkeleton } from '../components/skeleton/engine';\nimport { createQuestionnaire } from '../components/questionnaire/engine';\nimport { createCodeBlock } from '../components/code-block/engine';\nimport { createContextMenu } from '../components/context-menu/engine';\nimport { createDrawer } from '../components/drawer/engine';\nimport { createLinkPreview } from '../components/link-preview/engine';\nimport { createProgress } from '../components/progress/engine';\nimport { createRangeSlider } from '../components/range-slider/engine';\nimport { createChart } from '../components/chart/engine';\nimport { createColorSlider } from '../components/color-slider/engine';\nimport { createColorArea } from '../components/color-area/engine';\nimport { createColorField } from '../components/color-field/engine';\nimport { createColorPicker } from '../components/color-picker/engine';\nimport { createTimeField } from '../components/time-field/engine';\nimport { createRangeCalendar } from '../components/range-calendar/engine';\nimport { createDateRangePicker } from '../components/date-range-picker/engine';\nimport { createTooltip } from '../components/tooltip/engine';\nimport { createPopover } from '../components/popover/engine';\nimport { createLoadingButton } from '../components/loading-button/engine';\nimport { createBreadcrumb } from '../components/breadcrumb/engine';\nimport { createEmptyState } from '../components/empty-state/engine';\nimport { createStatCard } from '../components/stat-card/engine';\nimport { createChartTooltip } from '../components/chart-tooltip/engine';\nimport { createMultiSelect } from '../components/multi-select/engine';\nimport { createTagInput } from '../components/tag-input/engine';\nimport { createDateTimePicker } from '../components/date-time-picker/engine';\nimport { createFilterBuilder } from '../components/filter-builder/engine';\nimport { createTimeline } from '../components/timeline/engine';\nimport { createActivityFeed } from '../components/activity-feed/engine';\nimport { createTreeView } from '../components/tree-view/engine';\nimport { createFileExplorer } from '../components/file-explorer/engine';\nimport { createJsonViewer } from '../components/json-viewer/engine';\nimport { createVirtualList } from '../components/virtual-list/engine';\nimport { createResizablePanel } from '../components/resizable-panel/engine';\nimport { createSplitView } from '../components/split-view/engine';\nimport { createDataTable } from '../components/data-table/engine';\nimport { createEditableTable } from '../components/editable-table/engine';\nimport { createRichTextEditor } from '../components/rich-text-editor/engine';\nimport { ScrollTrigger } from '../core/gsap';\nimport { warnOnce, type Instance } from '../core/types';\nimport { createSpringCards } from '../recipes/spring-cards/create-spring-cards';\nimport { createCurvedCarousel } from '../recipes/curved-carousel/create-curved-carousel';\nimport { createPile } from '../recipes/pile/create-pile';\nimport { createWords } from '../recipes/words/create-words';\nimport { createFlow } from '../recipes/flow/create-flow';\nimport { createPop } from '../recipes/pop/create-pop';\nimport { createFitText } from '../recipes/fit-text/create-fit-text';\nimport { createStretchFooter } from '../recipes/stretch-footer/create-stretch-footer';\nimport { createRadialMenu } from '../recipes/radial-menu/create-radial-menu';\nimport { createTabs } from '../recipes/tabs/create-tabs';\nimport { createCounter } from '../recipes/counter/create-counter';\nimport { createDetails } from '../recipes/details/create-details';\nimport { createReveal } from '../recipes/reveal/create-reveal';\nimport { createReflow } from '../recipes/reflow/create-reflow';\nimport { createSlotText } from '../recipes/slot-text/create-slot-text';\nimport { createSortable } from '../recipes/sortable/create-sortable';\nimport { createMaskText } from '../recipes/mask-text/create-mask-text';\nimport { createCascade } from '../recipes/cascade/create-cascade';\nimport { createTextRoll } from '../recipes/text-roll/create-text-roll';\nimport { createLetters } from '../recipes/letters/create-letters';\nimport { createParallax } from '../recipes/parallax/create-parallax';\nimport { createDepthGrid } from '../recipes/depth-grid/create-depth-grid';\nimport { createFrameZoom } from '../recipes/frame-zoom/create-frame-zoom';\nimport { createContrast } from '../recipes/contrast/create-contrast';\nimport { createMarquee } from '../recipes/marquee/create-marquee';\nimport { createCardDock } from '../recipes/card-dock/create-card-dock';\nimport { createSnapStrip } from '../recipes/snap-strip/create-snap-strip';\nimport { createFillText } from '../recipes/fill-text/create-fill-text';\nimport { parseOptions } from './parse-options';\nimport { createTicketMenu } from '../recipes/ticket-menu/create-ticket-menu';\nimport { createInfiniteReel } from '../recipes/infinite-reel/create-infinite-reel';\nimport { createRepelBento } from '../recipes/repel-bento/create-repel-bento';\nimport { createRotator } from '../recipes/rotator/create-rotator';\nimport { createDragRuler } from '../recipes/drag-ruler/create-drag-ruler';\nimport { createDockPill } from '../recipes/dock-pill/create-dock-pill';\n\ntype Factory = (el: HTMLElement, options: Record<string, unknown>) => Instance;\n\nconst factories = {\n 'joined-cta': createJoinedCta,\n 'image-zoom': createImageZoom,\n 'font-cycle': createFontCycle,\n 'thumbnail-nav': createThumbnailNav,\n 'action-button': createActionButton,\n 'film-hero': createFilmHero,\n 'editorial-reveal': createEditorialReveal,\n 'studio-dock': createStudioDock,\n 'trailer': createTrailer,\n 'quantity': createQuantity,\n 'pagination': createPagination,\n 'hover-card': createHoverCard,\n 'input-otp': createInputOtp,\n 'calendar': createCalendar,\n 'slot-picker': createSlotPicker,\n 'credit-card': createCreditCard,\n 'command-search': createCommandSearch,\n 'hold-confirm': createHoldConfirm,\n 'image-preview': createImagePreview,\n 'like-button': createLikeButton,\n 'notification-bell': createNotificationBell,\n 'password-strength': createPasswordStrength,\n 'scratch-card': createScratchCard,\n 'star-rating': createStarRating,\n 'swipe-actions': createSwipeActions,\n 'attachment': createAttachment,\n 'skeleton': createSkeleton,\n 'questionnaire': createQuestionnaire,\n 'code-block': createCodeBlock,\n 'context-menu': createContextMenu,\n 'drawer': createDrawer,\n 'link-preview': createLinkPreview,\n 'progress': createProgress,\n 'range-slider': createRangeSlider,\n 'chart': createChart,\n 'color-slider': createColorSlider,\n 'color-area': createColorArea,\n 'color-field': createColorField,\n 'color-picker': createColorPicker,\n 'time-field': createTimeField,\n 'range-calendar': createRangeCalendar,\n 'date-range-picker': createDateRangePicker,\n 'tooltip': createTooltip,\n 'popover': createPopover,\n 'loading-button': createLoadingButton,\n 'breadcrumb': createBreadcrumb,\n 'empty-state': createEmptyState,\n 'stat-card': createStatCard,\n 'chart-tooltip': createChartTooltip,\n 'multi-select': createMultiSelect,\n 'tag-input': createTagInput,\n 'date-time-picker': createDateTimePicker,\n 'filter-builder': createFilterBuilder,\n 'timeline': createTimeline,\n 'activity-feed': createActivityFeed,\n 'tree-view': createTreeView,\n 'file-explorer': createFileExplorer,\n 'json-viewer': createJsonViewer,\n 'virtual-list': createVirtualList,\n 'resizable-panel': createResizablePanel,\n 'split-view': createSplitView,\n 'data-table': createDataTable,\n 'editable-table': createEditableTable,\n 'rich-text-editor': createRichTextEditor,\n 'weight-hover': createWeightHover,\n 'sticker': createSticker,\n 'scroll-dock': createScrollDock,\n 'local-clock': createLocalClock,\n 'spring-cards': createSpringCards,\n 'curved-carousel': (el, options) =>\n createCurvedCarousel(el, {\n ...options,\n onSelect: (index, slide) => el.dispatchEvent(new CustomEvent('mk:select', { detail: { index, slide }, bubbles: true })),\n }),\n pile: createPile,\n words: createWords,\n flow: createFlow,\n pop: createPop,\n 'fit-text': createFitText,\n 'stretch-footer': createStretchFooter,\n 'radial-menu': createRadialMenu,\n tabs: createTabs,\n counter: createCounter,\n details: (el) => createDetails(el),\n reveal: createReveal,\n reflow: createReflow,\n 'slot-text': createSlotText,\n sortable: createSortable,\n 'mask-text': createMaskText,\n cascade: createCascade,\n 'text-roll': createTextRoll,\n letters: createLetters,\n parallax: createParallax,\n 'depth-grid': createDepthGrid,\n 'frame-zoom': createFrameZoom,\n contrast: createContrast,\n marquee: createMarquee,\n 'card-dock': createCardDock,\n 'snap-strip': createSnapStrip,\n 'fill-text': createFillText,\n 'ticket-menu': createTicketMenu,\n 'infinite-reel': createInfiniteReel,\n 'repel-bento': createRepelBento,\n 'rotator': createRotator,\n 'drag-ruler': createDragRuler,\n 'dock-pill': createDockPill,\n} satisfies Record<string, Factory>;\n\nexport type RecipeName = keyof typeof factories;\nexport const recipeNames = Object.keys(factories) as RecipeName[];\n\n/** Measured text: wait for web fonts, fit before splitting into words. */\nconst AFTER_FONTS: RecipeName[] = ['fit-text', 'words', 'slot-text'];\n\nconst instances = new WeakMap<HTMLElement, Map<RecipeName, Instance>>();\n\nexport interface AutoInitOptions {\n /** Only start these recipes. */\n only?: RecipeName[];\n}\n\n/**\n * Start every `[data-mk]` recipe inside `root` (an element may list several:\n * `data-mk=\"fit-text words\"`). Options come from `data-mk-*` attributes.\n * Returns a function that destroys what this call created. Safe to call again:\n * elements that already run a recipe are skipped.\n */\nexport function autoInit(root: ParentNode = document, { only }: AutoInitOptions = {}): () => void {\n if (typeof window === 'undefined') return () => {};\n const created: Array<[HTMLElement, RecipeName, Instance]> = [];\n let cancelled = false;\n\n const elements = [...root.querySelectorAll<HTMLElement>('[data-mk]')];\n if (root instanceof HTMLElement && root.matches('[data-mk]')) elements.unshift(root);\n\n const start = (el: HTMLElement, name: RecipeName) => {\n if (cancelled) return;\n const running = instances.get(el) ?? new Map<RecipeName, Instance>();\n if (running.has(name)) return;\n const instance = (factories[name] as Factory)(el, parseOptions(el));\n running.set(name, instance);\n instances.set(el, running);\n created.push([el, name, instance]);\n };\n\n const now: Array<[HTMLElement, RecipeName]> = [];\n const later: Array<[HTMLElement, RecipeName]> = [];\n for (const el of elements) {\n for (const raw of (el.dataset.mk ?? '').split(/\\s+/).filter(Boolean)) {\n if (!(raw in factories)) {\n warnOnce(`autoInit: unknown recipe \"${raw}\" (known: ${recipeNames.join(', ')})`);\n continue;\n }\n const name = raw as RecipeName;\n if (only && !only.includes(name)) continue;\n (AFTER_FONTS.includes(name) ? later : now).push([el, name]);\n }\n }\n\n now.forEach(([el, name]) => start(el, name));\n if (later.length) {\n later.sort((a, b) => AFTER_FONTS.indexOf(a[1]) - AFTER_FONTS.indexOf(b[1]));\n const fonts = document.fonts?.ready ?? Promise.resolve();\n void Promise.race([fonts, new Promise((resolve) => setTimeout(resolve, 1500))]).then(() => {\n later.forEach(([el, name]) => start(el, name));\n if (!cancelled) ScrollTrigger.refresh();\n });\n }\n\n return () => {\n cancelled = true;\n for (const [el, name, instance] of created.reverse()) {\n instance.destroy();\n instances.get(el)?.delete(name);\n }\n created.length = 0;\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAM,WAAW,oBAAI,IAAI;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,IAAM,SAAS,CAAC,UAA2B;AACzC,MAAI,UAAU,MAAM,UAAU,OAAQ,QAAO;AAC7C,MAAI,UAAU,QAAS,QAAO;AAC9B,MAAI,gBAAgB,KAAK,KAAK,EAAG,QAAO,OAAO,KAAK;AACpD,SAAO;AACT;A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,IAAI,CAAC;AAC3C,MAAI,MAAM,QAAQ;AAChB,UAAM,KAAK,CAAC,GAAG,MAAM,YAAY,QAAQ,EAAE,CAAC,CAAC,IAAI,YAAY,QAAQ,EAAE,CAAC,CAAC,CAAC;AAC1E,UAAM,QAAQ,SAAS,OAAO,SAAS,QAAQ,QAAQ;AACvD,SAAK,QAAQ,KAAK,CAAC,OAAO,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM;AACzF,YAAM,QAAQ,CAAC,CAAC,IAAI,IAAI,MAAM,MAAM,IAAI,IAAI,CAAC;AAC7C,UAAI,CAAC,UAAW,eAAc,QAAQ;AAAA,IACxC,CAAC;AAAA,EACH;AAEA,SAAO,MAAM;AACX,gBAAY;AACZ,eAAW,CAAC,IAAI,MAAM,QAAQ,KAAK,QAAQ,QAAQ,GAAG;AACpD,eAAS,QAAQ;AACjB,gBAAU,IAAI,EAAE,GAAG,OAAO,IAAI;AAAA,IAChC;AACA,YAAQ,SAAS;AAAA,EACnB;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/auto/parse-options.ts","../../src/auto/auto-init.ts"],"sourcesContent":["/** Attributes the recipes write themselves or use for children; never options. */\nconst RESERVED = new Set([\n '',\n 'ready',\n 'inview',\n 'carousel',\n 'open',\n 'card',\n 'slide',\n 'toggle',\n 'item',\n 'phantom',\n 'footerTitle',\n 'tab',\n 'indicator',\n 'chevron',\n 'text',\n 'role',\n 'motion',\n 'veil',\n 'swatch',\n 'part',\n 'sorting',\n 'sortableGroup',\n 'sortableLocked',\n 'cascade',\n 'on',\n 'tone',\n 'cursorZone',\n 'hidden',\n 'pressed',\n 'parallaxTarget',\n 'spread',\n 'expanded',\n 'settled',\n 'mode',\n 'active',\n 'islandToggle',\n 'islandPanel',\n 'islandItem',\n 'islandClose',\n 'reelTrack',\n 'reelCopy',\n 'dragging',\n 'dockItem',\n]);\n\nconst coerce = (value: string): unknown => {\n if (value === '' || value === 'true') return true;\n if (value === 'false') return false;\n if (/^-?\\d*\\.?\\d+$/.test(value)) return Number(value);\n return value;\n};\n\n/**\n * `data-mk-<option>` attributes → options object.\n * `data-mk-throw-boost=\"2.5\"` → `{ throwBoost: 2.5 }`, `data-mk-trigger=\"load\"` → `{ trigger: 'load' }`.\n */\nexport function parseOptions(el: HTMLElement): Record<string, unknown> {\n const options: Record<string, unknown> = {};\n for (const [key, raw] of Object.entries(el.dataset)) {\n if (!key.startsWith('mk') || key.length === 2) continue;\n const name = key.charAt(2).toLowerCase() + key.slice(3);\n if (RESERVED.has(name)) continue;\n options[name] = coerce(raw ?? '');\n }\n return options;\n}\n","import { createQuantity } from '../components/quantity/engine';\nimport { createPagination } from '../components/pagination/engine';\nimport { createHoverCard } from '../components/hover-card/engine';\nimport { createInputOtp } from '../components/input-otp/engine';\nimport { createJoinedCta } from '../recipes/joined-cta/create-joined-cta';\nimport { createImageZoom } from '../recipes/image-zoom/create-image-zoom';\nimport { createFontCycle } from '../recipes/font-cycle/create-font-cycle';\nimport { createThumbnailNav } from '../recipes/thumbnail-nav/create-thumbnail-nav';\nimport { createActionButton } from '../recipes/action-button/create-action-button';\nimport { createFilmHero } from '../recipes/film-hero/create-film-hero';\nimport { createEditorialReveal } from '../recipes/editorial-reveal/create-editorial-reveal';\nimport { createStudioDock } from '../components/studio-dock/engine';\nimport { createCalendar } from '../components/calendar/engine';\nimport { createSlotPicker } from '../components/slot-picker/engine';\nimport { createWeightHover } from '../recipes/weight-hover/create-weight-hover';\nimport { createSticker } from '../recipes/sticker/create-sticker';\nimport { createScrollDock } from '../recipes/scroll-dock/create-scroll-dock';\nimport { createLocalClock } from '../recipes/local-clock/create-local-clock';\nimport { createTrailer } from '../components/trailer/engine';\nimport { createCreditCard } from '../components/credit-card/engine';\nimport { createCommandSearch } from '../components/command-search/engine';\nimport { createHoldConfirm } from '../components/hold-confirm/engine';\nimport { createImagePreview } from '../components/image-preview/engine';\nimport { createLikeButton } from '../components/like-button/engine';\nimport { createNotificationBell } from '../components/notification-bell/engine';\nimport { createPasswordStrength } from '../components/password-strength/engine';\nimport { createScratchCard } from '../components/scratch-card/engine';\nimport { createStarRating } from '../components/star-rating/engine';\nimport { createSwipeActions } from '../components/swipe-actions/engine';\nimport { createAttachment } from '../components/attachment/engine';\nimport { createSkeleton } from '../components/skeleton/engine';\nimport { createQuestionnaire } from '../components/questionnaire/engine';\nimport { createCodeBlock } from '../components/code-block/engine';\nimport { createContextMenu } from '../components/context-menu/engine';\nimport { createDrawer } from '../components/drawer/engine';\nimport { createLinkPreview } from '../components/link-preview/engine';\nimport { createProgress } from '../components/progress/engine';\nimport { createRangeSlider } from '../components/range-slider/engine';\nimport { createChart } from '../components/chart/engine';\nimport { createColorSlider } from '../components/color-slider/engine';\nimport { createColorArea } from '../components/color-area/engine';\nimport { createColorField } from '../components/color-field/engine';\nimport { createColorPicker } from '../components/color-picker/engine';\nimport { createTimeField } from '../components/time-field/engine';\nimport { createRangeCalendar } from '../components/range-calendar/engine';\nimport { createDateRangePicker } from '../components/date-range-picker/engine';\nimport { createTooltip } from '../components/tooltip/engine';\nimport { createPopover } from '../components/popover/engine';\nimport { createLoadingButton } from '../components/loading-button/engine';\nimport { createBreadcrumb } from '../components/breadcrumb/engine';\nimport { createEmptyState } from '../components/empty-state/engine';\nimport { createStatCard } from '../components/stat-card/engine';\nimport { createChartTooltip } from '../components/chart-tooltip/engine';\nimport { createMultiSelect } from '../components/multi-select/engine';\nimport { createTagInput } from '../components/tag-input/engine';\nimport { createDateTimePicker } from '../components/date-time-picker/engine';\nimport { createFilterBuilder } from '../components/filter-builder/engine';\nimport { createTimeline } from '../components/timeline/engine';\nimport { createActivityFeed } from '../components/activity-feed/engine';\nimport { createTreeView } from '../components/tree-view/engine';\nimport { createFileExplorer } from '../components/file-explorer/engine';\nimport { createJsonViewer } from '../components/json-viewer/engine';\nimport { createVirtualList } from '../components/virtual-list/engine';\nimport { createResizablePanel } from '../components/resizable-panel/engine';\nimport { createSplitView } from '../components/split-view/engine';\nimport { createDataTable } from '../components/data-table/engine';\nimport { createEditableTable } from '../components/editable-table/engine';\nimport { createRichTextEditor } from '../components/rich-text-editor/engine';\nimport { createSelect } from '../components/select/engine';\nimport { createAddToCart } from '../components/add-to-cart/engine';\nimport { createScrollIsland } from '../components/scroll-island/engine';\nimport { ScrollTrigger } from '../core/gsap';\nimport { warnOnce, type Instance } from '../core/types';\nimport { createSpringCards } from '../recipes/spring-cards/create-spring-cards';\nimport { createCurvedCarousel } from '../recipes/curved-carousel/create-curved-carousel';\nimport { createPile } from '../recipes/pile/create-pile';\nimport { createWords } from '../recipes/words/create-words';\nimport { createFlow } from '../recipes/flow/create-flow';\nimport { createPop } from '../recipes/pop/create-pop';\nimport { createFitText } from '../recipes/fit-text/create-fit-text';\nimport { createStretchFooter } from '../recipes/stretch-footer/create-stretch-footer';\nimport { createRadialMenu } from '../recipes/radial-menu/create-radial-menu';\nimport { createTabs } from '../recipes/tabs/create-tabs';\nimport { createCounter } from '../recipes/counter/create-counter';\nimport { createDetails } from '../recipes/details/create-details';\nimport { createReveal } from '../recipes/reveal/create-reveal';\nimport { createReflow } from '../recipes/reflow/create-reflow';\nimport { createSlotText } from '../recipes/slot-text/create-slot-text';\nimport { createSortable } from '../recipes/sortable/create-sortable';\nimport { createMaskText } from '../recipes/mask-text/create-mask-text';\nimport { createCascade } from '../recipes/cascade/create-cascade';\nimport { createTextRoll } from '../recipes/text-roll/create-text-roll';\nimport { createLetters } from '../recipes/letters/create-letters';\nimport { createParallax } from '../recipes/parallax/create-parallax';\nimport { createDepthGrid } from '../recipes/depth-grid/create-depth-grid';\nimport { createFrameZoom } from '../recipes/frame-zoom/create-frame-zoom';\nimport { createContrast } from '../recipes/contrast/create-contrast';\nimport { createMarquee } from '../recipes/marquee/create-marquee';\nimport { createCardDock } from '../recipes/card-dock/create-card-dock';\nimport { createSnapStrip } from '../recipes/snap-strip/create-snap-strip';\nimport { createFillText } from '../recipes/fill-text/create-fill-text';\nimport { parseOptions } from './parse-options';\nimport { createTicketMenu } from '../recipes/ticket-menu/create-ticket-menu';\nimport { createInfiniteReel } from '../recipes/infinite-reel/create-infinite-reel';\nimport { createRepelBento } from '../recipes/repel-bento/create-repel-bento';\nimport { createRotator } from '../recipes/rotator/create-rotator';\nimport { createDragRuler } from '../recipes/drag-ruler/create-drag-ruler';\nimport { createDockPill } from '../recipes/dock-pill/create-dock-pill';\n\ntype Factory = (el: HTMLElement, options: Record<string, unknown>) => Instance;\n\nconst factories = {\n 'joined-cta': createJoinedCta,\n 'image-zoom': createImageZoom,\n 'font-cycle': createFontCycle,\n 'thumbnail-nav': createThumbnailNav,\n 'action-button': createActionButton,\n 'film-hero': createFilmHero,\n 'editorial-reveal': createEditorialReveal,\n 'studio-dock': createStudioDock,\n 'trailer': createTrailer,\n 'quantity': createQuantity,\n 'pagination': createPagination,\n 'hover-card': createHoverCard,\n 'input-otp': createInputOtp,\n 'calendar': createCalendar,\n 'slot-picker': createSlotPicker,\n 'credit-card': createCreditCard,\n 'command-search': createCommandSearch,\n 'hold-confirm': createHoldConfirm,\n 'image-preview': createImagePreview,\n 'like-button': createLikeButton,\n 'notification-bell': createNotificationBell,\n 'password-strength': createPasswordStrength,\n 'scratch-card': createScratchCard,\n 'star-rating': createStarRating,\n 'swipe-actions': createSwipeActions,\n 'attachment': createAttachment,\n 'skeleton': createSkeleton,\n 'questionnaire': createQuestionnaire,\n 'code-block': createCodeBlock,\n 'context-menu': createContextMenu,\n 'drawer': createDrawer,\n 'link-preview': createLinkPreview,\n 'progress': createProgress,\n 'range-slider': createRangeSlider,\n 'chart': createChart,\n 'color-slider': createColorSlider,\n 'color-area': createColorArea,\n 'color-field': createColorField,\n 'color-picker': createColorPicker,\n 'time-field': createTimeField,\n 'range-calendar': createRangeCalendar,\n 'date-range-picker': createDateRangePicker,\n 'tooltip': createTooltip,\n 'popover': createPopover,\n 'loading-button': createLoadingButton,\n 'breadcrumb': createBreadcrumb,\n 'empty-state': createEmptyState,\n 'stat-card': createStatCard,\n 'chart-tooltip': createChartTooltip,\n 'multi-select': createMultiSelect,\n 'tag-input': createTagInput,\n 'date-time-picker': createDateTimePicker,\n 'filter-builder': createFilterBuilder,\n 'timeline': createTimeline,\n 'activity-feed': createActivityFeed,\n 'tree-view': createTreeView,\n 'file-explorer': createFileExplorer,\n 'json-viewer': createJsonViewer,\n 'virtual-list': createVirtualList,\n 'resizable-panel': createResizablePanel,\n 'split-view': createSplitView,\n 'data-table': createDataTable,\n 'editable-table': createEditableTable,\n 'rich-text-editor': createRichTextEditor,\n 'select': createSelect,\n 'add-to-cart': createAddToCart,\n 'scroll-island': createScrollIsland,\n 'weight-hover': createWeightHover,\n 'sticker': createSticker,\n 'scroll-dock': createScrollDock,\n 'local-clock': createLocalClock,\n 'spring-cards': createSpringCards,\n 'curved-carousel': (el, options) =>\n createCurvedCarousel(el, {\n ...options,\n onSelect: (index, slide) => el.dispatchEvent(new CustomEvent('mk:select', { detail: { index, slide }, bubbles: true })),\n }),\n pile: createPile,\n words: createWords,\n flow: createFlow,\n pop: createPop,\n 'fit-text': createFitText,\n 'stretch-footer': createStretchFooter,\n 'radial-menu': createRadialMenu,\n tabs: createTabs,\n counter: createCounter,\n details: (el) => createDetails(el),\n reveal: createReveal,\n reflow: createReflow,\n 'slot-text': createSlotText,\n sortable: createSortable,\n 'mask-text': createMaskText,\n cascade: createCascade,\n 'text-roll': createTextRoll,\n letters: createLetters,\n parallax: createParallax,\n 'depth-grid': createDepthGrid,\n 'frame-zoom': createFrameZoom,\n contrast: createContrast,\n marquee: createMarquee,\n 'card-dock': createCardDock,\n 'snap-strip': createSnapStrip,\n 'fill-text': createFillText,\n 'ticket-menu': createTicketMenu,\n 'infinite-reel': createInfiniteReel,\n 'repel-bento': createRepelBento,\n 'rotator': createRotator,\n 'drag-ruler': createDragRuler,\n 'dock-pill': createDockPill,\n} satisfies Record<string, Factory>;\n\nexport type RecipeName = keyof typeof factories;\nexport const recipeNames = Object.keys(factories) as RecipeName[];\n\n/** Measured text: wait for web fonts, fit before splitting into words. */\nconst AFTER_FONTS: RecipeName[] = ['fit-text', 'words', 'slot-text'];\n\nconst instances = new WeakMap<HTMLElement, Map<RecipeName, Instance>>();\n\nexport interface AutoInitOptions {\n /** Only start these recipes. */\n only?: RecipeName[];\n}\n\n/**\n * Start every `[data-mk]` recipe inside `root` (an element may list several:\n * `data-mk=\"fit-text words\"`). Options come from `data-mk-*` attributes.\n * Returns a function that destroys what this call created. Safe to call again:\n * elements that already run a recipe are skipped.\n */\nexport function autoInit(root: ParentNode = document, { only }: AutoInitOptions = {}): () => void {\n if (typeof window === 'undefined') return () => {};\n const created: Array<[HTMLElement, RecipeName, Instance]> = [];\n let cancelled = false;\n\n const elements = [...root.querySelectorAll<HTMLElement>('[data-mk]')];\n if (root instanceof HTMLElement && root.matches('[data-mk]')) elements.unshift(root);\n\n const start = (el: HTMLElement, name: RecipeName) => {\n if (cancelled) return;\n const running = instances.get(el) ?? new Map<RecipeName, Instance>();\n if (running.has(name)) return;\n const instance = (factories[name] as Factory)(el, parseOptions(el));\n running.set(name, instance);\n instances.set(el, running);\n created.push([el, name, instance]);\n };\n\n const now: Array<[HTMLElement, RecipeName]> = [];\n const later: Array<[HTMLElement, RecipeName]> = [];\n for (const el of elements) {\n for (const raw of (el.dataset.mk ?? '').split(/\\s+/).filter(Boolean)) {\n if (!(raw in factories)) {\n warnOnce(`autoInit: unknown recipe \"${raw}\" (known: ${recipeNames.join(', ')})`);\n continue;\n }\n const name = raw as RecipeName;\n if (only && !only.includes(name)) continue;\n (AFTER_FONTS.includes(name) ? later : now).push([el, name]);\n }\n }\n\n now.forEach(([el, name]) => start(el, name));\n if (later.length) {\n later.sort((a, b) => AFTER_FONTS.indexOf(a[1]) - AFTER_FONTS.indexOf(b[1]));\n const fonts = document.fonts?.ready ?? Promise.resolve();\n void Promise.race([fonts, new Promise((resolve) => setTimeout(resolve, 1500))]).then(() => {\n later.forEach(([el, name]) => start(el, name));\n if (!cancelled) ScrollTrigger.refresh();\n });\n }\n\n return () => {\n cancelled = true;\n for (const [el, name, instance] of created.reverse()) {\n instance.destroy();\n instances.get(el)?.delete(name);\n }\n created.length = 0;\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAM,WAAW,oBAAI,IAAI;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,IAAM,SAAS,CAAC,UAA2B;AACzC,MAAI,UAAU,MAAM,UAAU,OAAQ,QAAO;AAC7C,MAAI,UAAU,QAAS,QAAO;AAC9B,MAAI,gBAAgB,KAAK,KAAK,EAAG,QAAO,OAAO,KAAK;AACpD,SAAO;AACT;AAMO,SAAS,aAAa,IAA0C;AACrE,QAAM,UAAmC,CAAC;AAC1C,aAAW,CAAC,KAAK,GAAG,KAAK,OAAO,QAAQ,GAAG,OAAO,GAAG;AACnD,QAAI,CAAC,IAAI,WAAW,IAAI,KAAK,IAAI,WAAW,EAAG;AAC/C,UAAM,OAAO,IAAI,OAAO,CAAC,EAAE,YAAY,IAAI,IAAI,MAAM,CAAC;AACtD,Q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ACvD,SAAK,QAAQ,KAAK,CAAC,OAAO,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM;AACzF,YAAM,QAAQ,CAAC,CAAC,IAAI,IAAI,MAAM,MAAM,IAAI,IAAI,CAAC;AAC7C,UAAI,CAAC,UAAW,eAAc,QAAQ;AAAA,IACxC,CAAC;AAAA,EACH;AAEA,SAAO,MAAM;AACX,gBAAY;AACZ,eAAW,CAAC,IAAI,MAAM,QAAQ,KAAK,QAAQ,QAAQ,GAAG;AACpD,eAAS,QAAQ;AACjB,gBAAU,IAAI,EAAE,GAAG,OAAO,IAAI;AAAA,IAChC;AACA,YAAQ,SAAS;AAAA,EACnB;AACF;","names":[]}
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
slideIndicator,
|
|
19
19
|
splitGraphemes,
|
|
20
20
|
takeMovement
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-A6QQCF6V.js";
|
|
22
22
|
import {
|
|
23
23
|
clamp,
|
|
24
24
|
damp,
|
|
@@ -4491,4 +4491,4 @@ export {
|
|
|
4491
4491
|
createScrollDock,
|
|
4492
4492
|
createLocalClock
|
|
4493
4493
|
};
|
|
4494
|
-
//# sourceMappingURL=chunk-
|
|
4494
|
+
//# sourceMappingURL=chunk-6IRJYXJU.js.map
|