@mkbabb/glass-ui 8.0.0 → 9.0.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 (142) hide show
  1. package/dist/aurora.js +371 -349
  2. package/dist/blob.js +42 -42
  3. package/dist/{checkbox-BnXuGgJ3.js → checkbox-B1qn65se.js} +1 -1
  4. package/dist/checkbox.js +1 -1
  5. package/dist/color.glsl-DTJhdekG.js +34 -0
  6. package/dist/color.wgsl-BTszLY39.js +398 -0
  7. package/dist/{command-BuBnYpxF.js → command-tEzAaVY_.js} +1 -1
  8. package/dist/command.js +1 -1
  9. package/dist/components/_shared/control.d.ts +0 -1
  10. package/dist/components/_shared/index.d.ts +0 -1
  11. package/dist/components/aurora/Aurora.vue.d.ts +1 -0
  12. package/dist/components/aurora/composables/frameLoop.d.ts +6 -5
  13. package/dist/components/aurora/composables/runtime.d.ts +26 -1
  14. package/dist/components/aurora/composables/useAurora.d.ts +28 -0
  15. package/dist/components/aurora/composables/wgpuSetup.d.ts +1 -1
  16. package/dist/components/aurora/constants/presets.d.ts +44 -5
  17. package/dist/components/aurora/index.d.ts +1 -1
  18. package/dist/components/configurator/Configurator.vue.d.ts +25 -2
  19. package/dist/components/configurator/ConfiguratorRow.vue.d.ts +4 -2
  20. package/dist/components/configurator/styles.css +1 -1
  21. package/dist/components/dock/DockSeparator.vue.d.ts +2 -3
  22. package/dist/components/dock/GlassDock.vue.d.ts +1 -0
  23. package/dist/components/dock/composables/dockContext.d.ts +1 -8
  24. package/dist/components/dock/composables/useDockRun.d.ts +20 -0
  25. package/dist/components/dock/composables/useDockSearch.d.ts +1 -1
  26. package/dist/components/dock/composables/useDockShellProps.d.ts +18 -101
  27. package/dist/components/dock/composables/useDockState.d.ts +2 -9
  28. package/dist/components/dock/constants.d.ts +15 -0
  29. package/dist/components/dock/index.d.ts +2 -2
  30. package/dist/components/dock/styles/controls/icon-button.css +1 -1
  31. package/dist/components/dock/styles/controls/tab-button.css +1 -1
  32. package/dist/components/dock/styles/controls/triggers.css +1 -1
  33. package/dist/components/dock/styles/controls.css +1 -1
  34. package/dist/components/dock/styles/density.css +1 -1
  35. package/dist/components/dock/styles/index.css +1 -1
  36. package/dist/components/dock/styles/layer-group.css +1 -1
  37. package/dist/components/dock/styles/layers.css +1 -1
  38. package/dist/components/dock/styles/morph.css +1 -1
  39. package/dist/components/dock/styles/run.css +1 -0
  40. package/dist/components/dock/styles/search.css +1 -1
  41. package/dist/components/dock/styles/shape.css +1 -1
  42. package/dist/components/dock/styles/shell-regions.css +1 -1
  43. package/dist/components/dock/styles/shell.css +1 -1
  44. package/dist/components/fourier-field/FourierField.vue.d.ts +28 -25
  45. package/dist/components/fourier-field/clock.d.ts +35 -0
  46. package/dist/components/fourier-field/constants.d.ts +78 -103
  47. package/dist/components/fourier-field/index.d.ts +3 -28
  48. package/dist/components/fourier-field/math.d.ts +69 -77
  49. package/dist/components/fourier-field/renderer/mint.d.ts +50 -0
  50. package/dist/components/fourier-field/renderer/uniforms.d.ts +84 -0
  51. package/dist/components/fourier-field/renderer/wgpu.d.ts +28 -0
  52. package/dist/components/fourier-field/shaders/compute.wgsl.d.ts +1 -0
  53. package/dist/components/fourier-field/shaders/render.wgsl.d.ts +1 -0
  54. package/dist/components/fourier-field/useFourierField.d.ts +49 -0
  55. package/dist/components/handmark/HandMark.vue.d.ts +18 -14
  56. package/dist/components/handmark/index.d.ts +4 -23
  57. package/dist/components/handmark/stroke.d.ts +92 -0
  58. package/dist/composables/dark/darkModeSyncScript.d.ts +19 -0
  59. package/dist/composables/motion/pointer/pointerFieldMappings.d.ts +0 -41
  60. package/dist/{components/search/composables → composables/search}/index.d.ts +2 -2
  61. package/dist/{components/search/composables/fuzzySearchIndex.d.ts → composables/search/match.d.ts} +8 -3
  62. package/dist/configurator-BHJymdrF.js +339 -0
  63. package/dist/configurator.js +1 -1
  64. package/dist/constellation.js +2 -2
  65. package/dist/control-DJp15L4U.js +7 -0
  66. package/dist/{dark-z_P5QwqI.js → dark-CLlmo7dD.js} +2 -2
  67. package/dist/dark-mode-toggle.js +1 -1
  68. package/dist/dark.js +1 -1
  69. package/dist/dock.js +712 -486
  70. package/dist/dom.js +90 -8
  71. package/dist/easing.js +3 -3
  72. package/dist/expandable-container-BY1hQXi4.js +142 -0
  73. package/dist/expandable-container.js +2 -142
  74. package/dist/fourier-field.js +643 -855
  75. package/dist/fourier-math.js +6 -6
  76. package/dist/glass-ui.css +1 -1
  77. package/dist/glass-ui.js +85 -72
  78. package/dist/handmark.js +330 -718
  79. package/dist/index.d.ts +1 -1
  80. package/dist/labeled-field.js +2 -2
  81. package/dist/{menu-wLu1XGKn.js → menu-TDMNtZjG.js} +1 -1
  82. package/dist/menu.js +1 -1
  83. package/dist/motion-core.js +34 -34
  84. package/dist/{participation-B0hdsIRo.js → participation-Di4UHbzk.js} +8 -8
  85. package/dist/{pointerFieldMappings-DP5tla5z.js → pointerFieldMappings-DXwlU5uj.js} +7 -23
  86. package/dist/{popover-DBMKTPkL.js → popover-C04Rrdcz.js} +1 -1
  87. package/dist/popover.js +1 -1
  88. package/dist/{radio-group-Ci8o-pDx.js → radio-group-BNV7PN1O.js} +1 -1
  89. package/dist/radio-group.js +1 -1
  90. package/dist/{select-CDgwGH_P.js → select-COox45Kv.js} +1 -1
  91. package/dist/select.js +1 -1
  92. package/dist/{slider-gsc8jDIo.js → slider-5ChjjWSR.js} +1 -1
  93. package/dist/slider.js +1 -1
  94. package/dist/styles/components.css +1 -1
  95. package/dist/styles/glass/material.css +1 -1
  96. package/dist/styles/glass/overlay-plate.css +1 -1
  97. package/dist/{switch-DxZzDrmV.js → switch-lLkbREB-.js} +1 -1
  98. package/dist/switch.js +1 -1
  99. package/dist/{tabs-CYscnq5H.js → tabs-DSJMd1Et.js} +1 -1
  100. package/dist/tabs.js +1 -1
  101. package/dist/{toggle-group-11aPGMfE.js → toggle-group-DUcmKnDw.js} +1 -1
  102. package/dist/toggle-group.js +1 -1
  103. package/dist/{tooltip-DqKMZ4dn.js → tooltip-BKk2qVDn.js} +1 -1
  104. package/dist/tooltip.js +1 -1
  105. package/dist/{resolveCanvasColor-6MCrswTB.js → useCanvas2D-CQRElMyE.js} +1 -11
  106. package/dist/useResolveTokenColor-B2FfJnd9.js +24 -0
  107. package/package.json +2 -20
  108. package/dist/canvas.d.ts +0 -1
  109. package/dist/canvas.js +0 -2
  110. package/dist/color.wgsl-B0N3mKMb.js +0 -412
  111. package/dist/compile-D7VYG3gi.js +0 -19
  112. package/dist/components/dock/composables/useDockOverflowFit.d.ts +0 -20
  113. package/dist/components/dock/composables/useDockTouchGate.d.ts +0 -42
  114. package/dist/components/dock/styles/overflow.css +0 -1
  115. package/dist/components/fourier-field/composables/fourierFieldGLSetup.d.ts +0 -24
  116. package/dist/components/fourier-field/composables/fourierFieldWGPUSetup.d.ts +0 -31
  117. package/dist/components/fourier-field/composables/uniformBridgeWGPU.d.ts +0 -39
  118. package/dist/components/fourier-field/composables/useFourierField.d.ts +0 -56
  119. package/dist/components/fourier-field/shaders/fourier-field.compute.wgsl.d.ts +0 -1
  120. package/dist/components/fourier-field/shaders/fourier-field.glsl.d.ts +0 -4
  121. package/dist/components/fourier-field/shaders/fourier-field.render.wgsl.d.ts +0 -1
  122. package/dist/components/fourier-field/shaders/fourier-field.ribbon.d.ts +0 -51
  123. package/dist/components/handmark/brush.d.ts +0 -269
  124. package/dist/components/handmark/composables/useHandMark.d.ts +0 -99
  125. package/dist/components/handmark/constants.d.ts +0 -69
  126. package/dist/components/handmark/freehand.d.ts +0 -69
  127. package/dist/components/handmark/geometry.d.ts +0 -62
  128. package/dist/components/handmark/ink.d.ts +0 -11
  129. package/dist/components/handmark/noise.d.ts +0 -30
  130. package/dist/components/handmark/texture.d.ts +0 -39
  131. package/dist/components/handmark/types.d.ts +0 -70
  132. package/dist/components/search/SearchBar.vue.d.ts +0 -38
  133. package/dist/components/search/index.d.ts +0 -8
  134. package/dist/components/search/searchVariants.d.ts +0 -16
  135. package/dist/configurator-BoeScnDL.js +0 -311
  136. package/dist/control-Da4XeT43.js +0 -11
  137. package/dist/search.d.ts +0 -1
  138. package/dist/search.js +0 -61
  139. package/dist/useFuzzySearch-CUnZknpm.js +0 -177
  140. package/dist/useResolveTokenColor-CspQv_ik.js +0 -107
  141. /package/dist/{components/search/composables → composables/search}/types.d.ts +0 -0
  142. /package/dist/{components/search/composables → composables/search}/useFuzzySearch.d.ts +0 -0
@@ -0,0 +1,339 @@
1
+ import { t as e } from "./class-names-q-UGOkHH.js";
2
+ import { t } from "./createContext-BhkE9mLH.js";
3
+ import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
4
+ import { t as r } from "./label-BQEZhnK_.js";
5
+ import { t as i } from "./expandable-container-BY1hQXi4.js";
6
+ import { t as a } from "./fading-scroll-CTeW3KNS.js";
7
+ import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, mergeModels as h, mergeProps as g, normalizeClass as _, normalizeStyle as v, openBlock as y, reactive as b, ref as x, renderList as S, renderSlot as C, resolveDynamicComponent as w, toDisplayString as T, toRaw as E, unref as D, useId as O, useModel as k, withCtx as A, withModifiers as j } from "vue";
8
+ import { ChevronDown as M, RotateCcw as N } from "@lucide/vue";
9
+ //#region src/components/configurator/size.ts
10
+ var P = t("configuratorSize"), F = P.KEY;
11
+ function I(e) {
12
+ P.provide(e);
13
+ }
14
+ var L = P.use, R = ["data-aside-side", "data-gallery"], z = {
15
+ key: 0,
16
+ "data-gallery-dock": "",
17
+ class: "configurator-presets shrink-0 px-3 py-2"
18
+ }, B = [
19
+ "data-active",
20
+ "aria-pressed",
21
+ "onClick"
22
+ ], V = { class: "configurator-stage relative min-h-0 min-w-0 overflow-hidden" }, H = { class: "configurator-aside flex min-h-0 min-w-0 flex-col border-t" }, U = { class: "flex flex-col" }, W = {
23
+ key: 1,
24
+ class: "configurator-controls flex-1 min-h-0 overflow-visible"
25
+ }, G = { class: "flex flex-col" }, K = {
26
+ key: 2,
27
+ class: "configurator-footer shrink-0 border-t px-3 py-2"
28
+ }, q = /* @__PURE__ */ m({
29
+ __name: "Configurator",
30
+ props: /*@__PURE__*/ h({
31
+ presets: {},
32
+ activePreset: {},
33
+ layers: {},
34
+ activeLayer: {},
35
+ scrollMode: { default: "auto" },
36
+ size: { default: "md" },
37
+ asideSide: { default: "right" },
38
+ galleryPlacement: { default: "aside" },
39
+ asideWidth: {},
40
+ expandable: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ expandLabel: { default: "Expand configurator" },
45
+ collapseLabel: { default: "Collapse configurator" },
46
+ class: { type: [
47
+ Boolean,
48
+ null,
49
+ String,
50
+ Object,
51
+ Array
52
+ ] }
53
+ }, {
54
+ expanded: {
55
+ type: Boolean,
56
+ default: !1
57
+ },
58
+ expandedModifiers: {}
59
+ }),
60
+ emits: /*@__PURE__*/ h([
61
+ "select-preset",
62
+ "select-layer",
63
+ "reset"
64
+ ], ["update:expanded"]),
65
+ setup(t, { emit: n }) {
66
+ let r = t, f = k(t, "expanded");
67
+ I(s(() => r.size));
68
+ let m = n, h = s(() => e("configurator-shell glass-floating rounded-panel border border-border/60 overflow-hidden", r.class)), b = s(() => e("configurator", "grid grid-cols-1", "grid-rows-[auto_minmax(var(--configurator-stage-min,18rem),auto)_minmax(0,1fr)]", "min-h-0")), x = s(() => r.expandable ? i : "div"), E = s(() => r.expandable ? "configurator-expand-host" : "contents"), O = s(() => r.expandable ? {
69
+ open: f.value,
70
+ "onUpdate:open": (e) => {
71
+ f.value = e;
72
+ },
73
+ expandLabel: r.expandLabel,
74
+ collapseLabel: r.collapseLabel
75
+ } : {}), M = s(() => r.expandable && f.value ? "top" : r.galleryPlacement), N = s(() => {
76
+ let e = {
77
+ "--radius-ctx": "var(--radius-panel)",
78
+ "--radius-inset": "var(--configurator-pad-inline)"
79
+ };
80
+ if (r.asideWidth != null) {
81
+ let [t, n] = Array.isArray(r.asideWidth) ? r.asideWidth : [r.asideWidth, r.asideWidth];
82
+ e["--configurator-aside-min"] = t, e["--configurator-aside-max"] = n;
83
+ }
84
+ return e;
85
+ }), P = s(() => r.scrollMode !== "never");
86
+ return (n, r) => (y(), c(w(x.value), g(O.value, { class: E.value }), {
87
+ default: A(() => [d("div", {
88
+ class: _(h.value),
89
+ style: v(N.value)
90
+ }, [d("section", {
91
+ "data-slot": "configurator",
92
+ "data-aside-side": t.asideSide,
93
+ "data-gallery": M.value,
94
+ class: _(b.value)
95
+ }, [
96
+ n.$slots.presets || t.presets && t.presets.length > 0 ? (y(), u("div", z, [C(n.$slots, "presets", {
97
+ presets: t.presets,
98
+ activePreset: t.activePreset
99
+ }, () => [p(D(a), {
100
+ axis: "x",
101
+ class: "configurator-gallery-track flex gap-2 scrollbar-hidden",
102
+ role: "group",
103
+ "aria-label": "Presets"
104
+ }, {
105
+ default: A(() => [(y(!0), u(o, null, S(t.presets, (n) => (y(), u("button", {
106
+ key: n.key,
107
+ type: "button",
108
+ "data-preset-tile": "",
109
+ "data-active": n.key === t.activePreset || void 0,
110
+ "aria-pressed": n.key === t.activePreset,
111
+ class: _(D(e)("configurator-preset-chip glass-capsule glass-capsule-hover shadow-cartoon focus-ring shrink-0 px-3 py-1 text-micro font-medium text-foreground", n.key === t.activePreset && "is-active")),
112
+ onClick: j((e) => m("select-preset", n.key), ["stop"])
113
+ }, T(n.label), 11, B))), 128))]),
114
+ _: 1
115
+ })])])) : l("", !0),
116
+ d("div", V, [C(n.$slots, "stage")]),
117
+ d("aside", H, [P.value ? (y(), c(D(a), {
118
+ key: 0,
119
+ axis: "y",
120
+ class: "configurator-controls flex-1 min-h-0 scrollbar-thin"
121
+ }, {
122
+ default: A(() => [C(n.$slots, "controls", {
123
+ layers: t.layers,
124
+ activeLayer: t.activeLayer,
125
+ selectLayer: (e) => m("select-layer", e)
126
+ }, () => [d("div", U, [C(n.$slots, "default")])])]),
127
+ _: 3
128
+ })) : (y(), u("div", W, [C(n.$slots, "controls", {
129
+ layers: t.layers,
130
+ activeLayer: t.activeLayer,
131
+ selectLayer: (e) => m("select-layer", e)
132
+ }, () => [d("div", G, [C(n.$slots, "default")])])])), n.$slots.footer ? (y(), u("div", K, [C(n.$slots, "footer", { reset: () => m("reset") })])) : l("", !0)])
133
+ ], 10, R)], 6)]),
134
+ _: 3
135
+ }, 16, ["class"]));
136
+ }
137
+ }), J = ["data-state"], Y = [
138
+ "aria-expanded",
139
+ "aria-controls",
140
+ "data-state"
141
+ ], X = { class: "flex min-w-0 items-baseline gap-2" }, ee = { class: "configurator-section-label truncate" }, Z = {
142
+ key: 0,
143
+ class: "truncate text-micro font-mono text-muted-foreground/70"
144
+ }, Q = [
145
+ "id",
146
+ "aria-hidden",
147
+ "inert",
148
+ "data-state"
149
+ ], $ = { class: "min-h-0 overflow-hidden" }, te = ["data-dividers"], ne = /*#__PURE__*/ n(/* @__PURE__ */ m({
150
+ __name: "ConfiguratorLayer",
151
+ props: /*@__PURE__*/ h({
152
+ label: {},
153
+ sub: {},
154
+ id: {},
155
+ defaultOpen: {
156
+ type: Boolean,
157
+ default: !0
158
+ },
159
+ dividers: { type: Boolean },
160
+ class: { type: [
161
+ Boolean,
162
+ null,
163
+ String,
164
+ Object,
165
+ Array
166
+ ] },
167
+ bodyClass: { type: [
168
+ Boolean,
169
+ null,
170
+ String,
171
+ Object,
172
+ Array
173
+ ] }
174
+ }, {
175
+ open: {
176
+ type: Boolean,
177
+ default: void 0
178
+ },
179
+ openModifiers: {}
180
+ }),
181
+ emits: ["update:open"],
182
+ setup(t) {
183
+ let n = t, r = k(t, "open");
184
+ r.value === void 0 && (r.value = n.defaultOpen);
185
+ let i = `configurator-layer-body-${O()}`, a = s(() => n.id ?? i);
186
+ function o() {
187
+ r.value = !r.value;
188
+ }
189
+ let c = s(() => r.value ? "open" : "closed");
190
+ return (i, s) => (y(), u("div", {
191
+ "data-slot": "configurator-layer",
192
+ class: _(D(e)("configurator-layer border", n.class)),
193
+ "data-state": c.value
194
+ }, [d("button", {
195
+ type: "button",
196
+ "data-slot": "configurator-layer-trigger",
197
+ class: _(D(e)("configurator-layer-trigger", "group flex w-full items-center justify-between gap-2 py-2", "tap-squish transition-control text-left hover:bg-foreground/5 focus-ring")),
198
+ "aria-expanded": r.value,
199
+ "aria-controls": a.value,
200
+ "data-state": c.value,
201
+ onClick: o
202
+ }, [d("div", X, [d("span", ee, T(t.label), 1), t.sub ? (y(), u("span", Z, T(t.sub), 1)) : l("", !0)]), p(D(M), {
203
+ class: "h-4 w-4 shrink-0 text-muted-foreground group-data-[state=open]:rotate-180 transition-disclosure",
204
+ "aria-hidden": "true"
205
+ })], 10, Y), d("div", {
206
+ id: a.value,
207
+ role: "region",
208
+ "aria-hidden": !r.value,
209
+ inert: !r.value || void 0,
210
+ "data-state": c.value,
211
+ class: "configurator-layer-region grid motion-reduce:transition-none",
212
+ style: v({ gridTemplateRows: r.value ? "1fr" : "0fr" })
213
+ }, [d("div", $, [d("div", {
214
+ "data-dividers": n.dividers || void 0,
215
+ class: _(D(e)("configurator-layer-body py-2 space-y-2", n.dividers && "[&>*+*]:border-t [&>*+*]:pt-2", n.bodyClass))
216
+ }, [C(i.$slots, "default", {}, void 0, !0)], 10, te)])], 12, Q)], 10, J));
217
+ }
218
+ }), [["__scopeId", "data-v-22ad90dd"]]), re = ["data-size"], ie = { class: "flex items-baseline justify-between gap-3" }, ae = { class: "flex min-w-0 items-baseline gap-2" }, oe = {
219
+ key: 0,
220
+ class: "truncate text-small font-normal text-muted-foreground"
221
+ }, se = {
222
+ key: 1,
223
+ class: "truncate text-micro font-mono text-muted-foreground/70"
224
+ }, ce = ["aria-label"], le = { class: "flex w-full min-w-0 items-center [&>*]:min-w-0 [&>*]:w-full [&>*]:flex-1" }, ue = {
225
+ key: 0,
226
+ class: "text-micro leading-snug text-muted-foreground/80"
227
+ }, de = /*#__PURE__*/ n(/* @__PURE__ */ m({
228
+ __name: "ConfiguratorRow",
229
+ props: {
230
+ label: {},
231
+ sub: {},
232
+ name: {},
233
+ description: {},
234
+ canReset: { type: Boolean },
235
+ size: {},
236
+ class: { type: [
237
+ Boolean,
238
+ null,
239
+ String,
240
+ Object,
241
+ Array
242
+ ] }
243
+ },
244
+ emits: ["reset"],
245
+ setup(t, { emit: n }) {
246
+ let i = t, a = n, o = `${O()}-label`, c = L(), m = s(() => i.size ?? c?.value ?? void 0);
247
+ return (n, s) => (y(), u("div", {
248
+ "data-slot": "configurator-row",
249
+ class: _(D(e)("configurator-row flex flex-col gap-1.5 py-2", i.class)),
250
+ "data-size": m.value
251
+ }, [
252
+ d("div", ie, [d("div", ae, [
253
+ p(D(r), {
254
+ id: o,
255
+ class: "truncate text-small font-medium text-foreground"
256
+ }, {
257
+ default: A(() => [f(T(t.label), 1)]),
258
+ _: 1
259
+ }),
260
+ t.sub ? (y(), u("span", oe, T(t.sub), 1)) : l("", !0),
261
+ t.name ? (y(), u("span", se, T(t.name), 1)) : l("", !0)
262
+ ]), t.canReset ? (y(), u("button", {
263
+ key: 0,
264
+ type: "button",
265
+ "data-slot": "configurator-reset",
266
+ class: "tap-squish transition-control focus-ring inline-flex h-6 w-6 items-center justify-center rounded-pill text-muted-foreground/60 hover:bg-foreground/5 hover:text-foreground",
267
+ "aria-label": `Reset ${t.label}`,
268
+ onClick: s[0] ||= (e) => a("reset")
269
+ }, [p(D(N), {
270
+ class: "h-3 w-3",
271
+ "aria-hidden": "true"
272
+ })], 8, ce)) : l("", !0)]),
273
+ d("div", le, [C(n.$slots, "default", { labelledBy: o }, void 0, !0)]),
274
+ t.description ? (y(), u("p", ue, T(t.description), 1)) : l("", !0)
275
+ ], 10, re));
276
+ }
277
+ }), [["__scopeId", "data-v-5d0a0dea"]]);
278
+ //#endregion
279
+ //#region src/components/configurator/useConfiguratorState.ts
280
+ function fe(e) {
281
+ let t = E(e);
282
+ if (typeof structuredClone != "function") throw Error("[glass-ui:configurator] structuredClone is unavailable in this runtime. Pass a custom clone via ConfiguratorStateOptions.clone for environments without structured-clone support.");
283
+ try {
284
+ return structuredClone(t);
285
+ } catch (e) {
286
+ throw Error("[glass-ui:configurator] structuredClone failed: " + (e instanceof Error ? e.message : String(e)) + ". Preset values must be structured-cloneable (no functions, symbols, DOM nodes, or class instances). Pass a custom clone via ConfiguratorStateOptions.clone if the data shape requires it.");
287
+ }
288
+ }
289
+ function pe(e, t) {
290
+ return JSON.stringify(e) === JSON.stringify(t);
291
+ }
292
+ function me(e) {
293
+ let t = e.clone ?? fe, n = e.equals ?? pe, r = e.presets, i = e.cloneMode ?? "commit-on-write", a = e.initialPreset ?? (r.length > 0 ? r[0].key : void 0), o = a ? r.find((e) => e.key === a) : void 0, c = b(o ? t(o.config) : {}), l = x(a), u = i === "per-preset" ? Object.fromEntries(r.map((e) => [e.key, t(e.config)])) : null, d = s(() => l.value), f = s(() => {
294
+ let e = l.value;
295
+ if (!e) return !1;
296
+ let t = r.find((t) => t.key === e);
297
+ return t ? !n(c, t.config) : !1;
298
+ });
299
+ function p(e) {
300
+ return r.find((t) => t.key === e);
301
+ }
302
+ function m(e) {
303
+ let t = c, n = e;
304
+ for (let e of Object.keys(t)) e in n || delete t[e];
305
+ for (let e of Object.keys(n)) t[e] = n[e];
306
+ }
307
+ function h(e) {
308
+ u && (u[e] = t(c));
309
+ }
310
+ function g(e) {
311
+ let n = p(e);
312
+ if (n) if (i === "per-preset" && u) {
313
+ let t = l.value;
314
+ t && t !== e && t in u && h(t), l.value = e, m(u[e]);
315
+ } else l.value = e, m(t(n.config));
316
+ }
317
+ function _() {
318
+ let e = l.value;
319
+ if (!e) return;
320
+ let n = p(e);
321
+ n && (i === "per-preset" && u ? (u[e] = t(n.config), m(u[e])) : m(t(n.config)));
322
+ }
323
+ function v(e = 1) {
324
+ if (r.length === 0) return;
325
+ let t = l.value, n = t ? r.findIndex((e) => e.key === t) : -1, i = r.length, a = r[(n + e + i) % i];
326
+ g(a.key);
327
+ }
328
+ return {
329
+ config: c,
330
+ activePreset: d,
331
+ isDirty: f,
332
+ selectPreset: g,
333
+ resetCurrent: _,
334
+ cyclePreset: v,
335
+ getPreset: p
336
+ };
337
+ }
338
+ //#endregion
339
+ export { F as a, q as i, de as n, I as o, ne as r, L as s, me as t };
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./configurator-BoeScnDL.js";
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./configurator-BHJymdrF.js";
2
2
  export { e as CONFIGURATOR_SIZE_KEY, t as Configurator, i as ConfiguratorLayer, n as ConfiguratorRow, r as provideConfiguratorSize, o as useConfiguratorState, a as useOptionalConfiguratorSize };
@@ -1,10 +1,10 @@
1
1
  import { t as e } from "./class-names-q-UGOkHH.js";
2
2
  import { t } from "./useReducedMotion-vCXA_vyM.js";
3
- import { n } from "./resolveCanvasColor-6MCrswTB.js";
3
+ import { t as n } from "./useCanvas2D-CQRElMyE.js";
4
4
  import { t as r } from "./_plugin-vue_export-helper-B3ysoDQm.js";
5
5
  import { t as i } from "./usePointerVelocityField-DsIf7yyq.js";
6
6
  import { t as a } from "./useRoutePointer-B8itM7Ka.js";
7
- import { d as o, l as s } from "./pointerFieldMappings-DP5tla5z.js";
7
+ import { c as o, s } from "./pointerFieldMappings-DXwlU5uj.js";
8
8
  import { a as c, t as l } from "./rendererStatus-BxUlBLVy.js";
9
9
  import { n as u, t as d } from "./prng-2uS6J_A1.js";
10
10
  import { computed as f, createElementBlock as p, createElementVNode as m, defineComponent as h, getCurrentInstance as g, normalizeClass as _, onMounted as v, onUnmounted as y, openBlock as b, readonly as x, ref as S, shallowRef as C, unref as w, useTemplateRef as T, watch as E } from "vue";
@@ -0,0 +1,7 @@
1
+ //#region src/components/_shared/control.ts
2
+ var e = (e) => ({
3
+ "data-invalid": e || void 0,
4
+ "aria-invalid": e || void 0
5
+ });
6
+ //#endregion
7
+ export { e as t };
@@ -63,8 +63,8 @@ function l(t) {
63
63
  //#region src/composables/dark/darkModeSyncScript.ts
64
64
  var u = "vueuse-color-scheme", d = "dark";
65
65
  function f(e = {}) {
66
- let t = e.storageKey ?? "vueuse-color-scheme";
67
- return `(function(){try{var m=localStorage.getItem(${JSON.stringify(t)});var d=m==="${d}"||((m===null||m==="auto")&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var e=document.documentElement;e.classList.toggle("${d}",d);e.style.colorScheme=d?"dark":"light";}catch(_){}})();`;
66
+ let t = e.storageKey ?? "vueuse-color-scheme", n = e.defaultDark ?? "os", r = n === "os" ? "window.matchMedia&&window.matchMedia(\"(prefers-color-scheme: dark)\").matches" : String(n), i = e.queryOverride ? "var q=new URLSearchParams(location.search);if(q.has(\"dark\")){d=true;}else if(q.has(\"light\")){d=false;}" : "", a = e.normalize ? `localStorage.setItem(${JSON.stringify(t)},d?"dark":"light");` : "";
67
+ return `(function(){try{var m=localStorage.getItem(${JSON.stringify(t)});var d=m==="${d}"||((m===null||m==="auto")&&${r});${i}${a}var e=document.documentElement;e.classList.toggle("${d}",d);e.style.colorScheme=d?"dark":"light";}catch(_){}})();`;
68
68
  }
69
69
  //#endregion
70
70
  export { c as i, f as n, l as r, u as t };
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./class-names-q-UGOkHH.js";
2
2
  import { t } from "./useLiquidPress-h1scrPtP.js";
3
- import { i as n } from "./dark-z_P5QwqI.js";
3
+ import { i as n } from "./dark-CLlmo7dD.js";
4
4
  import { computed as r, createElementBlock as i, createStaticVNode as a, defineComponent as o, mergeProps as s, openBlock as c, ref as l, unref as u, useAttrs as d, watchEffect as f } from "vue";
5
5
  //#region src/components/dark-mode-toggle/DarkModeToggle.vue?vue&type=script&setup=true&lang.ts
6
6
  var p = ["data-size", "data-press-armed"], m = /* @__PURE__ */ o({
package/dist/dark.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "./dark-z_P5QwqI.js";
1
+ import { i as e, n as t, r as n, t as r } from "./dark-CLlmo7dD.js";
2
2
  export { r as DARK_MODE_STORAGE_KEY, t as darkModeSyncScript, n as installDarkModeSync, e as useGlobalDark };