@mkbabb/glass-ui 10.1.4 → 11.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 (214) hide show
  1. package/MIGRATION.md +1024 -1461
  2. package/README.md +2 -2
  3. package/dist/DialogContent-DG5kseRQ.js +159 -0
  4. package/dist/DropdownMenuTrigger-uhSXgEfK.js +76 -0
  5. package/dist/{Surface-1nPoabc3.js → Surface-C7wq2j0A.js} +3 -0
  6. package/dist/aurora.css +1 -0
  7. package/dist/aurora.js +246 -2472
  8. package/dist/auroraImageSource-xNLDUjcy.js +30 -0
  9. package/dist/axes.js +8 -8
  10. package/dist/blob.css +1 -0
  11. package/dist/blob.js +57 -54
  12. package/dist/budget-CJfhLIIV.js +13 -0
  13. package/dist/button-CAKhiOZy.js +113 -0
  14. package/dist/button.js +1 -1
  15. package/dist/{card-ByyqRBvK.js → card-D_uXphvL.js} +4 -1
  16. package/dist/card.js +1 -1
  17. package/dist/carousel.js +3 -2
  18. package/dist/{checkbox-B1qn65se.js → checkbox-COLnvULu.js} +1 -0
  19. package/dist/checkbox.css +1 -0
  20. package/dist/checkbox.js +1 -1
  21. package/dist/{collapsible-DFzK29Oh.js → collapsible-Bd4Et730.js} +1 -0
  22. package/dist/collapsible.css +1 -0
  23. package/dist/collapsible.js +1 -1
  24. package/dist/color-HkUaTAJj.js +270 -0
  25. package/dist/{color.glsl-DTJhdekG.js → color.glsl-bFJm8k5R.js} +4 -16
  26. package/dist/color.wgsl-B-qDJ_OM.js +4 -0
  27. package/dist/{command-CatrAsrl.js → command-BsFOGZwB.js} +3 -2
  28. package/dist/command.css +1 -0
  29. package/dist/command.js +1 -1
  30. package/dist/component-styles.css +0 -1
  31. package/dist/components/_shared/axes.d.ts +7 -0
  32. package/dist/components/_shared/feedback/dot-ring.css +1 -1
  33. package/dist/components/_shared/overlay/focus-return.d.ts +9 -0
  34. package/dist/components/_shared/overlay/index.d.ts +3 -0
  35. package/dist/components/_shared/overlay/root-scroll-lock.d.ts +4 -0
  36. package/dist/components/_shared/overlay/sheet-width.d.ts +2 -0
  37. package/dist/components/_shared/shape/useBarShape.d.ts +4 -0
  38. package/dist/components/aurora/composables/auroraFallbackGround.d.ts +12 -0
  39. package/dist/components/aurora/constants/presets.d.ts +21 -0
  40. package/dist/components/aurora/index.d.ts +2 -2
  41. package/dist/components/button/styles.css +1 -1
  42. package/dist/components/dark-mode-toggle/dark-mode-toggle.css +1 -1
  43. package/dist/components/dialog/DialogContent.vue.d.ts +2 -2
  44. package/dist/components/dialog/ModalOverlay.vue.d.ts +2 -2
  45. package/dist/components/dialog/ModalScrim.vue.d.ts +26 -0
  46. package/dist/components/dialog/styles.css +1 -1
  47. package/dist/components/dock/GlassDock.vue.d.ts +4 -1
  48. package/dist/components/dock/composables/useDockClickIntegrity.d.ts +4 -0
  49. package/dist/components/dock/composables/useDockShellProps.d.ts +34 -2
  50. package/dist/components/dock/composables/useDockState.d.ts +5 -0
  51. package/dist/components/dock/index.d.ts +1 -2
  52. package/dist/components/dock/styles/controls/icon-button.css +1 -1
  53. package/dist/components/dock/styles/controls/tab-button.css +1 -1
  54. package/dist/components/dock/styles/morph.css +1 -1
  55. package/dist/components/dock/styles/run.css +1 -1
  56. package/dist/components/dock/trigger.d.ts +1 -0
  57. package/dist/components/expandable-container/ExpandableContainer.vue.d.ts +30 -29
  58. package/dist/components/menu/ContextMenu.vue.d.ts +27 -0
  59. package/dist/components/menu/DropdownMenu.vue.d.ts +5 -23
  60. package/dist/components/menu/context.d.ts +18 -5
  61. package/dist/components/menu/family-click.d.ts +2 -0
  62. package/dist/components/menu/family-context.d.ts +2 -0
  63. package/dist/components/menu/index.d.ts +1 -1
  64. package/dist/components/sheet/SheetContent.vue.d.ts +2 -2
  65. package/dist/components/sortable-list/styles.css +1 -0
  66. package/dist/components/surface/Surface.vue.d.ts +4 -1
  67. package/dist/components/tabs/composables/useTabDragMorph.d.ts +4 -7
  68. package/dist/components/tabs/styles/segmented.css +1 -1
  69. package/dist/components/tabs/types.d.ts +7 -8
  70. package/dist/composables/glass/fieldPaint.d.ts +4 -0
  71. package/dist/composables/glass/useGlassBackdropLuminance.d.ts +7 -6
  72. package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +8 -0
  73. package/dist/composables/motion/core/motionTempo.d.ts +2 -1
  74. package/dist/composables/motion/morph/useDragMorph.d.ts +2 -2
  75. package/dist/composables/motion/morph/useSelectionGroup.d.ts +6 -25
  76. package/dist/composables/motion/morph/useSelectionIndicator.d.ts +8 -54
  77. package/dist/composables/motion/spring/useLiquidFlex.d.ts +3 -5
  78. package/dist/composables/motion/spring/useSpringMount.d.ts +0 -9
  79. package/dist/{configurator-Dl10mc3L.js → configurator-C1ZKEf1b.js} +7 -5
  80. package/dist/configurator.css +1 -0
  81. package/dist/configurator.js +1 -1
  82. package/dist/constants-DfrO-IaH.js +8 -0
  83. package/dist/constellation.css +1 -0
  84. package/dist/constellation.js +2 -1
  85. package/dist/control.css +1 -0
  86. package/dist/{control.css_vue_type_style_index_0_src_true_lang-BIdufaDG.js → control.css_vue_type_style_index_0_src_true_lang-D2hdtjs4.js} +1 -0
  87. package/dist/{createCanvasLifecycle-hJHobVTn.js → createCanvasLifecycle-DS0vEs_G.js} +76 -75
  88. package/dist/dark-mode-toggle.js +1 -1
  89. package/dist/{data-table-DQuWkiwL.js → data-table-lDykVYuo.js} +1 -0
  90. package/dist/data-table.css +1 -0
  91. package/dist/data-table.js +1 -1
  92. package/dist/{deck-Cm_VmyNL.js → deck-Bc-2mEKE.js} +1 -0
  93. package/dist/deck.js +1 -1
  94. package/dist/dialog.js +1 -1
  95. package/dist/dock-trigger.d.ts +1 -0
  96. package/dist/dock-trigger.js +88 -0
  97. package/dist/dock.js +677 -689
  98. package/dist/easing.js +4 -4
  99. package/dist/expandable-container-wS1awXGd.js +135 -0
  100. package/dist/expandable-container.css +1 -0
  101. package/dist/expandable-container.js +1 -1
  102. package/dist/{fading-scroll-ClCPooXb.js → fading-scroll-D3Y20ibL.js} +1 -1
  103. package/dist/fading-scroll.js +1 -1
  104. package/dist/fieldPaint-Ci77oajZ.js +7 -0
  105. package/dist/fourier-field.css +1 -0
  106. package/dist/fourier-field.js +15 -13
  107. package/dist/glSetup-DMaDgrEj.js +577 -0
  108. package/dist/glass-ui.js +66 -65
  109. package/dist/handmark.css +1 -0
  110. package/dist/handmark.js +82 -71
  111. package/dist/index.css +1 -0
  112. package/dist/index.d.ts +1 -1
  113. package/dist/{input-eLZ_AU7l.js → input-BLF2pMHE.js} +1 -1
  114. package/dist/input.js +1 -1
  115. package/dist/{label-CE03H1KL.js → label-ryNPL7e6.js} +1 -0
  116. package/dist/label.css +1 -0
  117. package/dist/label.js +1 -1
  118. package/dist/labeled-field.css +1 -0
  119. package/dist/labeled-field.js +5 -4
  120. package/dist/{menu-DaYAZiVW.js → menu-C_l2Sslf.js} +162 -112
  121. package/dist/menu.js +3 -3
  122. package/dist/metric.js +1 -0
  123. package/dist/motion-core.js +138 -44
  124. package/dist/motion-lHDAQHEE.js +91 -0
  125. package/dist/motion.js +5 -5
  126. package/dist/motionTempo-DXdVbCWr.js +13 -0
  127. package/dist/music-staff.js +1 -0
  128. package/dist/{number-field-RP89046a.js → number-field-BXFUP49Z.js} +3 -2
  129. package/dist/number-field.css +1 -0
  130. package/dist/number-field.js +1 -1
  131. package/dist/pager-dots.css +1 -0
  132. package/dist/pager-dots.js +3 -2
  133. package/dist/participation-C5y5VZTN.js +52 -0
  134. package/dist/{popover-BdpoE4Ar.js → popover-DQUmwuAa.js} +3 -2
  135. package/dist/popover.js +1 -1
  136. package/dist/{progress-eVa-mc7J.js → progress-BUn0Bw7Z.js} +1 -0
  137. package/dist/progress.css +1 -0
  138. package/dist/progress.js +1 -1
  139. package/dist/{radio-group-B58Bz16F.js → radio-group-xdEy2tdi.js} +1 -0
  140. package/dist/radio-group.css +1 -0
  141. package/dist/radio-group.js +1 -1
  142. package/dist/root-scroll-lock-DJFrQhMa.js +22 -0
  143. package/dist/select-Dt5dXm87.js +309 -0
  144. package/dist/select.js +1 -1
  145. package/dist/{separator-D4EZM10u.js → separator-C4y9p_ky.js} +1 -0
  146. package/dist/separator.css +1 -0
  147. package/dist/separator.js +1 -1
  148. package/dist/sheet-DLqNUIZl.js +347 -0
  149. package/dist/sheet-width-DgXgJNa5.js +18 -0
  150. package/dist/sheet.js +2 -2
  151. package/dist/{slider-5uoY-cLG.js → slider-CZiKrWGg.js} +8 -8
  152. package/dist/slider.js +1 -1
  153. package/dist/sortable-list.js +2 -1
  154. package/dist/{status-dot-W4LFiJps.js → status-dot-BDZKcRxy.js} +2 -1
  155. package/dist/status-dot.css +1 -0
  156. package/dist/status-dot.js +1 -1
  157. package/dist/styles/components.css +1 -1
  158. package/dist/styles/glass/glass-capsule.css +1 -1
  159. package/dist/styles/glass/glass-chip.css +1 -1
  160. package/dist/styles/glass/mark.css +1 -1
  161. package/dist/styles/glass/overlay-plate.css +1 -1
  162. package/dist/styles/glass/surface-axis.css +1 -1
  163. package/dist/styles/index.css +1 -1
  164. package/dist/styles/theme/radius.css +1 -1
  165. package/dist/styles/tokens/color-radius.css +1 -1
  166. package/dist/styles/tokens/manifest.d.ts +1 -1
  167. package/dist/styles/tokens/scale-paper.css +1 -1
  168. package/dist/styles/utilities/base-misc.css +1 -1
  169. package/dist/surface.js +1 -1
  170. package/dist/{switch-BYUZ6g9G.js → switch-DLfGYU35.js} +1 -0
  171. package/dist/switch.css +1 -0
  172. package/dist/switch.js +1 -1
  173. package/dist/tabs-NgTRPGZx.js +229 -0
  174. package/dist/tabs.js +1 -1
  175. package/dist/textarea.js +1 -1
  176. package/dist/timeline.css +1 -0
  177. package/dist/timeline.js +4 -3
  178. package/dist/toggle-group-DgXcJGD6.js +129 -0
  179. package/dist/toggle-group.css +1 -0
  180. package/dist/toggle-group.js +1 -1
  181. package/dist/tokens.js +2 -0
  182. package/dist/{tooltip-CZVubnJf.js → tooltip-Do3qCw0r.js} +1 -1
  183. package/dist/tooltip.js +1 -1
  184. package/dist/typewriter.css +1 -0
  185. package/dist/typewriter.js +1 -0
  186. package/dist/uniformBridge-CJyy7NOn.js +150 -0
  187. package/dist/useBarShape-CmP35Z8o.js +24 -0
  188. package/dist/{useCanvas2D-CQRElMyE.js → useCanvas2D-Bhpwua98.js} +1 -1
  189. package/dist/{useDockCtaReceive-BSSgD6mu.js → useDockCtaReceive-Dn_-paqP.js} +1 -1
  190. package/dist/{useDragMorph-B363RUbF.js → useDragMorph-BEI74U0t.js} +51 -40
  191. package/dist/{color.wgsl-BTszLY39.js → useGpuSubstrate-Y5XAdU8d.js} +7 -7
  192. package/dist/{useLiquidPress-h1scrPtP.js → useLiquidPress-D5mjZC6U.js} +2 -2
  193. package/dist/useScrollChrome-DMP6kDI9.js +67 -0
  194. package/dist/useSelectionGroup-DAQv5Lb5.js +186 -0
  195. package/dist/{useSpring-9u2_shxV.js → useSpring-Aof0nTRt.js} +1 -1
  196. package/dist/useSpringMount-jgNkymRl.js +73 -0
  197. package/dist/wgpuSetup-CFuqd_RP.js +1278 -0
  198. package/package.json +8 -1
  199. package/dist/DialogContent-CwIBvou_.js +0 -157
  200. package/dist/DropdownMenuTrigger-CKRnhDSQ.js +0 -93
  201. package/dist/button-BOFTUPyU.js +0 -110
  202. package/dist/composables/motion/morph/eyeglass.d.ts +0 -141
  203. package/dist/expandable-container-CZUj9BzY.js +0 -142
  204. package/dist/glass-ui.css +0 -2
  205. package/dist/motion-BvV1_24p.js +0 -61
  206. package/dist/motionTempo-tscp92Nm.js +0 -7
  207. package/dist/participation-B7UFdgXB.js +0 -55
  208. package/dist/select-BiF0FCZf.js +0 -292
  209. package/dist/sheet-DmJxgAHc.js +0 -345
  210. package/dist/tabs-C5sC0fBE.js +0 -269
  211. package/dist/toggle-group-CC5b3o1R.js +0 -125
  212. package/dist/useScrollChrome-BJbWV32F.js +0 -162
  213. package/dist/useSelectionGroup-zsEwitF6.js +0 -291
  214. package/dist/useSpringMount-OA-0mTNv.js +0 -73
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mkbabb/glass-ui",
3
- "version": "10.1.4",
3
+ "version": "11.0.0",
4
4
  "description": "Glassmorphic design system — Vue 3.5 components, reka-ui primitives, Tailwind CSS v4 tokens",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -46,6 +46,9 @@
46
46
  "blob-config": [
47
47
  "dist/blob-config.d.ts"
48
48
  ],
49
+ "dock-trigger": [
50
+ "dist/dock-trigger.d.ts"
51
+ ],
49
52
  "color": [
50
53
  "dist/color.d.ts"
51
54
  ],
@@ -253,6 +256,10 @@
253
256
  "types": "./dist/blob-config.d.ts",
254
257
  "import": "./dist/blob-config.js"
255
258
  },
259
+ "./dock-trigger": {
260
+ "types": "./dist/dock-trigger.d.ts",
261
+ "import": "./dist/dock-trigger.js"
262
+ },
256
263
  "./color": {
257
264
  "types": "./dist/color.d.ts",
258
265
  "import": "./dist/color.js"
@@ -1,157 +0,0 @@
1
- import { t as e } from "./class-names-FlXcvRRT.js";
2
- import { t } from "./resolve-DdrNvBby.js";
3
- import { t as n } from "./useSpringMount-OA-0mTNv.js";
4
- import { i as r, n as i } from "./motion-BvV1_24p.js";
5
- import { t as a } from "./useMotionAxis-D-rtIhca.js";
6
- import { t as o } from "./shortcuts-DGGWNRNe.js";
7
- import { computed as s, createBlock as c, createCommentVNode as l, createElementVNode as u, createVNode as d, defineComponent as f, mergeProps as p, openBlock as m, ref as h, renderSlot as g, unref as _, watch as v, withCtx as y } from "vue";
8
- import { DialogClose as b, DialogContent as x, DialogPortal as S, DialogRoot as C, injectDialogRootContext as w, useForwardPropsEmits as T } from "reka-ui";
9
- //#endregion
10
- //#region src/components/dialog/Dialog.vue
11
- var E = /* @__PURE__ */ f({
12
- __name: "Dialog",
13
- props: {
14
- open: { type: Boolean },
15
- defaultOpen: { type: Boolean },
16
- modal: { type: Boolean },
17
- unmountOnHide: { type: Boolean },
18
- origin: {}
19
- },
20
- emits: ["update:open"],
21
- setup(e, { emit: t }) {
22
- let n = e, r = t, i = T(s(() => {
23
- let { origin: e, ...t } = n;
24
- return t;
25
- }), r);
26
- return (e, t) => (m(), c(_(C), p({ "data-slot": "dialog" }, _(i)), {
27
- default: y(() => [g(e.$slots, "default")]),
28
- _: 3
29
- }, 16));
30
- }
31
- }), D = /* @__PURE__ */ f({
32
- inheritAttrs: !1,
33
- __name: "DialogContent",
34
- props: {
35
- forceMount: { type: Boolean },
36
- disableOutsidePointerEvents: { type: Boolean },
37
- class: { type: [
38
- Boolean,
39
- null,
40
- String,
41
- Object,
42
- Array
43
- ] },
44
- surface: { default: "glass" },
45
- motion: {},
46
- scroll: {
47
- type: Boolean,
48
- default: !1
49
- },
50
- dismiss: { default: "free" }
51
- },
52
- emits: [
53
- "escapeKeyDown",
54
- "pointerDownOutside",
55
- "focusOutside",
56
- "interactOutside",
57
- "openAutoFocus",
58
- "closeAutoFocus"
59
- ],
60
- setup(f, { emit: C }) {
61
- let E = f, D = C, O = s(() => {
62
- let { class: e, surface: t, motion: n, scroll: r, dismiss: i, forceMount: a, ...o } = E;
63
- return o;
64
- }), k = a(() => E.motion), A = s(() => k.resolved.value !== "off"), j = w();
65
- o(() => j.open.value && j.modal.value);
66
- let M = n({
67
- open: j.open,
68
- preset: "present"
69
- }), N = s(() => {
70
- if (!A.value) return;
71
- let e = M.position.value;
72
- return {
73
- transform: "none",
74
- scale: String(1 - .05 * e),
75
- opacity: String(1 - e),
76
- transition: "none"
77
- };
78
- }), P = s(() => A.value ? M.present.value || j.open.value : E.forceMount), F = s(() => A.value && !j.open.value ? "" : void 0), I = s(() => A.value ? i(M.position.value) : null), L = s(() => A.value ? M.present.value || j.open.value : void 0), R = h(null), z = () => R.value?.closest("[data-slot=\"dialog-content\"]") ?? null;
79
- v(() => j.open.value, (e) => {
80
- if (!A.value || e !== !1) return;
81
- let t = document.activeElement;
82
- t && z()?.contains(t) && j.triggerElement.value?.focus({ preventScroll: !0 });
83
- }, { flush: "sync" });
84
- let B = h(0), V = s(() => B.value === 0 ? void 0 : B.value % 2 == 1 ? "a" : "b"), H = s(() => E.dismiss === "free");
85
- function U(e) {
86
- E.dismiss === "locked" && (e.preventDefault(), B.value += 1);
87
- }
88
- let W = T(O, D), G = s(() => ({
89
- "--glass-veil-tier": "var(--glass-veil-dialog)",
90
- ...k.hostStyle.value ?? {},
91
- ...N.value ?? {}
92
- })), K = s(() => e("fixed left-1/2 top-1/2 z-modal", t("floating"), E.scroll ? "max-h-[calc(100dvh-2rem)] overflow-y-auto" : "", E.class));
93
- return (e, t) => (m(), c(_(S), { "force-mount": P.value }, {
94
- default: y(() => [d(r, {
95
- veil: "",
96
- opacity: I.value,
97
- "force-mount": L.value
98
- }, null, 8, ["opacity", "force-mount"]), d(_(x), p({
99
- ..._(W),
100
- ...e.$attrs,
101
- inert: F.value
102
- }, {
103
- "aria-modal": _(j).modal.value ? "true" : void 0,
104
- "force-mount": P.value,
105
- class: K.value,
106
- style: G.value,
107
- "data-surface": E.surface,
108
- "data-slot": "dialog-content",
109
- "data-dismiss": E.dismiss,
110
- "data-rebuff": V.value,
111
- "data-scroll": E.scroll ? "" : void 0,
112
- "data-motion": _(k).dataMotion.value,
113
- onEscapeKeyDown: U,
114
- onPointerDownOutside: U
115
- }), {
116
- default: y(() => [
117
- u("span", {
118
- ref_key: "contentAnchorEl",
119
- ref: R,
120
- hidden: ""
121
- }, null, 512),
122
- H.value ? (m(), c(_(b), {
123
- key: 0,
124
- "data-slot": "dialog-close"
125
- }, {
126
- default: y(() => [...t[0] ||= [u("svg", {
127
- class: "w-4 h-4",
128
- viewBox: "0 0 24 24",
129
- fill: "none",
130
- stroke: "currentColor",
131
- "stroke-width": "2",
132
- "stroke-linecap": "round",
133
- "stroke-linejoin": "round",
134
- "aria-hidden": "true"
135
- }, [u("path", { d: "M18 6 6 18M6 6l12 12" })], -1), u("span", { class: "sr-only" }, "Close", -1)]]),
136
- _: 1
137
- })) : l("", !0),
138
- g(e.$slots, "default")
139
- ]),
140
- _: 3
141
- }, 16, [
142
- "aria-modal",
143
- "force-mount",
144
- "class",
145
- "style",
146
- "data-surface",
147
- "data-dismiss",
148
- "data-rebuff",
149
- "data-scroll",
150
- "data-motion"
151
- ])]),
152
- _: 3
153
- }, 8, ["force-mount"]));
154
- }
155
- });
156
- //#endregion
157
- export { E as n, D as t };
@@ -1,93 +0,0 @@
1
- import { t as e } from "./class-names-FlXcvRRT.js";
2
- import { t } from "./primitive-B2t2jdqM.js";
3
- import { computed as n, createBlock as r, defineComponent as i, inject as a, isRef as o, mergeProps as s, openBlock as c, provide as l, renderSlot as u, resolveDynamicComponent as d, unref as f, useAttrs as p, withCtx as m } from "vue";
4
- import { ContextMenuCheckboxItem as h, ContextMenuContent as g, ContextMenuGroup as _, ContextMenuItem as v, ContextMenuItemIndicator as y, ContextMenuLabel as b, ContextMenuPortal as x, ContextMenuRadioGroup as S, ContextMenuRadioItem as C, ContextMenuSeparator as w, ContextMenuSub as T, ContextMenuSubContent as E, ContextMenuSubTrigger as D, ContextMenuTrigger as O, DropdownMenuCheckboxItem as k, DropdownMenuContent as A, DropdownMenuGroup as j, DropdownMenuItem as M, DropdownMenuItemIndicator as N, DropdownMenuLabel as P, DropdownMenuPortal as F, DropdownMenuRadioGroup as I, DropdownMenuRadioItem as L, DropdownMenuSeparator as R, DropdownMenuSub as z, DropdownMenuSubContent as B, DropdownMenuSubTrigger as V, DropdownMenuTrigger as H, injectDropdownMenuRootContext as U } from "reka-ui";
5
- //#region src/components/menu/context.ts
6
- var W = Symbol("glass-menu-trigger");
7
- function G(e) {
8
- l(W, e);
9
- }
10
- function K() {
11
- let e = a(W, null);
12
- if (!e) throw Error("DropdownMenu parts must be used within DropdownMenu");
13
- return e;
14
- }
15
- var q = {
16
- Trigger: [H, O],
17
- Portal: [F, x],
18
- Content: [A, g],
19
- Item: [M, v],
20
- CheckboxItem: [k, h],
21
- RadioItem: [L, C],
22
- RadioGroup: [I, S],
23
- Group: [j, _],
24
- Separator: [R, w],
25
- Label: [P, b],
26
- Sub: [z, T],
27
- SubTrigger: [V, D],
28
- SubContent: [B, E],
29
- ItemIndicator: [N, y]
30
- };
31
- function J(e) {
32
- let t = K();
33
- return n(() => q[e][+(t.value === "context")]);
34
- }
35
- //#endregion
36
- //#region src/components/menu/DropdownMenuTrigger.vue
37
- var Y = /* @__PURE__ */ i({
38
- name: "DropdownMenuTrigger",
39
- inheritAttrs: !1,
40
- __name: "DropdownMenuTrigger",
41
- props: {
42
- asChild: {
43
- type: Boolean,
44
- default: !1
45
- },
46
- disabled: {
47
- type: Boolean,
48
- default: !1
49
- },
50
- action: { default: "click" },
51
- class: { type: [
52
- Boolean,
53
- null,
54
- String,
55
- Object,
56
- Array
57
- ] }
58
- },
59
- setup(i) {
60
- let a = i, l = p(), h = n(() => {
61
- let e = t(l);
62
- return a.asChild ? e : {
63
- ...e,
64
- type: "button"
65
- };
66
- }), g = K(), _ = J("Trigger"), v = U(null), y = !1;
67
- function b(e) {
68
- a.action !== "pointerdown" || g.value !== "click" || !v || a.disabled || e.button !== 0 || e.ctrlKey || (y = !0, v.onOpenToggle(), v.open.value && e.preventDefault());
69
- }
70
- function x(e) {
71
- y && (y = !1, e.detail !== 0 && (e.preventDefault(), e.stopImmediatePropagation()));
72
- }
73
- return (t, n) => (c(), r(d(f(_)), s(h.value, {
74
- as: "button",
75
- "as-child": i.asChild,
76
- disabled: i.disabled,
77
- class: f(e)("menu__trigger", a.class),
78
- "data-slot": "menu-trigger",
79
- onPointerdownCapture: b,
80
- onPointercancelCapture: n[0] ||= (e) => o(y) ? y.value = !1 : y = !1,
81
- onClickCapture: x
82
- }), {
83
- default: m(() => [u(t.$slots, "default")]),
84
- _: 3
85
- }, 16, [
86
- "as-child",
87
- "disabled",
88
- "class"
89
- ]));
90
- }
91
- });
92
- //#endregion
93
- export { K as i, G as n, J as r, Y as t };
@@ -1,110 +0,0 @@
1
- import { t as e } from "./class-names-FlXcvRRT.js";
2
- import { t } from "./DotRing-Blh4Mc3Q.js";
3
- import { t as n } from "./vSpecular-DMJo8pfD.js";
4
- import { t as r } from "./asElement-CRnm6A2v.js";
5
- import { t as i } from "./useLiquidPress-h1scrPtP.js";
6
- import { computed as a, createBlock as o, createCommentVNode as s, defineComponent as c, mergeProps as l, openBlock as u, ref as d, renderSlot as f, unref as p, useAttrs as m, withCtx as h, withDirectives as g } from "vue";
7
- import { Primitive as _ } from "reka-ui";
8
- //#endregion
9
- //#region src/components/button/Button.vue
10
- var v = /* @__PURE__ */ c({
11
- __name: "Button",
12
- props: {
13
- emphasis: { default: "secondary" },
14
- tone: { default: "neutral" },
15
- size: { default: "md" },
16
- iconOnly: {
17
- type: Boolean,
18
- default: !1
19
- },
20
- loading: {
21
- type: Boolean,
22
- default: !1
23
- },
24
- type: {},
25
- disabled: { type: [Boolean, String] },
26
- class: { type: [
27
- Boolean,
28
- null,
29
- String,
30
- Object,
31
- Array
32
- ] },
33
- asChild: { type: Boolean },
34
- as: { default: "button" }
35
- },
36
- setup(c) {
37
- let v = c;
38
- m();
39
- let y = a(() => v.loading || v.disabled === !0 || v.disabled === "true"), b = a(() => v.disabled === !0 || v.disabled === "true"), x = a(() => !v.asChild && v.as === "button"), S = a(() => v.emphasis === "primary" || v.emphasis === "secondary"), C = a(() => S.value && !y.value), w = a(() => ({
40
- type: x.value ? v.type ?? "button" : void 0,
41
- disabled: x.value ? b.value : void 0,
42
- "aria-disabled": !x.value && y.value ? "true" : void 0
43
- })), T = d(null);
44
- function E(e) {
45
- T.value = r(e);
46
- }
47
- let D = i({
48
- el: T,
49
- disabled: () => y.value,
50
- pressVar: "--glass-btn-press-t"
51
- }), O = a(() => D.pressStyle.value), k = a(() => e("button tap-squish focus-ring", S.value && "glass-capsule glass-specular-track", v.emphasis === "primary" && "glass-deep", C.value && "glass-capsule-hover", v.class));
52
- function A(e) {
53
- y.value && (e.preventDefault(), e.stopImmediatePropagation());
54
- }
55
- return (e, r) => g((u(), o(p(_), l({
56
- ref: E,
57
- as: c.as,
58
- "as-child": c.asChild,
59
- "data-slot": "button",
60
- "data-emphasis": c.emphasis,
61
- "data-tone": c.tone,
62
- "data-size": c.size,
63
- "data-icon-only": c.iconOnly || void 0,
64
- "data-control-target": "",
65
- "data-loading": c.loading || void 0,
66
- "data-press-armed": p(D).armed ? "" : void 0,
67
- "aria-busy": c.loading || void 0
68
- }, w.value, {
69
- class: k.value,
70
- style: O.value,
71
- onClick: A,
72
- onPointerdown: p(D).handlers.onPointerdown,
73
- onPointerup: p(D).handlers.onPointerup,
74
- onPointercancel: p(D).handlers.onPointercancel,
75
- onPointerleave: p(D).handlers.onPointerleave,
76
- onPointerenter: p(D).handlers.onPointerenter,
77
- onKeydown: p(D).handlers.onKeydown,
78
- onKeyup: p(D).handlers.onKeyup,
79
- onBlur: p(D).handlers.onBlur
80
- }), {
81
- default: h(() => [c.loading ? (u(), o(t, {
82
- key: 0,
83
- class: "button-mark"
84
- })) : s("", !0), f(e.$slots, "default")]),
85
- _: 3
86
- }, 16, [
87
- "as",
88
- "as-child",
89
- "data-emphasis",
90
- "data-tone",
91
- "data-size",
92
- "data-icon-only",
93
- "data-loading",
94
- "data-press-armed",
95
- "aria-busy",
96
- "class",
97
- "style",
98
- "onPointerdown",
99
- "onPointerup",
100
- "onPointercancel",
101
- "onPointerleave",
102
- "onPointerenter",
103
- "onKeydown",
104
- "onKeyup",
105
- "onBlur"
106
- ])), [[p(n), C.value]]);
107
- }
108
- });
109
- //#endregion
110
- export { v as t };
@@ -1,141 +0,0 @@
1
- /**
2
- * §C1: "On a hop it **spans origin and destination** (1.5×, max 1.6×) then retracts
3
- * onto the destination." The ceiling, not the nominal — a hop whose real span is
4
- * shorter than this spans its real distance and no further. The span law is
5
- * geometry-true first and capped second.
6
- */
7
- export declare const EYEGLASS_SPAN_MAX = 1.6;
8
- /**
9
- * §C1 (v1b): "**1.22× vertical swell largest at travel extremes** — a slug piling at
10
- * the wall." The cross-axis channel. It is a SWELL, not the reciprocal of the span:
11
- * the body thickens as it piles into its travel, which is the whole reason the moving
12
- * pill ends up taller than the bar it rides in.
13
- */
14
- export declare const EYEGLASS_SWELL_MAX = 1.22;
15
- /**
16
- * §C1: "**Leading edge outruns trailing 2:1** (one 83ms frame: −54 vs −28px)." The
17
- * asymmetry that makes mid-travel "an egg leaning into travel" rather than a symmetric
18
- * balloon. Expressed as the ratio itself so the origin below can be derived from it.
19
- */
20
- export declare const EYEGLASS_EDGE_RATIO = 2;
21
- /**
22
- * The transform-origin that PRODUCES the 2:1 asymmetry, measured as a fraction of the
23
- * box's longitudinal extent FROM THE LEADING EDGE. Derived, never transcribed:
24
- *
25
- * scaling a box of extent w by k about a point at fraction f from the leading edge
26
- * moves the leading edge by (1 − f)·(k − 1)·w and the trailing edge by f·(k − 1)·w,
27
- * so leading : trailing = (1 − f) : f, and (1 − f)/f = R ⇒ f = 1/(1 + R).
28
- *
29
- * At R = 2 that is exactly 1/3. One scale write, on the compositor, produces the whole
30
- * asymmetry — no second channel, no per-edge animation, no layout.
31
- */
32
- export declare const EYEGLASS_ORIGIN_FRACTION: number;
33
- /**
34
- * §C1: "**It breaks its own track**: moving pill ~8px taller than the bar —
35
- * `overflow:hidden` kills the organ", and the codex's own gloss, "licensed to overflow
36
- * ~10% of height". The fraction of its own cross extent the body hangs outside the
37
- * track on EACH side, DERIVED from the swell rather than transcribed beside it: a
38
- * symmetric swell of s hangs (s − 1)/2 out per side, so 1.22 gives 11% — the same ~10%
39
- * the seat wrote down, arrived at from the other measurement.
40
- *
41
- * Two independent numbers in the footage agreeing to a point is the corroboration; two
42
- * independent numbers in SOURCE is a drift waiting to happen, which is why only one of
43
- * them is written here. The figure is a LICENCE, not a target — the swell produces the
44
- * overflow and this is what the track must be prepared to let through. A track that
45
- * clips is not a tidier track, it is a dead organ.
46
- */
47
- export declare const EYEGLASS_OVERFLOW_LICENSE: number;
48
- /**
49
- * §C3 (the commit cascade) states its ladder in RANKS — "geometry(0) → annotation(+6) →
50
- * content(≈+15) → light decay to +30" — and its clock in milliseconds: "recolour
51
- * +80–160ms · page content commits +250–450ms · glow decays +500ms after geometry
52
- * stops". One unit reconciles them and it is the display frame:
53
- *
54
- * +6 × 16.67ms = 100ms → inside the measured 80–160ms recolour band
55
- * +15 × 16.67ms = 250ms → the measured content band's own opening edge
56
- * +30 × 16.67ms = 500ms → the measured glow decay, exactly
57
- *
58
- * The rank ladder is therefore not a second clock — it is the same clock counted in
59
- * frames, which is why the cascade reads as one gesture rather than four timers.
60
- */
61
- export declare const CASCADE_RANK_MS: number;
62
- /** The ranks §C3 measures, by the name it gives each stage of the one gesture. */
63
- export declare const CASCADE_RANKS: {
64
- /** The object itself. Rank 0 — the pill arrives at t0 and everything else is late. */
65
- readonly geometry: 0;
66
- /** The selected label taking its ink. §C3's "recolour +80–160ms". */
67
- readonly annotation: 6;
68
- /** Whatever the strip governs. §C3's "page content commits +250–450ms". */
69
- readonly content: 15;
70
- /** §C3: "the object stops, the light does not" — the wake's tail, +500ms. */
71
- readonly light: 30;
72
- };
73
- /** A cascade rank in milliseconds. The ONE conversion; no site does this arithmetic. */
74
- export declare function cascadeRankMs(rank: number): number;
75
- /** One longitudinal interval on the travel axis, in the container's own coordinates. */
76
- export interface EyeglassInterval {
77
- /** The leading-edge-most coordinate (left, or top on a vertical strip). */
78
- readonly start: number;
79
- /** The trailing-edge-most coordinate (right, or bottom on a vertical strip). */
80
- readonly end: number;
81
- }
82
- export interface EyeglassSpanParams {
83
- /** Where the body is leaving. */
84
- readonly from: EyeglassInterval;
85
- /** Where the body is arriving. */
86
- readonly to: EyeglassInterval;
87
- /**
88
- * The track's own inner interval on the same axis. The body may not span past it —
89
- * §C1's "Driven into the end it **clamps**, compressing against the bar's inner
90
- * edge". Omit only where no track exists to clamp against.
91
- */
92
- readonly track?: EyeglassInterval;
93
- /** The surface's declared ceiling; defaults to the measured `EYEGLASS_SPAN_MAX`. */
94
- readonly spanMax?: number;
95
- }
96
- export interface EyeglassSpan {
97
- /**
98
- * The longitudinal scalar to write, ≥ 1. `1` means the body does not span — a
99
- * same-tab commit, or a hop the ceiling has fully absorbed.
100
- */
101
- readonly span: number;
102
- /**
103
- * True when the ceiling or the track boundary shortened the geometric span. §C1's
104
- * clamp is a REPORTED state, not a silent floor: a paint that wants to read
105
- * "compressing against the bar's inner edge" has to know it happened.
106
- */
107
- readonly clamped: boolean;
108
- /**
109
- * `1` when travel runs toward increasing coordinates, `-1` when it runs back, `0`
110
- * for no travel. The sign the origin below flips on.
111
- */
112
- readonly direction: -1 | 0 | 1;
113
- }
114
- /**
115
- * The SPAN law. The body's transient extent is the union of where it is leaving and
116
- * where it is arriving — that is what "spans origin and destination" means literally —
117
- * expressed as a multiple of the DESTINATION extent, because the destination is what it
118
- * retracts onto and therefore what the scale is relative to.
119
- *
120
- * Two fences, in this order, both of them geometry rather than taste:
121
- * 1. the surface's ceiling (`spanMax`), and
122
- * 2. the track's inner edge — the body is licensed to overflow its track on the CROSS
123
- * axis (`EYEGLASS_OVERFLOW_LICENSE`) and on that axis only. Longitudinally it
124
- * clamps, which is the compression §C1 photographs at the ends of the bar.
125
- */
126
- export declare function eyeglassSpan(params: EyeglassSpanParams): EyeglassSpan;
127
- /**
128
- * The cross-axis SWELL, largest at travel extremes. `frac` is the travel distance
129
- * normalised by the container extent — the same geometry-relative fraction the writer
130
- * already computes — so a neighbouring hop barely thickens and a full-strip jump piles
131
- * into the wall.
132
- */
133
- export declare function eyeglassSwell(frac: number, swellMax?: number): number;
134
- /**
135
- * The `transform-origin` percentage along the travel axis that yields the 2:1 lead.
136
- * Travelling toward increasing coordinates the leading edge is the FAR one, so the
137
- * origin sits `EYEGLASS_ORIGIN_FRACTION` in from that end — i.e. at (1 − f) of the box.
138
- * Travelling back it mirrors. Zero travel keeps the centre, so a same-tab commit cannot
139
- * lean.
140
- */
141
- export declare function eyeglassOriginPercent(direction: -1 | 0 | 1): number;
@@ -1,142 +0,0 @@
1
- import { registerShortcut as e } from "./keyboard.js";
2
- import { t } from "./focus-Duf7EpUu.js";
3
- import { Teleport as n, createBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, mergeModels as s, mergeProps as c, nextTick as l, onUnmounted as u, openBlock as d, ref as f, renderSlot as p, unref as m, useModel as h, watch as g, withCtx as _ } from "vue";
4
- import { FocusScope as v } from "reka-ui";
5
- import { Maximize2 as y, Minimize2 as b } from "@lucide/vue";
6
- //#region src/components/expandable-container/ExpandableContainer.vue?vue&type=script&setup=true&lang.ts
7
- var x = [
8
- "data-state",
9
- "data-surface",
10
- "role",
11
- "aria-label",
12
- "aria-modal"
13
- ], S = ["hidden"], C = ["data-position", "aria-label"], w = ["hidden"], T = ["data-position", "aria-label"], E = { "data-part": "panel" }, D = 0, O = null;
14
- function k() {
15
- return typeof document > "u" ? !1 : (D === 0 && (O = document.body.style.overflow, document.body.style.overflow = "hidden"), D += 1, !0);
16
- }
17
- function A() {
18
- typeof document > "u" || D === 0 || (--D, D === 0 && (document.body.style.overflow = O ?? "", O = null));
19
- }
20
- //#endregion
21
- //#region src/components/expandable-container/ExpandableContainer.vue
22
- var j = /* @__PURE__ */ o({
23
- inheritAttrs: !1,
24
- __name: "ExpandableContainer",
25
- props: /*@__PURE__*/ s({
26
- buttonPosition: { default: "right" },
27
- expandLabel: { default: "Fullscreen" },
28
- collapseLabel: { default: "Exit fullscreen" },
29
- surface: { default: "glass" }
30
- }, {
31
- open: {
32
- type: Boolean,
33
- default: !1
34
- },
35
- openModifiers: {}
36
- }),
37
- emits: ["update:open"],
38
- setup(o) {
39
- let s = h(o, "open"), D = f(null);
40
- function O() {
41
- let e = D.value?.$el;
42
- return e instanceof HTMLElement ? e : null;
43
- }
44
- function j() {
45
- s.value = !0;
46
- }
47
- function M() {
48
- s.value = !1;
49
- }
50
- let N = !1, P = null, F = null;
51
- function I(e) {
52
- e && !N ? N = k() : !e && N && (A(), N = !1);
53
- }
54
- function L() {
55
- (O()?.querySelector("[autofocus]") ?? O()?.querySelector("[data-mode=\"collapse\"]") ?? O()?.querySelector(t) ?? O())?.focus();
56
- }
57
- async function R() {
58
- await l(), await l(), L();
59
- }
60
- let z = ["[data-mode=\"expand\"]", ...t.split(", ").map((e) => `.expandable-container__chrome:not([hidden]) ${e}`)].join(", ");
61
- function B() {
62
- let e = F?.isConnected ? F : O()?.querySelector(z);
63
- F = null, e?.focus();
64
- }
65
- function V(e) {
66
- e.preventDefault();
67
- }
68
- return g(s, (t, n) => {
69
- if (I(t), t && !n) {
70
- let t = typeof document < "u" ? document.activeElement : null;
71
- F = t instanceof HTMLElement ? t : null, P = e("Escape", M, {
72
- label: "Exit fullscreen",
73
- group: "UI",
74
- allowInInput: !0
75
- }), R();
76
- } else !t && n && (P?.(), P = null, l(B));
77
- }, { immediate: !0 }), u(() => {
78
- P?.(), P = null, I(!1);
79
- }), (e, t) => (d(), r(n, {
80
- to: "body",
81
- disabled: !s.value
82
- }, [a(m(v), {
83
- ref_key: "scope",
84
- ref: D,
85
- "as-child": "",
86
- loop: s.value,
87
- trapped: s.value,
88
- onMountAutoFocus: V
89
- }, {
90
- default: _(() => [i("div", c({
91
- class: "expandable-container",
92
- "data-state": s.value ? "expanded" : "collapsed",
93
- "data-surface": s.value ? o.surface : void 0,
94
- role: s.value ? "dialog" : void 0,
95
- "aria-label": s.value ? o.expandLabel : void 0,
96
- "aria-modal": s.value || void 0
97
- }, e.$attrs), [
98
- i("div", {
99
- class: "expandable-container__chrome",
100
- hidden: s.value
101
- }, [p(e.$slots, "expand-trigger", {
102
- expand: j,
103
- label: o.expandLabel
104
- }, () => [i("button", {
105
- type: "button",
106
- "data-part": "trigger",
107
- "data-control-target": "",
108
- "data-mode": "expand",
109
- "data-position": o.buttonPosition,
110
- "aria-label": o.expandLabel,
111
- onClick: j
112
- }, [a(m(y), {
113
- class: "expandable-container__icon",
114
- "aria-hidden": "true"
115
- })], 8, C)])], 8, S),
116
- i("div", {
117
- class: "expandable-container__chrome",
118
- hidden: !s.value
119
- }, [p(e.$slots, "fullscreen-chrome", {
120
- collapse: M,
121
- label: o.collapseLabel,
122
- fullscreen: !0
123
- }, () => [i("button", {
124
- type: "button",
125
- "data-part": "trigger",
126
- "data-control-target": "",
127
- "data-mode": "collapse",
128
- "data-position": o.buttonPosition,
129
- "aria-label": o.collapseLabel,
130
- onClick: M
131
- }, [a(m(b), {
132
- class: "expandable-container__icon",
133
- "aria-hidden": "true"
134
- })], 8, T)])], 8, w),
135
- i("div", E, [p(e.$slots, "default", { fullscreen: s.value })])
136
- ], 16, x)]),
137
- _: 3
138
- }, 8, ["loop", "trapped"])], 8, ["disabled"]));
139
- }
140
- });
141
- //#endregion
142
- export { j as t };