vlite3 0.2.5 → 0.2.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.
- package/components/Button.vue.js +1 -1
- package/components/Carousel/Carousel.vue.d.ts +10 -42
- package/components/Input.vue.js +1 -1
- package/components/ThemeToggle.vue.d.ts +1 -1
- package/components/ThemeToggle.vue.js +10 -12
- package/components/Workbook/Sheet.vue.js +64 -57
- package/components/Workbook/Workbook.vue.js +2 -2
- package/components/Workbook/Workbook.vue2.js +31 -31
- package/package.json +2 -2
package/components/Button.vue.js
CHANGED
|
@@ -27,7 +27,6 @@ declare function __VLS_template(): {
|
|
|
27
27
|
wheelOptions: import('vue-carousel-lite/types').WheelOptions;
|
|
28
28
|
bufferSize: number;
|
|
29
29
|
maxDomElements: number;
|
|
30
|
-
updateKey: string | number;
|
|
31
30
|
}> & Omit<{
|
|
32
31
|
readonly data: any[];
|
|
33
32
|
readonly direction: "horizontal" | "vertical";
|
|
@@ -51,10 +50,9 @@ declare function __VLS_template(): {
|
|
|
51
50
|
readonly autoFocus: boolean;
|
|
52
51
|
readonly wheelOptions: import('vue-carousel-lite/types').WheelOptions;
|
|
53
52
|
readonly paginationPosition?: import('vue-carousel-lite').PaginationPosition | import('vue-carousel-lite').PaginationPosition[];
|
|
54
|
-
readonly updateKey?: string | number;
|
|
55
53
|
readonly paginationBackground?: boolean;
|
|
56
|
-
readonly "onSlide-change"?: (index: number) => any;
|
|
57
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "direction" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "draggable" | "autoPlayInterval" | "itemsToShow" | "gap" | "speed" | "easing" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "
|
|
54
|
+
readonly "onSlide-change"?: ((index: number) => any) | undefined;
|
|
55
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "direction" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "draggable" | "autoPlayInterval" | "itemsToShow" | "gap" | "speed" | "easing" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "autoFocus" | "wheelOptions">;
|
|
58
56
|
$attrs: {
|
|
59
57
|
[x: string]: unknown;
|
|
60
58
|
};
|
|
@@ -149,10 +147,6 @@ declare function __VLS_template(): {
|
|
|
149
147
|
type: import('vue').PropType<number>;
|
|
150
148
|
default: number;
|
|
151
149
|
};
|
|
152
|
-
updateKey: {
|
|
153
|
-
type: import('vue').PropType<string | number>;
|
|
154
|
-
default: any;
|
|
155
|
-
};
|
|
156
150
|
autoFocus: {
|
|
157
151
|
type: import('vue').PropType<boolean>;
|
|
158
152
|
default: boolean;
|
|
@@ -167,14 +161,12 @@ declare function __VLS_template(): {
|
|
|
167
161
|
velocityThreshold: number;
|
|
168
162
|
pageScrollThreshold: number;
|
|
169
163
|
debounceTime: number;
|
|
170
|
-
scrollByPage: boolean;
|
|
171
|
-
lockDuringTransition: boolean;
|
|
172
164
|
preventDefault: boolean;
|
|
173
165
|
stopPropagation: boolean;
|
|
174
166
|
};
|
|
175
167
|
};
|
|
176
168
|
}>> & Readonly<{
|
|
177
|
-
"onSlide-change"?: (index: number) => any;
|
|
169
|
+
"onSlide-change"?: ((index: number) => any) | undefined;
|
|
178
170
|
}>, {
|
|
179
171
|
goToSlide: (index: number, smooth?: boolean) => void;
|
|
180
172
|
goNext: (smooth?: boolean) => void;
|
|
@@ -212,7 +204,6 @@ declare function __VLS_template(): {
|
|
|
212
204
|
wheelOptions: import('vue-carousel-lite/types').WheelOptions;
|
|
213
205
|
bufferSize: number;
|
|
214
206
|
maxDomElements: number;
|
|
215
|
-
updateKey: string | number;
|
|
216
207
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
217
208
|
beforeCreate?: (() => void) | (() => void)[];
|
|
218
209
|
created?: (() => void) | (() => void)[];
|
|
@@ -254,7 +245,6 @@ declare function __VLS_template(): {
|
|
|
254
245
|
wheelOptions: import('vue-carousel-lite/types').WheelOptions;
|
|
255
246
|
bufferSize: number;
|
|
256
247
|
maxDomElements: number;
|
|
257
|
-
updateKey: string | number;
|
|
258
248
|
}> & Omit<Readonly<import('vue').ExtractPropTypes<{
|
|
259
249
|
data: {
|
|
260
250
|
type: import('vue').PropType<any[]>;
|
|
@@ -335,10 +325,6 @@ declare function __VLS_template(): {
|
|
|
335
325
|
type: import('vue').PropType<number>;
|
|
336
326
|
default: number;
|
|
337
327
|
};
|
|
338
|
-
updateKey: {
|
|
339
|
-
type: import('vue').PropType<string | number>;
|
|
340
|
-
default: any;
|
|
341
|
-
};
|
|
342
328
|
autoFocus: {
|
|
343
329
|
type: import('vue').PropType<boolean>;
|
|
344
330
|
default: boolean;
|
|
@@ -353,15 +339,13 @@ declare function __VLS_template(): {
|
|
|
353
339
|
velocityThreshold: number;
|
|
354
340
|
pageScrollThreshold: number;
|
|
355
341
|
debounceTime: number;
|
|
356
|
-
scrollByPage: boolean;
|
|
357
|
-
lockDuringTransition: boolean;
|
|
358
342
|
preventDefault: boolean;
|
|
359
343
|
stopPropagation: boolean;
|
|
360
344
|
};
|
|
361
345
|
};
|
|
362
346
|
}>> & Readonly<{
|
|
363
|
-
"onSlide-change"?: (index: number) => any;
|
|
364
|
-
}>, "focus" | "direction" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "draggable" | "autoPlayInterval" | "itemsToShow" | "gap" | "speed" | "easing" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "
|
|
347
|
+
"onSlide-change"?: ((index: number) => any) | undefined;
|
|
348
|
+
}>, "focus" | "direction" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "draggable" | "autoPlayInterval" | "itemsToShow" | "gap" | "speed" | "easing" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "goToSlide" | "goNext" | "goPrev" | "autoFocus" | "wheelOptions" | "state" | "canGoNext" | "canGoPrev"> & import('vue').ShallowUnwrapRef<{
|
|
365
349
|
goToSlide: (index: number, smooth?: boolean) => void;
|
|
366
350
|
goNext: (smooth?: boolean) => void;
|
|
367
351
|
goPrev: (smooth?: boolean) => void;
|
|
@@ -462,7 +446,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
462
446
|
wheelOptions: import('vue-carousel-lite/types').WheelOptions;
|
|
463
447
|
bufferSize: number;
|
|
464
448
|
maxDomElements: number;
|
|
465
|
-
updateKey: string | number;
|
|
466
449
|
}> & Omit<{
|
|
467
450
|
readonly data: any[];
|
|
468
451
|
readonly direction: "horizontal" | "vertical";
|
|
@@ -486,10 +469,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
486
469
|
readonly autoFocus: boolean;
|
|
487
470
|
readonly wheelOptions: import('vue-carousel-lite/types').WheelOptions;
|
|
488
471
|
readonly paginationPosition?: import('vue-carousel-lite').PaginationPosition | import('vue-carousel-lite').PaginationPosition[];
|
|
489
|
-
readonly updateKey?: string | number;
|
|
490
472
|
readonly paginationBackground?: boolean;
|
|
491
|
-
readonly "onSlide-change"?: (index: number) => any;
|
|
492
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "direction" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "draggable" | "autoPlayInterval" | "itemsToShow" | "gap" | "speed" | "easing" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "
|
|
473
|
+
readonly "onSlide-change"?: ((index: number) => any) | undefined;
|
|
474
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "direction" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "draggable" | "autoPlayInterval" | "itemsToShow" | "gap" | "speed" | "easing" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "autoFocus" | "wheelOptions">;
|
|
493
475
|
$attrs: {
|
|
494
476
|
[x: string]: unknown;
|
|
495
477
|
};
|
|
@@ -584,10 +566,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
584
566
|
type: import('vue').PropType<number>;
|
|
585
567
|
default: number;
|
|
586
568
|
};
|
|
587
|
-
updateKey: {
|
|
588
|
-
type: import('vue').PropType<string | number>;
|
|
589
|
-
default: any;
|
|
590
|
-
};
|
|
591
569
|
autoFocus: {
|
|
592
570
|
type: import('vue').PropType<boolean>;
|
|
593
571
|
default: boolean;
|
|
@@ -602,14 +580,12 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
602
580
|
velocityThreshold: number;
|
|
603
581
|
pageScrollThreshold: number;
|
|
604
582
|
debounceTime: number;
|
|
605
|
-
scrollByPage: boolean;
|
|
606
|
-
lockDuringTransition: boolean;
|
|
607
583
|
preventDefault: boolean;
|
|
608
584
|
stopPropagation: boolean;
|
|
609
585
|
};
|
|
610
586
|
};
|
|
611
587
|
}>> & Readonly<{
|
|
612
|
-
"onSlide-change"?: (index: number) => any;
|
|
588
|
+
"onSlide-change"?: ((index: number) => any) | undefined;
|
|
613
589
|
}>, {
|
|
614
590
|
goToSlide: (index: number, smooth?: boolean) => void;
|
|
615
591
|
goNext: (smooth?: boolean) => void;
|
|
@@ -647,7 +623,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
647
623
|
wheelOptions: import('vue-carousel-lite/types').WheelOptions;
|
|
648
624
|
bufferSize: number;
|
|
649
625
|
maxDomElements: number;
|
|
650
|
-
updateKey: string | number;
|
|
651
626
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
652
627
|
beforeCreate?: (() => void) | (() => void)[];
|
|
653
628
|
created?: (() => void) | (() => void)[];
|
|
@@ -689,7 +664,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
689
664
|
wheelOptions: import('vue-carousel-lite/types').WheelOptions;
|
|
690
665
|
bufferSize: number;
|
|
691
666
|
maxDomElements: number;
|
|
692
|
-
updateKey: string | number;
|
|
693
667
|
}> & Omit<Readonly<import('vue').ExtractPropTypes<{
|
|
694
668
|
data: {
|
|
695
669
|
type: import('vue').PropType<any[]>;
|
|
@@ -770,10 +744,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
770
744
|
type: import('vue').PropType<number>;
|
|
771
745
|
default: number;
|
|
772
746
|
};
|
|
773
|
-
updateKey: {
|
|
774
|
-
type: import('vue').PropType<string | number>;
|
|
775
|
-
default: any;
|
|
776
|
-
};
|
|
777
747
|
autoFocus: {
|
|
778
748
|
type: import('vue').PropType<boolean>;
|
|
779
749
|
default: boolean;
|
|
@@ -788,15 +758,13 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
788
758
|
velocityThreshold: number;
|
|
789
759
|
pageScrollThreshold: number;
|
|
790
760
|
debounceTime: number;
|
|
791
|
-
scrollByPage: boolean;
|
|
792
|
-
lockDuringTransition: boolean;
|
|
793
761
|
preventDefault: boolean;
|
|
794
762
|
stopPropagation: boolean;
|
|
795
763
|
};
|
|
796
764
|
};
|
|
797
765
|
}>> & Readonly<{
|
|
798
|
-
"onSlide-change"?: (index: number) => any;
|
|
799
|
-
}>, "focus" | "direction" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "draggable" | "autoPlayInterval" | "itemsToShow" | "gap" | "speed" | "easing" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "
|
|
766
|
+
"onSlide-change"?: ((index: number) => any) | undefined;
|
|
767
|
+
}>, "focus" | "direction" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "draggable" | "autoPlayInterval" | "itemsToShow" | "gap" | "speed" | "easing" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "goToSlide" | "goNext" | "goPrev" | "autoFocus" | "wheelOptions" | "state" | "canGoNext" | "canGoPrev"> & import('vue').ShallowUnwrapRef<{
|
|
800
768
|
goToSlide: (index: number, smooth?: boolean) => void;
|
|
801
769
|
goNext: (smooth?: boolean) => void;
|
|
802
770
|
goPrev: (smooth?: boolean) => void;
|
package/components/Input.vue.js
CHANGED
|
@@ -47,7 +47,7 @@ const Y = ["type", "value", "placeholder", "disabled", "min", "max"], Z = { clas
|
|
|
47
47
|
"outline-b": "border-b border-input bg-transparent rounded-none focus-visible:border-primary",
|
|
48
48
|
transparent: "border-none bg-transparent shadow-none"
|
|
49
49
|
}, i = {
|
|
50
|
-
sm: "h-
|
|
50
|
+
sm: "h-7.5 text-xs",
|
|
51
51
|
md: "h-9 text-sm",
|
|
52
52
|
lg: "h-10 text-base"
|
|
53
53
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
|
|
2
2
|
export default _default;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import { defineComponent as n, openBlock as
|
|
1
|
+
import { defineComponent as n, openBlock as i, createBlock as c, unref as e } from "vue";
|
|
2
2
|
import { useTheme as m } from "../composables/useTheme.js";
|
|
3
3
|
import r from "./Button.vue.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ n({
|
|
5
5
|
__name: "ThemeToggle",
|
|
6
|
-
setup(
|
|
6
|
+
setup(l) {
|
|
7
7
|
const { theme: o, toggleTheme: t } = m();
|
|
8
|
-
return (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, null, 8, ["icon", "title", "onClick"])
|
|
15
|
-
]));
|
|
8
|
+
return (a, h) => (i(), c(r, {
|
|
9
|
+
icon: e(o) === "light" ? "lucide:sun" : "lucide:moon",
|
|
10
|
+
variant: "secondary",
|
|
11
|
+
title: e(o) === "light" ? "Switch to dark mode" : "Switch to light mode",
|
|
12
|
+
onClick: e(t)
|
|
13
|
+
}, null, 8, ["icon", "title", "onClick"]));
|
|
16
14
|
}
|
|
17
15
|
});
|
|
18
16
|
export {
|
|
19
|
-
|
|
17
|
+
p as default
|
|
20
18
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as N, ref as x, computed as g, openBlock as c, createElementBlock as a, normalizeClass as w, createElementVNode as r, withModifiers as y, createBlock as b, withCtx as m, createVNode as d, createCommentVNode as D, withDirectives as O, vModelText as $, toDisplayString as k, unref as j, createTextVNode as M, nextTick as R } from "vue";
|
|
2
2
|
import u from "../Icon.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
3
|
+
import z from "../Dropdown/Dropdown.vue.js";
|
|
4
|
+
import A from "../IconPicker.vue.js";
|
|
5
|
+
const I = {
|
|
6
6
|
type: "button",
|
|
7
7
|
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"
|
|
8
|
-
},
|
|
8
|
+
}, K = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "flex items-center justify-center p-0.5"
|
|
11
|
-
},
|
|
11
|
+
}, U = { class: "flex-1 min-w-0 pr-1" }, q = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "block truncate text-sm font-medium leading-normal"
|
|
14
|
-
},
|
|
14
|
+
}, F = { class: "opacity-0 group-hover:opacity-100 transition-opacity ml-auto pl-1 flex items-center bg-inherit" }, G = { class: "p-1 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors" }, H = {
|
|
15
15
|
class: /* @__PURE__ */ w(["flex items-center"])
|
|
16
|
-
},
|
|
16
|
+
}, W = /* @__PURE__ */ N({
|
|
17
17
|
__name: "Sheet",
|
|
18
18
|
props: {
|
|
19
19
|
sheet: {},
|
|
@@ -25,20 +25,20 @@ const A = {
|
|
|
25
25
|
allowIconChange: { type: Boolean, default: !0 }
|
|
26
26
|
},
|
|
27
27
|
emits: ["select", "update:title", "update:icon", "edit-start", "edit-end", "duplicate", "delete"],
|
|
28
|
-
setup(
|
|
29
|
-
const e =
|
|
30
|
-
s.value = e.sheet.title,
|
|
31
|
-
|
|
28
|
+
setup(i, { emit: C }) {
|
|
29
|
+
const e = i, n = C, f = x(null), s = x(e.sheet.title), v = () => {
|
|
30
|
+
s.value = e.sheet.title, n("edit-start", e.sheet.id), R(() => {
|
|
31
|
+
f.value?.focus(), f.value?.select();
|
|
32
32
|
});
|
|
33
|
-
},
|
|
33
|
+
}, h = () => {
|
|
34
34
|
if (!e.isEditing) return;
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
const t = s.value.trim();
|
|
36
|
+
t ? n("update:title", e.sheet.id, t) : s.value = e.sheet.title, n("edit-end", e.sheet.id);
|
|
37
37
|
}, E = () => {
|
|
38
|
-
s.value = e.sheet.title,
|
|
39
|
-
}, T = (
|
|
40
|
-
|
|
41
|
-
},
|
|
38
|
+
s.value = e.sheet.title, n("edit-end", e.sheet.id);
|
|
39
|
+
}, T = (t) => {
|
|
40
|
+
t.key === "Enter" && h(), t.key === "Escape" && E();
|
|
41
|
+
}, B = g(() => [
|
|
42
42
|
{ label: "Rename", value: "rename", icon: "lucide:pencil" },
|
|
43
43
|
{ label: "Duplicate", value: "duplicate", icon: "lucide:copy" },
|
|
44
44
|
{
|
|
@@ -52,90 +52,97 @@ const A = {
|
|
|
52
52
|
description: e.confirmDeleteTexts?.description,
|
|
53
53
|
confirmText: e.confirmDeleteTexts?.confirm,
|
|
54
54
|
cancelText: e.confirmDeleteTexts?.cancel,
|
|
55
|
-
variant: "danger"
|
|
55
|
+
variant: "danger",
|
|
56
|
+
onConfirm: () => {
|
|
57
|
+
e.canDelete && n("delete", e.sheet.id);
|
|
58
|
+
}
|
|
56
59
|
} : void 0
|
|
57
60
|
}
|
|
58
|
-
]),
|
|
59
|
-
if (
|
|
60
|
-
if (!e.canDelete) return;
|
|
61
|
-
|
|
61
|
+
]), S = (t) => {
|
|
62
|
+
if (t.value === "rename" && v(), t.value === "duplicate" && n("duplicate", e.sheet.id), t.value === "delete") {
|
|
63
|
+
if (!e.canDelete || e.confirmDelete) return;
|
|
64
|
+
n("delete", e.sheet.id);
|
|
62
65
|
}
|
|
63
|
-
},
|
|
66
|
+
}, p = (t) => {
|
|
67
|
+
t && t.value && t.value !== "delete" || e.canDelete && n("delete", e.sheet.id);
|
|
68
|
+
}, V = g(() => [
|
|
64
69
|
"group relative flex items-center min-w-[120px] max-w-[240px] h-9 px-3 border-r border-border select-none cursor-pointer transition-all duration-200 ease-out",
|
|
65
70
|
e.isActive ? "bg-muted text-foreground ring-1 ring-border ring-b-0 z-10" : "text-muted-foreground hover:bg-accent/50",
|
|
66
71
|
e.isEditing ? "cursor-text" : ""
|
|
67
72
|
].join(" "));
|
|
68
|
-
return (
|
|
69
|
-
class: w(
|
|
70
|
-
onClick:
|
|
71
|
-
onDblclick:
|
|
73
|
+
return (t, o) => (c(), a("div", {
|
|
74
|
+
class: w(V.value),
|
|
75
|
+
onClick: o[4] || (o[4] = (l) => n("select", i.sheet.id)),
|
|
76
|
+
onDblclick: v
|
|
72
77
|
}, [
|
|
73
78
|
r("div", {
|
|
74
|
-
onClick:
|
|
79
|
+
onClick: o[1] || (o[1] = y(() => {
|
|
75
80
|
}, ["stop"])),
|
|
76
81
|
class: "mr-2 flex items-center shrink-0"
|
|
77
82
|
}, [
|
|
78
|
-
(
|
|
83
|
+
(i.sheet.icon || i.isEditing) && i.allowIconChange ? (c(), b(A, {
|
|
79
84
|
key: 0,
|
|
80
|
-
value:
|
|
85
|
+
value: i.sheet.icon || "lucide:file",
|
|
81
86
|
position: "bottom-start",
|
|
82
|
-
onOnSelect:
|
|
87
|
+
onOnSelect: o[0] || (o[0] = (l) => n("update:icon", i.sheet.id, l))
|
|
83
88
|
}, {
|
|
84
|
-
default:
|
|
85
|
-
r("button",
|
|
89
|
+
default: m(() => [
|
|
90
|
+
r("button", I, [
|
|
86
91
|
d(u, {
|
|
87
|
-
icon:
|
|
92
|
+
icon: i.sheet.icon || "lucide:file",
|
|
88
93
|
class: "w-4 h-4 opacity-70 hover:opacity-100 transition-opacity"
|
|
89
94
|
}, null, 8, ["icon"])
|
|
90
95
|
])
|
|
91
96
|
]),
|
|
92
97
|
_: 1
|
|
93
|
-
}, 8, ["value"])) :
|
|
98
|
+
}, 8, ["value"])) : i.sheet.icon ? (c(), a("div", K, [
|
|
94
99
|
d(u, {
|
|
95
|
-
icon:
|
|
100
|
+
icon: i.sheet.icon,
|
|
96
101
|
class: "w-4 h-4 opacity-70"
|
|
97
102
|
}, null, 8, ["icon"])
|
|
98
|
-
])) :
|
|
103
|
+
])) : D("", !0)
|
|
99
104
|
]),
|
|
100
|
-
r("div",
|
|
101
|
-
|
|
105
|
+
r("div", U, [
|
|
106
|
+
i.isEditing ? O((c(), a("input", {
|
|
102
107
|
key: 0,
|
|
103
108
|
ref_key: "inputRef",
|
|
104
|
-
ref:
|
|
105
|
-
"onUpdate:modelValue":
|
|
109
|
+
ref: f,
|
|
110
|
+
"onUpdate:modelValue": o[2] || (o[2] = (l) => s.value = l),
|
|
106
111
|
type: "text",
|
|
107
112
|
class: "w-full bg-transparent border-none outline-none p-0 text-sm font-medium text-foreground placeholder-muted-foreground focus:ring-0",
|
|
108
|
-
onBlur:
|
|
113
|
+
onBlur: h,
|
|
109
114
|
onKeydown: T,
|
|
110
|
-
onClick:
|
|
115
|
+
onClick: o[3] || (o[3] = y(() => {
|
|
111
116
|
}, ["stop"]))
|
|
112
117
|
}, null, 544)), [
|
|
113
118
|
[$, s.value]
|
|
114
|
-
]) : (c(), a("span",
|
|
119
|
+
]) : (c(), a("span", q, k(i.sheet.title), 1))
|
|
115
120
|
]),
|
|
116
|
-
r("div",
|
|
117
|
-
d(j(
|
|
118
|
-
options:
|
|
121
|
+
r("div", F, [
|
|
122
|
+
d(j(z), {
|
|
123
|
+
options: B.value,
|
|
119
124
|
position: "bottom-end",
|
|
120
125
|
width: "140px",
|
|
121
126
|
teleport: !0,
|
|
122
|
-
onOnSelect:
|
|
127
|
+
onOnSelect: S,
|
|
128
|
+
onOnConfirm: p,
|
|
129
|
+
onConfirm: p
|
|
123
130
|
}, {
|
|
124
|
-
trigger:
|
|
125
|
-
r("button",
|
|
131
|
+
trigger: m(() => [
|
|
132
|
+
r("button", G, [
|
|
126
133
|
d(u, {
|
|
127
134
|
icon: "lucide:more-vertical",
|
|
128
135
|
class: "w-3.5 h-3.5"
|
|
129
136
|
})
|
|
130
137
|
])
|
|
131
138
|
]),
|
|
132
|
-
item:
|
|
133
|
-
r("div",
|
|
134
|
-
l?.icon ? (c(),
|
|
139
|
+
item: m(({ option: l }) => [
|
|
140
|
+
r("div", H, [
|
|
141
|
+
l?.icon ? (c(), b(u, {
|
|
135
142
|
key: 0,
|
|
136
143
|
icon: l?.icon,
|
|
137
144
|
class: "w-3.5 h-3.5 mr-2 opacity-70"
|
|
138
|
-
}, null, 8, ["icon"])) :
|
|
145
|
+
}, null, 8, ["icon"])) : D("", !0),
|
|
139
146
|
M(" " + k(l?.label), 1)
|
|
140
147
|
])
|
|
141
148
|
]),
|
|
@@ -146,5 +153,5 @@ const A = {
|
|
|
146
153
|
}
|
|
147
154
|
});
|
|
148
155
|
export {
|
|
149
|
-
|
|
156
|
+
W as default
|
|
150
157
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Workbook.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-b2bb8797"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as T, ref as
|
|
2
|
-
import { useDragAndDrop as
|
|
3
|
-
import { animations as
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as T, ref as g, watch as p, nextTick as _, computed as U, openBlock as a, createElementBlock as i, createElementVNode as c, renderSlot as m, createCommentVNode as u, Fragment as A, renderList as P, unref as J, createBlock as O, createVNode as x } from "vue";
|
|
2
|
+
import { useDragAndDrop as W } from "@formkit/drag-and-drop/vue";
|
|
3
|
+
import { animations as Y } from "@formkit/drag-and-drop";
|
|
4
|
+
import z from "./Sheet.vue.js";
|
|
5
5
|
import b from "./WorkbookAddButton.vue.js";
|
|
6
|
-
const
|
|
6
|
+
const F = { class: "flex flex-col w-full font-sans" }, L = { class: "flex items-end w-full border-b px-1 gap-2" }, M = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "flex items-center mb-1 mr-2"
|
|
9
9
|
}, j = {
|
|
@@ -27,11 +27,11 @@ const z = { class: "flex flex-col w-full font-sans" }, F = { class: "flex items-
|
|
|
27
27
|
},
|
|
28
28
|
emits: ["update:modelValue", "update:sheets", "change", "add", "delete", "duplicate", "edit-start", "edit-end"],
|
|
29
29
|
setup(d, { emit: k }) {
|
|
30
|
-
const l = d,
|
|
31
|
-
plugins: [
|
|
30
|
+
const l = d, o = k, f = g(null), r = g(null), [w, h] = W(l.sheets, {
|
|
31
|
+
plugins: [Y()],
|
|
32
32
|
draggable: (e) => l.draggable && !r.value,
|
|
33
33
|
onSort: (e) => {
|
|
34
|
-
|
|
34
|
+
o("update:sheets", e.values);
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
p(
|
|
@@ -42,44 +42,44 @@ const z = { class: "flex flex-col w-full font-sans" }, F = { class: "flex items-
|
|
|
42
42
|
{ deep: !0 }
|
|
43
43
|
);
|
|
44
44
|
const y = (e) => {
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
l.sheets.length >= l.maxSheets ||
|
|
48
|
-
}, S = (e,
|
|
45
|
+
o("update:modelValue", e), o("change", e);
|
|
46
|
+
}, v = () => {
|
|
47
|
+
l.sheets.length >= l.maxSheets || o("add");
|
|
48
|
+
}, S = (e, s) => {
|
|
49
49
|
const t = l.sheets.findIndex((n) => n.id === e);
|
|
50
50
|
if (t !== -1) {
|
|
51
51
|
const n = [...l.sheets];
|
|
52
|
-
n[t] = { ...n[t], title:
|
|
52
|
+
n[t] = { ...n[t], title: s }, o("update:sheets", n);
|
|
53
53
|
}
|
|
54
|
-
}, D = (e,
|
|
54
|
+
}, D = (e, s) => {
|
|
55
55
|
const t = l.sheets.findIndex((n) => n.id === e);
|
|
56
56
|
if (t !== -1) {
|
|
57
57
|
const n = [...l.sheets];
|
|
58
|
-
n[t] = { ...n[t], icon:
|
|
58
|
+
n[t] = { ...n[t], icon: s }, o("update:sheets", n);
|
|
59
59
|
}
|
|
60
60
|
}, B = (e) => {
|
|
61
|
-
r.value = e,
|
|
61
|
+
r.value = e, o("edit-start", e);
|
|
62
62
|
}, V = (e) => {
|
|
63
|
-
r.value = null,
|
|
63
|
+
r.value = null, o("edit-end", e);
|
|
64
64
|
}, I = (e) => {
|
|
65
|
-
|
|
65
|
+
o("duplicate", e);
|
|
66
66
|
}, C = (e) => {
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
67
|
+
const s = l.sheets.findIndex((n) => n.id === e);
|
|
68
|
+
if (s === -1) return;
|
|
69
69
|
const t = [...l.sheets];
|
|
70
|
-
if (t.splice(
|
|
70
|
+
if (t.splice(s, 1), o("update:sheets", t), o("delete", e), l.modelValue === e) {
|
|
71
71
|
let n = "";
|
|
72
72
|
if (t.length > 0) {
|
|
73
|
-
const N = Math.min(
|
|
73
|
+
const N = Math.min(s, t.length - 1);
|
|
74
74
|
n = t[N].id;
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
o("update:modelValue", n), o("change", n);
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
p(
|
|
80
80
|
() => l.sheets.length,
|
|
81
|
-
(e,
|
|
82
|
-
|
|
81
|
+
(e, s) => {
|
|
82
|
+
s !== void 0 && s > 0 && e === s + 1 && l.addable && _(() => {
|
|
83
83
|
const t = l.sheets[l.sheets.length - 1];
|
|
84
84
|
t.id === l.modelValue && (r.value = t.id);
|
|
85
85
|
});
|
|
@@ -88,8 +88,8 @@ const z = { class: "flex flex-col w-full font-sans" }, F = { class: "flex items-
|
|
|
88
88
|
const E = (e) => {
|
|
89
89
|
f.value && e.deltaY !== 0 && (f.value.scrollLeft += e.deltaY, e.preventDefault());
|
|
90
90
|
}, $ = U(() => l.sheets.length > 1);
|
|
91
|
-
return (e,
|
|
92
|
-
c("div",
|
|
91
|
+
return (e, s) => (a(), i("div", F, [
|
|
92
|
+
c("div", L, [
|
|
93
93
|
e.$slots["left-addons"] ? (a(), i("div", M, [
|
|
94
94
|
m(e.$slots, "left-addons", {}, void 0, !0)
|
|
95
95
|
])) : u("", !0),
|
|
@@ -105,7 +105,7 @@ const z = { class: "flex flex-col w-full font-sans" }, F = { class: "flex items-
|
|
|
105
105
|
ref: w,
|
|
106
106
|
class: "flex items-end"
|
|
107
107
|
}, [
|
|
108
|
-
(a(!0), i(A, null,
|
|
108
|
+
(a(!0), i(A, null, P(J(h), (t) => (a(), O(z, {
|
|
109
109
|
key: t.id,
|
|
110
110
|
sheet: t,
|
|
111
111
|
"is-active": d.modelValue === t.id,
|
|
@@ -124,13 +124,13 @@ const z = { class: "flex flex-col w-full font-sans" }, F = { class: "flex items-
|
|
|
124
124
|
}, null, 8, ["sheet", "is-active", "is-editing", "can-delete", "confirm-delete", "confirm-delete-texts", "allow-icon-change"]))), 128))
|
|
125
125
|
], 512),
|
|
126
126
|
d.addable && d.addButtonPosition === "attached" ? (a(), i("div", j, [
|
|
127
|
-
x(b, { onClick:
|
|
127
|
+
x(b, { onClick: v })
|
|
128
128
|
])) : u("", !0),
|
|
129
|
-
|
|
129
|
+
s[0] || (s[0] = c("div", { class: "w-1 shrink-0" }, null, -1))
|
|
130
130
|
], 544),
|
|
131
131
|
c("div", q, [
|
|
132
132
|
d.addable && d.addButtonPosition === "fixed-right" ? (a(), i("div", G, [
|
|
133
|
-
x(b, { onClick:
|
|
133
|
+
x(b, { onClick: v })
|
|
134
134
|
])) : u("", !0),
|
|
135
135
|
e.$slots["right-addons"] ? (a(), i("div", H, [
|
|
136
136
|
m(e.$slots, "right-addons", {}, void 0, !0)
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "A Vue 3 UI component library built with Tailwind CSS.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "0.2.
|
|
6
|
+
"version": "0.2.6",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"module": "index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"tailwindcss": "^4.1.18",
|
|
43
43
|
"v-datepicker-lite": "^0.1.6",
|
|
44
44
|
"v-tooltip-lite": "^0.1.9",
|
|
45
|
-
"vue-carousel-lite": "^0.2.
|
|
45
|
+
"vue-carousel-lite": "^0.2.6",
|
|
46
46
|
"vue3-google-signin": "^2.1.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|