@mkbabb/glass-ui 5.0.0 → 6.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 (470) hide show
  1. package/README.md +30 -27
  2. package/dist/DropdownMenuTrigger-BzQtd9lt.js +65 -0
  3. package/dist/{FadingScroll-BSRLqQCx.js → FadingScroll-C1ZWEjmG.js} +32 -25
  4. package/dist/{Input-DKf-XwUM.js → Input-B4WQ_CMc.js} +1 -1
  5. package/dist/{PagerDots-BP6jh7z4.js → PagerDots-BoTQ7g5l.js} +123 -95
  6. package/dist/{accent-tone-solve-CBw3L0cy.js → accent-tone-solve-Dii9ePhK.js} +1 -1
  7. package/dist/animated-digit.js +1 -1
  8. package/dist/aurora.js +324 -314
  9. package/dist/blob-config.d.ts +0 -4
  10. package/dist/blob-config.js +1 -1
  11. package/dist/blob.js +280 -261
  12. package/dist/{button-BXzhydVB.js → button-32mg6xA8.js} +63 -56
  13. package/dist/button.js +1 -1
  14. package/dist/canvas.js +1 -1
  15. package/dist/{CardAction-2uUvjMQK.js → card-16xmzIr3.js} +29 -11
  16. package/dist/card.js +1 -1
  17. package/dist/carousel.d.ts +1 -2
  18. package/dist/carousel.js +26 -95
  19. package/dist/chip.d.ts +0 -9
  20. package/dist/chip.js +1 -1
  21. package/dist/collapsible.js +1 -1
  22. package/dist/color-swatch.js +1 -0
  23. package/dist/color.js +87 -3
  24. package/dist/{CommandShortcut-fmdbsEJL.js → command-BjPjUU9z.js} +56 -51
  25. package/dist/command.js +1 -1
  26. package/dist/completion-seal.js +64 -55
  27. package/dist/components/_shared/ModalOverlay.vue.d.ts +5 -52
  28. package/dist/components/_shared/field-surfaces.css +1 -0
  29. package/dist/components/_shared/menuItemVariants.d.ts +2 -2
  30. package/dist/components/_shared/useMotionAxis.d.ts +2 -2
  31. package/dist/components/_shared/valueDomain.d.ts +6 -0
  32. package/dist/components/alert/index.d.ts +1 -1
  33. package/dist/components/animated-digit/AnimatedDigit.vue.d.ts +1 -1
  34. package/dist/components/aurora/Aurora.vue.d.ts +7 -1
  35. package/dist/components/aurora/composables/runtime.d.ts +5 -3
  36. package/dist/components/aurora/composables/useAurora.d.ts +4 -2
  37. package/dist/components/avatar/AvatarImage.vue.d.ts +3 -1
  38. package/dist/components/badge/index.d.ts +2 -2
  39. package/dist/components/blob/Blob.vue.d.ts +11 -0
  40. package/dist/components/blob/composables/useMetaballRenderer.d.ts +2 -0
  41. package/dist/components/button/Button.vue.d.ts +4 -2
  42. package/dist/components/button/index.d.ts +2 -2
  43. package/dist/components/card/Card.vue.d.ts +4 -4
  44. package/dist/components/card/ScrollCard.vue.d.ts +1 -1
  45. package/dist/components/card/styles.css +1 -0
  46. package/dist/components/carousel/Carousel.vue.d.ts +2 -2
  47. package/dist/components/carousel/CarouselNext.vue.d.ts +1 -1
  48. package/dist/components/carousel/CarouselPrevious.vue.d.ts +1 -1
  49. package/dist/components/carousel/index.d.ts +0 -1
  50. package/dist/components/carousel/useCarousel.d.ts +2 -2
  51. package/dist/components/combobox/ComboboxList.vue.d.ts +1 -1
  52. package/dist/components/combobox/index.d.ts +1 -3
  53. package/dist/components/command/Command.vue.d.ts +1 -1
  54. package/dist/components/command/CommandDialog.vue.d.ts +9 -6
  55. package/dist/components/completion-seal/styles.css +1 -0
  56. package/dist/components/constellation/Constellation.vue.d.ts +6 -1
  57. package/dist/components/constellation/composables/useConstellation.d.ts +3 -16
  58. package/dist/components/constellation/constants.d.ts +6 -16
  59. package/dist/components/constellation/constellationField.d.ts +3 -5
  60. package/dist/components/constellation/constellationInteraction.d.ts +1 -1
  61. package/dist/components/constellation/constellationRender.d.ts +11 -21
  62. package/dist/components/constellation/constellationTypes.d.ts +12 -9
  63. package/dist/components/constellation/index.d.ts +1 -1
  64. package/dist/components/controls/DarkModeToggle.vue.d.ts +0 -2
  65. package/dist/components/data-table/DataTable.vue.d.ts +14 -2
  66. package/dist/components/data-table/index.d.ts +1 -2
  67. package/dist/components/data-table/types.d.ts +26 -1
  68. package/dist/components/deck/constants.d.ts +0 -10
  69. package/dist/components/deck/index.d.ts +0 -1
  70. package/dist/components/dialog/DialogContent.vue.d.ts +7 -1
  71. package/dist/components/dialog/index.d.ts +0 -1
  72. package/dist/components/dock/DockControl.vue.d.ts +4 -4
  73. package/dist/components/dock/DockStack.vue.d.ts +2 -2
  74. package/dist/components/dock/GlassDock.vue.d.ts +1 -0
  75. package/dist/components/dock/composables/dockMorphContext.d.ts +2 -0
  76. package/dist/components/dock/composables/dockMorphMeasure.d.ts +11 -1
  77. package/dist/components/dock/composables/useDockClickIntegrity.d.ts +4 -0
  78. package/dist/components/dock/composables/useDockOverflowFit.d.ts +3 -3
  79. package/dist/components/dock/composables/useDockPopover.d.ts +2 -0
  80. package/dist/components/dock/composables/useDockShellProps.d.ts +7 -0
  81. package/dist/components/dock/composables/useDockState.d.ts +2 -2
  82. package/dist/components/dock/constants.d.ts +0 -12
  83. package/dist/components/dock/index.d.ts +1 -0
  84. package/dist/components/dock/styles/adaptive-legibility.css +1 -0
  85. package/dist/components/dock/styles/controls/icon-button.css +1 -0
  86. package/dist/{styles/dock-controls → components/dock/styles/controls}/touch-floor.css +1 -1
  87. package/dist/components/dock/styles/controls.css +1 -0
  88. package/dist/{styles/dock → components/dock/styles}/density.css +1 -1
  89. package/dist/components/dock/styles/dock.css +1 -0
  90. package/dist/components/dock/styles/index.css +1 -0
  91. package/dist/components/dock/styles/layer-group.css +1 -0
  92. package/dist/components/dock/styles/layers.css +1 -0
  93. package/dist/components/dock/styles/overflow.css +1 -0
  94. package/dist/components/dock/styles/popover.css +1 -0
  95. package/dist/components/dock/styles/shape.css +1 -0
  96. package/dist/components/dock/styles/shell.css +1 -0
  97. package/dist/components/drawer/Drawer.vue.d.ts +3 -3
  98. package/dist/components/drawer/composables/drawerSnapContext.d.ts +3 -1
  99. package/dist/components/drawer/constants.d.ts +6 -6
  100. package/dist/components/drawer/index.d.ts +4 -6
  101. package/dist/components/drawer/styles.css +1 -0
  102. package/dist/components/dropdown-menu/DropdownMenuContent.vue.d.ts +1 -1
  103. package/dist/components/dropdown-menu/DropdownMenuTrigger.vue.d.ts +9 -3
  104. package/dist/components/dropdown-menu/index.d.ts +0 -1
  105. package/dist/components/easing/EasingConfigurator.vue.d.ts +1 -1
  106. package/dist/components/easing/EasingPicker.vue.d.ts +2 -2
  107. package/dist/components/easing/composables/useEasingPicker.d.ts +4 -0
  108. package/dist/components/easing/constants.d.ts +2 -0
  109. package/dist/components/fading-scroll/composables/useFadingScroll.d.ts +3 -3
  110. package/dist/components/fourier-field/FourierField.vue.d.ts +7 -1
  111. package/dist/components/fourier-field/composables/useFourierField.d.ts +2 -1
  112. package/dist/components/handmark/HandMark.vue.d.ts +1 -1
  113. package/dist/components/handmark/geometry.d.ts +1 -1
  114. package/dist/components/handmark/index.d.ts +4 -6
  115. package/dist/components/icon-chip/styles.css +1 -0
  116. package/dist/components/index.d.ts +0 -1
  117. package/dist/components/infinite-scroll/index.d.ts +1 -0
  118. package/dist/components/instrument-chassis/styles.css +1 -0
  119. package/dist/components/labeled-field/LabeledField.vue.d.ts +12 -2
  120. package/dist/components/labeled-field/LabeledInput.vue.d.ts +10 -3
  121. package/dist/components/liquid-grid/LiquidGrid.vue.d.ts +4 -0
  122. package/dist/components/liquid-grid/composables/useLiquidGrid.d.ts +2 -1
  123. package/dist/components/metric-stack/MetricStack.vue.d.ts +1 -1
  124. package/dist/components/pager-dots/PagerDots.vue.d.ts +1 -1
  125. package/dist/components/popover/PopoverContent.vue.d.ts +1 -1
  126. package/dist/components/progress/Progress.vue.d.ts +5 -40
  127. package/dist/components/progress/ProgressDefault.vue.d.ts +1 -17
  128. package/dist/components/progress/ProgressGradient.vue.d.ts +1 -0
  129. package/dist/components/progress/ProgressLiquid.vue.d.ts +1 -0
  130. package/dist/components/progress/index.d.ts +0 -5
  131. package/dist/components/progress/valueMarks.css +1 -0
  132. package/dist/components/pulse/Pulse.vue.d.ts +2 -2
  133. package/dist/components/scroll-progress-rim/styles.css +1 -0
  134. package/dist/components/search/FuzzySearch.vue.d.ts +4 -2
  135. package/dist/components/search/SearchBar.vue.d.ts +2 -2
  136. package/dist/components/search/searchVariants.d.ts +1 -1
  137. package/dist/components/select/SelectContent.vue.d.ts +1 -1
  138. package/dist/components/select/index.d.ts +0 -2
  139. package/dist/components/skeleton/Skeleton.vue.d.ts +1 -1
  140. package/dist/components/slider/Slider.vue.d.ts +2 -0
  141. package/dist/components/split-chars/SplitChars.vue.d.ts +1 -1
  142. package/dist/components/surface/Surface.vue.d.ts +1 -1
  143. package/dist/components/table/Table.vue.d.ts +4 -0
  144. package/dist/components/tabs/SegmentedTabs.vue.d.ts +10 -0
  145. package/dist/components/tabs/index.d.ts +1 -1
  146. package/dist/components/tabs/styles/drag.css +1 -0
  147. package/dist/components/tags-input/TagsInput.vue.d.ts +2 -2
  148. package/dist/components/timeline/ContinuousTimeline.vue.d.ts +1 -1
  149. package/dist/components/timeline/GlassTimeline.vue.d.ts +4 -4
  150. package/dist/components/toast/Toast.vue.d.ts +3 -3
  151. package/dist/components/toast/use-toast.d.ts +4 -4
  152. package/dist/components/typewriter/TypewriterText.vue.d.ts +1 -4
  153. package/dist/components/typewriter/composables/useTypewriter.d.ts +0 -1
  154. package/dist/components/typewriter/utils/graphemes.d.ts +1 -0
  155. package/dist/components/watercolor-dot/WatercolorDot.vue.d.ts +2 -2
  156. package/dist/composables/glass/useGlassBackdropLuminance.d.ts +31 -0
  157. package/dist/composables/glass/webgpu/rendererStatus.d.ts +13 -0
  158. package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +3 -0
  159. package/dist/composables/glass/webgpu/webgpuCanvasTypes.d.ts +2 -0
  160. package/dist/composables/motion/springProjection.d.ts +16 -0
  161. package/dist/composables/motion/useAnimatedNumber.d.ts +1 -6
  162. package/dist/composables/motion/useCountup.d.ts +1 -6
  163. package/dist/composables/motion/useDockCtaReceive.d.ts +55 -0
  164. package/dist/composables/motion/useElementMorph.d.ts +8 -0
  165. package/dist/composables/motion/useLiquidPress.d.ts +12 -4
  166. package/dist/composables/motion/useNumericTransition.d.ts +2 -0
  167. package/dist/composables/motion/useTextHighlight.d.ts +2 -1
  168. package/dist/configurator-CSENXXSy.js +311 -0
  169. package/dist/configurator.js +2 -3
  170. package/dist/constellation.js +235 -571
  171. package/dist/controls.js +55 -63
  172. package/dist/{createCanvasLifecycle-DlrcvWbb.js → createCanvasLifecycle-hsFkQVdl.js} +32 -32
  173. package/dist/dark-DIH-blY1.js +70 -0
  174. package/dist/dark.d.ts +1 -2
  175. package/dist/dark.js +2 -20
  176. package/dist/{DataTable-Bxya8nBn.js → data-table-DveMdgBM.js} +231 -120
  177. package/dist/data-table.js +2 -2
  178. package/dist/deck.js +10 -21
  179. package/dist/dialog-BzQxKrUr.js +281 -0
  180. package/dist/dialog.js +2 -3
  181. package/dist/dock.js +561 -428
  182. package/dist/{dockContext-d-WpJN2Z.js → dockContext-4S9qP0Z4.js} +1 -1
  183. package/dist/dom.js +196 -7
  184. package/dist/drawer.js +111 -66
  185. package/dist/dropdown-menu-DORIA52F.js +378 -0
  186. package/dist/dropdown-menu.js +3 -2
  187. package/dist/easing.d.ts +0 -9
  188. package/dist/easing.js +334 -187
  189. package/dist/expandable-container.js +12 -4
  190. package/dist/fading-scroll.js +1 -1
  191. package/dist/focus-scope.js +1 -1
  192. package/dist/forms.js +37 -78
  193. package/dist/fourier-field.js +273 -263
  194. package/dist/fourier-math.d.ts +0 -6
  195. package/dist/fourier-math.js +112 -2
  196. package/dist/glass-ui.css +1 -1
  197. package/dist/glass-ui.js +131 -195
  198. package/dist/handmark.d.ts +0 -2
  199. package/dist/handmark.js +82 -82
  200. package/dist/header-ribbon.js +41 -30
  201. package/dist/{IconChip-CwLmBJ_K.js → icon-chip-BWuxz1-u.js} +1 -1
  202. package/dist/icon-chip.js +1 -1
  203. package/dist/{IconTooltip-D9sbK-Mk.js → icon-tooltip-CO6rw0dZ.js} +1 -1
  204. package/dist/icon-tooltip.js +1 -1
  205. package/dist/index.d.ts +0 -1
  206. package/dist/infinite-scroll.d.ts +0 -1
  207. package/dist/infinite-scroll.js +17 -15
  208. package/dist/instrument-chassis.js +1 -1
  209. package/dist/keyboard.js +104 -2
  210. package/dist/label.js +1 -1
  211. package/dist/labeled-field.js +95 -69
  212. package/dist/liquid-grid.js +173 -162
  213. package/dist/metric-badge.js +3 -3
  214. package/dist/metric-cell.js +2 -2
  215. package/dist/metric-stack.js +1 -1
  216. package/dist/motion-core.js +15 -16
  217. package/dist/motion-curves.d.ts +0 -20
  218. package/dist/motion.js +59 -58
  219. package/dist/{Notification-DQv2cOh9.js → notification-DVs7ODMg.js} +17 -8
  220. package/dist/notification.js +1 -1
  221. package/dist/{NumberFieldContent-BkE7xPS9.js → number-field-PvkGedHk.js} +2 -2
  222. package/dist/number-field.js +1 -1
  223. package/dist/pager-dots.js +1 -1
  224. package/dist/paper-backdrop.js +31 -2
  225. package/dist/{PopoverContent-DOtszFWK.js → popover-WMgyRSyN.js} +7 -2
  226. package/dist/popover.js +1 -1
  227. package/dist/procedural-color.wgsl-B9mLK7v0.js +377 -0
  228. package/dist/progress-C-HHuFZy.js +192 -0
  229. package/dist/progress.js +2 -2
  230. package/dist/pulse.js +3 -1
  231. package/dist/reactive.js +19 -3
  232. package/dist/rendererStatus-C2-zC2Q-.js +40 -0
  233. package/dist/{resolveCanvasColor-B3L-akX0.js → resolveCanvasColor-yarP5bdk.js} +1 -1
  234. package/dist/scroll-progress-rim.js +1 -1
  235. package/dist/search.js +187 -146
  236. package/dist/{SelectScrollDownButton-CDtwaWkZ.js → select-BIv4R3Ir.js} +109 -44
  237. package/dist/select.js +2 -4
  238. package/dist/separator-CBU94kTM.js +62 -0
  239. package/dist/separator.js +1 -1
  240. package/dist/sidebar.js +1 -1
  241. package/dist/slider-Cc_qw6GA.js +166 -0
  242. package/dist/slider.js +1 -1
  243. package/dist/sortable-list.js +43 -43
  244. package/dist/styles/accessibility.css +1 -0
  245. package/dist/styles/components.css +1 -1
  246. package/dist/styles/glass/control-surfaces.css +1 -1
  247. package/dist/styles/glass/glass-capsule.css +1 -1
  248. package/dist/styles/glass/ladder.css +1 -1
  249. package/dist/styles/glass/liquid-fill.css +1 -1
  250. package/dist/styles/glass/material-roles.css +1 -0
  251. package/dist/styles/glass/material.css +1 -1
  252. package/dist/styles/glass/surface-axis.css +1 -1
  253. package/dist/styles/glass/surfaces-pager.css +1 -1
  254. package/dist/styles/glass/surfaces.css +1 -1
  255. package/dist/styles/glass.css +1 -1
  256. package/dist/styles/index.css +1 -1
  257. package/dist/styles/theme/bridges.css +1 -1
  258. package/dist/styles/tokens/glass-fx.css +1 -1
  259. package/dist/styles/tokens/glass.css +1 -1
  260. package/dist/styles/tokens/offsets.css +1 -1
  261. package/dist/styles/tokens/scale-paper.css +1 -1
  262. package/dist/styles/tokens/scheme-spring.css +1 -1
  263. package/dist/styles/tokens/shadow.css +1 -1
  264. package/dist/styles/tokens.d.ts +53 -0
  265. package/dist/styles/tokens.ts +58 -0
  266. package/dist/styles/typography/scale.css +1 -1
  267. package/dist/styles/typography/semantic.css +1 -1
  268. package/dist/styles/typography/utilities.css +1 -1
  269. package/dist/styles/utilities/base.css +1 -1
  270. package/dist/styles/utilities/btn.css +1 -1
  271. package/dist/styles/utilities/components.css +1 -1
  272. package/dist/styles/utilities.css +1 -1
  273. package/dist/{Switch-BPBfhMU3.js → switch-Boj4Ucn5.js} +1 -1
  274. package/dist/switch.js +1 -1
  275. package/dist/tabs.js +51 -45
  276. package/dist/timeline.js +2 -2
  277. package/dist/toast.js +1 -1
  278. package/dist/{ToggleGroupItem-DNWx2aSW.js → toggle-group-BPchFsns.js} +10 -7
  279. package/dist/toggle-group.js +1 -1
  280. package/dist/tokens.d.ts +1 -53
  281. package/dist/tokens.js +1 -1
  282. package/dist/{TooltipProvider-GtfYdSVf.js → tooltip-BmOQJzh0.js} +1 -0
  283. package/dist/tooltip.js +1 -1
  284. package/dist/typewriter.js +151 -166
  285. package/dist/{useAccentTone-D25DxviG.js → useAccentTone-C-p6WdPe.js} +1 -1
  286. package/dist/{useAnimatedNumber-2XC4aRB6.js → useAnimatedNumber-BRVVaFFc.js} +1 -1
  287. package/dist/useDockCtaReceive-CK-RLASa.js +257 -0
  288. package/dist/{useGooMorph-CU1pwuC6.js → useGooMorph-D1F6QJlH.js} +140 -59
  289. package/dist/{useIntersectionPause-Cmt5Tnv9.js → useIntersectionPause-B-dbxl9w.js} +1 -1
  290. package/dist/useLiquidPress-BYcwwGQV.js +68 -0
  291. package/dist/{useRAFLoop-CvOo_kgb.js → useRAFLoop-BtwQ9DyY.js} +1 -1
  292. package/dist/{useScrollProgress-C-yImzhU.js → useScrollProgress-DZI4nf4v.js} +1 -1
  293. package/dist/{useSelectionGroup-Btpf24aY.js → useSelectionGroup-LDzBdR1Y.js} +3 -3
  294. package/dist/{useTabRovingFocus-CG1H1k1J.js → useTabRovingFocus-DkLYwo4L.js} +1 -1
  295. package/dist/{useTouchGate-BlegwvwL.js → useTouchGate-Cj5fOkTv.js} +1 -1
  296. package/dist/valueDomain-B8L04u3U.js +13 -0
  297. package/dist/watercolor-dot.js +5 -3
  298. package/package.json +5 -12
  299. package/src/styles/accessibility.css +48 -0
  300. package/src/styles/glass/glass-capsule.css +2 -2
  301. package/src/styles/glass/ladder.css +1 -1
  302. package/src/styles/glass/material-roles.css +18 -0
  303. package/src/styles/glass/material.css +18 -12
  304. package/src/styles/glass.css +5 -5
  305. package/src/styles/index.css +38 -30
  306. package/src/styles/theme/bridges.css +0 -6
  307. package/src/styles/tokens/glass-fx.css +1 -5
  308. package/src/styles/tokens/glass.css +1 -2
  309. package/src/styles/tokens/offsets.css +0 -1
  310. package/src/styles/tokens/property-regs.css +11 -10
  311. package/src/styles/tokens/scale-paper.css +0 -1
  312. package/src/styles/tokens/scheme-motion.css +3 -0
  313. package/src/styles/tokens/scheme-spring.css +0 -10
  314. package/src/styles/tokens/shadow.css +3 -29
  315. package/src/styles/tokens.ts +58 -0
  316. package/src/styles/typography/scale.css +5 -2
  317. package/src/styles/typography/semantic.css +5 -5
  318. package/src/styles/typography/utilities.css +5 -5
  319. package/src/styles/utilities/base.css +5 -5
  320. package/src/styles/utilities/btn.css +6 -27
  321. package/src/styles/utilities.css +4 -6
  322. package/dist/ConfiguratorRow-BV6zPjTM.js +0 -151
  323. package/dist/DialogContent-Bl4v10AC.js +0 -192
  324. package/dist/DialogFooter-C0v4Hz2F.js +0 -168
  325. package/dist/PaperBackdrop-BYwE8_kg.js +0 -31
  326. package/dist/Progress-uWLyXE7J.js +0 -308
  327. package/dist/SelectGroup-BuEptUsa.js +0 -31
  328. package/dist/SelectSeparator-4QGephvr.js +0 -49
  329. package/dist/Separator-DqJ6PfOd.js +0 -44
  330. package/dist/color-Bp5jmv4Z.js +0 -86
  331. package/dist/components/carousel/GlassCarouselPager.vue.d.ts +0 -50
  332. package/dist/components/combobox/ComboboxSeparator.vue.d.ts +0 -18
  333. package/dist/components/combobox/ComboboxViewport.vue.d.ts +0 -18
  334. package/dist/components/constellation/composables/constellationGLSetup.d.ts +0 -10
  335. package/dist/components/constellation/composables/constellationWGPUSetup.d.ts +0 -19
  336. package/dist/components/constellation/composables/uniformBridgeWGPU.d.ts +0 -66
  337. package/dist/components/constellation/shaders/constellation-lines.glsl.d.ts +0 -2
  338. package/dist/components/constellation/shaders/constellation-lines.wgsl.d.ts +0 -1
  339. package/dist/components/constellation/shaders/constellation-points.glsl.d.ts +0 -2
  340. package/dist/components/constellation/shaders/constellation-points.wgsl.d.ts +0 -1
  341. package/dist/components/deck/composables/useDeckSpring.d.ts +0 -22
  342. package/dist/components/dialog/DialogScrollContent.vue.d.ts +0 -33
  343. package/dist/components/progress/ProgressSectioned.vue.d.ts +0 -47
  344. package/dist/components/progress/useProgressGeometry.d.ts +0 -60
  345. package/dist/components/section/Section.vue.d.ts +0 -73
  346. package/dist/components/section/index.d.ts +0 -1
  347. package/dist/components/stacked-icons/StackedIconGroup.vue.d.ts +0 -30
  348. package/dist/components/stacked-icons/index.d.ts +0 -2
  349. package/dist/components/stacked-icons/types.d.ts +0 -19
  350. package/dist/dropdown-menu-DaGlVdp9.js +0 -421
  351. package/dist/math-CIEcwsYi.js +0 -112
  352. package/dist/procedural-color.wgsl-ByduxnzV.js +0 -4
  353. package/dist/slider-Cxuj_W_H.js +0 -151
  354. package/dist/stacked-icons.d.ts +0 -1
  355. package/dist/stacked-icons.js +0 -98
  356. package/dist/styles/cards.css +0 -1
  357. package/dist/styles/completion-seal.css +0 -1
  358. package/dist/styles/dock/adaptive-legibility.css +0 -1
  359. package/dist/styles/dock/dock.css +0 -1
  360. package/dist/styles/dock/layer-group.css +0 -1
  361. package/dist/styles/dock/layers.css +0 -1
  362. package/dist/styles/dock/overflow.css +0 -1
  363. package/dist/styles/dock/popover.css +0 -1
  364. package/dist/styles/dock/shape.css +0 -1
  365. package/dist/styles/dock/shell.css +0 -1
  366. package/dist/styles/dock-controls/icon-button.css +0 -1
  367. package/dist/styles/dock-controls.css +0 -1
  368. package/dist/styles/dock.css +0 -1
  369. package/dist/styles/drawer.css +0 -1
  370. package/dist/styles/icon-chip.css +0 -1
  371. package/dist/styles/instrument-chassis.css +0 -1
  372. package/dist/styles/scroll-progress-rim.css +0 -1
  373. package/dist/styles/select.css +0 -1
  374. package/dist/styles/tabs/segmented-tabs-drag.css +0 -1
  375. package/dist/styles/utilities/animate.css +0 -0
  376. package/dist/useConfiguratorState-Dq35N_7t.js +0 -167
  377. package/dist/useDockCtaReceive-BgMmeINo.js +0 -161
  378. package/dist/useGlobalDark-DjKMEQE2.js +0 -53
  379. package/dist/useGpuSubstrate-DcY584kE.js +0 -347
  380. package/dist/useInterval-ZATRi-1T.js +0 -18
  381. package/dist/useKeyboardShortcuts-ynVmNFo3.js +0 -104
  382. package/dist/useLiquidPress-BXNHydZh.js +0 -40
  383. package/dist/useTextHighlight-C46Le9u_.js +0 -72
  384. package/dist/useViewportReady-c0isoKL8.js +0 -191
  385. package/src/styles/card-scroll.css +0 -189
  386. package/src/styles/cards.css +0 -485
  387. package/src/styles/completion-seal.css +0 -205
  388. package/src/styles/configurator.css +0 -359
  389. package/src/styles/dialog-placement.css +0 -68
  390. package/src/styles/dock/adaptive-legibility.css +0 -119
  391. package/src/styles/dock/crossfade.css +0 -139
  392. package/src/styles/dock/cta-seat.css +0 -87
  393. package/src/styles/dock/density.css +0 -458
  394. package/src/styles/dock/dock.css +0 -199
  395. package/src/styles/dock/fisheye.css +0 -81
  396. package/src/styles/dock/layer-group.css +0 -329
  397. package/src/styles/dock/layers.css +0 -438
  398. package/src/styles/dock/morph.css +0 -455
  399. package/src/styles/dock/overflow.css +0 -332
  400. package/src/styles/dock/popover.css +0 -249
  401. package/src/styles/dock/search.css +0 -68
  402. package/src/styles/dock/section.css +0 -59
  403. package/src/styles/dock/shape.css +0 -188
  404. package/src/styles/dock/shell-regions.css +0 -73
  405. package/src/styles/dock/shell.css +0 -500
  406. package/src/styles/dock-controls/dark-mode-toggle.css +0 -123
  407. package/src/styles/dock-controls/icon-button.css +0 -221
  408. package/src/styles/dock-controls/tab-button.css +0 -143
  409. package/src/styles/dock-controls/touch-floor.css +0 -119
  410. package/src/styles/dock-controls/triggers.css +0 -157
  411. package/src/styles/dock-controls.css +0 -92
  412. package/src/styles/dock.css +0 -219
  413. package/src/styles/drawer.css +0 -434
  414. package/src/styles/feedback-tone.css +0 -104
  415. package/src/styles/icon-chip.css +0 -256
  416. package/src/styles/instrument-chassis.css +0 -449
  417. package/src/styles/menu.css +0 -187
  418. package/src/styles/scroll-progress-rim.css +0 -87
  419. package/src/styles/segmented-tabs.css +0 -424
  420. package/src/styles/select.css +0 -201
  421. package/src/styles/tabs/segmented-tabs-drag.css +0 -200
  422. package/src/styles/utilities/animate.css +0 -29
  423. /package/dist/{coalesce-metric-B8o7zT9u.js → coalesce-metric-znAcLzkB.js} +0 -0
  424. /package/dist/{CollapsibleContent-DiHcB_HH.js → collapsible-bPzS1aQk.js} +0 -0
  425. /package/dist/{compile-C55K3P9g.js → compile-DK3Fri1B.js} +0 -0
  426. /package/dist/{styles → components/_shared}/feedback-tone.css +0 -0
  427. /package/dist/{styles → components/_shared}/menu.css +0 -0
  428. /package/dist/{styles → components/card}/card-scroll.css +0 -0
  429. /package/dist/{styles/configurator.css → components/configurator/styles.css} +0 -0
  430. /package/dist/{styles/dock-controls → components/controls}/dark-mode-toggle.css +0 -0
  431. /package/dist/{styles/dialog-placement.css → components/dialog/placement.css} +0 -0
  432. /package/dist/{styles/dock-controls → components/dock/styles/controls}/tab-button.css +0 -0
  433. /package/dist/{styles/dock-controls → components/dock/styles/controls}/triggers.css +0 -0
  434. /package/dist/{styles/dock → components/dock/styles}/crossfade.css +0 -0
  435. /package/dist/{styles/dock → components/dock/styles}/cta-seat.css +0 -0
  436. /package/dist/{styles/dock → components/dock/styles}/fisheye.css +0 -0
  437. /package/dist/{styles/dock → components/dock/styles}/morph.css +0 -0
  438. /package/dist/{styles/dock → components/dock/styles}/search.css +0 -0
  439. /package/dist/{styles/dock → components/dock/styles}/section.css +0 -0
  440. /package/dist/{styles/dock → components/dock/styles}/shell-regions.css +0 -0
  441. /package/dist/{styles/segmented-tabs.css → components/tabs/styles/segmented.css} +0 -0
  442. /package/dist/{constants-D8lSMkOz.js → constants-DRZmNIY-.js} +0 -0
  443. /package/dist/{createContext-BQ1Gy_LB.js → createContext-FU0n5MGK.js} +0 -0
  444. /package/dist/{flow.glsl-CVqPSj8_.js → flow.glsl-DEGFGE11.js} +0 -0
  445. /package/dist/{FocusScope-BzKwhsBn.js → focus-scope-DUTKveod.js} +0 -0
  446. /package/dist/{InstrumentChassis-Dss5Tjcm.js → instrument-chassis-Cvstg4_U.js} +0 -0
  447. /package/dist/{Label-C84TaQiw.js → label-Cj38tJKG.js} +0 -0
  448. /package/dist/{menuItemVariants-DbO-Fr74.js → menuItemVariants-D6AOzzND.js} +0 -0
  449. /package/dist/{pointerFieldMappings-4VtmkOWv.js → pointerFieldMappings-CZojkgKj.js} +0 -0
  450. /package/dist/{presets-B07HzyKd.js → presets-CxeNvxuO.js} +0 -0
  451. /package/dist/{prng-B0PLRmR6.js → prng-Dz2_9RJu.js} +0 -0
  452. /package/dist/{scrollReader-DzYqPQ6V.js → scrollReader-C2oK9Hb8.js} +0 -0
  453. /package/dist/{supportsCssTimeline-Ie4xJFbD.js → supportsCssTimeline-Dz-GVxXM.js} +0 -0
  454. /package/dist/{Toaster-C_-WeU9W.js → toast-kAbchIN2.js} +0 -0
  455. /package/dist/{useControlSize-DJwe-7ZQ.js → useControlSize-CFfOk8I-.js} +0 -0
  456. /package/dist/{useDocumentVisibility-CpJGUgcJ.js → useDocumentVisibility-YeBDGqtI.js} +0 -0
  457. /package/dist/{useDragMorph-65ihHePq.js → useDragMorph-7ygF9O0m.js} +0 -0
  458. /package/dist/{useDragVelocity-BWcNMCux.js → useDragVelocity-CbMZEBaC.js} +0 -0
  459. /package/dist/{useFuzzySearch-KslRxiJY.js → useFuzzySearch-BOgep7RE.js} +0 -0
  460. /package/dist/{useLeadTrail-DOH4XkL1.js → useLeadTrail-BYu8dq4G.js} +0 -0
  461. /package/dist/{usePointerVelocityField-CwXyeW0Z.js → usePointerVelocityField-BdvnO0py.js} +0 -0
  462. /package/dist/{useResizeObserver-DDuoBeBo.js → useResizeObserver-BcUTquV7.js} +0 -0
  463. /package/dist/{useResolveTokenColor-DVT5kwv6.js → useResolveTokenColor-C07e-qaT.js} +0 -0
  464. /package/dist/{useRoutePointer-DL7I0gY4.js → useRoutePointer-BDNMFN73.js} +0 -0
  465. /package/dist/{useSpringMount-CNvvgGiC.js → useSpringMount-C6-DBx4e.js} +0 -0
  466. /package/dist/{useTimer-CkDV8SC2.js → useTimer-D8koDvJS.js} +0 -0
  467. /package/dist/{useUserInvalidAria-Bkruei7M.js → useUserInvalidAria-Cr4nR3tu.js} +0 -0
  468. /package/dist/{vReveal-DUmiEkX_.js → vReveal-DZfWl9XI.js} +0 -0
  469. /package/dist/{vSpecular-DlYN0UZy.js → vSpecular-CQFmLNzA.js} +0 -0
  470. /package/dist/{writeVelocityWeight-D1rvdxJu.js → writeVelocityWeight-D_AcvTsE.js} +0 -0
@@ -1,13 +1,14 @@
1
1
  import { t as e } from "./class-names-5jotTFzp.js";
2
- import { t } from "./_plugin-vue_export-helper-C1je1s0u.js";
3
- import { t as n } from "./usePointerVelocityField-CwXyeW0Z.js";
4
- import { t as r } from "./useRoutePointer-DL7I0gY4.js";
5
- import { d as i, l as a } from "./pointerFieldMappings-4VtmkOWv.js";
6
- import { a as o, t as s } from "./useGpuSubstrate-DcY584kE.js";
7
- import { n as c, t as l } from "./prng-B0PLRmR6.js";
8
- import { computed as u, createElementBlock as d, createElementVNode as f, defineComponent as p, getCurrentInstance as m, normalizeClass as h, onMounted as g, onUnmounted as _, openBlock as v, ref as y, unref as b, useTemplateRef as x } from "vue";
2
+ import { n as t } from "./resolveCanvasColor-yarP5bdk.js";
3
+ import { t as n } from "./_plugin-vue_export-helper-C1je1s0u.js";
4
+ import { t as r } from "./usePointerVelocityField-BdvnO0py.js";
5
+ import { t as i } from "./useRoutePointer-BDNMFN73.js";
6
+ import { d as a, l as o } from "./pointerFieldMappings-CZojkgKj.js";
7
+ import { a as s, t as c } from "./rendererStatus-C2-zC2Q-.js";
8
+ import { n as l, t as u } from "./prng-Dz2_9RJu.js";
9
+ import { computed as d, createElementBlock as f, createElementVNode as p, defineComponent as m, getCurrentInstance as h, normalizeClass as g, onMounted as _, onUnmounted as v, openBlock as y, readonly as b, ref as x, shallowRef as S, unref as C, useTemplateRef as w, watch as T } from "vue";
9
10
  //#region src/components/constellation/constants.ts
10
- var S = 1280, C = {
11
+ var E = 1280, D = {
11
12
  node: "#b4afa3",
12
13
  nodeDim: "#cdc8bd",
13
14
  line: "#1c1714",
@@ -17,20 +18,20 @@ var S = 1280, C = {
17
18
  accent: "#b35030",
18
19
  edgeFloor: 0,
19
20
  edgeAccentAlpha: .3
20
- }, w = .55, T = 1, E = {
21
+ }, O = .55, k = 1, A = {
21
22
  gain: 19e3,
22
23
  reach: 340,
23
24
  ramp: 8,
24
25
  maxSpeed: 4,
25
26
  soften: 8,
26
27
  holdMs: 140
27
- }, D = 8e3, O = 8e3, k = .14, A = 2600, j = 6e3, M = 8e3, N = .72, P = 256, F = 12, I = 256 * 12, ee = 0, L = 1.6, te = 1.6, R = .001, z = .6, ne = 11, B = 22, V = .05;
28
- function H(e, t, n, r) {
28
+ }, j = 8e3, M = 8e3, N = .14, P = 2600, F = 6e3, I = 8e3, L = .72, R = 256, ee = 12, z = 256 * 12, B = 0, V = 1.6, H = 1.6, U = .001, W = .6, G = 11, K = 22, te = .05;
29
+ function ne(e, t, n, r) {
29
30
  let i = e.well;
30
31
  if (!i || !(r > 0)) return;
31
- let a = Math.min(r, V), o = i.cfg, s = i.target > 0 ? o.ramp : B, c = Math.min(s * a, 1);
32
- i.strength += (i.target - i.strength) * c, i.strength < R && (i.strength = i.target <= 0 ? 0 : i.strength);
33
- let { nodes: l } = e, u = o.reach * t, d = u * u, f = o.maxSpeed * t, p = i.target > 0 ? z : ne, m = Math.min(p * a, 1), h = i.strength > R && i.x >= 0, g = e.pinnedIndex;
32
+ let a = Math.min(r, te), o = i.cfg, s = i.target > 0 ? o.ramp : K, c = Math.min(s * a, 1);
33
+ i.strength += (i.target - i.strength) * c, i.strength < U && (i.strength = i.target <= 0 ? 0 : i.strength);
34
+ let { nodes: l } = e, u = o.reach * t, d = u * u, f = o.maxSpeed * t, p = i.target > 0 ? W : G, m = Math.min(p * a, 1), h = i.strength > U && i.x >= 0, g = e.pinnedIndex;
34
35
  for (let e = 0; e < l.length; e++) {
35
36
  if (e === g) continue;
36
37
  let t = l[e];
@@ -52,11 +53,11 @@ function H(e, t, n, r) {
52
53
  //#region src/components/constellation/constellationInteraction.ts
53
54
  function re(e) {
54
55
  let t = {
55
- response: w,
56
+ response: O,
56
57
  zeta: 1
57
- }, n = { ...E }, r = {
58
- minIdle: D,
59
- jitter: O
58
+ }, n = { ...A }, r = {
59
+ minIdle: j,
60
+ jitter: M
60
61
  };
61
62
  if (typeof window > "u") return {
62
63
  warp: t,
@@ -69,14 +70,14 @@ function re(e) {
69
70
  let r = Number.parseFloat(n);
70
71
  return Number.isFinite(r) ? r : t;
71
72
  };
72
- return t.response = a("--constellation-warp-response", w), t.zeta = a("--constellation-warp-zeta", 1), n.gain = a("--constellation-well-gain", E.gain), n.reach = a("--constellation-well-reach", E.reach), n.ramp = a("--constellation-well-ramp", E.ramp), n.maxSpeed = a("--constellation-well-max-speed", E.maxSpeed), n.holdMs = a("--constellation-well-hold-ms", E.holdMs), r.minIdle = a("--constellation-wander-idle", D), r.jitter = a("--constellation-wander-jitter", O), {
73
+ return t.response = a("--constellation-warp-response", O), t.zeta = a("--constellation-warp-zeta", 1), n.gain = a("--constellation-well-gain", A.gain), n.reach = a("--constellation-well-reach", A.reach), n.ramp = a("--constellation-well-ramp", A.ramp), n.maxSpeed = a("--constellation-well-max-speed", A.maxSpeed), n.holdMs = a("--constellation-well-hold-ms", A.holdMs), r.minIdle = a("--constellation-wander-idle", j), r.jitter = a("--constellation-wander-jitter", M), {
73
74
  warp: t,
74
75
  well: n,
75
76
  wander: r
76
77
  };
77
78
  }
78
- var U = .05;
79
- function W(e, t, n, r = -1) {
79
+ var ie = .05;
80
+ function q(e, t, n, r = -1) {
80
81
  let { nodes: i } = e, a = -1, o = Infinity;
81
82
  for (let e = 0; e < i.length; e++) {
82
83
  if (e === r) continue;
@@ -85,13 +86,13 @@ function W(e, t, n, r = -1) {
85
86
  }
86
87
  return a;
87
88
  }
88
- function ie(e, t) {
89
+ function J(e, t) {
89
90
  let { warp: n, nodes: r } = e;
90
91
  if (!n || n.targetIdx < 0 || n.targetIdx >= r.length || !(t > 0)) return;
91
- let i = Math.min(t, U), a = e.warpCfg?.response ?? .55, o = e.warpCfg?.zeta ?? 1, s = 2 * Math.PI / a, c = r[n.targetIdx], l = -2 * o * s * n.vx - s * s * (n.x - c.x), u = -2 * o * s * n.vy - s * s * (n.y - c.y);
92
+ let i = Math.min(t, ie), a = e.warpCfg?.response ?? .55, o = e.warpCfg?.zeta ?? 1, s = 2 * Math.PI / a, c = r[n.targetIdx], l = -2 * o * s * n.vx - s * s * (n.x - c.x), u = -2 * o * s * n.vy - s * s * (n.y - c.y);
92
93
  n.vx += l * i, n.vy += u * i, n.x += n.vx * i, n.y += n.vy * i;
93
94
  }
94
- function G(e, t) {
95
+ function Y(e, t) {
95
96
  let { warp: n, nodes: r } = e;
96
97
  if (t < 0 || t >= r.length) {
97
98
  n.targetIdx = -1, e.focalIndex = -1;
@@ -99,14 +100,14 @@ function G(e, t) {
99
100
  }
100
101
  e.focalIndex = t, n.targetIdx = t;
101
102
  }
102
- function K(e, t, n) {
103
- let r = W(e, t, n, -1);
103
+ function X(e, t, n) {
104
+ let r = q(e, t, n, -1);
104
105
  if (r >= 0 && r === e.focalIndex) return e.focalIndex;
105
- let i = W(e, t, n, e.focalIndex);
106
- return i < 0 ? -1 : (G(e, i), i);
106
+ let i = q(e, t, n, e.focalIndex);
107
+ return i < 0 ? -1 : (Y(e, i), i);
107
108
  }
108
109
  var ae = 24;
109
- function q(e) {
110
+ function Z(e) {
110
111
  let { warp: t, nodes: n } = e;
111
112
  if (!t || t.targetIdx < 0 || t.targetIdx >= n.length) return !0;
112
113
  let r = n[t.targetIdx];
@@ -139,7 +140,7 @@ function se(e = {}) {
139
140
  function ce(e) {
140
141
  return e < .5 ? 2 * e * e : 1 - (-2 * e + 2) ** 2 / 2;
141
142
  }
142
- function le(e, t, n) {
143
+ function Q(e, t, n) {
143
144
  let r = e.pinnedDrift;
144
145
  if (!r || e.pinnedIndex < 0 || e.pinnedIndex >= e.nodes.length || !(t > 0)) return;
145
146
  let i = e.nodes[e.pinnedIndex];
@@ -156,9 +157,9 @@ function le(e, t, n) {
156
157
  let a = Math.min((t - r.legStart) / r.durMs, 1), o = ce(a);
157
158
  i.x = r.fromX + (r.toX - r.fromX) * o, i.y = r.fromY + (r.toY - r.fromY) * o, a >= 1 && (r.legStart = -1, r.nextAt = t + r.minIdle + n() * r.jitter);
158
159
  }
159
- var ue = .45;
160
- function de(e, t, n, r) {
161
- return n >= .45 ? (K(e, t.x, t.y), r.push({
160
+ var le = .45;
161
+ function ue(e, t, n, r) {
162
+ return n >= .45 ? (X(e, t.x, t.y), r.push({
162
163
  x: e.warp.x,
163
164
  y: e.warp.y,
164
165
  start: -1
@@ -166,7 +167,7 @@ function de(e, t, n, r) {
166
167
  }
167
168
  //#endregion
168
169
  //#region src/components/constellation/constellationField.ts
169
- function fe(e, t, n, r, i) {
170
+ function de(e, t, n, r, i) {
170
171
  let a = [];
171
172
  for (let o = 0; o < t; o++) {
172
173
  let t = e() * Math.PI * 2;
@@ -175,20 +176,20 @@ function fe(e, t, n, r, i) {
175
176
  y: e() * r,
176
177
  vx: Math.cos(t) * i,
177
178
  vy: Math.sin(t) * i,
178
- r: L + e() * te,
179
+ r: V + e() * H,
179
180
  dim: e() < .45,
180
181
  z: e()
181
182
  });
182
183
  }
183
184
  return a;
184
185
  }
185
- function pe(e, t, n) {
186
+ function fe(e, t, n) {
186
187
  if (!(t > 0) || !(n > 0) || t === e.w && n === e.h) return;
187
188
  let r = e.w / t, i = e.h / n;
188
189
  for (let t of e.nodes) t.x *= r, t.y *= i;
189
190
  e.warp.x *= r, e.warp.y *= i;
190
191
  }
191
- function me(e, t, n, r, i = 0, a = 0, o = Math.random, s = null) {
192
+ function pe(e, t, n, r, i = 0, a = 0, o = Math.random, s = null) {
192
193
  let { nodes: c, w: l, h: u } = e, d = e.pinnedIndex;
193
194
  for (let e = 0; e < c.length; e++) {
194
195
  if (e === d) continue;
@@ -206,12 +207,12 @@ function me(e, t, n, r, i = 0, a = 0, o = Math.random, s = null) {
206
207
  }
207
208
  }
208
209
  }
209
- if (H(e, t, n, i), le(e, a, o), ie(e, i), e.warpAutoRelease && e.warp.targetIdx >= 0 && q(e) && (e.warp.targetIdx = -1), e.wander && a > 0) {
210
+ if (ne(e, t, n, i), Q(e, a, o), J(e, i), e.warpAutoRelease && e.warp.targetIdx >= 0 && Z(e) && (e.warp.targetIdx = -1), e.wander && a > 0) {
210
211
  let t = e.wander;
211
- t.nextAt < 0 ? t.nextAt = a + t.minIdle + o() * t.jitter : a >= t.nextAt && q(e) && (G(e, oe(e, o)), t.nextAt = a + t.minIdle + o() * t.jitter);
212
+ t.nextAt < 0 ? t.nextAt = a + t.minIdle + o() * t.jitter : a >= t.nextAt && Z(e) && (Y(e, oe(e, o)), t.nextAt = a + t.minIdle + o() * t.jitter);
212
213
  }
213
214
  }
214
- function he(e, t, n = -1, r = Infinity) {
215
+ function me(e, t, n = -1, r = Infinity) {
215
216
  let { nodes: i, k: a } = e, o = t * a, s = o * o, c = [];
216
217
  for (let e = 0; e < i.length; e++) {
217
218
  let t = i[e];
@@ -232,7 +233,7 @@ function he(e, t, n = -1, r = Infinity) {
232
233
  }
233
234
  return c.length > r && (c.sort((e, t) => t.alpha - e.alpha), c.length = r), c;
234
235
  }
235
- function ge(e, t, n, r, i = Infinity) {
236
+ function he(e, t, n, r, i = Infinity) {
236
237
  if (!r || r.x < 0) return;
237
238
  let { nodes: a, k: o } = t, s = n * o, c = s * s;
238
239
  for (let t of a) {
@@ -249,7 +250,7 @@ function ge(e, t, n, r, i = Infinity) {
249
250
  });
250
251
  }
251
252
  }
252
- function _e(e, t, n, r, i) {
253
+ function ge(e, t, n, r, i) {
253
254
  if (!t || t.x < 0 || i <= 0) return {
254
255
  x: e.x,
255
256
  y: e.y
@@ -262,113 +263,58 @@ function _e(e, t, n, r, i) {
262
263
  }
263
264
  //#endregion
264
265
  //#region src/components/constellation/constellationRender.ts
265
- function ve(e) {
266
+ function $(e) {
266
267
  return Math.max(e.k, e.kFloor ?? .72);
267
268
  }
268
- function ye(e) {
269
- if (typeof window > "u") return { ...C };
269
+ function _e(e) {
270
+ if (typeof window > "u") return { ...D };
270
271
  let t = getComputedStyle(e), n = (e, n) => t.getPropertyValue(e).trim() || n, r = (e, n) => {
271
- let r = t.getPropertyValue(e).trim();
272
- if (!r) return n;
273
- let i = Number.parseFloat(r);
274
- return Number.isFinite(i) ? i : n;
272
+ let r = Number.parseFloat(t.getPropertyValue(e));
273
+ return Number.isFinite(r) ? r : n;
275
274
  };
276
275
  return {
277
- node: n("--constellation-node", C.node),
278
- nodeDim: n("--constellation-node-dim", C.nodeDim),
279
- line: n("--constellation-line", C.line),
280
- edgeAlpha: r("--constellation-edge-alpha", C.edgeAlpha),
281
- edgeFocusAlpha: r("--constellation-edge-focus-alpha", C.edgeFocusAlpha),
282
- alpha: r("--constellation-alpha", C.alpha),
283
- accent: n("--constellation-accent", C.accent),
284
- edgeFloor: r("--constellation-edge-floor", C.edgeFloor),
285
- edgeAccentAlpha: r("--constellation-edge-accent-alpha", C.edgeAccentAlpha)
276
+ node: n("--constellation-node", D.node),
277
+ nodeDim: n("--constellation-node-dim", D.nodeDim),
278
+ line: n("--constellation-line", D.line),
279
+ accent: n("--constellation-accent", D.accent),
280
+ alpha: r("--constellation-alpha", D.alpha),
281
+ edgeAlpha: r("--constellation-edge-alpha", D.edgeAlpha),
282
+ edgeFocusAlpha: r("--constellation-edge-focus-alpha", D.edgeFocusAlpha),
283
+ edgeAccentAlpha: r("--constellation-edge-accent-alpha", D.edgeAccentAlpha),
284
+ edgeFloor: r("--constellation-edge-floor", D.edgeFloor)
286
285
  };
287
286
  }
288
- function J(e) {
289
- let t = (e || "").trim(), n = t.match(/^#([0-9a-fA-F]{3,8})$/);
290
- if (n) {
291
- let e = n[1];
292
- if (e.length === 3) return [
293
- parseInt(e[0] + e[0], 16) / 255,
294
- parseInt(e[1] + e[1], 16) / 255,
295
- parseInt(e[2] + e[2], 16) / 255,
296
- 1
297
- ];
298
- if (e.length === 6 || e.length === 8) {
299
- let t = e.length === 8 ? parseInt(e.slice(6, 8), 16) / 255 : 1;
300
- return [
301
- parseInt(e.slice(0, 2), 16) / 255,
302
- parseInt(e.slice(2, 4), 16) / 255,
303
- parseInt(e.slice(4, 6), 16) / 255,
304
- t
305
- ];
306
- }
307
- }
308
- let r = t.match(/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)(?:[\s,/]+([\d.]+%?))?\s*\)$/i);
309
- if (r) {
310
- let e = r[4] == null ? 1 : be(r[4]);
311
- return [
312
- Y(Number(r[1]) / 255),
313
- Y(Number(r[2]) / 255),
314
- Y(Number(r[3]) / 255),
315
- e
316
- ];
287
+ function ve(e, t, n, r, i = 1) {
288
+ let a = $(t), o = r.alpha * i;
289
+ for (let t of n) t.focus ? (e.strokeStyle = r.line, e.lineWidth = a, e.globalAlpha = t.alpha * r.edgeFocusAlpha * o) : t.accent ? (e.strokeStyle = r.accent, e.lineWidth = 1.1 * a, e.globalAlpha = t.alpha * r.edgeAccentAlpha * o) : (e.strokeStyle = r.line, e.lineWidth = a, e.globalAlpha = (t.alpha * r.edgeAlpha + r.edgeFloor) * o), e.beginPath(), e.moveTo(t.ax, t.ay), e.lineTo(t.bx, t.by), e.stroke();
290
+ e.globalAlpha = 1;
291
+ }
292
+ function ye(e, t, n, r = 1, i = null, a = 0) {
293
+ let o = $(t);
294
+ e.globalAlpha = r;
295
+ for (let r of t.nodes) {
296
+ let s = ge(r, i, t.w, t.h, a);
297
+ e.fillStyle = r.dim ? n.nodeDim : n.node, e.beginPath(), e.arc(s.x, s.y, r.r * o, 0, Math.PI * 2), e.fill();
317
298
  }
318
- let i = t.match(/^hsla?\(\s*([\d.]+)(?:deg)?[\s,]+([\d.]+)%[\s,]+([\d.]+)%(?:[\s,/]+([\d.]+%?))?\s*\)$/i);
319
- if (i) {
320
- let e = i[4] == null ? 1 : be(i[4]), [t, n, r] = xe(Number(i[1]), Number(i[2]) / 100, Number(i[3]) / 100);
321
- return [
322
- t,
323
- n,
324
- r,
325
- e
326
- ];
299
+ e.globalAlpha = 1;
300
+ }
301
+ function be(e, t, n, r, i = 1) {
302
+ !n || n.x < 0 || (e.globalAlpha = .55 * i, e.fillStyle = r.node, e.beginPath(), e.arc(n.x, n.y, 2.6 * $(t), 0, Math.PI * 2), e.fill(), e.globalAlpha = 1);
303
+ }
304
+ function xe(e, t, n, r, i, a = 1) {
305
+ let o = $(t);
306
+ e.strokeStyle = i.line;
307
+ for (let t = r.length - 1; t >= 0; t--) {
308
+ let i = r[t];
309
+ i.start < 0 && (i.start = n);
310
+ let s = (n - i.start) / 900;
311
+ if (s >= 1) {
312
+ r.splice(t, 1);
313
+ continue;
314
+ }
315
+ e.globalAlpha = (1 - s) * .5 * a, e.lineWidth = 1.4 * o, e.beginPath(), e.arc(i.x, i.y, (8 + s * 130) * o, 0, Math.PI * 2), e.stroke();
327
316
  }
328
- return [
329
- .11,
330
- .09,
331
- .08,
332
- 1
333
- ];
334
- }
335
- function Y(e) {
336
- return e < 0 ? 0 : e > 1 ? 1 : e;
337
- }
338
- function be(e) {
339
- return Y(e.endsWith("%") ? Number(e.slice(0, -1)) / 100 : Number(e));
340
- }
341
- function xe(e, t, n) {
342
- let r = (e % 360 + 360) % 360, i = (1 - Math.abs(2 * n - 1)) * t, a = i * (1 - Math.abs(r / 60 % 2 - 1)), o = n - i / 2, s = 0, c = 0, l = 0;
343
- return r < 60 ? [s, c, l] = [
344
- i,
345
- a,
346
- 0
347
- ] : r < 120 ? [s, c, l] = [
348
- a,
349
- i,
350
- 0
351
- ] : r < 180 ? [s, c, l] = [
352
- 0,
353
- i,
354
- a
355
- ] : r < 240 ? [s, c, l] = [
356
- 0,
357
- a,
358
- i
359
- ] : r < 300 ? [s, c, l] = [
360
- a,
361
- 0,
362
- i
363
- ] : [s, c, l] = [
364
- i,
365
- 0,
366
- a
367
- ], [
368
- Y(s + o),
369
- Y(c + o),
370
- Y(l + o)
371
- ];
317
+ e.globalAlpha = 1;
372
318
  }
373
319
  //#endregion
374
320
  //#region src/components/constellation/composables/createConstellationField.ts
@@ -405,7 +351,7 @@ function Se(e, t, n = !1, r = !1, i = !1) {
405
351
  strength: 0,
406
352
  target: 0,
407
353
  cfg: {
408
- ...E,
354
+ ...A,
409
355
  ...s
410
356
  }
411
357
  } : void 0, {
@@ -415,461 +361,172 @@ function Se(e, t, n = !1, r = !1, i = !1) {
415
361
  };
416
362
  }
417
363
  //#endregion
418
- //#region src/components/constellation/shaders/constellation-points.wgsl.ts
419
- var Ce = "\n// ── Node storage row + uniforms (the typed-struct source-of-truth — uniformBridgeWGPU.ts) ──\nstruct Node {\n // (pos.x, pos.y, radius, dim)\n data: vec4<f32>,\n};\n\nstruct ConstellationUniforms {\n // u0: (resolution.x, resolution.y, dpr, kVis)\n u0: vec4<f32>,\n // u1: (time, lineWidth, opacityCeiling, alpha)\n u1: vec4<f32>,\n // uEdge: (edgeAlpha, edgeFocusAlpha, edgeAccentAlpha, edgeFloor)\n uEdge: vec4<f32>,\n // colours (premultiplied-ready rgba)\n uNode: vec4<f32>,\n uNodeDim: vec4<f32>,\n uLine: vec4<f32>,\n uAccent: vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> u: ConstellationUniforms;\n@group(0) @binding(1) var<storage, read> nodes: array<Node>;\n\nstruct VSOut {\n @builtin(position) pos: vec4<f32>,\n @location(0) uv: vec2<f32>, // [-1,1] billboard-local → fragment SDF coord\n @location(1) dim: f32, // 0 = full node, 1 = dim node\n};\n\n@vertex\nfn vs_main(\n @builtin(vertex_index) vIdx: u32,\n @builtin(instance_index) iIdx: u32,\n) -> VSOut {\n // Two-triangle quad corners in billboard-local space.\n var QUAD = array<vec2<f32>, 6>(\n vec2<f32>(-1.0, -1.0), vec2<f32>(1.0, -1.0), vec2<f32>(-1.0, 1.0),\n vec2<f32>(-1.0, 1.0), vec2<f32>(1.0, -1.0), vec2<f32>(1.0, 1.0),\n );\n let corner = QUAD[vIdx];\n\n let node = nodes[iIdx].data;\n let res = u.u0.xy;\n let dpr = u.u0.z;\n let kVis = u.u0.w;\n\n // center: node px → clip space (y-flip — px is y-down, clip is y-up).\n let centerPx = node.xy;\n let centerNdc = vec2<f32>(\n centerPx.x / max(res.x, 1.0) * 2.0 - 1.0,\n 1.0 - centerPx.y / max(res.y, 1.0) * 2.0,\n );\n // half-extent: radius·kVis in CSS px → backing-store px (·dpr) → NDC half (·2/res).\n // (the DPR-aware crispness leg — the disc samples at device resolution.)\n // (half is a WGSL reserved keyword — name it halfExt.)\n let radPx = node.z * kVis * dpr;\n let halfExt = vec2<f32>(radPx / max(res.x, 1.0) * 2.0, radPx / max(res.y, 1.0) * 2.0);\n\n var out: VSOut;\n out.pos = vec4<f32>(centerNdc + corner * halfExt, 0.0, 1.0);\n out.uv = corner;\n out.dim = node.w;\n return out;\n}\n\n@fragment\nfn fs_main(in: VSOut) -> @location(0) vec4<f32> {\n // SDF: distance to the unit-circle edge in billboard-local space (0 at the rim, neg inside).\n let d = length(in.uv) - 1.0;\n // fwidth(d) = |dpdx(d)| + |dpdy(d)| — the pixel footprint of the SDF, the resolution-\n // independent AA width (~1px band at ANY DPR/zoom/size).\n let aa = max(fwidth(d), 1e-4);\n let coverage = 1.0 - smoothstep(-aa, aa, d);\n if (coverage <= 0.0) { discard; }\n let col = mix(u.uNode, u.uNodeDim, in.dim);\n let a = col.a * coverage * u.u1.z; // ·opacityCeiling\n // premultiplied-alpha output.\n return vec4<f32>(col.rgb * a, a);\n}\n", we = "\nstruct Edge {\n // vec4 0: (a.x, a.y, b.x, b.y)\n ab: vec4<f32>,\n // vec4 1: (alpha, accent, focus, _pad)\n w: vec4<f32>,\n};\n\nstruct ConstellationUniforms {\n // u0: (resolution.x, resolution.y, dpr, kVis)\n u0: vec4<f32>,\n // u1: (time, lineWidth, opacityCeiling, alpha)\n u1: vec4<f32>,\n // uEdge: (edgeAlpha, edgeFocusAlpha, edgeAccentAlpha, edgeFloor)\n uEdge: vec4<f32>,\n uNode: vec4<f32>,\n uNodeDim: vec4<f32>,\n uLine: vec4<f32>,\n uAccent: vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> u: ConstellationUniforms;\n@group(0) @binding(1) var<storage, read> edges: array<Edge>;\n\nstruct VSOut {\n @builtin(position) pos: vec4<f32>,\n @location(0) lineCoord: f32, // [-1,1] cross-line → fragment AA\n @location(1) alpha: f32, // distance-falloff weight\n @location(2) accent: f32, // accent flag (the flagged-node tether tint)\n @location(3) focus: f32, // focus flag (the pointer-web tether)\n};\n\n@vertex\nfn vs_main(\n @builtin(vertex_index) vIdx: u32,\n @builtin(instance_index) iIdx: u32,\n) -> VSOut {\n var QUAD = array<vec2<f32>, 6>(\n vec2<f32>(-1.0, -1.0), vec2<f32>(1.0, -1.0), vec2<f32>(-1.0, 1.0),\n vec2<f32>(-1.0, 1.0), vec2<f32>(1.0, -1.0), vec2<f32>(1.0, 1.0),\n );\n let alongQuad = QUAD[vIdx];\n\n let e = edges[iIdx];\n let a = e.ab.xy;\n let b = e.ab.zw;\n let res = u.u0.xy;\n let dpr = u.u0.z;\n let kVis = u.u0.w;\n let lineW = u.u1.y;\n\n // Screen-space segment direction + orthogonal (the half-width offset axis).\n let dir = normalize(b - a + vec2<f32>(1e-6, 0.0));\n let ortho = vec2<f32>(-dir.y, dir.x);\n // Lerp along the segment (alongQuad.x ∈ [-1,1] → [0,1]); offset by ortho × half-width.\n // The accent tether reads a touch heavier (1.1× the neutral width).\n let halfWPx = lineW * kVis * dpr * 0.5 * mix(1.0, 1.1, e.w.y);\n let p = mix(a, b, alongQuad.x * 0.5 + 0.5) + ortho * (alongQuad.y) * halfWPx;\n\n // px (y-down) → clip (y-up).\n let ndc = vec2<f32>(\n p.x / max(res.x, 1.0) * 2.0 - 1.0,\n 1.0 - p.y / max(res.y, 1.0) * 2.0,\n );\n\n var out: VSOut;\n out.pos = vec4<f32>(ndc, 0.0, 1.0);\n out.lineCoord = alongQuad.y;\n out.alpha = e.w.x;\n out.accent = e.w.y;\n out.focus = e.w.z;\n return out;\n}\n\n@fragment\nfn fs_main(in: VSOut) -> @location(0) vec4<f32> {\n // Cross-line AA — a smoothstep on |lineCoord| so the hairline edge is crisp.\n let aaBand = 0.6;\n let cross = 1.0 - smoothstep(1.0 - aaBand, 1.0, abs(in.lineCoord));\n if (cross <= 0.0) { discard; }\n\n let dim = u.u1.w * u.u1.z; // alpha · opacityCeiling\n // Resolve the edge class: accent tether · focus pointer-web · neutral ambient.\n var col = u.uLine;\n var weight = (u.uEdge.x * in.alpha + u.uEdge.w) * dim; // edgeAlpha·falloff + edgeFloor\n if (in.accent > 0.5) {\n col = u.uAccent;\n weight = u.uEdge.z * in.alpha * dim; // edgeAccentAlpha\n } else if (in.focus > 0.5) {\n col = u.uLine;\n weight = u.uEdge.y * u.u1.w * u.u1.z * in.alpha; // edgeFocusAlpha · alpha · ceiling\n }\n\n let a = col.a * weight * cross;\n if (a <= 0.0) { discard; }\n return vec4<f32>(col.rgb * a, a);\n}\n", Te = 256 * 16, Ee = I * 32, X = {
420
- u0: 0,
421
- u1: 4,
422
- uEdge: 8,
423
- uNode: 12,
424
- uNodeDim: 16,
425
- uLine: 20,
426
- uAccent: 24
427
- };
428
- function De() {
429
- let e = /* @__PURE__ */ new ArrayBuffer(112);
430
- return {
431
- buffer: e,
432
- f32: new Float32Array(e)
433
- };
434
- }
435
- function Oe(e, t) {
436
- let { f32: n } = e;
437
- return n[X.u0 + 0] = t.resolutionX, n[X.u0 + 1] = t.resolutionY, n[X.u0 + 2] = t.dpr, n[X.u0 + 3] = t.kVis, n[X.u1 + 0] = t.time, n[X.u1 + 1] = t.lineWidth, n[X.u1 + 2] = t.opacityCeiling, n[X.u1 + 3] = t.alpha, n[X.uEdge + 0] = t.edgeAlpha, n[X.uEdge + 1] = t.edgeFocusAlpha, n[X.uEdge + 2] = t.edgeAccentAlpha, n[X.uEdge + 3] = t.edgeFloor, Z(n, X.uNode, t.node), Z(n, X.uNodeDim, t.nodeDim), Z(n, X.uLine, t.line), Z(n, X.uAccent, t.accent), e;
438
- }
439
- function Z(e, t, n) {
440
- e[t + 0] = n[0], e[t + 1] = n[1], e[t + 2] = n[2], e[t + 3] = n[3];
441
- }
442
- function ke() {
443
- return new Float32Array(256 * 4);
444
- }
445
- function Ae() {
446
- return new Float32Array(I * 8);
447
- }
448
- function je(e, t) {
449
- let n = Math.min(t.length, 256);
450
- for (let r = 0; r < n; r++) {
451
- let n = r * 4, i = t[r];
452
- e[n + 0] = i.x, e[n + 1] = i.y, e[n + 2] = i.r, e[n + 3] = i.dim;
453
- }
454
- return n;
455
- }
456
- function Me(e, t) {
457
- let n = Math.min(t.length, I);
458
- for (let r = 0; r < n; r++) {
459
- let n = r * 8, i = t[r];
460
- e[n + 0] = i.ax, e[n + 1] = i.ay, e[n + 2] = i.bx, e[n + 3] = i.by, e[n + 4] = i.alpha, e[n + 5] = i.accent, e[n + 6] = i.focus, e[n + 7] = 0;
461
- }
462
- return n;
463
- }
464
- //#endregion
465
- //#region src/components/constellation/composables/constellationWGPUSetup.ts
466
- var Ne = 64, Pe = 128, Fe = 8, Q = 1, Ie = 2;
467
- function Le(e) {
468
- let { canvas: t, resolveFrame: n, onResize: r, shouldContinue: i } = e;
469
- return function(e, a, o) {
470
- let s = e.createShaderModule({
471
- label: "[Constellation] constellation-points.wgsl",
472
- code: Ce
473
- }), c = e.createShaderModule({
474
- label: "[Constellation] constellation-lines.wgsl",
475
- code: we
476
- }), l = e.createBuffer({
477
- label: "[Constellation] uniforms",
478
- size: 112,
479
- usage: Ne | Fe
480
- }), u = e.createBuffer({
481
- label: "[Constellation] nodes",
482
- size: Te,
483
- usage: Pe | Fe
484
- }), d = e.createBuffer({
485
- label: "[Constellation] edges",
486
- size: Ee,
487
- usage: Pe | Fe
488
- }), f = e.createBindGroupLayout({
489
- label: "[Constellation] points-bgl",
490
- entries: [{
491
- binding: 0,
492
- visibility: Q | Ie,
493
- buffer: { type: "uniform" }
494
- }, {
495
- binding: 1,
496
- visibility: Q,
497
- buffer: { type: "read-only-storage" }
498
- }]
499
- }), p = e.createBindGroupLayout({
500
- label: "[Constellation] lines-bgl",
501
- entries: [{
502
- binding: 0,
503
- visibility: Q | Ie,
504
- buffer: { type: "uniform" }
505
- }, {
506
- binding: 1,
507
- visibility: Q,
508
- buffer: { type: "read-only-storage" }
509
- }]
510
- }), m = {
511
- color: {
512
- srcFactor: "one",
513
- dstFactor: "one-minus-src-alpha",
514
- operation: "add"
515
- },
516
- alpha: {
517
- srcFactor: "one",
518
- dstFactor: "one-minus-src-alpha",
519
- operation: "add"
520
- }
521
- }, h = e.createRenderPipeline({
522
- label: "[Constellation] points-pipeline",
523
- layout: e.createPipelineLayout({ bindGroupLayouts: [f] }),
524
- vertex: {
525
- module: s,
526
- entryPoint: "vs_main"
527
- },
528
- fragment: {
529
- module: s,
530
- entryPoint: "fs_main",
531
- targets: [{
532
- format: o,
533
- blend: m
534
- }]
535
- },
536
- primitive: { topology: "triangle-list" }
537
- }), g = e.createRenderPipeline({
538
- label: "[Constellation] lines-pipeline",
539
- layout: e.createPipelineLayout({ bindGroupLayouts: [p] }),
540
- vertex: {
541
- module: c,
542
- entryPoint: "vs_main"
543
- },
544
- fragment: {
545
- module: c,
546
- entryPoint: "fs_main",
547
- targets: [{
548
- format: o,
549
- blend: m
550
- }]
551
- },
552
- primitive: { topology: "triangle-list" }
553
- }), _ = e.createBindGroup({
554
- label: "[Constellation] points-bg",
555
- layout: f,
556
- entries: [{
557
- binding: 0,
558
- resource: { buffer: l }
559
- }, {
560
- binding: 1,
561
- resource: { buffer: u }
562
- }]
563
- }), v = e.createBindGroup({
564
- label: "[Constellation] lines-bg",
565
- layout: p,
566
- entries: [{
567
- binding: 0,
568
- resource: { buffer: l }
569
- }, {
570
- binding: 1,
571
- resource: { buffer: d }
572
- }]
573
- }), y = De(), b = ke(), x = Ae();
574
- function S(e) {
575
- r?.(e?.w ?? t.width, e?.h ?? t.height);
576
- }
577
- function C(t) {
578
- let r = n(t);
579
- if (!r) return;
580
- let i = je(b, r.nodes), o = Me(x, r.edges);
581
- Oe(y, r.uniforms), e.queue.writeBuffer(l, 0, y.buffer), i > 0 && e.queue.writeBuffer(u, 0, b.buffer, b.byteOffset, i * 4 * 4), o > 0 && e.queue.writeBuffer(d, 0, x.buffer, x.byteOffset, o * 8 * 4);
582
- let s = a.getCurrentTexture().createView(), c = e.createCommandEncoder({ label: "[Constellation] frame" }), f = c.beginRenderPass({ colorAttachments: [{
583
- view: s,
584
- clearValue: {
585
- r: 0,
586
- g: 0,
587
- b: 0,
588
- a: 0
589
- },
590
- loadOp: "clear",
591
- storeOp: "store"
592
- }] });
593
- o > 0 && (f.setPipeline(g), f.setBindGroup(0, v), f.draw(6, o, 0, 0)), i > 0 && (f.setPipeline(h), f.setBindGroup(0, _), f.draw(6, i, 0, 0)), f.end(), e.queue.submit([c.finish()]);
594
- }
595
- return {
596
- frame: C,
597
- shouldContinue: i,
598
- resize: S,
599
- teardown: () => {
600
- l.destroy(), u.destroy(), d.destroy();
601
- }
602
- };
603
- };
604
- }
605
- //#endregion
606
- //#region src/components/constellation/shaders/constellation-points.glsl.ts
607
- var Re = "#version 300 es\nprecision highp float;\n\n// per-instance node row (x, y, radius, dim) — vertexAttribDivisor(1).\nlayout(location = 0) in vec4 aNode;\n\nuniform vec2 uResolution;\nuniform float uDpr;\nuniform float uKVis;\n\nout vec2 vUv; // [-1,1] billboard-local → fragment SDF coord\nout float vDim;\n\nvoid main() {\n // Two-triangle quad corners (the SAME order as the WGSL QUAD).\n vec2 quad[6] = vec2[6](\n vec2(-1.0, -1.0), vec2(1.0, -1.0), vec2(-1.0, 1.0),\n vec2(-1.0, 1.0), vec2(1.0, -1.0), vec2(1.0, 1.0)\n );\n vec2 corner = quad[gl_VertexID];\n\n vec2 centerPx = aNode.xy;\n // px (y-down) → clip (y-up).\n vec2 centerNdc = vec2(\n centerPx.x / max(uResolution.x, 1.0) * 2.0 - 1.0,\n 1.0 - centerPx.y / max(uResolution.y, 1.0) * 2.0\n );\n // half-extent: radius·kVis CSS px → backing-store px (·dpr) → NDC half (·2/res).\n // (half is a GLSL reserved word — name it halfExt.)\n float radPx = aNode.z * uKVis * uDpr;\n vec2 halfExt = vec2(\n radPx / max(uResolution.x, 1.0) * 2.0,\n radPx / max(uResolution.y, 1.0) * 2.0\n );\n\n gl_Position = vec4(centerNdc + corner * halfExt, 0.0, 1.0);\n vUv = corner;\n vDim = aNode.w;\n}\n", ze = "#version 300 es\nprecision highp float;\n\nuniform vec4 uNode; // premultiplied-ready rgba\nuniform vec4 uNodeDim;\nuniform float uOpacityCeiling;\n\nin vec2 vUv;\nin float vDim;\nout vec4 fragColor;\n\nvoid main() {\n // SDF: distance to the unit-circle edge (0 at the rim, neg inside).\n float d = length(vUv) - 1.0;\n // fwidth(d) — the pixel footprint, the resolution-independent AA width.\n float aa = max(fwidth(d), 1e-4);\n float coverage = 1.0 - smoothstep(-aa, aa, d);\n if (coverage <= 0.0) { discard; }\n vec4 col = mix(uNode, uNodeDim, vDim);\n float a = col.a * coverage * uOpacityCeiling;\n fragColor = vec4(col.rgb * a, a); // premultiplied\n}\n", Be = "#version 300 es\nprecision highp float;\n\n// per-instance edge rows — vertexAttribDivisor(1).\nlayout(location = 0) in vec4 aAB; // (a.x, a.y, b.x, b.y)\nlayout(location = 1) in vec4 aW; // (alpha, accent, focus, _pad)\n\nuniform vec2 uResolution;\nuniform float uDpr;\nuniform float uKVis;\nuniform float uLineWidth;\n\nout float vLineCoord;\nout float vAlpha;\nout float vAccent;\nout float vFocus;\n\nvoid main() {\n vec2 quad[6] = vec2[6](\n vec2(-1.0, -1.0), vec2(1.0, -1.0), vec2(-1.0, 1.0),\n vec2(-1.0, 1.0), vec2(1.0, -1.0), vec2(1.0, 1.0)\n );\n vec2 alongQuad = quad[gl_VertexID];\n\n vec2 a = aAB.xy;\n vec2 b = aAB.zw;\n vec2 dir = normalize(b - a + vec2(1e-6, 0.0));\n vec2 ortho = vec2(-dir.y, dir.x);\n // accent tether reads a touch heavier (1.1×).\n float halfWPx = uLineWidth * uKVis * uDpr * 0.5 * mix(1.0, 1.1, aW.y);\n vec2 p = mix(a, b, alongQuad.x * 0.5 + 0.5) + ortho * alongQuad.y * halfWPx;\n\n vec2 ndc = vec2(\n p.x / max(uResolution.x, 1.0) * 2.0 - 1.0,\n 1.0 - p.y / max(uResolution.y, 1.0) * 2.0\n );\n\n gl_Position = vec4(ndc, 0.0, 1.0);\n vLineCoord = alongQuad.y;\n vAlpha = aW.x;\n vAccent = aW.y;\n vFocus = aW.z;\n}\n", Ve = "#version 300 es\nprecision highp float;\n\nuniform vec4 uLine; // premultiplied-ready rgba\nuniform vec4 uAccent;\nuniform float uAlphaGlobal; // --constellation-alpha\nuniform float uOpacityCeiling;\nuniform float uEdgeAlpha;\nuniform float uEdgeFocusAlpha;\nuniform float uEdgeAccentAlpha;\nuniform float uEdgeFloor;\n\nin float vLineCoord;\nin float vAlpha;\nin float vAccent;\nin float vFocus;\nout vec4 fragColor;\n\nvoid main() {\n float aaBand = 0.6;\n float cross = 1.0 - smoothstep(1.0 - aaBand, 1.0, abs(vLineCoord));\n if (cross <= 0.0) { discard; }\n\n float dim = uAlphaGlobal * uOpacityCeiling;\n vec4 col = uLine;\n float weight = (uEdgeAlpha * vAlpha + uEdgeFloor) * dim;\n if (vAccent > 0.5) {\n col = uAccent;\n weight = uEdgeAccentAlpha * vAlpha * dim;\n } else if (vFocus > 0.5) {\n col = uLine;\n weight = uEdgeFocusAlpha * uAlphaGlobal * uOpacityCeiling * vAlpha;\n }\n\n float a = col.a * weight * cross;\n if (a <= 0.0) { discard; }\n fragColor = vec4(col.rgb * a, a);\n}\n";
608
- //#endregion
609
- //#region src/components/constellation/composables/constellationGLSetup.ts
610
- function $(e, t, n) {
611
- let r = e.createShader(t);
612
- if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
613
- let t = e.getShaderInfoLog(r);
614
- throw e.deleteShader(r), Error(`[Constellation] shader compile failed: ${t}`);
615
- }
616
- return r;
617
- }
618
- function He(e, t, n) {
619
- let r = e.createProgram();
620
- if (e.attachShader(r, t), e.attachShader(r, n), e.linkProgram(r), !e.getProgramParameter(r, e.LINK_STATUS)) throw Error(`[Constellation] link failed: ${e.getProgramInfoLog(r)}`);
621
- return e.deleteShader(t), e.deleteShader(n), r;
622
- }
623
- function Ue(e) {
624
- let { canvas: t, resolveFrame: n, onResize: r, shouldContinue: i } = e;
625
- return function(e) {
626
- let a = He(e, $(e, e.VERTEX_SHADER, Re), $(e, e.FRAGMENT_SHADER, ze)), o = He(e, $(e, e.VERTEX_SHADER, Be), $(e, e.FRAGMENT_SHADER, Ve)), s = e.createVertexArray();
627
- e.bindVertexArray(s);
628
- let c = e.createBuffer();
629
- e.bindBuffer(e.ARRAY_BUFFER, c), e.bufferData(e.ARRAY_BUFFER, 256 * 4 * 4, e.DYNAMIC_DRAW), e.enableVertexAttribArray(0), e.vertexAttribPointer(0, 4, e.FLOAT, !1, 16, 0), e.vertexAttribDivisor(0, 1), e.bindVertexArray(null);
630
- let l = e.createVertexArray();
631
- e.bindVertexArray(l);
632
- let u = e.createBuffer();
633
- e.bindBuffer(e.ARRAY_BUFFER, u), e.bufferData(e.ARRAY_BUFFER, I * 8 * 4, e.DYNAMIC_DRAW), e.enableVertexAttribArray(0), e.vertexAttribPointer(0, 4, e.FLOAT, !1, 32, 0), e.vertexAttribDivisor(0, 1), e.enableVertexAttribArray(1), e.vertexAttribPointer(1, 4, e.FLOAT, !1, 32, 16), e.vertexAttribDivisor(1, 1), e.bindVertexArray(null);
634
- let d = (t) => e.getUniformLocation(a, t), f = (t) => e.getUniformLocation(o, t), p = d("uResolution"), m = d("uDpr"), h = d("uKVis"), g = d("uNode"), _ = d("uNodeDim"), v = d("uOpacityCeiling"), y = f("uResolution"), b = f("uDpr"), x = f("uKVis"), S = f("uLineWidth"), C = f("uLine"), w = f("uAccent"), T = f("uAlphaGlobal"), E = f("uOpacityCeiling"), D = f("uEdgeAlpha"), O = f("uEdgeFocusAlpha"), k = f("uEdgeAccentAlpha"), A = f("uEdgeFloor"), j = ke(), M = Ae();
635
- function N(n) {
636
- e.viewport(0, 0, n?.w ?? t.width, n?.h ?? t.height), r?.(n?.w ?? t.width, n?.h ?? t.height);
637
- }
638
- function P(r) {
639
- let i = n(r);
640
- if (!i) return;
641
- let d = je(j, i.nodes), f = Me(M, i.edges), N = i.uniforms;
642
- e.viewport(0, 0, t.width, t.height), e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), f > 0 && (e.useProgram(o), e.bindVertexArray(l), e.bindBuffer(e.ARRAY_BUFFER, u), e.bufferSubData(e.ARRAY_BUFFER, 0, M.subarray(0, f * 8)), e.uniform2f(y, N.resolutionX, N.resolutionY), e.uniform1f(b, N.dpr), e.uniform1f(x, N.kVis), e.uniform1f(S, N.lineWidth), e.uniform4f(C, N.line[0], N.line[1], N.line[2], N.line[3]), e.uniform4f(w, N.accent[0], N.accent[1], N.accent[2], N.accent[3]), e.uniform1f(T, N.alpha), e.uniform1f(E, N.opacityCeiling), e.uniform1f(D, N.edgeAlpha), e.uniform1f(O, N.edgeFocusAlpha), e.uniform1f(k, N.edgeAccentAlpha), e.uniform1f(A, N.edgeFloor), e.drawArraysInstanced(e.TRIANGLES, 0, 6, f)), d > 0 && (e.useProgram(a), e.bindVertexArray(s), e.bindBuffer(e.ARRAY_BUFFER, c), e.bufferSubData(e.ARRAY_BUFFER, 0, j.subarray(0, d * 4)), e.uniform2f(p, N.resolutionX, N.resolutionY), e.uniform1f(m, N.dpr), e.uniform1f(h, N.kVis), e.uniform4f(g, N.node[0], N.node[1], N.node[2], N.node[3]), e.uniform4f(_, N.nodeDim[0], N.nodeDim[1], N.nodeDim[2], N.nodeDim[3]), e.uniform1f(v, N.opacityCeiling), e.drawArraysInstanced(e.TRIANGLES, 0, 6, d)), e.bindVertexArray(null);
643
- }
644
- return {
645
- frame: P,
646
- shouldContinue: i,
647
- resize: N,
648
- teardown: () => {
649
- e.deleteProgram(a), e.deleteProgram(o), e.deleteVertexArray(s), e.deleteVertexArray(l), e.deleteBuffer(c), e.deleteBuffer(u);
650
- }
651
- };
652
- };
653
- }
654
- //#endregion
655
364
  //#region src/components/constellation/composables/useConstellation.ts
656
- var We = {
365
+ var Ce = {
657
366
  gain: 5200,
658
367
  reach: 480,
659
368
  maxSpeed: 1.6,
660
369
  soften: 24,
661
370
  ramp: 4
662
- }, Ge = .5;
663
- function Ke(e, t, r, d = {}) {
664
- let f = d.routePointer, p = Math.min(e.count ?? 64, 256), h = e.link ?? 132, v = e.speed ?? .16, b = e.parallax ?? 0, x = e.seed, w = e.warpOnClick ?? !1, T = e.wander ?? !1, E = e.gravityWell || (f ? { ...We } : !1), D = e.pinned ?? !1, O = e.pinnedDrift ?? !1, k = e.warpAutoRelease ?? !1, A = u(() => x === void 0 ? Math.random : c(typeof x == "string" ? l(x) : x)), j = () => typeof window < "u" && /[?&](export|print|freeze)\b/.test(window.location.search), M = m()?.vnode.props?.freeze, N = u(() => M === void 0 ? j() : M === !0 || M === ""), { field: P, wanderOverride: F, wellOverride: ee } = Se(T, E, D, O, k), L = {
371
+ }, we = .5, Te = 0;
372
+ function Ee(e, n, i, f = {}) {
373
+ let p = f.routePointer, m = Math.min(e.count ?? 64, 256), g = e.link ?? 132, y = e.speed ?? .16, C = e.parallax ?? 0, w = e.seed, T = e.warpOnClick ?? !1, O = e.wander ?? !1, k = e.gravityWell || (p ? { ...Ce } : !1), A = e.pinned ?? !1, j = e.pinnedDrift ?? !1, M = e.warpAutoRelease ?? !1, N = d(() => w === void 0 ? Math.random : l(typeof w == "string" ? u(w) : w)), P = h()?.vnode.props?.freeze, F = () => typeof window < "u" && /[?&](export|print|freeze)\b/.test(window.location.search), I = d(() => P === void 0 ? F() : P === !0 || P === ""), { field: L, wanderOverride: R, wellOverride: ee } = Se(O, k, A, j, M), B = {
665
374
  x: -1,
666
375
  y: -1
667
- }, te = [], R = { ...C }, z = -1, ne = !1, B = n(f ? {
376
+ }, V = [], H = x(null), U = r(p ? {
668
377
  respectReducedMotion: !0,
669
378
  halfLifeMs: 600,
670
379
  mass: 1.3,
671
380
  damping: .9,
672
381
  attractorResponse: .5
673
- } : { respectReducedMotion: !0 }), V = null, H = "webgpu", U = y(null), W = [], ie = qe();
674
- return g(() => {
675
- let n = r.value;
676
- if (!n) return;
677
- let c = () => V ? V.reducedMotion : typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, l = t.value, u = (e) => {
678
- let t = n.getBoundingClientRect();
382
+ } : { respectReducedMotion: !0 }), W = S(s("canvas2d")), G = null, K = () => U.dispose();
383
+ return v(() => K()), _(() => {
384
+ let r = i.value;
385
+ if (!r) return;
386
+ let s = { ...D }, l = !0, u = !1, d = -1, f = !1, h, _ = () => G?.reducedMotion ?? !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, v = (e) => {
387
+ let t = r.getBoundingClientRect();
679
388
  if (!t.width || !t.height) return null;
680
- let r = (e.clientX - t.left) / t.width, i = (e.clientY - t.top) / t.height;
681
- return r < 0 || i < 0 || r > 1 || i > 1 ? null : {
682
- x: r * P.w,
683
- y: i * P.h
389
+ let n = (e.clientX - t.left) / t.width, i = (e.clientY - t.top) / t.height;
390
+ return n < 0 || i < 0 || n > 1 || i > 1 ? null : {
391
+ x: n * L.w,
392
+ y: i * L.h
684
393
  };
685
394
  };
686
- U.value = u;
687
- let d = () => e.pointerReactive ?? !0, m = (e) => {
688
- if (N.value || c()) return;
689
- if (B.onPointerMove(e), !d()) {
690
- L.x = -1, L.y = -1;
691
- return;
692
- }
693
- let t = u(e);
694
- t && (L.x = t.x, L.y = t.y), V?.wake();
695
- }, g = () => {
696
- B.onPointerLeave(), L.x = -1, L.y = -1;
697
- }, y = () => {
698
- B.onPointerEnter(), V?.wake();
699
- }, x = (e) => {
700
- if (!w || N.value || c()) return;
701
- let t = u(e);
702
- t && K(P, t.x, t.y), V?.wake();
703
- }, C = l ?? n;
704
- N.value || (C.addEventListener("pointermove", m), C.addEventListener("pointerenter", y), C.addEventListener("pointerleave", g), w && C.addEventListener("pointerdown", x)), _(() => {
705
- C.removeEventListener("pointermove", m), C.removeEventListener("pointerenter", y), C.removeEventListener("pointerleave", g), C.removeEventListener("pointerdown", x), B.dispose(), V?.dispose();
395
+ H.value = v;
396
+ let b = () => {
397
+ h !== void 0 && clearTimeout(h), h = void 0, L.well && (L.well.target = 0), G?.wake();
398
+ }, x = n.value ?? r, S = [], w = (e, t) => {
399
+ x.addEventListener(e, t), S.push([e, t]);
400
+ };
401
+ !p && !I.value && (w("pointerenter", (() => {
402
+ U.onPointerEnter(), G?.wake();
403
+ })), w("pointermove", ((t) => {
404
+ if (_()) return;
405
+ U.onPointerMove(t);
406
+ let n = v(t);
407
+ e.pointerReactive !== !1 && n ? (B.x = n.x, B.y = n.y) : (B.x = -1, B.y = -1), L.well?.target && n && (L.well.x = n.x, L.well.y = n.y), G?.wake();
408
+ })), w("pointerleave", (() => {
409
+ U.onPointerLeave(), B.x = -1, B.y = -1, b();
410
+ })), w("pointerdown", ((t) => {
411
+ if (_()) return;
412
+ let n = v(t);
413
+ n && (e.pointerReactive !== !1 && V.push({
414
+ ...n,
415
+ start: -1
416
+ }), T && X(L, n.x, n.y), e.gravityWell && L.well && (L.well.x = n.x, L.well.y = n.y, h = setTimeout(() => {
417
+ L.well && (L.well.target = 1), G?.wake();
418
+ }, L.well.cfg.holdMs)), G?.wake());
419
+ })), w("pointerup", b), w("pointercancel", b), (T || e.gravityWell) && (w("keydown", ((t) => {
420
+ if (t.repeat || t.key !== "Enter" && t.key !== " " || _()) return;
421
+ t.preventDefault();
422
+ let n = L.w / 2, r = L.h / 2;
423
+ T && X(L, n, r), e.gravityWell && L.well && (L.well.x = n, L.well.y = r, L.well.target = 1), G?.wake();
424
+ })), w("keyup", ((e) => {
425
+ (e.key === "Enter" || e.key === " ") && b();
426
+ }))));
427
+ let O = typeof MutationObserver > "u" ? null : new MutationObserver(() => {
428
+ l = !0, I.value ? G?.resume("manual") : G?.wake();
706
429
  });
707
- let T = {
708
- resolveFrame: (t) => {
709
- let r = Math.min(typeof window < "u" && window.devicePixelRatio || 1, 2), o = n.width ? n.width / r : S, s = n.height ? n.height / r : 720, l = o / S;
710
- P.canvas = n;
711
- let u = parseFloat(getComputedStyle(n).getPropertyValue("--constellation-k-floor"));
712
- if (P.kFloor = Number.isFinite(u) ? u : void 0, P.dpr = r, P.w !== o || P.h !== s) {
713
- let e = P.w, t = P.h;
714
- if (P.w = o, P.h = s, P.k = l, P.nodes.length ? pe(P, e, t) : (P.nodes = fe(A.value, p, o, s, v), P.warp.x = o / 2, P.warp.y = s / 2), R = ye(n), !ne) {
715
- ne = !0;
716
- let e = re(n);
717
- P.warpCfg = e.warp, P.well && (P.well.cfg = {
430
+ O?.observe(document.documentElement, {
431
+ attributes: !0,
432
+ attributeFilter: ["class"]
433
+ }), G = t({
434
+ canvas: i,
435
+ respectReducedMotion: !0,
436
+ setup: () => ({ render(t, n) {
437
+ let i = Math.min(window.devicePixelRatio || 1, 2), c = r.width ? r.width / i : E, h = r.height ? r.height / i : 720, v = c / E;
438
+ L.canvas = r, L.dpr = i;
439
+ let b = Number.parseFloat(getComputedStyle(r).getPropertyValue("--constellation-k-floor"));
440
+ if (L.kFloor = Number.isFinite(b) ? b : void 0, L.w !== c || L.h !== h) {
441
+ let e = L.w, t = L.h;
442
+ if (L.w = c, L.h = h, L.k = v, L.nodes.length ? fe(L, e, t) : (L.nodes = de(N.value, m, c, h, y), L.warp.x = c / 2, L.warp.y = h / 2), !u) {
443
+ u = !0;
444
+ let e = re(r);
445
+ L.warpCfg = e.warp, L.well && (L.well.cfg = {
718
446
  ...e.well,
719
447
  ...ee
720
- }), P.wander && (P.wander.minIdle = F.minIdle ?? e.wander.minIdle, P.wander.jitter = F.jitter ?? e.wander.jitter);
448
+ }), L.wander && (L.wander.minIdle = R.minIdle ?? e.wander.minIdle, L.wander.jitter = R.jitter ?? e.wander.jitter);
721
449
  }
722
450
  }
723
- P.k = l;
724
- let d = t * 1e3, m = z < 0 ? 0 : (d - z) / 1e3, g = z < 0 ? 0 : d - z;
725
- z = d;
726
- let _ = N.value || c();
727
- if (_ && P.well && (P.well.strength = 0, P.well.target = 0, P.well.x = -1, P.well.y = -1), f && !_) {
728
- let e = f(), t = !1;
729
- if (e && e.active && typeof window < "u") {
730
- let r = n.getBoundingClientRect();
731
- if (r.width > 0 && r.height > 0) {
732
- let n = (e.x * window.innerWidth - r.left) / r.width, i = (e.y * window.innerHeight - r.top) / r.height;
733
- t = n >= 0 && n <= 1 && i >= 0 && i <= 1, t && B.setPointer(n, i);
451
+ L.k = v, l &&= (s = _e(r), !1);
452
+ let x = I.value || _(), S = d < 0 ? 0 : n - d, w = S / 1e3;
453
+ if (d = n, x && L.well && (L.well.strength = 0, L.well.target = 0, L.well.x = -1, L.well.y = -1), p && !x) {
454
+ let e = p(), t = !1;
455
+ if (e?.active) {
456
+ let n = r.getBoundingClientRect();
457
+ if (n.width && n.height) {
458
+ let r = (e.x * window.innerWidth - n.left) / n.width, i = (e.y * window.innerHeight - n.top) / n.height;
459
+ t = r >= 0 && r <= 1 && i >= 0 && i <= 1, t && U.setPointer(r, i);
734
460
  }
735
461
  }
736
- B.setActive(t);
462
+ U.setActive(t);
737
463
  }
738
- if (B.tick(_ ? 0 : g), f && P.well && !_) {
739
- let e = a(i(B));
740
- P.well.x = e.x * o, P.well.y = e.y * s, P.well.target = e.engagement * Ge;
464
+ if (U.tick(x ? 0 : S), p && L.well && !x) {
465
+ let e = o(a(U));
466
+ L.well.x = e.x * c, L.well.y = e.y * h, L.well.target = e.engagement * we;
741
467
  }
742
- let y = e.pointerReactive ?? !0, x = e.opacityCeiling ?? 1, C = e.accentEdges ?? !1, w = y ? L : null, T = null;
743
- if (w && !_) {
744
- let e = B.velocity.value;
745
- T = {
746
- x: e.x * o / 60,
747
- y: e.y * s / 60
748
- }, L.x >= 0 && de(P, L, B.burst.value, te);
468
+ let T = e.pointerReactive !== !1, D = T ? B : null, O = null;
469
+ if (D && !x) {
470
+ let e = U.velocity.value;
471
+ O = {
472
+ x: e.x * c / 60,
473
+ y: e.y * h / 60
474
+ }, B.x >= 0 && ue(L, B, U.burst.value, V);
749
475
  }
750
- _ || me(P, l, v, w, m, d, A.value, T);
751
- let E = ve(P), D = n.width || Math.round(o * r), O = n.height || Math.round(s * r), k = ie;
752
- k.resolutionX = D, k.resolutionY = O, k.dpr = r, k.kVis = E, k.time = t, k.lineWidth = 1, k.opacityCeiling = x, k.alpha = R.alpha, k.edgeAlpha = R.edgeAlpha, k.edgeFocusAlpha = R.edgeFocusAlpha, k.edgeAccentAlpha = R.edgeAccentAlpha, k.edgeFloor = R.edgeFloor, k.node = J(R.node), k.nodeDim = J(R.nodeDim), k.line = J(R.line), k.accent = J(R.accent);
753
- let j = _ ? 0 : b, M = y ? L : null;
754
- W.length = 0;
755
- let V = D / Math.max(o, 1), H = O / Math.max(s, 1);
756
- for (let e = 0; e < P.nodes.length; e++) {
757
- let t = P.nodes[e], n = _e(t, M, o, s, j);
758
- W.push({
759
- x: n.x * V,
760
- y: n.y * H,
761
- r: t.r,
762
- dim: +!!t.dim
763
- });
476
+ x || pe(L, v, y, D, w, n, N.value, O);
477
+ let k = me(L, g, e.accentEdges ? L.pinnedIndex >= 0 ? L.pinnedIndex : L.focalIndex : -1, z);
478
+ T && !x && he(k, L, g, B, z);
479
+ let A = e.opacityCeiling ?? 1;
480
+ if (t.clearRect(0, 0, c, h), ve(t, L, k, s, A), ye(t, L, s, A, D, x ? 0 : C), T && !x && (be(t, L, B, s, A), xe(t, L, n, V, s, A)), e.drawOverlay) {
481
+ t.save();
482
+ try {
483
+ e.drawOverlay(t, L, x ? Te : n);
484
+ } finally {
485
+ t.restore();
486
+ }
764
487
  }
765
- let U = he(P, h, C ? P.pinnedIndex >= 0 ? P.pinnedIndex : P.focalIndex : -1, I);
766
- y && !_ && ge(U, P, h, L, I);
767
- let G = [];
768
- for (let e of U) G.push({
769
- ax: e.ax * V,
770
- ay: e.ay * H,
771
- bx: e.bx * V,
772
- by: e.by * H,
773
- alpha: e.alpha,
774
- accent: e.accent,
775
- focus: e.focus
776
- });
777
- return {
778
- nodes: W,
779
- edges: G,
780
- uniforms: k
781
- };
782
- },
783
- shouldContinue: () => !0
488
+ I.value && G && !f && (f = !0, queueMicrotask(() => {
489
+ f = !1, G?.suspend("manual");
490
+ }));
491
+ } })
492
+ }), W.value = c(), K = () => {
493
+ h !== void 0 && clearTimeout(h), O?.disconnect();
494
+ for (let [e, t] of S) x.removeEventListener(e, t);
495
+ U.dispose(), G?.dispose(), G = null;
784
496
  };
785
- V = s(n, {
786
- mode: "live",
787
- respectReducedMotion: !0,
788
- dprPolicy: o,
789
- revealBloom: !0,
790
- setupWGPU: Le({
791
- canvas: n,
792
- ...T
793
- }),
794
- setupGL: Ue({
795
- canvas: n,
796
- ...T
797
- })
798
- }), V.armAsync().then(() => {
799
- H = V?.backend ?? "webgpu";
800
- });
801
497
  }), {
802
- field: P,
803
- isFrozen: N,
804
- backend: () => H,
498
+ field: L,
499
+ isFrozen: I,
805
500
  warpTo(e, t) {
806
- if (typeof e == "number" && typeof t == "number") {
807
- let n = U.value?.({
808
- clientX: e,
809
- clientY: t
810
- });
811
- return n ? K(P, n.x, n.y) : -1;
812
- }
813
- let n = e;
814
- return K(P, n.x, n.y);
501
+ if (I.value) return -1;
502
+ let n = typeof e == "number" && typeof t == "number" ? H.value?.({
503
+ clientX: e,
504
+ clientY: t
505
+ }) : e;
506
+ if (!n) return -1;
507
+ let r = X(L, n.x, n.y);
508
+ return G?.wake(), r;
815
509
  },
816
510
  holdWellAt(e, t) {
817
- return P.well ? (P.well.x = e, P.well.y = t, P.well.target = 1, !0) : !1;
511
+ return !L.well || I.value ? !1 : (L.well.x = e, L.well.y = t, L.well.target = 1, G?.wake(), !0);
818
512
  },
819
513
  releaseWell() {
820
- P.well && (P.well.target = 0);
821
- },
822
- warpSettled() {
823
- return q(P);
514
+ L.well && (L.well.target = 0, G?.wake());
824
515
  },
516
+ warpSettled: () => Z(L),
825
517
  pinNode(e) {
826
- P.pinnedIndex = e, P.pinnedDrift && (P.pinnedDrift.nextAt = -1);
827
- }
828
- };
829
- }
830
- function qe() {
831
- return {
832
- resolutionX: 0,
833
- resolutionY: 0,
834
- dpr: 1,
835
- kVis: 1,
836
- time: 0,
837
- lineWidth: 1,
838
- opacityCeiling: 1,
839
- alpha: C.alpha,
840
- edgeAlpha: C.edgeAlpha,
841
- edgeFocusAlpha: C.edgeFocusAlpha,
842
- edgeAccentAlpha: C.edgeAccentAlpha,
843
- edgeFloor: C.edgeFloor,
844
- node: [
845
- .7,
846
- .69,
847
- .64,
848
- 1
849
- ],
850
- nodeDim: [
851
- .8,
852
- .78,
853
- .74,
854
- 1
855
- ],
856
- line: [
857
- .11,
858
- .09,
859
- .08,
860
- 1
861
- ],
862
- accent: [
863
- .7,
864
- .31,
865
- .19,
866
- 1
867
- ]
518
+ L.pinnedIndex = e, L.pinnedDrift && (L.pinnedDrift.nextAt = -1), G?.wake();
519
+ },
520
+ rendererStatus: b(W)
868
521
  };
869
522
  }
870
523
  //#endregion
871
- //#region src/components/constellation/Constellation.vue
872
- var Je = /* @__PURE__ */ t(/* @__PURE__ */ p({
524
+ //#region src/components/constellation/Constellation.vue?vue&type=script&setup=true&lang.ts
525
+ var De = [
526
+ "role",
527
+ "tabindex",
528
+ "aria-label"
529
+ ], Oe = /* @__PURE__ */ n(/* @__PURE__ */ m({
873
530
  __name: "Constellation",
874
531
  props: {
875
532
  count: { default: 64 },
@@ -918,23 +575,30 @@ var Je = /* @__PURE__ */ t(/* @__PURE__ */ p({
918
575
  class: {},
919
576
  drawOverlay: {}
920
577
  },
921
- setup(t, { expose: n }) {
922
- let i = t, a = x("hostRef"), o = x("canvasRef"), s = r();
923
- return n(Ke(i, a, o, { routePointer: i.backgroundInteractive ? () => ({
924
- x: s.pointer.value.x,
925
- y: s.pointer.value.y,
926
- active: s.active.value
927
- }) : void 0 })), (t, n) => (v(), d("div", {
578
+ emits: ["rendererStatus"],
579
+ setup(t, { expose: n, emit: r }) {
580
+ let a = r, o = t, s = w("hostRef"), c = w("canvasRef"), l = i(), u = o.backgroundInteractive ? () => ({
581
+ x: l.pointer.value.x,
582
+ y: l.pointer.value.y,
583
+ active: l.active.value
584
+ }) : void 0, m = d(() => !o.backgroundInteractive && (o.warpOnClick || !!o.gravityWell)), h = d(() => o.warpOnClick && o.gravityWell ? "Move the constellation focal point or pull the field" : o.gravityWell ? "Pull the constellation field" : "Move the constellation focal point"), _ = Ee(o, s, c, { routePointer: u });
585
+ return T(_.rendererStatus, (e) => a("rendererStatus", e), {
586
+ immediate: !0,
587
+ flush: "sync"
588
+ }), n(_), (t, n) => (y(), f("div", {
928
589
  ref_key: "hostRef",
929
- ref: a,
930
- class: h(b(e)("constellation", i.class))
931
- }, [f("canvas", {
590
+ ref: s,
591
+ class: g(C(e)("constellation", o.class)),
592
+ role: m.value ? "button" : void 0,
593
+ tabindex: m.value ? 0 : void 0,
594
+ "aria-label": m.value ? h.value : void 0
595
+ }, [p("canvas", {
932
596
  ref_key: "canvasRef",
933
- ref: o,
597
+ ref: c,
934
598
  class: "constellation-canvas",
935
599
  "aria-hidden": "true"
936
- }, null, 512)], 2));
600
+ }, null, 512)], 10, De));
937
601
  }
938
- }), [["__scopeId", "data-v-077b3057"]]);
602
+ }), [["__scopeId", "data-v-24255510"]]);
939
603
  //#endregion
940
- export { S as BASE_WIDTH, ue as BURST_FIRE_THRESHOLD, Je as Constellation, N as DEFAULT_K_FLOOR, C as DEFAULT_PALETTE, ee as DEFAULT_PARALLAX, A as DEFAULT_PINNED_DRIFT_DUR, k as DEFAULT_PINNED_DRIFT_FRAC, j as DEFAULT_PINNED_DRIFT_IDLE, M as DEFAULT_PINNED_DRIFT_JITTER, D as DEFAULT_WANDER_IDLE, O as DEFAULT_WANDER_JITTER, E as DEFAULT_WELL_CONFIG, I as E_MAX, F as MAX_DEGREE, P as MAX_NODES, w as WARP_RESPONSE, T as WARP_ZETA, ge as appendPointerWeb, he as buildEdges, de as fireBurst, ve as kVisOf, se as makePinnedDrift, W as nearestNode, _e as parallaxNodePos, J as parseColorRGBA, oe as pickWanderTarget, re as readInteractionConfig, ye as readPalette, pe as refitField, fe as seedField, G as setWarpTarget, me as stepField, le as stepPinnedDrift, H as stepWell, q as warpSettled, ie as warpStep, K as warpTo };
604
+ export { E as BASE_WIDTH, le as BURST_FIRE_THRESHOLD, Oe as Constellation, L as DEFAULT_K_FLOOR, D as DEFAULT_PALETTE, B as DEFAULT_PARALLAX, P as DEFAULT_PINNED_DRIFT_DUR, N as DEFAULT_PINNED_DRIFT_FRAC, F as DEFAULT_PINNED_DRIFT_IDLE, I as DEFAULT_PINNED_DRIFT_JITTER, j as DEFAULT_WANDER_IDLE, M as DEFAULT_WANDER_JITTER, A as DEFAULT_WELL_CONFIG, z as E_MAX, ee as MAX_DEGREE, R as MAX_NODES, O as WARP_RESPONSE, k as WARP_ZETA, he as appendPointerWeb, me as buildEdges, ue as fireBurst, $ as kVisOf, se as makePinnedDrift, q as nearestNode, ge as parallaxNodePos, oe as pickWanderTarget, re as readInteractionConfig, _e as readPalette, fe as refitField, de as seedField, Y as setWarpTarget, pe as stepField, Q as stepPinnedDrift, ne as stepWell, Z as warpSettled, J as warpStep, X as warpTo };