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.
- package/README.md +7 -0
- package/components/Alert.vue.js +45 -40
- package/components/Barcode/Barcode.vue.js +34 -21
- package/components/CategoryManager/CategoryNode.vue.js +30 -30
- package/components/CategoryMenu/CategoryMenu.vue.js +9 -11
- package/components/Chart/GanttChart.vue.d.ts +5 -1
- package/components/Chart/GanttChart.vue.js +2 -2
- package/components/Chart/GanttChart.vue2.js +977 -812
- package/components/Chart/GanttChartConnectorRouting.d.ts +83 -0
- package/components/Chart/GanttChartConnectorRouting.js +405 -0
- package/components/Chart/GanttChartDependencyUtils.js +43 -47
- package/components/Chart/types.d.ts +16 -1
- package/components/ColorPicker/ColorIro.vue2.js +78 -64
- package/components/ColorPicker/ColorPicker.vue.d.ts +5 -0
- package/components/ColorPicker/ColorPicker.vue.js +110 -64
- package/components/ColorPicker/constants.d.ts +2 -0
- package/components/ColorPicker/constants.js +4 -0
- package/components/ColorPicker/index.d.ts +1 -0
- package/components/Dropdown/Dropdown.vue.js +100 -97
- package/components/ExportData/ExportData.vue.js +85 -63
- package/components/FilePreview/FilePreview.vue.js +31 -13
- package/components/Form/FormField.vue.js +9 -8
- package/components/ImportData/ImportStep1.vue.js +80 -75
- package/components/Kanban/Kanban.vue.d.ts +16 -2
- package/components/Kanban/Kanban.vue.js +2 -2
- package/components/Kanban/Kanban.vue2.js +150 -86
- package/components/Kanban/types.d.ts +37 -0
- package/components/QRCode/QRCode.vue.js +31 -26
- package/components/ToastNotification.vue.js +1 -1
- package/components/ToastNotification.vue2.js +3 -3
- package/components/index.d.ts +1 -1
- package/composables/useKeyStroke.d.ts +18 -0
- package/composables/useKeyStroke.js +103 -77
- package/composables/useTheme.js +1 -1
- package/directives/vScrollReveal.js +23 -18
- package/index.d.ts +1 -0
- package/index.js +235 -233
- package/package.json +11 -4
- package/style.css +1 -1
- package/utils/UtilsModuleInterop.d.ts +6 -0
- package/utils/UtilsModuleInterop.js +9 -0
- package/utils/environment.d.ts +29 -0
- package/utils/environment.js +4 -0
- 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
|
|
2
|
-
import _ from "
|
|
3
|
-
const
|
|
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
|
-
},
|
|
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(
|
|
19
|
-
const e =
|
|
20
|
-
let
|
|
21
|
-
const
|
|
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
|
-
|
|
26
|
-
const t = ++
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
if (!
|
|
30
|
-
const
|
|
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" && (
|
|
38
|
+
typeof e.size == "number" && (v.width = e.size * e.scale);
|
|
39
39
|
try {
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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 =
|
|
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,
|
|
58
|
+
return (t, c) => (u(), f("div", {
|
|
54
59
|
class: "inline-flex justify-center items-center max-w-full",
|
|
55
|
-
style:
|
|
60
|
+
style: U(h.value)
|
|
56
61
|
}, [
|
|
57
|
-
d.value ? (
|
|
62
|
+
d.value ? (u(), f("img", {
|
|
58
63
|
key: 0,
|
|
59
64
|
src: d.value,
|
|
60
|
-
alt:
|
|
65
|
+
alt: m.alt,
|
|
61
66
|
class: "w-full h-full object-contain pointer-events-none"
|
|
62
|
-
}, null, 8,
|
|
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
|
-
|
|
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-
|
|
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
|
|
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
|
]]),
|
package/components/index.d.ts
CHANGED
|
@@ -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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
},
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
23
|
-
});
|
|
24
|
-
},
|
|
25
|
-
|
|
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
|
|
28
|
-
|
|
29
|
-
}), {
|
|
30
|
-
onKeyStroke:
|
|
31
|
-
offKeyStroke:
|
|
32
|
-
destroy:
|
|
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
|
-
},
|
|
35
|
-
const o = /* @__PURE__ */ new Set(),
|
|
36
|
-
let
|
|
37
|
-
const
|
|
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
|
-
},
|
|
42
|
-
const e = [t.join("+")], h = t.includes("meta"),
|
|
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
|
|
45
|
-
e.push(
|
|
46
|
-
} else if (
|
|
47
|
-
const
|
|
48
|
-
e.push(
|
|
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
|
-
},
|
|
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
|
-
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
},
|
|
65
|
-
const e =
|
|
66
|
-
o.delete(e),
|
|
67
|
-
},
|
|
68
|
-
o.clear(),
|
|
69
|
-
},
|
|
70
|
-
document.hidden && (o.clear(),
|
|
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.
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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
|
|
113
|
+
return g && (T(() => {
|
|
114
|
+
v = !0, p && f();
|
|
115
|
+
}), D(b)), { onKeyStroke: l, offKeyStroke: K, destroy: b };
|
|
90
116
|
};
|
|
91
117
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
118
|
+
q as useAdvancedKeyStroke,
|
|
119
|
+
U as useKeyStroke
|
|
94
120
|
};
|
package/composables/useTheme.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
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
|
|
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 :
|
|
23
|
+
return (t === "auto" || t === "scroll" || t === "overlay") && e.scrollHeight > e.clientHeight ? e : a(e.parentElement);
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
mounted: (e,
|
|
25
|
+
const d = {
|
|
26
|
+
mounted: async (e, n) => {
|
|
27
27
|
if (typeof window > "u") return;
|
|
28
|
-
const t =
|
|
29
|
-
|
|
30
|
-
|
|
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:
|
|
35
|
-
}),
|
|
36
|
-
const
|
|
37
|
-
e.classList.add("v-scroll-reveal"),
|
|
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,
|
|
40
|
-
if (!(typeof window > "u") && JSON.stringify(
|
|
41
|
-
const t =
|
|
42
|
-
|
|
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
|
-
|
|
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';
|