@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.
@@ -1,34 +1,45 @@
1
- import { r as e } from "../external/.pnpm/@dialecte_core@0.2.19/node_modules/@dialecte/core/dist/utils-CmyVTqDb.js";
2
- import { b as t } from "../external/.pnpm/@dialecte_core@0.2.19/node_modules/@dialecte/core/dist/project-B6LoveZA.js";
3
- import "../external/.pnpm/@dialecte_core@0.2.19/node_modules/@dialecte/core/dist/index.js";
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 o = r(null), s = i?.extensions, c = {}, l = {};
8
- if (s) for (let [e, t] of Object.entries(s)) t.query && (c[e] = t.query), t.transaction && (l[e] = t.transaction);
9
- let u = Object.keys(c).length > 0, d = Object.keys(l).length > 0, f = u || d, p = n(() => {
10
- let n = o.value;
11
- if (e(n, { detail: "createDocumentStore: document accessed before hydration. Ensure hydrate() is called before consumers read document, or guard with isHydrated." }), !f) return n;
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 a(r, {
14
- query: u ? a(r.query, t(c, r.query)) : r.query,
15
- transaction: d ? (e) => r.transaction((n) => e(a(n, t(l, n)))) : r.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
- }), m = n(() => o.value !== null);
18
- function h(e) {
19
- o.value = e;
17
+ }), h = n(() => s.value !== null);
18
+ function g(e) {
19
+ s.value = e;
20
20
  }
21
- function g() {
22
- o.value = null;
21
+ function _() {
22
+ s.value = null;
23
23
  }
24
24
  return {
25
- document: p,
26
- isHydrated: m,
27
- hydrate: h,
28
- clear: g
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-f0f0237d"]]);
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, resolveDynamicComponent as g, toDisplayString as _, unref as v, withCtx as y, withModifiers as b } from "vue";
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 x = ["onClick"], S = { class: "flex flex-1 items-center" }, C = ["aria-label", "data-tip"], w = { class: "pl-2" }, T = /* @__PURE__ */ u({
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: T }) {
17
- let E = u, D = T;
18
- return (u, T) => (m(), o(v(e), {
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: E.items,
20
+ items: O.items,
21
21
  "get-key": (e) => e.id,
22
- "default-expanded": E.defaultExpandedItems,
23
- "aria-label": E.ariaLabel
22
+ "default-expanded": O.defaultExpandedItems,
23
+ "aria-label": O.ariaLabel
24
24
  }, {
25
- default: y(({ flattenItems: e }) => [(m(!0), c(a, null, h(e, (e) => (m(), o(v(t), d({ key: e.value.id }, { ref_for: !0 }, e.bind, {
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() : D("select", e.value);
28
+ t.detail.originalEvent.type === "click" || e.value.selectable === !1 ? t.preventDefault() : k("select", e.value);
29
29
  },
30
- onToggle: T[0] ||= (e) => {
30
+ onToggle: D[0] ||= (e) => {
31
31
  e.detail.originalEvent.type === "click" && e.preventDefault();
32
32
  }
33
33
  }), {
34
- default: y(({ handleSelect: t, handleToggle: a }) => [l("div", {
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(), D("select", e.value));
39
- }
40
- }, [e.hasChildren ? (m(), o(v(n), {
41
- key: 0,
42
- "aria-hidden": "true",
43
- class: "explorer-tree__chevron shrink-0",
44
- size: 16,
45
- onClick: b((e) => a(), ["stop"])
46
- }, null, 8, ["onClick"])) : (m(), o(v(n), {
47
- key: 1,
48
- "aria-hidden": "true",
49
- class: "shrink-0 invisible",
50
- size: 16
51
- })), l("div", S, [e.value.tag ? (m(), c("div", {
52
- key: 0,
53
- role: "img",
54
- "aria-label": e.value.tag,
55
- class: f(["explorer-tree__item-tag tooltip flex items-center justify-center rounded-full p-1", v(r)[e.value.tag]?.background]),
56
- "data-tip": e.value.tag
57
- }, [v(i)[e.value.tag] ? (m(), o(g(v(i)[e.value.tag]), {
58
- key: 0,
59
- class: f(["explorer-tree__item-icon h-4 w-4", v(r)[e.value.tag]?.text])
60
- }, null, 8, ["class"])) : s("", !0)], 10, C)) : s("", !0), l("span", w, _(e.value.name), 1)])], 14, x)]),
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
- _: 1
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 { T as default };
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.19/node_modules/@dialecte/core/dist/helpers.js
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"
@@ -0,0 +1,2 @@
1
+ import "./utils-XD-swXWn.js";
2
+ import "./project-layfjgYc.js";