@mkbabb/glass-ui 4.0.1 → 4.2.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 (606) hide show
  1. package/dist/{CardAction-CW7a0m8M.js → CardAction-DlVP2evz.js} +72 -53
  2. package/dist/{CommandShortcut-DvZNQ_HF.js → CommandShortcut-By-VQcLO.js} +25 -14
  3. package/dist/{ConfiguratorRow-BR4l-ixA.js → ConfiguratorRow-YMXdINHx.js} +14 -14
  4. package/dist/ContextMenuContent-CMWn6huB.js +90 -0
  5. package/dist/{ContextMenuSubContent-xol4sD2q.js → ContextMenuSubContent-DvwWCUc0.js} +16 -16
  6. package/dist/{DataTable-CuKwF7wr.js → DataTable-C4tG3eIJ.js} +4 -4
  7. package/dist/DialogContent-D8U9ZfWS.js +121 -0
  8. package/dist/DialogFooter-DoLy0ewI.js +80 -0
  9. package/dist/DialogScrollContent-BMekN7gq.js +93 -0
  10. package/dist/{FadingScroll-DI6hQhT9.js → FadingScroll-P8B30rAD.js} +1 -1
  11. package/dist/HoverCardContent-DAmGYglo.js +88 -0
  12. package/dist/{HoverPopover-CbqbNwgU.js → HoverPopover-DYpBOzzF.js} +1 -1
  13. package/dist/{IconChip-BTD-nay5.js → IconChip-CQa7XZYc.js} +7 -5
  14. package/dist/{IconTooltip-Bl8gFZ8d.js → IconTooltip-_df8M3xm.js} +1 -1
  15. package/dist/Input-CyU4_hIC.js +57 -0
  16. package/dist/{MetricBadge-RHdBP72w.js → MetricBadge-DQt_dGah.js} +1 -1
  17. package/dist/{Notification-VUwexFUf.js → Notification-BlSPJhtZ.js} +4 -4
  18. package/dist/NumberFieldContent-Z3VxGu_6.js +140 -0
  19. package/dist/PagerDots-CYlqVFd4.js +196 -0
  20. package/dist/PaperBackdrop-DYWgrnh8.js +42 -0
  21. package/dist/{PopoverContent-DL7E6vJP.js → PopoverContent-BuKyHZSz.js} +2 -2
  22. package/dist/{Progress-DctG61iZ.js → Progress-C9SsdwIZ.js} +1 -1
  23. package/dist/{ScrollingText-yOpBzFYq.js → ScrollingText-DY3W1Jfh.js} +2 -2
  24. package/dist/SelectScrollDownButton-3mFHX_R-.js +260 -0
  25. package/dist/{SelectSeparator-DXswVdRz.js → SelectSeparator-CNRGG7Ew.js} +1 -1
  26. package/dist/Separator-Cf9-JFgi.js +44 -0
  27. package/dist/Switch-uf-UKPA2.js +49 -0
  28. package/dist/{Toaster-Bw4xR8xV.js → Toaster-ozrsR4mP.js} +2 -2
  29. package/dist/{ToggleGroupItem-pEM9vIhs.js → ToggleGroupItem-BpzaVzNm.js} +6 -6
  30. package/dist/TooltipProvider-QQVM_80r.js +109 -0
  31. package/dist/animated-digit.js +2 -2
  32. package/dist/api/index.d.ts +16 -32
  33. package/dist/api/types-extra.d.ts +33 -0
  34. package/dist/api.js +2 -2
  35. package/dist/aurora.js +629 -269
  36. package/dist/badge-Bt14yURi.js +72 -0
  37. package/dist/badge.js +1 -1
  38. package/dist/border-progress.js +49 -57
  39. package/dist/button-D1W9PrzI.js +130 -0
  40. package/dist/button.js +1 -1
  41. package/dist/canvas.js +2 -3
  42. package/dist/card.js +1 -1
  43. package/dist/carousel.js +235 -106
  44. package/dist/chipVariants-BJQ0I2kB.js +18 -0
  45. package/dist/collapsible.js +1 -1
  46. package/dist/color-B9jZdhJX.js +116 -0
  47. package/dist/color.js +2 -2
  48. package/dist/command.js +1 -1
  49. package/dist/completion-seal.d.ts +1 -0
  50. package/dist/completion-seal.js +89 -0
  51. package/dist/components/custom/aurora/Aurora.vue.d.ts +10 -5
  52. package/dist/components/custom/aurora/composables/color.d.ts +13 -0
  53. package/dist/components/custom/aurora/composables/frameLoop.d.ts +9 -0
  54. package/dist/components/custom/aurora/composables/glSetup.d.ts +1 -1
  55. package/dist/components/custom/aurora/composables/runtime.d.ts +12 -0
  56. package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +12 -3
  57. package/dist/components/custom/aurora/composables/wgpuSetup.d.ts +8 -0
  58. package/dist/components/custom/aurora/constants/presets.d.ts +47 -0
  59. package/dist/components/custom/aurora/constants/renderMode.d.ts +16 -8
  60. package/dist/components/custom/aurora/constants/shaders/aurora-mediums.wgsl.d.ts +1 -0
  61. package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +1 -1
  62. package/dist/components/custom/aurora/index.d.ts +1 -1
  63. package/dist/components/custom/border-progress/composables/spectrum-walk.d.ts +25 -0
  64. package/dist/components/custom/border-progress/composables/useBorderSpectrum.d.ts +14 -18
  65. package/dist/components/custom/border-progress/index.d.ts +1 -1
  66. package/dist/components/custom/completion-seal/CompletionSeal.vue.d.ts +21 -0
  67. package/dist/components/custom/completion-seal/composables/useCompletionSeal.d.ts +37 -0
  68. package/dist/components/custom/completion-seal/constants.d.ts +46 -0
  69. package/dist/components/custom/completion-seal/index.d.ts +4 -0
  70. package/dist/components/custom/concentric/Concentric.vue.d.ts +15 -12
  71. package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +12 -0
  72. package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +13 -0
  73. package/dist/components/custom/concentric/composables/levelField.d.ts +50 -0
  74. package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +7 -3
  75. package/dist/components/custom/concentric/composables/useConcentric.d.ts +3 -3
  76. package/dist/components/custom/concentric/constants.d.ts +69 -24
  77. package/dist/components/custom/concentric/index.d.ts +2 -2
  78. package/dist/components/custom/concentric/shaders/concentric.glsl.d.ts +2 -2
  79. package/dist/components/custom/concentric/shaders/concentric.wgsl.d.ts +1 -1
  80. package/dist/components/custom/configurator/Configurator.vue.d.ts +23 -2
  81. package/dist/components/custom/configurator/index.d.ts +1 -1
  82. package/dist/components/custom/confirm-dialog/ConfirmDialog.vue.d.ts +3 -3
  83. package/dist/components/custom/constellation/Constellation.vue.d.ts +5 -4
  84. package/dist/components/custom/constellation/composables/constellationGLSetup.d.ts +10 -0
  85. package/dist/components/custom/constellation/composables/constellationWGPUSetup.d.ts +19 -0
  86. package/dist/components/custom/constellation/composables/uniformBridgeWGPU.d.ts +66 -0
  87. package/dist/components/custom/constellation/composables/useConstellation.d.ts +3 -10
  88. package/dist/components/custom/constellation/constants.d.ts +33 -0
  89. package/dist/components/custom/constellation/constellationField.d.ts +31 -1
  90. package/dist/components/custom/constellation/constellationInteraction.d.ts +23 -14
  91. package/dist/components/custom/constellation/constellationRender.d.ts +25 -0
  92. package/dist/components/custom/constellation/constellationTypes.d.ts +38 -0
  93. package/dist/components/custom/constellation/constellationWell.d.ts +15 -0
  94. package/dist/components/custom/constellation/index.d.ts +5 -5
  95. package/dist/components/custom/constellation/shaders/constellation-lines.glsl.d.ts +2 -0
  96. package/dist/components/custom/constellation/shaders/constellation-lines.wgsl.d.ts +1 -0
  97. package/dist/components/custom/constellation/shaders/constellation-points.glsl.d.ts +2 -0
  98. package/dist/components/custom/constellation/shaders/constellation-points.wgsl.d.ts +1 -0
  99. package/dist/components/custom/deck/DeckPager.vue.d.ts +29 -0
  100. package/dist/components/custom/deck/composables/useDeck.d.ts +27 -0
  101. package/dist/components/custom/deck/composables/useDeckKeyboard.d.ts +25 -0
  102. package/dist/components/custom/deck/composables/useDeckSpring.d.ts +22 -0
  103. package/dist/components/custom/deck/constants.d.ts +14 -0
  104. package/dist/components/custom/deck/index.d.ts +8 -0
  105. package/dist/components/custom/dock/DockDropdownTrigger.vue.d.ts +4 -3
  106. package/dist/components/custom/dock/DockIconButton.vue.d.ts +22 -0
  107. package/dist/components/custom/dock/DockPopoverTrigger.vue.d.ts +19 -0
  108. package/dist/components/custom/dock/DockStack.vue.d.ts +78 -0
  109. package/dist/components/custom/dock/GlassDock.vue.d.ts +21 -3
  110. package/dist/components/custom/dock/composables/dockMorphContext.d.ts +18 -32
  111. package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +78 -67
  112. package/dist/components/custom/dock/composables/index.d.ts +3 -0
  113. package/dist/components/custom/dock/composables/railProjection.d.ts +45 -0
  114. package/dist/components/custom/dock/composables/useDockContextSilhouette.d.ts +192 -0
  115. package/dist/components/custom/dock/composables/useDockFission.d.ts +158 -0
  116. package/dist/components/custom/dock/composables/useDockItemDrag.d.ts +18 -0
  117. package/dist/components/custom/dock/composables/useDockSearch.d.ts +85 -0
  118. package/dist/components/custom/dock/composables/useDockShellProps.d.ts +49 -0
  119. package/dist/components/custom/dock/constants.d.ts +32 -17
  120. package/dist/components/custom/dock/index.d.ts +8 -2
  121. package/dist/components/custom/dot-flow-field/DotFlowField.vue.d.ts +15 -11
  122. package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +69 -6
  123. package/dist/components/custom/dot-flow-field/composables/flowGLProgram.d.ts +8 -0
  124. package/dist/components/custom/dot-flow-field/composables/flowSetupGL.d.ts +9 -0
  125. package/dist/components/custom/dot-flow-field/composables/flowSetupGLFlow.d.ts +12 -0
  126. package/dist/components/custom/dot-flow-field/composables/flowSetupWGPU.d.ts +7 -0
  127. package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +50 -9
  128. package/dist/components/custom/dot-flow-field/composables/useDotFlowField.d.ts +6 -5
  129. package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +23 -9
  130. package/dist/components/custom/dot-flow-field/constants.d.ts +92 -20
  131. package/dist/components/custom/dot-flow-field/index.d.ts +2 -2
  132. package/dist/components/custom/dot-flow-field/shaders/flow-field.compute.wgsl.d.ts +1 -1
  133. package/dist/components/custom/dot-flow-field/shaders/flow-field.glsl.d.ts +31 -18
  134. package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +2 -1
  135. package/dist/components/custom/dot-matrix/DotMatrix.vue.d.ts +43 -0
  136. package/dist/components/custom/dot-matrix/composables/dotMatrixField.d.ts +89 -0
  137. package/dist/components/custom/dot-matrix/composables/uniformBridgeWGPU.d.ts +61 -0
  138. package/dist/components/custom/dot-matrix/composables/useDotMatrix.d.ts +34 -0
  139. package/dist/components/custom/dot-matrix/composables/useDotSphere.d.ts +34 -0
  140. package/dist/components/custom/dot-matrix/constants.d.ts +72 -0
  141. package/dist/components/custom/dot-matrix/index.d.ts +5 -0
  142. package/dist/components/custom/dot-matrix/shaders/dot-matrix.glsl.d.ts +4 -0
  143. package/dist/components/custom/dot-matrix/shaders/dot-matrix.wgsl.d.ts +1 -0
  144. package/dist/components/custom/easing/EasingPicker.vue.d.ts +2 -2
  145. package/dist/components/custom/easing/composables/useEasingPicker.d.ts +5 -0
  146. package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +11 -0
  147. package/dist/components/custom/fourier-field/FourierField.vue.d.ts +44 -47
  148. package/dist/components/custom/fourier-field/composables/fourierFieldGLSetup.d.ts +24 -0
  149. package/dist/components/custom/fourier-field/composables/fourierFieldWGPUSetup.d.ts +31 -0
  150. package/dist/components/custom/fourier-field/composables/uniformBridgeWGPU.d.ts +56 -0
  151. package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +61 -37
  152. package/dist/components/custom/fourier-field/constants.d.ts +114 -4
  153. package/dist/components/custom/fourier-field/index.d.ts +23 -18
  154. package/dist/components/custom/fourier-field/shaders/fourier-field.compute.wgsl.d.ts +1 -0
  155. package/dist/components/custom/fourier-field/shaders/fourier-field.glsl.d.ts +4 -0
  156. package/dist/components/custom/fourier-field/shaders/fourier-field.render.wgsl.d.ts +1 -0
  157. package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +9 -1
  158. package/dist/components/custom/goo-blob/composables/easing.d.ts +1 -0
  159. package/dist/components/custom/goo-blob/composables/useBlobSatellites.d.ts +1 -0
  160. package/dist/components/custom/goo-blob/constants.d.ts +26 -1
  161. package/dist/components/custom/goo-blob/index.d.ts +1 -1
  162. package/dist/components/custom/goo-blob/shaders/metaball-noise.wgsl.d.ts +1 -0
  163. package/dist/components/custom/goo-blob/shaders/metaball-palette.wgsl.d.ts +1 -0
  164. package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +1 -1
  165. package/dist/components/custom/goo-blob/shaders/metaball.wgsl.d.ts +1 -1
  166. package/dist/components/custom/goo-blob/types.d.ts +86 -1
  167. package/dist/components/custom/goo-dot-matrix/GooDotMatrix.vue.d.ts +49 -0
  168. package/dist/components/custom/goo-dot-matrix/composables/gooDotLattice.d.ts +24 -0
  169. package/dist/components/custom/goo-dot-matrix/composables/gooDotSetup.d.ts +79 -0
  170. package/dist/components/custom/goo-dot-matrix/composables/uniformBridgeWGPU.d.ts +45 -0
  171. package/dist/components/custom/goo-dot-matrix/composables/useGooDotMatrix.d.ts +31 -0
  172. package/dist/components/custom/goo-dot-matrix/constants.d.ts +115 -0
  173. package/dist/components/custom/goo-dot-matrix/index.d.ts +5 -0
  174. package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.frag.d.ts +13 -0
  175. package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.wgsl.d.ts +4 -0
  176. package/dist/components/custom/goo-filter/GooFilter.vue.d.ts +22 -0
  177. package/dist/components/custom/goo-filter/index.d.ts +1 -0
  178. package/dist/components/custom/handmark/brush.d.ts +17 -17
  179. package/dist/components/custom/handmark/constants.d.ts +28 -8
  180. package/dist/components/custom/handmark/geometry.d.ts +34 -1
  181. package/dist/components/custom/handmark/index.d.ts +1 -1
  182. package/dist/components/custom/icon-chip/types.d.ts +10 -0
  183. package/dist/components/custom/labeled-field/LabeledField.vue.d.ts +21 -2
  184. package/dist/components/custom/metric-stack/MetricRow.vue.d.ts +15 -0
  185. package/dist/components/custom/pager-dots/PagerDots.vue.d.ts +9 -0
  186. package/dist/components/custom/pager-dots/index.d.ts +2 -0
  187. package/dist/components/custom/pager-dots/pagerWindow.d.ts +9 -0
  188. package/dist/components/custom/paper-backdrop/PaperBackdrop.vue.d.ts +18 -0
  189. package/dist/components/custom/paper-grid/PaperGrid.vue.d.ts +42 -0
  190. package/dist/components/custom/paper-grid/composables/paperGrid.d.ts +105 -0
  191. package/dist/components/custom/paper-grid/composables/paperGridGLSetup.d.ts +18 -0
  192. package/dist/components/custom/paper-grid/composables/paperGridWGPUSetup.d.ts +21 -0
  193. package/dist/components/custom/paper-grid/composables/uniformBridgeWGPU.d.ts +16 -0
  194. package/dist/components/custom/paper-grid/composables/usePaperGrid.d.ts +31 -0
  195. package/dist/components/custom/paper-grid/constants.d.ts +95 -0
  196. package/dist/components/custom/paper-grid/index.d.ts +5 -0
  197. package/dist/components/custom/paper-grid/shaders/paper-grid.glsl.d.ts +4 -0
  198. package/dist/components/custom/paper-grid/shaders/paper-grid.wgsl.d.ts +1 -0
  199. package/dist/components/custom/search/FuzzySearch.vue.d.ts +8 -2
  200. package/dist/components/custom/search/SearchBar.vue.d.ts +8 -0
  201. package/dist/components/custom/search/index.d.ts +2 -0
  202. package/dist/components/custom/search/searchVariants.d.ts +19 -0
  203. package/dist/components/custom/selectable-chip/SelectableChip.vue.d.ts +50 -0
  204. package/dist/components/custom/selectable-chip/chipVariants.d.ts +39 -0
  205. package/dist/components/custom/selectable-chip/index.d.ts +2 -0
  206. package/dist/components/custom/selectable-chip/selectableChipVariants.d.ts +15 -0
  207. package/dist/components/custom/split-chars/SplitChars.vue.d.ts +39 -0
  208. package/dist/components/custom/split-chars/index.d.ts +1 -0
  209. package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +8 -6
  210. package/dist/components/custom/tabs/constants.d.ts +28 -2
  211. package/dist/components/custom/timeline/ScrubberTimeline.vue.d.ts +16 -0
  212. package/dist/components/custom/timeline/geometry.d.ts +0 -8
  213. package/dist/components/custom/toggle-chip/index.d.ts +15 -4
  214. package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +32 -17
  215. package/dist/components/custom/watercolor-dot/useWatercolorBlob.d.ts +10 -5
  216. package/dist/components/ui/_shared/index.d.ts +2 -0
  217. package/dist/components/ui/_shared/useControlSize.d.ts +46 -0
  218. package/dist/components/ui/_shared/useSurfaceAxis.d.ts +17 -3
  219. package/dist/components/ui/badge/Badge.vue.d.ts +14 -0
  220. package/dist/components/ui/badge/index.d.ts +1 -0
  221. package/dist/components/ui/button/Button.vue.d.ts +1 -0
  222. package/dist/components/ui/button/index.d.ts +1 -1
  223. package/dist/components/ui/card/Card.vue.d.ts +46 -1
  224. package/dist/components/ui/card/ScrollCard.vue.d.ts +1 -1
  225. package/dist/components/ui/card/index.d.ts +1 -1
  226. package/dist/components/ui/carousel/CarouselContent.vue.d.ts +2 -4
  227. package/dist/components/ui/carousel/CarouselNext.vue.d.ts +1 -1
  228. package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +1 -1
  229. package/dist/components/ui/command/CommandDialog.vue.d.ts +9 -3
  230. package/dist/components/ui/command/CommandList.vue.d.ts +3 -0
  231. package/dist/components/ui/context-menu/ContextMenuContent.vue.d.ts +5 -1
  232. package/dist/components/ui/dialog/DialogContent.vue.d.ts +9 -0
  233. package/dist/components/ui/drawer/Drawer.vue.d.ts +33 -14
  234. package/dist/components/ui/drawer/constants.d.ts +8 -6
  235. package/dist/components/ui/drawer/index.d.ts +12 -2
  236. package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +4 -0
  237. package/dist/components/ui/hover-card/HoverCardContent.vue.d.ts +3 -0
  238. package/dist/components/ui/input/Input.vue.d.ts +3 -0
  239. package/dist/components/ui/number-field/NumberFieldInput.vue.d.ts +6 -1
  240. package/dist/components/ui/select/SelectContent.vue.d.ts +12 -0
  241. package/dist/components/ui/slider/Slider.vue.d.ts +9 -0
  242. package/dist/components/ui/switch/Switch.vue.d.ts +2 -0
  243. package/dist/components/ui/textarea/Textarea.vue.d.ts +3 -0
  244. package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +3 -0
  245. package/dist/composables/color/index.d.ts +2 -0
  246. package/dist/composables/color/useAccentTone.d.ts +34 -0
  247. package/dist/composables/dom/index.d.ts +1 -0
  248. package/dist/composables/dom/useDragVelocity.d.ts +46 -0
  249. package/dist/composables/glass/useVizChoreography.d.ts +123 -0
  250. package/dist/composables/glass/wave/index.d.ts +4 -0
  251. package/dist/composables/glass/wave/waveField.d.ts +115 -0
  252. package/dist/composables/glass/wave/waveField.glsl.d.ts +1 -0
  253. package/dist/composables/glass/wave/waveField.wgsl.d.ts +1 -0
  254. package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +105 -2
  255. package/dist/composables/glass/webgl/shaders/flow.wgsl.d.ts +1 -0
  256. package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +40 -2
  257. package/dist/composables/glass/webgpu/index.d.ts +2 -1
  258. package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +65 -7
  259. package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +50 -2
  260. package/dist/composables/glass/webgpu/webgpuDevice.d.ts +42 -0
  261. package/dist/composables/motion/core/index.d.ts +7 -0
  262. package/dist/composables/motion/core/useHaptic.d.ts +48 -0
  263. package/dist/composables/motion/core/writeVelocityWeight.d.ts +31 -0
  264. package/dist/composables/motion/index.d.ts +2 -0
  265. package/dist/composables/motion/scrollReader.d.ts +25 -0
  266. package/dist/composables/motion/springPresets.d.ts +19 -1
  267. package/dist/composables/motion/suite.d.ts +2 -2
  268. package/dist/composables/motion/useBloomUp.d.ts +97 -0
  269. package/dist/composables/motion/useCelebrationBurst.d.ts +50 -0
  270. package/dist/composables/motion/useCharStagger.d.ts +44 -0
  271. package/dist/composables/motion/useDockCtaReceive.d.ts +29 -22
  272. package/dist/composables/motion/useGooMorph.d.ts +72 -0
  273. package/dist/composables/motion/useLiquidFlex.d.ts +18 -0
  274. package/dist/composables/motion/useLiquidMorph.d.ts +108 -0
  275. package/dist/composables/motion/useLiquidPress.d.ts +12 -0
  276. package/dist/composables/motion/useLiquidReveal.d.ts +7 -4
  277. package/dist/composables/motion/useMorphField.d.ts +157 -0
  278. package/dist/composables/motion/useScrollChrome.d.ts +58 -0
  279. package/dist/composables/motion/useScrollPin.d.ts +49 -0
  280. package/dist/composables/motion/useScrollScene.d.ts +67 -0
  281. package/dist/composables/motion/useScrollTrigger.d.ts +67 -0
  282. package/dist/composables/motion/useSpringPress.d.ts +5 -5
  283. package/dist/composables/motion/useStaggerReveal.d.ts +24 -0
  284. package/dist/composables/sidebar/index.d.ts +4 -1
  285. package/dist/composables/sidebar/types.d.ts +68 -3
  286. package/dist/composables/sidebar/useClickDelegate.d.ts +4 -0
  287. package/dist/composables/sidebar/useLazyLoader.d.ts +5 -0
  288. package/dist/composables/sidebar/useScrollTo.d.ts +5 -0
  289. package/dist/composables/virtual/index.d.ts +4 -0
  290. package/dist/composables/virtual/useVirtualSectionWindow.d.ts +72 -0
  291. package/dist/composables/virtual/useWindowedStore.d.ts +43 -0
  292. package/dist/composables/virtual/virtualSectionLayout.d.ts +103 -0
  293. package/dist/concentric.js +552 -309
  294. package/dist/configurator.js +2 -2
  295. package/dist/confirm-dialog.js +62 -47
  296. package/dist/constellation.js +635 -235
  297. package/dist/context-menu.js +2 -2
  298. package/dist/controls.js +2 -2
  299. package/dist/createCanvasLifecycle-CuCrGRfq.js +173 -0
  300. package/dist/dark.js +1 -1
  301. package/dist/data-table.js +1 -1
  302. package/dist/deck.d.ts +1 -0
  303. package/dist/deck.js +105 -0
  304. package/dist/dialog.js +4 -3
  305. package/dist/dock.js +1320 -631
  306. package/dist/dockContext-gFVS2gMg.js +18 -0
  307. package/dist/dom.js +7 -6
  308. package/dist/dot-flow-field.js +1268 -387
  309. package/dist/dot-matrix.d.ts +1 -0
  310. package/dist/dot-matrix.js +774 -0
  311. package/dist/dotMatrixField-CRO0ZFk4.js +48 -0
  312. package/dist/drawer.js +106 -96
  313. package/dist/{dropdown-menu-CofSZuk8.js → dropdown-menu-CCfcCQ68.js} +83 -79
  314. package/dist/dropdown-menu.js +1 -1
  315. package/dist/easing.js +188 -176
  316. package/dist/expandable-container.js +43 -21
  317. package/dist/fading-scroll.js +1 -1
  318. package/dist/flow.glsl-DqEGRpl4.js +4 -0
  319. package/dist/forms.js +64 -62
  320. package/dist/fourier-field.js +1069 -178
  321. package/dist/fourier-math.js +1 -1
  322. package/dist/glass-panel.js +2 -2
  323. package/dist/glass-ui.css +1 -1
  324. package/dist/glass-ui.js +164 -119
  325. package/dist/goo-blob.js +175 -1230
  326. package/dist/goo-dot-matrix.d.ts +1 -0
  327. package/dist/goo-dot-matrix.js +811 -0
  328. package/dist/handmark.js +137 -94
  329. package/dist/header-ribbon.js +1 -1
  330. package/dist/hover-card.js +1 -1
  331. package/dist/hover-popover.js +1 -1
  332. package/dist/icon-chip.js +1 -1
  333. package/dist/icon-tooltip.js +1 -1
  334. package/dist/index.d.ts +5 -0
  335. package/dist/instrument-chassis.js +1 -1
  336. package/dist/keyboard.js +1 -1
  337. package/dist/label.js +1 -1
  338. package/dist/labeled-field.js +70 -60
  339. package/dist/metric-badge.js +1 -1
  340. package/dist/metric-cell.js +1 -1
  341. package/dist/metric-stack.js +12 -3
  342. package/dist/motion-core.js +59 -34
  343. package/dist/motion-curves.js +30 -14
  344. package/dist/motion.js +231 -96
  345. package/dist/notification.js +1 -1
  346. package/dist/number-field.js +1 -1
  347. package/dist/pager-dots.js +2 -91
  348. package/dist/paper-backdrop.js +1 -1
  349. package/dist/paper-grid.d.ts +1 -0
  350. package/dist/paper-grid.js +761 -0
  351. package/dist/paperGrid-CXCSMbZ1.js +191 -0
  352. package/dist/popover.js +1 -1
  353. package/dist/{presets-BW2b-fr1.js → presets-QvYgnFIZ.js} +14 -13
  354. package/dist/{procedural-color.glsl-CIFsJhwI.js → procedural-color.wgsl-C1Y5PkM6.js} +2 -2
  355. package/dist/progress.js +1 -1
  356. package/dist/pulse.js +2 -2
  357. package/dist/reactive.js +2 -2
  358. package/dist/{useCanvas2D-B8w_E3Rr.js → resolveCanvasColor-DsSJk06I.js} +16 -6
  359. package/dist/scrollReader-rc3Ns_NM.js +42 -0
  360. package/dist/scrolling-text.js +1 -1
  361. package/dist/search.js +162 -306
  362. package/dist/select.js +3 -3
  363. package/dist/selectable-chip.d.ts +1 -0
  364. package/dist/selectable-chip.js +48 -0
  365. package/dist/separator.js +1 -1
  366. package/dist/{sheet-tZMg0E0w.js → sheet-DUCIoOe0.js} +4 -4
  367. package/dist/sheet.js +1 -1
  368. package/dist/sidebar.js +216 -114
  369. package/dist/slider-CcICPe3u.js +149 -0
  370. package/dist/slider.js +1 -1
  371. package/dist/sortable-list.js +3 -3
  372. package/dist/spectrum-walk-cBNSx_zm.js +33 -0
  373. package/dist/springPresets-DfoQ6XRY.js +64 -0
  374. package/dist/stacked-icons.js +54 -39
  375. package/dist/styles/animations.css +13 -3
  376. package/dist/styles/cards.css +271 -2
  377. package/dist/styles/completion-seal.css +131 -0
  378. package/dist/styles/components.css +1 -4
  379. package/dist/styles/configurator.css +221 -1
  380. package/dist/styles/critical-partition.mjs +66 -11
  381. package/dist/styles/deferred.css +4 -0
  382. package/dist/styles/dock/adaptive-legibility.css +119 -0
  383. package/dist/styles/dock/cta-seat.css +87 -0
  384. package/dist/styles/dock/density.css +167 -6
  385. package/dist/styles/dock/fission-bridge.css +552 -0
  386. package/dist/styles/dock/layers.css +90 -78
  387. package/dist/styles/dock/morph-bridge.css +67 -18
  388. package/dist/styles/dock/morph.css +57 -118
  389. package/dist/styles/dock/overflow.css +12 -0
  390. package/dist/styles/dock/search.css +68 -0
  391. package/dist/styles/dock/shape.css +250 -0
  392. package/dist/styles/dock/shell.css +24 -8
  393. package/dist/styles/dock/stack-rail.css +352 -0
  394. package/dist/styles/dock-controls/dark-mode-toggle.css +17 -4
  395. package/dist/styles/dock-controls/icon-button.css +46 -0
  396. package/dist/styles/dock-controls/triggers.css +23 -1
  397. package/dist/styles/dock-controls.css +18 -0
  398. package/dist/styles/dock.css +27 -2
  399. package/dist/styles/drawer.css +166 -0
  400. package/dist/styles/glass/accent-tone.css +66 -0
  401. package/dist/styles/glass/control-surfaces.css +167 -0
  402. package/dist/styles/glass/glass-atom.css +244 -0
  403. package/dist/styles/glass/glass-capsule.css +143 -0
  404. package/dist/styles/glass/glass-chip.css +215 -0
  405. package/dist/styles/glass/ladder.css +67 -17
  406. package/dist/styles/glass/liquid-enter.css +252 -0
  407. package/dist/styles/glass/liquid-morph.css +850 -0
  408. package/dist/styles/glass/material.css +70 -1
  409. package/dist/styles/glass/reveal.css +22 -2
  410. package/dist/styles/glass/rim.css +31 -9
  411. package/dist/styles/glass/surfaces.css +81 -150
  412. package/dist/styles/glass.css +21 -0
  413. package/dist/styles/icon-chip.css +45 -0
  414. package/dist/styles/index.css +26 -0
  415. package/dist/styles/jubilance.css +65 -0
  416. package/dist/styles/motion/morph-field.css +229 -0
  417. package/dist/styles/paper.css +230 -14
  418. package/dist/styles/scroll-choreography.css +135 -78
  419. package/dist/styles/scroll-chrome.css +123 -0
  420. package/dist/styles/scroll-driven.css +38 -0
  421. package/dist/styles/segmented-tabs.css +110 -40
  422. package/dist/styles/select.css +151 -0
  423. package/dist/styles/theme/bridges.css +22 -0
  424. package/dist/styles/theme/radius.css +18 -1
  425. package/dist/styles/tokens/color-radius.css +14 -4
  426. package/dist/styles/tokens/dark-arm.css +94 -12
  427. package/dist/styles/tokens/glass-deep.css +33 -4
  428. package/dist/styles/tokens/glass-fx.css +122 -1
  429. package/dist/styles/tokens/glass.css +226 -34
  430. package/dist/styles/tokens/light-dark.css +3 -3
  431. package/dist/styles/tokens/offsets.css +27 -0
  432. package/dist/styles/tokens/property-regs.css +277 -0
  433. package/dist/styles/tokens/scale-paper.css +86 -30
  434. package/dist/styles/tokens/scheme-motion.css +106 -133
  435. package/dist/styles/tokens/scheme-spring.css +239 -0
  436. package/dist/styles/tokens/scroll-tokens.css +15 -15
  437. package/dist/styles/tokens/shadow.css +73 -13
  438. package/dist/styles/tokens/sizing-config.css +110 -0
  439. package/dist/styles/tokens/sizing.css +55 -104
  440. package/dist/styles/tokens.css +14 -2
  441. package/dist/styles/typography/semantic.css +18 -5
  442. package/dist/styles/utilities/a11y-overrides.css +20 -5
  443. package/dist/styles/utilities/base-misc.css +52 -0
  444. package/dist/styles/utilities/btn.css +84 -3
  445. package/dist/styles/utilities/components.css +31 -6
  446. package/dist/styles/utilities/metal.css +26 -0
  447. package/dist/switch.js +1 -1
  448. package/dist/tabs.js +199 -182
  449. package/dist/timeline.js +241 -206
  450. package/dist/toast.js +1 -1
  451. package/dist/toggle-chip.js +14 -41
  452. package/dist/toggle-group.js +1 -1
  453. package/dist/tooltip.js +1 -1
  454. package/dist/typewriter.js +2 -2
  455. package/dist/uniformBridgeWGPU-BCse1SHU.js +1268 -0
  456. package/dist/{useAnimatedNumber-BfUq2bUM.js → useAnimatedNumber-BntskVdQ.js} +1 -1
  457. package/dist/{useConfiguratorState-DNlOh6c8.js → useConfiguratorState-22BcULzF.js} +41 -38
  458. package/dist/useControlSize-DAZ062x7.js +9 -0
  459. package/dist/useDockCtaReceive-DX7RDb6_.js +88 -0
  460. package/dist/{useDragMorph-DgxnsVJz.js → useDragMorph-DGLSewwB.js} +4 -4
  461. package/dist/useDragVelocity-CjcfX3dA.js +57 -0
  462. package/dist/useFuzzySearch-0fTYOhS4.js +177 -0
  463. package/dist/useGooMorph-Cs13NgYL.js +104 -0
  464. package/dist/useGpuSubstrate-Ceet70xq.js +347 -0
  465. package/dist/useHaptic-CPz5BT9I.js +134 -0
  466. package/dist/{useLiquidFlex-mZPMiNXh.js → useLiquidFlex-Cc6PjVJD.js} +8 -3
  467. package/dist/useLiquidPress-CtOQ8Z0_.js +43 -0
  468. package/dist/useMorphField-ogBM7ubT.js +141 -0
  469. package/dist/usePointerVelocityField-BrkqZFhj.js +91 -0
  470. package/dist/useScrollChrome-JuImi1DM.js +258 -0
  471. package/dist/{useSpringMount-q1amq1SJ.js → useSpringMount-DFxtzmkR.js} +1 -1
  472. package/dist/useSpringPress-VM9RgVq3.js +36 -0
  473. package/dist/{useSurfaceAxis-g0NloYEF.js → useSurfaceAxis-Ci7Dnaw2.js} +1 -1
  474. package/dist/{useTouchGate-CBZTD4SD.js → useTouchGate-B1Lf9XqN.js} +1 -1
  475. package/dist/{vendor-CKmzio-i.js → vendor-B2qOlYY3.js} +24 -11
  476. package/dist/virtual.d.ts +1 -0
  477. package/dist/virtual.js +225 -0
  478. package/dist/watercolor-dot.js +107 -74
  479. package/dist/writeVelocityWeight-Bh83xZfs.js +19 -0
  480. package/package.json +140 -9
  481. package/src/styles/animations.css +13 -3
  482. package/src/styles/cards.css +271 -2
  483. package/src/styles/completion-seal.css +131 -0
  484. package/src/styles/configurator.css +221 -1
  485. package/src/styles/critical-partition.mjs +66 -11
  486. package/src/styles/dock/adaptive-legibility.css +119 -0
  487. package/src/styles/dock/cta-seat.css +87 -0
  488. package/src/styles/dock/density.css +167 -6
  489. package/src/styles/dock/fission-bridge.css +552 -0
  490. package/src/styles/dock/layers.css +90 -78
  491. package/src/styles/dock/morph-bridge.css +67 -18
  492. package/src/styles/dock/morph.css +57 -118
  493. package/src/styles/dock/overflow.css +12 -0
  494. package/src/styles/dock/search.css +68 -0
  495. package/src/styles/dock/shape.css +250 -0
  496. package/src/styles/dock/shell.css +24 -8
  497. package/src/styles/dock/stack-rail.css +352 -0
  498. package/src/styles/dock-controls/dark-mode-toggle.css +17 -4
  499. package/src/styles/dock-controls/icon-button.css +46 -0
  500. package/src/styles/dock-controls/triggers.css +23 -1
  501. package/src/styles/dock-controls.css +18 -0
  502. package/src/styles/dock.css +27 -2
  503. package/src/styles/drawer.css +164 -0
  504. package/src/styles/glass/accent-tone.css +66 -0
  505. package/src/styles/glass/control-surfaces.css +167 -0
  506. package/src/styles/glass/glass-atom.css +244 -0
  507. package/src/styles/glass/glass-capsule.css +143 -0
  508. package/src/styles/glass/glass-chip.css +215 -0
  509. package/src/styles/glass/ladder.css +67 -17
  510. package/src/styles/glass/liquid-enter.css +252 -0
  511. package/src/styles/glass/liquid-morph.css +850 -0
  512. package/src/styles/glass/material.css +70 -1
  513. package/src/styles/glass/reveal.css +22 -2
  514. package/src/styles/glass/rim.css +31 -9
  515. package/src/styles/glass/surfaces.css +81 -150
  516. package/src/styles/glass.css +21 -0
  517. package/src/styles/icon-chip.css +45 -0
  518. package/src/styles/index.css +26 -0
  519. package/src/styles/jubilance.css +65 -0
  520. package/src/styles/motion/morph-field.css +229 -0
  521. package/src/styles/paper.css +230 -14
  522. package/src/styles/scroll-choreography.css +135 -78
  523. package/src/styles/scroll-chrome.css +123 -0
  524. package/src/styles/scroll-driven.css +38 -0
  525. package/src/styles/segmented-tabs.css +110 -36
  526. package/src/styles/select.css +151 -0
  527. package/src/styles/theme/bridges.css +22 -0
  528. package/src/styles/theme/radius.css +18 -1
  529. package/src/styles/tokens/color-radius.css +14 -4
  530. package/src/styles/tokens/dark-arm.css +94 -12
  531. package/src/styles/tokens/glass-deep.css +33 -4
  532. package/src/styles/tokens/glass-fx.css +122 -1
  533. package/src/styles/tokens/glass.css +226 -34
  534. package/src/styles/tokens/light-dark.css +3 -3
  535. package/src/styles/tokens/offsets.css +27 -0
  536. package/src/styles/tokens/property-regs.css +277 -0
  537. package/src/styles/tokens/scale-paper.css +86 -30
  538. package/src/styles/tokens/scheme-motion.css +106 -133
  539. package/src/styles/tokens/scheme-spring.css +239 -0
  540. package/src/styles/tokens/scroll-tokens.css +15 -15
  541. package/src/styles/tokens/shadow.css +73 -13
  542. package/src/styles/tokens/sizing-config.css +110 -0
  543. package/src/styles/tokens/sizing.css +55 -104
  544. package/src/styles/tokens.css +14 -2
  545. package/src/styles/typography/semantic.css +18 -5
  546. package/src/styles/utilities/a11y-overrides.css +20 -5
  547. package/src/styles/utilities/base-misc.css +52 -0
  548. package/src/styles/utilities/btn.css +84 -3
  549. package/src/styles/utilities/components.css +31 -6
  550. package/src/styles/utilities/metal.css +26 -0
  551. package/dist/ContextMenuContent-uWnVxDab.js +0 -85
  552. package/dist/DialogContent-DcKK8k9i.js +0 -103
  553. package/dist/DialogFooter-BZNX5aVr.js +0 -165
  554. package/dist/HoverCardContent-b2uaAMRR.js +0 -83
  555. package/dist/Input-h9v5LeXf.js +0 -55
  556. package/dist/NumberFieldContent-Cq7EzX-U.js +0 -138
  557. package/dist/PaperBackdrop-Vf3tlpvd.js +0 -31
  558. package/dist/SelectScrollDownButton-CrA8F0iV.js +0 -252
  559. package/dist/Separator-pKF0oA4M.js +0 -37
  560. package/dist/Switch-CwYNf8bo.js +0 -47
  561. package/dist/TooltipProvider-rzvnXz60.js +0 -104
  562. package/dist/badge-D9XWW4GT.js +0 -53
  563. package/dist/button-DYCUa-tH.js +0 -126
  564. package/dist/color-DweYl7pE.js +0 -86
  565. package/dist/components/custom/concentric/composables/ringField.d.ts +0 -44
  566. package/dist/components/custom/constellation/composables/useConstellationPointer.d.ts +0 -35
  567. package/dist/components/custom/constellation/constellationDraw.d.ts +0 -30
  568. package/dist/components/custom/dock/DockRail.vue.d.ts +0 -89
  569. package/dist/createCanvasLifecycle-CHD5XrDW.js +0 -82
  570. package/dist/dockContext-BNfyPLe9.js +0 -17
  571. package/dist/procedural-color.wgsl-CToRHugY.js +0 -224
  572. package/dist/resolveCanvasColor-CUyHr5Uu.js +0 -11
  573. package/dist/slider-DVb4HXU-.js +0 -142
  574. package/dist/springPresets-CFQGQfdl.js +0 -40
  575. package/dist/styles/dock/rail-extend.css +0 -397
  576. package/dist/useLiquidPress-kfb4KX79.js +0 -39
  577. package/dist/usePointerVelocityField-JbRd5CrM.js +0 -137
  578. package/dist/useRAFLoop-UYa4zoiN.js +0 -109
  579. package/dist/useSpringPress-BsqPr7FJ.js +0 -34
  580. package/src/styles/dock/rail-extend.css +0 -397
  581. /package/dist/{CollapsibleContent-68dEXIAl.js → CollapsibleContent-D7UNsXQr.js} +0 -0
  582. /package/dist/{InstrumentChassis-Bx0F_q5g.js → InstrumentChassis-UUJX0-mW.js} +0 -0
  583. /package/dist/{Label-C2ejNWeC.js → Label-B_HPqi_q.js} +0 -0
  584. /package/dist/{ModalOverlay-D1VrWyoi.js → ModalOverlay-DfAf7o15.js} +0 -0
  585. /package/dist/{SelectGroup-DwwjicPY.js → SelectGroup-Dcczq44n.js} +0 -0
  586. /package/dist/{_plugin-vue_export-helper-C1je1s0u.js → _plugin-vue_export-helper-gLzyemvl.js} +0 -0
  587. /package/dist/{compile-CQEFRTmx.js → compile-INR_tPk_.js} +0 -0
  588. /package/dist/{constants-BPOqYJAm.js → constants-BWj7DkMn.js} +0 -0
  589. /package/dist/{createContext-CpBNTRMI.js → createContext-Cd23P9j0.js} +0 -0
  590. /package/dist/{math-BINYmg5z.js → math-5RcIgCB4.js} +0 -0
  591. /package/dist/{menuItemVariants-D8VNHq22.js → menuItemVariants-DAXquKja.js} +0 -0
  592. /package/dist/{prng-Za0Rmgag.js → prng-B5tIXTtj.js} +0 -0
  593. /package/dist/{useGlobalDark-C28t0VWJ.js → useGlobalDark-B4HO9LXG.js} +0 -0
  594. /package/dist/{useIntersectionPause-Bj4sPkMh.js → useIntersectionPause-DO8Vl4gs.js} +0 -0
  595. /package/dist/{useInterval-CvK1mL92.js → useInterval-BVUI-sez.js} +0 -0
  596. /package/dist/{useKeyboardShortcuts-BXWXOZ-9.js → useKeyboardShortcuts-BEut54Tk.js} +0 -0
  597. /package/dist/{useResizeObserver-Bpoi7tRE.js → useResizeObserver-DdEn3v2f.js} +0 -0
  598. /package/dist/{useResolveTokenColor-vAylyR0x.js → useResolveTokenColor-ChOnCckA.js} +0 -0
  599. /package/dist/{useScrollProgress-D7bYU2RK.js → useScrollProgress-A0M6qRl7.js} +0 -0
  600. /package/dist/{useSortable-DHjtZSEd.js → useSortable-DQV_UNDw.js} +0 -0
  601. /package/dist/{useTextHighlight-CWEi25hf.js → useTextHighlight-Bma3UlKA.js} +0 -0
  602. /package/dist/{useTimer-BHJOKr35.js → useTimer-BBLGPXR8.js} +0 -0
  603. /package/dist/{useUserInvalidAria-y5namzeE.js → useUserInvalidAria-EmmwWPOl.js} +0 -0
  604. /package/dist/{useViewportReady-anbac3m6.js → useViewportReady-C9pYnn7K.js} +0 -0
  605. /package/dist/{vReveal-Czsb7zQC.js → vReveal-CT1KtwZA.js} +0 -0
  606. /package/dist/{vSpecular-CQFmLNzA.js → vSpecular-EX7loENl.js} +0 -0
@@ -0,0 +1,774 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-gLzyemvl.js";
2
+ import { t } from "./usePointerVelocityField-BrkqZFhj.js";
3
+ import { n, o as r, r as i, s as a } from "./procedural-color.wgsl-C1Y5PkM6.js";
4
+ import { a as o, t as s } from "./useGpuSubstrate-Ceet70xq.js";
5
+ import { c } from "./color-B9jZdhJX.js";
6
+ import { a as l, c as u, d, i as f, l as p, n as m, o as h, r as g, s as _, t as v, u as y } from "./dotMatrixField-CRO0ZFk4.js";
7
+ import { computed as b, createElementBlock as x, createElementVNode as S, defineComponent as C, normalizeStyle as w, onScopeDispose as T, openBlock as E, useTemplateRef as D, watch as O } from "vue";
8
+ //#region src/components/custom/dot-matrix/shaders/dot-matrix.wgsl.ts
9
+ var k = `
10
+ const PI: f32 = 3.141592653589793;
11
+ const TAU: f32 = 6.283185307179586;
12
+ const MAX_DOT_STOPS: i32 = 4;
13
+ // The golden-angle constant (transcribes dotMatrixField.ts GOLDEN_ANGLE = PI*(3-sqrt5)).
14
+ const GOLDEN_ANGLE: f32 = 2.399963229728653;
15
+
16
+ // ── The √φ proportion ladder (the liquid-lens constants; Aristotelian, no magic numbers) ──
17
+ const PHI: f32 = 1.618033988749895; // the golden ratio φ
18
+ const SQRT_PHI: f32 = 1.272019649514069; // √φ
19
+ const INV_SQRT_PHI: f32 = 0.7861513777574233; // 1/√φ ≈ the squash/stretch cap
20
+ const INV_PHI2: f32 = 0.3819660112501051; // 1/φ² ≈ the anticipation-lead rung
21
+ // The velocity (normalized-host/sec) → NDC/lens-frame scale: a sweep across the host reads as a
22
+ // strong-but-bounded ellipse. The lens constants ladder off √φ off this scaled vmag.
23
+ const VEL_SCALE: f32 = 0.18;
24
+ const STRETCH_GAIN: f32 = 2.4; // vmag → ellipse eccentricity gain
25
+ const WAKE_GAIN: f32 = 12.0; // the comet-tail displacement gain (spike-calibrated)
26
+ const LENS_MAGNIFY: f32 = SQRT_PHI; // the dot SWELLS √φ× under the lens core (over the 0.8 base)
27
+ const RIM_CHROMA: f32 = 1.0; // the chromatic-rim tone gain (samples the warmer amber stop)
28
+ const VIGNETTE_FLOOR: f32 = INV_PHI2; // the resting center-clear floor (dense edges, clear center)
29
+ // The cartoon 1940s offset-cast: a darkened, lower-α, offset duplicate billboard (the SAME
30
+ // instanced draw, verts 6..11). The light vector is a √φ-proportioned down-right cast.
31
+ const CAST_OFFSET: f32 = 0.9; // the cast displacement (× dot radius), down-right
32
+ const CAST_DARK: f32 = 0.0; // the cast samples pure-dark (a shadow lobe, not a tint)
33
+ const CAST_ALPHA: f32 = 0.55; // the cast's lower opacity (under the lit dot)
34
+
35
+ struct Dot {
36
+ // (unitPos.xyz, sphereIdx)
37
+ data: vec4<f32>,
38
+ };
39
+
40
+ // ── Render uniforms (the typed-struct source-of-truth — see uniformBridgeWGPU.ts) ──
41
+ struct Uniforms {
42
+ // u0: (uResolutionX, uResolutionY, uDpr, uTime)
43
+ u0: vec4<f32>,
44
+ // u1: (uRadius, uDotSize, uBaseOpacity, uAspect)
45
+ u1: vec4<f32>,
46
+ // u2: (uFacingLo, uFacingHi, uSizeLo, uSizeHi)
47
+ u2: vec4<f32>,
48
+ // u3: (uParallax, uPointerPush, uPointerBloom, uPointerActive)
49
+ u3: vec4<f32>,
50
+ // u4: (uPointerX, uPointerY, uSphere2Scale, uBreathRadius)
51
+ u4: vec4<f32>,
52
+ // u5: (uSphere2OffsetX, uSphere2OffsetY, uHasBackground, _pad)
53
+ u5: vec4<f32>,
54
+ // u6: (uLayout, uGravityStrength, uGravityRadius, uPlaneScale) // layout: 0 sphere · 1 plane
55
+ u6: vec4<f32>,
56
+ // u7: (uVelX, uVelY, uTwinkleRate, uWakeStrength) // the reclaimed travel-velocity lane
57
+ u7: vec4<f32>,
58
+ spin: mat3x3<f32>,
59
+ // ints: (uStopCount, uDotCount, uSpheres, _pad)
60
+ ints: vec4<i32>,
61
+ // bg: (background.rgb, _pad)
62
+ bg: vec4<f32>,
63
+ palette: array<vec4<f32>, 4>,
64
+ };
65
+
66
+ @group(0) @binding(0) var<uniform> u: Uniforms;
67
+ @group(0) @binding(1) var<storage, read> dots: array<Dot>;
68
+
69
+ ${n}
70
+ ${i}
71
+
72
+ // The §T2 depth-fade (transcribes dotMatrixField.ts facingFade): the rotated-normal's z
73
+ // → a SOFT facing term → opacity + size ramps. NOT a binary back-face cull.
74
+ fn facingTerm(n: vec3<f32>) -> f32 {
75
+ return clamp(n.z * 0.5 + 0.5, 0.0, 1.0); // 1 = dead-front, 0 = dead-back
76
+ }
77
+
78
+ // A 2D dot product — the local 'let dot = dots[ii].data' SHADOWS the WGSL 'dot()' builtin
79
+ // inside vs_main, so the lens math calls this helper instead (the same value, un-shadowed).
80
+ fn dot2(a: vec2<f32>, b: vec2<f32>) -> f32 {
81
+ return a.x * b.x + a.y * b.y;
82
+ }
83
+
84
+ // Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].
85
+ fn samplePaletteLin(t: f32) -> vec3<f32> {
86
+ let stopCount = u.ints.x;
87
+ if (stopCount <= 1) { return u.palette[0].rgb; }
88
+ let n = f32(stopCount);
89
+ let ft = clamp(t, 0.0, 1.0) * (n - 1.0);
90
+ let i0 = i32(floor(ft));
91
+ let i1 = min(i0 + 1, stopCount - 1);
92
+ let f = ft - f32(i0);
93
+ let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * u.palette[i0].rgb);
94
+ let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * u.palette[i1].rgb);
95
+ return oklabToLinearSrgb(mix(labA, labB, f));
96
+ }
97
+
98
+ struct VSOut {
99
+ @builtin(position) pos: vec4<f32>,
100
+ @location(0) local: vec2<f32>, // [-1,1] billboard-local coords for the SDF circle
101
+ @location(1) bright: f32, // facing-driven brightness [0, ~1.6]
102
+ @location(2) alpha: f32, // facing-driven opacity
103
+ @location(3) tone: f32, // palette tone (0 = bright cream near-front, 1 = amber rim)
104
+ @location(4) cast: f32, // 1 = the cartoon offset-cast shadow billboard, 0 = the lit dot
105
+ };
106
+
107
+ @vertex
108
+ fn vs_main(
109
+ @builtin(vertex_index) vi: u32,
110
+ @builtin(instance_index) ii: u32,
111
+ ) -> VSOut {
112
+ // Two-triangle quad corners in billboard-local space (camera-facing by construction).
113
+ // 12 verts/instance: 0..5 the LIT dot, 6..11 the cartoon offset-CAST shadow duplicate (the
114
+ // SAME instanced draw, zero new buffer — the 1940s layered-offset cast as a binding precept).
115
+ var corners = array<vec2<f32>, 6>(
116
+ vec2<f32>(-1.0, -1.0), vec2<f32>(1.0, -1.0), vec2<f32>(-1.0, 1.0),
117
+ vec2<f32>(-1.0, 1.0), vec2<f32>(1.0, -1.0), vec2<f32>(1.0, 1.0),
118
+ );
119
+ let isCast = vi >= 6u;
120
+ let local = corners[vi % 6u];
121
+
122
+ let dot = dots[ii].data;
123
+ var unitPos = dot.xyz; // the STATIC phyllotaxis position (JS-computed)
124
+ let sphereIdx = dot.w;
125
+
126
+ let breath = u.u4.w;
127
+ let pAct = u.u3.w;
128
+ let pointerNdc = vec2<f32>(u.u4.x * 2.0 - 1.0, 1.0 - u.u4.y * 2.0);
129
+ let isPlane = u.u6.x > 0.5;
130
+ let gravStrength = u.u6.y;
131
+ let gravRadius = max(u.u6.z, 1e-3);
132
+ let planeScale = u.u6.w;
133
+ // The reclaimed travel velocity → the lens-frame vector (host +y is DOWN → flip to NDC +up).
134
+ let velRaw = vec2<f32>(u.u7.x, -u.u7.y);
135
+ let vmag = length(velRaw) * VEL_SCALE;
136
+ let vdir = select(vec2<f32>(0.0, 0.0), velRaw / max(length(velRaw), 1e-5), length(velRaw) > 1e-5);
137
+ let wake = u.u7.w; // the spring-engaged active (ζ=0.7) → the wake LAGS + overshoots
138
+ let twkRate = u.u7.z;
139
+ // The per-dot twinkle phase — an on-GPU instance_index hash (no new buffer); the resting
140
+ // field becomes a LIVING warm constellation. uTime is pinned under PRM (deterministic capture).
141
+ let twkPhase = fract(sin(f32(ii) * 12.9898) * 43758.5453) * TAU;
142
+ let twk = twkRate * sin(u.u0.w * (twkRate + 0.6) + twkPhase);
143
+
144
+ var center2d: vec2<f32>;
145
+ var facing: f32;
146
+ var sizeTaper: f32;
147
+ var burstScale: f32;
148
+ var facingOpacity: f32;
149
+ var burstBright: f32;
150
+ var castLobe: f32 = 0.0; // the cartoon-cast strength (nearness·pAct), set per-register
151
+
152
+ if (isPlane) {
153
+ // ── The 2D-PLANE register → the DIRECTIONAL LIQUID LENS ──────────────────────
154
+ // A heavy liquid-glass lens dragged across a taut warm membrane: it LEADS its travel,
155
+ // STRETCHES the gathered dots along the travel axis, drags an ember comet-tail WAKE behind,
156
+ // and MAGNIFIES+refracts the lattice beneath it. (Replaces the symmetric 'toCursor*well' —
157
+ // clean break, no alias, no dual path; the reclaimed velocity makes the warp directional.)
158
+ let base2d = unitPos.xy * planeScale;
159
+
160
+ // 1. ANTICIPATION — the lens LEADS its math-center along travel (dots ahead feel it early).
161
+ let wellC = pointerNdc + vdir * wake * (gravRadius * INV_PHI2 * 0.4);
162
+ let toLens = wellC - base2d;
163
+
164
+ // 2. SQUASH / STRETCH — measure distance in a frame STRETCHED along travel (vol-preserving).
165
+ let along = dot2(toLens, vdir);
166
+ let perp = dot2(toLens, vec2<f32>(-vdir.y, vdir.x));
167
+ let stretch = 1.0 + clamp(vmag * STRETCH_GAIN, 0.0, INV_SQRT_PHI);
168
+ let dE = length(vec2<f32>(along / stretch, perp * stretch));
169
+ let well = gravStrength * exp(-(dE * dE) / (2.0 * gravRadius * gravRadius)) * pAct;
170
+ var lift = toLens * well;
171
+
172
+ // 3. COMET-TAIL WAKE — a pull streamed BEHIND the lens (overlapping action; follow-through).
173
+ let behind = max(0.0, -along);
174
+ let tail = wake * exp(-(behind * behind) / (gravRadius * gravRadius)) * vmag * WAKE_GAIN;
175
+ lift = lift - vdir * tail * gravRadius;
176
+ // The flick BURST over-extends the gather then the spring snaps it (the cartoon take).
177
+ let burstPull = toLens * (u.u3.z * 0.4 * exp(-(dE * dE) / (gravRadius * gravRadius))) * pAct;
178
+ center2d = base2d + lift + burstPull;
179
+
180
+ // 4. LENS OPTICS — the ellipse nearness drives magnify + brightness + the chromatic rim.
181
+ let nearness = exp(-(dE * dE) / (2.0 * gravRadius * gravRadius));
182
+ facing = nearness;
183
+ sizeTaper = 0.8 + LENS_MAGNIFY * nearness * pAct; // the dot SWELLS (a lens magnifies)
184
+ burstScale = 1.0 + u.u3.z * 0.6 * nearness;
185
+ // the comet-tail also reads via LUMINANCE (trailing dots glow ∝ behind·vmag — the PRIMARY
186
+ // wake witness; the displacement alone is fragile, the spike proved).
187
+ let wakeGlow = behind * vmag * 1.4 * pAct;
188
+ // 5. CONTENT-DEFERENTIAL VIGNETTE — dense edges, clear center (the field FRAMES the content);
189
+ // the cursor-lens RE-DENSIFIES the center it enters (the calm-until-touched duality).
190
+ var presence = mix(VIGNETTE_FLOOR, 1.0, smoothstep(0.0, 1.0, length(base2d) / max(planeScale, 1e-3)));
191
+ presence = max(presence, nearness * pAct);
192
+ // the resting TWINKLE floor + the lens bloom; the vignette modulates the whole field.
193
+ facingOpacity = (u.u2.x + u.u2.y * (0.5 + twk + 0.6 * nearness * pAct)) * presence;
194
+ burstBright = 1.0 + (0.5 * nearness + wakeGlow + u.u3.z * 0.8 * nearness) * pAct;
195
+ castLobe = nearness * pAct; // the cartoon offset-cast under the magnified lozenge
196
+ } else {
197
+ // ── The 3D-SPHERE register (the KEPT preset — "good") ────────────────────────
198
+ var sphereScale = u.u1.x; // uRadius
199
+ var sphereOffset = vec2<f32>(0.0, 0.0);
200
+ if (sphereIdx > 0.5) {
201
+ sphereScale = u.u1.x * u.u4.z; // uRadius * uSphere2Scale
202
+ sphereOffset = vec2<f32>(u.u5.x, u.u5.y); // uSphere2Offset
203
+ }
204
+ let n = u.spin * unitPos; // the rotated surface NORMAL (the §T2 facing source)
205
+ facing = facingTerm(n);
206
+ let screenN = n.xy * sphereScale + sphereOffset;
207
+ // The SAME screen-space DIRECTIONAL LENS as the plane (one warp idiom, both registers —
208
+ // the dim-idiom, no second mechanism): the surface dots smear toward the cursor ALONG
209
+ // travel + carry a wake (a finger pressing a dot-globe through glass). Bounded by 'facing'
210
+ // so the near hemisphere leads + the silhouette can't tear.
211
+ let toLensS = pointerNdc - screenN;
212
+ let alongS = dot2(toLensS, vdir);
213
+ let perpS = dot2(toLensS, vec2<f32>(-vdir.y, vdir.x));
214
+ let stretchS = 1.0 + clamp(vmag * STRETCH_GAIN, 0.0, INV_SQRT_PHI);
215
+ let dES = length(vec2<f32>(alongS / stretchS, perpS * stretchS));
216
+ let pd = dES;
217
+ // A repel pushes OUT, an attract pulls IN (u.u3.y sign); facing bounds the near hemisphere.
218
+ let well = exp(-(dES * dES) / (2.0 * gravRadius * gravRadius)) * gravStrength * u.u3.y * pAct * facing;
219
+ var lift = -toLensS * well; // toward (attract) / away (repel) per the u3.y sign baked above
220
+ // The comet-tail WAKE on the near hemisphere (streams behind the cursor along travel).
221
+ let behindS = max(0.0, -alongS);
222
+ let tailS = wake * exp(-(behindS * behindS) / (gravRadius * gravRadius)) * vmag * WAKE_GAIN * facing;
223
+ lift = lift - vdir * tailS * gravRadius * sign(u.u3.y);
224
+ let parallaxOff = pointerNdc * u.u3.x * pAct;
225
+ center2d = n.xy * sphereScale * breath + sphereOffset + lift + parallaxOff;
226
+ let nearnessS = exp(-(dES * dES) / (2.0 * gravRadius * gravRadius)) * facing;
227
+ sizeTaper = u.u2.z + u.u2.w * facing + LENS_MAGNIFY * 0.4 * nearnessS * pAct; // the lens magnify
228
+ burstScale = 1.0 + u.u3.z * exp(-(dES * dES) / (gravRadius * gravRadius));
229
+ let wakeGlowS = behindS * vmag * 1.0 * pAct * facing;
230
+ facingOpacity = u.u2.x + u.u2.y * facing + u.u2.y * twk * facing; // the twinkle rides the facing
231
+ burstBright = 1.0 + (u.u3.z * 0.8 * exp(-(dES * dES) / (gravRadius * gravRadius)) + wakeGlowS) * pAct;
232
+ castLobe = nearnessS * pAct; // the cartoon offset-cast under the smeared near-hemisphere
233
+ }
234
+
235
+ let dotR = u.u1.y * sizeTaper * burstScale; // uDotSize · taper · burst
236
+ let offX = local.x * dotR;
237
+ let offY = local.y * dotR;
238
+
239
+ // THE CARTOON OFFSET-CAST (the 1940s layered-offset shadow, a binding precept). Verts 6..11
240
+ // are a darkened, lower-α duplicate billboard offset along a √φ light vector (down-right),
241
+ // keyed off castLobe (nearness·pAct) so the shadow lobe appears ONLY under the magnified lens
242
+ // lozenge. When castLobe ≈ 0 the cast collapses to alpha 0 (the fragment discards it).
243
+ let lightVec = normalize(vec2<f32>(SQRT_PHI, -1.0)) * CAST_OFFSET * dotR;
244
+ let castShift = select(vec2<f32>(0.0, 0.0), lightVec, isCast);
245
+ let castStrength = select(1.0, smoothstep(0.05, 0.5, castLobe), isCast);
246
+
247
+ // The whole sphere + quad is built in a SQUARE space (so the globe stays circular); the
248
+ // final clip-space x divides by aspect so a wide canvas does not squash it into an
249
+ // ellipse (aspect ≥ 1 → x shrinks; aspect < 1 → x grows). This keeps the dot quads round
250
+ // AND the sphere circular in PIXELS regardless of the canvas aspect.
251
+ let aspect = max(u.u1.w, 1e-4);
252
+ let clipX = (center2d.x + offX + castShift.x) / aspect;
253
+ let clipY = center2d.y + offY + castShift.y;
254
+
255
+ var out: VSOut;
256
+ out.pos = vec4<f32>(clipX, clipY, 0.0, 1.0);
257
+ out.local = local;
258
+ out.cast = select(0.0, 1.0, isCast);
259
+ if (isCast) {
260
+ // The cast is a dark shadow lobe — full dark tone, lower α, gated by the cast strength.
261
+ out.bright = CAST_DARK;
262
+ out.alpha = clamp(u.u1.z * CAST_ALPHA * facingOpacity * castStrength, 0.0, 1.0);
263
+ out.tone = 1.0;
264
+ } else {
265
+ out.bright = facingOpacity * burstBright;
266
+ out.alpha = clamp(u.u1.z * facingOpacity * burstBright, 0.0, 1.0);
267
+ // The chromatic RIM refraction (REPLACES the old depth-only '1.0 - facing' tone — EXCISED,
268
+ // no double-write, no legacy). At rest the tone reads the depth/edge; under the lens a faint
269
+ // RIM band glows the warmer-amber stop (tone → 1), the iOS-27 glass chromatic refraction.
270
+ let rim = smoothstep(0.25, 0.6, 1.0 - facing) * RIM_CHROMA;
271
+ out.tone = clamp(max(1.0 - facing, rim * facing), 0.0, 1.0);
272
+ }
273
+ return out;
274
+ }
275
+
276
+ @fragment
277
+ fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
278
+ // The crisp fwidth-smoothstep SDF circle (the ONE AA canon — the band is ~1px wide at
279
+ // any DPR/zoom, so fine sub-2px dots stay crisp). d = |uv| - 1; aa = fwidth(d).
280
+ let d = length(in.local) - 1.0;
281
+ let aa = max(fwidth(d), 1e-4);
282
+ let coverage = 1.0 - smoothstep(-aa, aa, d);
283
+ if (coverage < 0.002) { discard; }
284
+ // The cartoon-cast billboard collapses to nothing away from the lens — drop the dead quads.
285
+ if (in.cast > 0.5 && in.alpha < 0.003) { discard; }
286
+
287
+ // The palette tints the dot by DEPTH (near-front cream → rim amber); the brightness lights
288
+ // the core. The near hemisphere reads as the bright warm-cream stop, the rim/far fading to
289
+ // the darker amber — the translucent dot-shell on both grounds.
290
+ let lin = samplePaletteLin(in.tone) * clamp(in.bright, 0.0, 1.6);
291
+ let alpha = in.alpha * coverage;
292
+ let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));
293
+ // Premultiplied-alpha output (the translucent dot-shell additive over the clear).
294
+ return vec4<f32>(rgb * alpha, alpha);
295
+ }
296
+ `, A = "#version 300 es\nprecision highp float;\n\n#define MAX_DOT_STOPS 4\n#define GOLDEN_ANGLE 2.399963229728653\n\n// ── The √φ proportion ladder (the liquid-lens constants; the line-for-line WGSL twin) ──\n#define PI_CONST 3.141592653589793\n#define TAU 6.283185307179586\n#define PHI 1.618033988749895\n#define SQRT_PHI 1.272019649514069\n#define INV_SQRT_PHI 0.7861513777574233\n#define INV_PHI2 0.3819660112501051\n#define VEL_SCALE 0.18\n#define STRETCH_GAIN 2.4\n#define WAKE_GAIN 12.0\n#define LENS_MAGNIFY SQRT_PHI\n#define RIM_CHROMA 1.0\n#define VIGNETTE_FLOOR INV_PHI2\n#define CAST_OFFSET 0.9\n#define CAST_DARK 0.0\n#define CAST_ALPHA 0.55\n\n// The static quad corner (6 verts: two triangles) + the instanced per-dot data. The draw is\n// 12 verts/instance: gl_VertexID 0..5 the lit dot, 6..11 the cartoon offset-CAST shadow (the\n// SAME instanced draw, zero new buffer). The corner is re-derived from gl_VertexID % 6.\nin vec4 aDot; // (unitPos.xyz, sphereIdx) — instanced (divisor 1)\n\nuniform vec4 uU0; // (resX, resY, dpr, time)\nuniform vec4 uU1; // (radius, dotSize, baseOpacity, aspect)\nuniform vec4 uU2; // (facingLo, facingHi, sizeLo, sizeHi)\nuniform vec4 uU3; // (parallax, pointerPush, pointerBloom, pointerActive)\nuniform vec4 uU4; // (pointerX, pointerY, sphere2Scale, breathRadius)\nuniform vec4 uU5; // (sphere2OffsetX, sphere2OffsetY, hasBackground, _pad)\nuniform vec4 uU6; // (layout, gravityStrength, gravityRadius, planeScale)\nuniform vec4 uU7; // (velX, velY, twinkleRate, wakeStrength)\nuniform mat3 uSpin; // the slow tilted Y-rotation\n\nout vec2 vLocal; // [-1,1] billboard-local for the SDF circle\nout float vBright; // facing-driven brightness\nout float vAlpha; // facing-driven opacity\nout float vTone; // palette tone (0 = bright cream near-front, 1 = amber rim)\nout float vCast; // 1 = the cartoon offset-cast shadow billboard, 0 = the lit dot\n\nfloat facingTerm(vec3 n) {\n return clamp(n.z * 0.5 + 0.5, 0.0, 1.0); // 1 = dead-front\n}\n\nvoid main() {\n // The two-triangle quad corners (6 verts), re-derived per gl_VertexID (no aCorner buffer).\n vec2 cornerLUT[6] = vec2[6](\n vec2(-1.0, -1.0), vec2(1.0, -1.0), vec2(-1.0, 1.0),\n vec2(-1.0, 1.0), vec2(1.0, -1.0), vec2(1.0, 1.0)\n );\n bool isCast = gl_VertexID >= 6;\n vec2 aCorner = cornerLUT[gl_VertexID % 6];\n\n vec3 unitPos = aDot.xyz;\n float sphereIdx = aDot.w;\n\n float breath = uU4.w;\n float pAct = uU3.w;\n vec2 pointerNdc = vec2(uU4.x * 2.0 - 1.0, 1.0 - uU4.y * 2.0);\n bool isPlane = uU6.x > 0.5;\n float gravStrength = uU6.y;\n float gravRadius = max(uU6.z, 1e-3);\n float planeScale = uU6.w;\n // The reclaimed travel velocity → the lens-frame vector (host +y is DOWN → flip to NDC +up).\n vec2 velRaw = vec2(uU7.x, -uU7.y);\n float vmag = length(velRaw) * VEL_SCALE;\n vec2 vdir = length(velRaw) > 1e-5 ? velRaw / max(length(velRaw), 1e-5) : vec2(0.0);\n float wake = uU7.w; // the spring-engaged active (ζ=0.7) → the wake LAGS + overshoots\n float twkRate = uU7.z;\n // The per-dot twinkle phase — an on-GPU instance hash (no new buffer); uTime pinned under PRM.\n float twkPhase = fract(sin(float(gl_InstanceID) * 12.9898) * 43758.5453) * TAU;\n float twk = twkRate * sin(uU0.w * (twkRate + 0.6) + twkPhase);\n\n vec2 center2d;\n float facing;\n float sizeTaper;\n float burstScale;\n float facingOpacity;\n float burstBright;\n float castLobe = 0.0;\n\n if (isPlane) {\n // ── The 2D-PLANE register → the DIRECTIONAL LIQUID LENS ──────────────────────\n vec2 base2d = unitPos.xy * planeScale;\n\n // 1. ANTICIPATION — the lens LEADS its math-center along travel.\n vec2 wellC = pointerNdc + vdir * wake * (gravRadius * INV_PHI2 * 0.4);\n vec2 toLens = wellC - base2d;\n\n // 2. SQUASH / STRETCH — measure distance in a frame STRETCHED along travel.\n float along = dot(toLens, vdir);\n float perp = dot(toLens, vec2(-vdir.y, vdir.x));\n float stretch = 1.0 + clamp(vmag * STRETCH_GAIN, 0.0, INV_SQRT_PHI);\n float dE = length(vec2(along / stretch, perp * stretch));\n float well = gravStrength * exp(-(dE * dE) / (2.0 * gravRadius * gravRadius)) * pAct;\n vec2 lift = toLens * well;\n\n // 3. COMET-TAIL WAKE — a pull streamed BEHIND the lens (follow-through).\n float behind = max(0.0, -along);\n float tail = wake * exp(-(behind * behind) / (gravRadius * gravRadius)) * vmag * WAKE_GAIN;\n lift -= vdir * tail * gravRadius;\n vec2 burstPull = toLens * (uU3.z * 0.4 * exp(-(dE * dE) / (gravRadius * gravRadius))) * pAct;\n center2d = base2d + lift + burstPull;\n\n // 4. LENS OPTICS — magnify + brightness + the chromatic rim.\n float nearness = exp(-(dE * dE) / (2.0 * gravRadius * gravRadius));\n facing = nearness;\n sizeTaper = 0.8 + LENS_MAGNIFY * nearness * pAct;\n burstScale = 1.0 + uU3.z * 0.6 * nearness;\n float wakeGlow = behind * vmag * 1.4 * pAct;\n // 5. CONTENT-DEFERENTIAL VIGNETTE — dense edges, clear center; the lens re-densifies it.\n float presence = mix(VIGNETTE_FLOOR, 1.0, smoothstep(0.0, 1.0, length(base2d) / max(planeScale, 1e-3)));\n presence = max(presence, nearness * pAct);\n facingOpacity = (uU2.x + uU2.y * (0.5 + twk + 0.6 * nearness * pAct)) * presence;\n burstBright = 1.0 + (0.5 * nearness + wakeGlow + uU3.z * 0.8 * nearness) * pAct;\n castLobe = nearness * pAct;\n } else {\n // ── The 3D-SPHERE register → the SAME directional lens (one warp idiom) ───────\n float sphereScale = uU1.x;\n vec2 sphereOffset = vec2(0.0);\n if (sphereIdx > 0.5) {\n sphereScale = uU1.x * uU4.z;\n sphereOffset = vec2(uU5.x, uU5.y);\n }\n vec3 n = uSpin * unitPos;\n facing = facingTerm(n);\n vec2 screenN = n.xy * sphereScale + sphereOffset;\n vec2 toLensS = pointerNdc - screenN;\n float alongS = dot(toLensS, vdir);\n float perpS = dot(toLensS, vec2(-vdir.y, vdir.x));\n float stretchS = 1.0 + clamp(vmag * STRETCH_GAIN, 0.0, INV_SQRT_PHI);\n float dES = length(vec2(alongS / stretchS, perpS * stretchS));\n float pd = dES;\n float well = exp(-(dES * dES) / (2.0 * gravRadius * gravRadius)) * gravStrength * uU3.y * pAct * facing;\n vec2 lift = -toLensS * well;\n float behindS = max(0.0, -alongS);\n float tailS = wake * exp(-(behindS * behindS) / (gravRadius * gravRadius)) * vmag * WAKE_GAIN * facing;\n lift -= vdir * tailS * gravRadius * sign(uU3.y);\n vec2 parallaxOff = pointerNdc * uU3.x * pAct;\n center2d = n.xy * sphereScale * breath + sphereOffset + lift + parallaxOff;\n float nearnessS = exp(-(dES * dES) / (2.0 * gravRadius * gravRadius)) * facing;\n sizeTaper = uU2.z + uU2.w * facing + LENS_MAGNIFY * 0.4 * nearnessS * pAct;\n burstScale = 1.0 + uU3.z * exp(-(dES * dES) / (gravRadius * gravRadius));\n float wakeGlowS = behindS * vmag * 1.0 * pAct * facing;\n facingOpacity = uU2.x + uU2.y * facing + uU2.y * twk * facing;\n burstBright = 1.0 + (uU3.z * 0.8 * exp(-(dES * dES) / (gravRadius * gravRadius)) + wakeGlowS) * pAct;\n castLobe = nearnessS * pAct;\n }\n\n float dotR = uU1.y * sizeTaper * burstScale;\n float offX = aCorner.x * dotR;\n float offY = aCorner.y * dotR;\n\n // THE CARTOON OFFSET-CAST — verts 6..11 are a dark, lower-α duplicate offset along a √φ\n // light vector (down-right), gated by castLobe so the lobe appears only under the lens.\n vec2 lightVec = normalize(vec2(SQRT_PHI, -1.0)) * CAST_OFFSET * dotR;\n vec2 castShift = isCast ? lightVec : vec2(0.0);\n float castStrength = isCast ? smoothstep(0.05, 0.5, castLobe) : 1.0;\n\n vLocal = aCorner;\n vCast = isCast ? 1.0 : 0.0;\n if (isCast) {\n vBright = CAST_DARK;\n vAlpha = clamp(uU1.z * CAST_ALPHA * facingOpacity * castStrength, 0.0, 1.0);\n vTone = 1.0;\n } else {\n vBright = facingOpacity * burstBright;\n vAlpha = clamp(uU1.z * facingOpacity * burstBright, 0.0, 1.0);\n // The chromatic RIM refraction (REPLACES the old depth-only 1.0-facing tone — EXCISED).\n float rim = smoothstep(0.25, 0.6, 1.0 - facing) * RIM_CHROMA;\n vTone = clamp(max(1.0 - facing, rim * facing), 0.0, 1.0);\n }\n\n // The whole sphere + quad is built in a SQUARE space (so the globe stays circular); the\n // final clip-space x divides by aspect so a wide canvas does not squash it into an ellipse.\n float aspect = max(uU1.w, 1e-4);\n gl_Position = vec4((center2d.x + offX + castShift.x) / aspect, center2d.y + offY + castShift.y, 0.0, 1.0);\n}", j = `#version 300 es
297
+ precision highp float;
298
+
299
+ #define MAX_DOT_STOPS 4
300
+
301
+ in vec2 vLocal;
302
+ in float vBright;
303
+ in float vAlpha;
304
+ in float vTone;
305
+ in float vCast;
306
+ out vec4 fragColor;
307
+
308
+ uniform vec4 uBg; // (background.rgb, hasBackground)
309
+ uniform int uStopCount;
310
+ uniform vec3 uPalette[MAX_DOT_STOPS]; // linear-sRGB stops
311
+
312
+ const mat2 FBM_ROT = mat2(0.8, 0.6, -0.6, 0.8);
313
+
314
+ // PI in scope for the spliced OKLCH hue fns (the procedural-color chunk contract:
315
+ // the consumer splices the matrices chunk + DEFINES PI FIRST — see
316
+ // procedural-color.glsl.ts §"PI being in scope"). The dot SDF main() reads only the
317
+ // OKLAB path, but the whole spliced chunk still compiles, so PI must be declared.
318
+ #define PI 3.141592653589793
319
+ ${r}
320
+ ${a}
321
+
322
+ vec3 samplePaletteLin(float t) {
323
+ if (uStopCount <= 1) return uPalette[0];
324
+ float n = float(uStopCount);
325
+ float ft = clamp(t, 0.0, 1.0) * (n - 1.0);
326
+ int i0 = int(floor(ft));
327
+ int i1 = min(i0 + 1, uStopCount - 1);
328
+ float f = ft - float(i0);
329
+ vec3 lmsA = LINEAR_SRGB_TO_LMS * uPalette[i0];
330
+ vec3 lmsB = LINEAR_SRGB_TO_LMS * uPalette[i1];
331
+ vec3 labA = LMS_TO_OKLAB * (sign(lmsA) * pow(abs(lmsA), vec3(1.0 / 3.0)));
332
+ vec3 labB = LMS_TO_OKLAB * (sign(lmsB) * pow(abs(lmsB), vec3(1.0 / 3.0)));
333
+ return oklabToLinearSrgb(mix(labA, labB, f));
334
+ }
335
+
336
+ void main() {
337
+ // The crisp fwidth-smoothstep SDF circle (the ONE AA canon; ~1px band at any DPR).
338
+ float d = length(vLocal) - 1.0;
339
+ float aa = max(fwidth(d), 1e-4);
340
+ float coverage = 1.0 - smoothstep(-aa, aa, d);
341
+ if (coverage < 0.002) discard;
342
+ // The cartoon-cast billboard collapses to nothing away from the lens — drop the dead quads.
343
+ if (vCast > 0.5 && vAlpha < 0.003) discard;
344
+
345
+ vec3 lin = samplePaletteLin(vTone) * clamp(vBright, 0.0, 1.6);
346
+ float alpha = vAlpha * coverage;
347
+ vec3 rgb = clamp(linearToSrgb(lin), vec3(0.0), vec3(1.0));
348
+ fragColor = vec4(rgb * alpha, alpha);
349
+ }`, M = 4e3, N = 4, P = [{
350
+ L: .92,
351
+ C: .03,
352
+ h: 78
353
+ }, {
354
+ L: .84,
355
+ C: .07,
356
+ h: 62
357
+ }], F = {
358
+ dotCount: 2400,
359
+ radius: .42,
360
+ dotSize: 1.8,
361
+ baseOpacity: .5,
362
+ depthFade: .85,
363
+ rotationSpeed: .07,
364
+ axisTilt: 23,
365
+ spheres: 1,
366
+ breathing: 0,
367
+ palette: P,
368
+ background: "transparent",
369
+ layout: "plane",
370
+ interactive: !0,
371
+ pointerMode: "attract",
372
+ parallax: .08,
373
+ gravityStrength: .62,
374
+ gravityRadius: .34,
375
+ twinkle: 0,
376
+ respectReducedMotion: !0
377
+ }, I = {
378
+ x: .62,
379
+ y: .32
380
+ }, L = .46;
381
+ function R() {
382
+ return {
383
+ x: .5,
384
+ y: .5,
385
+ active: 0,
386
+ push: 0,
387
+ bloom: 0,
388
+ velX: 0,
389
+ velY: 0,
390
+ accelMag: 0
391
+ };
392
+ }
393
+ var z = 272, B = {
394
+ u0: 0,
395
+ u1: 4,
396
+ u2: 8,
397
+ u3: 12,
398
+ u4: 16,
399
+ u5: 20,
400
+ u6: 24,
401
+ u7: 28,
402
+ spin0: 32,
403
+ spin1: 36,
404
+ spin2: 40,
405
+ ints: 44,
406
+ bg: 48,
407
+ palette: 52
408
+ };
409
+ function V() {
410
+ let e = new ArrayBuffer(z);
411
+ return {
412
+ buffer: e,
413
+ f32: new Float32Array(e),
414
+ i32: new Int32Array(e)
415
+ };
416
+ }
417
+ function H(e) {
418
+ let t = Math.min(Math.max(Math.floor(e.dotCount), 1), 4e3);
419
+ if (e.layout === "plane") {
420
+ let e = new Float32Array(t * 4), n = Math.max(1, Math.round(Math.sqrt(t))), r = Math.max(1, Math.ceil(t / n)), i = 0;
421
+ for (let a = 0; a < t; a++) {
422
+ let t = a % n, o = Math.floor(a / n), s = G((a + .5) * U), c = G((a + .5) * W), l = (t + s) / n, u = (o + c) / r;
423
+ e[i + 0] = l * 2 - 1, e[i + 1] = u * 2 - 1, e[i + 2] = 0, e[i + 3] = 0, i += 4;
424
+ }
425
+ return e;
426
+ }
427
+ let n = e.spheres === 2 ? 2 : 1, r = t * n, i = new Float32Array(r * 4), a = 0;
428
+ for (let e = 0; e < n; e++) for (let n = 0; n < t; n++) {
429
+ let r = y(n, t);
430
+ i[a + 0] = r.x, i[a + 1] = r.y, i[a + 2] = r.z, i[a + 3] = e, a += 4;
431
+ }
432
+ return i;
433
+ }
434
+ var U = .7548776662466927, W = .5698402909980532;
435
+ function G(e) {
436
+ return e - Math.floor(e);
437
+ }
438
+ function K(e) {
439
+ let t = Math.min(Math.max(Math.floor(e.dotCount), 1), 4e3);
440
+ return e.layout === "plane" ? t : t * (e.spheres === 2 ? 2 : 1);
441
+ }
442
+ function q(e, t, n) {
443
+ return e * t * 2 / Math.max(n, 1);
444
+ }
445
+ function J(e, t, n, r, i, a, o, s) {
446
+ let { f32: l, i32: u } = e, f = Math.min(r.w, r.h) || 1, p = r.w / Math.max(r.h, 1);
447
+ l[B.u0 + 0] = r.w, l[B.u0 + 1] = r.h, l[B.u0 + 2] = i, l[B.u0 + 3] = n, l[B.u1 + 0] = t.radius, l[B.u1 + 1] = q(t.dotSize, i, f), l[B.u1 + 2] = t.baseOpacity, l[B.u1 + 3] = p, l[B.u2 + 0] = .15, l[B.u2 + 1] = .85 * t.depthFade, l[B.u2 + 2] = .6, l[B.u2 + 3] = .4, l[B.u3 + 0] = t.parallax, l[B.u3 + 1] = a.push, l[B.u3 + 2] = a.bloom, l[B.u3 + 3] = a.active, l[B.u4 + 0] = a.x, l[B.u4 + 1] = a.y, l[B.u4 + 2] = L, l[B.u4 + 3] = o, l[B.u5 + 0] = I.x, l[B.u5 + 1] = I.y, l[B.u5 + 2] = t.background === "transparent" ? 0 : 1, l[B.u5 + 3] = 0;
448
+ let m = 1.18 * Math.max(p, 1);
449
+ l[B.u6 + 0] = +(t.layout === "plane"), l[B.u6 + 1] = t.gravityStrength, l[B.u6 + 2] = t.gravityRadius, l[B.u6 + 3] = m, l[B.u7 + 0] = a.velX, l[B.u7 + 1] = a.velY, l[B.u7 + 2] = t.twinkle, l[B.u7 + 3] = a.active;
450
+ let h = d(n, t.axisTilt * Math.PI / 180, t.rotationSpeed);
451
+ l[B.spin0 + 0] = h[0], l[B.spin0 + 1] = h[3], l[B.spin0 + 2] = h[6], l[B.spin0 + 3] = 0, l[B.spin1 + 0] = h[1], l[B.spin1 + 1] = h[4], l[B.spin1 + 2] = h[7], l[B.spin1 + 3] = 0, l[B.spin2 + 0] = h[2], l[B.spin2 + 1] = h[5], l[B.spin2 + 2] = h[8], l[B.spin2 + 3] = 0;
452
+ let g = Math.min(s.length, 4);
453
+ if (u[B.ints + 0] = g, u[B.ints + 1] = K(t), u[B.ints + 2] = t.spheres === 2 ? 2 : 1, u[B.ints + 3] = 0, t.background === "transparent") l[B.bg + 0] = 0, l[B.bg + 1] = 0, l[B.bg + 2] = 0, l[B.bg + 3] = 0;
454
+ else {
455
+ let e = c(t.background);
456
+ l[B.bg + 0] = e[0], l[B.bg + 1] = e[1], l[B.bg + 2] = e[2], l[B.bg + 3] = 1;
457
+ }
458
+ for (let e = 0; e < 4; e++) {
459
+ let t = B.palette + e * 4, n = c(s[Math.min(e, g - 1)] ?? s[0]);
460
+ l[t + 0] = n[0], l[t + 1] = n[1], l[t + 2] = n[2], l[t + 3] = 0;
461
+ }
462
+ return e;
463
+ }
464
+ //#endregion
465
+ //#region src/components/custom/dot-matrix/composables/useDotSphere.ts
466
+ var ee = 64, te = 128, Y = 8, X = 1, ne = 2, Z = 1.272019649514069;
467
+ function re(e) {
468
+ return {
469
+ w: e.width || 1,
470
+ h: e.height || 1
471
+ };
472
+ }
473
+ function ie(e) {
474
+ let { canvas: t, config: n, getPalette: r, pointer: i, shouldContinue: a, onFrame: s, getReducedMotion: c } = e;
475
+ return function(e, l, d) {
476
+ let f = e.createShaderModule({
477
+ label: "[DotMatrix] dot-matrix.wgsl",
478
+ code: k
479
+ }), p = H(n), m = K(n), h = e.createBuffer({
480
+ label: "[DotMatrix] dots",
481
+ size: m * 16,
482
+ usage: te | Y,
483
+ mappedAtCreation: !0
484
+ });
485
+ new Float32Array(h.getMappedRange()).set(p), h.unmap();
486
+ let g = e.createBuffer({
487
+ label: "[DotMatrix] render-uniforms",
488
+ size: V().buffer.byteLength,
489
+ usage: ee | Y
490
+ }), _ = e.createBindGroupLayout({
491
+ label: "[DotMatrix] bgl",
492
+ entries: [{
493
+ binding: 0,
494
+ visibility: X | ne,
495
+ buffer: { type: "uniform" }
496
+ }, {
497
+ binding: 1,
498
+ visibility: X,
499
+ buffer: { type: "read-only-storage" }
500
+ }]
501
+ }), v = e.createRenderPipeline({
502
+ label: "[DotMatrix] render-pipeline",
503
+ layout: e.createPipelineLayout({ bindGroupLayouts: [_] }),
504
+ vertex: {
505
+ module: f,
506
+ entryPoint: "vs_main"
507
+ },
508
+ fragment: {
509
+ module: f,
510
+ entryPoint: "fs_main",
511
+ targets: [{
512
+ format: d,
513
+ blend: {
514
+ color: {
515
+ srcFactor: "one",
516
+ dstFactor: "one-minus-src-alpha",
517
+ operation: "add"
518
+ },
519
+ alpha: {
520
+ srcFactor: "one",
521
+ dstFactor: "one-minus-src-alpha",
522
+ operation: "add"
523
+ }
524
+ }
525
+ }]
526
+ },
527
+ primitive: { topology: "triangle-list" }
528
+ }), y = e.createBindGroup({
529
+ label: "[DotMatrix] bg",
530
+ layout: _,
531
+ entries: [{
532
+ binding: 0,
533
+ resource: { buffer: g }
534
+ }, {
535
+ binding: 1,
536
+ resource: { buffer: h }
537
+ }]
538
+ }), b = V();
539
+ function x() {
540
+ let e = o(), n = t.clientWidth || 320, r = t.clientHeight || 320, i = Math.max(1, Math.round(n * e)), a = Math.max(1, Math.round(r * e));
541
+ (t.width !== i || t.height !== a) && (t.width = i, t.height = a);
542
+ }
543
+ function S(a) {
544
+ s?.(a);
545
+ let d = c?.() ? Z : a, f = o(), p = u(d, n.breathing, .6);
546
+ J(b, n, d, re(t), f, i, p, r()), e.queue.writeBuffer(g, 0, b.buffer);
547
+ let h = l.getCurrentTexture().createView(), _ = e.createCommandEncoder({ label: "[DotMatrix] frame" }), x = _.beginRenderPass({ colorAttachments: [{
548
+ view: h,
549
+ clearValue: ae(n),
550
+ loadOp: "clear",
551
+ storeOp: "store"
552
+ }] });
553
+ x.setPipeline(v), x.setBindGroup(0, y), x.draw(12, m, 0, 0), x.end(), e.queue.submit([_.finish()]);
554
+ }
555
+ return {
556
+ frame: S,
557
+ shouldContinue: a,
558
+ resize: x,
559
+ teardown: () => {
560
+ h.destroy(), g.destroy();
561
+ }
562
+ };
563
+ };
564
+ }
565
+ function ae(e) {
566
+ if (e.background === "transparent") return {
567
+ r: 0,
568
+ g: 0,
569
+ b: 0,
570
+ a: 0
571
+ };
572
+ let t = c(e.background);
573
+ return {
574
+ r: t[0],
575
+ g: t[1],
576
+ b: t[2],
577
+ a: 1
578
+ };
579
+ }
580
+ function Q(e, t, n) {
581
+ let r = e.createShader(t);
582
+ if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
583
+ let t = e.getShaderInfoLog(r);
584
+ throw e.deleteShader(r), Error(`[DotMatrix] shader compile failed: ${t}`);
585
+ }
586
+ return r;
587
+ }
588
+ function oe(e) {
589
+ let { canvas: t, config: n, getPalette: r, pointer: i, shouldContinue: a, onFrame: s, getReducedMotion: l } = e;
590
+ return function(e) {
591
+ let f = Q(e, e.VERTEX_SHADER, A), p = Q(e, e.FRAGMENT_SHADER, j), m = e.createProgram();
592
+ if (e.attachShader(m, f), e.attachShader(m, p), e.linkProgram(m), !e.getProgramParameter(m, e.LINK_STATUS)) throw Error(`[DotMatrix] link failed: ${e.getProgramInfoLog(m)}`);
593
+ e.deleteShader(f), e.deleteShader(p);
594
+ let h = H(n), g = K(n), _ = e.createVertexArray();
595
+ e.bindVertexArray(_);
596
+ let v = e.createBuffer();
597
+ e.bindBuffer(e.ARRAY_BUFFER, v), e.bufferData(e.ARRAY_BUFFER, h, e.STATIC_DRAW);
598
+ let y = e.getAttribLocation(m, "aDot");
599
+ e.enableVertexAttribArray(y), e.vertexAttribPointer(y, 4, e.FLOAT, !1, 0, 0), e.vertexAttribDivisor(y, 1), e.bindVertexArray(null);
600
+ let b = (t) => e.getUniformLocation(m, t), x = b("uU0"), S = b("uU1"), C = b("uU2"), w = b("uU3"), T = b("uU4"), E = b("uU5"), D = b("uU6"), O = b("uU7"), k = b("uSpin"), M = b("uBg"), N = b("uStopCount"), P = b("uPalette[0]");
601
+ function F() {
602
+ let n = o(), r = t.clientWidth || 320, i = t.clientHeight || 320, a = Math.max(1, Math.round(r * n)), s = Math.max(1, Math.round(i * n));
603
+ (t.width !== a || t.height !== s) && (t.width = a, t.height = s), e.viewport(0, 0, t.width, t.height);
604
+ }
605
+ function R(a) {
606
+ s?.(a);
607
+ let f = l?.() ? Z : a, p = o(), h = t.width || 1, v = t.height || 1, y = Math.min(h, v) || 1, b = h / Math.max(v, 1), A = u(f, n.breathing, .6);
608
+ if (e.useProgram(m), e.bindVertexArray(_), e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), n.background === "transparent") e.clearColor(0, 0, 0, 0);
609
+ else {
610
+ let t = c(n.background);
611
+ e.clearColor(t[0], t[1], t[2], 1);
612
+ }
613
+ e.clear(e.COLOR_BUFFER_BIT);
614
+ let j = n.dotSize * p * 2 / y;
615
+ e.uniform4f(x, h, v, p, f), e.uniform4f(S, n.radius, j, n.baseOpacity, b), e.uniform4f(C, .15, .85 * n.depthFade, .6, .4), e.uniform4f(w, n.parallax, i.push, i.bloom, i.active), e.uniform4f(T, i.x, i.y, L, A), e.uniform4f(E, I.x, I.y, n.background === "transparent" ? 0 : 1, 0);
616
+ let F = 1.18 * Math.max(b, 1);
617
+ e.uniform4f(D, +(n.layout === "plane"), n.gravityStrength, n.gravityRadius, F), e.uniform4f(O, i.velX, i.velY, n.twinkle, i.active);
618
+ let R = d(f, n.axisTilt * Math.PI / 180, n.rotationSpeed);
619
+ e.uniformMatrix3fv(k, !1, [
620
+ R[0],
621
+ R[3],
622
+ R[6],
623
+ R[1],
624
+ R[4],
625
+ R[7],
626
+ R[2],
627
+ R[5],
628
+ R[8]
629
+ ]);
630
+ let z = r(), B = Math.min(z.length, 4);
631
+ if (e.uniform1i(N, B), n.background === "transparent") e.uniform4f(M, 0, 0, 0, 0);
632
+ else {
633
+ let t = c(n.background);
634
+ e.uniform4f(M, t[0], t[1], t[2], 1);
635
+ }
636
+ let V = new Float32Array(12);
637
+ for (let e = 0; e < 4; e++) {
638
+ let t = c(z[Math.min(e, B - 1)] ?? z[0]);
639
+ V[e * 3 + 0] = t[0], V[e * 3 + 1] = t[1], V[e * 3 + 2] = t[2];
640
+ }
641
+ e.uniform3fv(P, V), e.drawArraysInstanced(e.TRIANGLES, 0, 12, g), e.bindVertexArray(null);
642
+ }
643
+ return {
644
+ frame: R,
645
+ shouldContinue: a,
646
+ resize: F,
647
+ teardown: () => {
648
+ e.deleteProgram(m), e.deleteVertexArray(_), e.deleteBuffer(v);
649
+ }
650
+ };
651
+ };
652
+ }
653
+ //#endregion
654
+ //#region src/components/custom/dot-matrix/composables/useDotMatrix.ts
655
+ function se(e) {
656
+ return e === "attract" ? -1 : 1;
657
+ }
658
+ function $(e, n) {
659
+ let { config: r, getPalette: i } = n, a = n.mode ?? "live", o = t({ respectReducedMotion: r.respectReducedMotion }), c = R(), l = null, u = 0, d = 0, f = 0;
660
+ function p(e, t, n, r, i, a) {
661
+ let o = 2 * Math.PI / Math.max(r, .001), s = t + (o * o * (n - e) - 2 * i * o * t) * a;
662
+ return [e + s * a, s];
663
+ }
664
+ function m(e) {
665
+ let t = u > 0 ? (e - u) * 1e3 : 16.7, n = Math.min(t / 1e3, .05);
666
+ if (u = e, o.tick(t), !r.interactive || !o.active.value) {
667
+ [c.active, f] = p(c.active, f, 0, .5, .7, n), [c.push, d] = p(c.push, d, 0, .5, .7, n), c.bloom *= .9, c.velX *= .9, c.velY *= .9, c.accelMag *= .9;
668
+ return;
669
+ }
670
+ let i = o.smoothedPosition.value;
671
+ c.x = i.x, c.y = i.y, [c.active, f] = p(c.active, f, 1, .42, .7, n);
672
+ let a = o.speed.value, s = se(r.pointerMode) * Math.min(1, .7 + a * .6);
673
+ [c.push, d] = p(c.push, d, s, .42, .7, n), c.bloom = Math.max(c.bloom * .9, o.burst.value);
674
+ let l = o.velocity.value;
675
+ c.velX = l.x, c.velY = l.y;
676
+ let m = o.acceleration.value;
677
+ c.accelMag = Math.hypot(m.x, m.y);
678
+ }
679
+ let h = () => {
680
+ o.onPointerEnter(), r.interactive && l?.wake();
681
+ }, g = (e) => {
682
+ o.onPointerMove(e), r.interactive && l?.wake();
683
+ }, _ = (e) => e.parentElement ?? e;
684
+ function v(e) {
685
+ let t = _(e);
686
+ t.addEventListener("pointermove", g), t.addEventListener("pointerenter", h), t.addEventListener("pointerleave", o.onPointerLeave);
687
+ }
688
+ function y(e) {
689
+ let t = _(e);
690
+ t.removeEventListener("pointermove", g), t.removeEventListener("pointerenter", h), t.removeEventListener("pointerleave", o.onPointerLeave);
691
+ }
692
+ let b = () => {
693
+ let t = e.value;
694
+ if (!t) return null;
695
+ if (!l) {
696
+ v(t);
697
+ let e = {
698
+ canvas: t,
699
+ config: r,
700
+ getPalette: i,
701
+ pointer: c,
702
+ shouldContinue: () => !0,
703
+ onFrame: m,
704
+ getReducedMotion: () => l?.reducedMotion ?? !1
705
+ };
706
+ l = s(t, {
707
+ mode: a,
708
+ respectReducedMotion: r.respectReducedMotion,
709
+ setupWGPU: ie(e),
710
+ setupGL: oe(e)
711
+ }), l.armAsync();
712
+ }
713
+ return l;
714
+ };
715
+ queueMicrotask(() => b());
716
+ let x = {
717
+ get backend() {
718
+ return b()?.backend ?? "webgpu";
719
+ },
720
+ pause: () => b()?.suspend("manual"),
721
+ resume: () => b()?.resume("manual"),
722
+ wake: () => b()?.wake(),
723
+ renderAt: (e) => b()?.renderAt(e),
724
+ get reducedMotion() {
725
+ return l?.reducedMotion ?? !1;
726
+ },
727
+ dispose: () => {
728
+ let t = e.value;
729
+ t && y(t), o.dispose(), l?.dispose();
730
+ }
731
+ };
732
+ return T(() => x.dispose()), x;
733
+ }
734
+ //#endregion
735
+ //#region src/components/custom/dot-matrix/DotMatrix.vue
736
+ var ce = /* @__PURE__ */ e(/* @__PURE__ */ C({
737
+ __name: "DotMatrix",
738
+ props: {
739
+ config: { default: () => F },
740
+ paused: {
741
+ type: Boolean,
742
+ default: !1
743
+ }
744
+ },
745
+ emits: ["update:paused"],
746
+ setup(e, { expose: t }) {
747
+ let n = D("canvasRef"), r = $(n, {
748
+ config: e.config,
749
+ getPalette: () => e.config.palette
750
+ });
751
+ O(() => e.paused, (e) => e ? r.pause() : r.resume(), { immediate: !0 });
752
+ let i = b(() => {
753
+ let t = e.config.background;
754
+ if (t !== "transparent") return `oklch(${t.L} ${t.C} ${t.h})`;
755
+ });
756
+ return t({
757
+ pause: r.pause,
758
+ resume: r.resume,
759
+ wake: r.wake,
760
+ renderAt: r.renderAt
761
+ }), (e, t) => (E(), x("div", {
762
+ class: "dot-matrix-wrapper",
763
+ style: w(i.value ? { background: i.value } : void 0)
764
+ }, [S("canvas", {
765
+ ref_key: "canvasRef",
766
+ ref: n,
767
+ class: "dot-matrix-canvas",
768
+ "aria-hidden": "true",
769
+ "data-testid": "dot-matrix-canvas"
770
+ }, null, 512)], 4));
771
+ }
772
+ }), [["__scopeId", "data-v-1f36e34c"]]);
773
+ //#endregion
774
+ export { F as DEFAULT_DOT_MATRIX_CONFIG, ce as DotMatrix, v as FACING_HI, m as FACING_LO, g as GOLDEN_ANGLE, f as GOLDEN_RATIO, M as MAX_DOTS, N as MAX_DOT_STOPS, l as SIZE_TAPER_BASE, h as SIZE_TAPER_GAIN, P as WARM_IDENTITY_PALETTE, _ as applyMat3, u as breathRadius, p as facingFade, y as fibonacciDot, d as spinMatrix, $ as useDotMatrix };