@septkit/ui 0.0.33 → 0.0.35
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/dialecte/create-document-store.js +31 -20
- package/dist/explorer/explorer.js +1 -1
- package/dist/explorer/explorer.vue_vue_type_script_setup_true_lang.js +50 -38
- package/dist/external/.pnpm/{@dialecte_core@0.2.19 → @dialecte_core@0.2.21}/node_modules/@dialecte/core/dist/helpers.js +1 -1
- package/dist/external/.pnpm/@dialecte_core@0.2.21/node_modules/@dialecte/core/dist/index.js +2 -0
- package/dist/external/.pnpm/{@dialecte_core@0.2.19/node_modules/@dialecte/core/dist/project-B6LoveZA.js → @dialecte_core@0.2.21/node_modules/@dialecte/core/dist/project-layfjgYc.js} +4547 -4546
- package/dist/external/.pnpm/{@dialecte_core@0.2.19/node_modules/@dialecte/core/dist/utils-CmyVTqDb.js → @dialecte_core@0.2.21/node_modules/@dialecte/core/dist/utils-XD-swXWn.js} +1 -1
- package/dist/index.d.ts +57 -11
- package/dist/ui.css +1 -1
- package/package.json +3 -3
- package/dist/external/.pnpm/@dialecte_core@0.2.19/node_modules/@dialecte/core/dist/index.js +0 -2
|
@@ -1,34 +1,45 @@
|
|
|
1
|
-
import { r as e } from "../external/.pnpm/@dialecte_core@0.2.
|
|
2
|
-
import {
|
|
3
|
-
import "../external/.pnpm/@dialecte_core@0.2.
|
|
1
|
+
import { r as e } from "../external/.pnpm/@dialecte_core@0.2.21/node_modules/@dialecte/core/dist/utils-XD-swXWn.js";
|
|
2
|
+
import { x as t } from "../external/.pnpm/@dialecte_core@0.2.21/node_modules/@dialecte/core/dist/project-layfjgYc.js";
|
|
3
|
+
import "../external/.pnpm/@dialecte_core@0.2.21/node_modules/@dialecte/core/dist/index.js";
|
|
4
4
|
import { computed as n, shallowRef as r } from "vue";
|
|
5
5
|
//#region lib/dialecte/create-document-store.ts
|
|
6
6
|
function i(i) {
|
|
7
|
-
let
|
|
8
|
-
if (
|
|
9
|
-
let
|
|
10
|
-
let n =
|
|
11
|
-
if (e(n, { detail: "createDocumentStore: document accessed before hydration. Ensure hydrate() is called before consumers read document, or guard with isHydrated." }), !
|
|
7
|
+
let s = r(null), c = i?.extensions, l = {}, u = {};
|
|
8
|
+
if (c) for (let [e, t] of Object.entries(c)) t.query && (l[e] = t.query), t.transaction && (u[e] = t.transaction);
|
|
9
|
+
let d = Object.keys(l).length > 0, f = Object.keys(u).length > 0, p = d || f, m = n(() => {
|
|
10
|
+
let n = s.value;
|
|
11
|
+
if (e(n, { detail: "createDocumentStore: document accessed before hydration. Ensure hydrate() is called before consumers read document, or guard with isHydrated." }), !p) return n;
|
|
12
12
|
let r = n;
|
|
13
|
-
return
|
|
14
|
-
query:
|
|
15
|
-
transaction:
|
|
13
|
+
return o(r, {
|
|
14
|
+
query: d ? o(r.query, a(t(l, r.query), r.query)) : r.query,
|
|
15
|
+
transaction: f ? (e) => r.transaction((n) => e(o(n, a(t(u, n), n)))) : r.transaction
|
|
16
16
|
});
|
|
17
|
-
}),
|
|
18
|
-
function
|
|
19
|
-
|
|
17
|
+
}), h = n(() => s.value !== null);
|
|
18
|
+
function g(e) {
|
|
19
|
+
s.value = e;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
21
|
+
function _() {
|
|
22
|
+
s.value = null;
|
|
23
23
|
}
|
|
24
24
|
return {
|
|
25
|
-
document:
|
|
26
|
-
isHydrated:
|
|
27
|
-
hydrate:
|
|
28
|
-
clear:
|
|
25
|
+
document: m,
|
|
26
|
+
isHydrated: h,
|
|
27
|
+
hydrate: g,
|
|
28
|
+
clear: _
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
function a(e, t) {
|
|
32
|
+
let n = t, r = {};
|
|
33
|
+
for (let [t, i] of Object.entries(e)) {
|
|
34
|
+
let e = n[t];
|
|
35
|
+
r[t] = typeof e == "object" && e ? {
|
|
36
|
+
...e,
|
|
37
|
+
...i
|
|
38
|
+
} : i;
|
|
39
|
+
}
|
|
40
|
+
return r;
|
|
41
|
+
}
|
|
42
|
+
function o(e, t) {
|
|
32
43
|
return new Proxy(e, { get(n, r) {
|
|
33
44
|
if (r in t) return t[r];
|
|
34
45
|
let i = Reflect.get(e, r, e);
|
|
@@ -2,6 +2,6 @@ import e from "./explorer.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/explorer/explorer.vue
|
|
5
|
-
var n = /* @__PURE__ */ t(e, [["__scopeId", "data-v-
|
|
5
|
+
var n = /* @__PURE__ */ t(e, [["__scopeId", "data-v-87efec2f"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -3,64 +3,76 @@ import { TreeItem_default as t } from "../external/.pnpm/reka-ui@2.9.6_vue@3.5.3
|
|
|
3
3
|
import { ChevronRight as n } from "../external/.pnpm/@lucide_vue@1.16.0_vue@3.5.32_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/chevron-right.js";
|
|
4
4
|
import { ELEMENT_TO_COLOR as r } from "../icons/element-color-map.generated.js";
|
|
5
5
|
import { ELEMENT_TO_ICON as i } from "../icons/element-icon-mapper.js";
|
|
6
|
-
import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, defineComponent as u, mergeProps as d, normalizeClass as f, normalizeStyle as p, openBlock as m, renderList as h,
|
|
6
|
+
import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, defineComponent as u, mergeProps as d, normalizeClass as f, normalizeStyle as p, openBlock as m, renderList as h, renderSlot as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, withCtx as b, withModifiers as x } from "vue";
|
|
7
7
|
//#region lib/explorer/explorer.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var S = ["onClick", "onContextmenu"], C = { class: "flex flex-1 items-center min-w-0" }, w = ["aria-label", "data-tip"], T = { class: "pl-2 truncate" }, E = { class: "shrink-0 ml-auto pl-2" }, D = /* @__PURE__ */ u({
|
|
9
9
|
__name: "explorer",
|
|
10
10
|
props: {
|
|
11
11
|
items: {},
|
|
12
12
|
defaultExpandedItems: { default: () => [] },
|
|
13
13
|
ariaLabel: { default: "SCL Tree" }
|
|
14
14
|
},
|
|
15
|
-
emits: ["select"],
|
|
16
|
-
setup(u, { emit:
|
|
17
|
-
let
|
|
18
|
-
return (u,
|
|
15
|
+
emits: ["select", "contextmenu"],
|
|
16
|
+
setup(u, { emit: D }) {
|
|
17
|
+
let O = u, k = D;
|
|
18
|
+
return (u, D) => (m(), o(y(e), {
|
|
19
19
|
class: "explorer-tree list-none select-none w-full text-stone-700 text-sm font-medium",
|
|
20
|
-
items:
|
|
20
|
+
items: O.items,
|
|
21
21
|
"get-key": (e) => e.id,
|
|
22
|
-
"default-expanded":
|
|
23
|
-
"aria-label":
|
|
22
|
+
"default-expanded": O.defaultExpandedItems,
|
|
23
|
+
"aria-label": O.ariaLabel
|
|
24
24
|
}, {
|
|
25
|
-
default:
|
|
25
|
+
default: b(({ flattenItems: e }) => [(m(!0), c(a, null, h(e, (e) => (m(), o(y(t), d({ key: e.value.id }, { ref_for: !0 }, e.bind, {
|
|
26
26
|
class: ["explorer-tree__item py-1 my-0.5 rounded outline-none", e.value.selectable === !1 ? "" : "explorer-tree__item--selectable"],
|
|
27
27
|
onSelect: (t) => {
|
|
28
|
-
t.detail.originalEvent.type === "click" || e.value.selectable === !1 ? t.preventDefault() :
|
|
28
|
+
t.detail.originalEvent.type === "click" || e.value.selectable === !1 ? t.preventDefault() : k("select", e.value);
|
|
29
29
|
},
|
|
30
|
-
onToggle:
|
|
30
|
+
onToggle: D[0] ||= (e) => {
|
|
31
31
|
e.detail.originalEvent.type === "click" && e.preventDefault();
|
|
32
32
|
}
|
|
33
33
|
}), {
|
|
34
|
-
default:
|
|
34
|
+
default: b(({ handleSelect: t, handleToggle: a }) => [l("div", {
|
|
35
35
|
class: f(["flex items-center", e.value.selectable !== !1 || e.hasChildren ? "cursor-pointer" : "cursor-default"]),
|
|
36
36
|
style: p({ "padding-left": e.level === 1 ? "0rem" : `${e.level - 1.5}rem` }),
|
|
37
37
|
onClick: () => {
|
|
38
|
-
e.value.selectable === !1 ? e.hasChildren && a() : (t(),
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
38
|
+
e.value.selectable === !1 ? e.hasChildren && a() : (t(), k("select", e.value));
|
|
39
|
+
},
|
|
40
|
+
onContextmenu: x((t) => k("contextmenu", {
|
|
41
|
+
node: e.value,
|
|
42
|
+
event: t
|
|
43
|
+
}), ["prevent"])
|
|
44
|
+
}, [
|
|
45
|
+
e.hasChildren ? (m(), o(y(n), {
|
|
46
|
+
key: 0,
|
|
47
|
+
"aria-hidden": "true",
|
|
48
|
+
class: "explorer-tree__chevron shrink-0",
|
|
49
|
+
size: 16,
|
|
50
|
+
onClick: x((e) => a(), ["stop"])
|
|
51
|
+
}, null, 8, ["onClick"])) : (m(), o(y(n), {
|
|
52
|
+
key: 1,
|
|
53
|
+
"aria-hidden": "true",
|
|
54
|
+
class: "shrink-0 invisible",
|
|
55
|
+
size: 16
|
|
56
|
+
})),
|
|
57
|
+
l("div", C, [
|
|
58
|
+
g(u.$slots, "node-prefix", { node: e.value }, void 0, !0),
|
|
59
|
+
e.value.tag ? (m(), c("div", {
|
|
60
|
+
key: 0,
|
|
61
|
+
role: "img",
|
|
62
|
+
"aria-label": e.value.tag,
|
|
63
|
+
class: f(["explorer-tree__item-tag tooltip flex items-center justify-center rounded-full p-1", y(r)[e.value.tag]?.background]),
|
|
64
|
+
"data-tip": e.value.tag
|
|
65
|
+
}, [y(i)[e.value.tag] ? (m(), o(_(y(i)[e.value.tag]), {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: f(["explorer-tree__item-icon h-4 w-4", y(r)[e.value.tag]?.text])
|
|
68
|
+
}, null, 8, ["class"])) : s("", !0)], 10, w)) : s("", !0),
|
|
69
|
+
g(u.$slots, "node-label", { node: e.value }, () => [l("span", T, v(e.value.name), 1)], !0)
|
|
70
|
+
]),
|
|
71
|
+
l("div", E, [g(u.$slots, "node-suffix", { node: e.value }, void 0, !0)])
|
|
72
|
+
], 46, S)]),
|
|
61
73
|
_: 2
|
|
62
74
|
}, 1040, ["class", "onSelect"]))), 128))]),
|
|
63
|
-
_:
|
|
75
|
+
_: 3
|
|
64
76
|
}, 8, [
|
|
65
77
|
"items",
|
|
66
78
|
"get-key",
|
|
@@ -70,4 +82,4 @@ var x = ["onClick"], S = { class: "flex flex-1 items-center" }, C = ["aria-label
|
|
|
70
82
|
}
|
|
71
83
|
});
|
|
72
84
|
//#endregion
|
|
73
|
-
export {
|
|
85
|
+
export { D as default };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
uri: "http://dialecte.dev/XML/DEV",
|
|
3
3
|
prefix: "dev"
|
|
4
4
|
}.prefix}`;
|
|
5
|
-
//#region node_modules/.pnpm/@dialecte+core@0.2.
|
|
5
|
+
//#region node_modules/.pnpm/@dialecte+core@0.2.21/node_modules/@dialecte/core/dist/helpers.js
|
|
6
6
|
var e = {
|
|
7
7
|
uri: "http://www.w3.org/2001/XMLSchema-instance",
|
|
8
8
|
prefix: "xsi"
|