@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,69 +0,0 @@
1
- import { onMounted as e, ref as t } from "vue";
2
- //#region src/composables/glass/useGlassRenderer.ts
3
- function n() {
4
- return window.chrome && CSS.supports("backdrop-filter", "url(#x) blur(1px)") ? "svg-filter" : CSS.supports("backdrop-filter", "blur(1px)") || CSS.supports("-webkit-backdrop-filter", "blur(1px)") ? "css" : "fallback";
5
- }
6
- function r(e, t, n, r) {
7
- e.width = t, e.height = n;
8
- let i = e.getContext("2d"), a = i.createImageData(t, n), o = a.data, s = t / 2, c = n / 2;
9
- for (let e = 0; e < n; e++) for (let n = 0; n < t; n++) {
10
- let i = (n - s) / s, a = (e - c) / c, l = Math.sqrt(i * i + a * a), u = l * (1 - l * .3) * r, d = -i * u, f = -a * u, p = (e * t + n) * 4;
11
- o[p] = Math.round(128 + d * 127), o[p + 1] = Math.round(128 + f * 127), o[p + 2] = 128, o[p + 3] = 255;
12
- }
13
- i.putImageData(a, 0, 0);
14
- }
15
- function i(e, t, n) {
16
- e.width = t, e.height = n;
17
- let r = e.getContext("2d"), i = t / 2, a = n / 2, o = Math.max(i, a), s = r.createRadialGradient(i, a, 0, i, a, o);
18
- s.addColorStop(0, "rgba(255,255,255,0)"), s.addColorStop(.5, "rgba(255,255,255,0.02)"), s.addColorStop(.8, "rgba(255,255,255,0.06)"), s.addColorStop(1, "rgba(255,255,255,0.12)"), r.fillStyle = s, r.fillRect(0, 0, t, n);
19
- let c = r.createLinearGradient(0, 0, t, 0);
20
- c.addColorStop(0, "rgba(255,255,255,0)"), c.addColorStop(.3, "rgba(255,255,255,0.15)"), c.addColorStop(.5, "rgba(255,255,255,0.25)"), c.addColorStop(.7, "rgba(255,255,255,0.15)"), c.addColorStop(1, "rgba(255,255,255,0)"), r.fillStyle = c, r.fillRect(0, 0, t, 2);
21
- }
22
- var a = 0;
23
- function o(e, t = {}) {
24
- let n = `glass-refract-${a++}`, o = t.blur ?? 16, s = t.refraction ?? .3, c = document.createElement("canvas");
25
- c.style.display = "none", document.body.appendChild(c);
26
- let l = document.createElement("canvas");
27
- l.style.display = "none", document.body.appendChild(l);
28
- let u = e.getBoundingClientRect(), d = Math.max(Math.ceil(u.width / 4), 32), f = Math.max(Math.ceil(u.height / 4), 32);
29
- r(c, d, f, s), i(l, d, f);
30
- let p = document.createElementNS("http://www.w3.org/2000/svg", "svg");
31
- p.setAttribute("width", "0"), p.setAttribute("height", "0"), p.style.position = "absolute", p.style.pointerEvents = "none";
32
- let m = s * 30;
33
- p.innerHTML = `
34
- <filter id="${n}" x="0%" y="0%" width="100%" height="100%" color-interpolation-filters="sRGB">
35
- <feImage href="${c.toDataURL()}" result="dispMap"
36
- preserveAspectRatio="none" x="0%" y="0%" width="100%" height="100%" />
37
- <feDisplacementMap in="SourceGraphic" in2="dispMap" result="refracted"
38
- scale="${m}" xChannelSelector="R" yChannelSelector="G" />
39
- <feGaussianBlur in="refracted" stdDeviation="${o * .3}" result="blurred" />
40
- <feImage href="${l.toDataURL()}" result="specular"
41
- preserveAspectRatio="none" x="0%" y="0%" width="100%" height="100%" />
42
- <feBlend in="blurred" in2="specular" mode="screen" result="final" />
43
- </filter>
44
- `, document.body.appendChild(p), e.style.backdropFilter = `url(#${n}) blur(${o * .15}px) saturate(var(--glass-saturate, 1.6)) brightness(1.05)`, e.style.setProperty("-webkit-backdrop-filter", e.style.backdropFilter), e.style.border = "1px solid var(--glass-border-floating)", e.style.boxShadow = "var(--glass-material-rim), var(--glass-shadow-floating)";
45
- let h = new ResizeObserver(() => {
46
- let t = e.getBoundingClientRect(), n = Math.max(Math.ceil(t.width / 4), 32), a = Math.max(Math.ceil(t.height / 4), 32);
47
- r(c, n, a, s), i(l, n, a);
48
- let o = p.querySelectorAll("feImage");
49
- o[0] && o[0].setAttribute("href", c.toDataURL()), o[1] && o[1].setAttribute("href", l.toDataURL());
50
- });
51
- return h.observe(e), {
52
- filterId: n,
53
- svgEl: p,
54
- dispCanvas: c,
55
- specCanvas: l,
56
- observer: h
57
- };
58
- }
59
- function s(e) {
60
- e.observer?.disconnect(), e.svgEl.remove(), e.dispCanvas.remove(), e.specCanvas.remove();
61
- }
62
- function c(r) {
63
- let i = t(r?.preferredTier ?? "css");
64
- return e(() => {
65
- r?.preferredTier || (i.value = n());
66
- }), { tier: i };
67
- }
68
- //#endregion
69
- export { s as n, c as r, o as t };
@@ -1,26 +0,0 @@
1
- import { ref as e } from "vue";
2
- //#region src/composables/glass/useSpecularTracking.ts
3
- function t() {
4
- return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
5
- }
6
- function n() {
7
- let n = e({});
8
- function r(e) {
9
- if (t()) return;
10
- let r = e.currentTarget;
11
- if (!r) return;
12
- let i = r.getBoundingClientRect();
13
- if (i.width === 0 || i.height === 0) return;
14
- let a = (e.clientX - i.left) / i.width * 100, o = (e.clientY - i.top) / i.height * 100;
15
- n.value = {
16
- "--mouse-x": `${a.toFixed(2)}%`,
17
- "--mouse-y": `${o.toFixed(2)}%`
18
- };
19
- }
20
- return {
21
- specularStyle: n,
22
- onPointerMove: r
23
- };
24
- }
25
- //#endregion
26
- export { n as t };
@@ -1,113 +0,0 @@
1
- import { computed as e, getCurrentScope as t, nextTick as n, onMounted as r, onScopeDispose as i, readonly as a, ref as o, shallowRef as s, toValue as c, watch as l } from "vue";
2
- import { SpringProgress as u } from "@mkbabb/keyframes.js";
3
- //#region src/composables/motion/useSpring.ts
4
- function d(e, n = {}) {
5
- let r = n.initial ?? 0, d = n.initialVelocity ?? 0, f = o(r), p = o(d), m = o(d === 0), h = s(new u({
6
- response: n.response ?? .5,
7
- dampingFraction: n.dampingFraction ?? .86,
8
- initial: r,
9
- initialVelocity: d,
10
- settleThreshold: n.settleThreshold ?? .001,
11
- velocitySettleThreshold: n.velocitySettleThreshold ?? .001,
12
- respectReducedMotion: n.respectReducedMotion !== !1
13
- })), g = h.value.subscribe((e, t) => {
14
- f.value = e, p.value = t, m.value = h.value.settled, n.onValue?.(e, t);
15
- });
16
- h.value.play(() => {});
17
- let _ = l(() => c(e), (e) => {
18
- e != null && (h.value.target = e);
19
- }, { immediate: !0 });
20
- function v() {
21
- f.value = h.value.value, p.value = h.value.velocity, m.value = h.value.settled;
22
- }
23
- function y() {
24
- _(), g(), h.value.dispose();
25
- }
26
- return t() && i(y), {
27
- value: a(f),
28
- velocity: a(p),
29
- isSettled: a(m),
30
- snap: () => {
31
- h.value.snap(), v();
32
- },
33
- reset: (e, t) => {
34
- h.value.reset(e ?? 0, t ?? 0), v();
35
- },
36
- dispose: y
37
- };
38
- }
39
- //#endregion
40
- //#region src/composables/motion/useSpringMount.ts
41
- var f = {
42
- smooth: {
43
- response: .5,
44
- dampingFraction: .86
45
- },
46
- snappy: {
47
- response: .35,
48
- dampingFraction: .65
49
- },
50
- bouncy: {
51
- response: .5,
52
- dampingFraction: .45
53
- },
54
- gentle: {
55
- response: .7,
56
- dampingFraction: 1
57
- }
58
- };
59
- function p(t) {
60
- let a = f[t.preset ?? "smooth"], s = o(1), c = o(!1), u = 0, p = 0, m = null, h = !1, g = d(s, {
61
- response: a.response,
62
- dampingFraction: a.dampingFraction,
63
- initial: 1,
64
- settleThreshold: .001,
65
- velocitySettleThreshold: .001,
66
- respectReducedMotion: t.respectReducedMotion !== !1
67
- });
68
- r(() => {
69
- t.open.value && n(() => {
70
- s.value = 0;
71
- });
72
- });
73
- let _ = l(() => t.open.value, (e, t) => {
74
- e !== t && (c.value || (s.value = +!e));
75
- }, { immediate: !1 }), v = l(() => g.isSettled.value, (e) => {
76
- e && h && s.value >= 1 && (h = !1, t.onDismiss?.());
77
- });
78
- function y(e) {
79
- if (e.button !== 0) return;
80
- let t = e.currentTarget;
81
- p = t.getBoundingClientRect().height || 1, u = e.clientY, m = e.pointerId, c.value = !0, t.setPointerCapture(e.pointerId);
82
- }
83
- function b(e) {
84
- if (!c.value || e.pointerId !== m) return;
85
- let t = e.clientY - u;
86
- if (t <= 0) {
87
- s.value = 0;
88
- return;
89
- }
90
- s.value = Math.min(1, t / p);
91
- }
92
- function x(e) {
93
- if (!c.value || e.pointerId !== m) return;
94
- let n = e.currentTarget;
95
- n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), c.value = !1, m = null;
96
- let r = t.dismissThreshold ?? .3;
97
- s.value >= r ? (h = !0, s.value = 1) : s.value = 0;
98
- }
99
- return i(() => {
100
- _(), v();
101
- }), {
102
- position: g.value,
103
- isDragging: e(() => c.value),
104
- dragHandlers: {
105
- onPointerdown: y,
106
- onPointermove: b,
107
- onPointerup: x,
108
- onPointercancel: x
109
- }
110
- };
111
- }
112
- //#endregion
113
- export { d as n, p as t };
@@ -1,21 +0,0 @@
1
- //#region src/composables/motion/useViewTransition.ts
2
- function e() {
3
- return typeof document < "u" && typeof document.startViewTransition == "function";
4
- }
5
- function t(e, t) {
6
- let n = typeof document > "u" ? void 0 : document;
7
- if (!n || typeof n.startViewTransition != "function") return e(), {
8
- finished: Promise.resolve(),
9
- transitioned: !1
10
- };
11
- let r = t?.types && t.types.length > 0 ? n.startViewTransition({
12
- update: () => e(),
13
- types: t.types
14
- }) : n.startViewTransition(() => e());
15
- return r.ready?.catch(() => {}), {
16
- finished: r.finished.then(() => void 0, () => void 0),
17
- transitioned: !0
18
- };
19
- }
20
- //#endregion
21
- export { e as n, t };
@@ -1,53 +0,0 @@
1
- //#region src/utils/moveBefore.ts
2
- function e(e, t, n) {
3
- let r = e;
4
- typeof r.moveBefore == "function" ? r.moveBefore(t, n) : e.insertBefore(t, n);
5
- }
6
- function t() {
7
- return typeof Element < "u" && "moveBefore" in Element.prototype;
8
- }
9
- //#endregion
10
- //#region src/utils/platformSupport.ts
11
- function n() {
12
- return typeof globalThis.scheduler?.postTask == "function";
13
- }
14
- //#endregion
15
- //#region src/composables/motion/useRouteTransition.ts
16
- function r() {
17
- return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
18
- }
19
- function i() {
20
- return typeof document < "u" && typeof document.startViewTransition == "function";
21
- }
22
- function a() {
23
- function e(e, t) {
24
- let n = typeof document > "u" ? void 0 : document;
25
- if (!n || typeof n.startViewTransition != "function" || r()) return {
26
- finished: (async () => e())().then(() => void 0, () => void 0),
27
- transitioned: !1
28
- };
29
- let i = t?.types && t.types.length > 0 ? n.startViewTransition({
30
- update: () => e(),
31
- types: t.types
32
- }) : n.startViewTransition(() => e());
33
- return i.ready?.catch(() => {}), {
34
- finished: i.finished.then(() => void 0, () => void 0),
35
- transitioned: !0
36
- };
37
- }
38
- return {
39
- navigate: e,
40
- supported: i()
41
- };
42
- }
43
- //#endregion
44
- //#region src/composables/motion/vReveal.ts
45
- function o(e, t) {
46
- e.setAttribute("data-reveal", t.arg === "fade" ? "fade" : ""), e.style.setProperty("--d", String(t.value ?? 0));
47
- }
48
- var s = {
49
- mounted: o,
50
- updated: o
51
- };
52
- //#endregion
53
- export { e as a, n as i, i as n, t as o, a as r, s as t };
File without changes
File without changes