x-prop-tree 0.3.2 → 0.3.4

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.
Files changed (2) hide show
  1. package/dist/index.js +204 -203
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,8 +1,9 @@
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 Ie, reactive as he, computed as C, watchEffect as ve, toRefs as Ae, warn as De, getCurrentInstance as Te, inject as J, shallowRef as ze, provide as ke, defineComponent as z, isRef as Re, createVNode as k, mergeProps as Me, unref as Pe, ref as B, toRef as Ne, Text as Oe, mergeModels as K, useModel as Ce, resolveComponent as W, openBlock as _, createElementBlock as xe, normalizeStyle as be, createBlock as G, resolveDirective as Ee, withDirectives as Le, createElementVNode as He, toDisplayString as We, withModifiers as Q, createCommentVNode as j, h as y } from "vue";
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 K, 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";
3
3
  import { useI18n as Ge } from "vue-i18n";
4
4
  import { useColor as Ue } from "x-essential-lib";
5
- import { getPropDefault as E } from "x-runtime-lib";
5
+ import { getPropDefault as N } from "x-runtime-lib";
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", Ye = "M19,13H5V11H19V13Z", Ke = "M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z";
6
7
  function w(e, t) {
7
8
  return (n) => Object.keys(e).reduce((s, a) => {
8
9
  const u = typeof e[a] == "object" && e[a] != null && !Array.isArray(e[a]) ? e[a] : {
@@ -14,7 +15,7 @@ function w(e, t) {
14
15
  } : s[a] = u, t && !s[a].source && (s[a].source = t), s;
15
16
  }, {});
16
17
  }
17
- const qe = w({
18
+ const Xe = w({
18
19
  class: [String, Array, Object],
19
20
  style: {
20
21
  type: [String, Array, Object],
@@ -26,23 +27,23 @@ function A(e) {
26
27
  if (!(e == null || e === ""))
27
28
  return isNaN(+e) ? String(e) : isFinite(+e) ? `${Number(e)}${t}` : void 0;
28
29
  }
29
- function ee(e) {
30
+ function te(e) {
30
31
  return e !== null && typeof e == "object" && !Array.isArray(e);
31
32
  }
32
33
  function Y(e, t) {
33
34
  return t.every((n) => e.hasOwnProperty(n));
34
35
  }
35
- function Ye(e, t) {
36
+ function Je(e, t) {
36
37
  const n = {}, s = new Set(Object.keys(e));
37
38
  for (const a of t)
38
39
  s.has(a) && (n[a] = e[a]);
39
40
  return n;
40
41
  }
41
- function te(e, t) {
42
+ function ne(e, t) {
42
43
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "0";
43
44
  return e + n.repeat(Math.max(0, t - e.length));
44
45
  }
45
- function Ke(e) {
46
+ function Qe(e) {
46
47
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
47
48
  const n = [];
48
49
  let s = 0;
@@ -57,7 +58,7 @@ function Se() {
57
58
  s[a] = e[a];
58
59
  for (const a in t) {
59
60
  const r = e[a], u = t[a];
60
- if (ee(r) && ee(u)) {
61
+ if (te(r) && te(u)) {
61
62
  s[a] = Se(r, u, n);
62
63
  continue;
63
64
  }
@@ -69,8 +70,8 @@ function Se() {
69
70
  }
70
71
  return s;
71
72
  }
72
- function Ve(e) {
73
- return e.map((t) => t.type === Ie ? Ve(t.children) : t).flat();
73
+ function we(e) {
74
+ return e.map((t) => t.type === Ae ? we(t.children) : t).flat();
74
75
  }
75
76
  function F() {
76
77
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
@@ -80,44 +81,44 @@ function F() {
80
81
  return F.cache.set(e, t), t;
81
82
  }
82
83
  F.cache = /* @__PURE__ */ new Map();
83
- function we(e) {
84
- const t = he({}), n = C(e);
85
- return ve(() => {
84
+ function _e(e) {
85
+ const t = ve({}), n = k(e);
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
- }), Ae(t);
91
+ }), De(t);
91
92
  }
92
- function Xe(e, t) {
93
+ function je(e, t) {
93
94
  return e.includes(t);
94
95
  }
95
- const p = 2.4, ne = 0.2126729, se = 0.7151522, ae = 0.072175, Ze = 0.55, Je = 0.58, Qe = 0.57, je = 0.62, L = 0.03, le = 1.45, et = 5e-4, tt = 1.25, nt = 1.25, re = 0.078, ie = 12.82051282051282, H = 0.06, ue = 1e-3;
96
- function oe(e, t) {
97
- const n = (e.r / 255) ** p, s = (e.g / 255) ** p, a = (e.b / 255) ** p, r = (t.r / 255) ** p, u = (t.g / 255) ** p, m = (t.b / 255) ** p;
98
- let o = n * ne + s * se + a * ae, f = r * ne + u * se + m * ae;
99
- if (o <= L && (o += (L - o) ** le), f <= L && (f += (L - f) ** le), Math.abs(f - o) < et)
96
+ 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;
97
+ function ce(e, t) {
98
+ 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) ** _;
99
+ let o = n * se + s * ae + a * le, f = r * se + u * ae + m * le;
100
+ if (o <= O && (o += (O - o) ** re), f <= O && (f += (O - f) ** re), Math.abs(f - o) < at)
100
101
  return 0;
101
102
  let h;
102
103
  if (f > o) {
103
- const g = (f ** Ze - o ** Je) * tt;
104
- h = g < ue ? 0 : g < re ? g - g * ie * H : g - H;
104
+ const g = (f ** et - o ** tt) * lt;
105
+ h = g < oe ? 0 : g < ie ? g - g * ue * E : g - E;
105
106
  } else {
106
- const g = (f ** je - o ** Qe) * nt;
107
- h = g > -ue ? 0 : g > -re ? g - g * ie * H : g + H;
107
+ const g = (f ** st - o ** nt) * rt;
108
+ h = g > -oe ? 0 : g > -ie ? g - g * ue * E : g + E;
108
109
  }
109
110
  return h * 100;
110
111
  }
111
112
  function D(e) {
112
- De(`Vuetify: ${e}`);
113
+ Le(`Vuetify: ${e}`);
113
114
  }
114
115
  function X(e) {
115
116
  return !!e && /^(#|var\(--|(rgb|hsl)a?\()/.test(e);
116
117
  }
117
- function st(e) {
118
+ function it(e) {
118
119
  return X(e) && !/^((rgb|hsl)a?\()?var\(--/.test(e);
119
120
  }
120
- const ce = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/, at = {
121
+ const fe = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/, ut = {
121
122
  rgb: (e, t, n, s) => ({
122
123
  r: e,
123
124
  g: t,
@@ -130,63 +131,63 @@ const ce = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/, at = {
130
131
  b: n,
131
132
  a: s
132
133
  }),
133
- hsl: (e, t, n, s) => fe({
134
+ hsl: (e, t, n, s) => de({
134
135
  h: e,
135
136
  s: t,
136
137
  l: n,
137
138
  a: s
138
139
  }),
139
- hsla: (e, t, n, s) => fe({
140
+ hsla: (e, t, n, s) => de({
140
141
  h: e,
141
142
  s: t,
142
143
  l: n,
143
144
  a: s
144
145
  }),
145
- hsv: (e, t, n, s) => T({
146
+ hsv: (e, t, n, s) => L({
146
147
  h: e,
147
148
  s: t,
148
149
  v: n,
149
150
  a: s
150
151
  }),
151
- hsva: (e, t, n, s) => T({
152
+ hsva: (e, t, n, s) => L({
152
153
  h: e,
153
154
  s: t,
154
155
  v: n,
155
156
  a: s
156
157
  })
157
158
  };
158
- function I(e) {
159
+ function $(e) {
159
160
  if (typeof e == "number")
160
161
  return (isNaN(e) || e < 0 || e > 16777215) && D(`'${e}' is not a valid hex color`), {
161
162
  r: (e & 16711680) >> 16,
162
163
  g: (e & 65280) >> 8,
163
164
  b: e & 255
164
165
  };
165
- if (typeof e == "string" && ce.test(e)) {
166
+ if (typeof e == "string" && fe.test(e)) {
166
167
  const {
167
168
  groups: t
168
- } = e.match(ce), {
169
+ } = e.match(fe), {
169
170
  fn: n,
170
171
  values: s
171
172
  } = t, a = s.split(/,\s*/).map((r) => r.endsWith("%") && ["hsl", "hsla", "hsv", "hsva"].includes(n) ? parseFloat(r) / 100 : parseFloat(r));
172
- return at[n](...a);
173
+ return ut[n](...a);
173
174
  } else if (typeof e == "string") {
174
175
  let t = e.startsWith("#") ? e.slice(1) : e;
175
176
  [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`);
176
177
  const n = parseInt(t, 16);
177
- return (isNaN(n) || n < 0 || n > 4294967295) && D(`'${e}' is not a valid hex(a) color`), lt(t);
178
+ return (isNaN(n) || n < 0 || n > 4294967295) && D(`'${e}' is not a valid hex(a) color`), ot(t);
178
179
  } else if (typeof e == "object") {
179
180
  if (Y(e, ["r", "g", "b"]))
180
181
  return e;
181
182
  if (Y(e, ["h", "s", "l"]))
182
- return T(pe(e));
183
+ return L(pe(e));
183
184
  if (Y(e, ["h", "s", "v"]))
184
- return T(e);
185
+ return L(e);
185
186
  }
186
187
  throw new TypeError(`Invalid color: ${e == null ? e : String(e) || e.constructor.name}
187
188
  Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`);
188
189
  }
189
- function T(e) {
190
+ function L(e) {
190
191
  const {
191
192
  h: t,
192
193
  s: n,
@@ -203,8 +204,8 @@ function T(e) {
203
204
  a
204
205
  };
205
206
  }
206
- function fe(e) {
207
- return T(pe(e));
207
+ function de(e) {
208
+ return L(pe(e));
208
209
  }
209
210
  function pe(e) {
210
211
  const {
@@ -220,9 +221,9 @@ function pe(e) {
220
221
  a
221
222
  };
222
223
  }
223
- function lt(e) {
224
- e = rt(e);
225
- let [t, n, s, a] = Ke(e, 2).map((r) => parseInt(r, 16));
224
+ function ot(e) {
225
+ e = ct(e);
226
+ let [t, n, s, a] = Qe(e, 2).map((r) => parseInt(r, 16));
226
227
  return a = a === void 0 ? a : a / 255, {
227
228
  r: t,
228
229
  g: n,
@@ -230,59 +231,59 @@ function lt(e) {
230
231
  a
231
232
  };
232
233
  }
233
- function rt(e) {
234
- return e.startsWith("#") && (e = e.slice(1)), e = e.replace(/([^0-9a-f])/gi, "F"), (e.length === 3 || e.length === 4) && (e = e.split("").map((t) => t + t).join("")), e.length !== 6 && (e = te(te(e, 6), 8, "F")), e;
234
+ function ct(e) {
235
+ return e.startsWith("#") && (e = e.slice(1)), e = e.replace(/([^0-9a-f])/gi, "F"), (e.length === 3 || e.length === 4) && (e = e.split("").map((t) => t + t).join("")), e.length !== 6 && (e = ne(ne(e, 6), 8, "F")), e;
235
236
  }
236
- function it(e) {
237
- const t = Math.abs(oe(I(0), I(e)));
238
- return Math.abs(oe(I(16777215), I(e))) > Math.min(t, 50) ? "#fff" : "#000";
237
+ function ft(e) {
238
+ const t = Math.abs(ce($(0), $(e)));
239
+ return Math.abs(ce($(16777215), $(e))) > Math.min(t, 50) ? "#fff" : "#000";
239
240
  }
240
- function R(e, t) {
241
- const n = Te();
241
+ function T(e, t) {
242
+ const n = Me();
242
243
  if (!n)
243
244
  throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);
244
245
  return n;
245
246
  }
246
- function ut() {
247
+ function dt() {
247
248
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "composables";
248
- const t = R(e).type;
249
+ const t = T(e).type;
249
250
  return F((t == null ? void 0 : t.aliasName) || (t == null ? void 0 : t.name));
250
251
  }
251
- function ot(e) {
252
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : R("injectSelf");
252
+ function mt(e) {
253
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : T("injectSelf");
253
254
  const {
254
255
  provides: n
255
256
  } = t;
256
257
  if (n && e in n)
257
258
  return n[e];
258
259
  }
259
- const Z = Symbol.for("vuetify:defaults");
260
- function _e() {
261
- const e = J(Z);
260
+ const J = Symbol.for("vuetify:defaults");
261
+ function Fe() {
262
+ const e = Q(J);
262
263
  if (!e)
263
264
  throw new Error("[Vuetify] Could not find defaults instance");
264
265
  return e;
265
266
  }
266
- function ct(e, t) {
267
+ function gt(e, t) {
267
268
  var n, s;
268
269
  return typeof ((n = e.props) == null ? void 0 : n[t]) < "u" || typeof ((s = e.props) == null ? void 0 : s[F(t)]) < "u";
269
270
  }
270
- function ft() {
271
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _e();
272
- const s = R("useDefaults");
271
+ function yt() {
272
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Fe();
273
+ const s = T("useDefaults");
273
274
  if (t = t ?? s.type.name ?? s.type.__name, !t)
274
275
  throw new Error("[Vuetify] Could not determine component name");
275
- const a = C(() => {
276
+ const a = k(() => {
276
277
  var o;
277
278
  return (o = n.value) == null ? void 0 : o[e._as ?? t];
278
279
  }), r = new Proxy(e, {
279
280
  get(o, f) {
280
- var g, S, V, b, M, P, d;
281
+ var g, V, S, b, z, R, d;
281
282
  const h = Reflect.get(o, f);
282
- return f === "class" || f === "style" ? [(g = a.value) == null ? void 0 : g[f], h].filter((l) => l != null) : typeof f == "string" && !ct(s.vnode, f) ? ((S = a.value) == null ? void 0 : S[f]) !== void 0 ? (V = a.value) == null ? void 0 : V[f] : ((M = (b = n.value) == null ? void 0 : b.global) == null ? void 0 : M[f]) !== void 0 ? (d = (P = n.value) == null ? void 0 : P.global) == null ? void 0 : d[f] : h : h;
283
+ return f === "class" || f === "style" ? [(g = a.value) == null ? void 0 : g[f], h].filter((l) => l != null) : typeof f == "string" && !gt(s.vnode, f) ? ((V = a.value) == null ? void 0 : V[f]) !== void 0 ? (S = a.value) == null ? void 0 : S[f] : ((z = (b = n.value) == null ? void 0 : b.global) == null ? void 0 : z[f]) !== void 0 ? (d = (R = n.value) == null ? void 0 : R.global) == null ? void 0 : d[f] : h : h;
283
284
  }
284
- }), u = ze();
285
- ve(() => {
285
+ }), u = Te();
286
+ Ce(() => {
286
287
  if (a.value) {
287
288
  const o = Object.entries(a.value).filter((f) => {
288
289
  let [h] = f;
@@ -293,74 +294,74 @@ function ft() {
293
294
  u.value = void 0;
294
295
  });
295
296
  function m() {
296
- const o = ot(Z, s);
297
- ke(Z, C(() => u.value ? Se((o == null ? void 0 : o.value) ?? {}, u.value) : o == null ? void 0 : o.value));
297
+ const o = mt(J, s);
298
+ ke(J, k(() => u.value ? Se((o == null ? void 0 : o.value) ?? {}, u.value) : o == null ? void 0 : o.value));
298
299
  }
299
300
  return {
300
301
  props: r,
301
302
  provideSubDefaults: m
302
303
  };
303
304
  }
304
- function U(e) {
305
+ function q(e) {
305
306
  if (e._setup = e._setup ?? e.setup, !e.name)
306
307
  return D("The component is missing an explicit name, unable to generate default prop value"), e;
307
308
  if (e._setup) {
308
309
  e.props = w(e.props ?? {}, e.name)();
309
310
  const t = Object.keys(e.props).filter((n) => n !== "class" && n !== "style");
310
311
  e.filterProps = function(s) {
311
- return Ye(s, t);
312
+ return Je(s, t);
312
313
  }, e.props._as = String, e.setup = function(s, a) {
313
- const r = _e();
314
+ const r = Fe();
314
315
  if (!r.value)
315
316
  return e._setup(s, a);
316
317
  const {
317
318
  props: u,
318
319
  provideSubDefaults: m
319
- } = ft(s, s._as ?? e.name, r), o = e._setup(u, a);
320
+ } = yt(s, s._as ?? e.name, r), o = e._setup(u, a);
320
321
  return m(), o;
321
322
  };
322
323
  }
323
324
  return e;
324
325
  }
325
- function Fe() {
326
+ function Be() {
326
327
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
327
- return (t) => (e ? U : z)(t);
328
+ return (t) => (e ? q : M)(t);
328
329
  }
329
- function dt(e) {
330
- const t = R("useRender");
330
+ function ht(e) {
331
+ const t = T("useRender");
331
332
  t.render = e;
332
333
  }
333
- const de = Symbol.for("vuetify:theme"), mt = w({
334
+ const me = Symbol.for("vuetify:theme"), vt = w({
334
335
  theme: String
335
336
  }, "theme");
336
- function gt(e) {
337
- R("provideTheme");
338
- const t = J(de, null);
337
+ function Ct(e) {
338
+ T("provideTheme");
339
+ const t = Q(me, null);
339
340
  if (!t)
340
341
  throw new Error("Could not find Vuetify theme injection");
341
- const n = C(() => e.theme ?? t.name.value), s = C(() => t.themes.value[n.value]), a = C(() => t.isDisabled ? void 0 : `v-theme--${n.value}`), r = {
342
+ 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 = {
342
343
  ...t,
343
344
  name: n,
344
345
  current: s,
345
346
  themeClasses: a
346
347
  };
347
- return ke(de, r), r;
348
+ return ke(me, r), r;
348
349
  }
349
- const yt = w({
350
+ const kt = w({
350
351
  tag: {
351
352
  type: String,
352
353
  default: "div"
353
354
  }
354
355
  }, "tag");
355
- function ht(e) {
356
- return we(() => {
356
+ function xt(e) {
357
+ return _e(() => {
357
358
  const t = [], n = {};
358
359
  if (e.value.background)
359
360
  if (X(e.value.background)) {
360
- if (n.backgroundColor = e.value.background, !e.value.text && st(e.value.background)) {
361
- const s = I(e.value.background);
361
+ if (n.backgroundColor = e.value.background, !e.value.text && it(e.value.background)) {
362
+ const s = $(e.value.background);
362
363
  if (s.a == null || s.a === 1) {
363
- const a = it(s);
364
+ const a = ft(s);
364
365
  n.color = a, n.caretColor = a;
365
366
  }
366
367
  }
@@ -372,111 +373,111 @@ function ht(e) {
372
373
  };
373
374
  });
374
375
  }
375
- function vt(e, t) {
376
- const n = C(() => ({
377
- text: Re(e) ? e.value : null
376
+ function bt(e, t) {
377
+ const n = k(() => ({
378
+ text: ze(e) ? e.value : null
378
379
  })), {
379
380
  colorClasses: s,
380
381
  colorStyles: a
381
- } = ht(n);
382
+ } = xt(n);
382
383
  return {
383
384
  textColorClasses: s,
384
385
  textColorStyles: a
385
386
  };
386
387
  }
387
- const $e = [String, Function, Object, Array], kt = Symbol.for("vuetify:icons"), q = w({
388
+ const Ie = [String, Function, Object, Array], Vt = Symbol.for("vuetify:icons"), Z = w({
388
389
  icon: {
389
- type: $e
390
+ type: Ie
390
391
  },
391
392
  // Could not remove this and use makeTagProps, types complained because it is not required
392
393
  tag: {
393
394
  type: String,
394
395
  required: !0
395
396
  }
396
- }, "icon"), me = Fe()({
397
+ }, "icon"), ge = Be()({
397
398
  name: "VComponentIcon",
398
- props: q(),
399
+ props: Z(),
399
400
  setup(e, t) {
400
401
  let {
401
402
  slots: n
402
403
  } = t;
403
404
  return () => {
404
405
  const s = e.icon;
405
- return k(e.tag, null, {
406
+ return C(e.tag, null, {
406
407
  default: () => {
407
408
  var a;
408
- return [e.icon ? k(s, null, null) : (a = n.default) == null ? void 0 : a.call(n)];
409
+ return [e.icon ? C(s, null, null) : (a = n.default) == null ? void 0 : a.call(n)];
409
410
  }
410
411
  });
411
412
  };
412
413
  }
413
- }), Ct = U({
414
+ }), St = q({
414
415
  name: "VSvgIcon",
415
416
  inheritAttrs: !1,
416
- props: q(),
417
+ props: Z(),
417
418
  setup(e, t) {
418
419
  let {
419
420
  attrs: n
420
421
  } = t;
421
- return () => k(e.tag, Me(n, {
422
+ return () => C(e.tag, Re(n, {
422
423
  style: null
423
424
  }), {
424
- default: () => [k("svg", {
425
+ default: () => [C("svg", {
425
426
  class: "v-icon__svg",
426
427
  xmlns: "http://www.w3.org/2000/svg",
427
428
  viewBox: "0 0 24 24",
428
429
  role: "img",
429
430
  "aria-hidden": "true"
430
- }, [Array.isArray(e.icon) ? e.icon.map((s) => Array.isArray(s) ? k("path", {
431
+ }, [Array.isArray(e.icon) ? e.icon.map((s) => Array.isArray(s) ? C("path", {
431
432
  d: s[0],
432
433
  "fill-opacity": s[1]
433
- }, null) : k("path", {
434
+ }, null) : C("path", {
434
435
  d: s
435
- }, null)) : k("path", {
436
+ }, null)) : C("path", {
436
437
  d: e.icon
437
438
  }, null)])]
438
439
  });
439
440
  }
440
441
  });
441
- U({
442
+ q({
442
443
  name: "VLigatureIcon",
443
- props: q(),
444
+ props: Z(),
444
445
  setup(e) {
445
- return () => k(e.tag, null, {
446
+ return () => C(e.tag, null, {
446
447
  default: () => [e.icon]
447
448
  });
448
449
  }
449
450
  });
450
- U({
451
+ q({
451
452
  name: "VClassIcon",
452
- props: q(),
453
+ props: Z(),
453
454
  setup(e) {
454
- return () => k(e.tag, {
455
+ return () => C(e.tag, {
455
456
  class: e.icon
456
457
  }, null);
457
458
  }
458
459
  });
459
- const xt = (e) => {
460
- const t = J(kt);
460
+ const wt = (e) => {
461
+ const t = Q(Vt);
461
462
  if (!t)
462
463
  throw new Error("Missing Vuetify Icons provide!");
463
464
  return {
464
- iconData: C(() => {
465
+ iconData: k(() => {
465
466
  var o;
466
- const s = Pe(e);
467
+ const s = W(e);
467
468
  if (!s)
468
469
  return {
469
- component: me
470
+ component: ge
470
471
  };
471
472
  let a = s;
472
473
  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))
473
474
  return {
474
- component: Ct,
475
+ component: St,
475
476
  icon: a
476
477
  };
477
478
  if (typeof a != "string")
478
479
  return {
479
- component: me,
480
+ component: ge,
480
481
  icon: a
481
482
  };
482
483
  const r = Object.keys(t.sets).find((f) => typeof a == "string" && a.startsWith(`${f}:`)), u = r ? a.slice(r.length + 1) : a;
@@ -486,17 +487,17 @@ const xt = (e) => {
486
487
  };
487
488
  })
488
489
  };
489
- }, bt = ["x-small", "small", "default", "large", "x-large"], St = w({
490
+ }, _t = ["x-small", "small", "default", "large", "x-large"], pt = w({
490
491
  size: {
491
492
  type: [String, Number],
492
493
  default: "default"
493
494
  }
494
495
  }, "size");
495
- function Vt(e) {
496
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ut();
497
- return we(() => {
496
+ function Ft(e) {
497
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : dt();
498
+ return _e(() => {
498
499
  let n, s;
499
- return Xe(bt, e.size) ? n = `${t}--size-${e.size}` : e.size && (s = {
500
+ return je(_t, e.size) ? n = `${t}--size-${e.size}` : e.size && (s = {
500
501
  width: A(e.size),
501
502
  height: A(e.size)
502
503
  }), {
@@ -505,42 +506,42 @@ function Vt(e) {
505
506
  };
506
507
  });
507
508
  }
508
- const wt = w({
509
+ const Bt = w({
509
510
  color: String,
510
511
  disabled: Boolean,
511
512
  start: Boolean,
512
513
  end: Boolean,
513
- icon: $e,
514
- ...qe(),
515
- ...St(),
516
- ...yt({
514
+ icon: Ie,
515
+ ...Xe(),
516
+ ...pt(),
517
+ ...kt({
517
518
  tag: "i"
518
519
  }),
519
- ...mt()
520
- }, "VIcon"), pt = Fe()({
520
+ ...vt()
521
+ }, "VIcon"), It = Be()({
521
522
  name: "VIcon",
522
- props: wt(),
523
+ props: Bt(),
523
524
  setup(e, t) {
524
525
  let {
525
526
  attrs: n,
526
527
  slots: s
527
528
  } = t;
528
- const a = B(), {
529
+ const a = I(), {
529
530
  themeClasses: r
530
- } = gt(e), {
531
+ } = Ct(e), {
531
532
  iconData: u
532
- } = xt(C(() => a.value || e.icon)), {
533
+ } = wt(k(() => a.value || e.icon)), {
533
534
  sizeClasses: m
534
- } = Vt(e), {
535
+ } = Ft(e), {
535
536
  textColorClasses: o,
536
537
  textColorStyles: f
537
- } = vt(Ne(e, "color"));
538
- return dt(() => {
539
- var S, V;
540
- const h = (S = s.default) == null ? void 0 : S.call(s);
541
- h && (a.value = (V = Ve(h).filter((b) => b.type === Oe && b.children && typeof b.children == "string")[0]) == null ? void 0 : V.children);
538
+ } = bt(Pe(e, "color"));
539
+ return ht(() => {
540
+ var V, S;
541
+ const h = (V = s.default) == null ? void 0 : V.call(s);
542
+ h && (a.value = (S = we(h).filter((b) => b.type === He && b.children && typeof b.children == "string")[0]) == null ? void 0 : S.children);
542
543
  const g = !!(n.onClick || n.onClickOnce);
543
- return k(u.value.component, {
544
+ return C(u.value.component, {
544
545
  tag: e.tag,
545
546
  icon: u.value.icon,
546
547
  class: ["v-icon", "notranslate", r.value, m.value, o.value, {
@@ -562,7 +563,7 @@ const wt = w({
562
563
  });
563
564
  }), {};
564
565
  }
565
- }), _t = /* @__PURE__ */ z({
566
+ }), $t = /* @__PURE__ */ M({
566
567
  __name: "index",
567
568
  props: /* @__PURE__ */ K({
568
569
  min: { default: -1 / 0 },
@@ -576,15 +577,15 @@ const wt = w({
576
577
  }),
577
578
  emits: ["update:modelValue"],
578
579
  setup(e) {
579
- const t = Ce(e, "modelValue"), n = e, s = C(() => ({
580
+ const t = xe(e, "modelValue"), n = e, s = k(() => ({
580
581
  width: "250px"
581
582
  }));
582
583
  return (a, r) => {
583
- const u = W("v-text-field");
584
- return _(), xe("div", {
585
- style: be(s.value)
584
+ const u = G("v-text-field");
585
+ return p(), be("div", {
586
+ style: Ve(s.value)
586
587
  }, [
587
- k(u, {
588
+ C(u, {
588
589
  "model-value": t.value,
589
590
  variant: "outlined",
590
591
  density: "compact",
@@ -595,7 +596,7 @@ const wt = w({
595
596
  ], 4);
596
597
  };
597
598
  }
598
- }), ge = /* @__PURE__ */ z({
599
+ }), ye = /* @__PURE__ */ M({
599
600
  __name: "index",
600
601
  props: /* @__PURE__ */ K({
601
602
  readonly: { type: Boolean, default: !1 },
@@ -606,23 +607,23 @@ const wt = w({
606
607
  }),
607
608
  emits: /* @__PURE__ */ K(["delete"], ["update:modelValue"]),
608
609
  setup(e, { emit: t }) {
609
- const n = Ce(e, "modelValue"), s = e, a = t;
610
+ const n = xe(e, "modelValue"), s = e, a = t;
610
611
  return (r, u) => {
611
- const m = W("v-text-field");
612
- return _(), G(m, {
612
+ const m = G("v-text-field");
613
+ return p(), U(m, {
613
614
  modelValue: n.value,
614
615
  "onUpdate:modelValue": u[0] || (u[0] = (o) => n.value = o),
615
616
  "onClick:appendInner": u[1] || (u[1] = (o) => a("delete")),
616
617
  variant: "outlined",
617
618
  density: "compact",
618
- "append-inner-icon": s.hasDelete ? "$minus" : "",
619
+ "append-inner-icon": s.hasDelete ? W(Ye) : "",
619
620
  readonly: s.readonly,
620
621
  "hide-details": "",
621
622
  "single-line": ""
622
623
  }, null, 8, ["modelValue", "append-inner-icon", "readonly"]);
623
624
  };
624
625
  }
625
- }), ye = /* @__PURE__ */ z({
626
+ }), he = /* @__PURE__ */ M({
626
627
  __name: "index",
627
628
  props: {
628
629
  title: {},
@@ -633,40 +634,40 @@ const wt = w({
633
634
  },
634
635
  emits: ["collapse", "create", "delete"],
635
636
  setup(e, { emit: t }) {
636
- const n = e, s = t, a = C(() => ({
637
+ const n = e, s = t, a = k(() => ({
637
638
  height: "36px"
638
639
  }));
639
640
  return (r, u) => {
640
- const m = W("v-icon"), o = W("v-spacer"), f = Ee("ripple");
641
- return Le((_(), xe("div", {
641
+ const m = G("v-icon"), o = G("v-spacer"), f = Ne("ripple");
642
+ return Oe((p(), be("div", {
642
643
  onClick: u[2] || (u[2] = (h) => s("collapse", !n.collapse)),
643
644
  class: "d-flex align-center",
644
- style: be(a.value)
645
+ style: Ve(a.value)
645
646
  }, [
646
- k(m, {
647
+ C(m, {
647
648
  class: "mr-1",
648
- icon: n.collapse ? "$chevronRight" : "$chevronDown"
649
+ icon: n.collapse ? W(Ze) : W(qe)
649
650
  }, null, 8, ["icon"]),
650
- He("span", null, We(n.title), 1),
651
- k(o),
652
- n.hasCreate ? (_(), G(m, {
651
+ Ee("span", null, We(n.title), 1),
652
+ C(o),
653
+ n.hasCreate ? (p(), U(m, {
653
654
  key: 0,
654
- onClick: u[0] || (u[0] = Q((h) => s("create"), ["stop"])),
655
+ onClick: u[0] || (u[0] = j((h) => s("create"), ["stop"])),
655
656
  class: "ml-3",
656
657
  icon: "$plus"
657
- })) : j("", !0),
658
- n.hasDelete ? (_(), G(m, {
658
+ })) : ee("", !0),
659
+ n.hasDelete ? (p(), U(m, {
659
660
  key: 1,
660
- onClick: u[1] || (u[1] = Q((h) => s("delete", n.index), ["stop"])),
661
+ onClick: u[1] || (u[1] = j((h) => s("delete", n.index), ["stop"])),
661
662
  class: "ml-3",
662
663
  icon: "$sub"
663
- })) : j("", !0)
664
+ })) : ee("", !0)
664
665
  ], 4)), [
665
666
  [f]
666
667
  ]);
667
668
  };
668
669
  }
669
- }), Ft = /* @__PURE__ */ z({
670
+ }), At = /* @__PURE__ */ M({
670
671
  __name: "index",
671
672
  props: {
672
673
  unique: {},
@@ -675,13 +676,13 @@ const wt = w({
675
676
  },
676
677
  emits: ["change"],
677
678
  setup(e, { emit: t }) {
678
- const { t: n } = Ge(), { backgroundColor2: s } = Ue(), a = e, r = t, u = B("20px"), m = B("56px"), o = B("10px"), f = B("250px"), h = he({});
679
+ const { t: n } = Ge(), { backgroundColor2: s } = Ue(), a = e, r = t, u = I("20px"), m = I("56px"), o = I("10px"), f = I("250px"), h = ve({});
679
680
  function g(d, l, i, c) {
680
- return l.keyFlag || (d += l.key), l.children ? l.array ? S(d, l, i, c) : V(d, l, i, c) : l.array ? b(d, l, i) : M(d, l, i);
681
+ return l.keyFlag || (d += l.key), l.children ? l.array ? V(d, l, i, c) : S(d, l, i, c) : l.array ? b(d, l, i) : z(d, l, i);
681
682
  }
682
- function S(d, l, i, c) {
683
+ function V(d, l, i, c) {
683
684
  i[l.key] instanceof Array || (i[l.key] = [], r("change", d, i[l.key]));
684
- const $ = y(ye, {
685
+ const B = y(he, {
685
686
  title: n(l.name),
686
687
  collapse: !!c.collapse,
687
688
  onCollapse: (v) => {
@@ -716,12 +717,12 @@ const wt = w({
716
717
  },
717
718
  (() => {
718
719
  const v = [];
719
- return v.push($), c.collapse || v.push(x), v;
720
+ return v.push(B), c.collapse || v.push(x), v;
720
721
  })()
721
722
  );
722
723
  }
723
- function V(d, l, i, c) {
724
- const $ = y(ye, {
724
+ function S(d, l, i, c) {
725
+ const B = y(he, {
725
726
  title: n(l.name),
726
727
  collapse: !!c.collapse,
727
728
  onCollapse: (v) => {
@@ -735,19 +736,19 @@ const wt = w({
735
736
  }
736
737
  },
737
738
  (() => {
738
- var N;
739
+ var P;
739
740
  const v = [];
740
- return (N = l.children) == null || N.forEach((O) => {
741
- typeof c[O.key] != "object" && (c[O.key] = {
741
+ return (P = l.children) == null || P.forEach((H) => {
742
+ typeof c[H.key] != "object" && (c[H.key] = {
742
743
  collapse: !0
743
744
  });
744
- const Be = g(
745
+ const $e = g(
745
746
  d,
746
- O,
747
+ H,
747
748
  l.keyFlag ? i : (typeof i[l.key] != "object" && (i[l.key] = {}, r("change", d, i[l.key])), i[l.key]),
748
- c[O.key]
749
+ c[H.key]
749
750
  );
750
- v.push(Be);
751
+ v.push($e);
751
752
  }), v;
752
753
  })()
753
754
  );
@@ -761,12 +762,12 @@ const wt = w({
761
762
  },
762
763
  (() => {
763
764
  const v = [];
764
- return v.push($), c.collapse || v.push(x), v;
765
+ return v.push(B), c.collapse || v.push(x), v;
765
766
  })()
766
767
  );
767
768
  }
768
769
  function b(d, l, i) {
769
- if (i[l.key] instanceof Array || (i[l.key] = E(l), r("change", d, i[l.key])), l.ui === "strInput")
770
+ if (i[l.key] instanceof Array || (i[l.key] = N(l), r("change", d, i[l.key])), l.ui === "strInput")
770
771
  return y(
771
772
  "div",
772
773
  {
@@ -809,10 +810,10 @@ const wt = w({
809
810
  }
810
811
  },
811
812
  [
812
- y(ge, {
813
+ y(ye, {
813
814
  modelValue: i[l.key][x],
814
- "onUpdate:modelValue": (N) => {
815
- i[l.key][x] = N, r("change", d, i[l.key]);
815
+ "onUpdate:modelValue": (P) => {
816
+ i[l.key][x] = P, r("change", d, i[l.key]);
816
817
  },
817
818
  hasDelete: !0,
818
819
  onDelete: () => {
@@ -823,7 +824,7 @@ const wt = w({
823
824
  );
824
825
  c.push(v);
825
826
  }
826
- const $ = y(
827
+ const B = y(
827
828
  "div",
828
829
  {
829
830
  class: {
@@ -844,18 +845,18 @@ const wt = w({
844
845
  i[l.key].push(""), r("change", d, i[l.key]);
845
846
  }
846
847
  },
847
- [y(pt, { icon: "$plus" })]
848
+ [y(It, { icon: Ke })]
848
849
  );
849
- return c.push($), c;
850
+ return c.push(B), c;
850
851
  })()
851
852
  )
852
853
  ]
853
854
  );
854
855
  console.assert(!1);
855
856
  }
856
- function M(d, l, i) {
857
+ function z(d, l, i) {
857
858
  if (l.ui === "void")
858
- i[l.key] === void 0 && (console.assert(l.default !== void 0), i[l.key] = E(l), r("change", d, i[l.key]));
859
+ i[l.key] === void 0 && (console.assert(l.default !== void 0), i[l.key] = N(l), r("change", d, i[l.key]));
859
860
  else {
860
861
  if (l.ui === "strInput")
861
862
  return y(
@@ -886,8 +887,8 @@ const wt = w({
886
887
  }
887
888
  },
888
889
  [
889
- y(ge, {
890
- modelValue: l.static ? l.value : (typeof i[l.key] != "string" && (i[l.key] = E(l), r("change", d, i[l.key])), i[l.key]),
890
+ y(ye, {
891
+ modelValue: l.static ? l.value : (typeof i[l.key] != "string" && (i[l.key] = N(l), r("change", d, i[l.key])), i[l.key]),
891
892
  "onUpdate:modelValue": (c) => {
892
893
  l.static || c !== i[l.key] && (i[l.key] = c, r("change", d, c));
893
894
  },
@@ -926,8 +927,8 @@ const wt = w({
926
927
  }
927
928
  },
928
929
  [
929
- y(_t, {
930
- modelValue: (typeof i[l.key] != "number" && (i[l.key] = E(l), r("change", d, i[l.key])), i[l.key]),
930
+ y($t, {
931
+ modelValue: (typeof i[l.key] != "number" && (i[l.key] = N(l), r("change", d, i[l.key])), i[l.key]),
931
932
  "onUpdate:modelValue": (c) => {
932
933
  c !== i[l.key] && (i[l.key] = c, r("change", d, c));
933
934
  },
@@ -939,7 +940,7 @@ const wt = w({
939
940
  );
940
941
  }
941
942
  }
942
- const P = () => y(
943
+ const R = () => y(
943
944
  "div",
944
945
  {
945
946
  class: {
@@ -959,11 +960,11 @@ const wt = w({
959
960
  return d;
960
961
  })()
961
962
  );
962
- return (d, l) => (_(), G(P));
963
+ return (d, l) => (p(), U(R));
963
964
  }
964
- }), $t = (e) => {
965
- e.component("x-prop-tree", Ft);
966
- }, Tt = { install: $t };
965
+ }), Dt = (e) => {
966
+ e.component("x-prop-tree", At);
967
+ }, Rt = { install: Dt };
967
968
  export {
968
- Tt as default
969
+ Rt as default
969
970
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-prop-tree",
3
3
  "private": false,
4
- "version": "0.3.2",
4
+ "version": "0.3.4",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -25,8 +25,8 @@
25
25
  "vue": "^3.4.30",
26
26
  "vue-i18n": "^9.13.1",
27
27
  "vuetify": "^3.6.10",
28
- "x-essential-lib": "^0.5.66",
29
- "x-runtime-lib": "^0.3.6"
28
+ "x-essential-lib": "^0.5.84",
29
+ "x-runtime-lib": "^0.3.7"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@mdi/js": "^7.4.47",