@septkit/ui 0.0.90 → 0.0.92
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/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 +11 -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 +2 -2
|
@@ -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 = {
|
|
@@ -967,7 +972,9 @@ declare function __VLS_template_6(): {
|
|
|
967
972
|
expanded: boolean;
|
|
968
973
|
}): unknown;
|
|
969
974
|
};
|
|
970
|
-
refs: {
|
|
975
|
+
refs: {
|
|
976
|
+
root: {} | null;
|
|
977
|
+
};
|
|
971
978
|
rootEl: any;
|
|
972
979
|
};
|
|
973
980
|
|
|
@@ -1417,13 +1424,13 @@ export declare const DiagramNodeCard: DefineComponent<__VLS_Props_25, {
|
|
|
1417
1424
|
focus: () => void | undefined;
|
|
1418
1425
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1419
1426
|
select: (nodeId: string) => any;
|
|
1420
|
-
"toggle-expand": (nodeId: string) => any;
|
|
1421
1427
|
keydown: (event: KeyboardEvent) => any;
|
|
1428
|
+
"toggle-expand": (nodeId: string) => any;
|
|
1422
1429
|
"show-details": (nodeId: string) => any;
|
|
1423
1430
|
}, string, PublicProps, Readonly<__VLS_Props_25> & Readonly<{
|
|
1424
1431
|
onSelect?: ((nodeId: string) => any) | undefined;
|
|
1425
|
-
"onToggle-expand"?: ((nodeId: string) => any) | undefined;
|
|
1426
1432
|
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
1433
|
+
"onToggle-expand"?: ((nodeId: string) => any) | undefined;
|
|
1427
1434
|
"onShow-details"?: ((nodeId: string) => any) | undefined;
|
|
1428
1435
|
}>, {
|
|
1429
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
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
//#region lib/tree/collect-expandable-node-ids.ts
|
|
2
|
-
function e(
|
|
3
|
-
let n = [];
|
|
4
|
-
for (
|
|
5
|
-
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = [], n = [...e].reverse();
|
|
4
|
+
for (; n.length;) {
|
|
5
|
+
let e = n.pop();
|
|
6
|
+
if (e.children?.length) {
|
|
7
|
+
t.push(e.id);
|
|
8
|
+
for (let t = e.children.length - 1; t >= 0; t--) n.push(e.children[t]);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
6
12
|
}
|
|
7
13
|
//#endregion
|
|
8
14
|
export { e as collectExpandableNodeIds };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region lib/tree/expansion.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
return e.all ? t : e.scoped;
|
|
4
|
+
}
|
|
5
|
+
function t(e, t) {
|
|
6
|
+
return {
|
|
7
|
+
scoped: e.includes(t) ? e.filter((e) => e !== t) : [...e, t],
|
|
8
|
+
all: !1
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function n(e, t) {
|
|
12
|
+
return {
|
|
13
|
+
scoped: [.../* @__PURE__ */ new Set([...e.scoped, ...t])],
|
|
14
|
+
all: !1
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function r(e, t) {
|
|
18
|
+
if (!t.length) return !1;
|
|
19
|
+
if (e.all) return !0;
|
|
20
|
+
let n = new Set(e.scoped);
|
|
21
|
+
return t.every((e) => n.has(e));
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { e as expandedIdsOf, r as isAllExpanded, n as revealIds, t as toggleExpandedId };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region lib/tree/flatten-tree.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
let n = [], r = [{
|
|
4
|
+
nodes: e,
|
|
5
|
+
index: 0,
|
|
6
|
+
depth: 1,
|
|
7
|
+
parentIndex: void 0
|
|
8
|
+
}];
|
|
9
|
+
for (; r.length;) {
|
|
10
|
+
let e = r[r.length - 1];
|
|
11
|
+
if (e.index >= e.nodes.length) {
|
|
12
|
+
r.pop();
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
let i = e.nodes[e.index++], a = n.length, o = !!i.children?.length, s = o && t.has(i.id);
|
|
16
|
+
n.push({
|
|
17
|
+
id: i.id,
|
|
18
|
+
index: a,
|
|
19
|
+
node: i,
|
|
20
|
+
depth: e.depth,
|
|
21
|
+
posInSet: e.index,
|
|
22
|
+
setSize: e.nodes.length,
|
|
23
|
+
parentIndex: e.parentIndex,
|
|
24
|
+
hasChildren: o,
|
|
25
|
+
expanded: s
|
|
26
|
+
}), s && r.push({
|
|
27
|
+
nodes: i.children,
|
|
28
|
+
index: 0,
|
|
29
|
+
depth: e.depth + 1,
|
|
30
|
+
parentIndex: a
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return n;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { e as flattenTree };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region lib/tree/tree-index.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = [], n = /* @__PURE__ */ new Map(), r = [], i = [];
|
|
4
|
+
for (let t = e.length - 1; t >= 0; t--) i.push({
|
|
5
|
+
node: e[t],
|
|
6
|
+
parentId: void 0,
|
|
7
|
+
lowerName: e[t].name.toLowerCase()
|
|
8
|
+
});
|
|
9
|
+
for (; i.length;) {
|
|
10
|
+
let e = i.pop(), { node: a } = e;
|
|
11
|
+
if (t.push(e), n.set(a.id, e), a.children?.length) {
|
|
12
|
+
r.push(a.id);
|
|
13
|
+
for (let e = a.children.length - 1; e >= 0; e--) {
|
|
14
|
+
let t = a.children[e];
|
|
15
|
+
i.push({
|
|
16
|
+
node: t,
|
|
17
|
+
parentId: a.id,
|
|
18
|
+
lowerName: t.name.toLowerCase()
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
items: e,
|
|
25
|
+
nodes: t,
|
|
26
|
+
byId: n,
|
|
27
|
+
expandableIds: r
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function t(e, t) {
|
|
31
|
+
let n = e.byId.get(t);
|
|
32
|
+
if (!n) return;
|
|
33
|
+
let r = [];
|
|
34
|
+
for (; n.parentId !== void 0;) r.push(n.parentId), n = e.byId.get(n.parentId);
|
|
35
|
+
return r.reverse();
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { e as buildTreeIndex, t as findAncestorIds };
|
package/dist/tree/tree.js
CHANGED
|
@@ -2,6 +2,6 @@ import e from "./tree.vue_vue_type_script_setup_true_lang.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
//#region lib/tree/tree.vue
|
|
5
|
-
var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-
|
|
5
|
+
var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-ec248e32"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|