@viglet/viglet-design-system 2026.3.3 → 2026.3.5

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 (37) hide show
  1. package/README.md +68 -12
  2. package/dist/bento/bento-panel.d.ts +35 -0
  3. package/dist/bento/bento-panel.d.ts.map +1 -0
  4. package/dist/bento/index.d.ts +1 -0
  5. package/dist/bento/index.d.ts.map +1 -1
  6. package/dist/bento.cjs +1 -1
  7. package/dist/bento.es.js +43 -31
  8. package/dist/{breadcrumb.context-h2A2IEJ_.js → breadcrumb.context-CGqjI0-U.js} +175 -189
  9. package/dist/breadcrumb.context-DYeZEC65.cjs +1 -0
  10. package/dist/components/app-switcher.d.ts +2 -0
  11. package/dist/components/app-switcher.d.ts.map +1 -1
  12. package/dist/components/router/internal.sidebar.d.ts +12 -1
  13. package/dist/components/router/internal.sidebar.d.ts.map +1 -1
  14. package/dist/components/router/sub.page.d.ts +16 -0
  15. package/dist/components/router/sub.page.d.ts.map +1 -1
  16. package/dist/components/startup-first/startup-first.d.ts.map +1 -1
  17. package/dist/components/theme-provider.d.ts +37 -2
  18. package/dist/components/theme-provider.d.ts.map +1 -1
  19. package/dist/components/ui/floating-formulas-bg.d.ts.map +1 -1
  20. package/dist/components/viglet-app-switcher.d.ts +3 -0
  21. package/dist/components/viglet-app-switcher.d.ts.map +1 -1
  22. package/dist/exports.json +3 -1
  23. package/dist/floating-formulas-bg.cjs +1 -1
  24. package/dist/floating-formulas-bg.es.js +1 -0
  25. package/dist/i18n.cjs +1 -1
  26. package/dist/i18n.es.js +1 -0
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.es.js +2 -1
  29. package/dist/preset.css +42 -22
  30. package/dist/router.cjs +1 -1
  31. package/dist/router.es.js +293 -266
  32. package/dist/viglet-design-system.css +1 -1
  33. package/dist/vite/boot-loader.d.ts +7 -3
  34. package/dist/vite/boot-loader.d.ts.map +1 -1
  35. package/package.json +1 -1
  36. package/scripts/check-duplicates.mjs +18 -7
  37. package/dist/breadcrumb.context-CTnZ4rD0.cjs +0 -1
package/dist/router.es.js CHANGED
@@ -1,26 +1,27 @@
1
+ "use client";
1
2
  import { E as e, _ as t, f as n, g as r, h as i, l as a, m as o, u as s, x as c } from "./badge-locale-BxI9TwkE.js";
2
- import { $ as l, A as u, D as d, H as f, K as p, M as m, Q as h, S as g, U as _, W as v, Z as y, _ as b, b as x, c as S, ct as C, d as w, dt as T, ft as E, h as D, ht as O, i as ee, j as k, l as te, lt as ne, m as A, mt as j, n as re, ot as ie, p as M, pt as N, ut as ae, v as P, x as F } from "./breadcrumb.context-h2A2IEJ_.js";
3
- import { i as I, n as oe, r as se, t as ce } from "./loading-provider-CMnOuvdR.js";
4
- import L, { useState as R } from "react";
5
- import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
6
- import { IconChevronLeft as le, IconChevronRight as ue, IconDotsVertical as H, IconDownload as de, IconLogout as fe, IconPlus as U, IconSearch as W, IconUserCircle as pe } from "@tabler/icons-react";
7
- import { useTranslation as G } from "react-i18next";
8
- import { Icon as me } from "@iconify/react";
9
- import { NavLink as K, Outlet as q, useLocation as J, useNavigate as Y } from "react-router-dom";
10
- import { columnFilteringFeature as he, createCoreRowModel as ge, createFilteredRowModel as _e, createPaginatedRowModel as ve, createSortedRowModel as ye, globalFilteringFeature as be, rowPaginationFeature as xe, rowSortingFeature as Se, useTable as Ce } from "@tanstack/react-table";
3
+ import { $ as l, A as u, D as d, H as f, K as p, M as m, Q as h, S as g, U as _, W as v, Z as y, _ as b, b as x, c as S, ct as C, d as w, dt as T, ft as E, h as D, ht as O, i as ee, j as k, l as te, lt as ne, m as A, mt as re, n as ie, ot as ae, p as j, pt as M, ut as oe, v as N, x as P } from "./breadcrumb.context-CGqjI0-U.js";
4
+ import { i as F, n as se, r as ce, t as le } from "./loading-provider-CMnOuvdR.js";
5
+ import I, { useState as L } from "react";
6
+ import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
7
+ import { IconChevronLeft as ue, IconChevronRight as de, IconDotsVertical as V, IconDownload as fe, IconLogout as pe, IconPlus as H, IconSearch as U, IconUserCircle as me } from "@tabler/icons-react";
8
+ import { useTranslation as W } from "react-i18next";
9
+ import { Icon as he } from "@iconify/react";
10
+ import { NavLink as G, Outlet as K, useLocation as q, useNavigate as J } from "react-router-dom";
11
+ import { columnFilteringFeature as ge, createCoreRowModel as _e, createFilteredRowModel as ve, createPaginatedRowModel as ye, createSortedRowModel as be, globalFilteringFeature as xe, rowPaginationFeature as Se, rowSortingFeature as Ce, useTable as we } from "@tanstack/react-table";
11
12
  //#region src/lib/react-markers.ts
12
- function X(e) {
13
+ function Y(e) {
13
14
  return typeof e.type == "string" ? void 0 : e.type.displayName;
14
15
  }
15
16
  //#endregion
16
17
  //#region src/components/router/grid.list.tsx
18
+ var X = () => null;
19
+ X.displayName = "GridListNewButton";
17
20
  var Z = () => null;
18
- Z.displayName = "GridListNewButton";
19
- var Q = () => null;
20
- Q.displayName = "GridListAction";
21
- var $ = () => null;
22
- $.displayName = "GridListItemAction";
23
- var we = [
21
+ Z.displayName = "GridListAction";
22
+ var Te = () => null;
23
+ Te.displayName = "GridListItemAction";
24
+ var Ee = [
24
25
  "vg-accent-solid",
25
26
  "from-emerald-500 to-teal-500",
26
27
  "from-violet-500 to-purple-500",
@@ -30,24 +31,24 @@ var we = [
30
31
  "from-fuchsia-500 to-pink-500",
31
32
  "from-lime-500 to-emerald-500"
32
33
  ];
33
- function Te(e) {
34
+ function De(e) {
34
35
  let t = 0;
35
36
  for (let n = 0; n < e.length; n++) t = (e.codePointAt(n) ?? 0) + ((t << 5) - t);
36
- return we[Math.abs(t) % we.length];
37
+ return Ee[Math.abs(t) % Ee.length];
37
38
  }
38
- function Ee(e) {
39
+ function Oe(e) {
39
40
  return e.split(/[\s\-_]+/).filter(Boolean).slice(0, 2).map((e) => e[0].toUpperCase()).join("");
40
41
  }
41
- var De = {
42
- columnFilteringFeature: he,
43
- globalFilteringFeature: be,
44
- rowPaginationFeature: xe,
45
- rowSortingFeature: Se,
46
- coreRowModel: ge(),
47
- filteredRowModel: _e(),
48
- paginatedRowModel: ve(),
49
- sortedRowModel: ye()
50
- }, Oe = [
42
+ var ke = {
43
+ columnFilteringFeature: ge,
44
+ globalFilteringFeature: xe,
45
+ rowPaginationFeature: Se,
46
+ rowSortingFeature: Ce,
47
+ coreRowModel: _e(),
48
+ filteredRowModel: ve(),
49
+ paginatedRowModel: ye(),
50
+ sortedRowModel: be()
51
+ }, Ae = [
51
52
  {
52
53
  accessorKey: "name",
53
54
  header: "Name"
@@ -60,30 +61,30 @@ var De = {
60
61
  accessorKey: "url",
61
62
  header: "URL"
62
63
  }
63
- ], ke = Object.assign(({ gridItemList: t, children: i }) => {
64
- let { t: c } = G(), u = Y(), d = [], f = [];
65
- L.Children.forEach(i, (e) => {
66
- if (L.isValidElement(e)) {
67
- if (X(e) === "GridListNewButton") {
64
+ ], je = Object.assign(({ gridItemList: t, children: i }) => {
65
+ let { t: c } = W(), u = J(), d = [], f = [];
66
+ I.Children.forEach(i, (e) => {
67
+ if (I.isValidElement(e)) {
68
+ if (Y(e) === "GridListNewButton") {
68
69
  let { to: t, label: n } = e.props;
69
70
  d.push({
70
71
  key: `new-${n}`,
71
- render: () => /* @__PURE__ */ V(r, {
72
+ render: () => /* @__PURE__ */ B(r, {
72
73
  onClick: () => u(t),
73
74
  children: [
74
- /* @__PURE__ */ B(U, { className: "size-4 mr-2" }),
75
+ /* @__PURE__ */ z(H, { className: "size-4 mr-2" }),
75
76
  "New ",
76
77
  n
77
78
  ]
78
79
  })
79
80
  });
80
- } else if (X(e) === "GridListAction") {
81
+ } else if (Y(e) === "GridListAction") {
81
82
  let { children: t } = e.props;
82
83
  d.push({
83
84
  key: `action-${d.length}`,
84
- render: () => /* @__PURE__ */ B(z, { children: t })
85
+ render: () => /* @__PURE__ */ z(R, { children: t })
85
86
  });
86
- } else if (X(e) === "GridListItemAction") {
87
+ } else if (Y(e) === "GridListItemAction") {
87
88
  let t = e.props;
88
89
  f.push({
89
90
  key: `item-action-${f.length}`,
@@ -95,13 +96,13 @@ var De = {
95
96
  }
96
97
  }
97
98
  });
98
- let m = f.length > 0, g = f.filter((e) => e.position === "left"), b = f.filter((e) => e.position === "right"), [x, S] = R({
99
+ let m = f.length > 0, g = f.filter((e) => e.position === "left"), b = f.filter((e) => e.position === "right"), [x, S] = L({
99
100
  pageIndex: 0,
100
101
  pageSize: 12
101
- }), [C, w] = L.useState([]), [T, E] = R(""), D = Ce({
102
- features: De,
102
+ }), [C, w] = I.useState([]), [T, E] = L(""), D = we({
103
+ features: ke,
103
104
  data: t,
104
- columns: Oe,
105
+ columns: Ae,
105
106
  onSortingChange: w,
106
107
  state: {
107
108
  globalFilter: T,
@@ -112,22 +113,22 @@ var De = {
112
113
  getColumnCanGlobalFilter: (e) => e.id === "name" || e.id === "description",
113
114
  onPaginationChange: S
114
115
  }), O = D.getRowModel().rows;
115
- return /* @__PURE__ */ V("div", {
116
+ return /* @__PURE__ */ B("div", {
116
117
  className: "px-6",
117
118
  children: [
118
- /* @__PURE__ */ V("div", {
119
+ /* @__PURE__ */ B("div", {
119
120
  className: "flex items-center gap-3 mb-4",
120
121
  children: [
121
- /* @__PURE__ */ V("div", {
122
+ /* @__PURE__ */ B("div", {
122
123
  className: "relative flex-1 max-w-sm",
123
- children: [/* @__PURE__ */ B(W, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ B(a, {
124
+ children: [/* @__PURE__ */ z(U, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ z(a, {
124
125
  placeholder: c("forms.common.search"),
125
126
  value: T ?? "",
126
127
  onChange: (e) => E(e.target.value),
127
128
  className: "pl-9"
128
129
  })]
129
130
  }),
130
- /* @__PURE__ */ V("span", {
131
+ /* @__PURE__ */ B("span", {
131
132
  className: "text-sm text-muted-foreground whitespace-nowrap",
132
133
  children: [
133
134
  D.getFilteredRowModel().rows.length,
@@ -135,37 +136,37 @@ var De = {
135
136
  D.getFilteredRowModel().rows.length === 1 ? c("forms.common.item") : c("forms.common.items")
136
137
  ]
137
138
  }),
138
- d.length > 0 && /* @__PURE__ */ B("div", {
139
+ d.length > 0 && /* @__PURE__ */ z("div", {
139
140
  className: "ml-auto",
140
- children: /* @__PURE__ */ V(n, { children: [/* @__PURE__ */ B(e, {
141
+ children: /* @__PURE__ */ B(n, { children: [/* @__PURE__ */ z(e, {
141
142
  asChild: !0,
142
- children: /* @__PURE__ */ V(s, {
143
+ children: /* @__PURE__ */ B(s, {
143
144
  variant: "outline",
144
145
  size: "sm",
145
146
  className: "gap-1.5",
146
- children: [/* @__PURE__ */ B(H, { className: "size-4" }), /* @__PURE__ */ B("span", {
147
+ children: [/* @__PURE__ */ z(V, { className: "size-4" }), /* @__PURE__ */ z("span", {
147
148
  className: "hidden sm:inline",
148
149
  children: c("forms.common.actions")
149
150
  })]
150
151
  })
151
- }), /* @__PURE__ */ B(o, {
152
+ }), /* @__PURE__ */ z(o, {
152
153
  align: "end",
153
- children: d.map((e) => /* @__PURE__ */ B(L.Fragment, { children: e.render() }, e.key))
154
+ children: d.map((e) => /* @__PURE__ */ z(I.Fragment, { children: e.render() }, e.key))
154
155
  })] })
155
156
  })
156
157
  ]
157
158
  }),
158
- O.length > 0 ? /* @__PURE__ */ B("div", {
159
+ O.length > 0 ? /* @__PURE__ */ z("div", {
159
160
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",
160
161
  children: O.map((e) => {
161
- let t = e.getValue("name"), n = e.getValue("description"), r = e.getValue("url"), i = e.original.icon ?? void 0, a = Te(t), o = Ee(t), s = /* @__PURE__ */ V(l, {
162
+ let t = e.getValue("name"), n = e.getValue("description"), r = e.getValue("url"), i = e.original.icon ?? void 0, a = De(t), o = Oe(t), s = /* @__PURE__ */ B(l, {
162
163
  className: "relative overflow-hidden p-0 h-full transition-all duration-200 hover:shadow-lg hover:shadow-[var(--vg-accent-surface)] hover:-translate-y-0.5 border-border/60 hover:border-[var(--vg-accent-line)]",
163
- children: [/* @__PURE__ */ B("div", { className: `h-1.5 bg-linear-to-r ${a} opacity-70 group-hover:opacity-100 transition-opacity` }), /* @__PURE__ */ V("div", {
164
+ children: [/* @__PURE__ */ z("div", { className: `h-1.5 bg-linear-to-r ${a} opacity-70 group-hover:opacity-100 transition-opacity` }), /* @__PURE__ */ B("div", {
164
165
  className: "p-4 flex items-start gap-3",
165
166
  children: [
166
- m && g.length > 0 && /* @__PURE__ */ B("div", {
167
+ m && g.length > 0 && /* @__PURE__ */ z("div", {
167
168
  className: "flex items-center gap-1 shrink-0 mt-0.5",
168
- children: g.map((t) => /* @__PURE__ */ B("button", {
169
+ children: g.map((t) => /* @__PURE__ */ z("button", {
169
170
  type: "button",
170
171
  title: t.label,
171
172
  onClick: () => t.onClick(e.original),
@@ -173,109 +174,109 @@ var De = {
173
174
  children: t.icon
174
175
  }, t.key))
175
176
  }),
176
- /* @__PURE__ */ B("div", {
177
+ /* @__PURE__ */ z("div", {
177
178
  className: `shrink-0 w-10 h-10 rounded-lg bg-linear-to-br ${a} flex items-center justify-center text-white text-sm font-semibold shadow-sm`,
178
- children: i ? /* @__PURE__ */ B(me, {
179
+ children: i ? /* @__PURE__ */ z(he, {
179
180
  icon: i,
180
181
  className: "size-5"
181
182
  }) : o
182
183
  }),
183
- /* @__PURE__ */ V("div", {
184
+ /* @__PURE__ */ B("div", {
184
185
  className: "flex-1 min-w-0",
185
- children: [/* @__PURE__ */ B("h3", {
186
+ children: [/* @__PURE__ */ z("h3", {
186
187
  className: "font-medium text-sm truncate group-hover:text-[var(--vg-accent-fg)] transition-colors",
187
188
  children: t
188
- }), n ? /* @__PURE__ */ B("p", {
189
+ }), n ? /* @__PURE__ */ z("p", {
189
190
  className: "text-xs text-muted-foreground mt-1 line-clamp-2 leading-relaxed",
190
191
  children: n
191
- }) : /* @__PURE__ */ B("p", {
192
+ }) : /* @__PURE__ */ z("p", {
192
193
  className: "text-xs text-muted-foreground/50 mt-1 italic",
193
194
  children: c("forms.common.noDescription")
194
195
  })]
195
196
  }),
196
- m ? b.length > 0 && /* @__PURE__ */ B("div", {
197
+ m ? b.length > 0 && /* @__PURE__ */ z("div", {
197
198
  className: "flex items-center gap-1 shrink-0 mt-0.5",
198
- children: b.map((t) => /* @__PURE__ */ B("button", {
199
+ children: b.map((t) => /* @__PURE__ */ z("button", {
199
200
  type: "button",
200
201
  title: t.label,
201
202
  onClick: () => t.onClick(e.original),
202
203
  className: "inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground hover:text-[var(--vg-accent-fg)] hover:bg-[var(--vg-accent-surface)] transition-colors cursor-pointer",
203
204
  children: t.icon
204
205
  }, t.key))
205
- }) : /* @__PURE__ */ B(ue, { className: "h-4 w-4 text-muted-foreground/40 group-hover:text-[var(--vg-accent-fg)] transition-all group-hover:translate-x-0.5 mt-0.5 shrink-0" })
206
+ }) : /* @__PURE__ */ z(de, { className: "h-4 w-4 text-muted-foreground/40 group-hover:text-[var(--vg-accent-fg)] transition-all group-hover:translate-x-0.5 mt-0.5 shrink-0" })
206
207
  ]
207
208
  })]
208
209
  });
209
- return m ? /* @__PURE__ */ B("div", {
210
+ return m ? /* @__PURE__ */ z("div", {
210
211
  className: "group",
211
212
  children: s
212
- }, e.id) : /* @__PURE__ */ B(K, {
213
+ }, e.id) : /* @__PURE__ */ z(G, {
213
214
  to: r,
214
215
  className: "group",
215
216
  children: s
216
217
  }, e.id);
217
218
  })
218
- }) : /* @__PURE__ */ B(l, {
219
+ }) : /* @__PURE__ */ z(l, {
219
220
  className: "p-8",
220
- children: /* @__PURE__ */ V("div", {
221
+ children: /* @__PURE__ */ B("div", {
221
222
  className: "text-center text-muted-foreground",
222
- children: [/* @__PURE__ */ B(W, { className: "h-8 w-8 mx-auto mb-2 opacity-40" }), /* @__PURE__ */ B("p", {
223
+ children: [/* @__PURE__ */ z(U, { className: "h-8 w-8 mx-auto mb-2 opacity-40" }), /* @__PURE__ */ z("p", {
223
224
  className: "text-sm",
224
225
  children: c("forms.common.noResults")
225
226
  })]
226
227
  })
227
228
  }),
228
- D.getPageCount() > 1 && /* @__PURE__ */ V("div", {
229
+ D.getPageCount() > 1 && /* @__PURE__ */ B("div", {
229
230
  className: "flex items-center justify-end space-x-2 mt-4",
230
231
  children: [
231
- /* @__PURE__ */ V("div", {
232
+ /* @__PURE__ */ B("div", {
232
233
  className: "flex items-center space-x-2",
233
- children: [/* @__PURE__ */ B("p", {
234
+ children: [/* @__PURE__ */ z("p", {
234
235
  className: "text-sm text-muted-foreground",
235
236
  children: c("forms.common.perPage")
236
- }), /* @__PURE__ */ V(_, {
237
+ }), /* @__PURE__ */ B(_, {
237
238
  value: `${D.state.pagination.pageSize}`,
238
239
  onValueChange: (e) => D.setPageSize(Number(e)),
239
- children: [/* @__PURE__ */ B(y, {
240
+ children: [/* @__PURE__ */ z(y, {
240
241
  className: "h-8 w-17.5",
241
- children: /* @__PURE__ */ B(h, { placeholder: D.state.pagination.pageSize })
242
- }), /* @__PURE__ */ B(v, {
242
+ children: /* @__PURE__ */ z(h, { placeholder: D.state.pagination.pageSize })
243
+ }), /* @__PURE__ */ z(v, {
243
244
  side: "top",
244
245
  children: [
245
246
  12,
246
247
  24,
247
248
  36,
248
249
  48
249
- ].map((e) => /* @__PURE__ */ B(p, {
250
+ ].map((e) => /* @__PURE__ */ z(p, {
250
251
  value: `${e}`,
251
252
  children: e
252
253
  }, e))
253
254
  })]
254
255
  })]
255
256
  }),
256
- /* @__PURE__ */ B("div", {
257
+ /* @__PURE__ */ z("div", {
257
258
  className: "flex w-25 items-center justify-center text-sm font-medium",
258
259
  children: c("forms.common.pageOf", {
259
260
  index: D.state.pagination.pageIndex + 1,
260
261
  count: D.getPageCount()
261
262
  })
262
263
  }),
263
- /* @__PURE__ */ V("div", {
264
+ /* @__PURE__ */ B("div", {
264
265
  className: "flex items-center space-x-2",
265
- children: [/* @__PURE__ */ B(s, {
266
+ children: [/* @__PURE__ */ z(s, {
266
267
  variant: "outline",
267
268
  size: "sm",
268
269
  onClick: () => D.previousPage(),
269
270
  disabled: !D.getCanPreviousPage(),
270
271
  className: "h-8 w-8 p-0",
271
- children: /* @__PURE__ */ B("span", { children: "<" })
272
- }), /* @__PURE__ */ B(s, {
272
+ children: /* @__PURE__ */ z("span", { children: "<" })
273
+ }), /* @__PURE__ */ z(s, {
273
274
  variant: "outline",
274
275
  size: "sm",
275
276
  onClick: () => D.nextPage(),
276
277
  disabled: !D.getCanNextPage(),
277
278
  className: "h-8 w-8 p-0",
278
- children: /* @__PURE__ */ B("span", { children: ">" })
279
+ children: /* @__PURE__ */ z("span", { children: ">" })
279
280
  })]
280
281
  })
281
282
  ]
@@ -283,53 +284,59 @@ var De = {
283
284
  ]
284
285
  });
285
286
  }, {
286
- NewButton: Z,
287
- Action: Q,
288
- ItemAction: $
289
- }), Ae = (e) => (e ?? 0).toLocaleString(), je = (e, t, n, r, i) => e.map((e) => /* @__PURE__ */ V(g, { children: [/* @__PURE__ */ B(F, {
287
+ NewButton: X,
288
+ Action: Z,
289
+ ItemAction: Te
290
+ }), Me = (e) => !e.url && (e.children?.length ?? 0) > 0, Ne = (e, t, n) => {
291
+ if (e.url) {
292
+ let r = (t ?? "") + e.url;
293
+ if (n === r || n.startsWith(r + "/")) return !0;
294
+ }
295
+ return e.children?.some((e) => Ne(e, t, n)) ?? !1;
296
+ }, Pe = (e) => (e ?? 0).toLocaleString(), Q = (e, t, n, r, i) => e.map((e) => /* @__PURE__ */ B(g, { children: [/* @__PURE__ */ z(P, {
290
297
  tooltip: e.title,
291
- isActive: n.startsWith((t ?? "") + e.url),
298
+ isActive: Ne(e, t, n),
292
299
  asChild: !0,
293
- children: /* @__PURE__ */ V(K, {
294
- to: (t ?? "") + e.url,
300
+ children: /* @__PURE__ */ B(G, {
301
+ to: (t ?? "") + (e.url ?? ""),
295
302
  onClick: i,
296
- children: [e.icon && /* @__PURE__ */ B(e.icon, { className: "size-5!" }), /* @__PURE__ */ B("span", { children: e.title })]
303
+ children: [e.icon && /* @__PURE__ */ z(e.icon, { className: "size-5!" }), /* @__PURE__ */ z("span", { children: e.title })]
297
304
  })
298
- }), !r && e.children && e.children.length > 0 && /* @__PURE__ */ B(P, {
305
+ }), !r && e.children && e.children.length > 0 && /* @__PURE__ */ z(N, {
299
306
  className: "ml-4",
300
- children: je(e.children, t, n, r, i)
301
- })] }, e.title)), Me = ({ icon: e, feature: t, name: n, urlBase: r, isNew: i, data: a, onDelete: o, onExport: c, open: l, setOpen: u }) => {
302
- let { t: d } = G(), f = J().pathname, { state: p, isMobile: m, setOpenMobile: h } = k(), _ = p === "collapsed", v = m ? () => h(!1) : void 0;
303
- return /* @__PURE__ */ V(S, {
307
+ children: Q(e.children, t, n, r, i)
308
+ })] }, e.title)), $ = ({ icon: e, feature: t, name: n, urlBase: r, isNew: i, data: a, onDelete: o, onExport: c, open: l, setOpen: u }) => {
309
+ let { t: d } = W(), f = q().pathname, { state: p, isMobile: m, setOpenMobile: h } = k(), _ = p === "collapsed", v = m ? () => h(!1) : void 0;
310
+ return /* @__PURE__ */ B(S, {
304
311
  collapsible: "icon",
305
312
  variant: "inset",
306
313
  position: "absolute",
307
- children: [/* @__PURE__ */ B(D, {
314
+ children: [/* @__PURE__ */ z(D, {
308
315
  className: "pb-3",
309
- children: /* @__PURE__ */ B(P, { children: /* @__PURE__ */ V(g, {
316
+ children: /* @__PURE__ */ z(N, { children: /* @__PURE__ */ B(g, {
310
317
  className: "flex items-center",
311
- children: [/* @__PURE__ */ B(F, {
318
+ children: [/* @__PURE__ */ z(P, {
312
319
  asChild: !0,
313
320
  className: "data-[slot=sidebar-menu-button]:p-1.5!",
314
- children: /* @__PURE__ */ V(K, {
321
+ children: /* @__PURE__ */ B(G, {
315
322
  to: r ?? "#",
316
323
  className: "flex items-center gap-2.5",
317
- children: [/* @__PURE__ */ B("div", {
324
+ children: [/* @__PURE__ */ z("div", {
318
325
  className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg vg-accent-chip ring-1",
319
- children: /* @__PURE__ */ B(e, { className: "size-5! vg-accent-text" })
320
- }), !_ && /* @__PURE__ */ B("span", {
326
+ children: /* @__PURE__ */ z(e, { className: "size-5! vg-accent-text" })
327
+ }), !_ && /* @__PURE__ */ z("span", {
321
328
  className: "text-sm font-semibold whitespace-nowrap truncate",
322
329
  children: i ? d("sidebar.new", { feature: t }) : n
323
330
  })]
324
331
  })
325
- }), !_ && /* @__PURE__ */ V("div", {
332
+ }), !_ && /* @__PURE__ */ B("div", {
326
333
  className: "flex items-center gap-1 mr-auto",
327
- children: [!i && c && /* @__PURE__ */ B(s, {
334
+ children: [!i && c && /* @__PURE__ */ z(s, {
328
335
  variant: "ghost",
329
336
  size: "icon-sm",
330
337
  onClick: c,
331
- children: /* @__PURE__ */ B(de, { className: "size-5!" })
332
- }), !i && o && u && /* @__PURE__ */ B(I, {
338
+ children: /* @__PURE__ */ z(fe, { className: "size-5!" })
339
+ }), !i && o && u && /* @__PURE__ */ z(F, {
333
340
  feature: t,
334
341
  name: n,
335
342
  onDelete: o,
@@ -338,214 +345,220 @@ var De = {
338
345
  })]
339
346
  })]
340
347
  }) })
341
- }), /* @__PURE__ */ V(te, { children: [a?.counts && a.counts.length > 0 && /* @__PURE__ */ V(w, { children: [/* @__PURE__ */ B(A, { children: d("sidebar.indexing") }), /* @__PURE__ */ B(M, {
348
+ }), /* @__PURE__ */ B(te, { children: [a?.counts && a.counts.length > 0 && /* @__PURE__ */ B(w, { children: [/* @__PURE__ */ z(A, { children: d("sidebar.indexing") }), /* @__PURE__ */ z(j, {
342
349
  className: "flex flex-col gap-2 pt-4",
343
- children: /* @__PURE__ */ B(P, { children: a.counts.map((e) => /* @__PURE__ */ V(g, { children: [/* @__PURE__ */ V(F, {
344
- tooltip: e.title + ": " + Ae(e.count),
350
+ children: /* @__PURE__ */ z(N, { children: a.counts.map((e) => /* @__PURE__ */ B(g, { children: [/* @__PURE__ */ B(P, {
351
+ tooltip: e.title + ": " + Pe(e.count),
345
352
  variant: "outline",
346
- children: [e.icon && /* @__PURE__ */ B(e.icon, { className: "size-5!" }), /* @__PURE__ */ B("span", { children: e.title })]
347
- }), !_ && /* @__PURE__ */ B(x, { children: Ae(e.count) })] }, e.title)) })
348
- })] }), /* @__PURE__ */ V(w, { children: [/* @__PURE__ */ B(A, { children: t }), /* @__PURE__ */ B(M, {
349
- className: "flex flex-col gap-2",
350
- children: /* @__PURE__ */ B(P, { children: a?.navMain && je(i ? a.navMain.filter((e) => e.url === "/detail") : a.navMain, r, f, _, v) })
351
- })] })] })]
353
+ children: [e.icon && /* @__PURE__ */ z(e.icon, { className: "size-5!" }), /* @__PURE__ */ z("span", { children: e.title })]
354
+ }), !_ && /* @__PURE__ */ z(x, { children: Pe(e.count) })] }, e.title)) })
355
+ })] }), (() => {
356
+ let e = a?.navMain ?? [], n = i ? e.filter((e) => e.showOnNew ?? e.url === "/detail") : e, o = n.filter((e) => !Me(e)), s = n.filter(Me);
357
+ return /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ B(w, { children: [/* @__PURE__ */ z(A, { children: t }), /* @__PURE__ */ z(j, {
358
+ className: "flex flex-col gap-2",
359
+ children: /* @__PURE__ */ z(N, { children: Q(o, r, f, _, v) })
360
+ })] }), s.map((e) => /* @__PURE__ */ B(w, { children: [/* @__PURE__ */ z(A, { children: e.title }), /* @__PURE__ */ z(j, {
361
+ className: "flex flex-col gap-2",
362
+ children: /* @__PURE__ */ z(N, { children: Q(e.children ?? [], r, f, _, v) })
363
+ })] }, e.title))] });
364
+ })()] })]
352
365
  });
353
366
  };
354
367
  //#endregion
355
368
  //#region src/components/router/nav-main.tsx
356
- function Ne({ groups: e }) {
357
- let t = J().pathname, { isMobile: n, setOpenMobile: r } = k();
358
- return /* @__PURE__ */ B(z, { children: e.map((e) => /* @__PURE__ */ V(w, { children: [e.label && /* @__PURE__ */ B(A, { children: e.label }), /* @__PURE__ */ B(M, {
369
+ function Fe({ groups: e }) {
370
+ let t = q().pathname, { isMobile: n, setOpenMobile: r } = k();
371
+ return /* @__PURE__ */ z(R, { children: e.map((e) => /* @__PURE__ */ B(w, { children: [e.label && /* @__PURE__ */ z(A, { children: e.label }), /* @__PURE__ */ z(j, {
359
372
  className: "flex flex-col gap-2",
360
- children: /* @__PURE__ */ B(P, { children: e.items.map((e) => /* @__PURE__ */ B(g, { children: /* @__PURE__ */ B(F, {
373
+ children: /* @__PURE__ */ z(N, { children: e.items.map((e) => /* @__PURE__ */ z(g, { children: /* @__PURE__ */ z(P, {
361
374
  tooltip: e.title,
362
375
  isActive: t.startsWith(e.url),
363
376
  asChild: !0,
364
- children: /* @__PURE__ */ V(K, {
377
+ children: /* @__PURE__ */ B(G, {
365
378
  to: e.url,
366
379
  onClick: () => n && r(!1),
367
- children: [e.icon && /* @__PURE__ */ B(e.icon, { className: "size-6!" }), /* @__PURE__ */ B("span", { children: e.title })]
380
+ children: [e.icon && /* @__PURE__ */ z(e.icon, { className: "size-6!" }), /* @__PURE__ */ z("span", { children: e.title })]
368
381
  })
369
382
  }) }, e.title)) })
370
383
  })] }, e.label ?? "_ungrouped")) });
371
384
  }
372
385
  //#endregion
373
386
  //#region src/components/router/nav-user.tsx
374
- function Pe({ user: a, accountUrl: s, logoutUrl: l, onLogout: u }) {
375
- let { t: d } = G(), { isMobile: f } = k(), p = () => {
387
+ function Ie({ user: a, accountUrl: s, logoutUrl: l, onLogout: u }) {
388
+ let { t: d } = W(), { isMobile: f } = k(), p = () => {
376
389
  u ? u() : l && (globalThis.location.href = l);
377
- }, m = L.useMemo(() => {
390
+ }, m = I.useMemo(() => {
378
391
  let e = a.firstName || "", t = a.lastName || "";
379
392
  if (!e && !t) return " ";
380
393
  let n = `${e} ${t}`.trim().split(" ").filter(Boolean);
381
394
  return n.length === 1 ? n[0].charAt(0).toUpperCase() : n[0].charAt(0).toUpperCase() + (n.at(-1)?.charAt(0).toUpperCase() ?? "");
382
395
  }, [a]), h = a?.avatarUrl || "";
383
- return /* @__PURE__ */ B(P, { children: /* @__PURE__ */ B(g, { children: /* @__PURE__ */ V(n, { children: [/* @__PURE__ */ B(e, {
396
+ return /* @__PURE__ */ z(N, { children: /* @__PURE__ */ z(g, { children: /* @__PURE__ */ B(n, { children: [/* @__PURE__ */ z(e, {
384
397
  asChild: !0,
385
- children: /* @__PURE__ */ V(F, {
398
+ children: /* @__PURE__ */ B(P, {
386
399
  size: "lg",
387
400
  className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
388
401
  children: [
389
- /* @__PURE__ */ V(N, {
402
+ /* @__PURE__ */ B(M, {
390
403
  className: "h-8 w-8 rounded-lg",
391
- children: [h && /* @__PURE__ */ B(O, {
404
+ children: [h && /* @__PURE__ */ z(O, {
392
405
  src: h,
393
406
  alt: a.username
394
- }), /* @__PURE__ */ B(j, {
407
+ }), /* @__PURE__ */ z(re, {
395
408
  className: "rounded-lg",
396
409
  children: m
397
410
  })]
398
411
  }),
399
- /* @__PURE__ */ V("div", {
412
+ /* @__PURE__ */ B("div", {
400
413
  className: "grid flex-1 text-left text-sm leading-tight",
401
- children: [/* @__PURE__ */ V("span", {
414
+ children: [/* @__PURE__ */ B("span", {
402
415
  className: "truncate font-medium",
403
416
  children: [
404
417
  a.firstName,
405
418
  " ",
406
419
  a.lastName
407
420
  ]
408
- }), /* @__PURE__ */ B("span", {
421
+ }), /* @__PURE__ */ z("span", {
409
422
  className: "text-muted-foreground truncate text-xs",
410
423
  children: a.email
411
424
  })]
412
425
  }),
413
- /* @__PURE__ */ B(H, { className: "ml-auto size-4" })
426
+ /* @__PURE__ */ z(V, { className: "ml-auto size-4" })
414
427
  ]
415
428
  })
416
- }), /* @__PURE__ */ V(o, {
429
+ }), /* @__PURE__ */ B(o, {
417
430
  className: "w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",
418
431
  side: f ? "bottom" : "right",
419
432
  align: "end",
420
433
  sideOffset: 4,
421
434
  children: [
422
- /* @__PURE__ */ B(t, {
435
+ /* @__PURE__ */ z(t, {
423
436
  className: "p-0 font-normal",
424
- children: /* @__PURE__ */ V("div", {
437
+ children: /* @__PURE__ */ B("div", {
425
438
  className: "flex items-center gap-2 px-1 py-1.5 text-left text-sm",
426
- children: [/* @__PURE__ */ V(N, {
439
+ children: [/* @__PURE__ */ B(M, {
427
440
  className: "h-8 w-8 rounded-lg",
428
- children: [h && /* @__PURE__ */ B(O, {
441
+ children: [h && /* @__PURE__ */ z(O, {
429
442
  src: h,
430
443
  alt: a.username
431
- }), /* @__PURE__ */ B(j, {
444
+ }), /* @__PURE__ */ z(re, {
432
445
  className: "rounded-lg",
433
446
  children: m
434
447
  })]
435
- }), /* @__PURE__ */ V("div", {
448
+ }), /* @__PURE__ */ B("div", {
436
449
  className: "grid flex-1 text-left text-sm leading-tight",
437
- children: [/* @__PURE__ */ V("span", {
450
+ children: [/* @__PURE__ */ B("span", {
438
451
  className: "truncate font-medium",
439
452
  children: [
440
453
  a.firstName,
441
454
  " ",
442
455
  a.lastName
443
456
  ]
444
- }), /* @__PURE__ */ B("span", {
457
+ }), /* @__PURE__ */ z("span", {
445
458
  className: "text-muted-foreground truncate text-xs",
446
459
  children: a.email
447
460
  })]
448
461
  })]
449
462
  })
450
463
  }),
451
- /* @__PURE__ */ B(c, {}),
452
- s && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(i, { children: /* @__PURE__ */ B(K, {
464
+ /* @__PURE__ */ z(c, {}),
465
+ s && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(i, { children: /* @__PURE__ */ z(G, {
453
466
  to: s,
454
467
  className: "w-full",
455
- children: /* @__PURE__ */ V(r, { children: [/* @__PURE__ */ B(pe, {}), d("nav.account")] })
456
- }) }), /* @__PURE__ */ B(c, {})] }),
457
- /* @__PURE__ */ V(r, {
468
+ children: /* @__PURE__ */ B(r, { children: [/* @__PURE__ */ z(me, {}), d("nav.account")] })
469
+ }) }), /* @__PURE__ */ z(c, {})] }),
470
+ /* @__PURE__ */ B(r, {
458
471
  onClick: p,
459
472
  className: "cursor-pointer",
460
- children: [/* @__PURE__ */ B(fe, {}), /* @__PURE__ */ B("span", { children: d("nav.logOut") })]
473
+ children: [/* @__PURE__ */ z(pe, {}), /* @__PURE__ */ z("span", { children: d("nav.logOut") })]
461
474
  })
462
475
  ]
463
476
  })] }) }) });
464
477
  }
465
478
  //#endregion
466
479
  //#region src/components/router/page-content.tsx
467
- var Fe = () => /* @__PURE__ */ B("div", {
480
+ var Le = () => /* @__PURE__ */ z("div", {
468
481
  className: "flex flex-1 flex-col",
469
- children: /* @__PURE__ */ B("div", {
482
+ children: /* @__PURE__ */ z("div", {
470
483
  className: "@container/main flex flex-1 flex-col gap-2",
471
- children: /* @__PURE__ */ B("div", {
484
+ children: /* @__PURE__ */ z("div", {
472
485
  className: "flex flex-col gap-2 px-1 py-1 md:gap-3 md:px-2 md:py-2",
473
- children: /* @__PURE__ */ B(q, {})
486
+ children: /* @__PURE__ */ z(K, {})
474
487
  })
475
488
  })
476
- }), Ie = ({ icon: e, title: t, urlBase: n, children: r }) => {
477
- let { items: i } = re(), a = Y(), { t: o } = G(), s = i.length > 0 ? i[i.length - 1] : null, c = i.length > 1 ? i[i.length - 2] : null;
478
- return /* @__PURE__ */ B("header", {
489
+ }), Re = ({ icon: e, title: t, urlBase: n, children: r }) => {
490
+ let { items: i } = ie(), a = J(), { t: o } = W(), s = i.length > 0 ? i[i.length - 1] : null, c = i.length > 1 ? i[i.length - 2] : null;
491
+ return /* @__PURE__ */ z("header", {
479
492
  className: "flex h-(--header-height) shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)",
480
- children: /* @__PURE__ */ V("div", {
493
+ children: /* @__PURE__ */ B("div", {
481
494
  className: "flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6",
482
495
  children: [
483
- /* @__PURE__ */ B(u, { className: "-ml-1 hidden md:flex" }),
484
- /* @__PURE__ */ B(f, {
496
+ /* @__PURE__ */ z(u, { className: "-ml-1 hidden md:flex" }),
497
+ /* @__PURE__ */ z(f, {
485
498
  orientation: "vertical",
486
499
  className: "mx-2 data-[orientation=vertical]:h-4 hidden md:block"
487
500
  }),
488
- /* @__PURE__ */ V("div", {
501
+ /* @__PURE__ */ B("div", {
489
502
  className: "hidden md:flex items-center gap-1",
490
- children: [e && /* @__PURE__ */ B("div", {
503
+ children: [e && /* @__PURE__ */ z("div", {
491
504
  className: "flex h-8 w-8 items-center justify-center rounded-lg vg-accent-chip ring-1 mr-1",
492
- children: /* @__PURE__ */ B(e, { className: "size-4.5! vg-accent-text" })
493
- }), n ? /* @__PURE__ */ B(ie, { children: /* @__PURE__ */ B(ae, { children: i.map((e, t) => /* @__PURE__ */ V(L.Fragment, { children: [t > 0 && /* @__PURE__ */ B(E, {}), /* @__PURE__ */ B(C, { children: e.href ? /* @__PURE__ */ B(ne, {
505
+ children: /* @__PURE__ */ z(e, { className: "size-4.5! vg-accent-text" })
506
+ }), n ? /* @__PURE__ */ z(ae, { children: /* @__PURE__ */ z(oe, { children: i.map((e, t) => /* @__PURE__ */ B(I.Fragment, { children: [t > 0 && /* @__PURE__ */ z(E, {}), /* @__PURE__ */ z(C, { children: e.href ? /* @__PURE__ */ z(ne, {
494
507
  asChild: !0,
495
- children: /* @__PURE__ */ B(K, {
508
+ children: /* @__PURE__ */ z(G, {
496
509
  to: e.href,
497
510
  children: e.label
498
511
  })
499
- }) : /* @__PURE__ */ B(T, { children: e.label }) })] }, e.label)) }) }) : /* @__PURE__ */ B("h1", {
512
+ }) : /* @__PURE__ */ z(T, { children: e.label }) })] }, e.label)) }) }) : /* @__PURE__ */ z("h1", {
500
513
  className: "text-base font-semibold",
501
514
  children: t
502
515
  })]
503
516
  }),
504
- /* @__PURE__ */ V("div", {
517
+ /* @__PURE__ */ B("div", {
505
518
  className: "flex md:hidden items-center gap-2 min-w-0 flex-1",
506
519
  children: [
507
- c?.href && /* @__PURE__ */ B("button", {
520
+ c?.href && /* @__PURE__ */ z("button", {
508
521
  type: "button",
509
522
  title: o("common.goBack"),
510
523
  onClick: () => a(c.href),
511
524
  className: "shrink-0 flex items-center justify-center size-8 rounded-lg hover:bg-muted transition-colors",
512
- children: /* @__PURE__ */ B(le, { className: "size-4" })
525
+ children: /* @__PURE__ */ z(ue, { className: "size-4" })
513
526
  }),
514
- e && /* @__PURE__ */ B("div", {
527
+ e && /* @__PURE__ */ z("div", {
515
528
  className: "flex shrink-0 h-7 w-7 items-center justify-center rounded-lg vg-accent-chip ring-1",
516
- children: /* @__PURE__ */ B(e, { className: "size-3.5! vg-accent-text" })
529
+ children: /* @__PURE__ */ z(e, { className: "size-3.5! vg-accent-text" })
517
530
  }),
518
- /* @__PURE__ */ B("span", {
531
+ /* @__PURE__ */ z("span", {
519
532
  className: "text-sm font-semibold truncate",
520
533
  children: s?.label ?? t
521
534
  })
522
535
  ]
523
536
  }),
524
- /* @__PURE__ */ V("div", {
537
+ /* @__PURE__ */ B("div", {
525
538
  className: "ml-auto flex items-center gap-2",
526
539
  children: [
527
- r && /* @__PURE__ */ B("div", {
540
+ r && /* @__PURE__ */ z("div", {
528
541
  className: "hidden md:flex items-center",
529
542
  children: r
530
543
  }),
531
- /* @__PURE__ */ B("div", {
544
+ /* @__PURE__ */ z("div", {
532
545
  className: "hidden md:block",
533
- children: /* @__PURE__ */ B(ee, {})
546
+ children: /* @__PURE__ */ z(ee, {})
534
547
  }),
535
- /* @__PURE__ */ B(u, { className: "md:hidden" })
548
+ /* @__PURE__ */ z(u, { className: "md:hidden" })
536
549
  ]
537
550
  })
538
551
  ]
539
552
  })
540
553
  });
541
- }, Le = ({ icon: e, title: t, urlBase: n }) => /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(Ie, {
554
+ }, ze = ({ icon: e, title: t, urlBase: n }) => /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(Re, {
542
555
  icon: e,
543
556
  title: t,
544
557
  urlBase: n
545
- }), /* @__PURE__ */ B(Fe, {})] }), Re = ({ icon: e, feature: t, description: n, urlBase: r }) => {
546
- let i = m(), a = i?.isMobile ?? !1, o = i?.toggleSidebar ?? (() => {}), s = /* @__PURE__ */ V("div", {
558
+ }), /* @__PURE__ */ z(Le, {})] }), Be = ({ icon: e, feature: t, description: n, urlBase: r }) => {
559
+ let i = m(), a = i?.isMobile ?? !1, o = i?.toggleSidebar ?? (() => {}), s = /* @__PURE__ */ B("div", {
547
560
  className: "flex items-center gap-3",
548
- children: [/* @__PURE__ */ B("div", {
561
+ children: [/* @__PURE__ */ z("div", {
549
562
  className: `flex h-9 w-9 items-center justify-center rounded-lg vg-accent-chip ring-1 ${a ? "cursor-pointer active:scale-95 transition-transform" : ""}`,
550
563
  onClick: a ? o : void 0,
551
564
  onKeyDown: a ? (e) => {
@@ -554,121 +567,135 @@ var Fe = () => /* @__PURE__ */ B("div", {
554
567
  tabIndex: a ? 0 : void 0,
555
568
  role: a ? "button" : void 0,
556
569
  title: a ? "Open navigation" : void 0,
557
- children: /* @__PURE__ */ B(e, { className: "size-5! vg-accent-text" })
558
- }), /* @__PURE__ */ V("div", {
570
+ children: /* @__PURE__ */ z(e, { className: "size-5! vg-accent-text" })
571
+ }), /* @__PURE__ */ B("div", {
559
572
  className: "min-w-0",
560
- children: [/* @__PURE__ */ B("h1", {
573
+ children: [/* @__PURE__ */ z("h1", {
561
574
  className: "text-base font-semibold leading-tight text-foreground truncate",
562
575
  children: t
563
- }), /* @__PURE__ */ B("p", {
576
+ }), /* @__PURE__ */ z("p", {
564
577
  className: "hidden md:block text-xs text-muted-foreground leading-relaxed mt-0.5 truncate",
565
578
  children: n
566
579
  })]
567
580
  })]
568
581
  });
569
- return r && !a ? /* @__PURE__ */ B("div", {
582
+ return r && !a ? /* @__PURE__ */ z("div", {
570
583
  className: "min-w-0 flex-1",
571
- children: /* @__PURE__ */ B(K, {
584
+ children: /* @__PURE__ */ z(G, {
572
585
  to: r,
573
586
  className: "group inline-flex max-w-full",
574
587
  children: s
575
588
  })
576
- }) : /* @__PURE__ */ B("div", {
589
+ }) : /* @__PURE__ */ z("div", {
577
590
  className: "min-w-0 flex-1",
578
591
  children: s
579
592
  });
580
593
  };
581
- Re.displayName = "StickyPageHeaderTitle";
582
- var ze = () => null;
583
- ze.displayName = "StickyPageHeaderAction";
584
- var Be = ({ children: t, menuLabel: i }) => {
585
- let a = Y(), { t: c } = G(), l = [], u = [];
586
- L.Children.forEach(t, (e) => {
587
- L.isValidElement(e) && e.type?.displayName === "StickyPageHeaderAction" ? l.push(e.props) : u.push(e);
594
+ Be.displayName = "StickyPageHeaderTitle";
595
+ var Ve = () => null;
596
+ Ve.displayName = "StickyPageHeaderAction";
597
+ var He = ({ children: t, menuLabel: i }) => {
598
+ let a = J(), { t: c } = W(), l = [], u = [];
599
+ I.Children.forEach(t, (e) => {
600
+ I.isValidElement(e) && e.type?.displayName === "StickyPageHeaderAction" ? l.push(e.props) : u.push(e);
588
601
  });
589
602
  let d = i ?? c("common.actions");
590
- return /* @__PURE__ */ V("div", {
603
+ return /* @__PURE__ */ B("div", {
591
604
  className: "flex items-center gap-2 shrink-0",
592
- children: [u, l.length > 0 && /* @__PURE__ */ V(n, { children: [/* @__PURE__ */ B(e, {
605
+ children: [u, l.length > 0 && /* @__PURE__ */ B(n, { children: [/* @__PURE__ */ z(e, {
593
606
  asChild: !0,
594
- children: i ? /* @__PURE__ */ V(s, {
607
+ children: i ? /* @__PURE__ */ B(s, {
595
608
  variant: "outline",
596
609
  size: "sm",
597
610
  className: "gap-1.5",
598
- children: [/* @__PURE__ */ B(H, { className: "size-4" }), /* @__PURE__ */ B("span", {
611
+ children: [/* @__PURE__ */ z(V, { className: "size-4" }), /* @__PURE__ */ z("span", {
599
612
  className: "hidden sm:inline",
600
613
  children: i
601
614
  })]
602
- }) : /* @__PURE__ */ B(s, {
615
+ }) : /* @__PURE__ */ z(s, {
603
616
  variant: "ghost",
604
617
  size: "icon-sm",
605
618
  "aria-label": d,
606
619
  title: d,
607
- children: /* @__PURE__ */ B(H, { className: "size-5!" })
620
+ children: /* @__PURE__ */ z(V, { className: "size-5!" })
608
621
  })
609
- }), /* @__PURE__ */ B(o, {
622
+ }), /* @__PURE__ */ z(o, {
610
623
  align: "end",
611
624
  children: l.map((e) => {
612
- let t = e.icon ?? U;
613
- return /* @__PURE__ */ V(r, {
625
+ let t = e.icon ?? H;
626
+ return /* @__PURE__ */ B(r, {
614
627
  disabled: e.disabled,
615
628
  onClick: () => {
616
629
  e.href && a(e.href), e.onClick && e.onClick();
617
630
  },
618
- children: [/* @__PURE__ */ B(t, { className: "size-4 mr-2" }), e.label]
631
+ children: [/* @__PURE__ */ z(t, { className: "size-4 mr-2" }), e.label]
619
632
  }, e.label);
620
633
  })
621
634
  })] })]
622
635
  });
623
636
  };
624
- Be.displayName = "StickyPageHeaderActions";
625
- var Ve = Object.assign(({ children: e }) => /* @__PURE__ */ B("header", {
637
+ He.displayName = "StickyPageHeaderActions";
638
+ var Ue = Object.assign(({ children: e }) => /* @__PURE__ */ z("header", {
626
639
  className: "sticky top-0 z-10 -mx-4 lg:-mx-6 mb-5 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80",
627
- children: /* @__PURE__ */ V("div", {
640
+ children: /* @__PURE__ */ B("div", {
628
641
  className: "flex w-full items-center gap-3 px-4 lg:px-6 py-3",
629
- children: [/* @__PURE__ */ V("div", {
642
+ children: [/* @__PURE__ */ B("div", {
630
643
  className: "hidden md:flex items-center gap-1",
631
- children: [/* @__PURE__ */ B(u, { className: "-ml-1" }), /* @__PURE__ */ B(f, {
644
+ children: [/* @__PURE__ */ z(u, { className: "-ml-1" }), /* @__PURE__ */ z(f, {
632
645
  orientation: "vertical",
633
646
  className: "mx-2 data-[orientation=vertical]:h-4"
634
647
  })]
635
648
  }), e]
636
649
  })
637
650
  }), {
638
- Title: Re,
639
- Actions: Be,
640
- Action: ze
641
- }), He = (e) => /* @__PURE__ */ B("div", {
642
- className: "w-full px-1 md:px-6 lg:px-8 py-1 md:py-4 min-h-[calc(100svh-10.5rem)]",
643
- children: /* @__PURE__ */ B("div", {
644
- className: "flex min-h-full w-full md:rounded-xl md:border md:bg-sidebar md:shadow-sm",
645
- children: /* @__PURE__ */ V(d, {
646
- defaultOpen: !0,
647
- className: "min-h-0!",
648
- style: {
649
- "--sidebar-width": "calc(var(--spacing) * 72)",
650
- "--header-height": "calc(var(--spacing) * 12)",
651
- minHeight: 0
652
- },
653
- children: [/* @__PURE__ */ B(Me, { ...e }), /* @__PURE__ */ B(b, {
654
- className: "md:mr-1.5 md:my-1.5 md:rounded-xl md:border bg-background md:shadow-sm",
655
- children: /* @__PURE__ */ B("main", {
656
- className: "flex flex-1 flex-col pt-2 md:pt-4 max-md:[&_.px-6]:px-2",
657
- children: /* @__PURE__ */ B(q, {})
658
- })
659
- })]
651
+ Title: Be,
652
+ Actions: He,
653
+ Action: Ve
654
+ }), We = {
655
+ comfortable: {
656
+ outer: "px-1 md:px-6 lg:px-8 py-1 md:py-4",
657
+ inset: "md:mr-1.5 md:my-1.5",
658
+ main: "pt-2 md:pt-4"
659
+ },
660
+ compact: {
661
+ outer: "px-0 py-0",
662
+ inset: "min-w-0 md:mx-1.5",
663
+ main: "pt-1 md:pt-2"
664
+ }
665
+ }, Ge = ({ outletContext: e, density: t = "comfortable", ...n }) => {
666
+ let r = We[t];
667
+ return /* @__PURE__ */ z("div", {
668
+ className: `w-full ${r.outer} min-h-[calc(100svh-10.5rem)]`,
669
+ children: /* @__PURE__ */ z("div", {
670
+ className: "flex min-h-full w-full md:rounded-xl md:border md:bg-sidebar md:shadow-sm",
671
+ children: /* @__PURE__ */ B(d, {
672
+ defaultOpen: !0,
673
+ className: "min-h-0!",
674
+ style: {
675
+ "--sidebar-width": "calc(var(--spacing) * 72)",
676
+ "--header-height": "calc(var(--spacing) * 12)",
677
+ minHeight: 0
678
+ },
679
+ children: [/* @__PURE__ */ z($, { ...n }), /* @__PURE__ */ z(b, {
680
+ className: `${r.inset} md:rounded-xl md:border bg-background md:shadow-sm`,
681
+ children: /* @__PURE__ */ z("main", {
682
+ className: `flex flex-1 flex-col ${r.main} max-md:[&_.px-6]:px-2`,
683
+ children: /* @__PURE__ */ z(K, { context: e })
684
+ })
685
+ })]
686
+ })
660
687
  })
661
- })
662
- }), Ue = () => null;
663
- Ue.displayName = "SubPageHeaderAction";
664
- var We = Object.assign(({ icon: t, feature: i, name: a, description: c, urlBase: l, onDelete: d, open: p, setOpen: h, children: g }) => {
665
- let _ = m(), v = _?.isMobile ?? !1, y = _?.toggleSidebar ?? (() => {}), b = Y(), x = [];
666
- L.Children.forEach(g, (e) => {
667
- L.isValidElement(e) && X(e) === "SubPageHeaderAction" && x.push(e.props);
668
688
  });
669
- let S = /* @__PURE__ */ V("div", {
689
+ }, Ke = () => null;
690
+ Ke.displayName = "SubPageHeaderAction";
691
+ var qe = Object.assign(({ icon: t, feature: i, name: a, description: c, urlBase: l, onDelete: d, open: p, setOpen: h, children: g }) => {
692
+ let _ = m(), v = _?.isMobile ?? !1, y = _?.toggleSidebar ?? (() => {}), b = J(), x = [];
693
+ I.Children.forEach(g, (e) => {
694
+ I.isValidElement(e) && Y(e) === "SubPageHeaderAction" && x.push(e.props);
695
+ });
696
+ let S = /* @__PURE__ */ B("div", {
670
697
  className: "flex items-center gap-3",
671
- children: [t && /* @__PURE__ */ B("div", {
698
+ children: [t && /* @__PURE__ */ z("div", {
672
699
  className: `flex h-9 w-9 items-center justify-center rounded-lg vg-accent-chip ring-1 ${v ? "cursor-pointer active:scale-95 transition-transform" : ""}`,
673
700
  onClick: v ? y : void 0,
674
701
  onKeyDown: v ? (e) => {
@@ -676,64 +703,64 @@ var We = Object.assign(({ icon: t, feature: i, name: a, description: c, urlBase:
676
703
  } : void 0,
677
704
  tabIndex: v ? 0 : void 0,
678
705
  title: v ? "Open navigation" : void 0,
679
- children: /* @__PURE__ */ B(t, { className: "size-5! vg-accent-text" })
680
- }), /* @__PURE__ */ V("div", {
706
+ children: /* @__PURE__ */ z(t, { className: "size-5! vg-accent-text" })
707
+ }), /* @__PURE__ */ B("div", {
681
708
  className: "min-w-0",
682
- children: [/* @__PURE__ */ B("h1", {
709
+ children: [/* @__PURE__ */ z("h1", {
683
710
  className: "text-base font-semibold leading-tight text-foreground",
684
711
  children: i
685
- }), /* @__PURE__ */ B("p", {
712
+ }), /* @__PURE__ */ z("p", {
686
713
  className: "hidden md:block text-xs text-muted-foreground leading-relaxed mt-0.5",
687
714
  children: c
688
715
  })]
689
716
  })]
690
717
  });
691
- return /* @__PURE__ */ V("header", {
718
+ return /* @__PURE__ */ B("header", {
692
719
  className: "mb-5",
693
- children: [/* @__PURE__ */ V("div", {
720
+ children: [/* @__PURE__ */ B("div", {
694
721
  className: "flex w-full items-center gap-3 px-4 lg:px-6",
695
722
  children: [
696
- /* @__PURE__ */ V("div", {
723
+ /* @__PURE__ */ B("div", {
697
724
  className: "hidden md:flex items-center gap-1",
698
- children: [/* @__PURE__ */ B(u, { className: "-ml-1" }), /* @__PURE__ */ B(f, {
725
+ children: [/* @__PURE__ */ z(u, { className: "-ml-1" }), /* @__PURE__ */ z(f, {
699
726
  orientation: "vertical",
700
727
  className: "mx-2 data-[orientation=vertical]:h-4"
701
728
  })]
702
729
  }),
703
- /* @__PURE__ */ B("div", {
730
+ /* @__PURE__ */ z("div", {
704
731
  className: "min-w-0 flex-1",
705
- children: l && !v ? /* @__PURE__ */ B(K, {
732
+ children: l && !v ? /* @__PURE__ */ z(G, {
706
733
  to: l,
707
734
  className: "group inline-flex",
708
735
  children: S
709
736
  }) : S
710
737
  }),
711
- /* @__PURE__ */ V("div", {
738
+ /* @__PURE__ */ B("div", {
712
739
  className: "flex items-center gap-2",
713
- children: [x.length > 0 && /* @__PURE__ */ V(n, { children: [/* @__PURE__ */ B(e, {
740
+ children: [x.length > 0 && /* @__PURE__ */ B(n, { children: [/* @__PURE__ */ z(e, {
714
741
  asChild: !0,
715
- children: /* @__PURE__ */ V(s, {
742
+ children: /* @__PURE__ */ B(s, {
716
743
  variant: "outline",
717
744
  size: "sm",
718
745
  className: "gap-1.5",
719
- children: [/* @__PURE__ */ B(H, { className: "size-4" }), /* @__PURE__ */ B("span", {
746
+ children: [/* @__PURE__ */ z(V, { className: "size-4" }), /* @__PURE__ */ z("span", {
720
747
  className: "hidden sm:inline",
721
748
  children: "Actions"
722
749
  })]
723
750
  })
724
- }), /* @__PURE__ */ B(o, {
751
+ }), /* @__PURE__ */ z(o, {
725
752
  align: "end",
726
753
  children: x.map((e) => {
727
- let t = e.icon ?? U;
728
- return /* @__PURE__ */ V(r, {
754
+ let t = e.icon ?? H;
755
+ return /* @__PURE__ */ B(r, {
729
756
  disabled: e.disabled,
730
757
  onClick: () => {
731
758
  e.href && b(e.href), e.onClick && e.onClick();
732
759
  },
733
- children: [/* @__PURE__ */ B(t, { className: "size-4 mr-2" }), e.label]
760
+ children: [/* @__PURE__ */ z(t, { className: "size-4 mr-2" }), e.label]
734
761
  }, e.label);
735
762
  })
736
- })] }), p !== void 0 && d !== void 0 && h !== void 0 && /* @__PURE__ */ B(I, {
763
+ })] }), p !== void 0 && d !== void 0 && h !== void 0 && /* @__PURE__ */ z(F, {
737
764
  feature: i,
738
765
  name: a,
739
766
  onDelete: d,
@@ -742,8 +769,8 @@ var We = Object.assign(({ icon: t, feature: i, name: a, description: c, urlBase:
742
769
  })]
743
770
  })
744
771
  ]
745
- }), /* @__PURE__ */ B(f, { className: "mt-3" })]
772
+ }), /* @__PURE__ */ z(f, { className: "mt-3" })]
746
773
  });
747
- }, { Action: Ue });
774
+ }, { Action: Ke });
748
775
  //#endregion
749
- export { oe as BlankSlate, I as DialogDelete, se as GradientButtonLink, ke as GridList, Me as InternalSidebar, ce as LoadProvider, Ne as NavMain, Pe as NavUser, Le as Page, Fe as PageContent, Ie as PageHeader, Ve as StickyPageHeader, He as SubPage, We as SubPageHeader };
776
+ export { se as BlankSlate, F as DialogDelete, ce as GradientButtonLink, je as GridList, $ as InternalSidebar, le as LoadProvider, Fe as NavMain, Ie as NavUser, ze as Page, Le as PageContent, Re as PageHeader, Ue as StickyPageHeader, Ge as SubPage, qe as SubPageHeader };