vlite3 1.4.32 → 1.4.34

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 (44) hide show
  1. package/README.md +7 -0
  2. package/components/Alert.vue.js +45 -40
  3. package/components/Barcode/Barcode.vue.js +34 -21
  4. package/components/CategoryManager/CategoryNode.vue.js +30 -30
  5. package/components/CategoryMenu/CategoryMenu.vue.js +9 -11
  6. package/components/Chart/GanttChart.vue.d.ts +5 -1
  7. package/components/Chart/GanttChart.vue.js +2 -2
  8. package/components/Chart/GanttChart.vue2.js +977 -812
  9. package/components/Chart/GanttChartConnectorRouting.d.ts +83 -0
  10. package/components/Chart/GanttChartConnectorRouting.js +405 -0
  11. package/components/Chart/GanttChartDependencyUtils.js +43 -47
  12. package/components/Chart/types.d.ts +16 -1
  13. package/components/ColorPicker/ColorIro.vue2.js +78 -64
  14. package/components/ColorPicker/ColorPicker.vue.d.ts +5 -0
  15. package/components/ColorPicker/ColorPicker.vue.js +110 -64
  16. package/components/ColorPicker/constants.d.ts +2 -0
  17. package/components/ColorPicker/constants.js +4 -0
  18. package/components/ColorPicker/index.d.ts +1 -0
  19. package/components/Dropdown/Dropdown.vue.js +100 -97
  20. package/components/ExportData/ExportData.vue.js +85 -63
  21. package/components/FilePreview/FilePreview.vue.js +31 -13
  22. package/components/Form/FormField.vue.js +9 -8
  23. package/components/ImportData/ImportStep1.vue.js +80 -75
  24. package/components/Kanban/Kanban.vue.d.ts +16 -2
  25. package/components/Kanban/Kanban.vue.js +2 -2
  26. package/components/Kanban/Kanban.vue2.js +150 -86
  27. package/components/Kanban/types.d.ts +37 -0
  28. package/components/QRCode/QRCode.vue.js +31 -26
  29. package/components/ToastNotification.vue.js +1 -1
  30. package/components/ToastNotification.vue2.js +3 -3
  31. package/components/index.d.ts +1 -1
  32. package/composables/useKeyStroke.d.ts +18 -0
  33. package/composables/useKeyStroke.js +103 -77
  34. package/composables/useTheme.js +1 -1
  35. package/directives/vScrollReveal.js +23 -18
  36. package/index.d.ts +1 -0
  37. package/index.js +235 -233
  38. package/package.json +11 -4
  39. package/style.css +1 -1
  40. package/utils/UtilsModuleInterop.d.ts +6 -0
  41. package/utils/UtilsModuleInterop.js +9 -0
  42. package/utils/environment.d.ts +29 -0
  43. package/utils/environment.js +4 -0
  44. package/utils/functions.js +14 -13
@@ -38,6 +38,36 @@ export interface KanbanMoveEvent {
38
38
  oldIndex: number;
39
39
  newIndex: number;
40
40
  }
41
+ /**
42
+ * Extra context passed as the 5th argument to `onItemMoved` / `@item-moved`.
43
+ * `revert()` restores the card to its pre-drop column and index immediately.
44
+ */
45
+ export interface KanbanItemMovedMeta {
46
+ fromColumnId: string | number;
47
+ oldIndex: number;
48
+ newIndex: number;
49
+ previousPosition: any;
50
+ /** Imperative escape hatch — usually unnecessary; the board auto-reverts on reject/false. */
51
+ revert: () => void;
52
+ }
53
+ /**
54
+ * Async move handler. Return a Promise that settles when the server confirms.
55
+ *
56
+ * - resolve / return `void` | `true` → keep the optimistic placement
57
+ * - return `false` → auto-revert the card to its previous column/index
58
+ * - reject / throw → auto-revert (same as `false`)
59
+ *
60
+ * Bound via `:on-item-moved` or `@item-moved` (both map to this prop).
61
+ */
62
+ export type KanbanItemMovedHandler = (itemId: string | number, toColumnId: string | number, newPosition: number, item: any, meta: KanbanItemMovedMeta) => void | boolean | Promise<void | boolean>;
63
+ export interface KanbanItemMoveFailedPayload {
64
+ itemId: string | number;
65
+ toColumnId: string | number;
66
+ fromColumnId: string | number;
67
+ newPosition: number;
68
+ item: any;
69
+ error: unknown;
70
+ }
41
71
  export interface KanbanProps {
42
72
  columns: KanbanColumn[];
43
73
  group?: string;
@@ -61,4 +91,11 @@ export interface KanbanProps {
61
91
  * Example: :is-item-disabled="(item) => item.locked === true"
62
92
  */
63
93
  isItemDisabled?: (item: any) => boolean;
94
+ /**
95
+ * Called after an optimistic drop. Await a mutation here — if it rejects
96
+ * (or returns `false`), the board automatically moves the card back.
97
+ *
98
+ * Use `@item-moved` or `:on-item-moved` — both bind this prop.
99
+ */
100
+ onItemMoved?: KanbanItemMovedHandler;
64
101
  }
@@ -1,9 +1,9 @@
1
- import { defineComponent as h, ref as v, computed as c, watchEffect as y, openBlock as s, createElementBlock as u, normalizeStyle as x, toDisplayString as z, createCommentVNode as C } from "vue";
2
- import _ from "qrcode";
3
- const U = ["src", "alt"], k = {
1
+ import { defineComponent as x, ref as g, computed as s, watchEffect as R, openBlock as u, createElementBlock as f, normalizeStyle as U, toDisplayString as z, createCommentVNode as C } from "vue";
2
+ import { resolveModuleRuntime as _ } from "../../utils/UtilsModuleInterop.js";
3
+ const k = ["src", "alt"], L = {
4
4
  key: 1,
5
5
  class: "text-[10px] text-danger text-center leading-tight px-1"
6
- }, R = /* @__PURE__ */ h({
6
+ }, Q = /* @__PURE__ */ x({
7
7
  __name: "QRCode",
8
8
  props: {
9
9
  value: {},
@@ -15,19 +15,19 @@ const U = ["src", "alt"], k = {
15
15
  alt: { default: "QR Code" },
16
16
  color: {}
17
17
  },
18
- setup(f) {
19
- const e = f, n = v(""), r = v("");
20
- let o = 0;
21
- const l = c(() => {
18
+ setup(m) {
19
+ const e = m, a = g(""), r = g("");
20
+ let l = 0;
21
+ const i = s(() => {
22
22
  const t = e.value || "";
23
23
  return /^data:image\//i.test(t) ? t : "";
24
24
  });
25
- y(async () => {
26
- const t = ++o;
27
- n.value = "", r.value = "";
28
- const i = e.value?.trim() || "", p = e.imageUrl || l.value;
29
- if (!i || p) return;
30
- const m = {
25
+ R(async () => {
26
+ const t = ++l;
27
+ a.value = "", r.value = "";
28
+ const c = e.value?.trim() || "", y = e.imageUrl || i.value;
29
+ if (typeof window > "u" || !c || y) return;
30
+ const v = {
31
31
  errorCorrectionLevel: e.errorCorrectionLevel,
32
32
  margin: e.margin,
33
33
  color: {
@@ -35,34 +35,39 @@ const U = ["src", "alt"], k = {
35
35
  light: e.color?.light || "#ffffffff"
36
36
  }
37
37
  };
38
- typeof e.size == "number" && (m.width = e.size * e.scale);
38
+ typeof e.size == "number" && (v.width = e.size * e.scale);
39
39
  try {
40
- const a = await _.toDataURL(i, m);
41
- t === o && (n.value = a);
42
- } catch (a) {
43
- t === o && (r.value = a instanceof Error ? a.message : "Failed to render QR code");
40
+ const o = await import("qrcode"), p = _(
41
+ o,
42
+ (n) => !!(n && typeof n == "object" && "toDataURL" in n && typeof n.toDataURL == "function")
43
+ );
44
+ if (!p) throw new Error("The QR code runtime is unavailable.");
45
+ const w = await p.toDataURL(c, v);
46
+ t === l && (a.value = w);
47
+ } catch (o) {
48
+ t === l && (r.value = o instanceof Error ? o.message : "Failed to render QR code");
44
49
  }
45
50
  });
46
- const d = c(() => e.imageUrl ? e.imageUrl : l.value ? l.value : n.value), g = c(() => {
51
+ const d = s(() => e.imageUrl ? e.imageUrl : i.value ? i.value : a.value), h = s(() => {
47
52
  const t = typeof e.size == "number" ? `${e.size}px` : e.size;
48
53
  return {
49
54
  width: t,
50
55
  height: t
51
56
  };
52
57
  });
53
- return (t, i) => (s(), u("div", {
58
+ return (t, c) => (u(), f("div", {
54
59
  class: "inline-flex justify-center items-center max-w-full",
55
- style: x(g.value)
60
+ style: U(h.value)
56
61
  }, [
57
- d.value ? (s(), u("img", {
62
+ d.value ? (u(), f("img", {
58
63
  key: 0,
59
64
  src: d.value,
60
- alt: f.alt,
65
+ alt: m.alt,
61
66
  class: "w-full h-full object-contain pointer-events-none"
62
- }, null, 8, U)) : r.value ? (s(), u("span", k, z(r.value), 1)) : C("", !0)
67
+ }, null, 8, k)) : r.value ? (u(), f("span", L, z(r.value), 1)) : C("", !0)
63
68
  ], 4));
64
69
  }
65
70
  });
66
71
  export {
67
- R as default
72
+ Q as default
68
73
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ToastNotification.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9c775c23"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b3a7f1a6"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -87,7 +87,7 @@ const Z = {
87
87
  (o(), y(U, { to: "body" }, [
88
88
  (o(), i(v, null, _(V, (t) => m("div", {
89
89
  key: t,
90
- class: g(["fixed z-[9999999999]! px-4 flex flex-col gap-2 transition-all duration-300 max-w-full sm:max-w-120", [
90
+ class: g(["fixed z-[9999999999]! pointer-events-none px-4 flex flex-col gap-2 transition-all duration-300 max-w-full sm:max-w-120", [
91
91
  N[t],
92
92
  t.includes("center") ? "items-center" : t.includes("right") ? "items-end" : "items-start"
93
93
  ]]),
@@ -95,7 +95,7 @@ const Z = {
95
95
  onMouseleave: j
96
96
  }, [
97
97
  m("div", {
98
- class: g(["relative w-full transition-all pointer-events-auto", [{ "flex-col-reverse": t.includes("top") }]])
98
+ class: g(["relative w-full transition-all", [{ "flex-col-reverse": t.includes("top") }]])
99
99
  }, [
100
100
  w(q, {
101
101
  name: d(t).length <= 1 ? "first-toast" : "stack-toast",
@@ -117,7 +117,7 @@ const Z = {
117
117
  if (a && a.key === r.id && J(a, u)) return a;
118
118
  const f = (o(), i("div", {
119
119
  key: r.id,
120
- class: g(["toast-item col-start-1 h-max row-start-1 mb-1 w-auto border pl-4 pr-6 py-2.5 flex gap-2.5 items-start transition-all duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] transform-gpu", [
120
+ class: g(["toast-item pointer-events-auto col-start-1 h-max row-start-1 mb-1 w-auto border pl-4 pr-6 py-2.5 flex gap-2.5 items-start transition-all duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] transform-gpu", [
121
121
  D(r.type),
122
122
  r.description || r.action ? "rounded-xl" : "rounded-full"
123
123
  ]]),
@@ -15,7 +15,7 @@ export * from './Cart';
15
15
  export { default as CheckBox } from './CheckBox.vue';
16
16
  export { Chip } from './Chip';
17
17
  export { ChoiceBox } from './ChoiceBox';
18
- export { ColorPicker } from './ColorPicker';
18
+ export { ColorPicker, COLOR_PICKER_RESET_VALUE } from './ColorPicker';
19
19
  export { default as ConfirmationModal } from './ConfirmationModal.vue';
20
20
  export { CustomFields } from './Form';
21
21
  export { DataList } from './DataList';
@@ -12,7 +12,25 @@ interface KeyStrokeComposable {
12
12
  offKeyStroke: (key: string | string[], handler?: KeyStrokeHandler) => void;
13
13
  destroy: () => void;
14
14
  }
15
+ /**
16
+ * SSR-safe keyboard composable.
17
+ *
18
+ * Components may call `useKeyStroke()` and register handlers unconditionally
19
+ * during `setup()` — including on the server. Registrations are stored in
20
+ * plain per-composable state; actual DOM listeners are attached only in the
21
+ * browser, after the owning component has mounted (or immediately when used
22
+ * outside a component in a browser context). Default event targets are
23
+ * resolved lazily at attach time, never during registration.
24
+ */
15
25
  export declare const useKeyStroke: () => KeyStrokeComposable;
26
+ /**
27
+ * SSR-safe advanced keyboard-shortcut composable.
28
+ *
29
+ * Combination parsing, meta⇄ctrl alternatives, and matching order are
30
+ * unchanged. Global `window`/`document` listeners are attached only in the
31
+ * browser after mount (or immediately when used outside a component in a
32
+ * browser context) and are always detached on unmount.
33
+ */
16
34
  export declare const useAdvancedKeyStroke: () => {
17
35
  onKeyStroke: (keys: string, handler: KeyStrokeHandler) => void;
18
36
  offKeyStroke: (keys: string, handler?: KeyStrokeHandler) => void;
@@ -1,94 +1,120 @@
1
- import { onUnmounted as k } from "vue";
2
- const S = () => {
3
- const o = /* @__PURE__ */ new Map(), r = (n) => {
4
- const f = s(n.key), c = o.get(f);
5
- c && c.forEach(({ handler: y, options: u }) => {
6
- u?.preventDefault && n.preventDefault(), u?.stopPropagation && n.stopPropagation(), y(n);
1
+ import { getCurrentInstance as A, onMounted as T, onUnmounted as D, unref as x } from "vue";
2
+ import { isBrowser as S } from "../utils/environment.js";
3
+ const U = () => {
4
+ const o = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), u = [], m = A();
5
+ let p = S && !m;
6
+ const g = (n) => n ? n.toLowerCase() : "", v = (n) => {
7
+ const s = g(n.key), r = o.get(s);
8
+ r && r.forEach(({ handler: f, options: d }) => {
9
+ d?.preventDefault && n.preventDefault(), d?.stopPropagation && n.stopPropagation(), f(n);
7
10
  });
8
- }, s = (n) => n ? n.toLowerCase() : "", p = (n) => n ? "value" in n ? n.value || document : n || document : document, w = (n, f, c = {}) => {
9
- const y = Array.isArray(n) ? n : [n], u = p(c.target);
10
- y.forEach((d) => {
11
- const m = s(d);
12
- o.has(m) || (o.set(m, /* @__PURE__ */ new Set()), u.addEventListener("keydown", r, {
13
- passive: c.passive ?? !0,
14
- capture: c.capture ?? !1
15
- })), o.get(m).add({ handler: f, options: c });
16
- });
17
- }, v = (n, f) => {
18
- (Array.isArray(n) ? n : [n]).forEach((y) => {
19
- const u = s(y), d = o.get(u);
20
- d && (f ? d.forEach((m) => {
21
- m.handler === f && d.delete(m);
22
- }) : d.clear(), d.size === 0 && (o.delete(u), document.removeEventListener("keydown", r)));
23
- });
24
- }, K = () => {
25
- document.removeEventListener("keydown", r), o.clear();
11
+ }, k = (n) => S ? x(n) ?? document : null, E = (n) => {
12
+ const s = k(n.target);
13
+ if (!s) return;
14
+ const r = n.capture ?? !1, f = i.get(s);
15
+ f?.has(r) || (s.addEventListener("keydown", v, {
16
+ passive: n.passive ?? !0,
17
+ capture: r
18
+ }), i.set(s, (f ?? /* @__PURE__ */ new Set()).add(r)));
19
+ }, C = (n) => {
20
+ p ? E(n) : u.push(n);
21
+ }, M = () => {
22
+ i.forEach((n, s) => {
23
+ n.forEach((r) => {
24
+ s.removeEventListener("keydown", v, { capture: r });
25
+ });
26
+ }), i.clear(), u.length = 0;
27
+ }, z = (n, s, r = {}) => {
28
+ (Array.isArray(n) ? n : [n]).forEach((d) => {
29
+ const l = g(d);
30
+ o.has(l) || o.set(l, /* @__PURE__ */ new Set());
31
+ const K = o.get(l);
32
+ let b = !1;
33
+ K.forEach((t) => {
34
+ t.handler === s && (b = !0);
35
+ }), b || K.add({ handler: s, options: r });
36
+ }), C(r);
37
+ }, w = (n, s) => {
38
+ (Array.isArray(n) ? n : [n]).forEach((f) => {
39
+ const d = g(f), l = o.get(d);
40
+ l && (s ? l.forEach((K) => {
41
+ K.handler === s && l.delete(K);
42
+ }) : l.clear(), l.size === 0 && o.delete(d));
43
+ }), o.size === 0 && M();
44
+ }, L = () => {
45
+ M(), o.clear();
26
46
  };
27
- return k(() => {
28
- K();
29
- }), {
30
- onKeyStroke: w,
31
- offKeyStroke: v,
32
- destroy: K
47
+ return m && (T(() => {
48
+ p = !0, u.splice(0).forEach(E);
49
+ }), D(L)), {
50
+ onKeyStroke: z,
51
+ offKeyStroke: w,
52
+ destroy: L
33
53
  };
34
- }, M = () => {
35
- const o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
36
- let s = null;
37
- const p = (t) => {
54
+ }, q = () => {
55
+ const o = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
56
+ let u = null, m = !1, p = !1;
57
+ const g = A();
58
+ let v = S && !g;
59
+ const k = (t) => {
38
60
  if (!t) return "";
39
61
  const e = t.toLowerCase();
40
62
  return e === "cmd" || e === "meta" || e === "metakey" ? "meta" : e === "ctrl" || e === "control" || e === "controlkey" ? "ctrl" : e === "alt" || e === "option" || e === "altkey" ? "alt" : e === "shift" || e === "shiftkey" ? "shift" : e;
41
- }, w = (t) => t.toLowerCase().split("+").map((e) => e.trim()).map(p).sort(), v = (t) => {
42
- const e = [t.join("+")], h = t.includes("meta"), l = t.includes("ctrl");
63
+ }, E = (t) => t.toLowerCase().split("+").map((e) => e.trim()).map(k).sort(), C = (t) => {
64
+ const e = [t.join("+")], h = t.includes("meta"), y = t.includes("ctrl");
43
65
  if (h) {
44
- const i = t.map((a) => a === "meta" ? "ctrl" : a);
45
- e.push(i.join("+"));
46
- } else if (l) {
47
- const i = t.map((a) => a === "ctrl" ? "meta" : a);
48
- e.push(i.join("+"));
66
+ const a = t.map((c) => c === "meta" ? "ctrl" : c);
67
+ e.push(a.join("+"));
68
+ } else if (y) {
69
+ const a = t.map((c) => c === "ctrl" ? "meta" : c);
70
+ e.push(a.join("+"));
49
71
  }
50
72
  return e;
51
- }, K = (t) => {
73
+ }, M = (t) => {
52
74
  const e = [];
53
75
  return t.metaKey && e.push("meta"), t.ctrlKey && e.push("ctrl"), t.altKey && e.push("alt"), t.shiftKey && e.push("shift"), e.sort();
54
- }, n = (t, e) => t.length !== e.length ? !1 : t.every((h, l) => h === e[l]), f = (t) => {
55
- const e = p(t.key);
56
- s && (clearTimeout(s), s = null);
57
- const l = [...K(t)];
58
- ["meta", "ctrl", "alt", "shift"].includes(e) || l.push(e), l.sort(), r.forEach((i, a) => {
59
- const b = w(a);
60
- n(b, l) && i.forEach((C) => C(t));
61
- }), s = window.setTimeout(() => {
62
- o.clear(), s = null;
76
+ }, z = (t, e) => t.length !== e.length ? !1 : t.every((h, y) => h === e[y]), w = () => {
77
+ u && (clearTimeout(u), u = null);
78
+ }, L = (t) => {
79
+ const e = k(t.key);
80
+ w();
81
+ const y = [...M(t)];
82
+ ["meta", "ctrl", "alt", "shift"].includes(e) || y.push(e), y.sort(), i.forEach((a, c) => {
83
+ const j = E(c);
84
+ z(j, y) && a.forEach((R) => R(t));
85
+ }), u = setTimeout(() => {
86
+ o.clear(), u = null;
63
87
  }, 100);
64
- }, c = (t) => {
65
- const e = p(t.key);
66
- o.delete(e), s && (clearTimeout(s), s = null);
67
- }, y = () => {
68
- o.clear(), s && (clearTimeout(s), s = null);
69
- }, u = () => {
70
- document.hidden && (o.clear(), s && (clearTimeout(s), s = null));
88
+ }, n = (t) => {
89
+ const e = k(t.key);
90
+ o.delete(e), w();
91
+ }, s = () => {
92
+ o.clear(), w();
93
+ }, r = () => {
94
+ document.hidden && (o.clear(), w());
95
+ }, f = () => {
96
+ !S || m || (m = !0, window.addEventListener("keydown", L, { passive: !1 }), window.addEventListener("keyup", n, { passive: !1 }), window.addEventListener("blur", s, { passive: !0 }), document.addEventListener("visibilitychange", r, { passive: !0 }));
71
97
  }, d = () => {
72
- window.addEventListener("keydown", f, { passive: !1 }), window.addEventListener("keyup", c, { passive: !1 }), window.addEventListener("blur", y, { passive: !0 }), document.addEventListener("visibilitychange", u, { passive: !0 });
73
- }, m = () => {
74
- window.removeEventListener("keydown", f), window.removeEventListener("keyup", c), window.removeEventListener("blur", y), document.removeEventListener("visibilitychange", u), s && (clearTimeout(s), s = null);
75
- }, L = (t, e) => {
76
- const h = w(t), l = v(h);
77
- l.forEach((i) => {
78
- r.has(i) || r.set(i, /* @__PURE__ */ new Set()), r.get(i).add(e);
79
- }), r.size === l.length && d();
80
- }, g = (t, e) => {
81
- const h = w(t);
82
- v(h).forEach((i) => {
83
- const a = r.get(i);
84
- a && (e ? a.delete(e) : a.clear(), a.size === 0 && r.delete(i));
85
- }), r.size === 0 && m();
86
- }, E = () => {
87
- m(), r.clear(), o.clear();
98
+ m && (m = !1, window.removeEventListener("keydown", L), window.removeEventListener("keyup", n), window.removeEventListener("blur", s), document.removeEventListener("visibilitychange", r)), w();
99
+ }, l = (t, e) => {
100
+ const h = E(t);
101
+ C(h).forEach((a) => {
102
+ i.has(a) || i.set(a, /* @__PURE__ */ new Set()), i.get(a).add(e);
103
+ }), p = !0, v && f();
104
+ }, K = (t, e) => {
105
+ const h = E(t);
106
+ C(h).forEach((a) => {
107
+ const c = i.get(a);
108
+ c && (e ? c.delete(e) : c.clear(), c.size === 0 && i.delete(a));
109
+ }), i.size === 0 && (p = !1, d());
110
+ }, b = () => {
111
+ d(), i.clear(), o.clear(), p = !1;
88
112
  };
89
- return k(E), { onKeyStroke: L, offKeyStroke: g, destroy: E };
113
+ return g && (T(() => {
114
+ v = !0, p && f();
115
+ }), D(b)), { onKeyStroke: l, offKeyStroke: K, destroy: b };
90
116
  };
91
117
  export {
92
- M as useAdvancedKeyStroke,
93
- S as useKeyStroke
118
+ q as useAdvancedKeyStroke,
119
+ U as useKeyStroke
94
120
  };
@@ -20,7 +20,7 @@ function c() {
20
20
  d(
21
21
  t,
22
22
  (i) => {
23
- localStorage.setItem("builto-theme", i), n(i);
23
+ typeof window > "u" || (localStorage.setItem("builto-theme", i), n(i));
24
24
  },
25
25
  { immediate: !0 }
26
26
  ), r(() => {
@@ -1,5 +1,5 @@
1
- import c from "scrollreveal";
2
- const o = /* @__PURE__ */ new WeakMap(), s = {
1
+ import { resolveModuleRuntime as f } from "../utils/UtilsModuleInterop.js";
2
+ const s = /* @__PURE__ */ new WeakMap(), i = {
3
3
  distance: "50px",
4
4
  duration: 800,
5
5
  delay: 200,
@@ -15,34 +15,39 @@ const o = /* @__PURE__ */ new WeakMap(), s = {
15
15
  useDelay: "always",
16
16
  viewFactor: 0
17
17
  };
18
- function r(e) {
18
+ function a(e) {
19
19
  if (!e) return window;
20
20
  if (e === document.body || e === document.documentElement)
21
21
  return document.documentElement;
22
22
  const t = getComputedStyle(e).overflowY;
23
- return (t === "auto" || t === "scroll" || t === "overlay") && e.scrollHeight > e.clientHeight ? e : r(e.parentElement);
23
+ return (t === "auto" || t === "scroll" || t === "overlay") && e.scrollHeight > e.clientHeight ? e : a(e.parentElement);
24
24
  }
25
- const u = {
26
- mounted: (e, l) => {
25
+ const d = {
26
+ mounted: async (e, n) => {
27
27
  if (typeof window > "u") return;
28
- const t = r(e.parentElement);
29
- let n = o.get(t);
30
- n || (n = c({
28
+ const t = await import("scrollreveal"), o = f(
29
+ t,
30
+ (u) => typeof u == "function"
31
+ );
32
+ if (!o) return;
33
+ const l = a(e.parentElement);
34
+ let r = s.get(l);
35
+ r || (r = o({
31
36
  // If container is window/html, ScrollReveal expects 'document.documentElement' usually,
32
37
  // but 'container' option defaults to window.document.documentElement.
33
38
  // If it's a specific div, we pass that div.
34
- container: t === window ? document.documentElement : t
35
- }), o.set(t, n));
36
- const a = Object.assign({}, s, l.value);
37
- e.classList.add("v-scroll-reveal"), n.reveal(e, a);
39
+ container: l === window ? document.documentElement : l
40
+ }), s.set(l, r));
41
+ const c = Object.assign({}, i, n.value);
42
+ e.classList.add("v-scroll-reveal"), r.reveal(e, c);
38
43
  },
39
- updated: (e, l) => {
40
- if (!(typeof window > "u") && JSON.stringify(l.value) !== JSON.stringify(l.oldValue)) {
41
- const t = r(e.parentElement), n = o.get(t);
42
- n && n.reveal(e, Object.assign({}, s, l.value));
44
+ updated: (e, n) => {
45
+ if (!(typeof window > "u") && JSON.stringify(n.value) !== JSON.stringify(n.oldValue)) {
46
+ const t = a(e.parentElement), o = s.get(t);
47
+ o && o.reveal(e, Object.assign({}, i, n.value));
43
48
  }
44
49
  }
45
50
  };
46
51
  export {
47
- u as vScrollReveal
52
+ d as vScrollReveal
48
53
  };
package/index.d.ts CHANGED
@@ -97,6 +97,7 @@ export { default as ThemeToggle } from './components/ThemeToggle.vue';
97
97
  export { default as GoogleLogin } from './components/GoogleLogin.vue';
98
98
  export { default as GoogleMap } from './components/GoogleMap.vue';
99
99
  export { default as ColorPicker } from './components/ColorPicker/ColorPicker.vue';
100
+ export { COLOR_PICKER_RESET_VALUE } from './components/ColorPicker/constants';
100
101
  export { default as ConfirmationModal } from './components/ConfirmationModal.vue';
101
102
  export { default as ToastNotification } from './components/ToastNotification.vue';
102
103
  export { default as CommandPaletteContent } from './components/CommandPalette/CommandPaletteContent.vue';