dialkit 1.2.0 → 1.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.
Files changed (61) hide show
  1. package/README.md +223 -4
  2. package/dist/dropdown-position.d.ts +15 -0
  3. package/dist/dropdown-position.js +22 -0
  4. package/dist/dropdown-position.js.map +1 -0
  5. package/dist/icons.d.ts +19 -0
  6. package/dist/icons.js +39 -0
  7. package/dist/icons.js.map +1 -0
  8. package/dist/index.cjs +697 -307
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.cts +42 -5
  11. package/dist/index.d.ts +42 -5
  12. package/dist/index.js +720 -331
  13. package/dist/index.js.map +1 -1
  14. package/dist/panel-drag.d.ts +19 -0
  15. package/dist/panel-drag.js +72 -0
  16. package/dist/panel-drag.js.map +1 -0
  17. package/dist/shortcut-utils.d.ts +39 -0
  18. package/dist/shortcut-utils.js +100 -0
  19. package/dist/shortcut-utils.js.map +1 -0
  20. package/dist/solid/index.cjs +661 -204
  21. package/dist/solid/index.cjs.map +1 -1
  22. package/dist/solid/index.d.cts +40 -3
  23. package/dist/solid/index.d.ts +40 -3
  24. package/dist/solid/index.js +646 -190
  25. package/dist/solid/index.js.map +1 -1
  26. package/dist/store/index.cjs +272 -41
  27. package/dist/store/index.cjs.map +1 -1
  28. package/dist/store/index.d.cts +30 -3
  29. package/dist/store/index.d.ts +30 -3
  30. package/dist/store/index.js +269 -40
  31. package/dist/store/index.js.map +1 -1
  32. package/dist/styles.css +105 -7
  33. package/dist/svelte/components/DialRoot.svelte +176 -11
  34. package/dist/svelte/components/DialRoot.svelte.d.ts +1 -0
  35. package/dist/svelte/components/DialRoot.svelte.d.ts.map +1 -1
  36. package/dist/svelte/components/Folder.svelte +24 -13
  37. package/dist/svelte/components/Folder.svelte.d.ts +1 -0
  38. package/dist/svelte/components/Folder.svelte.d.ts.map +1 -1
  39. package/dist/svelte/components/Panel.svelte +98 -71
  40. package/dist/svelte/components/Panel.svelte.d.ts +2 -0
  41. package/dist/svelte/components/Panel.svelte.d.ts.map +1 -1
  42. package/dist/svelte/components/PresetManager.svelte +5 -5
  43. package/dist/svelte/components/PresetManager.svelte.d.ts.map +1 -1
  44. package/dist/svelte/components/SelectControl.svelte +6 -14
  45. package/dist/svelte/components/SelectControl.svelte.d.ts.map +1 -1
  46. package/dist/svelte/createDialKit.svelte.d.ts +11 -1
  47. package/dist/svelte/createDialKit.svelte.d.ts.map +1 -1
  48. package/dist/svelte/createDialKit.svelte.js +61 -34
  49. package/dist/svelte/index.d.ts +3 -3
  50. package/dist/svelte/index.d.ts.map +1 -1
  51. package/dist/svelte/index.js +1 -1
  52. package/dist/svelte/theme-css.d.ts +1 -1
  53. package/dist/svelte/theme-css.d.ts.map +1 -1
  54. package/dist/svelte/theme-css.js +105 -7
  55. package/dist/vue/index.cjs +573 -132
  56. package/dist/vue/index.cjs.map +1 -1
  57. package/dist/vue/index.d.cts +53 -6
  58. package/dist/vue/index.d.ts +53 -6
  59. package/dist/vue/index.js +573 -133
  60. package/dist/vue/index.js.map +1 -1
  61. package/package.json +2 -2
package/README.md CHANGED
@@ -1,4 +1,6 @@
1
- # dialkit
1
+ # dialkit v1.2.0
2
+
3
+ <img src="https://joshpuckett.me/images/dialkit.png" width="100%" />
2
4
 
3
5
  Real-time parameter tweaking for React, Solid, Svelte, and Vue, created by Josh Puckett.
4
6
 
@@ -70,6 +72,8 @@ const params = useDialKit(name, config, options?)
70
72
  |-------|------|-------------|
71
73
  | `name` | `string` | Panel title displayed in the UI |
72
74
  | `config` | `DialConfig` | Parameter definitions (see Control Types below) |
75
+ | `options.id` | `string` | Stable logical id for sharing values across remounts/pages |
76
+ | `options.persist` | `DialKitPersistOptions` | Persist values to browser storage |
73
77
  | `options.onAction` | `(path: string) => void` | Callback when action buttons are clicked |
74
78
  | `options.shortcuts` | `Record<string, ShortcutConfig>` | Keyboard shortcuts for controls (see [Keyboard Shortcuts](#keyboard-shortcuts)) |
75
79
 
@@ -77,6 +81,122 @@ Returns a fully typed object matching your config shape with live values. Updati
77
81
 
78
82
  ---
79
83
 
84
+ ## Stable IDs and Persistence
85
+
86
+ By default, a DialKit panel is tied to the lifecycle of the component that calls `useDialKit`. Pass `id` when multiple mounts should reconnect to the same logical panel, and pass `persist: true` when values should survive reloads and browser sessions.
87
+
88
+ ```tsx
89
+ // dials/useOnboardingDials.ts
90
+ import { useDialKit } from 'dialkit';
91
+
92
+ export function useOnboardingDials() {
93
+ return useDialKit('Onboarding', {
94
+ name: { type: 'text', default: 'Avery', placeholder: 'Name' },
95
+ avatarScale: [1, 0.6, 1.6, 0.01],
96
+ accent: { type: 'color', default: '#6C5CE7' },
97
+ }, {
98
+ id: 'onboarding',
99
+ persist: true,
100
+ });
101
+ }
102
+ ```
103
+
104
+ Use that helper anywhere the shared values are needed:
105
+
106
+ ```tsx
107
+ function PageTwo() {
108
+ const onboarding = useOnboardingDials();
109
+
110
+ const page = useDialKit('Page Two', {
111
+ cardRadius: [16, 0, 64],
112
+ });
113
+
114
+ return (
115
+ <Card
116
+ name={onboarding.name}
117
+ radius={page.cardRadius}
118
+ accent={onboarding.accent}
119
+ />
120
+ );
121
+ }
122
+ ```
123
+
124
+ When `PageTwo` is mounted, the single `<DialRoot />` shows both `Onboarding` and `Page Two` as top-level sections. If another page calls `useOnboardingDials()`, DialKit reconnects to the same `id` and keeps the shared values.
125
+
126
+ `persist: true` stores values, presets, and the active preset in `localStorage` using `dialkit:${id}` as the key. Use the object form to customize storage:
127
+
128
+ ```tsx
129
+ useDialKit('Onboarding', config, {
130
+ id: 'onboarding',
131
+ persist: {
132
+ key: 'my-app:onboarding-dials',
133
+ storage: 'sessionStorage',
134
+ presets: false,
135
+ },
136
+ });
137
+ ```
138
+
139
+ The `id` string has no special format; it only needs to be reused wherever you want the same logical panel. Without `id` or `persist`, DialKit behaves exactly as before.
140
+
141
+ ---
142
+
143
+ ## useDialKitController
144
+
145
+ Use the controller API when your app code also needs to update DialKit values, such as reset buttons, URL sync, or app-defined preset buttons.
146
+
147
+ ```tsx
148
+ import { useDialKitController } from 'dialkit';
149
+
150
+ function Card() {
151
+ const dial = useDialKitController('Card', {
152
+ blur: [24, 0, 100],
153
+ scale: 1.2,
154
+ color: '#ff5500',
155
+ visible: true,
156
+ shadow: {
157
+ radius: [16, 0, 64],
158
+ },
159
+ });
160
+
161
+ return (
162
+ <>
163
+ <button onClick={() => dial.setValues({
164
+ blur: 48,
165
+ scale: 1,
166
+ shadow: { radius: 28 },
167
+ })}>
168
+ Apply preset
169
+ </button>
170
+ <button onClick={() => dial.resetValues()}>Reset</button>
171
+
172
+ <div style={{
173
+ filter: `blur(${dial.values.blur}px)`,
174
+ transform: `scale(${dial.values.scale})`,
175
+ color: dial.values.color,
176
+ opacity: dial.values.visible ? 1 : 0,
177
+ borderRadius: dial.values.shadow.radius,
178
+ }}>
179
+ ...
180
+ </div>
181
+ </>
182
+ );
183
+ }
184
+ ```
185
+
186
+ Controller methods:
187
+
188
+ | Method | Description |
189
+ |--------|-------------|
190
+ | `values` | The same live resolved values returned by `useDialKit` |
191
+ | `setValue(path, value)` | Updates one control by dot path, like `'shadow.radius'` |
192
+ | `setValues(values)` | Updates multiple controls with a typed nested partial object |
193
+ | `resetValues()` | Restores the current config defaults and clears the active preset |
194
+ | `getValues()` | Reads the latest resolved values outside render callbacks |
195
+
196
+ Programmatic updates use the same state as panel edits. If a saved preset is active, updates are saved into that preset; otherwise they update the base "Version 1" values. Action controls are triggers, so they are not set by `setValues`.
197
+
198
+ ---
199
+
80
200
  ## Control Types
81
201
 
82
202
  ### Slider
@@ -267,9 +387,47 @@ const values = useDialKit('Controls', {
267
387
  | `defaultOpen` | `boolean` | `true` |
268
388
  | `mode` | `'popover' \| 'inline'` | `'popover'` |
269
389
  | `productionEnabled` | `boolean` | `false` in production, `true` otherwise |
390
+ | `onOpenChange` | `(open: boolean) => void` | `undefined` |
270
391
 
271
392
  Mount once at your app root. In the default `popover` mode, the panel renders via a portal on `document.body`. It collapses to a small icon button and expands to 280px wide on click.
272
393
 
394
+ ### Multiple panels
395
+
396
+ If multiple `useDialKit` calls are registered under the same root, DialKit renders one shared shell and shows each panel as a collapsible top-level section. No extra API is needed:
397
+
398
+ ```tsx
399
+ function PhotoStack() {
400
+ const photo = useDialKit('Photo Stack', {
401
+ blur: [12, 0, 40],
402
+ scale: [1, 0.5, 2],
403
+ });
404
+
405
+ const stage = useDialKit('Stage', {
406
+ pagePadding: [40, 16, 96],
407
+ background: '#ffffff',
408
+ });
409
+
410
+ return (
411
+ <div style={{ padding: stage.pagePadding, background: stage.background }}>
412
+ <img style={{ filter: `blur(${photo.blur}px)`, transform: `scale(${photo.scale})` }} />
413
+ </div>
414
+ );
415
+ }
416
+ ```
417
+
418
+ The mounted `<DialRoot />` stays the same. With a single registered panel, the panel title and layout stay unchanged. This behavior works the same way in React, Solid, Svelte, and Vue.
419
+
420
+ Use `onOpenChange` when you need to persist whether the floating panel is open or collapsed:
421
+
422
+ ```tsx
423
+ <DialRoot
424
+ defaultOpen={localStorage.getItem('dialkit-open') !== '0'}
425
+ onOpenChange={(open) => {
426
+ localStorage.setItem('dialkit-open', open ? '1' : '0');
427
+ }}
428
+ />
429
+ ```
430
+
273
431
  DialKit is automatically hidden in production builds. To enable it in production, pass `productionEnabled`:
274
432
 
275
433
  ```tsx
@@ -511,7 +669,22 @@ function Card() {
511
669
  }
512
670
  ```
513
671
 
514
- `createDialKit` returns an accessor — call `params()` to read the current values. All control types, config shapes, and panel features (presets, copy, folders) work identically to the React version.
672
+ `createDialKit` returns an accessor — call `params()` to read the current values. All control types, config shapes, and panel features (presets, copy, folders, and `DialRoot` props like `onOpenChange`) work identically to the React version.
673
+
674
+ Use `createDialKitController` when Solid code needs to update values:
675
+
676
+ ```tsx
677
+ import { createDialKitController } from 'dialkit/solid';
678
+
679
+ const dial = createDialKitController('Card', {
680
+ blur: [24, 0, 100],
681
+ shadow: { radius: [16, 0, 64] },
682
+ });
683
+
684
+ dial.setValues({ blur: 48, shadow: { radius: 28 } });
685
+ dial.resetValues();
686
+ dial.values().blur;
687
+ ```
515
688
 
516
689
  ---
517
690
 
@@ -552,7 +725,30 @@ npm install dialkit
552
725
  </div>
553
726
  ```
554
727
 
555
- `createDialKit` returns a reactive object — access values directly (e.g. `params.blur`). Styles are injected automatically by `DialRoot` (no CSS import needed). Cleanup is automatic when the component unmounts. All control types, presets, folders, and transitions match the React/Solid entries.
728
+ `createDialKit` returns a reactive object — access values directly (e.g. `params.blur`). Styles are injected automatically by `DialRoot` (no CSS import needed). Cleanup is automatic when the component unmounts. All control types, presets, folders, transitions, and `DialRoot` props like `onOpenChange` match the React/Solid entries.
729
+
730
+ Use `createDialKitController` when Svelte code needs to update values:
731
+
732
+ ```svelte
733
+ <script>
734
+ import { createDialKitController } from 'dialkit/svelte';
735
+
736
+ const dial = createDialKitController('Card', {
737
+ blur: [24, 0, 100],
738
+ shadow: { radius: [16, 0, 64] }
739
+ });
740
+
741
+ const params = dial.values;
742
+ </script>
743
+
744
+ <button onclick={() => dial.setValues({ blur: 48, shadow: { radius: 28 } })}>
745
+ Apply preset
746
+ </button>
747
+
748
+ <div style:filter={`blur(${params.blur}px)`} style:border-radius={`${params.shadow.radius}px`}>
749
+ ...
750
+ </div>
751
+ ```
556
752
 
557
753
  ---
558
754
 
@@ -584,7 +780,7 @@ import Card from './Card.vue';
584
780
 
585
781
  <template>
586
782
  <Card />
587
- <DialRoot />
783
+ <DialRoot @open-change="(open) => localStorage.setItem('dialkit-open', open ? '1' : '0')" />
588
784
  </template>
589
785
  ```
590
786
 
@@ -615,6 +811,25 @@ const params = useDialKit('Card', {
615
811
 
616
812
  `useDialKit` returns a reactive object. All control types, presets, folders, keyboard shortcuts, and transitions work identically to the other frameworks.
617
813
 
814
+ Use `useDialKitController` when Vue code needs to update values:
815
+
816
+ ```vue
817
+ <script setup>
818
+ import { useDialKitController } from 'dialkit/vue';
819
+
820
+ const { values, setValues, resetValues } = useDialKitController('Card', {
821
+ blur: [24, 0, 100],
822
+ shadow: { radius: [16, 0, 64] },
823
+ });
824
+ </script>
825
+
826
+ <template>
827
+ <button @click="setValues({ blur: 48, shadow: { radius: 28 } })">Apply preset</button>
828
+ <button @click="resetValues()">Reset</button>
829
+ <div :style="{ filter: `blur(${values.blur}px)`, borderRadius: `${values.shadow.radius}px` }" />
830
+ </template>
831
+ ```
832
+
618
833
  ---
619
834
 
620
835
  ## Types
@@ -624,6 +839,8 @@ All config and value types are exported:
624
839
  ```tsx
625
840
  import type {
626
841
  SpringConfig,
842
+ EasingConfig,
843
+ TransitionConfig,
627
844
  ActionConfig,
628
845
  SelectConfig,
629
846
  ColorConfig,
@@ -632,6 +849,8 @@ import type {
632
849
  ShortcutMode,
633
850
  DialConfig,
634
851
  DialValue,
852
+ DialKitController,
853
+ DialKitValueUpdates,
635
854
  ResolvedValues,
636
855
  ControlMeta,
637
856
  PanelConfig,
@@ -0,0 +1,15 @@
1
+ type DropdownPosition = {
2
+ top: number;
3
+ left: number;
4
+ width: number;
5
+ above: boolean;
6
+ };
7
+ type DropdownPositionOptions = {
8
+ dropdownHeight?: number;
9
+ gap?: number;
10
+ allowAbove?: boolean;
11
+ };
12
+ declare function getDropdownPosition(trigger: HTMLElement, portalRoot: HTMLElement, options?: DropdownPositionOptions): DropdownPosition;
13
+ declare function getDialKitPortalRoot(trigger: HTMLElement | null | undefined): HTMLElement | null;
14
+
15
+ export { type DropdownPosition, type DropdownPositionOptions, getDialKitPortalRoot, getDropdownPosition };
@@ -0,0 +1,22 @@
1
+ // src/dropdown-position.ts
2
+ function getDropdownPosition(trigger, portalRoot, options = {}) {
3
+ const { dropdownHeight = 0, gap = 4, allowAbove = true } = options;
4
+ const triggerRect = trigger.getBoundingClientRect();
5
+ const rootRect = portalRoot.getBoundingClientRect();
6
+ const spaceBelow = window.innerHeight - triggerRect.bottom - gap;
7
+ const above = allowAbove && spaceBelow < dropdownHeight && triggerRect.top > spaceBelow;
8
+ return {
9
+ top: above ? triggerRect.top - rootRect.top - dropdownHeight - gap : triggerRect.bottom - rootRect.top + gap,
10
+ left: triggerRect.left - rootRect.left,
11
+ width: triggerRect.width,
12
+ above
13
+ };
14
+ }
15
+ function getDialKitPortalRoot(trigger) {
16
+ return trigger?.closest(".dialkit-root") ?? null;
17
+ }
18
+ export {
19
+ getDialKitPortalRoot,
20
+ getDropdownPosition
21
+ };
22
+ //# sourceMappingURL=dropdown-position.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dropdown-position.ts"],"sourcesContent":["export type DropdownPosition = {\n top: number;\n left: number;\n width: number;\n above: boolean;\n};\n\nexport type DropdownPositionOptions = {\n dropdownHeight?: number;\n gap?: number;\n allowAbove?: boolean;\n};\n\nexport function getDropdownPosition(\n trigger: HTMLElement,\n portalRoot: HTMLElement,\n options: DropdownPositionOptions = {}\n): DropdownPosition {\n const { dropdownHeight = 0, gap = 4, allowAbove = true } = options;\n const triggerRect = trigger.getBoundingClientRect();\n const rootRect = portalRoot.getBoundingClientRect();\n const spaceBelow = window.innerHeight - triggerRect.bottom - gap;\n const above = allowAbove && spaceBelow < dropdownHeight && triggerRect.top > spaceBelow;\n\n return {\n top: above\n ? triggerRect.top - rootRect.top - dropdownHeight - gap\n : triggerRect.bottom - rootRect.top + gap,\n left: triggerRect.left - rootRect.left,\n width: triggerRect.width,\n above,\n };\n}\n\nexport function getDialKitPortalRoot(trigger: HTMLElement | null | undefined): HTMLElement | null {\n return (trigger?.closest('.dialkit-root') as HTMLElement | null) ?? null;\n}\n"],"mappings":";AAaO,SAAS,oBACd,SACA,YACA,UAAmC,CAAC,GAClB;AAClB,QAAM,EAAE,iBAAiB,GAAG,MAAM,GAAG,aAAa,KAAK,IAAI;AAC3D,QAAM,cAAc,QAAQ,sBAAsB;AAClD,QAAM,WAAW,WAAW,sBAAsB;AAClD,QAAM,aAAa,OAAO,cAAc,YAAY,SAAS;AAC7D,QAAM,QAAQ,cAAc,aAAa,kBAAkB,YAAY,MAAM;AAE7E,SAAO;AAAA,IACL,KAAK,QACD,YAAY,MAAM,SAAS,MAAM,iBAAiB,MAClD,YAAY,SAAS,SAAS,MAAM;AAAA,IACxC,MAAM,YAAY,OAAO,SAAS;AAAA,IAClC,OAAO,YAAY;AAAA,IACnB;AAAA,EACF;AACF;AAEO,SAAS,qBAAqB,SAA6D;AAChG,SAAQ,SAAS,QAAQ,eAAe,KAA4B;AACtE;","names":[]}
@@ -0,0 +1,19 @@
1
+ declare const ICON_CHEVRON = "M6 9.5L12 15.5L18 9.5";
2
+ declare const ICON_CHECK = "M5 12.75L10 19L19 5";
3
+ declare const ICON_CLIPBOARD: {
4
+ board: string;
5
+ sparkle: string;
6
+ body: string;
7
+ };
8
+ declare const ICON_ADD_PRESET: string[];
9
+ declare const ICON_TRASH: string[];
10
+ declare const ICON_PANEL: {
11
+ path: string;
12
+ circles: {
13
+ cx: string;
14
+ cy: string;
15
+ r: string;
16
+ }[];
17
+ };
18
+
19
+ export { ICON_ADD_PRESET, ICON_CHECK, ICON_CHEVRON, ICON_CLIPBOARD, ICON_PANEL, ICON_TRASH };
package/dist/icons.js ADDED
@@ -0,0 +1,39 @@
1
+ // src/icons.ts
2
+ var ICON_CHEVRON = "M6 9.5L12 15.5L18 9.5";
3
+ var ICON_CHECK = "M5 12.75L10 19L19 5";
4
+ var ICON_CLIPBOARD = {
5
+ board: "M8 6C8 4.34315 9.34315 3 11 3H13C14.6569 3 16 4.34315 16 6V7H8V6Z",
6
+ sparkle: "M19.2405 16.1852L18.5436 14.3733C18.4571 14.1484 18.241 14 18 14C17.759 14 17.5429 14.1484 17.4564 14.3733L16.7595 16.1852C16.658 16.4493 16.4493 16.658 16.1852 16.7595L14.3733 17.4564C14.1484 17.5429 14 17.759 14 18C14 18.241 14.1484 18.4571 14.3733 18.5436L16.1852 19.2405C16.4493 19.342 16.658 19.5507 16.7595 19.8148L17.4564 21.6267C17.5429 21.8516 17.759 22 18 22C18.241 22 18.4571 21.8516 18.5436 21.6267L19.2405 19.8148C19.342 19.5507 19.5507 19.342 19.8148 19.2405L21.6267 18.5436C21.8516 18.4571 22 18.241 22 18C22 17.759 21.8516 17.5429 21.6267 17.4564L19.8148 16.7595C19.5507 16.658 19.342 16.4493 19.2405 16.1852Z",
7
+ body: "M16 5H17C18.6569 5 20 6.34315 20 8V11M8 5H7C5.34315 5 4 6.34315 4 8V18C4 19.6569 5.34315 21 7 21H12"
8
+ };
9
+ var ICON_ADD_PRESET = [
10
+ "M4 6H20",
11
+ "M4 12H10",
12
+ "M15 15L21 15",
13
+ "M18 12V18",
14
+ "M4 18H10"
15
+ ];
16
+ var ICON_TRASH = [
17
+ "M5 6.5L5.80734 18.2064C5.91582 19.7794 7.22348 21 8.80023 21H15.1998C16.7765 21 18.0842 19.7794 18.1927 18.2064L19 6.5",
18
+ "M10 11V16",
19
+ "M14 11V16",
20
+ "M3.5 6H20.5",
21
+ "M8.07092 5.74621C8.42348 3.89745 10.0485 2.5 12 2.5C13.9515 2.5 15.5765 3.89745 15.9291 5.74621"
22
+ ];
23
+ var ICON_PANEL = {
24
+ path: "M6.84766 11.75C6.78583 11.9899 6.75 12.2408 6.75 12.5C6.75 12.7592 6.78583 13.0101 6.84766 13.25H2C1.58579 13.25 1.25 12.9142 1.25 12.5C1.25 12.0858 1.58579 11.75 2 11.75H6.84766ZM14 11.75C14.4142 11.75 14.75 12.0858 14.75 12.5C14.75 12.9142 14.4142 13.25 14 13.25H12.6523C12.7142 13.0101 12.75 12.7592 12.75 12.5C12.75 12.2408 12.7142 11.9899 12.6523 11.75H14ZM3.09766 7.25C3.03583 7.48994 3 7.74075 3 8C3 8.25925 3.03583 8.51006 3.09766 8.75H2C1.58579 8.75 1.25 8.41421 1.25 8C1.25 7.58579 1.58579 7.25 2 7.25H3.09766ZM14 7.25C14.4142 7.25 14.75 7.58579 14.75 8C14.75 8.41421 14.4142 8.75 14 8.75H8.90234C8.96417 8.51006 9 8.25925 9 8C9 7.74075 8.96417 7.48994 8.90234 7.25H14ZM7.59766 2.75C7.53583 2.98994 7.5 3.24075 7.5 3.5C7.5 3.75925 7.53583 4.01006 7.59766 4.25H2C1.58579 4.25 1.25 3.91421 1.25 3.5C1.25 3.08579 1.58579 2.75 2 2.75H7.59766ZM14 2.75C14.4142 2.75 14.75 3.08579 14.75 3.5C14.75 3.91421 14.4142 4.25 14 4.25H13.4023C13.4642 4.01006 13.5 3.75925 13.5 3.5C13.5 3.24075 13.4642 2.98994 13.4023 2.75H14Z",
25
+ circles: [
26
+ { cx: "6", cy: "8", r: "0.998596" },
27
+ { cx: "10.4999", cy: "3.5", r: "0.998657" },
28
+ { cx: "9.75015", cy: "12.5", r: "0.997986" }
29
+ ]
30
+ };
31
+ export {
32
+ ICON_ADD_PRESET,
33
+ ICON_CHECK,
34
+ ICON_CHEVRON,
35
+ ICON_CLIPBOARD,
36
+ ICON_PANEL,
37
+ ICON_TRASH
38
+ };
39
+ //# sourceMappingURL=icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/icons.ts"],"sourcesContent":["// Shared SVG icon geometry — single source of truth across all framework adapters.\n\nexport const ICON_CHEVRON = 'M6 9.5L12 15.5L18 9.5';\n\nexport const ICON_CHECK = 'M5 12.75L10 19L19 5';\n\nexport const ICON_CLIPBOARD = {\n board: 'M8 6C8 4.34315 9.34315 3 11 3H13C14.6569 3 16 4.34315 16 6V7H8V6Z',\n sparkle: 'M19.2405 16.1852L18.5436 14.3733C18.4571 14.1484 18.241 14 18 14C17.759 14 17.5429 14.1484 17.4564 14.3733L16.7595 16.1852C16.658 16.4493 16.4493 16.658 16.1852 16.7595L14.3733 17.4564C14.1484 17.5429 14 17.759 14 18C14 18.241 14.1484 18.4571 14.3733 18.5436L16.1852 19.2405C16.4493 19.342 16.658 19.5507 16.7595 19.8148L17.4564 21.6267C17.5429 21.8516 17.759 22 18 22C18.241 22 18.4571 21.8516 18.5436 21.6267L19.2405 19.8148C19.342 19.5507 19.5507 19.342 19.8148 19.2405L21.6267 18.5436C21.8516 18.4571 22 18.241 22 18C22 17.759 21.8516 17.5429 21.6267 17.4564L19.8148 16.7595C19.5507 16.658 19.342 16.4493 19.2405 16.1852Z',\n body: 'M16 5H17C18.6569 5 20 6.34315 20 8V11M8 5H7C5.34315 5 4 6.34315 4 8V18C4 19.6569 5.34315 21 7 21H12',\n};\n\nexport const ICON_ADD_PRESET = [\n 'M4 6H20',\n 'M4 12H10',\n 'M15 15L21 15',\n 'M18 12V18',\n 'M4 18H10',\n];\n\nexport const ICON_TRASH = [\n 'M5 6.5L5.80734 18.2064C5.91582 19.7794 7.22348 21 8.80023 21H15.1998C16.7765 21 18.0842 19.7794 18.1927 18.2064L19 6.5',\n 'M10 11V16',\n 'M14 11V16',\n 'M3.5 6H20.5',\n 'M8.07092 5.74621C8.42348 3.89745 10.0485 2.5 12 2.5C13.9515 2.5 15.5765 3.89745 15.9291 5.74621',\n];\n\nexport const ICON_PANEL = {\n path: 'M6.84766 11.75C6.78583 11.9899 6.75 12.2408 6.75 12.5C6.75 12.7592 6.78583 13.0101 6.84766 13.25H2C1.58579 13.25 1.25 12.9142 1.25 12.5C1.25 12.0858 1.58579 11.75 2 11.75H6.84766ZM14 11.75C14.4142 11.75 14.75 12.0858 14.75 12.5C14.75 12.9142 14.4142 13.25 14 13.25H12.6523C12.7142 13.0101 12.75 12.7592 12.75 12.5C12.75 12.2408 12.7142 11.9899 12.6523 11.75H14ZM3.09766 7.25C3.03583 7.48994 3 7.74075 3 8C3 8.25925 3.03583 8.51006 3.09766 8.75H2C1.58579 8.75 1.25 8.41421 1.25 8C1.25 7.58579 1.58579 7.25 2 7.25H3.09766ZM14 7.25C14.4142 7.25 14.75 7.58579 14.75 8C14.75 8.41421 14.4142 8.75 14 8.75H8.90234C8.96417 8.51006 9 8.25925 9 8C9 7.74075 8.96417 7.48994 8.90234 7.25H14ZM7.59766 2.75C7.53583 2.98994 7.5 3.24075 7.5 3.5C7.5 3.75925 7.53583 4.01006 7.59766 4.25H2C1.58579 4.25 1.25 3.91421 1.25 3.5C1.25 3.08579 1.58579 2.75 2 2.75H7.59766ZM14 2.75C14.4142 2.75 14.75 3.08579 14.75 3.5C14.75 3.91421 14.4142 4.25 14 4.25H13.4023C13.4642 4.01006 13.5 3.75925 13.5 3.5C13.5 3.24075 13.4642 2.98994 13.4023 2.75H14Z',\n circles: [\n { cx: '6', cy: '8', r: '0.998596' },\n { cx: '10.4999', cy: '3.5', r: '0.998657' },\n { cx: '9.75015', cy: '12.5', r: '0.997986' },\n ],\n};\n"],"mappings":";AAEO,IAAM,eAAe;AAErB,IAAM,aAAa;AAEnB,IAAM,iBAAiB;AAAA,EAC5B,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AACR;AAEO,IAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,aAAa;AAAA,EACxB,MAAM;AAAA,EACN,SAAS;AAAA,IACP,EAAE,IAAI,KAAK,IAAI,KAAK,GAAG,WAAW;AAAA,IAClC,EAAE,IAAI,WAAW,IAAI,OAAO,GAAG,WAAW;AAAA,IAC1C,EAAE,IAAI,WAAW,IAAI,QAAQ,GAAG,WAAW;AAAA,EAC7C;AACF;","names":[]}