@mkbabb/glass-ui 3.6.0 → 3.8.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 (255) hide show
  1. package/dist/CardAction-q2qHCJFG.js +157 -0
  2. package/dist/CollapsibleContent-CP9qF1v4.js +63 -0
  3. package/dist/{CommandShortcut-BiVyqipe.js → CommandShortcut-SzWRhROC.js} +4 -4
  4. package/dist/{ContextMenuContent-De01_83g.js → ContextMenuContent-DDa0v27s.js} +1 -1
  5. package/dist/{ContextMenuSubContent-DrWkXKQP.js → ContextMenuSubContent-Do977Cbf.js} +4 -4
  6. package/dist/{DataTable-BGVXx0Ww.js → DataTable-CvlWXz65.js} +14 -7
  7. package/dist/DeckProgress-AVgbIULY.js +23 -0
  8. package/dist/{DialogContent-IQ8_BRrC.js → DialogContent-DjZWT3lK.js} +24 -24
  9. package/dist/{DialogFooter-Er0wA3K6.js → DialogFooter-Gprw8H_A.js} +2 -2
  10. package/dist/{DiscoGlyph-BaZ8OawK.js → DiscoGlyph-CG0F410s.js} +1 -1
  11. package/dist/{GlyphFace-B_7vOmYn.js → GlyphFace-DRjDkB0s.js} +1 -1
  12. package/dist/{HoverCardContent-ICfIMZX1.js → HoverCardContent-B6CcQ8He.js} +1 -1
  13. package/dist/{HoverPopover-DTSYkJtw.js → HoverPopover-D56O6Ylp.js} +1 -1
  14. package/dist/{IconTooltip-DZlCkU-0.js → IconTooltip-D2T5nYOM.js} +1 -1
  15. package/dist/{Input-CRJ2owjN.js → Input-DVG_J0ne.js} +4 -1
  16. package/dist/{Label-CZk-3nTc.js → Label-zRfbQdCn.js} +1 -1
  17. package/dist/{MetricBadge-BlrdbOGN.js → MetricBadge-lTc002u2.js} +1 -1
  18. package/dist/{Notification-DP_ApJLo.js → Notification-BxK8LZMw.js} +5 -4
  19. package/dist/{NumberFieldContent-Bhhmk95p.js → NumberFieldContent-CLNVR1iY.js} +5 -5
  20. package/dist/{PopoverContent-B8WtJECb.js → PopoverContent-BId6ggf_.js} +2 -2
  21. package/dist/{Progress-DjM86vfb.js → Progress-iEuD9pxG.js} +7 -7
  22. package/dist/{ScrollingText-P9o_DuMn.js → ScrollingText-CVyqxvfv.js} +2 -2
  23. package/dist/{SelectScrollDownButton-BGn3rjs9.js → SelectScrollDownButton-C7TRe-ep.js} +8 -7
  24. package/dist/{Separator-C2XtAXRp.js → Separator-D7sD7RKj.js} +1 -1
  25. package/dist/{Switch-x8n6husW.js → Switch-LDKLmmgx.js} +8 -2
  26. package/dist/TabsList-qyHZ2lKY.js +101 -0
  27. package/dist/{Toaster-DdhMKfus.js → Toaster-CabYEEF_.js} +54 -60
  28. package/dist/{ToggleGroupItem-gyXj998A.js → ToggleGroupItem-CkXUcBlt.js} +13 -5
  29. package/dist/{TooltipProvider-D-JrSqDu.js → TooltipProvider-CmZzCuaG.js} +1 -1
  30. package/dist/{UnderlineTabs-CuIK16JI.js → UnderlineTabs-Uxn-R3MT.js} +2 -2
  31. package/dist/animated-digit.js +2 -2
  32. package/dist/api/index.d.ts +4 -2
  33. package/dist/api.js +1 -1
  34. package/dist/aurora.js +753 -359
  35. package/dist/{badge-Cl6JZ1B7.js → badge-DHQrc_GQ.js} +13 -9
  36. package/dist/badge.js +1 -1
  37. package/dist/{button-BcMzVrqs.js → button-CAywcrhO.js} +6 -3
  38. package/dist/button.js +1 -1
  39. package/dist/canvas.d.ts +1 -0
  40. package/dist/canvas.js +3 -0
  41. package/dist/card.js +2 -2
  42. package/dist/carousel.js +110 -109
  43. package/dist/{check-CdkxGxXJ.js → check-BBKKKSTf.js} +1 -1
  44. package/dist/{chevron-down-pBY8sYfV.js → chevron-down-BSkTP2aL.js} +1 -1
  45. package/dist/{chevron-right-BjeKC22V.js → chevron-right-sDM0Yvrf.js} +1 -1
  46. package/dist/{chevron-up-DBeNHUm1.js → chevron-up-CCOD_FTz.js} +1 -1
  47. package/dist/collapsible.js +1 -1
  48. package/dist/color-DMLTunJK.js +84 -0
  49. package/dist/color.js +2 -2
  50. package/dist/command.js +1 -1
  51. package/dist/compile-BBTRjvQS.js +158 -0
  52. package/dist/components/custom/aurora/Aurora.vue.d.ts +1 -0
  53. package/dist/components/custom/aurora/composables/atoms.d.ts +125 -0
  54. package/dist/components/custom/aurora/composables/color.d.ts +7 -25
  55. package/dist/components/custom/aurora/composables/cursorModel.d.ts +35 -2
  56. package/dist/components/custom/aurora/composables/glSetup.d.ts +1 -1
  57. package/dist/components/custom/aurora/composables/gpuRuntime.d.ts +16 -0
  58. package/dist/components/custom/aurora/composables/runtime.d.ts +18 -0
  59. package/dist/components/custom/aurora/composables/uniformBridge.d.ts +46 -12
  60. package/dist/components/custom/aurora/composables/useAurora.d.ts +6 -0
  61. package/dist/components/custom/aurora/composables/useCursorInteraction.d.ts +8 -0
  62. package/dist/components/custom/aurora/constants/presets.d.ts +60 -4
  63. package/dist/components/custom/aurora/constants/renderMode.d.ts +32 -0
  64. package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +7 -0
  65. package/dist/components/custom/aurora/constants/shaders/brush.glsl.d.ts +1 -1
  66. package/dist/components/custom/aurora/constants/shaders/composition.glsl.d.ts +1 -1
  67. package/dist/components/custom/aurora/constants/shaders/flow.glsl.d.ts +1 -1
  68. package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +2 -2
  69. package/dist/components/custom/aurora/constants/shaders/painterly.wgsl.d.ts +7 -0
  70. package/dist/components/custom/aurora/constants/shaders/wake.wgsl.d.ts +4 -0
  71. package/dist/components/custom/aurora/index.d.ts +4 -3
  72. package/dist/components/custom/constellation/Constellation.vue.d.ts +40 -5
  73. package/dist/components/custom/constellation/constellationField.d.ts +110 -5
  74. package/dist/components/custom/constellation/index.d.ts +2 -2
  75. package/dist/components/custom/dock/GlassDock.vue.d.ts +12 -4
  76. package/dist/components/custom/dock/composables/dockMorphContext.d.ts +57 -0
  77. package/dist/components/custom/dock/composables/index.d.ts +3 -0
  78. package/dist/components/custom/dock/composables/useDockHold.d.ts +61 -0
  79. package/dist/components/custom/dock/composables/useLayerTransition.d.ts +13 -59
  80. package/dist/components/custom/dock/index.d.ts +2 -0
  81. package/dist/components/custom/fourier-field/FourierField.vue.d.ts +38 -0
  82. package/dist/components/custom/fourier-field/index.d.ts +2 -0
  83. package/dist/components/custom/fourier-field/math.d.ts +57 -0
  84. package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +15 -0
  85. package/dist/components/custom/goo-blob/composables/useBlobMood.d.ts +18 -2
  86. package/dist/components/custom/goo-blob/composables/useBlobPointer.d.ts +47 -4
  87. package/dist/components/custom/goo-blob/composables/useBlobSatellites.d.ts +2 -0
  88. package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +19 -4
  89. package/dist/components/custom/goo-blob/index.d.ts +1 -1
  90. package/dist/components/custom/goo-blob/shaders/sdf-body.glsl.d.ts +1 -1
  91. package/dist/components/custom/goo-blob/shaders/watercolor-edges.glsl.d.ts +2 -2
  92. package/dist/components/custom/goo-blob/types.d.ts +48 -0
  93. package/dist/components/custom/metric-cell/MetricCell.vue.d.ts +1 -1
  94. package/dist/components/custom/metric-stack/MetricStack.vue.d.ts +1 -1
  95. package/dist/components/ui/_shared/ModalOverlay.vue.d.ts +1 -1
  96. package/dist/components/ui/alert/index.d.ts +1 -1
  97. package/dist/components/ui/card/Card.vue.d.ts +26 -3
  98. package/dist/components/ui/card/CardAction.vue.d.ts +24 -0
  99. package/dist/components/ui/card/index.d.ts +2 -1
  100. package/dist/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +5 -1
  101. package/dist/components/ui/progress/ProgressDefault.vue.d.ts +14 -4
  102. package/dist/components/ui/slider/Slider.vue.d.ts +3 -1
  103. package/dist/components/ui/tabs/TabsList.vue.d.ts +13 -3
  104. package/dist/components/ui/toast/Toast.vue.d.ts +5 -5
  105. package/dist/components/ui/toast/use-toast.d.ts +1 -1
  106. package/dist/composables/color/index.d.ts +69 -0
  107. package/dist/composables/dom/index.d.ts +1 -1
  108. package/dist/composables/dom/useResolveTokenColor.d.ts +27 -0
  109. package/dist/composables/glass/canvas2d/index.d.ts +2 -1
  110. package/dist/composables/glass/canvas2d/resolveCanvasColor.d.ts +20 -0
  111. package/dist/composables/glass/canvas2d/useCanvas2D.d.ts +15 -1
  112. package/dist/composables/glass/createGPUCanvas.d.ts +40 -0
  113. package/dist/composables/glass/index.d.ts +3 -1
  114. package/dist/composables/glass/useSpecularTracking.d.ts +33 -0
  115. package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +45 -0
  116. package/dist/composables/glass/webgl/shaders/procedural-color.glsl.d.ts +7 -0
  117. package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +5 -5
  118. package/dist/composables/motion/core/index.d.ts +1 -0
  119. package/dist/configurator.js +1 -1
  120. package/dist/confirm-dialog.js +3 -3
  121. package/dist/constellation.js +144 -75
  122. package/dist/context-menu.js +2 -2
  123. package/dist/controls.js +2 -2
  124. package/dist/dark.js +1 -1
  125. package/dist/data-table.js +1 -1
  126. package/dist/deck-progress.d.ts +1 -0
  127. package/dist/deck-progress.js +2 -0
  128. package/dist/dialog.js +2 -2
  129. package/dist/disco-glyph.js +1 -1
  130. package/dist/dock.js +388 -287
  131. package/dist/{dockContext-spUj_-E5.js → dockContext-BKeIMmNk.js} +1 -1
  132. package/dist/dom.js +6 -6
  133. package/dist/{dropdown-menu-EFjl5iKo.js → dropdown-menu-B_4bWyyG.js} +5 -5
  134. package/dist/dropdown-menu.js +1 -1
  135. package/dist/expandable-container.js +2 -2
  136. package/dist/fonts/README.md +26 -18
  137. package/dist/forms.js +10 -7
  138. package/dist/fourier-field.d.ts +1 -0
  139. package/dist/fourier-field.js +166 -0
  140. package/dist/glass-carousel.js +12 -7
  141. package/dist/glass-panel.js +7 -7
  142. package/dist/glass-ui.css +1 -1
  143. package/dist/glass-ui.js +209 -206
  144. package/dist/glyph-face.js +2 -2
  145. package/dist/goo-blob.js +485 -300
  146. package/dist/header-ribbon.js +1 -1
  147. package/dist/hover-card.js +1 -1
  148. package/dist/hover-popover.js +1 -1
  149. package/dist/icon-tooltip.js +1 -1
  150. package/dist/index.d.ts +1 -0
  151. package/dist/instrument-chassis.js +1 -1
  152. package/dist/instrument-rail.js +1 -1
  153. package/dist/keyboard.js +1 -1
  154. package/dist/{keys-BFoma9vm.js → keys-BsYjEFOW.js} +1 -1
  155. package/dist/label.js +1 -1
  156. package/dist/labeled-field.js +6 -6
  157. package/dist/metric-badge.js +1 -1
  158. package/dist/metric-stack.js +1 -1
  159. package/dist/{minimize-2-BP27-qBY.js → minimize-2-lcXOuc6V.js} +1 -1
  160. package/dist/motion-core.js +68 -98
  161. package/dist/motion.js +3 -3
  162. package/dist/notification.js +1 -1
  163. package/dist/number-field.js +1 -1
  164. package/dist/paper-backdrop.js +1 -1
  165. package/dist/popover.js +1 -1
  166. package/dist/progress.js +1 -1
  167. package/dist/pulse.js +1 -1
  168. package/dist/reactive.js +2 -2
  169. package/dist/resolveCanvasColor-BBiYfp8g.js +11 -0
  170. package/dist/responsive-tabs.js +2 -2
  171. package/dist/scrolling-text.js +1 -1
  172. package/dist/{search-DBG8qaRs.js → search-nbkvr2dC.js} +1 -1
  173. package/dist/search.js +12 -12
  174. package/dist/select.js +3 -3
  175. package/dist/separator.js +1 -1
  176. package/dist/{sheet-CQYYrkr9.js → sheet-VZEtNFvO.js} +4 -4
  177. package/dist/sheet.js +1 -1
  178. package/dist/slider-D9puf-Ko.js +142 -0
  179. package/dist/slider.js +1 -1
  180. package/dist/sortable-list.js +3 -3
  181. package/dist/styles/components.css +1 -1
  182. package/dist/styles/dock-controls.css +21 -18
  183. package/dist/styles/dock.css +415 -224
  184. package/dist/styles/fonts.css +0 -25
  185. package/dist/styles/glass.css +100 -41
  186. package/dist/styles/theme.css +58 -2
  187. package/dist/styles/tokens.css +139 -32
  188. package/dist/styles/typography.css +55 -72
  189. package/dist/styles/utilities.css +19 -14
  190. package/dist/styles/view-transition.css +12 -40
  191. package/dist/supportsCssTimeline-C5oe0lnD.js +12 -0
  192. package/dist/switch.js +1 -1
  193. package/dist/tabs.js +5 -5
  194. package/dist/timeline.js +3 -3
  195. package/dist/toast.js +1 -1
  196. package/dist/toggle-group.js +1 -1
  197. package/dist/tooltip.js +1 -1
  198. package/dist/typewriter.js +1 -1
  199. package/dist/{useAnimatedNumber-DfVgP4te.js → useAnimatedNumber-C_3wZLx4.js} +1 -1
  200. package/dist/{useCanvas2D-BeNJqqIS.js → useCanvas2D-ClrQuZtp.js} +2 -1
  201. package/dist/{useConfiguratorState-DUtC1jxr.js → useConfiguratorState-CMff4GzH.js} +5 -5
  202. package/dist/useResolveTokenColor-r9pnNjqK.js +24 -0
  203. package/dist/useScrollProgress-C9ysDic5.js +35 -0
  204. package/dist/useSpecularTracking-BVRZsRHA.js +26 -0
  205. package/dist/{useTextHighlight-Dmtofpk2.js → useTextHighlight-9nMW23Qb.js} +1 -1
  206. package/dist/{useTouchGate-CS5Csc2h.js → useTouchGate-WFyJYsth.js} +1 -1
  207. package/dist/vReveal-CqaCz_mC.js +44 -0
  208. package/dist/watercolor-dot.js +2 -2
  209. package/dist/{x-C4pz9nbD.js → x-Dfsegz9Y.js} +1 -1
  210. package/package.json +64 -4
  211. package/src/fonts/README.md +26 -18
  212. package/src/styles/dock-controls.css +21 -18
  213. package/src/styles/dock.css +415 -224
  214. package/src/styles/fonts.css +0 -25
  215. package/src/styles/glass.css +100 -41
  216. package/src/styles/theme.css +58 -2
  217. package/src/styles/tokens.css +139 -32
  218. package/src/styles/typography.css +55 -72
  219. package/src/styles/utilities.css +19 -14
  220. package/src/styles/view-transition.css +12 -40
  221. package/dist/CardFooter-C390imy7.js +0 -129
  222. package/dist/CollapsibleContent-cauTbZEM.js +0 -52
  223. package/dist/TabsIndicator-DA0x9gPr.js +0 -97
  224. package/dist/color-DS-iLRVM.js +0 -33
  225. package/dist/compile-C62K_FpC.js +0 -106
  226. package/dist/fonts/fraunces/fraunces-latin.woff2 +0 -0
  227. package/dist/slider-CgNzRSh6.js +0 -129
  228. package/dist/useViewTransition-DI0Rs2rV.js +0 -21
  229. package/dist/vReveal-u2wSG2El.js +0 -35
  230. package/src/fonts/fraunces/fraunces-latin.woff2 +0 -0
  231. /package/dist/{InstrumentChassis-DaHIZCqy.js → InstrumentChassis-C2f6cBaQ.js} +0 -0
  232. /package/dist/{InstrumentRail-B0qqLFN0.js → InstrumentRail-CUJ05YVG.js} +0 -0
  233. /package/dist/{ModalOverlay-B_CBtqcE.js → ModalOverlay-B1GkAjNb.js} +0 -0
  234. /package/dist/{PaperBackdrop-D_YZW47j.js → PaperBackdrop-CqwjnfLv.js} +0 -0
  235. /package/dist/{SelectGroup-CMdoCjRE.js → SelectGroup-BFiod7X2.js} +0 -0
  236. /package/dist/{SelectSeparator-CaJnPF3_.js → SelectSeparator-L8pPEn4L.js} +0 -0
  237. /package/dist/{_plugin-vue_export-helper-C1je1s0u.js → _plugin-vue_export-helper-ok8pgSl5.js} +0 -0
  238. /package/dist/composables/{dom → motion}/useTextHighlight.d.ts +0 -0
  239. /package/dist/{constants-C8NMonuo.js → constants-BPOqYJAm.js} +0 -0
  240. /package/dist/{createContext-DBMGRlx4.js → createContext-B44Sah_H.js} +0 -0
  241. /package/dist/{createLucideIcon-DuDoe_ra.js → createLucideIcon-B6uNAU9G.js} +0 -0
  242. /package/dist/{menuItemVariants-C2QlXqT3.js → menuItemVariants-DKM85SNE.js} +0 -0
  243. /package/dist/{presets-Dyv9Zl7W.js → presets-D1XPuTj-.js} +0 -0
  244. /package/dist/{prng-CjVgzjQT.js → prng-COGhh02-.js} +0 -0
  245. /package/dist/{useGlassRenderer-Dn3WpfG-.js → useGlassRenderer-5I0YkI4t.js} +0 -0
  246. /package/dist/{useGlobalDark-D7R9OypB.js → useGlobalDark-D3EBWzXK.js} +0 -0
  247. /package/dist/{useIntersectionPause-DsQYGc8V.js → useIntersectionPause-Bj4sPkMh.js} +0 -0
  248. /package/dist/{useInterval-CHVYFpXV.js → useInterval-CcLfq2WU.js} +0 -0
  249. /package/dist/{useKeyboardShortcuts-i8tHd5WO.js → useKeyboardShortcuts-BXWXOZ-9.js} +0 -0
  250. /package/dist/{useResizeObserver-DX-STszm.js → useResizeObserver-CWCbk5Px.js} +0 -0
  251. /package/dist/{useSortable-muI29agz.js → useSortable-MGAbCGVJ.js} +0 -0
  252. /package/dist/{useSpringMount-CnizvZGm.js → useSpringMount-BJSHcLl3.js} +0 -0
  253. /package/dist/{useTimer-DGgoxTXL.js → useTimer-3xqf_54b.js} +0 -0
  254. /package/dist/{useUserInvalidAria-DmvZ_6Dx.js → useUserInvalidAria-DoJKMZ3s.js} +0 -0
  255. /package/dist/{useViewportReady-Dcvf0c4p.js → useViewportReady-RIr5Wgkh.js} +0 -0
package/dist/dock.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { t as e } from "./cn-DJXf4yaB.js";
2
- import { t } from "./createLucideIcon-DuDoe_ra.js";
3
- import { t as n } from "./chevron-down-pBY8sYfV.js";
4
- import { t as r } from "./useTouchGate-CS5Csc2h.js";
5
- import { n as i } from "./createContext-DBMGRlx4.js";
6
- import { i as a, n as o, r as s, t as c } from "./dockContext-spUj_-E5.js";
7
- import { i as l, n as u, r as d, t as f } from "./TabsIndicator-DA0x9gPr.js";
8
- import { t as p } from "./useViewTransition-DI0Rs2rV.js";
9
- import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createVNode as b, defineComponent as x, mergeModels as S, mergeProps as C, nextTick as w, normalizeClass as T, normalizeStyle as E, onBeforeUnmount as D, onMounted as O, onUnmounted as k, openBlock as A, readonly as j, ref as M, renderList as N, renderSlot as P, resolveDynamicComponent as F, toDisplayString as I, unref as L, useAttrs as R, useId as ee, useModel as z, useTemplateRef as B, watch as V, withCtx as H } from "vue";
10
- import { DropdownMenuTrigger as U, Primitive as W, SelectIcon as G, SelectTrigger as K, useForwardProps as q } from "reka-ui";
11
- import { SpringProgress as te } from "@mkbabb/keyframes.js";
12
- var ne = t("pause", [["rect", {
2
+ import { t } from "./createLucideIcon-B6uNAU9G.js";
3
+ import { t as n } from "./chevron-down-BSkTP2aL.js";
4
+ import { t as r } from "./useSpecularTracking-BVRZsRHA.js";
5
+ import { t as i } from "./useTouchGate-WFyJYsth.js";
6
+ import { n as a, t as o } from "./createContext-B44Sah_H.js";
7
+ import { i as s, n as c, r as l, t as u } from "./dockContext-BKeIMmNk.js";
8
+ import { i as d, n as f, r as p, t as m } from "./TabsList-qyHZ2lKY.js";
9
+ import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createVNode as x, defineComponent as S, mergeModels as C, mergeProps as w, nextTick as T, normalizeClass as E, normalizeStyle as D, onBeforeUnmount as O, onMounted as k, onUnmounted as A, openBlock as j, readonly as M, ref as N, renderList as P, renderSlot as F, resolveDynamicComponent as I, toDisplayString as L, unref as R, useAttrs as z, useId as ee, useModel as te, useTemplateRef as B, watch as V, withCtx as H } from "vue";
10
+ import { DropdownMenuTrigger as U, Primitive as W, SelectIcon as G, SelectTrigger as ne, useForwardProps as K } from "reka-ui";
11
+ import { SpringProgress as q } from "@mkbabb/keyframes.js";
12
+ var J = t("pause", [["rect", {
13
13
  x: "14",
14
14
  y: "3",
15
15
  width: "5",
@@ -23,7 +23,7 @@ var ne = t("pause", [["rect", {
23
23
  height: "18",
24
24
  rx: "1",
25
25
  key: "1wsw3u"
26
- }]]), J = t("play", [["path", {
26
+ }]]), re = t("play", [["path", {
27
27
  d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
28
28
  key: "10ikf1"
29
29
  }]]);
@@ -36,8 +36,8 @@ function Y(e, t) {
36
36
  }
37
37
  //#endregion
38
38
  //#region src/components/custom/dock/composables/useDockState.ts
39
- function re(e) {
40
- let { collapseDelay: t = 2500, rootEl: n, alwaysExpanded: r = !1, isTransitioning: i, dockId: a, onStateChange: o } = e, s = () => typeof r == "boolean" ? r : r.value, c = s(), l = M(c ? "pinned" : "collapsed"), u = M(c), d = M(c), f = null, p = M(0), m = h(() => p.value > 0), g = null, _ = null, v = !1, y = l.value;
39
+ function ie(e) {
40
+ let { collapseDelay: t = 2500, rootEl: n, alwaysExpanded: r = !1, isTransitioning: i, dockId: a, onStateChange: o } = e, s = () => typeof r == "boolean" ? r : r.value, c = s(), l = N(c ? "pinned" : "collapsed"), u = N(c), d = N(c), f = null, p = N(0), m = g(() => p.value > 0), h = null, _ = null, v = !1, y = l.value;
41
41
  function b() {
42
42
  s() && (l.value = "pinned"), u.value = l.value !== "collapsed", d.value = l.value === "pinned", o && y !== l.value && o(l.value, y), y = l.value;
43
43
  }
@@ -48,7 +48,7 @@ function re(e) {
48
48
  _ !== null && (cancelAnimationFrame(_), _ = null);
49
49
  }
50
50
  function C() {
51
- S(), g?.();
51
+ S(), h?.();
52
52
  }
53
53
  function w() {
54
54
  s() || p.value > 0 || (x(), f = setTimeout(() => {
@@ -78,7 +78,7 @@ function re(e) {
78
78
  function O() {
79
79
  s() || (x(), l.value === "collapsed" && (l.value = "hover", b()));
80
80
  }
81
- function A(e) {
81
+ function k(e) {
82
82
  if (!s() && l.value === "hover") {
83
83
  if (p.value > 0) return;
84
84
  if (e) {
@@ -91,7 +91,7 @@ function re(e) {
91
91
  function j() {
92
92
  s() || (x(), l.value === "collapsed" && (l.value = "hover", b()));
93
93
  }
94
- function N(e) {
94
+ function M(e) {
95
95
  if (s() || l.value !== "hover" || p.value > 0) return;
96
96
  let t = e.currentTarget;
97
97
  e.relatedTarget && t.contains(e.relatedTarget) || Y(e.relatedTarget, a) || w();
@@ -118,8 +118,8 @@ function re(e) {
118
118
  }
119
119
  return V(u, (e) => {
120
120
  e ? (C(), _ = requestAnimationFrame(() => {
121
- _ = null, u.value && (document.addEventListener("pointerdown", L, !0), g = () => {
122
- document.removeEventListener("pointerdown", L, !0), g = null;
121
+ _ = null, u.value && (document.addEventListener("pointerdown", L, !0), h = () => {
122
+ document.removeEventListener("pointerdown", L, !0), h = null;
123
123
  });
124
124
  })) : C();
125
125
  }), typeof r == "boolean" ? r && (l.value = "pinned", b()) : V(r, (e) => {
@@ -128,7 +128,7 @@ function re(e) {
128
128
  return;
129
129
  }
130
130
  l.value = "collapsed", b();
131
- }, { immediate: !0 }), k(() => {
131
+ }, { immediate: !0 }), A(() => {
132
132
  x(), C();
133
133
  }), {
134
134
  state: l,
@@ -136,9 +136,9 @@ function re(e) {
136
136
  isPinned: d,
137
137
  isHeld: m,
138
138
  onMouseEnter: O,
139
- onMouseLeave: A,
139
+ onMouseLeave: k,
140
140
  onFocusIn: j,
141
- onFocusOut: N,
141
+ onFocusOut: M,
142
142
  onClickCollapsed: P,
143
143
  keepOpen: F,
144
144
  release: I,
@@ -147,131 +147,165 @@ function re(e) {
147
147
  };
148
148
  }
149
149
  //#endregion
150
- //#region src/components/custom/dock/composables/useLayerTransition.ts
150
+ //#region src/components/custom/dock/composables/dockMorphContext.ts
151
151
  var X = {
152
152
  response: .32,
153
153
  dampingFraction: .7
154
- };
155
- function ie(e) {
156
- let { containerEl: t, activeLayer: n, axis: r, directionTypes: i } = e, a = typeof document < "u" && "startViewTransition" in document, o = h(() => r?.value === "vertical" ? "height" : "width"), s = (e) => e.getBoundingClientRect()[o.value], c = M(n.value), l = M(null), u = 0, d = null, f = null, m = null;
157
- function g() {
158
- f &&= (f.dispose(), null), m = null;
159
- }
160
- function _(e) {
161
- let t = e.trim();
162
- return t ? t.endsWith("ms") ? Number.parseFloat(t) : t.endsWith("s") ? Number.parseFloat(t) * 1e3 : Number.parseFloat(t) || 0 : 0;
163
- }
164
- function v(e) {
165
- let t = getComputedStyle(e), n = t.transitionProperty.split(",").map((e) => e.trim()), r = t.transitionDuration.split(",").map(_), i = t.transitionDelay.split(",").map(_), a = r.map((e, t) => {
166
- let r = n[t] ?? n[0] ?? "all";
167
- return r !== "all" && r !== o.value ? 0 : e + (i[t] ?? i[0] ?? 0);
168
- });
169
- return Math.max(0, ...a) + 50;
170
- }
171
- function y() {
172
- d &&= (clearTimeout(d), null);
173
- }
174
- function b(e, t) {
175
- e.style.setProperty(o.value, t);
176
- }
177
- function x(e) {
178
- e.style.removeProperty(o.value);
154
+ }, Z = o("glass-ui:dock-morph-context");
155
+ Z.KEY;
156
+ function ae(e) {
157
+ Z.provide(e);
158
+ }
159
+ var oe = Z.use;
160
+ function se(e) {
161
+ let { rootEl: t, outerEl: n, outerActiveLayer: r, outerAxis: i } = e, a = null, o = /* @__PURE__ */ new Set();
162
+ function s() {
163
+ return t.value;
179
164
  }
180
- function S(e) {
181
- e.style.willChange = o.value;
165
+ function c() {
166
+ a &&= (a.dispose(), null);
182
167
  }
183
- function C(e) {
184
- e.style.willChange = "auto";
168
+ function l(e) {
169
+ return e === "vertical" ? "height" : "width";
185
170
  }
186
- function T(e) {
187
- return e.closest(".glass-dock");
171
+ function u(e) {
172
+ return l(e) === "width" ? "inline-size" : "block-size";
188
173
  }
189
- function E(e) {
190
- T(e)?.setAttribute("data-morphing", "");
174
+ function d(e, t) {
175
+ return e.getBoundingClientRect()[l(t)];
191
176
  }
192
- function D(e) {
193
- T(e)?.removeAttribute("data-morphing");
177
+ function f(e) {
178
+ e.style.removeProperty("--dock-morph-from"), e.style.removeProperty("--dock-morph-to");
194
179
  }
195
- function O(e, t) {
196
- let n = t < 0 ? 0 : t > 1 ? 1 : t;
197
- e.style.setProperty("--dock-morph-progress", `${n}`);
180
+ function p() {
181
+ for (let e of o) {
182
+ let t = e.containerEl.value;
183
+ if (t && t.style.getPropertyValue("--dock-morph-to")) return !0;
184
+ }
185
+ return !1;
198
186
  }
199
- function A(e) {
200
- e.setAttribute("data-revealing", ""), e.style.setProperty("--dock-morph-progress", "0");
187
+ function m(e) {
188
+ let t = e.containerEl.value;
189
+ t && f(t), e.leavingLayer.value = null;
201
190
  }
202
- function j(e) {
203
- e.removeAttribute("data-revealing"), e.style.removeProperty("--dock-morph-progress");
191
+ function h() {
192
+ if (p()) return;
193
+ let e = s();
194
+ e && (e.style.removeProperty("--dock-morph-t"), e.removeAttribute("data-morphing")), c();
204
195
  }
205
- V(n, (e, n) => {
206
- if (e === n) return;
207
- let r = t.value;
208
- if (!r) {
209
- c.value = e, l.value = null;
210
- return;
211
- }
212
- if (a) {
213
- y();
214
- let t = ++u;
215
- E(r);
216
- let a = i?.(n, e), { finished: o } = p(() => {
217
- l.value = n, c.value = e;
218
- }, a && a.length > 0 ? { types: a } : void 0);
219
- o.finally(() => {
220
- t === u && (l.value = null, D(r));
196
+ function g() {
197
+ if (!s()) return;
198
+ let e = a !== null && !a.settled ? a.velocity : 0;
199
+ if (!a || a.settled) {
200
+ c(), a = new q({
201
+ response: X.response,
202
+ dampingFraction: X.dampingFraction,
203
+ initial: 0,
204
+ respectReducedMotion: !0
221
205
  });
222
- return;
206
+ let t = a;
207
+ t.reset(0, e), t.target = 1, t.play((e) => {
208
+ let n = s();
209
+ if (n && n.style.setProperty("--dock-morph-t", `${e}`), t.settled) {
210
+ for (let e of o) {
211
+ let t = e.containerEl.value;
212
+ t && t.style.getPropertyValue("--dock-morph-to") && m(e);
213
+ }
214
+ h();
215
+ }
216
+ });
217
+ } else a.reset(0, e), a.target = 1;
218
+ }
219
+ function _(e, t, n, r) {
220
+ if (t !== e.txId) return;
221
+ let i = e.containerEl.value, a = s();
222
+ if (!(!i || !a)) {
223
+ if (Math.abs(r - n) < .5) {
224
+ m(e), h();
225
+ return;
226
+ }
227
+ i.style.setProperty("--dock-morph-from", `${n}px`), i.style.setProperty("--dock-morph-to", `${r}px`), a.setAttribute("data-morphing", ""), g();
223
228
  }
224
- if (typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches) {
225
- y(), ++u, c.value = e, l.value = null;
229
+ }
230
+ function v(e, t, n) {
231
+ if (t === n) return;
232
+ let r = e.containerEl.value, i = s();
233
+ if (!r || !i) {
234
+ e.currentLayer.value = t, e.leavingLayer.value = null;
226
235
  return;
227
236
  }
228
- y();
229
- let o = ++u, h = f !== null && m === r && !f.settled ? f : null, _ = h ? h.value : s(r);
230
- h || (g(), b(r, `${_}px`)), w(() => {
231
- o === u && r && requestAnimationFrame(() => {
232
- if (o !== u) return;
233
- l.value = n, c.value = e, r.style.transition = "none", x(r);
234
- let t = s(r);
235
- if (b(r, `${_}px`), r.offsetWidth, !h && Math.abs(t - _) < .5) {
236
- r.style.transition = "", x(r), C(r), D(r), j(r), l.value = null;
237
- return;
238
- }
239
- S(r), E(r), A(r);
240
- let i = t - _;
241
- h || (f = new te({
242
- response: X.response,
243
- dampingFraction: X.dampingFraction,
244
- initial: _,
245
- respectReducedMotion: !0
246
- }), m = r);
247
- let a = f;
248
- a.target = t, a.play((e) => {
249
- o === u && (b(r, `${e}px`), Math.abs(i) > .5 ? O(r, (e - _) / i) : O(r, 1), a.settled && (r.style.transition = "", x(r), C(r), D(r), j(r), l.value = null, g()));
250
- }), d = setTimeout(() => {
251
- o === u && (r.style.transition = "", x(r), C(r), D(r), j(r), l.value = null, g());
252
- }, v(r));
253
- });
237
+ let a = ++e.txId, c = e.axis.value, l = d(r, c);
238
+ e.leavingLayer.value = n, e.currentLayer.value = t;
239
+ for (let t of o) {
240
+ if (t === e) continue;
241
+ let n = t.containerEl.value;
242
+ if (n && n.style.getPropertyValue("--dock-morph-to")) {
243
+ let e = d(n, t.axis.value);
244
+ n.style.setProperty("--dock-morph-from", `${e}px`);
245
+ }
246
+ }
247
+ r.style.setProperty("--dock-morph-from", `${l}px`), r.style.setProperty("--dock-morph-to", `${l}px`), i.style.setProperty("--dock-morph-t", "0"), i.setAttribute("data-morphing", ""), requestAnimationFrame(() => {
248
+ if (a !== e.txId) return;
249
+ let t = e.containerEl.value, n = s();
250
+ if (!t || !n) return;
251
+ f(t);
252
+ let r = u(c);
253
+ t.style.setProperty(r, "max-content");
254
+ let i = d(t, c);
255
+ t.style.removeProperty(r), _(e, a, l, i);
254
256
  });
255
- });
256
- function N(e) {
257
- let n = t.value;
258
- n && e.target === n && e.propertyName === o.value && (y(), g(), n.style.transition = "", x(n), C(n), D(n), j(n), l.value = null);
259
257
  }
260
- return k(() => {
261
- y(), g();
258
+ function y(e) {
259
+ let t = {
260
+ containerEl: e.containerEl,
261
+ activeLayer: e.activeLayer,
262
+ axis: e.axis,
263
+ currentLayer: N(e.activeLayer.value),
264
+ leavingLayer: N(null),
265
+ txId: 0,
266
+ stop: () => {}
267
+ };
268
+ return t.stop = V(e.activeLayer, (e, n) => {
269
+ v(t, e, n);
270
+ }), o.add(t), t;
271
+ }
272
+ function b(e) {
273
+ e.stop(), o.delete(e), h();
274
+ }
275
+ let x = y({
276
+ containerEl: n,
277
+ activeLayer: r,
278
+ axis: i
279
+ }), S = { registerGroup(e) {
280
+ let t = y(e);
281
+ return {
282
+ currentLayer: M(t.currentLayer),
283
+ leavingLayer: M(t.leavingLayer),
284
+ release: () => b(t)
285
+ };
286
+ } };
287
+ function C(e) {
288
+ let t = n.value;
289
+ if (!t || e.target !== t) return;
290
+ let r = u(i.value);
291
+ e.propertyName !== r && e.propertyName !== l(i.value) || a && a.settled && (m(x), h());
292
+ }
293
+ return A(() => {
294
+ for (let e of o) e.stop();
295
+ o.clear(), c();
262
296
  }), {
263
- onTransitionEnd: N,
264
- currentLayer: c,
265
- leavingLayer: l
297
+ context: S,
298
+ outerCurrentLayer: M(x.currentLayer),
299
+ onOuterTransitionEnd: C
266
300
  };
267
301
  }
268
302
  //#endregion
269
303
  //#region src/components/custom/dock/GlassDock.vue?vue&type=script&setup=true&lang.ts
270
- var ae = [
304
+ var ce = [
271
305
  "data-density",
272
306
  "data-held",
273
307
  "data-container-name"
274
- ], oe = ["inert"], se = ["inert"], ce = /* @__PURE__ */ x({
308
+ ], le = ["inert"], ue = ["inert"], Q = /* @__PURE__ */ S({
275
309
  __name: "GlassDock",
276
310
  props: {
277
311
  collapseDelay: { default: 2e3 },
@@ -297,154 +331,220 @@ var ae = [
297
331
  containerName: {}
298
332
  },
299
333
  setup(e, { expose: t }) {
300
- let n = e, i = h(() => {
334
+ let n = e, r = g(() => {
301
335
  if (n.containerName) return {
302
336
  "container-type": "inline-size",
303
337
  "container-name": n.containerName
304
338
  };
305
- }), a = B("dockEl"), s = B("layersEl"), c = h(() => n.variant), l = h(() => n.shape), u = h(() => n.layout), d = h(() => n.variant === "rail" || n.variant === "instrument-strip" ? "vertical" : n.orientation), f = h(() => n.density), p = h(() => n.overflow === "scroll" ? d.value === "vertical" ? "dock-scroll-y" : "dock-scroll-x" : null), m = h(() => n.alwaysExpanded || d.value === "vertical" || n.layout === "grid"), g = h(() => n.fitContent || n.variant === "rail" || n.variant === "instrument-strip"), _ = M(!1), b = r(n.collapseDelay), x = `glass-dock-${ee()}`, S = null, C = 0, { expanded: w, isPinned: k, isHeld: j, onMouseEnter: N, onMouseLeave: F, onFocusIn: I, onFocusOut: R, onClickCollapsed: z, keepOpen: H, release: U, expand: W, collapse: G } = re({
339
+ }), a = B("dockEl"), o = B("layersEl"), s = g(() => n.variant), l = g(() => n.shape), u = g(() => n.layout), d = g(() => n.variant === "rail" || n.variant === "instrument-strip" ? "vertical" : n.orientation), f = g(() => n.density), p = g(() => n.overflow === "scroll" ? d.value === "vertical" ? "dock-scroll-y" : "dock-scroll-x" : null), m = g(() => n.alwaysExpanded || d.value === "vertical" || n.layout === "grid"), h = g(() => n.fitContent || n.variant === "rail" || n.variant === "instrument-strip"), _ = N(!1), v = i(n.collapseDelay), x = `glass-dock-${ee()}`, S = null, C = 0, { expanded: w, isPinned: T, isHeld: A, onMouseEnter: M, onMouseLeave: P, onFocusIn: I, onFocusOut: L, onClickCollapsed: z, keepOpen: te, release: H, expand: U, collapse: W } = ie({
306
340
  collapseDelay: n.collapseDelay,
307
341
  rootEl: a,
308
342
  alwaysExpanded: m,
309
343
  isTransitioning: _,
310
344
  dockId: x
311
345
  });
312
- o({
346
+ c({
313
347
  id: x,
314
348
  orientation: d,
315
- keepOpen: H,
316
- release: U,
317
- held: j
349
+ keepOpen: te,
350
+ release: H,
351
+ held: A
318
352
  });
319
- let K = h(() => m.value || w.value), { onTransitionEnd: q } = ie({
320
- containerEl: s,
321
- activeLayer: h(() => K.value ? "full" : "summary"),
322
- axis: h(() => "horizontal"),
323
- directionTypes: (e, t) => [t === "full" ? "dock-expand" : "dock-collapse"]
324
- }), te = typeof document < "u" && "startViewTransition" in document, ne = h(() => te ? {
325
- "view-transition-name": x.replace(/[^a-zA-Z0-9_-]/g, "-"),
326
- "view-transition-class": "gl-dock-layer"
327
- } : void 0);
353
+ let G = g(() => m.value || w.value), { context: ne, onOuterTransitionEnd: K } = se({
354
+ rootEl: a,
355
+ outerEl: o,
356
+ outerActiveLayer: g(() => G.value ? "full" : "summary"),
357
+ outerAxis: g(() => "horizontal")
358
+ });
359
+ ae(ne);
360
+ let q = g(() => ({ "view-transition-name": x.replace(/[^a-zA-Z0-9_-]/g, "-") }));
328
361
  function J(e) {
329
362
  let t = e.trim();
330
363
  return t ? t.endsWith("ms") ? Number.parseFloat(t) : t.endsWith("s") ? Number.parseFloat(t) * 1e3 : Number.parseFloat(t) || 0 : 0;
331
364
  }
332
- function Y(e) {
365
+ function re(e) {
333
366
  let t = getComputedStyle(e), n = t.transitionDuration.split(",").map(J), r = t.transitionDelay.split(",").map(J);
334
367
  return Math.max(0, ...n.map((e, t) => e + (r[t] ?? r[0] ?? 0)));
335
368
  }
369
+ function Y(e) {
370
+ let t = J(getComputedStyle(e).getPropertyValue("--duration-normal") || "0.3s");
371
+ return Math.max(t > 0 ? t * 2 : 0, 600);
372
+ }
336
373
  function X() {
337
374
  S &&= (clearTimeout(S), null);
338
375
  }
339
- let ce = new Set([
376
+ let Z = new Set([
340
377
  "width",
341
378
  "height",
342
379
  "padding",
343
380
  "transform"
344
381
  ]);
345
- function Z() {
382
+ function oe() {
346
383
  let e = a.value;
347
384
  if (!e) return;
348
385
  let t = ++C;
349
386
  X(), _.value = !0, S = setTimeout(() => {
350
387
  t === C && (_.value = !1, S = null);
351
- }, Y(e) + 50);
388
+ }, Math.max(re(e), Y(e)) + 50);
352
389
  }
353
390
  function Q(e) {
354
- e.target === a.value && ce.has(e.propertyName) && (X(), C++, _.value = !1);
391
+ e.target === a.value && Z.has(e.propertyName) && (X(), C++, _.value = !1);
355
392
  }
356
- O(() => {
357
- (n.alwaysExpanded || !n.startCollapsed) && W();
393
+ k(() => {
394
+ (n.alwaysExpanded || !n.startCollapsed) && U();
358
395
  });
359
396
  function $() {
360
397
  return d.value === "horizontal" && !m.value;
361
398
  }
362
- function le(e) {
363
- if (!$() || K.value) return;
399
+ function de(e) {
400
+ if (!$() || G.value) return;
364
401
  let t = a.value, n = e.touches[0];
365
- !t || !n || b.handleTouchStart(t, n.clientY);
402
+ !t || !n || v.handleTouchStart(t, n.clientY);
366
403
  }
367
- function ue(e) {
368
- $() && b.handleScrollCheck(e);
404
+ function fe(e) {
405
+ $() && v.handleScrollCheck(e);
369
406
  }
370
- function de() {
407
+ function pe() {
371
408
  if (!$()) return;
372
- let e = b.isActive.value;
373
- b.handleTouchEnd(), !e && b.isActive.value && !K.value && W();
409
+ let e = v.isActive.value;
410
+ v.handleTouchEnd(), !e && v.isActive.value && !G.value && U();
374
411
  }
375
- return V(b.isActive, (e) => {
376
- !e && w.value && !k.value && !m.value && G();
377
- }), V(K, (e) => {
378
- Z(), e || b.deactivate();
379
- }), D(X), t({
412
+ return V(v.isActive, (e) => {
413
+ !e && w.value && !T.value && !m.value && W();
414
+ }), V(G, (e) => {
415
+ oe(), e || v.deactivate();
416
+ }), O(X), t({
380
417
  expanded: w,
381
- isPinned: k,
382
- isHeld: j,
418
+ isPinned: T,
419
+ isHeld: A,
383
420
  isTransitioning: _,
384
- expand: W,
385
- collapse: G,
386
- keepOpen: H,
387
- release: U
388
- }), (t, n) => (A(), v("div", {
421
+ expand: U,
422
+ collapse: W,
423
+ keepOpen: te,
424
+ release: H
425
+ }), (t, n) => (j(), y("div", {
389
426
  ref_key: "dockEl",
390
427
  ref: a,
391
- class: T(["glass-dock", [
428
+ class: E(["glass-dock", [
392
429
  d.value,
393
- `variant-${c.value}`,
430
+ `variant-${s.value}`,
394
431
  `shape-${l.value}`,
395
432
  `layout-${u.value}`,
396
433
  p.value,
397
434
  {
398
- expanded: K.value,
399
- collapsed: !K.value,
400
- pinned: L(k),
401
- "fit-content": g.value,
435
+ expanded: G.value,
436
+ collapsed: !G.value,
437
+ pinned: R(T),
438
+ "fit-content": h.value,
402
439
  "always-expanded": m.value,
403
- "dock-overflow-wrap": e.overflow === "wrap"
440
+ "dock-overflow-wrap": e.overflow === "wrap" && d.value !== "vertical"
404
441
  },
405
442
  e.position === "fixed" ? "fixed bottom-[var(--dock-pos)] left-1/2 -translate-x-1/2" : e.position === "sticky" ? "dock-sticky" : "dock-inline"
406
443
  ]]),
407
444
  "data-density": f.value,
408
- "data-held": L(j) || void 0,
445
+ "data-held": R(A) || void 0,
409
446
  "data-container-name": e.containerName || void 0,
410
- style: E(i.value),
411
- onMouseenter: n[2] ||= (...e) => L(N) && L(N)(...e),
412
- onMouseleave: n[3] ||= (e) => L(F)(e),
413
- onFocusin: n[4] ||= (...e) => L(I) && L(I)(...e),
414
- onFocusout: n[5] ||= (...e) => L(R) && L(R)(...e),
415
- onTouchstart: le,
416
- onTouchmove: ue,
417
- onTouchend: de,
447
+ style: D([r.value, q.value]),
448
+ onMouseenter: n[2] ||= (...e) => R(M) && R(M)(...e),
449
+ onMouseleave: n[3] ||= (e) => R(P)(e),
450
+ onFocusin: n[4] ||= (...e) => R(I) && R(I)(...e),
451
+ onFocusout: n[5] ||= (...e) => R(L) && R(L)(...e),
452
+ onTouchstart: de,
453
+ onTouchmove: fe,
454
+ onTouchend: pe,
418
455
  onTransitionend: Q,
419
456
  onTransitioncancel: Q
420
- }, [d.value === "horizontal" ? (A(), v("div", {
457
+ }, [d.value === "horizontal" ? (j(), y("div", {
421
458
  key: 0,
422
459
  ref_key: "layersEl",
423
- ref: s,
460
+ ref: o,
424
461
  class: "dock-layers",
425
- style: E(ne.value),
426
- onTransitionend: n[1] ||= (...e) => L(q) && L(q)(...e)
427
- }, [y("div", {
428
- class: T(["dock-layer dock-layer--full", { "layer-active": K.value }]),
429
- inert: !L(w) || void 0
430
- }, [P(t.$slots, "default")], 10, oe), y("div", {
431
- class: T(["dock-layer dock-layer--summary", { "layer-active": !K.value }]),
432
- inert: L(w) || void 0,
433
- onClick: n[0] ||= (...e) => L(z) && L(z)(...e)
434
- }, [P(t.$slots, "collapsed")], 10, se)], 36)) : P(t.$slots, "default", { key: 1 })], 46, ae));
435
- }
436
- }), Z = i("glass-ui:dock-layer-group", "[glass-ui:dock] <DockLayer> must be used inside <DockLayerGroup>");
437
- Z.KEY;
438
- function Q(e) {
439
- Z.provide(e);
462
+ onTransitionend: n[1] ||= (...e) => R(K) && R(K)(...e)
463
+ }, [b("div", {
464
+ class: E(["dock-layer dock-layer--full", { "is-active": G.value }]),
465
+ inert: !R(w) || void 0
466
+ }, [F(t.$slots, "default")], 10, le), b("div", {
467
+ class: E(["dock-layer dock-layer--summary", { "is-active": !G.value }]),
468
+ inert: R(w) || void 0,
469
+ onClick: n[0] ||= (...e) => R(z) && R(z)(...e)
470
+ }, [F(t.$slots, "collapsed")], 10, ue)], 544)) : F(t.$slots, "default", { key: 1 })], 46, ce));
471
+ }
472
+ }), $ = a("glass-ui:dock-layer-group", "[glass-ui:dock] <DockLayer> must be used inside <DockLayerGroup>");
473
+ $.KEY;
474
+ function de(e) {
475
+ $.provide(e);
476
+ }
477
+ var fe = $.use;
478
+ $.useOptional;
479
+ //#endregion
480
+ //#region src/components/custom/dock/composables/useLayerTransition.ts
481
+ var pe = {
482
+ response: .32,
483
+ dampingFraction: .7
484
+ };
485
+ function me(e) {
486
+ let { containerEl: t, activeLayer: n, axis: r } = e, i = g(() => r?.value === "vertical" ? "height" : "width"), a = g(() => i.value === "width" ? "inline-size" : "block-size"), o = (e) => e.getBoundingClientRect()[i.value], s = N(n.value), c = N(null), l = 0, u = null, d = null;
487
+ function f() {
488
+ u &&= (u.dispose(), null), d = null;
489
+ }
490
+ function p(e) {
491
+ return e.closest(".glass-dock") ?? e;
492
+ }
493
+ function m(e) {
494
+ e.style.removeProperty("--dock-morph-from"), e.style.removeProperty("--dock-morph-to");
495
+ }
496
+ function h(e, t) {
497
+ m(e), t.style.removeProperty("--dock-morph-t"), t.removeAttribute("data-morphing"), c.value = null, f();
498
+ }
499
+ function _(e, t, n, r, i, a, o) {
500
+ if (Math.abs(i - r) < .5) {
501
+ h(e, t);
502
+ return;
503
+ }
504
+ e.style.setProperty("--dock-morph-from", `${r}px`), e.style.setProperty("--dock-morph-to", `${i}px`), t.style.setProperty("--dock-morph-t", "0"), t.setAttribute("data-morphing", ""), o || (f(), u = new q({
505
+ response: pe.response,
506
+ dampingFraction: pe.dampingFraction,
507
+ initial: 0,
508
+ respectReducedMotion: !0
509
+ }), d = e);
510
+ let s = u;
511
+ s.reset(0, a), s.target = 1, s.play((r) => {
512
+ n === l && (t.style.setProperty("--dock-morph-t", `${r}`), s.settled && h(e, t));
513
+ });
514
+ }
515
+ V(n, (e, n) => {
516
+ if (e === n) return;
517
+ let r = t.value;
518
+ if (!r) {
519
+ s.value = e, c.value = null;
520
+ return;
521
+ }
522
+ let i = p(r), f = ++l, h = u !== null && d === r && !u.settled ? u : null, g = h ? h.velocity : 0, v = o(r);
523
+ c.value = n, s.value = e, r.style.setProperty("--dock-morph-from", `${v}px`), r.style.setProperty("--dock-morph-to", `${v}px`), i.style.setProperty("--dock-morph-t", "0"), i.setAttribute("data-morphing", ""), requestAnimationFrame(() => {
524
+ if (f !== l) return;
525
+ let e = t.value;
526
+ if (!e) return;
527
+ let n = p(e);
528
+ m(e), n.style.removeProperty("--dock-morph-t"), e.style.setProperty(a.value, "max-content");
529
+ let r = o(e);
530
+ e.style.removeProperty(a.value), _(e, n, f, v, r, g, h);
531
+ });
532
+ });
533
+ function v(e) {
534
+ let n = t.value;
535
+ n && e.target === n && (e.propertyName !== a.value && e.propertyName !== i.value || u && u.settled && h(n, p(n)));
536
+ }
537
+ return A(f), {
538
+ onTransitionEnd: v,
539
+ currentLayer: s,
540
+ leavingLayer: c
541
+ };
440
542
  }
441
- var $ = Z.use;
442
- Z.useOptional;
443
543
  //#endregion
444
544
  //#region src/components/custom/dock/DockLayerGroup.vue?vue&type=script&setup=true&lang.ts
445
- var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
545
+ var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
446
546
  __name: "DockLayerGroup",
447
- props: /* @__PURE__ */ S({
547
+ props: /* @__PURE__ */ C({
448
548
  orientation: {},
449
549
  showRail: {
450
550
  type: Boolean,
@@ -457,87 +557,99 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
457
557
  }),
458
558
  emits: ["update:active"],
459
559
  setup(e) {
460
- let t = e, n = z(e, "active"), r = a(), i = M([]), o = B("containerEl");
461
- function s(e) {
560
+ let t = e, n = te(e, "active"), r = s(), i = N([]), a = B("containerEl");
561
+ function o(e) {
462
562
  i.value.find((t) => t.id === e.id) || i.value.push(e);
463
563
  }
464
564
  function c(e) {
465
565
  i.value = i.value.filter((t) => t.id !== e);
466
566
  }
467
- let p = h(() => t.orientation ?? r?.orientation.value ?? "horizontal"), { onTransitionEnd: x, currentLayer: S, leavingLayer: C } = ie({
468
- containerEl: o,
469
- activeLayer: n,
470
- axis: p,
471
- directionTypes: (e, t) => {
472
- let n = i.value.findIndex((t) => t.id === e);
473
- return [i.value.findIndex((e) => e.id === t) < n ? "layer-back" : "layer-forward"];
474
- }
475
- }), w = typeof document < "u" && "startViewTransition" in document, D = ee(), O = h(() => w ? {
476
- "view-transition-name": `gl-dock-stack-${D.replace(/[^a-zA-Z0-9_-]/g, "-")}`,
567
+ let l = g(() => t.orientation ?? r?.orientation.value ?? "horizontal"), u = oe(), S, C, w;
568
+ if (u) {
569
+ let e = u.registerGroup({
570
+ containerEl: a,
571
+ activeLayer: n,
572
+ axis: l
573
+ });
574
+ S = e.currentLayer, C = e.leavingLayer, w = () => {}, O(() => e.release());
575
+ } else {
576
+ let e = me({
577
+ containerEl: a,
578
+ activeLayer: n,
579
+ axis: l,
580
+ directionTypes: (e, t) => {
581
+ let n = i.value.findIndex((t) => t.id === e);
582
+ return [i.value.findIndex((e) => e.id === t) < n ? "layer-back" : "layer-forward"];
583
+ }
584
+ });
585
+ S = M(e.currentLayer), C = M(e.leavingLayer), w = e.onTransitionEnd;
586
+ }
587
+ let T = typeof document < "u" && "startViewTransition" in document, k = ee(), A = g(() => T ? {
588
+ "view-transition-name": `gl-dock-stack-${k.replace(/[^a-zA-Z0-9_-]/g, "-")}`,
477
589
  "view-transition-class": "gl-dock-layer"
478
590
  } : void 0);
479
- Q({
480
- register: s,
591
+ de({
592
+ register: o,
481
593
  unregister: c,
482
- currentLayerId: j(S),
483
- leavingLayerId: j(C)
594
+ currentLayerId: S,
595
+ leavingLayerId: C
484
596
  });
485
- function k(e) {
597
+ function z(e) {
486
598
  return typeof e == "object" && !!e;
487
599
  }
488
- let R = M(!1);
489
- function V() {
490
- R.value || (R.value = !0, r?.keepOpen());
600
+ let V = N(!1);
601
+ function U() {
602
+ V.value || (V.value = !0, r?.keepOpen());
491
603
  }
492
- function U(e) {
604
+ function W(e) {
493
605
  let t = e.relatedTarget, n = e.currentTarget;
494
- t && n?.contains(t) || R.value && (R.value = !1, r?.release());
606
+ t && n?.contains(t) || V.value && (V.value = !1, r?.release());
495
607
  }
496
- return (t, r) => (A(), v("div", { class: T(["dock-layer-group", [p.value, `rail-${e.railPosition}`]]) }, [e.showRail && i.value.length > 1 ? (A(), g(L(l), {
608
+ return (t, r) => (j(), y("div", { class: E(["dock-layer-group", [l.value, `rail-${e.railPosition}`]]) }, [e.showRail && i.value.length > 1 ? (j(), _(R(d), {
497
609
  key: 0,
498
610
  modelValue: n.value,
499
611
  "onUpdate:modelValue": r[0] ||= (e) => n.value = e,
500
612
  orientation: "horizontal",
501
613
  "as-child": !0
502
614
  }, {
503
- default: H(() => [b(L(u), {
504
- class: T(["dock-layer-rail", e.railPosition]),
505
- onFocusin: V,
506
- onFocusout: U
615
+ default: H(() => [x(R(m), {
616
+ class: E(["dock-layer-rail", e.railPosition]),
617
+ onFocusin: U,
618
+ onFocusout: W
507
619
  }, {
508
- default: H(() => [(A(!0), v(m, null, N(i.value, (e) => (A(), g(L(d), {
620
+ default: H(() => [(j(!0), y(h, null, P(i.value, (e) => (j(), _(R(p), {
509
621
  key: e.id,
510
622
  value: e.id,
511
623
  class: "dock-layer-tab",
512
624
  title: e.label,
513
625
  "aria-label": e.label ?? e.id
514
626
  }, {
515
- default: H(() => [k(e.icon) ? (A(), g(F(e.icon), {
627
+ default: H(() => [z(e.icon) ? (j(), _(I(e.icon), {
516
628
  key: 0,
517
629
  class: "size-4"
518
- })) : typeof e.icon == "string" ? (A(), v("span", le, I(e.icon), 1)) : (A(), v("span", ue, I((e.label ?? e.id).charAt(0)), 1))]),
630
+ })) : typeof e.icon == "string" ? (j(), y("span", he, L(e.icon), 1)) : (j(), y("span", ge, L((e.label ?? e.id).charAt(0)), 1))]),
519
631
  _: 2
520
632
  }, 1032, [
521
633
  "value",
522
634
  "title",
523
635
  "aria-label"
524
- ]))), 128)), b(L(f), { class: "dock-layer-tab-indicator" })]),
636
+ ]))), 128)), x(R(f), { class: "dock-layer-tab-indicator" })]),
525
637
  _: 1
526
638
  }, 8, ["class"])]),
527
639
  _: 1
528
- }, 8, ["modelValue"])) : _("", !0), y("div", {
640
+ }, 8, ["modelValue"])) : v("", !0), b("div", {
529
641
  ref_key: "containerEl",
530
- ref: o,
642
+ ref: a,
531
643
  class: "dock-layer-stack",
532
- style: E(O.value),
533
- onTransitionend: r[1] ||= (...e) => L(x) && L(x)(...e)
534
- }, [P(t.$slots, "default")], 36)], 2));
644
+ style: D(A.value),
645
+ onTransitionend: r[1] ||= (...e) => R(w) && R(w)(...e)
646
+ }, [F(t.$slots, "default")], 36)], 2));
535
647
  }
536
- }), fe = [
648
+ }), ve = [
537
649
  "inert",
538
650
  "aria-hidden",
539
651
  "tabindex"
540
- ], pe = /* @__PURE__ */ x({
652
+ ], ye = /* @__PURE__ */ S({
541
653
  __name: "DockLayer",
542
654
  props: {
543
655
  id: {},
@@ -545,35 +657,35 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
545
657
  icon: {}
546
658
  },
547
659
  setup(e) {
548
- let t = e, n = $();
549
- O(() => {
660
+ let t = e, n = fe();
661
+ k(() => {
550
662
  n.register({
551
663
  id: t.id,
552
664
  label: t.label,
553
665
  icon: t.icon
554
666
  });
555
- }), D(() => {
667
+ }), O(() => {
556
668
  n.unregister(t.id);
557
669
  });
558
- let r = h(() => n.currentLayerId.value === t.id), i = h(() => n.leavingLayerId.value === t.id), a = B("hostEl");
670
+ let r = g(() => n.currentLayerId.value === t.id), i = g(() => n.leavingLayerId.value === t.id), a = B("hostEl");
559
671
  return V(r, async (e, t) => {
560
672
  !e || t || typeof document < "u" && (() => {
561
673
  let e = document.activeElement;
562
674
  return !e || e === document.body ? !0 : !!e.closest("[inert]");
563
- })() && (await w(), a.value?.focus());
564
- }), (e, t) => (A(), v("div", {
675
+ })() && (await T(), a.value?.focus());
676
+ }), (e, t) => (j(), y("div", {
565
677
  ref_key: "hostEl",
566
678
  ref: a,
567
- class: T(["dock-layer-item-host", {
679
+ class: E(["dock-layer-item-host", {
568
680
  "is-active": r.value,
569
681
  "is-leaving": i.value
570
682
  }]),
571
683
  inert: r.value ? void 0 : !0,
572
684
  "aria-hidden": r.value ? void 0 : !0,
573
685
  tabindex: r.value ? -1 : void 0
574
- }, [P(e.$slots, "default")], 10, fe));
686
+ }, [F(e.$slots, "default")], 10, ve));
575
687
  }
576
- }), me = /* @__PURE__ */ x({
688
+ }), be = /* @__PURE__ */ S({
577
689
  __name: "DockIconButton",
578
690
  props: {
579
691
  compact: {
@@ -595,37 +707,26 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
595
707
  ] }
596
708
  },
597
709
  setup(t) {
598
- let n = t, r = h(() => e("dock-icon-button glass-specular-track", { "dock-icon-button--compact": n.compact }, n.class)), i = M({});
599
- function a(e) {
600
- let t = e.currentTarget;
601
- if (!t) return;
602
- let n = t.getBoundingClientRect();
603
- if (n.width === 0 || n.height === 0) return;
604
- let r = (e.clientX - n.left) / n.width * 100, a = (e.clientY - n.top) / n.height * 100;
605
- i.value = {
606
- "--mouse-x": `${r.toFixed(2)}%`,
607
- "--mouse-y": `${a.toFixed(2)}%`
608
- };
609
- }
610
- let o = h(() => !n.asChild && n.as === "button" ? { type: n.type } : {});
611
- return (e, n) => (A(), g(L(W), C({
710
+ let n = t, i = g(() => e("dock-icon-button glass-specular-track", { "dock-icon-button--compact": n.compact }, n.class)), { specularStyle: a, onPointerMove: o } = r(), s = g(() => !n.asChild && n.as === "button" ? { type: n.type } : {});
711
+ return (e, n) => (j(), _(R(W), w({
612
712
  as: t.as,
613
713
  "as-child": t.asChild
614
- }, o.value, {
615
- class: r.value,
616
- style: i.value,
617
- onPointermove: a
714
+ }, s.value, {
715
+ class: i.value,
716
+ style: R(a),
717
+ onPointermove: R(o)
618
718
  }), {
619
- default: H(() => [P(e.$slots, "default")]),
719
+ default: H(() => [F(e.$slots, "default")]),
620
720
  _: 3
621
721
  }, 16, [
622
722
  "as",
623
723
  "as-child",
624
724
  "class",
625
- "style"
725
+ "style",
726
+ "onPointermove"
626
727
  ]));
627
728
  }
628
- }), he = /* @__PURE__ */ x({
729
+ }), xe = /* @__PURE__ */ S({
629
730
  __name: "DockBackgroundToggle",
630
731
  props: {
631
732
  paused: {
@@ -637,22 +738,22 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
637
738
  },
638
739
  emits: ["update:paused"],
639
740
  setup(e, { emit: t }) {
640
- let n = e, r = t, i = h(() => n.paused ? n.playLabel : n.pauseLabel);
741
+ let n = e, r = t, i = g(() => n.paused ? n.playLabel : n.pauseLabel);
641
742
  function a() {
642
743
  r("update:paused", !n.paused);
643
744
  }
644
- return (t, n) => (A(), g(me, {
745
+ return (t, n) => (j(), _(be, {
645
746
  type: "button",
646
747
  "aria-pressed": e.paused,
647
748
  "aria-label": i.value,
648
749
  title: i.value,
649
750
  onClick: a
650
751
  }, {
651
- default: H(() => [e.paused ? (A(), g(L(J), {
752
+ default: H(() => [e.paused ? (j(), _(R(re), {
652
753
  key: 0,
653
754
  size: 18,
654
755
  "aria-hidden": "true"
655
- })) : (A(), g(L(ne), {
756
+ })) : (j(), _(R(J), {
656
757
  key: 1,
657
758
  size: 18,
658
759
  "aria-hidden": "true"
@@ -664,7 +765,7 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
664
765
  "title"
665
766
  ]));
666
767
  }
667
- }), ge = /* @__PURE__ */ x({
768
+ }), Se = /* @__PURE__ */ S({
668
769
  __name: "DockTabButton",
669
770
  props: {
670
771
  as: { default: "button" },
@@ -681,13 +782,13 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
681
782
  ] }
682
783
  },
683
784
  setup(t) {
684
- let n = t, r = R(), i = h(() => r["data-tier"] === "primary"), a = h(() => e("dock-tab-button", i.value && "btn-audacious", n.class));
685
- return (e, n) => (A(), g(L(W), {
785
+ let n = t, r = z(), i = g(() => r["data-tier"] === "primary"), a = g(() => e("dock-tab-button", i.value && "btn-audacious", n.class));
786
+ return (e, n) => (j(), _(R(W), {
686
787
  as: t.as,
687
788
  "as-child": t.asChild,
688
- class: T(a.value)
789
+ class: E(a.value)
689
790
  }, {
690
- default: H(() => [P(e.$slots, "default")]),
791
+ default: H(() => [F(e.$slots, "default")]),
691
792
  _: 3
692
793
  }, 8, [
693
794
  "as",
@@ -695,7 +796,7 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
695
796
  "class"
696
797
  ]));
697
798
  }
698
- }), _e = /* @__PURE__ */ x({
799
+ }), Ce = /* @__PURE__ */ S({
699
800
  __name: "DockSelectTrigger",
700
801
  props: {
701
802
  disabled: { type: Boolean },
@@ -711,19 +812,19 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
711
812
  ] }
712
813
  },
713
814
  setup(t) {
714
- let r = t, i = q(h(() => {
815
+ let r = t, i = K(g(() => {
715
816
  let { class: e, ...t } = r;
716
817
  return t;
717
818
  }));
718
- return (t, a) => (A(), g(L(K), C(L(i), { class: L(e)("dock-select-trigger", r.class) }), {
719
- default: H(() => [P(t.$slots, "default"), b(L(G), { "as-child": "" }, {
720
- default: H(() => [P(t.$slots, "icon", {}, () => [b(L(n), { class: "dock-select-trigger__chevron" })])]),
819
+ return (t, a) => (j(), _(R(ne), w(R(i), { class: R(e)("dock-select-trigger", r.class) }), {
820
+ default: H(() => [F(t.$slots, "default"), x(R(G), { "as-child": "" }, {
821
+ default: H(() => [F(t.$slots, "icon", {}, () => [x(R(n), { class: "dock-select-trigger__chevron" })])]),
721
822
  _: 3
722
823
  })]),
723
824
  _: 3
724
825
  }, 16, ["class"]));
725
826
  }
726
- }), ve = /* @__PURE__ */ x({
827
+ }), we = /* @__PURE__ */ S({
727
828
  __name: "DockDropdownTrigger",
728
829
  props: {
729
830
  disabled: { type: Boolean },
@@ -739,15 +840,15 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
739
840
  ] }
740
841
  },
741
842
  setup(t) {
742
- let n = t, r = q(h(() => {
843
+ let n = t, r = K(g(() => {
743
844
  let { class: e, ...t } = n;
744
845
  return t;
745
846
  }));
746
- return (t, i) => (A(), g(L(U), C(L(r), { class: L(e)("dock-dropdown-trigger", n.class) }), {
747
- default: H(() => [P(t.$slots, "default")]),
847
+ return (t, i) => (j(), _(R(U), w(R(r), { class: R(e)("dock-dropdown-trigger", n.class) }), {
848
+ default: H(() => [F(t.$slots, "default")]),
748
849
  _: 3
749
850
  }, 16, ["class"]));
750
851
  }
751
852
  });
752
853
  //#endregion
753
- export { c as DOCK_CONTEXT_KEY, he as DockBackgroundToggle, ve as DockDropdownTrigger, me as DockIconButton, pe as DockLayer, de as DockLayerGroup, _e as DockSelectTrigger, ge as DockTabButton, ce as GlassDock, o as provideDockContext, s as useDockContext, a as useOptionalDockContext };
854
+ export { u as DOCK_CONTEXT_KEY, xe as DockBackgroundToggle, we as DockDropdownTrigger, be as DockIconButton, ye as DockLayer, _e as DockLayerGroup, Ce as DockSelectTrigger, Se as DockTabButton, Q as GlassDock, c as provideDockContext, l as useDockContext, me as useLayerTransition, s as useOptionalDockContext };