x-prop-tree 0.3.3 → 0.3.6

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.
@@ -10,6 +10,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Pr
10
10
  onChange?: ((...args: any[]) => any) | undefined;
11
11
  }, {}, {}>;
12
12
  export default _default;
13
+
13
14
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
15
  type __VLS_TypePropsToOption<T> = {
15
16
  [K in keyof T]-?: {} extends Pick<T, K> ? {
@@ -1,50 +1,29 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- modelValue: import("vue").PropType<number>;
3
- min: {
4
- type: import("vue").PropType<number>;
5
- default: number;
6
- };
7
- max: {
8
- type: import("vue").PropType<number>;
9
- default: number;
10
- };
11
- precision: {
12
- type: import("vue").PropType<number>;
13
- default: number;
14
- };
15
- step: {
16
- type: import("vue").PropType<number>;
17
- default: number;
18
- };
19
- readonly: {
20
- type: import("vue").PropType<boolean>;
21
- default: boolean;
22
- };
23
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1
+ interface Props {
2
+ min?: number;
3
+ max?: number;
4
+ precision?: number;
5
+ step?: number;
6
+ readonly?: boolean;
7
+ }
8
+ declare let __VLS_typeProps: Props;
9
+ type __VLS_PublicProps = {
10
+ modelValue?: number;
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, {
24
19
  "update:modelValue": (modelValue: number) => void;
25
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
26
- modelValue: import("vue").PropType<number>;
27
- min: {
28
- type: import("vue").PropType<number>;
29
- default: number;
30
- };
31
- max: {
32
- type: import("vue").PropType<number>;
33
- default: number;
34
- };
35
- precision: {
36
- type: import("vue").PropType<number>;
37
- default: number;
38
- };
39
- step: {
40
- type: import("vue").PropType<number>;
41
- default: number;
42
- };
43
- readonly: {
44
- type: import("vue").PropType<boolean>;
45
- default: boolean;
46
- };
47
- }>> & {
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
+ }>>> & {
48
27
  "onUpdate:modelValue"?: ((modelValue: number) => any) | undefined;
49
28
  }, {
50
29
  min: number;
@@ -54,3 +33,20 @@ declare const _default: import("vue").DefineComponent<{
54
33
  readonly: boolean;
55
34
  }, {}>;
56
35
  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
+ };
@@ -1,27 +1,21 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- modelValue: import("vue").PropType<string>;
3
- readonly: {
4
- type: import("vue").PropType<boolean>;
5
- default: boolean;
6
- };
7
- hasDelete: {
8
- type: import("vue").PropType<boolean>;
9
- default: boolean;
10
- };
11
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1
+ interface Props {
2
+ readonly?: boolean;
3
+ hasDelete?: boolean;
4
+ }
5
+ declare let __VLS_typeProps: Props;
6
+ type __VLS_PublicProps = {
7
+ modelValue?: string;
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, {
12
13
  "update:modelValue": (modelValue: string) => void;
13
14
  delete: (...args: any[]) => void;
14
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
- modelValue: import("vue").PropType<string>;
16
- readonly: {
17
- type: import("vue").PropType<boolean>;
18
- default: boolean;
19
- };
20
- hasDelete: {
21
- type: import("vue").PropType<boolean>;
22
- default: boolean;
23
- };
24
- }>> & {
15
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
16
+ readonly: boolean;
17
+ hasDelete: boolean;
18
+ }>>> & {
25
19
  "onUpdate:modelValue"?: ((modelValue: string) => any) | undefined;
26
20
  onDelete?: ((...args: any[]) => any) | undefined;
27
21
  }, {
@@ -29,3 +23,20 @@ declare const _default: import("vue").DefineComponent<{
29
23
  hasDelete: boolean;
30
24
  }, {}>;
31
25
  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
+ };
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 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 Ne, mergeModels as K, useModel as xe, resolveComponent as G, openBlock as _, createElementBlock as be, normalizeStyle as Se, createBlock as U, resolveDirective as Oe, withDirectives as Ee, createElementVNode as He, toDisplayString as We, withModifiers as j, createCommentVNode as ee, 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 O } 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],
@@ -32,7 +33,7 @@ function te(e) {
32
33
  function Y(e, t) {
33
34
  return t.every((n) => e.hasOwnProperty(n));
34
35
  }
35
- function Ze(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]);
@@ -42,7 +43,7 @@ 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 Ye(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;
@@ -50,7 +51,7 @@ function Ye(e) {
50
51
  n.push(e.substr(s, t)), s += t;
51
52
  return n;
52
53
  }
53
- function Ve() {
54
+ function Se() {
54
55
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
55
56
  const s = {};
56
57
  for (const a in e)
@@ -58,7 +59,7 @@ function Ve() {
58
59
  for (const a in t) {
59
60
  const r = e[a], u = t[a];
60
61
  if (te(r) && te(u)) {
61
- s[a] = Ve(r, u, n);
62
+ s[a] = Se(r, u, n);
62
63
  continue;
63
64
  }
64
65
  if (Array.isArray(r) && Array.isArray(u) && n) {
@@ -74,13 +75,12 @@ function we(e) {
74
75
  }
75
76
  function F() {
76
77
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
77
- if (F.cache.has(e))
78
- return F.cache.get(e);
78
+ if (F.cache.has(e)) return F.cache.get(e);
79
79
  const t = e.replace(/[^a-z]/gi, "-").replace(/\B([A-Z])/g, "-$1").toLowerCase();
80
80
  return F.cache.set(e, t), t;
81
81
  }
82
82
  F.cache = /* @__PURE__ */ new Map();
83
- function pe(e) {
83
+ function _e(e) {
84
84
  const t = ve({}), n = k(e);
85
85
  return Ce(() => {
86
86
  for (const s in n.value)
@@ -89,22 +89,21 @@ function pe(e) {
89
89
  flush: "sync"
90
90
  }), De(t);
91
91
  }
92
- function Ke(e, t) {
92
+ function je(e, t) {
93
93
  return e.includes(t);
94
94
  }
95
- const p = 2.4, se = 0.2126729, ae = 0.7151522, le = 0.072175, Xe = 0.55, Je = 0.58, Qe = 0.57, je = 0.62, E = 0.03, re = 1.45, et = 5e-4, tt = 1.25, nt = 1.25, ie = 0.078, ue = 12.82051282051282, H = 0.06, oe = 1e-3;
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
96
  function ce(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;
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
98
  let o = n * se + s * ae + a * le, f = r * se + u * ae + m * le;
99
- if (o <= E && (o += (E - o) ** re), f <= E && (f += (E - f) ** re), Math.abs(f - o) < et)
100
- return 0;
99
+ if (o <= O && (o += (O - o) ** re), f <= O && (f += (O - f) ** re), Math.abs(f - o) < at) return 0;
101
100
  let h;
102
101
  if (f > o) {
103
- const g = (f ** Xe - o ** Je) * tt;
104
- h = g < oe ? 0 : g < ie ? g - g * ue * H : g - H;
102
+ const g = (f ** et - o ** tt) * lt;
103
+ h = g < oe ? 0 : g < ie ? g - g * ue * E : g - E;
105
104
  } else {
106
- const g = (f ** je - o ** Qe) * nt;
107
- h = g > -oe ? 0 : g > -ie ? g - g * ue * H : g + H;
105
+ const g = (f ** st - o ** nt) * rt;
106
+ h = g > -oe ? 0 : g > -ie ? g - g * ue * E : g + E;
108
107
  }
109
108
  return h * 100;
110
109
  }
@@ -114,10 +113,10 @@ function D(e) {
114
113
  function X(e) {
115
114
  return !!e && /^(#|var\(--|(rgb|hsl)a?\()/.test(e);
116
115
  }
117
- function st(e) {
116
+ function it(e) {
118
117
  return X(e) && !/^((rgb|hsl)a?\()?var\(--/.test(e);
119
118
  }
120
- const fe = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/, at = {
119
+ const fe = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/, ut = {
121
120
  rgb: (e, t, n, s) => ({
122
121
  r: e,
123
122
  g: t,
@@ -169,17 +168,17 @@ function $(e) {
169
168
  fn: n,
170
169
  values: s
171
170
  } = 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);
171
+ return ut[n](...a);
173
172
  } else if (typeof e == "string") {
174
173
  let t = e.startsWith("#") ? e.slice(1) : e;
175
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`);
176
175
  const n = parseInt(t, 16);
177
- return (isNaN(n) || n < 0 || n > 4294967295) && D(`'${e}' is not a valid hex(a) color`), lt(t);
176
+ return (isNaN(n) || n < 0 || n > 4294967295) && D(`'${e}' is not a valid hex(a) color`), ot(t);
178
177
  } else if (typeof e == "object") {
179
178
  if (Y(e, ["r", "g", "b"]))
180
179
  return e;
181
180
  if (Y(e, ["h", "s", "l"]))
182
- return L(_e(e));
181
+ return L(pe(e));
183
182
  if (Y(e, ["h", "s", "v"]))
184
183
  return L(e);
185
184
  }
@@ -204,9 +203,9 @@ function L(e) {
204
203
  };
205
204
  }
206
205
  function de(e) {
207
- return L(_e(e));
206
+ return L(pe(e));
208
207
  }
209
- function _e(e) {
208
+ function pe(e) {
210
209
  const {
211
210
  h: t,
212
211
  s: n,
@@ -220,9 +219,9 @@ function _e(e) {
220
219
  a
221
220
  };
222
221
  }
223
- function lt(e) {
224
- e = rt(e);
225
- let [t, n, s, a] = Ye(e, 2).map((r) => parseInt(r, 16));
222
+ function ot(e) {
223
+ e = ct(e);
224
+ let [t, n, s, a] = Qe(e, 2).map((r) => parseInt(r, 16));
226
225
  return a = a === void 0 ? a : a / 255, {
227
226
  r: t,
228
227
  g: n,
@@ -230,10 +229,10 @@ function lt(e) {
230
229
  a
231
230
  };
232
231
  }
233
- function rt(e) {
232
+ function ct(e) {
234
233
  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
234
  }
236
- function it(e) {
235
+ function ft(e) {
237
236
  const t = Math.abs(ce($(0), $(e)));
238
237
  return Math.abs(ce($(16777215), $(e))) > Math.min(t, 50) ? "#fff" : "#000";
239
238
  }
@@ -243,12 +242,12 @@ function T(e, t) {
243
242
  throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);
244
243
  return n;
245
244
  }
246
- function ut() {
245
+ function dt() {
247
246
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "composables";
248
247
  const t = T(e).type;
249
248
  return F((t == null ? void 0 : t.aliasName) || (t == null ? void 0 : t.name));
250
249
  }
251
- function ot(e) {
250
+ function mt(e) {
252
251
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : T("injectSelf");
253
252
  const {
254
253
  provides: n
@@ -259,15 +258,14 @@ function ot(e) {
259
258
  const J = Symbol.for("vuetify:defaults");
260
259
  function Fe() {
261
260
  const e = Q(J);
262
- if (!e)
263
- throw new Error("[Vuetify] Could not find defaults instance");
261
+ if (!e) throw new Error("[Vuetify] Could not find defaults instance");
264
262
  return e;
265
263
  }
266
- function ct(e, t) {
264
+ function gt(e, t) {
267
265
  var n, s;
268
266
  return typeof ((n = e.props) == null ? void 0 : n[t]) < "u" || typeof ((s = e.props) == null ? void 0 : s[F(t)]) < "u";
269
267
  }
270
- function ft() {
268
+ function yt() {
271
269
  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();
272
270
  const s = T("useDefaults");
273
271
  if (t = t ?? s.type.name ?? s.type.__name, !t)
@@ -277,9 +275,9 @@ function ft() {
277
275
  return (o = n.value) == null ? void 0 : o[e._as ?? t];
278
276
  }), r = new Proxy(e, {
279
277
  get(o, f) {
280
- var g, S, V, b, z, R, d;
278
+ var g, V, S, b, z, R, d;
281
279
  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] : ((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;
280
+ 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
281
  }
284
282
  }), u = Te();
285
283
  Ce(() => {
@@ -293,8 +291,8 @@ function ft() {
293
291
  u.value = void 0;
294
292
  });
295
293
  function m() {
296
- const o = ot(J, s);
297
- ke(J, k(() => u.value ? Ve((o == null ? void 0 : o.value) ?? {}, u.value) : o == null ? void 0 : o.value));
294
+ const o = mt(J, s);
295
+ ke(J, k(() => u.value ? Se((o == null ? void 0 : o.value) ?? {}, u.value) : o == null ? void 0 : o.value));
298
296
  }
299
297
  return {
300
298
  props: r,
@@ -308,15 +306,14 @@ function q(e) {
308
306
  e.props = w(e.props ?? {}, e.name)();
309
307
  const t = Object.keys(e.props).filter((n) => n !== "class" && n !== "style");
310
308
  e.filterProps = function(s) {
311
- return Ze(s, t);
309
+ return Je(s, t);
312
310
  }, e.props._as = String, e.setup = function(s, a) {
313
311
  const r = Fe();
314
- if (!r.value)
315
- return e._setup(s, a);
312
+ if (!r.value) return e._setup(s, a);
316
313
  const {
317
314
  props: u,
318
315
  provideSubDefaults: m
319
- } = ft(s, s._as ?? e.name, r), o = e._setup(u, a);
316
+ } = yt(s, s._as ?? e.name, r), o = e._setup(u, a);
320
317
  return m(), o;
321
318
  };
322
319
  }
@@ -326,18 +323,17 @@ function Be() {
326
323
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
327
324
  return (t) => (e ? q : M)(t);
328
325
  }
329
- function dt(e) {
326
+ function ht(e) {
330
327
  const t = T("useRender");
331
328
  t.render = e;
332
329
  }
333
- const me = Symbol.for("vuetify:theme"), mt = w({
330
+ const me = Symbol.for("vuetify:theme"), vt = w({
334
331
  theme: String
335
332
  }, "theme");
336
- function gt(e) {
333
+ function Ct(e) {
337
334
  T("provideTheme");
338
335
  const t = Q(me, null);
339
- if (!t)
340
- throw new Error("Could not find Vuetify theme injection");
336
+ if (!t) throw new Error("Could not find Vuetify theme injection");
341
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 = {
342
338
  ...t,
343
339
  name: n,
@@ -346,21 +342,21 @@ function gt(e) {
346
342
  };
347
343
  return ke(me, r), r;
348
344
  }
349
- const yt = w({
345
+ const kt = w({
350
346
  tag: {
351
347
  type: String,
352
348
  default: "div"
353
349
  }
354
350
  }, "tag");
355
- function ht(e) {
356
- return pe(() => {
351
+ function xt(e) {
352
+ return _e(() => {
357
353
  const t = [], n = {};
358
354
  if (e.value.background)
359
355
  if (X(e.value.background)) {
360
- if (n.backgroundColor = e.value.background, !e.value.text && st(e.value.background)) {
356
+ if (n.backgroundColor = e.value.background, !e.value.text && it(e.value.background)) {
361
357
  const s = $(e.value.background);
362
358
  if (s.a == null || s.a === 1) {
363
- const a = it(s);
359
+ const a = ft(s);
364
360
  n.color = a, n.caretColor = a;
365
361
  }
366
362
  }
@@ -372,19 +368,19 @@ function ht(e) {
372
368
  };
373
369
  });
374
370
  }
375
- function vt(e, t) {
371
+ function bt(e, t) {
376
372
  const n = k(() => ({
377
373
  text: ze(e) ? e.value : null
378
374
  })), {
379
375
  colorClasses: s,
380
376
  colorStyles: a
381
- } = ht(n);
377
+ } = xt(n);
382
378
  return {
383
379
  textColorClasses: s,
384
380
  textColorStyles: a
385
381
  };
386
382
  }
387
- const Ie = [String, Function, Object, Array], Ct = Symbol.for("vuetify:icons"), Z = w({
383
+ const Ie = [String, Function, Object, Array], Vt = Symbol.for("vuetify:icons"), Z = w({
388
384
  icon: {
389
385
  type: Ie
390
386
  },
@@ -410,7 +406,7 @@ const Ie = [String, Function, Object, Array], Ct = Symbol.for("vuetify:icons"),
410
406
  });
411
407
  };
412
408
  }
413
- }), kt = q({
409
+ }), St = q({
414
410
  name: "VSvgIcon",
415
411
  inheritAttrs: !1,
416
412
  props: Z(),
@@ -456,22 +452,20 @@ q({
456
452
  }, null);
457
453
  }
458
454
  });
459
- const xt = (e) => {
460
- const t = Q(Ct);
461
- if (!t)
462
- throw new Error("Missing Vuetify Icons provide!");
455
+ const wt = (e) => {
456
+ const t = Q(Vt);
457
+ if (!t) throw new Error("Missing Vuetify Icons provide!");
463
458
  return {
464
459
  iconData: k(() => {
465
460
  var o;
466
461
  const s = W(e);
467
- if (!s)
468
- return {
469
- component: ge
470
- };
462
+ if (!s) return {
463
+ component: ge
464
+ };
471
465
  let a = s;
472
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))
473
467
  return {
474
- component: kt,
468
+ component: St,
475
469
  icon: a
476
470
  };
477
471
  if (typeof a != "string")
@@ -486,17 +480,17 @@ const xt = (e) => {
486
480
  };
487
481
  })
488
482
  };
489
- }, bt = ["x-small", "small", "default", "large", "x-large"], St = w({
483
+ }, _t = ["x-small", "small", "default", "large", "x-large"], pt = w({
490
484
  size: {
491
485
  type: [String, Number],
492
486
  default: "default"
493
487
  }
494
488
  }, "size");
495
- function Vt(e) {
496
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ut();
497
- return pe(() => {
489
+ function Ft(e) {
490
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : dt();
491
+ return _e(() => {
498
492
  let n, s;
499
- return Ke(bt, e.size) ? n = `${t}--size-${e.size}` : e.size && (s = {
493
+ return je(_t, e.size) ? n = `${t}--size-${e.size}` : e.size && (s = {
500
494
  width: A(e.size),
501
495
  height: A(e.size)
502
496
  }), {
@@ -505,21 +499,21 @@ function Vt(e) {
505
499
  };
506
500
  });
507
501
  }
508
- const wt = w({
502
+ const Bt = w({
509
503
  color: String,
510
504
  disabled: Boolean,
511
505
  start: Boolean,
512
506
  end: Boolean,
513
507
  icon: Ie,
514
- ...qe(),
515
- ...St(),
516
- ...yt({
508
+ ...Xe(),
509
+ ...pt(),
510
+ ...kt({
517
511
  tag: "i"
518
512
  }),
519
- ...mt()
520
- }, "VIcon"), pt = Be()({
513
+ ...vt()
514
+ }, "VIcon"), It = Be()({
521
515
  name: "VIcon",
522
- props: wt(),
516
+ props: Bt(),
523
517
  setup(e, t) {
524
518
  let {
525
519
  attrs: n,
@@ -527,18 +521,18 @@ const wt = w({
527
521
  } = t;
528
522
  const a = I(), {
529
523
  themeClasses: r
530
- } = gt(e), {
524
+ } = Ct(e), {
531
525
  iconData: u
532
- } = xt(k(() => a.value || e.icon)), {
526
+ } = wt(k(() => a.value || e.icon)), {
533
527
  sizeClasses: m
534
- } = Vt(e), {
528
+ } = Ft(e), {
535
529
  textColorClasses: o,
536
530
  textColorStyles: f
537
- } = vt(Pe(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 = we(h).filter((b) => b.type === Ne && b.children && typeof b.children == "string")[0]) == null ? void 0 : V.children);
531
+ } = bt(Pe(e, "color"));
532
+ return ht(() => {
533
+ var V, S;
534
+ 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);
542
536
  const g = !!(n.onClick || n.onClickOnce);
543
537
  return C(u.value.component, {
544
538
  tag: e.tag,
@@ -562,7 +556,7 @@ const wt = w({
562
556
  });
563
557
  }), {};
564
558
  }
565
- }), _t = /* @__PURE__ */ M({
559
+ }), $t = /* @__PURE__ */ M({
566
560
  __name: "index",
567
561
  props: /* @__PURE__ */ K({
568
562
  min: { default: -1 / 0 },
@@ -581,8 +575,8 @@ const wt = w({
581
575
  }));
582
576
  return (a, r) => {
583
577
  const u = G("v-text-field");
584
- return _(), be("div", {
585
- style: Se(s.value)
578
+ return p(), be("div", {
579
+ style: Ve(s.value)
586
580
  }, [
587
581
  C(u, {
588
582
  "model-value": t.value,
@@ -595,9 +589,7 @@ const wt = w({
595
589
  ], 4);
596
590
  };
597
591
  }
598
- });
599
- var Ft = "M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z", Bt = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z", It = "M19,13H5V11H19V13Z";
600
- const ye = /* @__PURE__ */ M({
592
+ }), ye = /* @__PURE__ */ M({
601
593
  __name: "index",
602
594
  props: /* @__PURE__ */ K({
603
595
  readonly: { type: Boolean, default: !1 },
@@ -611,13 +603,13 @@ const ye = /* @__PURE__ */ M({
611
603
  const n = xe(e, "modelValue"), s = e, a = t;
612
604
  return (r, u) => {
613
605
  const m = G("v-text-field");
614
- return _(), U(m, {
606
+ return p(), U(m, {
615
607
  modelValue: n.value,
616
608
  "onUpdate:modelValue": u[0] || (u[0] = (o) => n.value = o),
617
609
  "onClick:appendInner": u[1] || (u[1] = (o) => a("delete")),
618
610
  variant: "outlined",
619
611
  density: "compact",
620
- "append-inner-icon": s.hasDelete ? W(It) : "",
612
+ "append-inner-icon": s.hasDelete ? W(Ye) : "",
621
613
  readonly: s.readonly,
622
614
  "hide-details": "",
623
615
  "single-line": ""
@@ -639,25 +631,25 @@ const ye = /* @__PURE__ */ M({
639
631
  height: "36px"
640
632
  }));
641
633
  return (r, u) => {
642
- const m = G("v-icon"), o = G("v-spacer"), f = Oe("ripple");
643
- return Ee((_(), be("div", {
634
+ const m = G("v-icon"), o = G("v-spacer"), f = Ne("ripple");
635
+ return Oe((p(), be("div", {
644
636
  onClick: u[2] || (u[2] = (h) => s("collapse", !n.collapse)),
645
637
  class: "d-flex align-center",
646
- style: Se(a.value)
638
+ style: Ve(a.value)
647
639
  }, [
648
640
  C(m, {
649
641
  class: "mr-1",
650
- icon: n.collapse ? W(Bt) : W(Ft)
642
+ icon: n.collapse ? W(Ze) : W(qe)
651
643
  }, null, 8, ["icon"]),
652
- He("span", null, We(n.title), 1),
644
+ Ee("span", null, We(n.title), 1),
653
645
  C(o),
654
- n.hasCreate ? (_(), U(m, {
646
+ n.hasCreate ? (p(), U(m, {
655
647
  key: 0,
656
648
  onClick: u[0] || (u[0] = j((h) => s("create"), ["stop"])),
657
649
  class: "ml-3",
658
650
  icon: "$plus"
659
651
  })) : ee("", !0),
660
- n.hasDelete ? (_(), U(m, {
652
+ n.hasDelete ? (p(), U(m, {
661
653
  key: 1,
662
654
  onClick: u[1] || (u[1] = j((h) => s("delete", n.index), ["stop"])),
663
655
  class: "ml-3",
@@ -668,7 +660,7 @@ const ye = /* @__PURE__ */ M({
668
660
  ]);
669
661
  };
670
662
  }
671
- }), $t = /* @__PURE__ */ M({
663
+ }), At = /* @__PURE__ */ M({
672
664
  __name: "index",
673
665
  props: {
674
666
  unique: {},
@@ -679,9 +671,9 @@ const ye = /* @__PURE__ */ M({
679
671
  setup(e, { emit: t }) {
680
672
  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({});
681
673
  function g(d, l, i, c) {
682
- 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) : z(d, l, i);
674
+ 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);
683
675
  }
684
- function S(d, l, i, c) {
676
+ function V(d, l, i, c) {
685
677
  i[l.key] instanceof Array || (i[l.key] = [], r("change", d, i[l.key]));
686
678
  const B = y(he, {
687
679
  title: n(l.name),
@@ -722,7 +714,7 @@ const ye = /* @__PURE__ */ M({
722
714
  })()
723
715
  );
724
716
  }
725
- function V(d, l, i, c) {
717
+ function S(d, l, i, c) {
726
718
  const B = y(he, {
727
719
  title: n(l.name),
728
720
  collapse: !!c.collapse,
@@ -739,15 +731,15 @@ const ye = /* @__PURE__ */ M({
739
731
  (() => {
740
732
  var P;
741
733
  const v = [];
742
- return (P = l.children) == null || P.forEach((N) => {
743
- typeof c[N.key] != "object" && (c[N.key] = {
734
+ return (P = l.children) == null || P.forEach((H) => {
735
+ typeof c[H.key] != "object" && (c[H.key] = {
744
736
  collapse: !0
745
737
  });
746
738
  const $e = g(
747
739
  d,
748
- N,
740
+ H,
749
741
  l.keyFlag ? i : (typeof i[l.key] != "object" && (i[l.key] = {}, r("change", d, i[l.key])), i[l.key]),
750
- c[N.key]
742
+ c[H.key]
751
743
  );
752
744
  v.push($e);
753
745
  }), v;
@@ -768,7 +760,7 @@ const ye = /* @__PURE__ */ M({
768
760
  );
769
761
  }
770
762
  function b(d, l, i) {
771
- if (i[l.key] instanceof Array || (i[l.key] = O(l), r("change", d, i[l.key])), l.ui === "strInput")
763
+ if (i[l.key] instanceof Array || (i[l.key] = N(l), r("change", d, i[l.key])), l.ui === "strInput")
772
764
  return y(
773
765
  "div",
774
766
  {
@@ -846,7 +838,7 @@ const ye = /* @__PURE__ */ M({
846
838
  i[l.key].push(""), r("change", d, i[l.key]);
847
839
  }
848
840
  },
849
- [y(pt, { icon: "$plus" })]
841
+ [y(It, { icon: Ke })]
850
842
  );
851
843
  return c.push(B), c;
852
844
  })()
@@ -857,7 +849,7 @@ const ye = /* @__PURE__ */ M({
857
849
  }
858
850
  function z(d, l, i) {
859
851
  if (l.ui === "void")
860
- i[l.key] === void 0 && (console.assert(l.default !== void 0), i[l.key] = O(l), r("change", d, i[l.key]));
852
+ i[l.key] === void 0 && (console.assert(l.default !== void 0), i[l.key] = N(l), r("change", d, i[l.key]));
861
853
  else {
862
854
  if (l.ui === "strInput")
863
855
  return y(
@@ -889,7 +881,7 @@ const ye = /* @__PURE__ */ M({
889
881
  },
890
882
  [
891
883
  y(ye, {
892
- modelValue: l.static ? l.value : (typeof i[l.key] != "string" && (i[l.key] = O(l), r("change", d, i[l.key])), i[l.key]),
884
+ modelValue: l.static ? l.value : (typeof i[l.key] != "string" && (i[l.key] = N(l), r("change", d, i[l.key])), i[l.key]),
893
885
  "onUpdate:modelValue": (c) => {
894
886
  l.static || c !== i[l.key] && (i[l.key] = c, r("change", d, c));
895
887
  },
@@ -928,8 +920,8 @@ const ye = /* @__PURE__ */ M({
928
920
  }
929
921
  },
930
922
  [
931
- y(_t, {
932
- modelValue: (typeof i[l.key] != "number" && (i[l.key] = O(l), r("change", d, i[l.key])), i[l.key]),
923
+ y($t, {
924
+ modelValue: (typeof i[l.key] != "number" && (i[l.key] = N(l), r("change", d, i[l.key])), i[l.key]),
933
925
  "onUpdate:modelValue": (c) => {
934
926
  c !== i[l.key] && (i[l.key] = c, r("change", d, c));
935
927
  },
@@ -961,11 +953,11 @@ const ye = /* @__PURE__ */ M({
961
953
  return d;
962
954
  })()
963
955
  );
964
- return (d, l) => (_(), U(R));
956
+ return (d, l) => (p(), U(R));
965
957
  }
966
- }), At = (e) => {
967
- e.component("x-prop-tree", $t);
968
- }, zt = { install: At };
958
+ }), Dt = (e) => {
959
+ e.component("x-prop-tree", At);
960
+ }, Rt = { install: Dt };
969
961
  export {
970
- zt as default
962
+ Rt as default
971
963
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-prop-tree",
3
3
  "private": false,
4
- "version": "0.3.3",
4
+ "version": "0.3.6",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -22,30 +22,31 @@
22
22
  "*": "prettier --write ."
23
23
  },
24
24
  "peerDependencies": {
25
- "vue": "^3.4.30",
25
+ "axios": "^1.7.2",
26
+ "vue": "^3.4.31",
26
27
  "vue-i18n": "^9.13.1",
27
- "vuetify": "^3.6.10",
28
- "x-essential-lib": "^0.5.84",
29
- "x-runtime-lib": "^0.3.7"
28
+ "vuetify": "^3.6.12",
29
+ "x-essential-lib": "^0.6.1",
30
+ "x-runtime-lib": "^0.3.8"
30
31
  },
31
32
  "devDependencies": {
32
33
  "@mdi/js": "^7.4.47",
33
- "@rushstack/eslint-patch": "^1.8.0",
34
- "@types/node": "^20.12.2",
35
- "@vitejs/plugin-vue": "^5.0.4",
34
+ "@rushstack/eslint-patch": "^1.10.3",
35
+ "@types/node": "^20.14.10",
36
+ "@vitejs/plugin-vue": "^5.0.5",
36
37
  "@vue/eslint-config-prettier": "^9.0.0",
37
38
  "@vue/eslint-config-typescript": "^13.0.0",
38
39
  "eslint": "^8.57.0",
39
- "eslint-plugin-vue": "^9.24.1",
40
+ "eslint-plugin-vue": "^9.27.0",
40
41
  "husky": "^9.0.11",
41
- "lint-staged": "^15.2.2",
42
- "prettier": "3.2.5",
43
- "sass": "^1.74.1",
44
- "typescript": "^5.2.2",
45
- "vite": "^5.2.0",
46
- "vite-plugin-css-injected-by-js": "^3.5.0",
42
+ "lint-staged": "^15.2.7",
43
+ "prettier": "3.3.2",
44
+ "sass": "^1.77.7",
45
+ "typescript": "^5.5.3",
46
+ "vite": "^5.3.3",
47
+ "vite-plugin-css-injected-by-js": "^3.5.1",
47
48
  "vite-plugin-vuetify": "^2.0.3",
48
49
  "vue-router": "^4.4.0",
49
- "vue-tsc": "^2.0.6"
50
+ "vue-tsc": "^2.0.26"
50
51
  }
51
52
  }