vlite3 1.2.16 → 1.3.1
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.d.ts +2 -0
- package/components/Button.vue.js +66 -55
- package/components/Carousel/Carousel.vue.d.ts +210 -240
- package/components/Carousel/Carousel.vue.js +2 -2
- package/components/Carousel/Carousel.vue2.js +31 -21
- package/components/Carousel/types.d.ts +76 -14
- package/components/CategoryManager/CategoryManager.vue.d.ts +9 -1
- package/components/CategoryManager/CategoryManager.vue.js +5 -461
- package/components/CategoryManager/CategoryManager.vue2.js +515 -2
- package/components/CategoryManager/CategoryNode.vue.js +65 -64
- package/components/CategoryManager/types.d.ts +16 -0
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/FadeOverlay/FadeOverlay.vue.d.ts +13 -0
- package/components/FadeOverlay/FadeOverlay.vue.js +59 -0
- package/components/FadeOverlay/FadeOverlay.vue2.js +4 -0
- package/components/FadeOverlay/index.d.ts +2 -0
- package/components/FadeOverlay/types.d.ts +72 -0
- package/components/FadeOverlay/utils.d.ts +6 -0
- package/components/FadeOverlay/utils.js +31 -0
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.d.ts +4 -4
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +56 -56
- package/components/Screen/Screen.vue.js +51 -51
- package/components/Screen/ScreenFilter.vue.js +2 -2
- package/components/Screen/components/ScreenQuickFilters.vue.js +3 -3
- package/components/Switch.vue.js +9 -3
- package/components/Tabes/Tabes.vue.d.ts +2 -1
- package/components/Tabes/Tabes.vue.js +2 -2
- package/components/Tabes/Tabes.vue2.js +200 -78
- package/components/Workbook/WorkbookAddButton.vue.js +4 -4
- package/components/index.d.ts +1 -0
- package/index.d.ts +1 -0
- package/index.js +76 -74
- package/package.json +2 -2
- package/style.css +33 -32
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as A, inject as B, computed as
|
|
1
|
+
import { defineComponent as A, inject as B, computed as g, resolveComponent as F, openBlock as a, createBlock as f, unref as l, withCtx as K, createElementBlock as d, Fragment as R, renderList as L, isMemoSame as O, createElementVNode as y, normalizeClass as u, createVNode as s, createCommentVNode as c, withDirectives as k, withModifiers as q, withKeys as w, vModelText as _, toDisplayString as Q, vShow as G } from "vue";
|
|
2
2
|
import { VueDraggable as H } from "vue-draggable-plus";
|
|
3
3
|
import C from "../Icon.vue.js";
|
|
4
4
|
import m from "../Button.vue.js";
|
|
@@ -15,7 +15,7 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
15
15
|
}, le = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "flex items-center gap-1.5 py-1.5 px-2 bg-background border border-border shadow-sm rounded-lg w-full mb-1.5"
|
|
18
|
-
},
|
|
18
|
+
}, ne = ["placeholder"], ce = /* @__PURE__ */ A({
|
|
19
19
|
__name: "CategoryNode",
|
|
20
20
|
props: {
|
|
21
21
|
modelValue: {},
|
|
@@ -23,27 +23,27 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
23
23
|
},
|
|
24
24
|
emits: ["update:modelValue", "change", "dragEnd"],
|
|
25
25
|
setup(V, { emit: E }) {
|
|
26
|
-
const S = V,
|
|
26
|
+
const S = V, p = E, t = B("categoryManager"), b = g({
|
|
27
27
|
get: () => S.modelValue,
|
|
28
|
-
set: (i) =>
|
|
29
|
-
}), D = (i,
|
|
30
|
-
|
|
31
|
-
}, U = () =>
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
}, v =
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
-
}), h =
|
|
28
|
+
set: (i) => p("update:modelValue", i)
|
|
29
|
+
}), D = (i, n) => {
|
|
30
|
+
n.children = i, p("change");
|
|
31
|
+
}, U = () => p("change"), N = (i) => {
|
|
32
|
+
const n = i.item?.dataset?.id;
|
|
33
|
+
n && p("dragEnd", n);
|
|
34
|
+
}, v = g(() => t?.readonly.value || !1), r = g(() => t?.size.value || "md"), M = g(() => r.value === "sm" ? "p-1 md:p-1.5" : r.value === "lg" ? "p-2 md:p-2.5" : "py-1.5 px-2"), I = g(() => {
|
|
35
|
+
const n = S.level === 0 ? "font-semibold" : "font-medium";
|
|
36
|
+
return r.value === "sm" ? `text-xs ${n} text-foreground` : r.value === "lg" ? `-text-fs-1 ${n} text-foreground` : `text-sm ${n} text-foreground`;
|
|
37
|
+
}), h = g(() => r.value === "sm" ? "w-3.5 h-3.5" : r.value === "lg" ? "w-4.5 h-4.5" : "w-4 h-4"), j = {
|
|
38
38
|
mounted: (i) => {
|
|
39
39
|
setTimeout(() => i.focus(), 10);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
return (i,
|
|
42
|
+
return (i, n) => {
|
|
43
43
|
const P = F("CategoryNode", !0);
|
|
44
|
-
return
|
|
44
|
+
return a(), f(l(H), {
|
|
45
45
|
modelValue: b.value,
|
|
46
|
-
"onUpdate:modelValue":
|
|
46
|
+
"onUpdate:modelValue": n[11] || (n[11] = (e) => b.value = e),
|
|
47
47
|
group: "category-manager",
|
|
48
48
|
animation: 150,
|
|
49
49
|
handle: ".drag-handle",
|
|
@@ -53,20 +53,20 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
53
53
|
onEnd: N
|
|
54
54
|
}, {
|
|
55
55
|
default: K(() => [
|
|
56
|
-
(
|
|
56
|
+
(a(!0), d(R, null, L(b.value, (e, oe, ae, x) => {
|
|
57
57
|
const T = [
|
|
58
58
|
e.id,
|
|
59
59
|
e.title,
|
|
60
60
|
e.icon,
|
|
61
|
-
e.children?.map((
|
|
61
|
+
e.children?.map((o) => o.id).join(","),
|
|
62
62
|
l(t)?.expandedIds.value.has(e.id),
|
|
63
63
|
l(t)?.inlineState.value.targetId === e.id,
|
|
64
64
|
l(t)?.inlineState.value.mode,
|
|
65
65
|
v.value,
|
|
66
|
-
|
|
66
|
+
r.value
|
|
67
67
|
];
|
|
68
68
|
if (x && x.key === e.id && O(x, T)) return x;
|
|
69
|
-
const $ = (
|
|
69
|
+
const $ = (a(), d("div", {
|
|
70
70
|
key: e.id,
|
|
71
71
|
"data-id": e.id,
|
|
72
72
|
class: "mb-1.5 flex flex-col"
|
|
@@ -78,104 +78,105 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
78
78
|
])
|
|
79
79
|
}, [
|
|
80
80
|
y("div", J, [
|
|
81
|
-
e.children && e.children.length > 0 ? (
|
|
81
|
+
e.children && e.children.length > 0 ? (a(), d("button", {
|
|
82
82
|
key: 0,
|
|
83
|
-
onClick: (
|
|
83
|
+
onClick: (o) => l(t)?.toggleExpand(e.id),
|
|
84
84
|
class: u([
|
|
85
85
|
"flex items-center justify-center shrink-0 text-muted-foreground hover:bg-muted rounded transition-colors",
|
|
86
|
-
|
|
86
|
+
r.value === "sm" ? "w-4 h-4" : r.value === "lg" ? "w-6 h-6" : "w-6.5 h-6.5"
|
|
87
87
|
])
|
|
88
88
|
}, [
|
|
89
|
-
|
|
89
|
+
s(C, {
|
|
90
90
|
icon: l(t)?.expandedIds.value.has(e.id) ? "lucide:chevron-down" : "lucide:chevron-right",
|
|
91
91
|
class: u(h.value)
|
|
92
92
|
}, null, 8, ["icon", "class"])
|
|
93
93
|
], 10, W)) : c("", !0),
|
|
94
94
|
y("div", X, [
|
|
95
|
-
v.value ? c("", !0) : (
|
|
96
|
-
|
|
95
|
+
v.value ? c("", !0) : (a(), d("div", Y, [
|
|
96
|
+
s(C, {
|
|
97
97
|
icon: "lucide:grip-vertical",
|
|
98
98
|
class: u(h.value)
|
|
99
99
|
}, null, 8, ["class"])
|
|
100
100
|
])),
|
|
101
|
-
v.value ? e.icon ? (
|
|
101
|
+
v.value ? e.icon ? (a(), f(C, {
|
|
102
102
|
key: 2,
|
|
103
103
|
icon: e.icon,
|
|
104
104
|
class: u([h.value, "shrink-0 text-muted-foreground"])
|
|
105
|
-
}, null, 8, ["icon", "class"])) : c("", !0) : (
|
|
105
|
+
}, null, 8, ["icon", "class"])) : c("", !0) : (a(), f(z, {
|
|
106
106
|
key: 1,
|
|
107
107
|
value: e.icon,
|
|
108
108
|
"btn-props": {
|
|
109
109
|
variant: "ghost",
|
|
110
110
|
size: "xs",
|
|
111
111
|
iconClass: h.value,
|
|
112
|
-
class: (
|
|
112
|
+
class: (r.value === "sm" ? "h-5 w-5" : r.value === "lg" ? "h-7 w-7" : "h-6 w-6") + " -ml-0.5! p-0 text-muted-foreground hover:text-foreground shrink-0 rounded-md"
|
|
113
113
|
},
|
|
114
114
|
position: "bottom-start",
|
|
115
|
-
onOnSelect: (
|
|
116
|
-
console.log("IconPicker value :>> ",
|
|
115
|
+
onOnSelect: (o) => {
|
|
116
|
+
console.log("IconPicker value :>> ", o), e.icon = o, l(t)?.saveItem(e);
|
|
117
117
|
}
|
|
118
118
|
}, null, 8, ["value", "btn-props", "onOnSelect"])),
|
|
119
|
-
v.value ? (
|
|
119
|
+
v.value ? (a(), d("span", {
|
|
120
120
|
key: 4,
|
|
121
121
|
class: u(["truncate", I.value])
|
|
122
|
-
}, Q(e.title), 3)) : k((
|
|
122
|
+
}, Q(e.title), 3)) : k((a(), d("input", {
|
|
123
123
|
key: 3,
|
|
124
|
-
"onUpdate:modelValue": (
|
|
124
|
+
"onUpdate:modelValue": (o) => e.title = o,
|
|
125
125
|
class: u([
|
|
126
126
|
"bg-transparent border-0 outline-none focus:ring-0 px-1 py-0.5 -ml-1 transition-colors w-full truncate cursor-text min-w-0 shadow-none caret-primary",
|
|
127
127
|
I.value
|
|
128
128
|
]),
|
|
129
129
|
placeholder: l(t)?.categoryTitlePlaceholderText.value || "Category title...",
|
|
130
|
-
onChange: (
|
|
131
|
-
onKeyup:
|
|
132
|
-
onClick:
|
|
130
|
+
onChange: (o) => l(t)?.saveItem(e),
|
|
131
|
+
onKeyup: n[0] || (n[0] = w((o) => o.target.blur(), ["enter"])),
|
|
132
|
+
onClick: n[1] || (n[1] = q(() => {
|
|
133
133
|
}, ["stop"]))
|
|
134
134
|
}, null, 42, Z)), [
|
|
135
135
|
[_, e.title]
|
|
136
136
|
])
|
|
137
137
|
])
|
|
138
138
|
]),
|
|
139
|
-
v.value ? c("", !0) : (
|
|
140
|
-
|
|
139
|
+
v.value ? c("", !0) : (a(), d("div", ee, [
|
|
140
|
+
s(m, {
|
|
141
141
|
variant: "ghost",
|
|
142
142
|
size: "xs",
|
|
143
143
|
icon: "lucide:plus",
|
|
144
|
+
rounded: "full",
|
|
144
145
|
title: l(t)?.quickAddTooltipText.value || "Quick Add Subcategory",
|
|
145
|
-
|
|
146
|
-
onClick: (n) => l(t)?.startInline("add-child", e.id)
|
|
146
|
+
onClick: (o) => l(t)?.startInline("add-child", e.id)
|
|
147
147
|
}, null, 8, ["title", "onClick"]),
|
|
148
|
-
|
|
148
|
+
s(m, {
|
|
149
149
|
variant: "ghost",
|
|
150
150
|
size: "xs",
|
|
151
151
|
icon: "lucide:settings",
|
|
152
|
+
rounded: "full",
|
|
152
153
|
title: l(t)?.advancedDetailsTooltipText.value || "Advanced Details",
|
|
153
|
-
|
|
154
|
-
onClick: (n) => l(t)?.openModalForm("edit", e)
|
|
154
|
+
onClick: (o) => l(t)?.openModalForm("edit", e)
|
|
155
155
|
}, null, 8, ["title", "onClick"]),
|
|
156
|
-
|
|
157
|
-
variant: "ghost",
|
|
156
|
+
s(m, {
|
|
158
157
|
size: "xs",
|
|
159
158
|
icon: "lucide:trash-2",
|
|
159
|
+
variant: "danger-light",
|
|
160
|
+
rounded: "full",
|
|
161
|
+
class: "bg-transparent text-gray-900! hover:bg-danger-light",
|
|
160
162
|
title: l(t)?.deleteTooltipText.value || "Delete",
|
|
161
|
-
|
|
162
|
-
onClick: (n) => l(t)?.deleteItem(e)
|
|
163
|
+
onClick: (o) => l(t)?.deleteItem(e)
|
|
163
164
|
}, null, 8, ["title", "onClick"])
|
|
164
165
|
]))
|
|
165
166
|
], 2),
|
|
166
|
-
e.children && e.children.length > 0 || l(t)?.inlineState.value.mode === "add-child" && l(t).inlineState.value.targetId === e.id ? k((
|
|
167
|
-
e.children && e.children.length > 0 ? (
|
|
167
|
+
e.children && e.children.length > 0 || l(t)?.inlineState.value.mode === "add-child" && l(t).inlineState.value.targetId === e.id ? k((a(), d("div", te, [
|
|
168
|
+
e.children && e.children.length > 0 ? (a(), f(P, {
|
|
168
169
|
key: 0,
|
|
169
170
|
modelValue: e.children,
|
|
170
|
-
"onUpdate:modelValue": (
|
|
171
|
+
"onUpdate:modelValue": (o) => D(o, e),
|
|
171
172
|
level: V.level + 1,
|
|
172
173
|
onChange: U,
|
|
173
|
-
onDragEnd:
|
|
174
|
+
onDragEnd: n[2] || (n[2] = (o) => p("dragEnd", o))
|
|
174
175
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "level"])) : c("", !0),
|
|
175
|
-
l(t)?.inlineState.value.mode === "add-child" && l(t).inlineState.value.targetId === e.id ? (
|
|
176
|
-
|
|
176
|
+
l(t)?.inlineState.value.mode === "add-child" && l(t).inlineState.value.targetId === e.id ? (a(), d("div", le, [
|
|
177
|
+
s(z, {
|
|
177
178
|
modelValue: l(t).inlineState.value.icon,
|
|
178
|
-
"onUpdate:modelValue":
|
|
179
|
+
"onUpdate:modelValue": n[3] || (n[3] = (o) => l(t).inlineState.value.icon = o),
|
|
179
180
|
"btn-props": {
|
|
180
181
|
variant: "ghost",
|
|
181
182
|
size: "xs",
|
|
@@ -184,32 +185,32 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
184
185
|
position: "bottom-start"
|
|
185
186
|
}, null, 8, ["modelValue"]),
|
|
186
187
|
k(y("input", {
|
|
187
|
-
"onUpdate:modelValue":
|
|
188
|
+
"onUpdate:modelValue": n[4] || (n[4] = (o) => l(t).inlineState.value.title = o),
|
|
188
189
|
class: "flex-1 bg-transparent border-0 outline-none focus:ring-0 px-1 py-0.5 text-sm transition-colors w-full shadow-none caret-primary text-foreground placeholder:text-muted-foreground",
|
|
189
190
|
placeholder: l(t)?.newSubcategoryPlaceholderText.value || "New subcategory title...",
|
|
190
191
|
onKeyup: [
|
|
191
|
-
|
|
192
|
-
|
|
192
|
+
n[5] || (n[5] = w((o) => l(t).saveInline(), ["enter"])),
|
|
193
|
+
n[6] || (n[6] = w((o) => l(t).cancelInline(), ["esc"]))
|
|
193
194
|
]
|
|
194
|
-
}, null, 40,
|
|
195
|
+
}, null, 40, ne), [
|
|
195
196
|
[j],
|
|
196
197
|
[_, l(t).inlineState.value.title]
|
|
197
198
|
]),
|
|
198
|
-
|
|
199
|
+
s(m, {
|
|
199
200
|
variant: "primary",
|
|
200
201
|
size: "xs",
|
|
201
202
|
icon: "lucide:check",
|
|
202
203
|
class: "shrink-0 h-6 w-6 px-0",
|
|
203
204
|
title: l(t)?.saveTooltipText.value || "Save",
|
|
204
|
-
onClick:
|
|
205
|
+
onClick: n[7] || (n[7] = (o) => l(t).saveInline())
|
|
205
206
|
}, null, 8, ["title"]),
|
|
206
|
-
|
|
207
|
+
s(m, {
|
|
207
208
|
variant: "ghost",
|
|
208
209
|
size: "xs",
|
|
209
210
|
icon: "lucide:x",
|
|
210
211
|
class: "shrink-0 h-6 w-6 px-0",
|
|
211
212
|
title: l(t)?.cancelTooltipText.value || "Cancel",
|
|
212
|
-
onClick:
|
|
213
|
+
onClick: n[8] || (n[8] = (o) => l(t).cancelInline())
|
|
213
214
|
}, null, 8, ["title"])
|
|
214
215
|
])) : c("", !0)
|
|
215
216
|
], 512)), [
|
|
@@ -217,7 +218,7 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
217
218
|
]) : c("", !0)
|
|
218
219
|
], 8, ["data-id"]));
|
|
219
220
|
return $.memo = T, $;
|
|
220
|
-
},
|
|
221
|
+
}, n, 9), 128))
|
|
221
222
|
]),
|
|
222
223
|
_: 1
|
|
223
224
|
}, 8, ["modelValue", "disabled"]);
|
|
@@ -29,6 +29,10 @@ export interface CategoryManagerProps {
|
|
|
29
29
|
formSchema?: IForm[];
|
|
30
30
|
/** Disable drag-and-drop and mutation actions */
|
|
31
31
|
readonly?: boolean;
|
|
32
|
+
/** Shows loading overlay without destroying component state. Use this instead of v-if to preserve expanded/inline state across refetches. */
|
|
33
|
+
loading?: boolean;
|
|
34
|
+
/** Array of category IDs to expand on initial mount */
|
|
35
|
+
defaultExpanded?: (string | number)[];
|
|
32
36
|
/** Title for the empty state */
|
|
33
37
|
emptyTitle?: string;
|
|
34
38
|
/** Description for the empty state */
|
|
@@ -96,3 +100,15 @@ export interface CategoryManagerContext {
|
|
|
96
100
|
saveTooltipText: ComputedRef<string>;
|
|
97
101
|
cancelTooltipText: ComputedRef<string>;
|
|
98
102
|
}
|
|
103
|
+
export interface CategoryManagerExpose {
|
|
104
|
+
/** The set of currently expanded node IDs */
|
|
105
|
+
expandedIds: Ref<Set<string | number>>;
|
|
106
|
+
/** Expand all nodes in the tree */
|
|
107
|
+
expandAll: () => void;
|
|
108
|
+
/** Collapse all nodes in the tree */
|
|
109
|
+
collapseAll: () => void;
|
|
110
|
+
/** Expand specific node IDs */
|
|
111
|
+
expand: (...ids: (string | number)[]) => void;
|
|
112
|
+
/** Collapse specific node IDs */
|
|
113
|
+
collapse: (...ids: (string | number)[]) => void;
|
|
114
|
+
}
|
|
@@ -6,8 +6,8 @@ import O from "../Input.vue.js";
|
|
|
6
6
|
import "../../core/config.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import y from "../Button.vue.js";
|
|
9
|
-
import E from "./ColorIro.
|
|
10
|
-
/* empty css
|
|
9
|
+
import E from "./ColorIro.vue2.js";
|
|
10
|
+
/* empty css */
|
|
11
11
|
import { useEyeDropper as P } from "@vueuse/core";
|
|
12
12
|
const I = {
|
|
13
13
|
key: 0,
|
|
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
|
|
|
4
4
|
import { $t as E } from "../../utils/i18n.js";
|
|
5
5
|
import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
|
|
6
6
|
import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
|
|
7
|
-
import ee from "./CommandPaletteItem.
|
|
7
|
+
import ee from "./CommandPaletteItem.vue2.js";
|
|
8
8
|
const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FadeOverlayProps } from './types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<FadeOverlayProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FadeOverlayProps> & Readonly<{}>, {
|
|
3
|
+
color: string;
|
|
4
|
+
direction: import('./types').Direction;
|
|
5
|
+
easing: import('./types').Easing;
|
|
6
|
+
coverage: string | number;
|
|
7
|
+
fadeStart: string | number;
|
|
8
|
+
fadeEnd: string | number;
|
|
9
|
+
opacity: string | number;
|
|
10
|
+
zIndex: string | number;
|
|
11
|
+
tintOpacity: number;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineComponent as v, computed as o, openBlock as g, createElementBlock as y, normalizeStyle as k } from "vue";
|
|
2
|
+
import { parsePct as u, DIR_TO_CSS as S, sizeStyles as x, buildGradient as b } from "./utils.js";
|
|
3
|
+
const M = /* @__PURE__ */ v({
|
|
4
|
+
__name: "FadeOverlay",
|
|
5
|
+
props: {
|
|
6
|
+
direction: { default: "bottom" },
|
|
7
|
+
coverage: { default: "100%" },
|
|
8
|
+
fadeStart: { default: "0%" },
|
|
9
|
+
fadeEnd: { default: "100%" },
|
|
10
|
+
opacity: { default: 1 },
|
|
11
|
+
zIndex: { default: 10 },
|
|
12
|
+
blendMode: {},
|
|
13
|
+
easing: { default: "smooth" },
|
|
14
|
+
color: { default: "var(--color-background)" },
|
|
15
|
+
blur: {},
|
|
16
|
+
tintOpacity: { default: 0 }
|
|
17
|
+
},
|
|
18
|
+
setup(p) {
|
|
19
|
+
const e = p, a = o(() => e.blur !== void 0 && e.blur !== null), n = o(() => {
|
|
20
|
+
if (!a.value) return "";
|
|
21
|
+
if (typeof e.blur == "number") return `${e.blur}px`;
|
|
22
|
+
const t = String(e.blur).trim();
|
|
23
|
+
return /^\d+(\.\d+)?$/.test(t) ? `${t}px` : t;
|
|
24
|
+
}), f = o(() => {
|
|
25
|
+
const t = typeof e.coverage == "number" ? `${e.coverage}%` : e.coverage, r = u(e.fadeStart), l = u(e.fadeEnd), d = S[e.direction], c = {
|
|
26
|
+
position: "absolute",
|
|
27
|
+
pointerEvents: "none",
|
|
28
|
+
borderRadius: "inherit",
|
|
29
|
+
opacity: e.opacity,
|
|
30
|
+
zIndex: e.zIndex,
|
|
31
|
+
...x(e.direction, t),
|
|
32
|
+
...e.blendMode ? { mixBlendMode: e.blendMode } : {}
|
|
33
|
+
};
|
|
34
|
+
if (a.value) {
|
|
35
|
+
const i = Math.round(e.tintOpacity * 100), m = i > 0 ? `color-mix(in srgb, ${e.color} ${i}%, transparent)` : "transparent", s = b(d, "black", r, l, e.easing);
|
|
36
|
+
return {
|
|
37
|
+
...c,
|
|
38
|
+
background: m,
|
|
39
|
+
backdropFilter: `blur(${n.value})`,
|
|
40
|
+
WebkitBackdropFilter: `blur(${n.value})`,
|
|
41
|
+
maskImage: s,
|
|
42
|
+
WebkitMaskImage: s
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
...c,
|
|
47
|
+
background: b(d, e.color, r, l, e.easing)
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
return (t, r) => (g(), y("div", {
|
|
51
|
+
style: k(f.value),
|
|
52
|
+
"aria-hidden": "true",
|
|
53
|
+
class: "vlite-fade-overlay"
|
|
54
|
+
}, null, 4));
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
export {
|
|
58
|
+
M as default
|
|
59
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export type Direction = 'top' | 'bottom' | 'left' | 'right';
|
|
2
|
+
export type Easing = 'linear' | 'smooth';
|
|
3
|
+
export type BlendMode = 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity';
|
|
4
|
+
export interface FadeOverlayProps {
|
|
5
|
+
/** Which edge the overlay anchors to and fades toward. @default 'bottom' */
|
|
6
|
+
direction?: Direction;
|
|
7
|
+
/**
|
|
8
|
+
* How much of the parent container the overlay covers.
|
|
9
|
+
* Accepts any CSS length: '40%', '200px', '50vh'.
|
|
10
|
+
* @default '100%'
|
|
11
|
+
*/
|
|
12
|
+
coverage?: string | number;
|
|
13
|
+
/**
|
|
14
|
+
* Where the transparent end of the gradient begins, as a percentage
|
|
15
|
+
* of the overlay's own coverage area.
|
|
16
|
+
* 0% = starts fading from the very edge of the overlay.
|
|
17
|
+
* @default '0%'
|
|
18
|
+
*/
|
|
19
|
+
fadeStart?: string | number;
|
|
20
|
+
/**
|
|
21
|
+
* Where the opaque end of the gradient finishes, as a percentage
|
|
22
|
+
* of the overlay's own coverage area.
|
|
23
|
+
* 100% = fully opaque at the far edge of the coverage area.
|
|
24
|
+
* @default '100%'
|
|
25
|
+
*/
|
|
26
|
+
fadeEnd?: string | number;
|
|
27
|
+
/**
|
|
28
|
+
* Overall opacity of the entire overlay element.
|
|
29
|
+
* @default 1
|
|
30
|
+
*/
|
|
31
|
+
opacity?: string | number;
|
|
32
|
+
/** CSS z-index. @default 10 */
|
|
33
|
+
zIndex?: string | number;
|
|
34
|
+
/** CSS mix-blend-mode applied to the overlay element. */
|
|
35
|
+
blendMode?: BlendMode;
|
|
36
|
+
/**
|
|
37
|
+
* Gradient easing curve.
|
|
38
|
+
* - 'linear' — simple two-stop linear ramp
|
|
39
|
+
* - 'smooth' — 13-stop Material Design scrim curve; eliminates the
|
|
40
|
+
* perceptual mid-point grey smear of a linear fade
|
|
41
|
+
* @default 'smooth'
|
|
42
|
+
*/
|
|
43
|
+
easing?: Easing;
|
|
44
|
+
/**
|
|
45
|
+
* The opaque color the gradient fades toward.
|
|
46
|
+
*
|
|
47
|
+
* Scrim mode → the solid color at the fully-opaque gradient stop.
|
|
48
|
+
* Blur mode → the tint color mixed over the blurred content.
|
|
49
|
+
*
|
|
50
|
+
* @default '#000000'
|
|
51
|
+
*/
|
|
52
|
+
color?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Blur radius. Presence of this prop activates blur mode.
|
|
55
|
+
* - number → treated as px (e.g. 16 → '16px')
|
|
56
|
+
* - string → used as-is (e.g. '1rem')
|
|
57
|
+
*
|
|
58
|
+
* Blur mode variants:
|
|
59
|
+
* - Pure vibrancy (macOS): blur=16, no tintOpacity
|
|
60
|
+
* - Tinted frost (iOS): blur=16, color='#ffffff', tintOpacity=0.25
|
|
61
|
+
* - Cinematic dark: blur=24, color='#000000', tintOpacity=0.55
|
|
62
|
+
*/
|
|
63
|
+
blur?: number | string;
|
|
64
|
+
/**
|
|
65
|
+
* Opacity of the color tint layer in blur mode (0–1).
|
|
66
|
+
* 0 → pure backdrop blur, no color tint (macOS vibrancy)
|
|
67
|
+
* 0.3 → frosted glass with visible tint
|
|
68
|
+
* 0.6 → cinematic / heavily tinted
|
|
69
|
+
* @default 0
|
|
70
|
+
*/
|
|
71
|
+
tintOpacity?: number;
|
|
72
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Direction, Easing } from './types';
|
|
2
|
+
export declare function parsePct(val: string | number): number;
|
|
3
|
+
export declare const SCRIM_OPACITIES: readonly [0, 6.5, 14, 23.5, 34.5, 47, 59, 70, 79, 87, 93, 97, 100];
|
|
4
|
+
export declare function buildGradient(cssDirection: string, color: string, startPct: number, endPct: number, easing: Easing): string;
|
|
5
|
+
export declare const DIR_TO_CSS: Record<Direction, string>;
|
|
6
|
+
export declare function sizeStyles(direction: Direction, coverage: string): Record<string, string | number>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function f(t) {
|
|
2
|
+
if (typeof t == "number") return t;
|
|
3
|
+
const n = parseFloat(t);
|
|
4
|
+
return isNaN(n) ? 0 : n;
|
|
5
|
+
}
|
|
6
|
+
const e = [0, 6.5, 14, 23.5, 34.5, 47, 59, 70, 79, 87, 93, 97, 100];
|
|
7
|
+
function $(t, n, o, r, i) {
|
|
8
|
+
if (i === "linear")
|
|
9
|
+
return `linear-gradient(${t}, transparent ${o}%, ${n} ${r}%)`;
|
|
10
|
+
const s = e.map((p, a) => {
|
|
11
|
+
const u = a / (e.length - 1), l = (o + (r - o) * u).toFixed(2);
|
|
12
|
+
return `color-mix(in srgb, ${n} ${p}%, transparent) ${l}%`;
|
|
13
|
+
});
|
|
14
|
+
return `linear-gradient(${t}, ${s.join(", ")})`;
|
|
15
|
+
}
|
|
16
|
+
const g = {
|
|
17
|
+
top: "to top",
|
|
18
|
+
bottom: "to bottom",
|
|
19
|
+
left: "to left",
|
|
20
|
+
right: "to right"
|
|
21
|
+
};
|
|
22
|
+
function b(t, n) {
|
|
23
|
+
return t === "top" || t === "bottom" ? { left: 0, right: 0, height: n, [t]: 0 } : { top: 0, bottom: 0, width: n, [t]: 0 };
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
g as DIR_TO_CSS,
|
|
27
|
+
e as SCRIM_OPACITIES,
|
|
28
|
+
$ as buildGradient,
|
|
29
|
+
f as parsePct,
|
|
30
|
+
b as sizeStyles
|
|
31
|
+
};
|
|
@@ -3,7 +3,7 @@ import L from "./Icon.vue.js";
|
|
|
3
3
|
import v from "./Modal.vue.js";
|
|
4
4
|
import N from "./CommandPalette/CommandPaletteContent.vue.js";
|
|
5
5
|
import { $t as U } from "../utils/i18n.js";
|
|
6
|
-
/* empty css
|
|
6
|
+
/* empty css */
|
|
7
7
|
const V = { class: "block truncate -text-fs-1.5" }, S = { class: "ml-auto inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border border-border/80 bg-background text-muted-foreground ml-1" }, A = /* @__PURE__ */ x({
|
|
8
8
|
__name: "NavbarCommandPalette",
|
|
9
9
|
props: {
|
|
@@ -3,8 +3,8 @@ export interface NumberInputProps {
|
|
|
3
3
|
min?: number;
|
|
4
4
|
max?: number;
|
|
5
5
|
step?: number;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
layout?: 'split' | 'stacked';
|
|
7
|
+
variant?: 'solid' | 'outline' | 'transparent';
|
|
8
8
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
placeholder?: string;
|
|
@@ -24,12 +24,12 @@ declare const _default: import('vue').DefineComponent<NumberInputProps, {}, {},
|
|
|
24
24
|
onChange?: (value: number) => any;
|
|
25
25
|
"onUpdate:modelValue"?: (value: number) => any;
|
|
26
26
|
}>, {
|
|
27
|
-
|
|
28
|
-
variant: "split" | "stacked";
|
|
27
|
+
variant: "solid" | "outline" | "transparent";
|
|
29
28
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
30
29
|
rounded: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
31
30
|
readonly: boolean;
|
|
32
31
|
disabled: boolean;
|
|
32
|
+
layout: "split" | "stacked";
|
|
33
33
|
modelValue: number;
|
|
34
34
|
step: number;
|
|
35
35
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./NumberInput.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-48252481"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|