vlite3 1.5.5 → 1.5.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.
Files changed (72) hide show
  1. package/README.md +34 -0
  2. package/VLiteIconsVite.d.ts +36 -0
  3. package/components/AppShell/AppShell.vue.d.ts +1 -1
  4. package/components/AppShell/AppShellLayoutDashboard.vue.js +3 -2
  5. package/components/AppShell/AppShellLayoutDock.vue.js +3 -2
  6. package/components/AppShell/AppShellLayoutHeaderShell.vue.js +28 -27
  7. package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +3 -2
  8. package/components/AsyncSelect/createAsyncSelect.d.ts +4 -4
  9. package/components/AsyncSelect/createAsyncSelect.js +3 -2
  10. package/components/BackButton.vue.d.ts +1 -1
  11. package/components/CategoryManager/CategoryManager.vue2.js +16 -16
  12. package/components/CategoryManager/CategoryNode.vue.js +16 -16
  13. package/components/CategoryMenu/CategoryMenu.vue.js +9 -8
  14. package/components/Chart/BarChart.vue.d.ts +1 -1
  15. package/components/Chart/GanttChart.vue.d.ts +1 -1
  16. package/components/Chart/LineChart.vue.d.ts +1 -1
  17. package/components/Chart/TimelineChart.vue.d.ts +1 -1
  18. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  19. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  20. package/components/ConfirmationModal.vue.d.ts +4 -0
  21. package/components/ConfirmationModal.vue.js +47 -39
  22. package/components/DataTable/DataTable.vue.js +319 -294
  23. package/components/DataTable/DataTableRow.vue.d.ts +2 -0
  24. package/components/DataTable/DataTableRow.vue.js +2 -2
  25. package/components/DataTable/DataTableRow.vue2.js +57 -54
  26. package/components/DataTable/types.d.ts +2 -0
  27. package/components/DatePicker.vue.js +5 -4
  28. package/components/Empty/Empty.vue.js +3 -2
  29. package/components/ExportData/ExportData.vue.d.ts +1 -1
  30. package/components/Form/Form.vue2.js +44 -43
  31. package/components/Form/FormField.vue.js +24 -24
  32. package/components/Heatmap/Heatmap.vue2.js +3 -2
  33. package/components/Icon.vue.d.ts +3 -2
  34. package/components/Icon.vue.js +22 -12
  35. package/components/IconPicker.vue.js +5 -133
  36. package/components/IconPicker.vue2.js +218 -2
  37. package/components/ImportData/ImportData.vue.js +3 -2
  38. package/components/ImportData/ImportStep2.vue.js +3 -2
  39. package/components/Kanban/KanbanBoard.vue2.js +4 -2
  40. package/components/List/utils.js +5 -4
  41. package/components/Masonry/Masonry.vue2.js +14 -13
  42. package/components/Navbar/Navbar.vue.d.ts +1 -1
  43. package/components/Price/Price.vue.js +13 -12
  44. package/components/Rating/Rating.vue.js +2 -2
  45. package/components/Rating/Rating.vue2.js +41 -41
  46. package/components/Rating/ReviewSummary.vue.js +20 -20
  47. package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
  48. package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
  49. package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
  50. package/components/Screen/ScreenFilter.vue.js +7 -5
  51. package/components/Screen/components/ScreenExportModal.vue.d.ts +2 -2
  52. package/components/Stats/StatItem.vue.js +3 -2
  53. package/components/StatusChip/StatusChip.vue.js +6 -5
  54. package/components/Workbook/Sheet.vue.js +11 -11
  55. package/core/config.d.ts +28 -0
  56. package/core/config.js +23 -21
  57. package/core/index.js +18 -17
  58. package/icons/IconRegistry.d.ts +38 -0
  59. package/icons/IconRegistry.js +166 -0
  60. package/icons/IconTypes.d.ts +37 -0
  61. package/index.d.ts +2 -0
  62. package/index.js +473 -457
  63. package/package.json +15 -3
  64. package/style.css +1 -1
  65. package/types/config.type.d.ts +8 -1
  66. package/utils/functions.js +44 -43
  67. package/utils/index.d.ts +1 -0
  68. package/vite.d.ts +6 -0
  69. package/vite.js +223 -0
  70. /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
  71. /package/components/RichTextEditor/{RichTextLinkPopover.vue2.js → RichTextLinkPopover.vue.js} +0 -0
  72. /package/components/RichTextEditor/{RichTextToolbar.vue2.js → RichTextToolbar.vue.js} +0 -0
@@ -1,9 +1,9 @@
1
- import { defineComponent as M, ref as z, computed as I, openBlock as r, createElementBlock as c, normalizeClass as u, Fragment as N, renderList as S, createVNode as h, unref as x, createElementVNode as y, normalizeStyle as T, renderSlot as $, createTextVNode as A, toDisplayString as g, createCommentVNode as E } from "vue";
2
- import { Icon as w } from "@iconify/vue";
3
- const F = ["onMousemove", "onClick"], H = {
1
+ import { defineComponent as k, ref as M, computed as z, openBlock as c, createElementBlock as r, normalizeClass as d, Fragment as N, renderList as S, createVNode as h, createElementVNode as x, normalizeStyle as T, renderSlot as $, createTextVNode as I, toDisplayString as y, createCommentVNode as A } from "vue";
2
+ import g from "../Icon.vue.js";
3
+ const E = ["onMousemove", "onClick"], F = {
4
4
  key: 0,
5
5
  class: "ml-2 text-sm text-foreground/80 font-medium whitespace-nowrap"
6
- }, L = { class: "text-xs text-muted-foreground font-normal" }, D = /* @__PURE__ */ M({
6
+ }, H = { class: "text-xs text-muted-foreground font-normal" }, p = /* @__PURE__ */ k({
7
7
  __name: "Rating",
8
8
  props: {
9
9
  modelValue: { default: 0 },
@@ -22,71 +22,71 @@ const F = ["onMousemove", "onClick"], H = {
22
22
  class: {}
23
23
  },
24
24
  emits: ["update:modelValue", "change", "hover"],
25
- setup(t, { emit: C }) {
26
- const l = t, s = C, n = z(0), d = I(() => n.value > 0 ? n.value : l.modelValue), m = {
25
+ setup(t, { emit: w }) {
26
+ const a = t, s = w, n = M(0), u = z(() => n.value > 0 ? n.value : a.modelValue), m = {
27
27
  sm: "w-4 h-4",
28
28
  md: "w-5 h-5",
29
29
  lg: "w-6 h-6",
30
30
  xl: "w-8 h-8"
31
31
  }, v = (o, e) => {
32
- const a = e === "active" ? l.activeIcon : l.icon;
33
- return Array.isArray(a) ? a[Math.min(o - 1, a.length - 1)] : a;
34
- }, V = (o, e) => {
35
- if (!(l.readonly || l.disabled))
36
- if (l.allowHalf) {
32
+ const l = e === "active" ? a.activeIcon : a.icon;
33
+ return Array.isArray(l) ? l[Math.min(o - 1, l.length - 1)] : l;
34
+ }, C = (o, e) => {
35
+ if (!(a.readonly || a.disabled))
36
+ if (a.allowHalf) {
37
37
  const i = o.currentTarget.getBoundingClientRect(), f = o.clientX - i.left < i.width / 2 ? e - 0.5 : e;
38
38
  n.value !== f && (n.value = f, s("hover", f));
39
39
  } else
40
40
  n.value !== e && (n.value = e, s("hover", e));
41
- }, b = () => {
42
- l.readonly || l.disabled || (n.value = 0, s("hover", 0));
43
- }, B = (o) => {
44
- if (l.readonly || l.disabled) return;
41
+ }, V = () => {
42
+ a.readonly || a.disabled || (n.value = 0, s("hover", 0));
43
+ }, b = (o) => {
44
+ if (a.readonly || a.disabled) return;
45
45
  let e = n.value || o;
46
- l.clearable && l.modelValue === e && (e = 0), s("update:modelValue", e), s("change", e);
47
- }, k = (o) => {
48
- const e = d.value - o + 1;
46
+ a.clearable && a.modelValue === e && (e = 0), s("update:modelValue", e), s("change", e);
47
+ }, B = (o) => {
48
+ const e = u.value - o + 1;
49
49
  return e >= 1 ? 100 : e > 0 ? e * 100 : 0;
50
50
  };
51
- return (o, e) => (r(), c("div", {
52
- class: u(["inline-flex items-center gap-1.5", [l.class, { "opacity-50 cursor-not-allowed": t.disabled }]]),
53
- onMouseleave: b
51
+ return (o, e) => (c(), r("div", {
52
+ class: d(["inline-flex items-center gap-1.5", [a.class, { "opacity-50 cursor-not-allowed": t.disabled }]]),
53
+ onMouseleave: V
54
54
  }, [
55
- (r(!0), c(N, null, S(t.max, (a) => (r(), c("div", {
56
- key: a,
57
- class: u(["relative flex items-center justify-center isolate transition-transform", {
55
+ (c(!0), r(N, null, S(t.max, (l) => (c(), r("div", {
56
+ key: l,
57
+ class: d(["relative flex items-center justify-center isolate transition-transform", {
58
58
  "cursor-pointer hover:scale-110 active:scale-95": !t.readonly && !t.disabled,
59
59
  "cursor-default pointer-events-none": t.readonly || t.disabled
60
60
  }]),
61
- onMousemove: (i) => V(i, a),
62
- onClick: (i) => B(a)
61
+ onMousemove: (i) => C(i, l),
62
+ onClick: (i) => b(l)
63
63
  }, [
64
- h(x(w), {
65
- icon: v(a, "inactive"),
66
- class: u([m[t.size], t.inactiveColor])
64
+ h(g, {
65
+ icon: v(l, "inactive"),
66
+ class: d([m[t.size], t.inactiveColor])
67
67
  }, null, 8, ["icon", "class"]),
68
- y("div", {
68
+ x("div", {
69
69
  class: "absolute inset-0 overflow-hidden",
70
- style: T({ width: `${k(a)}%` })
70
+ style: T({ width: `${B(l)}%` })
71
71
  }, [
72
- h(x(w), {
73
- icon: v(a, "active"),
74
- class: u([m[t.size], t.activeColor, { "is-solid": t.solid }])
72
+ h(g, {
73
+ icon: v(l, "active"),
74
+ class: d([m[t.size], t.activeColor, { "is-solid": t.solid }])
75
75
  }, null, 8, ["icon", "class"])
76
76
  ], 4)
77
- ], 42, F))), 128)),
77
+ ], 42, E))), 128)),
78
78
  $(o.$slots, "text", {
79
- value: d.value,
79
+ value: u.value,
80
80
  max: t.max
81
81
  }, () => [
82
- t.showText ? (r(), c("span", H, [
83
- A(g(d.value) + " ", 1),
84
- y("span", L, "/ " + g(t.max), 1)
85
- ])) : E("", !0)
82
+ t.showText ? (c(), r("span", F, [
83
+ I(y(u.value) + " ", 1),
84
+ x("span", H, "/ " + y(t.max), 1)
85
+ ])) : A("", !0)
86
86
  ], !0)
87
87
  ], 34));
88
88
  }
89
89
  });
90
90
  export {
91
- D as default
91
+ p as default
92
92
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as w, computed as u, openBlock as l, createElementBlock as i, normalizeClass as d, createElementVNode as r, toDisplayString as s, Fragment as m, renderList as f, createVNode as g, unref as x, createCommentVNode as _, createTextVNode as b, normalizeStyle as y } from "vue";
2
- import { Icon as v } from "@iconify/vue";
3
- const k = { class: "flex flex-col items-center justify-center py-4 sm:w-1/3 w-full shrink-0" }, R = { class: "text-5xl font-bold tracking-tighter text-foreground" }, D = { class: "flex items-center gap-1 mt-3 text-amber-400" }, N = {
1
+ import { defineComponent as h, computed as u, openBlock as l, createElementBlock as i, normalizeClass as d, createElementVNode as r, toDisplayString as s, Fragment as m, renderList as f, createVNode as g, createCommentVNode as w, createTextVNode as _, normalizeStyle as b } from "vue";
2
+ import x from "../Icon.vue.js";
3
+ const y = { class: "flex flex-col items-center justify-center py-4 sm:w-1/3 w-full shrink-0" }, k = { class: "text-5xl font-bold tracking-tighter text-foreground" }, R = { class: "flex items-center gap-1 mt-3 text-amber-400" }, D = {
4
4
  key: 0,
5
5
  class: "text-sm text-muted-foreground mt-2 font-medium"
6
- }, B = { class: "flex flex-col gap-2 w-full flex-grow" }, C = { class: "flex items-center gap-1 text-sm font-medium text-foreground min-w-[70px]" }, T = { class: "h-3.5 bg-muted rounded-full w-full overflow-hidden flex-grow shrink-0 relative shadow-inner" }, V = { class: "text-sm font-medium text-muted-foreground text-right min-w-[36px]" }, E = /* @__PURE__ */ w({
6
+ }, N = { class: "flex flex-col gap-2 w-full flex-grow" }, B = { class: "flex items-center gap-1 text-sm font-medium text-foreground min-w-[70px]" }, C = { class: "h-3.5 bg-muted rounded-full w-full overflow-hidden flex-grow shrink-0 relative shadow-inner" }, T = { class: "text-sm font-medium text-muted-foreground text-right min-w-[36px]" }, z = /* @__PURE__ */ h({
7
7
  __name: "ReviewSummary",
8
8
  props: {
9
9
  ratingDistribution: {},
@@ -13,21 +13,21 @@ const k = { class: "flex flex-col items-center justify-center py-4 sm:w-1/3 w-fu
13
13
  class: {}
14
14
  },
15
15
  setup(c) {
16
- const e = c, p = u(() => [...e.ratingDistribution].sort((n, o) => o.rating - n.rating)), a = u(() => {
16
+ const e = c, v = u(() => [...e.ratingDistribution].sort((n, o) => o.rating - n.rating)), a = u(() => {
17
17
  if (e.averageRating !== void 0) return e.averageRating;
18
18
  if (e.ratingDistribution.length === 0) return 0;
19
19
  let n = 0, o = 0;
20
20
  for (const t of e.ratingDistribution)
21
21
  t.count !== void 0 && (n += t.rating * t.count, o += t.count);
22
22
  return o > 0 ? Number((n / o).toFixed(1)) : 0;
23
- }), h = u(() => e.totalReviews !== void 0 ? e.totalReviews : e.ratingDistribution.reduce((n, o) => n + (o.count || 0), 0));
23
+ }), p = u(() => e.totalReviews !== void 0 ? e.totalReviews : e.ratingDistribution.reduce((n, o) => n + (o.count || 0), 0));
24
24
  return (n, o) => (l(), i("div", {
25
25
  class: d(["flex flex-col sm:flex-row gap-6 md:gap-10 items-start w-full", e.class])
26
26
  }, [
27
- r("div", k, [
28
- r("div", R, s(a.value), 1),
29
- r("div", D, [
30
- (l(), i(m, null, f(5, (t) => g(x(v), {
27
+ r("div", y, [
28
+ r("div", k, s(a.value), 1),
29
+ r("div", R, [
30
+ (l(), i(m, null, f(5, (t) => g(x, {
31
31
  key: t,
32
32
  icon: "lucide:star",
33
33
  class: d(["w-5 h-5 transition-all", {
@@ -36,32 +36,32 @@ const k = { class: "flex flex-col items-center justify-center py-4 sm:w-1/3 w-fu
36
36
  }])
37
37
  }, null, 8, ["class"])), 64))
38
38
  ]),
39
- c.showTotal ? (l(), i("p", N, " Based on " + s(h.value) + " global ratings ", 1)) : _("", !0)
39
+ c.showTotal ? (l(), i("p", D, " Based on " + s(p.value) + " global ratings ", 1)) : w("", !0)
40
40
  ]),
41
- r("div", B, [
42
- (l(!0), i(m, null, f(p.value, (t) => (l(), i("div", {
41
+ r("div", N, [
42
+ (l(!0), i(m, null, f(v.value, (t) => (l(), i("div", {
43
43
  key: t.rating,
44
44
  class: "flex items-center gap-3 w-full"
45
45
  }, [
46
- r("div", C, [
47
- b(s(t.rating) + " ", 1),
48
- g(x(v), {
46
+ r("div", B, [
47
+ _(s(t.rating) + " ", 1),
48
+ g(x, {
49
49
  icon: "lucide:star",
50
50
  class: "w-4 h-4 text-amber-400 fill-amber-400"
51
51
  })
52
52
  ]),
53
- r("div", T, [
53
+ r("div", C, [
54
54
  r("div", {
55
55
  class: "h-full bg-amber-400 rounded-full transition-all duration-1000 ease-out",
56
- style: y({ width: `${t.percentage}%` })
56
+ style: b({ width: `${t.percentage}%` })
57
57
  }, null, 4)
58
58
  ]),
59
- r("div", V, s(t.percentage) + "% ", 1)
59
+ r("div", T, s(t.percentage) + "% ", 1)
60
60
  ]))), 128))
61
61
  ])
62
62
  ], 2));
63
63
  }
64
64
  });
65
65
  export {
66
- E as default
66
+ z as default
67
67
  };
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as te, ref as v, shallowRef as ne, watch as oe, computed as h, onMounted as le, onUnmounted as ae, openBlock as C, createElementBlock as L, normalizeClass as re, toDisplayString as I, createCommentVNode as U, createElementVNode as w, createVNode as q, unref as a, normalizeStyle as ie } from "vue";
2
2
  /* empty css */
3
- import se from "./RichTextToolbar.vue2.js";
4
- /* empty css */
5
- import de from "./RichTextLinkPopover.vue2.js";
6
- /* empty css */
3
+ import se from "./RichTextToolbar.vue.js";
4
+ /* empty css */
5
+ import de from "./RichTextLinkPopover.vue.js";
6
+ /* empty css */
7
7
  import { useRichTextImageUpload as ue } from "./composables/useRichTextImageUpload.js";
8
8
  import { useRichTextLinks as ce } from "./composables/useRichTextLinks.js";
9
9
  const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { class: "rte-wrapper" }, ye = { class: "rte-body-wrap" }, ge = ["id", "contenteditable", "aria-label", "aria-readonly", "aria-disabled", "aria-invalid"], be = ["id"], Se = /* @__PURE__ */ te({
@@ -1,5 +1,5 @@
1
- import o from "./RichTextLinkPopover.vue2.js";
2
- /* empty css */
1
+ import o from "./RichTextLinkPopover.vue.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -1,5 +1,5 @@
1
- import o from "./RichTextToolbar.vue2.js";
2
- /* empty css */
1
+ import o from "./RichTextToolbar.vue.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -17,22 +17,24 @@ import "v-datepicker-lite/style.css";
17
17
  /* empty css */
18
18
  import "@jaames/iro";
19
19
  import "@vueuse/core";
20
- /* empty css */
20
+ /* empty css */
21
21
  import "iconify-icon-picker";
22
22
  import "iconify-icon-picker/style.css";
23
+ import "../../icons/IconRegistry.js";
24
+ /* empty css */
23
25
  /* empty css */
24
26
  /* empty css */
25
27
  /* empty css */
26
28
  /* empty css */
27
- /* empty css */
28
- /* empty css */
29
+ /* empty css */
30
+ /* empty css */
29
31
  import "../../core/config.js";
30
32
  /* empty css */
31
33
  /* empty css */
32
34
  const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }, A = { style: { "will-change": "transform", contain: "layout style" } }, E = {
33
35
  class: "pt-2 px-2 min-w-[295px]",
34
36
  style: { "will-change": "transform", contain: "layout style" }
35
- }, de = /* @__PURE__ */ $({
37
+ }, fe = /* @__PURE__ */ $({
36
38
  __name: "ScreenFilter",
37
39
  props: {
38
40
  schema: {},
@@ -195,5 +197,5 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
195
197
  }
196
198
  });
197
199
  export {
198
- de as default
200
+ fe as default
199
201
  };
@@ -19,8 +19,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
19
19
  icon: string;
20
20
  }[]>;
21
21
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
22
- title: string;
23
22
  mode: "frontend" | "backend";
23
+ title: string;
24
24
  buttonText: string;
25
25
  buttonIcon: string;
26
26
  formats: import('../../ExportData').ExportFormat[];
@@ -39,8 +39,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
39
39
  icon: string;
40
40
  }[]>;
41
41
  }, {}, {}, {}, {
42
- title: string;
43
42
  mode: "frontend" | "backend";
43
+ title: string;
44
44
  buttonText: string;
45
45
  buttonIcon: string;
46
46
  formats: import('../../ExportData').ExportFormat[];
@@ -6,6 +6,7 @@ import z from "./components/StatIconBox.vue.js";
6
6
  import S from "../Tooltip.vue.js";
7
7
  import E from "../Chart/LineChart.vue.js";
8
8
  import { configState as L } from "../../core/config.js";
9
+ import "../../icons/IconRegistry.js";
9
10
  import { resolveColor as q } from "../Chart/utils.js";
10
11
  const A = { class: "flex items-start gap-3 w-full" }, G = { class: "flex-1 min-w-0" }, J = {
11
12
  key: 0,
@@ -37,7 +38,7 @@ const A = { class: "flex items-start gap-3 w-full" }, G = { class: "flex-1 min-w
37
38
  }, p = { class: "flex-1 flex flex-col justify-center min-w-0" }, _ = { class: "flex items-baseline gap-2 mt-1" }, tt = {
38
39
  key: 0,
39
40
  class: "h-8 w-24 bg-gray-50 animate-pulse rounded-md"
40
- }, ut = /* @__PURE__ */ M({
41
+ }, mt = /* @__PURE__ */ M({
41
42
  __name: "StatItem",
42
43
  props: {
43
44
  item: {},
@@ -415,5 +416,5 @@ const A = { class: "flex items-start gap-3 w-full" }, G = { class: "flex-1 min-w
415
416
  }
416
417
  });
417
418
  export {
418
- ut as default
419
+ mt as default
419
420
  };
@@ -1,10 +1,11 @@
1
- import { defineComponent as u, computed as l, openBlock as c, createBlock as f, unref as p, normalizeClass as m } from "vue";
1
+ import { defineComponent as u, computed as l, openBlock as c, createBlock as p, unref as f, normalizeClass as m } from "vue";
2
2
  import d from "../Chip/Chip.vue.js";
3
3
  /* empty css */
4
4
  import { resolveStatus as v } from "./status-map.js";
5
5
  import { $t as b } from "../../utils/i18n.js";
6
6
  import { useVLiteConfig as h } from "../../core/config.js";
7
- const S = /* @__PURE__ */ u({
7
+ import "../../icons/IconRegistry.js";
8
+ const k = /* @__PURE__ */ u({
8
9
  __name: "StatusChip",
9
10
  props: {
10
11
  status: {},
@@ -15,8 +16,8 @@ const S = /* @__PURE__ */ u({
15
16
  class: { default: "" }
16
17
  },
17
18
  setup(a) {
18
- const e = a, s = h(), n = l(() => s?.components?.statusChip), i = l(() => e.hideIcon !== null ? e.hideIcon : n.value?.hideIcon ?? !1), t = l(() => v(e.status, n.value?.customStatuses)), r = l(() => e.labelI18n ? b(e.labelI18n) : t.value.label ? t.value.label : e.label ? e.label : e.status.replace(/[_\-]+/g, " ").replace(/\b\w/g, (o) => o.toUpperCase()));
19
- return (o, I) => (c(), f(p(d), {
19
+ const e = a, s = h(), o = l(() => s?.components?.statusChip), i = l(() => e.hideIcon !== null ? e.hideIcon : o.value?.hideIcon ?? !1), t = l(() => v(e.status, o.value?.customStatuses)), r = l(() => e.labelI18n ? b(e.labelI18n) : t.value.label ? t.value.label : e.label ? e.label : e.status.replace(/[_\-]+/g, " ").replace(/\b\w/g, (n) => n.toUpperCase()));
20
+ return (n, I) => (c(), p(f(d), {
20
21
  text: r.value,
21
22
  variant: t.value.variant,
22
23
  icon: i.value ? void 0 : t.value.icon,
@@ -26,5 +27,5 @@ const S = /* @__PURE__ */ u({
26
27
  }
27
28
  });
28
29
  export {
29
- S as default
30
+ k as default
30
31
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as I, ref as b, computed as v, openBlock as r, createElementBlock as d, normalizeClass as $, createElementVNode as u, withModifiers as a, createBlock as S, withCtx as x, createVNode as m, createCommentVNode as V, withDirectives as j, withKeys as g, vModelText as z, toDisplayString as K, unref as M, nextTick as N } from "vue";
1
+ import { defineComponent as I, ref as b, computed as v, openBlock as r, createElementBlock as d, normalizeClass as S, createElementVNode as u, withModifiers as a, createBlock as $, withCtx as x, createVNode as m, createCommentVNode as V, withDirectives as j, withKeys as g, vModelText as z, toDisplayString as K, unref as M, nextTick as N } from "vue";
2
2
  import y from "../Icon.vue.js";
3
3
  import O from "../Dropdown/Dropdown.vue.js";
4
4
  import { $t as l } from "../../utils/i18n.js";
@@ -7,13 +7,13 @@ import { $t as l } from "../../utils/i18n.js";
7
7
  /* empty css */
8
8
  import R from "../Button.vue.js";
9
9
  import A from "../IconPicker.vue.js";
10
- const U = {
10
+ const P = {
11
11
  type: "button",
12
12
  class: "flex items-center justify-center rounded hover:bg-accent transition-colors p-0.5 outline-none focus-visible:ring-2 focus-visible:ring-primary/20 mt-1"
13
- }, q = {
13
+ }, U = {
14
14
  key: 1,
15
15
  class: "flex items-center justify-center p-0.5"
16
- }, F = { class: "flex-1 min-w-0 pr-1" }, G = ["onKeydown"], H = {
16
+ }, q = { class: "flex-1 min-w-0 pr-1" }, F = ["onKeydown"], G = {
17
17
  key: 1,
18
18
  class: "block truncate text-sm font-medium leading-normal"
19
19
  }, ee = /* @__PURE__ */ I({
@@ -88,7 +88,7 @@ const U = {
88
88
  e.isEditing ? "cursor-text" : ""
89
89
  ].filter(Boolean).join(" "));
90
90
  return (n, t) => (r(), d("div", {
91
- class: $(E.value),
91
+ class: S(E.value),
92
92
  onClick: t[5] || (t[5] = (c) => o("select", i.sheet.id)),
93
93
  onDblclick: h
94
94
  }, [
@@ -97,14 +97,14 @@ const U = {
97
97
  }, ["stop"])),
98
98
  class: "mr-2 flex items-center shrink-0"
99
99
  }, [
100
- (i.sheet.icon || i.isEditing) && i.allowIconChange ? (r(), S(A, {
100
+ (i.sheet.icon || i.isEditing) && i.allowIconChange ? (r(), $(A, {
101
101
  key: 0,
102
102
  value: i.sheet.icon || "lucide:file",
103
103
  position: "bottom-start",
104
104
  onOnSelect: t[0] || (t[0] = (c) => o("update:icon", i.sheet.id, c))
105
105
  }, {
106
106
  default: x(() => [
107
- u("button", U, [
107
+ u("button", P, [
108
108
  m(y, {
109
109
  icon: i.sheet.icon || "lucide:file",
110
110
  class: "w-4 h-4 opacity-70 hover:opacity-100 transition-opacity"
@@ -112,14 +112,14 @@ const U = {
112
112
  ])
113
113
  ]),
114
114
  _: 1
115
- }, 8, ["value"])) : i.sheet.icon ? (r(), d("div", q, [
115
+ }, 8, ["value"])) : i.sheet.icon ? (r(), d("div", U, [
116
116
  m(y, {
117
117
  icon: i.sheet.icon,
118
118
  class: "w-4 h-4 opacity-70"
119
119
  }, null, 8, ["icon"])
120
120
  ])) : V("", !0)
121
121
  ]),
122
- u("div", F, [
122
+ u("div", q, [
123
123
  i.isEditing ? j((r(), d("input", {
124
124
  key: 0,
125
125
  ref_key: "inputRef",
@@ -134,9 +134,9 @@ const U = {
134
134
  ],
135
135
  onClick: t[3] || (t[3] = a(() => {
136
136
  }, ["stop"]))
137
- }, null, 40, G)), [
137
+ }, null, 40, F)), [
138
138
  [z, s.value]
139
- ]) : (r(), d("span", H, K(C.value), 1))
139
+ ]) : (r(), d("span", G, K(C.value), 1))
140
140
  ]),
141
141
  u("div", {
142
142
  class: "opacity-0 group-hover:opacity-100 transition-opacity ml-auto pl-1 -mr-2 flex items-center",
package/core/config.d.ts CHANGED
@@ -182,6 +182,20 @@ export declare const configState: {
182
182
  };
183
183
  };
184
184
  scale: VLiteScale;
185
+ icons: {
186
+ mode: import('../index.ts').VLiteIconMode;
187
+ fallback: string | {
188
+ body: string;
189
+ left?: number;
190
+ top?: number;
191
+ width?: number;
192
+ height?: number;
193
+ rotate?: number;
194
+ hFlip?: boolean;
195
+ vFlip?: boolean;
196
+ };
197
+ warnOnMissing: boolean;
198
+ };
185
199
  };
186
200
  /**
187
201
  * Helper to update the global configuration safely.
@@ -369,4 +383,18 @@ export declare function useVLiteConfig(): {
369
383
  };
370
384
  };
371
385
  scale: VLiteScale;
386
+ icons: {
387
+ mode: import('../index.ts').VLiteIconMode;
388
+ fallback: string | {
389
+ body: string;
390
+ left?: number;
391
+ top?: number;
392
+ width?: number;
393
+ height?: number;
394
+ rotate?: number;
395
+ hFlip?: boolean;
396
+ vFlip?: boolean;
397
+ };
398
+ warnOnMissing: boolean;
399
+ };
372
400
  };
package/core/config.js CHANGED
@@ -1,8 +1,10 @@
1
- import { reactive as i, inject as s } from "vue";
2
- import { deepMerge as n } from "../utils/object.js";
3
- import { DEFAULT_VLITE_SCALE as r, applyVLiteScale as o, resolveVLiteScale as a } from "./CoreScale.js";
4
- const l = /* @__PURE__ */ Symbol("vlite-config"), f = {
5
- scale: r,
1
+ import { reactive as s, inject as r } from "vue";
2
+ import { deepMerge as a } from "../utils/object.js";
3
+ import { DEFAULT_VLITE_SCALE as f, applyVLiteScale as t, resolveVLiteScale as l } from "./CoreScale.js";
4
+ import { getVLiteIconConfig as m, configureVLiteIcons as g } from "../icons/IconRegistry.js";
5
+ const d = /* @__PURE__ */ Symbol("vlite-config"), p = {
6
+ scale: f,
7
+ icons: m(),
6
8
  services: {},
7
9
  components: {
8
10
  form: {},
@@ -19,25 +21,25 @@ const l = /* @__PURE__ */ Symbol("vlite-config"), f = {
19
21
  customStatuses: {}
20
22
  }
21
23
  }
22
- }, t = i({ ...f });
23
- function p(e) {
24
- const c = n(t, {
25
- ...e,
26
- ...e.scale === void 0 ? {} : { scale: a(e.scale) }
24
+ }, e = s({ ...p });
25
+ function V(o) {
26
+ const { icons: c, ...i } = o, n = a(e, {
27
+ ...i,
28
+ ...o.scale === void 0 ? {} : { scale: l(o.scale) }
27
29
  });
28
- Object.assign(t, c), e.scale !== void 0 && (t.scale = o(t.scale));
30
+ Object.assign(e, n), c !== void 0 && (e.icons = g(c)), o.scale !== void 0 && (e.scale = t(e.scale));
29
31
  }
30
- function S(e) {
31
- const c = o(e);
32
- return t.scale = c, c;
32
+ function C(o) {
33
+ const c = t(o);
34
+ return e.scale = c, c;
33
35
  }
34
- function g() {
35
- return s(l, t);
36
+ function I() {
37
+ return r(d, e);
36
38
  }
37
39
  export {
38
- l as VLITE_CONFIG_KEY,
39
- t as configState,
40
- S as setVLiteScale,
41
- p as updateConfig,
42
- g as useVLiteConfig
40
+ d as VLITE_CONFIG_KEY,
41
+ e as configState,
42
+ C as setVLiteScale,
43
+ V as updateConfig,
44
+ I as useVLiteConfig
43
45
  };
package/core/index.js CHANGED
@@ -1,11 +1,12 @@
1
1
  import { configState as e, VLITE_CONFIG_KEY as o } from "./config.js";
2
- import { setVLiteScale as r, updateConfig as l, useVLiteConfig as L } from "./config.js";
3
- import { initializeVLiteScale as a } from "./CoreScale.js";
4
- import { DEFAULT_VLITE_SCALE as u, VLITE_SCALE_ATTRIBUTE as S, VLITE_SCALE_STORAGE_KEY as g, applyVLiteScale as E, getStoredVLiteScale as V, isVLiteScale as C, resolveVLiteScale as v } from "./CoreScale.js";
5
- function n(t = {}) {
2
+ import { setVLiteScale as L, updateConfig as f, useVLiteConfig as u } from "./config.js";
3
+ import { initializeVLiteScale as m } from "./CoreScale.js";
4
+ import { DEFAULT_VLITE_SCALE as g, VLITE_SCALE_ATTRIBUTE as V, VLITE_SCALE_STORAGE_KEY as E, applyVLiteScale as C, getStoredVLiteScale as v, isVLiteScale as D, resolveVLiteScale as T } from "./CoreScale.js";
5
+ import { configureVLiteIcons as s } from "../icons/IconRegistry.js";
6
+ function r(t = {}) {
6
7
  return {
7
8
  install(c) {
8
- e.scale = a(t.scale), t && (t.services && (e.services = { ...e.services, ...t.services }), t.importData && (e.importData = { ...e.importData, ...t.importData }), t.exportData && (e.exportData = { ...e.exportData, ...t.exportData }), t.components && (e.components = {
9
+ e.icons = s(t.icons), e.scale = m(t.scale), t && (t.services && (e.services = { ...e.services, ...t.services }), t.importData && (e.importData = { ...e.importData, ...t.importData }), t.exportData && (e.exportData = { ...e.exportData, ...t.exportData }), t.components && (e.components = {
9
10
  ...e.components,
10
11
  ...t.components,
11
12
  form: {
@@ -53,18 +54,18 @@ function n(t = {}) {
53
54
  };
54
55
  }
55
56
  export {
56
- u as DEFAULT_VLITE_SCALE,
57
+ g as DEFAULT_VLITE_SCALE,
57
58
  o as VLITE_CONFIG_KEY,
58
- S as VLITE_SCALE_ATTRIBUTE,
59
- g as VLITE_SCALE_STORAGE_KEY,
60
- E as applyVLiteScale,
59
+ V as VLITE_SCALE_ATTRIBUTE,
60
+ E as VLITE_SCALE_STORAGE_KEY,
61
+ C as applyVLiteScale,
61
62
  e as configState,
62
- n as createVLite,
63
- V as getStoredVLiteScale,
64
- a as initializeVLiteScale,
65
- C as isVLiteScale,
66
- v as resolveVLiteScale,
67
- r as setVLiteScale,
68
- l as updateConfig,
69
- L as useVLiteConfig
63
+ r as createVLite,
64
+ v as getStoredVLiteScale,
65
+ m as initializeVLiteScale,
66
+ D as isVLiteScale,
67
+ T as resolveVLiteScale,
68
+ L as setVLiteScale,
69
+ f as updateConfig,
70
+ u as useVLiteConfig
70
71
  };
@@ -0,0 +1,38 @@
1
+ import { IconifyIcon } from '@iconify/vue';
2
+ import { ResolvedVLiteIconsConfig, VLiteIconCollection, VLiteIconListOptions, VLiteIconRegistrationResult, VLiteIconsConfig, VLiteIconSource } from './IconTypes';
3
+ export declare function isVLiteIconName(name: string): boolean;
4
+ /**
5
+ * Register one Iconify icon in the same module registry used by VLite's Icon.
6
+ */
7
+ export declare function registerVLiteIcon(name: string, data: IconifyIcon): boolean;
8
+ /**
9
+ * Register one complete or partial IconifyJSON collection.
10
+ */
11
+ export declare function registerVLiteIconCollection(collection: VLiteIconCollection): VLiteIconRegistrationResult;
12
+ export declare function registerVLiteIconCollections(collections: VLiteIconCollection | readonly VLiteIconCollection[]): VLiteIconRegistrationResult;
13
+ /**
14
+ * Register the data-bearing part of an icon configuration without changing
15
+ * the current online/hybrid/offline resolution strategy.
16
+ */
17
+ export declare function registerVLiteIcons(registration: Pick<VLiteIconsConfig, 'collections' | 'individualIcons'>): VLiteIconRegistrationResult;
18
+ /**
19
+ * Configure resolution and synchronously register supplied local data.
20
+ */
21
+ export declare function configureVLiteIcons(config?: VLiteIconsConfig): ResolvedVLiteIconsConfig;
22
+ export declare function getVLiteIconConfig(): ResolvedVLiteIconsConfig;
23
+ export declare function hasVLiteIcon(name: string): boolean;
24
+ /**
25
+ * Resolve only explicitly VLite-registered local data. This never loads.
26
+ */
27
+ export declare function resolveVLiteIcon(name: string): Required<IconifyIcon> | null;
28
+ export declare function listVLiteIcons(options?: VLiteIconListOptions): string[];
29
+ export declare function warnOnMissingVLiteIcon(name: string): void;
30
+ /**
31
+ * Resolve the value passed to Iconify's Vue renderer. Offline mode returns
32
+ * icon data (or null) only, so unresolved names never reach its API loader.
33
+ */
34
+ export declare function resolveVLiteIconForRendering(icon: VLiteIconSource): VLiteIconSource | null;
35
+ /**
36
+ * Serialize a registered icon for IconPicker's existing SVG event payload.
37
+ */
38
+ export declare function renderVLiteIconSvg(name: string): string;