@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
@@ -1,45 +1,53 @@
1
- import { t as e } from "./_plugin-vue_export-helper-C1je1s0u.js";
2
- import { n as t, r as n } from "./procedural-color.glsl-CIFsJhwI.js";
3
- import { a as r, n as i, r as a, u as o } from "./procedural-color.wgsl-CToRHugY.js";
4
- import { c as s } from "./color-DweYl7pE.js";
5
- import { computed as c, createElementBlock as l, createElementVNode as u, defineComponent as d, normalizeStyle as f, onScopeDispose as p, openBlock as m, useTemplateRef as h, watch as g } from "vue";
1
+ import { t as e } from "./_plugin-vue_export-helper-gLzyemvl.js";
2
+ import { t } from "./usePointerVelocityField-BrkqZFhj.js";
3
+ import { n, o as r, r as i, s as a } from "./procedural-color.wgsl-C1Y5PkM6.js";
4
+ import { t as o } from "./flow.glsl-DqEGRpl4.js";
5
+ import { a as s, t as c } from "./useGpuSubstrate-Ceet70xq.js";
6
+ import { c as l } from "./color-B9jZdhJX.js";
7
+ import { t as u } from "./useGlobalDark-B4HO9LXG.js";
8
+ import { c as d, d as f, f as p, l as m, n as h, p as g, s as _, u as v } from "./paperGrid-CXCSMbZ1.js";
9
+ import { computed as y, createElementBlock as b, createElementVNode as x, defineComponent as S, normalizeStyle as C, onScopeDispose as w, openBlock as T, useTemplateRef as E, watch as D } from "vue";
6
10
  //#region src/components/custom/concentric/shaders/concentric.wgsl.ts
7
- var _ = `
11
+ var O = `
8
12
  const PI: f32 = 3.141592653589793;
9
13
  const TAU: f32 = 6.283185307179586;
10
- const RING_GRAVITY: f32 = 9.81;
11
- const MAX_RINGS: i32 = 8;
12
- const MAX_CENTERS: i32 = 4;
13
14
  const MAX_RING_STOPS: i32 = 4;
14
15
 
15
16
  // ── Concentric uniforms (the typed-struct source-of-truth — see uniformBridgeWGPU.ts) ──
16
17
  struct ConcentricUniforms {
17
- // u0: (uTime, uSpeed, uAxisA, uAxisB)
18
+ // u0: (uTime, uSpeed, uCellSize, _pad)
18
19
  u0: vec4<f32>,
19
- // ints: (uCenterCount, uRingCount, uStopCount, _pad)
20
+ // ints: (_pad, _pad, uStopCount, _pad)
20
21
  ints: vec4<i32>,
21
22
  // bg: (background.rgb (linear), hasBackground)
22
23
  bg: vec4<f32>,
23
- // norm: (uFieldNorm, uAspect, _pad, _pad) — field → [0,1] scale
24
+ // norm: (uFieldNorm, uAspect, lightDirX, lightDirY)
24
25
  norm: vec4<f32>,
25
- // each ring row: (amplitude, wavelength, phase, _pad)
26
- rings: array<vec4<f32>, 8>,
27
- // each center row: (x, y, weight, _pad)
28
- centers: array<vec4<f32>, 4>,
26
+ // line: (lineHalfWidth, aaSoftness, contourLevels, indexEvery)
27
+ line: vec4<f32>,
28
+ // wave: (waveDirX, waveDirY, waveK, waveOmega)
29
+ wave: vec4<f32>,
30
+ // wave2: (waveSigma, twistMax, shearMax, amp)
31
+ wave2: vec4<f32>,
32
+ // topo: (heightOctaves, heightSeed, swellAmp, perturbAmp)
33
+ topo: vec4<f32>,
34
+ // cursor: (cursorX, cursorY, cursorWell, interactive)
35
+ cursor: vec4<f32>,
36
+ // tune: (toneGain, shadeAmp, indexMul, inkDarken)
37
+ tune: vec4<f32>,
29
38
  // each palette stop: linear-sRGB rgb + _pad
30
39
  palette: array<vec4<f32>, 4>,
31
40
  };
32
41
 
33
42
  @group(0) @binding(0) var<uniform> u: ConcentricUniforms;
34
43
 
44
+ ${n}
35
45
  ${i}
36
- ${a}
37
46
 
38
- // Full-screen-triangle (the pilot idiom): NDC corners (-1,-1),(3,-1),(-1,3) cover the
39
- // viewport from a single 3-vertex draw — no vertex buffer.
47
+ // Full-screen-triangle (the pilot idiom).
40
48
  struct VSOut {
41
49
  @builtin(position) pos: vec4<f32>,
42
- @location(0) uv: vec2<f32>, // domain [-1,1]², aspect-corrected x
50
+ @location(0) uv: vec2<f32>,
43
51
  };
44
52
 
45
53
  @vertex
@@ -50,46 +58,88 @@ fn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {
50
58
  let c = corners[vi];
51
59
  var out: VSOut;
52
60
  out.pos = vec4<f32>(c, 0.0, 1.0);
53
- // aspect-correct so the rings stay circular under the ellipsoidal norm (NOT squashed
54
- // by the canvas aspect): widen the domain x by the aspect ratio.
55
61
  out.uv = vec2<f32>(c.x, c.y);
56
62
  return out;
57
63
  }
58
64
 
59
- // The ellipsoidal radial distance ‖p − c‖_e = sqrt((dx/a)² + (dy/b)²). The single radial
60
- // metric (transcribes ringField.ts ellipsoidalRadius).
61
- fn ellipsoidalRadius(p: vec2<f32>, center: vec2<f32>, axisA: f32, axisB: f32) -> f32 {
62
- let dx = (p.x - center.x) / max(axisA, 1e-4);
63
- let dy = (p.y - center.y) / max(axisB, 1e-4);
64
- return sqrt(dx * dx + dy * dy);
65
+ // ── The host noise basis (the SAME quintic-faded value-noise the suite speaks) ──
66
+ fn hash21(x: f32, y: f32) -> f32 {
67
+ var px = fract(x * 0.1031);
68
+ var py = fract(y * 0.1031);
69
+ var pz = fract(x * 0.1031);
70
+ let d = px * (py + 33.33) + py * (pz + 33.33) + pz * (px + 33.33);
71
+ px = px + d; py = py + d; pz = pz + d;
72
+ return fract((px + py) * pz);
73
+ }
74
+ fn valueNoise(x: f32, y: f32) -> f32 {
75
+ let ix = floor(x); let iy = floor(y);
76
+ let fx = x - ix; let fy = y - iy;
77
+ let ux = fx * fx * fx * (fx * (fx * 6.0 - 15.0) + 10.0);
78
+ let uy = fy * fy * fy * (fy * (fy * 6.0 - 15.0) + 10.0);
79
+ let a = hash21(ix, iy);
80
+ let b = hash21(ix + 1.0, iy);
81
+ let c = hash21(ix, iy + 1.0);
82
+ let d2 = hash21(ix + 1.0, iy + 1.0);
83
+ return mix(mix(a, b, ux), mix(c, d2, ux), uy);
84
+ }
85
+ // The single-octave potential the curl operator wraps + the height field samples.
86
+ fn potentialFBM(p: vec2f) -> f32 {
87
+ var v = 0.0; var amp = 0.5; var freq = 1.0;
88
+ var px = p.x; var py = p.y;
89
+ for (var i = 0; i < 3; i = i + 1) {
90
+ v = v + amp * valueNoise(px * freq, py * freq);
91
+ let rx = 0.8 * px - 0.6 * py;
92
+ let ry = 0.6 * px + 0.8 * py;
93
+ px = rx; py = ry; freq = freq * 2.0; amp = amp * 0.5;
94
+ }
95
+ return v;
96
+ }
97
+
98
+ // The shared curl + wave chunks (splice AFTER valueNoise + potentialFBM are declared).
99
+ ${g}
100
+ ${p}
101
+
102
+ fn smoothstepEdge(e0: f32, e1: f32, x: f32) -> f32 {
103
+ let t = clamp((x - e0) / max(e1 - e0, 1e-6), 0.0, 1.0);
104
+ return t * t * (3.0 - 2.0 * t);
65
105
  }
66
106
 
67
- // The radial-Fourier ring-interference value f(p,t) — the multi-center weighted sum of
68
- // radial sinusoids (transcribes ringField.ts sampleRingField line-for-line).
69
- fn sampleRingField(p: vec2<f32>, t: f32) -> f32 {
70
- var acc = 0.0;
71
- let speed = u.u0.y;
72
- let axisA = u.u0.z;
73
- let axisB = u.u0.w;
74
- let centerCount = u.ints.x;
75
- let ringCount = u.ints.y;
76
- for (var j = 0; j < MAX_CENTERS; j = j + 1) {
77
- if (j >= centerCount) { break; }
78
- let cj = u.centers[j];
79
- let radius = ellipsoidalRadius(p, cj.xy, axisA, axisB);
80
- var centerSum = 0.0;
81
- for (var i = 0; i < MAX_RINGS; i = i + 1) {
82
- if (i >= ringCount) { break; }
83
- let r = u.rings[i];
84
- let k = TAU / max(r.y, 1e-4);
85
- // ω = √(g·k); speed scales the travel (the shared dispersion law).
86
- let omega = sqrt(RING_GRAVITY * k) * speed;
87
- let theta = k * radius - omega * t + r.z;
88
- centerSum = centerSum + r.x * sin(theta);
89
- }
90
- acc = acc + centerSum * cj.z;
107
+ // The level-set height at domain p (transcribes levelField.ts sampleHeight). The sampling
108
+ // coordinate is cell-twisted (the SAME wave that twists paper-grid cells — kinship); the
109
+ // height is a low-octave topography + the swell + the cursor peak.
110
+ fn sampleHeight(p: vec2f, t: f32) -> f32 {
111
+ // The CONTINUOUS traveling-wave flow warp (no per-cell seam — the contours flow + twist as
112
+ // the wave passes OVER and THROUGH them, the SAME wave that twists the paper-grid cells).
113
+ var g = waveFlow(p, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.y, u.wave2.w);
114
+ if (u.cursor.w > 0.5) {
115
+ g = cursorSwirl(g, u.cursor.xy, u.cursor.z * 0.6, u.u0.z * 2.5);
91
116
  }
92
- return acc;
117
+ // Sample the topography at a LOW base frequency so the basins are BROAD nested loops (a
118
+ // readable contour map — not a fine speckle). heightOctaves carries the fractal detail.
119
+ var H = heightField(g * 0.9, u.topo.x, u.topo.y);
120
+ H = H + u.topo.z * waveSwell(t, u.topo.y);
121
+ if (u.cursor.w > 0.5) {
122
+ let d = p - u.cursor.xy;
123
+ let d2 = dot(d, d);
124
+ // The cursor HEAVE — a SOFT bulge (a Gaussian peak feathered by a smoothstep falloff so
125
+ // the heave is C1-smooth, NOT the hard-edged quad the old dark render showed). The well
126
+ // depth/radius already carry the velocity-HEAVE scale (packed JS-side into u.cursor.z).
127
+ let g0 = exp(-d2 / 0.22);
128
+ let fall = smoothstepEdge(0.0, 0.55, exp(-d2 / 0.6));
129
+ H = H + u.cursor.z * g0 * fall;
130
+ }
131
+ return H;
132
+ }
133
+
134
+ // The IQ gradient-free level-set contour ink — KEPT BYTE-FROZEN (the perfect GPU AA). It is
135
+ // FED the per-level half-width 'hw' (a parameter, NOT a re-derivation): de_contour =
136
+ // |fract(fN + 0.5) − 0.5| / fwidth(fN). The contour density tracks 1/|∇H| automatically.
137
+ // 'aaW' floors against a DPR-aware minimum so the index line stays CONTINUOUS where the heave
138
+ // packs contours (steep |∇H| saturates fwidth — challenge R4).
139
+ fn contourInk(fN: f32, hw: f32) -> f32 {
140
+ let band = abs(fract(fN + 0.5) - 0.5);
141
+ let aaW = max(fwidth(fN), 6e-4);
142
+ return 1.0 - smoothstepEdge(hw, hw + u.line.y, band / aaW);
93
143
  }
94
144
 
95
145
  // Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].
@@ -106,172 +156,199 @@ fn samplePaletteLin(t: f32) -> vec3<f32> {
106
156
  return oklabToLinearSrgb(mix(labA, labB, f));
107
157
  }
108
158
 
159
+ // The SHARED hillshade finite-diff epsilon — pinned ONCE (mirrors levelField.HILLSHADE_EPSILON
160
+ // + the GLSL twin; a per-backend drift would red the L6 numeric parity).
161
+ const HILLSHADE_E: f32 = 0.012;
162
+
109
163
  @fragment
110
164
  fn fs_main(in: VSOut) -> @location(0) vec4<f32> {
111
- // aspect-correct the domain x so the rings read circular under the ellipsoidal norm.
112
165
  let aspect = max(u.norm.y, 1e-4);
113
166
  let p = vec2<f32>(in.uv.x * aspect, in.uv.y);
114
- let t = u.u0.x;
167
+ let t = u.u0.x * u.u0.y;
168
+ let levels = max(u.line.z, 1.0);
115
169
 
116
- let raw = sampleRingField(p, t);
117
- // Normalize the field → [0,1] for the palette ramp (uFieldNorm is the amplitude scale).
118
- let v = clamp(0.5 + raw * u.norm.x, 0.0, 1.0);
170
+ // The level-set topography (the KEPT field — the PRIMARY path).
171
+ let H = sampleHeight(p, t);
119
172
 
120
- let lin = samplePaletteLin(v);
121
- let rgb = clamp(linearToSrgb(lin), vec3<f32>(0.0), vec3<f32>(1.0));
173
+ // ── 1. HYPSOMETRIC TONE — tanh expands the compressed band so basins+ridges hit the ramp
174
+ // ENDS (the live lumVar-flat cause). samplePaletteLin is the KEPT OKLab operator.
175
+ let tone = 0.5 + 0.5 * tanh(H * u.tune.x);
176
+ var fill = samplePaletteLin(tone);
122
177
 
123
- // Premultiplied-alpha output over the (transparent / themed) ground.
124
- let hasBg = u.bg.w;
125
- if (hasBg > 0.5) {
126
- // opaque themed ground: the field paints fully opaque.
127
- return vec4<f32>(rgb, 1.0);
128
- }
129
- // transparent ground: the field's alpha rides its own brightness so the page reads
130
- // through the troughs (the ring crests carry the ink; the calm field is faint).
131
- let alpha = clamp(v * 0.92 + 0.08, 0.0, 1.0);
132
- return vec4<f32>(rgb * alpha, alpha);
133
- }
134
- `, v = 9.81, y = Math.PI * 2;
135
- function b(e, t, n, r) {
136
- let i = (e.x - t.x) / Math.max(n, 1e-4), a = (e.y - t.y) / Math.max(r, 1e-4);
137
- return Math.sqrt(i * i + a * a);
138
- }
139
- function x(e, t, n, r, i, a, o) {
140
- let s = 0;
141
- for (let c of n) {
142
- let n = b(e, c, i, a), l = 0;
143
- for (let e of r) {
144
- let r = y / Math.max(e.wavelength, 1e-4), i = Math.sqrt(v * r) * o, a = r * n - i * t + e.phase;
145
- l += e.amplitude * Math.sin(a);
146
- }
147
- s += l * c.weight;
148
- }
149
- return s;
178
+ // ── 2. ANALYTIC HILLSHADE — one ∇H finite-diff at the SHARED e, dotted with the fixed cel
179
+ // light → 2.5-D relief. A read-only re-sample of sampleHeight (no second field).
180
+ let e = HILLSHADE_E;
181
+ let hx = sampleHeight(p + vec2<f32>(e, 0.0), t) - sampleHeight(p - vec2<f32>(e, 0.0), t);
182
+ let hy = sampleHeight(p + vec2<f32>(0.0, e), t) - sampleHeight(p - vec2<f32>(0.0, e), t);
183
+ let grad = vec2<f32>(hx, hy) / (2.0 * e);
184
+ let L = normalize(u.norm.zw + vec2<f32>(1e-5, 1e-5));
185
+ let shade = 0.5 + 0.5 * clamp(dot(normalize(grad + vec2<f32>(1e-5)), L), -1.0, 1.0);
186
+ fill = fill * mix(1.0 - u.tune.y, 1.0 + u.tune.y, shade);
187
+
188
+ // ── 3. TWO-TIER INDEX/MINOR CONTOUR — isIndex a pure f(level) (floor + mod + select, NOT a
189
+ // state buffer); the per-level half-width hw is FED to the byte-frozen contourInk.
190
+ let fN = H * levels + u.topo.w * sin(floor(H * levels) * 2.4 + t * 0.7);
191
+ let indexEvery = max(u.line.w, 1.0);
192
+ let lvl = floor(fN);
193
+ let isIndex = select(0.0, 1.0, fract(lvl / indexEvery) < (0.5 / indexEvery));
194
+ let hw = mix(u.line.x, u.line.x * u.tune.z, isIndex);
195
+ let ink = clamp(contourInk(fN, hw), 0.0, 1.0);
196
+
197
+ // ── 4. INK = a darker ember of the LOCAL fill (the edge-of-its-own-band signature).
198
+ let inkCol = mix(fill, fill * u.tune.w, 0.85);
199
+
200
+ // ── 5. ONE color path + OPAQUE OUT — the viz IS the colorful field, never lines-over-nothing.
201
+ // Per-mode is resolved in the CONSUMED stops + the bg token (no in-shader uMode branch).
202
+ let col = mix(fill, inkCol, ink);
203
+ return vec4<f32>(clamp(linearToSrgb(col), vec3<f32>(0.0), vec3<f32>(1.0)), 1.0);
150
204
  }
151
- function S(e = 5) {
152
- let t = [], n = .7;
153
- for (let r = 0; r < e; r++) {
154
- let e = y / n, i = Math.exp(-1 / (e * 1.4) ** 2) / (e * e);
155
- t.push({
156
- amplitude: i * .9,
157
- wavelength: n,
158
- phase: r * 1.618033 % y
159
- }), n *= .62;
205
+ `, k = 4, A = [
206
+ {
207
+ L: .5,
208
+ C: .115,
209
+ h: 350
210
+ },
211
+ {
212
+ L: .66,
213
+ C: .14,
214
+ h: 38
215
+ },
216
+ {
217
+ L: .8,
218
+ C: .115,
219
+ h: 70
220
+ },
221
+ {
222
+ L: .92,
223
+ C: .06,
224
+ h: 86
160
225
  }
161
- return t;
162
- }
163
- //#endregion
164
- //#region src/components/custom/concentric/constants.ts
165
- var C = 8, w = 4, T = 4, E = [
226
+ ], j = [
166
227
  {
167
- L: .94,
168
- C: .025,
169
- h: 80
228
+ L: .26,
229
+ C: .09,
230
+ h: 30
170
231
  },
171
232
  {
172
- L: .82,
173
- C: .075,
174
- h: 62
233
+ L: .45,
234
+ C: .15,
235
+ h: 42
175
236
  },
176
237
  {
177
238
  L: .66,
178
- C: .105,
179
- h: 44
239
+ C: .155,
240
+ h: 66
241
+ },
242
+ {
243
+ L: .84,
244
+ C: .13,
245
+ h: 84
180
246
  }
181
- ], D = S(5), O = [{
182
- x: -.22,
183
- y: -.14,
184
- weight: 1
185
- }, {
186
- x: .28,
187
- y: .2,
188
- weight: .7
189
- }], k = {
190
- centers: O,
191
- ringComponents: D,
192
- axisRatio: [1, .62],
193
- speed: .5,
194
- palette: E,
195
- background: "transparent",
196
- interactive: !1,
247
+ ], M = {
248
+ L: .96,
249
+ C: .018,
250
+ h: 78
251
+ }, N = {
252
+ L: .16,
253
+ C: .035,
254
+ h: 32
255
+ }, P = {
256
+ speed: .6,
257
+ lineWidth: 1.8,
258
+ lineSoftness: 1,
259
+ contourLevels: 13,
260
+ cellSize: 1.2,
261
+ heightOctaves: 3,
262
+ heightSeed: 7,
263
+ swellAmp: .22,
264
+ perturbAmp: .06,
265
+ twistMax: .6,
266
+ shearMax: .24,
267
+ waveDir: [.92, .39],
268
+ waveK: .42,
269
+ waveOmega: .7,
270
+ waveSigma: .85,
271
+ cursorWell: .5,
272
+ toneGain: 1.6,
273
+ shadeAmp: .18,
274
+ lightDir: [-.6, .8],
275
+ indexEvery: 5,
276
+ indexMul: 1.9,
277
+ inkDarken: .45,
278
+ velocityHeave: .4,
279
+ palette: A,
280
+ background: M,
281
+ interactive: !0,
197
282
  respectReducedMotion: !0
198
- }, A = 320, j = {
283
+ }, F = 224, I = {
199
284
  u0: 0,
200
285
  ints: 4,
201
286
  bg: 8,
202
287
  norm: 12,
203
- rings: 16,
204
- centers: 48,
205
- palette: 64
206
- }, M = .55;
207
- function N() {
208
- let e = new ArrayBuffer(A);
288
+ line: 16,
289
+ wave: 20,
290
+ wave2: 24,
291
+ topo: 28,
292
+ cursor: 32,
293
+ tune: 36,
294
+ palette: 40
295
+ }, L = .55;
296
+ function R() {
297
+ let e = new ArrayBuffer(F);
209
298
  return {
210
299
  buffer: e,
211
300
  f32: new Float32Array(e),
212
301
  i32: new Int32Array(e)
213
302
  };
214
303
  }
215
- function P(e, t, n, r, i) {
216
- let { f32: a, i32: o } = e, [c, l] = t.axisRatio;
217
- a[j.u0 + 0] = n, a[j.u0 + 1] = t.speed, a[j.u0 + 2] = c, a[j.u0 + 3] = l;
218
- let u = Math.min(t.centers.length, 4), d = Math.min(t.ringComponents.length, 8), f = Math.min(i.length, 4);
219
- if (o[j.ints + 0] = u, o[j.ints + 1] = d, o[j.ints + 2] = f, o[j.ints + 3] = 0, t.background === "transparent") a[j.bg + 0] = 0, a[j.bg + 1] = 0, a[j.bg + 2] = 0, a[j.bg + 3] = 0;
304
+ function z(e, t, n, r, i, a, o, s) {
305
+ let { f32: c, i32: u } = e;
306
+ c[I.u0 + 0] = n, c[I.u0 + 1] = t.speed, c[I.u0 + 2] = t.cellSize, c[I.u0 + 3] = 0;
307
+ let d = Math.min(i.length, 4);
308
+ if (u[I.ints + 0] = 0, u[I.ints + 1] = 0, u[I.ints + 2] = d, u[I.ints + 3] = 0, t.background === "transparent") c[I.bg + 0] = 0, c[I.bg + 1] = 0, c[I.bg + 2] = 0, c[I.bg + 3] = 0;
220
309
  else {
221
- let e = s(t.background);
222
- a[j.bg + 0] = e[0], a[j.bg + 1] = e[1], a[j.bg + 2] = e[2], a[j.bg + 3] = 1;
310
+ let e = l(t.background);
311
+ c[I.bg + 0] = e[0], c[I.bg + 1] = e[1], c[I.bg + 2] = e[2], c[I.bg + 3] = 1;
223
312
  }
224
- a[j.norm + 0] = M, a[j.norm + 1] = r, a[j.norm + 2] = 0, a[j.norm + 3] = 0, F(a, j.rings, t.ringComponents), I(a, j.centers, t.centers);
313
+ c[I.norm + 0] = L, c[I.norm + 1] = r, c[I.norm + 2] = t.lightDir[0], c[I.norm + 3] = t.lightDir[1], c[I.line + 0] = t.lineWidth, c[I.line + 1] = t.lineSoftness, c[I.line + 2] = t.contourLevels, c[I.line + 3] = t.indexEvery, c[I.wave + 0] = t.waveDir[0], c[I.wave + 1] = t.waveDir[1], c[I.wave + 2] = t.waveK, c[I.wave + 3] = t.waveOmega, c[I.wave2 + 0] = t.waveSigma, c[I.wave2 + 1] = t.twistMax, c[I.wave2 + 2] = t.shearMax, c[I.wave2 + 3] = o, c[I.topo + 0] = t.heightOctaves, c[I.topo + 1] = t.heightSeed, c[I.topo + 2] = t.swellAmp, c[I.topo + 3] = t.perturbAmp, c[I.cursor + 0] = a.x, c[I.cursor + 1] = a.y, c[I.cursor + 2] = t.cursorWell * s, c[I.cursor + 3] = +!!t.interactive, c[I.tune + 0] = t.toneGain, c[I.tune + 1] = t.shadeAmp, c[I.tune + 2] = t.indexMul, c[I.tune + 3] = t.inkDarken;
225
314
  for (let e = 0; e < 4; e++) {
226
- let t = j.palette + e * 4, n = s(i[Math.min(e, f - 1)] ?? i[0]);
227
- a[t + 0] = n[0], a[t + 1] = n[1], a[t + 2] = n[2], a[t + 3] = 0;
315
+ let t = I.palette + e * 4, n = l(i[Math.min(e, d - 1)] ?? i[0]);
316
+ c[t + 0] = n[0], c[t + 1] = n[1], c[t + 2] = n[2], c[t + 3] = 0;
228
317
  }
229
318
  return e;
230
319
  }
231
- function F(e, t, n) {
232
- for (let r = 0; r < 8; r++) {
233
- let i = t + r * 4, a = n[r];
234
- a ? (e[i + 0] = a.amplitude, e[i + 1] = a.wavelength, e[i + 2] = a.phase, e[i + 3] = 0) : (e[i + 0] = 0, e[i + 1] = 1, e[i + 2] = 0, e[i + 3] = 0);
235
- }
236
- }
237
- function I(e, t, n) {
238
- for (let r = 0; r < 4; r++) {
239
- let i = t + r * 4, a = n[r];
240
- a ? (e[i + 0] = a.x, e[i + 1] = a.y, e[i + 2] = a.weight, e[i + 3] = 0) : (e[i + 0] = 0, e[i + 1] = 0, e[i + 2] = 0, e[i + 3] = 0);
241
- }
242
- }
243
320
  //#endregion
244
321
  //#region src/components/custom/concentric/composables/concentricWGPUSetup.ts
245
- var L = 64, R = 8, z = 2;
246
- function B(e) {
247
- let { canvas: t, config: n, getPalette: r, shouldContinue: i } = e;
248
- return function(e, a, s) {
249
- let c = e.createShaderModule({
322
+ var B = 64, V = 8, H = 2;
323
+ function U(e) {
324
+ let { canvas: t, config: n, getPalette: r, getCursor: i, getAmp: a, getWellScale: o, shouldContinue: c, onFrame: l } = e;
325
+ return function(e, u, d) {
326
+ let f = e.createShaderModule({
250
327
  label: "[Concentric] concentric.wgsl",
251
- code: _
252
- }), l = N(), u = e.createBuffer({
328
+ code: O
329
+ }), p = R(), m = e.createBuffer({
253
330
  label: "[Concentric] uniforms",
254
- size: l.buffer.byteLength,
255
- usage: L | R
256
- }), d = e.createBindGroupLayout({
331
+ size: p.buffer.byteLength,
332
+ usage: B | V
333
+ }), h = e.createBindGroupLayout({
257
334
  label: "[Concentric] bgl",
258
335
  entries: [{
259
336
  binding: 0,
260
- visibility: z,
337
+ visibility: H,
261
338
  buffer: { type: "uniform" }
262
339
  }]
263
- }), f = e.createRenderPipeline({
340
+ }), g = e.createRenderPipeline({
264
341
  label: "[Concentric] pipeline",
265
- layout: e.createPipelineLayout({ bindGroupLayouts: [d] }),
342
+ layout: e.createPipelineLayout({ bindGroupLayouts: [h] }),
266
343
  vertex: {
267
- module: c,
344
+ module: f,
268
345
  entryPoint: "vs_main"
269
346
  },
270
347
  fragment: {
271
- module: c,
348
+ module: f,
272
349
  entryPoint: "fs_main",
273
350
  targets: [{
274
- format: s,
351
+ format: d,
275
352
  blend: {
276
353
  color: {
277
354
  srcFactor: "one",
@@ -287,22 +364,22 @@ function B(e) {
287
364
  }]
288
365
  },
289
366
  primitive: { topology: "triangle-list" }
290
- }), p = e.createBindGroup({
367
+ }), _ = e.createBindGroup({
291
368
  label: "[Concentric] bg",
292
- layout: d,
369
+ layout: h,
293
370
  entries: [{
294
371
  binding: 0,
295
- resource: { buffer: u }
372
+ resource: { buffer: m }
296
373
  }]
297
374
  });
298
- function m() {
299
- let e = o(), n = t.clientWidth || 320, r = t.clientHeight || 320, i = Math.max(1, Math.round(n * e)), a = Math.max(1, Math.round(r * e));
375
+ function v() {
376
+ let e = s(), n = t.clientWidth || 320, r = t.clientHeight || 320, i = Math.max(1, Math.round(n * e)), a = Math.max(1, Math.round(r * e));
300
377
  (t.width !== i || t.height !== a) && (t.width = i, t.height = a);
301
378
  }
302
- function h(i) {
303
- P(l, n, i, (t.clientWidth || 320) / Math.max(t.clientHeight || 320, 1), r()), e.queue.writeBuffer(u, 0, l.buffer);
304
- let o = e.createCommandEncoder({ label: "[Concentric] frame" }), s = a.getCurrentTexture().createView(), c = o.beginRenderPass({ colorAttachments: [{
305
- view: s,
379
+ function y(s) {
380
+ l?.(s), z(p, n, s, (t.clientWidth || 320) / Math.max(t.clientHeight || 320, 1), r(), i(), a(), o()), e.queue.writeBuffer(m, 0, p.buffer);
381
+ let c = e.createCommandEncoder({ label: "[Concentric] frame" }), d = u.getCurrentTexture().createView(), f = c.beginRenderPass({ colorAttachments: [{
382
+ view: d,
306
383
  clearValue: {
307
384
  r: 0,
308
385
  g: 0,
@@ -312,28 +389,25 @@ function B(e) {
312
389
  loadOp: "clear",
313
390
  storeOp: "store"
314
391
  }] });
315
- c.setPipeline(f), c.setBindGroup(0, p), c.draw(3, 1, 0, 0), c.end(), e.queue.submit([o.finish()]);
392
+ f.setPipeline(g), f.setBindGroup(0, _), f.draw(3, 1, 0, 0), f.end(), e.queue.submit([c.finish()]);
316
393
  }
317
394
  return {
318
- frame: h,
319
- shouldContinue: i,
320
- resize: m,
395
+ frame: y,
396
+ shouldContinue: c,
397
+ resize: v,
321
398
  teardown: () => {
322
- u.destroy();
399
+ m.destroy();
323
400
  }
324
401
  };
325
402
  };
326
403
  }
327
404
  //#endregion
328
405
  //#region src/components/custom/concentric/shaders/concentric.glsl.ts
329
- var V = "#version 300 es\nprecision highp float;\nin vec2 aPosition;\nout vec2 vUv;\nvoid main() {\n vUv = aPosition; // [-1,1]² domain\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", H = `#version 300 es
406
+ var W = "#version 300 es\nprecision highp float;\nin vec2 aPosition;\nout vec2 vUv;\nvoid main() {\n vUv = aPosition; // [-1,1]² domain\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}", G = `#version 300 es
330
407
  precision highp float;
331
408
 
332
409
  #define PI 3.141592653589793
333
410
  #define TAU 6.283185307179586
334
- #define RING_GRAVITY 9.81
335
- #define MAX_RINGS 8
336
- #define MAX_CENTERS 4
337
411
  #define MAX_RING_STOPS 4
338
412
 
339
413
  in vec2 vUv;
@@ -341,49 +415,101 @@ out vec4 fragColor;
341
415
 
342
416
  uniform float uTime;
343
417
  uniform float uSpeed;
344
- uniform vec2 uAxis; // (a, b) ellipsoidal-norm axis ratio
345
- uniform float uFieldNorm; // field → [0,1] amplitude scale
418
+ uniform float uCellSize; // the topography cell pitch (the contour-warp granularity)
419
+ uniform float uFieldNorm; // height → [0,1] tone scale
346
420
  uniform float uAspect;
347
- uniform int uCenterCount;
348
- uniform int uRingCount;
349
421
  uniform int uStopCount;
350
422
  uniform float uHasBackground;
351
- uniform vec3 uRings[MAX_RINGS]; // (amplitude, wavelength, phase)
352
- uniform vec3 uCenters[MAX_CENTERS]; // (x, y, weight)
423
+ uniform vec4 uLine; // (lineHalfWidth, aaSoftness, contourLevels, indexEvery)
424
+ uniform vec2 uLightDir; // the fixed cel-light direction (folded norm.zw)
425
+ uniform vec3 uBg; // themed background (linear-sRGB)
426
+ uniform vec4 uWave; // (waveDirX, waveDirY, waveK, waveOmega)
427
+ uniform vec4 uWave2; // (waveSigma, twistMax, shearMax, amp)
428
+ uniform vec4 uTopo; // (heightOctaves, heightSeed, swellAmp, perturbAmp)
429
+ uniform vec4 uCursor; // (cursorX, cursorY, cursorWell, interactive)
430
+ uniform vec4 uTune; // (toneGain, shadeAmp, indexMul, inkDarken)
353
431
  uniform vec3 uPalette[MAX_RING_STOPS]; // linear-sRGB stops
354
432
 
355
- ${t}
356
- ${n}
433
+ ${r}
434
+ ${a}
435
+
436
+ // The shared curl operator (flow.glsl.ts — forward-declares potentialFBM).
437
+ ${o}
357
438
 
358
- // ‖p − c‖_e = sqrt((dx/a)² + (dy/b)²) — transcribes ringField.ts ellipsoidalRadius.
359
- float ellipsoidalRadius(vec2 p, vec2 center, float axisA, float axisB) {
360
- float dx = (p.x - center.x) / max(axisA, 1e-4);
361
- float dy = (p.y - center.y) / max(axisB, 1e-4);
362
- return sqrt(dx * dx + dy * dy);
439
+ // ── The host noise basis (the SAME quintic-faded value-noise the suite speaks) ──
440
+ float hash21(float x, float y) {
441
+ float px = fract(x * 0.1031);
442
+ float py = fract(y * 0.1031);
443
+ float pz = fract(x * 0.1031);
444
+ float d = px * (py + 33.33) + py * (pz + 33.33) + pz * (px + 33.33);
445
+ px += d; py += d; pz += d;
446
+ return fract((px + py) * pz);
447
+ }
448
+ float valueNoise(float x, float y) {
449
+ float ix = floor(x); float iy = floor(y);
450
+ float fx = x - ix; float fy = y - iy;
451
+ float ux = fx * fx * fx * (fx * (fx * 6.0 - 15.0) + 10.0);
452
+ float uy = fy * fy * fy * (fy * (fy * 6.0 - 15.0) + 10.0);
453
+ float a = hash21(ix, iy);
454
+ float b = hash21(ix + 1.0, iy);
455
+ float c = hash21(ix, iy + 1.0);
456
+ float d2 = hash21(ix + 1.0, iy + 1.0);
457
+ return mix(mix(a, b, ux), mix(c, d2, ux), uy);
458
+ }
459
+ // The curl chunk's forward-declared potentialFBM body.
460
+ float potentialFBM(vec2 p) {
461
+ float v = 0.0; float amp = 0.5; float freq = 1.0;
462
+ float px = p.x; float py = p.y;
463
+ for (int i = 0; i < 3; i++) {
464
+ v += amp * valueNoise(px * freq, py * freq);
465
+ float rx = 0.8 * px - 0.6 * py;
466
+ float ry = 0.6 * px + 0.8 * py;
467
+ px = rx; py = ry; freq *= 2.0; amp *= 0.5;
468
+ }
469
+ return v;
363
470
  }
364
471
 
365
- // f(p,t) — the multi-center weighted radial sum (transcribes ringField.ts sampleRingField).
366
- float sampleRingField(vec2 p, float t) {
367
- float acc = 0.0;
368
- for (int j = 0; j < MAX_CENTERS; j++) {
369
- if (j >= uCenterCount) break;
370
- vec3 cj = uCenters[j];
371
- float radius = ellipsoidalRadius(p, cj.xy, uAxis.x, uAxis.y);
372
- float centerSum = 0.0;
373
- for (int i = 0; i < MAX_RINGS; i++) {
374
- if (i >= uRingCount) break;
375
- vec3 r = uRings[i];
376
- float k = TAU / max(r.y, 1e-4);
377
- float omega = sqrt(RING_GRAVITY * k) * uSpeed;
378
- float theta = k * radius - omega * t + r.z;
379
- centerSum += r.x * sin(theta);
380
- }
381
- acc += centerSum * cj.z;
472
+ // The shared traveling-wave CELL-WARP chunk (spliced AFTER valueNoise + potentialFBM + curl).
473
+ ${f}
474
+
475
+ float smoothstepEdge(float e0, float e1, float x) {
476
+ float t = clamp((x - e0) / max(e1 - e0, 1e-6), 0.0, 1.0);
477
+ return t * t * (3.0 - 2.0 * t);
478
+ }
479
+
480
+ // The level-set height at domain p (transcribes levelField.ts sampleHeight).
481
+ float sampleHeight(vec2 p, float t) {
482
+ // The CONTINUOUS traveling-wave flow warp (no per-cell seam — the contours flow + twist as
483
+ // the wave passes OVER and THROUGH them, the SAME wave that twists the paper-grid cells).
484
+ vec2 g = waveFlow(p, t, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.y, uWave2.w);
485
+ if (uCursor.w > 0.5) {
486
+ g = cursorSwirl(g, uCursor.xy, uCursor.z * 0.6, uCellSize * 2.5);
487
+ }
488
+ // LOW base frequency → BROAD nested loops (a readable contour map). Octaves carry detail.
489
+ float H = heightField(g * 0.9, uTopo.x, uTopo.y);
490
+ H += uTopo.z * waveSwell(t, uTopo.y);
491
+ if (uCursor.w > 0.5) {
492
+ vec2 d = p - uCursor.xy;
493
+ float d2 = dot(d, d);
494
+ // The cursor HEAVE — a SOFT bulge (a Gaussian peak feathered by a smoothstep falloff so
495
+ // the heave is C1-smooth, NOT a hard-edged quad). The well depth/radius carry the
496
+ // velocity-HEAVE scale (packed JS-side into uCursor.z).
497
+ float g0 = exp(-d2 / 0.22);
498
+ float fall = smoothstepEdge(0.0, 0.55, exp(-d2 / 0.6));
499
+ H += uCursor.z * g0 * fall;
382
500
  }
383
- return acc;
501
+ return H;
502
+ }
503
+
504
+ // The IQ gradient-free level-set contour ink — KEPT BYTE-FROZEN (the perfect GPU AA). It is
505
+ // FED the per-level half-width 'hw' (a parameter, NOT a re-derivation). 'aaW' floors against a
506
+ // DPR-aware minimum so the index line stays CONTINUOUS where the heave packs contours.
507
+ float contourInk(float fN, float hw) {
508
+ float band = abs(fract(fN + 0.5) - 0.5);
509
+ float aaW = max(fwidth(fN), 6e-4);
510
+ return 1.0 - smoothstepEdge(hw, hw + uLine.y, band / aaW);
384
511
  }
385
512
 
386
- // Sample the multi-stop palette (linear-sRGB stops, OKLab mix). t in [0,1].
387
513
  vec3 samplePaletteLin(float t) {
388
514
  if (uStopCount <= 1) return uPalette[0];
389
515
  float n = float(uStopCount);
@@ -391,7 +517,6 @@ vec3 samplePaletteLin(float t) {
391
517
  int i0 = int(floor(ft));
392
518
  int i1 = min(i0 + 1, uStopCount - 1);
393
519
  float f = ft - float(i0);
394
- // cube-root LMS (the GLSL chunk inlines cbrt as sign(x)·pow(|x|,1/3) — no cbrt3 fn).
395
520
  vec3 lmsA = LINEAR_SRGB_TO_LMS * uPalette[i0];
396
521
  vec3 lmsB = LINEAR_SRGB_TO_LMS * uPalette[i1];
397
522
  vec3 labA = LMS_TO_OKLAB * (sign(lmsA) * pow(abs(lmsA), vec3(1.0 / 3.0)));
@@ -399,23 +524,50 @@ vec3 samplePaletteLin(float t) {
399
524
  return oklabToLinearSrgb(mix(labA, labB, f));
400
525
  }
401
526
 
527
+ // The SHARED hillshade finite-diff epsilon — pinned ONCE (mirrors levelField.HILLSHADE_EPSILON
528
+ // + the WGSL twin; a per-backend drift would red the L6 numeric parity).
529
+ const float HILLSHADE_E = 0.012;
530
+
402
531
  void main() {
403
532
  float aspect = max(uAspect, 1e-4);
404
533
  vec2 p = vec2(vUv.x * aspect, vUv.y);
405
- float raw = sampleRingField(p, uTime);
406
- float v = clamp(0.5 + raw * uFieldNorm, 0.0, 1.0);
407
- vec3 lin = samplePaletteLin(v);
408
- vec3 rgb = clamp(linearToSrgb(lin), vec3(0.0), vec3(1.0));
409
- if (uHasBackground > 0.5) {
410
- fragColor = vec4(rgb, 1.0);
411
- return;
412
- }
413
- float alpha = clamp(v * 0.92 + 0.08, 0.0, 1.0);
414
- fragColor = vec4(rgb * alpha, alpha);
534
+ float t = uTime * uSpeed;
535
+ float levels = max(uLine.z, 1.0);
536
+
537
+ // The level-set topography (the KEPT field — the PRIMARY path).
538
+ float H = sampleHeight(p, t);
539
+
540
+ // ── 1. HYPSOMETRIC TONE — tanh expands the compressed band (basins+ridges hit the ramp ENDS).
541
+ float tone = 0.5 + 0.5 * tanh(H * uTune.x);
542
+ vec3 fill = samplePaletteLin(tone);
543
+
544
+ // ── 2. ANALYTIC HILLSHADE — one ∇H finite-diff at the SHARED e, dotted with the cel light.
545
+ float e = HILLSHADE_E;
546
+ float hx = sampleHeight(p + vec2(e, 0.0), t) - sampleHeight(p - vec2(e, 0.0), t);
547
+ float hy = sampleHeight(p + vec2(0.0, e), t) - sampleHeight(p - vec2(0.0, e), t);
548
+ vec2 grad = vec2(hx, hy) / (2.0 * e);
549
+ vec2 L = normalize(uLightDir + vec2(1e-5));
550
+ float shade = 0.5 + 0.5 * clamp(dot(normalize(grad + vec2(1e-5)), L), -1.0, 1.0);
551
+ fill *= mix(1.0 - uTune.y, 1.0 + uTune.y, shade);
552
+
553
+ // ── 3. TWO-TIER INDEX/MINOR CONTOUR — isIndex a pure f(level); hw FED to the frozen contourInk.
554
+ float fN = H * levels + uTopo.w * sin(floor(H * levels) * 2.4 + t * 0.7);
555
+ float indexEvery = max(uLine.w, 1.0);
556
+ float lvl = floor(fN);
557
+ float isIndex = fract(lvl / indexEvery) < (0.5 / indexEvery) ? 1.0 : 0.0;
558
+ float hw = mix(uLine.x, uLine.x * uTune.z, isIndex);
559
+ float ink = clamp(contourInk(fN, hw), 0.0, 1.0);
560
+
561
+ // ── 4. INK = a darker ember of the LOCAL fill (the edge-of-its-own-band signature).
562
+ vec3 inkCol = mix(fill, fill * uTune.w, 0.85);
563
+
564
+ // ── 5. ONE color path + OPAQUE OUT — the viz IS the colorful field.
565
+ vec3 col = mix(fill, inkCol, ink);
566
+ fragColor = vec4(clamp(linearToSrgb(col), vec3(0.0), vec3(1.0)), 1.0);
415
567
  }`;
416
568
  //#endregion
417
569
  //#region src/components/custom/concentric/composables/concentricGLSetup.ts
418
- function U(e, t, n) {
570
+ function K(e, t, n) {
419
571
  let r = e.createShader(t);
420
572
  if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
421
573
  let t = e.getShaderInfoLog(r);
@@ -423,16 +575,16 @@ function U(e, t, n) {
423
575
  }
424
576
  return r;
425
577
  }
426
- function W(e) {
427
- let { canvas: t, config: n, getPalette: r, shouldContinue: i } = e;
578
+ function q(e) {
579
+ let { canvas: t, config: n, getPalette: r, getCursor: i, getAmp: a, getWellScale: o, shouldContinue: c, onFrame: u } = e;
428
580
  return function(e) {
429
- let a = U(e, e.VERTEX_SHADER, V), c = U(e, e.FRAGMENT_SHADER, H), l = e.createProgram();
430
- if (e.attachShader(l, a), e.attachShader(l, c), e.linkProgram(l), !e.getProgramParameter(l, e.LINK_STATUS)) throw Error(`[Concentric] link failed: ${e.getProgramInfoLog(l)}`);
431
- e.deleteShader(a), e.deleteShader(c);
432
- let u = e.createVertexArray();
433
- e.bindVertexArray(u);
434
- let d = e.createBuffer();
435
- e.bindBuffer(e.ARRAY_BUFFER, d), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
581
+ let d = K(e, e.VERTEX_SHADER, W), f = K(e, e.FRAGMENT_SHADER, G), p = e.createProgram();
582
+ if (e.attachShader(p, d), e.attachShader(p, f), e.linkProgram(p), !e.getProgramParameter(p, e.LINK_STATUS)) throw Error(`[Concentric] link failed: ${e.getProgramInfoLog(p)}`);
583
+ e.deleteShader(d), e.deleteShader(f);
584
+ let m = e.createVertexArray();
585
+ e.bindVertexArray(m);
586
+ let h = e.createBuffer();
587
+ e.bindBuffer(e.ARRAY_BUFFER, h), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
436
588
  -1,
437
589
  -1,
438
590
  3,
@@ -440,91 +592,131 @@ function W(e) {
440
592
  -1,
441
593
  3
442
594
  ]), e.STATIC_DRAW);
443
- let f = e.getAttribLocation(l, "aPosition");
444
- e.enableVertexAttribArray(f), e.vertexAttribPointer(f, 2, e.FLOAT, !1, 0, 0), e.bindVertexArray(null);
445
- let p = (t) => e.getUniformLocation(l, t), m = p("uTime"), h = p("uSpeed"), g = p("uAxis"), _ = p("uFieldNorm"), v = p("uAspect"), y = p("uCenterCount"), b = p("uRingCount"), x = p("uStopCount"), S = p("uHasBackground"), C = p("uRings[0]"), w = p("uCenters[0]"), T = p("uPalette[0]");
446
- function E() {
447
- let n = o(), r = t.clientWidth || 320, i = t.clientHeight || 320, a = Math.max(1, Math.round(r * n)), s = Math.max(1, Math.round(i * n));
448
- (t.width !== a || t.height !== s) && (t.width = a, t.height = s), e.viewport(0, 0, t.width, t.height);
595
+ let g = e.getAttribLocation(p, "aPosition");
596
+ e.enableVertexAttribArray(g), e.vertexAttribPointer(g, 2, e.FLOAT, !1, 0, 0), e.bindVertexArray(null);
597
+ let _ = (t) => e.getUniformLocation(p, t), v = _("uTime"), y = _("uSpeed"), b = _("uCellSize"), x = _("uFieldNorm"), S = _("uAspect"), C = _("uStopCount"), w = _("uHasBackground"), T = _("uLine"), E = _("uLightDir"), D = _("uBg"), O = _("uWave"), k = _("uWave2"), A = _("uTopo"), j = _("uCursor"), M = _("uTune"), N = _("uPalette[0]");
598
+ function P() {
599
+ let n = s(), r = t.clientWidth || 320, i = t.clientHeight || 320, a = Math.max(1, Math.round(r * n)), o = Math.max(1, Math.round(i * n));
600
+ (t.width !== a || t.height !== o) && (t.width = a, t.height = o), e.viewport(0, 0, t.width, t.height);
449
601
  }
450
- function D(i) {
451
- let a = t.clientWidth || 320, o = t.clientHeight || 320, c = a / Math.max(o, 1);
452
- e.useProgram(l), e.bindVertexArray(u), e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.uniform1f(m, i), e.uniform1f(h, n.speed), e.uniform2f(g, n.axisRatio[0], n.axisRatio[1]), e.uniform1f(_, M), e.uniform1f(v, c);
453
- let d = Math.min(n.centers.length, 4), f = Math.min(n.ringComponents.length, 8), p = r(), E = Math.min(p.length, 4);
454
- e.uniform1i(y, d), e.uniform1i(b, f), e.uniform1i(x, E), n.background === "transparent" ? e.uniform1f(S, 0) : e.uniform1f(S, 1);
455
- let D = new Float32Array(24);
456
- for (let e = 0; e < 8; e++) {
457
- let t = n.ringComponents[e];
458
- D[e * 3 + 0] = t?.amplitude ?? 0, D[e * 3 + 1] = t?.wavelength ?? 1, D[e * 3 + 2] = t?.phase ?? 0;
602
+ function F(s) {
603
+ u?.(s);
604
+ let c = t.clientWidth || 320, d = t.clientHeight || 320, f = c / Math.max(d, 1);
605
+ e.useProgram(p), e.bindVertexArray(m), e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.uniform1f(v, s), e.uniform1f(y, n.speed), e.uniform1f(b, n.cellSize), e.uniform1f(x, L), e.uniform1f(S, f);
606
+ let h = r(), g = Math.min(h.length, 4);
607
+ e.uniform1i(C, g), e.uniform4f(T, n.lineWidth, n.lineSoftness, n.contourLevels, n.indexEvery), e.uniform2f(E, n.lightDir[0], n.lightDir[1]), e.uniform4f(O, n.waveDir[0], n.waveDir[1], n.waveK, n.waveOmega), e.uniform4f(k, n.waveSigma, n.twistMax, n.shearMax, a()), e.uniform4f(A, n.heightOctaves, n.heightSeed, n.swellAmp, n.perturbAmp);
608
+ let _ = i();
609
+ if (e.uniform4f(j, _.x, _.y, n.cursorWell * o(), +!!n.interactive), e.uniform4f(M, n.toneGain, n.shadeAmp, n.indexMul, n.inkDarken), n.background === "transparent") e.uniform1f(w, 0), e.uniform3f(D, 0, 0, 0);
610
+ else {
611
+ e.uniform1f(w, 1);
612
+ let t = l(n.background);
613
+ e.uniform3f(D, t[0], t[1], t[2]);
459
614
  }
460
- e.uniform3fv(C, D);
461
- let O = new Float32Array(12);
615
+ let P = new Float32Array(12);
462
616
  for (let e = 0; e < 4; e++) {
463
- let t = n.centers[e];
464
- O[e * 3 + 0] = t?.x ?? 0, O[e * 3 + 1] = t?.y ?? 0, O[e * 3 + 2] = t?.weight ?? 0;
617
+ let t = l(h[Math.min(e, g - 1)] ?? h[0]);
618
+ P[e * 3 + 0] = t[0], P[e * 3 + 1] = t[1], P[e * 3 + 2] = t[2];
465
619
  }
466
- e.uniform3fv(w, O);
467
- let k = new Float32Array(12);
468
- for (let e = 0; e < 4; e++) {
469
- let t = s(p[Math.min(e, E - 1)] ?? p[0]);
470
- k[e * 3 + 0] = t[0], k[e * 3 + 1] = t[1], k[e * 3 + 2] = t[2];
471
- }
472
- e.uniform3fv(T, k), e.drawArrays(e.TRIANGLES, 0, 3), e.bindVertexArray(null);
620
+ e.uniform3fv(N, P), e.drawArrays(e.TRIANGLES, 0, 3), e.bindVertexArray(null);
473
621
  }
474
622
  return {
475
- frame: D,
476
- shouldContinue: i,
477
- resize: E,
623
+ frame: F,
624
+ shouldContinue: c,
625
+ resize: P,
478
626
  teardown: () => {
479
- e.deleteProgram(l), e.deleteVertexArray(u), e.deleteBuffer(d);
627
+ e.deleteProgram(p), e.deleteVertexArray(m), e.deleteBuffer(h);
480
628
  }
481
629
  };
482
630
  };
483
631
  }
484
632
  //#endregion
485
633
  //#region src/components/custom/concentric/composables/useConcentric.ts
486
- function G(e, t) {
487
- let { config: n, getPalette: i } = t, a = t.mode ?? "live", o = null, s = () => {
634
+ function J(e, n) {
635
+ let { config: r, getPalette: i } = n, a = n.mode ?? "live", o = t({ respectReducedMotion: r.respectReducedMotion }), s = {
636
+ x: 1e6,
637
+ y: 1e6
638
+ }, l = () => s, u = 0, d = () => u, f = 1, p = () => f, m = 0, h = () => {
639
+ o.onPointerEnter(), r.interactive && x?.wake();
640
+ }, g = (e) => {
641
+ o.onPointerMove(e), r.interactive && x?.wake();
642
+ }, _ = (e) => e.parentElement ?? e;
643
+ function v(e) {
644
+ let t = _(e);
645
+ t.addEventListener("pointermove", g), t.addEventListener("pointerenter", h), t.addEventListener("pointerleave", o.onPointerLeave);
646
+ }
647
+ function y(e) {
648
+ let t = _(e);
649
+ t.removeEventListener("pointermove", g), t.removeEventListener("pointerenter", h), t.removeEventListener("pointerleave", o.onPointerLeave);
650
+ }
651
+ function b(t) {
652
+ let n = m > 0 ? (t - m) * 1e3 : 16.7;
653
+ if (m = t, o.tick(n), x?.reducedMotion ? (u = 0, f = 1) : (u += (1.06 - u) * .04, u > 1 && (u = 1 + (u - 1) * .85)), !r.interactive || !o.active.value) {
654
+ s = {
655
+ x: 1e6,
656
+ y: 1e6
657
+ }, f = 1;
658
+ return;
659
+ }
660
+ let i = o.smoothedPosition.value, a = o.velocity.value, c = o.acceleration.value, l = .1, d = .04, p = e.value, h = (p?.clientWidth || 320) / Math.max(p?.clientHeight || 320, 1);
661
+ s = {
662
+ x: (i.x * 2 - 1 + a.x * l + c.x * d) * h,
663
+ y: -(i.y * 2 - 1) - a.y * l - c.y * d
664
+ };
665
+ let g = Math.hypot(a.x, a.y), _ = Math.min(g / 1.2, 1), v = _ * _ * (3 - 2 * _), y = o.burst.value;
666
+ f = 1 + r.velocityHeave * v + r.velocityHeave * .6 * y;
667
+ }
668
+ let x = null, S = () => {
488
669
  let t = e.value;
489
- return t ? (o || (o = r(t, {
670
+ return t ? (x || (v(t), x = c(t, {
490
671
  mode: a,
491
- respectReducedMotion: n.respectReducedMotion,
492
- setupWGPU: B({
672
+ respectReducedMotion: r.respectReducedMotion,
673
+ setupWGPU: U({
493
674
  canvas: t,
494
- config: n,
675
+ config: r,
495
676
  getPalette: i,
496
- shouldContinue: () => !0
677
+ getCursor: l,
678
+ getAmp: d,
679
+ getWellScale: p,
680
+ shouldContinue: () => !0,
681
+ onFrame: b
497
682
  }),
498
- setupGL: W({
683
+ setupGL: q({
499
684
  canvas: t,
500
- config: n,
685
+ config: r,
501
686
  getPalette: i,
502
- shouldContinue: () => !0
687
+ getCursor: l,
688
+ getAmp: d,
689
+ getWellScale: p,
690
+ shouldContinue: () => !0,
691
+ onFrame: b
503
692
  })
504
- }), o.armAsync()), o) : null;
693
+ }), x.armAsync()), x) : null;
505
694
  };
506
- queueMicrotask(() => s());
507
- let c = {
695
+ queueMicrotask(() => S());
696
+ let C = {
508
697
  get backend() {
509
- return s()?.backend ?? "webgpu";
698
+ return S()?.backend ?? "webgpu";
510
699
  },
511
- pause: () => s()?.suspend("manual"),
512
- resume: () => s()?.resume("manual"),
513
- wake: () => s()?.wake(),
514
- renderAt: (e) => s()?.renderAt(e),
700
+ pause: () => S()?.suspend("manual"),
701
+ resume: () => S()?.resume("manual"),
702
+ wake: () => S()?.wake(),
703
+ renderAt: (e) => S()?.renderAt(e),
515
704
  get reducedMotion() {
516
- return o?.reducedMotion ?? !1;
705
+ return x?.reducedMotion ?? !1;
517
706
  },
518
- dispose: () => o?.dispose()
707
+ dispose: () => {
708
+ let t = e.value;
709
+ t && y(t), o.dispose(), x?.dispose();
710
+ }
519
711
  };
520
- return p(() => c.dispose()), c;
712
+ return w(() => C.dispose()), C;
521
713
  }
522
714
  //#endregion
523
715
  //#region src/components/custom/concentric/Concentric.vue
524
- var K = /* @__PURE__ */ e(/* @__PURE__ */ d({
716
+ var Y = /* @__PURE__ */ e(/* @__PURE__ */ S({
525
717
  __name: "Concentric",
526
718
  props: {
527
- config: { default: () => k },
719
+ config: { default: () => P },
528
720
  paused: {
529
721
  type: Boolean,
530
722
  default: !1
@@ -532,24 +724,24 @@ var K = /* @__PURE__ */ e(/* @__PURE__ */ d({
532
724
  },
533
725
  emits: ["update:paused"],
534
726
  setup(e, { expose: t }) {
535
- let n = h("canvasRef"), r = G(n, {
727
+ let n = E("canvasRef"), { isDark: r } = u(), i = y(() => e.config.palette === A), a = () => i.value && r.value ? j : e.config.palette, o = y(() => i.value ? r.value ? N : M : e.config.background), s = J(n, {
536
728
  config: e.config,
537
- getPalette: () => e.config.palette
729
+ getPalette: a
538
730
  });
539
- g(() => e.paused, (e) => e ? r.pause() : r.resume(), { immediate: !0 });
540
- let i = c(() => {
541
- let t = e.config.background;
542
- if (t !== "transparent") return `oklch(${t.L} ${t.C} ${t.h})`;
731
+ D(() => e.paused, (e) => e ? s.pause() : s.resume(), { immediate: !0 });
732
+ let c = y(() => {
733
+ let e = o.value;
734
+ if (e !== "transparent") return `oklch(${e.L} ${e.C} ${e.h})`;
543
735
  });
544
736
  return t({
545
- pause: r.pause,
546
- resume: r.resume,
547
- wake: r.wake,
548
- renderAt: r.renderAt
549
- }), (e, t) => (m(), l("div", {
737
+ pause: s.pause,
738
+ resume: s.resume,
739
+ wake: s.wake,
740
+ renderAt: s.renderAt
741
+ }), (e, t) => (T(), b("div", {
550
742
  class: "concentric-wrapper",
551
- style: f(i.value ? { background: i.value } : void 0)
552
- }, [u("canvas", {
743
+ style: C(c.value ? { background: c.value } : void 0)
744
+ }, [x("canvas", {
553
745
  ref_key: "canvasRef",
554
746
  ref: n,
555
747
  class: "concentric-canvas",
@@ -557,6 +749,57 @@ var K = /* @__PURE__ */ e(/* @__PURE__ */ d({
557
749
  "data-testid": "concentric-canvas"
558
750
  }, null, 512)], 4));
559
751
  }
560
- }), [["__scopeId", "data-v-f8bbc88a"]]);
752
+ }), [["__scopeId", "data-v-18ed696c"]]);
753
+ //#endregion
754
+ //#region src/components/custom/concentric/composables/levelField.ts
755
+ function X(e, t) {
756
+ let n = e * .1031 % 1, r = t * .1031 % 1, i = e * .1031 % 1;
757
+ n < 0 && (n += 1), r < 0 && (r += 1), i < 0 && (i += 1);
758
+ let a = n * (r + 33.33) + r * (i + 33.33) + i * (n + 33.33);
759
+ n += a, r += a, i += a;
760
+ let o = (n + r) * i % 1;
761
+ return o < 0 && (o += 1), o;
762
+ }
763
+ function Z(e, t) {
764
+ let n = Math.floor(e), r = Math.floor(t), i = e - n, a = t - r, o = i * i * i * (i * (i * 6 - 15) + 10), s = a * a * a * (a * (a * 6 - 15) + 10), c = X(n, r), l = X(n + 1, r), u = X(n, r + 1), d = X(n + 1, r + 1), f = (e, t, n) => e + (t - e) * n;
765
+ return f(f(c, l, o), f(u, d, o), s);
766
+ }
767
+ function Q(e, t, n) {
768
+ let r = m(h, e, t, n.waveDir, n.waveK, n.waveOmega, n.waveSigma, n.twistMax, n.amp);
769
+ n.interactive > .5 && (r = _(r, n.cursor, n.cursorWell * .6, n.cellSize * 2.5));
770
+ let i = d(Z, {
771
+ x: r.x * .9,
772
+ y: r.y * .9
773
+ }, n.heightOctaves, n.heightSeed);
774
+ if (i += n.swellAmp * v(t, n.heightSeed), n.interactive > .5) {
775
+ let t = e.x - n.cursor.x, r = e.y - n.cursor.y, a = t * t + r * r;
776
+ i += n.cursorWell * Math.exp(-a / .22);
777
+ }
778
+ return i;
779
+ }
780
+ var $ = .012;
781
+ function ee(e, t) {
782
+ return .5 + .5 * Math.tanh(e * t);
783
+ }
784
+ function te(e, t, n, r) {
785
+ let i = $, a = Q({
786
+ x: e.x + i,
787
+ y: e.y
788
+ }, t, n) - Q({
789
+ x: e.x - i,
790
+ y: e.y
791
+ }, t, n), o = Q({
792
+ x: e.x,
793
+ y: e.y + i
794
+ }, t, n) - Q({
795
+ x: e.x,
796
+ y: e.y - i
797
+ }, t, n), s = a / (2 * i), c = o / (2 * i), l = Math.hypot(s, c) + 1e-5, u = Math.hypot(r.x, r.y) + 1e-5, d = s / l * (r.x / u) + c / l * (r.y / u);
798
+ return .5 + .5 * Math.max(-1, Math.min(1, d));
799
+ }
800
+ function ne(e, t) {
801
+ let n = Math.floor(e);
802
+ return +(n / t - Math.floor(n / t) < .5 / t);
803
+ }
561
804
  //#endregion
562
- export { K as Concentric, O as DEFAULT_CENTERS, k as DEFAULT_CONCENTRIC_CONFIG, D as DEFAULT_RING_COMPONENTS, w as MAX_CENTERS, C as MAX_RINGS, T as MAX_RING_STOPS, v as RING_GRAVITY, E as WARM_IDENTITY_PALETTE, S as buildRingLadder, b as ellipsoidalRadius, x as sampleRingField, G as useConcentric };
805
+ export { Y as Concentric, P as DEFAULT_CONCENTRIC_CONFIG, $ as HILLSHADE_EPSILON, k as MAX_RING_STOPS, N as WARM_GROUND_DARK, M as WARM_GROUND_LIGHT, A as WARM_IDENTITY_PALETTE, j as WARM_IDENTITY_PALETTE_DARK, te as hillshade, ne as isIndexLevel, Q as sampleHeight, ee as toneFromHeight, J as useConcentric };