x-prop-tree 0.7.47 → 0.8.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/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { a as e, i as t, n, r, t as i } from "./vendor.iijup929.js";
1
+ import { a as e, i as t, n, r, t as i } from "./vendor.kbufw3jy.js";
2
2
  import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, h as m, inject as h, isRef as g, mergeModels as _, mergeProps as v, normalizeStyle as y, onBeforeUnmount as b, onMounted as x, onUnmounted as S, openBlock as C, provide as w, ref as T, renderList as E, renderSlot as ee, resolveComponent as D, resolveDirective as O, toDisplayString as k, unref as A, useId as j, useModel as M, useTemplateRef as te, watch as N, watchEffect as P, withCtx as F, withDirectives as I, withKeys as ne, withModifiers as L } from "vue";
3
- import { getElement as re, getPropertyDefault as R, getPropertyDefaultArray as ie, getTag as ae, makeSlotId as oe, parsePercentStr as se, parsePixelStr as ce, pkgs as le } from "x-runtime-lib";
3
+ import { getElement as re, getPropertyDefault as R, getPropertyDefaultArray as ie, getTag as ae, makeSlotId as oe, parsePercent as se, parsePixel as ce, pkgs as le } from "x-runtime-lib";
4
4
  import { useI18n as z } from "vue-i18n";
5
5
  import { eventBus as B, globalObjects as ue, injectDark as de, injectLocale as fe, openNumberDlg as pe, openPromptDlg as me, useColor as V, useSystem as H, useViewStack as U } from "x-essential-lib";
6
6
  import { globalState as he } from "x-state-lib";
@@ -474,7 +474,7 @@ function st() {
474
474
  if (!s) return console.assert(!1, `invalid version=${e.value}`), [];
475
475
  let c = ae(t.value, n.value), l = [];
476
476
  for (let e = 0; e < s.groups[c].length; e++) {
477
- let t = s.groups[c][e], n = i(o, t.key);
477
+ let t = s.groups[c][e], n = r(o, t.key);
478
478
  l.push({
479
479
  id: t.key,
480
480
  type: 0,
@@ -483,16 +483,16 @@ function st() {
483
483
  collapse: n?.collapse ?? !0,
484
484
  count: 0
485
485
  });
486
- let r = 0;
486
+ let i = 0;
487
487
  for (let e of t.items) {
488
488
  let n = re(e);
489
489
  if (n && !n.internal && n.slots) for (let e of n.slots) {
490
- let i = oe("elementSlot", n.key, e.key), o = `${a.global.t(n.name)} / ${a.global.t(e.name)}`;
490
+ let r = oe("elementSlot", n.key, e.key), o = `${a.global.t(n.name)} / ${a.global.t(e.name)}`;
491
491
  l.push({
492
- id: i,
492
+ id: r,
493
493
  type: 1,
494
494
  name: o,
495
- position: r++,
495
+ position: i++,
496
496
  group: t.key
497
497
  });
498
498
  }
@@ -500,13 +500,13 @@ function st() {
500
500
  }
501
501
  let { activeApp: u, depends: d } = he.app;
502
502
  for (let { id: e, name: t, position: n } of u.compGroups) {
503
- let r = i(o, e);
503
+ let i = r(o, e);
504
504
  l.push({
505
505
  id: e,
506
506
  type: 0,
507
507
  name: t,
508
508
  position: n,
509
- collapse: r?.collapse ?? !0
509
+ collapse: i?.collapse ?? !0
510
510
  });
511
511
  }
512
512
  let f = 0;
@@ -523,7 +523,7 @@ function st() {
523
523
  });
524
524
  }
525
525
  }
526
- return r(l, !0);
526
+ return i(l, !0);
527
527
  }, c = () => {
528
528
  o.value = s();
529
529
  }, l, u = () => {
@@ -551,34 +551,34 @@ function ct() {
551
551
  let e = T([]);
552
552
  Qe(e);
553
553
  let t = () => {
554
- let { activeApp: t, depends: n } = he.app, i = [];
555
- for (let { id: n, name: r, position: a } of t.compGroups) {
554
+ let { activeApp: t, depends: n } = he.app, r = [];
555
+ for (let { id: n, name: i, position: a } of t.compGroups) {
556
556
  let t = e.value.find((e) => e.id === n);
557
- i.push({
557
+ r.push({
558
558
  id: n,
559
559
  type: 0,
560
- name: r,
560
+ name: i,
561
561
  position: a,
562
562
  collapse: t?.collapse ?? !0
563
563
  });
564
564
  }
565
- for (let { id: e, groupId: r, name: a, position: o } of t.comps) n[e] && i.push({
565
+ for (let { id: e, groupId: i, name: a, position: o } of t.comps) n[e] && r.push({
566
566
  id: e,
567
567
  type: 1,
568
568
  name: a,
569
569
  position: o,
570
- group: r
570
+ group: i
571
571
  });
572
- e.value = r(i, !0);
573
- }, n, i = () => {
572
+ e.value = i(r, !0);
573
+ }, n, r = () => {
574
574
  clearTimeout(n), n = window.setTimeout(() => {
575
- t(), n && i();
575
+ t(), n && r();
576
576
  }, 1e3);
577
577
  }, a = () => {
578
578
  clearTimeout(n), n = void 0;
579
579
  };
580
580
  x(() => {
581
- i();
581
+ r();
582
582
  }), b(() => {
583
583
  a();
584
584
  });
@@ -627,7 +627,7 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
627
627
  let { backgroundColor2: n, highlightColor: r } = V(), i = e, a = t, s = T(!1), c = o(() => ({
628
628
  background: s.value ? r.value : n.value,
629
629
  height: "30px",
630
- marginBottom: "1px",
630
+ marginTop: "1px",
631
631
  userSelect: "none"
632
632
  }));
633
633
  return (e, t) => {
@@ -659,7 +659,7 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
659
659
  let { backgroundColor2: n, highlightColor: r } = V(), i = t, a = T(!1), s = o(() => ({
660
660
  background: a.value ? r.value : n.value,
661
661
  height: "48px",
662
- marginBottom: "1px",
662
+ marginTop: "1px",
663
663
  userSelect: "none"
664
664
  }));
665
665
  return (t, n) => {
@@ -689,11 +689,11 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
689
689
  },
690
690
  emits: ["update:modelValue", "update:open"],
691
691
  setup(e) {
692
- let { nameList: t } = H(), r = M(e, "modelValue"), o = M(e, "open"), u = rt(), d = (e) => {
693
- let t = i(u, e);
692
+ let { nameList: t } = H(), i = M(e, "modelValue"), o = M(e, "open"), u = rt(), d = (e) => {
693
+ let t = r(u, e);
694
694
  t && n(u, e, !t.collapse);
695
695
  }, f = (e) => {
696
- r.value = e, o.value = !1;
696
+ i.value = e, o.value = !1;
697
697
  };
698
698
  return (e, n) => A(u).length > 0 ? (C(), l("div", ht, [(C(!0), l(a, null, E(A(u), (e) => (C(), l(a, { key: e.id }, [e.type === 0 ? (C(), s(ft, {
699
699
  key: 0,
@@ -735,9 +735,9 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
735
735
  }),
736
736
  emits: /* @__PURE__ */ _(["delete"], ["update:modelValue"]),
737
737
  setup(e, { emit: t }) {
738
- let { t: n } = z(), r = ge(), { sysBarAvail: a, nameList: l } = H(), { backgroundColor1: p } = V(), m = M(e, "modelValue"), h = t, _ = rt(), b = o(() => {
738
+ let { t: n } = z(), i = ge(), { sysBarAvail: a, nameList: l } = H(), { backgroundColor1: p } = V(), m = M(e, "modelValue"), h = t, _ = rt(), b = o(() => {
739
739
  let e = "100%";
740
- return r.mdAndUp.value && (e = "400px"), {
740
+ return i.mdAndUp.value && (e = "400px"), {
741
741
  background: p.value,
742
742
  width: e,
743
743
  height: "100%"
@@ -750,7 +750,7 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
750
750
  };
751
751
  }), w = o(() => ({ height: "60px" })), T = o(() => {
752
752
  if (!m.value) return n("x-runtime-lib.notSet");
753
- let e = i(_, m.value);
753
+ let e = r(_, m.value);
754
754
  return e ? e.name : n("x-runtime-lib.slotNotAvail");
755
755
  }), { open: E } = U(`propTreeAdaptSlotSelectDlg${j()}`);
756
756
  return S(() => {
@@ -899,7 +899,7 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
899
899
  let { backgroundColor2: n, highlightColor: r } = V(), i = e, a = t, s = T(!1), c = o(() => ({
900
900
  background: s.value ? r.value : n.value,
901
901
  height: "30px",
902
- marginBottom: "1px",
902
+ marginTop: "1px",
903
903
  userSelect: "none"
904
904
  }));
905
905
  return (e, t) => {
@@ -931,7 +931,7 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
931
931
  let { backgroundColor2: n, highlightColor: r } = V(), i = e, a = t, s = T(!1), c = o(() => ({
932
932
  background: s.value ? r.value : n.value,
933
933
  height: "48px",
934
- marginBottom: "1px",
934
+ marginTop: "1px",
935
935
  userSelect: "none"
936
936
  }));
937
937
  return (e, t) => {
@@ -961,11 +961,11 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
961
961
  },
962
962
  emits: ["update:modelValue", "update:open"],
963
963
  setup(e) {
964
- let { nameList: t } = H(), r = M(e, "modelValue"), o = M(e, "open"), u = $e(), d = (e) => {
965
- let t = i(u, e);
964
+ let { nameList: t } = H(), i = M(e, "modelValue"), o = M(e, "open"), u = $e(), d = (e) => {
965
+ let t = r(u, e);
966
966
  t && n(u, e, !t.collapse);
967
967
  }, f = (e) => {
968
- r.value = e, o.value = !1, B.emit("refreshDepends");
968
+ i.value = e, o.value = !1, B.emit("refreshDepends");
969
969
  };
970
970
  return (e, n) => A(u).length > 0 ? (C(), l("div", Dt, [(C(!0), l(a, null, E(A(u), (e) => (C(), l(a, { key: e.id }, [e.type === 0 ? (C(), s(wt, {
971
971
  key: 0,
@@ -1003,9 +1003,9 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
1003
1003
  }),
1004
1004
  emits: /* @__PURE__ */ _(["delete"], ["update:modelValue"]),
1005
1005
  setup(e, { emit: t }) {
1006
- let { t: n } = z(), r = ge(), { sysBarAvail: a, nameList: l } = H(), { backgroundColor1: p } = V(), m = M(e, "modelValue"), h = t, _ = $e(), b = o(() => {
1006
+ let { t: n } = z(), i = ge(), { sysBarAvail: a, nameList: l } = H(), { backgroundColor1: p } = V(), m = M(e, "modelValue"), h = t, _ = $e(), b = o(() => {
1007
1007
  let e = "100%";
1008
- return r.mdAndUp.value && (e = "400px"), {
1008
+ return i.mdAndUp.value && (e = "400px"), {
1009
1009
  background: p.value,
1010
1010
  width: e,
1011
1011
  height: "100%"
@@ -1018,7 +1018,7 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
1018
1018
  };
1019
1019
  }), w = o(() => ({ height: "60px" })), T = o(() => {
1020
1020
  if (!m.value) return n("x-runtime-lib.notSet");
1021
- let e = i(_, m.value);
1021
+ let e = r(_, m.value);
1022
1022
  return e ? e.name : n("x-runtime-lib.compNotAvail");
1023
1023
  }), { open: E } = U(`propTreeCompSelectDlg${j()}`);
1024
1024
  return S(() => {
@@ -1275,7 +1275,7 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
1275
1275
  let g = o(() => p.value?.[m.value]), _ = () => {
1276
1276
  i.value = g.value?.default;
1277
1277
  }, v = T(0), y = async (e) => {
1278
- if (!e || !r() || g.value.ui !== "pixelInput" && g.value.ui !== "percentInput") return;
1278
+ if (!e || !r() || g.value.value !== "pixel" && g.value.value !== "percent") return;
1279
1279
  let t = await pe({
1280
1280
  title: "",
1281
1281
  value: v.value,
@@ -1287,9 +1287,9 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
1287
1287
  t !== void 0 && (v.value = t);
1288
1288
  };
1289
1289
  return P(() => {
1290
- g.value?.ui === "pixelInput" ? v.value = ce(i.value) : g.value?.ui === "percentInput" && (v.value = se(i.value));
1290
+ g.value?.value === "pixel" ? v.value = ce(i.value) : g.value?.value === "percent" && (v.value = se(i.value));
1291
1291
  }), N(v, (e) => {
1292
- g.value?.ui === "pixelInput" ? i.value = e + "px" : g.value?.ui === "percentInput" && (i.value = e + "%");
1292
+ g.value?.value === "pixel" ? i.value = e + "px" : g.value?.value === "percent" && (i.value = e + "%");
1293
1293
  }), (t, n) => {
1294
1294
  let r = D("v-select"), i = D("v-number-input"), o = D("v-btn"), d = O("ripple");
1295
1295
  return C(), l("div", Ft, [u("div", It, [I(f(r, {
@@ -1309,7 +1309,7 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
1309
1309
  void 0,
1310
1310
  void 0,
1311
1311
  { stop: !0 }
1312
- ]]), g.value?.ui === "pixelInput" || g.value?.ui === "percentInput" ? I((C(), s(i, {
1312
+ ]]), g.value?.value === "pixel" || g.value?.value === "percent" ? I((C(), s(i, {
1313
1313
  key: 0,
1314
1314
  modelValue: v.value,
1315
1315
  "onUpdate:modelValue": n[1] ||= (e) => v.value = e,
@@ -1482,7 +1482,7 @@ var ut = { class: "text-label-large ml-1" }, dt = { class: "text-body-small text
1482
1482
  let { backgroundColor2: n, highlightColor: r } = V(), i = t, a = T(!1), s = o(() => ({
1483
1483
  background: a.value ? r.value : n.value,
1484
1484
  height: "48px",
1485
- marginBottom: "1px",
1485
+ marginTop: "1px",
1486
1486
  userSelect: "none"
1487
1487
  }));
1488
1488
  return (t, n) => {
@@ -2033,7 +2033,7 @@ var pn = "20px", mn = /* @__PURE__ */ p({
2033
2033
  }
2034
2034
  return n;
2035
2035
  })());
2036
- return m("div", { style: { marginBottom: "1px" } }, (() => {
2036
+ return m("div", { style: { marginTop: "1px" } }, (() => {
2037
2037
  let t = [];
2038
2038
  return t.push(d), W(s, e) || t.push(f), t;
2039
2039
  })());
@@ -2064,7 +2064,7 @@ var pn = "20px", mn = /* @__PURE__ */ p({
2064
2064
  for (let i of t.children) n.push(E(e, i, (typeof r[t.key] != "object" && (r[t.key] = {}, u(e, r[t.key])), r[t.key]), void 0, !1));
2065
2065
  return n;
2066
2066
  })());
2067
- return m("div", { style: { marginBottom: "1px" } }, (() => {
2067
+ return m("div", { style: { marginTop: "1px" } }, (() => {
2068
2068
  let t = [];
2069
2069
  return t.push(l), W(s, e) || t.push(d), t;
2070
2070
  })());
@@ -2095,7 +2095,7 @@ var pn = "20px", mn = /* @__PURE__ */ p({
2095
2095
  for (let r = 0; r < o.length; r++) n.push(E(e, t, o, r, !1, !0));
2096
2096
  return n;
2097
2097
  })());
2098
- return m("div", { style: { marginBottom: "1px" } }, (() => {
2098
+ return m("div", { style: { marginTop: "1px" } }, (() => {
2099
2099
  let t = [];
2100
2100
  return t.push(d), W(s, e) || t.push(f), t;
2101
2101
  })());
@@ -838,7 +838,7 @@ function Ei(e, t) {
838
838
  return Ti(e, t);
839
839
  }
840
840
  //#endregion
841
- //#region node_modules/.pnpm/x-group-list@0.4.11_typescript@5.9.3_vite-plugin-vuetify@2.1.3_vite@8.0.0_@types+node@2_f12d43a2657c5c601c271699c9a80492/node_modules/x-group-list/dist/index.js
841
+ //#region node_modules/.pnpm/x-group-list@0.4.12_typescript@5.9.3_vite-plugin-vuetify@2.1.3_vite@8.0.0_@types+node@2_c0e662cfac4fb11be329dd9b43362664/node_modules/x-group-list/dist/index.js
842
842
  function Di(e, t) {
843
843
  let n = [], r = [];
844
844
  e.forEach((e) => {
@@ -873,4 +873,4 @@ function ki(e, t, n) {
873
873
  }
874
874
  }
875
875
  //#endregion
876
- export { Wr as a, Ei as i, ki as n, Di as r, Oi as t };
876
+ export { Wr as a, Ei as i, ki as n, Oi as r, Di as t };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-prop-tree",
3
3
  "private": false,
4
- "version": "0.7.47",
4
+ "version": "0.8.0",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -28,11 +28,11 @@
28
28
  "vuetify": "^4.0.2"
29
29
  },
30
30
  "peerDependencies": {
31
- "x-block-lib": "^0.10.11",
31
+ "x-block-lib": "^0.10.12",
32
32
  "x-error-lib": "^0.5.16",
33
33
  "x-essential-lib": "^0.9.29",
34
34
  "x-group-list": "^0.4.12",
35
- "x-runtime-lib": "^0.8.223",
35
+ "x-runtime-lib": "^0.9.0",
36
36
  "x-state-lib": "^0.3.42"
37
37
  },
38
38
  "devDependencies": {