@mkbabb/glass-ui 4.1.0 → 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 (430) hide show
  1. package/dist/{CardAction-8whJrLWt.js → CardAction-DlVP2evz.js} +58 -54
  2. package/dist/{CommandShortcut-D3yxgHNn.js → CommandShortcut-By-VQcLO.js} +3 -3
  3. package/dist/{ConfiguratorRow-CaP7U3ZA.js → ConfiguratorRow-YMXdINHx.js} +3 -3
  4. package/dist/{ContextMenuContent-B3ZsheLV.js → ContextMenuContent-CMWn6huB.js} +1 -1
  5. package/dist/{ContextMenuSubContent-DDRID3qC.js → ContextMenuSubContent-DvwWCUc0.js} +1 -1
  6. package/dist/{DataTable-Bc9kUtu_.js → DataTable-C4tG3eIJ.js} +4 -4
  7. package/dist/DialogContent-D8U9ZfWS.js +121 -0
  8. package/dist/{DialogScrollContent-TTuovQst.js → DialogScrollContent-BMekN7gq.js} +1 -1
  9. package/dist/{FadingScroll-DLRbH5Xr.js → FadingScroll-P8B30rAD.js} +1 -1
  10. package/dist/{HoverCardContent-Bel1gdLZ.js → HoverCardContent-DAmGYglo.js} +1 -1
  11. package/dist/{HoverPopover-BcIxvyqZ.js → HoverPopover-DYpBOzzF.js} +1 -1
  12. package/dist/{IconChip-DhbdGdFQ.js → IconChip-CQa7XZYc.js} +7 -5
  13. package/dist/{IconTooltip-B0zimd2H.js → IconTooltip-_df8M3xm.js} +1 -1
  14. package/dist/{Input-Cg9DF62r.js → Input-CyU4_hIC.js} +2 -2
  15. package/dist/{MetricBadge-RHdBP72w.js → MetricBadge-DQt_dGah.js} +1 -1
  16. package/dist/{Notification-CphK7AAm.js → Notification-BlSPJhtZ.js} +1 -1
  17. package/dist/{NumberFieldContent-D8cXeyO4.js → NumberFieldContent-Z3VxGu_6.js} +3 -3
  18. package/dist/PagerDots-CYlqVFd4.js +196 -0
  19. package/dist/PaperBackdrop-DYWgrnh8.js +42 -0
  20. package/dist/{PopoverContent-DL7E6vJP.js → PopoverContent-BuKyHZSz.js} +2 -2
  21. package/dist/{Progress-CnqB7gLm.js → Progress-C9SsdwIZ.js} +1 -1
  22. package/dist/{ScrollingText-CTZbA_cG.js → ScrollingText-DY3W1Jfh.js} +2 -2
  23. package/dist/{SelectScrollDownButton-DAKCBEdW.js → SelectScrollDownButton-3mFHX_R-.js} +15 -12
  24. package/dist/{Switch-B8RscmRu.js → Switch-uf-UKPA2.js} +1 -1
  25. package/dist/{Toaster-D9qIHjBI.js → Toaster-ozrsR4mP.js} +1 -1
  26. package/dist/{ToggleGroupItem-BLtr3TJq.js → ToggleGroupItem-BpzaVzNm.js} +4 -4
  27. package/dist/{TooltipProvider-BJ_Y5EGX.js → TooltipProvider-QQVM_80r.js} +1 -1
  28. package/dist/animated-digit.js +2 -2
  29. package/dist/api/index.d.ts +1 -0
  30. package/dist/api/types-extra.d.ts +3 -1
  31. package/dist/api.js +2 -2
  32. package/dist/aurora.js +163 -131
  33. package/dist/badge-Bt14yURi.js +72 -0
  34. package/dist/badge.js +1 -1
  35. package/dist/border-progress.js +1 -1
  36. package/dist/button-D1W9PrzI.js +130 -0
  37. package/dist/button.js +1 -1
  38. package/dist/canvas.js +1 -1
  39. package/dist/card.js +1 -1
  40. package/dist/carousel.js +227 -98
  41. package/dist/chipVariants-BJQ0I2kB.js +18 -0
  42. package/dist/collapsible.js +1 -1
  43. package/dist/color.js +1 -1
  44. package/dist/command.js +1 -1
  45. package/dist/components/custom/aurora/composables/glSetup.d.ts +1 -1
  46. package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +1 -1
  47. package/dist/components/custom/aurora/constants/presets.d.ts +29 -0
  48. package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +1 -1
  49. package/dist/components/custom/aurora/index.d.ts +1 -1
  50. package/dist/components/custom/concentric/Concentric.vue.d.ts +15 -12
  51. package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +8 -3
  52. package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +8 -4
  53. package/dist/components/custom/concentric/composables/levelField.d.ts +50 -0
  54. package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +7 -4
  55. package/dist/components/custom/concentric/composables/useConcentric.d.ts +3 -3
  56. package/dist/components/custom/concentric/constants.d.ts +62 -41
  57. package/dist/components/custom/concentric/index.d.ts +2 -2
  58. package/dist/components/custom/concentric/shaders/concentric.glsl.d.ts +2 -2
  59. package/dist/components/custom/concentric/shaders/concentric.wgsl.d.ts +1 -1
  60. package/dist/components/custom/configurator/Configurator.vue.d.ts +23 -2
  61. package/dist/components/custom/configurator/index.d.ts +1 -1
  62. package/dist/components/custom/dock/DockDropdownTrigger.vue.d.ts +4 -3
  63. package/dist/components/custom/dock/DockIconButton.vue.d.ts +10 -0
  64. package/dist/components/custom/dock/DockPopoverTrigger.vue.d.ts +19 -0
  65. package/dist/components/custom/dock/DockStack.vue.d.ts +35 -22
  66. package/dist/components/custom/dock/GlassDock.vue.d.ts +19 -3
  67. package/dist/components/custom/dock/composables/dockMorphContext.d.ts +18 -32
  68. package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +76 -145
  69. package/dist/components/custom/dock/composables/index.d.ts +1 -0
  70. package/dist/components/custom/dock/composables/railProjection.d.ts +45 -0
  71. package/dist/components/custom/dock/composables/useDockContextSilhouette.d.ts +192 -0
  72. package/dist/components/custom/dock/composables/useDockFission.d.ts +158 -0
  73. package/dist/components/custom/dock/composables/useDockItemDrag.d.ts +18 -0
  74. package/dist/components/custom/dock/composables/useDockShellProps.d.ts +38 -0
  75. package/dist/components/custom/dock/constants.d.ts +14 -3
  76. package/dist/components/custom/dock/index.d.ts +3 -0
  77. package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +21 -0
  78. package/dist/components/custom/dot-flow-field/composables/flowGLProgram.d.ts +8 -0
  79. package/dist/components/custom/dot-flow-field/composables/flowSetupGL.d.ts +9 -0
  80. package/dist/components/custom/dot-flow-field/composables/flowSetupGLFlow.d.ts +12 -0
  81. package/dist/components/custom/dot-flow-field/composables/flowSetupWGPU.d.ts +7 -0
  82. package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +28 -2
  83. package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +18 -17
  84. package/dist/components/custom/dot-flow-field/constants.d.ts +51 -0
  85. package/dist/components/custom/dot-flow-field/index.d.ts +1 -1
  86. package/dist/components/custom/dot-flow-field/shaders/flow-field.compute.wgsl.d.ts +1 -1
  87. package/dist/components/custom/dot-flow-field/shaders/flow-field.glsl.d.ts +29 -0
  88. package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +2 -1
  89. package/dist/components/custom/dot-matrix/composables/uniformBridgeWGPU.d.ts +10 -1
  90. package/dist/components/custom/dot-matrix/composables/useDotSphere.d.ts +7 -0
  91. package/dist/components/custom/dot-matrix/constants.d.ts +14 -0
  92. package/dist/components/custom/dot-matrix/index.d.ts +1 -1
  93. package/dist/components/custom/dot-matrix/shaders/dot-matrix.glsl.d.ts +2 -2
  94. package/dist/components/custom/dot-matrix/shaders/dot-matrix.wgsl.d.ts +1 -1
  95. package/dist/components/custom/fourier-field/FourierField.vue.d.ts +4 -0
  96. package/dist/components/custom/fourier-field/composables/fourierFieldGLSetup.d.ts +9 -0
  97. package/dist/components/custom/fourier-field/composables/fourierFieldWGPUSetup.d.ts +11 -0
  98. package/dist/components/custom/fourier-field/composables/uniformBridgeWGPU.d.ts +16 -1
  99. package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +22 -1
  100. package/dist/components/custom/fourier-field/constants.d.ts +53 -0
  101. package/dist/components/custom/fourier-field/shaders/fourier-field.glsl.d.ts +1 -1
  102. package/dist/components/custom/fourier-field/shaders/fourier-field.render.wgsl.d.ts +1 -1
  103. package/dist/components/custom/goo-blob/composables/easing.d.ts +1 -0
  104. package/dist/components/custom/goo-blob/composables/useBlobSatellites.d.ts +1 -0
  105. package/dist/components/custom/goo-blob/constants.d.ts +26 -1
  106. package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +1 -1
  107. package/dist/components/custom/goo-blob/shaders/metaball.wgsl.d.ts +1 -1
  108. package/dist/components/custom/goo-blob/types.d.ts +50 -1
  109. package/dist/components/custom/goo-dot-matrix/composables/gooDotSetup.d.ts +32 -3
  110. package/dist/components/custom/goo-dot-matrix/composables/uniformBridgeWGPU.d.ts +14 -4
  111. package/dist/components/custom/goo-dot-matrix/constants.d.ts +55 -16
  112. package/dist/components/custom/goo-dot-matrix/index.d.ts +1 -1
  113. package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.frag.d.ts +2 -0
  114. package/dist/components/custom/goo-dot-matrix/shaders/goo-dot.wgsl.d.ts +1 -0
  115. package/dist/components/custom/goo-filter/GooFilter.vue.d.ts +22 -0
  116. package/dist/components/custom/goo-filter/index.d.ts +1 -0
  117. package/dist/components/custom/handmark/brush.d.ts +17 -17
  118. package/dist/components/custom/handmark/constants.d.ts +28 -8
  119. package/dist/components/custom/handmark/geometry.d.ts +34 -1
  120. package/dist/components/custom/handmark/index.d.ts +1 -1
  121. package/dist/components/custom/icon-chip/types.d.ts +10 -0
  122. package/dist/components/custom/paper-backdrop/PaperBackdrop.vue.d.ts +18 -0
  123. package/dist/components/custom/paper-grid/composables/paperGrid.d.ts +44 -29
  124. package/dist/components/custom/paper-grid/composables/paperGridGLSetup.d.ts +2 -0
  125. package/dist/components/custom/paper-grid/composables/paperGridWGPUSetup.d.ts +3 -1
  126. package/dist/components/custom/paper-grid/composables/uniformBridgeWGPU.d.ts +2 -2
  127. package/dist/components/custom/paper-grid/constants.d.ts +44 -6
  128. package/dist/components/custom/paper-grid/index.d.ts +2 -2
  129. package/dist/components/custom/paper-grid/shaders/paper-grid.glsl.d.ts +1 -1
  130. package/dist/components/custom/paper-grid/shaders/paper-grid.wgsl.d.ts +1 -1
  131. package/dist/components/custom/selectable-chip/chipVariants.d.ts +39 -0
  132. package/dist/components/custom/selectable-chip/selectableChipVariants.d.ts +12 -20
  133. package/dist/components/custom/tabs/constants.d.ts +16 -8
  134. package/dist/components/custom/timeline/ScrubberTimeline.vue.d.ts +16 -0
  135. package/dist/components/custom/timeline/geometry.d.ts +0 -8
  136. package/dist/components/custom/toggle-chip/index.d.ts +15 -4
  137. package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +12 -10
  138. package/dist/components/ui/_shared/useSurfaceAxis.d.ts +17 -3
  139. package/dist/components/ui/badge/Badge.vue.d.ts +14 -0
  140. package/dist/components/ui/badge/index.d.ts +1 -0
  141. package/dist/components/ui/button/Button.vue.d.ts +1 -0
  142. package/dist/components/ui/card/Card.vue.d.ts +1 -1
  143. package/dist/components/ui/card/ScrollCard.vue.d.ts +1 -1
  144. package/dist/components/ui/carousel/CarouselContent.vue.d.ts +2 -4
  145. package/dist/components/ui/dialog/DialogContent.vue.d.ts +9 -0
  146. package/dist/components/ui/drawer/Drawer.vue.d.ts +33 -14
  147. package/dist/components/ui/drawer/constants.d.ts +8 -6
  148. package/dist/components/ui/drawer/index.d.ts +12 -2
  149. package/dist/components/ui/select/SelectContent.vue.d.ts +9 -0
  150. package/dist/components/ui/slider/Slider.vue.d.ts +9 -0
  151. package/dist/composables/dom/index.d.ts +1 -0
  152. package/dist/composables/dom/useDragVelocity.d.ts +46 -0
  153. package/dist/composables/glass/wave/index.d.ts +4 -0
  154. package/dist/composables/glass/wave/waveField.d.ts +115 -0
  155. package/dist/composables/glass/wave/waveField.glsl.d.ts +1 -0
  156. package/dist/composables/glass/wave/waveField.wgsl.d.ts +1 -0
  157. package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +95 -2
  158. package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +40 -2
  159. package/dist/composables/glass/webgpu/index.d.ts +1 -0
  160. package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +37 -0
  161. package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +49 -2
  162. package/dist/composables/glass/webgpu/webgpuDevice.d.ts +1 -1
  163. package/dist/composables/motion/core/index.d.ts +4 -0
  164. package/dist/composables/motion/core/useHaptic.d.ts +48 -0
  165. package/dist/composables/motion/core/writeVelocityWeight.d.ts +31 -0
  166. package/dist/composables/motion/index.d.ts +2 -0
  167. package/dist/composables/motion/springPresets.d.ts +16 -17
  168. package/dist/composables/motion/suite.d.ts +2 -2
  169. package/dist/composables/motion/useBloomUp.d.ts +97 -0
  170. package/dist/composables/motion/useCelebrationBurst.d.ts +50 -0
  171. package/dist/composables/motion/useDockCtaReceive.d.ts +10 -28
  172. package/dist/composables/motion/useGooMorph.d.ts +72 -0
  173. package/dist/composables/motion/useLiquidFlex.d.ts +18 -0
  174. package/dist/composables/motion/useLiquidMorph.d.ts +108 -0
  175. package/dist/composables/motion/useLiquidPress.d.ts +12 -0
  176. package/dist/composables/motion/useLiquidReveal.d.ts +7 -4
  177. package/dist/composables/motion/useMorphField.d.ts +157 -0
  178. package/dist/composables/motion/useScrollPin.d.ts +49 -0
  179. package/dist/composables/motion/useScrollScene.d.ts +67 -0
  180. package/dist/concentric.js +532 -563
  181. package/dist/configurator.js +2 -2
  182. package/dist/confirm-dialog.js +3 -3
  183. package/dist/constellation.js +4 -4
  184. package/dist/context-menu.js +2 -2
  185. package/dist/controls.js +2 -2
  186. package/dist/createCanvasLifecycle-CuCrGRfq.js +173 -0
  187. package/dist/dark.js +1 -1
  188. package/dist/data-table.js +1 -1
  189. package/dist/deck.js +1 -1
  190. package/dist/dialog.js +3 -3
  191. package/dist/dock.js +1163 -618
  192. package/dist/dockContext-gFVS2gMg.js +18 -0
  193. package/dist/dom.js +7 -6
  194. package/dist/dot-flow-field.js +1114 -523
  195. package/dist/dot-matrix.js +348 -204
  196. package/dist/drawer.js +106 -96
  197. package/dist/{dropdown-menu-aJmV5SqE.js → dropdown-menu-CCfcCQ68.js} +3 -3
  198. package/dist/dropdown-menu.js +1 -1
  199. package/dist/easing.js +3 -3
  200. package/dist/expandable-container.js +2 -2
  201. package/dist/fading-scroll.js +1 -1
  202. package/dist/forms.js +6 -6
  203. package/dist/fourier-field.js +441 -197
  204. package/dist/fourier-math.js +1 -1
  205. package/dist/glass-panel.js +2 -2
  206. package/dist/glass-ui.css +1 -1
  207. package/dist/glass-ui.js +139 -135
  208. package/dist/goo-blob.js +11 -9
  209. package/dist/goo-dot-matrix.js +418 -198
  210. package/dist/handmark.js +137 -94
  211. package/dist/header-ribbon.js +1 -1
  212. package/dist/hover-card.js +1 -1
  213. package/dist/hover-popover.js +1 -1
  214. package/dist/icon-chip.js +1 -1
  215. package/dist/icon-tooltip.js +1 -1
  216. package/dist/index.d.ts +3 -0
  217. package/dist/instrument-chassis.js +1 -1
  218. package/dist/keyboard.js +1 -1
  219. package/dist/label.js +1 -1
  220. package/dist/labeled-field.js +7 -7
  221. package/dist/metric-badge.js +1 -1
  222. package/dist/metric-cell.js +1 -1
  223. package/dist/metric-stack.js +1 -1
  224. package/dist/motion-core.js +42 -39
  225. package/dist/motion-curves.js +20 -14
  226. package/dist/motion.js +226 -26
  227. package/dist/notification.js +1 -1
  228. package/dist/number-field.js +1 -1
  229. package/dist/pager-dots.js +1 -1
  230. package/dist/paper-backdrop.js +1 -1
  231. package/dist/paper-grid.js +315 -342
  232. package/dist/paperGrid-CXCSMbZ1.js +191 -0
  233. package/dist/popover.js +1 -1
  234. package/dist/{presets-CvOUqtdY.js → presets-QvYgnFIZ.js} +13 -12
  235. package/dist/progress.js +1 -1
  236. package/dist/pulse.js +1 -1
  237. package/dist/reactive.js +2 -2
  238. package/dist/{resolveCanvasColor-yPyIpJt9.js → resolveCanvasColor-DsSJk06I.js} +5 -5
  239. package/dist/scrolling-text.js +1 -1
  240. package/dist/search.js +7 -7
  241. package/dist/select.js +3 -3
  242. package/dist/selectable-chip.js +18 -35
  243. package/dist/separator.js +1 -1
  244. package/dist/{sheet-B2flBfLH.js → sheet-DUCIoOe0.js} +3 -3
  245. package/dist/sheet.js +1 -1
  246. package/dist/sidebar.js +1 -1
  247. package/dist/slider-CcICPe3u.js +149 -0
  248. package/dist/slider.js +1 -1
  249. package/dist/sortable-list.js +3 -3
  250. package/dist/{spectrum-walk-BVzA7Biz.js → spectrum-walk-cBNSx_zm.js} +1 -1
  251. package/dist/springPresets-DfoQ6XRY.js +64 -0
  252. package/dist/stacked-icons.js +54 -39
  253. package/dist/styles/cards.css +202 -2
  254. package/dist/styles/components.css +1 -3
  255. package/dist/styles/configurator.css +172 -7
  256. package/dist/styles/critical-partition.mjs +35 -2
  257. package/dist/styles/deferred.css +2 -0
  258. package/dist/styles/dock/adaptive-legibility.css +119 -0
  259. package/dist/styles/dock/density.css +18 -10
  260. package/dist/styles/dock/fission-bridge.css +552 -0
  261. package/dist/styles/dock/layers.css +88 -124
  262. package/dist/styles/dock/morph-bridge.css +15 -2
  263. package/dist/styles/dock/morph.css +45 -114
  264. package/dist/styles/dock/shape.css +137 -11
  265. package/dist/styles/dock/shell.css +1 -3
  266. package/dist/styles/dock/stack-rail.css +95 -7
  267. package/dist/styles/dock-controls/icon-button.css +34 -2
  268. package/dist/styles/dock-controls/triggers.css +23 -1
  269. package/dist/styles/dock-controls.css +18 -0
  270. package/dist/styles/dock.css +16 -1
  271. package/dist/styles/drawer.css +166 -0
  272. package/dist/styles/glass/glass-atom.css +244 -0
  273. package/dist/styles/glass/glass-capsule.css +143 -0
  274. package/dist/styles/glass/glass-chip.css +215 -0
  275. package/dist/styles/glass/liquid-enter.css +252 -0
  276. package/dist/styles/glass/liquid-morph.css +850 -0
  277. package/dist/styles/glass/material.css +70 -1
  278. package/dist/styles/glass/reveal.css +22 -2
  279. package/dist/styles/glass/rim.css +13 -1
  280. package/dist/styles/glass/surfaces.css +18 -8
  281. package/dist/styles/glass.css +11 -0
  282. package/dist/styles/icon-chip.css +45 -0
  283. package/dist/styles/index.css +11 -0
  284. package/dist/styles/jubilance.css +65 -0
  285. package/dist/styles/motion/morph-field.css +229 -0
  286. package/dist/styles/paper.css +230 -14
  287. package/dist/styles/scroll-choreography.css +135 -78
  288. package/dist/styles/segmented-tabs.css +85 -51
  289. package/dist/styles/select.css +151 -0
  290. package/dist/styles/tokens/color-radius.css +1 -1
  291. package/dist/styles/tokens/dark-arm.css +57 -8
  292. package/dist/styles/tokens/glass-deep.css +8 -4
  293. package/dist/styles/tokens/glass-fx.css +80 -2
  294. package/dist/styles/tokens/glass.css +140 -8
  295. package/dist/styles/tokens/light-dark.css +2 -2
  296. package/dist/styles/tokens/property-regs.css +144 -0
  297. package/dist/styles/tokens/scale-paper.css +20 -8
  298. package/dist/styles/tokens/scheme-motion.css +92 -157
  299. package/dist/styles/tokens/scheme-spring.css +239 -0
  300. package/dist/styles/tokens/scroll-tokens.css +15 -15
  301. package/dist/styles/tokens/shadow.css +73 -13
  302. package/dist/styles/tokens.css +9 -2
  303. package/dist/styles/utilities/btn.css +70 -0
  304. package/dist/switch.js +1 -1
  305. package/dist/tabs.js +198 -181
  306. package/dist/timeline.js +241 -206
  307. package/dist/toast.js +1 -1
  308. package/dist/toggle-chip.js +14 -41
  309. package/dist/toggle-group.js +1 -1
  310. package/dist/tooltip.js +1 -1
  311. package/dist/typewriter.js +1 -1
  312. package/dist/{uniformBridgeWGPU-CtAKl45L.js → uniformBridgeWGPU-BCse1SHU.js} +191 -127
  313. package/dist/{useAnimatedNumber-CLrxicG9.js → useAnimatedNumber-BntskVdQ.js} +1 -1
  314. package/dist/{useConfiguratorState-4xblKfwd.js → useConfiguratorState-22BcULzF.js} +37 -35
  315. package/dist/useDockCtaReceive-DX7RDb6_.js +88 -0
  316. package/dist/{useDragMorph-BUgAC-zK.js → useDragMorph-DGLSewwB.js} +2 -2
  317. package/dist/useDragVelocity-CjcfX3dA.js +57 -0
  318. package/dist/useGooMorph-Cs13NgYL.js +104 -0
  319. package/dist/useGpuSubstrate-Ceet70xq.js +347 -0
  320. package/dist/{useViewTransition-CUI1nAgn.js → useHaptic-CPz5BT9I.js} +40 -1
  321. package/dist/{useLiquidFlex-UmA6LMZu.js → useLiquidFlex-Cc6PjVJD.js} +8 -3
  322. package/dist/useLiquidPress-CtOQ8Z0_.js +43 -0
  323. package/dist/useMorphField-ogBM7ubT.js +141 -0
  324. package/dist/{useScrollChrome-D66AVP7C.js → useScrollChrome-JuImi1DM.js} +2 -2
  325. package/dist/{useSpringMount-BWDnKIwh.js → useSpringMount-DFxtzmkR.js} +1 -1
  326. package/dist/{useSpringPress-B1-Czp-V.js → useSpringPress-VM9RgVq3.js} +1 -1
  327. package/dist/{useSurfaceAxis-g0NloYEF.js → useSurfaceAxis-Ci7Dnaw2.js} +1 -1
  328. package/dist/{useTouchGate-CBZTD4SD.js → useTouchGate-B1Lf9XqN.js} +1 -1
  329. package/dist/virtual.js +1 -1
  330. package/dist/watercolor-dot.js +16 -26
  331. package/dist/writeVelocityWeight-Bh83xZfs.js +19 -0
  332. package/package.json +14 -3
  333. package/src/styles/cards.css +202 -2
  334. package/src/styles/configurator.css +172 -7
  335. package/src/styles/critical-partition.mjs +35 -2
  336. package/src/styles/dock/adaptive-legibility.css +119 -0
  337. package/src/styles/dock/density.css +18 -10
  338. package/src/styles/dock/fission-bridge.css +552 -0
  339. package/src/styles/dock/layers.css +88 -124
  340. package/src/styles/dock/morph-bridge.css +15 -2
  341. package/src/styles/dock/morph.css +45 -114
  342. package/src/styles/dock/shape.css +137 -11
  343. package/src/styles/dock/shell.css +1 -3
  344. package/src/styles/dock/stack-rail.css +95 -7
  345. package/src/styles/dock-controls/icon-button.css +34 -2
  346. package/src/styles/dock-controls/triggers.css +23 -1
  347. package/src/styles/dock-controls.css +18 -0
  348. package/src/styles/dock.css +16 -1
  349. package/src/styles/drawer.css +164 -0
  350. package/src/styles/glass/glass-atom.css +244 -0
  351. package/src/styles/glass/glass-capsule.css +143 -0
  352. package/src/styles/glass/glass-chip.css +215 -0
  353. package/src/styles/glass/liquid-enter.css +252 -0
  354. package/src/styles/glass/liquid-morph.css +850 -0
  355. package/src/styles/glass/material.css +70 -1
  356. package/src/styles/glass/reveal.css +22 -2
  357. package/src/styles/glass/rim.css +13 -1
  358. package/src/styles/glass/surfaces.css +18 -8
  359. package/src/styles/glass.css +11 -0
  360. package/src/styles/icon-chip.css +45 -0
  361. package/src/styles/index.css +11 -0
  362. package/src/styles/jubilance.css +65 -0
  363. package/src/styles/motion/morph-field.css +229 -0
  364. package/src/styles/paper.css +230 -14
  365. package/src/styles/scroll-choreography.css +135 -78
  366. package/src/styles/segmented-tabs.css +85 -47
  367. package/src/styles/select.css +151 -0
  368. package/src/styles/tokens/color-radius.css +1 -1
  369. package/src/styles/tokens/dark-arm.css +57 -8
  370. package/src/styles/tokens/glass-deep.css +8 -4
  371. package/src/styles/tokens/glass-fx.css +80 -2
  372. package/src/styles/tokens/glass.css +140 -8
  373. package/src/styles/tokens/light-dark.css +2 -2
  374. package/src/styles/tokens/property-regs.css +144 -0
  375. package/src/styles/tokens/scale-paper.css +20 -8
  376. package/src/styles/tokens/scheme-motion.css +92 -157
  377. package/src/styles/tokens/scheme-spring.css +239 -0
  378. package/src/styles/tokens/scroll-tokens.css +15 -15
  379. package/src/styles/tokens/shadow.css +73 -13
  380. package/src/styles/tokens.css +9 -2
  381. package/src/styles/utilities/btn.css +70 -0
  382. package/dist/DialogContent-6JtTB5x2.js +0 -106
  383. package/dist/PagerDots-Cjx96la-.js +0 -98
  384. package/dist/PaperBackdrop-CqwjnfLv.js +0 -31
  385. package/dist/badge-D9XWW4GT.js +0 -53
  386. package/dist/button-5dY1Dvhd.js +0 -125
  387. package/dist/components/custom/concentric/composables/ringField.d.ts +0 -85
  388. package/dist/createCanvasLifecycle-Gh45Ce-p.js +0 -93
  389. package/dist/dockContext-BNfyPLe9.js +0 -17
  390. package/dist/slider-2A0rPn79.js +0 -142
  391. package/dist/springPresets-Ce7OYCm9.js +0 -46
  392. package/dist/useDockCtaReceive-DfFkmgL1.js +0 -82
  393. package/dist/useGpuSubstrate-4pTcp6mX.js +0 -294
  394. package/dist/useLiquidPress-BooG97RY.js +0 -39
  395. /package/dist/{CollapsibleContent-68dEXIAl.js → CollapsibleContent-D7UNsXQr.js} +0 -0
  396. /package/dist/{DialogFooter-9phqcRIS.js → DialogFooter-DoLy0ewI.js} +0 -0
  397. /package/dist/{InstrumentChassis-CxsHSyMj.js → InstrumentChassis-UUJX0-mW.js} +0 -0
  398. /package/dist/{Label-C2ejNWeC.js → Label-B_HPqi_q.js} +0 -0
  399. /package/dist/{ModalOverlay-D1VrWyoi.js → ModalOverlay-DfAf7o15.js} +0 -0
  400. /package/dist/{SelectGroup-BFiod7X2.js → SelectGroup-Dcczq44n.js} +0 -0
  401. /package/dist/{SelectSeparator-C2UGOkXF.js → SelectSeparator-CNRGG7Ew.js} +0 -0
  402. /package/dist/{Separator-DQcwC2TR.js → Separator-Cf9-JFgi.js} +0 -0
  403. /package/dist/{_plugin-vue_export-helper-C1je1s0u.js → _plugin-vue_export-helper-gLzyemvl.js} +0 -0
  404. /package/dist/{color-Cs0-oxYL.js → color-B9jZdhJX.js} +0 -0
  405. /package/dist/{compile-nZ1xVYTp.js → compile-INR_tPk_.js} +0 -0
  406. /package/dist/{constants--C2DkLW8.js → constants-BWj7DkMn.js} +0 -0
  407. /package/dist/{createContext-CpBNTRMI.js → createContext-Cd23P9j0.js} +0 -0
  408. /package/dist/{dotMatrixField-D_x9_1qq.js → dotMatrixField-CRO0ZFk4.js} +0 -0
  409. /package/dist/{flow.glsl-B2P7e0MT.js → flow.glsl-DqEGRpl4.js} +0 -0
  410. /package/dist/{math-Eb0w3LqU.js → math-5RcIgCB4.js} +0 -0
  411. /package/dist/{menuItemVariants-D8VNHq22.js → menuItemVariants-DAXquKja.js} +0 -0
  412. /package/dist/{prng-B-d9eYX8.js → prng-B5tIXTtj.js} +0 -0
  413. /package/dist/{procedural-color.wgsl-m7Zgv35j.js → procedural-color.wgsl-C1Y5PkM6.js} +0 -0
  414. /package/dist/{scrollReader-DI1NWxUw.js → scrollReader-rc3Ns_NM.js} +0 -0
  415. /package/dist/{useControlSize-SH1UmJCi.js → useControlSize-DAZ062x7.js} +0 -0
  416. /package/dist/{useFuzzySearch-DIhcYtcw.js → useFuzzySearch-0fTYOhS4.js} +0 -0
  417. /package/dist/{useGlobalDark-CmjB9E32.js → useGlobalDark-B4HO9LXG.js} +0 -0
  418. /package/dist/{useIntersectionPause-Dbozzjgm.js → useIntersectionPause-DO8Vl4gs.js} +0 -0
  419. /package/dist/{useInterval-CNdua40W.js → useInterval-BVUI-sez.js} +0 -0
  420. /package/dist/{useKeyboardShortcuts-BPRp33Im.js → useKeyboardShortcuts-BEut54Tk.js} +0 -0
  421. /package/dist/{usePointerVelocityField-QLsy3_kv.js → usePointerVelocityField-BrkqZFhj.js} +0 -0
  422. /package/dist/{useResizeObserver-Bpoi7tRE.js → useResizeObserver-DdEn3v2f.js} +0 -0
  423. /package/dist/{useResolveTokenColor-vAylyR0x.js → useResolveTokenColor-ChOnCckA.js} +0 -0
  424. /package/dist/{useScrollProgress-c3yxmH6a.js → useScrollProgress-A0M6qRl7.js} +0 -0
  425. /package/dist/{useSortable-BVqlJRBR.js → useSortable-DQV_UNDw.js} +0 -0
  426. /package/dist/{useTextHighlight-NmBM5V_4.js → useTextHighlight-Bma3UlKA.js} +0 -0
  427. /package/dist/{useTimer-BHJOKr35.js → useTimer-BBLGPXR8.js} +0 -0
  428. /package/dist/{useUserInvalidAria-y5namzeE.js → useUserInvalidAria-EmmwWPOl.js} +0 -0
  429. /package/dist/{useViewportReady-anbac3m6.js → useViewportReady-C9pYnn7K.js} +0 -0
  430. /package/dist/{vReveal-D9k0jADx.js → vReveal-CT1KtwZA.js} +0 -0
@@ -1,139 +1,28 @@
1
- import { t as e } from "./_plugin-vue_export-helper-C1je1s0u.js";
2
- import { t } from "./usePointerVelocityField-QLsy3_kv.js";
3
- import { n, o as r } from "./procedural-color.wgsl-m7Zgv35j.js";
4
- import { t as i } from "./flow.glsl-B2P7e0MT.js";
5
- import { a, t as o } from "./useGpuSubstrate-4pTcp6mX.js";
6
- import { c as s, t as c } from "./color-Cs0-oxYL.js";
7
- import { computed as l, createElementBlock as u, createElementVNode as d, defineComponent as f, normalizeStyle as p, onMounted as m, onScopeDispose as h, openBlock as g, reactive as _, useTemplateRef as v, watch as y } from "vue";
8
- //#region src/components/custom/paper-grid/composables/paperGrid.ts
9
- Math.PI * 2;
10
- var b = .012;
11
- function x(e, t) {
12
- let n = e * .1031 % 1, r = t * .1031 % 1, i = e * .1031 % 1;
13
- n < 0 && (n += 1), r < 0 && (r += 1), i < 0 && (i += 1);
14
- let a = n * (r + 33.33) + r * (i + 33.33) + i * (n + 33.33);
15
- n += a, r += a, i += a;
16
- let o = (n + r) * i % 1;
17
- return o < 0 && (o += 1), o;
18
- }
19
- function S(e, t, n) {
20
- return e + (t - e) * n;
21
- }
22
- function C(e, t) {
23
- 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);
24
- return S(S(c, l, o), S(u, d, o), s);
25
- }
26
- function w(e) {
27
- let t = 0, n = .5, r = 1, i = e.x, a = e.y;
28
- for (let e = 0; e < 3; e++) {
29
- t += n * C(i * r, a * r);
30
- let e = .8 * i - .6 * a, o = .6 * i + .8 * a;
31
- i = e, a = o, r *= 2, n *= .5;
32
- }
33
- return t;
34
- }
35
- function T(e) {
36
- let t = w({
37
- x: e.x + b,
38
- y: e.y
39
- }) - w({
40
- x: e.x - b,
41
- y: e.y
42
- }), n = w({
43
- x: e.x,
44
- y: e.y + b
45
- }) - w({
46
- x: e.x,
47
- y: e.y - b
48
- }), r = t / (2 * b);
49
- return {
50
- x: n / (2 * b),
51
- y: -r
52
- };
53
- }
54
- function E(e, t, n, r, i, a, o) {
55
- let s = T({
56
- x: e.x * n + t * r,
57
- y: e.y * n + t * r
58
- }), c = T({
59
- x: e.x * i - t * a,
60
- y: e.y * i - t * a
61
- });
62
- return {
63
- x: s.x * o + c.x * o * .5,
64
- y: s.y * o + c.y * o * .5
65
- };
66
- }
67
- function D(e, t, n, r) {
68
- let i = e.x - t.x, a = e.y - t.y, o = Math.hypot(i, a), s = Math.max(r, 1e-4), c = n * Math.exp(-(o * o) / (2 * s * s));
69
- if (o < 1e-5) return {
70
- x: 0,
71
- y: 0
72
- };
73
- let l = 1 / o;
74
- return {
75
- x: i * l * c,
76
- y: a * l * c
77
- };
78
- }
79
- function O(e, t, n) {
80
- let r = t - e, i = Math.abs(r) < 1e-9 ? r < 0 ? -1e-9 : 1e-9 : r, a = Math.min(Math.max((n - e) / i, 0), 1);
81
- return a * a * (3 - 2 * a);
82
- }
83
- function k(e, t, n) {
84
- return Math.min(Math.max(e, t), n);
85
- }
86
- function A(e, t, n) {
87
- let r = 1 - Math.abs((e.x - Math.floor(e.x)) * 2 - 1), i = 1 - Math.abs((e.y - Math.floor(e.y)) * 2 - 1), a = k(t, n.x, .5), o = k(t, n.y, .5), s = n.x * 1.5, c = n.y * 1.5, l = O(a + s, a - s, r), u = O(o + c, o - c, i);
88
- return l *= k(t / Math.max(a, 1e-6), 0, 1), u *= k(t / Math.max(o, 1e-6), 0, 1), l = S(l, t, k(n.x * 2 - 1, 0, 1)), u = S(u, t, k(n.y * 2 - 1, 0, 1)), Math.max(l, u);
89
- }
90
- function j(e, t, n) {
91
- let r = {
92
- x: e.x * n.gridScale,
93
- y: e.y * n.gridScale
94
- }, i = E(r, t, n.warpScale, n.warpSpeed, n.warpScale2, n.warpSpeed2, n.amplitude);
95
- r = {
96
- x: r.x + i.x,
97
- y: r.y + i.y
98
- };
99
- let a = D(r, n.cursor, n.bulgeStrength * n.bulgeMode, n.bulgeRadius);
100
- r = {
101
- x: r.x + a.x,
102
- y: r.y + a.y
103
- };
104
- let o = A(r, n.targetWidth, n.uvDeriv), s = Math.max(n.majorEvery, 1), c = {
105
- x: r.x / s,
106
- y: r.y / s
107
- }, l = {
108
- x: n.uvDeriv.x / s,
109
- y: n.uvDeriv.y / s
110
- }, u = A(c, n.targetWidthMajor, l), d = Math.max(o * n.minorAlpha, u * n.majorAlpha);
111
- return {
112
- line: d,
113
- alpha: d * n.fieldAlpha
114
- };
115
- }
116
- function M(e, t) {
117
- return e / Math.max(t, 1);
118
- }
119
- //#endregion
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 } from "./procedural-color.wgsl-C1Y5PkM6.js";
4
+ import { t as i } from "./flow.glsl-DqEGRpl4.js";
5
+ import { a, t as o } from "./useGpuSubstrate-Ceet70xq.js";
6
+ import { c as s, t as c } from "./color-B9jZdhJX.js";
7
+ import { a as l, d as u, f as d, i as f, n as p, o as m, p as h, r as g, t as _ } from "./paperGrid-CXCSMbZ1.js";
8
+ import { computed as v, createElementBlock as y, createElementVNode as b, defineComponent as x, normalizeStyle as S, onMounted as C, onScopeDispose as w, openBlock as T, reactive as E, useTemplateRef as D, watch as O } from "vue";
120
9
  //#region src/components/custom/paper-grid/shaders/paper-grid.wgsl.ts
121
- var N = `
10
+ var k = `
122
11
  const TAU: f32 = 6.283185307179586;
123
12
 
124
13
  // ── Paper-grid uniforms (the typed-struct source-of-truth — see uniformBridgeWGPU.ts) ──
125
14
  struct PaperGridUniforms {
126
15
  // u0: (uTime, uGridScale, uMinorPitch, uMajorEvery)
127
16
  u0: vec4<f32>,
128
- // warp: (uWarpScale, uWarpSpeed, uWarpScale2, uWarpSpeed2)
129
- warp: vec4<f32>,
130
- // warp2: (uAmplitude, uAspect, _pad, _pad)
17
+ // face: (uFaceAlpha, uFaceRelief, uSquashK, uBaseInset) — the height-lit FACE (re-points the retired warp lane)
18
+ face: vec4<f32>,
19
+ // warp2: (uAmplitude, uAspect, uLightDirX, uLightDirY) — aspect + the cel key-light
131
20
  warp2: vec4<f32>,
132
21
  // grid: (uTargetWidth, uTargetWidthMajor, uMinorAlpha, uMajorAlpha)
133
22
  grid: vec4<f32>,
134
23
  // field: (uFieldAlpha, uHasBackground, _pad, _pad)
135
24
  field: vec4<f32>,
136
- // cursor: (uCursorX, uCursorY, uBulgeStrength, uBulgeRadius)
25
+ // cursor: (uCursorX, uCursorY, uSwirlStrength, uSwirlRadius)
137
26
  cursor: vec4<f32>,
138
27
  // cursor2: (uBulgeMode, uInteractive, _pad, _pad)
139
28
  cursor2: vec4<f32>,
@@ -141,6 +30,16 @@ struct PaperGridUniforms {
141
30
  line: vec4<f32>,
142
31
  // bg: (uBg.rgb (linear), _pad)
143
32
  bg: vec4<f32>,
33
+ // wave: (waveDirX, waveDirY, waveK, waveOmega) — the traveling-wave crest
34
+ wave: vec4<f32>,
35
+ // wave2: (waveSigma, twistMax, shearMax, amp) — the cell-twist envelope (amp: spring-eased)
36
+ wave2: vec4<f32>,
37
+ // faceLo: (rose-umber trough .rgb (linear), _pad) — the warm-divergent ramp (FOLD B, 3-stop)
38
+ faceLo: vec4<f32>,
39
+ // faceMid: (ember-amber mid .rgb (linear), _pad)
40
+ faceMid: vec4<f32>,
41
+ // faceHi: (warm-wheat crest .rgb (linear), _pad)
42
+ faceHi: vec4<f32>,
144
43
  };
145
44
 
146
45
  @group(0) @binding(0) var<uniform> u: PaperGridUniforms;
@@ -197,45 +96,13 @@ fn potentialFBM(p: vec2f) -> f32 {
197
96
  }
198
97
 
199
98
  // The shared divergence-free 2D-curl operator (flow.wgsl.ts — the FIRST WGSL curl consumer).
99
+ ${h}
200
100
 
201
- const CURL_EPS: f32 = 0.012;
202
-
203
- // ∇×ψ in 2D — the divergence-free flow direction. Central finite differences of the
204
- // scalar potential give the partials; the cross-pairing (∂y, −∂x) is the 2D curl.
205
- fn curlFBM(p: vec2f) -> vec2f {
206
- let dx = potentialFBM(p + vec2f(CURL_EPS, 0.0)) - potentialFBM(p - vec2f(CURL_EPS, 0.0));
207
- let dy = potentialFBM(p + vec2f(0.0, CURL_EPS)) - potentialFBM(p - vec2f(0.0, CURL_EPS));
208
- // ψ-gradient is (dx, dy)/(2·eps); the curl rotates it 90°: (∂ψ/∂y, −∂ψ/∂x).
209
- let g = vec2f(dx, dy) / (2.0 * CURL_EPS);
210
- return vec2f(g.y, -g.x);
211
- }
212
-
213
-
214
- // ── §3 The "liquid": the global curl-flow domain warp (transcribes paperGrid.ts curlWarp) ──
215
- // TWO counter-flowing curl terms at different scales/speeds (Alex Harri counter-flow — never
216
- // visibly loops). A SHALLOW, LOW-frequency warp keeps the lines a clearly-readable grid.
217
- fn curlWarp(g: vec2f, t: f32) -> vec2f {
218
- let warpScale = u.warp.x;
219
- let warpSpeed = u.warp.y;
220
- let warpScale2 = u.warp.z;
221
- let warpSpeed2 = u.warp.w;
222
- let amp = u.warp2.x;
223
- let a = curlFBM(vec2f(g.x * warpScale + t * warpSpeed, g.y * warpScale + t * warpSpeed));
224
- let b = curlFBM(vec2f(g.x * warpScale2 - t * warpSpeed2, g.y * warpScale2 - t * warpSpeed2));
225
- return vec2f(a.x * amp + b.x * amp * 0.5, a.y * amp + b.y * amp * 0.5);
226
- }
227
-
228
- // ── §4 The pointer bulge: a LOCAL Gaussian warp (transcribes paperGrid.ts cursorBulge) ──
229
- fn cursorBulge(g: vec2f) -> vec2f {
230
- let cursor = u.cursor.xy;
231
- let strength = u.cursor.z * u.cursor2.x; // bulgeStrength × bulgeMode (+repel / −attract)
232
- let radius = max(u.cursor.w, 1e-4);
233
- let toC = g - cursor;
234
- let d = length(toC);
235
- let bulge = strength * exp(-(d * d) / (2.0 * radius * radius));
236
- if (d < 1e-5) { return vec2f(0.0); }
237
- return (toC / d) * bulge;
238
- }
101
+ // The shared traveling-wave CELL-WARP chunk (waveField.wgsl.ts — cellTwist/cursorSwirl/
102
+ // travelingEnvelope; splices AFTER valueNoise + curlFBM are declared). paper-grid + concentric
103
+ // share this EXACTLY — the cell-local twist replaces the retired LINE-warp (the C3 cure: the
104
+ // boxes twist about their own center, the lines stay locally straight).
105
+ ${d}
239
106
 
240
107
  // ── §1 The crisp line: Ben Golus derivative-AA grid coverage (transcribes gridCoverage) ──
241
108
  // targetWidth is the line half-width in GRID UNITS (lineWidthPx / minorPitchPx); uvDeriv is
@@ -255,6 +122,18 @@ fn gridCoverage(g: vec2f, targetWidth: f32, uvDeriv: vec2f) -> f32 {
255
122
  return max(grid2.x, grid2.y);
256
123
  }
257
124
 
125
+ // ── The 3-stop warm-divergent FACE ramp (FOLD B — height-keyed, NOT a 2-point mid-park) ──
126
+ // trough (faceLo) → mid (faceMid) → crest (faceHi), keyed on rampT = mix(shade, h). All stops
127
+ // are warm hue ∈ [20,90] (the teal-navy purge clear by construction). Linear-space stops; the
128
+ // fs_main routes the result through the production OETF (FOLD E).
129
+ fn faceRamp(rampT: f32) -> vec3f {
130
+ let s = clamp(rampT, 0.0, 1.0);
131
+ if (s < 0.5) {
132
+ return mix(u.faceLo.rgb, u.faceMid.rgb, s * 2.0);
133
+ }
134
+ return mix(u.faceMid.rgb, u.faceHi.rgb, (s - 0.5) * 2.0);
135
+ }
136
+
258
137
  // Full-screen-triangle (the pilot idiom): NDC corners (-1,-1),(3,-1),(-1,3) cover the
259
138
  // viewport from a single 3-vertex draw — no vertex buffer.
260
139
  struct VSOut {
@@ -282,10 +161,20 @@ fn fs_main(in: VSOut) -> @location(0) vec4f {
282
161
  let t = u.u0.x;
283
162
  let gridScale = u.u0.y;
284
163
 
285
- // §5 the per-pixel kernel: warp + bulge the grid coordinate, then two-tier Golus.
286
- var g = uv * gridScale;
287
- g = g + curlWarp(g, t);
288
- g = g + cursorBulge(g);
164
+ // §5 the per-pixel kernel: CELL-TWIST + cursor-swirl the grid coordinate, then two-tier Golus.
165
+ // cellTwist rotates each cell about its OWN center (the boxes twist, the lines stay locally
166
+ // straight — the C3 cure) gated by a traveling Gaussian crest; cursorSwirl twists the cells
167
+ // about the finger. The Golus dv reads the FINAL twisted coord (the crisp-line fence survives).
168
+ let g0 = uv * gridScale;
169
+ // FOLD A — the PRE-twist driver: the face samples height/relief at THIS cc (floor(twisted_g)
170
+ // at the crest lights a NEIGHBOUR cell). cellTwist rides the SAME driver, so twist + face fuse.
171
+ let drv = cellDriver(g0, 1.0, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.w);
172
+ let cc = drv.xy;
173
+ var g = cellTwist(g0, 1.0, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.y, u.wave2.z, u.wave2.w);
174
+ if (u.cursor2.y > 0.5) {
175
+ // bulgeMode (cursor2.x: +repel / −attract) signs the swirl direction.
176
+ g = cursorSwirl(g, u.cursor.xy, u.cursor.z * u.cursor2.x, u.cursor.w);
177
+ }
289
178
 
290
179
  // The screen-space derivative of g (Golus): length(vec2(dpdx, dpdy)) per axis. fwidth-class
291
180
  // derivative reads the ACTUAL backing-store pixel (NOT fwidthFine — Compatibility-Mode safe).
@@ -300,86 +189,112 @@ fn fs_main(in: VSOut) -> @location(0) vec4f {
300
189
  let major = gridCoverage(g / me, u.grid.y, dv / me);
301
190
  let line = max(minor * u.grid.z, major * u.grid.w);
302
191
 
192
+ // ── The FACE (BD.W-PAPERGRID-FACE) — height-lit filled cell interior ──────────────────
193
+ // Sample height/relief at the pre-twist driver cc (FOLD A); Lambert the ∇H slope against the
194
+ // fixed cel key-light; squash the inset so the crest face inflates; multi-stop warm-divergent
195
+ // ramp keyed on mix(shade, h) (FOLD B); the ink through the production OETF (FOLD E).
196
+ let h = cellHeight(cc, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.w);
197
+ let grad = faceRelief(cc, 1.0, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.w);
198
+ let n = normalize(vec3f(-grad * u.face.y, 1.0));
199
+ let shade = clamp(0.5 + dot(n, normalize(vec3f(u.warp2.zw, 1.0))) * 0.5, 0.0, 1.0);
200
+ let inset = u.face.w * (1.0 - u.face.z * h); // squash & stretch
201
+ let face = facePlateau(g, inset, dv);
202
+ let rampT = clamp(shade * 0.5 + h * 0.5, 0.0, 1.0); // FOLD B — height-keyed crest
203
+ let faceInk = clamp(linearToSrgb(faceRamp(rampT)), vec3f(0.0), vec3f(1.0));
204
+ let faceA = face * u.face.x * u.field.x; // FOLD D — one field-blend scalar
205
+
303
206
  let col = clamp(linearToSrgb(u.line.rgb), vec3f(0.0), vec3f(1.0));
304
207
  let hasBg = u.field.y;
305
208
  if (hasBg > 0.5) {
306
- // opaque ground: composite the ink over the themed bg.
209
+ // opaque ground: the face fills the cell, the ink over the themed bg, the line on top.
307
210
  let bg = clamp(linearToSrgb(u.bg.rgb), vec3f(0.0), vec3f(1.0));
211
+ let base = mix(bg, faceInk, faceA);
308
212
  let a = line * u.field.x;
309
- let outRgb = mix(bg, col, a);
213
+ let outRgb = mix(base, col, a);
310
214
  return vec4f(outRgb, 1.0);
311
215
  }
312
- // transparent ground: the LINE carries the alpha — the page reads through the cells.
313
- let a = line * u.field.x;
314
- return vec4f(col * a, a); // premultiplied over transparent
315
- }
316
- `, P = {
216
+ // transparent ground: the FACE composites UNDER the line, the SOURCE-OVER operator in
217
+ // PREMULTIPLIED space (the page reads through the gutters). faceAlpha:0 → faceA=0 → the face
218
+ // term vanishes → vec4f(col·line, line) = byte-identical to the HEAD line-only render.
219
+ let linePremult = (col * line) * u.field.x; // line layer (the FieldAlpha global subtlety)
220
+ let lineA = line * u.field.x;
221
+ let facePremult = faceInk * faceA; // face layer premultiplied (faceA folds field.x)
222
+ let outPremult = linePremult + facePremult * (1.0 - lineA);
223
+ let a = lineA + faceA * (1.0 - lineA);
224
+ return vec4f(outPremult, a); // premultiplied over transparent
225
+ }
226
+ `, A = {
317
227
  u0: 0,
318
- warp: 4,
228
+ face: 4,
319
229
  warp2: 8,
320
230
  grid: 12,
321
231
  field: 16,
322
232
  cursor: 20,
323
233
  cursor2: 24,
324
234
  line: 28,
325
- bg: 32
235
+ bg: 32,
236
+ wave: 36,
237
+ wave2: 40,
238
+ faceLo: 44,
239
+ faceMid: 48,
240
+ faceHi: 52
326
241
  };
327
- function F() {
328
- let e = /* @__PURE__ */ new ArrayBuffer(144);
242
+ function j() {
243
+ let e = /* @__PURE__ */ new ArrayBuffer(224);
329
244
  return {
330
245
  buffer: e,
331
246
  f32: new Float32Array(e)
332
247
  };
333
248
  }
334
- function I(e, t, n, r, i, a) {
335
- let { f32: o } = e, c = M(i, t.cellSize);
336
- o[P.u0 + 0] = n, o[P.u0 + 1] = c, o[P.u0 + 2] = t.cellSize, o[P.u0 + 3] = t.majorEvery;
337
- let l = t.waveScale, u = t.waveScale * 1.7, d = t.waveSpeed, f = t.waveSpeed * .6;
338
- o[P.warp + 0] = l, o[P.warp + 1] = d, o[P.warp + 2] = u, o[P.warp + 3] = f, o[P.warp2 + 0] = t.waveAmplitude, o[P.warp2 + 1] = r, o[P.warp2 + 2] = 0, o[P.warp2 + 3] = 0;
339
- let p = Math.max(t.cellSize, 1), m = t.lineWidth / p, h = t.lineWidth * 1.6 / p;
340
- o[P.grid + 0] = m, o[P.grid + 1] = h, o[P.grid + 2] = t.minorAlpha, o[P.grid + 3] = t.majorAlpha;
341
- let g = t.background === "transparent" ? 0 : 1;
342
- o[P.field + 0] = t.fieldAlpha, o[P.field + 1] = g, o[P.field + 2] = 0, o[P.field + 3] = 0, o[P.cursor + 0] = a.x, o[P.cursor + 1] = a.y, o[P.cursor + 2] = t.bulgeStrength, o[P.cursor + 3] = t.bulgeRadius, o[P.cursor2 + 0] = t.bulgeMode === "attract" ? -1 : 1, o[P.cursor2 + 1] = +!!t.interactive, o[P.cursor2 + 2] = 0, o[P.cursor2 + 3] = 0;
343
- let _ = s(t.lineColor);
344
- if (o[P.line + 0] = _[0], o[P.line + 1] = _[1], o[P.line + 2] = _[2], o[P.line + 3] = 0, t.background === "transparent") o[P.bg + 0] = 0, o[P.bg + 1] = 0, o[P.bg + 2] = 0, o[P.bg + 3] = 0;
249
+ function M(e, t, n, r, i, a, o) {
250
+ let { f32: c } = e, l = f(i, t.cellSize);
251
+ c[A.u0 + 0] = n, c[A.u0 + 1] = l, c[A.u0 + 2] = t.cellSize, c[A.u0 + 3] = t.majorEvery, c[A.face + 0] = t.faceAlpha, c[A.face + 1] = t.faceRelief, c[A.face + 2] = t.squashK, c[A.face + 3] = t.baseInset, c[A.warp2 + 0] = 0, c[A.warp2 + 1] = r, c[A.warp2 + 2] = t.lightDir[0], c[A.warp2 + 3] = t.lightDir[1];
252
+ let u = Math.max(t.cellSize, 1), d = t.lineWidth / u, p = t.lineWidth * 1.6 / u;
253
+ c[A.grid + 0] = d, c[A.grid + 1] = p, c[A.grid + 2] = t.minorAlpha, c[A.grid + 3] = t.majorAlpha;
254
+ let m = t.background === "transparent" ? 0 : 1;
255
+ c[A.field + 0] = t.fieldAlpha, c[A.field + 1] = m, c[A.field + 2] = 0, c[A.field + 3] = 0, c[A.cursor + 0] = a.x, c[A.cursor + 1] = a.y, c[A.cursor + 2] = t.bulgeStrength, c[A.cursor + 3] = t.bulgeRadius, c[A.cursor2 + 0] = t.bulgeMode === "attract" ? -1 : 1, c[A.cursor2 + 1] = +!!t.interactive, c[A.cursor2 + 2] = 0, c[A.cursor2 + 3] = 0;
256
+ let h = s(t.lineColor);
257
+ if (c[A.line + 0] = h[0], c[A.line + 1] = h[1], c[A.line + 2] = h[2], c[A.line + 3] = 0, t.background === "transparent") c[A.bg + 0] = 0, c[A.bg + 1] = 0, c[A.bg + 2] = 0, c[A.bg + 3] = 0;
345
258
  else {
346
259
  let e = s(t.background);
347
- o[P.bg + 0] = e[0], o[P.bg + 1] = e[1], o[P.bg + 2] = e[2], o[P.bg + 3] = 0;
260
+ c[A.bg + 0] = e[0], c[A.bg + 1] = e[1], c[A.bg + 2] = e[2], c[A.bg + 3] = 0;
348
261
  }
349
- return e;
262
+ c[A.wave + 0] = t.waveDir[0], c[A.wave + 1] = t.waveDir[1], c[A.wave + 2] = t.waveK, c[A.wave + 3] = t.waveOmega, c[A.wave2 + 0] = t.waveSigma, c[A.wave2 + 1] = t.twistMax, c[A.wave2 + 2] = t.shearMax, c[A.wave2 + 3] = o;
263
+ let g = s(t.faceWarmLo), _ = s(t.faceWarmMid), v = s(t.faceWarmHi);
264
+ return c[A.faceLo + 0] = g[0], c[A.faceLo + 1] = g[1], c[A.faceLo + 2] = g[2], c[A.faceLo + 3] = 0, c[A.faceMid + 0] = _[0], c[A.faceMid + 1] = _[1], c[A.faceMid + 2] = _[2], c[A.faceMid + 3] = 0, c[A.faceHi + 0] = v[0], c[A.faceHi + 1] = v[1], c[A.faceHi + 2] = v[2], c[A.faceHi + 3] = 0, e;
350
265
  }
351
266
  //#endregion
352
267
  //#region src/components/custom/paper-grid/composables/paperGridWGPUSetup.ts
353
- var L = 64, R = 8, z = 2;
354
- function B(e) {
355
- let { canvas: t, config: n, getCursor: r, shouldContinue: i, onFrame: o } = e;
356
- return function(e, s, c) {
357
- let l = e.createShaderModule({
268
+ var N = 64, P = 8, F = 2;
269
+ function I(e) {
270
+ let { canvas: t, config: n, getCursor: r, getAmp: i, shouldContinue: o, onFrame: s } = e;
271
+ return function(e, c, l) {
272
+ let u = e.createShaderModule({
358
273
  label: "[PaperGrid] paper-grid.wgsl",
359
- code: N
360
- }), u = F(), d = e.createBuffer({
274
+ code: k
275
+ }), d = j(), f = e.createBuffer({
361
276
  label: "[PaperGrid] uniforms",
362
- size: u.buffer.byteLength,
363
- usage: L | R
364
- }), f = e.createBindGroupLayout({
277
+ size: d.buffer.byteLength,
278
+ usage: N | P
279
+ }), p = e.createBindGroupLayout({
365
280
  label: "[PaperGrid] bgl",
366
281
  entries: [{
367
282
  binding: 0,
368
- visibility: z,
283
+ visibility: F,
369
284
  buffer: { type: "uniform" }
370
285
  }]
371
- }), p = e.createRenderPipeline({
286
+ }), m = e.createRenderPipeline({
372
287
  label: "[PaperGrid] pipeline",
373
- layout: e.createPipelineLayout({ bindGroupLayouts: [f] }),
288
+ layout: e.createPipelineLayout({ bindGroupLayouts: [p] }),
374
289
  vertex: {
375
- module: l,
290
+ module: u,
376
291
  entryPoint: "vs_main"
377
292
  },
378
293
  fragment: {
379
- module: l,
294
+ module: u,
380
295
  entryPoint: "fs_main",
381
296
  targets: [{
382
- format: c,
297
+ format: l,
383
298
  blend: {
384
299
  color: {
385
300
  srcFactor: "one",
@@ -395,24 +310,24 @@ function B(e) {
395
310
  }]
396
311
  },
397
312
  primitive: { topology: "triangle-list" }
398
- }), m = e.createBindGroup({
313
+ }), h = e.createBindGroup({
399
314
  label: "[PaperGrid] bg",
400
- layout: f,
315
+ layout: p,
401
316
  entries: [{
402
317
  binding: 0,
403
- resource: { buffer: d }
318
+ resource: { buffer: f }
404
319
  }]
405
320
  });
406
- function h() {
321
+ function g() {
407
322
  let e = a(), n = t.clientWidth || 320, r = t.clientHeight || 320, i = Math.max(1, Math.round(n * e)), o = Math.max(1, Math.round(r * e));
408
323
  (t.width !== i || t.height !== o) && (t.width = i, t.height = o);
409
324
  }
410
- function g(i) {
411
- o?.(i);
412
- let c = t.clientWidth || 320, l = t.clientHeight || 320;
413
- I(u, n, i, c / Math.max(l, 1), t.height || Math.round(l * a()), r()), e.queue.writeBuffer(d, 0, u.buffer);
414
- let f = e.createCommandEncoder({ label: "[PaperGrid] frame" }), h = s.getCurrentTexture().createView(), g = f.beginRenderPass({ colorAttachments: [{
415
- view: h,
325
+ function _(o) {
326
+ s?.(o);
327
+ let l = t.clientWidth || 320, u = t.clientHeight || 320;
328
+ M(d, n, o, l / Math.max(u, 1), t.height || Math.round(u * a()), r(), i()), e.queue.writeBuffer(f, 0, d.buffer);
329
+ let p = e.createCommandEncoder({ label: "[PaperGrid] frame" }), g = c.getCurrentTexture().createView(), _ = p.beginRenderPass({ colorAttachments: [{
330
+ view: g,
416
331
  clearValue: {
417
332
  r: 0,
418
333
  g: 0,
@@ -422,21 +337,21 @@ function B(e) {
422
337
  loadOp: "clear",
423
338
  storeOp: "store"
424
339
  }] });
425
- g.setPipeline(p), g.setBindGroup(0, m), g.draw(3, 1, 0, 0), g.end(), e.queue.submit([f.finish()]);
340
+ _.setPipeline(m), _.setBindGroup(0, h), _.draw(3, 1, 0, 0), _.end(), e.queue.submit([p.finish()]);
426
341
  }
427
342
  return {
428
- frame: g,
429
- shouldContinue: i,
430
- resize: h,
343
+ frame: _,
344
+ shouldContinue: o,
345
+ resize: g,
431
346
  teardown: () => {
432
- d.destroy();
347
+ f.destroy();
433
348
  }
434
349
  };
435
350
  };
436
351
  }
437
352
  //#endregion
438
353
  //#region src/components/custom/paper-grid/shaders/paper-grid.glsl.ts
439
- 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
354
+ var L = "#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}", R = `#version 300 es
440
355
  precision highp float;
441
356
 
442
357
  #define TAU 6.283185307179586
@@ -453,13 +368,32 @@ uniform float uAmplitude;
453
368
  uniform vec4 uGrid; // (targetWidth, targetWidthMajor, minorAlpha, majorAlpha)
454
369
  uniform float uFieldAlpha;
455
370
  uniform float uHasBackground;
456
- uniform vec4 uCursor; // (cursorX, cursorY, bulgeStrength, bulgeRadius)
457
- uniform float uBulgeMode; // +1 repel / −1 attract
371
+ uniform vec4 uCursor; // (cursorX, cursorY, swirlStrength, swirlRadius)
372
+ uniform float uBulgeMode; // +1 repel / −1 attract (signs the swirl)
373
+ uniform float uInteractive; // 1 = cursor swirl on
374
+ uniform vec4 uWave; // (waveDirX, waveDirY, waveK, waveOmega)
375
+ uniform vec4 uWave2; // (waveSigma, twistMax, shearMax, amp)
458
376
  uniform vec3 uLineColor; // linear-sRGB ink
459
377
  uniform vec3 uBg; // linear-sRGB themed bg
378
+ // ── The FACE (BD.W-PAPERGRID-FACE) — the height-lit filled cell interior ──
379
+ uniform vec4 uFace; // (faceAlpha, faceRelief, squashK, baseInset)
380
+ uniform vec2 uLightDir; // the cel key-light direction
381
+ uniform vec3 uFaceLo; // linear-sRGB rose-umber trough (FOLD B, 3-stop)
382
+ uniform vec3 uFaceMid; // linear-sRGB ember-amber mid
383
+ uniform vec3 uFaceHi; // linear-sRGB warm-wheat crest
460
384
 
461
385
  ${r}
462
386
 
387
+ // The 3-stop warm-divergent FACE ramp (FOLD B — height-keyed, NOT a 2-point mid-park). All stops
388
+ // warm hue ∈ [20,90]; linear-space (the OETF runs in main, FOLD E).
389
+ vec3 faceRamp(float rampT) {
390
+ float s = clamp(rampT, 0.0, 1.0);
391
+ if (s < 0.5) {
392
+ return mix(uFaceLo, uFaceMid, s * 2.0);
393
+ }
394
+ return mix(uFaceMid, uFaceHi, (s - 0.5) * 2.0);
395
+ }
396
+
463
397
  // The shared divergence-free 2D-curl operator (flow.glsl.ts) — the prototype declares
464
398
  // potentialFBM; the host defines its BODY below the splice (GLSL forward-declaration).
465
399
  ${i}
@@ -510,28 +444,11 @@ float potentialFBM(vec2 p) {
510
444
  return v;
511
445
  }
512
446
 
513
- // ── §3 The global curl-flow domain warp (transcribes paperGrid.ts curlWarp) ──
514
- vec2 curlWarp(vec2 g, float t) {
515
- float warpScale = uWarp.x;
516
- float warpSpeed = uWarp.y;
517
- float warpScale2 = uWarp.z;
518
- float warpSpeed2 = uWarp.w;
519
- vec2 a = curlFBM(vec2(g.x * warpScale + t * warpSpeed, g.y * warpScale + t * warpSpeed));
520
- vec2 b = curlFBM(vec2(g.x * warpScale2 - t * warpSpeed2, g.y * warpScale2 - t * warpSpeed2));
521
- return vec2(a.x * uAmplitude + b.x * uAmplitude * 0.5, a.y * uAmplitude + b.y * uAmplitude * 0.5);
522
- }
523
-
524
- // ── §4 The local pointer bulge (transcribes paperGrid.ts cursorBulge) ──
525
- vec2 cursorBulge(vec2 g) {
526
- vec2 cursor = uCursor.xy;
527
- float strength = uCursor.z * uBulgeMode; // bulgeStrength × bulgeMode (+repel / −attract)
528
- float radius = max(uCursor.w, 1e-4);
529
- vec2 toC = g - cursor;
530
- float d = length(toC);
531
- float bulge = strength * exp(-(d * d) / (2.0 * radius * radius));
532
- if (d < 1e-5) return vec2(0.0);
533
- return (toC / d) * bulge;
534
- }
447
+ // The shared traveling-wave CELL-WARP chunk (waveField.glsl.ts — cellTwist/cursorSwirl/
448
+ // travelingEnvelope; spliced AFTER valueNoise + potentialFBM bodies + the curlFBM chunk).
449
+ // paper-grid + concentric share this EXACTLY (the C3 cure: the boxes twist about their own
450
+ // center, the lines stay locally straight — never the retired LINE-warp).
451
+ ${u}
535
452
 
536
453
  // ── §1 The Ben Golus derivative-AA grid coverage (transcribes paperGrid.ts gridCoverage) ──
537
454
  float gridCoverage(vec2 g, float targetWidth, vec2 uvDeriv) {
@@ -548,10 +465,19 @@ void main() {
548
465
  float aspect = max(uAspect, 1e-4);
549
466
  vec2 uv = vec2(vUv.x * aspect, vUv.y);
550
467
 
551
- // §5 the per-pixel kernel: warp + bulge the grid coordinate, then two-tier Golus.
552
- vec2 g = uv * uGridScale;
553
- g += curlWarp(g, uTime);
554
- g += cursorBulge(g);
468
+ // §5 the per-pixel kernel: CELL-TWIST + cursor-swirl the grid coordinate, then two-tier Golus.
469
+ // cellTwist rotates each cell about its OWN center (the boxes twist, the lines stay locally
470
+ // straight — the C3 cure) gated by a traveling Gaussian crest; cursorSwirl twists the cells
471
+ // about the finger. The Golus dv reads the FINAL twisted coord (the crisp-line fence survives).
472
+ vec2 g0 = uv * uGridScale;
473
+ // FOLD A — the PRE-twist driver: the face samples height/relief at THIS cc (floor(twisted_g)
474
+ // at the crest lights a NEIGHBOUR cell). cellTwist rides the SAME driver, so twist + face fuse.
475
+ vec3 drv = cellDriver(g0, 1.0, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.w);
476
+ vec2 cc = drv.xy;
477
+ vec2 g = cellTwist(g0, 1.0, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.y, uWave2.z, uWave2.w);
478
+ if (uInteractive > 0.5) {
479
+ g = cursorSwirl(g, uCursor.xy, uCursor.z * uBulgeMode, uCursor.w);
480
+ }
555
481
 
556
482
  // The screen-space derivative of g (Golus): length(vec2(dFdx, dFdy)) per axis (the actual
557
483
  // backing-store pixel — NOT a CSS sub-pixel, the blur-kill).
@@ -565,19 +491,41 @@ void main() {
565
491
  float major = gridCoverage(g / me, uGrid.y, dv / me);
566
492
  float line = max(minor * uGrid.z, major * uGrid.w);
567
493
 
494
+ // ── The FACE (BD.W-PAPERGRID-FACE) — height-lit filled cell interior ──────────────────
495
+ // Sample height/relief at the pre-twist driver cc (FOLD A); Lambert the ∇H slope against the
496
+ // fixed cel key-light; squash the inset so the crest face inflates; multi-stop warm-divergent
497
+ // ramp keyed on mix(shade, h) (FOLD B); the ink through the production OETF (FOLD E).
498
+ float h = cellHeight(cc, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.w);
499
+ vec2 grad = faceRelief(cc, 1.0, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.w);
500
+ vec3 n = normalize(vec3(-grad * uFace.y, 1.0));
501
+ float shade = clamp(0.5 + dot(n, normalize(vec3(uLightDir, 1.0))) * 0.5, 0.0, 1.0);
502
+ float inset = uFace.w * (1.0 - uFace.z * h); // squash & stretch
503
+ float face = facePlateau(g, inset, dv);
504
+ float rampT = clamp(shade * 0.5 + h * 0.5, 0.0, 1.0); // FOLD B — height-keyed crest
505
+ vec3 faceInk = clamp(linearToSrgb(faceRamp(rampT)), vec3(0.0), vec3(1.0));
506
+ float faceA = face * uFace.x * uFieldAlpha; // FOLD D — one field-blend scalar
507
+
568
508
  vec3 col = clamp(linearToSrgb(uLineColor), vec3(0.0), vec3(1.0));
569
509
  if (uHasBackground > 0.5) {
570
510
  vec3 bg = clamp(linearToSrgb(uBg), vec3(0.0), vec3(1.0));
511
+ vec3 base = mix(bg, faceInk, faceA);
571
512
  float a = line * uFieldAlpha;
572
- fragColor = vec4(mix(bg, col, a), 1.0);
513
+ fragColor = vec4(mix(base, col, a), 1.0);
573
514
  return;
574
515
  }
575
- float a = line * uFieldAlpha;
576
- fragColor = vec4(col * a, a); // premultiplied over transparent
516
+ // transparent ground: the FACE composites UNDER the line, the SOURCE-OVER operator in
517
+ // PREMULTIPLIED space. faceAlpha:0 → faceA=0 → the face term vanishes → vec4(col·line, line) =
518
+ // byte-identical to the HEAD line-only render.
519
+ vec3 linePremult = (col * line) * uFieldAlpha; // line layer (the FieldAlpha subtlety)
520
+ float lineA = line * uFieldAlpha;
521
+ vec3 facePremult = faceInk * faceA; // face layer premultiplied (faceA folds field)
522
+ vec3 outPremult = linePremult + facePremult * (1.0 - lineA);
523
+ float a = lineA + faceA * (1.0 - lineA);
524
+ fragColor = vec4(outPremult, a); // premultiplied over transparent
577
525
  }`;
578
526
  //#endregion
579
527
  //#region src/components/custom/paper-grid/composables/paperGridGLSetup.ts
580
- function U(e, t, n) {
528
+ function z(e, t, n) {
581
529
  let r = e.createShader(t);
582
530
  if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
583
531
  let t = e.getShaderInfoLog(r);
@@ -585,16 +533,16 @@ function U(e, t, n) {
585
533
  }
586
534
  return r;
587
535
  }
588
- function W(e) {
589
- let { canvas: t, config: n, getCursor: r, shouldContinue: i, onFrame: o } = e;
536
+ function B(e) {
537
+ let { canvas: t, config: n, getCursor: r, getAmp: i, shouldContinue: o, onFrame: c } = e;
590
538
  return function(e) {
591
- let c = U(e, e.VERTEX_SHADER, V), l = U(e, e.FRAGMENT_SHADER, H), u = e.createProgram();
592
- if (e.attachShader(u, c), e.attachShader(u, l), e.linkProgram(u), !e.getProgramParameter(u, e.LINK_STATUS)) throw Error(`[PaperGrid] link failed: ${e.getProgramInfoLog(u)}`);
593
- e.deleteShader(c), e.deleteShader(l);
594
- let d = e.createVertexArray();
595
- e.bindVertexArray(d);
596
- let f = e.createBuffer();
597
- e.bindBuffer(e.ARRAY_BUFFER, f), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
539
+ let l = z(e, e.VERTEX_SHADER, L), u = z(e, e.FRAGMENT_SHADER, R), d = e.createProgram();
540
+ if (e.attachShader(d, l), e.attachShader(d, u), e.linkProgram(d), !e.getProgramParameter(d, e.LINK_STATUS)) throw Error(`[PaperGrid] link failed: ${e.getProgramInfoLog(d)}`);
541
+ e.deleteShader(l), e.deleteShader(u);
542
+ let p = e.createVertexArray();
543
+ e.bindVertexArray(p);
544
+ let m = e.createBuffer();
545
+ e.bindBuffer(e.ARRAY_BUFFER, m), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
598
546
  -1,
599
547
  -1,
600
548
  3,
@@ -602,144 +550,169 @@ function W(e) {
602
550
  -1,
603
551
  3
604
552
  ]), e.STATIC_DRAW);
605
- let p = e.getAttribLocation(u, "aPosition");
606
- e.enableVertexAttribArray(p), e.vertexAttribPointer(p, 2, e.FLOAT, !1, 0, 0), e.bindVertexArray(null);
607
- let m = (t) => e.getUniformLocation(u, t), h = m("uTime"), g = m("uGridScale"), _ = m("uMajorEvery"), v = m("uAspect"), y = m("uWarp"), b = m("uAmplitude"), x = m("uGrid"), S = m("uFieldAlpha"), C = m("uHasBackground"), w = m("uCursor"), T = m("uBulgeMode"), E = m("uLineColor"), D = m("uBg");
608
- function O() {
553
+ let h = e.getAttribLocation(d, "aPosition");
554
+ e.enableVertexAttribArray(h), e.vertexAttribPointer(h, 2, e.FLOAT, !1, 0, 0), e.bindVertexArray(null);
555
+ let g = (t) => e.getUniformLocation(d, t), _ = g("uTime"), v = g("uGridScale"), y = g("uMajorEvery"), b = g("uAspect"), x = g("uGrid"), S = g("uFieldAlpha"), C = g("uHasBackground"), w = g("uCursor"), T = g("uBulgeMode"), E = g("uInteractive"), D = g("uWave"), O = g("uWave2"), k = g("uLineColor"), A = g("uBg"), j = g("uFace"), M = g("uLightDir"), N = g("uFaceLo"), P = g("uFaceMid"), F = g("uFaceHi");
556
+ function I() {
609
557
  let n = a(), r = t.clientWidth || 320, i = t.clientHeight || 320, o = Math.max(1, Math.round(r * n)), s = Math.max(1, Math.round(i * n));
610
558
  (t.width !== o || t.height !== s) && (t.width = o, t.height = s), e.viewport(0, 0, t.width, t.height);
611
559
  }
612
- function k(i) {
613
- o?.(i);
614
- let c = t.clientWidth || 320, l = t.clientHeight || 320, f = c / Math.max(l, 1), p = M(t.height || Math.round(l * a()), n.cellSize);
615
- e.useProgram(u), e.bindVertexArray(d), 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(h, i), e.uniform1f(g, p), e.uniform1f(_, n.majorEvery), e.uniform1f(v, f);
616
- let m = n.waveScale, O = n.waveScale * 1.7, k = n.waveSpeed, A = n.waveSpeed * .6;
617
- e.uniform4f(y, m, k, O, A), e.uniform1f(b, n.waveAmplitude);
618
- let j = Math.max(n.cellSize, 1), N = n.lineWidth / j, P = n.lineWidth * 1.6 / j;
619
- e.uniform4f(x, N, P, n.minorAlpha, n.majorAlpha), e.uniform1f(S, n.fieldAlpha);
620
- let F = r();
621
- e.uniform4f(w, F.x, F.y, n.bulgeStrength, n.bulgeRadius), e.uniform1f(T, n.bulgeMode === "attract" ? -1 : 1);
622
- let I = s(n.lineColor);
623
- if (e.uniform3f(E, I[0], I[1], I[2]), n.background === "transparent") e.uniform1f(C, 0), e.uniform3f(D, 0, 0, 0);
560
+ function B(o) {
561
+ c?.(o);
562
+ let l = t.clientWidth || 320, u = t.clientHeight || 320, m = l / Math.max(u, 1), h = f(t.height || Math.round(u * a()), n.cellSize);
563
+ e.useProgram(d), e.bindVertexArray(p), 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(_, o), e.uniform1f(v, h), e.uniform1f(y, n.majorEvery), e.uniform1f(b, m), e.uniform4f(D, n.waveDir[0], n.waveDir[1], n.waveK, n.waveOmega), e.uniform4f(O, n.waveSigma, n.twistMax, n.shearMax, i()), e.uniform1f(E, +!!n.interactive);
564
+ let g = Math.max(n.cellSize, 1), I = n.lineWidth / g, L = n.lineWidth * 1.6 / g;
565
+ e.uniform4f(x, I, L, n.minorAlpha, n.majorAlpha), e.uniform1f(S, n.fieldAlpha);
566
+ let R = r();
567
+ e.uniform4f(w, R.x, R.y, n.bulgeStrength, n.bulgeRadius), e.uniform1f(T, n.bulgeMode === "attract" ? -1 : 1);
568
+ let z = s(n.lineColor);
569
+ e.uniform3f(k, z[0], z[1], z[2]), e.uniform4f(j, n.faceAlpha, n.faceRelief, n.squashK, n.baseInset), e.uniform2f(M, n.lightDir[0], n.lightDir[1]);
570
+ let B = s(n.faceWarmLo), V = s(n.faceWarmMid), H = s(n.faceWarmHi);
571
+ if (e.uniform3f(N, B[0], B[1], B[2]), e.uniform3f(P, V[0], V[1], V[2]), e.uniform3f(F, H[0], H[1], H[2]), n.background === "transparent") e.uniform1f(C, 0), e.uniform3f(A, 0, 0, 0);
624
572
  else {
625
573
  e.uniform1f(C, 1);
626
574
  let t = s(n.background);
627
- e.uniform3f(D, t[0], t[1], t[2]);
575
+ e.uniform3f(A, t[0], t[1], t[2]);
628
576
  }
629
577
  e.drawArrays(e.TRIANGLES, 0, 3), e.bindVertexArray(null);
630
578
  }
631
579
  return {
632
- frame: k,
633
- shouldContinue: i,
634
- resize: O,
580
+ frame: B,
581
+ shouldContinue: o,
582
+ resize: I,
635
583
  teardown: () => {
636
- e.deleteProgram(u), e.deleteVertexArray(d), e.deleteBuffer(f);
584
+ e.deleteProgram(d), e.deleteVertexArray(p), e.deleteBuffer(m);
637
585
  }
638
586
  };
639
587
  };
640
588
  }
641
589
  //#endregion
642
590
  //#region src/components/custom/paper-grid/composables/usePaperGrid.ts
643
- function G(e, n) {
591
+ function V(e, n) {
644
592
  let { config: r } = n, i = n.mode ?? "live", s = t({ respectReducedMotion: r.respectReducedMotion }), c = {
645
593
  x: 1e6,
646
594
  y: 1e6
647
- }, l = () => c, u = 0, d = null;
648
- function f(t) {
649
- let n = u > 0 ? (t - u) * 1e3 : 16.7;
650
- if (u = t, s.tick(n), !r.interactive || !s.active.value) {
595
+ }, l = () => c, u = 0, d = () => u, p = 0, m = null;
596
+ function h(t) {
597
+ let n = p > 0 ? (t - p) * 1e3 : 16.7;
598
+ if (p = t, s.tick(n), m?.reducedMotion ? u = 0 : (u += (1.06 - u) * .04, u > 1 && (u = 1 + (u - 1) * .85)), !r.interactive || !s.active.value) {
651
599
  c = {
652
600
  x: 1e6,
653
601
  y: 1e6
654
602
  };
655
603
  return;
656
604
  }
657
- let i = e.value, o = i?.clientHeight || 320, l = (i?.clientWidth || 320) / Math.max(o, 1), d = M(i?.height || Math.round(o * a()) || 320, r.cellSize), f = s.smoothedPosition.value, p = s.velocity.value, m = s.burst.value, h = (f.x * 2 - 1) * l, g = -(f.y * 2 - 1), _ = .12 + Math.min(.4, m);
605
+ let i = e.value, o = i?.clientHeight || 320, l = (i?.clientWidth || 320) / Math.max(o, 1), d = f(i?.height || Math.round(o * a()) || 320, r.cellSize), h = s.smoothedPosition.value, g = s.velocity.value, _ = s.burst.value, v = (h.x * 2 - 1) * l, y = -(h.y * 2 - 1), b = .12 + Math.min(.4, _);
658
606
  c = {
659
- x: (h + p.x * _) * d,
660
- y: (g - p.y * _) * d
607
+ x: (v + g.x * b) * d,
608
+ y: (y - g.y * b) * d
661
609
  };
662
610
  }
663
- let p = () => {
664
- s.onPointerEnter(), r.interactive && d?.wake();
665
- }, m = (e) => {
666
- s.onPointerMove(e), r.interactive && d?.wake();
667
- }, g = (e) => e.parentElement ?? e;
668
- function _(e) {
669
- let t = g(e);
670
- t.addEventListener("pointermove", m), t.addEventListener("pointerenter", p), t.addEventListener("pointerleave", s.onPointerLeave);
611
+ let g = () => {
612
+ s.onPointerEnter(), r.interactive && m?.wake();
613
+ }, _ = (e) => {
614
+ s.onPointerMove(e), r.interactive && m?.wake();
615
+ }, v = (e) => e.parentElement ?? e;
616
+ function y(e) {
617
+ let t = v(e);
618
+ t.addEventListener("pointermove", _), t.addEventListener("pointerenter", g), t.addEventListener("pointerleave", s.onPointerLeave);
671
619
  }
672
- function v(e) {
673
- let t = g(e);
674
- t.removeEventListener("pointermove", m), t.removeEventListener("pointerenter", p), t.removeEventListener("pointerleave", s.onPointerLeave);
620
+ function b(e) {
621
+ let t = v(e);
622
+ t.removeEventListener("pointermove", _), t.removeEventListener("pointerenter", g), t.removeEventListener("pointerleave", s.onPointerLeave);
675
623
  }
676
- let y = () => {
624
+ let x = () => {
677
625
  let t = e.value;
678
- return t ? (d || (_(t), d = o(t, {
626
+ return t ? (m || (y(t), m = o(t, {
679
627
  mode: i,
680
628
  respectReducedMotion: r.respectReducedMotion,
681
- setupWGPU: B({
629
+ setupWGPU: I({
682
630
  canvas: t,
683
631
  config: r,
684
632
  getCursor: l,
633
+ getAmp: d,
685
634
  shouldContinue: () => !0,
686
- onFrame: f
635
+ onFrame: h
687
636
  }),
688
- setupGL: W({
637
+ setupGL: B({
689
638
  canvas: t,
690
639
  config: r,
691
640
  getCursor: l,
641
+ getAmp: d,
692
642
  shouldContinue: () => !0,
693
- onFrame: f
643
+ onFrame: h
694
644
  })
695
- }), d.armAsync()), d) : null;
645
+ }), m.armAsync()), m) : null;
696
646
  };
697
- queueMicrotask(() => y());
698
- let b = {
647
+ queueMicrotask(() => x());
648
+ let S = {
699
649
  get backend() {
700
- return y()?.backend ?? "webgpu";
650
+ return x()?.backend ?? "webgpu";
701
651
  },
702
- pause: () => y()?.suspend("manual"),
703
- resume: () => y()?.resume("manual"),
704
- wake: () => y()?.wake(),
705
- renderAt: (e) => y()?.renderAt(e),
652
+ pause: () => x()?.suspend("manual"),
653
+ resume: () => x()?.resume("manual"),
654
+ wake: () => x()?.wake(),
655
+ renderAt: (e) => x()?.renderAt(e),
706
656
  get reducedMotion() {
707
- return d?.reducedMotion ?? !1;
657
+ return m?.reducedMotion ?? !1;
708
658
  },
709
659
  dispose: () => {
710
660
  let t = e.value;
711
- t && v(t), s.dispose(), d?.dispose();
661
+ t && b(t), s.dispose(), m?.dispose();
712
662
  }
713
663
  };
714
- return h(() => b.dispose()), b;
664
+ return w(() => S.dispose()), S;
715
665
  }
716
666
  //#endregion
717
667
  //#region src/components/custom/paper-grid/constants.ts
718
- var K = 16, q = {
668
+ var H = 16, U = {
719
669
  L: .62,
720
670
  C: .05,
721
671
  h: 62
722
- }, J = {
672
+ }, W = {
673
+ L: .44,
674
+ C: .07,
675
+ h: 32
676
+ }, G = {
677
+ L: .66,
678
+ C: .12,
679
+ h: 58
680
+ }, K = {
681
+ L: .9,
682
+ C: .1,
683
+ h: 84
684
+ }, q = {
723
685
  cellSize: 64,
724
686
  majorEvery: 5,
725
- minorAlpha: .04,
726
- majorAlpha: .11,
687
+ minorAlpha: .12,
688
+ majorAlpha: .22,
727
689
  lineWidth: 1,
728
- waveAmplitude: .1,
729
- waveScale: .5,
730
- waveSpeed: .15,
690
+ twistMax: .62,
691
+ shearMax: .26,
692
+ waveDir: [.92, .39],
693
+ waveK: .62,
694
+ waveOmega: 1.05,
695
+ waveSigma: .42,
731
696
  fieldAlpha: 1,
732
- bulgeStrength: .12,
733
- bulgeRadius: 3,
697
+ bulgeStrength: .9,
698
+ bulgeRadius: 2.5,
734
699
  bulgeMode: "repel",
735
- lineColor: q,
700
+ lineColor: U,
701
+ faceAlpha: 0,
702
+ faceRelief: 2.6,
703
+ squashK: .42,
704
+ baseInset: .14,
705
+ faceWarmLo: W,
706
+ faceWarmMid: G,
707
+ faceWarmHi: K,
708
+ lightDir: [.6, .8],
736
709
  background: "transparent",
737
710
  interactive: !0,
738
711
  respectReducedMotion: !0
739
- }, Y = /* @__PURE__ */ e(/* @__PURE__ */ f({
712
+ }, J = /* @__PURE__ */ e(/* @__PURE__ */ x({
740
713
  __name: "PaperGrid",
741
714
  props: {
742
- config: { default: () => J },
715
+ config: { default: () => q },
743
716
  paused: {
744
717
  type: Boolean,
745
718
  default: !1
@@ -747,9 +720,9 @@ var K = 16, q = {
747
720
  },
748
721
  emits: ["update:paused"],
749
722
  setup(e, { expose: t }) {
750
- let n = v("wrapperRef"), r = v("canvasRef"), i = _({ ...e.config });
751
- y(() => e.config, (e) => Object.assign(i, e), { deep: !0 }), m(() => {
752
- if (e.config.lineColor === J.lineColor) {
723
+ let n = D("wrapperRef"), r = D("canvasRef"), i = E({ ...e.config });
724
+ O(() => e.config, (e) => Object.assign(i, e), { deep: !0 }), C(() => {
725
+ if (e.config.lineColor === q.lineColor) {
753
726
  let e = n.value;
754
727
  if (e) {
755
728
  let t = getComputedStyle(e).getPropertyValue("--foreground").trim();
@@ -759,9 +732,9 @@ var K = 16, q = {
759
732
  }
760
733
  }
761
734
  });
762
- let a = G(r, { config: i });
763
- y(() => e.paused, (e) => e ? a.pause() : a.resume(), { immediate: !0 });
764
- let o = l(() => {
735
+ let a = V(r, { config: i });
736
+ O(() => e.paused, (e) => e ? a.pause() : a.resume(), { immediate: !0 });
737
+ let o = v(() => {
765
738
  let t = e.config.background;
766
739
  if (t !== "transparent") return `oklch(${t.L} ${t.C} ${t.h})`;
767
740
  });
@@ -770,12 +743,12 @@ var K = 16, q = {
770
743
  resume: a.resume,
771
744
  wake: a.wake,
772
745
  renderAt: a.renderAt
773
- }), (e, t) => (g(), u("div", {
746
+ }), (e, t) => (T(), y("div", {
774
747
  ref_key: "wrapperRef",
775
748
  ref: n,
776
749
  class: "paper-grid-wrapper",
777
- style: p(o.value ? { background: o.value } : void 0)
778
- }, [d("canvas", {
750
+ style: S(o.value ? { background: o.value } : void 0)
751
+ }, [b("canvas", {
779
752
  ref_key: "canvasRef",
780
753
  ref: r,
781
754
  class: "paper-grid-canvas",
@@ -785,4 +758,4 @@ var K = 16, q = {
785
758
  }
786
759
  }), [["__scopeId", "data-v-fc108d7d"]]);
787
760
  //#endregion
788
- export { b as CURL_EPS, J as DEFAULT_PAPER_GRID_CONFIG, K as PAPER_GRID_MAX_MAJOR_EVERY, Y as PaperGrid, q as WARM_IDENTITY_INK, T as curlFBM, E as curlWarp, D as cursorBulge, A as gridCoverage, M as gridScaleFor, w as potentialFBM, j as samplePaperGrid, G as usePaperGrid };
761
+ export { _ as CURL_EPS, q as DEFAULT_PAPER_GRID_CONFIG, K as FACE_WARM_HI, W as FACE_WARM_LO, G as FACE_WARM_MID, H as PAPER_GRID_MAX_MAJOR_EVERY, J as PaperGrid, U as WARM_IDENTITY_INK, p as curlFBM, g as gridCoverage, f as gridScaleFor, l as potentialFBM, m as samplePaperGrid, V as usePaperGrid };