@mkbabb/glass-ui 8.0.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +4768 -0
- package/README.md +57 -13
- package/dist/DialogContent-CwIBvou_.js +157 -0
- package/dist/{DropdownMenuTrigger-8UZsBtZ8.js → DropdownMenuTrigger-CKRnhDSQ.js} +1 -1
- package/dist/{Surface-i1tWC-Ga.js → Surface-1nPoabc3.js} +1 -1
- package/dist/{accent-tone-solve-Cw7WkRD9.js → accent-tone-solve-5H6FY2QO.js} +1 -1
- package/dist/aurora.js +386 -355
- package/dist/{badge-owUOaaba.js → badge-BO6BC4G5.js} +1 -1
- package/dist/badge.js +1 -1
- package/dist/blob.js +44 -44
- package/dist/{button-yvGPb0Bx.js → button-BOFTUPyU.js} +1 -1
- package/dist/button.js +1 -1
- package/dist/{card-3HFFpC7_.js → card-ByyqRBvK.js} +2 -2
- package/dist/card.js +1 -1
- package/dist/carousel.js +3 -3
- package/dist/{checkbox-BnXuGgJ3.js → checkbox-B1qn65se.js} +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chip.js +8 -3
- package/dist/{class-names-q-UGOkHH.js → class-names-FlXcvRRT.js} +65 -18
- package/dist/{collapsible-B7O6m-Ch.js → collapsible-DFzK29Oh.js} +5 -2
- package/dist/collapsible.js +1 -1
- package/dist/color.glsl-DTJhdekG.js +34 -0
- package/dist/color.js +11 -11
- package/dist/color.wgsl-BTszLY39.js +398 -0
- package/dist/{command-BuBnYpxF.js → command-C-5xSEJ2.js} +8 -8
- package/dist/command.js +1 -1
- package/dist/component-styles.css +1 -0
- package/dist/components/_shared/class-names.d.ts +10 -1
- package/dist/components/_shared/control.d.ts +0 -1
- package/dist/components/_shared/index.d.ts +0 -1
- package/dist/components/_shared/menu/menu.css +1 -1
- package/dist/components/_shared/overlay/index.d.ts +1 -0
- package/dist/components/_shared/overlay/shortcuts.d.ts +12 -0
- package/dist/components/aurora/Aurora.vue.d.ts +1 -0
- package/dist/components/aurora/composables/atoms.d.ts +22 -6
- package/dist/components/aurora/composables/frameLoop.d.ts +6 -5
- package/dist/components/aurora/composables/runtime.d.ts +28 -1
- package/dist/components/aurora/composables/useAurora.d.ts +28 -0
- package/dist/components/aurora/composables/wgpuSetup.d.ts +1 -1
- package/dist/components/aurora/constants/presets.d.ts +62 -5
- package/dist/components/aurora/index.d.ts +1 -1
- package/dist/components/blob/Blob.vue.d.ts +3 -3
- package/dist/components/card/Card.vue.d.ts +8 -2
- package/dist/components/chip/Chip.vue.d.ts +1 -7
- package/dist/components/chip/chipVariants.d.ts +1 -0
- package/dist/components/collapsible/Collapsible.vue.d.ts +1 -0
- package/dist/components/command/CommandDialog.vue.d.ts +1 -1
- package/dist/components/configurator/Configurator.vue.d.ts +25 -2
- package/dist/components/configurator/ConfiguratorRow.vue.d.ts +4 -2
- package/dist/components/configurator/styles.css +1 -1
- package/dist/components/dark-mode-toggle/dark-mode-toggle.css +1 -1
- package/dist/components/deck/styles/capture.css +1 -1
- package/dist/components/dialog/styles.css +1 -1
- package/dist/components/dock/DockSeparator.vue.d.ts +2 -3
- package/dist/components/dock/GlassDock.vue.d.ts +1 -0
- package/dist/components/dock/composables/dockContext.d.ts +1 -8
- package/dist/components/dock/composables/dockCrossfadeContext.d.ts +0 -2
- package/dist/components/dock/composables/index.d.ts +1 -1
- package/dist/components/dock/composables/useDockHold.d.ts +16 -12
- package/dist/components/dock/composables/useDockRun.d.ts +20 -0
- package/dist/components/dock/composables/useDockSearch.d.ts +1 -1
- package/dist/components/dock/composables/useDockShellProps.d.ts +18 -101
- package/dist/components/dock/composables/useDockState.d.ts +2 -9
- package/dist/components/dock/constants.d.ts +15 -0
- package/dist/components/dock/index.d.ts +2 -2
- package/dist/components/dock/styles/controls/icon-button.css +1 -1
- package/dist/components/dock/styles/controls/tab-button.css +1 -1
- package/dist/components/dock/styles/controls/triggers.css +1 -1
- package/dist/components/dock/styles/controls.css +1 -1
- package/dist/components/dock/styles/density.css +1 -1
- package/dist/components/dock/styles/index.css +1 -1
- package/dist/components/dock/styles/layer-group.css +1 -1
- package/dist/components/dock/styles/layers.css +1 -1
- package/dist/components/dock/styles/morph.css +1 -1
- package/dist/components/dock/styles/run.css +1 -0
- package/dist/components/dock/styles/search.css +1 -1
- package/dist/components/dock/styles/shape.css +1 -1
- package/dist/components/dock/styles/shell-regions.css +1 -1
- package/dist/components/dock/styles/shell.css +1 -1
- package/dist/components/fourier-field/FourierField.vue.d.ts +29 -26
- package/dist/components/fourier-field/clock.d.ts +35 -0
- package/dist/components/fourier-field/constants.d.ts +80 -104
- package/dist/components/fourier-field/index.d.ts +3 -28
- package/dist/components/fourier-field/math.d.ts +69 -77
- package/dist/components/fourier-field/renderer/mint.d.ts +50 -0
- package/dist/components/fourier-field/renderer/uniforms.d.ts +84 -0
- package/dist/components/fourier-field/renderer/wgpu.d.ts +28 -0
- package/dist/components/fourier-field/shaders/compute.wgsl.d.ts +1 -0
- package/dist/components/fourier-field/shaders/render.wgsl.d.ts +1 -0
- package/dist/components/fourier-field/useFourierField.d.ts +49 -0
- package/dist/components/handmark/HandMark.vue.d.ts +18 -14
- package/dist/components/handmark/index.d.ts +4 -23
- package/dist/components/handmark/stroke.d.ts +92 -0
- package/dist/components/labeled-field/LabeledSwitch.vue.d.ts +3 -1
- package/dist/components/labeled-field/types.d.ts +1 -1
- package/dist/components/menu/DropdownMenu.vue.d.ts +1 -1
- package/dist/components/metric/coalesce-metric.d.ts +6 -1
- package/dist/components/metric/styles.css +1 -1
- package/dist/components/popover/Popover.vue.d.ts +1 -1
- package/dist/components/scroll-progress-rim/styles.css +1 -1
- package/dist/components/sheet/styles.css +1 -1
- package/dist/components/slider/styles.css +1 -1
- package/dist/components/tabs/SegmentedTabs.vue.d.ts +25 -112
- package/dist/components/tabs/composables/useTabDragMorph.d.ts +1 -1
- package/dist/components/tabs/composables/useTabResponsive.d.ts +11 -11
- package/dist/components/tabs/index.d.ts +1 -1
- package/dist/components/tabs/styles/drag.css +1 -1
- package/dist/components/tabs/styles/segmented.css +1 -1
- package/dist/components/tabs/types.d.ts +85 -0
- package/dist/components/timeline/index.d.ts +2 -0
- package/dist/components/toast/Toast.vue.d.ts +2 -2
- package/dist/composables/color/index.d.ts +0 -15
- package/dist/composables/dark/darkModeSyncScript.d.ts +42 -0
- package/dist/composables/dom/useResolveTokenColor.d.ts +1 -1
- package/dist/composables/glass/index.d.ts +2 -0
- package/dist/composables/keyboard/useKeyboardShortcuts.d.ts +47 -1
- package/dist/composables/motion/pointer/pointerFieldMappings.d.ts +0 -41
- package/dist/{components/search/composables → composables/search}/index.d.ts +2 -2
- package/dist/{components/search/composables/fuzzySearchIndex.d.ts → composables/search/match.d.ts} +8 -3
- package/dist/composables/sidebar/types.d.ts +5 -1
- package/dist/configurator-DiwVN573.js +339 -0
- package/dist/configurator.js +1 -1
- package/dist/constellation.js +5 -5
- package/dist/{content-CWO-XL7o.js → content-So3j6SOe.js} +1 -1
- package/dist/control-DJp15L4U.js +7 -0
- package/dist/dark-mode-toggle.js +2 -2
- package/dist/{dark-z_P5QwqI.js → dark-pONY3x93.js} +2 -2
- package/dist/dark.js +1 -1
- package/dist/{data-table-_RrOEdiw.js → data-table-Ba_uTfPc.js} +3 -3
- package/dist/data-table.js +1 -1
- package/dist/{deck-Ci6YjB5e.js → deck-Cm_VmyNL.js} +1 -1
- package/dist/deck.js +1 -1
- package/dist/{dialog-CbRnTRtg.js → dialog-BZoFG0j8.js} +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dock.js +718 -496
- package/dist/dom.js +90 -8
- package/dist/easing.js +5 -5
- package/dist/expandable-container-CZUj9BzY.js +142 -0
- package/dist/expandable-container.js +2 -142
- package/dist/fourier-field.js +638 -855
- package/dist/fourier-math.js +6 -6
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +88 -75
- package/dist/handmark.js +330 -718
- package/dist/index.d.ts +2 -2
- package/dist/infinite-scroll.js +16 -17
- package/dist/{input-Bls2A4Tt.js → input-eLZ_AU7l.js} +1 -1
- package/dist/input.js +1 -1
- package/dist/keyboard.js +64 -21
- package/dist/{label-BQEZhnK_.js → label-CE03H1KL.js} +2 -2
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +9 -6
- package/dist/{menu-wLu1XGKn.js → menu-BnmCOa3y.js} +93 -90
- package/dist/menu.js +2 -2
- package/dist/metric.js +12 -7
- package/dist/{motion-D4uYE0UM.js → motion-BvV1_24p.js} +1 -1
- package/dist/motion-core.js +35 -35
- package/dist/{number-field-NFAwQ0HK.js → number-field-RP89046a.js} +2 -2
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.js +3 -3
- package/dist/{participation-B0hdsIRo.js → participation-Di4UHbzk.js} +8 -8
- package/dist/{pointerFieldMappings-DP5tla5z.js → pointerFieldMappings-DXwlU5uj.js} +7 -23
- package/dist/popover-DA87hFBx.js +184 -0
- package/dist/popover.js +1 -1
- package/dist/{progress-DF8dWZIX.js → progress-eVa-mc7J.js} +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-group-Ci8o-pDx.js → radio-group-B58Bz16F.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{select-CDgwGH_P.js → select-fy3vtArm.js} +13 -13
- package/dist/select.js +1 -1
- package/dist/{separator-CN11t406.js → separator-D4EZM10u.js} +2 -2
- package/dist/separator.js +1 -1
- package/dist/{sheet-BEFvnO_u.js → sheet-BQJyER59.js} +120 -115
- package/dist/sheet.js +2 -2
- package/dist/shortcuts-DGGWNRNe.js +13 -0
- package/dist/sidebar.js +4 -4
- package/dist/{slider-gsc8jDIo.js → slider-5ChjjWSR.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/{status-dot-BpnqOP5N.js → status-dot-W4LFiJps.js} +2 -2
- package/dist/status-dot.js +1 -1
- package/dist/styles/accessibility.css +1 -1
- package/dist/styles/animations.css +1 -1
- package/dist/styles/components.css +1 -1
- package/dist/styles/glass/a11y-fallback.css +1 -1
- package/dist/styles/glass/dissolve.css +1 -1
- package/dist/styles/glass/focus-veil.css +1 -1
- package/dist/styles/glass/ladder.css +1 -1
- package/dist/styles/glass/material.css +1 -1
- package/dist/styles/glass/overlay-plate.css +1 -1
- package/dist/styles/glass/reveal.css +1 -1
- package/dist/styles/glass-specular-track.css +1 -1
- package/dist/styles/paper.css +1 -1
- package/dist/styles/scroll-choreography.css +1 -1
- package/dist/styles/scroll-chrome.css +1 -1
- package/dist/styles/scroll-driven.css +1 -1
- package/dist/styles/theme/literals.css +1 -1
- package/dist/styles/tokens/color-radius.css +1 -1
- package/dist/styles/tokens/dark-arm-glass.css +1 -1
- package/dist/styles/tokens/light-dark.css +1 -1
- package/dist/styles/tokens/offsets.css +1 -1
- package/dist/styles/tokens/scheme-motion.css +1 -1
- package/dist/styles/tokens/sizing.css +1 -1
- package/dist/styles/typography/semantic.css +1 -1
- package/dist/styles/typography/utilities.css +1 -1
- package/dist/styles/utilities/a11y-overrides.css +1 -1
- package/dist/styles/utilities/responsive.css +1 -1
- package/dist/styles/view-transition.css +1 -1
- package/dist/styles/viz-reveal.css +1 -1
- package/dist/surface.js +1 -1
- package/dist/{switch-DxZzDrmV.js → switch-BYUZ6g9G.js} +2 -2
- package/dist/switch.js +1 -1
- package/dist/{tabs-CYscnq5H.js → tabs-rdRXKXxd.js} +4 -3
- package/dist/tabs.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +44 -42
- package/dist/{toast-9c6Kp58L.js → toast-DVOwo6GB.js} +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-11aPGMfE.js → toggle-group-CC5b3o1R.js} +2 -2
- package/dist/toggle-group.js +1 -1
- package/dist/{tooltip-DqKMZ4dn.js → tooltip-DhTHhtJN.js} +2 -2
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{useAccentTone-DFAh1osB.js → useAccentTone-DitmKfGL.js} +1 -1
- package/dist/{resolveCanvasColor-6MCrswTB.js → useCanvas2D-CQRElMyE.js} +1 -11
- package/dist/{usePointerVelocityField-DsIf7yyq.js → usePointerVelocityField-Lx26_Yap.js} +1 -1
- package/dist/useResolveTokenColor-B2FfJnd9.js +24 -0
- package/package.json +5 -21
- package/dist/DialogContent-4hzLiaCQ.js +0 -152
- package/dist/canvas.d.ts +0 -1
- package/dist/canvas.js +0 -2
- package/dist/color.wgsl-B0N3mKMb.js +0 -412
- package/dist/compile-D7VYG3gi.js +0 -19
- package/dist/components/dock/composables/useDockOverflowFit.d.ts +0 -20
- package/dist/components/dock/composables/useDockTouchGate.d.ts +0 -42
- package/dist/components/dock/styles/overflow.css +0 -1
- package/dist/components/fourier-field/composables/fourierFieldGLSetup.d.ts +0 -24
- package/dist/components/fourier-field/composables/fourierFieldWGPUSetup.d.ts +0 -31
- package/dist/components/fourier-field/composables/uniformBridgeWGPU.d.ts +0 -39
- package/dist/components/fourier-field/composables/useFourierField.d.ts +0 -56
- package/dist/components/fourier-field/shaders/fourier-field.compute.wgsl.d.ts +0 -1
- package/dist/components/fourier-field/shaders/fourier-field.glsl.d.ts +0 -4
- package/dist/components/fourier-field/shaders/fourier-field.render.wgsl.d.ts +0 -1
- package/dist/components/fourier-field/shaders/fourier-field.ribbon.d.ts +0 -51
- package/dist/components/handmark/brush.d.ts +0 -269
- package/dist/components/handmark/composables/useHandMark.d.ts +0 -99
- package/dist/components/handmark/constants.d.ts +0 -69
- package/dist/components/handmark/freehand.d.ts +0 -69
- package/dist/components/handmark/geometry.d.ts +0 -62
- package/dist/components/handmark/ink.d.ts +0 -11
- package/dist/components/handmark/noise.d.ts +0 -30
- package/dist/components/handmark/texture.d.ts +0 -39
- package/dist/components/handmark/types.d.ts +0 -70
- package/dist/components/search/SearchBar.vue.d.ts +0 -38
- package/dist/components/search/index.d.ts +0 -8
- package/dist/components/search/searchVariants.d.ts +0 -16
- package/dist/configurator-BoeScnDL.js +0 -311
- package/dist/control-Da4XeT43.js +0 -11
- package/dist/popover-DBMKTPkL.js +0 -181
- package/dist/search.d.ts +0 -1
- package/dist/search.js +0 -61
- package/dist/useFuzzySearch-CUnZknpm.js +0 -177
- package/dist/useResolveTokenColor-CspQv_ik.js +0 -107
- /package/dist/{components/search/composables → composables/search}/types.d.ts +0 -0
- /package/dist/{components/search/composables → composables/search}/useFuzzySearch.d.ts +0 -0
package/dist/control-Da4XeT43.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region src/components/_shared/control.ts
|
|
2
|
-
var e = {
|
|
3
|
-
sm: "[--control-pill-h:var(--control-h-sm)] [--control-pill-text:var(--control-text-sm)]",
|
|
4
|
-
md: "",
|
|
5
|
-
lg: "[--control-pill-h:var(--control-h-lg)]"
|
|
6
|
-
}, t = (t = "md") => e[t], n = (e) => ({
|
|
7
|
-
"data-invalid": e || void 0,
|
|
8
|
-
"aria-invalid": e || void 0
|
|
9
|
-
});
|
|
10
|
-
//#endregion
|
|
11
|
-
export { n, t };
|
package/dist/popover-DBMKTPkL.js
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./content-CWO-XL7o.js";
|
|
2
|
-
import { t } from "./createContext-BhkE9mLH.js";
|
|
3
|
-
import { t as n } from "./participation-B0hdsIRo.js";
|
|
4
|
-
import { computed as r, createBlock as i, defineComponent as a, mergeProps as o, openBlock as s, ref as c, renderSlot as l, resolveDynamicComponent as u, unref as d, useAttrs as f, watch as p, withCtx as m } from "vue";
|
|
5
|
-
import { HoverCardContent as h, HoverCardPortal as g, HoverCardRoot as _, HoverCardTrigger as v, PopoverContent as y, PopoverPortal as b, PopoverRoot as x, PopoverTrigger as S } from "reka-ui";
|
|
6
|
-
//#region src/components/popover/popoverContext.ts
|
|
7
|
-
var C = t("glass-ui:popover-union"), w = C.provide, T = C.use, E = /* @__PURE__ */ a({
|
|
8
|
-
name: "Popover",
|
|
9
|
-
inheritAttrs: !1,
|
|
10
|
-
__name: "Popover",
|
|
11
|
-
props: {
|
|
12
|
-
open: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: void 0
|
|
15
|
-
},
|
|
16
|
-
defaultOpen: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: !1
|
|
19
|
-
},
|
|
20
|
-
trigger: { default: "click" },
|
|
21
|
-
openDelay: { default: 250 },
|
|
22
|
-
closeDelay: { default: 150 },
|
|
23
|
-
keepDockOpen: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: !1
|
|
26
|
-
},
|
|
27
|
-
modal: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: !1
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
emits: ["update:open"],
|
|
33
|
-
setup(e, { emit: t }) {
|
|
34
|
-
let a = e, o = t, u = c(a.open ?? a.defaultOpen);
|
|
35
|
-
p(() => a.open, (e) => {
|
|
36
|
-
e !== void 0 && (u.value = e);
|
|
37
|
-
});
|
|
38
|
-
let f = r(() => a.open ?? u.value);
|
|
39
|
-
function h(e) {
|
|
40
|
-
a.open === void 0 && (u.value = e), o("update:open", e);
|
|
41
|
-
}
|
|
42
|
-
let g = typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(pointer: coarse)").matches, v = r(() => a.trigger === "hover" && !g);
|
|
43
|
-
return w({
|
|
44
|
-
usesHoverRoot: v,
|
|
45
|
-
modal: r(() => a.modal)
|
|
46
|
-
}), n({ hold: () => f.value && a.keepDockOpen }), (t, n) => v.value ? (s(), i(d(_), {
|
|
47
|
-
key: 0,
|
|
48
|
-
"data-slot": "popover",
|
|
49
|
-
open: f.value,
|
|
50
|
-
"open-delay": e.openDelay,
|
|
51
|
-
"close-delay": e.closeDelay,
|
|
52
|
-
"onUpdate:open": h
|
|
53
|
-
}, {
|
|
54
|
-
default: m(() => [l(t.$slots, "default")]),
|
|
55
|
-
_: 3
|
|
56
|
-
}, 8, [
|
|
57
|
-
"open",
|
|
58
|
-
"open-delay",
|
|
59
|
-
"close-delay"
|
|
60
|
-
])) : (s(), i(d(x), {
|
|
61
|
-
key: 1,
|
|
62
|
-
"data-slot": "popover",
|
|
63
|
-
open: f.value,
|
|
64
|
-
modal: e.modal,
|
|
65
|
-
"onUpdate:open": h
|
|
66
|
-
}, {
|
|
67
|
-
default: m(() => [l(t.$slots, "default")]),
|
|
68
|
-
_: 3
|
|
69
|
-
}, 8, ["open", "modal"]));
|
|
70
|
-
}
|
|
71
|
-
}), D = /* @__PURE__ */ a({
|
|
72
|
-
name: "PopoverTrigger",
|
|
73
|
-
inheritAttrs: !1,
|
|
74
|
-
__name: "PopoverTrigger",
|
|
75
|
-
props: {
|
|
76
|
-
asChild: {
|
|
77
|
-
type: Boolean,
|
|
78
|
-
default: !1
|
|
79
|
-
},
|
|
80
|
-
class: { type: [
|
|
81
|
-
Boolean,
|
|
82
|
-
null,
|
|
83
|
-
String,
|
|
84
|
-
Object,
|
|
85
|
-
Array
|
|
86
|
-
] }
|
|
87
|
-
},
|
|
88
|
-
setup(e) {
|
|
89
|
-
let t = e, n = f(), a = r(() => {
|
|
90
|
-
let { as: e, reference: r, ...i } = n;
|
|
91
|
-
return t.asChild ? i : {
|
|
92
|
-
...i,
|
|
93
|
-
type: "button"
|
|
94
|
-
};
|
|
95
|
-
}), c = T(), u = r(() => c?.usesHoverRoot.value ?? !1);
|
|
96
|
-
return (n, r) => u.value ? (s(), i(d(v), o({ key: 0 }, a.value, {
|
|
97
|
-
as: "button",
|
|
98
|
-
"as-child": e.asChild,
|
|
99
|
-
class: t.class
|
|
100
|
-
}), {
|
|
101
|
-
default: m(() => [l(n.$slots, "default")]),
|
|
102
|
-
_: 3
|
|
103
|
-
}, 16, ["as-child", "class"])) : (s(), i(d(S), o({ key: 1 }, a.value, {
|
|
104
|
-
as: "button",
|
|
105
|
-
"as-child": e.asChild,
|
|
106
|
-
class: t.class
|
|
107
|
-
}), {
|
|
108
|
-
default: m(() => [l(n.$slots, "default")]),
|
|
109
|
-
_: 3
|
|
110
|
-
}, 16, ["as-child", "class"]));
|
|
111
|
-
}
|
|
112
|
-
}), O = /* @__PURE__ */ a({
|
|
113
|
-
name: "PopoverContent",
|
|
114
|
-
inheritAttrs: !1,
|
|
115
|
-
__name: "PopoverContent",
|
|
116
|
-
props: {
|
|
117
|
-
class: { type: [
|
|
118
|
-
Boolean,
|
|
119
|
-
null,
|
|
120
|
-
String,
|
|
121
|
-
Object,
|
|
122
|
-
Array
|
|
123
|
-
] },
|
|
124
|
-
portal: {
|
|
125
|
-
type: Boolean,
|
|
126
|
-
default: !0
|
|
127
|
-
},
|
|
128
|
-
ariaLabel: {},
|
|
129
|
-
side: { default: "bottom" },
|
|
130
|
-
sideOffset: { default: 4 },
|
|
131
|
-
align: { default: "center" },
|
|
132
|
-
alignOffset: { default: 0 }
|
|
133
|
-
},
|
|
134
|
-
emits: [
|
|
135
|
-
"escapeKeyDown",
|
|
136
|
-
"pointerDownOutside",
|
|
137
|
-
"focusOutside",
|
|
138
|
-
"interactOutside",
|
|
139
|
-
"openAutoFocus",
|
|
140
|
-
"closeAutoFocus"
|
|
141
|
-
],
|
|
142
|
-
setup(t, { emit: a }) {
|
|
143
|
-
let c = t, p = a, _ = f(), v = r(() => ({
|
|
144
|
-
side: c.side,
|
|
145
|
-
sideOffset: c.sideOffset,
|
|
146
|
-
align: c.align,
|
|
147
|
-
alignOffset: c.alignOffset,
|
|
148
|
-
avoidCollisions: !0
|
|
149
|
-
})), x = (e, { slots: t }) => t.default?.(), S = T(), C = r(() => S?.usesHoverRoot.value ?? !1), w = r(() => c.portal ? C.value ? g : b : x), E = r(() => C.value ? h : y), D = r(() => (S?.modal.value ?? !1) && !C.value), O = r(() => ({
|
|
150
|
-
"aria-label": c.ariaLabel,
|
|
151
|
-
...C.value ? { role: "group" } : {},
|
|
152
|
-
...D.value ? { "aria-modal": "true" } : {}
|
|
153
|
-
})), k = n(), A = r(() => e({
|
|
154
|
-
role: "panel",
|
|
155
|
-
slot: "popover-content",
|
|
156
|
-
dock: k.portalAttrs.value,
|
|
157
|
-
class: ["z-popover", c.class]
|
|
158
|
-
}));
|
|
159
|
-
return (e, t) => (s(), i(u(w.value), null, {
|
|
160
|
-
default: m(() => [(s(), i(u(E.value), o({
|
|
161
|
-
...v.value,
|
|
162
|
-
...d(_),
|
|
163
|
-
...O.value,
|
|
164
|
-
...A.value
|
|
165
|
-
}, {
|
|
166
|
-
onEscapeKeyDown: t[0] ||= (e) => p("escapeKeyDown", e),
|
|
167
|
-
onPointerDownOutside: t[1] ||= (e) => p("pointerDownOutside", e),
|
|
168
|
-
onFocusOutside: t[2] ||= (e) => p("focusOutside", e),
|
|
169
|
-
onInteractOutside: t[3] ||= (e) => p("interactOutside", e),
|
|
170
|
-
onOpenAutoFocus: t[4] ||= (e) => p("openAutoFocus", e),
|
|
171
|
-
onCloseAutoFocus: t[5] ||= (e) => p("closeAutoFocus", e)
|
|
172
|
-
}), {
|
|
173
|
-
default: m(() => [l(e.$slots, "default")]),
|
|
174
|
-
_: 3
|
|
175
|
-
}, 16))]),
|
|
176
|
-
_: 3
|
|
177
|
-
}));
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
//#endregion
|
|
181
|
-
export { D as n, E as r, O as t };
|
package/dist/search.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./components/search/index.js";
|
package/dist/search.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { n as e, t } from "./class-names-q-UGOkHH.js";
|
|
2
|
-
import { t as n } from "./control-Da4XeT43.js";
|
|
3
|
-
import { a as r, i, n as a, r as o, t as s } from "./useFuzzySearch-CUnZknpm.js";
|
|
4
|
-
import { computed as c, createBlock as l, createElementVNode as u, defineComponent as d, mergeProps as f, normalizeClass as p, openBlock as m, ref as h, renderSlot as g, resolveDynamicComponent as _, unref as v, useAttrs as y, withCtx as b } from "vue";
|
|
5
|
-
import { Search as x } from "@lucide/vue";
|
|
6
|
-
//#region src/components/search/searchVariants.ts
|
|
7
|
-
var S = {
|
|
8
|
-
inline: "",
|
|
9
|
-
floating: "",
|
|
10
|
-
bare: "border-none bg-transparent p-0 rounded-none"
|
|
11
|
-
};
|
|
12
|
-
function C(t = {}) {
|
|
13
|
-
return e(S[t.variant ?? "inline"], t.class, t.className);
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/components/search/SearchBar.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
-
var w = ["value", "placeholder"], T = /* @__PURE__ */ d({
|
|
18
|
-
inheritAttrs: !1,
|
|
19
|
-
__name: "SearchBar",
|
|
20
|
-
props: {
|
|
21
|
-
modelValue: { default: "" },
|
|
22
|
-
placeholder: { default: "Search…" },
|
|
23
|
-
icon: {},
|
|
24
|
-
tag: { default: "div" },
|
|
25
|
-
size: { default: "md" },
|
|
26
|
-
surface: { default: "glass" },
|
|
27
|
-
variant: { default: "inline" }
|
|
28
|
-
},
|
|
29
|
-
emits: ["update:modelValue"],
|
|
30
|
-
setup(e, { expose: r, emit: i }) {
|
|
31
|
-
let a = i, o = y(), s = c(() => {
|
|
32
|
-
let { class: e, ...t } = o;
|
|
33
|
-
return t;
|
|
34
|
-
}), d = h(null);
|
|
35
|
-
return r({ inputRef: d }), (r, i) => (m(), l(_(e.tag), {
|
|
36
|
-
class: p(v(t)("input-bar", v(n)(e.size), v(C)({ variant: e.variant }), r.$attrs.class)),
|
|
37
|
-
"data-surface": e.surface
|
|
38
|
-
}, {
|
|
39
|
-
default: b(() => [
|
|
40
|
-
(m(), l(_(e.icon ?? v(x)), {
|
|
41
|
-
class: "size-(--search-icon-size) text-muted-foreground shrink-0",
|
|
42
|
-
"aria-hidden": "true"
|
|
43
|
-
})),
|
|
44
|
-
u("input", f({
|
|
45
|
-
ref_key: "inputRef",
|
|
46
|
-
ref: d,
|
|
47
|
-
type: "search"
|
|
48
|
-
}, s.value, {
|
|
49
|
-
value: e.modelValue,
|
|
50
|
-
placeholder: e.placeholder,
|
|
51
|
-
class: "input-bar-field",
|
|
52
|
-
onInput: i[0] ||= (e) => a("update:modelValue", e.target.value)
|
|
53
|
-
}), null, 16, w),
|
|
54
|
-
g(r.$slots, "default")
|
|
55
|
-
]),
|
|
56
|
-
_: 3
|
|
57
|
-
}, 8, ["class", "data-surface"]));
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
//#endregion
|
|
61
|
-
export { T as SearchBar, a as buildIndex, o as clearSearchCache, i as fuzzyMatch, C as searchFieldVariants, r as searchIndex, s as useFuzzySearch };
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { computed as e, onScopeDispose as t, ref as n, watch as r } from "vue";
|
|
2
|
-
//#region src/components/search/composables/fuzzySearchIndex.ts
|
|
3
|
-
function i(e, t) {
|
|
4
|
-
let n = e.length, r = t.length;
|
|
5
|
-
if (n === 0) return {
|
|
6
|
-
score: 0,
|
|
7
|
-
matches: []
|
|
8
|
-
};
|
|
9
|
-
if (n > r) return null;
|
|
10
|
-
let i = [], a = 0, o = 0, s = -2;
|
|
11
|
-
for (let c = 0; c < r && a < n; c++) {
|
|
12
|
-
if (e[a] !== t[c]) continue;
|
|
13
|
-
i.push(c);
|
|
14
|
-
let n = 1;
|
|
15
|
-
if (s === c - 1 && (n += 5), c === 0) n += 8;
|
|
16
|
-
else {
|
|
17
|
-
let e = t[c - 1];
|
|
18
|
-
" -_./\\:()".includes(e) ? n += 7 : t[c] >= "A" && t[c] <= "Z" && e >= "a" && e <= "z" && (n += 6);
|
|
19
|
-
}
|
|
20
|
-
a === c && (n += 3), o += n, s = c, a++;
|
|
21
|
-
}
|
|
22
|
-
return a < n ? null : (o -= Math.max(0, (r - n) * .1), {
|
|
23
|
-
score: o,
|
|
24
|
-
matches: i
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function a(e, t) {
|
|
28
|
-
if (!t) return null;
|
|
29
|
-
let n = 0, r = [];
|
|
30
|
-
for (let a of e) {
|
|
31
|
-
let e = i(a, t);
|
|
32
|
-
if (!e) return null;
|
|
33
|
-
n += e.score;
|
|
34
|
-
for (let t of e.matches) r.push(t);
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
score: n,
|
|
38
|
-
matches: r
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function o(e, t) {
|
|
42
|
-
let n = 0, r = [], i = [
|
|
43
|
-
[t._lc.label, 12],
|
|
44
|
-
[t._lc.type, 10],
|
|
45
|
-
[t._lc.text, 3]
|
|
46
|
-
];
|
|
47
|
-
for (let [o, s] of i) {
|
|
48
|
-
if (!o) continue;
|
|
49
|
-
let i = a(e, o);
|
|
50
|
-
i && i.score * s > n && (n = i.score * s, r = o === t._lc.label ? i.matches : []);
|
|
51
|
-
}
|
|
52
|
-
return n <= 0 ? null : {
|
|
53
|
-
score: n,
|
|
54
|
-
matches: r
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
function s(e) {
|
|
58
|
-
return e.map((e) => ({
|
|
59
|
-
item: e,
|
|
60
|
-
_lc: {
|
|
61
|
-
label: e.label.toLowerCase(),
|
|
62
|
-
text: e.text.toLowerCase(),
|
|
63
|
-
type: e.type?.toLowerCase() ?? ""
|
|
64
|
-
}
|
|
65
|
-
}));
|
|
66
|
-
}
|
|
67
|
-
var c = /* @__PURE__ */ new WeakMap();
|
|
68
|
-
function l(e) {
|
|
69
|
-
let t = c.get(e);
|
|
70
|
-
return t || (t = /* @__PURE__ */ new Map(), c.set(e, t)), t;
|
|
71
|
-
}
|
|
72
|
-
function u(e, t, n = 30) {
|
|
73
|
-
let r = t.toLowerCase().trim();
|
|
74
|
-
if (!r) return [];
|
|
75
|
-
let i = l(e), a = i.get(r);
|
|
76
|
-
if (a) return a.slice(0, n);
|
|
77
|
-
i.size > 200 && i.clear();
|
|
78
|
-
let s = r.split(/\s+/).filter(Boolean);
|
|
79
|
-
if (s.length === 0) return [];
|
|
80
|
-
let c = e;
|
|
81
|
-
if (r.length > 1) {
|
|
82
|
-
let e = r.slice(0, -1), t = i.get(e);
|
|
83
|
-
t && (c = t.map((e) => ({
|
|
84
|
-
item: e.item,
|
|
85
|
-
_lc: {
|
|
86
|
-
label: e.item.label.toLowerCase(),
|
|
87
|
-
text: e.item.text.toLowerCase(),
|
|
88
|
-
type: e.item.type?.toLowerCase() ?? ""
|
|
89
|
-
}
|
|
90
|
-
})));
|
|
91
|
-
}
|
|
92
|
-
let u = [];
|
|
93
|
-
for (let e of c) {
|
|
94
|
-
let t = o(s, e);
|
|
95
|
-
t && u.push({
|
|
96
|
-
item: e.item,
|
|
97
|
-
score: t.score,
|
|
98
|
-
matchIndices: t.matches
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
return u.sort((e, t) => t.score - e.score), i.set(r, u), u.slice(0, n);
|
|
102
|
-
}
|
|
103
|
-
function d(e) {
|
|
104
|
-
if (e) {
|
|
105
|
-
c.delete(e);
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
c = /* @__PURE__ */ new WeakMap();
|
|
109
|
-
}
|
|
110
|
-
//#endregion
|
|
111
|
-
//#region src/components/search/composables/useFuzzySearch.ts
|
|
112
|
-
function f(i) {
|
|
113
|
-
let a = typeof i.items == "function" ? i.items : () => i.items, o = i.debounceMs ?? 120, c = i.maxResults ?? 30, l = n(""), f = n(!1), p = n(!1), m = n(0), h = n(""), g = e(() => a()), _ = e(() => s(g.value)), v;
|
|
114
|
-
function y(e = v) {
|
|
115
|
-
e !== void 0 && (clearTimeout(e), v === e && (v = void 0));
|
|
116
|
-
}
|
|
117
|
-
r(l, (e, t, n) => {
|
|
118
|
-
if (y(), !e || o <= 0) {
|
|
119
|
-
h.value = e;
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
let r = setTimeout(() => {
|
|
123
|
-
v === r && (h.value = e, v = void 0);
|
|
124
|
-
}, o);
|
|
125
|
-
v = r, n(() => y(r));
|
|
126
|
-
}), r(g, () => {
|
|
127
|
-
y(), h.value = l.value, m.value = 0;
|
|
128
|
-
}, { deep: !0 });
|
|
129
|
-
let b = e(() => u(_.value, h.value, c));
|
|
130
|
-
r(b, () => {
|
|
131
|
-
m.value = 0;
|
|
132
|
-
});
|
|
133
|
-
function x(e) {
|
|
134
|
-
i.onSelect?.(e), S();
|
|
135
|
-
}
|
|
136
|
-
function S() {
|
|
137
|
-
f.value = !1, p.value = !1, y(), l.value = "", h.value = "", m.value = 0, d(_.value);
|
|
138
|
-
}
|
|
139
|
-
function C() {
|
|
140
|
-
f.value = !0;
|
|
141
|
-
}
|
|
142
|
-
function w() {
|
|
143
|
-
p.value = !p.value;
|
|
144
|
-
}
|
|
145
|
-
function T(e) {
|
|
146
|
-
switch (e.key) {
|
|
147
|
-
case "ArrowDown":
|
|
148
|
-
e.preventDefault(), m.value < b.value.length - 1 && m.value++;
|
|
149
|
-
break;
|
|
150
|
-
case "ArrowUp":
|
|
151
|
-
e.preventDefault(), m.value > 0 && m.value--;
|
|
152
|
-
break;
|
|
153
|
-
case "Enter":
|
|
154
|
-
e.preventDefault(), b.value[m.value] && x(b.value[m.value]);
|
|
155
|
-
break;
|
|
156
|
-
case "Escape":
|
|
157
|
-
e.preventDefault(), p.value ? p.value = !1 : S();
|
|
158
|
-
break;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
return t(() => {
|
|
162
|
-
y(), d(_.value);
|
|
163
|
-
}, !0), {
|
|
164
|
-
query: l,
|
|
165
|
-
results: b,
|
|
166
|
-
isOpen: f,
|
|
167
|
-
isExpanded: p,
|
|
168
|
-
selectedIndex: m,
|
|
169
|
-
selectResult: x,
|
|
170
|
-
close: S,
|
|
171
|
-
open: C,
|
|
172
|
-
toggleExpanded: w,
|
|
173
|
-
onKeydown: T
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
//#endregion
|
|
177
|
-
export { u as a, i, s as n, d as r, f as t };
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./useTimer-C3yfti4C.js";
|
|
2
|
-
import { getCurrentScope as t, onScopeDispose as n, ref as r } from "vue";
|
|
3
|
-
//#region src/composables/dom/useTouchGate.ts
|
|
4
|
-
var i = /* @__PURE__ */ new Set(), a = !1;
|
|
5
|
-
function o(e) {
|
|
6
|
-
for (let t of i) {
|
|
7
|
-
if (!t.isActive()) continue;
|
|
8
|
-
let n = t.controlEl();
|
|
9
|
-
n && !n.contains(e.target) && t.deactivate();
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
function s() {
|
|
13
|
-
a || typeof document > "u" || (document.addEventListener("touchstart", o, { passive: !0 }), a = !0);
|
|
14
|
-
}
|
|
15
|
-
function c() {
|
|
16
|
-
i.size > 0 || !a || typeof document > "u" || (document.removeEventListener("touchstart", o), a = !1);
|
|
17
|
-
}
|
|
18
|
-
function l(a = 3e3) {
|
|
19
|
-
let o = r(!1), l = typeof window < "u" && "ontouchstart" in window, u = null, d = null, f = !1, p = !1, m = e(() => {
|
|
20
|
-
x();
|
|
21
|
-
}, a, { immediate: !1 }), h = e(() => {
|
|
22
|
-
f && u && (f = !1, d = null, y(u));
|
|
23
|
-
}, 150, { immediate: !1 });
|
|
24
|
-
function g() {
|
|
25
|
-
m.stop();
|
|
26
|
-
}
|
|
27
|
-
function _() {
|
|
28
|
-
h.stop(), f = !1, d = null;
|
|
29
|
-
}
|
|
30
|
-
function v() {
|
|
31
|
-
g(), m.start(a);
|
|
32
|
-
}
|
|
33
|
-
function y(e) {
|
|
34
|
-
o.value = !0, e.style.touchAction = "none", v();
|
|
35
|
-
}
|
|
36
|
-
function b(e) {
|
|
37
|
-
if (p = e, e) {
|
|
38
|
-
g();
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
v();
|
|
42
|
-
}
|
|
43
|
-
function x() {
|
|
44
|
-
p || (g(), _(), o.value = !1, u &&= (u.style.touchAction = "", null));
|
|
45
|
-
}
|
|
46
|
-
function S(e, t) {
|
|
47
|
-
return l ? (u = e, o.value ? (v(), !0) : (_(), f = !0, d = t, h.start(150), !1)) : !0;
|
|
48
|
-
}
|
|
49
|
-
function C(e) {
|
|
50
|
-
if (!l || !f || d === null) return;
|
|
51
|
-
let t = e.touches[0]?.clientY ?? 0;
|
|
52
|
-
Math.abs(t - d) > 10 && _();
|
|
53
|
-
}
|
|
54
|
-
function w() {
|
|
55
|
-
if (l) {
|
|
56
|
-
if (f && u) {
|
|
57
|
-
_(), y(u);
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
o.value && v();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
let T = {
|
|
64
|
-
isActive: () => o.value,
|
|
65
|
-
controlEl: () => u,
|
|
66
|
-
deactivate: x
|
|
67
|
-
};
|
|
68
|
-
l && (i.add(T), s());
|
|
69
|
-
function E() {
|
|
70
|
-
g(), _(), l && (i.delete(T), c()), u &&= (u.style.touchAction = "", null);
|
|
71
|
-
}
|
|
72
|
-
return t() && n(E), {
|
|
73
|
-
isActive: o,
|
|
74
|
-
isTouchDevice: l,
|
|
75
|
-
handleTouchStart: S,
|
|
76
|
-
handleScrollCheck: C,
|
|
77
|
-
handleTouchEnd: w,
|
|
78
|
-
resetTimer: v,
|
|
79
|
-
deactivate: x,
|
|
80
|
-
suppressDeactivate: b
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region src/composables/dom/useResolveTokenColor.ts
|
|
85
|
-
function u(e, t) {
|
|
86
|
-
if (!e.includes("var(") || typeof window > "u" || !t) return e;
|
|
87
|
-
let n = t.style.color;
|
|
88
|
-
t.style.color = e;
|
|
89
|
-
let r = getComputedStyle(t).color;
|
|
90
|
-
return t.style.color = n, r || e;
|
|
91
|
-
}
|
|
92
|
-
function d(e = 256) {
|
|
93
|
-
let t = /* @__PURE__ */ new Map();
|
|
94
|
-
return {
|
|
95
|
-
resolve(n, r) {
|
|
96
|
-
let i = t.get(n);
|
|
97
|
-
if (i !== void 0) return i;
|
|
98
|
-
let a = u(n, r);
|
|
99
|
-
return t.size >= e && t.clear(), t.set(n, a), a;
|
|
100
|
-
},
|
|
101
|
-
invalidate() {
|
|
102
|
-
t.clear();
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
//#endregion
|
|
107
|
-
export { u as n, l as r, d as t };
|
|
File without changes
|
|
File without changes
|