@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
@@ -30,6 +30,39 @@ export interface ShapeGeom {
30
30
  lines: [number, number][][];
31
31
  closed: boolean;
32
32
  }
33
+ /**
34
+ * The boil voice — φ-incommensurate fractal value-noise (RE-INVENT; the masthead
35
+ * morphology). A 1-D fractal value-noise DISPLACEMENT off the HOUSE `mulberry32`,
36
+ * NOT a seeded sinusoid (the prior body self-correlated into a near-period — a spell-
37
+ * check squiggle):
38
+ *
39
+ * disp(t) = Σ_{k=0..OCT-1} aₖ · vnoiseₖ(t·fₖ + φₖ) normalised by Σaₖ
40
+ * fₖ = NOISE_F0 · φ^k (φ mutually-irrational steps → the sum NEVER closes
41
+ * into a period — the non-periodicity mechanism)
42
+ * aₖ = (1/φ)^k (per-octave decay)
43
+ * φₖ = seeded per-octave phase (house mulberry32)
44
+ * vnoiseₖ = seeded lattice value-noise, smootherstep-faired
45
+ *
46
+ * The four atlas axes:
47
+ * - amplitude SCALES with the rendered span (`(x2−x1) × NOISE_AMP_FRAC`), not a
48
+ * viewBox-stretched constant (a long word and a short word wobble in proportion);
49
+ * - the hump-to-hump spacing is IRREGULAR (the φ-incommensurate octave sum — the
50
+ * honest non-periodicity teeth, spacing-CV ~0.41 at the paint count vs the prior
51
+ * sinusoid's ~0.14, over 400 seeds);
52
+ * - the non-uniform body gives the pf hull a pressure-taper-friendly point stream;
53
+ * - the seed is the HOUSE mulberry32 (determinism + per-seed variation), ZERO
54
+ * pencil-boil `mulberry32` import.
55
+ *
56
+ * ENDPOINT anchor (NOT a body-wide envelope): a narrow cosine taper at the very ends
57
+ * only (`NOISE_EDGE`), so the ends settle to baseline (no draw-on pop) while the BODY
58
+ * amplitude stays irregular hump-to-hump (the prior `sin(π·t)` envelope made the body
59
+ * amplitude smooth-and-uniform — the clean-envelope tell). FILTER-FREE: the wander is
60
+ * in the control points + the hull width, never a feTurbulence.
61
+ *
62
+ * EXPORTED so the measuring gate samples the REAL emitted point-set (never a symbol-
63
+ * presence regex — the W-GATE-TRUTH-AUDIT discipline).
64
+ */
65
+ export declare function naturalUnderlinePoints(x1: number, y: number, x2: number, seed: number, segments: number): [number, number][];
33
66
  /**
34
67
  * Semantic shape → { lines, closed } in the marking space (or a positioned box).
35
68
  *
@@ -41,7 +74,7 @@ export interface ShapeGeom {
41
74
  * back to the legacy `VB_H − 8` constant so first paint (and jsdom/SSR) still renders
42
75
  * a line, replaced the instant the measure lands.
43
76
  *
44
- * `natural` (BA.W-HANDMARK C-2) routes the underline through the procedural
77
+ * `natural` routes the underline through the φ-incommensurate value-noise
45
78
  * `naturalUnderlinePoints` morphology instead of pencil-boil's `wobbleLinePoints`
46
79
  * (the masthead `boil` voice); the default underline keeps the pencil-boil line.
47
80
  */
@@ -19,7 +19,7 @@
19
19
  */
20
20
  export { default as HandMark, default as InkMark } from "./HandMark.vue";
21
21
  export { BRUSHES, resolveBrush, lerpBrush, type Brush, type BrushName, type BlendMode, type TaperSpec, type StampFn, type InkPath, } from "./brush";
22
- export { shapeGeom, serialize, boilLines, VB_W, VB_H, UNDERLINE_GAP, type ShapeGeom, } from "./geometry";
22
+ export { shapeGeom, serialize, boilLines, naturalUnderlinePoints, VB_W, VB_H, UNDERLINE_GAP, type ShapeGeom, } from "./geometry";
23
23
  export { ink, type SVGFragment } from "./ink";
24
24
  export { grainFilter, hasGrain } from "./texture";
25
25
  export { getStroke, getStrokePoints, getSvgPathFromStroke, type StrokeOptions, type InputPoint, } from "./freehand";
@@ -71,6 +71,16 @@ export interface IconChipProps {
71
71
  * untouched. Default `false` (byte-identical to the reference register).
72
72
  */
73
73
  saturated?: boolean;
74
+ /**
75
+ * The QUIET glass register (BD.W-GLASS-ATOM-REGISTER cross-link). The DEFAULT
76
+ * chip keeps its loud `in srgb` brand-overlay plate (AW.W26 fence); this opt-in
77
+ * routes the chip through the shared `.glass-atom` warm-glass capsule instead —
78
+ * a transmissive lozenge with the warm floor + the `--glass-blur-quiet` backdrop
79
+ * + the keyed rim, tinted by `--glass-fill-tint` toward the event hue. Two
80
+ * registers, exactly like Badge: loud brand pop (default) vs quiet glass lens
81
+ * (opt-in). Default `false`.
82
+ */
83
+ glass?: boolean;
74
84
  /**
75
85
  * Entrance choreography — composes the shipped `vReveal` directive. A numeric
76
86
  * value is the `--d` stagger index; `true` is index 0. PRM-gated by `vReveal`'s
@@ -13,6 +13,24 @@ export interface PaperBackdropProps {
13
13
  opacity?: number | string;
14
14
  /** Override turbulence frequency (advisory only — swaps the texture var). */
15
15
  frequency?: PaperBackdropFrequency;
16
+ /**
17
+ * BD.W-PAGE-FIELD — mount the WARM COLORFUL FIELD plane beneath the grain.
18
+ * When set, a `.paper-field` cel plane (amber→terracotta→sand at FIELD
19
+ * lightness, drifting on the compositor) paints UNDER the grain, so every
20
+ * glass surface over it reads transmissive/warm instead of gray. The grain
21
+ * rides ON TOP at its multiply opacity — one backdrop, two stacked planes.
22
+ * Opt-in (presets-in-consumers demo-chassis contract); the library glass
23
+ * primitive is UNCHANGED.
24
+ */
25
+ field?: boolean;
26
+ /**
27
+ * The warm route hue request (any degree). The field CLAMPS it to the warm
28
+ * band [25,95] IN THE CSS, so a cool/teal value cannot paint cool. Wire
29
+ * `warmFieldHue(category)` here per route.
30
+ */
31
+ fieldHue?: number | string;
32
+ /** The field rung intensity (0.85 ground / 1.0 vivid hero / 0 = neutral). */
33
+ fieldIntensity?: number | string;
16
34
  /** Additional class names. */
17
35
  class?: HTMLAttributes["class"];
18
36
  }
@@ -9,29 +9,6 @@ export declare const CURL_EPS = 0.012;
9
9
  export declare function potentialFBM(p: Vec2): number;
10
10
  /** The 2D curl of the scalar fbm potential (the JS twin of `curlFBM`). */
11
11
  export declare function curlFBM(p: Vec2): Vec2;
12
- /**
13
- * The IQ domain warp displacement at `g` (in grid space) at time `t`. TWO counter-flowing
14
- * curl terms at different scales/speeds (Alex Harri counter-flow — never visibly loops):
15
- *
16
- * g += curlFBM(g·warpScale + t·warpSpeed ) · amplitude
17
- * g += curlFBM(g·warpScale2 − t·warpSpeed2) · (amplitude·0.5)
18
- *
19
- * Returns the warp DISPLACEMENT (the caller adds it onto `g`). A SHALLOW warp (one level,
20
- * LOW amplitude, LOW spatial frequency) keeps the lines a clearly-readable grid — the
21
- * inverse-coherence target (LARGE structures from LOW spatial frequency).
22
- */
23
- export declare function curlWarp(g: Vec2, t: number, warpScale: number, warpSpeed: number, warpScale2: number, warpSpeed2: number, amplitude: number): Vec2;
24
- /**
25
- * The LOCAL cursor-bulge displacement at `g` (grid space). A Gaussian falloff about
26
- * `cursor` presses the grid AWAY from (repel, strength > 0) or TOWARD (attract, strength
27
- * < 0) the cursor inside `radius`, coherent everywhere else (the iOS-control-centre feel):
28
- *
29
- * bulge = strength · exp(−d²/(2·radius²)); g += normalize(g−cursor) · bulge
30
- *
31
- * Returns the bulge DISPLACEMENT (the caller adds it onto `g`). The sign of `strength`
32
- * picks repel (+) vs attract (−).
33
- */
34
- export declare function cursorBulge(g: Vec2, cursor: Vec2, strength: number, radius: number): Vec2;
35
12
  /**
36
13
  * The Ben Golus derivative-AA grid line coverage at `g` (grid space). `targetWidth` is the
37
14
  * desired line half-width in GRID UNITS (the caller passes `lineWidthPx / minorPitchPx` so
@@ -59,17 +36,29 @@ export declare function gridCoverage(g: Vec2, targetWidth: number, uvDeriv: Vec2
59
36
  export interface PaperGridSampleParams {
60
37
  /** The grid scale (view / minorPitch → LARGER cells = smaller scale). */
61
38
  gridScale: number;
62
- warpScale: number;
63
- warpSpeed: number;
64
- warpScale2: number;
65
- warpSpeed2: number;
66
- amplitude: number;
39
+ /** The traveling-wave front direction. */
40
+ waveDir: Vec2;
41
+ /** The crest-band spatial frequency. */
42
+ waveK: number;
43
+ /** The front speed (ω). */
44
+ waveOmega: number;
45
+ /** The crest-band width. */
46
+ waveSigma: number;
47
+ /** Max per-cell twist angle at the crest (rad). */
48
+ twistMax: number;
49
+ /** Max per-cell shear at the crest. */
50
+ shearMax: number;
51
+ /** The spring-eased envelope amplitude (0..1; PRM snaps to 0). */
52
+ amp: number;
67
53
  /** The cursor in GRID space. */
68
54
  cursor: Vec2;
55
+ /** The cursor-swirl peak twist (rad). */
69
56
  bulgeStrength: number;
70
57
  bulgeRadius: number;
71
- /** +1 repel, −1 attract. */
58
+ /** +1 repel, −1 attract (signs the swirl). */
72
59
  bulgeMode: number;
60
+ /** 1 = cursor swirl on. */
61
+ interactive: number;
73
62
  /** Golus target half-widths in grid units (minor + major). */
74
63
  targetWidth: number;
75
64
  targetWidthMajor: number;
@@ -81,10 +70,36 @@ export interface PaperGridSampleParams {
81
70
  fieldAlpha: number;
82
71
  /** The FIXED per-axis derivative (the JS round-trip; shaders use dpdx/dpdy). */
83
72
  uvDeriv: Vec2;
73
+ /** The filled-FACE opacity (0 → the face evaporates → byte-identical to HEAD). */
74
+ faceAlpha?: number;
75
+ /** The slope-shade ∇H Lambert gain. */
76
+ faceReliefGain?: number;
77
+ /** The volume-preserving squash (the inset retreats at the crest). */
78
+ squashK?: number;
79
+ /** The base inset-square coverage. */
80
+ baseInset?: number;
81
+ /** The fixed cel key-light direction. */
82
+ lightDir?: Vec2;
83
+ }
84
+ /** The face-shade scalars the FACE composite reads (the numeric-parity witness — FOLD B/C/D). */
85
+ export interface PaperGridFace {
86
+ /** The crest envelope at the pre-twist driver cc (FOLD A). */
87
+ env: number;
88
+ /** The sheet height at the driver cc (= env; the named leaf scalar). */
89
+ h: number;
90
+ /** The Lambert slope-shade [0,1] against the fixed key-light. */
91
+ shade: number;
92
+ /** The squashed inset-square face coverage [0,1]. */
93
+ faceCov: number;
94
+ /** The composited face alpha (FOLD D — face·faceAlpha·fieldAlpha, NO h-term). */
95
+ faceA: number;
96
+ /** The ramp parameter mix(shade, h) keying the multi-stop warm-divergent ink (FOLD B). */
97
+ rampT: number;
84
98
  }
85
99
  export declare function samplePaperGrid(uv: Vec2, t: number, p: PaperGridSampleParams): {
86
100
  line: number;
87
101
  alpha: number;
102
+ face: PaperGridFace;
88
103
  };
89
104
  /** The grid scale from the view + minor pitch (LARGER cells = smaller scale). */
90
105
  export declare function gridScaleFor(viewExtentPx: number, minorPitchPx: number): number;
@@ -5,6 +5,8 @@ export interface PaperGridGLSetupDeps {
5
5
  canvas: HTMLCanvasElement;
6
6
  config: PaperGridConfig;
7
7
  getCursor: () => Vec2;
8
+ /** The spring-eased traveling-wave envelope amplitude (0..1; PRM → 0). */
9
+ getAmp: () => number;
8
10
  shouldContinue: () => boolean;
9
11
  /**
10
12
  * The per-frame pointer hook — usePaperGrid advances the shared pointer field + derives
@@ -4,8 +4,10 @@ import type { Vec2 } from "./paperGrid";
4
4
  export interface PaperGridWGPUSetupDeps {
5
5
  canvas: HTMLCanvasElement;
6
6
  config: PaperGridConfig;
7
- /** The transient pointer cursor in GRID space — re-read each frame (the pointer bulge). */
7
+ /** The transient pointer cursor in GRID space — re-read each frame (the cursor swirl). */
8
8
  getCursor: () => Vec2;
9
+ /** The spring-eased traveling-wave envelope amplitude (0..1; PRM → 0). */
10
+ getAmp: () => number;
9
11
  /** Demand-gate (the renderer's quiescence layer — substrate-agnostic). */
10
12
  shouldContinue: () => boolean;
11
13
  /**
@@ -1,6 +1,6 @@
1
1
  import type { PaperGridConfig } from "../constants";
2
2
  import type { Vec2 } from "./paperGrid";
3
- export declare const PAPER_GRID_UNIFORM_BYTES = 144;
3
+ export declare const PAPER_GRID_UNIFORM_BYTES = 224;
4
4
  export interface PaperGridUniformScratch {
5
5
  buffer: ArrayBuffer;
6
6
  f32: Float32Array;
@@ -13,4 +13,4 @@ export declare function createPaperGridScratch(): PaperGridUniformScratch;
13
13
  * `aspect` corrects the domain x. The line ink resolves the warm `--foreground` identity
14
14
  * (the demo themes it via a preset, never a token edit).
15
15
  */
16
- export declare function packPaperGridUniforms(scratch: PaperGridUniformScratch, config: PaperGridConfig, timeSec: number, aspect: number, viewExtentPx: number, cursor: Vec2): PaperGridUniformScratch;
16
+ export declare function packPaperGridUniforms(scratch: PaperGridUniformScratch, config: PaperGridConfig, timeSec: number, aspect: number, viewExtentPx: number, cursor: Vec2, amp: number): PaperGridUniformScratch;
@@ -17,12 +17,18 @@ export interface PaperGridConfig {
17
17
  majorAlpha: number;
18
18
  /** Line width in device-px — one crisp pixel via Golus AA. */
19
19
  lineWidth: number;
20
- /** Wave amplitude in CELL units — how far the lines bow (the liquid; subtle = "felt, not loud"). */
21
- waveAmplitude: number;
22
- /** Wave spatial frequency (λ multiple) — LOW = the whole sheet bows together (coherent, not noise). */
23
- waveScale: number;
24
- /** The slow warp drift (ω-scale). */
25
- waveSpeed: number;
20
+ /** Max per-cell twist angle at the crest (rad ≈ 15° — a clear lean, never a tumble; ≤ ~18° floor). */
21
+ twistMax: number;
22
+ /** Max per-cell shear at the crest — a small skew so the box MORPHS, not just rotates. */
23
+ shearMax: number;
24
+ /** The traveling-wave front direction (a gentle diagonal). */
25
+ waveDir: [number, number];
26
+ /** The crest-band spatial frequency (LOW — cells per crest). */
27
+ waveK: number;
28
+ /** The front speed (slow — inertia). */
29
+ waveOmega: number;
30
+ /** The crest-band width (a localized front, not a global pulse). */
31
+ waveSigma: number;
26
32
  /** The GLOBAL subtlety knob — 1 demo, ~0.12 suffusion (the site-wide background). */
27
33
  fieldAlpha: number;
28
34
  /** How far the cursor pushes the grid (the local bulge). */
@@ -33,6 +39,28 @@ export interface PaperGridConfig {
33
39
  bulgeMode: "repel" | "attract";
34
40
  /** The line ink (the warm `--foreground` identity by default — NEVER teal-on-navy). */
35
41
  lineColor: OklchStop;
42
+ /**
43
+ * The filled-FACE opacity — **default `0`** so the face EVAPORATES → byte-identical to the
44
+ * line-only HEAD render (every `proof:viz-papergrid` cage clause + the warm-identity fence
45
+ * stay GREEN). The demo `PAPER_GRID_PRESET_RIPPLE` lifts it (presets-in-consumers).
46
+ */
47
+ faceAlpha: number;
48
+ /** The slope-shade gain (the ∇H Lambert relief — higher = steeper crest/trough contrast). */
49
+ faceRelief: number;
50
+ /** The volume-preserving SQUASH: the plateau inset retreats at the crest so the face inflates. */
51
+ squashK: number;
52
+ /** The base inset-square coverage (the soft tile inside the warped cell, 0..0.5 grid units). */
53
+ baseInset: number;
54
+ /**
55
+ * The 3-stop warm-DIVERGENT face ramp (FOLD B — height-keyed, NOT a 2-point mid-park `mix`):
56
+ * trough → mid → crest. ALL hues ∈ [20,90] (rose-umber → ember/amber → warm-wheat) so the
57
+ * teal-navy purge is clear by construction. `proof:viz-papergrid` clause reds a hue ∈ [180,280].
58
+ */
59
+ faceWarmLo: OklchStop;
60
+ faceWarmMid: OklchStop;
61
+ faceWarmHi: OklchStop;
62
+ /** The fixed cel key-light direction (upper-right) the slope-shade Lamberts against. */
63
+ lightDir: [number, number];
36
64
  /** The ground (default transparent so it suffuses over the page). */
37
65
  background: OklchStop | "transparent";
38
66
  /** Pointer bulge (§4/§8) — on (demo) / off (suffusion). */
@@ -48,6 +76,16 @@ export interface PaperGridConfig {
48
76
  * through a PRESET, never a token edit. NEVER teal/navy (h in [180,280] reds P5).
49
77
  */
50
78
  export declare const WARM_IDENTITY_INK: OklchStop;
79
+ /**
80
+ * The library-default FACE ramp stops — a CALM warm-divergent fold the face would paint IF lit
81
+ * (the `faceAlpha:0` default keeps the face evaporated, so these never paint at HEAD; they are
82
+ * the warm-identity SSR fallback the vivid demo preset overrides). ALL hues ∈ [20,90] — the
83
+ * teal-navy purge clear by construction (`proof:viz-papergrid` reds a hue ∈ [180,280] here).
84
+ * trough → rose-umber, mid → ember-amber, crest → warm-wheat.
85
+ */
86
+ export declare const FACE_WARM_LO: OklchStop;
87
+ export declare const FACE_WARM_MID: OklchStop;
88
+ export declare const FACE_WARM_HI: OklchStop;
51
89
  /**
52
90
  * The shipped warm-identity default config — evenly-spaced, LARGE 64px cells, a crisp fine
53
91
  * rule with a bolder major rule every 5 cells, on a slowly breathing liquid curl-flow sheet
@@ -1,5 +1,5 @@
1
1
  export { default as PaperGrid } from "./PaperGrid.vue";
2
2
  export { usePaperGrid, type PaperGridHandle, type UsePaperGridOptions, } from "./composables/usePaperGrid";
3
- export { type PaperGridConfig, DEFAULT_PAPER_GRID_CONFIG, WARM_IDENTITY_INK, PAPER_GRID_MAX_MAJOR_EVERY, } from "./constants";
4
- export { type Vec2, type PaperGridSampleParams, potentialFBM, curlFBM, curlWarp, cursorBulge, gridCoverage, samplePaperGrid, gridScaleFor, CURL_EPS, } from "./composables/paperGrid";
3
+ export { type PaperGridConfig, DEFAULT_PAPER_GRID_CONFIG, WARM_IDENTITY_INK, FACE_WARM_LO, FACE_WARM_MID, FACE_WARM_HI, PAPER_GRID_MAX_MAJOR_EVERY, } from "./constants";
4
+ export { type Vec2, type PaperGridSampleParams, type PaperGridFace, potentialFBM, curlFBM, gridCoverage, samplePaperGrid, gridScaleFor, CURL_EPS, } from "./composables/paperGrid";
5
5
  export type { OklchStop } from "../../../composables/color";
@@ -1,4 +1,4 @@
1
1
  /** The full-screen-triangle vertex shader (the substrate's standard fullscreen pass). */
2
2
  export declare const PAPER_GRID_VERT_GLSL = "#version 300 es\nprecision highp float;\nin vec2 aPosition;\nout vec2 vUv;\nvoid main() {\n vUv = aPosition; // [-1,1]\u00B2 domain\n gl_Position = vec4(aPosition, 0.0, 1.0);\n}";
3
3
  /** The paper-grid fragment source — the liquid AA-grid (the same field as the WGSL primary). */
4
- export declare const PAPER_GRID_FRAG_GLSL = "#version 300 es\nprecision highp float;\n\n#define TAU 6.283185307179586\n\nin vec2 vUv;\nout vec4 fragColor;\n\nuniform float uTime;\nuniform float uGridScale;\nuniform float uMajorEvery;\nuniform float uAspect;\nuniform vec4 uWarp; // (warpScale, warpSpeed, warpScale2, warpSpeed2)\nuniform float uAmplitude;\nuniform vec4 uGrid; // (targetWidth, targetWidthMajor, minorAlpha, majorAlpha)\nuniform float uFieldAlpha;\nuniform float uHasBackground;\nuniform vec4 uCursor; // (cursorX, cursorY, bulgeStrength, bulgeRadius)\nuniform float uBulgeMode; // +1 repel / \u22121 attract\nuniform vec3 uLineColor; // linear-sRGB ink\nuniform vec3 uBg; // linear-sRGB themed bg\n\n\nfloat srgbToLinearCh(float c) {\n return c <= 0.04045 ? c / 12.92 : pow((c + 0.055) / 1.055, 2.4);\n}\nvec3 srgbToLinear(vec3 c) {\n return vec3(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfloat linearToSrgbCh(float c) {\n return c <= 0.0031308 ? c * 12.92 : 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nvec3 linearToSrgb(vec3 c) {\n return vec3(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}\n\n// The shared divergence-free 2D-curl operator (flow.glsl.ts) \u2014 the prototype declares\n// potentialFBM; the host defines its BODY below the splice (GLSL forward-declaration).\n\nconst float CURL_EPS = 0.012;\n\n// Scalar fbm potential psi \u2014 the host's noise basis, wrapped so the curl operator is\n// basis-agnostic. A host carrying its own fbm defines this as: return fbm(p);\nfloat potentialFBM(vec2 p);\n\n// \u2207\u00D7\u03C8 in 2D \u2014 the divergence-free flow direction. Central finite differences of the\n// scalar potential give the partials; the cross-pairing (\u2202y, \u2212\u2202x) is the 2D curl.\nvec2 curlFBM(vec2 p) {\n float dx = potentialFBM(p + vec2(CURL_EPS, 0.0)) - potentialFBM(p - vec2(CURL_EPS, 0.0));\n float dy = potentialFBM(p + vec2(0.0, CURL_EPS)) - potentialFBM(p - vec2(0.0, CURL_EPS));\n // \u03C8-gradient is (dx, dy)/(2\u00B7eps); the curl rotates it 90\u00B0: (\u2202\u03C8/\u2202y, \u2212\u2202\u03C8/\u2202x).\n vec2 g = vec2(dx, dy) / (2.0 * CURL_EPS);\n return vec2(g.y, -g.x);\n}\n\n\n// \u2500\u2500 The host noise basis (transcribes paperGrid.ts hash21/valueNoise/potentialFBM) \u2500\u2500\nfloat hash21(float x, float y) {\n float px = fract(x * 0.1031);\n float py = fract(y * 0.1031);\n float pz = fract(x * 0.1031);\n float d = px * (py + 33.33) + py * (pz + 33.33) + pz * (px + 33.33);\n px += d;\n py += d;\n pz += d;\n return fract((px + py) * pz);\n}\n\nfloat valueNoise(float x, float y) {\n float ix = floor(x);\n float iy = floor(y);\n float fx = x - ix;\n float fy = y - iy;\n float ux = fx * fx * fx * (fx * (fx * 6.0 - 15.0) + 10.0);\n float uy = fy * fy * fy * (fy * (fy * 6.0 - 15.0) + 10.0);\n float a = hash21(ix, iy);\n float b = hash21(ix + 1.0, iy);\n float c = hash21(ix, iy + 1.0);\n float d2 = hash21(ix + 1.0, iy + 1.0);\n return mix(mix(a, b, ux), mix(c, d2, ux), uy);\n}\n\n// The 3-octave scalar fbm potential \u2014 the curl chunk's forward-declared potentialFBM body.\nfloat potentialFBM(vec2 p) {\n float v = 0.0;\n float amp = 0.5;\n float freq = 1.0;\n float px = p.x;\n float py = p.y;\n for (int i = 0; i < 3; i++) {\n v += amp * valueNoise(px * freq, py * freq);\n // FBM_ROT mat2(0.8, 0.6, -0.6, 0.8) \u2014 same rotation as the shared chunk.\n float rx = 0.8 * px - 0.6 * py;\n float ry = 0.6 * px + 0.8 * py;\n px = rx;\n py = ry;\n freq *= 2.0;\n amp *= 0.5;\n }\n return v;\n}\n\n// \u2500\u2500 \u00A73 The global curl-flow domain warp (transcribes paperGrid.ts curlWarp) \u2500\u2500\nvec2 curlWarp(vec2 g, float t) {\n float warpScale = uWarp.x;\n float warpSpeed = uWarp.y;\n float warpScale2 = uWarp.z;\n float warpSpeed2 = uWarp.w;\n vec2 a = curlFBM(vec2(g.x * warpScale + t * warpSpeed, g.y * warpScale + t * warpSpeed));\n vec2 b = curlFBM(vec2(g.x * warpScale2 - t * warpSpeed2, g.y * warpScale2 - t * warpSpeed2));\n return vec2(a.x * uAmplitude + b.x * uAmplitude * 0.5, a.y * uAmplitude + b.y * uAmplitude * 0.5);\n}\n\n// \u2500\u2500 \u00A74 The local pointer bulge (transcribes paperGrid.ts cursorBulge) \u2500\u2500\nvec2 cursorBulge(vec2 g) {\n vec2 cursor = uCursor.xy;\n float strength = uCursor.z * uBulgeMode; // bulgeStrength \u00D7 bulgeMode (+repel / \u2212attract)\n float radius = max(uCursor.w, 1e-4);\n vec2 toC = g - cursor;\n float d = length(toC);\n float bulge = strength * exp(-(d * d) / (2.0 * radius * radius));\n if (d < 1e-5) return vec2(0.0);\n return (toC / d) * bulge;\n}\n\n// \u2500\u2500 \u00A71 The Ben Golus derivative-AA grid coverage (transcribes paperGrid.ts gridCoverage) \u2500\u2500\nfloat gridCoverage(vec2 g, float targetWidth, vec2 uvDeriv) {\n vec2 gridUV = 1.0 - abs(fract(g) * 2.0 - 1.0);\n vec2 drawWidth = clamp(vec2(targetWidth), uvDeriv, vec2(0.5));\n vec2 lineAA = uvDeriv * 1.5;\n vec2 grid2 = smoothstep(drawWidth + lineAA, drawWidth - lineAA, gridUV);\n grid2 *= clamp(vec2(targetWidth) / max(drawWidth, vec2(1e-6)), vec2(0.0), vec2(1.0));\n grid2 = mix(grid2, vec2(targetWidth), clamp(uvDeriv * 2.0 - 1.0, vec2(0.0), vec2(1.0)));\n return max(grid2.x, grid2.y);\n}\n\nvoid main() {\n float aspect = max(uAspect, 1e-4);\n vec2 uv = vec2(vUv.x * aspect, vUv.y);\n\n // \u00A75 the per-pixel kernel: warp + bulge the grid coordinate, then two-tier Golus.\n vec2 g = uv * uGridScale;\n g += curlWarp(g, uTime);\n g += cursorBulge(g);\n\n // The screen-space derivative of g (Golus): length(vec2(dFdx, dFdy)) per axis (the actual\n // backing-store pixel \u2014 NOT a CSS sub-pixel, the blur-kill).\n vec2 dv = vec2(\n length(vec2(dFdx(g.x), dFdy(g.x))),\n length(vec2(dFdx(g.y), dFdy(g.y)))\n );\n\n float minor = gridCoverage(g, uGrid.x, dv);\n float me = max(uMajorEvery, 1.0);\n float major = gridCoverage(g / me, uGrid.y, dv / me);\n float line = max(minor * uGrid.z, major * uGrid.w);\n\n vec3 col = clamp(linearToSrgb(uLineColor), vec3(0.0), vec3(1.0));\n if (uHasBackground > 0.5) {\n vec3 bg = clamp(linearToSrgb(uBg), vec3(0.0), vec3(1.0));\n float a = line * uFieldAlpha;\n fragColor = vec4(mix(bg, col, a), 1.0);\n return;\n }\n float a = line * uFieldAlpha;\n fragColor = vec4(col * a, a); // premultiplied over transparent\n}";
4
+ export declare const PAPER_GRID_FRAG_GLSL = "#version 300 es\nprecision highp float;\n\n#define TAU 6.283185307179586\n\nin vec2 vUv;\nout vec4 fragColor;\n\nuniform float uTime;\nuniform float uGridScale;\nuniform float uMajorEvery;\nuniform float uAspect;\nuniform vec4 uWarp; // (warpScale, warpSpeed, warpScale2, warpSpeed2)\nuniform float uAmplitude;\nuniform vec4 uGrid; // (targetWidth, targetWidthMajor, minorAlpha, majorAlpha)\nuniform float uFieldAlpha;\nuniform float uHasBackground;\nuniform vec4 uCursor; // (cursorX, cursorY, swirlStrength, swirlRadius)\nuniform float uBulgeMode; // +1 repel / \u22121 attract (signs the swirl)\nuniform float uInteractive; // 1 = cursor swirl on\nuniform vec4 uWave; // (waveDirX, waveDirY, waveK, waveOmega)\nuniform vec4 uWave2; // (waveSigma, twistMax, shearMax, amp)\nuniform vec3 uLineColor; // linear-sRGB ink\nuniform vec3 uBg; // linear-sRGB themed bg\n// \u2500\u2500 The FACE (BD.W-PAPERGRID-FACE) \u2014 the height-lit filled cell interior \u2500\u2500\nuniform vec4 uFace; // (faceAlpha, faceRelief, squashK, baseInset)\nuniform vec2 uLightDir; // the cel key-light direction\nuniform vec3 uFaceLo; // linear-sRGB rose-umber trough (FOLD B, 3-stop)\nuniform vec3 uFaceMid; // linear-sRGB ember-amber mid\nuniform vec3 uFaceHi; // linear-sRGB warm-wheat crest\n\n\nfloat srgbToLinearCh(float c) {\n return c <= 0.04045 ? c / 12.92 : pow((c + 0.055) / 1.055, 2.4);\n}\nvec3 srgbToLinear(vec3 c) {\n return vec3(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfloat linearToSrgbCh(float c) {\n return c <= 0.0031308 ? c * 12.92 : 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nvec3 linearToSrgb(vec3 c) {\n return vec3(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}\n\n// The 3-stop warm-divergent FACE ramp (FOLD B \u2014 height-keyed, NOT a 2-point mid-park). All stops\n// warm hue \u2208 [20,90]; linear-space (the OETF runs in main, FOLD E).\nvec3 faceRamp(float rampT) {\n float s = clamp(rampT, 0.0, 1.0);\n if (s < 0.5) {\n return mix(uFaceLo, uFaceMid, s * 2.0);\n }\n return mix(uFaceMid, uFaceHi, (s - 0.5) * 2.0);\n}\n\n// The shared divergence-free 2D-curl operator (flow.glsl.ts) \u2014 the prototype declares\n// potentialFBM; the host defines its BODY below the splice (GLSL forward-declaration).\n\nconst float CURL_EPS = 0.012;\n\n// Scalar fbm potential psi \u2014 the host's noise basis, wrapped so the curl operator is\n// basis-agnostic. A host carrying its own fbm defines this as: return fbm(p);\nfloat potentialFBM(vec2 p);\n\n// \u2207\u00D7\u03C8 in 2D \u2014 the divergence-free flow direction. Central finite differences of the\n// scalar potential give the partials; the cross-pairing (\u2202y, \u2212\u2202x) is the 2D curl.\nvec2 curlFBM(vec2 p) {\n float dx = potentialFBM(p + vec2(CURL_EPS, 0.0)) - potentialFBM(p - vec2(CURL_EPS, 0.0));\n float dy = potentialFBM(p + vec2(0.0, CURL_EPS)) - potentialFBM(p - vec2(0.0, CURL_EPS));\n // \u03C8-gradient is (dx, dy)/(2\u00B7eps); the curl rotates it 90\u00B0: (\u2202\u03C8/\u2202y, \u2212\u2202\u03C8/\u2202x).\n vec2 g = vec2(dx, dy) / (2.0 * CURL_EPS);\n return vec2(g.y, -g.x);\n}\n\n\n// \u2500\u2500 The host noise basis (transcribes paperGrid.ts hash21/valueNoise/potentialFBM) \u2500\u2500\nfloat hash21(float x, float y) {\n float px = fract(x * 0.1031);\n float py = fract(y * 0.1031);\n float pz = fract(x * 0.1031);\n float d = px * (py + 33.33) + py * (pz + 33.33) + pz * (px + 33.33);\n px += d;\n py += d;\n pz += d;\n return fract((px + py) * pz);\n}\n\nfloat valueNoise(float x, float y) {\n float ix = floor(x);\n float iy = floor(y);\n float fx = x - ix;\n float fy = y - iy;\n float ux = fx * fx * fx * (fx * (fx * 6.0 - 15.0) + 10.0);\n float uy = fy * fy * fy * (fy * (fy * 6.0 - 15.0) + 10.0);\n float a = hash21(ix, iy);\n float b = hash21(ix + 1.0, iy);\n float c = hash21(ix, iy + 1.0);\n float d2 = hash21(ix + 1.0, iy + 1.0);\n return mix(mix(a, b, ux), mix(c, d2, ux), uy);\n}\n\n// The 3-octave scalar fbm potential \u2014 the curl chunk's forward-declared potentialFBM body.\nfloat potentialFBM(vec2 p) {\n float v = 0.0;\n float amp = 0.5;\n float freq = 1.0;\n float px = p.x;\n float py = p.y;\n for (int i = 0; i < 3; i++) {\n v += amp * valueNoise(px * freq, py * freq);\n // FBM_ROT mat2(0.8, 0.6, -0.6, 0.8) \u2014 same rotation as the shared chunk.\n float rx = 0.8 * px - 0.6 * py;\n float ry = 0.6 * px + 0.8 * py;\n px = rx;\n py = ry;\n freq *= 2.0;\n amp *= 0.5;\n }\n return v;\n}\n\n// The shared traveling-wave CELL-WARP chunk (waveField.glsl.ts \u2014 cellTwist/cursorSwirl/\n// travelingEnvelope; spliced AFTER valueNoise + potentialFBM bodies + the curlFBM chunk).\n// paper-grid + concentric share this EXACTLY (the C3 cure: the boxes twist about their own\n// center, the lines stay locally straight \u2014 never the retired LINE-warp).\n\n#ifndef WAVE_FIELD_TAU\n#define WAVE_FIELD_TAU 6.283185307179586\n#endif\n\n// The traveling-wave envelope \u2014 a moving Gaussian crest band sweeping along waveDir.\nfloat travelingEnvelope(vec2 pivot, float t, vec2 waveDir, float waveK, float waveOmega, float waveSigma) {\n float coord = dot(pivot, waveDir) * waveK - t * waveOmega;\n float crest = fract(coord / WAVE_FIELD_TAU);\n float z = (crest - 0.5) * 2.0;\n return exp(-(z * z) / max(waveSigma, 1e-3));\n}\n\n// The curl-direction scalar \u2014 the smooth low-freq director the per-cell twist follows.\nfloat curlScalar(vec2 cc, float t) {\n vec2 f = curlFBM(vec2(cc.x * 0.5 + t * 0.08, cc.y * 0.5 - t * 0.06));\n return clamp(f.x, -1.0, 1.0);\n}\n\n// The directed-twist FLOOR (the visibility cure): keep the curl SIGN (adjacent cells lean\n// together) but floor the magnitude so a crest-band cell ALWAYS rotates decisively.\n#ifndef WAVE_FIELD_TWIST_FLOOR\n#define WAVE_FIELD_TWIST_FLOOR 0.62\n#endif\nfloat directedTwist(float s, float floorMag) {\n float mag = max(floorMag, abs(s));\n float sgn = tanh(s * 6.0);\n return sgn * mag;\n}\n\n// \u2500\u2500 The FACE leaf (the structurally-absent RE-INVENT \u2014 height-lit filled cell interior) \u2500\u2500\n// Defined ABOVE cellTwist: cellTwist rides cellHeight via the driver so twist + face read ONE\n// envelope.\n\n// The sheet displacement at a cell center = the EXACT traveling-wave scalar the twist rides.\nfloat cellHeight(vec2 cc, float t, vec2 waveDir, float waveK, float waveOmega, float waveSigma, float amp) {\n return travelingEnvelope(cc, t, waveDir, waveK, waveOmega, waveSigma) * amp;\n}\n\n// The pre-twist driver (FOLD A): the cell pivot cc + the crest envelope env the twist AND the\n// face both ride. The face samples height/relief at THIS pre-twist cc (floor(twisted_g) at the\n// crest lights a NEIGHBOUR cell). cc in .xy, env in .z.\nvec3 cellDriver(vec2 g, float cellSize, float t, vec2 waveDir, float waveK, float waveOmega,\n float waveSigma, float amp) {\n float cs = max(cellSize, 1e-3);\n vec2 cc = (floor(g / cs) + 0.5) * cs;\n float env = cellHeight(cc, t, waveDir, waveK, waveOmega, waveSigma, amp);\n return vec3(cc, env);\n}\n\n// The central-difference slope of cellHeight across a cell (eps = 0.5\u00B7cellSize) \u2014 derivative-\n// FREE (NO dFdx on the height) \u2192 Safari WebGL2-safe. Returns \u2207H.\nvec2 faceRelief(vec2 cc, float cellSize, float t, vec2 waveDir, float waveK, float waveOmega,\n float waveSigma, float amp) {\n float eps = max(cellSize, 1e-3) * 0.5;\n float hxp = cellHeight(cc + vec2(eps, 0.0), t, waveDir, waveK, waveOmega, waveSigma, amp);\n float hxm = cellHeight(cc - vec2(eps, 0.0), t, waveDir, waveK, waveOmega, waveSigma, amp);\n float hyp = cellHeight(cc + vec2(0.0, eps), t, waveDir, waveK, waveOmega, waveSigma, amp);\n float hym = cellHeight(cc - vec2(0.0, eps), t, waveDir, waveK, waveOmega, waveSigma, amp);\n return vec2((hxp - hxm) / (2.0 * eps), (hyp - hym) / (2.0 * eps));\n}\n\n// Soft inset-square coverage inside a (warped) cell \u2014 the filled FACE plateau. d is the distance\n// into the cell from the nearest gutter (the Golus triangle-wave); the inset retreats as it grows\n// (the squash). aa = the shader's fwidth(g) (JS passes a fixed uvDeriv).\nfloat facePlateau(vec2 g, float inset, vec2 uvDeriv) {\n vec2 tri = 1.0 - abs(fract(g) * 2.0 - 1.0);\n float d = min(tri.x, tri.y);\n float aa = max(uvDeriv.x, uvDeriv.y) * 1.5;\n return smoothstep(inset, inset + 2.0 * aa, d);\n}\n\n// The cell-local twist about each cell's own center, gated by the traveling wave + directed\n// by the curl flow. amp is the spring-eased envelope amplitude the JS host drives. FOLD C: the\n// TWIST_FLOOR is crest-gated by env so OFF-crest cells relax to flat calm paper (the traveling\n// read, not static foil).\nvec2 cellTwist(vec2 g, float cellSize, float t, vec2 waveDir, float waveK, float waveOmega,\n float waveSigma, float twistMax, float shearMax, float amp) {\n vec3 drv = cellDriver(g, cellSize, t, waveDir, waveK, waveOmega, waveSigma, amp);\n vec2 cc = drv.xy;\n float env = drv.z;\n float floorMag = WAVE_FIELD_TWIST_FLOOR * env; // FOLD C: crest-gated floor\n float theta = twistMax * env * directedTwist(curlScalar(cc, t), floorMag);\n float shear = shearMax * env * directedTwist(curlScalar(cc + vec2(17.3, 9.1), t), floorMag);\n vec2 local = g - cc;\n float ct = cos(theta);\n float st = sin(theta);\n vec2 rot = vec2(ct * local.x - st * local.y, st * local.x + ct * local.y);\n rot.x += shear * rot.y; // a small skew so the box MORPHS, not just rotates\n return cc + rot;\n}\n\n// The CONTINUOUS traveling-wave FLOW warp \u2014 the SMOOTH twin of cellTwist (no per-cell seam;\n// for the level-set contours that shatter into a mesh under the cell discontinuity).\nvec2 waveFlow(vec2 g, float t, vec2 waveDir, float waveK, float waveOmega, float waveSigma,\n float twistMax, float amp) {\n float env = travelingEnvelope(g, t, waveDir, waveK, waveOmega, waveSigma) * amp;\n vec2 f = curlFBM(vec2(g.x * 0.6 + t * 0.05, g.y * 0.6 - t * 0.04));\n vec2 f2 = curlFBM(vec2(g.x * 1.1 - t * 0.03, g.y * 1.1 + t * 0.035));\n float k = twistMax * env;\n return g + (f + f2 * 0.5) * k;\n}\n\n// The local cursor swirl \u2014 the finger twists the cells around it (re-aimed cursorBulge).\nvec2 cursorSwirl(vec2 g, vec2 cursor, float strength, float radius) {\n vec2 to = g - cursor;\n float d2 = dot(to, to);\n float r = max(radius, 1e-4);\n float theta = strength * exp(-d2 / (2.0 * r * r));\n float ct = cos(theta);\n float st = sin(theta);\n return cursor + vec2(ct * to.x - st * to.y, st * to.x + ct * to.y);\n}\n\n// The LOW-octave value-noise topography \u2014 the scalar field concentric extracts contours of.\nfloat heightField(vec2 p, float octavesF, float seed) {\n float v = 0.0;\n float amp = 0.5;\n float freq = 1.0;\n float px = p.x + seed;\n float py = p.y - seed;\n int n = int(clamp(octavesF, 1.0, 6.0));\n for (int i = 0; i < 6; i++) {\n if (i >= n) break;\n v += amp * valueNoise(px * freq, py * freq);\n float rx = 0.8 * px - 0.6 * py;\n float ry = 0.6 * px + 0.8 * py;\n px = rx;\n py = ry;\n freq *= 2.0;\n amp *= 0.5;\n }\n return v;\n}\n\n// The \u03C9=\u221A(g\u00B7k) breathing swell \u2014 basins inflate/deflate with weight.\nfloat waveSwell(float t, float phase) {\n return sin(t * 0.35 + phase) * 0.5 + sin(t * 0.21 + phase * 1.7) * 0.5;\n}\n\n\n// \u2500\u2500 \u00A71 The Ben Golus derivative-AA grid coverage (transcribes paperGrid.ts gridCoverage) \u2500\u2500\nfloat gridCoverage(vec2 g, float targetWidth, vec2 uvDeriv) {\n vec2 gridUV = 1.0 - abs(fract(g) * 2.0 - 1.0);\n vec2 drawWidth = clamp(vec2(targetWidth), uvDeriv, vec2(0.5));\n vec2 lineAA = uvDeriv * 1.5;\n vec2 grid2 = smoothstep(drawWidth + lineAA, drawWidth - lineAA, gridUV);\n grid2 *= clamp(vec2(targetWidth) / max(drawWidth, vec2(1e-6)), vec2(0.0), vec2(1.0));\n grid2 = mix(grid2, vec2(targetWidth), clamp(uvDeriv * 2.0 - 1.0, vec2(0.0), vec2(1.0)));\n return max(grid2.x, grid2.y);\n}\n\nvoid main() {\n float aspect = max(uAspect, 1e-4);\n vec2 uv = vec2(vUv.x * aspect, vUv.y);\n\n // \u00A75 the per-pixel kernel: CELL-TWIST + cursor-swirl the grid coordinate, then two-tier Golus.\n // cellTwist rotates each cell about its OWN center (the boxes twist, the lines stay locally\n // straight \u2014 the C3 cure) gated by a traveling Gaussian crest; cursorSwirl twists the cells\n // about the finger. The Golus dv reads the FINAL twisted coord (the crisp-line fence survives).\n vec2 g0 = uv * uGridScale;\n // FOLD A \u2014 the PRE-twist driver: the face samples height/relief at THIS cc (floor(twisted_g)\n // at the crest lights a NEIGHBOUR cell). cellTwist rides the SAME driver, so twist + face fuse.\n vec3 drv = cellDriver(g0, 1.0, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.w);\n vec2 cc = drv.xy;\n vec2 g = cellTwist(g0, 1.0, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.y, uWave2.z, uWave2.w);\n if (uInteractive > 0.5) {\n g = cursorSwirl(g, uCursor.xy, uCursor.z * uBulgeMode, uCursor.w);\n }\n\n // The screen-space derivative of g (Golus): length(vec2(dFdx, dFdy)) per axis (the actual\n // backing-store pixel \u2014 NOT a CSS sub-pixel, the blur-kill).\n vec2 dv = vec2(\n length(vec2(dFdx(g.x), dFdy(g.x))),\n length(vec2(dFdx(g.y), dFdy(g.y)))\n );\n\n float minor = gridCoverage(g, uGrid.x, dv);\n float me = max(uMajorEvery, 1.0);\n float major = gridCoverage(g / me, uGrid.y, dv / me);\n float line = max(minor * uGrid.z, major * uGrid.w);\n\n // \u2500\u2500 The FACE (BD.W-PAPERGRID-FACE) \u2014 height-lit filled cell interior \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // Sample height/relief at the pre-twist driver cc (FOLD A); Lambert the \u2207H slope against the\n // fixed cel key-light; squash the inset so the crest face inflates; multi-stop warm-divergent\n // ramp keyed on mix(shade, h) (FOLD B); the ink through the production OETF (FOLD E).\n float h = cellHeight(cc, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.w);\n vec2 grad = faceRelief(cc, 1.0, uTime, uWave.xy, uWave.z, uWave.w, uWave2.x, uWave2.w);\n vec3 n = normalize(vec3(-grad * uFace.y, 1.0));\n float shade = clamp(0.5 + dot(n, normalize(vec3(uLightDir, 1.0))) * 0.5, 0.0, 1.0);\n float inset = uFace.w * (1.0 - uFace.z * h); // squash & stretch\n float face = facePlateau(g, inset, dv);\n float rampT = clamp(shade * 0.5 + h * 0.5, 0.0, 1.0); // FOLD B \u2014 height-keyed crest\n vec3 faceInk = clamp(linearToSrgb(faceRamp(rampT)), vec3(0.0), vec3(1.0));\n float faceA = face * uFace.x * uFieldAlpha; // FOLD D \u2014 one field-blend scalar\n\n vec3 col = clamp(linearToSrgb(uLineColor), vec3(0.0), vec3(1.0));\n if (uHasBackground > 0.5) {\n vec3 bg = clamp(linearToSrgb(uBg), vec3(0.0), vec3(1.0));\n vec3 base = mix(bg, faceInk, faceA);\n float a = line * uFieldAlpha;\n fragColor = vec4(mix(base, col, a), 1.0);\n return;\n }\n // transparent ground: the FACE composites UNDER the line, the SOURCE-OVER operator in\n // PREMULTIPLIED space. faceAlpha:0 \u2192 faceA=0 \u2192 the face term vanishes \u2192 vec4(col\u00B7line, line) =\n // byte-identical to the HEAD line-only render.\n vec3 linePremult = (col * line) * uFieldAlpha; // line layer (the FieldAlpha subtlety)\n float lineA = line * uFieldAlpha;\n vec3 facePremult = faceInk * faceA; // face layer premultiplied (faceA folds field)\n vec3 outPremult = linePremult + facePremult * (1.0 - lineA);\n float a = lineA + faceA * (1.0 - lineA);\n fragColor = vec4(outPremult, a); // premultiplied over transparent\n}";
@@ -1 +1 @@
1
- export declare const PAPER_GRID_WGSL = "\nconst TAU: f32 = 6.283185307179586;\n\n// \u2500\u2500 Paper-grid uniforms (the typed-struct source-of-truth \u2014 see uniformBridgeWGPU.ts) \u2500\u2500\nstruct PaperGridUniforms {\n // u0: (uTime, uGridScale, uMinorPitch, uMajorEvery)\n u0: vec4<f32>,\n // warp: (uWarpScale, uWarpSpeed, uWarpScale2, uWarpSpeed2)\n warp: vec4<f32>,\n // warp2: (uAmplitude, uAspect, _pad, _pad)\n warp2: vec4<f32>,\n // grid: (uTargetWidth, uTargetWidthMajor, uMinorAlpha, uMajorAlpha)\n grid: vec4<f32>,\n // field: (uFieldAlpha, uHasBackground, _pad, _pad)\n field: vec4<f32>,\n // cursor: (uCursorX, uCursorY, uBulgeStrength, uBulgeRadius)\n cursor: vec4<f32>,\n // cursor2: (uBulgeMode, uInteractive, _pad, _pad)\n cursor2: vec4<f32>,\n // line: (uLineColor.rgb (linear), _pad)\n line: vec4<f32>,\n // bg: (uBg.rgb (linear), _pad)\n bg: vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> u: PaperGridUniforms;\n\n\nfn srgbToLinearCh(c: f32) -> f32 {\n if (c <= 0.04045) { return c / 12.92; }\n return pow((c + 0.055) / 1.055, 2.4);\n}\nfn srgbToLinear(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfn linearToSrgbCh(c: f32) -> f32 {\n if (c <= 0.0031308) { return c * 12.92; }\n return 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nfn linearToSrgb(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}\n\n// \u2500\u2500 The host noise basis (transcribes paperGrid.ts hash21/valueNoise/potentialFBM) \u2500\u2500\n// A quintic-faded 2D value-noise fbm potential \u2014 the SAME basis the dot-flow-field carries\n// (so the suite speaks ONE noise basis). DECLARED ABOVE the curl splice (WGSL has no forward\n// declaration \u2014 a function may only call one declared earlier).\nfn hash21(x: f32, y: f32) -> f32 {\n var px = fract(x * 0.1031);\n var py = fract(y * 0.1031);\n var pz = fract(x * 0.1031);\n let d = px * (py + 33.33) + py * (pz + 33.33) + pz * (px + 33.33);\n px = px + d;\n py = py + d;\n pz = pz + d;\n return fract((px + py) * pz);\n}\n\nfn valueNoise(x: f32, y: f32) -> f32 {\n let ix = floor(x);\n let iy = floor(y);\n let fx = x - ix;\n let fy = y - iy;\n let ux = fx * fx * fx * (fx * (fx * 6.0 - 15.0) + 10.0);\n let uy = fy * fy * fy * (fy * (fy * 6.0 - 15.0) + 10.0);\n let a = hash21(ix, iy);\n let b = hash21(ix + 1.0, iy);\n let c = hash21(ix, iy + 1.0);\n let d2 = hash21(ix + 1.0, iy + 1.0);\n return mix(mix(a, b, ux), mix(c, d2, ux), uy);\n}\n\n// The 3-octave scalar fbm potential \u2014 the host noise basis the curl operator wraps.\nfn potentialFBM(p: vec2f) -> f32 {\n var v = 0.0;\n var amp = 0.5;\n var freq = 1.0;\n var px = p.x;\n var py = p.y;\n for (var i = 0; i < 3; i = i + 1) {\n v = v + amp * valueNoise(px * freq, py * freq);\n // FBM_ROT mat2(0.8, 0.6, -0.6, 0.8) \u2014 same rotation as the shared chunk.\n let rx = 0.8 * px - 0.6 * py;\n let ry = 0.6 * px + 0.8 * py;\n px = rx;\n py = ry;\n freq = freq * 2.0;\n amp = amp * 0.5;\n }\n return v;\n}\n\n// The shared divergence-free 2D-curl operator (flow.wgsl.ts \u2014 the FIRST WGSL curl consumer).\n\nconst CURL_EPS: f32 = 0.012;\n\n// \u2207\u00D7\u03C8 in 2D \u2014 the divergence-free flow direction. Central finite differences of the\n// scalar potential give the partials; the cross-pairing (\u2202y, \u2212\u2202x) is the 2D curl.\nfn curlFBM(p: vec2f) -> vec2f {\n let dx = potentialFBM(p + vec2f(CURL_EPS, 0.0)) - potentialFBM(p - vec2f(CURL_EPS, 0.0));\n let dy = potentialFBM(p + vec2f(0.0, CURL_EPS)) - potentialFBM(p - vec2f(0.0, CURL_EPS));\n // \u03C8-gradient is (dx, dy)/(2\u00B7eps); the curl rotates it 90\u00B0: (\u2202\u03C8/\u2202y, \u2212\u2202\u03C8/\u2202x).\n let g = vec2f(dx, dy) / (2.0 * CURL_EPS);\n return vec2f(g.y, -g.x);\n}\n\n\n// \u2500\u2500 \u00A73 The \"liquid\": the global curl-flow domain warp (transcribes paperGrid.ts curlWarp) \u2500\u2500\n// TWO counter-flowing curl terms at different scales/speeds (Alex Harri counter-flow \u2014 never\n// visibly loops). A SHALLOW, LOW-frequency warp keeps the lines a clearly-readable grid.\nfn curlWarp(g: vec2f, t: f32) -> vec2f {\n let warpScale = u.warp.x;\n let warpSpeed = u.warp.y;\n let warpScale2 = u.warp.z;\n let warpSpeed2 = u.warp.w;\n let amp = u.warp2.x;\n let a = curlFBM(vec2f(g.x * warpScale + t * warpSpeed, g.y * warpScale + t * warpSpeed));\n let b = curlFBM(vec2f(g.x * warpScale2 - t * warpSpeed2, g.y * warpScale2 - t * warpSpeed2));\n return vec2f(a.x * amp + b.x * amp * 0.5, a.y * amp + b.y * amp * 0.5);\n}\n\n// \u2500\u2500 \u00A74 The pointer bulge: a LOCAL Gaussian warp (transcribes paperGrid.ts cursorBulge) \u2500\u2500\nfn cursorBulge(g: vec2f) -> vec2f {\n let cursor = u.cursor.xy;\n let strength = u.cursor.z * u.cursor2.x; // bulgeStrength \u00D7 bulgeMode (+repel / \u2212attract)\n let radius = max(u.cursor.w, 1e-4);\n let toC = g - cursor;\n let d = length(toC);\n let bulge = strength * exp(-(d * d) / (2.0 * radius * radius));\n if (d < 1e-5) { return vec2f(0.0); }\n return (toC / d) * bulge;\n}\n\n// \u2500\u2500 \u00A71 The crisp line: Ben Golus derivative-AA grid coverage (transcribes gridCoverage) \u2500\u2500\n// targetWidth is the line half-width in GRID UNITS (lineWidthPx / minorPitchPx); uvDeriv is\n// the per-axis screen-space derivative of g (length(vec2(dpdx, dpdy)) per axis). Returns\n// line coverage [0..1] \u2014 exactly N device-pixels wide at ANY DPR/zoom (the blur-kill).\nfn gridCoverage(g: vec2f, targetWidth: f32, uvDeriv: vec2f) -> f32 {\n // triangle wave per axis: 0 at a line, 1 at the cell center.\n let gridUV = 1.0 - abs(fract(g) * 2.0 - 1.0);\n let drawWidth = clamp(vec2f(targetWidth), uvDeriv, vec2f(0.5));\n let lineAA = uvDeriv * 1.5;\n // smoothstep with edge0 > edge1 (Golus) \u2192 a falling edge.\n var grid2 = smoothstep(drawWidth + lineAA, drawWidth - lineAA, gridUV);\n // preserve thin-line intensity where the line is sub-drawWidth.\n grid2 = grid2 * clamp(vec2f(targetWidth) / max(drawWidth, vec2f(1e-6)), vec2f(0.0), vec2f(1.0));\n // Moir\u00E9 suppression: fade toward the average where the cell packs tighter than a pixel.\n grid2 = mix(grid2, vec2f(targetWidth), clamp(uvDeriv * 2.0 - 1.0, vec2f(0.0), vec2f(1.0)));\n return max(grid2.x, grid2.y);\n}\n\n// Full-screen-triangle (the pilot idiom): NDC corners (-1,-1),(3,-1),(-1,3) cover the\n// viewport from a single 3-vertex draw \u2014 no vertex buffer.\nstruct VSOut {\n @builtin(position) pos: vec4f,\n @location(0) uv: vec2f, // domain [-1,1]\u00B2, aspect-corrected x\n};\n\n@vertex\nfn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {\n var corners = array<vec2f, 3>(\n vec2f(-1.0, -1.0), vec2f(3.0, -1.0), vec2f(-1.0, 3.0),\n );\n let c = corners[vi];\n var out: VSOut;\n out.pos = vec4f(c, 0.0, 1.0);\n out.uv = vec2f(c.x, c.y);\n return out;\n}\n\n@fragment\nfn fs_main(in: VSOut) -> @location(0) vec4f {\n let aspect = max(u.warp2.y, 1e-4);\n // aspect-correct the domain x so the cells read square.\n let uv = vec2f(in.uv.x * aspect, in.uv.y);\n let t = u.u0.x;\n let gridScale = u.u0.y;\n\n // \u00A75 the per-pixel kernel: warp + bulge the grid coordinate, then two-tier Golus.\n var g = uv * gridScale;\n g = g + curlWarp(g, t);\n g = g + cursorBulge(g);\n\n // The screen-space derivative of g (Golus): length(vec2(dpdx, dpdy)) per axis. fwidth-class\n // derivative reads the ACTUAL backing-store pixel (NOT fwidthFine \u2014 Compatibility-Mode safe).\n let dv = vec2f(\n length(vec2f(dpdx(g.x), dpdy(g.x))),\n length(vec2f(dpdx(g.y), dpdy(g.y))),\n );\n\n let minor = gridCoverage(g, u.grid.x, dv);\n // The major tier evals at g / majorEvery with its own derivative scaling.\n let me = max(u.u0.w, 1.0);\n let major = gridCoverage(g / me, u.grid.y, dv / me);\n let line = max(minor * u.grid.z, major * u.grid.w);\n\n let col = clamp(linearToSrgb(u.line.rgb), vec3f(0.0), vec3f(1.0));\n let hasBg = u.field.y;\n if (hasBg > 0.5) {\n // opaque ground: composite the ink over the themed bg.\n let bg = clamp(linearToSrgb(u.bg.rgb), vec3f(0.0), vec3f(1.0));\n let a = line * u.field.x;\n let outRgb = mix(bg, col, a);\n return vec4f(outRgb, 1.0);\n }\n // transparent ground: the LINE carries the alpha \u2014 the page reads through the cells.\n let a = line * u.field.x;\n return vec4f(col * a, a); // premultiplied over transparent\n}\n";
1
+ export declare const PAPER_GRID_WGSL = "\nconst TAU: f32 = 6.283185307179586;\n\n// \u2500\u2500 Paper-grid uniforms (the typed-struct source-of-truth \u2014 see uniformBridgeWGPU.ts) \u2500\u2500\nstruct PaperGridUniforms {\n // u0: (uTime, uGridScale, uMinorPitch, uMajorEvery)\n u0: vec4<f32>,\n // face: (uFaceAlpha, uFaceRelief, uSquashK, uBaseInset) \u2014 the height-lit FACE (re-points the retired warp lane)\n face: vec4<f32>,\n // warp2: (uAmplitude, uAspect, uLightDirX, uLightDirY) \u2014 aspect + the cel key-light\n warp2: vec4<f32>,\n // grid: (uTargetWidth, uTargetWidthMajor, uMinorAlpha, uMajorAlpha)\n grid: vec4<f32>,\n // field: (uFieldAlpha, uHasBackground, _pad, _pad)\n field: vec4<f32>,\n // cursor: (uCursorX, uCursorY, uSwirlStrength, uSwirlRadius)\n cursor: vec4<f32>,\n // cursor2: (uBulgeMode, uInteractive, _pad, _pad)\n cursor2: vec4<f32>,\n // line: (uLineColor.rgb (linear), _pad)\n line: vec4<f32>,\n // bg: (uBg.rgb (linear), _pad)\n bg: vec4<f32>,\n // wave: (waveDirX, waveDirY, waveK, waveOmega) \u2014 the traveling-wave crest\n wave: vec4<f32>,\n // wave2: (waveSigma, twistMax, shearMax, amp) \u2014 the cell-twist envelope (amp: spring-eased)\n wave2: vec4<f32>,\n // faceLo: (rose-umber trough .rgb (linear), _pad) \u2014 the warm-divergent ramp (FOLD B, 3-stop)\n faceLo: vec4<f32>,\n // faceMid: (ember-amber mid .rgb (linear), _pad)\n faceMid: vec4<f32>,\n // faceHi: (warm-wheat crest .rgb (linear), _pad)\n faceHi: vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> u: PaperGridUniforms;\n\n\nfn srgbToLinearCh(c: f32) -> f32 {\n if (c <= 0.04045) { return c / 12.92; }\n return pow((c + 0.055) / 1.055, 2.4);\n}\nfn srgbToLinear(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfn linearToSrgbCh(c: f32) -> f32 {\n if (c <= 0.0031308) { return c * 12.92; }\n return 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nfn linearToSrgb(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}\n\n// \u2500\u2500 The host noise basis (transcribes paperGrid.ts hash21/valueNoise/potentialFBM) \u2500\u2500\n// A quintic-faded 2D value-noise fbm potential \u2014 the SAME basis the dot-flow-field carries\n// (so the suite speaks ONE noise basis). DECLARED ABOVE the curl splice (WGSL has no forward\n// declaration \u2014 a function may only call one declared earlier).\nfn hash21(x: f32, y: f32) -> f32 {\n var px = fract(x * 0.1031);\n var py = fract(y * 0.1031);\n var pz = fract(x * 0.1031);\n let d = px * (py + 33.33) + py * (pz + 33.33) + pz * (px + 33.33);\n px = px + d;\n py = py + d;\n pz = pz + d;\n return fract((px + py) * pz);\n}\n\nfn valueNoise(x: f32, y: f32) -> f32 {\n let ix = floor(x);\n let iy = floor(y);\n let fx = x - ix;\n let fy = y - iy;\n let ux = fx * fx * fx * (fx * (fx * 6.0 - 15.0) + 10.0);\n let uy = fy * fy * fy * (fy * (fy * 6.0 - 15.0) + 10.0);\n let a = hash21(ix, iy);\n let b = hash21(ix + 1.0, iy);\n let c = hash21(ix, iy + 1.0);\n let d2 = hash21(ix + 1.0, iy + 1.0);\n return mix(mix(a, b, ux), mix(c, d2, ux), uy);\n}\n\n// The 3-octave scalar fbm potential \u2014 the host noise basis the curl operator wraps.\nfn potentialFBM(p: vec2f) -> f32 {\n var v = 0.0;\n var amp = 0.5;\n var freq = 1.0;\n var px = p.x;\n var py = p.y;\n for (var i = 0; i < 3; i = i + 1) {\n v = v + amp * valueNoise(px * freq, py * freq);\n // FBM_ROT mat2(0.8, 0.6, -0.6, 0.8) \u2014 same rotation as the shared chunk.\n let rx = 0.8 * px - 0.6 * py;\n let ry = 0.6 * px + 0.8 * py;\n px = rx;\n py = ry;\n freq = freq * 2.0;\n amp = amp * 0.5;\n }\n return v;\n}\n\n// The shared divergence-free 2D-curl operator (flow.wgsl.ts \u2014 the FIRST WGSL curl consumer).\n\nconst CURL_EPS: f32 = 0.012;\n\n// \u2207\u00D7\u03C8 in 2D \u2014 the divergence-free flow direction. Central finite differences of the\n// scalar potential give the partials; the cross-pairing (\u2202y, \u2212\u2202x) is the 2D curl.\nfn curlFBM(p: vec2f) -> vec2f {\n let dx = potentialFBM(p + vec2f(CURL_EPS, 0.0)) - potentialFBM(p - vec2f(CURL_EPS, 0.0));\n let dy = potentialFBM(p + vec2f(0.0, CURL_EPS)) - potentialFBM(p - vec2f(0.0, CURL_EPS));\n // \u03C8-gradient is (dx, dy)/(2\u00B7eps); the curl rotates it 90\u00B0: (\u2202\u03C8/\u2202y, \u2212\u2202\u03C8/\u2202x).\n let g = vec2f(dx, dy) / (2.0 * CURL_EPS);\n return vec2f(g.y, -g.x);\n}\n\n\n// The shared traveling-wave CELL-WARP chunk (waveField.wgsl.ts \u2014 cellTwist/cursorSwirl/\n// travelingEnvelope; splices AFTER valueNoise + curlFBM are declared). paper-grid + concentric\n// share this EXACTLY \u2014 the cell-local twist replaces the retired LINE-warp (the C3 cure: the\n// boxes twist about their own center, the lines stay locally straight).\n\nconst WAVE_FIELD_TAU: f32 = 6.283185307179586;\n\n// The traveling-wave envelope \u2014 a moving Gaussian crest band sweeping along waveDir.\nfn travelingEnvelope(pivot: vec2f, t: f32, waveDir: vec2f, waveK: f32, waveOmega: f32, waveSigma: f32) -> f32 {\n let coord = dot(pivot, waveDir) * waveK - t * waveOmega;\n let crest = fract(coord / WAVE_FIELD_TAU);\n let z = (crest - 0.5) * 2.0;\n return exp(-(z * z) / max(waveSigma, 1e-3));\n}\n\n// The curl-direction scalar \u2014 the smooth low-freq director the per-cell twist follows.\nfn curlScalar(cc: vec2f, t: f32) -> f32 {\n let f = curlFBM(vec2f(cc.x * 0.5 + t * 0.08, cc.y * 0.5 - t * 0.06));\n return clamp(f.x, -1.0, 1.0);\n}\n\n// The directed-twist FLOOR (the visibility cure): keep the curl SIGN (adjacent cells lean\n// together) but floor the magnitude so a crest-band cell ALWAYS rotates decisively.\nconst WAVE_FIELD_TWIST_FLOOR: f32 = 0.62;\nfn directedTwist(s: f32, floorMag: f32) -> f32 {\n let mag = max(floorMag, abs(s));\n let sgn = tanh(s * 6.0);\n return sgn * mag;\n}\n\n// \u2500\u2500 The FACE leaf (the structurally-absent RE-INVENT \u2014 height-lit filled cell interior) \u2500\u2500\n// DECLARED ABOVE cellTwist (no WGSL forward declaration): cellTwist rides cellHeight via the\n// driver so twist + face read ONE envelope.\n\n// The sheet displacement at a cell center = the EXACT traveling-wave scalar the twist rides.\nfn cellHeight(cc: vec2f, t: f32, waveDir: vec2f, waveK: f32, waveOmega: f32, waveSigma: f32, amp: f32) -> f32 {\n return travelingEnvelope(cc, t, waveDir, waveK, waveOmega, waveSigma) * amp;\n}\n\n// The pre-twist driver (FOLD A): the cell pivot cc + the crest envelope env the twist AND the\n// face both ride. The face samples height/relief at THIS pre-twist cc (the crest twist crosses\n// the cell boundary \u2192 floor(twisted_g) would light a NEIGHBOUR cell). cc in .xy, env in .z.\nfn cellDriver(g: vec2f, cellSize: f32, t: f32, waveDir: vec2f, waveK: f32, waveOmega: f32,\n waveSigma: f32, amp: f32) -> vec3f {\n let cs = max(cellSize, 1e-3);\n let cc = (floor(g / cs) + 0.5) * cs;\n let env = cellHeight(cc, t, waveDir, waveK, waveOmega, waveSigma, amp);\n return vec3f(cc, env);\n}\n\n// The central-difference slope of cellHeight across a cell (eps = 0.5\u00B7cellSize) \u2014 derivative-\n// FREE (NO dFdx on the height) \u2192 Safari WebGL2-safe. Returns \u2207H.\nfn faceRelief(cc: vec2f, cellSize: f32, t: f32, waveDir: vec2f, waveK: f32, waveOmega: f32,\n waveSigma: f32, amp: f32) -> vec2f {\n let eps = max(cellSize, 1e-3) * 0.5;\n let hxp = cellHeight(cc + vec2f(eps, 0.0), t, waveDir, waveK, waveOmega, waveSigma, amp);\n let hxm = cellHeight(cc - vec2f(eps, 0.0), t, waveDir, waveK, waveOmega, waveSigma, amp);\n let hyp = cellHeight(cc + vec2f(0.0, eps), t, waveDir, waveK, waveOmega, waveSigma, amp);\n let hym = cellHeight(cc - vec2f(0.0, eps), t, waveDir, waveK, waveOmega, waveSigma, amp);\n return vec2f((hxp - hxm) / (2.0 * eps), (hyp - hym) / (2.0 * eps));\n}\n\n// Soft inset-square coverage inside a (warped) cell \u2014 the filled FACE plateau. d is the\n// distance into the cell from the nearest gutter (the Golus triangle-wave); the inset retreats\n// as it grows (the squash). aa = the shader's fwidth(g) (JS passes a fixed uvDeriv).\nfn facePlateau(g: vec2f, inset: f32, uvDeriv: vec2f) -> f32 {\n let tri = 1.0 - abs(fract(g) * 2.0 - 1.0);\n let d = min(tri.x, tri.y);\n let aa = max(uvDeriv.x, uvDeriv.y) * 1.5;\n return smoothstep(inset, inset + 2.0 * aa, d);\n}\n\n// The cell-local twist about each cell's own center, gated by the traveling wave + directed\n// by the curl flow. amp is the spring-eased envelope amplitude the JS host drives. FOLD C: the\n// TWIST_FLOOR is crest-gated by env so OFF-crest cells relax to flat calm paper (the traveling\n// read, not static foil).\nfn cellTwist(g: vec2f, cellSize: f32, t: f32, waveDir: vec2f, waveK: f32, waveOmega: f32,\n waveSigma: f32, twistMax: f32, shearMax: f32, amp: f32) -> vec2f {\n let drv = cellDriver(g, cellSize, t, waveDir, waveK, waveOmega, waveSigma, amp);\n let cc = drv.xy;\n let env = drv.z;\n let floorMag = WAVE_FIELD_TWIST_FLOOR * env; // FOLD C: crest-gated floor\n let theta = twistMax * env * directedTwist(curlScalar(cc, t), floorMag);\n let shear = shearMax * env * directedTwist(curlScalar(cc + vec2f(17.3, 9.1), t), floorMag);\n let local = g - cc;\n let ct = cos(theta);\n let st = sin(theta);\n var rot = vec2f(ct * local.x - st * local.y, st * local.x + ct * local.y);\n rot.x = rot.x + shear * rot.y; // a small skew so the box MORPHS, not just rotates\n return cc + rot;\n}\n\n// The CONTINUOUS traveling-wave FLOW warp \u2014 the SMOOTH twin of cellTwist (no per-cell seam;\n// for the level-set contours that shatter into a mesh under the cell discontinuity).\nfn waveFlow(g: vec2f, t: f32, waveDir: vec2f, waveK: f32, waveOmega: f32, waveSigma: f32,\n twistMax: f32, amp: f32) -> vec2f {\n let env = travelingEnvelope(g, t, waveDir, waveK, waveOmega, waveSigma) * amp;\n let f = curlFBM(vec2f(g.x * 0.6 + t * 0.05, g.y * 0.6 - t * 0.04));\n let f2 = curlFBM(vec2f(g.x * 1.1 - t * 0.03, g.y * 1.1 + t * 0.035));\n let k = twistMax * env;\n return g + (f + f2 * 0.5) * k;\n}\n\n// The local cursor swirl \u2014 the finger twists the cells around it (re-aimed cursorBulge).\nfn cursorSwirl(g: vec2f, cursor: vec2f, strength: f32, radius: f32) -> vec2f {\n let to = g - cursor;\n let d2 = dot(to, to);\n let r = max(radius, 1e-4);\n let theta = strength * exp(-d2 / (2.0 * r * r));\n let ct = cos(theta);\n let st = sin(theta);\n return cursor + vec2f(ct * to.x - st * to.y, st * to.x + ct * to.y);\n}\n\n// The LOW-octave value-noise topography \u2014 the scalar field concentric extracts contours of.\nfn heightField(p: vec2f, octavesF: f32, seed: f32) -> f32 {\n var v = 0.0;\n var amp = 0.5;\n var freq = 1.0;\n var px = p.x + seed;\n var py = p.y - seed;\n let n = i32(clamp(octavesF, 1.0, 6.0));\n for (var i = 0; i < 6; i = i + 1) {\n if (i >= n) { break; }\n v = v + amp * valueNoise(px * freq, py * freq);\n let rx = 0.8 * px - 0.6 * py;\n let ry = 0.6 * px + 0.8 * py;\n px = rx;\n py = ry;\n freq = freq * 2.0;\n amp = amp * 0.5;\n }\n return v;\n}\n\n// The \u03C9=\u221A(g\u00B7k) breathing swell \u2014 basins inflate/deflate with weight.\nfn waveSwell(t: f32, phase: f32) -> f32 {\n return sin(t * 0.35 + phase) * 0.5 + sin(t * 0.21 + phase * 1.7) * 0.5;\n}\n\n\n// \u2500\u2500 \u00A71 The crisp line: Ben Golus derivative-AA grid coverage (transcribes gridCoverage) \u2500\u2500\n// targetWidth is the line half-width in GRID UNITS (lineWidthPx / minorPitchPx); uvDeriv is\n// the per-axis screen-space derivative of g (length(vec2(dpdx, dpdy)) per axis). Returns\n// line coverage [0..1] \u2014 exactly N device-pixels wide at ANY DPR/zoom (the blur-kill).\nfn gridCoverage(g: vec2f, targetWidth: f32, uvDeriv: vec2f) -> f32 {\n // triangle wave per axis: 0 at a line, 1 at the cell center.\n let gridUV = 1.0 - abs(fract(g) * 2.0 - 1.0);\n let drawWidth = clamp(vec2f(targetWidth), uvDeriv, vec2f(0.5));\n let lineAA = uvDeriv * 1.5;\n // smoothstep with edge0 > edge1 (Golus) \u2192 a falling edge.\n var grid2 = smoothstep(drawWidth + lineAA, drawWidth - lineAA, gridUV);\n // preserve thin-line intensity where the line is sub-drawWidth.\n grid2 = grid2 * clamp(vec2f(targetWidth) / max(drawWidth, vec2f(1e-6)), vec2f(0.0), vec2f(1.0));\n // Moir\u00E9 suppression: fade toward the average where the cell packs tighter than a pixel.\n grid2 = mix(grid2, vec2f(targetWidth), clamp(uvDeriv * 2.0 - 1.0, vec2f(0.0), vec2f(1.0)));\n return max(grid2.x, grid2.y);\n}\n\n// \u2500\u2500 The 3-stop warm-divergent FACE ramp (FOLD B \u2014 height-keyed, NOT a 2-point mid-park) \u2500\u2500\n// trough (faceLo) \u2192 mid (faceMid) \u2192 crest (faceHi), keyed on rampT = mix(shade, h). All stops\n// are warm hue \u2208 [20,90] (the teal-navy purge clear by construction). Linear-space stops; the\n// fs_main routes the result through the production OETF (FOLD E).\nfn faceRamp(rampT: f32) -> vec3f {\n let s = clamp(rampT, 0.0, 1.0);\n if (s < 0.5) {\n return mix(u.faceLo.rgb, u.faceMid.rgb, s * 2.0);\n }\n return mix(u.faceMid.rgb, u.faceHi.rgb, (s - 0.5) * 2.0);\n}\n\n// Full-screen-triangle (the pilot idiom): NDC corners (-1,-1),(3,-1),(-1,3) cover the\n// viewport from a single 3-vertex draw \u2014 no vertex buffer.\nstruct VSOut {\n @builtin(position) pos: vec4f,\n @location(0) uv: vec2f, // domain [-1,1]\u00B2, aspect-corrected x\n};\n\n@vertex\nfn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {\n var corners = array<vec2f, 3>(\n vec2f(-1.0, -1.0), vec2f(3.0, -1.0), vec2f(-1.0, 3.0),\n );\n let c = corners[vi];\n var out: VSOut;\n out.pos = vec4f(c, 0.0, 1.0);\n out.uv = vec2f(c.x, c.y);\n return out;\n}\n\n@fragment\nfn fs_main(in: VSOut) -> @location(0) vec4f {\n let aspect = max(u.warp2.y, 1e-4);\n // aspect-correct the domain x so the cells read square.\n let uv = vec2f(in.uv.x * aspect, in.uv.y);\n let t = u.u0.x;\n let gridScale = u.u0.y;\n\n // \u00A75 the per-pixel kernel: CELL-TWIST + cursor-swirl the grid coordinate, then two-tier Golus.\n // cellTwist rotates each cell about its OWN center (the boxes twist, the lines stay locally\n // straight \u2014 the C3 cure) gated by a traveling Gaussian crest; cursorSwirl twists the cells\n // about the finger. The Golus dv reads the FINAL twisted coord (the crisp-line fence survives).\n let g0 = uv * gridScale;\n // FOLD A \u2014 the PRE-twist driver: the face samples height/relief at THIS cc (floor(twisted_g)\n // at the crest lights a NEIGHBOUR cell). cellTwist rides the SAME driver, so twist + face fuse.\n let drv = cellDriver(g0, 1.0, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.w);\n let cc = drv.xy;\n 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);\n if (u.cursor2.y > 0.5) {\n // bulgeMode (cursor2.x: +repel / \u2212attract) signs the swirl direction.\n g = cursorSwirl(g, u.cursor.xy, u.cursor.z * u.cursor2.x, u.cursor.w);\n }\n\n // The screen-space derivative of g (Golus): length(vec2(dpdx, dpdy)) per axis. fwidth-class\n // derivative reads the ACTUAL backing-store pixel (NOT fwidthFine \u2014 Compatibility-Mode safe).\n let dv = vec2f(\n length(vec2f(dpdx(g.x), dpdy(g.x))),\n length(vec2f(dpdx(g.y), dpdy(g.y))),\n );\n\n let minor = gridCoverage(g, u.grid.x, dv);\n // The major tier evals at g / majorEvery with its own derivative scaling.\n let me = max(u.u0.w, 1.0);\n let major = gridCoverage(g / me, u.grid.y, dv / me);\n let line = max(minor * u.grid.z, major * u.grid.w);\n\n // \u2500\u2500 The FACE (BD.W-PAPERGRID-FACE) \u2014 height-lit filled cell interior \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // Sample height/relief at the pre-twist driver cc (FOLD A); Lambert the \u2207H slope against the\n // fixed cel key-light; squash the inset so the crest face inflates; multi-stop warm-divergent\n // ramp keyed on mix(shade, h) (FOLD B); the ink through the production OETF (FOLD E).\n let h = cellHeight(cc, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.w);\n let grad = faceRelief(cc, 1.0, t, u.wave.xy, u.wave.z, u.wave.w, u.wave2.x, u.wave2.w);\n let n = normalize(vec3f(-grad * u.face.y, 1.0));\n let shade = clamp(0.5 + dot(n, normalize(vec3f(u.warp2.zw, 1.0))) * 0.5, 0.0, 1.0);\n let inset = u.face.w * (1.0 - u.face.z * h); // squash & stretch\n let face = facePlateau(g, inset, dv);\n let rampT = clamp(shade * 0.5 + h * 0.5, 0.0, 1.0); // FOLD B \u2014 height-keyed crest\n let faceInk = clamp(linearToSrgb(faceRamp(rampT)), vec3f(0.0), vec3f(1.0));\n let faceA = face * u.face.x * u.field.x; // FOLD D \u2014 one field-blend scalar\n\n let col = clamp(linearToSrgb(u.line.rgb), vec3f(0.0), vec3f(1.0));\n let hasBg = u.field.y;\n if (hasBg > 0.5) {\n // opaque ground: the face fills the cell, the ink over the themed bg, the line on top.\n let bg = clamp(linearToSrgb(u.bg.rgb), vec3f(0.0), vec3f(1.0));\n let base = mix(bg, faceInk, faceA);\n let a = line * u.field.x;\n let outRgb = mix(base, col, a);\n return vec4f(outRgb, 1.0);\n }\n // transparent ground: the FACE composites UNDER the line, the SOURCE-OVER operator in\n // PREMULTIPLIED space (the page reads through the gutters). faceAlpha:0 \u2192 faceA=0 \u2192 the face\n // term vanishes \u2192 vec4f(col\u00B7line, line) = byte-identical to the HEAD line-only render.\n let linePremult = (col * line) * u.field.x; // line layer (the FieldAlpha global subtlety)\n let lineA = line * u.field.x;\n let facePremult = faceInk * faceA; // face layer premultiplied (faceA folds field.x)\n let outPremult = linePremult + facePremult * (1.0 - lineA);\n let a = lineA + faceA * (1.0 - lineA);\n return vec4f(outPremult, a); // premultiplied over transparent\n}\n";
@@ -0,0 +1,39 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ /**
3
+ * chipVariants — the ONE congruent chip recipe (BD.W-CHIP-CONGRUENT-GLASS).
4
+ *
5
+ * The chip family (ToggleChip · SelectableChip + the toggle-group children)
6
+ * collapses to ONE `chipVariants({ size })`: a stadium-pill warm-glass LENS that
7
+ * PUNCHES when you pick it. Survival of the fittest — `selectableChipVariants`
8
+ * (`sm`/`md`/`lg`) + the `ToggleChip` `chip`/`cell` axis collapse here (clean
9
+ * break, no alias — the no-legacy law). The three SFCs stay DISTINCT (bool toggle
10
+ * vs tonal picker vs glyph tile) but render the SAME register.
11
+ *
12
+ * The recipe is STRUCTURE + the shared-register hooks: it COMPOSES the read-only
13
+ * shared registers, never re-forks a parallel glass/cartoon/motion system —
14
+ * · `.glass-chip` — the chip-family material/motion layer (the warm idle
15
+ * floor + the `--glass-fill-tint` plate tint + the ONE
16
+ * scale write + the `::after` colour-flood punch).
17
+ * · `.glass-capsule` — the warm-transmissive lozenge BODY (fill + rim +
18
+ * shadow + blur, on `--radius-pill` → the stadium
19
+ * end-cap at every rung). Radius is INVARIANT — the
20
+ * capsule re-rounds itself at every height; no
21
+ * `rounded-*` rung (retires the 4/6/10px grab-bag).
22
+ * · `.glass-capsule-hover`— the SHARED specular-lift + press-snap on hover.
23
+ * · `.accent-tone` — the contrast-floored tonal channels (idle fill /
24
+ * active band / active edge / contrast-safe ink).
25
+ *
26
+ * The geometry: radius invariant (the capsule's `--radius-pill`); only padding/
27
+ * text vary, on a √φ ladder (φ≈1.618). The `cell` is the ONE documented exception
28
+ * (`.glass-chip--cell` → `--radius-card`): a 72px icon+label tile is a CARD, not a
29
+ * pill — a DELIBERATE 2-silhouette family, composing the SAME material + motion.
30
+ *
31
+ * NO scale CVA — the ONE `scale` write lives on `.glass-chip` (hover/press/punch
32
+ * folded into a single source of truth; a CVA `hover:scale-*` would collide).
33
+ * The CVA carries no `color-mix(…--primary…)` literal — the tonal COLOUR is the
34
+ * `.accent-tone` register's.
35
+ */
36
+ export declare const chipVariants: (props?: ({
37
+ size?: "cell" | "sm" | "lg" | "md" | null | undefined;
38
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
39
+ export type ChipVariants = VariantProps<typeof chipVariants>;
@@ -1,23 +1,15 @@
1
- import { type VariantProps } from "class-variance-authority";
2
1
  /**
3
- * SelectableChip — the public face of the BC.W-ACCENT-TONE tonal register: a
4
- * reka-`Toggle` selectable chip that READS `.accent-tone` (idle `--accent-fill`
5
- * floored ≥3:1, active `--accent-band` + `--accent-edge` rim + the contrast-safe
6
- * `--accent-ink` label). A tag/filter/tool picker is ONE element, golden-by-
7
- * construction — the tonal channels are owned by the register, not hand-rolled
8
- * per-state `color-mix(…)`.
2
+ * selectableChipVariants — the public name for the SelectableChip face of the ONE
3
+ * shared `chipVariants` recipe (BD.W-CHIP-CONGRUENT-GLASS).
9
4
  *
10
- * The recipe is STRUCTURE + the register hook: it applies `.accent-tone` (the
11
- * channel mint), the idle/active PAINT (off the register channels), and the size
12
- * axis (the padding/radius/text-size). The tonal COLOUR is the register; this CVA
13
- * carries no `color-mix(…--primary…)` literal (the N-paste the register collapses).
14
- *
15
- * The motion register matches the §6 interactive family (the ToggleChip precedent):
16
- * the SURFACE legs (bg/border/color) ride `--duration-fast`/`--ease-standard`; the
17
- * `scale` TRANSFORM leg rides `--spring-smooth`, so the chip lifts on hover + settles
18
- * on press like every sibling control.
5
+ * The chip family collapsed to ONE congruent stadium-pill warm-glass register
6
+ * (`./chipVariants`). SelectableChip reads it through this stable name; the
7
+ * `size` axis (`sm`/`md`/`lg`/`cell`) IS the shared axis. No second recipe, no
8
+ * grab-bag — the tonal channels are the `.accent-tone` register's, the lens is
9
+ * `.glass-chip` over `.glass-capsule`. Clean break: the prior per-state
10
+ * `color-mix(…--primary…)` literals + the `rounded-sm`/`-md`/`-lg` grab-bag are
11
+ * GONE (no alias — the no-legacy law); this file is the public re-point, not a
12
+ * parallel CVA.
19
13
  */
20
- export declare const selectableChipVariants: (props?: ({
21
- size?: "sm" | "lg" | "md" | null | undefined;
22
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
23
- export type SelectableChipVariants = VariantProps<typeof selectableChipVariants>;
14
+ export { chipVariants as selectableChipVariants } from "./chipVariants";
15
+ export type { ChipVariants as SelectableChipVariants } from "./chipVariants";
@@ -4,15 +4,23 @@
4
4
  * full-width jump reaches the cap and a tiny hop stays near 1. The token is the
5
5
  * authority; this is the no-token floor.
6
6
  *
7
- * BC.W-LIQUID-TAB — lifted 1.08 → 1.15 so a FAST liquid-tab pull visibly swells the
8
- * pill (the gel-squish READS as liquid, glass-dock-codebase.md §3.4) — still capped
9
- * LOW (≤1.2, the anti-taffy-pull bar). The cap is shared by the click travel-squish
10
- * AND the drag pull-morph (the SOLE cap source — the constant + the token in
11
- * lockstep, never a fork); the volume-preserving reciprocal pairing
12
- * (`scale: var(--stretch) calc(1/var(--stretch))`) is unchanged — only the magnitude
13
- * lifts.
7
+ * BD.W-TABS-LIQUID — re-tuned 1.18 → 1.11. The `--tab-blob` area-inflation channel now
8
+ * carries the 5-beat "grow"/overshoot, so the per-axis travel-squish cap drops: the FENCE
9
+ * is the COMPOSED visible bbox area (`blob × stretch`) ≤ ~1.14, NOT the bare per-axis
10
+ * scalar. The cap is shared by the click travel-squish AND the drag pull-morph (the SOLE
11
+ * cap source — the constant + the token in lockstep, never a fork); the volume-preserving
12
+ * reciprocal pairing (`scale: var(--stretch) calc(1/var(--stretch))`) is unchanged.
14
13
  */
15
- export declare const DEFAULT_INDICATOR_MAX_STRETCH = 1.15;
14
+ export declare const DEFAULT_INDICATOR_MAX_STRETCH = 1.11;
15
+ /**
16
+ * BD.W-TABS-LIQUID — fallback for `--tab-indicator-blob-max` when the cascade leaves it
17
+ * unset: the 5-beat blob's area-inflation overshoot peak. The 2nd `useLiquidFlex` channel
18
+ * drives `--tab-blob` toward this on the grow-overshoot beat, then de-inflates to 1 at
19
+ * arrival (shrink-to-fit). Kept LOW (~1.045) so the COMPOSED bbox area (`blob × stretch` ≈
20
+ * blob², the squish being volume-preserving) clears the ≤ ~1.14 anti-taffy fence. The
21
+ * token is the authority; this is the no-token floor (the SOLE blob-cap source).
22
+ */
23
+ export declare const DEFAULT_INDICATOR_BLOB_MAX = 1.045;
16
24
  /**
17
25
  * The travel-progress fraction at which the squish RELEASES — the Material
18
26
  * "grow then shrink" close, keyed to ARRIVAL (BA.W-TABS). The squish opens with
@@ -7,6 +7,22 @@
7
7
  *
8
8
  * AA.A4 §S-16 — the `aria-valuenow` binding coerces `Number(modelValue ?? 0)`
9
9
  * so a numeric attribute always renders (axe `aria-required-attr` regression).
10
+ *
11
+ * BD.W-TIMELINE-RAIL-UNIFY (LEG 2) — the head is RE-INVENTED as a warm-glass
12
+ * liquid lozenge. The four cartoon beats COMPOSE shipped engines only (no new
13
+ * motion engine): travel rides a `useSpring`/SpringProgress position written
14
+ * to `transform: translateX()` (NEVER `style.left` — Safari composites
15
+ * transform, not left); `useLiquidFlex` `"tanh"` velocity-squish multiplies
16
+ * into the SAME matrix (vol-preserving, cap ≤1.12); `useSpringPress` grab
17
+ * anticipation; the velocity term is the head spring's own derivative (the
18
+ * self-extinguishing per-frame velocity SpringProgress already computes — the
19
+ * GOLDEN §0 "drive off the spring derivative" path, no free-running rAF); the
20
+ * fill LAGS the head on a slower spring clock; release settles ζ<1 on the
21
+ * cartoon-punch clock; a one-shot accent-flood ripples on landing. Always
22
+ * visible (the
23
+ * `opacity:0`-until-hover is RETIRED — the affordance must be present during
24
+ * keyboard/touch scrub). The bead seats φ-INSIDE the channel; the 44px touch
25
+ * target is an invisible `::before` halo, decoupled from the visible bead.
10
26
  */
11
27
  type __VLS_Props = {
12
28
  /** 0..1 scrubber position. */
@@ -16,14 +16,6 @@
16
16
  */
17
17
  import { type ComputedRef, type Ref } from "vue";
18
18
  import type { TimelineSegment } from "./types";
19
- /**
20
- * Resolve a segment's gradient declaration to a CSS background expression.
21
- * - `string` (raw CSS): consumed verbatim — caller controls direction.
22
- * - `{from, to}` pair: expanded to `linear-gradient(90deg, from, to)`.
23
- * - undefined: falls through to the `--timeline-segment-default-gradient`
24
- * token (consumer can override on the primitive or via a section-tone).
25
- */
26
- export declare function gradientFor(seg: TimelineSegment): string;
27
19
  /**
28
20
  * Fill percentage per state. Explicit `progress` wins; otherwise the
29
21
  * canonical mapping (pending=0, active=0.5, completed=1). Clamped to