vlite3 1.4.40 → 1.5.0
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/AppShell/AppShellLayoutClassic.vue.js +27 -28
- package/components/AppShell/AppShellLayoutDashboard.vue.js +48 -48
- package/components/AppShell/AppShellLayoutDock.vue.js +51 -51
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +69 -69
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.d.ts +2 -2
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +78 -78
- package/components/AppShell/AppShellLayoutStorefront.vue.js +14 -15
- package/components/AppShell/useAppShell.d.ts +4 -0
- package/components/AppShell/useAppShell.js +45 -40
- package/components/AsyncSelect/createAsyncSelect.js +10 -10
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +50 -2
- package/components/AttachmentsList/AttachmentsList.vue.js +289 -272
- package/components/AttachmentsList/types.d.ts +37 -0
- package/components/BackButton.vue.js +2 -2
- package/components/Button.vue.d.ts +1 -0
- package/components/Button.vue.js +5 -241
- package/components/Button.vue2.js +245 -2
- package/components/ButtonGroup.vue.js +2 -2
- package/components/ButtonGroup.vue2.js +4 -1
- package/components/Calendar/Calendar.vue2.js +16 -16
- package/components/Cart/CartCouponInput.vue.js +24 -24
- package/components/Cart/CartEmptyState.vue.js +4 -4
- package/components/Cart/CartLineItem.vue.js +33 -33
- package/components/Cart/CartVariant1.vue.js +3 -3
- package/components/Cart/CartVariant2.vue.js +5 -5
- package/components/Cart/CartVariant3.vue.js +25 -25
- package/components/Cart/CartVariant4.vue.js +9 -9
- package/components/CategoryManager/CategoryManager.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue2.js +18 -18
- package/components/CategoryManager/CategoryNode.vue.js +4 -4
- package/components/CategoryMenu/CategoryMenu.vue.js +3 -2
- package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +3 -2
- package/components/Chat/ChatInterface.vue.js +23 -23
- package/components/Clipboard.vue.d.ts +7 -1
- package/components/Clipboard.vue.js +19 -17
- package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +22 -22
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +8 -8
- package/components/Comment/CommentEditor.vue.js +14 -14
- package/components/Comment/CommentItem.vue2.js +6 -6
- package/components/Comment/CommentThread.vue.js +4 -4
- package/components/DataList/DataList.vue.js +7 -7
- package/components/DataTable/DataTable.vue.d.ts +9 -1
- package/components/DataTable/DataTable.vue.js +374 -263
- package/components/DataTable/DataTableRow.vue.d.ts +23 -2
- package/components/DataTable/DataTableRow.vue.js +5 -198
- package/components/DataTable/DataTableRow.vue2.js +360 -2
- package/components/DataTable/dataTableHeaders.d.ts +18 -0
- package/components/DataTable/dataTableHeaders.js +9 -0
- package/components/DataTable/types.d.ts +6 -0
- package/components/DatePicker.vue.js +8 -9
- package/components/DateRangePicker.vue2.js +34 -34
- package/components/Dropdown/Dropdown.vue.d.ts +7 -2
- package/components/Dropdown/Dropdown.vue.js +146 -139
- package/components/Dropdown/DropdownTrigger.vue.js +6 -6
- package/components/ExportData/ExportData.vue.js +15 -15
- package/components/FilePicker/FilePickerDropzone.vue.js +16 -16
- package/components/FilePicker/FilePickerInput.vue.js +3 -2
- package/components/FilePicker/FilePreview.vue.js +3 -3
- package/components/FileTree/FileTree.vue.js +4 -4
- package/components/FileTree/FileTree.vue2.js +9 -9
- package/components/FileTree/FileTreeNode.vue.js +76 -72
- package/components/Footer/Variant1.vue.js +48 -48
- package/components/Footer/Variant2.vue.js +42 -42
- package/components/Form/AccordionView.vue.d.ts +1 -1
- package/components/Form/AccordionView.vue.js +2 -2
- package/components/Form/AccordionView.vue3.js +61 -57
- package/components/Form/Form.vue2.js +41 -41
- package/components/Form/TableRow.vue.d.ts +7 -0
- package/components/Form/TableRow.vue.js +187 -41
- package/components/Form/TableView.vue.d.ts +11 -1
- package/components/Form/TableView.vue.js +71 -49
- package/components/Form/composables/useForm.js +146 -142
- package/components/Form/index.vue.d.ts +5 -1
- package/components/Form/index.vue.js +2 -2
- package/components/Form/index.vue2.js +44 -37
- package/components/Form/rowHelpers.d.ts +20 -0
- package/components/Form/rowHelpers.js +76 -28
- package/components/Form/types.d.ts +11 -0
- package/components/GoogleLogin.vue.js +4 -4
- package/components/IconPicker.vue.js +9 -9
- package/components/ImportData/ImportData.vue.js +11 -11
- package/components/ImportData/ImportStep1.vue.js +10 -10
- package/components/ImportData/ImportStep2.vue.js +15 -14
- package/components/Input.vue.js +133 -129
- package/components/Kanban/KanbanBoard.vue.js +1 -1
- package/components/Kanban/KanbanBoard.vue2.js +9 -9
- package/components/MultiSelect/MultiSelect.vue.js +3 -2
- package/components/Navbar/Navbar.vue.js +17 -17
- package/components/Navbar/NavbarGroup.vue.js +8 -7
- package/components/Navbar/NavbarItem.vue.js +40 -39
- package/components/Navbar/NavbarTabs.vue.js +6 -184
- package/components/Navbar/NavbarTabs.vue2.js +204 -0
- package/components/Navbar/useNavbar.js +3 -3
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +81 -77
- package/components/OTPInput/OTPInput.vue.js +24 -23
- package/components/Pagination/Pagination.vue.d.ts +1 -1
- package/components/Pagination/Pagination.vue.js +5 -274
- package/components/Pagination/Pagination.vue2.js +283 -2
- package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
- package/components/PricingPlan/PricingPlanItem.vue.js +7 -7
- package/components/Screen/Screen.vue.d.ts +1 -1
- package/components/Screen/Screen.vue.js +21 -21
- package/components/Screen/ScreenFilter.vue.js +5 -5
- package/components/Screen/components/ScreenAddAction.vue.js +3 -3
- package/components/Screen/components/ScreenEmptyState.vue.js +10 -10
- package/components/Screen/components/ScreenExportModal.vue.js +12 -12
- package/components/Screen/components/ScreenOptionsDropdown.vue.js +5 -5
- package/components/Screen/components/ScreenToolbar.vue.js +15 -15
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +6 -6
- package/components/SidebarMenu/SidebarMenu.vue.js +77 -72
- package/components/SidebarMenu/SidebarMenuItem.vue.js +172 -168
- package/components/Slider.vue.js +123 -108
- package/components/Tabes/Tabes.vue.d.ts +25 -4
- package/components/Tabes/Tabes.vue.js +3 -3
- package/components/Tabes/Tabes.vue2.js +274 -211
- package/components/Tabes/tabes.utils.d.ts +30 -0
- package/components/Tabes/tabes.utils.js +49 -18
- package/components/Tabes/types.d.ts +7 -0
- package/components/Textarea.vue.d.ts +2 -0
- package/components/Textarea.vue.js +19 -16
- package/components/ThemeToggle.vue.js +8 -8
- package/components/ToastNotification.vue2.js +10 -10
- package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
- package/components/TreeConnectors/TreeConnectors.vue.js +13 -8
- package/components/TreeConnectors/geometry.js +77 -69
- package/components/Workbook/WorkbookAddButton.vue.js +2 -2
- package/composables/useRtl.d.ts +14 -0
- package/composables/useRtl.js +33 -0
- package/index.js +470 -471
- package/package.json +5 -4
- package/style.css +86 -1
- package/types/button.d.ts +8 -0
- package/components/Navbar/NavbarTabs.vue3.js +0 -5
|
@@ -12,3 +12,33 @@ export declare function isTabActive(option: TabesOption, modelValue: string | nu
|
|
|
12
12
|
* For menu tabs, returns the parent tab's value when a child is selected.
|
|
13
13
|
*/
|
|
14
14
|
export declare function getActiveMarkerKey(options: TabesOption[], modelValue: string | number): string | number | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Stable, order-independent signature for a set of tabs (djb2 over the sorted
|
|
17
|
+
* option values). Used to derive a default localStorage slot for persisted
|
|
18
|
+
* ordering when no explicit `storageKey` is supplied — so a given tab set maps
|
|
19
|
+
* to one saved order, and a membership change gets a fresh slot.
|
|
20
|
+
*/
|
|
21
|
+
export declare function hashTabesValues(options: TabesOption[]): string;
|
|
22
|
+
/** Start/end (inline-edge) scroll overflow of a horizontal tab strip. */
|
|
23
|
+
export interface TabesScrollOverflow {
|
|
24
|
+
/** More content is hidden past the inline-start edge. */
|
|
25
|
+
canScrollStart: boolean;
|
|
26
|
+
/** More content is hidden past the inline-end edge. */
|
|
27
|
+
canScrollEnd: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Compute inline-start / inline-end scroll overflow for a horizontal tab strip,
|
|
31
|
+
* shared by `Tabes` and `NavbarTabs` so both track affordances identically.
|
|
32
|
+
*
|
|
33
|
+
* Direction-agnostic: modern engines report `scrollLeft` as ≤ 0 under RTL
|
|
34
|
+
* (start = 0, end grows negative), so the magnitude is the distance scrolled
|
|
35
|
+
* from the inline-start edge in either direction. `itemSelector` is an optional
|
|
36
|
+
* guard — with no matching items there is nothing to scroll.
|
|
37
|
+
*/
|
|
38
|
+
export declare function getTabesScrollOverflow(el: HTMLElement | null | undefined, itemSelector?: string): TabesScrollOverflow;
|
|
39
|
+
/**
|
|
40
|
+
* Smoothly step a tab strip one page toward its inline-start / inline-end edge.
|
|
41
|
+
* `scrollBy({ left })` is physical, so the sign flips under RTL where
|
|
42
|
+
* inline-start sits on the physical right.
|
|
43
|
+
*/
|
|
44
|
+
export declare function scrollTabesStrip(el: HTMLElement | null | undefined, toward: 'start' | 'end', amount: number): void;
|
|
@@ -1,26 +1,57 @@
|
|
|
1
|
-
function
|
|
2
|
-
return Array.isArray(
|
|
1
|
+
function c(r) {
|
|
2
|
+
return Array.isArray(r.menu) && r.menu.length > 0;
|
|
3
3
|
}
|
|
4
|
-
function
|
|
5
|
-
return
|
|
4
|
+
function i(r) {
|
|
5
|
+
return r.value !== void 0 && r.value !== null ? r.value : r.label;
|
|
6
6
|
}
|
|
7
|
-
function u(
|
|
8
|
-
if (!
|
|
9
|
-
for (const n of
|
|
10
|
-
if (
|
|
7
|
+
function u(r, t) {
|
|
8
|
+
if (!r?.length) return !1;
|
|
9
|
+
for (const n of r)
|
|
10
|
+
if (i(n) === t || n.children?.length && u(n.children, t)) return !0;
|
|
11
11
|
return !1;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return
|
|
13
|
+
function f(r, t) {
|
|
14
|
+
return c(r) ? r.value === t || u(r.menu, t) : r.value === t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
for (const n of
|
|
18
|
-
if (
|
|
16
|
+
function o(r, t) {
|
|
17
|
+
for (const n of r)
|
|
18
|
+
if (f(n, t)) return n.value;
|
|
19
|
+
}
|
|
20
|
+
function h(r) {
|
|
21
|
+
const t = r.map((e) => String(e.value)).sort().join("|");
|
|
22
|
+
let n = 5381;
|
|
23
|
+
for (let e = 0; e < t.length; e++)
|
|
24
|
+
n = (n << 5) + n + t.charCodeAt(e) | 0;
|
|
25
|
+
return (n >>> 0).toString(36);
|
|
26
|
+
}
|
|
27
|
+
function s(r) {
|
|
28
|
+
return typeof window > "u" ? !1 : window.getComputedStyle(r).direction === "rtl";
|
|
29
|
+
}
|
|
30
|
+
function S(r, t) {
|
|
31
|
+
if (!r) return { canScrollStart: !1, canScrollEnd: !1 };
|
|
32
|
+
if (t && r.querySelector(t) === null)
|
|
33
|
+
return { canScrollStart: !1, canScrollEnd: !1 };
|
|
34
|
+
const { scrollLeft: n, scrollWidth: e, clientWidth: l } = r;
|
|
35
|
+
if (e - l <= 1)
|
|
36
|
+
return { canScrollStart: !1, canScrollEnd: !1 };
|
|
37
|
+
const a = Math.abs(n);
|
|
38
|
+
return {
|
|
39
|
+
canScrollStart: a > 1,
|
|
40
|
+
canScrollEnd: Math.ceil(a + l) < e - 1
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function d(r, t, n) {
|
|
44
|
+
if (!r) return;
|
|
45
|
+
const e = t === "start" ? -1 : 1, l = (s(r) ? -e : e) * Math.abs(n);
|
|
46
|
+
r.scrollBy({ left: l, behavior: "smooth" });
|
|
19
47
|
}
|
|
20
48
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
49
|
+
o as getActiveMarkerKey,
|
|
50
|
+
i as getMenuOptionValue,
|
|
51
|
+
S as getTabesScrollOverflow,
|
|
52
|
+
h as hashTabesValues,
|
|
53
|
+
c as isMenuTab,
|
|
54
|
+
f as isTabActive,
|
|
55
|
+
u as menuContainsValue,
|
|
56
|
+
d as scrollTabesStrip
|
|
26
57
|
};
|
|
@@ -44,3 +44,10 @@ export type TabesMenuSelectPayload = {
|
|
|
44
44
|
option?: IDropdownOption;
|
|
45
45
|
tab: TabesOption;
|
|
46
46
|
};
|
|
47
|
+
/** Emitted after the user drags tabs into a new order (`sortable`). */
|
|
48
|
+
export type TabesReorderPayload = {
|
|
49
|
+
/** Tabs in their new order. */
|
|
50
|
+
options: TabesOption[];
|
|
51
|
+
/** New order as a list of option values (the shape persisted to storage). */
|
|
52
|
+
order: (string | number)[];
|
|
53
|
+
};
|
|
@@ -5,6 +5,8 @@ interface Props {
|
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
rows?: number;
|
|
7
7
|
class?: string;
|
|
8
|
+
/** Explicit text direction; defaults to page dir so placeholders mirror under RTL. */
|
|
9
|
+
dir?: 'ltr' | 'rtl';
|
|
8
10
|
}
|
|
9
11
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
10
12
|
blur: (event: FocusEvent) => any;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { resolveI18nText as
|
|
3
|
-
|
|
1
|
+
import { defineComponent as p, computed as d, openBlock as f, createElementBlock as b, normalizeClass as x } from "vue";
|
|
2
|
+
import { resolveI18nText as v } from "../utils/i18n.js";
|
|
3
|
+
import { useRtl as h } from "../composables/useRtl.js";
|
|
4
|
+
const g = ["value", "rows", "disabled", "placeholder", "dir", "data-testid"], y = /* @__PURE__ */ p({
|
|
4
5
|
__name: "Textarea",
|
|
5
6
|
props: {
|
|
6
7
|
modelValue: { default: "" },
|
|
@@ -8,32 +9,34 @@ const x = ["value", "rows", "disabled", "placeholder", "data-testid"], g = /* @_
|
|
|
8
9
|
placeholderI18n: {},
|
|
9
10
|
disabled: { type: Boolean, default: !1 },
|
|
10
11
|
rows: { default: 3 },
|
|
11
|
-
class: { default: "" }
|
|
12
|
+
class: { default: "" },
|
|
13
|
+
dir: {}
|
|
12
14
|
},
|
|
13
15
|
emits: ["update:modelValue", "focus", "blur"],
|
|
14
16
|
setup(l, { emit: s }) {
|
|
15
|
-
const a = l, o = s, n =
|
|
17
|
+
const a = l, o = s, n = h(), u = d(() => a.dir ?? (n.value ? "rtl" : "ltr")), i = d(() => [
|
|
16
18
|
"flex min-h-[80px] w-full rounded-md border border-input px-3 py-2 text-sm placeholder:text-muted-foreground/50 focus-visible:outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 bg-background text-foreground",
|
|
17
19
|
a.class
|
|
18
|
-
].join(" ")),
|
|
20
|
+
].join(" ")), c = (t) => {
|
|
19
21
|
const e = t.target;
|
|
20
22
|
o("update:modelValue", e.value);
|
|
21
|
-
},
|
|
22
|
-
() =>
|
|
23
|
+
}, m = d(
|
|
24
|
+
() => v(a.placeholderI18n, a.placeholder)
|
|
23
25
|
);
|
|
24
|
-
return (t, e) => (
|
|
26
|
+
return (t, e) => (f(), b("textarea", {
|
|
25
27
|
value: l.modelValue,
|
|
26
28
|
rows: l.rows,
|
|
27
29
|
disabled: l.disabled,
|
|
28
|
-
placeholder:
|
|
29
|
-
class:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
placeholder: m.value,
|
|
31
|
+
class: x(i.value),
|
|
32
|
+
dir: u.value,
|
|
33
|
+
onInput: c,
|
|
34
|
+
onFocus: e[0] || (e[0] = (r) => o("focus", r)),
|
|
35
|
+
onBlur: e[1] || (e[1] = (r) => o("blur", r)),
|
|
33
36
|
"data-testid": t.$attrs["data-testid"] || (t.$attrs.name ? `textarea-${t.$attrs.name}` : "textarea")
|
|
34
|
-
}, null, 42,
|
|
37
|
+
}, null, 42, g));
|
|
35
38
|
}
|
|
36
39
|
});
|
|
37
40
|
export {
|
|
38
|
-
|
|
41
|
+
y as default
|
|
39
42
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as m, computed as
|
|
1
|
+
import { defineComponent as m, computed as u, renderSlot as d, unref as o, createVNode as h, normalizeClass as g } from "vue";
|
|
2
2
|
import { useTheme as f } from "../composables/useTheme.js";
|
|
3
3
|
import T from "./Button.vue.js";
|
|
4
4
|
import { $t as c } from "../utils/i18n.js";
|
|
@@ -11,18 +11,18 @@ const w = /* @__PURE__ */ m({
|
|
|
11
11
|
variant: {}
|
|
12
12
|
},
|
|
13
13
|
setup(t) {
|
|
14
|
-
const { theme: i, toggleTheme:
|
|
15
|
-
const n = i.value === "light", l = "vlite.themeToggle.switchToDark",
|
|
14
|
+
const { theme: i, toggleTheme: r } = f(), a = u(() => {
|
|
15
|
+
const n = i.value === "light", l = "vlite.themeToggle.switchToDark", s = "vlite.themeToggle.switchToLight";
|
|
16
16
|
if (n) {
|
|
17
17
|
const e = c(l);
|
|
18
18
|
return e !== l ? e : "Switch to dark mode";
|
|
19
19
|
} else {
|
|
20
|
-
const e = c(
|
|
21
|
-
return e !==
|
|
20
|
+
const e = c(s);
|
|
21
|
+
return e !== s ? e : "Switch to light mode";
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
return (n, l) =>
|
|
25
|
-
toggleTheme: o(
|
|
24
|
+
return (n, l) => d(n.$slots, "default", {
|
|
25
|
+
toggleTheme: o(r),
|
|
26
26
|
theme: o(i)
|
|
27
27
|
}, () => [
|
|
28
28
|
h(T, {
|
|
@@ -32,7 +32,7 @@ const w = /* @__PURE__ */ m({
|
|
|
32
32
|
size: t.size,
|
|
33
33
|
class: g(t.class),
|
|
34
34
|
title: a.value,
|
|
35
|
-
onClick: o(
|
|
35
|
+
onClick: o(r)
|
|
36
36
|
}, null, 8, ["icon", "variant", "rounded", "size", "class", "title", "onClick"])
|
|
37
37
|
]);
|
|
38
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as P, ref as Y, onUnmounted as F, openBlock as o, createElementBlock as i, createBlock as y, Teleport as U, Fragment as v, renderList as
|
|
1
|
+
import { defineComponent as P, ref as Y, onUnmounted as F, openBlock as o, createElementBlock as i, createBlock as y, Teleport as U, Fragment as v, renderList as w, createElementVNode as m, normalizeClass as g, createVNode as _, TransitionGroup as q, withCtx as k, unref as H, isMemoSame as J, normalizeStyle as K, toDisplayString as p, createCommentVNode as T, createTextVNode as Q } from "vue";
|
|
2
2
|
import R from "./Icon.vue.js";
|
|
3
3
|
import { useNotifications as W } from "../composables/useNotifications.js";
|
|
4
4
|
import X from "./Button.vue.js";
|
|
@@ -15,14 +15,14 @@ const Z = {
|
|
|
15
15
|
expand: { type: Boolean }
|
|
16
16
|
},
|
|
17
17
|
setup(oe) {
|
|
18
|
-
const { notifications:
|
|
18
|
+
const { notifications: B, removeToast: z, globalConfig: b, pauseTimers: S, resumeTimers: V } = W(), c = Y(!1), $ = [
|
|
19
19
|
"top-left",
|
|
20
20
|
"top-center",
|
|
21
21
|
"top-right",
|
|
22
22
|
"bottom-left",
|
|
23
23
|
"bottom-center",
|
|
24
24
|
"bottom-right"
|
|
25
|
-
], d = (e) =>
|
|
25
|
+
], d = (e) => B.value.filter((t) => t.position === e).slice().reverse(), N = {
|
|
26
26
|
"top-left": "top-0 left-0 py-4",
|
|
27
27
|
"top-center": "top-0 left-1/2 -translate-x-1/2 py-4",
|
|
28
28
|
"top-right": "top-0 right-0 py-4",
|
|
@@ -54,7 +54,7 @@ const Z = {
|
|
|
54
54
|
"--entrance-offset": e.includes("bottom") ? "25px" : "-25px",
|
|
55
55
|
"--entrance-opacity": "0.6"
|
|
56
56
|
}, M = (e) => {
|
|
57
|
-
e.action && (e.action.onClick(),
|
|
57
|
+
e.action && (e.action.onClick(), z(e.id));
|
|
58
58
|
}, h = {
|
|
59
59
|
error: "lucide:octagon-x",
|
|
60
60
|
success: "lucide:circle-check",
|
|
@@ -70,10 +70,10 @@ const Z = {
|
|
|
70
70
|
}, D = (e) => x[e] || x.default;
|
|
71
71
|
let n = null;
|
|
72
72
|
const O = () => {
|
|
73
|
-
n && (clearTimeout(n), n = null), c.value = !0,
|
|
73
|
+
n && (clearTimeout(n), n = null), c.value = !0, S();
|
|
74
74
|
}, j = () => {
|
|
75
75
|
n = setTimeout(() => {
|
|
76
|
-
c.value = !1,
|
|
76
|
+
c.value = !1, V();
|
|
77
77
|
}, 400);
|
|
78
78
|
};
|
|
79
79
|
F(() => {
|
|
@@ -85,7 +85,7 @@ const Z = {
|
|
|
85
85
|
};
|
|
86
86
|
return (e, s) => (o(), i("div", Z, [
|
|
87
87
|
(o(), y(U, { to: "body" }, [
|
|
88
|
-
(o(), i(v, null,
|
|
88
|
+
(o(), i(v, null, w($, (t) => m("div", {
|
|
89
89
|
key: t,
|
|
90
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],
|
|
@@ -97,7 +97,7 @@ const Z = {
|
|
|
97
97
|
m("div", {
|
|
98
98
|
class: g(["relative w-full transition-all", [{ "flex-col-reverse": t.includes("top") }]])
|
|
99
99
|
}, [
|
|
100
|
-
|
|
100
|
+
_(q, {
|
|
101
101
|
name: d(t).length <= 1 ? "first-toast" : "stack-toast",
|
|
102
102
|
tag: "div",
|
|
103
103
|
class: g(["w-full grid grid-cols-1 grid-rows-1", [
|
|
@@ -106,7 +106,7 @@ const Z = {
|
|
|
106
106
|
style: { "min-height": "20px" }
|
|
107
107
|
}, {
|
|
108
108
|
default: k(() => [
|
|
109
|
-
(o(!0), i(v, null,
|
|
109
|
+
(o(!0), i(v, null, w(d(t), (r, l, L, a) => {
|
|
110
110
|
const u = [
|
|
111
111
|
r,
|
|
112
112
|
l,
|
|
@@ -130,7 +130,7 @@ const Z = {
|
|
|
130
130
|
}
|
|
131
131
|
])
|
|
132
132
|
}, [
|
|
133
|
-
|
|
133
|
+
_(R, {
|
|
134
134
|
icon: h[r.type] || h.default,
|
|
135
135
|
class: "w-5 h-5 shrink-0 mt-0.5"
|
|
136
136
|
}, null, 8, ["icon"]),
|
|
@@ -23,5 +23,5 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
23
23
|
ancestorLastFlags: boolean[];
|
|
24
24
|
lineClass: string;
|
|
25
25
|
bleedY: boolean;
|
|
26
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as m, computed as u, openBlock as s, createElementBlock as
|
|
1
|
+
import { defineComponent as m, computed as u, openBlock as s, createElementBlock as o, normalizeClass as i, Fragment as c, renderList as f, isMemoSame as g, normalizeStyle as S } from "vue";
|
|
2
2
|
import { EMPTY_ANCESTOR_LAST_FLAGS as b, buildTreeConnectorSegments as y } from "./geometry.js";
|
|
3
3
|
const x = /* @__PURE__ */ m({
|
|
4
4
|
__name: "TreeConnectors",
|
|
@@ -31,19 +31,24 @@ const x = /* @__PURE__ */ m({
|
|
|
31
31
|
leafInset: e.leafInset
|
|
32
32
|
})
|
|
33
33
|
);
|
|
34
|
-
return (L, d) => (s(),
|
|
34
|
+
return (L, d) => (s(), o("span", {
|
|
35
35
|
class: i(["tree-connectors pointer-events-none absolute inset-x-0", n.bleedY ? "-inset-y-px z-[1]" : "inset-y-0 overflow-hidden"]),
|
|
36
36
|
"aria-hidden": "true"
|
|
37
37
|
}, [
|
|
38
|
-
(s(!0),
|
|
39
|
-
const
|
|
40
|
-
if (a && a.key === t.key && g(a,
|
|
41
|
-
const r = (s(),
|
|
38
|
+
(s(!0), o(c, null, f(p.value, (t, C, T, a) => {
|
|
39
|
+
const l = [t, n.lineClass];
|
|
40
|
+
if (a && a.key === t.key && g(a, l)) return a;
|
|
41
|
+
const r = (s(), o("span", {
|
|
42
42
|
key: t.key,
|
|
43
|
-
class: i(["absolute", [
|
|
43
|
+
class: i(["pointer-events-none absolute", [
|
|
44
|
+
// Vertical: 1px physical width. Horizontal: height only — length comes from
|
|
45
|
+
// logical `inlineSize` in segment style (grows toward inline-end / RTL-safe).
|
|
46
|
+
t.orientation === "vertical" ? "w-px" : "h-px",
|
|
47
|
+
n.lineClass
|
|
48
|
+
]]),
|
|
44
49
|
style: S(t.style)
|
|
45
50
|
}, null, 6));
|
|
46
|
-
return r.memo =
|
|
51
|
+
return r.memo = l, r;
|
|
47
52
|
}, d, 0), 128))
|
|
48
53
|
], 2));
|
|
49
54
|
}
|
|
@@ -1,137 +1,145 @@
|
|
|
1
|
-
import { markRaw as
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
return n * e +
|
|
1
|
+
import { markRaw as i } from "vue";
|
|
2
|
+
const C = 20, y = 20, O = 10, v = 10, w = 5, l = 0.5, m = 2, z = 5, G = 512;
|
|
3
|
+
function x(n, e, s) {
|
|
4
|
+
return n * e + s / 2;
|
|
5
5
|
}
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
if (!n.length) return
|
|
6
|
+
const E = (n) => `${n}px`, R = Object.freeze([]), N = /* @__PURE__ */ new Map();
|
|
7
|
+
function k(n) {
|
|
8
|
+
if (!n.length) return R;
|
|
9
9
|
let e = "";
|
|
10
10
|
for (let a = 0; a < n.length; a++)
|
|
11
11
|
e += n[a] ? "1" : "0";
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
const
|
|
15
|
-
return
|
|
12
|
+
const s = N.get(e);
|
|
13
|
+
if (s) return s;
|
|
14
|
+
const o = i(n.slice());
|
|
15
|
+
return N.set(e, o), o;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return
|
|
17
|
+
function U(n, e) {
|
|
18
|
+
return k([...n, e]);
|
|
19
19
|
}
|
|
20
|
-
const
|
|
20
|
+
const h = /* @__PURE__ */ new Map();
|
|
21
21
|
function D(n) {
|
|
22
22
|
const {
|
|
23
23
|
depth: e,
|
|
24
|
-
isLastSibling:
|
|
25
|
-
hasToggle:
|
|
24
|
+
isLastSibling: s,
|
|
25
|
+
hasToggle: o,
|
|
26
26
|
indent: a,
|
|
27
27
|
toggleSize: r,
|
|
28
|
-
baseInset:
|
|
29
|
-
contentGap:
|
|
28
|
+
baseInset: f,
|
|
29
|
+
contentGap: c,
|
|
30
30
|
leafHasSpacer: g,
|
|
31
31
|
leafInset: p,
|
|
32
32
|
flagsKey: u
|
|
33
33
|
} = n;
|
|
34
34
|
return [
|
|
35
35
|
e,
|
|
36
|
-
o ? 1 : 0,
|
|
37
36
|
s ? 1 : 0,
|
|
37
|
+
o ? 1 : 0,
|
|
38
38
|
a,
|
|
39
39
|
r,
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
f,
|
|
41
|
+
c,
|
|
42
42
|
g ? 1 : 0,
|
|
43
43
|
p,
|
|
44
44
|
u
|
|
45
45
|
].join("|");
|
|
46
46
|
}
|
|
47
47
|
function M(n, e) {
|
|
48
|
-
if (
|
|
49
|
-
const
|
|
50
|
-
|
|
48
|
+
if (h.size >= G) {
|
|
49
|
+
const o = h.keys().next().value;
|
|
50
|
+
o !== void 0 && h.delete(o);
|
|
51
51
|
}
|
|
52
|
-
const
|
|
53
|
-
return
|
|
52
|
+
const s = i(e);
|
|
53
|
+
return h.set(n, s), s;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function $(n) {
|
|
56
56
|
const {
|
|
57
57
|
depth: e,
|
|
58
|
-
isLastSibling:
|
|
59
|
-
ancestorLastFlags:
|
|
58
|
+
isLastSibling: s,
|
|
59
|
+
ancestorLastFlags: o,
|
|
60
60
|
hasToggle: a = !1,
|
|
61
|
-
indent: r =
|
|
62
|
-
toggleSize:
|
|
63
|
-
baseInset:
|
|
61
|
+
indent: r = C,
|
|
62
|
+
toggleSize: f = y,
|
|
63
|
+
baseInset: c = 0,
|
|
64
64
|
contentGap: g = 0,
|
|
65
65
|
leafHasSpacer: p = !0,
|
|
66
66
|
leafInset: u = 0
|
|
67
67
|
} = n;
|
|
68
68
|
if (!Number.isFinite(e) || e < 0) return [];
|
|
69
|
-
let
|
|
70
|
-
for (let t = 0; t <
|
|
71
|
-
|
|
72
|
-
const
|
|
69
|
+
let A = "";
|
|
70
|
+
for (let t = 0; t < o.length; t++)
|
|
71
|
+
A += o[t] ? "1" : "0";
|
|
72
|
+
const I = D({
|
|
73
73
|
depth: e,
|
|
74
|
-
isLastSibling:
|
|
74
|
+
isLastSibling: s,
|
|
75
75
|
hasToggle: a,
|
|
76
76
|
indent: r,
|
|
77
|
-
toggleSize:
|
|
78
|
-
baseInset:
|
|
77
|
+
toggleSize: f,
|
|
78
|
+
baseInset: c,
|
|
79
79
|
contentGap: g,
|
|
80
80
|
leafHasSpacer: p,
|
|
81
81
|
leafInset: u,
|
|
82
|
-
flagsKey:
|
|
83
|
-
}),
|
|
84
|
-
if (
|
|
85
|
-
const T = [], _ = (t) =>
|
|
82
|
+
flagsKey: A
|
|
83
|
+
}), b = h.get(I);
|
|
84
|
+
if (b) return b;
|
|
85
|
+
const T = [], _ = (t) => c + x(t, r, f);
|
|
86
86
|
for (let t = 0; t <= e - 2; t++)
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
o[t + 1] === !1 && T.push(
|
|
88
|
+
i({
|
|
89
89
|
key: `trunk-${t}`,
|
|
90
90
|
orientation: "vertical",
|
|
91
91
|
role: "trunk",
|
|
92
|
-
|
|
92
|
+
// Logical inset so rails flip with `dir="rtl"` (inline-start = right in RTL).
|
|
93
|
+
style: i({
|
|
94
|
+
insetInlineStart: E(_(t) - l),
|
|
95
|
+
top: "0",
|
|
96
|
+
bottom: "0"
|
|
97
|
+
})
|
|
93
98
|
})
|
|
94
99
|
);
|
|
95
100
|
if (e >= 1) {
|
|
96
101
|
const t = _(e - 1);
|
|
97
102
|
T.push(
|
|
98
|
-
|
|
103
|
+
i({
|
|
99
104
|
key: `elbow-${e}`,
|
|
100
105
|
orientation: "vertical",
|
|
101
106
|
role: "elbow",
|
|
102
|
-
style:
|
|
103
|
-
|
|
107
|
+
style: i(
|
|
108
|
+
s ? { insetInlineStart: E(t - l), top: "0", height: "50%" } : { insetInlineStart: E(t - l), top: "0", bottom: "0" }
|
|
104
109
|
)
|
|
105
110
|
})
|
|
106
111
|
);
|
|
107
|
-
const
|
|
108
|
-
let
|
|
109
|
-
a ?
|
|
110
|
-
const F = Math.max(t +
|
|
112
|
+
const L = c + e * r;
|
|
113
|
+
let S;
|
|
114
|
+
a ? S = L - m : p ? S = _(e) + g : S = L + u - m;
|
|
115
|
+
const F = Math.max(t + z, S), d = E(Math.max(0, F - t));
|
|
111
116
|
T.push(
|
|
112
|
-
|
|
117
|
+
i({
|
|
113
118
|
key: `branch-${e}`,
|
|
114
119
|
orientation: "horizontal",
|
|
115
120
|
role: "branch",
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
// Only logical inline sizing — physical `width` would grow to the right
|
|
122
|
+
// in RTL and point the branch the wrong way.
|
|
123
|
+
style: i({
|
|
124
|
+
insetInlineStart: E(t - l),
|
|
125
|
+
top: `calc(50% - ${l}px)`,
|
|
126
|
+
inlineSize: d,
|
|
127
|
+
maxInlineSize: d
|
|
120
128
|
})
|
|
121
129
|
})
|
|
122
130
|
);
|
|
123
131
|
}
|
|
124
|
-
return M(
|
|
132
|
+
return M(I, T);
|
|
125
133
|
}
|
|
126
134
|
export {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
y as DEFAULT_TOGGLE_SIZE,
|
|
136
|
+
v as DEFAULT_TREE_CONTENT_GAP,
|
|
137
|
+
C as DEFAULT_TREE_INDENT,
|
|
138
|
+
O as DEFAULT_TREE_LEADING,
|
|
139
|
+
w as DEFAULT_TREE_LEAF_INSET,
|
|
140
|
+
R as EMPTY_ANCESTOR_LAST_FLAGS,
|
|
141
|
+
U as appendAncestorLastFlag,
|
|
142
|
+
$ as buildTreeConnectorSegments,
|
|
143
|
+
x as railX,
|
|
144
|
+
k as stabilizeAncestorLastFlags
|
|
137
145
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as l, computed as c, openBlock as
|
|
1
|
+
import { defineComponent as l, computed as c, openBlock as d, createBlock as s } from "vue";
|
|
2
2
|
import m from "../Button.vue.js";
|
|
3
3
|
import { $t as u } from "../../utils/i18n.js";
|
|
4
4
|
const _ = /* @__PURE__ */ l({
|
|
@@ -9,7 +9,7 @@ const _ = /* @__PURE__ */ l({
|
|
|
9
9
|
const t = u("vlite.workbook.addSheet");
|
|
10
10
|
return t !== "vlite.workbook.addSheet" ? t : "Add New Sheet";
|
|
11
11
|
});
|
|
12
|
-
return (t, e) => (
|
|
12
|
+
return (t, e) => (d(), s(m, {
|
|
13
13
|
variant: "ghost",
|
|
14
14
|
size: "md",
|
|
15
15
|
icon: "lucide:plus",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export type TextDirection = 'ltr' | 'rtl';
|
|
3
|
+
/**
|
|
4
|
+
* Nearest explicit `dir` on an ancestor of `el` (not including `el` itself).
|
|
5
|
+
* Falls back to `document.documentElement.dir`, then `'ltr'`.
|
|
6
|
+
* Used so widgets inside `dir="ltr"` islands (e.g. input addon groups) do not
|
|
7
|
+
* inherit page-level RTL via `direction: auto → html[dir]`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveDirFromAncestors(el: HTMLElement | null | undefined): TextDirection;
|
|
10
|
+
/**
|
|
11
|
+
* Reactive `document.documentElement.dir === 'rtl'`.
|
|
12
|
+
* Used by tree UIs (DataTable / FileTree) for chevron direction and layout.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useRtl(): Readonly<Ref<boolean>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ref as r, onMounted as u, onUnmounted as o, readonly as l } from "vue";
|
|
2
|
+
function d(n) {
|
|
3
|
+
let e = n?.parentElement ?? null;
|
|
4
|
+
for (; e; ) {
|
|
5
|
+
const t = e.getAttribute("dir");
|
|
6
|
+
if (t === "ltr" || t === "rtl") return t;
|
|
7
|
+
e = e.parentElement;
|
|
8
|
+
}
|
|
9
|
+
return typeof document < "u" && document.documentElement.getAttribute("dir") === "rtl" ? "rtl" : "ltr";
|
|
10
|
+
}
|
|
11
|
+
function c() {
|
|
12
|
+
const n = r(!1);
|
|
13
|
+
let e = null;
|
|
14
|
+
const t = () => {
|
|
15
|
+
if (typeof document > "u") {
|
|
16
|
+
n.value = !1;
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
n.value = document.documentElement.getAttribute("dir") === "rtl";
|
|
20
|
+
};
|
|
21
|
+
return u(() => {
|
|
22
|
+
t(), e = new MutationObserver(t), e.observe(document.documentElement, {
|
|
23
|
+
attributes: !0,
|
|
24
|
+
attributeFilter: ["dir"]
|
|
25
|
+
});
|
|
26
|
+
}), o(() => {
|
|
27
|
+
e?.disconnect(), e = null;
|
|
28
|
+
}), t(), l(n);
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
d as resolveDirFromAncestors,
|
|
32
|
+
c as useRtl
|
|
33
|
+
};
|