@mkbabb/glass-ui 3.13.0 → 4.0.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 (304) hide show
  1. package/dist/CardAction-XH4YBVEK.js +158 -0
  2. package/dist/{CommandShortcut-RowNEO6i.js → CommandShortcut-DdtWXxOK.js} +57 -52
  3. package/dist/{ContextMenuSubContent-BQmxTAdw.js → ContextMenuSubContent-B0Vs6atR.js} +1 -1
  4. package/dist/{DataTable-BCddn3T3.js → DataTable-C464Zbqd.js} +99 -97
  5. package/dist/DialogContent-DDE6pQBU.js +103 -0
  6. package/dist/{DialogFooter-Blu4t7tJ.js → DialogFooter-8eZbdmPc.js} +1 -1
  7. package/dist/FadingScroll-DwNnvKMs.js +76 -0
  8. package/dist/{HoverPopover-CISOJQuZ.js → HoverPopover-Dpzwvc4t.js} +1 -1
  9. package/dist/IconChip-BDw1j5mu.js +54 -0
  10. package/dist/{MetricBadge-C9QMz1KT.js → MetricBadge-BpC0R_Ec.js} +1 -1
  11. package/dist/{Notification-DdwNxIrI.js → Notification-DKjKsQq8.js} +8 -8
  12. package/dist/{NumberFieldContent-CqaN-SvN.js → NumberFieldContent-1VtwDSgf.js} +1 -1
  13. package/dist/PopoverContent-BTorlp--.js +127 -0
  14. package/dist/{Progress-DwlUKGbr.js → Progress-hAT4gqGH.js} +97 -77
  15. package/dist/{ScrollingText-DfFrwSph.js → ScrollingText-CUVFTWk2.js} +2 -2
  16. package/dist/{SelectScrollDownButton-CiDUxfEj.js → SelectScrollDownButton-C1jb3b3K.js} +22 -6
  17. package/dist/{Switch-CsIuYP_e.js → Switch-Dr--uLGH.js} +1 -1
  18. package/dist/{Toaster-D6q4HtXu.js → Toaster-Bm_HQSpc.js} +6 -6
  19. package/dist/{ToggleGroupItem-D_AHlRw9.js → ToggleGroupItem-Dzk9hWsF.js} +1 -1
  20. package/dist/animated-digit.js +2 -2
  21. package/dist/api/index.d.ts +8 -5
  22. package/dist/api.js +2 -2
  23. package/dist/aurora.js +132 -117
  24. package/dist/{button-ChXMfsud.js → button-BNDWhAZb.js} +2 -2
  25. package/dist/button.js +1 -1
  26. package/dist/card.js +1 -1
  27. package/dist/carousel.d.ts +1 -1
  28. package/dist/carousel.js +97 -141
  29. package/dist/collapsible.js +1 -1
  30. package/dist/color-swatch.d.ts +1 -0
  31. package/dist/color-swatch.js +47 -0
  32. package/dist/color.js +1 -1
  33. package/dist/command.js +1 -1
  34. package/dist/components/custom/aurora/constants/presets.d.ts +28 -0
  35. package/dist/components/custom/aurora/constants/renderMode.d.ts +2 -0
  36. package/dist/components/custom/aurora/index.d.ts +1 -1
  37. package/dist/components/custom/color-swatch/ColorSwatch.vue.d.ts +22 -0
  38. package/dist/components/custom/color-swatch/index.d.ts +1 -0
  39. package/dist/components/custom/configurator/Configurator.vue.d.ts +19 -8
  40. package/dist/components/custom/constellation/Constellation.vue.d.ts +18 -206
  41. package/dist/components/custom/constellation/composables/useConstellation.d.ts +26 -0
  42. package/dist/components/custom/constellation/constellationField.d.ts +2 -369
  43. package/dist/components/custom/constellation/constellationTypes.d.ts +369 -0
  44. package/dist/components/custom/constellation/index.d.ts +1 -1
  45. package/dist/components/custom/dock/DockRail.vue.d.ts +17 -16
  46. package/dist/components/custom/dock/DockSection.vue.d.ts +69 -0
  47. package/dist/components/custom/dock/DockSeparator.vue.d.ts +49 -1
  48. package/dist/components/custom/dock/DockTabButton.vue.d.ts +5 -5
  49. package/dist/components/custom/dock/constants.d.ts +35 -0
  50. package/dist/components/custom/dock/index.d.ts +2 -0
  51. package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +10 -0
  52. package/dist/components/custom/fading-scroll/FadingScroll.vue.d.ts +25 -0
  53. package/dist/components/custom/fading-scroll/composables/useFadingScroll.d.ts +31 -0
  54. package/dist/components/custom/fading-scroll/constants.d.ts +19 -0
  55. package/dist/components/custom/fading-scroll/index.d.ts +2 -0
  56. package/dist/components/custom/fourier-field/FourierField.vue.d.ts +7 -0
  57. package/dist/components/custom/fourier-field/index.d.ts +1 -1
  58. package/dist/components/custom/fourier-field/math.d.ts +17 -0
  59. package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +8 -0
  60. package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +11 -1
  61. package/dist/components/custom/goo-blob/constants.d.ts +6 -1
  62. package/dist/components/custom/handmark/HandMark.vue.d.ts +29 -0
  63. package/dist/components/custom/handmark/brush.d.ts +269 -0
  64. package/dist/components/custom/handmark/composables/useHandMark.d.ts +89 -0
  65. package/dist/components/custom/handmark/constants.d.ts +39 -0
  66. package/dist/components/custom/handmark/freehand.d.ts +69 -0
  67. package/dist/components/custom/handmark/geometry.d.ts +52 -0
  68. package/dist/components/custom/handmark/index.d.ts +27 -0
  69. package/dist/components/custom/handmark/ink.d.ts +11 -0
  70. package/dist/components/custom/handmark/texture.d.ts +39 -0
  71. package/dist/components/custom/handmark/types.d.ts +62 -0
  72. package/dist/components/custom/icon-chip/IconChip.vue.d.ts +4 -0
  73. package/dist/components/custom/icon-chip/index.d.ts +2 -0
  74. package/dist/components/custom/icon-chip/types.d.ts +72 -0
  75. package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +15 -2
  76. package/dist/components/custom/pager-dots/PagerDots.vue.d.ts +39 -0
  77. package/dist/components/custom/pager-dots/index.d.ts +2 -0
  78. package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +20 -25
  79. package/dist/components/custom/tabs/composables/useTabIndicator.d.ts +30 -21
  80. package/dist/components/custom/tabs/constants.d.ts +9 -3
  81. package/dist/components/custom/tabs/index.d.ts +1 -1
  82. package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +14 -0
  83. package/dist/components/ui/_shared/index.d.ts +2 -0
  84. package/dist/components/ui/_shared/menuItemVariants.d.ts +19 -0
  85. package/dist/components/ui/_shared/useSurfaceAxis.d.ts +41 -0
  86. package/dist/components/ui/card/Card.vue.d.ts +1 -1
  87. package/dist/components/ui/carousel/index.d.ts +0 -1
  88. package/dist/components/ui/command/Command.vue.d.ts +3 -0
  89. package/dist/components/ui/dialog/DialogContent.vue.d.ts +8 -3
  90. package/dist/components/ui/drawer/DrawerContent.vue.d.ts +5 -0
  91. package/dist/components/ui/index.d.ts +0 -1
  92. package/dist/components/ui/popover/PopoverContent.vue.d.ts +3 -0
  93. package/dist/components/ui/progress/ProgressSectioned.vue.d.ts +14 -3
  94. package/dist/components/ui/select/SelectTrigger.vue.d.ts +27 -4
  95. package/dist/components/ui/sheet/SheetContent.vue.d.ts +6 -0
  96. package/dist/components/ui/skeleton/Skeleton.vue.d.ts +3 -0
  97. package/dist/composables/dark/index.d.ts +1 -1
  98. package/dist/composables/dark/useGlobalDark.d.ts +23 -1
  99. package/dist/composables/motion/useViewTransition.d.ts +36 -1
  100. package/dist/configurator.js +1 -1
  101. package/dist/confirm-dialog.js +2 -2
  102. package/dist/constellation.js +92 -94
  103. package/dist/context-menu.js +2 -2
  104. package/dist/controls.js +10 -4
  105. package/dist/dark.d.ts +1 -1
  106. package/dist/dark.js +1 -1
  107. package/dist/data-table.js +1 -1
  108. package/dist/dialog.js +2 -2
  109. package/dist/dock.js +510 -321
  110. package/dist/{dockContext-BegmJVmx.js → dockContext-Bu1Avy-a.js} +1 -1
  111. package/dist/dom.js +5 -5
  112. package/dist/{dropdown-menu-DzkkyBwX.js → dropdown-menu-BJ7E9js_.js} +2 -2
  113. package/dist/dropdown-menu.js +1 -1
  114. package/dist/expandable-container.js +42 -38
  115. package/dist/fading-scroll.d.ts +1 -0
  116. package/dist/fading-scroll.js +2 -0
  117. package/dist/forms.js +3 -3
  118. package/dist/fourier-field.js +38 -37
  119. package/dist/fourier-math.js +2 -2
  120. package/dist/glass-panel.js +39 -36
  121. package/dist/glass-ui.css +1 -1
  122. package/dist/glass-ui.js +129 -145
  123. package/dist/goo-blob.js +86 -81
  124. package/dist/handmark.d.ts +1 -0
  125. package/dist/handmark.js +707 -0
  126. package/dist/header-ribbon.js +1 -1
  127. package/dist/hover-card.js +1 -1
  128. package/dist/hover-popover.js +1 -1
  129. package/dist/icon-chip.d.ts +1 -0
  130. package/dist/icon-chip.js +2 -0
  131. package/dist/icon-tooltip.js +1 -1
  132. package/dist/index.d.ts +2 -2
  133. package/dist/keyboard.js +1 -1
  134. package/dist/label.js +1 -1
  135. package/dist/labeled-field.js +6 -6
  136. package/dist/{math-U6-RrLmV.js → math-DeuJwLFx.js} +11 -3
  137. package/dist/{menuItemVariants-DPiEarb0.js → menuItemVariants-DWRQXBxJ.js} +10 -4
  138. package/dist/metric-badge.js +1 -1
  139. package/dist/metric-cell.js +25 -22
  140. package/dist/metric-stack.js +1 -1
  141. package/dist/motion-core.js +33 -32
  142. package/dist/motion-curves.js +1 -1
  143. package/dist/motion.js +4 -4
  144. package/dist/notification.js +1 -1
  145. package/dist/number-field.js +1 -1
  146. package/dist/pager-dots.d.ts +1 -0
  147. package/dist/pager-dots.js +91 -0
  148. package/dist/paper-backdrop.js +1 -1
  149. package/dist/popover.js +1 -1
  150. package/dist/{presets-BKVyQfbt.js → presets-BW2b-fr1.js} +14 -1
  151. package/dist/progress.js +1 -1
  152. package/dist/pulse.js +1 -1
  153. package/dist/reactive.js +2 -2
  154. package/dist/scrolling-text.js +1 -1
  155. package/dist/search.js +5 -5
  156. package/dist/select.js +3 -3
  157. package/dist/separator.js +1 -1
  158. package/dist/{sheet-1fChZjtw.js → sheet-CquRYOAw.js} +59 -55
  159. package/dist/sheet.js +1 -1
  160. package/dist/{slider-B-JP2JlI.js → slider-DQ95MET2.js} +7 -7
  161. package/dist/slider.js +1 -1
  162. package/dist/sortable-list.js +3 -3
  163. package/dist/styles/animations.css +11 -26
  164. package/dist/styles/components.css +1 -1
  165. package/dist/styles/configurator.css +35 -0
  166. package/dist/styles/dock/density.css +19 -0
  167. package/dist/styles/dock/overflow.css +15 -0
  168. package/dist/styles/dock/rail-extend.css +168 -71
  169. package/dist/styles/dock/section.css +59 -0
  170. package/dist/styles/dock/shell.css +34 -5
  171. package/dist/styles/dock-controls/icon-button.css +11 -1
  172. package/dist/styles/dock-controls/tab-button.css +24 -83
  173. package/dist/styles/dock-controls/triggers.css +7 -0
  174. package/dist/styles/dock.css +6 -3
  175. package/dist/styles/drawer.css +46 -0
  176. package/dist/styles/feedback-tone.css +104 -0
  177. package/dist/styles/glass/ladder.css +68 -22
  178. package/dist/styles/glass/surface-axis.css +113 -0
  179. package/dist/styles/glass/surfaces.css +88 -12
  180. package/dist/styles/glass.css +5 -2
  181. package/dist/styles/icon-chip.css +149 -0
  182. package/dist/styles/index.css +67 -5
  183. package/dist/styles/instrument-chassis.css +42 -0
  184. package/dist/styles/menu.css +127 -0
  185. package/dist/styles/segmented-tabs.css +160 -89
  186. package/dist/styles/select.css +50 -0
  187. package/dist/styles/theme/bridges.css +11 -1
  188. package/dist/styles/tokens/color-radius.css +40 -13
  189. package/dist/styles/tokens/dark-arm.css +124 -16
  190. package/dist/styles/tokens/glass.css +83 -23
  191. package/dist/styles/tokens/light-dark.css +48 -19
  192. package/dist/styles/tokens/offsets-sizing.css +62 -0
  193. package/dist/styles/tokens/property-regs.css +3 -10
  194. package/dist/styles/tokens/scale-paper.css +45 -2
  195. package/dist/styles/tokens/scheme-motion.css +32 -14
  196. package/dist/styles/transitions.css +7 -7
  197. package/dist/styles/typography/scale.css +153 -0
  198. package/dist/styles/typography/semantic.css +220 -0
  199. package/dist/styles/typography/utilities.css +159 -0
  200. package/dist/styles/typography.css +23 -507
  201. package/dist/styles/utilities/a11y-overrides.css +33 -4
  202. package/dist/styles/utilities/base.css +177 -1
  203. package/dist/styles/utilities/btn.css +18 -201
  204. package/dist/styles/view-transition.css +4 -1
  205. package/dist/switch.js +1 -1
  206. package/dist/tabs.js +154 -183
  207. package/dist/timeline.js +2 -2
  208. package/dist/toast.js +1 -1
  209. package/dist/toggle-chip.js +3 -1
  210. package/dist/toggle-group.js +1 -1
  211. package/dist/typewriter.js +1 -1
  212. package/dist/{useAnimatedNumber-C5I3wWd8.js → useAnimatedNumber-C_3wZLx4.js} +1 -1
  213. package/dist/useConfiguratorState-kiIlun8I.js +303 -0
  214. package/dist/{useGlobalDark-yhL4Wp-s.js → useGlobalDark-C28t0VWJ.js} +22 -3
  215. package/dist/{useRAFLoop-Bxv0o6L5.js → useRAFLoop-CdwJ7284.js} +1 -1
  216. package/dist/{useSpringMount-CI2jOstM.js → useSpringMount-CvopqiFr.js} +1 -1
  217. package/dist/useSurfaceAxis-CMnF2zHb.js +7 -0
  218. package/dist/{useTouchGate-Dg7MQI1G.js → useTouchGate-28Tk2-t2.js} +1 -1
  219. package/dist/{vReveal-CqaCz_mC.js → useViewTransition-COsPjQVZ.js} +15 -12
  220. package/dist/vReveal-D9k0jADx.js +10 -0
  221. package/dist/watercolor-dot.js +12 -5
  222. package/package.json +71 -7
  223. package/src/styles/animations.css +11 -26
  224. package/src/styles/configurator.css +35 -0
  225. package/src/styles/dock/density.css +19 -0
  226. package/src/styles/dock/overflow.css +15 -0
  227. package/src/styles/dock/rail-extend.css +168 -71
  228. package/src/styles/dock/section.css +59 -0
  229. package/src/styles/dock/shell.css +34 -5
  230. package/src/styles/dock-controls/icon-button.css +11 -1
  231. package/src/styles/dock-controls/tab-button.css +24 -83
  232. package/src/styles/dock-controls/triggers.css +7 -0
  233. package/src/styles/dock.css +6 -3
  234. package/src/styles/drawer.css +42 -0
  235. package/src/styles/feedback-tone.css +104 -0
  236. package/src/styles/glass/ladder.css +68 -22
  237. package/src/styles/glass/surface-axis.css +113 -0
  238. package/src/styles/glass/surfaces.css +88 -12
  239. package/src/styles/glass.css +5 -2
  240. package/src/styles/icon-chip.css +149 -0
  241. package/src/styles/index.css +66 -4
  242. package/src/styles/instrument-chassis.css +42 -0
  243. package/src/styles/menu.css +127 -0
  244. package/src/styles/segmented-tabs.css +156 -87
  245. package/src/styles/select.css +50 -0
  246. package/src/styles/theme/bridges.css +11 -1
  247. package/src/styles/tokens/color-radius.css +40 -13
  248. package/src/styles/tokens/dark-arm.css +124 -16
  249. package/src/styles/tokens/glass.css +83 -23
  250. package/src/styles/tokens/light-dark.css +48 -19
  251. package/src/styles/tokens/offsets-sizing.css +62 -0
  252. package/src/styles/tokens/property-regs.css +3 -10
  253. package/src/styles/tokens/scale-paper.css +45 -2
  254. package/src/styles/tokens/scheme-motion.css +32 -14
  255. package/src/styles/transitions.css +7 -7
  256. package/src/styles/typography/scale.css +153 -0
  257. package/src/styles/typography/semantic.css +220 -0
  258. package/src/styles/typography/utilities.css +159 -0
  259. package/src/styles/typography.css +23 -507
  260. package/src/styles/utilities/a11y-overrides.css +33 -4
  261. package/src/styles/utilities/base.css +177 -1
  262. package/src/styles/utilities/btn.css +18 -201
  263. package/src/styles/view-transition.css +4 -1
  264. package/dist/CardAction-Cj2eycQ2.js +0 -157
  265. package/dist/DialogContent-Dl9WkAoS.js +0 -100
  266. package/dist/PopoverContent-BYwt2-4x.js +0 -121
  267. package/dist/TabsList-Dttss653.js +0 -105
  268. package/dist/components/custom/underline/GlassUnderline.vue.d.ts +0 -84
  269. package/dist/components/custom/underline/index.d.ts +0 -2
  270. package/dist/components/custom/underline/types.d.ts +0 -56
  271. package/dist/components/ui/carousel/CarouselDots.vue.d.ts +0 -4
  272. package/dist/underline.d.ts +0 -1
  273. package/dist/underline.js +0 -85
  274. package/dist/useConfiguratorState-DAoeHVue.js +0 -287
  275. /package/dist/{CollapsibleContent-CP9qF1v4.js → CollapsibleContent-C_s6fG7r.js} +0 -0
  276. /package/dist/{ContextMenuContent-CT3AS1WX.js → ContextMenuContent-ON3x7cuk.js} +0 -0
  277. /package/dist/{HoverCardContent-Csywg3YF.js → HoverCardContent-DkMaQzH5.js} +0 -0
  278. /package/dist/{IconTooltip-DPzE09X9.js → IconTooltip-DSjasZIt.js} +0 -0
  279. /package/dist/{Input-DWQQIOC4.js → Input-DVG_J0ne.js} +0 -0
  280. /package/dist/{Label-r3WzWrsj.js → Label-Ck9SWEKM.js} +0 -0
  281. /package/dist/{ModalOverlay-DVLI2VRr.js → ModalOverlay-CkPRRgl_.js} +0 -0
  282. /package/dist/{PaperBackdrop-DIXTtVq6.js → PaperBackdrop-nBKe0vkB.js} +0 -0
  283. /package/dist/{SelectGroup-aumMgWLs.js → SelectGroup-Dcczq44n.js} +0 -0
  284. /package/dist/{SelectSeparator-BQ_1Fcbp.js → SelectSeparator-DK2y1Bun.js} +0 -0
  285. /package/dist/{Separator-0JE6LtNu.js → Separator-BArl4OaB.js} +0 -0
  286. /package/dist/{_plugin-vue_export-helper-ok8pgSl5.js → _plugin-vue_export-helper-CBt_VvXa.js} +0 -0
  287. /package/dist/{color-CUYeFbgd.js → color-DweYl7pE.js} +0 -0
  288. /package/dist/{compile-B7NGOBcP.js → compile-EXXzEr1q.js} +0 -0
  289. /package/dist/{constants-CS75AWHG.js → constants-BPOqYJAm.js} +0 -0
  290. /package/dist/{createContext-BM46COQ-.js → createContext-B2RaZ-b8.js} +0 -0
  291. /package/dist/{prng-D27-B3tK.js → prng-Cg22zv8g.js} +0 -0
  292. /package/dist/{springPresets--YdWTHtm.js → springPresets-WXaLbu8u.js} +0 -0
  293. /package/dist/{useIntersectionPause-Cc-H9ees.js → useIntersectionPause-Bj4sPkMh.js} +0 -0
  294. /package/dist/{useInterval-iHludrxk.js → useInterval-CNdua40W.js} +0 -0
  295. /package/dist/{useKeyboardShortcuts-Be3w_Rwk.js → useKeyboardShortcuts-BXWXOZ-9.js} +0 -0
  296. /package/dist/{useLiquidFlex-BL0lLLN2.js → useLiquidFlex-C12hXwOZ.js} +0 -0
  297. /package/dist/{useResizeObserver-BhgdhOIj.js → useResizeObserver-V6nq5gJb.js} +0 -0
  298. /package/dist/{useResolveTokenColor-Dvn2RZJW.js → useResolveTokenColor-NUG2zYAW.js} +0 -0
  299. /package/dist/{useScrollProgress-Dlvx-L3v.js → useScrollProgress-D7bYU2RK.js} +0 -0
  300. /package/dist/{useSortable-muI29agz.js → useSortable-BVqlJRBR.js} +0 -0
  301. /package/dist/{useTextHighlight-DmRYkOBx.js → useTextHighlight-NmBM5V_4.js} +0 -0
  302. /package/dist/{useTimer-Dzarvzuk.js → useTimer-B_PAasDL.js} +0 -0
  303. /package/dist/{useUserInvalidAria-B2h6jAM_.js → useUserInvalidAria-CDfJuakL.js} +0 -0
  304. /package/dist/{useViewportReady-B40FK4Pa.js → useViewportReady-CvBcCYDf.js} +0 -0
@@ -1,373 +1,6 @@
1
1
  export { BASE_WIDTH } from "./constants";
2
- export interface ConstellationNode {
3
- x: number;
4
- y: number;
5
- vx: number;
6
- vy: number;
7
- r: number;
8
- dim: boolean;
9
- }
10
- export interface ConstellationRipple {
11
- x: number;
12
- y: number;
13
- /** `performance.now()` at first draw; -1 until stamped. */
14
- start: number;
15
- }
16
- /** The pointer position in canvas-local CSS px (`-1` = inactive). */
17
- export interface ConstellationPointer {
18
- x: number;
19
- y: number;
20
- }
21
- /**
22
- * The neutral palette + legibility weights resolved off the canvas custom
23
- * properties (the FULL `--constellation-*` set — AX.W17). `node`/`nodeDim`/
24
- * `line` are the colors; `edgeAlpha`/`edgeFocusAlpha`/`alpha` are the per-mode
25
- * legibility multipliers (replacing the `0.17`/`0.24` magic literals).
26
- */
27
- export interface ConstellationPalette {
28
- node: string;
29
- nodeDim: string;
30
- line: string;
31
- /** The hairline-edge alpha multiplier (was the `0.17` literal). */
32
- edgeAlpha: number;
33
- /** The focus-proximity edge multiplier (consumer skins may read it). */
34
- edgeFocusAlpha: number;
35
- /** The field-yields-to-type translucency knob (the global field dimmer). */
36
- alpha: number;
37
- /**
38
- * The ACCENT-edge skin tint (AZ.W-CON-GEN G3) — the flagged-node EDGE color the
39
- * optional `drawEdges(…, accentIndex)` pass strokes for edges incident on the
40
- * accented node. Reads `--constellation-accent` (the consumer-preset boundary —
41
- * the library ships a neutral default; a consumer aliases it to its brand hue).
42
- */
43
- accent: string;
44
- /**
45
- * The neutral-edge alpha FLOOR (AZ.W-CON-GEN G3) — added to a distance-faded
46
- * neutral hairline's alpha so it clears the perceptual/sampling floor across its
47
- * full length on a bright ground (the "web doesn't read in light mode" fix).
48
- * Default `0` is byte-identical (no floor). Reads `--constellation-edge-floor`.
49
- */
50
- edgeFloor: number;
51
- /**
52
- * The ACCENT-incident edge alpha multiplier (AZ.W-CON-GEN G3) — the per-mode
53
- * weight for an edge touching the accented node. Reads
54
- * `--constellation-edge-accent-alpha`; the accented edges read a touch louder
55
- * than the neutral lattice (the flagged-node tether).
56
- */
57
- edgeAccentAlpha: number;
58
- }
59
- /**
60
- * The per-axis critically-damped warp spring on the focal node (AX.W17). The
61
- * focal mark's position is `(x, y)`; `vx`/`vy` its velocity; `targetIdx` the
62
- * LIVE node index it chases (re-read each frame so it tracks a DRIFTING target,
63
- * not a frozen click-time snapshot). `-1` = no active warp (the focal mark
64
- * rides its node's drift directly — the identity-ride at settle).
65
- */
66
- export interface ConstellationWarp {
67
- x: number;
68
- y: number;
69
- vx: number;
70
- vy: number;
71
- /** The chased node's INDEX (live target), or -1 when inactive. */
72
- targetIdx: number;
73
- }
74
- /**
75
- * The auto-DRIFT target-source (AY.W-CON1 — the 2nd half of the AX.W17 "drift +
76
- * warp are ONE mechanic" thesis). The warp re-points its focal node to a
77
- * periodically-chosen RANDOM node on a jittered cadence: the SAME warp spring,
78
- * a different target-PICKER (a click for warp, this cadence for drift). No new
79
- * rAF, no second mechanic — `stepField` steps this cadence inline, re-pointing
80
- * `setWarpTarget` to a picked node only when the spring has SETTLED (so a
81
- * click-warp in flight always pre-empts the cadence). PRM is enforced by the
82
- * CALLER (the component does not advance the cadence under reduced-motion — the
83
- * `stepField` call lives inside the `!reducedMotion` block — so the focal mark
84
- * stays at its seed: the WARP precedent, NOT fire-but-freeze).
85
- */
86
- export interface ConstellationWander {
87
- /** ms timestamp of the next auto re-target; -1 until armed on the first stepped frame. */
88
- nextAt: number;
89
- /** the minimum idle (ms) between auto re-targets. */
90
- minIdle: number;
91
- /** the random extra idle (ms) added per cadence (so the rhythm is not metronomic). */
92
- jitter: number;
93
- }
94
- /**
95
- * The autonomous PINNED-ANCHOR drift state (AZ.W-CON-GEN G5) — the gentle wander of
96
- * the PINNED node (`field.pinnedIndex`) around its seeded ANCHOR. DISTINCT from
97
- * `wander` (which re-targets the WARP spring among random nodes): this eases ONE
98
- * designated node a small fraction around its rest position on a jittered cadence,
99
- * so a flagged point breathes its neighborhood without leaving the dead-space it was
100
- * anchored in. Stepped inside `stepField` (no second rAF) via a closed-form
101
- * easeInOutQuad over `now` — no integrator. Absent (`undefined`) → `stepField` skips
102
- * the block (byte-identical to HEAD).
103
- */
104
- export interface ConstellationPinnedDrift {
105
- /** The anchor (the pinned node's rest position) the drift eases around (px). */
106
- anchorX: number;
107
- anchorY: number;
108
- /** ms timestamp of the next leg; -1 until armed on the first stepped frame. */
109
- nextAt: number;
110
- /** ms timestamp the current leg started; -1 between legs (resting at the anchor). */
111
- legStart: number;
112
- /** the current leg's from/to (px) — the eased segment endpoints. */
113
- fromX: number;
114
- fromY: number;
115
- toX: number;
116
- toY: number;
117
- /** the ± fraction of the canvas the drift wanders around the anchor. */
118
- wanderFrac: number;
119
- /** the per-leg easeInOutQuad duration (ms). */
120
- durMs: number;
121
- /** the minimum rest (ms) between legs. */
122
- minIdle: number;
123
- /** the random extra rest (ms) per leg (so the rhythm is not metronomic). */
124
- jitter: number;
125
- }
126
- /**
127
- * The warp-spring tuning the integrator reads (AY.W-CON2). Tokenised numeric (the
128
- * `--constellation-warp-*` cohort) so a consumer retunes the warp WITHOUT editing
129
- * src — read ONCE on mount via `parseFloat`, threaded onto the field.
130
- *
131
- * `response` is the keyframes.js `(response, dampingFraction)` model's ANGULAR
132
- * PERIOD (the SwiftUI `.spring(response:)` axis): `ω₀ = 2π/response`. It is NOT a
133
- * settle-duration — at ζ=1 the 2%-settle lands at `t₂ ≈ 5.83/ω₀ ≈ 0.93·response`
134
- * (the `(1 + ω₀t)e^(−ω₀t)` critically-damped envelope). Documented here + in the
135
- * `--constellation-warp-response` token comment so the token semantics are honest
136
- * at ANY ζ (the AY.W-CON2 ω-reconcile; the engine keeps the keyframes.js convention,
137
- * mints NO second ω formula).
138
- */
139
- export interface ConstellationWarpConfig {
140
- /** keyframes.js angular period (s) — `ω₀ = 2π/response`, NOT a settle-duration. */
141
- response: number;
142
- /** damping ratio ζ — 1 critically damped (a focal mark must NOT ring). */
143
- zeta: number;
144
- }
145
- /**
146
- * The gravity-well tuning (AY.W-CON2). The held-pointer pull is an inverse-square
147
- * force composed into `stepField` (no new rAF). Tokenised numeric (the
148
- * `--constellation-well-*` cohort) so a consumer retunes the well WITHOUT editing
149
- * src. All distances are base-width px (`k`-scaled at step time).
150
- */
151
- export interface ConstellationWellConfig {
152
- /** the inverse-square pull gain (the force scale at unit distance). */
153
- gain: number;
154
- /** the reach (base-width px) — nodes beyond it are untouched (the O(within-reach) cost floor). */
155
- reach: number;
156
- /**
157
- * the ARM ramp rate (1/s) — `strength` eases toward `target = 1` at this rate
158
- * while HELD (the gentle bloom the token tunes). The RELEASE is NOT this rate:
159
- * it is the fixed brisk {@link WELL_RELEASE_RAMP} (the field-cools invariant —
160
- * not consumer-tunable, F8.2). A consumer slowing this token slows the ARM
161
- * bloom only; the release stays brisk so the cool gate holds.
162
- */
163
- ramp: number;
164
- /** the per-node speed cap (base-width px/frame) — the no-slingshot clamp. */
165
- maxSpeed: number;
166
- /** the singularity floor (px) — a node AT the cursor gets a bounded pull, never `∞`. */
167
- soften: number;
168
- /** ms the pointer is held before the well arms. */
169
- holdMs: number;
170
- }
171
- /**
172
- * The gravity-well live STATE (AY.W-CON2). `(x, y)` is the held pointer in
173
- * canvas-local px (`-1` = inactive); `strength` is the eased pull 0→1 (ramps to
174
- * `target` at `cfg.ramp`/s); `target` is the strength the ramp eases toward (1
175
- * while held, 0 on release). A transient force — the field renormalises back to
176
- * `speed` after release (the field-cools invariant).
177
- */
178
- export interface ConstellationWell {
179
- /** canvas-local px of the held pointer; `-1` = inactive. */
180
- x: number;
181
- y: number;
182
- /** the eased pull strength 0→1 (ramps to `target` at `cfg.ramp`/s). */
183
- strength: number;
184
- /** the strength the ramp is easing toward: 1 while held, 0 on release. */
185
- target: number;
186
- /** the well tuning (gain/reach/ramp/maxSpeed/soften). */
187
- cfg: ConstellationWellConfig;
188
- }
189
- /**
190
- * The field state the component exposes to its `drawOverlay` consumer so a
191
- * skin can pin itself to a real field node. `k` is the `width / BASE_WIDTH`
192
- * scale, `dpr` the device-pixel ratio applied by the substrate.
193
- *
194
- * The focal node (AX.W17) is a FIRST-CLASS library concept: `focalIndex` names
195
- * which node is focal (consumer-owned via `warpTo`), and the engine OWNS its
196
- * position via the `warp` spring stepped inside `stepField`. A `drawOverlay`
197
- * paints the focal mark at `field.warp.{x,y}` (the spring-eased position) —
198
- * node-position mutation `drawOverlay` structurally cannot express, resolved by
199
- * ONE first-class concept (warp + drift unify; no second parallel hook).
200
- */
201
- export interface ConstellationField {
202
- nodes: ConstellationNode[];
203
- /** The host canvas — for `getComputedStyle` token reads in an overlay. */
204
- canvas: HTMLCanvasElement | null;
205
- w: number;
206
- h: number;
207
- k: number;
208
- dpr: number;
209
- /** R5-8 — SIZES draw at `kVisOf(field)`; TRUE `k` keeps positions/reach. */
210
- kFloor?: number;
211
- /**
212
- * The designated focal node's INDEX, or `-1` when none is pinned. Re-points
213
- * on each `warpTo`; node count is conserved (it is a designation, not a new
214
- * node). A `drawOverlay` reads `field.warp.{x,y}` for the spring-eased mark.
215
- */
216
- focalIndex: number;
217
- /** The per-axis warp spring the engine steps inside `stepField` (AX.W17). */
218
- warp: ConstellationWarp;
219
- /**
220
- * The warp-spring tuning `warpStep` reads (AY.W-CON2). Optional — absent
221
- * falls back to the shipped `{ response: 0.55, zeta: 1.0 }` defaults (the
222
- * byte-identical HEAD spring). A tokenised override (read on mount) reaches
223
- * the integrator through this member.
224
- */
225
- warpCfg?: ConstellationWarpConfig;
226
- /**
227
- * The optional auto-DRIFT cadence (AY.W-CON1). When set, `stepField`
228
- * periodically re-points the warp to a random node (the wander source on the
229
- * SAME spring). Absent (`undefined`) leaves the field BYTE-IDENTICAL to the
230
- * pre-wander HEAD — `stepField` skips the cadence block entirely.
231
- */
232
- wander?: ConstellationWander;
233
- /**
234
- * The optional gravity-well (AY.W-CON2). When set, `stepField` composes a
235
- * held-pointer inverse-square pull force (no new rAF) — `well.target → 1`
236
- * while held, `→ 0` on release, the field renormalising back to `speed` once
237
- * the well cools. Absent (`undefined`) leaves the field BYTE-IDENTICAL to the
238
- * pre-well HEAD — `stepField` skips the force pass entirely.
239
- */
240
- well?: ConstellationWell;
241
- /**
242
- * The PINNED node designation (AZ.W-CON-GEN G1) — the index of a node `stepField`
243
- * does NOT drift/bounce/steer/pull, so it HOLDS its seeded position (the flagged
244
- * flagged node the consumer pins). `-1` (the default) = no pin → every node drifts
245
- * (byte-identical to HEAD). A designation, NOT a new node — node count is
246
- * conserved. The optional `pinnedDrift` gently wanders it around its anchor; the
247
- * optional `drawEdges(…, accentIndex)` tints its incident edges.
248
- */
249
- pinnedIndex: number;
250
- /**
251
- * The optional autonomous PINNED-ANCHOR drift (AZ.W-CON-GEN G5). When set AND a
252
- * node is pinned, `stepField` gently eases the pinned node around its anchor on a
253
- * jittered cadence (a closed-form easeInOutQuad — no second rAF). Absent
254
- * (`undefined`) → the pinned node holds dead-still at its anchor (byte-identical).
255
- */
256
- pinnedDrift?: ConstellationPinnedDrift;
257
- /**
258
- * Warp AUTO-RELEASE (AZ.W-CON-GEN G6). When `true`, `stepField` clears the warp's
259
- * `targetIdx` (→ -1) once the spring has SETTLED on its target — the focal node
260
- * releases the spring and rides its node's RAW drift (the identity-ride), freeing
261
- * the spring for the next warp. Default `false`/undefined keeps the held-target
262
- * behaviour (the warp chases its node forever — byte-identical to HEAD).
263
- */
264
- warpAutoRelease?: boolean;
265
- }
266
- /**
267
- * The `<Constellation>` consumer prop surface (the public type a consumer types
268
- * a wrapper against). The `drawOverlay` seam is the branded-skin injection — it
269
- * runs AFTER the neutral passes with the live field.
270
- */
271
- export interface ConstellationProps {
272
- /** Node count. Default 64. */
273
- count?: number;
274
- /** Link distance in px (the falloff reach). Default 132. */
275
- link?: number;
276
- /** Drift speed. Default 0.16. */
277
- speed?: number;
278
- /**
279
- * AY.W-COHERE E3 — the per-instance outer-envelope RECESSION knob (the aurora
280
- * `opacityCeiling` / fourier `intensity` sibling — ONE recession vocabulary
281
- * across the four live substrates). Scales the painted edge/node/web/ripple
282
- * alpha OVER the mode-tuned `--constellation-alpha` base so the lattice can
283
- * RECEDE behind content (0.4–0.6 in a hero). Default `1` is byte-identical to
284
- * HEAD.
285
- */
286
- opacityCeiling?: number;
287
- /** Seed for a reproducible field (number or hashed string); omit for `Math.random`. */
288
- seed?: number | string;
289
- /** Steer-toward-cursor + tap ripples. Default true; auto-off under reduced-motion. */
290
- pointerReactive?: boolean;
291
- /**
292
- * Click-to-warp (AX.W17): a click warps the focal node to the nearest
293
- * drifting node + springs it there. INDEPENDENT of `pointerReactive` (warp
294
- * works on a non-ripple lattice). Default false; auto-off under
295
- * reduced-motion (the focal mark stays put — the stated PRM policy).
296
- */
297
- warpOnClick?: boolean;
298
- /**
299
- * Auto-DRIFT (AY.W-CON1): a periodic auto-pick re-points the focal node to a
300
- * random node on a jittered cadence — the wander source on the SAME warp
301
- * spring (no second mechanic). `true` uses the default cadence (8–16s, the
302
- * slides rhythm); `{ minIdle, jitter }` tunes it. Default OFF (absent →
303
- * byte-identical to HEAD). PRM-gated by the WARP precedent (the cadence never
304
- * advances under reduced-motion — the focal stays at its seed).
305
- */
306
- wander?: boolean | {
307
- minIdle?: number;
308
- jitter?: number;
309
- };
310
- /**
311
- * Pointer-held GRAVITY-WELL (AY.W-CON2): hold the pointer and the lattice is
312
- * pulled toward it (an inverse-square force on the same engine, no new rAF);
313
- * release and the field cools back to `speed`. INDEPENDENT of `warpOnClick`
314
- * and `pointerReactive` (a consumer can hold-to-pull on a non-ripple,
315
- * non-warp lattice). `true` uses the tokenised defaults; an object tunes the
316
- * gains. Default OFF (absent → byte-identical to HEAD). PRM-gated by the WARP
317
- * precedent (the held-timer is not registered under reduced-motion).
318
- */
319
- gravityWell?: boolean | {
320
- holdMs?: number;
321
- gain?: number;
322
- reach?: number;
323
- ramp?: number;
324
- maxSpeed?: number;
325
- soften?: number;
326
- };
327
- /**
328
- * PINNED node designation (AZ.W-CON-GEN G1): a node held by every step pass (it
329
- * does not drift / bounce / steer / feel the well). `false`/absent → no pin;
330
- * `true` → node 0; a number → that index. The flagged-node pin the consumer holds.
331
- */
332
- pinned?: boolean | number;
333
- /**
334
- * ACCENT-edge skin (AZ.W-CON-GEN G2): edges incident on the pinned (else focal)
335
- * node stroke the `--constellation-accent` tint — the flagged-node tether. Default
336
- * OFF (the neutral single-color pass).
337
- */
338
- accentEdges?: boolean;
339
- /**
340
- * Autonomous PINNED-ANCHOR drift (AZ.W-CON-GEN G5): the pinned node gently wanders
341
- * its seeded anchor on a jittered cadence (DISTINCT from `wander`, which re-targets
342
- * the warp). Default OFF (the pin holds dead-still). PRM-gated.
343
- */
344
- pinnedDrift?: boolean | {
345
- wanderFrac?: number;
346
- durMs?: number;
347
- minIdle?: number;
348
- jitter?: number;
349
- };
350
- /**
351
- * Warp AUTO-RELEASE (AZ.W-CON-GEN G6): a settled warp clears its target so the
352
- * focal rides its node's raw drift (the identity-ride). Default OFF (the warp holds
353
- * its target forever). Read the settled signal via the `warpSettled()` expose.
354
- */
355
- warpAutoRelease?: boolean;
356
- /**
357
- * Deterministic-capture freeze (AY.W-CON3): when `true`, lays out ONE
358
- * reproducible STATIC frame (no `stepField`, no ripple / warp / wander / well
359
- * advance) and hands `drawOverlay` a FROZEN `now` so a phase-driven skin
360
- * resolves to a fixed value. Omit to AUTO-DERIVE from `location.search`
361
- * matching `export | print | freeze` (the deploy-pipeline contract); an
362
- * explicit `false` forces live even under a capture URL. Set `seed` for a
363
- * field stable ACROSS runs. Unifies with the reduced-motion one-static-frame
364
- * path (`freeze || reducedMotion` is the single static-frame predicate).
365
- */
366
- freeze?: boolean;
367
- class?: string;
368
- /** The skin seam — paints the consumer's focal mark on the live field. */
369
- drawOverlay?: (ctx: CanvasRenderingContext2D, field: ConstellationField, now: number) => void;
370
- }
2
+ export type * from "./constellationTypes";
3
+ import type { ConstellationNode, ConstellationField, ConstellationPointer } from "./constellationTypes";
371
4
  /**
372
5
  * Seed `count` drifting nodes inside `w × h`. `rng` is a `() => number` in
373
6
  * `[0, 1)` (the glass-ui `mulberry32`/`Math.random`); a seeded `rng` lays out a