vlite3 1.5.34 → 1.5.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/components/AppShell/AppShell.vue.d.ts +1 -0
  2. package/components/AppShell/AppShell.vue.js +5 -4
  3. package/components/AppShell/AppShellLayoutClassic.vue.d.ts +15 -4
  4. package/components/AppShell/AppShellLayoutClassic.vue.js +106 -97
  5. package/components/AppShell/AppShellLayoutDashboard.vue.d.ts +15 -4
  6. package/components/AppShell/AppShellLayoutDashboard.vue.js +87 -78
  7. package/components/AppShell/AppShellLayoutDock.vue.d.ts +15 -4
  8. package/components/AppShell/AppShellLayoutDock.vue.js +83 -74
  9. package/components/AppShell/AppShellLayoutHeaderShell.vue.d.ts +15 -4
  10. package/components/AppShell/AppShellLayoutHeaderShell.vue.js +82 -73
  11. package/components/AppShell/AppShellLayoutSidebarFirst.vue.d.ts +15 -4
  12. package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +82 -73
  13. package/components/AppShell/AppShellLayoutStorefront.vue.d.ts +7 -1
  14. package/components/AppShell/AppShellLayoutStorefront.vue.js +119 -107
  15. package/components/AppShell/index.d.ts +1 -1
  16. package/components/AppShell/useAppShell.d.ts +11 -0
  17. package/components/AppShell/useAppShell.js +159 -108
  18. package/components/CategoryManager/CategoryManager2.vue.js +1 -1
  19. package/components/CommandPalette/CommandPaletteContent2.vue.js +1 -1
  20. package/components/CommandPalette/{CommandPaletteItem2.vue.js → CommandPaletteItem.vue.js} +1 -1
  21. package/components/Form/{AccordionView2.vue.js → AccordionView.vue.js} +1 -1
  22. package/components/Form/index2.vue.js +1 -1
  23. package/components/NavbarCommandPalette.vue.js +1 -1
  24. package/components/Screen/ScreenFilter.vue.js +1 -1
  25. package/components/Timeline/Timeline.vue.d.ts +3 -1
  26. package/components/Timeline/Timeline.vue.js +24 -22
  27. package/docs/components/app-shell.md +2 -0
  28. package/docs-manifest.json +3 -3
  29. package/package.json +1 -1
  30. package/style.css +1 -1
  31. package/types/appshell.type.d.ts +6 -0
  32. package/types/timeline.type.d.ts +1 -0
@@ -1,187 +1,199 @@
1
- import { defineComponent as T, inject as z, computed as v, openBlock as t, createElementBlock as i, renderSlot as l, createCommentVNode as d, withDirectives as R, createElementVNode as a, normalizeClass as n, unref as e, createVNode as f, vShow as P, isRef as y, createSlots as _, withCtx as w } from "vue";
2
- import V from "../Icon.vue.js";
3
- import N from "../SidePanel.vue.js";
4
- import j from "../Navbar/NavbarTabs.vue.js";
5
- import B from "../Breadcrumb/Breadcrumb.vue.js";
1
+ import { defineComponent as P, inject as V, computed as k, openBlock as i, createElementBlock as a, normalizeClass as r, unref as e, renderSlot as l, createCommentVNode as d, withDirectives as _, createElementVNode as n, createVNode as f, vShow as N, isRef as w, createSlots as j, withCtx as C } from "vue";
2
+ import D from "../Icon.vue.js";
3
+ import B from "../SidePanel.vue.js";
4
+ import E from "../Navbar/NavbarTabs.vue.js";
5
+ import L from "../Breadcrumb/Breadcrumb.vue.js";
6
6
  /* empty css */
7
- import { APPSHELL_LAYOUT_KEY as E } from "./useAppShell.js";
8
- import { normalizeRoutePrefix as L } from "../CategoryMenu/utils.js";
9
- const M = { class: "vlite-app-layout flex flex-col w-full h-full min-h-0 bg-body text-foreground overflow-hidden" }, O = {
7
+ import { APPSHELL_LAYOUT_KEY as M } from "./useAppShell.js";
8
+ import { normalizeRoutePrefix as O } from "../CategoryMenu/utils.js";
9
+ const A = {
10
10
  key: 0,
11
11
  class: "shrink-0 w-full"
12
- }, A = { class: "w-full mx-auto px-3 sm:px-4 md:px-6 lg:px-8" }, U = ["aria-label"], D = {
12
+ }, U = { class: "w-full mx-auto px-3 sm:px-4 md:px-6 lg:px-8" }, H = ["aria-label"], Y = {
13
13
  key: 0,
14
14
  class: "flex items-center justify-center min-w-0 flex-1 px-2"
15
- }, H = { class: "w-full min-w-0 mx-auto overflow-hidden" }, Y = {
15
+ }, I = { class: "w-full min-w-0 mx-auto overflow-hidden" }, K = {
16
16
  key: 0,
17
17
  class: "shrink-0 w-full"
18
- }, I = {
18
+ }, q = {
19
19
  key: 2,
20
20
  class: "shrink-0 w-full border-t border-border bg-background"
21
- }, K = { class: "flex flex-col h-full" }, q = {
21
+ }, F = { class: "flex flex-col h-full" }, G = {
22
22
  class: "flex-1 overflow-y-auto px-3.5 py-4 space-y-4 scrollbar-thin scrollbar-stable",
23
23
  style: { "will-change": "transform", contain: "layout style" }
24
- }, F = {
24
+ }, J = {
25
25
  key: 0,
26
26
  class: "mt-auto border-t border-border px-3.5 py-3"
27
- }, ie = /* @__PURE__ */ T({
27
+ }, ne = /* @__PURE__ */ P({
28
28
  __name: "AppShellLayoutStorefront",
29
- setup(G) {
30
- const k = z(E), {
31
- props: s,
32
- isMobileMenuOpen: r,
33
- isSidebarVisible: J,
34
- toggleSidebar: Q,
35
- pageTitle: W,
36
- breadcrumbData: p,
29
+ setup(Q) {
30
+ const $ = V(M), {
31
+ props: o,
32
+ isMobileMenuOpen: t,
33
+ isSidebarVisible: W,
34
+ toggleSidebar: X,
35
+ pageTitle: Z,
36
+ breadcrumbData: g,
37
37
  breakpointClasses: m,
38
- nestedTabsItems: g,
39
- activeNestedTab: c,
40
- handleNestedTabClick: $,
41
- mainScrollRef: C,
42
- layoutMainRef: x
43
- } = k, S = v(() => [
38
+ isDesktop: c,
39
+ shellRef: h,
40
+ shellClass: x,
41
+ nestedTabsItems: v,
42
+ activeNestedTab: p,
43
+ handleNestedTabClick: S,
44
+ mainScrollRef: R,
45
+ layoutMainRef: T
46
+ } = $, z = k(() => [
44
47
  "w-full shrink-0 bg-background transition-shadow duration-200",
45
48
  {
46
49
  fixed: "fixed top-0 start-0 z-50",
47
50
  sticky: "sticky top-0 z-50",
48
51
  relative: "relative z-20",
49
52
  absolute: "absolute top-0 start-0 w-full z-50"
50
- }[s.position || "sticky"],
51
- s.border ? "border-b border-border" : "",
52
- s.glass ? "bg-background/90 backdrop-blur-md" : "",
53
- s.floating ? "m-3 rounded-lg border border-border shadow-sm overflow-hidden" : "",
54
- s.class
55
- ].filter(Boolean).join(" ")), h = v(() => L(s.categoryRoutePrefix));
56
- return (o, u) => (t(), i("div", M, [
57
- o.$slots.announcement ? (t(), i("div", O, [
58
- l(o.$slots, "announcement")
53
+ }[o.position || "sticky"],
54
+ o.border ? "border-b border-border" : "",
55
+ o.glass ? "bg-background/90 backdrop-blur-md" : "",
56
+ o.floating ? "m-3 rounded-lg border border-border shadow-sm overflow-hidden" : "",
57
+ o.class
58
+ ].filter(Boolean).join(" ")), y = k(() => O(o.categoryRoutePrefix));
59
+ return (s, u) => (i(), a("div", {
60
+ ref_key: "shellRef",
61
+ ref: h,
62
+ class: r(["vlite-app-layout flex flex-col w-full h-full min-h-0 bg-body text-foreground overflow-hidden", e(x)])
63
+ }, [
64
+ s.$slots.announcement ? (i(), a("div", A, [
65
+ l(s.$slots, "announcement")
59
66
  ])) : d("", !0),
60
- R(a("header", {
61
- class: n(S.value)
67
+ _(n("header", {
68
+ class: r(z.value)
62
69
  }, [
63
- a("div", A, [
64
- a("div", {
65
- class: n(["flex w-full items-center justify-between gap-3 md:gap-6", e(s).height])
70
+ n("div", U, [
71
+ n("div", {
72
+ class: r(["flex w-full items-center justify-between gap-3 md:gap-6", e(o).height])
66
73
  }, [
67
- a("div", {
68
- class: n(["flex items-center gap-2 sm:gap-4 min-w-0 shrink-0", { "flex-1": !o.$slots.center }])
74
+ n("div", {
75
+ class: r(["flex items-center gap-2 sm:gap-4 min-w-0 shrink-0", { "flex-1": !s.$slots.center }])
69
76
  }, [
70
- l(o.$slots, "mobile-trigger", {
71
- isOpen: e(r),
72
- toggle: () => r.value = !e(r)
77
+ l(s.$slots, "mobile-trigger", {
78
+ isOpen: e(t),
79
+ isDesktop: e(c),
80
+ toggle: () => t.value = !e(t)
73
81
  }, () => [
74
- a("button", {
82
+ n("button", {
75
83
  type: "button",
76
- class: n(["inline-flex items-center justify-center w-9 h-9 rounded-md text-muted-foreground hover:text-foreground hover:bg-accent", [e(m).mobileTrigger, e(s).mobileTriggerClass]]),
77
- "aria-label": e(r) ? "Close menu" : "Open menu",
78
- onClick: u[0] || (u[0] = (b) => r.value = !e(r))
84
+ class: r(["inline-flex items-center justify-center w-9 h-9 rounded-md text-muted-foreground hover:text-foreground hover:bg-accent", [e(m).mobileTrigger, e(o).mobileTriggerClass]]),
85
+ "aria-label": e(t) ? "Close menu" : "Open menu",
86
+ onClick: u[0] || (u[0] = (b) => t.value = !e(t))
79
87
  }, [
80
- f(V, {
81
- icon: e(r) ? "lucide:x" : "lucide:menu",
88
+ f(D, {
89
+ icon: e(t) ? "lucide:x" : "lucide:menu",
82
90
  class: "w-5 h-5"
83
91
  }, null, 8, ["icon"])
84
- ], 10, U)
92
+ ], 10, H)
85
93
  ]),
86
- l(o.$slots, "left")
94
+ l(s.$slots, "left")
87
95
  ], 2),
88
- o.$slots.center ? (t(), i("div", D, [
89
- l(o.$slots, "center")
96
+ s.$slots.center ? (i(), a("div", Y, [
97
+ l(s.$slots, "center")
90
98
  ])) : d("", !0),
91
- a("div", {
92
- class: n(["flex items-center justify-end gap-2 sm:gap-4 min-w-0 shrink-0", [e(s).rightClass, { "flex-1": !o.$slots.center }]])
99
+ n("div", {
100
+ class: r(["flex items-center justify-end gap-2 sm:gap-4 min-w-0 shrink-0", [e(o).rightClass, { "flex-1": !s.$slots.center }]])
93
101
  }, [
94
- l(o.$slots, "right")
102
+ l(s.$slots, "right")
95
103
  ], 2)
96
104
  ], 2),
97
- o.$slots["mobile-bottom"] ? (t(), i("div", {
105
+ s.$slots["mobile-bottom"] ? (i(), a("div", {
98
106
  key: 0,
99
- class: n(["pb-3 w-full", e(m).mobileTrigger])
107
+ class: r(["pb-3 w-full", e(m).mobileTrigger])
100
108
  }, [
101
- l(o.$slots, "mobile-bottom")
109
+ l(s.$slots, "mobile-bottom")
102
110
  ], 2)) : d("", !0)
103
111
  ]),
104
- o.$slots.categories ? (t(), i("div", {
112
+ s.$slots.categories ? (i(), a("div", {
105
113
  key: 0,
106
- class: n(["w-full min-w-0 overflow-hidden border-t border-border bg-background", [e(m).desktopContent, e(s).menuClass]])
114
+ class: r(["w-full min-w-0 overflow-hidden border-t border-border bg-background", [e(m).desktopContent, e(o).menuClass]])
107
115
  }, [
108
- a("div", H, [
109
- l(o.$slots, "categories", { categoryRoutePrefix: h.value })
116
+ n("div", I, [
117
+ l(s.$slots, "categories", { categoryRoutePrefix: y.value })
110
118
  ])
111
119
  ], 2)) : d("", !0)
112
120
  ], 2), [
113
- [P, !e(s).hideHeader]
121
+ [N, !e(o).hideHeader]
114
122
  ]),
115
- o.$slots.main ? (t(), i("main", {
123
+ s.$slots.main ? (i(), a("main", {
116
124
  key: 1,
117
125
  ref_key: "layoutMainRef",
118
- ref: x,
126
+ ref: T,
119
127
  class: "flex-1 overflow-hidden w-full relative flex flex-col min-h-0"
120
128
  }, [
121
- e(s).renderNestedTabs && e(g).length > 0 ? (t(), i("div", Y, [
122
- f(j, {
123
- modelValue: e(c),
124
- "onUpdate:modelValue": u[1] || (u[1] = (b) => y(c) ? c.value = b : null),
125
- onChange: e($),
126
- items: e(g)
129
+ e(o).renderNestedTabs && e(v).length > 0 ? (i(), a("div", K, [
130
+ f(E, {
131
+ modelValue: e(p),
132
+ "onUpdate:modelValue": u[1] || (u[1] = (b) => w(p) ? p.value = b : null),
133
+ onChange: e(S),
134
+ items: e(v)
127
135
  }, null, 8, ["modelValue", "onChange", "items"])
128
136
  ])) : d("", !0),
129
- e(s).breadcrumb && e(s).breadcrumbPosition === "main" && e(p).items.value.length > 1 ? (t(), i("div", {
137
+ e(o).breadcrumb && e(o).breadcrumbPosition === "main" && e(g).items.value.length > 1 ? (i(), a("div", {
130
138
  key: 1,
131
- class: n(["shrink-0 w-full border-b border-border px-6 py-2", e(s).breadcrumbClass])
139
+ class: r(["shrink-0 w-full border-b border-border px-6 py-2", e(o).breadcrumbClass])
132
140
  }, [
133
- f(e(B), {
134
- items: e(p).items.value,
135
- variant: e(s).breadcrumbVariant,
136
- separator: e(s).breadcrumbSeparator,
137
- size: e(s).breadcrumbSize
141
+ f(e(L), {
142
+ items: e(g).items.value,
143
+ variant: e(o).breadcrumbVariant,
144
+ separator: e(o).breadcrumbSeparator,
145
+ size: e(o).breadcrumbSize
138
146
  }, null, 8, ["items", "variant", "separator", "size"])
139
147
  ], 2)) : d("", !0),
140
- a("div", {
148
+ n("div", {
141
149
  ref_key: "mainScrollRef",
142
- ref: C,
150
+ ref: R,
143
151
  style: { "will-change": "transform", contain: "layout style" },
144
- class: n(["flex-1 overflow-y-auto w-full relative h-full scrollbar-thin scrollbar-stable", e(s).contentClass])
152
+ class: r(["flex-1 overflow-y-auto w-full relative h-full scrollbar-thin scrollbar-stable", e(o).contentClass])
145
153
  }, [
146
- l(o.$slots, "main")
154
+ l(s.$slots, "main", { isDesktop: e(c) })
147
155
  ], 2)
148
156
  ], 512)) : d("", !0),
149
- o.$slots.footer ? (t(), i("footer", I, [
150
- l(o.$slots, "footer")
157
+ s.$slots.footer ? (i(), a("footer", q, [
158
+ l(s.$slots, "footer")
151
159
  ])) : d("", !0),
152
- f(N, {
153
- show: e(r),
154
- "onUpdate:show": u[2] || (u[2] = (b) => y(r) ? r.value = b : null),
160
+ f(B, {
161
+ show: e(t),
162
+ "onUpdate:show": u[2] || (u[2] = (b) => w(t) ? t.value = b : null),
155
163
  position: "left",
156
164
  size: "sm",
157
165
  triggerClass: e(m).mobileTrigger,
158
- class: n(["z-60", e(m).mobileTrigger]),
166
+ class: r(["z-60", e(m).mobileTrigger]),
159
167
  headerClass: "ps-3! pe-4.5! py-3!",
160
- bodyClass: "p-0!"
161
- }, _({
162
- default: w(() => [
163
- a("div", K, [
164
- a("div", q, [
165
- l(o.$slots, "mobile-sidebar", { categoryRoutePrefix: h.value })
168
+ bodyClass: "p-0!",
169
+ "teleport-target": e(o).breakpointSource === "container" && e(h) || void 0
170
+ }, j({
171
+ default: C(() => [
172
+ n("div", F, [
173
+ n("div", G, [
174
+ l(s.$slots, "mobile-sidebar", {
175
+ isDesktop: e(c),
176
+ categoryRoutePrefix: y.value
177
+ })
166
178
  ]),
167
- o.$slots["mobile-sidebar-footer"] ? (t(), i("div", F, [
168
- l(o.$slots, "mobile-sidebar-footer")
179
+ s.$slots["mobile-sidebar-footer"] ? (i(), a("div", J, [
180
+ l(s.$slots, "mobile-sidebar-footer")
169
181
  ])) : d("", !0)
170
182
  ])
171
183
  ]),
172
184
  _: 2
173
185
  }, [
174
- o.$slots["mobile-sidebar-header"] ? {
186
+ s.$slots["mobile-sidebar-header"] ? {
175
187
  name: "header",
176
- fn: w(() => [
177
- l(o.$slots, "mobile-sidebar-header")
188
+ fn: C(() => [
189
+ l(s.$slots, "mobile-sidebar-header")
178
190
  ]),
179
191
  key: "0"
180
192
  } : void 0
181
- ]), 1032, ["show", "triggerClass", "class"])
182
- ]));
193
+ ]), 1032, ["show", "triggerClass", "teleport-target", "class"])
194
+ ], 2));
183
195
  }
184
196
  });
185
197
  export {
186
- ie as default
198
+ ne as default
187
199
  };
@@ -1,2 +1,2 @@
1
1
  export { default as AppShell } from './AppShell.vue';
2
- export type { AppShellProps, AppShellLayoutMode } from '../../types/appshell.type';
2
+ export type { AppShellProps, AppShellLayoutMode, AppShellBreakpointSource, } from '../../types/appshell.type';
@@ -9,6 +9,15 @@ export interface AppShellLayoutContext {
9
9
  isMobileMenuOpen: Ref<boolean>;
10
10
  isSidebarVisible: Ref<boolean>;
11
11
  sidebarHidden: ComputedRef<boolean>;
12
+ /**
13
+ * True at or above `mobileBreakpoint`.
14
+ * Null while `breakpointSource="container"` has not measured the shell yet.
15
+ */
16
+ isDesktop: ComputedRef<boolean | null>;
17
+ /** Root element measured when `breakpointSource` is `container`. */
18
+ shellRef: Ref<HTMLElement | null>;
19
+ /** `@container` when breakpoint behavior follows the shell width. */
20
+ shellClass: ComputedRef<string>;
12
21
  pageTitle: ComputedRef<string>;
13
22
  isScrolled: Ref<boolean>;
14
23
  /** Document / shell reading direction */
@@ -26,6 +35,8 @@ export interface AppShellLayoutContext {
26
35
  mobileHeader: string;
27
36
  desktopSidebar: string;
28
37
  desktopOnly: string;
38
+ /** Hides the desktop sidebar column below `mobileBreakpoint`. */
39
+ mobileSidebar: string;
29
40
  }>;
30
41
  /** Container classes — used by classic / standalone layouts */
31
42
  containerClasses: ComputedRef<string>;