@mkbabb/glass-ui 3.1.0 → 3.2.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/dist/{CardFooter-CSGcJkqa.js → CardFooter-3-VGho1J.js} +1 -1
- package/dist/{CommandShortcut-DWT19a2Y.js → CommandShortcut-C6lsz3pG.js} +3 -3
- package/dist/{ContextMenuSubContent-gAFxJ-qi.js → ContextMenuSubContent-DrWkXKQP.js} +4 -4
- package/dist/{DataTable-R8-Zidms.js → DataTable-BsrDYdoE.js} +3 -3
- package/dist/{DialogContent-2fALDSvc.js → DialogContent-B61rP8lj.js} +3 -3
- package/dist/{DialogFooter-ClrNEOVU.js → DialogFooter-Er0wA3K6.js} +2 -2
- package/dist/{DiscoGlyph-C3JfMnRV.js → DiscoGlyph-B7YooI2-.js} +1 -1
- package/dist/{GlyphFace-BRS8vUb7.js → GlyphFace-Bvk6OIas.js} +1 -1
- package/dist/{HoverPopover-CWFCfLx3.js → HoverPopover-BlEwqG7S.js} +1 -1
- package/dist/{IconTooltip-BkaA7tZ2.js → IconTooltip-DXveGjx7.js} +1 -1
- package/dist/{MetricBadge-DmAihkXd.js → MetricBadge-J_GBCb8e.js} +1 -1
- package/dist/{Notification-OqIpADml.js → Notification-DP_ApJLo.js} +3 -3
- package/dist/{NumberFieldContent-DTH9gb_N.js → NumberFieldContent-B6L6YrQz.js} +2 -2
- package/dist/{PopoverContent-EiklFrna.js → PopoverContent-CxEEUL7Y.js} +1 -1
- package/dist/{Progress-FApA9fm_.js → Progress-Bs44qWEM.js} +1 -1
- package/dist/{ScrollingText-BFd0i2zJ.js → ScrollingText-1Qjnwz6H.js} +2 -2
- package/dist/{SelectScrollDownButton-Dth8-wXQ.js → SelectScrollDownButton-BvvvAbuh.js} +4 -4
- package/dist/{Toaster-Bjlunvq4.js → Toaster-Brs6QjBU.js} +1 -1
- package/dist/{UnderlineTabs-DAWMLmJG.js → UnderlineTabs-B4FV2zi_.js} +1 -1
- package/dist/animated-digit.js +2 -2
- package/dist/api.js +1 -1
- package/dist/aurora.js +118 -150
- package/dist/badge.js +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +5 -5
- package/dist/{check-dwgetki8.js → check-CdkxGxXJ.js} +1 -1
- package/dist/{chevron-down-DILQA1t6.js → chevron-down-pBY8sYfV.js} +1 -1
- package/dist/{chevron-right-fS7fal2t.js → chevron-right-BjeKC22V.js} +1 -1
- package/dist/{chevron-up-BtYjYQOS.js → chevron-up-DBeNHUm1.js} +1 -1
- package/dist/collapsible.js +1 -1
- package/dist/command.js +1 -1
- package/dist/components/custom/aurora/composables/color.d.ts +56 -8
- package/dist/components/custom/aurora/index.d.ts +2 -1
- package/dist/components/custom/aurora/presets.d.ts +1 -1
- package/dist/components/custom/aurora/shaders/aurora.frag.d.ts +1 -1
- package/dist/components/custom/configurator/Configurator.vue.d.ts +26 -0
- package/dist/components/custom/configurator/index.d.ts +1 -1
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +14 -3
- package/dist/components/custom/dock/GlassDock.vue.d.ts +17 -0
- package/dist/composables/dom/index.d.ts +1 -0
- package/dist/composables/dom/useTextHighlight.d.ts +40 -0
- package/dist/composables/motion/core/index.d.ts +1 -0
- package/dist/composables/motion/usePrioritizedTask.d.ts +41 -0
- package/dist/composables/sortable/useSortable.d.ts +13 -0
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +3 -3
- package/dist/context-menu.js +2 -2
- package/dist/controls.js +2 -2
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/dialog.js +2 -2
- package/dist/disco-glyph.js +1 -1
- package/dist/dock.js +91 -74
- package/dist/dom.js +6 -5
- package/dist/{dropdown-menu-BvRUamNs.js → dropdown-menu-naE0skDg.js} +4 -4
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +2 -2
- package/dist/forms.js +4 -4
- package/dist/glass-carousel.js +59 -52
- package/dist/glass-panel.js +2 -2
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +231 -224
- package/dist/glyph-face.js +2 -2
- package/dist/header-ribbon.js +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/hover-popover.js +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/instrument-chassis.js +1 -1
- package/dist/instrument-rail.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +6 -6
- package/dist/metric-badge.js +1 -1
- package/dist/metric-stack.js +1 -1
- package/dist/{minimize-2-LsCJ_eNt.js → minimize-2-BP27-qBY.js} +1 -1
- package/dist/motion-core.js +155 -95
- package/dist/motion.js +3 -3
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/paper-backdrop.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/{presets-a-D93K1S.js → presets-BpTf63Hp.js} +4 -4
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +2 -2
- package/dist/responsive-tabs.js +2 -2
- package/dist/scrolling-text.js +1 -1
- package/dist/{search-DBAiUABx.js → search-DBG8qaRs.js} +1 -1
- package/dist/search.js +153 -149
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/{sheet-CukNDezz.js → sheet-BnvZRXPq.js} +3 -3
- package/dist/sheet.js +1 -1
- package/dist/{slider-DJvHkTRe.js → slider-wx8ifVFB.js} +3 -3
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +2 -2
- package/dist/styles/components.css +45 -0
- package/dist/styles/dock.css +71 -2
- package/dist/styles/index.css +5 -1
- package/dist/styles/tokens.css +11 -0
- package/dist/styles/utilities.css +56 -0
- package/dist/supportsCssTimeline-IQY3gfKD.js +12 -0
- package/dist/switch.js +1 -1
- package/dist/tabs.js +25 -10
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{useAnimatedNumber-DKQYVB7s.js → useAnimatedNumber-BOxrS3a6.js} +1 -1
- package/dist/{useConfiguratorState-BR5vUDL8.js → useConfiguratorState-Dq2gNv4A.js} +55 -41
- package/dist/{useIdleReady-Cmkhm03v.js → useIdleReady-sLhGo6CL.js} +1 -1
- package/dist/useSortable-DLK9kwZp.js +189 -0
- package/dist/useTextHighlight-CLST6an0.js +72 -0
- package/dist/{useTouchGate-D9Zvrzyc.js → useTouchGate-XX8gHfay.js} +1 -1
- package/dist/{useViewTransition-DYIK6Gzb.js → useViewTransition-CUJM7fXT.js} +5 -3
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/platformSupport.d.ts +8 -0
- package/dist/{x-q7pJa83X.js → x-C4pz9nbD.js} +1 -1
- package/package.json +14 -3
- package/src/styles/dock.css +71 -2
- package/src/styles/index.css +1 -1
- package/src/styles/tokens.css +11 -0
- package/src/styles/utilities.css +56 -0
- package/dist/useSortable-Cq2Y1JLO.js +0 -175
- /package/dist/{CollapsibleContent-CVMOcYlV.js → CollapsibleContent-wlmlDujU.js} +0 -0
- /package/dist/{ContextMenuContent-otjFIu8v.js → ContextMenuContent-De01_83g.js} +0 -0
- /package/dist/{HoverCardContent-DaGrgJBO.js → HoverCardContent-DGUhpRVt.js} +0 -0
- /package/dist/{Input-DDpFn568.js → Input-IFsIzId2.js} +0 -0
- /package/dist/{InstrumentChassis-CnHTMxds.js → InstrumentChassis-CqKPBNqp.js} +0 -0
- /package/dist/{InstrumentRail-C6dEbi8E.js → InstrumentRail-CCjvKkpB.js} +0 -0
- /package/dist/{Label-DJty89bp.js → Label-D53EOwLE.js} +0 -0
- /package/dist/{ModalOverlay-iWiAgbYH.js → ModalOverlay-B_CBtqcE.js} +0 -0
- /package/dist/{PaperBackdrop-CeZ-w0R0.js → PaperBackdrop-Ds-wDsKf.js} +0 -0
- /package/dist/{SelectGroup-DdR4tdDY.js → SelectGroup-DAgcsfFw.js} +0 -0
- /package/dist/{SelectSeparator-CXm_hlqA.js → SelectSeparator-DN1jzLaI.js} +0 -0
- /package/dist/{Separator-D8AUMhxY.js → Separator-DXxac0j8.js} +0 -0
- /package/dist/{Switch-Cr1t_F_U.js → Switch-imA0Hdjs.js} +0 -0
- /package/dist/{ToggleGroupItem-OesUouE7.js → ToggleGroupItem-Cy7xHFEo.js} +0 -0
- /package/dist/{TooltipProvider-DE78vbEP.js → TooltipProvider-MZFRxOvT.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-Dq1MygBL.js → _plugin-vue_export-helper-C1je1s0u.js} +0 -0
- /package/dist/{badge-x46my_Fo.js → badge-Cl6JZ1B7.js} +0 -0
- /package/dist/{button-C0aHmBbt.js → button-DS3ULf5i.js} +0 -0
- /package/dist/{constants-DwBwnG8N.js → constants-DfWPi8kh.js} +0 -0
- /package/dist/{createLucideIcon-Bn9a1b70.js → createLucideIcon-DuDoe_ra.js} +0 -0
- /package/dist/{dockContext-D5NZCWJs.js → dockContext-DM58L1Jt.js} +0 -0
- /package/dist/{keys-CaTQS-vx.js → keys-SIKQYNx1.js} +0 -0
- /package/dist/{menuItemVariants-BsbGNq9C.js → menuItemVariants-C2QlXqT3.js} +0 -0
- /package/dist/{useGlassRenderer-Ds-nmrGz.js → useGlassRenderer-C98tZnJ7.js} +0 -0
- /package/dist/{useGlobalDark-B0WvLJE3.js → useGlobalDark-BUUTZvkU.js} +0 -0
- /package/dist/{useIntersectionPause-IY2CwPQb.js → useIntersectionPause-CUmANkoc.js} +0 -0
- /package/dist/{useInterval-DVgGUf_y.js → useInterval-B58LmYth.js} +0 -0
- /package/dist/{useKeyboardShortcuts-Dpw_RUcB.js → useKeyboardShortcuts-BQfnAHHW.js} +0 -0
- /package/dist/{useResizeObserver-Cg9npuM3.js → useResizeObserver-C_7GjpRn.js} +0 -0
- /package/dist/{useSpringMount-Cfk1XK1R.js → useSpringMount-CnizvZGm.js} +0 -0
- /package/dist/{useTimer-NAaj9zNq.js → useTimer-6FoosoDY.js} +0 -0
- /package/dist/{useUserInvalidAria-DVu1eTXG.js → useUserInvalidAria-BW5iyqWR.js} +0 -0
package/dist/search.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { t as e } from "./cn-DJXf4yaB.js";
|
|
2
|
-
import { n as t, t as n } from "./minimize-2-
|
|
3
|
-
import { t as r } from "./search-
|
|
4
|
-
import { t as i } from "./x-
|
|
5
|
-
import { n as a } from "./badge-
|
|
6
|
-
import { n as o } from "./button-
|
|
7
|
-
import { n as s, t as c } from "./DialogContent-
|
|
8
|
-
import { n as l, r as u, t as d } from "./PopoverContent-
|
|
9
|
-
import {
|
|
2
|
+
import { n as t, t as n } from "./minimize-2-BP27-qBY.js";
|
|
3
|
+
import { t as r } from "./search-DBG8qaRs.js";
|
|
4
|
+
import { t as i } from "./x-C4pz9nbD.js";
|
|
5
|
+
import { n as a } from "./badge-Cl6JZ1B7.js";
|
|
6
|
+
import { n as o } from "./button-DS3ULf5i.js";
|
|
7
|
+
import { n as s, t as c } from "./DialogContent-B61rP8lj.js";
|
|
8
|
+
import { n as l, r as u, t as d } from "./PopoverContent-CxEEUL7Y.js";
|
|
9
|
+
import { t as f } from "./useTextHighlight-CLST6an0.js";
|
|
10
|
+
import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as y, createVNode as b, defineComponent as x, nextTick as S, normalizeClass as C, onScopeDispose as w, openBlock as T, ref as E, renderList as D, renderSlot as O, resolveDynamicComponent as k, toDisplayString as A, unref as j, watch as M, withCtx as N } from "vue";
|
|
10
11
|
//#region src/components/custom/search/composables/fuzzySearchIndex.ts
|
|
11
|
-
function
|
|
12
|
+
function P(e, t) {
|
|
12
13
|
let n = e.length, r = t.length;
|
|
13
14
|
if (n === 0) return {
|
|
14
15
|
score: 0,
|
|
@@ -32,11 +33,11 @@ function N(e, t) {
|
|
|
32
33
|
matches: i
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
+
function F(e, t) {
|
|
36
37
|
if (!t) return null;
|
|
37
38
|
let n = 0, r = [];
|
|
38
39
|
for (let i of e) {
|
|
39
|
-
let e =
|
|
40
|
+
let e = P(i, t);
|
|
40
41
|
if (!e) return null;
|
|
41
42
|
n += e.score;
|
|
42
43
|
for (let t of e.matches) r.push(t);
|
|
@@ -46,7 +47,7 @@ function P(e, t) {
|
|
|
46
47
|
matches: r
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
+
function I(e, t) {
|
|
50
51
|
let n = 0, r = [], i = [
|
|
51
52
|
[t._lc.label, 12],
|
|
52
53
|
[t._lc.type, 10],
|
|
@@ -54,7 +55,7 @@ function F(e, t) {
|
|
|
54
55
|
];
|
|
55
56
|
for (let [a, o] of i) {
|
|
56
57
|
if (!a) continue;
|
|
57
|
-
let i =
|
|
58
|
+
let i = F(e, a);
|
|
58
59
|
i && i.score * o > n && (n = i.score * o, r = a === t._lc.label ? i.matches : []);
|
|
59
60
|
}
|
|
60
61
|
return n <= 0 ? null : {
|
|
@@ -62,7 +63,7 @@ function F(e, t) {
|
|
|
62
63
|
matches: r
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
+
function L(e) {
|
|
66
67
|
return e.map((e) => ({
|
|
67
68
|
item: e,
|
|
68
69
|
_lc: {
|
|
@@ -72,15 +73,15 @@ function I(e) {
|
|
|
72
73
|
}
|
|
73
74
|
}));
|
|
74
75
|
}
|
|
75
|
-
var
|
|
76
|
-
function
|
|
77
|
-
let t =
|
|
78
|
-
return t || (t = /* @__PURE__ */ new Map(),
|
|
76
|
+
var R = /* @__PURE__ */ new WeakMap();
|
|
77
|
+
function z(e) {
|
|
78
|
+
let t = R.get(e);
|
|
79
|
+
return t || (t = /* @__PURE__ */ new Map(), R.set(e, t)), t;
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
+
function B(e, t, n = 30) {
|
|
81
82
|
let r = t.toLowerCase().trim();
|
|
82
83
|
if (!r) return [];
|
|
83
|
-
let i =
|
|
84
|
+
let i = z(e), a = i.get(r);
|
|
84
85
|
if (a) return a.slice(0, n);
|
|
85
86
|
i.size > 200 && i.clear();
|
|
86
87
|
let o = r.split(/\s+/).filter(Boolean);
|
|
@@ -99,7 +100,7 @@ function z(e, t, n = 30) {
|
|
|
99
100
|
}
|
|
100
101
|
let c = [];
|
|
101
102
|
for (let e of s) {
|
|
102
|
-
let t =
|
|
103
|
+
let t = I(o, e);
|
|
103
104
|
t && c.push({
|
|
104
105
|
item: e.item,
|
|
105
106
|
score: t.score,
|
|
@@ -108,22 +109,19 @@ function z(e, t, n = 30) {
|
|
|
108
109
|
}
|
|
109
110
|
return c.sort((e, t) => t.score - e.score), i.set(r, c), c.slice(0, n);
|
|
110
111
|
}
|
|
111
|
-
function
|
|
112
|
+
function V(e) {
|
|
112
113
|
if (e) {
|
|
113
|
-
|
|
114
|
+
R.delete(e);
|
|
114
115
|
return;
|
|
115
116
|
}
|
|
116
|
-
|
|
117
|
+
R = /* @__PURE__ */ new WeakMap();
|
|
117
118
|
}
|
|
118
119
|
//#endregion
|
|
119
120
|
//#region src/components/custom/search/FuzzySearch.vue?vue&type=script&setup=true&lang.ts
|
|
120
|
-
var
|
|
121
|
-
key: 0,
|
|
122
|
-
class: "flex-1 min-h-0 overflow-y-auto overscroll-contain p-1.5"
|
|
123
|
-
}, J = ["onClick", "onMouseenter"], Y = { class: "fuzzy-search-label flex-1 min-w-0 truncate text-base text-foreground/85" }, X = { key: 1 }, Z = {
|
|
121
|
+
var H = ["placeholder", "value"], U = ["onClick", "onMouseenter"], W = { class: "fuzzy-search-label flex-1 min-w-0 truncate text-foreground/85" }, G = { class: "flex items-center gap-2 border-b border-border/50 px-3.5 py-3" }, K = ["placeholder", "value"], q = ["onClick", "onMouseenter"], J = { class: "fuzzy-search-label flex-1 min-w-0 truncate text-base text-foreground/85" }, Y = {
|
|
124
122
|
key: 1,
|
|
125
123
|
class: "px-4 py-8 text-center text-muted-foreground/60"
|
|
126
|
-
},
|
|
124
|
+
}, X = /* @__PURE__ */ x({
|
|
127
125
|
__name: "FuzzySearch",
|
|
128
126
|
props: {
|
|
129
127
|
state: {},
|
|
@@ -131,195 +129,201 @@ var V = ["placeholder", "value"], H = ["onClick", "onMouseenter"], U = { class:
|
|
|
131
129
|
placeholder: { default: "Search…" },
|
|
132
130
|
typeLabel: {}
|
|
133
131
|
},
|
|
134
|
-
setup(e, { expose:
|
|
135
|
-
let
|
|
136
|
-
get: () =>
|
|
132
|
+
setup(e, { expose: x }) {
|
|
133
|
+
let w = e, O = E(null), k = E(null), F = m({
|
|
134
|
+
get: () => w.state.isOpen.value && !w.state.isExpanded.value && w.state.results.value.length > 0,
|
|
137
135
|
set: (e) => {
|
|
138
|
-
e ||
|
|
136
|
+
e || w.state.close();
|
|
139
137
|
}
|
|
140
138
|
});
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}),
|
|
144
|
-
e &&
|
|
145
|
-
}),
|
|
146
|
-
e &&
|
|
147
|
-
})
|
|
148
|
-
|
|
149
|
-
|
|
139
|
+
M(() => w.state.selectedIndex.value, () => {
|
|
140
|
+
S(() => document.querySelector(".fuzzy-search-result.is-selected")?.scrollIntoView({ block: "nearest" }));
|
|
141
|
+
}), M(() => w.state.isOpen.value, (e) => {
|
|
142
|
+
e && S(() => O.value?.focus());
|
|
143
|
+
}), M(() => w.state.isExpanded.value, (e) => {
|
|
144
|
+
e && S(() => k.value?.focus());
|
|
145
|
+
}), M([
|
|
146
|
+
() => w.state.query.value,
|
|
147
|
+
() => w.state.results.value,
|
|
148
|
+
() => w.state.isExpanded.value,
|
|
149
|
+
F
|
|
150
|
+
], () => {
|
|
151
|
+
Z(w.state.isExpanded.value ? B.value : F.value ? z.value : null);
|
|
152
|
+
}, { flush: "post" });
|
|
153
|
+
function I() {
|
|
154
|
+
O.value?.focus();
|
|
150
155
|
}
|
|
151
|
-
|
|
152
|
-
function
|
|
156
|
+
x({ focus: I });
|
|
157
|
+
function L(e) {
|
|
153
158
|
return e.item.label || e.item.text.slice(0, 120);
|
|
154
159
|
}
|
|
155
|
-
function
|
|
156
|
-
return
|
|
160
|
+
function R(e) {
|
|
161
|
+
return w.typeLabel ? w.typeLabel(e.item) : e.item.type ?? "";
|
|
157
162
|
}
|
|
158
|
-
|
|
159
|
-
|
|
163
|
+
let z = E(null), B = E(null), V = f("glass-search-mark");
|
|
164
|
+
function X(e, t) {
|
|
160
165
|
let n = t.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
161
|
-
if (n.length === 0) return [
|
|
162
|
-
text: e,
|
|
163
|
-
matched: !1
|
|
164
|
-
}];
|
|
166
|
+
if (n.length === 0) return [];
|
|
165
167
|
let r = e.toLowerCase(), i = /* @__PURE__ */ new Set();
|
|
166
168
|
for (let e of n) {
|
|
167
|
-
let t =
|
|
169
|
+
let t = P(e, r);
|
|
168
170
|
if (t) for (let e of t.matches) i.add(e);
|
|
169
171
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
172
|
+
let a = [];
|
|
173
|
+
for (let e of [...i].sort((e, t) => e - t)) {
|
|
174
|
+
let t = a[a.length - 1];
|
|
175
|
+
t && t.end === e ? t.end = e + 1 : a.push({
|
|
176
|
+
start: e,
|
|
177
|
+
end: e + 1
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
return a;
|
|
181
|
+
}
|
|
182
|
+
function Z(e) {
|
|
183
|
+
if (!e) {
|
|
184
|
+
V.clear();
|
|
185
|
+
return;
|
|
181
186
|
}
|
|
182
|
-
|
|
183
|
-
text: e.slice(o),
|
|
184
|
-
matched: s
|
|
185
|
-
}), a;
|
|
187
|
+
S(() => V.setFromMatches(e, w.state.query.value, X));
|
|
186
188
|
}
|
|
187
|
-
return (
|
|
188
|
-
open:
|
|
189
|
-
"onUpdate:open":
|
|
189
|
+
return (f, m) => (T(), _("div", { class: C(["fuzzy-search relative", `fuzzy-search--${e.variant}`]) }, [b(j(u), {
|
|
190
|
+
open: F.value,
|
|
191
|
+
"onUpdate:open": m[6] ||= (e) => F.value = e
|
|
190
192
|
}, {
|
|
191
|
-
default:
|
|
192
|
-
default:
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
default: N(() => [b(j(l), { "as-child": "" }, {
|
|
194
|
+
default: N(() => [v("div", { class: C(["input-bar", e.variant === "floating" && "!border-none !bg-transparent !p-0 !rounded-none"]) }, [
|
|
195
|
+
b(j(r), { class: "h-3.5 w-3.5 shrink-0 text-muted-foreground/70" }),
|
|
196
|
+
v("input", {
|
|
195
197
|
ref_key: "inputRef",
|
|
196
|
-
ref:
|
|
198
|
+
ref: O,
|
|
197
199
|
type: "text",
|
|
198
200
|
class: "input-bar-field text-sm",
|
|
199
201
|
placeholder: e.placeholder,
|
|
200
202
|
value: e.state.query.value,
|
|
201
|
-
onInput:
|
|
202
|
-
onKeydown:
|
|
203
|
-
onFocus:
|
|
204
|
-
}, null, 40,
|
|
205
|
-
e.state.query.value && e.state.results.value.length > 0 ? (
|
|
203
|
+
onInput: m[0] ||= (t) => e.state.query.value = t.target.value,
|
|
204
|
+
onKeydown: m[1] ||= (...t) => e.state.onKeydown && e.state.onKeydown(...t),
|
|
205
|
+
onFocus: m[2] ||= (t) => e.state.isOpen.value = !0
|
|
206
|
+
}, null, 40, H),
|
|
207
|
+
e.state.query.value && e.state.results.value.length > 0 ? (T(), h(j(o), {
|
|
206
208
|
key: 0,
|
|
207
209
|
type: "button",
|
|
208
210
|
variant: "ghost",
|
|
209
211
|
size: "icon",
|
|
210
212
|
class: "!h-6 !w-6",
|
|
211
213
|
title: e.state.isExpanded.value ? "Collapse" : "Expand",
|
|
212
|
-
onClick:
|
|
214
|
+
onClick: m[3] ||= (t) => e.state.toggleExpanded()
|
|
213
215
|
}, {
|
|
214
|
-
default:
|
|
216
|
+
default: N(() => [e.state.isExpanded.value ? (T(), h(j(n), {
|
|
215
217
|
key: 1,
|
|
216
218
|
class: "h-3 w-3"
|
|
217
|
-
})) : (
|
|
219
|
+
})) : (T(), h(j(t), {
|
|
218
220
|
key: 0,
|
|
219
221
|
class: "h-3 w-3"
|
|
220
222
|
}))]),
|
|
221
223
|
_: 1
|
|
222
|
-
}, 8, ["title"])) :
|
|
223
|
-
e.state.query.value ? (
|
|
224
|
+
}, 8, ["title"])) : g("", !0),
|
|
225
|
+
e.state.query.value ? (T(), h(j(o), {
|
|
224
226
|
key: 1,
|
|
225
227
|
type: "button",
|
|
226
228
|
variant: "ghost",
|
|
227
229
|
size: "icon",
|
|
228
230
|
class: "!h-6 !w-6",
|
|
229
231
|
title: "Clear search",
|
|
230
|
-
onClick:
|
|
232
|
+
onClick: m[4] ||= (t) => e.state.close()
|
|
231
233
|
}, {
|
|
232
|
-
default:
|
|
234
|
+
default: N(() => [b(j(i), { class: "h-3 w-3" })]),
|
|
233
235
|
_: 1
|
|
234
|
-
})) :
|
|
236
|
+
})) : g("", !0)
|
|
235
237
|
], 2)]),
|
|
236
238
|
_: 1
|
|
237
|
-
}),
|
|
239
|
+
}), b(j(d), {
|
|
238
240
|
align: "start",
|
|
239
241
|
"side-offset": 4,
|
|
240
242
|
portal: !1,
|
|
241
243
|
class: "w-[var(--reka-popover-trigger-width)] max-h-[50vh] overflow-y-auto overscroll-contain p-1",
|
|
242
|
-
onOpenAutoFocus:
|
|
244
|
+
onOpenAutoFocus: m[5] ||= (e) => e.preventDefault()
|
|
243
245
|
}, {
|
|
244
|
-
default:
|
|
246
|
+
default: N(() => [v("div", {
|
|
247
|
+
ref_key: "inlineListRef",
|
|
248
|
+
ref: z
|
|
249
|
+
}, [(T(!0), _(p, null, D(e.state.results.value, (t, n) => (T(), _("button", {
|
|
245
250
|
key: `${t.item.id}-${t.item.type}-${n}`,
|
|
246
251
|
type: "button",
|
|
247
|
-
class:
|
|
252
|
+
class: C(["fuzzy-search-result interactive-item flex w-full items-baseline gap-1.5 px-2 py-1.5 text-left text-sm", { "is-selected bg-muted/50": n === e.state.selectedIndex.value }]),
|
|
248
253
|
onClick: (n) => e.state.selectResult(t),
|
|
249
254
|
onMouseenter: (t) => e.state.selectedIndex.value = n
|
|
250
|
-
}, [
|
|
255
|
+
}, [R(t) ? (T(), h(j(a), {
|
|
251
256
|
key: 0,
|
|
252
257
|
variant: "secondary",
|
|
253
258
|
class: "shrink-0 text-[0.6rem] font-bold uppercase tracking-wider"
|
|
254
259
|
}, {
|
|
255
|
-
default:
|
|
260
|
+
default: N(() => [y(A(R(t)), 1)]),
|
|
256
261
|
_: 2
|
|
257
|
-
}, 1024)) :
|
|
258
|
-
key: 0,
|
|
259
|
-
class: S(Q)
|
|
260
|
-
}, k(e.text), 1)) : (w(), g("span", W, k(e.text), 1))], 64))), 128))])], 42, H))), 128))]),
|
|
262
|
+
}, 1024)) : g("", !0), v("span", W, A(L(t)), 1)], 42, U))), 128))], 512)]),
|
|
261
263
|
_: 1
|
|
262
264
|
})]),
|
|
263
265
|
_: 1
|
|
264
|
-
}, 8, ["open"]),
|
|
266
|
+
}, 8, ["open"]), b(j(s), {
|
|
265
267
|
open: e.state.isExpanded.value,
|
|
266
|
-
"onUpdate:open":
|
|
268
|
+
"onUpdate:open": m[11] ||= (t) => e.state.isExpanded.value = t
|
|
267
269
|
}, {
|
|
268
|
-
default:
|
|
270
|
+
default: N(() => [b(j(c), {
|
|
269
271
|
variant: "opaque",
|
|
270
272
|
class: "!max-w-[36rem] !top-[12vh] !translate-y-0 max-h-[70vh] !p-0 overflow-hidden flex flex-col gap-0",
|
|
271
|
-
onOpenAutoFocus:
|
|
273
|
+
onOpenAutoFocus: m[10] ||= (e) => e.preventDefault()
|
|
272
274
|
}, {
|
|
273
|
-
default:
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
default: N(() => [
|
|
276
|
+
v("div", G, [
|
|
277
|
+
b(j(r), { class: "h-4 w-4 shrink-0 text-muted-foreground/70" }),
|
|
278
|
+
v("input", {
|
|
277
279
|
ref_key: "modalInputRef",
|
|
278
|
-
ref:
|
|
280
|
+
ref: k,
|
|
279
281
|
type: "text",
|
|
280
282
|
class: "input-bar-field flex-1 text-base",
|
|
281
283
|
placeholder: e.placeholder,
|
|
282
284
|
value: e.state.query.value,
|
|
283
|
-
onInput:
|
|
284
|
-
onKeydown:
|
|
285
|
+
onInput: m[7] ||= (t) => e.state.query.value = t.target.value,
|
|
286
|
+
onKeydown: m[8] ||= (...t) => e.state.onKeydown && e.state.onKeydown(...t)
|
|
285
287
|
}, null, 40, K),
|
|
286
|
-
|
|
288
|
+
b(j(o), {
|
|
287
289
|
type: "button",
|
|
288
290
|
variant: "ghost",
|
|
289
291
|
size: "icon",
|
|
290
292
|
class: "!h-7 !w-7",
|
|
291
293
|
title: "Collapse",
|
|
292
|
-
onClick:
|
|
294
|
+
onClick: m[9] ||= (t) => e.state.toggleExpanded()
|
|
293
295
|
}, {
|
|
294
|
-
default:
|
|
296
|
+
default: N(() => [b(j(n), { class: "h-3.5 w-3.5" })]),
|
|
295
297
|
_: 1
|
|
296
298
|
})
|
|
297
299
|
]),
|
|
298
|
-
e.state.results.value.length > 0 ? (
|
|
300
|
+
e.state.results.value.length > 0 ? (T(), _("div", {
|
|
301
|
+
key: 0,
|
|
302
|
+
ref_key: "modalListRef",
|
|
303
|
+
ref: B,
|
|
304
|
+
class: "flex-1 min-h-0 overflow-y-auto overscroll-contain p-1.5"
|
|
305
|
+
}, [(T(!0), _(p, null, D(e.state.results.value, (t, n) => (T(), _("button", {
|
|
299
306
|
key: `modal-${t.item.id}-${t.item.type}-${n}`,
|
|
300
307
|
type: "button",
|
|
301
|
-
class:
|
|
308
|
+
class: C(["fuzzy-search-result interactive-item flex w-full items-baseline gap-1.5 px-2.5 py-2 text-left", { "is-selected bg-muted/50": n === e.state.selectedIndex.value }]),
|
|
302
309
|
onClick: (n) => e.state.selectResult(t),
|
|
303
310
|
onMouseenter: (t) => e.state.selectedIndex.value = n
|
|
304
|
-
}, [
|
|
311
|
+
}, [R(t) ? (T(), h(j(a), {
|
|
305
312
|
key: 0,
|
|
306
313
|
variant: "secondary",
|
|
307
314
|
class: "shrink-0 text-[0.65rem] font-bold uppercase tracking-wider"
|
|
308
315
|
}, {
|
|
309
|
-
default:
|
|
316
|
+
default: N(() => [y(A(R(t)), 1)]),
|
|
310
317
|
_: 2
|
|
311
|
-
}, 1024)) :
|
|
312
|
-
|
|
313
|
-
class:
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
_("kbd", { class: "kbd" }, "↑"),
|
|
318
|
-
_("kbd", { class: "kbd" }, "↓"),
|
|
319
|
-
v(" navigate")
|
|
318
|
+
}, 1024)) : g("", !0), v("span", J, A(L(t)), 1)], 42, q))), 128))], 512)) : (T(), _("div", Y, "No results")),
|
|
319
|
+
m[12] ||= v("div", { class: "flex items-center gap-4 border-t border-border/50 px-3.5 py-2 text-mono-caption text-muted-foreground/60" }, [
|
|
320
|
+
v("span", { class: "flex items-center gap-1" }, [
|
|
321
|
+
v("kbd", { class: "kbd" }, "↑"),
|
|
322
|
+
v("kbd", { class: "kbd" }, "↓"),
|
|
323
|
+
y(" navigate")
|
|
320
324
|
]),
|
|
321
|
-
|
|
322
|
-
|
|
325
|
+
v("span", { class: "flex items-center gap-1" }, [v("kbd", { class: "kbd" }, "↵"), y(" select")]),
|
|
326
|
+
v("span", { class: "flex items-center gap-1" }, [v("kbd", { class: "kbd" }, "esc"), y(" close")])
|
|
323
327
|
], -1)
|
|
324
328
|
]),
|
|
325
329
|
_: 1
|
|
@@ -327,7 +331,7 @@ var V = ["placeholder", "value"], H = ["onClick", "onMouseenter"], U = { class:
|
|
|
327
331
|
_: 1
|
|
328
332
|
}, 8, ["open"])], 2));
|
|
329
333
|
}
|
|
330
|
-
}),
|
|
334
|
+
}), Z = ["value", "placeholder"], Q = /* @__PURE__ */ x({
|
|
331
335
|
__name: "SearchBar",
|
|
332
336
|
props: {
|
|
333
337
|
modelValue: { default: "" },
|
|
@@ -337,19 +341,19 @@ var V = ["placeholder", "value"], H = ["onClick", "onMouseenter"], U = { class:
|
|
|
337
341
|
},
|
|
338
342
|
emits: ["update:modelValue"],
|
|
339
343
|
setup(t, { expose: n, emit: i }) {
|
|
340
|
-
let a = i, o =
|
|
341
|
-
return n({ inputRef: o }), (n, i) => (
|
|
342
|
-
default:
|
|
343
|
-
(
|
|
344
|
-
|
|
344
|
+
let a = i, o = E(null);
|
|
345
|
+
return n({ inputRef: o }), (n, i) => (T(), h(k(t.tag), { class: C(j(e)("input-bar", n.$attrs.class)) }, {
|
|
346
|
+
default: N(() => [
|
|
347
|
+
(T(), h(k(t.icon ?? j(r)), { class: "w-3.5 h-3.5 text-muted-foreground shrink-0" })),
|
|
348
|
+
v("input", {
|
|
345
349
|
ref_key: "inputRef",
|
|
346
350
|
ref: o,
|
|
347
351
|
value: t.modelValue,
|
|
348
352
|
placeholder: t.placeholder,
|
|
349
353
|
class: "input-bar-field",
|
|
350
354
|
onInput: i[0] ||= (e) => a("update:modelValue", e.target.value)
|
|
351
|
-
}, null, 40,
|
|
352
|
-
|
|
355
|
+
}, null, 40, Z),
|
|
356
|
+
O(n.$slots, "default")
|
|
353
357
|
]),
|
|
354
358
|
_: 3
|
|
355
359
|
}, 8, ["class"]));
|
|
@@ -357,12 +361,12 @@ var V = ["placeholder", "value"], H = ["onClick", "onMouseenter"], U = { class:
|
|
|
357
361
|
});
|
|
358
362
|
//#endregion
|
|
359
363
|
//#region src/components/custom/search/composables/useFuzzySearch.ts
|
|
360
|
-
function
|
|
361
|
-
let t = typeof e.items == "function" ? e.items : () => e.items, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i =
|
|
364
|
+
function $(e) {
|
|
365
|
+
let t = typeof e.items == "function" ? e.items : () => e.items, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = E(""), a = E(!1), o = E(!1), s = E(0), c = E(""), l = m(() => t()), u = m(() => L(l.value)), d;
|
|
362
366
|
function f(e = d) {
|
|
363
367
|
e !== void 0 && (clearTimeout(e), d === e && (d = void 0));
|
|
364
368
|
}
|
|
365
|
-
|
|
369
|
+
M(i, (e, t, r) => {
|
|
366
370
|
if (f(), !e || n <= 0) {
|
|
367
371
|
c.value = e;
|
|
368
372
|
return;
|
|
@@ -371,18 +375,18 @@ function ne(e) {
|
|
|
371
375
|
d === i && (c.value = e, d = void 0);
|
|
372
376
|
}, n);
|
|
373
377
|
d = i, r(() => f(i));
|
|
374
|
-
}),
|
|
378
|
+
}), M(l, () => {
|
|
375
379
|
f(), c.value = i.value, s.value = 0;
|
|
376
380
|
}, { deep: !0 });
|
|
377
|
-
let
|
|
378
|
-
|
|
381
|
+
let p = m(() => B(u.value, c.value, r));
|
|
382
|
+
M(p, () => {
|
|
379
383
|
s.value = 0;
|
|
380
384
|
});
|
|
381
385
|
function h(t) {
|
|
382
386
|
e.onSelect?.(t), g();
|
|
383
387
|
}
|
|
384
388
|
function g() {
|
|
385
|
-
a.value = !1, o.value = !1, f(), i.value = "", c.value = "", s.value = 0,
|
|
389
|
+
a.value = !1, o.value = !1, f(), i.value = "", c.value = "", s.value = 0, V(u.value);
|
|
386
390
|
}
|
|
387
391
|
function _() {
|
|
388
392
|
a.value = !0;
|
|
@@ -393,24 +397,24 @@ function ne(e) {
|
|
|
393
397
|
function y(e) {
|
|
394
398
|
switch (e.key) {
|
|
395
399
|
case "ArrowDown":
|
|
396
|
-
e.preventDefault(), s.value <
|
|
400
|
+
e.preventDefault(), s.value < p.value.length - 1 && s.value++;
|
|
397
401
|
break;
|
|
398
402
|
case "ArrowUp":
|
|
399
403
|
e.preventDefault(), s.value > 0 && s.value--;
|
|
400
404
|
break;
|
|
401
405
|
case "Enter":
|
|
402
|
-
e.preventDefault(),
|
|
406
|
+
e.preventDefault(), p.value[s.value] && h(p.value[s.value]);
|
|
403
407
|
break;
|
|
404
408
|
case "Escape":
|
|
405
409
|
e.preventDefault(), o.value ? o.value = !1 : g();
|
|
406
410
|
break;
|
|
407
411
|
}
|
|
408
412
|
}
|
|
409
|
-
return
|
|
410
|
-
f(),
|
|
413
|
+
return w(() => {
|
|
414
|
+
f(), V(u.value);
|
|
411
415
|
}, !0), {
|
|
412
416
|
query: i,
|
|
413
|
-
results:
|
|
417
|
+
results: p,
|
|
414
418
|
isOpen: a,
|
|
415
419
|
isExpanded: o,
|
|
416
420
|
selectedIndex: s,
|
|
@@ -422,4 +426,4 @@ function ne(e) {
|
|
|
422
426
|
};
|
|
423
427
|
}
|
|
424
428
|
//#endregion
|
|
425
|
-
export {
|
|
429
|
+
export { X as FuzzySearch, Q as SearchBar, L as buildIndex, V as clearSearchCache, P as fuzzyMatch, B as searchIndex, $ as useFuzzySearch };
|
package/dist/select.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./SelectScrollDownButton-
|
|
2
|
-
import { t as s } from "./SelectGroup-
|
|
3
|
-
import { n as c, t as l } from "./SelectSeparator-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./SelectScrollDownButton-BvvvAbuh.js";
|
|
2
|
+
import { t as s } from "./SelectGroup-DAgcsfFw.js";
|
|
3
|
+
import { n as c, t as l } from "./SelectSeparator-DN1jzLaI.js";
|
|
4
4
|
export { a as Select, t as SelectContent, s as SelectGroup, i as SelectItem, c as SelectLabel, o as SelectScrollDownButton, n as SelectScrollUpButton, l as SelectSeparator, e as SelectTrigger, r as SelectValue };
|
package/dist/separator.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./Separator-
|
|
1
|
+
import { t as e } from "./Separator-DXxac0j8.js";
|
|
2
2
|
export { e as Separator };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./cn-DJXf4yaB.js";
|
|
2
|
-
import { t } from "./x-
|
|
3
|
-
import { t as n } from "./useSpringMount-
|
|
4
|
-
import { t as r } from "./ModalOverlay-
|
|
2
|
+
import { t } from "./x-C4pz9nbD.js";
|
|
3
|
+
import { t as n } from "./useSpringMount-CnizvZGm.js";
|
|
4
|
+
import { t as r } from "./ModalOverlay-B_CBtqcE.js";
|
|
5
5
|
import { computed as i, createBlock as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeClass as f, normalizeProps as p, openBlock as m, renderSlot as h, toHandlers as g, unref as _, withCtx as v } from "vue";
|
|
6
6
|
import { DialogClose as y, DialogContent as b, DialogDescription as x, DialogPortal as S, DialogRoot as C, DialogTitle as w, DialogTrigger as T, injectDialogRootContext as E, useForwardPropsEmits as D } from "reka-ui";
|
|
7
7
|
import { cva as O } from "class-variance-authority";
|
package/dist/sheet.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./sheet-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./sheet-BnvZRXPq.js";
|
|
2
2
|
export { r as Sheet, s as SheetClose, a as SheetContent, o as SheetDescription, i as SheetFooter, e as SheetHeader, n as SheetTitle, t as SheetTrigger, c as sheetVariants };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./cn-DJXf4yaB.js";
|
|
2
|
-
import { t } from "./_plugin-vue_export-helper-
|
|
3
|
-
import { i as n } from "./dockContext-
|
|
4
|
-
import { t as r } from "./useTouchGate-
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper-C1je1s0u.js";
|
|
3
|
+
import { i as n } from "./dockContext-DM58L1Jt.js";
|
|
4
|
+
import { t as r } from "./useTouchGate-XX8gHfay.js";
|
|
5
5
|
import { Fragment as i, computed as a, createBlock as o, createElementBlock as s, createVNode as c, defineComponent as l, mergeProps as u, onBeforeUnmount as d, openBlock as f, renderList as p, unref as m, useTemplateRef as h, watch as g, withCtx as _ } from "vue";
|
|
6
6
|
import { SliderRange as v, SliderRoot as y, SliderThumb as b, SliderTrack as x, useForwardPropsEmits as S } from "reka-ui";
|
|
7
7
|
import { cva as C } from "class-variance-authority";
|
package/dist/slider.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./slider-
|
|
1
|
+
import { n as e, t } from "./slider-wx8ifVFB.js";
|
|
2
2
|
export { e as Slider, t as sliderVariants };
|
package/dist/sortable-list.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-
|
|
2
|
-
import { t } from "./useSortable-
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-C1je1s0u.js";
|
|
2
|
+
import { t } from "./useSortable-DLK9kwZp.js";
|
|
3
3
|
import { computed as n, createBlock as r, defineComponent as i, inject as a, mergeProps as o, openBlock as s, provide as c, renderSlot as l, resolveDynamicComponent as u, toRef as d, unref as f, withCtx as p } from "vue";
|
|
4
4
|
//#region src/components/custom/sortable-list/context.ts
|
|
5
5
|
var m = Symbol("glass-ui:sortable");
|