@mkbabb/glass-ui 3.2.0 → 3.4.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 (306) hide show
  1. package/dist/{CardFooter-3-VGho1J.js → CardFooter-C390imy7.js} +2 -2
  2. package/dist/{CollapsibleContent-wlmlDujU.js → CollapsibleContent-cauTbZEM.js} +1 -1
  3. package/dist/{CommandShortcut-C6lsz3pG.js → CommandShortcut-BiVyqipe.js} +5 -4
  4. package/dist/DataTable-FfkaAg2z.js +465 -0
  5. package/dist/DialogContent-IQ8_BRrC.js +100 -0
  6. package/dist/{DiscoGlyph-B7YooI2-.js → DiscoGlyph-BaZ8OawK.js} +1 -1
  7. package/dist/{GlyphFace-Bvk6OIas.js → GlyphFace-B_7vOmYn.js} +1 -1
  8. package/dist/HoverPopover-DTSYkJtw.js +96 -0
  9. package/dist/{IconTooltip-DXveGjx7.js → IconTooltip-BTyYn4mr.js} +1 -1
  10. package/dist/Input-CU9CNKmo.js +52 -0
  11. package/dist/{MetricBadge-J_GBCb8e.js → MetricBadge-BlrdbOGN.js} +1 -1
  12. package/dist/{NumberFieldContent-B6L6YrQz.js → NumberFieldContent-iOTQ5rGO.js} +8 -4
  13. package/dist/{PopoverContent-CxEEUL7Y.js → PopoverContent-B8WtJECb.js} +1 -1
  14. package/dist/Progress-DjM86vfb.js +254 -0
  15. package/dist/{ScrollingText-1Qjnwz6H.js → ScrollingText-P9o_DuMn.js} +1 -1
  16. package/dist/{SelectScrollDownButton-BvvvAbuh.js → SelectScrollDownButton-BGn3rjs9.js} +9 -8
  17. package/dist/TabsIndicator-DA0x9gPr.js +97 -0
  18. package/dist/{ToggleGroupItem-Cy7xHFEo.js → ToggleGroupItem-gyXj998A.js} +37 -40
  19. package/dist/UnderlineTabs-Cq_AD03t.js +39 -0
  20. package/dist/animated-digit.js +2 -2
  21. package/dist/api/index.d.ts +2 -0
  22. package/dist/api.js +1 -1
  23. package/dist/aurora.js +454 -271
  24. package/dist/{button-DS3ULf5i.js → button-Ckn3eDfB.js} +27 -22
  25. package/dist/button.js +1 -1
  26. package/dist/card.js +1 -1
  27. package/dist/carousel.js +2 -2
  28. package/dist/collapsible.js +1 -1
  29. package/dist/color-rkK4RMx2.js +33 -0
  30. package/dist/color.d.ts +1 -0
  31. package/dist/color.js +2 -0
  32. package/dist/command.js +1 -1
  33. package/dist/compile-DVgAxagk.js +106 -0
  34. package/dist/components/custom/animated-digit/AnimatedDigit.vue.d.ts +7 -7
  35. package/dist/components/custom/aurora/Aurora.vue.d.ts +3 -3
  36. package/dist/components/custom/aurora/composables/color.d.ts +3 -25
  37. package/dist/components/custom/aurora/composables/cursorModel.d.ts +45 -0
  38. package/dist/components/custom/aurora/composables/frameLoop.d.ts +30 -0
  39. package/dist/components/custom/aurora/composables/glSetup.d.ts +29 -0
  40. package/dist/components/custom/aurora/composables/runtime.d.ts +45 -35
  41. package/dist/components/custom/aurora/composables/uniformBridge.d.ts +67 -0
  42. package/dist/components/custom/aurora/composables/useAurora.d.ts +14 -1
  43. package/dist/components/custom/aurora/composables/useCursorInteraction.d.ts +1 -1
  44. package/dist/components/custom/aurora/constants/budget.d.ts +50 -0
  45. package/dist/components/custom/aurora/{presets.d.ts → constants/presets.d.ts} +2 -5
  46. package/dist/components/custom/aurora/constants/shaders/aurora.frag.d.ts +1 -0
  47. package/dist/components/custom/aurora/constants/shaders/brush.glsl.d.ts +1 -0
  48. package/dist/components/custom/aurora/constants/shaders/composition.glsl.d.ts +1 -0
  49. package/dist/components/custom/aurora/constants/shaders/flow.glsl.d.ts +1 -0
  50. package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +2 -0
  51. package/dist/components/custom/aurora/constants/shaders/tonemap.glsl.d.ts +1 -0
  52. package/dist/components/custom/aurora/index.d.ts +2 -2
  53. package/dist/components/custom/configurator/ConfiguratorLayer.vue.d.ts +14 -7
  54. package/dist/components/custom/configurator/density.d.ts +3 -8
  55. package/dist/components/custom/dock/DockBackgroundToggle.vue.d.ts +46 -0
  56. package/dist/components/custom/dock/DockIconButton.vue.d.ts +3 -3
  57. package/dist/components/custom/dock/DockLayerGroup.vue.d.ts +2 -2
  58. package/dist/components/custom/dock/GlassDock.vue.d.ts +22 -18
  59. package/dist/components/custom/dock/composables/dockContext.d.ts +4 -4
  60. package/dist/components/custom/dock/composables/dockLayerContext.d.ts +13 -6
  61. package/dist/components/custom/dock/composables/useLayerTransition.d.ts +32 -8
  62. package/dist/components/custom/dock/index.d.ts +1 -0
  63. package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +10 -0
  64. package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +1 -1
  65. package/dist/components/custom/glyph-face/keys.d.ts +3 -29
  66. package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +48 -0
  67. package/dist/components/custom/goo-blob/composables/easing.d.ts +6 -0
  68. package/dist/components/custom/goo-blob/composables/useBlobMood.d.ts +14 -0
  69. package/dist/components/custom/goo-blob/composables/useBlobPointer.d.ts +18 -0
  70. package/dist/components/custom/goo-blob/composables/useBlobSatellites.d.ts +13 -0
  71. package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +42 -0
  72. package/dist/components/custom/goo-blob/index.d.ts +7 -0
  73. package/dist/components/custom/goo-blob/shaders/metaball.frag.d.ts +1 -0
  74. package/dist/components/custom/goo-blob/shaders/metaball.vert.d.ts +1 -0
  75. package/dist/components/custom/goo-blob/shaders/oklch-perturb.glsl.d.ts +1 -0
  76. package/dist/components/custom/goo-blob/shaders/sdf-body.glsl.d.ts +1 -0
  77. package/dist/components/custom/goo-blob/shaders/watercolor-edges.glsl.d.ts +2 -0
  78. package/dist/components/custom/goo-blob/types.d.ts +77 -0
  79. package/dist/components/custom/hover-popover/HoverPopover.vue.d.ts +48 -9
  80. package/dist/components/custom/labeled-field/LabeledField.vue.d.ts +2 -0
  81. package/dist/components/custom/labeled-field/LabeledSelect.vue.d.ts +2 -2
  82. package/dist/components/custom/metric-stack/MetricRow.vue.d.ts +2 -2
  83. package/dist/components/custom/responsive-tabs/ResponsiveTabs.vue.d.ts +13 -7
  84. package/dist/components/custom/search/FuzzySearch.vue.d.ts +1 -1
  85. package/dist/components/custom/search/SearchBar.vue.d.ts +1 -1
  86. package/dist/components/custom/sortable-list/SortableHandle.vue.d.ts +7 -1
  87. package/dist/components/custom/sortable-list/context.d.ts +2 -3
  88. package/dist/components/custom/tabs/BouncyTabs.vue.d.ts +6 -3
  89. package/dist/components/custom/tabs/BouncyToggle.vue.d.ts +7 -3
  90. package/dist/components/custom/tabs/UnderlineTabs.vue.d.ts +6 -3
  91. package/dist/components/custom/tabs/composables/useBouncySlider.d.ts +39 -0
  92. package/dist/components/custom/timeline/ContinuousMarkers.vue.d.ts +49 -0
  93. package/dist/components/custom/timeline/ContinuousRail.vue.d.ts +26 -0
  94. package/dist/components/custom/timeline/ContinuousTimeline.vue.d.ts +4 -4
  95. package/dist/components/custom/typewriter/TypewriterText.vue.d.ts +2 -2
  96. package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +45 -0
  97. package/dist/components/custom/watercolor-dot/index.d.ts +3 -0
  98. package/dist/components/custom/watercolor-dot/prng.d.ts +5 -0
  99. package/dist/components/custom/watercolor-dot/useWatercolorBlob.d.ts +24 -0
  100. package/dist/components/ui/_shared/menuItemVariants.d.ts +1 -1
  101. package/dist/components/ui/avatar/Avatar.vue.d.ts +1 -1
  102. package/dist/components/ui/avatar/AvatarImage.vue.d.ts +5 -1
  103. package/dist/components/ui/avatar/index.d.ts +1 -1
  104. package/dist/components/ui/badge/index.d.ts +2 -2
  105. package/dist/components/ui/button/Button.vue.d.ts +3 -1
  106. package/dist/components/ui/button/index.d.ts +2 -2
  107. package/dist/components/ui/carousel/CarouselNext.vue.d.ts +2 -2
  108. package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +2 -2
  109. package/dist/components/ui/combobox/Combobox.vue.d.ts +2 -2
  110. package/dist/components/ui/combobox/ComboboxInput.vue.d.ts +2 -1
  111. package/dist/components/ui/command/Command.vue.d.ts +3 -3
  112. package/dist/components/ui/command/CommandInput.vue.d.ts +2 -1
  113. package/dist/components/ui/data-table/DataTable.vue.d.ts +5 -4
  114. package/dist/components/ui/dialog/DialogContent.vue.d.ts +8 -0
  115. package/dist/components/ui/drawer/Drawer.vue.d.ts +4 -4
  116. package/dist/components/ui/input/Input.vue.d.ts +19 -1
  117. package/dist/components/ui/multi-select/MultiSelect.vue.d.ts +8 -4
  118. package/dist/components/ui/progress/Progress.vue.d.ts +26 -88
  119. package/dist/components/ui/progress/ProgressDefault.vue.d.ts +14 -0
  120. package/dist/components/ui/progress/ProgressGradient.vue.d.ts +25 -0
  121. package/dist/components/ui/progress/ProgressSectioned.vue.d.ts +36 -0
  122. package/dist/components/ui/progress/index.d.ts +5 -2
  123. package/dist/components/ui/progress/useProgressGeometry.d.ts +60 -0
  124. package/dist/components/ui/select/Select.vue.d.ts +2 -2
  125. package/dist/components/ui/select/SelectContent.vue.d.ts +1 -1
  126. package/dist/components/ui/select/SelectTrigger.vue.d.ts +3 -0
  127. package/dist/components/ui/sheet/index.d.ts +1 -1
  128. package/dist/components/ui/slider/index.d.ts +12 -11
  129. package/dist/components/ui/tags-input/TagsInput.vue.d.ts +2 -2
  130. package/dist/components/ui/textarea/Textarea.vue.d.ts +5 -1
  131. package/dist/components/ui/toast/Toast.vue.d.ts +4 -4
  132. package/dist/components/ui/toggle/Toggle.vue.d.ts +1 -1
  133. package/dist/components/ui/toggle/index.d.ts +1 -1
  134. package/dist/components/ui/toggle-group/toggleGroupContext.d.ts +2 -3
  135. package/dist/composables/color/index.d.ts +49 -0
  136. package/dist/composables/context/createContext.d.ts +56 -0
  137. package/dist/composables/context/index.d.ts +1 -0
  138. package/dist/composables/dark/darkModeSyncScript.d.ts +23 -0
  139. package/dist/composables/dark/index.d.ts +3 -0
  140. package/dist/composables/dark/useGlobalDark.d.ts +19 -2
  141. package/dist/composables/dom/index.d.ts +0 -3
  142. package/dist/composables/dom/useClipboard.d.ts +35 -12
  143. package/dist/composables/dom/useDocumentVisibility.d.ts +20 -0
  144. package/dist/composables/glass/webgl/compile.d.ts +15 -0
  145. package/dist/composables/glass/webgl/shaders/procedural-color.glsl.d.ts +3 -0
  146. package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +55 -0
  147. package/dist/composables/motion/core/index.d.ts +1 -1
  148. package/dist/composables/motion/index.d.ts +1 -1
  149. package/dist/composables/motion/useCountup.d.ts +29 -0
  150. package/dist/composables/motion/useNumericTransition.d.ts +14 -3
  151. package/dist/composables/motion/vReveal.d.ts +2 -0
  152. package/dist/composables/sidebar/useSidebarState.d.ts +2 -2
  153. package/dist/composables/sortable/dragController.d.ts +44 -0
  154. package/dist/composables/sortable/dropResolver.d.ts +34 -0
  155. package/dist/composables/sortable/ghostRenderer.d.ts +44 -0
  156. package/dist/composables/sortable/index.d.ts +1 -1
  157. package/dist/composables/sortable/touchGate.d.ts +26 -0
  158. package/dist/composables/sortable/transitionTiming.d.ts +50 -0
  159. package/dist/composables/sortable/types.d.ts +133 -0
  160. package/dist/composables/sortable/useSortable.d.ts +25 -153
  161. package/dist/configurator.js +1 -1
  162. package/dist/confirm-dialog.js +1 -1
  163. package/dist/controls.js +4 -4
  164. package/dist/createContext-DBMGRlx4.js +25 -0
  165. package/dist/dark.d.ts +2 -1
  166. package/dist/dark.js +9 -2
  167. package/dist/data-table.js +1 -1
  168. package/dist/dialog.js +1 -1
  169. package/dist/disco-glyph.js +1 -1
  170. package/dist/dock.js +400 -261
  171. package/dist/dockContext-spUj_-E5.js +9 -0
  172. package/dist/dom.js +6 -6
  173. package/dist/{dropdown-menu-naE0skDg.js → dropdown-menu-EFjl5iKo.js} +1 -1
  174. package/dist/dropdown-menu.js +1 -1
  175. package/dist/expandable-container.js +26 -20
  176. package/dist/fonts/README.md +21 -0
  177. package/dist/fonts/fraunces/fraunces-latin.woff2 +0 -0
  178. package/dist/forms.js +68 -59
  179. package/dist/glass-panel.js +1 -1
  180. package/dist/glass-ui.css +1 -1
  181. package/dist/glass-ui.js +226 -328
  182. package/dist/glyph-face.js +2 -2
  183. package/dist/goo-blob.d.ts +1 -0
  184. package/dist/goo-blob.js +538 -0
  185. package/dist/header-ribbon.js +2 -2
  186. package/dist/hover-card.js +1 -1
  187. package/dist/hover-popover.js +1 -1
  188. package/dist/icon-tooltip.js +1 -1
  189. package/dist/index.d.ts +1 -0
  190. package/dist/instrument-chassis.js +1 -1
  191. package/dist/instrument-rail.js +1 -1
  192. package/dist/keys-BFoma9vm.js +9 -0
  193. package/dist/label.js +1 -1
  194. package/dist/labeled-field.js +57 -39
  195. package/dist/metric-badge.js +1 -1
  196. package/dist/motion-core.js +82 -123
  197. package/dist/motion.js +62 -14
  198. package/dist/number-field.js +1 -1
  199. package/dist/paper-backdrop.js +1 -1
  200. package/dist/popover.js +1 -1
  201. package/dist/{presets-BpTf63Hp.js → presets-1OhFpaIC.js} +1 -1
  202. package/dist/prng-Bz_1Tydc.js +15 -0
  203. package/dist/progress.js +2 -2
  204. package/dist/reactive.js +2 -2
  205. package/dist/responsive-tabs.js +38 -32
  206. package/dist/scrolling-text.js +1 -1
  207. package/dist/search.js +8 -8
  208. package/dist/select.js +3 -3
  209. package/dist/separator.js +1 -1
  210. package/dist/sheet.js +1 -1
  211. package/dist/{slider-wx8ifVFB.js → slider-BOh8ycfZ.js} +7 -11
  212. package/dist/slider.js +1 -1
  213. package/dist/sortable-list.js +36 -38
  214. package/dist/stacked-icons.js +2 -2
  215. package/dist/styles/animations.css +1 -1
  216. package/dist/styles/cards.css +1 -1
  217. package/dist/styles/components.css +1 -1
  218. package/dist/styles/dock-controls.css +486 -0
  219. package/dist/styles/dock.css +284 -450
  220. package/dist/styles/fonts.css +25 -0
  221. package/dist/styles/glass-specular-track.css +154 -0
  222. package/dist/styles/glass.css +74 -2
  223. package/dist/styles/index.css +21 -2
  224. package/dist/styles/instrument-chassis.css +11 -4
  225. package/dist/styles/theme.css +73 -21
  226. package/dist/styles/tokens.css +271 -140
  227. package/dist/styles/typography.css +14 -8
  228. package/dist/styles/utilities.css +36 -8
  229. package/dist/styles/view-transition.css +10 -4
  230. package/dist/switch.js +1 -1
  231. package/dist/tabs.js +139 -112
  232. package/dist/timeline.js +219 -158
  233. package/dist/toast.js +1 -1
  234. package/dist/toggle-group.js +1 -1
  235. package/dist/tokens.d.ts +1 -1
  236. package/dist/tooltip.js +1 -1
  237. package/dist/{useAnimatedNumber-BOxrS3a6.js → useAnimatedNumber-BF6r64lA.js} +1 -1
  238. package/dist/useClipboard-D8vFyRCa.js +97 -0
  239. package/dist/{useConfiguratorState-Dq2gNv4A.js → useConfiguratorState-DUtC1jxr.js} +82 -86
  240. package/dist/useGlobalDark-CWiaCoEw.js +34 -0
  241. package/dist/useIntersectionPause-DAdVPVp4.js +53 -0
  242. package/dist/useSortable-DnyGXKKY.js +246 -0
  243. package/dist/{useTouchGate-XX8gHfay.js → useTouchGate-CS5Csc2h.js} +1 -1
  244. package/dist/utils/prng.d.ts +4 -0
  245. package/dist/vReveal-u2wSG2El.js +35 -0
  246. package/dist/watercolor-dot.d.ts +1 -0
  247. package/dist/watercolor-dot.js +129 -0
  248. package/package.json +101 -16
  249. package/src/fonts/README.md +21 -0
  250. package/src/fonts/fraunces/fraunces-latin.woff2 +0 -0
  251. package/src/styles/animations.css +1 -1
  252. package/src/styles/cards.css +1 -1
  253. package/src/styles/dock-controls.css +486 -0
  254. package/src/styles/dock.css +284 -450
  255. package/src/styles/fonts.css +25 -0
  256. package/src/styles/glass-specular-track.css +154 -0
  257. package/src/styles/glass.css +74 -2
  258. package/src/styles/index.css +21 -2
  259. package/src/styles/instrument-chassis.css +11 -4
  260. package/src/styles/theme.css +73 -21
  261. package/src/styles/tokens.css +271 -140
  262. package/src/styles/typography.css +14 -8
  263. package/src/styles/utilities.css +36 -8
  264. package/src/styles/view-transition.css +10 -4
  265. package/dist/DataTable-BsrDYdoE.js +0 -460
  266. package/dist/DialogContent-B61rP8lj.js +0 -93
  267. package/dist/HoverPopover-BlEwqG7S.js +0 -96
  268. package/dist/Input-IFsIzId2.js +0 -30
  269. package/dist/Progress-Bs44qWEM.js +0 -126
  270. package/dist/UnderlineTabs-B4FV2zi_.js +0 -37
  271. package/dist/components/custom/aurora/shaders/aurora.frag.d.ts +0 -1
  272. package/dist/composables/dom/useBreakpoint.d.ts +0 -38
  273. package/dist/composables/dom/useIdleReady.d.ts +0 -63
  274. package/dist/composables/dom/useViewportReady.d.ts +0 -87
  275. package/dist/composables/glass/webgl/frostShader.d.ts +0 -27
  276. package/dist/composables/motion/useAnimatedNumberMap.d.ts +0 -29
  277. package/dist/composables/motion/useStagger.d.ts +0 -50
  278. package/dist/dockContext-DM58L1Jt.js +0 -16
  279. package/dist/keys-SIKQYNx1.js +0 -11
  280. package/dist/supportsCssTimeline-IQY3gfKD.js +0 -12
  281. package/dist/useGlobalDark-BUUTZvkU.js +0 -24
  282. package/dist/useIdleReady-sLhGo6CL.js +0 -162
  283. package/dist/useIntersectionPause-CUmANkoc.js +0 -39
  284. package/dist/useSortable-DLK9kwZp.js +0 -189
  285. /package/dist/{HoverCardContent-DGUhpRVt.js → HoverCardContent-ICfIMZX1.js} +0 -0
  286. /package/dist/{InstrumentChassis-CqKPBNqp.js → InstrumentChassis-DaHIZCqy.js} +0 -0
  287. /package/dist/{InstrumentRail-CCjvKkpB.js → InstrumentRail-B0qqLFN0.js} +0 -0
  288. /package/dist/{Label-D53EOwLE.js → Label-CZk-3nTc.js} +0 -0
  289. /package/dist/{PaperBackdrop-Ds-wDsKf.js → PaperBackdrop-D_YZW47j.js} +0 -0
  290. /package/dist/{SelectGroup-DAgcsfFw.js → SelectGroup-CMdoCjRE.js} +0 -0
  291. /package/dist/{SelectSeparator-DN1jzLaI.js → SelectSeparator-CaJnPF3_.js} +0 -0
  292. /package/dist/{Separator-DXxac0j8.js → Separator-C2XtAXRp.js} +0 -0
  293. /package/dist/{Switch-imA0Hdjs.js → Switch-x8n6husW.js} +0 -0
  294. /package/dist/{Toaster-Brs6QjBU.js → Toaster-DdhMKfus.js} +0 -0
  295. /package/dist/{TooltipProvider-MZFRxOvT.js → TooltipProvider-D-JrSqDu.js} +0 -0
  296. /package/dist/components/custom/aurora/{renderMode.d.ts → constants/renderMode.d.ts} +0 -0
  297. /package/dist/components/custom/aurora/{shaders → constants/shaders}/aurora.vert.d.ts +0 -0
  298. /package/dist/{constants-DfWPi8kh.js → constants-DsCdlK9I.js} +0 -0
  299. /package/dist/{sheet-BnvZRXPq.js → sheet-CQYYrkr9.js} +0 -0
  300. /package/dist/{useGlassRenderer-C98tZnJ7.js → useGlassRenderer-Dn3WpfG-.js} +0 -0
  301. /package/dist/{useInterval-B58LmYth.js → useInterval-CHVYFpXV.js} +0 -0
  302. /package/dist/{useResizeObserver-C_7GjpRn.js → useResizeObserver-DX-STszm.js} +0 -0
  303. /package/dist/{useTextHighlight-CLST6an0.js → useTextHighlight-Dmtofpk2.js} +0 -0
  304. /package/dist/{useTimer-6FoosoDY.js → useTimer-DGgoxTXL.js} +0 -0
  305. /package/dist/{useUserInvalidAria-BW5iyqWR.js → useUserInvalidAria-DmvZ_6Dx.js} +0 -0
  306. /package/dist/{useViewTransition-CUJM7fXT.js → useViewTransition-D4ssvnXZ.js} +0 -0
@@ -1,10 +1,10 @@
1
1
  import { t as e } from "./cn-DJXf4yaB.js";
2
- import { createBlock as t, defineComponent as n, normalizeClass as r, openBlock as i, renderSlot as a, unref as o, withCtx as s } from "vue";
3
- import { Primitive as c } from "reka-ui";
4
- import { cva as l } from "class-variance-authority";
2
+ import { computed as t, createBlock as n, defineComponent as r, mergeProps as i, openBlock as a, renderSlot as o, unref as s, withCtx as c } from "vue";
3
+ import { Primitive as l } from "reka-ui";
4
+ import { cva as u } from "class-variance-authority";
5
5
  //#endregion
6
6
  //#region src/components/ui/button/Button.vue
7
- var u = /* @__PURE__ */ n({
7
+ var d = /* @__PURE__ */ r({
8
8
  __name: "Button",
9
9
  props: {
10
10
  variant: {},
@@ -16,30 +16,34 @@ var u = /* @__PURE__ */ n({
16
16
  Object,
17
17
  Array
18
18
  ] },
19
+ type: {},
20
+ disabled: { type: [Boolean, String] },
19
21
  asChild: { type: Boolean },
20
22
  as: { default: "button" }
21
23
  },
22
- setup(n) {
23
- let l = n;
24
- return (u, f) => (i(), t(o(c), {
25
- as: n.as,
26
- "as-child": n.asChild,
27
- "data-size": n.size,
28
- class: r(o(e)(o(d)({
29
- variant: n.variant,
30
- size: n.size
31
- }), l.class))
32
- }, {
33
- default: s(() => [a(u.$slots, "default")]),
24
+ setup(r) {
25
+ let u = r, d = t(() => ({
26
+ type: u.type,
27
+ disabled: u.disabled
28
+ }));
29
+ return (t, p) => (a(), n(s(l), i({
30
+ as: r.as,
31
+ "as-child": r.asChild,
32
+ "data-size": r.size
33
+ }, d.value, { class: s(e)(s(f)({
34
+ variant: r.variant,
35
+ size: r.size
36
+ }), u.class) }), {
37
+ default: c(() => [o(t.$slots, "default")]),
34
38
  _: 3
35
- }, 8, [
39
+ }, 16, [
36
40
  "as",
37
41
  "as-child",
38
42
  "data-size",
39
43
  "class"
40
44
  ]));
41
45
  }
42
- }), d = l("btn-pill focus-ring whitespace-nowrap text-sm font-medium cursor-pointer active:scale-[var(--scale-press-btn)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-disabled", {
46
+ }), f = u("btn-pill focus-ring whitespace-nowrap text-sm font-medium cursor-pointer active:scale-[var(--scale-press-btn)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-disabled", {
43
47
  variants: {
44
48
  variant: {
45
49
  default: "bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80 aria-pressed:bg-primary/85",
@@ -50,8 +54,8 @@ var u = /* @__PURE__ */ n({
50
54
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 active:bg-secondary/70 aria-pressed:bg-secondary/60",
51
55
  accent: "bg-accent text-accent-foreground border border-border/40 hover:bg-accent/80 active:bg-accent/70 aria-pressed:bg-accent/60",
52
56
  ghost: "bg-transparent text-foreground/70 hover:bg-foreground/8 hover:text-foreground active:bg-foreground/12 aria-pressed:bg-foreground/10 aria-pressed:text-foreground",
53
- glass: "glass-wash text-foreground hover:bg-[var(--glass-bg-resting)] hover:border-[var(--glass-border-resting)] active:bg-[var(--glass-bg-floating)] active:border-[var(--glass-border-floating)] aria-pressed:bg-[color-mix(in_srgb,var(--foreground)_10%,var(--glass-bg-resting))]",
54
- "glass-wash": "glass-wash text-foreground/70 hover:bg-foreground/[0.04] hover:border-[var(--surface-tint-22)] hover:text-foreground active:bg-foreground/[0.08] aria-pressed:bg-foreground/[0.1] aria-pressed:text-foreground",
57
+ glass: "glass-wash glass-specular-track text-foreground hover:bg-[var(--glass-bg-resting)] hover:border-[var(--glass-border-resting)] active:bg-[var(--glass-bg-floating)] active:border-[var(--glass-border-floating)] aria-pressed:bg-[color-mix(in_srgb,var(--foreground)_10%,var(--glass-bg-resting))]",
58
+ "glass-wash": "glass-wash glass-specular-track text-foreground/70 hover:bg-foreground/[0.04] hover:border-[var(--surface-tint-22)] hover:text-foreground active:bg-foreground/[0.08] aria-pressed:bg-foreground/[0.1] aria-pressed:text-foreground",
55
59
  ai: "bg-amber-500/15 text-amber-700 hover:bg-amber-500/25 active:bg-amber-500/35 dark:text-amber-400 aria-pressed:bg-amber-500/30",
56
60
  link: "text-primary underline-offset-4 hover:underline active:opacity-80 active:scale-100"
57
61
  },
@@ -60,7 +64,8 @@ var u = /* @__PURE__ */ n({
60
64
  xs: "h-7 rounded-pill px-2 text-xs",
61
65
  sm: "h-9 rounded-pill px-3",
62
66
  lg: "h-11 rounded-pill px-8",
63
- icon: "h-10 w-10 p-0"
67
+ icon: "h-10 w-10 p-0",
68
+ "icon-sm": "h-7 w-7 p-0"
64
69
  }
65
70
  },
66
71
  defaultVariants: {
@@ -69,4 +74,4 @@ var u = /* @__PURE__ */ n({
69
74
  }
70
75
  });
71
76
  //#endregion
72
- export { u as n, d as t };
77
+ export { d as n, f as t };
package/dist/button.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./button-DS3ULf5i.js";
1
+ import { n as e, t } from "./button-Ckn3eDfB.js";
2
2
  export { e as Button, t as buttonVariants };
package/dist/card.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "./CardFooter-3-VGho1J.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./CardFooter-C390imy7.js";
2
2
  export { r as Card, n as CardContent, i as CardDescription, a as CardFooter, e as CardHeader, t as CardTitle };
package/dist/carousel.js CHANGED
@@ -3,7 +3,7 @@ import { t } from "./createLucideIcon-DuDoe_ra.js";
3
3
  import { t as n } from "./chevron-down-pBY8sYfV.js";
4
4
  import { t as r } from "./chevron-right-BjeKC22V.js";
5
5
  import { t as i } from "./chevron-up-DBeNHUm1.js";
6
- import { n as a } from "./button-DS3ULf5i.js";
6
+ import { n as a } from "./button-Ckn3eDfB.js";
7
7
  import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createVNode as f, defineComponent as p, mergeProps as m, normalizeClass as h, onMounted as g, openBlock as _, ref as v, renderList as y, renderSlot as b, resolveDynamicComponent as x, toDisplayString as S, unref as C, watch as w, withCtx as T } from "vue";
8
8
  import { createInjectionState as E } from "@vueuse/core";
9
9
  import D from "embla-carousel-vue";
@@ -165,7 +165,7 @@ var P = /* @__PURE__ */ p({
165
165
  "aria-label": `Go to slide ${t}`,
166
166
  "data-active": t - 1 === a.value ? "" : void 0,
167
167
  "data-slot": "carousel-dot",
168
- class: h(["focus-ring rounded-pill cursor-pointer transition-[background-color,transform,width,height,box-shadow] duration-[var(--duration-fast)]", C(e)(C(i) === "vertical" ? "w-1.5" : "h-1.5", t - 1 === a.value ? C(i) === "vertical" ? "h-6 bg-foreground scale-[var(--scale-hover)]" : "w-6 bg-foreground scale-[var(--scale-hover)]" : C(i) === "vertical" ? "h-1.5 bg-[var(--muted-medium)] hover:bg-foreground/50" : "w-1.5 bg-[var(--muted-medium)] hover:bg-foreground/50")]),
168
+ class: h(["focus-ring rounded-pill cursor-pointer transition-[background-color,transform,width,height,box-shadow] duration-fast", C(e)(C(i) === "vertical" ? "w-1.5" : "h-1.5", t - 1 === a.value ? C(i) === "vertical" ? "h-6 bg-foreground scale-[var(--scale-hover)]" : "w-6 bg-foreground scale-[var(--scale-hover)]" : C(i) === "vertical" ? "h-1.5 bg-muted-medium hover:bg-foreground/50" : "w-1.5 bg-muted-medium hover:bg-foreground/50")]),
169
169
  onClick: (e) => d(t - 1)
170
170
  }, null, 10, L))), 128))], 10, I)) : l("", !0);
171
171
  }
@@ -1,2 +1,2 @@
1
- import { n as e, r as t, t as n } from "./CollapsibleContent-wlmlDujU.js";
1
+ import { n as e, r as t, t as n } from "./CollapsibleContent-cauTbZEM.js";
2
2
  export { t as Collapsible, n as CollapsibleContent, e as CollapsibleTrigger };
@@ -0,0 +1,33 @@
1
+ import { colorUnit2 as e, oklabToLinearSRGB as t, oklabToRgb255 as n, parseCSSColor as r, rawOklabToOklch as i, rawOklchToOklab as a, srgbToOKLab as o } from "@mkbabb/value.js";
2
+ //#region src/composables/color/index.ts
3
+ function s(e) {
4
+ let [n, r, i] = a(e.L, e.C, e.h), [o, s, c] = t(n, r, i);
5
+ return [
6
+ Math.max(0, o),
7
+ Math.max(0, s),
8
+ Math.max(0, c)
9
+ ];
10
+ }
11
+ function c(e) {
12
+ let [t, r, i] = a(e.L, e.C, e.h), [o, s, c] = n(t, r, i), l = (e) => Math.min(1, Math.max(0, e / 255));
13
+ return [
14
+ l(o),
15
+ l(s),
16
+ l(c)
17
+ ];
18
+ }
19
+ function l(t) {
20
+ let n = e(r(t), "rgb").value, [a, s, c] = o(Number(n.r), Number(n.g), Number(n.b)), [l, u, d] = i(a, s, c);
21
+ return {
22
+ L: l,
23
+ C: u,
24
+ h: d
25
+ };
26
+ }
27
+ function u(e) {
28
+ let [t, r, i] = a(e.L, e.C, e.h), [o, s, c] = n(t, r, i), l = (e) => Math.round(e).toString(16).padStart(2, "0");
29
+ return `#${l(o)}${l(s)}${l(c)}`;
30
+ }
31
+ var d = (e) => c(l(e));
32
+ //#endregion
33
+ export { s as a, c as i, d as n, u as r, l as t };
@@ -0,0 +1 @@
1
+ export * from "./composables/color";
package/dist/color.js ADDED
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, n, r, t as i } from "./color-rkK4RMx2.js";
2
+ export { i as cssToOklch, n as defaultBlobColorResolver, r as oklchStopToHex, t as oklchToGammaRgb, e as oklchToLinear };
package/dist/command.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./CommandShortcut-C6lsz3pG.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./CommandShortcut-BiVyqipe.js";
2
2
  export { r as Command, t as CommandDialog, s as CommandEmpty, a as CommandGroup, e as CommandInput, n as CommandItem, o as CommandList, i as CommandSeparator, c as CommandShortcut };
@@ -0,0 +1,106 @@
1
+ //#region src/composables/glass/webgl/shaders/procedural-color.glsl.ts
2
+ var e = "\nfloat srgbToLinearCh(float c) {\n return c <= 0.04045 ? c / 12.92 : pow((c + 0.055) / 1.055, 2.4);\n}\nvec3 srgbToLinear(vec3 c) {\n return vec3(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfloat linearToSrgbCh(float c) {\n return c <= 0.0031308 ? c * 12.92 : 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nvec3 linearToSrgb(vec3 c) {\n return vec3(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}", t = "const mat2 FBM_ROT = mat2(0.8, 0.6, -0.6, 0.8);", n = "\n// value.js LINEAR_SRGB_TO_LMS (constants.ts), row-major; written here as GLSL\n// columns (= the transpose) so mat3 * vec3 evaluates the row-major M·v.\nconst mat3 LINEAR_SRGB_TO_LMS = mat3(\n 0.4122214708, 0.2119034982, 0.0883024619,\n 0.5363325363, 0.6806995451, 0.2817188376,\n 0.0514459929, 0.1073969566, 0.6299787005\n);\n\n// value.js srgbToOKLab's INLINE LMS→OKLab coefficients (gamut.ts lines 295-297 —\n// these differ at the ~1e-9 digit from LMS_TO_OKLAB_MATRIX; use the inline ones to\n// mirror the exact value.js path), row-major → GLSL columns.\nconst mat3 LMS_TO_OKLAB = mat3(\n 0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660\n);\n\n// value.js OKLAB_TO_LMS_COEFF (constants.ts), row-major → GLSL columns. Rows:\n// l = [1, 0.3963377774, 0.2158037573], m = [1, -0.1055613458, -0.0638541728],\n// s = [1, -0.0894841775, -1.2914855480].\nconst mat3 OKLAB_TO_LMS = mat3(\n 1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480\n);\n\n// value.js LMS_TO_LINEAR_SRGB (constants.ts), row-major → GLSL columns.\nconst mat3 LMS_TO_LINEAR_SRGB = mat3(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\n// Gamma sRGB → raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nvec3 srgbToOklab(vec3 c) {\n vec3 lin = srgbToLinear(c);\n vec3 lms = LINEAR_SRGB_TO_LMS * lin;\n vec3 lmsCbrt = sign(lms) * pow(abs(lms), vec3(1.0 / 3.0));\n return LMS_TO_OKLAB * lmsCbrt;\n}\n\n// Raw OKLab (L, a, b) → linear sRGB. Mirrors value.js oklabToLinearSRGB.\nvec3 oklabToLinearSrgb(vec3 lab) {\n vec3 lms_ = OKLAB_TO_LMS * lab;\n vec3 lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab → OKLCh: H in RADIANS. Mirrors value.js rawOklabToOklch (which returns\n// degrees; we stay in radians and only fold to [0, 2pi)).\nvec3 oklabToOklch(vec3 lab) {\n float C = length(lab.yz);\n float H = atan(lab.z, lab.y);\n if (H < 0.0) H += 2.0 * PI;\n return vec3(lab.x, C, H);\n}\n\n// OKLCh (H radians) → OKLab. Mirrors value.js rawOklchToOklab.\nvec3 oklchToOklab(vec3 lch) {\n return vec3(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}";
3
+ function r() {
4
+ let e = typeof window < "u" && window.devicePixelRatio || 1;
5
+ return Math.min(e, 2);
6
+ }
7
+ //#endregion
8
+ //#region src/composables/glass/webgl/useWebGLCanvas.ts
9
+ function i(e, t) {
10
+ let { setup: n, contextAttrs: r } = t, i = t.respectReducedMotion ?? t.mode !== "capture", a = /* @__PURE__ */ new Set();
11
+ t.mode === "capture" && a.add("manual");
12
+ let o = () => a.size === 0, s = 0, c = typeof performance < "u" ? performance.now() : 0, l = null, u = null, d = !1, f = !1, p = i && typeof window < "u" && window.matchMedia ? window.matchMedia("(prefers-reduced-motion: reduce)") : null, m = p?.matches ?? !1;
13
+ function h() {
14
+ if (!o() || !u) return;
15
+ let e = (performance.now() - c) / 1e3, t = u.time ? u.time(e) : e;
16
+ u.frame(t), s = !m && u.shouldContinue() ? requestAnimationFrame(h) : 0;
17
+ }
18
+ function g() {
19
+ d && o() && !s && u && (s = requestAnimationFrame(h));
20
+ }
21
+ function _() {
22
+ let e = p?.matches ?? !1;
23
+ e !== m && (m = e, e || (c = performance.now()), g());
24
+ }
25
+ p?.addEventListener("change", _);
26
+ function v(e = "manual") {
27
+ let t = o();
28
+ a.add(e), t && !o() && (cancelAnimationFrame(s), s = 0);
29
+ }
30
+ function y(e = "manual") {
31
+ let t = !o();
32
+ a.delete(e), t && o() && d && u && (c = performance.now() - 1e3, h());
33
+ }
34
+ let b = typeof document < "u";
35
+ function x() {
36
+ document.hidden ? v("tab-hidden") : y("tab-hidden");
37
+ }
38
+ b && document.addEventListener("visibilitychange", x), b && document.hidden && a.add("tab-hidden");
39
+ let S = null;
40
+ function C(e) {
41
+ e.skipped ? v("off-screen") : y("off-screen");
42
+ }
43
+ function w() {
44
+ if (S) return;
45
+ let t = e.parentElement;
46
+ t && (S = t, t.addEventListener("contentvisibilityautostatechange", C));
47
+ }
48
+ function T() {
49
+ S?.removeEventListener("contentvisibilityautostatechange", C), S = null;
50
+ }
51
+ let E = null;
52
+ function D(e) {
53
+ e.preventDefault(), cancelAnimationFrame(s), s = 0, u = null, l = null;
54
+ }
55
+ function O() {
56
+ f || (k(), o() && g());
57
+ }
58
+ function k() {
59
+ let t = e.getContext("webgl2", r ?? void 0);
60
+ if (!t) throw Error("[useWebGLCanvas] WebGL2 unavailable");
61
+ l = t, u = n(l), u.resize(), E || (E = new ResizeObserver(() => u?.resize()), E.observe(e));
62
+ }
63
+ function A() {
64
+ d || f || (e.addEventListener("webglcontextlost", D, !1), e.addEventListener("webglcontextrestored", O, !1), k(), w(), d = !0, c = performance.now(), o() && (s = requestAnimationFrame(h)));
65
+ }
66
+ function j(e) {
67
+ d || A(), u?.frame(e);
68
+ }
69
+ function M() {
70
+ f = !0, cancelAnimationFrame(s), s = 0, b && document.removeEventListener("visibilitychange", x), p?.removeEventListener("change", _), T(), e.removeEventListener("webglcontextlost", D, !1), e.removeEventListener("webglcontextrestored", O, !1), E?.disconnect(), E = null, u?.teardown?.(), u = null, l?.getExtension("WEBGL_lose_context")?.loseContext(), l = null, a.clear();
71
+ }
72
+ return t.mode === "capture" && A(), {
73
+ arm: A,
74
+ suspend: v,
75
+ resume: y,
76
+ wake: g,
77
+ renderAt: j,
78
+ dispose: M,
79
+ get gl() {
80
+ return l;
81
+ },
82
+ get reducedMotion() {
83
+ return m;
84
+ }
85
+ };
86
+ }
87
+ //#endregion
88
+ //#region src/composables/glass/webgl/compile.ts
89
+ function a(e, t, n, r = "[glass-ui:webgl]") {
90
+ let i = e.createShader(t);
91
+ if (e.shaderSource(i, n), e.compileShader(i), !e.getShaderParameter(i, e.COMPILE_STATUS)) {
92
+ let t = e.getShaderInfoLog(i) ?? "unknown";
93
+ throw e.deleteShader(i), Error(`${r} shader compile failed:\n${t}`);
94
+ }
95
+ return i;
96
+ }
97
+ function o(e, t, n, r = "[glass-ui:webgl]") {
98
+ let i = e.createProgram();
99
+ if (e.attachShader(i, t), e.attachShader(i, n), e.linkProgram(i), !e.getProgramParameter(i, e.LINK_STATUS)) {
100
+ let t = e.getProgramInfoLog(i) ?? "unknown";
101
+ throw e.deleteProgram(i), Error(`${r} program link failed:\n${t}`);
102
+ }
103
+ return i;
104
+ }
105
+ //#endregion
106
+ export { t as a, r as i, o as n, e as o, i as r, n as s, a as t };
@@ -16,10 +16,10 @@ import type { HTMLAttributes } from "vue";
16
16
  * `String(Math.round(v))`.
17
17
  * - `placeholder`: glyph for null/empty (default "—").
18
18
  * - `digitCount`: optional knob exposed to the consumer via the
19
- * `--digit-count` CSS custom property on the host. Pairs with
20
- * MetricRow's `--digit-count` clamp so the value cell shrinks
21
- * proportionally as the rendered digits widen. When omitted the
22
- * primitive computes it from the formatted string length.
19
+ * `--digit-count` CSS custom property on the host. A consumer's
20
+ * width-clamp can read this so the value cell shrinks proportionally
21
+ * as the rendered digits widen. When omitted the primitive computes
22
+ * it from the formatted string length.
23
23
  * - `mode`: `"absolute"` (default) or `"progress"` — passes through to
24
24
  * `useAnimatedNumber`.
25
25
  */
@@ -30,8 +30,8 @@ export interface AnimatedDigitProps {
30
30
  placeholder?: string;
31
31
  /**
32
32
  * Override the auto-derived digit-count. When unset the primitive
33
- * publishes the formatted-string length to `--digit-count` so
34
- * MetricRow's clamp math reads from a single source of truth.
33
+ * publishes the formatted-string length to `--digit-count` so a
34
+ * consumer's width-clamp reads from a single source of truth.
35
35
  */
36
36
  digitCount?: number;
37
37
  /** Tag forwarded to `useAnimatedNumber`. */
@@ -41,8 +41,8 @@ export interface AnimatedDigitProps {
41
41
  class?: HTMLAttributes["class"];
42
42
  }
43
43
  declare const __VLS_export: import("vue").DefineComponent<AnimatedDigitProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AnimatedDigitProps> & Readonly<{}>, {
44
- placeholder: string;
45
44
  mode: AnimatedDigitMode;
45
+ placeholder: string;
46
46
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
47
47
  declare const _default: typeof __VLS_export;
48
48
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import type { AuroraRuntimeOptions } from "./composables/runtime";
2
- import { type AuroraConfig } from "./presets";
3
- import { type AuroraRenderMode } from "./renderMode";
2
+ import { type AuroraConfig } from "./constants/presets";
3
+ import { type AuroraRenderMode } from "./constants/renderMode";
4
4
  /**
5
5
  * Aurora — a painterly WebGL2 background.
6
6
  *
@@ -37,7 +37,7 @@ type __VLS_Props = {
37
37
  * Aurora field configuration (palette, nuclei, warp, media). Optional —
38
38
  * omit it and the canonical `DEFAULT_AURORA_CONFIG` painterly look
39
39
  * renders (gap 11, AM.W1). Pass a full config to author a custom field,
40
- * or a preset object from `./presets`. The default is supplied via a
40
+ * or a preset object from `./constants/presets`. The default is supplied via a
41
41
  * `withDefaults` factory so each mount gets its own (un-shared) object.
42
42
  */
43
43
  config?: AuroraConfig;
@@ -1,15 +1,6 @@
1
- import type { OklchStop } from "../presets";
2
- /**
3
- * OKLCh stop to linear-sRGB in [0, 1] — bundle-canonical bake target.
4
- * The shader ACES-tonemaps in linear, so the LUT must stay linear.
5
- *
6
- * The OKLCh→linear math is value.js's canonical Ottosson path
7
- * (`rawOklchToOklab` → `oklabToLinearSRGB`, inv-K-2). The `Math.max(0, ·)` wrap
8
- * is aurora's OWN ACES-in-linear contract — value.js's `oklabToLinearSRGB` does
9
- * not clamp negative linear (an out-of-gamut stop yields negatives; the wrap
10
- * keeps them off the GPU). The equivalence test asserts the COMPOSED path.
11
- */
12
- export declare function oklchToLinear(stop: OklchStop): [number, number, number];
1
+ import { type OklchStop } from "../../../../composables/color";
2
+ export { cssToOklch, oklchStopToHex, oklchToLinear, } from "../../../../composables/color";
3
+ export type { OklchStop } from "../../../../composables/color";
13
4
  /**
14
5
  * Pack up to `maxStops` OklchStops into linear-sRGB triples. When `out` is
15
6
  * provided the buffer is filled in place (no allocation) — the runtime owns a
@@ -32,20 +23,7 @@ export declare function flattenPalette(stops: OklchStop[], maxStops?: number, ou
32
23
  * fades in over it once armed).
33
24
  */
34
25
  export declare function paletteToCssGradient(stops: OklchStop[]): string;
35
- export declare function oklchStopToHex(s: OklchStop): string;
36
26
  export declare function hexToOklchStop(hex: string): OklchStop;
37
- /**
38
- * Resolve any CSS color string to an OKLCh stop via value.js's parser — the
39
- * single canonical core (inv-K-2). Replaces the former 1×1-canvas `cssToRgb`
40
- * DOM trick, so this now works in SSR / happy-dom (no `document` required).
41
- *
42
- * Semantics differ from the old canvas path (which masked them): an INVALID
43
- * string THROWS (the canvas silently returned gray); ALPHA is dropped (OklchStop
44
- * has no alpha; the canvas blended against a gray pre-fill); out-of-gamut inputs
45
- * are NOT byte-clamped. Callers feeding user-supplied / possibly-transparent
46
- * strings should wrap in try/catch and decide an alpha policy.
47
- */
48
- export declare function cssToOklch(css: string): OklchStop;
49
27
  /**
50
28
  * Harmony schemes for {@link deriveAurora}. Each maps the seed hue onto the
51
29
  * derived stops differently:
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Aurora cursor model — the eased pointer-attraction state.
3
+ *
4
+ * The cursor x/y in 0..1 ease toward their targets; `strength` ramps in while the
5
+ * pointer is active and decays per-frame once it lifts. Exported ONCE here so any
6
+ * CPU mirror (a consumer reproducing the cursor model) imports these constants
7
+ * rather than re-declaring them — the shader and the CPU side stay in lockstep.
8
+ */
9
+ /**
10
+ * Cursor easing constants. Authored to feel "snappy on entry, gentle decay";
11
+ * documented in DESIGN.md §4. Higher lerp = faster ramp; smaller decay = longer
12
+ * tail.
13
+ */
14
+ export declare const CURSOR_POS_LERP = 0.22;
15
+ export declare const CURSOR_STRENGTH_LERP = 0.18;
16
+ export declare const CURSOR_DECAY_PER_FRAME = 0.992;
17
+ /**
18
+ * At-rest epsilon for the demand-driven loop. The cursor is "settled" once its
19
+ * eased position is within ε of its target AND its strength has decayed below ε —
20
+ * below this the next frame is visually identical, so the loop may park.
21
+ */
22
+ export declare const CURSOR_REST_EPSILON = 0.001;
23
+ /** The mutable eased-cursor state. `strength` ramps in; `targetStrength` decays. */
24
+ export interface CursorState {
25
+ x: number;
26
+ y: number;
27
+ targetX: number;
28
+ targetY: number;
29
+ strength: number;
30
+ targetStrength: number;
31
+ radius: number;
32
+ }
33
+ /** A fresh at-rest cursor (centred, no attraction, default radius). */
34
+ export declare function createCursorState(): CursorState;
35
+ /**
36
+ * Advance the cursor easing one frame — snappy approach toward the target
37
+ * position, gentle decay of the attraction strength when idle.
38
+ */
39
+ export declare function advanceCursor(cursor: CursorState): void;
40
+ /**
41
+ * True while the cursor is still easing (position not yet at target, or strength
42
+ * not yet decayed below ε). The render-demand gate ORs this with the config drift
43
+ * check — when both are false the next frame is pixel-identical, so the loop parks.
44
+ */
45
+ export declare function cursorIsLive(cursor: CursorState): boolean;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Aurora frame loop — the per-frame draw + the render-demand gate.
3
+ *
4
+ * `drawFrame` re-sends the per-frame cursor + time uniforms and issues the single
5
+ * full-screen-triangle draw. `needsAnimation` is the demand gate: it returns
6
+ * `false` under reduced-motion (the static frame draws once, then the loop parks),
7
+ * `false` at steady-state (all four drift uniforms 0 AND the cursor settled within
8
+ * ε — the next frame would be pixel-identical), and `true` while drift is live or
9
+ * the cursor is still easing.
10
+ */
11
+ import type { UniformLocations } from "./glSetup";
12
+ import { type CursorState } from "./cursorModel";
13
+ import type { AuroraConfig } from "../constants/presets";
14
+ export interface FrameLoopDeps {
15
+ gl: WebGL2RenderingContext;
16
+ prog: WebGLProgram;
17
+ uniforms: UniformLocations;
18
+ cursor: CursorState;
19
+ /** The live config (drift uniforms gate the demand loop). */
20
+ getConfig: () => AuroraConfig;
21
+ /** Reduced-motion intent — parks the loop after one static frame. */
22
+ getReducedMotion: () => boolean;
23
+ }
24
+ export interface FrameLoop {
25
+ /** Advance the cursor easing THEN draw — the per-frame step. */
26
+ frame: (timeSec: number) => void;
27
+ /** Demand gate — is there live motion to render on the next frame? */
28
+ needsAnimation: () => boolean;
29
+ }
30
+ export declare function createFrameLoop(deps: FrameLoopDeps): FrameLoop;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Aurora GL setup seam — shader compile/link + geometry + the uniform location
3
+ * cache. The GL-lifecycle orchestrator (`runtime.ts`) calls `createGlProgram` on a
4
+ * fresh context (on arm AND on every webglcontextrestored), so a GPU context loss
5
+ * self-heals: each call rebuilds the program + the full-screen triangle + the
6
+ * `UNIFORM_NAMES` location cache against the fresh `gl`.
7
+ *
8
+ * The `UNIFORM_NAMES` const-assertion is the single source of truth for the
9
+ * shader-uniform boundary: a NEW uniform name must be added here, and the cache is
10
+ * keyed off it, so a fresh uniform always gets a location slot.
11
+ */
12
+ export declare const UNIFORM_NAMES: readonly ["uTime", "uPalette", "uStopCount", "uNucleiCount", "uNucleiPos", "uNucleiRadius", "uNucleiPaletteBias", "uNucleiValueBias", "uNucleiDriftRadius", "uNucleiDriftPhase", "uNucleiElong", "uNucleiAngle", "uSoftmaxBeta", "uValueVariance", "uWarpAmount", "uWarpScale", "uWarpDrift", "uWarpMode", "uNoiseOctaves", "uMedium", "uFlowPattern", "uFlowFocal", "uFlowAngle", "uFlowCurl", "uCursor", "uCursorStrength", "uCursorRadius", "uStrokeAmount", "uStrokeScale", "uStrokeAnisotropy", "uStrokeLayers", "uStrokeMode", "uWetEdge", "uGranulation", "uImpasto", "uBrokenColor", "uCanvasGrain", "uNucleiDrift", "uPaletteDrift", "uBreathDepth", "uBreathPeriod", "uSaturation", "uPaperGrain", "uAlpha"];
13
+ export type UniformName = (typeof UNIFORM_NAMES)[number];
14
+ export type UniformLocations = Record<UniformName, WebGLUniformLocation | null>;
15
+ export interface GlProgram {
16
+ program: WebGLProgram;
17
+ vs: WebGLShader;
18
+ fs: WebGLShader;
19
+ uniforms: UniformLocations;
20
+ geometry: {
21
+ vao: WebGLVertexArrayObject;
22
+ buf: WebGLBuffer;
23
+ };
24
+ }
25
+ /**
26
+ * Compile + link the shader pair, build the full-screen triangle (one draw covers
27
+ * the viewport), and resolve the uniform location cache. Leaves the program bound.
28
+ */
29
+ export declare function createGlProgram(gl: WebGL2RenderingContext, vertexSrc: string, fragmentSrc: string): GlProgram;
@@ -1,23 +1,34 @@
1
1
  /**
2
- * Aurora v4.1 runtime — port of bundle `runtime.js` to TypeScript.
2
+ * Aurora v4.1 runtime — the GL-lifecycle orchestrator over the `useWebGLCanvas`
3
+ * substrate (AU.W6, the DEC-AT-1 transposition).
3
4
  *
4
- * Compiles the shader, owns the WebGL2 context and RAF loop, translates a
5
- * reactive `AuroraConfig` into uniforms, and exposes an imperative cursor API
6
- * plus a side-effect-safe `renderAt(t)` method for capture baking.
5
+ * This module composes four cohesive seams atop the substrate:
6
+ * - glSetup — compile/link + geometry + the uniform location cache
7
+ * - uniformBridge the reactive-config → GL-uniform translation + enum dispatch
8
+ * - cursorModel — the eased pointer-attraction state + advance
9
+ * - frameLoop — the per-frame draw + the render-demand gate
7
10
  *
8
- * Y-origin convention: config authoring is CSS-top-origin (0 = top). The
9
- * runtime flips Y at the uniform boundary (see AUTHOR_Y_ORIGIN_IS_TOP marks).
11
+ * It owns ONLY the aurora-specific glue: threading the seams through the
12
+ * substrate's `setup`/`frame`/`shouldContinue`/`resize`/`time`/`teardown`
13
+ * callbacks, the reduced-motion frozen-t, the DPR policy, and the imperative
14
+ * setters/pause/resume. The generic WebGL2 lifecycle — context creation, the
15
+ * three-reason suspend/resume model, the demand-driven rAF loop, the tab-visibility
16
+ * owner, the ResizeObserver, and the webglcontextlost/restored robustness — lives
17
+ * in the substrate.
18
+ *
19
+ * Y-origin convention: config authoring is CSS-top-origin (0 = top). The seams
20
+ * flip Y at the uniform boundary (`flipY` in uniformBridge/frameLoop).
10
21
  */
11
- import { type AuroraConfig, type AuroraInstance } from "../presets";
22
+ import type { AuroraConfig, AuroraInstance } from "../constants/presets";
12
23
  export type AuroraRuntimeMode = "live" | "capture";
13
24
  /**
14
- * The three independent reasons the RAF loop may be suspended. The runtime
15
- * tracks them in a `Set<SuspendReason>` rather than one boolean, so the loop
16
- * runs IFF the set is empty and each reason is cleared ONLY by the source that
17
- * set it. This makes resume-while-still-suspended structurally unreachable — a
18
- * `resume("tab-hidden")` cannot lift an `"off-screen"` suspension.
25
+ * The three independent reasons the rAF loop may be suspended. Owned by the
26
+ * `useWebGLCanvas` substrate as a `Set<reason>`: the loop runs IFF the set is
27
+ * empty and each reason is cleared ONLY by the source that set it. This makes
28
+ * resume-while-still-suspended structurally unreachable — a `resume("tab-hidden")`
29
+ * cannot lift an `"off-screen"` suspension.
19
30
  *
20
- * - `"tab-hidden"` — the runtime's own `document.visibilitychange` owner.
31
+ * - `"tab-hidden"` — the substrate's `document.visibilitychange` owner.
21
32
  * - `"off-screen"` — viewport-intersection, driven by `useIntersectionPause`.
22
33
  * - `"manual"` — the public `pause()`/`resume()` API (and capture-mode seed).
23
34
  */
@@ -26,15 +37,14 @@ export type SuspendReason = "tab-hidden" | "off-screen" | "manual";
26
37
  * When the expensive WebGL path (context creation, shader compile + GPU link,
27
38
  * first uniform upload, rAF arm) actually runs.
28
39
  *
29
- * - `"deferred"` (default) — `createAurora` constructs a cheap, un-armed
30
- * instance and returns immediately; the GL work is invoked later via
31
- * `instance.arm()`. The Vue wrapper `useAurora` schedules `arm()` past first
32
- * paint on an idle tick, gated on canvas visibility — so the shader
33
- * compile-link never lands on the consumer's first-paint critical path.
34
- * - `"eager"` — `createAurora` arms synchronously before returning, exactly
35
- * as a pre-lazy-arm runtime did. Capture / thumbnail-baking consumers need
36
- * this: `renderAt` must draw a real frame the instant `createAurora`
37
- * returns. `mode: "capture"` forces eager regardless of this field.
40
+ * - `"deferred"` (default) — `createAurora` constructs a cheap, un-armed instance
41
+ * and returns immediately; the GL work is invoked later via `instance.arm()`.
42
+ * The Vue wrapper `useAurora` schedules `arm()` past first paint on an idle
43
+ * tick, gated on canvas visibility — so the shader compile-link never lands on
44
+ * the consumer's first-paint critical path.
45
+ * - `"eager"` — `createAurora` arms synchronously before returning. Capture /
46
+ * thumbnail-baking consumers need this: `renderAt` must draw a real frame the
47
+ * instant `createAurora` returns. `mode: "capture"` forces eager regardless.
38
48
  */
39
49
  export type AuroraInitStrategy = "eager" | "deferred";
40
50
  export interface AuroraRuntimeOptions {
@@ -49,25 +59,25 @@ export interface AuroraRuntimeOptions {
49
59
  /**
50
60
  * Init-failure handler. A WebGL2/shader-compile/link failure is a
51
61
  * library-internal contract violation (O invariant 24). On the EAGER path
52
- * `createAurora` throws synchronously and `useAurora` rethrows by default
53
- * so the signal reaches the consumer's error boundary / dev console. On
54
- * the DEFERRED path the failure happens on an idle tick — outside any
55
- * mount-time boundary — so the runtime routes it here, and `useAurora`
56
- * re-surfaces it on the microtask queue (so it still reaches the dev
57
- * console / `app.config.errorHandler`) when no handler is supplied.
58
- * Provide this callback to opt into silent handling on either path.
62
+ * `createAurora` throws synchronously and `useAurora` rethrows by default so
63
+ * the signal reaches the consumer's error boundary / dev console. On the
64
+ * DEFERRED path the failure happens on an idle tick — outside any mount-time
65
+ * boundary — so the runtime routes it here, and `useAurora` re-surfaces it on
66
+ * the microtask queue (so it still reaches the dev console /
67
+ * `app.config.errorHandler`) when no handler is supplied. Provide this
68
+ * callback to opt into silent handling on either path.
59
69
  *
60
- * NOTE: this is the `useAurora` Vue-wrapper contract surface. The
61
- * imperative `createAurora(...)` runtime throws on eager init failure and
62
- * — for `instance.arm()` on the deferred path — rethrows from `arm()`.
70
+ * NOTE: this is the `useAurora` Vue-wrapper contract surface. The imperative
71
+ * `createAurora(...)` runtime throws on eager init failure and — for
72
+ * `instance.arm()` on the deferred path — rethrows from `arm()`.
63
73
  */
64
74
  onInitError?: (err: Error) => void;
65
75
  }
66
76
  /**
67
77
  * The concrete `createAurora` return shape. It IS an {@link AuroraInstance}
68
- * (structurally assignable — every member matches) but widens `pause`/`resume`
69
- * to carry an optional {@link SuspendReason}, defaulting to `"manual"`. The
70
- * Vue wrapper passes `"off-screen"` for the intersection seam; a bare
78
+ * (structurally assignable — every member matches) but widens `pause`/`resume` to
79
+ * carry an optional {@link SuspendReason}, defaulting to `"manual"`. The Vue
80
+ * wrapper passes `"off-screen"` for the intersection seam; a bare
71
81
  * `pause()`/`resume()` reads identically to the `AuroraInstance` contract.
72
82
  */
73
83
  export interface AuroraRuntime extends Omit<AuroraInstance, "pause" | "resume"> {