x-prop-tree 0.3.10 → 0.4.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.
@@ -4,19 +4,9 @@ interface Props {
4
4
  config?: ZProp[];
5
5
  object?: object;
6
6
  }
7
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
8
  change: (...args: any[]) => void;
9
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>> & {
9
+ }, string, import("vue").PublicProps, Readonly<Props & {
10
10
  onChange?: ((...args: any[]) => any) | undefined;
11
- }, {}, {}>;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}>;
12
12
  export default _default;
13
-
14
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
15
- type __VLS_TypePropsToOption<T> = {
16
- [K in keyof T]-?: {} extends Pick<T, K> ? {
17
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
18
- } : {
19
- type: import('vue').PropType<T[K]>;
20
- required: true;
21
- };
22
- };
@@ -9,44 +9,17 @@ declare let __VLS_typeProps: Props;
9
9
  type __VLS_PublicProps = {
10
10
  modelValue?: number;
11
11
  } & typeof __VLS_typeProps;
12
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
13
- min: number;
14
- max: number;
15
- precision: number;
16
- step: number;
17
- readonly: boolean;
18
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
- "update:modelValue": (modelValue: number) => void;
20
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
21
- min: number;
22
- max: number;
23
- precision: number;
24
- step: number;
25
- readonly: boolean;
26
- }>>> & {
12
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ 'update:modelValue': (modelValue: number) => any;
14
+ }, string, import("vue").PublicProps, Readonly<{
15
+ modelValue?: number;
16
+ } & Props & {
27
17
  "onUpdate:modelValue"?: ((modelValue: number) => any) | undefined;
28
- }, {
18
+ }>, {
29
19
  min: number;
30
20
  max: number;
31
21
  precision: number;
32
22
  step: number;
33
23
  readonly: boolean;
34
- }, {}>;
24
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}>;
35
25
  export default _default;
36
- type __VLS_WithDefaults<P, D> = {
37
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
38
- default: D[K];
39
- }> : P[K];
40
- };
41
- type __VLS_Prettify<T> = {
42
- [K in keyof T]: T[K];
43
- } & {};
44
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
45
- type __VLS_TypePropsToOption<T> = {
46
- [K in keyof T]-?: {} extends Pick<T, K> ? {
47
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
48
- } : {
49
- type: import('vue').PropType<T[K]>;
50
- required: true;
51
- };
52
- };
@@ -6,37 +6,14 @@ declare let __VLS_typeProps: Props;
6
6
  type __VLS_PublicProps = {
7
7
  modelValue?: string;
8
8
  } & typeof __VLS_typeProps;
9
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
10
- readonly: boolean;
11
- hasDelete: boolean;
12
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- "update:modelValue": (modelValue: string) => void;
9
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
10
  delete: (...args: any[]) => void;
15
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
16
- readonly: boolean;
17
- hasDelete: boolean;
18
- }>>> & {
19
- "onUpdate:modelValue"?: ((modelValue: string) => any) | undefined;
11
+ }, string, import("vue").PublicProps, Readonly<{
12
+ modelValue?: string;
13
+ } & Props & {
20
14
  onDelete?: ((...args: any[]) => any) | undefined;
21
- }, {
15
+ }>, {
22
16
  readonly: boolean;
23
17
  hasDelete: boolean;
24
- }, {}>;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}>;
25
19
  export default _default;
26
- type __VLS_WithDefaults<P, D> = {
27
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
28
- default: D[K];
29
- }> : P[K];
30
- };
31
- type __VLS_Prettify<T> = {
32
- [K in keyof T]: T[K];
33
- } & {};
34
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
35
- type __VLS_TypePropsToOption<T> = {
36
- [K in keyof T]-?: {} extends Pick<T, K> ? {
37
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
38
- } : {
39
- type: import('vue').PropType<T[K]>;
40
- required: true;
41
- };
42
- };
@@ -5,42 +5,17 @@ interface Props {
5
5
  hasDelete?: boolean;
6
6
  index?: number;
7
7
  }
8
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
9
- hasCreate: boolean;
10
- hasDelete: boolean;
11
- index: number;
12
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
9
  delete: (...args: any[]) => void;
14
10
  collapse: (...args: any[]) => void;
15
11
  create: (...args: any[]) => void;
16
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
17
- hasCreate: boolean;
18
- hasDelete: boolean;
19
- index: number;
20
- }>>> & {
12
+ }, string, import("vue").PublicProps, Readonly<Props & {
21
13
  onDelete?: ((...args: any[]) => any) | undefined;
22
14
  onCollapse?: ((...args: any[]) => any) | undefined;
23
15
  onCreate?: ((...args: any[]) => any) | undefined;
24
- }, {
16
+ }>, {
25
17
  index: number;
26
18
  hasDelete: boolean;
27
19
  hasCreate: boolean;
28
- }, {}>;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}>;
29
21
  export default _default;
30
- type __VLS_WithDefaults<P, D> = {
31
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
32
- default: D[K];
33
- }> : P[K];
34
- };
35
- type __VLS_Prettify<T> = {
36
- [K in keyof T]: T[K];
37
- } & {};
38
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
39
- type __VLS_TypePropsToOption<T> = {
40
- [K in keyof T]-?: {} extends Pick<T, K> ? {
41
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
42
- } : {
43
- type: import('vue').PropType<T[K]>;
44
- required: true;
45
- };
46
- };
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.id="x-prop-tree",e.appendChild(document.createTextNode('.v-icon{--v-icon-size-multiplier: 1;align-items:center;display:inline-flex;font-feature-settings:"liga";height:1em;justify-content:center;letter-spacing:normal;line-height:1;position:relative;text-indent:0;text-align:center;-webkit-user-select:none;user-select:none;vertical-align:middle;width:1em;min-width:1em}.v-icon--clickable{cursor:pointer}.v-icon--disabled{pointer-events:none;opacity:.38}.v-icon--size-x-small{font-size:calc(var(--v-icon-size-multiplier) * 1em)}.v-icon--size-small{font-size:calc(var(--v-icon-size-multiplier) * 1.25em)}.v-icon--size-default{font-size:calc(var(--v-icon-size-multiplier) * 1.5em)}.v-icon--size-large{font-size:calc(var(--v-icon-size-multiplier) * 1.75em)}.v-icon--size-x-large{font-size:calc(var(--v-icon-size-multiplier) * 2em)}.v-icon__svg{fill:currentColor;width:100%;height:100%}.v-icon--start{margin-inline-end:8px}.v-icon--end{margin-inline-start:8px}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
2
- import { Fragment as Ae, reactive as ve, computed as k, watchEffect as Ce, toRefs as De, warn as Le, getCurrentInstance as Me, inject as Q, shallowRef as Te, provide as ke, defineComponent as M, isRef as ze, createVNode as C, mergeProps as Re, unref as W, ref as I, toRef as Pe, Text as He, mergeModels as Y, useModel as xe, resolveComponent as G, openBlock as p, createElementBlock as be, normalizeStyle as Ve, createBlock as U, resolveDirective as Ne, withDirectives as Oe, createElementVNode as Ee, toDisplayString as We, withModifiers as j, createCommentVNode as ee, h as y } from "vue";
2
+ import { Fragment as De, reactive as ve, computed as k, watchEffect as Ce, toRefs as Ae, warn as Le, getCurrentInstance as Me, inject as Q, shallowRef as Te, provide as ke, defineComponent as M, isRef as Pe, createVNode as C, mergeProps as ze, unref as W, ref as I, toRef as Re, Text as He, mergeModels as Y, useModel as xe, resolveComponent as G, openBlock as _, createElementBlock as be, normalizeStyle as Ve, createBlock as U, resolveDirective as Oe, withDirectives as Ne, createElementVNode as Ee, toDisplayString as We, withModifiers as j, createCommentVNode as ee, h as y } from "vue";
3
3
  import { useI18n as Ge } from "vue-i18n";
4
4
  import { useColor as Ue } from "x-essential-lib";
5
- import { getPropDefault as N } from "x-runtime-lib";
5
+ import { getPropDefault as O } from "x-runtime-lib";
6
6
  var qe = "M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z", Ze = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z", Xe = "M19,13H5V11H19V13Z", Ye = "M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z";
7
- function w(e, t) {
7
+ function p(e, t) {
8
8
  return (n) => Object.keys(e).reduce((s, a) => {
9
9
  const u = typeof e[a] == "object" && e[a] != null && !Array.isArray(e[a]) ? e[a] : {
10
10
  type: e[a]
@@ -15,20 +15,21 @@ function w(e, t) {
15
15
  } : s[a] = u, t && !s[a].source && (s[a].source = t), s;
16
16
  }, {});
17
17
  }
18
- const Ke = w({
18
+ const Ke = p({
19
19
  class: [String, Array, Object],
20
20
  style: {
21
21
  type: [String, Array, Object],
22
22
  default: null
23
23
  }
24
24
  }, "component");
25
- function A(e) {
25
+ function D(e) {
26
26
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "px";
27
27
  if (!(e == null || e === ""))
28
28
  return isNaN(+e) ? String(e) : isFinite(+e) ? `${Number(e)}${t}` : void 0;
29
29
  }
30
30
  function te(e) {
31
- return e !== null && typeof e == "object" && !Array.isArray(e);
31
+ let t;
32
+ return e !== null && typeof e == "object" && ((t = Object.getPrototypeOf(e)) === Object.prototype || t === null);
32
33
  }
33
34
  function X(e, t) {
34
35
  return t.every((n) => e.hasOwnProperty(n));
@@ -57,21 +58,21 @@ function Se() {
57
58
  for (const a in e)
58
59
  s[a] = e[a];
59
60
  for (const a in t) {
60
- const r = e[a], u = t[a];
61
- if (te(r) && te(u)) {
62
- s[a] = Se(r, u, n);
61
+ const i = e[a], u = t[a];
62
+ if (te(i) && te(u)) {
63
+ s[a] = Se(i, u, n);
63
64
  continue;
64
65
  }
65
- if (Array.isArray(r) && Array.isArray(u) && n) {
66
- s[a] = n(r, u);
66
+ if (n && Array.isArray(i) && Array.isArray(u)) {
67
+ s[a] = n(i, u);
67
68
  continue;
68
69
  }
69
70
  s[a] = u;
70
71
  }
71
72
  return s;
72
73
  }
73
- function we(e) {
74
- return e.map((t) => t.type === Ae ? we(t.children) : t).flat();
74
+ function pe(e) {
75
+ return e.map((t) => t.type === De ? pe(t.children) : t).flat();
75
76
  }
76
77
  function F() {
77
78
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
@@ -80,40 +81,40 @@ function F() {
80
81
  return F.cache.set(e, t), t;
81
82
  }
82
83
  F.cache = /* @__PURE__ */ new Map();
83
- function _e(e) {
84
+ function we(e) {
84
85
  const t = ve({}), n = k(e);
85
86
  return Ce(() => {
86
87
  for (const s in n.value)
87
88
  t[s] = n.value[s];
88
89
  }, {
89
90
  flush: "sync"
90
- }), De(t);
91
+ }), Ae(t);
91
92
  }
92
93
  function je(e, t) {
93
94
  return e.includes(t);
94
95
  }
95
- const _ = 2.4, se = 0.2126729, ae = 0.7151522, le = 0.072175, et = 0.55, tt = 0.58, nt = 0.57, st = 0.62, O = 0.03, re = 1.45, at = 5e-4, lt = 1.25, rt = 1.25, ie = 0.078, ue = 12.82051282051282, E = 0.06, oe = 1e-3;
96
+ const w = 2.4, se = 0.2126729, ae = 0.7151522, le = 0.072175, et = 0.55, tt = 0.58, nt = 0.57, st = 0.62, N = 0.03, ie = 1.45, at = 5e-4, lt = 1.25, it = 1.25, re = 0.078, ue = 12.82051282051282, E = 0.06, oe = 1e-3;
96
97
  function ce(e, t) {
97
- const n = (e.r / 255) ** _, s = (e.g / 255) ** _, a = (e.b / 255) ** _, r = (t.r / 255) ** _, u = (t.g / 255) ** _, m = (t.b / 255) ** _;
98
- let o = n * se + s * ae + a * le, d = r * se + u * ae + m * le;
99
- if (o <= O && (o += (O - o) ** re), d <= O && (d += (O - d) ** re), Math.abs(d - o) < at) return 0;
98
+ const n = (e.r / 255) ** w, s = (e.g / 255) ** w, a = (e.b / 255) ** w, i = (t.r / 255) ** w, u = (t.g / 255) ** w, m = (t.b / 255) ** w;
99
+ let o = n * se + s * ae + a * le, d = i * se + u * ae + m * le;
100
+ if (o <= N && (o += (N - o) ** ie), d <= N && (d += (N - d) ** ie), Math.abs(d - o) < at) return 0;
100
101
  let h;
101
102
  if (d > o) {
102
103
  const g = (d ** et - o ** tt) * lt;
103
- h = g < oe ? 0 : g < ie ? g - g * ue * E : g - E;
104
+ h = g < oe ? 0 : g < re ? g - g * ue * E : g - E;
104
105
  } else {
105
- const g = (d ** st - o ** nt) * rt;
106
- h = g > -oe ? 0 : g > -ie ? g - g * ue * E : g + E;
106
+ const g = (d ** st - o ** nt) * it;
107
+ h = g > -oe ? 0 : g > -re ? g - g * ue * E : g + E;
107
108
  }
108
109
  return h * 100;
109
110
  }
110
- function D(e) {
111
+ function A(e) {
111
112
  Le(`Vuetify: ${e}`);
112
113
  }
113
114
  function K(e) {
114
115
  return !!e && /^(#|var\(--|(rgb|hsl)a?\()/.test(e);
115
116
  }
116
- function it(e) {
117
+ function rt(e) {
117
118
  return K(e) && !/^((rgb|hsl)a?\()?var\(--/.test(e);
118
119
  }
119
120
  const fe = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/, ut = {
@@ -156,7 +157,7 @@ const fe = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/, ut = {
156
157
  };
157
158
  function $(e) {
158
159
  if (typeof e == "number")
159
- return (isNaN(e) || e < 0 || e > 16777215) && D(`'${e}' is not a valid hex color`), {
160
+ return (isNaN(e) || e < 0 || e > 16777215) && A(`'${e}' is not a valid hex color`), {
160
161
  r: (e & 16711680) >> 16,
161
162
  g: (e & 65280) >> 8,
162
163
  b: e & 255
@@ -167,18 +168,18 @@ function $(e) {
167
168
  } = e.match(fe), {
168
169
  fn: n,
169
170
  values: s
170
- } = t, a = s.split(/,\s*/).map((r) => r.endsWith("%") && ["hsl", "hsla", "hsv", "hsva"].includes(n) ? parseFloat(r) / 100 : parseFloat(r));
171
+ } = t, a = s.split(/,\s*/).map((i) => i.endsWith("%") && ["hsl", "hsla", "hsv", "hsva"].includes(n) ? parseFloat(i) / 100 : parseFloat(i));
171
172
  return ut[n](...a);
172
173
  } else if (typeof e == "string") {
173
174
  let t = e.startsWith("#") ? e.slice(1) : e;
174
- [3, 4].includes(t.length) ? t = t.split("").map((s) => s + s).join("") : [6, 8].includes(t.length) || D(`'${e}' is not a valid hex(a) color`);
175
+ [3, 4].includes(t.length) ? t = t.split("").map((s) => s + s).join("") : [6, 8].includes(t.length) || A(`'${e}' is not a valid hex(a) color`);
175
176
  const n = parseInt(t, 16);
176
- return (isNaN(n) || n < 0 || n > 4294967295) && D(`'${e}' is not a valid hex(a) color`), ot(t);
177
+ return (isNaN(n) || n < 0 || n > 4294967295) && A(`'${e}' is not a valid hex(a) color`), ot(t);
177
178
  } else if (typeof e == "object") {
178
179
  if (X(e, ["r", "g", "b"]))
179
180
  return e;
180
181
  if (X(e, ["h", "s", "l"]))
181
- return L(pe(e));
182
+ return L(_e(e));
182
183
  if (X(e, ["h", "s", "v"]))
183
184
  return L(e);
184
185
  }
@@ -191,10 +192,10 @@ function L(e) {
191
192
  s: n,
192
193
  v: s,
193
194
  a
194
- } = e, r = (m) => {
195
+ } = e, i = (m) => {
195
196
  const o = (m + t / 60) % 6;
196
197
  return s - s * n * Math.max(Math.min(o, 4 - o, 1), 0);
197
- }, u = [r(5), r(3), r(1)].map((m) => Math.round(m * 255));
198
+ }, u = [i(5), i(3), i(1)].map((m) => Math.round(m * 255));
198
199
  return {
199
200
  r: u[0],
200
201
  g: u[1],
@@ -203,25 +204,25 @@ function L(e) {
203
204
  };
204
205
  }
205
206
  function de(e) {
206
- return L(pe(e));
207
+ return L(_e(e));
207
208
  }
208
- function pe(e) {
209
+ function _e(e) {
209
210
  const {
210
211
  h: t,
211
212
  s: n,
212
213
  l: s,
213
214
  a
214
- } = e, r = s + n * Math.min(s, 1 - s), u = r === 0 ? 0 : 2 - 2 * s / r;
215
+ } = e, i = s + n * Math.min(s, 1 - s), u = i === 0 ? 0 : 2 - 2 * s / i;
215
216
  return {
216
217
  h: t,
217
218
  s: u,
218
- v: r,
219
+ v: i,
219
220
  a
220
221
  };
221
222
  }
222
223
  function ot(e) {
223
224
  e = ct(e);
224
- let [t, n, s, a] = Qe(e, 2).map((r) => parseInt(r, 16));
225
+ let [t, n, s, a] = Qe(e, 2).map((i) => parseInt(i, 16));
225
226
  return a = a === void 0 ? a : a / 255, {
226
227
  r: t,
227
228
  g: n,
@@ -273,11 +274,11 @@ function yt() {
273
274
  const a = k(() => {
274
275
  var o;
275
276
  return (o = n.value) == null ? void 0 : o[e._as ?? t];
276
- }), r = new Proxy(e, {
277
+ }), i = new Proxy(e, {
277
278
  get(o, d) {
278
- var g, V, S, b, z, R, c;
279
+ var g, V, S, b, P, z, c;
279
280
  const h = Reflect.get(o, d);
280
- return d === "class" || d === "style" ? [(g = a.value) == null ? void 0 : g[d], h].filter((l) => l != null) : typeof d == "string" && !gt(s.vnode, d) ? ((V = a.value) == null ? void 0 : V[d]) !== void 0 ? (S = a.value) == null ? void 0 : S[d] : ((z = (b = n.value) == null ? void 0 : b.global) == null ? void 0 : z[d]) !== void 0 ? (c = (R = n.value) == null ? void 0 : R.global) == null ? void 0 : c[d] : h : h;
281
+ return d === "class" || d === "style" ? [(g = a.value) == null ? void 0 : g[d], h].filter((l) => l != null) : typeof d == "string" && !gt(s.vnode, d) ? ((V = a.value) == null ? void 0 : V[d]) !== void 0 ? (S = a.value) == null ? void 0 : S[d] : ((P = (b = n.value) == null ? void 0 : b.global) == null ? void 0 : P[d]) !== void 0 ? (c = (z = n.value) == null ? void 0 : z.global) == null ? void 0 : c[d] : h : h;
281
282
  }
282
283
  }), u = Te();
283
284
  Ce(() => {
@@ -295,25 +296,25 @@ function yt() {
295
296
  ke(J, k(() => u.value ? Se((o == null ? void 0 : o.value) ?? {}, u.value) : o == null ? void 0 : o.value));
296
297
  }
297
298
  return {
298
- props: r,
299
+ props: i,
299
300
  provideSubDefaults: m
300
301
  };
301
302
  }
302
303
  function q(e) {
303
304
  if (e._setup = e._setup ?? e.setup, !e.name)
304
- return D("The component is missing an explicit name, unable to generate default prop value"), e;
305
+ return A("The component is missing an explicit name, unable to generate default prop value"), e;
305
306
  if (e._setup) {
306
- e.props = w(e.props ?? {}, e.name)();
307
+ e.props = p(e.props ?? {}, e.name)();
307
308
  const t = Object.keys(e.props).filter((n) => n !== "class" && n !== "style");
308
309
  e.filterProps = function(s) {
309
310
  return Je(s, t);
310
311
  }, e.props._as = String, e.setup = function(s, a) {
311
- const r = Fe();
312
- if (!r.value) return e._setup(s, a);
312
+ const i = Fe();
313
+ if (!i.value) return e._setup(s, a);
313
314
  const {
314
315
  props: u,
315
316
  provideSubDefaults: m
316
- } = yt(s, s._as ?? e.name, r), o = e._setup(u, a);
317
+ } = yt(s, s._as ?? e.name, i), o = e._setup(u, a);
317
318
  return m(), o;
318
319
  };
319
320
  }
@@ -327,33 +328,33 @@ function ht(e) {
327
328
  const t = T("useRender");
328
329
  t.render = e;
329
330
  }
330
- const me = Symbol.for("vuetify:theme"), vt = w({
331
+ const me = Symbol.for("vuetify:theme"), vt = p({
331
332
  theme: String
332
333
  }, "theme");
333
334
  function Ct(e) {
334
335
  T("provideTheme");
335
336
  const t = Q(me, null);
336
337
  if (!t) throw new Error("Could not find Vuetify theme injection");
337
- const n = k(() => e.theme ?? t.name.value), s = k(() => t.themes.value[n.value]), a = k(() => t.isDisabled ? void 0 : `v-theme--${n.value}`), r = {
338
+ const n = k(() => e.theme ?? t.name.value), s = k(() => t.themes.value[n.value]), a = k(() => t.isDisabled ? void 0 : `v-theme--${n.value}`), i = {
338
339
  ...t,
339
340
  name: n,
340
341
  current: s,
341
342
  themeClasses: a
342
343
  };
343
- return ke(me, r), r;
344
+ return ke(me, i), i;
344
345
  }
345
- const kt = w({
346
+ const kt = p({
346
347
  tag: {
347
348
  type: String,
348
349
  default: "div"
349
350
  }
350
351
  }, "tag");
351
352
  function xt(e) {
352
- return _e(() => {
353
+ return we(() => {
353
354
  const t = [], n = {};
354
355
  if (e.value.background)
355
356
  if (K(e.value.background)) {
356
- if (n.backgroundColor = e.value.background, !e.value.text && it(e.value.background)) {
357
+ if (n.backgroundColor = e.value.background, !e.value.text && rt(e.value.background)) {
357
358
  const s = $(e.value.background);
358
359
  if (s.a == null || s.a === 1) {
359
360
  const a = ft(s);
@@ -370,7 +371,7 @@ function xt(e) {
370
371
  }
371
372
  function bt(e, t) {
372
373
  const n = k(() => ({
373
- text: ze(e) ? e.value : null
374
+ text: Pe(e) ? e.value : null
374
375
  })), {
375
376
  colorClasses: s,
376
377
  colorStyles: a
@@ -380,7 +381,7 @@ function bt(e, t) {
380
381
  textColorStyles: a
381
382
  };
382
383
  }
383
- const Ie = [String, Function, Object, Array], Vt = Symbol.for("vuetify:icons"), Z = w({
384
+ const Ie = [String, Function, Object, Array], Vt = Symbol.for("vuetify:icons"), Z = p({
384
385
  icon: {
385
386
  type: Ie
386
387
  },
@@ -414,7 +415,7 @@ const Ie = [String, Function, Object, Array], Vt = Symbol.for("vuetify:icons"),
414
415
  let {
415
416
  attrs: n
416
417
  } = t;
417
- return () => C(e.tag, Re(n, {
418
+ return () => C(e.tag, ze(n, {
418
419
  style: null
419
420
  }), {
420
421
  default: () => [C("svg", {
@@ -452,7 +453,7 @@ q({
452
453
  }, null);
453
454
  }
454
455
  });
455
- const wt = (e) => {
456
+ const pt = (e) => {
456
457
  const t = Q(Vt);
457
458
  if (!t) throw new Error("Missing Vuetify Icons provide!");
458
459
  return {
@@ -463,7 +464,7 @@ const wt = (e) => {
463
464
  component: ge
464
465
  };
465
466
  let a = s;
466
- if (typeof a == "string" && (a = a.trim(), a.startsWith("$") && (a = (o = t.aliases) == null ? void 0 : o[a.slice(1)])), a || D(`Could not find aliased icon "${s}"`), Array.isArray(a))
467
+ if (typeof a == "string" && (a = a.trim(), a.startsWith("$") && (a = (o = t.aliases) == null ? void 0 : o[a.slice(1)])), a || A(`Could not find aliased icon "${s}"`), Array.isArray(a))
467
468
  return {
468
469
  component: St,
469
470
  icon: a
@@ -473,14 +474,14 @@ const wt = (e) => {
473
474
  component: ge,
474
475
  icon: a
475
476
  };
476
- const r = Object.keys(t.sets).find((d) => typeof a == "string" && a.startsWith(`${d}:`)), u = r ? a.slice(r.length + 1) : a;
477
+ const i = Object.keys(t.sets).find((d) => typeof a == "string" && a.startsWith(`${d}:`)), u = i ? a.slice(i.length + 1) : a;
477
478
  return {
478
- component: t.sets[r ?? t.defaultSet].component,
479
+ component: t.sets[i ?? t.defaultSet].component,
479
480
  icon: u
480
481
  };
481
482
  })
482
483
  };
483
- }, _t = ["x-small", "small", "default", "large", "x-large"], pt = w({
484
+ }, wt = ["x-small", "small", "default", "large", "x-large"], _t = p({
484
485
  size: {
485
486
  type: [String, Number],
486
487
  default: "default"
@@ -488,25 +489,25 @@ const wt = (e) => {
488
489
  }, "size");
489
490
  function Ft(e) {
490
491
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : dt();
491
- return _e(() => {
492
+ return we(() => {
492
493
  let n, s;
493
- return je(_t, e.size) ? n = `${t}--size-${e.size}` : e.size && (s = {
494
- width: A(e.size),
495
- height: A(e.size)
494
+ return je(wt, e.size) ? n = `${t}--size-${e.size}` : e.size && (s = {
495
+ width: D(e.size),
496
+ height: D(e.size)
496
497
  }), {
497
498
  sizeClasses: n,
498
499
  sizeStyles: s
499
500
  };
500
501
  });
501
502
  }
502
- const Bt = w({
503
+ const Bt = p({
503
504
  color: String,
504
505
  disabled: Boolean,
505
506
  start: Boolean,
506
507
  end: Boolean,
507
508
  icon: Ie,
508
509
  ...Ke(),
509
- ...pt(),
510
+ ..._t(),
510
511
  ...kt({
511
512
  tag: "i"
512
513
  }),
@@ -520,33 +521,33 @@ const Bt = w({
520
521
  slots: s
521
522
  } = t;
522
523
  const a = I(), {
523
- themeClasses: r
524
+ themeClasses: i
524
525
  } = Ct(e), {
525
526
  iconData: u
526
- } = wt(k(() => a.value || e.icon)), {
527
+ } = pt(k(() => a.value || e.icon)), {
527
528
  sizeClasses: m
528
529
  } = Ft(e), {
529
530
  textColorClasses: o,
530
531
  textColorStyles: d
531
- } = bt(Pe(e, "color"));
532
+ } = bt(Re(e, "color"));
532
533
  return ht(() => {
533
534
  var V, S;
534
535
  const h = (V = s.default) == null ? void 0 : V.call(s);
535
- h && (a.value = (S = we(h).filter((b) => b.type === He && b.children && typeof b.children == "string")[0]) == null ? void 0 : S.children);
536
+ h && (a.value = (S = pe(h).filter((b) => b.type === He && b.children && typeof b.children == "string")[0]) == null ? void 0 : S.children);
536
537
  const g = !!(n.onClick || n.onClickOnce);
537
538
  return C(u.value.component, {
538
539
  tag: e.tag,
539
540
  icon: u.value.icon,
540
- class: ["v-icon", "notranslate", r.value, m.value, o.value, {
541
+ class: ["v-icon", "notranslate", i.value, m.value, o.value, {
541
542
  "v-icon--clickable": g,
542
543
  "v-icon--disabled": e.disabled,
543
544
  "v-icon--start": e.start,
544
545
  "v-icon--end": e.end
545
546
  }, e.class],
546
547
  style: [m.value ? void 0 : {
547
- fontSize: A(e.size),
548
- height: A(e.size),
549
- width: A(e.size)
548
+ fontSize: D(e.size),
549
+ height: D(e.size),
550
+ width: D(e.size)
550
551
  }, d.value, e.style],
551
552
  role: g ? "button" : void 0,
552
553
  "aria-hidden": !g,
@@ -573,9 +574,9 @@ const Bt = w({
573
574
  const t = xe(e, "modelValue"), n = e, s = k(() => ({
574
575
  width: "250px"
575
576
  }));
576
- return (a, r) => {
577
+ return (a, i) => {
577
578
  const u = G("v-text-field");
578
- return p(), be("div", {
579
+ return _(), be("div", {
579
580
  style: Ve(s.value)
580
581
  }, [
581
582
  C(u, {
@@ -601,9 +602,9 @@ const Bt = w({
601
602
  emits: /* @__PURE__ */ Y(["delete"], ["update:modelValue"]),
602
603
  setup(e, { emit: t }) {
603
604
  const n = xe(e, "modelValue"), s = e, a = t;
604
- return (r, u) => {
605
+ return (i, u) => {
605
606
  const m = G("v-text-field");
606
- return p(), U(m, {
607
+ return _(), U(m, {
607
608
  modelValue: n.value,
608
609
  "onUpdate:modelValue": u[0] || (u[0] = (o) => n.value = o),
609
610
  variant: "outlined",
@@ -630,9 +631,9 @@ const Bt = w({
630
631
  const n = e, s = t, a = k(() => ({
631
632
  height: "36px"
632
633
  }));
633
- return (r, u) => {
634
- const m = G("v-icon"), o = G("v-spacer"), d = Ne("ripple");
635
- return Oe((p(), be("div", {
634
+ return (i, u) => {
635
+ const m = G("v-icon"), o = G("v-spacer"), d = Oe("ripple");
636
+ return Ne((_(), be("div", {
636
637
  class: "d-flex align-center",
637
638
  style: Ve(a.value),
638
639
  onClick: u[2] || (u[2] = (h) => s("collapse", !n.collapse))
@@ -643,13 +644,13 @@ const Bt = w({
643
644
  }, null, 8, ["icon"]),
644
645
  Ee("span", null, We(n.title), 1),
645
646
  C(o),
646
- n.hasCreate ? (p(), U(m, {
647
+ n.hasCreate ? (_(), U(m, {
647
648
  key: 0,
648
649
  class: "ml-3",
649
650
  icon: "$plus",
650
651
  onClick: u[0] || (u[0] = j((h) => s("create"), ["stop"]))
651
652
  })) : ee("", !0),
652
- n.hasDelete ? (p(), U(m, {
653
+ n.hasDelete ? (_(), U(m, {
653
654
  key: 1,
654
655
  class: "ml-3",
655
656
  icon: "$sub",
@@ -660,7 +661,7 @@ const Bt = w({
660
661
  ]);
661
662
  };
662
663
  }
663
- }), At = /* @__PURE__ */ M({
664
+ }), Dt = /* @__PURE__ */ M({
664
665
  __name: "index",
665
666
  props: {
666
667
  unique: {},
@@ -669,12 +670,12 @@ const Bt = w({
669
670
  },
670
671
  emits: ["change"],
671
672
  setup(e, { emit: t }) {
672
- const { t: n } = Ge(), { backgroundColor2: s } = Ue(), a = e, r = t, u = I("20px"), m = I("56px"), o = I("10px"), d = I("250px"), h = ve({});
673
- function g(c, l, i, f) {
674
- return l.keyFlag || (c !== "" && (c += "."), c += l.key), l.children ? l.array ? V(c, l, i, f) : S(c, l, i, f) : l.array ? b(c, l, i) : z(c, l, i);
673
+ const { t: n } = Ge(), { backgroundColor2: s } = Ue(), a = e, i = t, u = I("20px"), m = I("56px"), o = I("10px"), d = I("250px"), h = ve({});
674
+ function g(c, l, r, f) {
675
+ return l.keyFlag || (c !== "" && (c += "."), c += l.key), l.children ? l.array ? V(c, l, r, f) : S(c, l, r, f) : l.array ? b(c, l, r) : P(c, l, r);
675
676
  }
676
- function V(c, l, i, f) {
677
- i[l.key] instanceof Array || (i[l.key] = [], r("change", c, i[l.key]));
677
+ function V(c, l, r, f) {
678
+ r[l.key] instanceof Array || (r[l.key] = [], i("change", c, r[l.key]));
678
679
  const B = y(he, {
679
680
  title: n(l.name),
680
681
  collapse: !!f.collapse,
@@ -682,7 +683,7 @@ const Bt = w({
682
683
  f.collapse = v;
683
684
  },
684
685
  onCreate: () => {
685
- i[l.key].push({}), r("change", c, i[l.key]);
686
+ r[l.key].push({}), i("change", c, r[l.key]);
686
687
  }
687
688
  }), x = y(
688
689
  "div",
@@ -693,7 +694,7 @@ const Bt = w({
693
694
  },
694
695
  (() => {
695
696
  f[l.key] instanceof Array || (f[l.key] = []);
696
- for (let v = 0; v < i[l.key].length; v++)
697
+ for (let v = 0; v < r[l.key].length; v++)
697
698
  typeof f[l.key][v] != "object" && (f[l.key][v] = {
698
699
  collapse: !0
699
700
  });
@@ -714,7 +715,7 @@ const Bt = w({
714
715
  })()
715
716
  );
716
717
  }
717
- function S(c, l, i, f) {
718
+ function S(c, l, r, f) {
718
719
  const B = y(he, {
719
720
  title: n(l.name),
720
721
  collapse: !!f.collapse,
@@ -729,16 +730,16 @@ const Bt = w({
729
730
  }
730
731
  },
731
732
  (() => {
732
- var P;
733
+ var R;
733
734
  const v = [];
734
- return (P = l.children) == null || P.forEach((H) => {
735
+ return (R = l.children) == null || R.forEach((H) => {
735
736
  typeof f[H.key] != "object" && (f[H.key] = {
736
737
  collapse: !0
737
738
  });
738
739
  const $e = g(
739
740
  c,
740
741
  H,
741
- l.keyFlag ? i : (typeof i[l.key] != "object" && (i[l.key] = {}, r("change", c, i[l.key])), i[l.key]),
742
+ l.keyFlag ? r : (typeof r[l.key] != "object" && (r[l.key] = {}, i("change", c, r[l.key])), r[l.key]),
742
743
  f[H.key]
743
744
  );
744
745
  v.push($e);
@@ -759,8 +760,8 @@ const Bt = w({
759
760
  })()
760
761
  );
761
762
  }
762
- function b(c, l, i) {
763
- if (i[l.key] instanceof Array || (i[l.key] = N(l), r("change", c, i[l.key])), l.ui === "strInput")
763
+ function b(c, l, r) {
764
+ if (r[l.key] instanceof Array || (r[l.key] = O(l), i("change", c, r[l.key])), l.ui === "strInput")
764
765
  return y(
765
766
  "div",
766
767
  {
@@ -789,7 +790,7 @@ const Bt = w({
789
790
  },
790
791
  (() => {
791
792
  const f = [];
792
- for (let x = 0; x < i[l.key].length; x++) {
793
+ for (let x = 0; x < r[l.key].length; x++) {
793
794
  const v = y(
794
795
  "div",
795
796
  {
@@ -804,13 +805,13 @@ const Bt = w({
804
805
  },
805
806
  [
806
807
  y(ye, {
807
- modelValue: i[l.key][x],
808
- "onUpdate:modelValue": (P) => {
809
- i[l.key][x] = P, r("change", c, i[l.key]);
808
+ modelValue: r[l.key][x],
809
+ "onUpdate:modelValue": (R) => {
810
+ r[l.key][x] = R, i("change", c, r[l.key]);
810
811
  },
811
812
  hasDelete: !0,
812
813
  onDelete: () => {
813
- i[l.key].splice(x, 1), r("change", c, i[l.key]);
814
+ r[l.key].splice(x, 1), i("change", c, r[l.key]);
814
815
  }
815
816
  })
816
817
  ]
@@ -835,7 +836,7 @@ const Bt = w({
835
836
  border: "thin dashed #bdbdbd"
836
837
  },
837
838
  onClick: () => {
838
- i[l.key].push(""), r("change", c, i[l.key]);
839
+ r[l.key].push(""), i("change", c, r[l.key]);
839
840
  }
840
841
  },
841
842
  [y(It, { icon: Ye })]
@@ -847,9 +848,9 @@ const Bt = w({
847
848
  );
848
849
  console.assert(!1);
849
850
  }
850
- function z(c, l, i) {
851
+ function P(c, l, r) {
851
852
  if (l.ui === "void")
852
- i[l.key] === void 0 && (console.assert(l.default !== void 0), i[l.key] = N(l), r("change", c, i[l.key]));
853
+ r[l.key] === void 0 && (console.assert(l.default !== void 0), r[l.key] = O(l), i("change", c, r[l.key]));
853
854
  else {
854
855
  if (l.ui === "strInput")
855
856
  return y(
@@ -881,9 +882,9 @@ const Bt = w({
881
882
  },
882
883
  [
883
884
  y(ye, {
884
- modelValue: l.static ? l.value : (typeof i[l.key] != "string" && (i[l.key] = N(l), r("change", c, i[l.key])), i[l.key]),
885
+ modelValue: l.static ? l.value : (typeof r[l.key] != "string" && (r[l.key] = O(l), i("change", c, r[l.key])), r[l.key]),
885
886
  "onUpdate:modelValue": (f) => {
886
- l.static || f !== i[l.key] && (i[l.key] = f, r("change", c, f));
887
+ l.static || f !== r[l.key] && (r[l.key] = f, i("change", c, f));
887
888
  },
888
889
  readonly: l.static || l.readonly
889
890
  })
@@ -921,9 +922,9 @@ const Bt = w({
921
922
  },
922
923
  [
923
924
  y($t, {
924
- modelValue: (typeof i[l.key] != "number" && (i[l.key] = N(l), r("change", c, i[l.key])), i[l.key]),
925
+ modelValue: (typeof r[l.key] != "number" && (r[l.key] = O(l), i("change", c, r[l.key])), r[l.key]),
925
926
  "onUpdate:modelValue": (f) => {
926
- f !== i[l.key] && (i[l.key] = f, r("change", c, f));
927
+ f !== r[l.key] && (r[l.key] = f, i("change", c, f));
927
928
  },
928
929
  readonly: l.readonly
929
930
  })
@@ -933,7 +934,7 @@ const Bt = w({
933
934
  );
934
935
  }
935
936
  }
936
- const R = () => y(
937
+ const z = () => y(
937
938
  "div",
938
939
  {
939
940
  class: {
@@ -945,19 +946,19 @@ const Bt = w({
945
946
  if (a.unique && a.config && a.object) {
946
947
  h[a.unique] || (h[a.unique] = {});
947
948
  const l = h[a.unique];
948
- a.config.forEach((i) => {
949
- const f = g("", i, a.object, l);
949
+ a.config.forEach((r) => {
950
+ const f = g("", r, a.object, l);
950
951
  c.push(f);
951
952
  });
952
953
  }
953
954
  return c;
954
955
  })()
955
956
  );
956
- return (c, l) => (p(), U(R));
957
+ return (c, l) => (_(), U(z));
957
958
  }
958
- }), Dt = (e) => {
959
- e.component("XPropTree", At);
960
- }, Rt = { install: Dt };
959
+ }), At = (e) => {
960
+ e.component("XPropTree", Dt);
961
+ }, zt = { install: At };
961
962
  export {
962
- Rt as default
963
+ zt as default
963
964
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-prop-tree",
3
3
  "private": false,
4
- "version": "0.3.10",
4
+ "version": "0.4.0",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -22,11 +22,11 @@
22
22
  "*": "prettier --write ."
23
23
  },
24
24
  "peerDependencies": {
25
- "vue": "^3.4.38",
25
+ "vue": "^3.5.0",
26
26
  "vue-i18n": "^9.14.0",
27
- "vuetify": "^3.7.0",
28
- "x-essential-lib": "^0.6.7",
29
- "x-runtime-lib": "^0.3.10"
27
+ "vuetify": "^3.7.1",
28
+ "x-essential-lib": "^0.7.0",
29
+ "x-runtime-lib": "^0.4.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@mdi/js": "^7.4.47",