@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,89 @@
1
+ /** A 3-vector. */
2
+ export interface Vec3 {
3
+ x: number;
4
+ y: number;
5
+ z: number;
6
+ }
7
+ /** A row-major 3×3 matrix (the spin matrix the WGSL transcribes column-for-column). */
8
+ export type Mat3 = readonly [
9
+ number,
10
+ number,
11
+ number,
12
+ number,
13
+ number,
14
+ number,
15
+ number,
16
+ number,
17
+ number
18
+ ];
19
+ /** The depth-fade result — the per-dot opacity + size multipliers. */
20
+ export interface FacingFade {
21
+ /** The camera-facing opacity multiplier ∈ [facingLo, facingLo+facingHi]. */
22
+ opacity: number;
23
+ /** The depth-of-field size taper ∈ [0.6, 1.0]. */
24
+ size: number;
25
+ /** The raw facing term ∈ [0,1] (1 = dead-front, 0 = dead-back). */
26
+ facing: number;
27
+ }
28
+ /** The golden ratio φ = (1+√5)/2 ≈ 1.6180339887. */
29
+ export declare const GOLDEN_RATIO: number;
30
+ /** The golden angle = 2π/φ = π·(3−√5) ≈ 2.39996 rad ≈ 137.508° (the irrational azimuth). */
31
+ export declare const GOLDEN_ANGLE: number;
32
+ /**
33
+ * The Fibonacci-phyllotaxis position for dot `i` of `N` on the UNIT sphere — the
34
+ * area-centered half-offset variant (admits ANY `N`, the cheaper no-`acos` `y = cos(polar)`
35
+ * form). The WGSL `instance_index → unit position` mapping transcribes this EXACTLY (the
36
+ * F3 round-trip anchor):
37
+ *
38
+ * y = 1 − 2·(i + 0.5) / N // y ∈ (−1,1), the cos(polar) — even by AREA
39
+ * r = sqrt(1 − y²) // ring radius at that latitude
40
+ * theta = i · goldenAngle // the golden-angle azimuth spiral
41
+ * pos = (cos(theta)·r, y, sin(theta)·r)
42
+ *
43
+ * This beats lat-long (`theta = 2πi/cols, phi = πj/rows`, which clusters at the poles →
44
+ * banded rings) because the irrational golden ratio gives near-equal AREA with no
45
+ * resonance gaps (extremelearning.com.au; arXiv 0912.4540).
46
+ */
47
+ export declare function fibonacciDot(i: number, n: number): Vec3;
48
+ /** The opacity floor (a dead-back dot stays a faint shell point, never fully gone). */
49
+ export declare const FACING_LO = 0.15;
50
+ /** The opacity facing-gain (dead-front lifts to facingLo + facingHi). */
51
+ export declare const FACING_HI = 0.85;
52
+ /** The size depth-of-field taper base (a dead-back dot is 0.6× the dead-front size). */
53
+ export declare const SIZE_TAPER_BASE = 0.6;
54
+ /** The size depth-of-field taper gain. */
55
+ export declare const SIZE_TAPER_GAIN = 0.4;
56
+ /**
57
+ * The §T2 depth-fade — the part that makes the dot field READ as a sphere. After the spin,
58
+ * modulate per-dot opacity + size by the rotated-normal's camera-facing-ness (a SOFT
59
+ * falloff, NOT a binary back-face cull — the soft fade is what reads as a translucent
60
+ * shell vs a flat disc). For a sphere centered at origin the surface normal IS the
61
+ * normalized dot position, so the facing term is the rotated-normal's z:
62
+ *
63
+ * facing = clamp(n.z · 0.5 + 0.5, 0, 1) // 1 = dead-front, 0 = dead-back
64
+ * opacity = facingLo + facingHi · facing // 0.15 + 0.85·facing
65
+ * size = 0.6 + 0.4 · facing // the DOF dot-size taper
66
+ *
67
+ * `depthFade` ∈ [0,1] scales the facing GAIN (depthFade=1 → the full 0.85 shell read;
68
+ * depthFade=0 → flat uniform opacity, the no-shell degenerate the gate's clause-6 flat-
69
+ * uniform bite catches).
70
+ */
71
+ export declare function facingFade(normal: Vec3, depthFade?: number): FacingFade;
72
+ /**
73
+ * The spin matrix at time `t` — a slow Y-rotation about a gently TILTED axis (a tilted
74
+ * globe reads more alive than a dead-vertical spin). The axis is the Y-axis tilted by
75
+ * `axisTilt` (radians) toward +x; the rotation angle is `rate · t`. Returns a row-major
76
+ * mat3 the WGSL transcribes column-for-column (mat3x3 is column-major → the transpose is
77
+ * written as the SAME columns). A fixed `renderAt(t)` drives it deterministically for the
78
+ * π capture (the spin reads at the same `t` on every host).
79
+ */
80
+ export declare function spinMatrix(t: number, axisTilt: number, rate: number): Mat3;
81
+ /** Apply a row-major mat3 to a Vec3 (the rotated surface normal `n = spin · unitPos`). */
82
+ export declare function applyMat3(m: Mat3, v: Vec3): Vec3;
83
+ /**
84
+ * The breathing radius scalar at time `t` — a gentle `R·(1 + breathDepth·sin(t·breathRate))`
85
+ * pulse, the calmest non-dead register (`breathDepth ≈ 0.02`, far below the dot-flow sweep).
86
+ * Returns the multiplier on the base radius (1 at rest when `depth=0`). The WGSL transcribes
87
+ * the SAME `1 + depth·sin(t·rate)` form.
88
+ */
89
+ export declare function breathRadius(t: number, depth: number, rate: number): number;
@@ -0,0 +1,61 @@
1
+ import type { OklchStop } from "../../../../composables/color";
2
+ import { type DotMatrixConfig } from "../constants";
3
+ /** The byte size of one dot in the instance buffer (vec4<f32> = unitPos.xyz + sphereIdx). */
4
+ export declare const DOT_BYTES = 16;
5
+ /** The per-sphere offset of the SECOND globe (the reference two-globe composition). */
6
+ export declare const SPHERE2_OFFSET: {
7
+ readonly x: 0.62;
8
+ readonly y: 0.32;
9
+ };
10
+ /** The per-sphere scale of the SECOND globe (a smaller satellite). */
11
+ export declare const SPHERE2_SCALE = 0.46;
12
+ /** The transient pointer state the interactive arm writes (closed over, never the config). */
13
+ export interface DotPointerState {
14
+ /** Normalized-host pointer (0..1) → NDC offset; (0.5,0.5) is screen center. */
15
+ x: number;
16
+ y: number;
17
+ /** 1 while the pointer is over the host, 0 at rest (decays the parallax/dimple). */
18
+ active: number;
19
+ /** The repel/attract sign × strength (the dimple direction · velocity scale). */
20
+ push: number;
21
+ /** The accel-burst brightness/scale bloom 0..1 (the flick term). */
22
+ bloom: number;
23
+ /**
24
+ * The travel VELOCITY (normalized-host units/sec, the shared field's already-computed
25
+ * `pointer.velocity` — the dead-lever reclaim). Drives the anisotropic squash/stretch +
26
+ * the comet-tail wake direction. Mapped to NDC/frame deltas in the shader.
27
+ */
28
+ velX: number;
29
+ velY: number;
30
+ /** The flick-take ACCEL magnitude (`hypot(pointer.acceleration)`, also unused today). */
31
+ accelMag: number;
32
+ }
33
+ /** A fresh resting pointer state. */
34
+ export declare function restingPointer(): DotPointerState;
35
+ export declare const DOT_RENDER_UNIFORM_BYTES: number;
36
+ export interface DotUniformScratch {
37
+ buffer: ArrayBuffer;
38
+ f32: Float32Array;
39
+ i32: Int32Array;
40
+ }
41
+ export declare function createDotRenderScratch(): DotUniformScratch;
42
+ /**
43
+ * Build the STATIC Fibonacci-phyllotaxis instance buffer — `dotCount` dots per sphere,
44
+ * each `(unitPos.xyz, sphereIdx)`. The second sphere's dots are CONCATENATED with
45
+ * `sphereIdx = 1` so the shader resolves the per-sphere offset/scale. Built ONCE (the
46
+ * layout is time-invariant; the spin + depth-fade are per-frame). The WGSL
47
+ * `instance_index → unit position` mapping reads this buffer (it does NOT re-derive the
48
+ * phyllotaxis on the GPU — the JS+GPU agree by construction).
49
+ */
50
+ export declare function buildDotsBuffer(config: DotMatrixConfig): Float32Array;
51
+ /** The total dot instance count for a config (per-sphere × spheres; plane is single). */
52
+ export declare function dotInstanceCount(config: DotMatrixConfig): number;
53
+ /**
54
+ * Pack the per-frame render uniforms in place. `timeSec` drives the spin matrix + the
55
+ * breathing; `pointer` carries the interactive parallax/dimple/bloom; `palette` is the
56
+ * live ColorResolver stops (re-read each frame so a studio edit reaches the buffer).
57
+ */
58
+ export declare function packDotRenderUniforms(scratch: DotUniformScratch, config: DotMatrixConfig, timeSec: number, resolutionPx: {
59
+ w: number;
60
+ h: number;
61
+ }, dpr: number, pointer: DotPointerState, breathRadius: number, palette: OklchStop[]): DotUniformScratch;
@@ -0,0 +1,34 @@
1
+ import { type Ref } from "vue";
2
+ import { type GpuBackend } from "../../../../composables/glass/webgpu/useGpuSubstrate";
3
+ import type { OklchStop } from "../../../../composables/color";
4
+ import type { DotMatrixConfig } from "../constants";
5
+ export interface UseDotMatrixOptions {
6
+ config: DotMatrixConfig;
7
+ /** Resolve the dot-color palette as OKLCh (the demo themes it; default warm-identity). */
8
+ getPalette: () => OklchStop[];
9
+ /** `"capture"` → renderAt-only (the deterministic π capture path). Default `"live"`. */
10
+ mode?: "live" | "capture";
11
+ }
12
+ /** The uniform handle a consumer wires its lifecycle against (backend-agnostic). */
13
+ export interface DotMatrixHandle {
14
+ /** The resolved backend (`"webgpu"` where supported, else the WebGL2 fallback). */
15
+ readonly backend: GpuBackend;
16
+ /** Park the loop (the WCAG-2.2.2 pause seam — `DockBackgroundToggle` wires this). */
17
+ pause: () => void;
18
+ /** Re-arm the loop. */
19
+ resume: () => void;
20
+ /** Re-arm a parked loop on demand (a pointer/setter that re-introduced motion). */
21
+ wake: () => void;
22
+ /** Draw one frame out-of-loop (capture / thumbnail). */
23
+ renderAt: (timeSec: number) => void;
24
+ /** The live `prefers-reduced-motion: reduce` state. */
25
+ readonly reducedMotion: boolean;
26
+ /** Tear down the renderer + release GPU/GL resources. */
27
+ dispose: () => void;
28
+ }
29
+ /**
30
+ * Mount the dot-matrix renderer on `canvasRef`. The WebGPU primary runs the instanced-
31
+ * billboard render pass over the static phyllotaxis dots buffer; the WebGL2 fallback draws
32
+ * the SAME instanced billboards (the ONE math source). Returns the uniform lifecycle handle.
33
+ */
34
+ export declare function useDotMatrix(canvasRef: Ref<HTMLCanvasElement | null>, options: UseDotMatrixOptions): DotMatrixHandle;
@@ -0,0 +1,34 @@
1
+ import type { WebGPUCanvasFrame } from "../../../../composables/glass/webgpu/useWebGPUCanvas";
2
+ import type { WebGLCanvasFrame } from "../../../../composables/glass/webgl/useWebGLCanvas";
3
+ import type { OklchStop } from "../../../../composables/color";
4
+ import { type DotMatrixConfig } from "../constants";
5
+ import { restingPointer, type DotPointerState } from "./uniformBridgeWGPU";
6
+ export interface DotSetupDeps {
7
+ canvas: HTMLCanvasElement;
8
+ config: DotMatrixConfig;
9
+ /** The resolved (ColorResolver) palette stops as OKLCh — re-read each frame. */
10
+ getPalette: () => OklchStop[];
11
+ /** The live transient pointer state (the interactive parallax/dimple/bloom). */
12
+ pointer: DotPointerState;
13
+ /** Demand-gate (the renderer's quiescence layer — substrate-agnostic). */
14
+ shouldContinue: () => boolean;
15
+ /** The per-frame pointer hook — advances the shared field (the no-own-rAF discipline). */
16
+ onFrame?: (timeSec: number) => void;
17
+ /**
18
+ * The live `prefers-reduced-motion` state (read lazily — the handle resolves AFTER the
19
+ * setup closure is built). When true the frame PINS uTime to a fixed √φ rung so the spin
20
+ * AND the per-dot twinkle `sin` are bit-identical across runs (the deterministic static
21
+ * frame — G9). Capture mode is already deterministic via `renderAt(fixedT)`.
22
+ */
23
+ getReducedMotion?: () => boolean;
24
+ }
25
+ /** Build the dot-matrix `setupWGPU(device, context, format)` callback. */
26
+ export declare function createDotWGPUSetup(deps: DotSetupDeps): (device: GPUDevice, context: GPUCanvasContext, format: GPUTextureFormat) => WebGPUCanvasFrame;
27
+ /**
28
+ * Build the `setupGL(gl)` callback the `createGpuSubstrate` WebGL2 path invokes — the SAME
29
+ * instanced billboards via `gl.drawArraysInstanced`. It seeds the SAME JS phyllotaxis dot
30
+ * buffer the WGSL primary uses + splices the SHARED GLSL color chunk (the ONE color source
31
+ * → no drift between backends). No Canvas2D anywhere (§E).
32
+ */
33
+ export declare function createDotGLSetup(deps: DotSetupDeps): (gl: WebGL2RenderingContext) => WebGLCanvasFrame;
34
+ export { restingPointer };
@@ -0,0 +1,72 @@
1
+ import type { OklchStop } from "../../../composables/color";
2
+ /** Compile-time dot cap — mirrors the WGSL/GLSL instance-buffer array bound. */
3
+ export declare const MAX_DOTS = 4000;
4
+ /** Compile-time palette cap — mirrors the WGSL `MAX_DOT_STOPS` #define. */
5
+ export declare const MAX_DOT_STOPS = 4;
6
+ /** Pointer interaction mode — a repel pushes dots off the surface, attract pulls them in. */
7
+ export type DotPointerMode = "repel" | "attract";
8
+ /** The dot layout register — a 3D phyllotaxis SPHERE (kept) or a flat 2D background PLANE. */
9
+ export type DotLayout = "sphere" | "plane";
10
+ /**
11
+ * The full author schema — the studio's `useConfiguratorState` model. Every field is a
12
+ * tunable the demo configurator drives; the composable resolves it into the uniform table.
13
+ * A NEW schema (no prior `dot-matrix`, no MIGRATION row).
14
+ */
15
+ export interface DotMatrixConfig {
16
+ /** Dot count on the sphere surface (500–MAX_DOTS; the reference's fine field). */
17
+ dotCount: number;
18
+ /** Sphere radius as a fraction of the view min-dimension (0.2–0.9). */
19
+ radius: number;
20
+ /** Base dot billboard radius in px @ 1× (DPR-aware → crisp). */
21
+ dotSize: number;
22
+ /** The subtle resting opacity (0–1). */
23
+ baseOpacity: number;
24
+ /** Depth-fade strength (0–1; high = strong translucent-shell read). */
25
+ depthFade: number;
26
+ /** The slow dignified Y-spin in rad/s (0–0.3). */
27
+ rotationSpeed: number;
28
+ /** The rotation-axis tilt in degrees (a tilted globe reads more alive; ~23°). */
29
+ axisTilt: number;
30
+ /** The globe count (1 default; the reference two-globe composition is 2). */
31
+ spheres: 1 | 2;
32
+ /** The sub-perceptual breathing radius-pulse depth (0 default; demo 0.02). */
33
+ breathing: number;
34
+ /** The dot-color ramp (the demo themes it mono-white); resolved via the ColorResolver. */
35
+ palette: OklchStop[];
36
+ /** The ground color (the demo sets near-black; default transparent). */
37
+ background: OklchStop | "transparent";
38
+ /** The layout register — 3D sphere (kept preset) or a flat 2D background plane (the default). */
39
+ layout: DotLayout;
40
+ /** Pointer parallax + repel + accel-burst (the §T7 interaction). */
41
+ interactive: boolean;
42
+ /** repel ↔ attract (the dimple direction). */
43
+ pointerMode: DotPointerMode;
44
+ /** The pointer-parallax depth (0–0.3; the screen-center tracks the cursor). */
45
+ parallax: number;
46
+ /** The cursor-gravity well depth — how far a near dot is pulled toward the cursor (NDC). */
47
+ gravityStrength: number;
48
+ /** The cursor-gravity well radius — the falloff width (NDC; WIDE → many dots feel it). */
49
+ gravityRadius: number;
50
+ /**
51
+ * The resting per-dot TWINKLE rate (the living-constellation floor): each dot's opacity
52
+ * breathes on an `instance_index`-hashed phase at this rate (0 = a dead-still field; the
53
+ * demo lifts it). Frozen under PRM (the `sin` reads the pinned capture time).
54
+ */
55
+ twinkle: number;
56
+ /** ONE static frame then park under `prefers-reduced-motion: reduce`. */
57
+ respectReducedMotion: boolean;
58
+ }
59
+ /**
60
+ * The warm-cream identity palette (the library default — NOT teal). A two-stop warm-amber
61
+ * ramp over the warm-cream foreground family, mirroring the dot-flow `WARM_IDENTITY_PALETTE`.
62
+ * A consumer (the demo) themes it mono-warm-white-on-near-black through a PRESET, never a
63
+ * token edit.
64
+ */
65
+ export declare const WARM_IDENTITY_PALETTE: OklchStop[];
66
+ /**
67
+ * The shipped warm-identity default config — the §T5 SUBTLE + CALM register: ONE calm
68
+ * warm-cream globe of fine dots on a transparent ground (the glass card shows through),
69
+ * slowly rotating on a tilted axis. The depth-fade carries the sphere read; the second
70
+ * sphere + the breathing + the near-black ground are DEMO presets (presets-in-consumers).
71
+ */
72
+ export declare const DEFAULT_DOT_MATRIX_CONFIG: DotMatrixConfig;
@@ -0,0 +1,5 @@
1
+ export { default as DotMatrix } from "./DotMatrix.vue";
2
+ export { useDotMatrix, type DotMatrixHandle, type UseDotMatrixOptions, } from "./composables/useDotMatrix";
3
+ export { type DotMatrixConfig, type DotPointerMode, type DotLayout, DEFAULT_DOT_MATRIX_CONFIG, WARM_IDENTITY_PALETTE, MAX_DOTS, MAX_DOT_STOPS, } from "./constants";
4
+ export { type Vec3, type Mat3, type FacingFade, fibonacciDot, facingFade, spinMatrix, applyMat3, breathRadius, GOLDEN_RATIO, GOLDEN_ANGLE, FACING_LO, FACING_HI, SIZE_TAPER_BASE, SIZE_TAPER_GAIN, } from "./composables/dotMatrixField";
5
+ export type { OklchStop } from "../../../composables/color";
@@ -0,0 +1,4 @@
1
+ /** The instanced-billboard VERTEX shader (gl_VertexID quad + instanced dot attribute). */
2
+ export declare const DOT_MATRIX_VERT_GLSL = "#version 300 es\nprecision highp float;\n\n#define MAX_DOT_STOPS 4\n#define GOLDEN_ANGLE 2.399963229728653\n\n// \u2500\u2500 The \u221A\u03C6 proportion ladder (the liquid-lens constants; the line-for-line WGSL twin) \u2500\u2500\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) \u2014 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 \u2192 the lens-frame vector (host +y is DOWN \u2192 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 (\u03B6=0.7) \u2192 the wake LAGS + overshoots\n float twkRate = uU7.z;\n // The per-dot twinkle phase \u2014 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 // \u2500\u2500 The 2D-PLANE register \u2192 the DIRECTIONAL LIQUID LENS \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n vec2 base2d = unitPos.xy * planeScale;\n\n // 1. ANTICIPATION \u2014 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 \u2014 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 \u2014 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 \u2014 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 \u2014 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 // \u2500\u2500 The 3D-SPHERE register \u2192 the SAME directional lens (one warp idiom) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 \u2014 verts 6..11 are a dark, lower-\u03B1 duplicate offset along a \u221A\u03C6\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 \u2014 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}";
3
+ /** The crisp fwidth-SDF dot fragment (the ONE AA canon; splices the shared color chunk). */
4
+ export declare const DOT_MATRIX_FRAG_GLSL = "#version 300 es\nprecision highp float;\n\n#define MAX_DOT_STOPS 4\n\nin vec2 vLocal;\nin float vBright;\nin float vAlpha;\nin float vTone;\nin float vCast;\nout vec4 fragColor;\n\nuniform vec4 uBg; // (background.rgb, hasBackground)\nuniform int uStopCount;\nuniform vec3 uPalette[MAX_DOT_STOPS]; // linear-sRGB stops\n\nconst mat2 FBM_ROT = mat2(0.8, 0.6, -0.6, 0.8);\n\n// PI in scope for the spliced OKLCH hue fns (the procedural-color chunk contract:\n// the consumer splices the matrices chunk + DEFINES PI FIRST \u2014 see\n// procedural-color.glsl.ts \u00A7\"PI being in scope\"). The dot SDF main() reads only the\n// OKLAB path, but the whole spliced chunk still compiles, so PI must be declared.\n#define PI 3.141592653589793\n\nfloat srgbToLinearCh(float c) {\n return c <= 0.04045 ? c / 12.92 : pow((c + 0.055) / 1.055, 2.4);\n}\nvec3 srgbToLinear(vec3 c) {\n return vec3(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfloat linearToSrgbCh(float c) {\n return c <= 0.0031308 ? c * 12.92 : 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nvec3 linearToSrgb(vec3 c) {\n return vec3(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}\n\n// value.js LINEAR_SRGB_TO_LMS (constants.ts), row-major; written here as GLSL\n// columns (= the transpose) so mat3 * vec3 evaluates the row-major M\u00B7v.\nconst mat3 LINEAR_SRGB_TO_LMS = mat3(\n 0.4122214708, 0.2119034982, 0.0883024619,\n 0.5363325363, 0.6806995451, 0.2817188376,\n 0.0514459929, 0.1073969566, 0.6299787005\n);\n\n// value.js srgbToOKLab's INLINE LMS\u2192OKLab coefficients (gamut.ts lines 295-297 \u2014\n// these differ at the ~1e-9 digit from LMS_TO_OKLAB_MATRIX; use the inline ones to\n// mirror the exact value.js path), row-major \u2192 GLSL columns.\nconst mat3 LMS_TO_OKLAB = mat3(\n 0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660\n);\n\n// value.js OKLAB_TO_LMS_COEFF (constants.ts), row-major \u2192 GLSL columns. Rows:\n// l = [1, 0.3963377774, 0.2158037573], m = [1, -0.1055613458, -0.0638541728],\n// s = [1, -0.0894841775, -1.2914855480].\nconst mat3 OKLAB_TO_LMS = mat3(\n 1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480\n);\n\n// value.js LMS_TO_LINEAR_SRGB (constants.ts), row-major \u2192 GLSL columns.\nconst mat3 LMS_TO_LINEAR_SRGB = mat3(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\n// Gamma sRGB \u2192 raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nvec3 srgbToOklab(vec3 c) {\n vec3 lin = srgbToLinear(c);\n vec3 lms = LINEAR_SRGB_TO_LMS * lin;\n vec3 lmsCbrt = sign(lms) * pow(abs(lms), vec3(1.0 / 3.0));\n return LMS_TO_OKLAB * lmsCbrt;\n}\n\n// Raw OKLab (L, a, b) \u2192 linear sRGB. Mirrors value.js oklabToLinearSRGB.\nvec3 oklabToLinearSrgb(vec3 lab) {\n vec3 lms_ = OKLAB_TO_LMS * lab;\n vec3 lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab \u2192 OKLCh: H in RADIANS. Mirrors value.js rawOklabToOklch (which returns\n// degrees; we stay in radians and only fold to [0, 2pi)).\nvec3 oklabToOklch(vec3 lab) {\n float C = length(lab.yz);\n float H = atan(lab.z, lab.y);\n if (H < 0.0) H += 2.0 * PI;\n return vec3(lab.x, C, H);\n}\n\n// OKLCh (H radians) \u2192 OKLab. Mirrors value.js rawOklchToOklab.\nvec3 oklchToOklab(vec3 lch) {\n return vec3(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}\n\nvec3 samplePaletteLin(float t) {\n if (uStopCount <= 1) return uPalette[0];\n float n = float(uStopCount);\n float ft = clamp(t, 0.0, 1.0) * (n - 1.0);\n int i0 = int(floor(ft));\n int i1 = min(i0 + 1, uStopCount - 1);\n float f = ft - float(i0);\n vec3 lmsA = LINEAR_SRGB_TO_LMS * uPalette[i0];\n vec3 lmsB = LINEAR_SRGB_TO_LMS * uPalette[i1];\n vec3 labA = LMS_TO_OKLAB * (sign(lmsA) * pow(abs(lmsA), vec3(1.0 / 3.0)));\n vec3 labB = LMS_TO_OKLAB * (sign(lmsB) * pow(abs(lmsB), vec3(1.0 / 3.0)));\n return oklabToLinearSrgb(mix(labA, labB, f));\n}\n\nvoid main() {\n // The crisp fwidth-smoothstep SDF circle (the ONE AA canon; ~1px band at any DPR).\n float d = length(vLocal) - 1.0;\n float aa = max(fwidth(d), 1e-4);\n float coverage = 1.0 - smoothstep(-aa, aa, d);\n if (coverage < 0.002) discard;\n // The cartoon-cast billboard collapses to nothing away from the lens \u2014 drop the dead quads.\n if (vCast > 0.5 && vAlpha < 0.003) discard;\n\n vec3 lin = samplePaletteLin(vTone) * clamp(vBright, 0.0, 1.6);\n float alpha = vAlpha * coverage;\n vec3 rgb = clamp(linearToSrgb(lin), vec3(0.0), vec3(1.0));\n fragColor = vec4(rgb * alpha, alpha);\n}";
@@ -0,0 +1 @@
1
+ export declare const DOT_MATRIX_WGSL = "\nconst PI: f32 = 3.141592653589793;\nconst TAU: f32 = 6.283185307179586;\nconst MAX_DOT_STOPS: i32 = 4;\n// The golden-angle constant (transcribes dotMatrixField.ts GOLDEN_ANGLE = PI*(3-sqrt5)).\nconst GOLDEN_ANGLE: f32 = 2.399963229728653;\n\n// \u2500\u2500 The \u221A\u03C6 proportion ladder (the liquid-lens constants; Aristotelian, no magic numbers) \u2500\u2500\nconst PHI: f32 = 1.618033988749895; // the golden ratio \u03C6\nconst SQRT_PHI: f32 = 1.272019649514069; // \u221A\u03C6\nconst INV_SQRT_PHI: f32 = 0.7861513777574233; // 1/\u221A\u03C6 \u2248 the squash/stretch cap\nconst INV_PHI2: f32 = 0.3819660112501051; // 1/\u03C6\u00B2 \u2248 the anticipation-lead rung\n// The velocity (normalized-host/sec) \u2192 NDC/lens-frame scale: a sweep across the host reads as a\n// strong-but-bounded ellipse. The lens constants ladder off \u221A\u03C6 off this scaled vmag.\nconst VEL_SCALE: f32 = 0.18;\nconst STRETCH_GAIN: f32 = 2.4; // vmag \u2192 ellipse eccentricity gain\nconst WAKE_GAIN: f32 = 12.0; // the comet-tail displacement gain (spike-calibrated)\nconst LENS_MAGNIFY: f32 = SQRT_PHI; // the dot SWELLS \u221A\u03C6\u00D7 under the lens core (over the 0.8 base)\nconst RIM_CHROMA: f32 = 1.0; // the chromatic-rim tone gain (samples the warmer amber stop)\nconst VIGNETTE_FLOOR: f32 = INV_PHI2; // the resting center-clear floor (dense edges, clear center)\n// The cartoon 1940s offset-cast: a darkened, lower-\u03B1, offset duplicate billboard (the SAME\n// instanced draw, verts 6..11). The light vector is a \u221A\u03C6-proportioned down-right cast.\nconst CAST_OFFSET: f32 = 0.9; // the cast displacement (\u00D7 dot radius), down-right\nconst CAST_DARK: f32 = 0.0; // the cast samples pure-dark (a shadow lobe, not a tint)\nconst CAST_ALPHA: f32 = 0.55; // the cast's lower opacity (under the lit dot)\n\nstruct Dot {\n // (unitPos.xyz, sphereIdx)\n data: vec4<f32>,\n};\n\n// \u2500\u2500 Render uniforms (the typed-struct source-of-truth \u2014 see uniformBridgeWGPU.ts) \u2500\u2500\nstruct Uniforms {\n // u0: (uResolutionX, uResolutionY, uDpr, uTime)\n u0: vec4<f32>,\n // u1: (uRadius, uDotSize, uBaseOpacity, uAspect)\n u1: vec4<f32>,\n // u2: (uFacingLo, uFacingHi, uSizeLo, uSizeHi)\n u2: vec4<f32>,\n // u3: (uParallax, uPointerPush, uPointerBloom, uPointerActive)\n u3: vec4<f32>,\n // u4: (uPointerX, uPointerY, uSphere2Scale, uBreathRadius)\n u4: vec4<f32>,\n // u5: (uSphere2OffsetX, uSphere2OffsetY, uHasBackground, _pad)\n u5: vec4<f32>,\n // u6: (uLayout, uGravityStrength, uGravityRadius, uPlaneScale) // layout: 0 sphere \u00B7 1 plane\n u6: vec4<f32>,\n // u7: (uVelX, uVelY, uTwinkleRate, uWakeStrength) // the reclaimed travel-velocity lane\n u7: vec4<f32>,\n spin: mat3x3<f32>,\n // ints: (uStopCount, uDotCount, uSpheres, _pad)\n ints: vec4<i32>,\n // bg: (background.rgb, _pad)\n bg: vec4<f32>,\n palette: array<vec4<f32>, 4>,\n};\n\n@group(0) @binding(0) var<uniform> u: Uniforms;\n@group(0) @binding(1) var<storage, read> dots: array<Dot>;\n\n\nfn srgbToLinearCh(c: f32) -> f32 {\n if (c <= 0.04045) { return c / 12.92; }\n return pow((c + 0.055) / 1.055, 2.4);\n}\nfn srgbToLinear(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfn linearToSrgbCh(c: f32) -> f32 {\n if (c <= 0.0031308) { return c * 12.92; }\n return 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nfn linearToSrgb(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}\n\n// value.js LINEAR_SRGB_TO_LMS, row-major \u2192 WGSL columns (= the transpose).\nconst LINEAR_SRGB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 0.4122214708, 0.2119034982, 0.0883024619,\n 0.5363325363, 0.6806995451, 0.2817188376,\n 0.0514459929, 0.1073969566, 0.6299787005\n);\n\n// value.js srgbToOKLab's INLINE LMS\u2192OKLab coefficients, row-major \u2192 WGSL columns.\nconst LMS_TO_OKLAB: mat3x3<f32> = mat3x3<f32>(\n 0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660\n);\n\n// value.js OKLAB_TO_LMS_COEFF, row-major \u2192 WGSL columns.\nconst OKLAB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480\n);\n\n// value.js LMS_TO_LINEAR_SRGB, row-major \u2192 WGSL columns.\nconst LMS_TO_LINEAR_SRGB: mat3x3<f32> = mat3x3<f32>(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\nfn cbrt3(v: vec3<f32>) -> vec3<f32> {\n return sign(v) * pow(abs(v), vec3<f32>(1.0 / 3.0));\n}\n\n// Gamma sRGB \u2192 raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nfn srgbToOklab(c: vec3<f32>) -> vec3<f32> {\n let lin = srgbToLinear(c);\n let lms = LINEAR_SRGB_TO_LMS * lin;\n return LMS_TO_OKLAB * cbrt3(lms);\n}\n\n// Raw OKLab (L, a, b) \u2192 linear sRGB. Mirrors value.js oklabToLinearSRGB.\nfn oklabToLinearSrgb(lab: vec3<f32>) -> vec3<f32> {\n let lms_ = OKLAB_TO_LMS * lab;\n let lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab \u2192 OKLCh: H in RADIANS, folded to [0, 2pi). Mirrors value.js rawOklabToOklch.\nfn oklabToOklch(lab: vec3<f32>) -> vec3<f32> {\n let C = length(lab.yz);\n var H = atan2(lab.z, lab.y);\n if (H < 0.0) { H = H + 2.0 * PI; }\n return vec3<f32>(lab.x, C, H);\n}\n\n// OKLCh (H radians) \u2192 OKLab. Mirrors value.js rawOklchToOklab.\nfn oklchToOklab(lch: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}\n\n// The \u00A7T2 depth-fade (transcribes dotMatrixField.ts facingFade): the rotated-normal's z\n// \u2192 a SOFT facing term \u2192 opacity + size ramps. NOT a binary back-face cull.\nfn facingTerm(n: vec3<f32>) -> f32 {\n return clamp(n.z * 0.5 + 0.5, 0.0, 1.0); // 1 = dead-front, 0 = dead-back\n}\n\n// A 2D dot product \u2014 the local 'let dot = dots[ii].data' SHADOWS the WGSL 'dot()' builtin\n// inside vs_main, so the lens math calls this helper instead (the same value, un-shadowed).\nfn dot2(a: vec2<f32>, b: vec2<f32>) -> f32 {\n return a.x * b.x + a.y * b.y;\n}\n\n// Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].\nfn samplePaletteLin(t: f32) -> vec3<f32> {\n let stopCount = u.ints.x;\n if (stopCount <= 1) { return u.palette[0].rgb; }\n let n = f32(stopCount);\n let ft = clamp(t, 0.0, 1.0) * (n - 1.0);\n let i0 = i32(floor(ft));\n let i1 = min(i0 + 1, stopCount - 1);\n let f = ft - f32(i0);\n let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * u.palette[i0].rgb);\n let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * u.palette[i1].rgb);\n return oklabToLinearSrgb(mix(labA, labB, f));\n}\n\nstruct VSOut {\n @builtin(position) pos: vec4<f32>,\n @location(0) local: vec2<f32>, // [-1,1] billboard-local coords for the SDF circle\n @location(1) bright: f32, // facing-driven brightness [0, ~1.6]\n @location(2) alpha: f32, // facing-driven opacity\n @location(3) tone: f32, // palette tone (0 = bright cream near-front, 1 = amber rim)\n @location(4) cast: f32, // 1 = the cartoon offset-cast shadow billboard, 0 = the lit dot\n};\n\n@vertex\nfn vs_main(\n @builtin(vertex_index) vi: u32,\n @builtin(instance_index) ii: u32,\n) -> VSOut {\n // Two-triangle quad corners in billboard-local space (camera-facing by construction).\n // 12 verts/instance: 0..5 the LIT dot, 6..11 the cartoon offset-CAST shadow duplicate (the\n // SAME instanced draw, zero new buffer \u2014 the 1940s layered-offset cast as a binding precept).\n var corners = array<vec2<f32>, 6>(\n vec2<f32>(-1.0, -1.0), vec2<f32>(1.0, -1.0), vec2<f32>(-1.0, 1.0),\n vec2<f32>(-1.0, 1.0), vec2<f32>(1.0, -1.0), vec2<f32>(1.0, 1.0),\n );\n let isCast = vi >= 6u;\n let local = corners[vi % 6u];\n\n let dot = dots[ii].data;\n var unitPos = dot.xyz; // the STATIC phyllotaxis position (JS-computed)\n let sphereIdx = dot.w;\n\n let breath = u.u4.w;\n let pAct = u.u3.w;\n let pointerNdc = vec2<f32>(u.u4.x * 2.0 - 1.0, 1.0 - u.u4.y * 2.0);\n let isPlane = u.u6.x > 0.5;\n let gravStrength = u.u6.y;\n let gravRadius = max(u.u6.z, 1e-3);\n let planeScale = u.u6.w;\n // The reclaimed travel velocity \u2192 the lens-frame vector (host +y is DOWN \u2192 flip to NDC +up).\n let velRaw = vec2<f32>(u.u7.x, -u.u7.y);\n let vmag = length(velRaw) * VEL_SCALE;\n let vdir = select(vec2<f32>(0.0, 0.0), velRaw / max(length(velRaw), 1e-5), length(velRaw) > 1e-5);\n let wake = u.u7.w; // the spring-engaged active (\u03B6=0.7) \u2192 the wake LAGS + overshoots\n let twkRate = u.u7.z;\n // The per-dot twinkle phase \u2014 an on-GPU instance_index hash (no new buffer); the resting\n // field becomes a LIVING warm constellation. uTime is pinned under PRM (deterministic capture).\n let twkPhase = fract(sin(f32(ii) * 12.9898) * 43758.5453) * TAU;\n let twk = twkRate * sin(u.u0.w * (twkRate + 0.6) + twkPhase);\n\n var center2d: vec2<f32>;\n var facing: f32;\n var sizeTaper: f32;\n var burstScale: f32;\n var facingOpacity: f32;\n var burstBright: f32;\n var castLobe: f32 = 0.0; // the cartoon-cast strength (nearness\u00B7pAct), set per-register\n\n if (isPlane) {\n // \u2500\u2500 The 2D-PLANE register \u2192 the DIRECTIONAL LIQUID LENS \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // A heavy liquid-glass lens dragged across a taut warm membrane: it LEADS its travel,\n // STRETCHES the gathered dots along the travel axis, drags an ember comet-tail WAKE behind,\n // and MAGNIFIES+refracts the lattice beneath it. (Replaces the symmetric 'toCursor*well' \u2014\n // clean break, no alias, no dual path; the reclaimed velocity makes the warp directional.)\n let base2d = unitPos.xy * planeScale;\n\n // 1. ANTICIPATION \u2014 the lens LEADS its math-center along travel (dots ahead feel it early).\n let wellC = pointerNdc + vdir * wake * (gravRadius * INV_PHI2 * 0.4);\n let toLens = wellC - base2d;\n\n // 2. SQUASH / STRETCH \u2014 measure distance in a frame STRETCHED along travel (vol-preserving).\n let along = dot2(toLens, vdir);\n let perp = dot2(toLens, vec2<f32>(-vdir.y, vdir.x));\n let stretch = 1.0 + clamp(vmag * STRETCH_GAIN, 0.0, INV_SQRT_PHI);\n let dE = length(vec2<f32>(along / stretch, perp * stretch));\n let well = gravStrength * exp(-(dE * dE) / (2.0 * gravRadius * gravRadius)) * pAct;\n var lift = toLens * well;\n\n // 3. COMET-TAIL WAKE \u2014 a pull streamed BEHIND the lens (overlapping action; follow-through).\n let behind = max(0.0, -along);\n let tail = wake * exp(-(behind * behind) / (gravRadius * gravRadius)) * vmag * WAKE_GAIN;\n lift = lift - vdir * tail * gravRadius;\n // The flick BURST over-extends the gather then the spring snaps it (the cartoon take).\n let burstPull = toLens * (u.u3.z * 0.4 * exp(-(dE * dE) / (gravRadius * gravRadius))) * pAct;\n center2d = base2d + lift + burstPull;\n\n // 4. LENS OPTICS \u2014 the ellipse nearness drives magnify + brightness + the chromatic rim.\n let nearness = exp(-(dE * dE) / (2.0 * gravRadius * gravRadius));\n facing = nearness;\n sizeTaper = 0.8 + LENS_MAGNIFY * nearness * pAct; // the dot SWELLS (a lens magnifies)\n burstScale = 1.0 + u.u3.z * 0.6 * nearness;\n // the comet-tail also reads via LUMINANCE (trailing dots glow \u221D behind\u00B7vmag \u2014 the PRIMARY\n // wake witness; the displacement alone is fragile, the spike proved).\n let wakeGlow = behind * vmag * 1.4 * pAct;\n // 5. CONTENT-DEFERENTIAL VIGNETTE \u2014 dense edges, clear center (the field FRAMES the content);\n // the cursor-lens RE-DENSIFIES the center it enters (the calm-until-touched duality).\n var presence = mix(VIGNETTE_FLOOR, 1.0, smoothstep(0.0, 1.0, length(base2d) / max(planeScale, 1e-3)));\n presence = max(presence, nearness * pAct);\n // the resting TWINKLE floor + the lens bloom; the vignette modulates the whole field.\n facingOpacity = (u.u2.x + u.u2.y * (0.5 + twk + 0.6 * nearness * pAct)) * presence;\n burstBright = 1.0 + (0.5 * nearness + wakeGlow + u.u3.z * 0.8 * nearness) * pAct;\n castLobe = nearness * pAct; // the cartoon offset-cast under the magnified lozenge\n } else {\n // \u2500\u2500 The 3D-SPHERE register (the KEPT preset \u2014 \"good\") \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 var sphereScale = u.u1.x; // uRadius\n var sphereOffset = vec2<f32>(0.0, 0.0);\n if (sphereIdx > 0.5) {\n sphereScale = u.u1.x * u.u4.z; // uRadius * uSphere2Scale\n sphereOffset = vec2<f32>(u.u5.x, u.u5.y); // uSphere2Offset\n }\n let n = u.spin * unitPos; // the rotated surface NORMAL (the \u00A7T2 facing source)\n facing = facingTerm(n);\n let screenN = n.xy * sphereScale + sphereOffset;\n // The SAME screen-space DIRECTIONAL LENS as the plane (one warp idiom, both registers \u2014\n // the dim-idiom, no second mechanism): the surface dots smear toward the cursor ALONG\n // travel + carry a wake (a finger pressing a dot-globe through glass). Bounded by 'facing'\n // so the near hemisphere leads + the silhouette can't tear.\n let toLensS = pointerNdc - screenN;\n let alongS = dot2(toLensS, vdir);\n let perpS = dot2(toLensS, vec2<f32>(-vdir.y, vdir.x));\n let stretchS = 1.0 + clamp(vmag * STRETCH_GAIN, 0.0, INV_SQRT_PHI);\n let dES = length(vec2<f32>(alongS / stretchS, perpS * stretchS));\n let pd = dES;\n // A repel pushes OUT, an attract pulls IN (u.u3.y sign); facing bounds the near hemisphere.\n let well = exp(-(dES * dES) / (2.0 * gravRadius * gravRadius)) * gravStrength * u.u3.y * pAct * facing;\n var lift = -toLensS * well; // toward (attract) / away (repel) per the u3.y sign baked above\n // The comet-tail WAKE on the near hemisphere (streams behind the cursor along travel).\n let behindS = max(0.0, -alongS);\n let tailS = wake * exp(-(behindS * behindS) / (gravRadius * gravRadius)) * vmag * WAKE_GAIN * facing;\n lift = lift - vdir * tailS * gravRadius * sign(u.u3.y);\n let parallaxOff = pointerNdc * u.u3.x * pAct;\n center2d = n.xy * sphereScale * breath + sphereOffset + lift + parallaxOff;\n let nearnessS = exp(-(dES * dES) / (2.0 * gravRadius * gravRadius)) * facing;\n sizeTaper = u.u2.z + u.u2.w * facing + LENS_MAGNIFY * 0.4 * nearnessS * pAct; // the lens magnify\n burstScale = 1.0 + u.u3.z * exp(-(dES * dES) / (gravRadius * gravRadius));\n let wakeGlowS = behindS * vmag * 1.0 * pAct * facing;\n facingOpacity = u.u2.x + u.u2.y * facing + u.u2.y * twk * facing; // the twinkle rides the facing\n burstBright = 1.0 + (u.u3.z * 0.8 * exp(-(dES * dES) / (gravRadius * gravRadius)) + wakeGlowS) * pAct;\n castLobe = nearnessS * pAct; // the cartoon offset-cast under the smeared near-hemisphere\n }\n\n let dotR = u.u1.y * sizeTaper * burstScale; // uDotSize \u00B7 taper \u00B7 burst\n let offX = local.x * dotR;\n let offY = local.y * dotR;\n\n // THE CARTOON OFFSET-CAST (the 1940s layered-offset shadow, a binding precept). Verts 6..11\n // are a darkened, lower-\u03B1 duplicate billboard offset along a \u221A\u03C6 light vector (down-right),\n // keyed off castLobe (nearness\u00B7pAct) so the shadow lobe appears ONLY under the magnified lens\n // lozenge. When castLobe \u2248 0 the cast collapses to alpha 0 (the fragment discards it).\n let lightVec = normalize(vec2<f32>(SQRT_PHI, -1.0)) * CAST_OFFSET * dotR;\n let castShift = select(vec2<f32>(0.0, 0.0), lightVec, isCast);\n let castStrength = select(1.0, smoothstep(0.05, 0.5, castLobe), isCast);\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\n // ellipse (aspect \u2265 1 \u2192 x shrinks; aspect < 1 \u2192 x grows). This keeps the dot quads round\n // AND the sphere circular in PIXELS regardless of the canvas aspect.\n let aspect = max(u.u1.w, 1e-4);\n let clipX = (center2d.x + offX + castShift.x) / aspect;\n let clipY = center2d.y + offY + castShift.y;\n\n var out: VSOut;\n out.pos = vec4<f32>(clipX, clipY, 0.0, 1.0);\n out.local = local;\n out.cast = select(0.0, 1.0, isCast);\n if (isCast) {\n // The cast is a dark shadow lobe \u2014 full dark tone, lower \u03B1, gated by the cast strength.\n out.bright = CAST_DARK;\n out.alpha = clamp(u.u1.z * CAST_ALPHA * facingOpacity * castStrength, 0.0, 1.0);\n out.tone = 1.0;\n } else {\n out.bright = facingOpacity * burstBright;\n out.alpha = clamp(u.u1.z * facingOpacity * burstBright, 0.0, 1.0);\n // The chromatic RIM refraction (REPLACES the old depth-only '1.0 - facing' tone \u2014 EXCISED,\n // no double-write, no legacy). At rest the tone reads the depth/edge; under the lens a faint\n // RIM band glows the warmer-amber stop (tone \u2192 1), the iOS-27 glass chromatic refraction.\n let rim = smoothstep(0.25, 0.6, 1.0 - facing) * RIM_CHROMA;\n out.tone = clamp(max(1.0 - facing, rim * facing), 0.0, 1.0);\n }\n return out;\n}\n\n@fragment\nfn fs_main(in: VSOut) -> @location(0) vec4<f32> {\n // The crisp fwidth-smoothstep SDF circle (the ONE AA canon \u2014 the band is ~1px wide at\n // any DPR/zoom, so fine sub-2px dots stay crisp). d = |uv| - 1; aa = fwidth(d).\n let d = length(in.local) - 1.0;\n let aa = max(fwidth(d), 1e-4);\n let coverage = 1.0 - smoothstep(-aa, aa, d);\n if (coverage < 0.002) { discard; }\n // The cartoon-cast billboard collapses to nothing away from the lens \u2014 drop the dead quads.\n if (in.cast > 0.5 && in.alpha < 0.003) { discard; }\n\n // The palette tints the dot by DEPTH (near-front cream \u2192 rim amber); the brightness lights\n // the core. The near hemisphere reads as the bright warm-cream stop, the rim/far fading to\n // the darker amber \u2014 the translucent dot-shell on both grounds.\n let lin = samplePaletteLin(in.tone) * clamp(in.bright, 0.0, 1.6);\n let alpha = in.alpha * coverage;\n let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));\n // Premultiplied-alpha output (the translucent dot-shell additive over the clear).\n return vec4<f32>(rgb * alpha, alpha);\n}\n";
@@ -20,11 +20,11 @@ type __VLS_ModelProps = {
20
20
  modelValue?: EasingPickerValue;
21
21
  };
22
22
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
23
- declare var __VLS_73: {
23
+ declare var __VLS_78: {
24
24
  value: EasingPickerValue;
25
25
  };
26
26
  type __VLS_Slots = {} & {
27
- footer?: (props: typeof __VLS_73) => any;
27
+ footer?: (props: typeof __VLS_78) => any;
28
28
  };
29
29
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
30
  "update:modelValue": (value: EasingPickerValue | undefined) => any;
@@ -47,6 +47,11 @@ export interface UseEasingPickerReturn {
47
47
  easingFn: ComputedRef<EasingFn>;
48
48
  /** The complete re-parseable readout literal for the active mode. */
49
49
  readout: ComputedRef<string>;
50
+ /** Whether the steps-mode readout round-trips through value.js `parseSteps`
51
+ * back to the live (n, term) — the boundary-law proof that the painted
52
+ * staircase IS a re-parseable value.js literal, not a hand-rolled string
53
+ * the catalogue cannot read back. `true` in bezier mode (no steps literal). */
54
+ reparseOk: ComputedRef<boolean>;
50
55
  /** The full v-model payload (mode + css + fn + raw params). */
51
56
  value: ComputedRef<EasingPickerValue>;
52
57
  /** Two SVG-space handle coords `[{x,y},{x,y}]` (bezier mode). */
@@ -45,9 +45,20 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
45
45
  expandLabel: string;
46
46
  collapseLabel: string;
47
47
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
48
+ 'expand-trigger'?: (props: {
49
+ expand: () => void;
50
+ label: string;
51
+ }) => any;
52
+ } & {
48
53
  default?: (props: {
49
54
  fullscreen: boolean;
50
55
  }) => any;
56
+ } & {
57
+ 'fullscreen-chrome'?: (props: {
58
+ collapse: () => void;
59
+ label: string;
60
+ fullscreen: boolean;
61
+ }) => any;
51
62
  } & {
52
63
  default?: (props: {
53
64
  fullscreen: boolean;
@@ -1,61 +1,58 @@
1
- import type { ColorResolver } from "../../../composables/color";
1
+ import type { ColorResolver, OklchStop } from "../../../composables/color";
2
+ import { type BasisComponent } from "./math";
3
+ import type { FourierFieldConfig } from "./constants";
2
4
  /**
3
- * FourierField — a Fourier epicycle field on a Canvas2D surface, a sibling
4
- * primitive to Aurora and GooBlob. A seeded elliptic spectrum reconstructs a
5
- * slow, never-ending closed curve via the inverse DFT; a fading comet trail
6
- * chases the curve's head, and (in the `hero` preset) the nested epicycle
7
- * circles and arms draw underneath in a harmonious second hue. It composes the
8
- * `useCanvas2D` substrate, so it inherits the offscreen / tab-hidden /
9
- * reduced-motion freeze for free — no hand-rolled RAF-park.
5
+ * FourierField — a Fourier epicycle field on the GPU substrate (BC.W-VIZ-FOURIER), a
6
+ * sibling primitive to Aurora, GooBlob, and DotFlowField. A chain of rotating circles
7
+ * stacked tip-to-tail draws the reconstructing partial-sum curve; a glowing comet head
8
+ * leads the fading trail. WebGPU-FIRST: the compute pass writes the partial-sum curve +
9
+ * the epicycle chain tips, the fullscreen-fragment render pass composites the SDF field; a
10
+ * WebGL2 GLSL twin is the genuinely-absent-tail fallback (the §E "WebGPU everywhere"
11
+ * mandate — the Canvas2D renderer is RETIRED). It composes `useFourierField` → the
12
+ * `createGpuSubstrate` picker over the ONE canvas lifecycle leaf (offscreen-pause, live-PRM
13
+ * freeze, consumer-owned DPR) and the SHARED `usePointerVelocityField` (the pointer SCRUBS
14
+ * the reconstruction).
10
15
  *
11
- * Color resolves through the same INJECTED `colorResolver` seam as GooBlob: the
12
- * field paints the gamma-sRGB triple it returns. The prop is REQUIRED — pass
13
- * `defaultBlobColorResolver` from `@mkbabb/glass-ui/color` so a `var()` /
14
- * `light-dark()` token, an `oklch()` / `hsl()` / hex string all resolve. A
15
- * `var()` token is first resolved to a concrete `rgb()` against the host's
16
- * inherited color-scheme, then re-resolved on a color change AND on a dark-mode
17
- * toggle so the field retints with the theme.
16
+ * The DEFAULT palette is the warm-cream library identity (`--viz-fourier` warm-amber); a
17
+ * demo Teal/cool preset stays demo-LOCAL (presets-in-consumers — never a library token).
18
18
  *
19
- * `variant` is the configuration BUNDLE, not a recolour of one curve: `hero`
20
- * draws a few big phasors with the epicycles ON and a warm trail feel; `final`
21
- * draws a denser elliptic spectrum with the epicycles OFF. One engine, two
22
- * presets. The hue itself always comes from the consumer's `color`.
23
- *
24
- * BB.W-CARVE3 — the ~475-line renderer lives in `composables/useFourierField.ts`
25
- * (the colocation symmetry Aurora/`useAurora.ts`, GooBlob/`useMetaballRenderer.ts`
26
- * and Constellation/`useConstellation.ts` already carry). The SFC stays thin: the
27
- * props, the two template refs, and the single `useFourierField(props, …)` call.
19
+ * The `variant: "hero"|"final"` prop is RETIRED (BC.W-VIZ-FOURIER — the bundles fold into
20
+ * config presets, MIGRATION row). An ambient-background consumer passes `color` (+ the
21
+ * `colorResolver`) for a thin warm default preserving the recessive look; the studio passes
22
+ * the full `config` + `spectrum` + `getPalette`.
28
23
  */
29
24
  type __VLS_Props = {
30
- /** Configuration bundle. `hero` = epicycles on, fewer harmonics; `final` = epicycles off, denser. Default `hero`. */
31
- variant?: "hero" | "final";
32
- /** Base CSS color (any form the resolver understands; a `var()`/`light-dark()` token resolves against the host). */
33
- color: string;
34
- /** REQUIRED color seam — resolves a concrete color to a gamma-sRGB [r,g,b] triple in [0,1]. */
35
- colorResolver: ColorResolver;
36
- /** Extra seed mixed into the spectrum PRNG for a unique-but-reproducible curve. Default "". */
25
+ /** The full author config (the studio's `useConfiguratorState` model). Defaults to the warm identity. */
26
+ config?: FourierFieldConfig;
27
+ /** An explicit CPU-minted spectrum (a curated shape's DFT). When absent, a seeded elliptic spectrum is generated. */
28
+ spectrum?: readonly BasisComponent[];
29
+ /** Resolve the curve palette as OKLCh (the studio themes it). When absent, `color`/`config.palette` is used. */
30
+ getPalette?: () => OklchStop[];
31
+ /** Ambient-consumer color seam — a `var()`/`light-dark()` token or a literal; derives a warm 2-stop palette. */
32
+ color?: string;
33
+ /** The color resolver (the GooBlob/Aurora seam) — required when `color` is a `var()` token. */
34
+ colorResolver?: ColorResolver;
35
+ /** Extra seed mixed into the generated elliptic spectrum PRNG. Default "". */
37
36
  seed?: string;
38
- /** When true, paint ONE static deterministic best-frame and never animate (the capture/export lever). Default false. */
37
+ /** Paint ONE static deterministic best-frame and never animate (the capture lever). Default false. */
39
38
  freeze?: boolean;
40
- /** Outer loudness envelope (the Aurora `opacityCeiling` shape). Scales the
41
- * resolved `peakAlpha`/`headGlowAlpha` at the PAINT layer (a per-LAYER
42
- * multiply, not a uniform CSS opacity). Default 1 (the bundle's resting
43
- * loudness); clamped [0, 2] — the field's ~2 upper bound lets a hero push
44
- * brighter than the recessed default without runaway. */
39
+ /** Outer loudness envelope (scales the per-layer alpha). When set, overrides `config.intensity`; clamped [0,2]. */
45
40
  intensity?: number;
46
- /** OPTIONAL injected clock — a getter returning the loop parameter `t ∈ [0,1)`.
47
- * When BOUND, the render reads `clock()` (a controllable studio clock: pause,
48
- * scrub, speed); when ABSENT (the ambient face), the autonomous
49
- * `(now / durationMs) % 1` frame-time loop is the DEFAULT. `freeze` /
50
- * `prefers-reduced-motion` still short-circuit to `frozenT` regardless — the
51
- * ambient bundle is unchanged. The SOLE additive seam (BA.W-FOURIER-STUDIO). */
52
- clock?: () => number;
53
41
  };
54
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
55
- variant: "hero" | "final";
42
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
43
+ backend: () => import("../../../composables/glass/webgpu").GpuBackend;
44
+ pause: () => void;
45
+ resume: () => void;
46
+ wake: () => void;
47
+ renderAt: (timeSec: number) => void;
48
+ setHeadT: (t: number) => void;
49
+ headUnit: () => {
50
+ x: number;
51
+ y: number;
52
+ } | null;
53
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
56
54
  seed: string;
57
55
  freeze: boolean;
58
- intensity: number;
59
56
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
60
57
  declare const _default: typeof __VLS_export;
61
58
  export default _default;
@@ -0,0 +1,24 @@
1
+ import type { WebGLCanvasFrame } from "../../../../composables/glass/webgl/useWebGLCanvas";
2
+ import type { OklchStop } from "../../../../composables/color";
3
+ import { type FourierFieldConfig } from "../constants";
4
+ import { type BasisComponent } from "../math";
5
+ export interface FourierGLSetupDeps {
6
+ canvas: HTMLCanvasElement;
7
+ config: FourierFieldConfig;
8
+ getSpectrum: () => readonly BasisComponent[];
9
+ getPalette: () => OklchStop[];
10
+ getHeadT: () => number;
11
+ shouldContinue: () => boolean;
12
+ onFrame?: (timeSec: number) => void;
13
+ /**
14
+ * BD.W-VIZ-BROKEN-FIX D6b — the 2-D cursor FOLLOW (model-space center lean). Mirrors the
15
+ * WGSL arm exactly (both read the SAME uFit center) — parity-safe by construction.
16
+ * `{x:0,y:0}` (ambient/PRM) is byte-identical to today.
17
+ */
18
+ getPointerLean?: () => {
19
+ x: number;
20
+ y: number;
21
+ };
22
+ }
23
+ /** Build the `setupGL(gl)` callback the `createGpuSubstrate` WebGL2 path invokes. */
24
+ export declare function createFourierGLSetup(deps: FourierGLSetupDeps): (gl: WebGL2RenderingContext) => WebGLCanvasFrame;
@@ -0,0 +1,31 @@
1
+ import type { WebGPUCanvasFrame } from "../../../../composables/glass/webgpu/useWebGPUCanvas";
2
+ import type { OklchStop } from "../../../../composables/color";
3
+ import { type FourierFieldConfig } from "../constants";
4
+ import type { BasisComponent } from "../math";
5
+ export interface FourierWGPUSetupDeps {
6
+ canvas: HTMLCanvasElement;
7
+ config: FourierFieldConfig;
8
+ /** The CPU-minted spectrum (re-read each frame so a source-swap reaches the buffer). */
9
+ getSpectrum: () => readonly BasisComponent[];
10
+ /** The resolved (ColorResolver) palette stops as OKLCh — re-read each frame so a live edit reaches the buffer. */
11
+ getPalette: () => OklchStop[];
12
+ /** The single loop parameter `head_t ∈ [0,1)` (the ONE keyframes.js clock). */
13
+ getHeadT: () => number;
14
+ /** Demand-gate (the renderer's quiescence layer — substrate-agnostic). */
15
+ shouldContinue: () => boolean;
16
+ /** The per-frame pointer hook — useFourierField advances the shared pointer field here. */
17
+ onFrame?: (timeSec: number) => void;
18
+ /**
19
+ * BD.W-VIZ-BROKEN-FIX D6b — the 2-D cursor FOLLOW: a small MODEL-space offset added to
20
+ * the view-fit center so the whole reconstruction LEANS toward the cursor (the spatial
21
+ * "follow" beside D6a's velocity scrub). Reuses the EXISTING uFit center uniform (NO new
22
+ * uniform, NO shader/bridge edit — parity-safe by construction, both arms read the same
23
+ * fit). `{x:0,y:0}` (the ambient/PRM register) is byte-identical to today.
24
+ */
25
+ getPointerLean?: () => {
26
+ x: number;
27
+ y: number;
28
+ };
29
+ }
30
+ /** Build the fourier-field `setupWGPU(device, context, format)` callback. */
31
+ export declare function createFourierWGPUSetup(deps: FourierWGPUSetupDeps): (device: GPUDevice, context: GPUCanvasContext, format: GPUTextureFormat) => WebGPUCanvasFrame;