@mkbabb/glass-ui 3.10.0 → 3.10.1

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 (269) hide show
  1. package/dist/{CardAction-DuArVky-.js → CardAction-DrAcAV4d.js} +2 -2
  2. package/dist/{CommandShortcut-CefCj5mt.js → CommandShortcut-mV2e1aG6.js} +2 -2
  3. package/dist/{DataTable-CUHMukiQ.js → DataTable-C3E6jZ5B.js} +2 -2
  4. package/dist/{DialogContent-BRkT1cjP.js → DialogContent-BxaaafFi.js} +1 -1
  5. package/dist/{HoverPopover-2LOIW34a.js → HoverPopover-CDA_SaCe.js} +1 -1
  6. package/dist/{MetricBadge-BZVWIxNy.js → MetricBadge-idgrkqoP.js} +5 -7
  7. package/dist/{Notification-DLMhblXR.js → Notification-Cu0nN17_.js} +1 -1
  8. package/dist/{NumberFieldContent-BbLOh8RU.js → NumberFieldContent-CHEWghnY.js} +2 -2
  9. package/dist/{PopoverContent-BId6ggf_.js → PopoverContent-DpUvdYY-.js} +1 -1
  10. package/dist/{Progress-iEuD9pxG.js → Progress-BW-StFw2.js} +1 -1
  11. package/dist/{ScrollingText-BPP84wKo.js → ScrollingText-DruYCni_.js} +1 -1
  12. package/dist/{SelectScrollDownButton-T32cVFeM.js → SelectScrollDownButton-pirzjm--.js} +3 -3
  13. package/dist/{Switch-Ch-k3Rv-.js → Switch-DeAqg6pi.js} +1 -1
  14. package/dist/{TabsList-B8CVOQPC.js → TabsList-BAVzOZpg.js} +2 -2
  15. package/dist/{Toaster-1rYWrmAm.js → Toaster-CvuuW_y9.js} +49 -46
  16. package/dist/{ToggleGroupItem-Cev4pOVK.js → ToggleGroupItem-DtD37b4G.js} +4 -4
  17. package/dist/animated-digit.js +2 -2
  18. package/dist/api/index.d.ts +3 -4
  19. package/dist/api.js +1 -1
  20. package/dist/aurora.js +66 -66
  21. package/dist/{badge-CaoFJzRb.js → badge-NdCQMvvB.js} +1 -1
  22. package/dist/badge.js +1 -1
  23. package/dist/{button-DN39cGqL.js → button-DyiWFAOE.js} +12 -12
  24. package/dist/button.js +1 -1
  25. package/dist/canvas.js +2 -2
  26. package/dist/card.js +1 -1
  27. package/dist/carousel.js +5 -5
  28. package/dist/collapsible.js +1 -1
  29. package/dist/{color-C5ls_QF7.js → color-B65wWyQz.js} +9 -7
  30. package/dist/color.js +1 -1
  31. package/dist/command.js +1 -1
  32. package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +1 -1
  33. package/dist/components/custom/aurora/constants/shaders/vangogh-medium.glsl.d.ts +1 -0
  34. package/dist/components/custom/constellation/Constellation.vue.d.ts +12 -0
  35. package/dist/components/custom/constellation/composables/createConstellationField.d.ts +35 -0
  36. package/dist/components/custom/constellation/composables/useConstellationPointer.d.ts +35 -0
  37. package/dist/components/custom/constellation/constants.d.ts +36 -0
  38. package/dist/components/custom/constellation/constellationDraw.d.ts +18 -0
  39. package/dist/components/custom/constellation/constellationField.d.ts +10 -151
  40. package/dist/components/custom/constellation/constellationInteraction.d.ts +102 -0
  41. package/dist/components/custom/constellation/index.d.ts +3 -1
  42. package/dist/components/custom/controls/DarkModeToggle.vue.d.ts +11 -0
  43. package/dist/components/custom/dock/DockTabButton.vue.d.ts +3 -4
  44. package/dist/components/custom/dock/GlassDock.vue.d.ts +2 -110
  45. package/dist/components/custom/dock/composables/dockMorphContext.d.ts +36 -0
  46. package/dist/components/custom/dock/composables/useDockMorphWindow.d.ts +15 -0
  47. package/dist/components/custom/dock/composables/useDockShellProps.d.ts +131 -0
  48. package/dist/components/custom/dock/composables/useLayerTransition.d.ts +44 -0
  49. package/dist/components/custom/dock/constants.d.ts +23 -0
  50. package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +0 -29
  51. package/dist/components/custom/fourier-field/index.d.ts +1 -1
  52. package/dist/components/custom/fourier-field/math.d.ts +17 -0
  53. package/dist/components/custom/fourier-field/presets.d.ts +54 -0
  54. package/dist/components/custom/goo-blob/composables/buildMetaballProgram.d.ts +18 -0
  55. package/dist/components/custom/goo-blob/composables/uploadBlobUniforms.d.ts +41 -0
  56. package/dist/components/custom/goo-blob/composables/useBlobPointer.d.ts +4 -3
  57. package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +11 -8
  58. package/dist/components/custom/goo-blob/constants.d.ts +52 -0
  59. package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +1 -0
  60. package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +2 -2
  61. package/dist/components/custom/metric-badge/MetricBadge.vue.d.ts +0 -8
  62. package/dist/components/custom/tabs/constants.d.ts +12 -0
  63. package/dist/components/custom/underline/GlassUnderline.vue.d.ts +84 -0
  64. package/dist/components/custom/underline/index.d.ts +2 -0
  65. package/dist/components/custom/underline/types.d.ts +56 -0
  66. package/dist/components/ui/drawer/Drawer.vue.d.ts +1 -0
  67. package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +2 -2
  68. package/dist/components/ui/slider/index.d.ts +22 -19
  69. package/dist/components/ui/toast/use-toast.d.ts +2 -2
  70. package/dist/composables/color/index.d.ts +12 -0
  71. package/dist/composables/glass/useSpecularTracking.d.ts +12 -3
  72. package/dist/composables/motion/core/index.d.ts +0 -1
  73. package/dist/composables/motion/curves.d.ts +48 -0
  74. package/dist/composables/motion/index.d.ts +2 -0
  75. package/dist/composables/motion/springPresets.d.ts +33 -0
  76. package/dist/composables/motion/suite.d.ts +2 -0
  77. package/dist/composables/motion/useSpringMount.d.ts +1 -1
  78. package/dist/configurator.js +1 -1
  79. package/dist/confirm-dialog.js +2 -2
  80. package/dist/constellation.js +260 -225
  81. package/dist/controls.js +48 -14
  82. package/dist/dark.js +1 -1
  83. package/dist/data-table.js +1 -1
  84. package/dist/dialog.js +2 -2
  85. package/dist/dock.js +339 -327
  86. package/dist/dockContext-bho8B1A4.js +17 -0
  87. package/dist/{dropdown-menu-D77jX6Df.js → dropdown-menu-DVnQcA0E.js} +7 -4
  88. package/dist/dropdown-menu.js +1 -1
  89. package/dist/expandable-container.js +38 -61
  90. package/dist/forms.js +2 -2
  91. package/dist/fourier-field.js +137 -102
  92. package/dist/fourier-math.js +2 -2
  93. package/dist/glass-ui.css +1 -1
  94. package/dist/glass-ui.js +287 -209
  95. package/dist/goo-blob.js +243 -212
  96. package/dist/hover-popover.js +1 -1
  97. package/dist/icon-tooltip.js +1 -1
  98. package/dist/index.d.ts +0 -3
  99. package/dist/keyboard.js +1 -1
  100. package/dist/labeled-field.js +5 -5
  101. package/dist/{math-DTpRVC0e.js → math-BUU9hHID.js} +18 -2
  102. package/dist/metric-badge.js +1 -1
  103. package/dist/metric-stack.js +1 -1
  104. package/dist/motion-core.js +69 -70
  105. package/dist/motion-curves.d.ts +1 -0
  106. package/dist/motion-curves.js +130 -0
  107. package/dist/motion.js +38 -37
  108. package/dist/notification.js +1 -1
  109. package/dist/number-field.js +1 -1
  110. package/dist/popover.js +1 -1
  111. package/dist/progress.js +1 -1
  112. package/dist/pulse.js +1 -1
  113. package/dist/reactive.js +1 -1
  114. package/dist/scrolling-text.js +1 -1
  115. package/dist/search.js +6 -6
  116. package/dist/select.js +1 -1
  117. package/dist/{sheet-VZEtNFvO.js → sheet-ChSXcJpU.js} +1 -1
  118. package/dist/sheet.js +1 -1
  119. package/dist/{slider-CyzcxBoh.js → slider-sfl8gFDD.js} +4 -4
  120. package/dist/slider.js +1 -1
  121. package/dist/sortable-list.js +2 -2
  122. package/dist/springPresets-aRSm-4_k.js +40 -0
  123. package/dist/stacked-icons.js +6 -6
  124. package/dist/styles/animations.css +18 -74
  125. package/dist/styles/components.css +1 -1
  126. package/dist/styles/dock/layer-group.css +22 -0
  127. package/dist/styles/dock/layers.css +11 -1
  128. package/dist/styles/dock/morph.css +95 -19
  129. package/dist/styles/dock/shell.css +12 -0
  130. package/dist/styles/dock-controls.css +28 -31
  131. package/dist/styles/drawer.css +2 -0
  132. package/dist/styles/floating-panel.css +2 -0
  133. package/dist/styles/glass/a11y-fallback.css +245 -0
  134. package/dist/styles/glass/ladder.css +304 -0
  135. package/dist/styles/glass/material.css +238 -0
  136. package/dist/styles/glass/progress-rail.css +78 -0
  137. package/dist/styles/glass/squircle.css +66 -0
  138. package/dist/styles/glass/surfaces.css +306 -0
  139. package/dist/styles/glass-refract.css +2 -0
  140. package/dist/styles/glass.css +31 -1188
  141. package/dist/styles/hover-popover.css +2 -0
  142. package/dist/styles/index.css +24 -6
  143. package/dist/styles/instrument-chassis.css +4 -0
  144. package/dist/styles/paper.css +2 -68
  145. package/dist/styles/theme.css +13 -20
  146. package/dist/styles/tokens/color-radius.css +250 -0
  147. package/dist/styles/tokens/dark-arm.css +194 -0
  148. package/dist/styles/tokens/glass.css +413 -0
  149. package/dist/styles/tokens/light-dark.css +158 -0
  150. package/dist/styles/tokens/offsets-sizing.css +406 -0
  151. package/dist/styles/tokens/property-regs.css +169 -0
  152. package/dist/styles/tokens/scale-paper.css +361 -0
  153. package/dist/styles/tokens/scheme-motion.css +334 -0
  154. package/dist/styles/tokens/shadow.css +132 -0
  155. package/dist/styles/tokens.css +22 -2355
  156. package/dist/styles/typography.css +18 -6
  157. package/dist/styles/utilities/a11y-overrides.css +140 -0
  158. package/dist/styles/utilities/animate.css +26 -0
  159. package/dist/styles/utilities/base.css +365 -0
  160. package/dist/styles/utilities/btn.css +399 -0
  161. package/dist/styles/utilities/components.css +317 -0
  162. package/dist/styles/utilities.css +19 -1260
  163. package/dist/styles/view-transition.css +0 -51
  164. package/dist/switch.js +1 -1
  165. package/dist/tabs.js +98 -98
  166. package/dist/timeline.js +2 -2
  167. package/dist/toast.js +1 -1
  168. package/dist/toggle-group.js +1 -1
  169. package/dist/typewriter.js +1 -1
  170. package/dist/underline.d.ts +1 -0
  171. package/dist/underline.js +85 -0
  172. package/dist/{useAnimatedNumber-Bcpy5Etf.js → useAnimatedNumber-DfVgP4te.js} +1 -1
  173. package/dist/{useConfiguratorState-DxAqksK6.js → useConfiguratorState-BdQXh9ie.js} +1 -1
  174. package/dist/useSpecularTracking-DFK_fhpG.js +32 -0
  175. package/dist/useSpringMount-DXUzxBjV.js +108 -0
  176. package/dist/vReveal-CqaCz_mC.js +44 -0
  177. package/dist/watercolor-dot.js +2 -2
  178. package/package.json +34 -52
  179. package/src/styles/animations.css +18 -74
  180. package/src/styles/dock/layer-group.css +22 -0
  181. package/src/styles/dock/layers.css +11 -1
  182. package/src/styles/dock/morph.css +95 -19
  183. package/src/styles/dock/shell.css +12 -0
  184. package/src/styles/dock-controls.css +28 -31
  185. package/src/styles/glass/a11y-fallback.css +245 -0
  186. package/src/styles/glass/ladder.css +304 -0
  187. package/src/styles/glass/material.css +238 -0
  188. package/src/styles/glass/progress-rail.css +78 -0
  189. package/src/styles/glass/squircle.css +66 -0
  190. package/src/styles/glass/surfaces.css +306 -0
  191. package/src/styles/glass.css +31 -1188
  192. package/src/styles/index.css +24 -6
  193. package/src/styles/paper.css +2 -68
  194. package/src/styles/theme.css +13 -20
  195. package/src/styles/tokens/color-radius.css +250 -0
  196. package/src/styles/tokens/dark-arm.css +194 -0
  197. package/src/styles/tokens/glass.css +413 -0
  198. package/src/styles/tokens/light-dark.css +158 -0
  199. package/src/styles/tokens/offsets-sizing.css +406 -0
  200. package/src/styles/tokens/property-regs.css +169 -0
  201. package/src/styles/tokens/scale-paper.css +361 -0
  202. package/src/styles/tokens/scheme-motion.css +334 -0
  203. package/src/styles/tokens/shadow.css +132 -0
  204. package/src/styles/tokens.css +22 -2355
  205. package/src/styles/typography.css +18 -6
  206. package/src/styles/utilities/a11y-overrides.css +140 -0
  207. package/src/styles/utilities/animate.css +26 -0
  208. package/src/styles/utilities/base.css +365 -0
  209. package/src/styles/utilities/btn.css +399 -0
  210. package/src/styles/utilities/components.css +317 -0
  211. package/src/styles/utilities.css +19 -1260
  212. package/src/styles/view-transition.css +0 -51
  213. package/dist/DeckProgress-Dmk4_AKN.js +0 -23
  214. package/dist/InstrumentRail-CUJ05YVG.js +0 -44
  215. package/dist/components/custom/deck-progress/DeckProgress.vue.d.ts +0 -27
  216. package/dist/components/custom/deck-progress/index.d.ts +0 -2
  217. package/dist/components/custom/dialog-native/GlassDialogNative.vue.d.ts +0 -57
  218. package/dist/components/custom/dialog-native/index.d.ts +0 -1
  219. package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +0 -41
  220. package/dist/components/custom/glass-panel/index.d.ts +0 -2
  221. package/dist/components/custom/handmark/HandMark.vue.d.ts +0 -29
  222. package/dist/components/custom/handmark/brush.d.ts +0 -219
  223. package/dist/components/custom/handmark/freehand.d.ts +0 -69
  224. package/dist/components/custom/handmark/geometry.d.ts +0 -32
  225. package/dist/components/custom/handmark/index.d.ts +0 -21
  226. package/dist/components/custom/handmark/ink.d.ts +0 -11
  227. package/dist/components/custom/handmark/texture.d.ts +0 -39
  228. package/dist/components/custom/handmark/types.d.ts +0 -53
  229. package/dist/components/custom/handmark/useHandMark.d.ts +0 -66
  230. package/dist/components/custom/header-ribbon/HeaderRibbon.vue.d.ts +0 -31
  231. package/dist/components/custom/header-ribbon/index.d.ts +0 -2
  232. package/dist/components/custom/header-ribbon/types.d.ts +0 -7
  233. package/dist/components/custom/instrument-rail/InstrumentRail.vue.d.ts +0 -91
  234. package/dist/components/custom/instrument-rail/index.d.ts +0 -2
  235. package/dist/composables/motion/useRouteTransition.d.ts +0 -42
  236. package/dist/deck-progress.d.ts +0 -1
  237. package/dist/deck-progress.js +0 -2
  238. package/dist/dockContext-BKeIMmNk.js +0 -9
  239. package/dist/glass-panel.d.ts +0 -1
  240. package/dist/glass-panel.js +0 -44
  241. package/dist/handmark.d.ts +0 -1
  242. package/dist/handmark.js +0 -609
  243. package/dist/header-ribbon.d.ts +0 -1
  244. package/dist/header-ribbon.js +0 -63
  245. package/dist/instrument-rail.d.ts +0 -1
  246. package/dist/instrument-rail.js +0 -2
  247. package/dist/useGlassRenderer-D7YGOYiM.js +0 -69
  248. package/dist/useSpecularTracking-BVRZsRHA.js +0 -26
  249. package/dist/useSpringMount-BJSHcLl3.js +0 -113
  250. package/dist/useViewTransition-DaN5Zrox.js +0 -21
  251. package/dist/vReveal-zUIQk-rJ.js +0 -53
  252. /package/dist/{CollapsibleContent-CP9qF1v4.js → CollapsibleContent-Drow5WkV.js} +0 -0
  253. /package/dist/{DialogFooter-Gprw8H_A.js → DialogFooter-DufLHi0y.js} +0 -0
  254. /package/dist/{IconTooltip-Cus0fvK0.js → IconTooltip-BrQ5p181.js} +0 -0
  255. /package/dist/{Input-xuDwALQR.js → Input-B-F818RU.js} +0 -0
  256. /package/dist/{_plugin-vue_export-helper-ok8pgSl5.js → _plugin-vue_export-helper-DWghtRt7.js} +0 -0
  257. /package/dist/{compile-BOXjLUxu.js → compile-Ce_V55zi.js} +0 -0
  258. /package/dist/{constants-yKeKnE84.js → constants-C8NMonuo.js} +0 -0
  259. /package/dist/{presets-Dkdv55Gt.js → presets-1OhFpaIC.js} +0 -0
  260. /package/dist/{prng-D27-B3tK.js → prng-CjVgzjQT.js} +0 -0
  261. /package/dist/{resolveCanvasColor-BBiYfp8g.js → resolveCanvasColor-CRvVzOvP.js} +0 -0
  262. /package/dist/{useCanvas2D-ClrQuZtp.js → useCanvas2D-CSeH8h16.js} +0 -0
  263. /package/dist/{useGlobalDark-d6waty-X.js → useGlobalDark-D7R9OypB.js} +0 -0
  264. /package/dist/{useIntersectionPause-Cck5Uxk8.js → useIntersectionPause-DAdVPVp4.js} +0 -0
  265. /package/dist/{useInterval-Dsmqwi03.js → useInterval-D3USn0yc.js} +0 -0
  266. /package/dist/{useKeyboardShortcuts-CyIYrndH.js → useKeyboardShortcuts-i8tHd5WO.js} +0 -0
  267. /package/dist/{useScrollProgress-CffFGLa5.js → useScrollProgress-CcgmgMQt.js} +0 -0
  268. /package/dist/{useSortable-C8ReQ50P.js → useSortable-DnyGXKKY.js} +0 -0
  269. /package/dist/{useTextHighlight-CWEi25hf.js → useTextHighlight-B3b10W6r.js} +0 -0
@@ -1,41 +1,33 @@
1
1
  import { t as e } from "./cn-DJXf4yaB.js";
2
- import { t } from "./useCanvas2D-ClrQuZtp.js";
3
- import { t as n } from "./_plugin-vue_export-helper-ok8pgSl5.js";
4
- import { n as r, t as i } from "./prng-D27-B3tK.js";
2
+ import { t } from "./useCanvas2D-CSeH8h16.js";
3
+ import { t as n } from "./_plugin-vue_export-helper-DWghtRt7.js";
4
+ import { n as r, t as i } from "./prng-CjVgzjQT.js";
5
5
  import { computed as a, createElementBlock as o, createElementVNode as s, defineComponent as c, getCurrentInstance as l, normalizeClass as u, onMounted as d, openBlock as f, ref as p, unref as m, useTemplateRef as h } from "vue";
6
- //#region src/components/custom/constellation/constellationField.ts
7
- var g = 1280, _ = 8e3, v = 8e3, y = {
6
+ //#region src/components/custom/constellation/constants.ts
7
+ var g = 1280, _ = {
8
8
  node: "#b4afa3",
9
9
  nodeDim: "#cdc8bd",
10
10
  line: "#1c1714",
11
11
  edgeAlpha: .22,
12
12
  edgeFocusAlpha: .34,
13
- alpha: .84
14
- };
15
- function b(e) {
16
- if (typeof window > "u") return { ...y };
17
- let t = getComputedStyle(e), n = (e, n) => t.getPropertyValue(e).trim() || n, r = (e, n) => {
18
- let r = t.getPropertyValue(e).trim();
19
- if (!r) return n;
20
- let i = Number.parseFloat(r);
21
- return Number.isFinite(i) ? i : n;
22
- };
23
- return {
24
- node: n("--constellation-node", y.node),
25
- nodeDim: n("--constellation-node-dim", y.nodeDim),
26
- line: n("--constellation-line", y.line),
27
- edgeAlpha: r("--constellation-edge-alpha", y.edgeAlpha),
28
- edgeFocusAlpha: r("--constellation-edge-focus-alpha", y.edgeFocusAlpha),
29
- alpha: r("--constellation-alpha", y.alpha)
30
- };
31
- }
32
- function x(e) {
13
+ alpha: .8
14
+ }, v = .55, y = 1, b = {
15
+ gain: 14e3,
16
+ reach: 340,
17
+ ramp: 4,
18
+ maxSpeed: 4,
19
+ soften: 8,
20
+ holdMs: 140
21
+ }, x = 8e3, S = 8e3;
22
+ //#endregion
23
+ //#region src/components/custom/constellation/constellationInteraction.ts
24
+ function C(e) {
33
25
  let t = {
34
- response: A,
26
+ response: v,
35
27
  zeta: 1
36
- }, n = { ...N }, r = {
37
- minIdle: _,
38
- jitter: v
28
+ }, n = { ...b }, r = {
29
+ minIdle: x,
30
+ jitter: S
39
31
  };
40
32
  if (typeof window > "u") return {
41
33
  warp: t,
@@ -48,61 +40,19 @@ function x(e) {
48
40
  let r = Number.parseFloat(n);
49
41
  return Number.isFinite(r) ? r : t;
50
42
  };
51
- return t.response = a("--constellation-warp-response", A), t.zeta = a("--constellation-warp-zeta", 1), n.gain = a("--constellation-well-gain", N.gain), n.reach = a("--constellation-well-reach", N.reach), n.ramp = a("--constellation-well-ramp", N.ramp), n.maxSpeed = a("--constellation-well-max-speed", N.maxSpeed), n.holdMs = a("--constellation-well-hold-ms", N.holdMs), r.minIdle = a("--constellation-wander-idle", _), r.jitter = a("--constellation-wander-jitter", v), {
43
+ return t.response = a("--constellation-warp-response", v), t.zeta = a("--constellation-warp-zeta", 1), n.gain = a("--constellation-well-gain", b.gain), n.reach = a("--constellation-well-reach", b.reach), n.ramp = a("--constellation-well-ramp", b.ramp), n.maxSpeed = a("--constellation-well-max-speed", b.maxSpeed), n.holdMs = a("--constellation-well-hold-ms", b.holdMs), r.minIdle = a("--constellation-wander-idle", x), r.jitter = a("--constellation-wander-jitter", S), {
52
44
  warp: t,
53
45
  well: n,
54
46
  wander: r
55
47
  };
56
48
  }
57
- function S(e, t, n, r, i) {
58
- let a = [];
59
- for (let o = 0; o < t; o++) {
60
- let t = e() * Math.PI * 2;
61
- a.push({
62
- x: e() * n,
63
- y: e() * r,
64
- vx: Math.cos(t) * i,
65
- vy: Math.sin(t) * i,
66
- r: 1.6 + e() * 1.6,
67
- dim: e() < .45
68
- });
69
- }
70
- return a;
71
- }
72
- function C(e, t, n) {
73
- if (!(t > 0) || !(n > 0) || t === e.w && n === e.h) return;
74
- let r = e.w / t, i = e.h / n;
75
- for (let t of e.nodes) t.x *= r, t.y *= i;
76
- e.warp.x *= r, e.warp.y *= i;
77
- }
78
- function w(e, t, n, r, i = 0, a = 0, o = Math.random) {
79
- let { nodes: s, w: c, h: l } = e;
80
- for (let e = 0; e < s.length; e++) {
81
- let n = s[e];
82
- n.x += n.vx * t, n.y += n.vy * t, n.x < 0 ? (n.x = 0, n.vx *= -1) : n.x > c && (n.x = c, n.vx *= -1), n.y < 0 ? (n.y = 0, n.vy *= -1) : n.y > l && (n.y = l, n.vy *= -1);
83
- }
84
- if (r && r.x >= 0) {
85
- let e = 180 * t;
86
- for (let t = 0; t < s.length; t++) {
87
- let i = s[t], a = r.x - i.x, o = r.y - i.y, c = Math.hypot(a, o);
88
- if (c > .5 && c < e) {
89
- let t = Math.hypot(i.vx, i.vy) || n, r = (1 - c / e) * .08, s = i.vx + a / c * r * t, l = i.vy + o / c * r * t, u = Math.hypot(s, l) || 1;
90
- i.vx = s / u * t, i.vy = l / u * t;
91
- }
92
- }
93
- }
94
- if (k(e, t, n, i), F(e, i), e.wander && a > 0) {
95
- let t = e.wander;
96
- t.nextAt < 0 ? t.nextAt = a + t.minIdle + o() * t.jitter : a >= t.nextAt && z(e) && (I(e, B(e, o)), t.nextAt = a + t.minIdle + o() * t.jitter);
97
- }
98
- }
99
- var T = .001, E = 1.5, D = 7, O = 22;
100
- function k(e, t, n, r) {
49
+ var w = .001, T = 1.5, E = 7, D = 22;
50
+ function O(e, t, n, r) {
101
51
  let i = e.well;
102
52
  if (!i || !(r > 0)) return;
103
- let a = Math.min(r, M), o = i.cfg, s = i.target > 0 ? o.ramp : O, c = Math.min(s * a, 1);
104
- i.strength += (i.target - i.strength) * c, i.strength < T && (i.strength = i.target <= 0 ? 0 : i.strength);
105
- let { nodes: l } = e, u = o.reach * t, d = u * u, f = o.maxSpeed * t, p = i.target > 0 ? E : D, m = Math.min(p * a, 1), h = i.strength > T && i.x >= 0;
53
+ let a = Math.min(r, k), o = i.cfg, s = i.target > 0 ? o.ramp : D, c = Math.min(s * a, 1);
54
+ i.strength += (i.target - i.strength) * c, i.strength < w && (i.strength = i.target <= 0 ? 0 : i.strength);
55
+ let { nodes: l } = e, u = o.reach * t, d = u * u, f = o.maxSpeed * t, p = i.target > 0 ? T : E, m = Math.min(p * a, 1), h = i.strength > w && i.x >= 0;
106
56
  for (let e = 0; e < l.length; e++) {
107
57
  let t = l[e];
108
58
  if (h) {
@@ -119,15 +69,8 @@ function k(e, t, n, r) {
119
69
  }
120
70
  }
121
71
  }
122
- var A = .55, j = 1, M = .05, N = {
123
- gain: 14e3,
124
- reach: 340,
125
- ramp: 4,
126
- maxSpeed: 4,
127
- soften: 8,
128
- holdMs: 140
129
- };
130
- function P(e, t, n, r = -1) {
72
+ var k = .05;
73
+ function A(e, t, n, r = -1) {
131
74
  let { nodes: i } = e, a = -1, o = Infinity;
132
75
  for (let e = 0; e < i.length; e++) {
133
76
  if (e === r) continue;
@@ -136,13 +79,13 @@ function P(e, t, n, r = -1) {
136
79
  }
137
80
  return a;
138
81
  }
139
- function F(e, t) {
82
+ function j(e, t) {
140
83
  let { warp: n, nodes: r } = e;
141
84
  if (!n || n.targetIdx < 0 || n.targetIdx >= r.length || !(t > 0)) return;
142
- let i = Math.min(t, M), 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);
85
+ let i = Math.min(t, k), 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);
143
86
  n.vx += l * i, n.vy += u * i, n.x += n.vx * i, n.y += n.vy * i;
144
87
  }
145
- function I(e, t) {
88
+ function M(e, t) {
146
89
  let { warp: n, nodes: r } = e;
147
90
  if (t < 0 || t >= r.length) {
148
91
  n.targetIdx = -1, e.focalIndex = -1;
@@ -150,20 +93,20 @@ function I(e, t) {
150
93
  }
151
94
  e.focalIndex = t, n.targetIdx = t;
152
95
  }
153
- function L(e, t, n) {
154
- let r = P(e, t, n, -1);
96
+ function N(e, t, n) {
97
+ let r = A(e, t, n, -1);
155
98
  if (r >= 0 && r === e.focalIndex) return e.focalIndex;
156
- let i = P(e, t, n, e.focalIndex);
157
- return i < 0 ? -1 : (I(e, i), i);
99
+ let i = A(e, t, n, e.focalIndex);
100
+ return i < 0 ? -1 : (M(e, i), i);
158
101
  }
159
- var R = 24;
160
- function z(e) {
102
+ var P = 24;
103
+ function F(e) {
161
104
  let { warp: t, nodes: n } = e;
162
105
  if (!t || t.targetIdx < 0 || t.targetIdx >= n.length) return !0;
163
106
  let r = n[t.targetIdx];
164
- return Math.hypot(t.x - r.x, t.y - r.y) < R;
107
+ return Math.hypot(t.x - r.x, t.y - r.y) < P;
165
108
  }
166
- function B(e, t) {
109
+ function I(e, t) {
167
110
  let n = e.nodes.length;
168
111
  if (n <= 1) return e.focalIndex;
169
112
  let r = e.focalIndex;
@@ -171,58 +114,208 @@ function B(e, t) {
171
114
  let i = Math.floor(t() * (n - 1));
172
115
  return i < r ? i : i + 1;
173
116
  }
174
- function V(e, t, n, r) {
175
- let { nodes: i, k: a } = t, o = n * a, s = o * o, c = r.edgeAlpha * r.alpha;
176
- e.strokeStyle = r.line, e.lineWidth = 1 * a;
177
- for (let t = 0; t < i.length; t++) {
178
- let n = i[t];
179
- for (let r = t + 1; r < i.length; r++) {
180
- let t = i[r], a = n.x - t.x, o = n.y - t.y, l = a * a + o * o;
181
- l > s || (e.globalAlpha = c * (1 - l / s), e.beginPath(), e.moveTo(n.x, n.y), e.lineTo(t.x, t.y), e.stroke());
117
+ //#endregion
118
+ //#region src/components/custom/constellation/constellationField.ts
119
+ function L(e, t, n, r, i) {
120
+ let a = [];
121
+ for (let o = 0; o < t; o++) {
122
+ let t = e() * Math.PI * 2;
123
+ a.push({
124
+ x: e() * n,
125
+ y: e() * r,
126
+ vx: Math.cos(t) * i,
127
+ vy: Math.sin(t) * i,
128
+ r: 1.6 + e() * 1.6,
129
+ dim: e() < .45
130
+ });
131
+ }
132
+ return a;
133
+ }
134
+ function R(e, t, n) {
135
+ if (!(t > 0) || !(n > 0) || t === e.w && n === e.h) return;
136
+ let r = e.w / t, i = e.h / n;
137
+ for (let t of e.nodes) t.x *= r, t.y *= i;
138
+ e.warp.x *= r, e.warp.y *= i;
139
+ }
140
+ function z(e, t, n, r, i = 0, a = 0, o = Math.random) {
141
+ let { nodes: s, w: c, h: l } = e;
142
+ for (let e = 0; e < s.length; e++) {
143
+ let n = s[e];
144
+ n.x += n.vx * t, n.y += n.vy * t, n.x < 0 ? (n.x = 0, n.vx *= -1) : n.x > c && (n.x = c, n.vx *= -1), n.y < 0 ? (n.y = 0, n.vy *= -1) : n.y > l && (n.y = l, n.vy *= -1);
145
+ }
146
+ if (r && r.x >= 0) {
147
+ let e = 180 * t;
148
+ for (let t = 0; t < s.length; t++) {
149
+ let i = s[t], a = r.x - i.x, o = r.y - i.y, c = Math.hypot(a, o);
150
+ if (c > .5 && c < e) {
151
+ let t = Math.hypot(i.vx, i.vy) || n, r = (1 - c / e) * .08, s = i.vx + a / c * r * t, l = i.vy + o / c * r * t, u = Math.hypot(s, l) || 1;
152
+ i.vx = s / u * t, i.vy = l / u * t;
153
+ }
154
+ }
155
+ }
156
+ if (O(e, t, n, i), j(e, i), e.wander && a > 0) {
157
+ let t = e.wander;
158
+ t.nextAt < 0 ? t.nextAt = a + t.minIdle + o() * t.jitter : a >= t.nextAt && F(e) && (M(e, I(e, o)), t.nextAt = a + t.minIdle + o() * t.jitter);
159
+ }
160
+ }
161
+ //#endregion
162
+ //#region src/components/custom/constellation/constellationDraw.ts
163
+ function B(e) {
164
+ if (typeof window > "u") return { ..._ };
165
+ let t = getComputedStyle(e), n = (e, n) => t.getPropertyValue(e).trim() || n, r = (e, n) => {
166
+ let r = t.getPropertyValue(e).trim();
167
+ if (!r) return n;
168
+ let i = Number.parseFloat(r);
169
+ return Number.isFinite(i) ? i : n;
170
+ };
171
+ return {
172
+ node: n("--constellation-node", _.node),
173
+ nodeDim: n("--constellation-node-dim", _.nodeDim),
174
+ line: n("--constellation-line", _.line),
175
+ edgeAlpha: r("--constellation-edge-alpha", _.edgeAlpha),
176
+ edgeFocusAlpha: r("--constellation-edge-focus-alpha", _.edgeFocusAlpha),
177
+ alpha: r("--constellation-alpha", _.alpha)
178
+ };
179
+ }
180
+ function V(e, t, n, r, i = 1) {
181
+ let { nodes: a, k: o } = t, s = n * o, c = s * s, l = r.edgeAlpha * r.alpha * i;
182
+ e.strokeStyle = r.line, e.lineWidth = 1 * o;
183
+ for (let t = 0; t < a.length; t++) {
184
+ let n = a[t];
185
+ for (let r = t + 1; r < a.length; r++) {
186
+ let t = a[r], i = n.x - t.x, o = n.y - t.y, s = i * i + o * o;
187
+ s > c || (e.globalAlpha = l * (1 - s / c), e.beginPath(), e.moveTo(n.x, n.y), e.lineTo(t.x, t.y), e.stroke());
182
188
  }
183
189
  }
184
190
  e.globalAlpha = 1;
185
191
  }
186
- function H(e, t, n) {
187
- let { nodes: r, k: i } = t;
188
- for (let t = 0; t < r.length; t++) {
189
- let a = r[t];
190
- e.fillStyle = a.dim ? n.nodeDim : n.node, e.beginPath(), e.arc(a.x, a.y, a.r * i, 0, Math.PI * 2), e.fill();
192
+ function H(e, t, n, r = 1) {
193
+ let { nodes: i, k: a } = t;
194
+ e.globalAlpha = r;
195
+ for (let t = 0; t < i.length; t++) {
196
+ let r = i[t];
197
+ e.fillStyle = r.dim ? n.nodeDim : n.node, e.beginPath(), e.arc(r.x, r.y, r.r * a, 0, Math.PI * 2), e.fill();
191
198
  }
199
+ e.globalAlpha = 1;
192
200
  }
193
- function U(e, t, n, r, i) {
201
+ function U(e, t, n, r, i, a = 1) {
194
202
  if (!i || i.x < 0) return;
195
- let { nodes: a, k: o } = t, s = n * o, c = s * s, l = r.edgeFocusAlpha * r.alpha;
196
- e.strokeStyle = r.line, e.lineWidth = 1 * o;
197
- for (let t of a) {
203
+ let { nodes: o, k: s } = t, c = n * s, l = c * c, u = r.edgeFocusAlpha * r.alpha * a;
204
+ e.strokeStyle = r.line, e.lineWidth = 1 * s;
205
+ for (let t of o) {
198
206
  let n = t.x - i.x, r = t.y - i.y, a = n * n + r * r;
199
- a > c || (e.globalAlpha = (1 - a / c) * l, e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(t.x, t.y), e.stroke());
207
+ a > l || (e.globalAlpha = (1 - a / l) * u, e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(t.x, t.y), e.stroke());
200
208
  }
201
- e.globalAlpha = .55, e.fillStyle = r.node, e.beginPath(), e.arc(i.x, i.y, 2.6 * o, 0, Math.PI * 2), e.fill(), e.globalAlpha = 1;
209
+ e.globalAlpha = .55 * a, e.fillStyle = r.node, e.beginPath(), e.arc(i.x, i.y, 2.6 * s, 0, Math.PI * 2), e.fill(), e.globalAlpha = 1;
202
210
  }
203
- function W(e, t, n, r, i) {
204
- let { k: a } = t;
211
+ function W(e, t, n, r, i, a = 1) {
212
+ let { k: o } = t;
205
213
  e.strokeStyle = i.line;
206
214
  for (let t = r.length - 1; t >= 0; t--) {
207
215
  let i = r[t];
208
216
  i.start < 0 && (i.start = n);
209
- let o = (n - i.start) / 900;
210
- if (o >= 1) {
217
+ let s = (n - i.start) / 900;
218
+ if (s >= 1) {
211
219
  r.splice(t, 1);
212
220
  continue;
213
221
  }
214
- e.globalAlpha = (1 - o) * .5, e.lineWidth = 1.4 * a, e.beginPath(), e.arc(i.x, i.y, (8 + o * 130) * a, 0, Math.PI * 2), e.stroke();
222
+ 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();
215
223
  }
216
224
  e.globalAlpha = 1;
217
225
  }
218
226
  //#endregion
227
+ //#region src/components/custom/constellation/composables/useConstellationPointer.ts
228
+ function G(e) {
229
+ let { host: t, canvas: n, field: r, pointer: i, ripples: a, handle: o, toLocalRef: s, pointerReactive: c, warpOnClick: l, gravityWell: u, isFrozen: d } = e, f = (e) => {
230
+ let t = n.getBoundingClientRect();
231
+ if (!t.width || !t.height) return null;
232
+ let i = (e.clientX - t.left) / t.width, a = (e.clientY - t.top) / t.height;
233
+ return i < 0 || a < 0 || i > 1 || a > 1 ? null : {
234
+ x: i * r.w,
235
+ y: a * r.h
236
+ };
237
+ };
238
+ if (s.value = f, c && t && !d && !o.reducedMotion && (t.addEventListener("pointermove", (e) => {
239
+ let t = f(e);
240
+ t ? (i.x = t.x, i.y = t.y) : (i.x = -1, i.y = -1), o.wake();
241
+ }), t.addEventListener("pointerleave", () => {
242
+ i.x = -1, i.y = -1;
243
+ }), t.addEventListener("pointerdown", (e) => {
244
+ let t = f(e);
245
+ t && a.push({
246
+ x: t.x,
247
+ y: t.y,
248
+ start: -1
249
+ }), o.wake();
250
+ })), l && t && !d && !o.reducedMotion && t.addEventListener("pointerdown", (e) => {
251
+ let t = f(e);
252
+ t && (N(r, t.x, t.y), o.wake());
253
+ }), u && t && r.well && !d && !o.reducedMotion) {
254
+ let e = r.well, n, i = (t) => {
255
+ let r = f(t);
256
+ r && (e.x = r.x, e.y = r.y, n = window.setTimeout(() => {
257
+ e.target = 1, o.wake();
258
+ }, e.cfg.holdMs), o.wake());
259
+ }, a = (t) => {
260
+ if (e.target > 0) {
261
+ let n = f(t);
262
+ n && (e.x = n.x, e.y = n.y);
263
+ }
264
+ }, s = () => {
265
+ n !== void 0 && (clearTimeout(n), n = void 0), e.target = 0, o.wake();
266
+ };
267
+ t.addEventListener("pointerdown", i), t.addEventListener("pointermove", a), t.addEventListener("pointerup", s), t.addEventListener("pointerleave", s), t.addEventListener("pointercancel", s);
268
+ }
269
+ }
270
+ //#endregion
271
+ //#region src/components/custom/constellation/composables/createConstellationField.ts
272
+ function K(e, t) {
273
+ let n = {
274
+ nodes: [],
275
+ canvas: null,
276
+ w: 0,
277
+ h: 0,
278
+ k: 1,
279
+ dpr: 1,
280
+ focalIndex: -1,
281
+ warp: {
282
+ x: 0,
283
+ y: 0,
284
+ vx: 0,
285
+ vy: 0,
286
+ targetIdx: -1
287
+ }
288
+ }, r = e && e !== !0 ? e : {};
289
+ n.wander = e ? {
290
+ nextAt: -1,
291
+ minIdle: r.minIdle ?? 8e3,
292
+ jitter: r.jitter ?? 8e3
293
+ } : void 0;
294
+ let i = t && t !== !0 ? t : {};
295
+ return n.well = t ? {
296
+ x: -1,
297
+ y: -1,
298
+ strength: 0,
299
+ target: 0,
300
+ cfg: {
301
+ ...b,
302
+ ...i
303
+ }
304
+ } : void 0, {
305
+ field: n,
306
+ wanderOverride: r,
307
+ wellOverride: i
308
+ };
309
+ }
310
+ //#endregion
219
311
  //#region src/components/custom/constellation/Constellation.vue?vue&type=script&setup=true&lang.ts
220
- var G = 0, K = /* @__PURE__ */ n(/* @__PURE__ */ c({
312
+ var q = 0, J = /* @__PURE__ */ n(/* @__PURE__ */ c({
221
313
  __name: "Constellation",
222
314
  props: {
223
315
  count: { default: 64 },
224
316
  link: { default: 132 },
225
317
  speed: { default: .16 },
318
+ opacityCeiling: { default: 1 },
226
319
  seed: {},
227
320
  pointerReactive: {
228
321
  type: Boolean,
@@ -251,141 +344,83 @@ var G = 0, K = /* @__PURE__ */ n(/* @__PURE__ */ c({
251
344
  drawOverlay: { type: Function }
252
345
  },
253
346
  setup(n, { expose: c }) {
254
- let _ = h("hostRef"), v = h("canvasRef"), T = a(() => n.seed === void 0 ? Math.random : r(typeof n.seed == "string" ? i(n.seed) : n.seed)), E = () => typeof window < "u" && /[?&](export|print|freeze)\b/.test(window.location.search), D = l()?.vnode.props?.freeze, O = a(() => D === void 0 ? E() : D === !0 || D === ""), k = {
255
- nodes: [],
256
- canvas: null,
257
- w: 0,
258
- h: 0,
259
- k: 1,
260
- dpr: 1,
261
- focalIndex: -1,
262
- warp: {
263
- x: 0,
264
- y: 0,
265
- vx: 0,
266
- vy: 0,
267
- targetIdx: -1
268
- }
269
- }, A = n.wander && n.wander !== !0 ? n.wander : {};
270
- k.wander = n.wander ? {
271
- nextAt: -1,
272
- minIdle: A.minIdle ?? 8e3,
273
- jitter: A.jitter ?? 8e3
274
- } : void 0;
275
- let j = n.gravityWell && n.gravityWell !== !0 ? n.gravityWell : {};
276
- k.well = n.gravityWell ? {
277
- x: -1,
278
- y: -1,
279
- strength: 0,
280
- target: 0,
281
- cfg: {
282
- ...N,
283
- ...j
284
- }
285
- } : void 0;
286
- let M = {
347
+ let v = h("hostRef"), y = h("canvasRef"), b = a(() => n.seed === void 0 ? Math.random : r(typeof n.seed == "string" ? i(n.seed) : n.seed)), x = () => typeof window < "u" && /[?&](export|print|freeze)\b/.test(window.location.search), S = l()?.vnode.props?.freeze, w = a(() => S === void 0 ? x() : S === !0 || S === ""), { field: T, wanderOverride: E, wellOverride: D } = K(n.wander, n.gravityWell), O = {
287
348
  x: -1,
288
349
  y: -1
289
- }, P = [], F = { ...y }, I = -1, R = !1, z = p(null);
350
+ }, k = [], A = { ..._ }, j = -1, M = !1, P = p(null);
290
351
  return d(() => {
291
- let e = v.value;
352
+ let e = y.value;
292
353
  if (!e) return;
293
354
  let r = t({
294
- canvas: v,
355
+ canvas: y,
295
356
  setup: (t) => ({ render(t, i) {
296
357
  let a = e.clientWidth || e.offsetWidth || 1280, o = e.clientHeight || e.offsetHeight || 720, s = a / g;
297
- if (k.canvas = e, k.dpr = Math.min(typeof window < "u" && window.devicePixelRatio || 1, 2), k.w !== a || k.h !== o) {
298
- let t = k.w, r = k.h;
299
- if (k.w = a, k.h = o, k.k = s, k.nodes.length ? C(k, t, r) : (k.nodes = S(T.value, n.count, a, o, n.speed), k.warp.x = a / 2, k.warp.y = o / 2), F = b(e), !R) {
300
- R = !0;
301
- let t = x(e);
302
- k.warpCfg = t.warp, k.well && (k.well.cfg = {
358
+ if (T.canvas = e, T.dpr = Math.min(typeof window < "u" && window.devicePixelRatio || 1, 2), T.w !== a || T.h !== o) {
359
+ let t = T.w, r = T.h;
360
+ if (T.w = a, T.h = o, T.k = s, T.nodes.length ? R(T, t, r) : (T.nodes = L(b.value, n.count, a, o, n.speed), T.warp.x = a / 2, T.warp.y = o / 2), A = B(e), !M) {
361
+ M = !0;
362
+ let t = C(e);
363
+ T.warpCfg = t.warp, T.well && (T.well.cfg = {
303
364
  ...t.well,
304
- ...j
305
- }), k.wander && (k.wander.minIdle = A.minIdle ?? t.wander.minIdle, k.wander.jitter = A.jitter ?? t.wander.jitter);
365
+ ...D
366
+ }), T.wander && (T.wander.minIdle = E.minIdle ?? t.wander.minIdle, T.wander.jitter = E.jitter ?? t.wander.jitter);
306
367
  }
307
368
  }
308
- k.k = s;
309
- let c = I < 0 ? 0 : (i - I) / 1e3;
310
- I = i;
311
- let l = O.value || r.reducedMotion;
312
- if (l && k.well && (k.well.strength = 0, k.well.target = 0, k.well.x = -1, k.well.y = -1), !l) {
313
- let e = n.pointerReactive ? M : null;
314
- w(k, s, n.speed, e, c, i, T.value);
369
+ T.k = s;
370
+ let c = j < 0 ? 0 : (i - j) / 1e3;
371
+ j = i;
372
+ let l = w.value || r.reducedMotion;
373
+ if (l && T.well && (T.well.strength = 0, T.well.target = 0, T.well.x = -1, T.well.y = -1), !l) {
374
+ let e = n.pointerReactive ? O : null;
375
+ z(T, s, n.speed, e, c, i, b.value);
315
376
  }
316
- t.clearRect(0, 0, a, o), V(t, k, n.link, F), H(t, k, F), n.pointerReactive && !l && (U(t, k, n.link, F, M), W(t, k, i, P, F)), n.drawOverlay?.(t, k, l ? G : i);
377
+ t.clearRect(0, 0, a, o), V(t, T, n.link, A, n.opacityCeiling), H(t, T, A, n.opacityCeiling), n.pointerReactive && !l && (U(t, T, n.link, A, O, n.opacityCeiling), W(t, T, i, k, A, n.opacityCeiling)), n.drawOverlay?.(t, T, l ? q : i);
317
378
  } })
318
- }), i = _.value, a = (t) => {
319
- let n = e.getBoundingClientRect();
320
- if (!n.width || !n.height) return null;
321
- let r = (t.clientX - n.left) / n.width, i = (t.clientY - n.top) / n.height;
322
- return r < 0 || i < 0 || r > 1 || i > 1 ? null : {
323
- x: r * k.w,
324
- y: i * k.h
325
- };
326
- };
327
- if (z.value = a, n.pointerReactive && i && !O.value && !r.reducedMotion && (i.addEventListener("pointermove", (e) => {
328
- let t = a(e);
329
- t ? (M.x = t.x, M.y = t.y) : (M.x = -1, M.y = -1), r.wake();
330
- }), i.addEventListener("pointerleave", () => {
331
- M.x = -1, M.y = -1;
332
- }), i.addEventListener("pointerdown", (e) => {
333
- let t = a(e);
334
- t && P.push({
335
- x: t.x,
336
- y: t.y,
337
- start: -1
338
- }), r.wake();
339
- })), n.warpOnClick && i && !O.value && !r.reducedMotion && i.addEventListener("pointerdown", (e) => {
340
- let t = a(e);
341
- t && (L(k, t.x, t.y), r.wake());
342
- }), n.gravityWell && i && k.well && !O.value && !r.reducedMotion) {
343
- let e = k.well, t, n = (n) => {
344
- let i = a(n);
345
- i && (e.x = i.x, e.y = i.y, t = window.setTimeout(() => {
346
- e.target = 1, r.wake();
347
- }, e.cfg.holdMs), r.wake());
348
- }, o = (t) => {
349
- if (e.target > 0) {
350
- let n = a(t);
351
- n && (e.x = n.x, e.y = n.y);
352
- }
353
- }, s = () => {
354
- t !== void 0 && (clearTimeout(t), t = void 0), e.target = 0, r.wake();
355
- };
356
- i.addEventListener("pointerdown", n), i.addEventListener("pointermove", o), i.addEventListener("pointerup", s), i.addEventListener("pointerleave", s), i.addEventListener("pointercancel", s);
357
- }
379
+ });
380
+ G({
381
+ host: v.value,
382
+ canvas: e,
383
+ field: T,
384
+ pointer: O,
385
+ ripples: k,
386
+ handle: r,
387
+ toLocalRef: P,
388
+ pointerReactive: n.pointerReactive,
389
+ warpOnClick: n.warpOnClick,
390
+ gravityWell: !!n.gravityWell,
391
+ isFrozen: w.value
392
+ });
358
393
  }), c({
359
- field: k,
360
- isFrozen: O,
394
+ field: T,
395
+ isFrozen: w,
361
396
  warpTo(e, t) {
362
397
  if (typeof e == "number" && typeof t == "number") {
363
- let n = z.value?.({
398
+ let n = P.value?.({
364
399
  clientX: e,
365
400
  clientY: t
366
401
  });
367
- return n ? L(k, n.x, n.y) : -1;
402
+ return n ? N(T, n.x, n.y) : -1;
368
403
  }
369
404
  let n = e;
370
- return L(k, n.x, n.y);
405
+ return N(T, n.x, n.y);
371
406
  },
372
407
  holdWellAt(e, t) {
373
- return k.well ? (k.well.x = e, k.well.y = t, k.well.target = 1, !0) : !1;
408
+ return T.well ? (T.well.x = e, T.well.y = t, T.well.target = 1, !0) : !1;
374
409
  },
375
410
  releaseWell() {
376
- k.well && (k.well.target = 0);
411
+ T.well && (T.well.target = 0);
377
412
  }
378
413
  }), (t, r) => (f(), o("div", {
379
414
  ref_key: "hostRef",
380
- ref: _,
415
+ ref: v,
381
416
  class: u(m(e)("constellation", n.class))
382
417
  }, [s("canvas", {
383
418
  ref_key: "canvasRef",
384
- ref: v,
419
+ ref: y,
385
420
  class: "constellation-canvas",
386
421
  "aria-hidden": "true"
387
422
  }, null, 512)], 2));
388
423
  }
389
- }), [["__scopeId", "data-v-a8ae86fe"]]);
424
+ }), [["__scopeId", "data-v-0f4665ba"]]);
390
425
  //#endregion
391
- export { g as BASE_WIDTH, K as Constellation, y as DEFAULT_PALETTE, _ as DEFAULT_WANDER_IDLE, v as DEFAULT_WANDER_JITTER, N as DEFAULT_WELL_CONFIG, A as WARP_RESPONSE, j as WARP_ZETA, V as drawEdges, H as drawNodes, U as drawPointerWeb, W as drawRipples, P as nearestNode, B as pickWanderTarget, x as readInteractionConfig, b as readPalette, C as refitField, S as seedField, I as setWarpTarget, w as stepField, k as stepWell, z as warpSettled, F as warpStep, L as warpTo };
426
+ export { g as BASE_WIDTH, J as Constellation, _ as DEFAULT_PALETTE, x as DEFAULT_WANDER_IDLE, S as DEFAULT_WANDER_JITTER, b as DEFAULT_WELL_CONFIG, v as WARP_RESPONSE, y as WARP_ZETA, V as drawEdges, H as drawNodes, U as drawPointerWeb, W as drawRipples, A as nearestNode, I as pickWanderTarget, C as readInteractionConfig, B as readPalette, R as refitField, L as seedField, M as setWarpTarget, z as stepField, O as stepWell, F as warpSettled, j as warpStep, N as warpTo };