@mkbabb/glass-ui 3.9.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 (265) 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-lTc002u2.js → MetricBadge-idgrkqoP.js} +1 -1
  7. package/dist/{Notification-BxK8LZMw.js → Notification-Cu0nN17_.js} +3 -3
  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-LDKLmmgx.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 +4 -4
  19. package/dist/api.js +1 -1
  20. package/dist/aurora.js +238 -547
  21. package/dist/{badge-BvwvT50i.js → badge-NdCQMvvB.js} +2 -2
  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-8jBjWiJ6.js → color-B65wWyQz.js} +9 -7
  30. package/dist/color.js +1 -1
  31. package/dist/command.js +1 -1
  32. package/dist/{compile-DAjIoEy2.js → compile-Ce_V55zi.js} +23 -23
  33. package/dist/components/custom/aurora/composables/atoms.d.ts +21 -4
  34. package/dist/components/custom/aurora/composables/runtime.d.ts +0 -9
  35. package/dist/components/custom/aurora/composables/uniformBridge.d.ts +0 -11
  36. package/dist/components/custom/aurora/constants/renderMode.d.ts +0 -32
  37. package/dist/components/custom/aurora/constants/shaders/brush.glsl.d.ts +1 -1
  38. package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +2 -2
  39. package/dist/components/custom/aurora/constants/shaders/tonemap.glsl.d.ts +1 -1
  40. package/dist/components/custom/aurora/constants/shaders/vangogh-medium.glsl.d.ts +1 -0
  41. package/dist/components/custom/aurora/index.d.ts +1 -1
  42. package/dist/components/custom/constellation/Constellation.vue.d.ts +85 -1
  43. package/dist/components/custom/constellation/composables/createConstellationField.d.ts +35 -0
  44. package/dist/components/custom/constellation/composables/useConstellationPointer.d.ts +35 -0
  45. package/dist/components/custom/constellation/constants.d.ts +36 -0
  46. package/dist/components/custom/constellation/constellationDraw.d.ts +18 -0
  47. package/dist/components/custom/constellation/constellationField.d.ts +174 -63
  48. package/dist/components/custom/constellation/constellationInteraction.d.ts +102 -0
  49. package/dist/components/custom/constellation/index.d.ts +4 -2
  50. package/dist/components/custom/controls/DarkModeToggle.vue.d.ts +11 -0
  51. package/dist/components/custom/dock/GlassDock.vue.d.ts +2 -110
  52. package/dist/components/custom/dock/composables/dockMorphContext.d.ts +36 -0
  53. package/dist/components/custom/dock/composables/useDockMorphWindow.d.ts +15 -0
  54. package/dist/components/custom/dock/composables/useDockShellProps.d.ts +131 -0
  55. package/dist/components/custom/dock/composables/useLayerTransition.d.ts +44 -0
  56. package/dist/components/custom/dock/constants.d.ts +23 -0
  57. package/dist/components/custom/fourier-field/FourierField.vue.d.ts +6 -0
  58. package/dist/components/custom/fourier-field/index.d.ts +25 -1
  59. package/dist/components/custom/fourier-field/math.d.ts +20 -8
  60. package/dist/components/custom/fourier-field/presets.d.ts +54 -0
  61. package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +8 -10
  62. package/dist/components/custom/goo-blob/composables/buildMetaballProgram.d.ts +18 -0
  63. package/dist/components/custom/goo-blob/composables/uploadBlobUniforms.d.ts +41 -0
  64. package/dist/components/custom/goo-blob/composables/useBlobPointer.d.ts +4 -3
  65. package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +16 -21
  66. package/dist/components/custom/goo-blob/constants.d.ts +52 -0
  67. package/dist/components/custom/goo-blob/index.d.ts +1 -1
  68. package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +1 -0
  69. package/dist/components/custom/goo-blob/types.d.ts +59 -25
  70. package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +2 -2
  71. package/dist/components/custom/tabs/constants.d.ts +12 -0
  72. package/dist/components/custom/underline/GlassUnderline.vue.d.ts +84 -0
  73. package/dist/components/custom/underline/index.d.ts +2 -0
  74. package/dist/components/custom/underline/types.d.ts +56 -0
  75. package/dist/components/ui/drawer/Drawer.vue.d.ts +1 -0
  76. package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +2 -2
  77. package/dist/components/ui/slider/index.d.ts +25 -18
  78. package/dist/components/ui/toast/use-toast.d.ts +2 -2
  79. package/dist/composables/color/index.d.ts +24 -7
  80. package/dist/composables/glass/useSpecularTracking.d.ts +12 -3
  81. package/dist/composables/glass/webgl/shaders/procedural-color.glsl.d.ts +1 -6
  82. package/dist/composables/motion/curves.d.ts +48 -0
  83. package/dist/composables/motion/index.d.ts +2 -0
  84. package/dist/composables/motion/springPresets.d.ts +33 -0
  85. package/dist/composables/motion/suite.d.ts +2 -0
  86. package/dist/composables/motion/useSpringMount.d.ts +1 -1
  87. package/dist/configurator.js +1 -1
  88. package/dist/confirm-dialog.js +2 -2
  89. package/dist/constellation.js +322 -147
  90. package/dist/controls.js +48 -14
  91. package/dist/dark.js +1 -1
  92. package/dist/data-table.js +1 -1
  93. package/dist/dialog.js +2 -2
  94. package/dist/dock.js +340 -327
  95. package/dist/dockContext-bho8B1A4.js +17 -0
  96. package/dist/{dropdown-menu-D77jX6Df.js → dropdown-menu-DVnQcA0E.js} +7 -4
  97. package/dist/dropdown-menu.js +1 -1
  98. package/dist/expandable-container.js +1 -1
  99. package/dist/forms.js +2 -2
  100. package/dist/fourier-field.js +147 -120
  101. package/dist/fourier-math.d.ts +1 -0
  102. package/dist/fourier-math.js +2 -0
  103. package/dist/glass-ui.css +1 -1
  104. package/dist/glass-ui.js +286 -207
  105. package/dist/goo-blob.js +368 -322
  106. package/dist/hover-popover.js +1 -1
  107. package/dist/icon-tooltip.js +1 -1
  108. package/dist/index.d.ts +0 -2
  109. package/dist/keyboard.js +1 -1
  110. package/dist/labeled-field.js +5 -5
  111. package/dist/math-BUU9hHID.js +43 -0
  112. package/dist/metric-badge.js +1 -1
  113. package/dist/metric-stack.js +2 -2
  114. package/dist/motion-core.js +4 -4
  115. package/dist/motion-curves.d.ts +1 -0
  116. package/dist/motion-curves.js +130 -0
  117. package/dist/motion.js +38 -37
  118. package/dist/notification.js +1 -1
  119. package/dist/number-field.js +1 -1
  120. package/dist/popover.js +1 -1
  121. package/dist/progress.js +1 -1
  122. package/dist/pulse.js +1 -1
  123. package/dist/reactive.js +1 -1
  124. package/dist/scrolling-text.js +1 -1
  125. package/dist/search.js +6 -6
  126. package/dist/select.js +1 -1
  127. package/dist/{sheet-VZEtNFvO.js → sheet-ChSXcJpU.js} +1 -1
  128. package/dist/sheet.js +1 -1
  129. package/dist/{slider-DC2mwuoe.js → slider-sfl8gFDD.js} +8 -8
  130. package/dist/slider.js +1 -1
  131. package/dist/sortable-list.js +2 -2
  132. package/dist/springPresets-aRSm-4_k.js +40 -0
  133. package/dist/stacked-icons.js +6 -6
  134. package/dist/styles/cards.css +2 -2
  135. package/dist/styles/components.css +1 -1
  136. package/dist/styles/dock/layer-group.css +38 -4
  137. package/dist/styles/dock/layers.css +11 -1
  138. package/dist/styles/dock/morph.css +95 -19
  139. package/dist/styles/dock/shell.css +12 -0
  140. package/dist/styles/dock-controls.css +25 -12
  141. package/dist/styles/drawer.css +14 -4
  142. package/dist/styles/floating-panel.css +2 -0
  143. package/dist/styles/glass/a11y-fallback.css +245 -0
  144. package/dist/styles/glass/ladder.css +304 -0
  145. package/dist/styles/glass/material.css +238 -0
  146. package/dist/styles/glass/progress-rail.css +78 -0
  147. package/dist/styles/glass/squircle.css +66 -0
  148. package/dist/styles/glass/surfaces.css +306 -0
  149. package/dist/styles/glass-refract.css +2 -0
  150. package/dist/styles/glass.css +31 -1052
  151. package/dist/styles/hover-popover.css +2 -0
  152. package/dist/styles/index.css +24 -6
  153. package/dist/styles/instrument-chassis.css +4 -0
  154. package/dist/styles/theme.css +14 -14
  155. package/dist/styles/tokens/color-radius.css +250 -0
  156. package/dist/styles/tokens/dark-arm.css +194 -0
  157. package/dist/styles/tokens/glass.css +413 -0
  158. package/dist/styles/tokens/light-dark.css +158 -0
  159. package/dist/styles/tokens/offsets-sizing.css +406 -0
  160. package/dist/styles/tokens/property-regs.css +169 -0
  161. package/dist/styles/tokens/scale-paper.css +361 -0
  162. package/dist/styles/tokens/scheme-motion.css +334 -0
  163. package/dist/styles/tokens/shadow.css +132 -0
  164. package/dist/styles/tokens.css +22 -2269
  165. package/dist/styles/transitions.css +20 -2
  166. package/dist/styles/typography.css +18 -6
  167. package/dist/styles/utilities/a11y-overrides.css +140 -0
  168. package/dist/styles/utilities/animate.css +26 -0
  169. package/dist/styles/utilities/base.css +365 -0
  170. package/dist/styles/utilities/btn.css +399 -0
  171. package/dist/styles/utilities/components.css +317 -0
  172. package/dist/styles/utilities.css +19 -1170
  173. package/dist/switch.js +1 -1
  174. package/dist/tabs.js +98 -98
  175. package/dist/timeline.js +2 -2
  176. package/dist/toast.js +1 -1
  177. package/dist/toggle-group.js +1 -1
  178. package/dist/typewriter.js +1 -1
  179. package/dist/underline.d.ts +1 -0
  180. package/dist/underline.js +85 -0
  181. package/dist/{useAnimatedNumber-C5I3wWd8.js → useAnimatedNumber-DfVgP4te.js} +1 -1
  182. package/dist/{useConfiguratorState-DxAqksK6.js → useConfiguratorState-BdQXh9ie.js} +1 -1
  183. package/dist/useSpecularTracking-DFK_fhpG.js +32 -0
  184. package/dist/useSpringMount-DXUzxBjV.js +108 -0
  185. package/dist/watercolor-dot.js +2 -2
  186. package/package.json +62 -38
  187. package/src/styles/cards.css +2 -2
  188. package/src/styles/dock/layer-group.css +38 -4
  189. package/src/styles/dock/layers.css +11 -1
  190. package/src/styles/dock/morph.css +95 -19
  191. package/src/styles/dock/shell.css +12 -0
  192. package/src/styles/dock-controls.css +25 -12
  193. package/src/styles/drawer.css +12 -4
  194. package/src/styles/glass/a11y-fallback.css +245 -0
  195. package/src/styles/glass/ladder.css +304 -0
  196. package/src/styles/glass/material.css +238 -0
  197. package/src/styles/glass/progress-rail.css +78 -0
  198. package/src/styles/glass/squircle.css +66 -0
  199. package/src/styles/glass/surfaces.css +306 -0
  200. package/src/styles/glass.css +31 -1052
  201. package/src/styles/index.css +24 -6
  202. package/src/styles/theme.css +14 -14
  203. package/src/styles/tokens/color-radius.css +250 -0
  204. package/src/styles/tokens/dark-arm.css +194 -0
  205. package/src/styles/tokens/glass.css +413 -0
  206. package/src/styles/tokens/light-dark.css +158 -0
  207. package/src/styles/tokens/offsets-sizing.css +406 -0
  208. package/src/styles/tokens/property-regs.css +169 -0
  209. package/src/styles/tokens/scale-paper.css +361 -0
  210. package/src/styles/tokens/scheme-motion.css +334 -0
  211. package/src/styles/tokens/shadow.css +132 -0
  212. package/src/styles/tokens.css +22 -2269
  213. package/src/styles/transitions.css +20 -2
  214. package/src/styles/typography.css +18 -6
  215. package/src/styles/utilities/a11y-overrides.css +140 -0
  216. package/src/styles/utilities/animate.css +26 -0
  217. package/src/styles/utilities/base.css +365 -0
  218. package/src/styles/utilities/btn.css +399 -0
  219. package/src/styles/utilities/components.css +317 -0
  220. package/src/styles/utilities.css +19 -1170
  221. package/dist/DeckProgress-Dmk4_AKN.js +0 -23
  222. package/dist/InstrumentRail-CUJ05YVG.js +0 -44
  223. package/dist/components/custom/aurora/composables/gpuRuntime.d.ts +0 -16
  224. package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +0 -7
  225. package/dist/components/custom/deck-progress/DeckProgress.vue.d.ts +0 -27
  226. package/dist/components/custom/deck-progress/index.d.ts +0 -2
  227. package/dist/components/custom/dialog-native/GlassDialogNative.vue.d.ts +0 -57
  228. package/dist/components/custom/dialog-native/index.d.ts +0 -1
  229. package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +0 -41
  230. package/dist/components/custom/glass-panel/index.d.ts +0 -2
  231. package/dist/components/custom/header-ribbon/HeaderRibbon.vue.d.ts +0 -31
  232. package/dist/components/custom/header-ribbon/index.d.ts +0 -2
  233. package/dist/components/custom/header-ribbon/types.d.ts +0 -7
  234. package/dist/components/custom/instrument-rail/InstrumentRail.vue.d.ts +0 -91
  235. package/dist/components/custom/instrument-rail/index.d.ts +0 -2
  236. package/dist/composables/glass/createGPUCanvas.d.ts +0 -40
  237. package/dist/deck-progress.d.ts +0 -1
  238. package/dist/deck-progress.js +0 -2
  239. package/dist/dockContext-BKeIMmNk.js +0 -9
  240. package/dist/glass-panel.d.ts +0 -1
  241. package/dist/glass-panel.js +0 -44
  242. package/dist/header-ribbon.d.ts +0 -1
  243. package/dist/header-ribbon.js +0 -63
  244. package/dist/instrument-rail.d.ts +0 -1
  245. package/dist/instrument-rail.js +0 -2
  246. package/dist/useGlassRenderer-5I0YkI4t.js +0 -69
  247. package/dist/useSpecularTracking-BVRZsRHA.js +0 -26
  248. package/dist/useSpringMount-BJSHcLl3.js +0 -113
  249. /package/dist/{CollapsibleContent-CP9qF1v4.js → CollapsibleContent-Drow5WkV.js} +0 -0
  250. /package/dist/{DialogFooter-Gprw8H_A.js → DialogFooter-DufLHi0y.js} +0 -0
  251. /package/dist/{IconTooltip-yefK7cJc.js → IconTooltip-BrQ5p181.js} +0 -0
  252. /package/dist/{Input-DWQQIOC4.js → Input-B-F818RU.js} +0 -0
  253. /package/dist/{_plugin-vue_export-helper-ok8pgSl5.js → _plugin-vue_export-helper-DWghtRt7.js} +0 -0
  254. /package/dist/{constants-CS75AWHG.js → constants-C8NMonuo.js} +0 -0
  255. /package/dist/{presets-BKVyQfbt.js → presets-1OhFpaIC.js} +0 -0
  256. /package/dist/{prng-wHuHlNHE.js → prng-CjVgzjQT.js} +0 -0
  257. /package/dist/{resolveCanvasColor-BBiYfp8g.js → resolveCanvasColor-CRvVzOvP.js} +0 -0
  258. /package/dist/{useCanvas2D-ClrQuZtp.js → useCanvas2D-CSeH8h16.js} +0 -0
  259. /package/dist/{useGlobalDark-yhL4Wp-s.js → useGlobalDark-D7R9OypB.js} +0 -0
  260. /package/dist/{useIntersectionPause-Cc-H9ees.js → useIntersectionPause-DAdVPVp4.js} +0 -0
  261. /package/dist/{useInterval-Dsmqwi03.js → useInterval-D3USn0yc.js} +0 -0
  262. /package/dist/{useKeyboardShortcuts-Be3w_Rwk.js → useKeyboardShortcuts-i8tHd5WO.js} +0 -0
  263. /package/dist/{useScrollProgress-CAH8Ofwt.js → useScrollProgress-CcgmgMQt.js} +0 -0
  264. /package/dist/{useSortable-C8ReQ50P.js → useSortable-DnyGXKKY.js} +0 -0
  265. /package/dist/{useTextHighlight-DON84L8w.js → useTextHighlight-B3b10W6r.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./createLucideIcon-B6uNAU9G.js";
2
- import { n as t } from "./button-DN39cGqL.js";
3
- import { t as n } from "./_plugin-vue_export-helper-ok8pgSl5.js";
2
+ import { n as t } from "./button-DyiWFAOE.js";
3
+ import { t as n } from "./_plugin-vue_export-helper-DWghtRt7.js";
4
4
  import { Transition as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeModels as d, openBlock as f, renderSlot as p, toDisplayString as m, unref as h, useModel as g, withCtx as _, withKeys as v, withModifiers as y } from "vue";
5
5
  var b = e("loader-circle", [["path", {
6
6
  d: "M21 12a9 9 0 1 1-6.219-8.56",
@@ -1,69 +1,76 @@
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-wHuHlNHE.js";
5
- import { computed as a, createElementBlock as o, createElementVNode as s, defineComponent as c, normalizeClass as l, onMounted as u, openBlock as d, ref as f, unref as p, useTemplateRef as m } from "vue";
6
- //#region src/components/custom/constellation/constellationField.ts
7
- var h = 1280, g = {
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
+ 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/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
13
  alpha: .8
14
- };
15
- function _(e) {
16
- if (typeof window > "u") return { ...g };
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;
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) {
25
+ let t = {
26
+ response: v,
27
+ zeta: 1
28
+ }, n = { ...b }, r = {
29
+ minIdle: x,
30
+ jitter: S
22
31
  };
23
- return {
24
- node: n("--constellation-node", g.node),
25
- nodeDim: n("--constellation-node-dim", g.nodeDim),
26
- line: n("--constellation-line", g.line),
27
- edgeAlpha: r("--constellation-edge-alpha", g.edgeAlpha),
28
- edgeFocusAlpha: r("--constellation-edge-focus-alpha", g.edgeFocusAlpha),
29
- alpha: r("--constellation-alpha", g.alpha)
32
+ if (typeof window > "u") return {
33
+ warp: t,
34
+ well: n,
35
+ wander: r
36
+ };
37
+ let i = getComputedStyle(e), a = (e, t) => {
38
+ let n = i.getPropertyValue(e).trim();
39
+ if (!n) return t;
40
+ let r = Number.parseFloat(n);
41
+ return Number.isFinite(r) ? r : t;
42
+ };
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), {
44
+ warp: t,
45
+ well: n,
46
+ wander: r
30
47
  };
31
48
  }
32
- function v(e, t, n, r, i) {
33
- let a = [];
34
- for (let o = 0; o < t; o++) {
35
- let t = e() * Math.PI * 2;
36
- a.push({
37
- x: e() * n,
38
- y: e() * r,
39
- vx: Math.cos(t) * i,
40
- vy: Math.sin(t) * i,
41
- r: 1.6 + e() * 1.6,
42
- dim: e() < .45
43
- });
44
- }
45
- return a;
46
- }
47
- function y(e, t, n, r, i = 0) {
48
- let { nodes: a, w: o, h: s } = e;
49
- for (let e = 0; e < a.length; e++) {
50
- let n = a[e];
51
- n.x += n.vx * t, n.y += n.vy * t, n.x < 0 ? (n.x = 0, n.vx *= -1) : n.x > o && (n.x = o, n.vx *= -1), n.y < 0 ? (n.y = 0, n.vy *= -1) : n.y > s && (n.y = s, n.vy *= -1);
52
- }
53
- if (r && r.x >= 0) {
54
- let e = 180 * t;
55
- for (let t = 0; t < a.length; t++) {
56
- let i = a[t], o = r.x - i.x, s = r.y - i.y, c = Math.hypot(o, s);
57
- if (c > .5 && c < e) {
58
- let t = Math.hypot(i.vx, i.vy) || n, r = (1 - c / e) * .08, a = i.vx + o / c * r * t, l = i.vy + s / c * r * t, u = Math.hypot(a, l) || 1;
59
- i.vx = a / u * t, i.vy = l / u * t;
49
+ var w = .001, T = 1.5, E = 7, D = 22;
50
+ function O(e, t, n, r) {
51
+ let i = e.well;
52
+ if (!i || !(r > 0)) return;
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;
56
+ for (let e = 0; e < l.length; e++) {
57
+ let t = l[e];
58
+ if (h) {
59
+ let e = i.x - t.x, n = i.y - t.y, r = e * e + n * n;
60
+ if (r <= d) {
61
+ let s = Math.max(Math.sqrt(r), o.soften), c = o.gain * i.strength / (s * s), l = t.vx + e / s * c * a, u = t.vy + n / s * c * a, d = Math.hypot(l, u);
62
+ d > f && (l = l / d * f, u = u / d * f), t.vx = l, t.vy = u;
60
63
  }
61
64
  }
65
+ let r = Math.hypot(t.vx, t.vy);
66
+ if (r > 1e-9) {
67
+ let e = (r + (n - r) * m) / r;
68
+ t.vx *= e, t.vy *= e;
69
+ }
62
70
  }
63
- T(e, i);
64
71
  }
65
- var b = .55, x = 1, S = 2 * Math.PI / b, C = .05;
66
- function w(e, t, n, r = -1) {
72
+ var k = .05;
73
+ function A(e, t, n, r = -1) {
67
74
  let { nodes: i } = e, a = -1, o = Infinity;
68
75
  for (let e = 0; e < i.length; e++) {
69
76
  if (e === r) continue;
@@ -72,13 +79,13 @@ function w(e, t, n, r = -1) {
72
79
  }
73
80
  return a;
74
81
  }
75
- function T(e, t) {
82
+ function j(e, t) {
76
83
  let { warp: n, nodes: r } = e;
77
84
  if (!n || n.targetIdx < 0 || n.targetIdx >= r.length || !(t > 0)) return;
78
- let i = Math.min(t, C), a = r[n.targetIdx], o = -2 * x * S * n.vx - S * S * (n.x - a.x), s = -2 * x * S * n.vy - S * S * (n.y - a.y);
79
- n.vx += o * i, n.vy += s * i, n.x += n.vx * i, n.y += n.vy * i;
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);
86
+ n.vx += l * i, n.vy += u * i, n.x += n.vx * i, n.y += n.vy * i;
80
87
  }
81
- function E(e, t) {
88
+ function M(e, t) {
82
89
  let { warp: n, nodes: r } = e;
83
90
  if (t < 0 || t >= r.length) {
84
91
  n.targetIdx = -1, e.focalIndex = -1;
@@ -86,64 +93,229 @@ function E(e, t) {
86
93
  }
87
94
  e.focalIndex = t, n.targetIdx = t;
88
95
  }
89
- function D(e, t, n) {
90
- let r = w(e, t, n, -1);
96
+ function N(e, t, n) {
97
+ let r = A(e, t, n, -1);
91
98
  if (r >= 0 && r === e.focalIndex) return e.focalIndex;
92
- let i = w(e, t, n, e.focalIndex);
93
- return i < 0 ? -1 : (E(e, i), i);
99
+ let i = A(e, t, n, e.focalIndex);
100
+ return i < 0 ? -1 : (M(e, i), i);
94
101
  }
95
- function O(e, t, n, r) {
96
- let { nodes: i, k: a } = t, o = n * a, s = o * o, c = r.edgeAlpha * r.alpha;
97
- e.strokeStyle = r.line, e.lineWidth = 1 * a;
98
- for (let t = 0; t < i.length; t++) {
99
- let n = i[t];
100
- for (let r = t + 1; r < i.length; r++) {
101
- let t = i[r], a = n.x - t.x, o = n.y - t.y, l = a * a + o * o;
102
- l > s || (e.globalAlpha = c * (1 - l / s), e.beginPath(), e.moveTo(n.x, n.y), e.lineTo(t.x, t.y), e.stroke());
102
+ var P = 24;
103
+ function F(e) {
104
+ let { warp: t, nodes: n } = e;
105
+ if (!t || t.targetIdx < 0 || t.targetIdx >= n.length) return !0;
106
+ let r = n[t.targetIdx];
107
+ return Math.hypot(t.x - r.x, t.y - r.y) < P;
108
+ }
109
+ function I(e, t) {
110
+ let n = e.nodes.length;
111
+ if (n <= 1) return e.focalIndex;
112
+ let r = e.focalIndex;
113
+ if (r < 0 || r >= n) return Math.floor(t() * n) % n;
114
+ let i = Math.floor(t() * (n - 1));
115
+ return i < r ? i : i + 1;
116
+ }
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());
103
188
  }
104
189
  }
105
190
  e.globalAlpha = 1;
106
191
  }
107
- function k(e, t, n) {
108
- let { nodes: r, k: i } = t;
109
- for (let t = 0; t < r.length; t++) {
110
- let a = r[t];
111
- 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();
112
198
  }
199
+ e.globalAlpha = 1;
113
200
  }
114
- function A(e, t, n, r, i) {
201
+ function U(e, t, n, r, i, a = 1) {
115
202
  if (!i || i.x < 0) return;
116
- let { nodes: a, k: o } = t, s = n * o, c = s * s, l = r.edgeFocusAlpha * r.alpha;
117
- e.strokeStyle = r.line, e.lineWidth = 1 * o;
118
- 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) {
119
206
  let n = t.x - i.x, r = t.y - i.y, a = n * n + r * r;
120
- 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());
121
208
  }
122
- 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;
123
210
  }
124
- function j(e, t, n, r, i) {
125
- let { k: a } = t;
211
+ function W(e, t, n, r, i, a = 1) {
212
+ let { k: o } = t;
126
213
  e.strokeStyle = i.line;
127
214
  for (let t = r.length - 1; t >= 0; t--) {
128
215
  let i = r[t];
129
216
  i.start < 0 && (i.start = n);
130
- let o = (n - i.start) / 900;
131
- if (o >= 1) {
217
+ let s = (n - i.start) / 900;
218
+ if (s >= 1) {
132
219
  r.splice(t, 1);
133
220
  continue;
134
221
  }
135
- 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();
136
223
  }
137
224
  e.globalAlpha = 1;
138
225
  }
139
226
  //#endregion
140
- //#region src/components/custom/constellation/Constellation.vue
141
- var M = /* @__PURE__ */ n(/* @__PURE__ */ c({
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
311
+ //#region src/components/custom/constellation/Constellation.vue?vue&type=script&setup=true&lang.ts
312
+ var q = 0, J = /* @__PURE__ */ n(/* @__PURE__ */ c({
142
313
  __name: "Constellation",
143
314
  props: {
144
315
  count: { default: 64 },
145
316
  link: { default: 132 },
146
317
  speed: { default: .16 },
318
+ opacityCeiling: { default: 1 },
147
319
  seed: {},
148
320
  pointerReactive: {
149
321
  type: Boolean,
@@ -153,6 +325,15 @@ var M = /* @__PURE__ */ n(/* @__PURE__ */ c({
153
325
  type: Boolean,
154
326
  default: !1
155
327
  },
328
+ wander: {
329
+ type: [Boolean, Object],
330
+ default: !1
331
+ },
332
+ gravityWell: {
333
+ type: [Boolean, Object],
334
+ default: !1
335
+ },
336
+ freeze: { type: Boolean },
156
337
  class: { type: [
157
338
  Boolean,
158
339
  null,
@@ -163,89 +344,83 @@ var M = /* @__PURE__ */ n(/* @__PURE__ */ c({
163
344
  drawOverlay: { type: Function }
164
345
  },
165
346
  setup(n, { expose: c }) {
166
- let b = m("hostRef"), x = m("canvasRef"), S = a(() => n.seed === void 0 ? Math.random : r(typeof n.seed == "string" ? i(n.seed) : n.seed)), C = {
167
- nodes: [],
168
- canvas: null,
169
- w: 0,
170
- h: 0,
171
- k: 1,
172
- dpr: 1,
173
- focalIndex: -1,
174
- warp: {
175
- x: 0,
176
- y: 0,
177
- vx: 0,
178
- vy: 0,
179
- targetIdx: -1
180
- }
181
- }, w = {
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 = {
182
348
  x: -1,
183
349
  y: -1
184
- }, T = [], E = { ...g }, M = -1, N = f(null);
185
- return u(() => {
186
- let e = x.value;
350
+ }, k = [], A = { ..._ }, j = -1, M = !1, P = p(null);
351
+ return d(() => {
352
+ let e = y.value;
187
353
  if (!e) return;
188
354
  let r = t({
189
- canvas: x,
355
+ canvas: y,
190
356
  setup: (t) => ({ render(t, i) {
191
- let a = e.clientWidth || e.offsetWidth || 1280, o = e.clientHeight || e.offsetHeight || 720, s = a / h;
192
- C.canvas = e, C.dpr = Math.min(typeof window < "u" && window.devicePixelRatio || 1, 2), (C.w !== a || C.h !== o) && (C.w = a, C.h = o, C.k = s, C.nodes.length || (C.nodes = v(S.value, n.count, a, o, n.speed), C.warp.x = a / 2, C.warp.y = o / 2), E = _(e)), C.k = s;
193
- let c = M < 0 ? 0 : (i - M) / 1e3;
194
- if (M = i, !r.reducedMotion) {
195
- let e = n.pointerReactive ? w : null;
196
- y(C, s, n.speed, e, c);
357
+ let a = e.clientWidth || e.offsetWidth || 1280, o = e.clientHeight || e.offsetHeight || 720, s = a / g;
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 = {
364
+ ...t.well,
365
+ ...D
366
+ }), T.wander && (T.wander.minIdle = E.minIdle ?? t.wander.minIdle, T.wander.jitter = E.jitter ?? t.wander.jitter);
367
+ }
197
368
  }
198
- t.clearRect(0, 0, a, o), O(t, C, n.link, E), k(t, C, E), n.pointerReactive && !r.reducedMotion && (A(t, C, n.link, E, w), j(t, C, i, T, E)), n.drawOverlay?.(t, C, i);
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);
376
+ }
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);
199
378
  } })
200
- }), i = b.value, a = (t) => {
201
- let n = e.getBoundingClientRect();
202
- if (!n.width || !n.height) return null;
203
- let r = (t.clientX - n.left) / n.width, i = (t.clientY - n.top) / n.height;
204
- return r < 0 || i < 0 || r > 1 || i > 1 ? null : {
205
- x: r * C.w,
206
- y: i * C.h
207
- };
208
- };
209
- N.value = a, n.pointerReactive && i && !r.reducedMotion && (i.addEventListener("pointermove", (e) => {
210
- let t = a(e);
211
- t ? (w.x = t.x, w.y = t.y) : (w.x = -1, w.y = -1), r.wake();
212
- }), i.addEventListener("pointerleave", () => {
213
- w.x = -1, w.y = -1;
214
- }), i.addEventListener("pointerdown", (e) => {
215
- let t = a(e);
216
- t && T.push({
217
- x: t.x,
218
- y: t.y,
219
- start: -1
220
- }), r.wake();
221
- })), n.warpOnClick && i && !r.reducedMotion && i.addEventListener("pointerdown", (e) => {
222
- let t = a(e);
223
- t && (D(C, t.x, t.y), r.wake());
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
224
392
  });
225
393
  }), c({
226
- field: C,
394
+ field: T,
395
+ isFrozen: w,
227
396
  warpTo(e, t) {
228
397
  if (typeof e == "number" && typeof t == "number") {
229
- let n = N.value?.({
398
+ let n = P.value?.({
230
399
  clientX: e,
231
400
  clientY: t
232
401
  });
233
- return n ? D(C, n.x, n.y) : -1;
402
+ return n ? N(T, n.x, n.y) : -1;
234
403
  }
235
404
  let n = e;
236
- return D(C, n.x, n.y);
405
+ return N(T, n.x, n.y);
406
+ },
407
+ holdWellAt(e, t) {
408
+ return T.well ? (T.well.x = e, T.well.y = t, T.well.target = 1, !0) : !1;
409
+ },
410
+ releaseWell() {
411
+ T.well && (T.well.target = 0);
237
412
  }
238
- }), (t, r) => (d(), o("div", {
413
+ }), (t, r) => (f(), o("div", {
239
414
  ref_key: "hostRef",
240
- ref: b,
241
- class: l(p(e)("constellation", n.class))
415
+ ref: v,
416
+ class: u(m(e)("constellation", n.class))
242
417
  }, [s("canvas", {
243
418
  ref_key: "canvasRef",
244
- ref: x,
419
+ ref: y,
245
420
  class: "constellation-canvas",
246
421
  "aria-hidden": "true"
247
422
  }, null, 512)], 2));
248
423
  }
249
- }), [["__scopeId", "data-v-63dd743d"]]);
424
+ }), [["__scopeId", "data-v-0f4665ba"]]);
250
425
  //#endregion
251
- export { h as BASE_WIDTH, M as Constellation, g as DEFAULT_PALETTE, O as drawEdges, k as drawNodes, A as drawPointerWeb, j as drawRipples, w as nearestNode, _ as readPalette, v as seedField, E as setWarpTarget, y as stepField, T as warpStep, D 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 };
package/dist/controls.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./cn-DJXf4yaB.js";
2
- import { t } from "./_plugin-vue_export-helper-ok8pgSl5.js";
3
- import { t as n } from "./useGlobalDark-yhL4Wp-s.js";
4
- import { computed as r, createBlock as i, createElementVNode as a, defineComponent as o, mergeProps as s, openBlock as c, resolveDynamicComponent as l, unref as u, useAttrs as d, watchEffect as f, withCtx as p } from "vue";
2
+ import { t } from "./_plugin-vue_export-helper-DWghtRt7.js";
3
+ import { t as n } from "./useGlobalDark-D7R9OypB.js";
4
+ import { computed as r, createBlock as i, createElementVNode as a, defineComponent as o, mergeProps as s, openBlock as c, ref as l, resolveDynamicComponent as u, useAttrs as d, watchEffect as f, withCtx as p } from "vue";
5
5
  //#endregion
6
6
  //#region src/components/custom/controls/DarkModeToggle.vue
7
7
  var m = /* @__PURE__ */ t(/* @__PURE__ */ o({
@@ -16,25 +16,55 @@ var m = /* @__PURE__ */ t(/* @__PURE__ */ o({
16
16
  disableTransitions: {
17
17
  type: Boolean,
18
18
  default: !1
19
+ },
20
+ eclipse: {
21
+ type: Boolean,
22
+ default: !1
19
23
  }
20
24
  },
21
25
  setup(t) {
22
- let o = t, m = d(), h = r(() => e("dark-mode-toggle-button", "relative isolate inline-flex shrink-0 items-center justify-center", "cursor-pointer border-0 bg-transparent", "rounded-pill", "opacity-80", "focus-ring", m.class)), { isDark: g, toggleDark: _, setDisableTransitions: v } = n(), y = r(() => {
26
+ let o = t, m = d(), h = l(!1), g = typeof matchMedia < "u" && matchMedia("(prefers-reduced-motion: reduce)").matches, _ = null, v = !1;
27
+ function y() {
28
+ _ !== null && (clearTimeout(_), _ = null);
29
+ }
30
+ function b() {
31
+ !o.eclipse || o.passive || (v = !1, y(), _ = setTimeout(() => {
32
+ v = !0, _ = null, g || (h.value = !0, window.setTimeout(() => h.value = !1, 1700)), T();
33
+ }, 460));
34
+ }
35
+ function x() {
36
+ y();
37
+ }
38
+ function S(e) {
39
+ if (o.eclipse && v) {
40
+ e.preventDefault(), e.stopPropagation(), v = !1;
41
+ return;
42
+ }
43
+ o.passive || T();
44
+ }
45
+ let C = r(() => e("dark-mode-toggle-button", "relative isolate inline-flex shrink-0 items-center justify-center", "cursor-pointer border-0 bg-transparent", "rounded-pill", "opacity-80", "focus-ring", m.class)), { isDark: w, toggleDark: T, setDisableTransitions: E } = n(), D = r(() => {
23
46
  let { class: e, ...t } = m;
24
47
  return o.passive ? t : {
25
48
  type: "button",
26
- "aria-label": g.value ? "Switch to light mode" : "Switch to dark mode",
27
- "aria-pressed": g.value ? "true" : "false",
49
+ "aria-label": w.value ? "Switch to light mode" : "Switch to dark mode",
50
+ "aria-pressed": w.value ? "true" : "false",
28
51
  ...t
29
52
  };
30
53
  });
31
54
  return f(() => {
32
- v(o.disableTransitions);
33
- }), (e, n) => (c(), i(l(t.passive ? "div" : "button"), s({
34
- class: h.value,
35
- "data-size": o.size
36
- }, y.value, { onClick: n[0] ||= (e) => !t.passive && u(_)() }), {
37
- default: p(() => [...n[1] ||= [a("svg", {
55
+ E(o.disableTransitions);
56
+ }), (e, n) => (c(), i(u(t.passive ? "div" : "button"), s({
57
+ class: C.value,
58
+ "data-size": o.size,
59
+ "data-eclipsing": t.eclipse && h.value ? "true" : void 0
60
+ }, D.value, {
61
+ onClick: S,
62
+ onPointerdown: b,
63
+ onPointerup: x,
64
+ onPointerleave: x,
65
+ onPointercancel: x
66
+ }), {
67
+ default: p(() => [...n[0] ||= [a("svg", {
38
68
  xmlns: "http://www.w3.org/2000/svg",
39
69
  viewBox: "0 0 472.39 472.39",
40
70
  class: "block h-full w-full fill-foreground"
@@ -44,8 +74,12 @@ var m = /* @__PURE__ */ t(/* @__PURE__ */ o({
44
74
  r: "90"
45
75
  })])], -1)]]),
46
76
  _: 1
47
- }, 16, ["class", "data-size"]));
77
+ }, 16, [
78
+ "class",
79
+ "data-size",
80
+ "data-eclipsing"
81
+ ]));
48
82
  }
49
- }), [["__scopeId", "data-v-10981347"]]);
83
+ }), [["__scopeId", "data-v-77ac6c77"]]);
50
84
  //#endregion
51
85
  export { m as DarkModeToggle };