@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,93 +0,0 @@
1
- import { t as e } from "./cn-DJXf4yaB.js";
2
- import { t } from "./x-C4pz9nbD.js";
3
- import { t as n } from "./useSpringMount-CnizvZGm.js";
4
- import { t as r } from "./ModalOverlay-B_CBtqcE.js";
5
- import { computed as i, createBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, guardReactiveProps as l, mergeProps as u, normalizeProps as d, openBlock as f, renderSlot as p, unref as m, withCtx as h } from "vue";
6
- import { DialogClose as g, DialogContent as _, DialogPortal as v, DialogRoot as y, injectDialogRootContext as b, useForwardPropsEmits as x } from "reka-ui";
7
- //#endregion
8
- //#region src/components/ui/dialog/Dialog.vue
9
- var S = /* @__PURE__ */ c({
10
- __name: "Dialog",
11
- props: {
12
- open: { type: Boolean },
13
- defaultOpen: { type: Boolean },
14
- modal: { type: Boolean }
15
- },
16
- emits: ["update:open"],
17
- setup(e, { emit: t }) {
18
- let n = x(e, t);
19
- return (e, t) => (f(), a(m(y), d(l(m(n))), {
20
- default: h(() => [p(e.$slots, "default")]),
21
- _: 3
22
- }, 16));
23
- }
24
- }), C = "fixed left-1/2 top-1/2 z-modal grid w-full max-w-lg gap-4 p-6", w = "-translate-x-1/2 -translate-y-1/2 duration-[var(--duration-normal)] popover-animate", T = /* @__PURE__ */ c({
25
- __name: "DialogContent",
26
- props: {
27
- forceMount: { type: Boolean },
28
- disableOutsidePointerEvents: { type: Boolean },
29
- asChild: { type: Boolean },
30
- as: {},
31
- class: { type: [
32
- Boolean,
33
- null,
34
- String,
35
- Object,
36
- Array
37
- ] },
38
- variant: { default: "glass" },
39
- scrimAnimation: {},
40
- spring: { type: [Boolean, String] }
41
- },
42
- emits: [
43
- "escapeKeyDown",
44
- "pointerDownOutside",
45
- "focusOutside",
46
- "interactOutside",
47
- "openAutoFocus",
48
- "closeAutoFocus"
49
- ],
50
- setup(c, { emit: l }) {
51
- let d = c, y = l, S = x(i(() => {
52
- let { class: e, variant: t, scrimAnimation: n, spring: r, ...i } = d;
53
- return i;
54
- }), y), T = i(() => d.variant === "opaque" ? "bg-background border sm:rounded-dialog" : "glass-floating rounded-dialog"), E = d.spring ? b() : null, D = d.spring && E ? n({
55
- open: E.open,
56
- preset: typeof d.spring == "string" ? d.spring : "smooth"
57
- }) : null, O = i(() => {
58
- if (!D) return;
59
- let e = D.position.value;
60
- return {
61
- transform: `translate(-50%, -50%) scale(${1 - .05 * e})`,
62
- opacity: String(1 - e),
63
- animation: "none",
64
- transition: "none"
65
- };
66
- });
67
- return (n, i) => (f(), a(m(v), null, {
68
- default: h(() => [s(r, {
69
- scrim: "glass",
70
- animate: "fade",
71
- layout: "centered",
72
- "scrim-animation": d.scrimAnimation
73
- }, null, 8, ["scrim-animation"]), s(m(_), u(m(S), {
74
- class: m(e)(C, d.spring ? "" : w, T.value, d.class),
75
- style: O.value,
76
- "data-spring": d.spring ? typeof d.spring == "string" ? d.spring : "smooth" : void 0
77
- }), {
78
- default: h(() => [p(n.$slots, "default"), s(m(g), { class: "focus-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground" }, {
79
- default: h(() => [s(m(t), { class: "w-4 h-4" }), i[0] ||= o("span", { class: "sr-only" }, "Close", -1)]),
80
- _: 1
81
- })]),
82
- _: 3
83
- }, 16, [
84
- "class",
85
- "style",
86
- "data-spring"
87
- ])]),
88
- _: 3
89
- }));
90
- }
91
- });
92
- //#endregion
93
- export { S as n, T as t };
@@ -1,96 +0,0 @@
1
- import { t as e } from "./cn-DJXf4yaB.js";
2
- import { i as t } from "./dockContext-DM58L1Jt.js";
3
- import { Fragment as n, computed as r, createBlock as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, mergeProps as l, openBlock as u, ref as d, renderSlot as f, toDisplayString as p, unref as m, useId as h, watch as g, withCtx as _ } from "vue";
4
- import { HoverCardContent as v, HoverCardPortal as y, HoverCardRoot as b, HoverCardTrigger as x } from "reka-ui";
5
- //#region src/components/custom/hover-popover/HoverPopover.vue?vue&type=script&setup=true&lang.ts
6
- var S = { class: "hover-popover-label" }, C = { class: "hover-popover-label" }, w = /* @__PURE__ */ c({
7
- __name: "HoverPopover",
8
- props: {
9
- content: {},
10
- open: { type: Boolean },
11
- side: { default: "top" },
12
- align: { default: "center" },
13
- hoverOpenDelay: { default: 250 },
14
- closeDelay: { default: 150 },
15
- sideOffset: { default: 6 },
16
- class: { type: [
17
- Boolean,
18
- null,
19
- String,
20
- Object,
21
- Array
22
- ] },
23
- keepDockOpen: {
24
- type: Boolean,
25
- default: !1
26
- },
27
- native: {
28
- type: Boolean,
29
- default: !1
30
- }
31
- },
32
- emits: ["update:open"],
33
- setup(c, { emit: w }) {
34
- let T = w, E = c, D = r(() => e("z-popover hover-popover-panel popover-animate", E.class)), O = typeof HTMLButtonElement < "u" && "interestForElement" in HTMLButtonElement.prototype, k = r(() => E.native && O), A = `gl-hover-popover-${h() ?? "0"}`, j = d(E.open ?? !1);
35
- g(() => E.open, (e) => {
36
- typeof e == "boolean" && e !== j.value && (j.value = e);
37
- }), g(j, (e) => {
38
- T("update:open", e);
39
- });
40
- function M(e) {
41
- let t = e.newState === "open";
42
- t !== j.value && (j.value = t);
43
- }
44
- let N = t(), P = !1;
45
- g(j, (e) => {
46
- E.keepDockOpen && (e && !P ? (N?.keepOpen(), P = !0) : !e && P && (N?.release(), P = !1));
47
- });
48
- let F = r(() => E.keepDockOpen && N?.id ? {
49
- "data-glass-dock-portal": "",
50
- "data-glass-dock-owner": N.id
51
- } : {});
52
- return (t, r) => k.value ? (u(), a(n, { key: 0 }, [o("span", {
53
- class: "hover-popover-native-trigger",
54
- interestfor: A
55
- }, [f(t.$slots, "trigger", {}, () => [f(t.$slots, "default")])]), o("div", l({
56
- id: A,
57
- popover: "hint",
58
- class: m(e)("glass-top-layer hover-popover-panel", E.class)
59
- }, F.value, { onToggle: M }), [f(t.$slots, "content", {}, () => [o("span", S, p(c.content), 1)])], 16)], 64)) : (u(), i(m(b), {
60
- key: 1,
61
- open: j.value,
62
- "onUpdate:open": r[0] ||= (e) => j.value = e,
63
- "open-delay": c.hoverOpenDelay,
64
- "close-delay": c.closeDelay
65
- }, {
66
- default: _(() => [s(m(x), { "as-child": "" }, {
67
- default: _(() => [f(t.$slots, "trigger", {}, () => [f(t.$slots, "default")])]),
68
- _: 3
69
- }), s(m(y), null, {
70
- default: _(() => [s(m(v), l({
71
- side: c.side,
72
- align: c.align,
73
- "side-offset": c.sideOffset,
74
- "avoid-collisions": !0,
75
- class: D.value
76
- }, F.value), {
77
- default: _(() => [f(t.$slots, "content", {}, () => [o("span", C, p(c.content), 1)])]),
78
- _: 3
79
- }, 16, [
80
- "side",
81
- "align",
82
- "side-offset",
83
- "class"
84
- ])]),
85
- _: 3
86
- })]),
87
- _: 3
88
- }, 8, [
89
- "open",
90
- "open-delay",
91
- "close-delay"
92
- ]));
93
- }
94
- });
95
- //#endregion
96
- export { w as t };
@@ -1,30 +0,0 @@
1
- import { t as e } from "./cn-DJXf4yaB.js";
2
- import { createElementBlock as t, defineComponent as n, isRef as r, mergeProps as i, openBlock as a, unref as o, vModelDynamic as s, withDirectives as c } from "vue";
3
- import { useVModel as l } from "@vueuse/core";
4
- //#endregion
5
- //#region src/components/ui/input/Input.vue
6
- var u = /* @__PURE__ */ n({
7
- inheritAttrs: !1,
8
- __name: "Input",
9
- props: {
10
- defaultValue: {},
11
- modelValue: {},
12
- class: { type: [
13
- Boolean,
14
- null,
15
- String,
16
- Object,
17
- Array
18
- ] }
19
- },
20
- emits: ["update:modelValue"],
21
- setup(n, { emit: u }) {
22
- let d = n, f = l(d, "modelValue", u, {
23
- passive: !0,
24
- defaultValue: d.defaultValue
25
- });
26
- return (n, l) => c((a(), t("input", i({ "onUpdate:modelValue": l[0] ||= (e) => r(f) ? f.value = e : null }, n.$attrs, { class: o(e)("input-pill text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium", d.class) }), null, 16)), [[s, o(f)]]);
27
- }
28
- });
29
- //#endregion
30
- export { u as t };
@@ -1,126 +0,0 @@
1
- import { t as e } from "./cn-DJXf4yaB.js";
2
- import { t } from "./_plugin-vue_export-helper-C1je1s0u.js";
3
- import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, mergeProps as u, normalizeClass as d, normalizeStyle as f, openBlock as p, renderList as m, unref as h, withCtx as g } from "vue";
4
- import { ProgressIndicator as _, ProgressRoot as v } from "reka-ui";
5
- //#region src/components/ui/progress/Progress.vue?vue&type=script&setup=true&lang.ts
6
- var y = ["data-state", "data-index"], b = {
7
- key: 0,
8
- class: "progress-sectioned-sweep",
9
- "aria-hidden": "true"
10
- }, x = /* @__PURE__ */ t(/* @__PURE__ */ l({
11
- __name: "Progress",
12
- props: {
13
- modelValue: { default: 0 },
14
- max: {},
15
- getValueLabel: {},
16
- getValueText: {},
17
- asChild: { type: Boolean },
18
- as: {},
19
- class: { type: [
20
- Boolean,
21
- null,
22
- String,
23
- Object,
24
- Array
25
- ] },
26
- variant: { default: "default" },
27
- segments: { default: () => [] },
28
- currentSegmentKey: { default: null },
29
- activeProgress: { default: 0 },
30
- indeterminate: {
31
- type: Boolean,
32
- default: !1
33
- },
34
- disableCrescendo: {
35
- type: Boolean,
36
- default: !1
37
- }
38
- },
39
- setup(t) {
40
- let l = t, x = r(() => {
41
- let { class: e, variant: t, segments: n, currentSegmentKey: r, activeProgress: i, indeterminate: a, disableCrescendo: o, ...s } = l;
42
- return s;
43
- }), S = r(() => {
44
- if (l.variant === "sectioned" || l.indeterminate) return "idle";
45
- let e = l.modelValue ?? 0;
46
- return e <= 0 ? "idle" : e >= 100 ? "complete" : e < 5 ? "loading" : "progressing";
47
- }), C = r(() => {
48
- if (l.variant !== "gradient" || l.indeterminate) return;
49
- if (l.disableCrescendo) return { "--progress-crescendo": "0%" };
50
- let e = l.modelValue ?? 0;
51
- if (e < 85) return { "--progress-crescendo": "0%" };
52
- let t = (e - 85) / 15 * 100;
53
- return { "--progress-crescendo": `${Math.min(100, Math.max(0, t))}%` };
54
- }), w = r(() => l.variant === "sectioned" ? "relative h-[var(--progress-sectioned-height,0.875rem)] w-full overflow-hidden rounded-pill progress-sectioned-rail" : l.variant === "gradient" ? "relative h-4 w-full overflow-hidden rounded-pill bg-[var(--progress-track,theme(colors.secondary.DEFAULT))] progress-gradient-rail" : "relative h-4 w-full overflow-hidden rounded-pill bg-secondary"), T = r(() => l.variant === "sectioned" ? "absolute inset-0 pointer-events-none opacity-0" : l.variant === "gradient" ? "h-full w-full flex-1 rounded-pill [background:var(--progress-fill,theme(colors.primary.DEFAULT))] transition-transform" : "h-full w-full flex-1 rounded-pill bg-primary transition-transform"), E = r(() => {
55
- if (l.variant !== "sectioned" || l.segments.length === 0) return [];
56
- let e = l.segments.map((e) => e.weight ?? 1), t = e.reduce((e, t) => e + t, 0) || 1, n = l.segments.findIndex((e) => e.key === l.currentSegmentKey), r = 0;
57
- return l.segments.map((i, a) => {
58
- let o = e[a] / t * 100, s = r, c = r + o;
59
- r = c;
60
- let u;
61
- u = i.state ? i.state : n < 0 ? "pending" : a < n ? "completed" : a === n ? "active" : "pending";
62
- let d = u === "completed" ? 1 : u === "active" ? Math.max(0, Math.min(1, l.activeProgress)) : 0;
63
- return {
64
- ...i,
65
- startPct: s,
66
- endPct: c,
67
- widthPct: o,
68
- resolvedState: u,
69
- fill: d
70
- };
71
- });
72
- }), D = r(() => {
73
- if (l.variant !== "sectioned" || E.value.length === 0) return l.modelValue ?? 0;
74
- let e = 0;
75
- for (let t of E.value) e += t.fill * t.widthPct;
76
- return Math.max(0, Math.min(100, e));
77
- }), O = r(() => l.variant === "sectioned" ? D.value : l.modelValue ?? 0);
78
- return (r, D) => (p(), i(h(v), u(x.value, {
79
- "model-value": O.value,
80
- class: h(e)(w.value, l.class),
81
- "data-lifecycle": S.value,
82
- "data-indeterminate": t.indeterminate || void 0,
83
- "data-crescendo": t.disableCrescendo ? "disabled" : void 0
84
- }), {
85
- default: g(() => [c(h(_), {
86
- class: d(T.value),
87
- style: f(t.variant === "sectioned" ? void 0 : {
88
- transform: `translateX(-${100 - (l.modelValue ?? 0)}%)`,
89
- ...C.value ?? {}
90
- })
91
- }, null, 8, ["class", "style"]), t.variant === "sectioned" ? (p(), o(n, { key: 0 }, [(p(!0), o(n, null, m(E.value, (e, t) => (p(), o("div", {
92
- key: e.key,
93
- class: "progress-sectioned-cell",
94
- "data-state": e.resolvedState,
95
- "data-index": t,
96
- style: f({
97
- left: e.startPct + "%",
98
- width: e.widthPct + "%",
99
- "--cell-color": e.color,
100
- "--cell-fill": e.fill
101
- })
102
- }, [s("span", {
103
- class: "progress-sectioned-fill",
104
- style: f({ width: e.fill * 100 + "%" })
105
- }, null, 4), e.resolvedState === "active" ? (p(), o("span", b)) : a("", !0)], 12, y))), 128)), (p(!0), o(n, null, m(E.value, (e, t) => (p(), o(n, { key: `seam-${e.key}` }, [t < E.value.length - 1 ? (p(), o("span", {
106
- key: 0,
107
- class: "progress-sectioned-seam",
108
- style: f({
109
- left: e.endPct + "%",
110
- "--seam-from": e.color,
111
- "--seam-to": E.value[t + 1].color
112
- }),
113
- "aria-hidden": "true"
114
- }, null, 4)) : a("", !0)], 64))), 128))], 64)) : a("", !0)]),
115
- _: 1
116
- }, 16, [
117
- "model-value",
118
- "class",
119
- "data-lifecycle",
120
- "data-indeterminate",
121
- "data-crescendo"
122
- ]));
123
- }
124
- }), [["__scopeId", "data-v-ca211071"]]);
125
- //#endregion
126
- export { x as t };
@@ -1,37 +0,0 @@
1
- import { t as e } from "./cn-DJXf4yaB.js";
2
- import { t } from "./_plugin-vue_export-helper-C1je1s0u.js";
3
- import { Fragment as n, createElementBlock as r, defineComponent as i, normalizeClass as a, openBlock as o, renderList as s, toDisplayString as c, unref as l } from "vue";
4
- //#region src/components/custom/tabs/UnderlineTabs.vue?vue&type=script&setup=true&lang.ts
5
- var u = ["aria-selected", "onClick"], d = /* @__PURE__ */ t(/* @__PURE__ */ i({
6
- __name: "UnderlineTabs",
7
- props: {
8
- options: {},
9
- modelValue: {},
10
- class: { type: [
11
- Boolean,
12
- null,
13
- String,
14
- Object,
15
- Array
16
- ] }
17
- },
18
- emits: ["update:modelValue"],
19
- setup(t, { emit: i }) {
20
- let d = t, f = i;
21
- function p(e) {
22
- f("update:modelValue", e);
23
- }
24
- return (i, f) => (o(), r("div", {
25
- role: "tablist",
26
- class: a(l(e)("underline-tabs", d.class))
27
- }, [(o(!0), r(n, null, s(t.options, (e) => (o(), r("button", {
28
- key: e.value,
29
- class: "underline-tab",
30
- role: "tab",
31
- "aria-selected": t.modelValue === e.value ? "true" : "false",
32
- onClick: (t) => p(e.value)
33
- }, c(e.label), 9, u))), 128))], 2));
34
- }
35
- }), [["__scopeId", "data-v-93401bfa"]]);
36
- //#endregion
37
- export { d as t };
@@ -1 +0,0 @@
1
- export declare const FRAGMENT_SRC = "#version 300 es\nprecision highp float;\n\nin vec2 vUv;\nout vec4 fragColor;\n\n#define MAX_NUCLEI 6\n#define MAX_STOPS 8\n\n// \u2500\u2500 Uniforms \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nuniform float uTime;\n\n// Palette baked CPU-side to linear-sRGB\nuniform vec3 uPalette[MAX_STOPS];\nuniform int uStopCount;\n\n// Nuclei (parallel arrays)\nuniform int uNucleiCount;\nuniform vec2 uNucleiPos[MAX_NUCLEI];\nuniform float uNucleiRadius[MAX_NUCLEI];\nuniform float uNucleiPaletteBias[MAX_NUCLEI];\nuniform float uNucleiValueBias[MAX_NUCLEI];\nuniform float uNucleiDriftRadius[MAX_NUCLEI];\nuniform float uNucleiDriftPhase[MAX_NUCLEI];\n// Anisotropy: per-nucleus elongation (1.0 = isotropic) and major-axis angle (radians).\n// Defaults (1.0 / 0.0) reduce to the original circular Gaussian.\nuniform float uNucleiElong[MAX_NUCLEI];\nuniform float uNucleiAngle[MAX_NUCLEI];\nuniform float uSoftmaxBeta;\nuniform float uValueVariance;\n\n// Warp\nuniform float uWarpAmount;\nuniform float uWarpScale;\nuniform float uWarpDrift;\nuniform int uWarpMode; // 0=fbm 1=cellular 2=hybrid\nuniform int uNoiseOctaves;\n\n// Medium\n// 0 smooth, 1 pastel, 2 watercolor, 3 oil\nuniform int uMedium;\nuniform int uFlowPattern; // 0 none, 1 radial, 2 swirl, 3 diagonal, 4 multi\nuniform vec2 uFlowFocal;\nuniform float uFlowAngle;\nuniform float uFlowCurl;\nuniform vec2 uCursor; // in 0..1 screen space (matches pN)\nuniform float uCursorStrength; // 0..1 attraction amount\nuniform float uCursorRadius; // radius of influence (0.05..0.5)\nuniform float uStrokeAmount;\nuniform float uStrokeScale;\nuniform float uStrokeAnisotropy;\nuniform int uStrokeLayers; // 1 or 2 (crosshatch)\nuniform int uStrokeMode; // 0 oil (modern gestural), 1 palette-knife, 2 crayon/oil-pastel, 3 modern-chunky\nuniform float uWetEdge;\nuniform float uGranulation;\nuniform float uImpasto;\nuniform float uBrokenColor;\nuniform float uCanvasGrain;\n\n// Motion\nuniform float uNucleiDrift;\nuniform float uPaletteDrift;\nuniform float uBreathDepth;\nuniform float uBreathPeriod;\n\n// Output\nuniform float uSaturation;\nuniform float uPaperGrain;\nuniform float uAlpha;\n\n// \u2500\u2500 Time rate \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// The authoring coefficients (uNucleiDrift, uPaletteDrift, uWarpDrift) live in a\n// human-friendly 0..~0.05 band \u2014 that scale is what the config schema and every\n// demo preset are tuned against. But that band, multiplied straight into uTime\n// (seconds), yields rad/sec rates so small the field reads visually static (one\n// nuclei orbit took ~10 min at the old default). These K_* constants decouple\n// the AUTHORING scale from the RAD/SEC scale: each time term wraps its coefficient\n// in the matching K_, lifting the same authored value to a perceptible period\n// without touching any preset. Tuned so the field reads SLOWLY ALIVE \u2014 drift over\n// a ~5\u201315s window, never a frantic pan. These are downstream of uTime, which the\n// runtime FREEZES under reduced-motion (t = frozenOffset) before the shader sees\n// it, so the lift cannot leak motion into the reduced-motion path.\nconst float K_NUCLEI = 14.0; // nuclei orbit: ~one cycle per ~45s at default 0.01\nconst float K_PAL = 24.0; // palette hue breathe: ~one cycle per ~33s at default\nconst float K_WARP = 5.0; // domain warp scroll: a perceptible fbm-cell traverse\n\n// \u2500\u2500 Noise \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nfloat hash21(vec2 p) {\n p = fract(p * vec2(123.34, 456.21));\n p += dot(p, p + 45.32);\n return fract(p.x * p.y);\n}\n\nvec2 hash22(vec2 p) {\n p = vec2(dot(p, vec2(127.1, 311.7)),\n dot(p, vec2(269.5, 183.3)));\n return fract(sin(p) * 43758.5453);\n}\n\nfloat vnoise(vec2 p) {\n vec2 i = floor(p);\n vec2 f = fract(p);\n vec2 u = f * f * (3.0 - 2.0 * f);\n float a = hash21(i);\n float b = hash21(i + vec2(1.0, 0.0));\n float c = hash21(i + vec2(0.0, 1.0));\n float d = hash21(i + vec2(1.0, 1.0));\n return mix(mix(a, b, u.x), mix(c, d, u.x), u.y);\n}\n\nfloat fbm(vec2 p) {\n float v = 0.0;\n float a = 0.5;\n mat2 r = mat2(0.8, 0.6, -0.6, 0.8);\n for (int i = 0; i < 5; i++) {\n if (i >= uNoiseOctaves) break;\n v += a * vnoise(p);\n p = r * p * 2.02;\n a *= 0.5;\n }\n return v;\n}\n\n// Cellular / Worley f1\nfloat cellular(vec2 p) {\n vec2 i = floor(p);\n vec2 f = fract(p);\n float m = 1e9;\n for (int y = -1; y <= 1; y++) {\n for (int x = -1; x <= 1; x++) {\n vec2 g = vec2(float(x), float(y));\n vec2 o = hash22(i + g);\n vec2 r = g + o - f;\n m = min(m, dot(r, r));\n }\n }\n return sqrt(m);\n}\n\n// \u2500\u2500 Warp \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nvec2 domainWarp(vec2 p, float t) {\n // Quilez canonical double warp\n vec2 q = vec2(fbm(p * uWarpScale + vec2(0.0, 0.0) + t * uWarpDrift * K_WARP),\n fbm(p * uWarpScale + vec2(5.2, 1.3) + t * uWarpDrift * K_WARP));\n vec2 r = vec2(fbm(p * uWarpScale + 4.0 * q + vec2(1.7, 9.2)),\n fbm(p * uWarpScale + 4.0 * q + vec2(8.3, 2.8)));\n\n vec2 warp = r;\n if (uWarpMode == 1) {\n // cellular \u2014 chunky territories (MEADOW block-like)\n float c1 = cellular(p * uWarpScale * 1.5 + vec2(t * uWarpDrift * K_WARP * 2.0, 0.0));\n float c2 = cellular(p * uWarpScale * 1.5 + vec2(11.0, 7.0 + t * uWarpDrift * K_WARP * 2.0));\n warp = vec2(c1, c2);\n } else if (uWarpMode == 2) {\n // hybrid \u2014 fbm + cellular averaged\n float c1 = cellular(p * uWarpScale * 1.2);\n float c2 = cellular(p * uWarpScale * 1.2 + vec2(11.0, 7.0));\n warp = mix(r, vec2(c1, c2), 0.5);\n }\n vec2 warped = p + uWarpAmount * warp;\n\n // Cursor swirl \u2014 rotate p around uCursor with radial falloff.\n // This warps the underlying color field so the bands sweep around the pointer.\n if (uCursorStrength > 0.001) {\n vec2 toP = p - uCursor;\n float d = length(toP);\n float r = max(uCursorRadius, 0.01);\n // Smooth falloff; strong near cursor, zero beyond ~1.5\u00D7 radius.\n float w = exp(-(d * d) / (r * r * 0.45));\n // Max rotation ~120\u00B0 at cursor center, scaled by strength\n float ang = w * uCursorStrength * 2.1;\n float ca = cos(ang), sa = sin(ang);\n vec2 rotated = vec2(ca * toP.x - sa * toP.y, sa * toP.x + ca * toP.y) + uCursor;\n // Also pinch slightly toward the cursor (gravity) \u2014 adds depth to swirl\n float pinch = w * uCursorStrength * 0.08;\n rotated = mix(rotated, uCursor, pinch);\n // Blend original warped position with cursor-rotated version\n warped = mix(warped, rotated + uWarpAmount * warp * 0.7, w * uCursorStrength);\n }\n\n return warped;\n}\n\n// \u2500\u2500 Palette LUT \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nvec3 samplePalette(float id) {\n id = clamp(id, 0.0, 1.0);\n float scaled = id * float(uStopCount - 1);\n int i0 = int(floor(scaled));\n int i1 = min(i0 + 1, uStopCount - 1);\n float t = fract(scaled);\n t = smoothstep(0.0, 1.0, t);\n return mix(uPalette[i0], uPalette[i1], t);\n}\n\n// \u2500\u2500 Nuclei field \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nvoid nucleiField(vec2 p, float t, out float paletteId, out float valueMod) {\n float accumBias = 0.0;\n float accumValue = 0.0;\n float accumW = 0.0;\n for (int i = 0; i < MAX_NUCLEI; i++) {\n if (i >= uNucleiCount) break;\n vec2 posI = uNucleiPos[i]\n + uNucleiDriftRadius[i] * vec2(\n cos(t * uNucleiDrift * K_NUCLEI + uNucleiDriftPhase[i]),\n sin(t * uNucleiDrift * K_NUCLEI + uNucleiDriftPhase[i] * 1.13)\n );\n vec2 diff = p - posI;\n // Anisotropic Gaussian: rotate diff into the nucleus's local frame\n // (major axis along uNucleiAngle), then scale the major-axis component by\n // 1/elongation so the squared distance describes an ellipse. Defaults\n // 1.0/0.0 reduce to the isotropic dot(diff, diff).\n float ca = cos(uNucleiAngle[i]);\n float sa = sin(uNucleiAngle[i]);\n vec2 local = vec2( ca * diff.x + sa * diff.y,\n -sa * diff.x + ca * diff.y);\n float along = local.x / max(uNucleiElong[i], 0.01);\n float across = local.y;\n float d2 = along * along + across * across;\n float r = max(uNucleiRadius[i], 0.01);\n float w = exp(-uSoftmaxBeta * d2 / (r * r));\n accumBias += w * uNucleiPaletteBias[i];\n accumValue += w * uNucleiValueBias[i];\n accumW += w;\n }\n paletteId = accumBias / max(accumW, 1e-4);\n valueMod = accumValue / max(accumW, 1e-4);\n\n // Palette drift \u2014 slow global paletteId breathe between adjacent stops. The\n // rate rides K_PAL (perceptible ~30\u201360s hue cycle at the default coefficient);\n // the amplitude lifts the authored coefficient into a 0.03..0.06 paletteId band\n // so the palette visibly travels rather than dithering within one stop.\n float palAmp = clamp(uPaletteDrift * 6.0, 0.0, 0.06);\n paletteId += palAmp * sin(t * uPaletteDrift * K_PAL);\n paletteId = clamp(paletteId, 0.0, 1.0);\n}\n\n// \u2500\u2500 Flow field \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nvec2 flowField(vec2 p, float t) {\n vec2 dir = vec2(1.0, 0.0);\n if (uFlowPattern == 1) {\n // radial\n dir = normalize(p - uFlowFocal + 1e-4);\n } else if (uFlowPattern == 2) {\n // swirl \u2014 tangent to radial\n vec2 rad = normalize(p - uFlowFocal + 1e-4);\n dir = vec2(-rad.y, rad.x);\n } else if (uFlowPattern == 3) {\n // diagonal\n float a = radians(uFlowAngle);\n dir = vec2(cos(a), sin(a));\n } else if (uFlowPattern == 4) {\n // multi \u2014 curl-noise driven\n float n = fbm(p * 2.0 + t * 0.02);\n float a = n * 6.2831;\n dir = vec2(cos(a), sin(a));\n }\n // curl \u2014 perturb by noise. Radial gets much less curl so rays stay clean.\n if (uFlowCurl > 0.0) {\n float n = fbm(p * 3.0) - 0.5;\n float curlAmt = uFlowCurl;\n if (uFlowPattern == 1) curlAmt *= 0.25; // radial: preserve ray clarity\n if (uFlowPattern == 2) curlAmt *= 0.55; // swirl: allow moderate curl\n float a = atan(dir.y, dir.x) + n * 3.14159 * curlAmt;\n dir = vec2(cos(a), sin(a));\n }\n // cursor influence \u2014 swirl around the cursor position\n if (uCursorStrength > 0.001) {\n vec2 toCur = uCursor - p;\n float d = length(toCur);\n float r = max(uCursorRadius, 0.01);\n float w = exp(-(d * d) / (r * r * 0.5));\n // swirl tangent\n vec2 tangent = vec2(-toCur.y, toCur.x) / max(d, 1e-4);\n float a0 = atan(dir.y, dir.x);\n float a1 = atan(tangent.y, tangent.x);\n // blend angle\n float da = a1 - a0;\n da = atan(sin(da), cos(da)); // wrap to [-pi, pi]\n float a = a0 + da * w * uCursorStrength;\n dir = vec2(cos(a), sin(a));\n }\n return dir;\n}\n\n// \u2500\u2500 Color utils \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst vec3 W_LUMA = vec3(0.2126, 0.7152, 0.0722);\n\nvec3 hueShift(vec3 c, float degrees) {\n float a = radians(degrees);\n float co = cos(a), si = sin(a);\n mat3 m = mat3(\n 0.299 + 0.701 * co + 0.168 * si,\n 0.587 - 0.587 * co + 0.330 * si,\n 0.114 - 0.114 * co - 0.497 * si,\n\n 0.299 - 0.299 * co - 0.328 * si,\n 0.587 + 0.413 * co + 0.035 * si,\n 0.114 - 0.114 * co + 0.292 * si,\n\n 0.299 - 0.300 * co + 1.250 * si,\n 0.587 - 0.588 * co - 1.050 * si,\n 0.114 + 0.886 * co - 0.203 * si\n );\n return m * c;\n}\n\nvec3 brokenColorJitter(vec3 c, float hueSeed, float valueSeed, float strength) {\n float amt = clamp(uBrokenColor * strength, 0.0, 1.0);\n if (amt <= 0.001) return c;\n float hueDeg = (hueSeed - 0.5) * 32.0 * amt;\n float valueMul = 1.0 + (valueSeed - 0.5) * 0.28 * amt;\n return max(hueShift(c, hueDeg) * valueMul, vec3(0.0));\n}\n\nvec3 saturate3(vec3 c, float amt) {\n float l = dot(c, W_LUMA);\n return mix(vec3(l), c, amt);\n}\n\n// ACES approximation\nvec3 aces(vec3 x) {\n float a = 2.51;\n float b = 0.03;\n float c = 2.43;\n float d = 0.59;\n float e = 0.14;\n return clamp((x * (a * x + b)) / (x * (c * x + d) + e), 0.0, 1.0);\n}\n\n// \u2500\u2500 Medium overlays \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n// A quick re-computation of base color for edge-mask sampling\nvec3 sampleBase(vec2 p, float t) {\n vec2 pw = domainWarp(p, t);\n float id; float vm;\n nucleiField(pw, t, id, vm);\n vec3 c = samplePalette(id);\n c *= 1.0 + uValueVariance * vm;\n return c;\n}\n\nvec3 mediumWatercolor(vec3 col, vec2 p, float t) {\n // Wet-edge cauliflowers via luma-gradient magnitude\n float eps = 0.004;\n vec3 cx1 = sampleBase(p + vec2(eps, 0.0), t);\n vec3 cx2 = sampleBase(p - vec2(eps, 0.0), t);\n vec3 cy1 = sampleBase(p + vec2(0.0, eps), t);\n vec3 cy2 = sampleBase(p - vec2(0.0, eps), t);\n float gx = dot(cx1 - cx2, W_LUMA);\n float gy = dot(cy1 - cy2, W_LUMA);\n float edge = sqrt(gx * gx + gy * gy) / (2.0 * eps);\n float mask = smoothstep(0.0, 2.5, edge);\n col *= mix(1.0, 0.78, mask * uWetEdge);\n\n // Granulation \u2014 pigment settles in paper tooth\n float paper = 0.5 * vnoise(p * 160.0) + 0.5 * vnoise(p * 360.0);\n float pigLoad = 1.0 - dot(col, W_LUMA);\n col *= 1.0 - uGranulation * pigLoad * (paper - 0.5);\n\n // Wash banding \u2014 faint horizontal wet gradient\n float band = fbm(vec2(p.x * 1.5, p.y * 0.4));\n col *= 1.0 + 0.04 * (band - 0.5);\n return col;\n}\n\nvec3 mediumPastel(vec3 col, vec2 p, float t) {\n vec2 flow = flowField(p, t);\n vec2 perp = vec2(-flow.y, flow.x);\n float along = dot(p, flow) * uStrokeScale;\n float across = dot(p, perp) * uStrokeScale;\n across += 0.03 * (vnoise(p * 260.0) - 0.5);\n\n float aniso = mix(1.0, 0.18, uStrokeAnisotropy);\n float stroke = fbm(vec2(along * aniso, across));\n col *= mix(1.0, 0.82 + 0.32 * stroke, uStrokeAmount);\n\n // Pastel tooth \u2014 tiny high-frequency grain\n float tooth = vnoise(p * 800.0);\n col *= 1.0 - 0.08 * uStrokeAmount * (tooth - 0.5);\n return col;\n}\n\n// \u2500\u2500 Curved swept brushstroke primitive \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// A stroke is a curved spine from A to B with quadratic bulge K (sideways offset\n// at midpoint). Width varies along length via a shape profile. Edge is ragged\n// (bristle-modulated), ends are rounded blobs, inside has streak modulation.\n//\n// For pixel p, we invert an approximate projection onto the curved spine:\n// 1) project p onto straight AB axis -> along0, cross0\n// 2) at parameter along0, spine offset = 4\u00B7K\u00B7along0\u00B7(1-along0) perpendicular\n// 3) cross = cross0 - spineOffset, refine along one iteration\n// Coverage blends paint atop col based on per-stroke color sampled from the\n// underlying base at spine midpoint \u2014 so overlapping strokes from different\n// palette regions meet at hard, ragged demarcations.\n\nstruct StrokeHit {\n float coverage; // 0..1\n vec3 color;\n float alongT; // 0..1 along spine, for internal modulation\n float crossN; // cross distance / current half-width, signed\n float edgeN; // distance to edge in half-widths (0 = at edge, 1 = at spine)\n};\n\nStrokeHit noHit() { return StrokeHit(0.0, vec3(0.0), 0.0, 0.0, 0.0); }\n\nvec2 rotateDir(vec2 dir, float angle) {\n float ca = cos(angle), sa = sin(angle);\n return vec2(dir.x * ca - dir.y * sa, dir.x * sa + dir.y * ca);\n}\n\nvec2 safeDir(vec2 dir) {\n float len = length(dir);\n return len > 1e-4 ? dir / len : vec2(1.0, 0.0);\n}\n\n// Shape profile along the stroke. type:\n// 0 tapered \u2014 thin-fat-thin (classic brush)\n// 1 load-drag \u2014 fat start, tapers to a point\n// 2 dab \u2014 ellipse-like, round center\n// 3 even \u2014 near-constant, slight end taper\nfloat strokeShape(float t, int type) {\n t = clamp(t, 0.0, 1.0);\n if (type == 1) {\n // loaded at t=0, tapering\n return pow(1.0 - t, 0.55) * smoothstep(0.0, 0.08, t);\n } else if (type == 2) {\n // dab / blob\n float d = t - 0.5;\n return exp(-d * d * 12.0);\n } else if (type == 3) {\n // mostly even, slight end softening\n return smoothstep(0.0, 0.08, t) * smoothstep(1.0, 0.92, t) * 0.95 + 0.05;\n }\n // 0 tapered\n return smoothstep(0.0, 0.22, t) * smoothstep(1.0, 0.78, t);\n}\n\n// A single curved stroke.\n// a, b \u2014 endpoints\n// halfW \u2014 base half-width (world units)\n// bulge \u2014 signed perpendicular midpoint offset, in world units\n// shapeType \u2014 0..3\n// bristleFreq \u2014 spatial frequency of edge raggedness\n// bristleAmp \u2014 0..0.5 fraction of halfW chewed away at edge extrema\n// streakSeed \u2014 uniqueness seed for internal streaks\n// colAtMid \u2014 pre-sampled color at midpoint\nStrokeHit curvedStroke(vec2 p, vec2 a, vec2 b, float halfW,\n float bulge, int shapeType,\n float bristleFreq, float bristleAmp,\n float streakSeed, vec3 colAtMid) {\n vec2 ab = b - a;\n float L = length(ab);\n if (L < 1e-5) return noHit();\n vec2 tang = ab / L;\n vec2 norm = vec2(-tang.y, tang.x);\n\n vec2 rel = p - a;\n float along0 = dot(rel, tang) / L; // straight projection 0..1 along AB\n float cross0 = dot(rel, norm); // signed cross\n\n // Spine sideways offset due to bulge (parabolic)\n float bend = 4.0 * bulge * along0 * (1.0 - along0);\n float cross1 = cross0 - bend;\n\n // One refinement step: as the spine bends, the closest-point along shifts.\n // Spine tangent differs from straight tangent; first-order correction:\n float dBend = 4.0 * bulge * (1.0 - 2.0 * along0); // d(bend)/d(along)\n float along1 = along0 + (cross1 * dBend) / (L * (1.0 + dBend * dBend / (L * L)));\n\n // Bristle-ragged edge: half-width gets chewed by 1D noise along the spine\n float edgeNoise = fbm(vec2(along1 * bristleFreq, streakSeed * 7.3)) - 0.5;\n float edgeNoise2 = fbm(vec2(along1 * bristleFreq * 2.3, streakSeed * 3.1 + 17.0)) - 0.5;\n float edgeMod = 1.0 - bristleAmp * (0.6 + 0.4 * edgeNoise) * (0.5 + edgeNoise2);\n\n // Width profile along the stroke\n float shape = strokeShape(along1, shapeType);\n float halfWNow = halfW * shape * edgeMod;\n\n // Inside-segment coverage\n float cov = 0.0;\n if (along1 >= 0.0 && along1 <= 1.0 && halfWNow > 1e-6) {\n float cn = abs(cross1) / halfWNow;\n // razor-hard edge with tiny aa\n cov = 1.0 - smoothstep(0.88, 1.02, cn);\n }\n\n // End-cap blobs (rounded tips, not perpendicular cuts)\n float capA = 0.0, capB = 0.0;\n {\n vec2 capCenterA = a + norm * (bulge * 0.0); // at a\n vec2 capCenterB = a + tang * L + norm * bend * 0.0 + norm * 0.0; // at b; bend is 0 at endpoints\n capCenterB = b;\n float endShapeA = strokeShape(0.02, shapeType);\n float endShapeB = strokeShape(0.98, shapeType);\n float rA = halfW * endShapeA * (0.9 + 0.2 * fbm(vec2(streakSeed * 13.0)));\n float rB = halfW * endShapeB * (0.9 + 0.2 * fbm(vec2(streakSeed * 19.0 + 5.0)));\n float dA = length(p - capCenterA);\n float dB = length(p - capCenterB);\n capA = 1.0 - smoothstep(rA * 0.85, rA * 1.05, dA);\n capB = 1.0 - smoothstep(rB * 0.85, rB * 1.05, dB);\n // Only apply caps if we're BEYOND the segment; otherwise the segment wins.\n capA *= (along1 < 0.05) ? 1.0 : 0.0;\n capB *= (along1 > 0.95) ? 1.0 : 0.0;\n }\n\n float coverage = max(cov, max(capA, capB));\n if (coverage < 0.002) return noHit();\n\n // Edge distance (for impasto later): 0 at edge, 1 at spine\n float edgeDist = halfWNow > 1e-6 ? clamp(1.0 - abs(cross1) / halfWNow, 0.0, 1.0) : 0.0;\n\n return StrokeHit(\n coverage,\n colAtMid,\n clamp(along1, 0.0, 1.0),\n halfWNow > 1e-6 ? cross1 / halfWNow : 0.0,\n edgeDist\n );\n}\n\n// Composite stroke over col with internal streaking + impasto edge highlight.\n// streakAmp \u2014 0..0.2 how much internal streaks darken/lighten\n// impastoAmp \u2014 0..1 edge catch-light strength\n// hardness \u2014 0..1 how crisp the compositing transition is (1 = razor, 0 = creamy)\nvoid paintOver(inout vec3 col, StrokeHit s, float streakFreq, float streakAmp,\n float impastoAmp, float hardness, float streakSeed) {\n if (s.coverage < 0.002) return;\n float strokeOpacity = clamp(uStrokeAmount, 0.0, 1.0);\n if (strokeOpacity <= 0.001) return;\n vec3 c = s.color;\n\n // Internal streaks \u2014 fbm along spine, modulated by cross position. Gives\n // the loaded-brush look: some bristles carry more pigment than others.\n float streakA = fbm(vec2(s.alongT * streakFreq, s.crossN * 2.7 + streakSeed));\n float streakB = fbm(vec2(s.alongT * streakFreq * 0.6 + streakSeed * 3.7, s.crossN * 4.1));\n float streak = 0.6 * (streakA - 0.5) + 0.4 * (streakB - 0.5);\n c *= 1.0 + streak * streakAmp * 2.0;\n\n // Subtle value variance across width (hollow-center catch-light)\n float crossShade = smoothstep(0.0, 0.4, s.edgeN) * (1.0 - smoothstep(0.65, 1.0, s.edgeN));\n c *= 1.0 + crossShade * 0.05;\n\n // Impasto edge highlight \u2014 bright rim on one side of the stroke\n float rim = smoothstep(0.85, 1.0, 1.0 - s.edgeN) * step(0.0, s.crossN);\n c += impastoAmp * rim * vec3(0.18, 0.15, 0.11);\n // Shadow on the other side (darker, cooler)\n float shadow = smoothstep(0.85, 1.0, 1.0 - s.edgeN) * step(0.0, -s.crossN);\n c -= impastoAmp * shadow * 0.25 * vec3(0.10, 0.09, 0.07);\n\n float softLimit = mix(0.35, 0.98, hardness);\n float alpha = smoothstep(0.0, 1.0 - softLimit, s.coverage) * strokeOpacity;\n col = mix(col, c, alpha);\n}\n\n// Best-of-9-neighbor placement: sample 3x3 surrounding cells and take the\n// stroke that covers this pixel most. Breaks the grid by per-cell jitter and\n// sparse density via noise thresholding.\nStrokeHit bestOil(vec2 p, float cellSize, float lenMul, float halfWMul,\n float jitterAmt, float density, int shapeType,\n float bristleAmp, vec2 flow, float t, float seed) {\n vec2 cell = floor(p / cellSize);\n\n StrokeHit best = noHit();\n // 3x3 neighborhood\n for (int dy = -1; dy <= 1; dy++) {\n for (int dx = -1; dx <= 1; dx++) {\n vec2 cc = cell + vec2(float(dx), float(dy));\n vec2 hh = hash22(cc + seed) - 0.5;\n // Density gate \u2014 noise threshold; sparse placement.\n float gate = hash21(cc * 1.7 + seed * 0.3);\n if (gate > density) continue;\n\n vec2 center = (cc + 0.5 + hh * jitterAmt) * cellSize;\n\n // Per-stroke direction: consume the layer-provided flow, then add only\n // deterministic local perturbation so alternate stroke layers stay live.\n vec2 f = safeDir(flow);\n float angJ = (hash21(cc + seed + 11.0) - 0.5) * 0.9; // +/- 0.45 rad\n float localCurl = (fbm(center * (2.6 + seed * 0.11) + seed * 1.9) - 0.5) * 0.55 * uFlowCurl;\n vec2 dir = rotateDir(f, angJ + localCurl);\n\n float lenV = cellSize * lenMul * (0.65 + 0.55 * hash21(cc + seed + 23.0));\n float halfW = cellSize * halfWMul * (0.70 + 0.55 * hash21(cc + seed + 41.0));\n float bulge = (hash21(cc + seed + 53.0) - 0.5) * lenV * 0.35;\n\n vec2 a = center - dir * (lenV * 0.5);\n vec2 b = center + dir * (lenV * 0.5);\n\n vec3 colMid = brokenColorJitter(\n sampleBase(center, t),\n hash21(cc + seed + 89.0),\n hash21(cc * 2.3 + seed + 97.0),\n 1.0\n );\n\n StrokeHit h = curvedStroke(p, a, b, halfW, bulge, shapeType,\n 7.0, bristleAmp,\n hash21(cc + seed + 67.0), colMid);\n if (h.coverage > best.coverage) best = h;\n }\n }\n return best;\n}\n\n// \u2500\u2500 Crayon / oil-pastel \u2014 paper tooth \u00D7 wax pigment \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Crayon is not strokes. It's pigment crumbs dragged across paper tooth.\n// Model: heavy 2D tooth noise at multiple scales, anisotropically stretched\n// along flow direction, multiplied into the base color. Add a slow \"waxy\n// film\" that slightly unifies hues, and occasional darker \"pressed\" spots\n// where the crayon dug in. NO straight segments.\nvec3 mediumOil_crayon(vec3 col, vec2 p, float t) {\n vec2 flow = flowField(p, t);\n float ang = atan(flow.y, flow.x);\n float ca = cos(-ang), sa = sin(-ang);\n vec2 pr = vec2(p.x * ca - p.y * sa, p.x * sa + p.y * ca);\n\n // Anisotropic tooth \u2014 squished along flow, coarse cross flow.\n float aniso = mix(0.45, 0.95, uStrokeAnisotropy);\n float scale = max(uStrokeScale * 1.6, 180.0);\n\n float t1 = vnoise(vec2(pr.x * scale * aniso, pr.y * scale));\n float t2 = vnoise(vec2(pr.x * scale * aniso * 0.4, pr.y * scale * 0.4) + 11.0);\n float t3 = vnoise(vec2(pr.x * scale * aniso * 2.1, pr.y * scale * 2.1) + 23.0);\n float tooth = 0.55 * t1 + 0.30 * t2 + 0.15 * t3;\n // Center at 0, amplify\n tooth = (tooth - 0.5) * 1.4;\n\n // Multiplicative darkening where tooth is low (pigment skipped paper valleys)\n float lay = 1.0 + tooth * 0.32 * uStrokeAmount;\n vec3 result = col * lay;\n\n // Occasional pressed-in crumbs \u2014 rare darker crumbs\n float crumbs = smoothstep(0.78, 0.95, vnoise(pr * scale * 3.0));\n result *= 1.0 - crumbs * 0.18 * uStrokeAmount;\n\n // Waxy highlight film \u2014 slight lightening on tooth peaks\n float waxy = smoothstep(0.55, 0.85, t1);\n result += waxy * 0.04 * vec3(1.0);\n\n // Paper tooth overlay (subtler than oil's canvas)\n float paperTooth = vnoise(p * 340.0) - 0.5;\n result *= 1.0 + paperTooth * 0.14 * uCanvasGrain;\n\n // Broken-color pigment: stable wax/pigment patches, not temporal flicker.\n vec2 pigmentCell = floor(pr * max(scale * 0.18, 32.0));\n float pigmentMask = smoothstep(0.28, 0.82, vnoise(pr * scale * 0.21 + 19.0));\n result = brokenColorJitter(\n result,\n hash21(pigmentCell + 17.0),\n hash21(pigmentCell * 2.1 + 31.0),\n 0.45 + 0.55 * pigmentMask\n );\n\n // Crayon is saturation-amplified\n result = saturate3(result, 1.12);\n\n return result;\n}\n\nvec3 mediumOil(vec3 col, vec2 p, float t) {\n // Mode knobs (uStrokeMode):\n // 0 oil \u2014 balanced modern-abstract/palette-knife hybrid\n // 1 knife \u2014 palette-knife impasto: razor edges, heavy bristle/shadow\n // 2 crayon \u2014 soft-edged wax smudges on tooth (no straight segments)\n // 3 brushwork \u2014 thick bristle brush\n int mode = uStrokeMode;\n\n // Per-mode parameters\n int shapeType = 0; // tapered\n float bristleAmp = 0.25; // 0..0.5\n float streakFreq = 9.0;\n float streakAmp = 0.09;\n float impastoAmp = 0.9;\n float hardness = 0.80; // edge compositing\n float toothScale = 240.0;\n float toothAmp = 0.09;\n float pigmentSat = 1.03;\n float densityBig = 0.65;\n float densityMed = 0.78;\n float densitySml = 0.90;\n\n if (mode == 1) { // palette knife\n shapeType = 3; // flat, even\n bristleAmp = 0.12;\n streakFreq = 4.0; streakAmp = 0.05;\n impastoAmp = 1.6;\n hardness = 0.95;\n toothAmp = 0.04;\n densityBig = 0.80; densityMed = 0.88; densitySml = 0.70;\n } else if (mode == 2) { // crayon \u2014 handled specially below\n return mediumOil_crayon(col, p, t);\n } else if (mode == 3) { // thick brushwork\n shapeType = 0; // tapered\n bristleAmp = 0.32;\n streakFreq = 14.0; streakAmp = 0.14;\n impastoAmp = 1.2;\n hardness = 0.85;\n toothAmp = 0.07;\n }\n\n // Scales & multipliers from uniforms\n float baseScale = max(uStrokeScale * 0.006, 0.008);\n // Three layers: big gestural, medium body, small dabs\n float sBig = baseScale * 2.4;\n float sMed = baseScale * 1.1;\n float sSml = baseScale * 0.45;\n\n float lenMulBig = mix(2.2, 3.8, uStrokeAnisotropy);\n float widMulBig = mix(0.55, 0.32, uStrokeAnisotropy);\n float lenMulMed = mix(2.0, 3.4, uStrokeAnisotropy);\n float widMulMed = mix(0.50, 0.30, uStrokeAnisotropy);\n float lenMulSml = mix(1.6, 2.6, uStrokeAnisotropy);\n float widMulSml = mix(0.45, 0.32, uStrokeAnisotropy);\n\n float jitterAmt = 0.75; // large jitter \u2014 no grid\n vec2 flow = flowField(p, t);\n\n vec3 result = col;\n\n // Layer 1 \u2014 big gestural strokes (sparse, shaping)\n StrokeHit hBig = bestOil(p, sBig, lenMulBig, widMulBig, jitterAmt * 0.55,\n densityBig, shapeType, bristleAmp, flow, t, 1.3);\n paintOver(result, hBig, streakFreq * 0.7, streakAmp,\n uImpasto * impastoAmp * uStrokeAmount, hardness, 1.3);\n\n // Layer 2 \u2014 medium body strokes\n StrokeHit hMed = bestOil(p + vec2(11.3, 3.7), sMed, lenMulMed, widMulMed,\n jitterAmt, densityMed, shapeType, bristleAmp, flow, t, 2.7);\n paintOver(result, hMed, streakFreq, streakAmp,\n uImpasto * impastoAmp * uStrokeAmount, hardness, 2.7);\n\n // Layer 3 \u2014 small dabs (more frequent, smaller)\n int smlShape = (mode == 1) ? 2 : shapeType; // knife uses dabs for sparkle\n StrokeHit hSml = bestOil(p + vec2(-5.1, 8.4), sSml, lenMulSml, widMulSml,\n jitterAmt * 1.3, densitySml, smlShape,\n bristleAmp * 0.85, flow, t, 4.1);\n paintOver(result, hSml, streakFreq * 1.4, streakAmp * 0.8,\n uImpasto * impastoAmp * 0.65 * uStrokeAmount, hardness, 4.1);\n\n // Layer 4 \u2014 fill dabs (very dense, very small) \u2014 covers bald spots\n float sFill = baseScale * 0.22;\n float lenMulFill = mix(1.4, 2.0, uStrokeAnisotropy);\n float widMulFill = mix(0.50, 0.38, uStrokeAnisotropy);\n int fillShape = (mode == 1) ? 3 : 2; // knife=even, others=dab (round fills)\n StrokeHit hFill = bestOil(p + vec2(3.9, -6.2), sFill, lenMulFill, widMulFill,\n jitterAmt * 1.5, 0.95, fillShape,\n bristleAmp * 0.6, flow, t, 8.9);\n paintOver(result, hFill, streakFreq * 1.8, streakAmp * 0.6,\n uImpasto * impastoAmp * 0.4 * uStrokeAmount, hardness * 0.9, 8.9);\n\n // Optional crosshatch layer\n if (uStrokeLayers == 2) {\n vec2 flow2 = vec2(-flow.y, flow.x);\n StrokeHit hX = bestOil(p + vec2(7.3, -2.1), sMed, lenMulMed * 0.9, widMulMed,\n jitterAmt, densityMed * 0.7, shapeType, bristleAmp, flow2, t, 6.5);\n paintOver(result, hX, streakFreq, streakAmp * 0.85,\n uImpasto * impastoAmp * 0.55 * uStrokeAmount, hardness, 6.5);\n }\n\n // Canvas tooth \u2014 linen weave\n float tooth1 = vnoise(p * toothScale);\n float tooth2 = vnoise(p * toothScale * vec2(0.6, 2.4) + 37.0);\n float tooth = (0.6 * tooth1 + 0.4 * tooth2) - 0.5;\n result *= 1.0 + tooth * toothAmp * uCanvasGrain;\n\n // Pigment saturation boost\n result = saturate3(result, pigmentSat);\n\n return result;\n}\n\n// \u2500\u2500 Main \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nvoid main() {\n // Normalized 0..1 coordinates for nuclei, domain warp, and medium sampling.\n vec2 uv = vUv;\n vec2 pN = uv;\n\n float t = uTime;\n\n // Warp in pN space\n vec2 p_warp = domainWarp(pN, t);\n\n // Composition\n float paletteId; float valueMod;\n nucleiField(p_warp, t, paletteId, valueMod);\n vec3 col = samplePalette(paletteId);\n col *= 1.0 + uValueVariance * valueMod;\n\n // Breath \u2014 slow global luminance wobble\n float breath = sin(t * 6.2831 / max(uBreathPeriod, 1.0));\n col *= 1.0 + uBreathDepth * breath * 0.5;\n\n // Medium\n if (uMedium == 1) col = mediumPastel(col, pN, t);\n else if (uMedium == 2) col = mediumWatercolor(col, pN, t);\n else if (uMedium == 3) col = mediumOil(col, pN, t);\n\n // Saturation trim\n col = saturate3(col, uSaturation);\n\n // Tonemap + film grain\n col = aces(col);\n float grain = hash21(gl_FragCoord.xy + t * 17.0);\n col += (grain - 0.5) * uPaperGrain;\n\n col = clamp(col * 0.985 + 0.008, 0.0, 1.0);\n fragColor = vec4(col * uAlpha, uAlpha);\n}\n";
@@ -1,38 +0,0 @@
1
- import { type Ref } from "vue";
2
- export interface UseBreakpointControls {
3
- /** Live `matches` state for the given media query. */
4
- readonly matches: Readonly<Ref<boolean>>;
5
- /** Tear down the `matchMedia` listener. Auto-called on scope dispose. */
6
- stop: () => void;
7
- }
8
- /**
9
- * `useBreakpoint(query)` — a reactive read of a CSS media query's `matches`
10
- * state, kept live across resize / orientation / display-mode changes.
11
- *
12
- * Wraps `window.matchMedia(query)`, subscribes a single `change` handler,
13
- * and mirrors `mql.matches` into a `Ref<boolean>`. Auto-cleans on Vue scope
14
- * disposal (mirrors `useResizeObserver` / `useInterval` upstream); outside
15
- * a scope callers use the returned `stop()` control.
16
- *
17
- * SSR-safe: when `window` is undefined the composable returns a
18
- * permanently-`false` ref. Consumers should treat the initial frame as
19
- * "mobile-first / narrow-default" because the matchMedia subscription only
20
- * mounts client-side. This is the same shape consumers wrote by hand at the
21
- * speedtest origin sites.
22
- *
23
- * Why this exists (speedtest origin, glass-ui promotion W6-β): the survey
24
- * cockpit (`SurveyWizard.vue`) and the admin data-source toggle
25
- * (`AdminDataSourceToggle.vue`) both hand-rolled the same `matchMedia`
26
- * subscribe-on-mount + tear-down-on-unmount pattern. Two hand-rolls of one
27
- * pattern is the `feedback_generic_components` 2-consumer trigger;
28
- * absorbed publisher-side per `feedback_library_gaps`.
29
- *
30
- * Usage:
31
- * const { matches: isDesktop } = useBreakpoint("(min-width: 720px)");
32
- * const wide = isDesktop.value; // live across resize.
33
- *
34
- * @param query A CSS `@media` query string, e.g. `"(min-width: 720px)"`.
35
- * @returns Object with `matches: Ref<boolean>` and `stop()` for manual
36
- * disposal outside a Vue scope.
37
- */
38
- export declare function useBreakpoint(query: string): UseBreakpointControls;
@@ -1,63 +0,0 @@
1
- import { type Ref } from "vue";
2
- export interface UseIdleReadyOptions {
3
- /**
4
- * `requestIdleCallback` timeout, in ms. Default 2_000 — the canonical
5
- * value at every speedtest hand-rolled site (App.vue + useIPInfo both
6
- * pass `{ timeout: 2000 }`). Unlike useViewportReady's 10s (which fronts
7
- * the budget with an IO gate), useIdleReady has no visibility stage, so
8
- * the timeout is the only ceiling — 2s matches the consumer sites and
9
- * keeps the deferred work inside a reasonable post-paint window.
10
- */
11
- timeout?: number;
12
- /**
13
- * Optional task run the moment the gate flips (the scope-aware variant —
14
- * useIPInfo's `() => void refresh()`). Runs exactly once; auto-cancelled
15
- * on scope dispose with the rIC handle so a short-lived consumer cannot
16
- * leak a deferred write to disposed refs. Consumers that only need the
17
- * `ready` ref omit it.
18
- */
19
- onReady?: () => void;
20
- }
21
- export interface UseIdleReadyControls {
22
- /** Flips `false → true` exactly once on the first idle tick (post-mount). */
23
- readonly ready: Ref<boolean>;
24
- /** Tear down the pending idle/timer handle. Auto-called on scope dispose. */
25
- stop: () => void;
26
- }
27
- /**
28
- * `useIdleReady(options?)` — `requestIdleCallback` (+ `setTimeout(0)` Safari
29
- * fallback) post-mount idle gate that flips a `Ref<boolean>` exactly once on
30
- * the first idle tick, and optionally runs an `onReady` task at that moment.
31
- *
32
- * The rIC-only sibling of `useViewportReady` — same one-shot `ready` ref +
33
- * `stop()` shape, same auto-dispose discipline — minus the
34
- * `IntersectionObserver` visibility stage. The gate is "idle, full stop", not
35
- * "visible AND idle"; reach for it when there is no element to gate on (a
36
- * top-level lazy mount, a composable's first-idle data fetch).
37
- *
38
- * Two unified use shapes:
39
- *
40
- * 1. `ready`-flag — `v-if`-gate a heavy mount on the returned ref:
41
- * const { ready } = useIdleReady();
42
- * // <Aurora v-if="ready" />
43
- * 2. scope-aware task — run a callback on first idle, cancelled on dispose:
44
- * useIdleReady({ onReady: () => void refresh() });
45
- * The handle is auto-cancelled on Vue scope disposal so a short-lived
46
- * consumer cannot leak a deferred write to disposed refs.
47
- *
48
- * The composable schedules synchronously at call time (NOT inside an
49
- * `onMounted`) so it works outside a component too (e.g. inside `useIPInfo`,
50
- * a composable not a component). SSR / non-browser flips synchronously so
51
- * consumers don't stall.
52
- *
53
- * Why this exists (speedtest origin, glass-ui promotion AO.W3): the gate is
54
- * hand-rolled at 5 speedtest sites (App.vue, MapView.vue, DashboardMap.vue,
55
- * useAutoStart.ts, useIPInfo.ts) — the ≥2-consumer substrate-promotion gate
56
- * (J inv 10 / L inv 8) fires for a publisher-side absorption.
57
- *
58
- * @param options.timeout Default `2000` ms — forwarded to `requestIdleCallback`.
59
- * @param options.onReady Optional one-shot task run on the idle flip.
60
- * @returns Object with `ready: Ref<boolean>` (flips false → true once) and
61
- * `stop()` for manual disposal outside a Vue scope.
62
- */
63
- export declare function useIdleReady(options?: UseIdleReadyOptions): UseIdleReadyControls;
@@ -1,87 +0,0 @@
1
- import { type Ref } from "vue";
2
- /**
3
- * Structural Ref shape — accepts the consumer's `Ref<T>` regardless of which
4
- * `@vue/reactivity` package the brand symbol comes from. Glass-ui may sit at
5
- * a different vue minor than the consumer, and Vue 3.5's `[RefSymbol]`
6
- * phantom is nominal-by-package; structural-by-`.value` is the correct
7
- * contract for a consumer-facing API. Same shape `useResizeObserver` uses.
8
- */
9
- type RefLike<T> = {
10
- value: T;
11
- };
12
- export interface UseViewportReadyOptions {
13
- /**
14
- * IntersectionObserver `rootMargin`. Default `"200px"` so the gate flips
15
- * before the host actually crosses the viewport edge — gives the
16
- * consumer a quiet window for lazy-mount (`echarts`, `<canvas>` re-init,
17
- * heavy widget hydration) to land off the LCP frame.
18
- */
19
- rootMargin?: string;
20
- /**
21
- * `requestIdleCallback` timeout, in ms. Default 10_000.
22
- *
23
- * Why 10s and not the conventional 1–2s: a cold-loading consumer (slow
24
- * throughput, weak device) may not sustainably idle inside a 1–2s
25
- * window — the timeout fires inside the LCP measurement window and
26
- * defeats the IO gate's "wait for viewport AND idle main thread"
27
- * semantic. The IO gate fronts the budget, so the timeout only fires
28
- * after intersection has already resolved; ten seconds gives the main
29
- * thread room to idle naturally.
30
- */
31
- idleTimeout?: number;
32
- /**
33
- * IntersectionObserver `threshold`. Default 0.01 (1 % visible). Mirrors
34
- * the speedtest origin-site semantic — "any pixel visible counts".
35
- */
36
- threshold?: number;
37
- }
38
- export interface UseViewportReadyControls {
39
- /** Flips `false → true` exactly once when the host is visible + idle. */
40
- readonly ready: Ref<boolean>;
41
- /** Tear down observer + idle handle. Auto-called on scope dispose. */
42
- stop: () => void;
43
- }
44
- /**
45
- * `useViewportReady(host)` — two-stage `IntersectionObserver` +
46
- * `requestIdleCallback` gate that flips a `Ref<boolean>` exactly once when
47
- * the host element has entered the viewport AND the main thread has idled.
48
- *
49
- * The intended use is lazy-mount of a heavy widget (echarts, leaflet,
50
- * three.js, codemirror, custom canvas) that would otherwise pull its chunk
51
- * into the first-paint critical path. The two-stage gate ensures:
52
- *
53
- * 1. Visibility-first — `IntersectionObserver` watches `host`. Until the
54
- * host crosses into the viewport (+ `rootMargin`), no fetch fires.
55
- * 2. Idle-second — once visible, `requestIdleCallback` schedules the flip
56
- * so the chunk fetch waits for an idle main thread. Safari (no rIC)
57
- * falls back to `setTimeout(fire, 16)` — one frame later — so the
58
- * composition still defers past the IO callback's paint frame.
59
- *
60
- * The composable is one-shot: once the gate flips to `true` it disconnects
61
- * its observer and clears any pending idle handle. Auto-cleans on Vue scope
62
- * disposal (mirrors `useResizeObserver` / `useInterval` upstream); outside
63
- * a scope callers receive the manual `stop()` control.
64
- *
65
- * Why this exists (speedtest origin, glass-ui promotion AJ.W6-α): both
66
- * `AdminOverviewView` and `ChartsView` shipped a near-identical `chartReady`
67
- * flag flipped by `requestIdleCallback` alone. The W3-R1 idiom in those
68
- * sites — gate visibility first, then schedule rIC inside the IO callback —
69
- * is generic across heavy-widget hydration; the speedtest 2-consumer trigger
70
- * fired for a publisher-side absorption per `feedback_generic_components`.
71
- *
72
- * Usage:
73
- * const host = ref<HTMLElement | null>(null);
74
- * const { ready } = useViewportReady(host);
75
- * // <Chart v-if="ready" /> — fetched lazily once host is visible + idle.
76
- *
77
- * @param host A `Ref<Element | null>` for the element to gate visibility on.
78
- * The observer watches THIS element, not the lazy-mounted
79
- * widget (which doesn't exist pre-flip).
80
- * @param options.rootMargin Default `"200px"`.
81
- * @param options.idleTimeout Default `10000` ms.
82
- * @param options.threshold Default `0.01`.
83
- * @returns Object with `ready: Ref<boolean>` (flips false → true once) and
84
- * `stop()` for manual disposal outside a Vue scope.
85
- */
86
- export declare function useViewportReady(host: RefLike<Element | null>, options?: UseViewportReadyOptions): UseViewportReadyControls;
87
- export {};