@septkit/ui 0.0.89 → 0.0.91
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/dropdown/combobox.vue_vue_type_script_setup_true_lang.js +35 -29
- package/dist/explorer/explorer-search.js +25 -21
- package/dist/explorer/explorer.js +1 -1
- package/dist/explorer/explorer.vue_vue_type_script_setup_true_lang.js +70 -79
- package/dist/index.d.ts +13 -4
- package/dist/index.js +39 -39
- package/dist/library-browser/library-browser.js +1 -1
- package/dist/library-browser/library-browser.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/tree/collect-expandable-node-ids.js +10 -4
- package/dist/tree/expansion.js +24 -0
- package/dist/tree/flatten-tree.js +36 -0
- package/dist/tree/tree-index.js +38 -0
- package/dist/tree/tree.js +1 -1
- package/dist/tree/tree.vue_vue_type_script_setup_true_lang.js +115 -67
- package/dist/tree/use-tree-virtualization.js +54 -0
- package/dist/ui.css +1 -1
- package/package.json +1 -1
|
@@ -38,14 +38,15 @@ var F = {
|
|
|
38
38
|
limit: {},
|
|
39
39
|
actionLabel: {},
|
|
40
40
|
ariaLabel: {},
|
|
41
|
-
ariaDescribedby: {}
|
|
41
|
+
ariaDescribedby: {},
|
|
42
|
+
inputId: {}
|
|
42
43
|
}, {
|
|
43
44
|
modelValue: { default: null },
|
|
44
45
|
modelModifiers: {}
|
|
45
46
|
}),
|
|
46
47
|
emits: /*@__PURE__*/ w(["action"], ["update:modelValue"]),
|
|
47
48
|
setup(C, { emit: w }) {
|
|
48
|
-
let R = C, z = w, B = N(C, "modelValue"), V = { action: !0 }, H = O(""), U = O(), W = g(() => ({
|
|
49
|
+
let R = C, z = w, B = N(C, "modelValue"), V = { action: !0 }, H = O(""), U = O(), W = O("body"), G = g(() => ({
|
|
49
50
|
"input-neutral": R.color === "neutral",
|
|
50
51
|
"input-primary": R.color === "primary",
|
|
51
52
|
"input-secondary": R.color === "secondary",
|
|
@@ -63,7 +64,7 @@ var F = {
|
|
|
63
64
|
"input-md": R.size === "md",
|
|
64
65
|
"input-lg": R.size === "lg",
|
|
65
66
|
"input-xl": R.size === "xl"
|
|
66
|
-
})),
|
|
67
|
+
})), K = g(() => !!R.searchText), q = g(() => K.value ? m({
|
|
67
68
|
options: R.options,
|
|
68
69
|
search: H.value,
|
|
69
70
|
searchText: R.searchText,
|
|
@@ -75,58 +76,63 @@ var F = {
|
|
|
75
76
|
items: R.options
|
|
76
77
|
}],
|
|
77
78
|
more: 0
|
|
78
|
-
}),
|
|
79
|
-
function
|
|
79
|
+
}), J = g(() => K.value && q.value.groups.length === 0), Y = g(() => q.value.groups.reduce((e, t) => e + t.items.length, 0) + q.value.more);
|
|
80
|
+
function X(e) {
|
|
80
81
|
return R.getKey ? R.getKey(e) : R.displayValue(e);
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
+
function Z(e) {
|
|
83
84
|
return e == null || e === V ? "" : R.displayValue(e);
|
|
84
85
|
}
|
|
85
|
-
function
|
|
86
|
+
function Q(e) {
|
|
86
87
|
if (e === V) {
|
|
87
|
-
z("action", H.value.trim(),
|
|
88
|
+
z("action", H.value.trim(), Y.value);
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
91
|
B.value = e;
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
-
return e === V || t === V ? e === t : e != null && t != null &&
|
|
93
|
+
function $(e, t) {
|
|
94
|
+
return e === V || t === V ? e === t : e != null && t != null && X(e) === X(t);
|
|
94
95
|
}
|
|
95
|
-
async function
|
|
96
|
-
|
|
96
|
+
async function ee(e) {
|
|
97
|
+
if (!e) return;
|
|
98
|
+
H.value = "";
|
|
99
|
+
let t = U.value?.$el;
|
|
100
|
+
W.value = t?.closest("dialog[open]") ?? "body", await T(), await T(), t?.select();
|
|
97
101
|
}
|
|
98
|
-
function
|
|
102
|
+
function te(e) {
|
|
99
103
|
H.value = e.target.value;
|
|
100
104
|
}
|
|
101
105
|
return (m, g) => (D(), _(M(e), {
|
|
102
106
|
"model-value": B.value,
|
|
103
107
|
class: "dropdown w-full",
|
|
104
108
|
disabled: C.disabled,
|
|
105
|
-
"ignore-filter":
|
|
106
|
-
by: C.getKey ?
|
|
107
|
-
"onUpdate:modelValue":
|
|
108
|
-
"onUpdate:open":
|
|
109
|
+
"ignore-filter": K.value,
|
|
110
|
+
by: C.getKey ? $ : void 0,
|
|
111
|
+
"onUpdate:modelValue": Q,
|
|
112
|
+
"onUpdate:open": ee
|
|
109
113
|
}, {
|
|
110
|
-
default: P(() => [S(M(t), { class: E(["input w-full flex items-center gap-2",
|
|
114
|
+
default: P(() => [S(M(t), { class: E(["input w-full flex items-center gap-2", G.value]) }, {
|
|
111
115
|
default: P(() => [S(M(a), {
|
|
112
116
|
ref_key: "input",
|
|
113
117
|
ref: U,
|
|
114
118
|
class: "input-ghost outline-none w-full",
|
|
115
119
|
placeholder: C.placeholder ?? "Search...",
|
|
116
|
-
"display-value":
|
|
120
|
+
"display-value": Z,
|
|
117
121
|
"aria-label": C.ariaLabel,
|
|
118
122
|
"aria-describedby": C.ariaDescribedby,
|
|
119
|
-
|
|
123
|
+
id: C.inputId,
|
|
124
|
+
onInput: te
|
|
120
125
|
}, null, 8, [
|
|
121
126
|
"placeholder",
|
|
122
127
|
"aria-label",
|
|
123
|
-
"aria-describedby"
|
|
128
|
+
"aria-describedby",
|
|
129
|
+
"id"
|
|
124
130
|
]), S(M(u), { "aria-label": C.ariaLabel ? `Show the choices for: ${C.ariaLabel}` : "Show the choices" }, {
|
|
125
131
|
default: P(() => [S(M(p), { class: "h-4 w-4 text-base-content/60 cursor-pointer" })]),
|
|
126
132
|
_: 1
|
|
127
133
|
}, 8, ["aria-label"])]),
|
|
128
134
|
_: 1
|
|
129
|
-
}, 8, ["class"]), S(M(l),
|
|
135
|
+
}, 8, ["class"]), S(M(l), { to: W.value }, {
|
|
130
136
|
default: P(() => [S(M(n), {
|
|
131
137
|
position: "popper",
|
|
132
138
|
"side-offset": 4,
|
|
@@ -138,15 +144,15 @@ var F = {
|
|
|
138
144
|
}, {
|
|
139
145
|
default: P(() => [S(M(d), { class: "max-h-64 overflow-y-auto p-1" }, {
|
|
140
146
|
default: P(() => [
|
|
141
|
-
|
|
147
|
+
K.value ? v("", !0) : (D(), _(M(r), {
|
|
142
148
|
key: 0,
|
|
143
149
|
class: "text-base-content/80 text-xs text-center py-2"
|
|
144
150
|
}, {
|
|
145
151
|
default: P(() => [x(j(C.emptyText ?? "No results found"), 1)]),
|
|
146
152
|
_: 1
|
|
147
153
|
})),
|
|
148
|
-
|
|
149
|
-
(D(!0), y(h, null, k(
|
|
154
|
+
J.value ? (D(), y("p", F, j(C.emptyText ?? `Nothing matches “${H.value}”`), 1)) : v("", !0),
|
|
155
|
+
(D(!0), y(h, null, k(q.value.groups, (e) => (D(), _(M(i), { key: e.label }, {
|
|
150
156
|
default: P(() => [e.label ? (D(), _(M(c), {
|
|
151
157
|
key: 0,
|
|
152
158
|
"data-testid": "combobox-group-label",
|
|
@@ -155,7 +161,7 @@ var F = {
|
|
|
155
161
|
default: P(() => [x(j(e.label), 1)]),
|
|
156
162
|
_: 2
|
|
157
163
|
}, 1024)) : v("", !0), (D(!0), y(h, null, k(e.items, (e) => (D(), _(M(o), {
|
|
158
|
-
key:
|
|
164
|
+
key: X(e),
|
|
159
165
|
value: e,
|
|
160
166
|
class: "cursor-pointer text-xs leading-none w-full flex items-center gap-2 rounded px-2 min-h-7 py-1 pl-7 relative select-none data-disabled:opacity-40 data-disabled:pointer-events-none data-highlighted:outline-none data-highlighted:bg-primary data-highlighted:text-primary-content"
|
|
161
167
|
}, {
|
|
@@ -167,14 +173,14 @@ var F = {
|
|
|
167
173
|
}, 1032, ["value"]))), 128))]),
|
|
168
174
|
_: 2
|
|
169
175
|
}, 1024))), 128)),
|
|
170
|
-
|
|
176
|
+
q.value.more > 0 ? (D(), y("p", L, j(q.value.more) + " more: type to narrow ", 1)) : v("", !0),
|
|
171
177
|
C.actionLabel ? (D(), _(M(o), {
|
|
172
178
|
key: 3,
|
|
173
179
|
"data-testid": "combobox-action",
|
|
174
180
|
value: V,
|
|
175
181
|
class: "cursor-pointer text-xs leading-none w-full flex items-center gap-2 rounded px-2 min-h-7 py-1 pl-7 relative select-none border-t border-base-300 font-medium data-highlighted:outline-none data-highlighted:bg-primary data-highlighted:text-primary-content"
|
|
176
182
|
}, {
|
|
177
|
-
default: P(() => [x(j(C.actionLabel(H.value.trim(),
|
|
183
|
+
default: P(() => [x(j(C.actionLabel(H.value.trim(), Y.value)), 1)]),
|
|
178
184
|
_: 1
|
|
179
185
|
})) : v("", !0)
|
|
180
186
|
]),
|
|
@@ -183,7 +189,7 @@ var F = {
|
|
|
183
189
|
_: 3
|
|
184
190
|
})]),
|
|
185
191
|
_: 3
|
|
186
|
-
})]),
|
|
192
|
+
}, 8, ["to"])]),
|
|
187
193
|
_: 3
|
|
188
194
|
}, 8, [
|
|
189
195
|
"model-value",
|
|
@@ -2,30 +2,34 @@
|
|
|
2
2
|
function e(e) {
|
|
3
3
|
return e.trim().toLowerCase();
|
|
4
4
|
}
|
|
5
|
-
function t(t,
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
function t(t, n) {
|
|
6
|
+
let r = e(n);
|
|
7
|
+
if (!r) return {
|
|
8
|
+
items: t.items,
|
|
9
|
+
visibleIds: void 0
|
|
10
|
+
};
|
|
11
|
+
let i = /* @__PURE__ */ new Set();
|
|
12
|
+
for (let { node: e, parentId: n, lowerName: a } of t.nodes) if (!(!a.includes(r) || i.has(e.id))) {
|
|
13
|
+
i.add(e.id);
|
|
14
|
+
for (let e = n; e !== void 0 && !i.has(e); e = t.byId.get(e).parentId) i.add(e);
|
|
15
|
+
}
|
|
16
|
+
let a = [], o = /* @__PURE__ */ new Map();
|
|
17
|
+
for (let { node: e, parentId: n } of t.nodes) {
|
|
18
|
+
if (!i.has(e.id)) continue;
|
|
19
|
+
let t = {
|
|
16
20
|
...e,
|
|
17
21
|
children: void 0
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
for (let n of e) {
|
|
23
|
-
if (n.id === t) return [];
|
|
24
|
-
let e = n.children ? r(n.children, t) : void 0;
|
|
25
|
-
if (e) return [n.id, ...e];
|
|
22
|
+
};
|
|
23
|
+
o.set(e.id, t);
|
|
24
|
+
let r = n === void 0 ? void 0 : o.get(n);
|
|
25
|
+
r ? (r.children ??= []).push(t) : a.push(t);
|
|
26
26
|
}
|
|
27
|
+
return {
|
|
28
|
+
items: a,
|
|
29
|
+
visibleIds: i
|
|
30
|
+
};
|
|
27
31
|
}
|
|
28
|
-
function
|
|
32
|
+
function n(t, n) {
|
|
29
33
|
let r = e(n), i = t.toLowerCase(), a = [], o = 0, s = r ? i.indexOf(r) : -1;
|
|
30
34
|
for (; s !== -1;) s > o && a.push({
|
|
31
35
|
text: t.slice(o, s),
|
|
@@ -40,4 +44,4 @@ function i(t, n) {
|
|
|
40
44
|
}), a;
|
|
41
45
|
}
|
|
42
46
|
//#endregion
|
|
43
|
-
export { t as filterExplorerTree,
|
|
47
|
+
export { t as filterExplorerTree, n as splitByMatch };
|
|
@@ -2,6 +2,6 @@ import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./explorer.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region lib/explorer/explorer.vue
|
|
5
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-956831c2"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -3,20 +3,24 @@ import t from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_
|
|
|
3
3
|
import n from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/chevrons-up-down.js";
|
|
4
4
|
import r from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/search.js";
|
|
5
5
|
import i from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/x.js";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
6
|
+
import { expandedIdsOf as a, isAllExpanded as o, revealIds as s, toggleExpandedId as c } from "../tree/expansion.js";
|
|
7
|
+
import l from "../tree/tree.js";
|
|
8
8
|
import "../tree/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { buildTreeIndex as ee, findAncestorIds as u } from "../tree/tree-index.js";
|
|
10
|
+
import { filterExplorerTree as d, splitByMatch as f } from "./explorer-search.js";
|
|
11
|
+
import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createSlots as y, createTextVNode as b, createVNode as x, defineComponent as S, normalizeClass as te, openBlock as C, ref as w, renderList as T, renderSlot as E, toDisplayString as D, unref as O, vModelText as ne, watch as k, withCtx as A, withDirectives as j, withKeys as M, withModifiers as N } from "vue";
|
|
11
12
|
//#region lib/explorer/explorer.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var
|
|
13
|
+
var P = { class: "explorer" }, F = { class: "explorer__controls flex items-center gap-1 bg-base-100" }, I = { class: "input input-sm flex-1" }, L = ["disabled", "aria-label"], R = {
|
|
13
14
|
key: 0,
|
|
14
15
|
class: "label",
|
|
15
16
|
role: "status"
|
|
16
|
-
},
|
|
17
|
+
}, z = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "explorer__viewport"
|
|
20
|
+
}, B = { class: "pl-2 truncate" }, V = {
|
|
17
21
|
key: 0,
|
|
18
22
|
class: "rounded-sm bg-warning/40 text-inherit"
|
|
19
|
-
},
|
|
23
|
+
}, H = /*@__PURE__*/ S({
|
|
20
24
|
__name: "explorer",
|
|
21
25
|
props: {
|
|
22
26
|
items: {},
|
|
@@ -33,125 +37,112 @@ var ee = { class: "explorer flex flex-col gap-2" }, N = { class: "flex items-cen
|
|
|
33
37
|
"contextmenu",
|
|
34
38
|
"update:expanded"
|
|
35
39
|
],
|
|
36
|
-
setup(
|
|
37
|
-
let
|
|
40
|
+
setup(S, { emit: H }) {
|
|
41
|
+
let U = S, W = H, G = w(""), K = w(), q = m(() => ee(U.items)), J = m(() => G.value.trim().length > 0), Y = m(() => d(q.value, G.value)), X = m(() => J.value ? {
|
|
38
42
|
scoped: [],
|
|
39
43
|
all: !0
|
|
40
|
-
} :
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return q.value.every((t) => e.has(t));
|
|
45
|
-
});
|
|
46
|
-
O(() => B.selected, (e) => {
|
|
47
|
-
e === void 0 || !W.value || c(B.items, e) !== void 0 && c(G.value, e) === void 0 && (H.value = "");
|
|
48
|
-
}), O(H, (e, t) => {
|
|
44
|
+
} : U.expanded), re = m(() => a(U.expanded, q.value.expandableIds)), Z = m(() => o(U.expanded, q.value.expandableIds));
|
|
45
|
+
k(() => U.selected, (e) => {
|
|
46
|
+
e === void 0 || !J.value || !q.value.byId.has(e) || Y.value.visibleIds?.has(e) || (G.value = "");
|
|
47
|
+
}), k(G, (e, t) => {
|
|
49
48
|
if (!t.trim() || e.trim()) return;
|
|
50
|
-
let n =
|
|
51
|
-
if (n === void 0 ||
|
|
52
|
-
let r =
|
|
53
|
-
r !== void 0 &&
|
|
54
|
-
scoped: [.../* @__PURE__ */ new Set([...B.expanded.scoped, ...r])],
|
|
55
|
-
all: !1
|
|
56
|
-
});
|
|
49
|
+
let n = U.selected ?? K.value;
|
|
50
|
+
if (n === void 0 || U.expanded.all) return;
|
|
51
|
+
let r = u(q.value, n);
|
|
52
|
+
r !== void 0 && W("update:expanded", s(U.expanded, r));
|
|
57
53
|
});
|
|
58
|
-
function
|
|
59
|
-
|
|
54
|
+
function ie() {
|
|
55
|
+
W("update:expanded", {
|
|
60
56
|
scoped: [],
|
|
61
|
-
all: !
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
function Z(e) {
|
|
65
|
-
let t = J.value.includes(e) ? J.value.filter((t) => t !== e) : [...J.value, e];
|
|
66
|
-
V("update:expanded", {
|
|
67
|
-
scoped: t,
|
|
68
|
-
all: !1
|
|
57
|
+
all: !Z.value
|
|
69
58
|
});
|
|
70
59
|
}
|
|
71
60
|
function Q(e) {
|
|
72
|
-
|
|
61
|
+
W("update:expanded", c(re.value, e));
|
|
62
|
+
}
|
|
63
|
+
function ae(e) {
|
|
64
|
+
e.selectable === !1 && e.children?.length && Q(e.id);
|
|
73
65
|
}
|
|
74
|
-
function
|
|
75
|
-
|
|
66
|
+
function oe(e) {
|
|
67
|
+
K.value = e.id, W("select", e);
|
|
76
68
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
69
|
+
function se(e) {
|
|
70
|
+
J.value || W("update:expanded", e);
|
|
79
71
|
}
|
|
80
72
|
function $() {
|
|
81
|
-
|
|
73
|
+
G.value = "";
|
|
82
74
|
}
|
|
83
|
-
return (a,
|
|
84
|
-
|
|
75
|
+
return (a, o) => (C(), _("div", P, [v("div", F, [v("label", I, [
|
|
76
|
+
x(O(r), {
|
|
85
77
|
"aria-hidden": "true",
|
|
86
78
|
size: 14,
|
|
87
79
|
class: "opacity-50"
|
|
88
80
|
}),
|
|
89
|
-
|
|
90
|
-
"onUpdate:modelValue":
|
|
81
|
+
j(v("input", {
|
|
82
|
+
"onUpdate:modelValue": o[0] ||= (e) => G.value = e,
|
|
91
83
|
type: "text",
|
|
92
84
|
class: "grow",
|
|
93
85
|
placeholder: "Search by name",
|
|
94
86
|
"aria-label": "Search by name",
|
|
95
87
|
"data-testid": "explorer-search",
|
|
96
|
-
onKeydown:
|
|
97
|
-
}, null, 544), [[
|
|
98
|
-
|
|
88
|
+
onKeydown: M($, ["esc"])
|
|
89
|
+
}, null, 544), [[ne, G.value]]),
|
|
90
|
+
G.value ? (C(), _("button", {
|
|
99
91
|
key: 0,
|
|
100
92
|
type: "button",
|
|
101
93
|
class: "btn btn-ghost btn-circle btn-xs",
|
|
102
94
|
"aria-label": "Clear search",
|
|
103
95
|
onClick: $
|
|
104
|
-
}, [
|
|
96
|
+
}, [x(O(i), {
|
|
105
97
|
"aria-hidden": "true",
|
|
106
98
|
size: 14
|
|
107
|
-
})])) :
|
|
108
|
-
]),
|
|
99
|
+
})])) : g("", !0)
|
|
100
|
+
]), v("button", {
|
|
109
101
|
type: "button",
|
|
110
102
|
class: "btn btn-ghost btn-square btn-sm",
|
|
111
|
-
disabled:
|
|
112
|
-
"aria-label":
|
|
113
|
-
onClick:
|
|
114
|
-
}, [
|
|
103
|
+
disabled: J.value || !q.value.expandableIds.length,
|
|
104
|
+
"aria-label": Z.value ? "Collapse all" : "Expand all",
|
|
105
|
+
onClick: ie
|
|
106
|
+
}, [Z.value ? (C(), h(O(n), {
|
|
115
107
|
key: 0,
|
|
116
108
|
"aria-hidden": "true",
|
|
117
109
|
size: 16
|
|
118
|
-
})) : (
|
|
110
|
+
})) : (C(), h(O(t), {
|
|
119
111
|
key: 1,
|
|
120
112
|
"aria-hidden": "true",
|
|
121
113
|
size: 16
|
|
122
|
-
}))], 8,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
"node-toggle": k(({ node: t, hasChildren: n, expanded: r }) => [v(E(e), {
|
|
114
|
+
}))], 8, L)]), J.value && !Y.value.items.length ? (C(), _("p", R, "No results")) : (C(), _("div", z, [x(O(l), {
|
|
115
|
+
items: Y.value.items,
|
|
116
|
+
expanded: X.value,
|
|
117
|
+
selected: U.selected ?? K.value,
|
|
118
|
+
"aria-label": U.ariaLabel,
|
|
119
|
+
"row-label": U.rowLabel,
|
|
120
|
+
onSelect: oe,
|
|
121
|
+
onRowClick: ae,
|
|
122
|
+
onContextmenu: o[1] ||= (e) => W("contextmenu", e),
|
|
123
|
+
"onUpdate:expanded": se
|
|
124
|
+
}, y({
|
|
125
|
+
"node-toggle": A(({ node: t, hasChildren: n, expanded: r }) => [x(O(e), {
|
|
135
126
|
"aria-hidden": "true",
|
|
136
127
|
size: 16,
|
|
137
|
-
class:
|
|
138
|
-
invisible: !n ||
|
|
128
|
+
class: te(["explorer__chevron shrink-0", {
|
|
129
|
+
invisible: !n || J.value,
|
|
139
130
|
"explorer__chevron--open": r
|
|
140
131
|
}]),
|
|
141
|
-
onClick:
|
|
132
|
+
onClick: N((e) => Q(t.id), ["stop"])
|
|
142
133
|
}, null, 8, ["class", "onClick"])]),
|
|
143
|
-
"node-label":
|
|
134
|
+
"node-label": A(({ node: e }) => [E(a.$slots, "node-label", {
|
|
144
135
|
node: e,
|
|
145
|
-
term:
|
|
146
|
-
}, () => [
|
|
136
|
+
term: G.value
|
|
137
|
+
}, () => [v("span", B, [(C(!0), _(p, null, T(O(f)(e.name, G.value), (e, t) => (C(), _(p, { key: t }, [e.match ? (C(), _("mark", V, D(e.text), 1)) : (C(), _(p, { key: 1 }, [b(D(e.text), 1)], 64))], 64))), 128))])], !0)]),
|
|
147
138
|
_: 2
|
|
148
139
|
}, [a.$slots["node-prefix"] ? {
|
|
149
140
|
name: "node-prefix",
|
|
150
|
-
fn:
|
|
141
|
+
fn: A(({ node: e }) => [E(a.$slots, "node-prefix", { node: e }, void 0, !0)]),
|
|
151
142
|
key: "0"
|
|
152
143
|
} : void 0, a.$slots["node-suffix"] ? {
|
|
153
144
|
name: "node-suffix",
|
|
154
|
-
fn:
|
|
145
|
+
fn: A(({ node: e }) => [E(a.$slots, "node-suffix", { node: e }, void 0, !0)]),
|
|
155
146
|
key: "1"
|
|
156
147
|
} : void 0]), 1032, [
|
|
157
148
|
"items",
|
|
@@ -159,8 +150,8 @@ var ee = { class: "explorer flex flex-col gap-2" }, N = { class: "flex items-cen
|
|
|
159
150
|
"selected",
|
|
160
151
|
"aria-label",
|
|
161
152
|
"row-label"
|
|
162
|
-
]))]));
|
|
153
|
+
])]))]));
|
|
163
154
|
}
|
|
164
155
|
});
|
|
165
156
|
//#endregion
|
|
166
|
-
export {
|
|
157
|
+
export { H as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -310,8 +310,11 @@ event: MouseEvent;
|
|
|
310
310
|
"onUpdate:expanded"?: ((state: ExplorerExpandedState) => any) | undefined;
|
|
311
311
|
}>, {
|
|
312
312
|
ariaLabel: string;
|
|
313
|
+
rowHeight: number;
|
|
313
314
|
expanded: ExplorerExpandedState;
|
|
314
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
315
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
316
|
+
root: {} | null;
|
|
317
|
+
}, any>;
|
|
315
318
|
|
|
316
319
|
declare const __VLS_component_7: DefineComponent<__VLS_Props_12, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
317
320
|
select: (node: ExplorerNode) => any;
|
|
@@ -391,6 +394,8 @@ declare type __VLS_Props_11 = {
|
|
|
391
394
|
selected?: string;
|
|
392
395
|
/** What a row is called for assistive technology, when the text drawn in it says less or more. */
|
|
393
396
|
rowLabel?: (node: ExplorerNode) => string | undefined;
|
|
397
|
+
/** The fixed height of every row in px. */
|
|
398
|
+
rowHeight?: number;
|
|
394
399
|
};
|
|
395
400
|
|
|
396
401
|
declare type __VLS_Props_12 = {
|
|
@@ -573,6 +578,8 @@ declare type __VLS_Props_3 = {
|
|
|
573
578
|
/** The input's accessible name, and what describes it. */
|
|
574
579
|
ariaLabel?: string;
|
|
575
580
|
ariaDescribedby?: string;
|
|
581
|
+
/** The id of the input, for a `<label for>` to point at. */
|
|
582
|
+
inputId?: string;
|
|
576
583
|
};
|
|
577
584
|
|
|
578
585
|
declare type __VLS_Props_4 = {
|
|
@@ -965,7 +972,9 @@ declare function __VLS_template_6(): {
|
|
|
965
972
|
expanded: boolean;
|
|
966
973
|
}): unknown;
|
|
967
974
|
};
|
|
968
|
-
refs: {
|
|
975
|
+
refs: {
|
|
976
|
+
root: {} | null;
|
|
977
|
+
};
|
|
969
978
|
rootEl: any;
|
|
970
979
|
};
|
|
971
980
|
|
|
@@ -1415,13 +1424,13 @@ export declare const DiagramNodeCard: DefineComponent<__VLS_Props_25, {
|
|
|
1415
1424
|
focus: () => void | undefined;
|
|
1416
1425
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1417
1426
|
select: (nodeId: string) => any;
|
|
1418
|
-
"toggle-expand": (nodeId: string) => any;
|
|
1419
1427
|
keydown: (event: KeyboardEvent) => any;
|
|
1428
|
+
"toggle-expand": (nodeId: string) => any;
|
|
1420
1429
|
"show-details": (nodeId: string) => any;
|
|
1421
1430
|
}, string, PublicProps, Readonly<__VLS_Props_25> & Readonly<{
|
|
1422
1431
|
onSelect?: ((nodeId: string) => any) | undefined;
|
|
1423
|
-
"onToggle-expand"?: ((nodeId: string) => any) | undefined;
|
|
1424
1432
|
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
1433
|
+
"onToggle-expand"?: ((nodeId: string) => any) | undefined;
|
|
1425
1434
|
"onShow-details"?: ((nodeId: string) => any) | undefined;
|
|
1426
1435
|
}>, {
|
|
1427
1436
|
height: number;
|
package/dist/index.js
CHANGED
|
@@ -25,53 +25,53 @@ import { ELEMENT_TO_ICON as C } from "./icons/element-icon-mapper.js";
|
|
|
25
25
|
import w from "./icons/element-badge.js";
|
|
26
26
|
import "./icons/index.js";
|
|
27
27
|
import { collectExpandableNodeIds as T } from "./tree/collect-expandable-node-ids.js";
|
|
28
|
-
import E from "./
|
|
28
|
+
import { DEFAULT_OVERSCAN as E } from "./virtual/virtual.constants.js";
|
|
29
|
+
import { computeSpacers as D, mergeKeptIndices as O, splitKeptItems as k } from "./virtual/kept-range.js";
|
|
30
|
+
import { useVirtualScroller as A } from "./virtual/use-virtual-scroller.js";
|
|
31
|
+
import { findNextIndex as j, moveGridPosition as M } from "./virtual/grid-navigation.js";
|
|
32
|
+
import { cellAria as N, gridAria as P, rowAria as F } from "./virtual/grid-aria.js";
|
|
33
|
+
import "./virtual/index.js";
|
|
34
|
+
import I from "./tree/tree.js";
|
|
29
35
|
import "./tree/index.js";
|
|
30
|
-
import
|
|
36
|
+
import L from "./explorer/explorer.js";
|
|
31
37
|
import "./explorer/index.js";
|
|
32
|
-
import
|
|
38
|
+
import R from "./library-browser/library-browser.js";
|
|
33
39
|
import "./library-browser/index.js";
|
|
34
|
-
import { highlightCode as
|
|
35
|
-
import
|
|
36
|
-
import { diffLines as
|
|
37
|
-
import
|
|
40
|
+
import { highlightCode as z } from "./code/highlight.js";
|
|
41
|
+
import B from "./code/code-block.js";
|
|
42
|
+
import { diffLines as V } from "./code/diff.js";
|
|
43
|
+
import H from "./code/xml-diff.js";
|
|
38
44
|
import "./code/index.js";
|
|
39
|
-
import { NOTE_CATEGORIES as
|
|
40
|
-
import
|
|
41
|
-
import
|
|
45
|
+
import { NOTE_CATEGORIES as U, NOTE_CATEGORY_LABELS as W, NOTE_STATUSES as G, parseNoteData as K, serializeNoteData as q } from "./notes/note-data.js";
|
|
46
|
+
import J from "./notes/note-category-tag.js";
|
|
47
|
+
import Y from "./notes/note-category-picker.js";
|
|
42
48
|
import "./notes/index.js";
|
|
43
|
-
import { KEY_SEPARATOR as
|
|
44
|
-
import { useColumnFilters as
|
|
45
|
-
import { useRowSort as
|
|
46
|
-
import { provideColumnFilterHeader as
|
|
47
|
-
import { provideRowSortHeader as
|
|
48
|
-
import
|
|
49
|
+
import { KEY_SEPARATOR as X, NO_VALUE_KEY as Z, buildFlatOptions as Q, buildMultiValueOptions as $, buildTreeOptions as ee, collectLeafKeys as te, collectParentKeys as ne, filterTree as re } from "./table/filters/build-filter-options.js";
|
|
50
|
+
import { useColumnFilters as ie } from "./table/filters/use-column-filters.js";
|
|
51
|
+
import { useRowSort as ae } from "./table/filters/use-row-sort.js";
|
|
52
|
+
import { provideColumnFilterHeader as oe, useColumnFilterHeaderContext as se } from "./table/column-filter-context.js";
|
|
53
|
+
import { provideRowSortHeader as ce, useOptionalRowSortContext as le } from "./table/row-sort-context.js";
|
|
54
|
+
import ue from "./table/filterable-column-header.js";
|
|
49
55
|
import "./table/index.js";
|
|
50
|
-
import
|
|
56
|
+
import de from "./context-menu/context-menu.js";
|
|
51
57
|
import "./context-menu/index.js";
|
|
52
|
-
import { buildXpath as
|
|
53
|
-
import
|
|
58
|
+
import { buildXpath as fe, matchName as pe, parseXpath as me, validateSearchText as he, validateXpath as ge } from "./selector-input/selector-xpath.js";
|
|
59
|
+
import _e from "./selector-input/selector-input.js";
|
|
54
60
|
import "./selector-input/index.js";
|
|
55
|
-
import
|
|
61
|
+
import ve from "./split-layout/split-layout.js";
|
|
56
62
|
import "./split-layout/index.js";
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
63
|
+
import ye from "./status-bar/status-bar.js";
|
|
64
|
+
import be from "./status-bar/status-bar-item.js";
|
|
65
|
+
import xe from "./status-bar/progress-bar.js";
|
|
66
|
+
import Se from "./status-bar/spinner.js";
|
|
61
67
|
import "./status-bar/index.js";
|
|
62
|
-
import { applyInitialVisibility as
|
|
63
|
-
import { groupStackMetrics as
|
|
64
|
-
import { GROUP_COLLAPSED_MEMBERS_HEIGHT as
|
|
65
|
-
import { computeGroups as
|
|
66
|
-
import { createElkLayoutEngine as
|
|
67
|
-
import { useDiagramLayout as
|
|
68
|
-
import
|
|
69
|
-
import
|
|
68
|
+
import { applyInitialVisibility as Ce, buildRecordCache as we, collectVisibleIds as Te, hideDescendants as Ee } from "./diagram-layout/visibility-model.js";
|
|
69
|
+
import { groupStackMetrics as De } from "./diagram-layout/group-stack.js";
|
|
70
|
+
import { GROUP_COLLAPSED_MEMBERS_HEIGHT as Oe, GROUP_HEADER_HEIGHT as ke, GROUP_MEMBER_GAP as Ae, GROUP_MEMBER_HEIGHT as je, GROUP_MEMBER_HEIGHT_COMPACT as Me, memberCardHeight as Ne } from "./diagram-layout/group-geometry.js";
|
|
71
|
+
import { computeGroups as Pe, isGroupId as Fe, makeGroupId as Ie } from "./diagram-layout/grouping.js";
|
|
72
|
+
import { createElkLayoutEngine as Le } from "./diagram-layout/elk-layout-engine.js";
|
|
73
|
+
import { useDiagramLayout as Re } from "./diagram-layout/use-diagram-layout.js";
|
|
74
|
+
import ze from "./diagram-layout/diagram-node-card.js";
|
|
75
|
+
import Be from "./diagram-layout/diagram-node-group.js";
|
|
70
76
|
import "./diagram-layout/index.js";
|
|
71
|
-
|
|
72
|
-
import { computeSpacers as Me, mergeKeptIndices as Ne, splitKeptItems as Pe } from "./virtual/kept-range.js";
|
|
73
|
-
import { useVirtualScroller as Fe } from "./virtual/use-virtual-scroller.js";
|
|
74
|
-
import { findNextIndex as Ie, moveGridPosition as Le } from "./virtual/grid-navigation.js";
|
|
75
|
-
import { cellAria as Re, gridAria as ze, rowAria as Be } from "./virtual/grid-aria.js";
|
|
76
|
-
import "./virtual/index.js";
|
|
77
|
-
export { s as Button, x as CATEGORY_ELEMENTS, A as CodeBlock, l as Combobox, te as ContextMenu, je as DEFAULT_OVERSCAN, ke as DiagramNodeCard, Ae as DiagramNodeGroup, p as Dialog, y as DialogHost, b as DocumentProgressBar, c as Dropdown, S as ELEMENT_TO_COLOR, C as ELEMENT_TO_ICON, w as ElementBadge, m as FeedbackDialog, ee as FilterableColumnHeader, u as FloatingTooltip, ve as GROUP_COLLAPSED_MEMBERS_HEIGHT, ye as GROUP_HEADER_HEIGHT, be as GROUP_MEMBER_GAP, xe as GROUP_MEMBER_HEIGHT, Se as GROUP_MEMBER_HEIGHT_COMPACT, B as KEY_SEPARATOR, O as LibraryBrowser, d as MultiSelect, N as NOTE_CATEGORIES, P as NOTE_CATEGORY_LABELS, F as NOTE_STATUSES, V as NO_VALUE_KEY, z as NoteCategoryPicker, R as NoteCategoryTag, de as ProgressBar, D as SclExplorer, E as SclTree, se as SelectorInput, fe as Spinner, ce as SplitLayout, le as StatusBar, ue as StatusBarItem, f as TextInputAutocomplete, M as XmlDiff, pe as applyInitialVisibility, H as buildFlatOptions, U as buildMultiValueOptions, me as buildRecordCache, W as buildTreeOptions, ne as buildXpath, Re as cellAria, T as collectExpandableNodeIds, G as collectLeafKeys, K as collectParentKeys, he as collectVisibleIds, we as computeGroups, Me as computeSpacers, h as createDialogHost, e as createDocumentStore, De as createElkLayoutEngine, g as dialogHostKey, j as diffLines, q as filterTree, Ie as findNextIndex, ze as gridAria, _e as groupStackMetrics, ge as hideDescendants, k as highlightCode, Te as isGroupId, Ee as makeGroupId, re as matchName, Ce as memberCardHeight, Ne as mergeKeptIndices, Le as moveGridPosition, I as parseNoteData, ie as parseXpath, X as provideColumnFilterHeader, _ as provideDialogHost, Q as provideRowSortHeader, Be as rowAria, L as serializeNoteData, Pe as splitKeptItems, i as useActiveDocument, Z as useColumnFilterHeaderContext, J as useColumnFilters, Oe as useDiagramLayout, t as useDialecteChannel, v as useDialog, a as useDocumentProgress, o as useDocumentState, n as useLiveData, $ as useOptionalRowSortContext, r as useProjectLiveData, Y as useRowSort, Fe as useVirtualScroller, ae as validateSearchText, oe as validateXpath };
|
|
77
|
+
export { s as Button, x as CATEGORY_ELEMENTS, B as CodeBlock, l as Combobox, de as ContextMenu, E as DEFAULT_OVERSCAN, ze as DiagramNodeCard, Be as DiagramNodeGroup, p as Dialog, y as DialogHost, b as DocumentProgressBar, c as Dropdown, S as ELEMENT_TO_COLOR, C as ELEMENT_TO_ICON, w as ElementBadge, m as FeedbackDialog, ue as FilterableColumnHeader, u as FloatingTooltip, Oe as GROUP_COLLAPSED_MEMBERS_HEIGHT, ke as GROUP_HEADER_HEIGHT, Ae as GROUP_MEMBER_GAP, je as GROUP_MEMBER_HEIGHT, Me as GROUP_MEMBER_HEIGHT_COMPACT, X as KEY_SEPARATOR, R as LibraryBrowser, d as MultiSelect, U as NOTE_CATEGORIES, W as NOTE_CATEGORY_LABELS, G as NOTE_STATUSES, Z as NO_VALUE_KEY, Y as NoteCategoryPicker, J as NoteCategoryTag, xe as ProgressBar, L as SclExplorer, I as SclTree, _e as SelectorInput, Se as Spinner, ve as SplitLayout, ye as StatusBar, be as StatusBarItem, f as TextInputAutocomplete, H as XmlDiff, Ce as applyInitialVisibility, Q as buildFlatOptions, $ as buildMultiValueOptions, we as buildRecordCache, ee as buildTreeOptions, fe as buildXpath, N as cellAria, T as collectExpandableNodeIds, te as collectLeafKeys, ne as collectParentKeys, Te as collectVisibleIds, Pe as computeGroups, D as computeSpacers, h as createDialogHost, e as createDocumentStore, Le as createElkLayoutEngine, g as dialogHostKey, V as diffLines, re as filterTree, j as findNextIndex, P as gridAria, De as groupStackMetrics, Ee as hideDescendants, z as highlightCode, Fe as isGroupId, Ie as makeGroupId, pe as matchName, Ne as memberCardHeight, O as mergeKeptIndices, M as moveGridPosition, K as parseNoteData, me as parseXpath, oe as provideColumnFilterHeader, _ as provideDialogHost, ce as provideRowSortHeader, F as rowAria, q as serializeNoteData, k as splitKeptItems, i as useActiveDocument, se as useColumnFilterHeaderContext, ie as useColumnFilters, Re as useDiagramLayout, t as useDialecteChannel, v as useDialog, a as useDocumentProgress, o as useDocumentState, n as useLiveData, le as useOptionalRowSortContext, r as useProjectLiveData, ae as useRowSort, A as useVirtualScroller, he as validateSearchText, ge as validateXpath };
|
|
@@ -2,6 +2,6 @@ import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./library-browser.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region lib/library-browser/library-browser.vue
|
|
5
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-c4217843"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -166,6 +166,7 @@ var b = { class: "library-browser" }, x = { class: "library-browser__tree" }, ne
|
|
|
166
166
|
items: R.value.items,
|
|
167
167
|
expanded: U.value,
|
|
168
168
|
"aria-label": "Template Library Browser",
|
|
169
|
+
"row-height": 28,
|
|
169
170
|
"onUpdate:expanded": G,
|
|
170
171
|
onSelect: re,
|
|
171
172
|
onRowClick: q
|