@tailor-platform/app-shell 1.15.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-shell-core.css +1 -1
- package/dist/app-shell.d.ts +208 -114
- package/dist/app-shell.js +3449 -3446
- package/dist/{appshell-DLVBFo5J.js → appshell-B0wh5Lq0.js} +625 -512
- package/dist/style-entry.d.ts +116 -96
- package/dist/testing.d.ts +116 -96
- package/dist/testing.js +1 -1
- package/dist/vite-plugin.d.ts +116 -96
- package/package.json +8 -8
- package/skills/app-shell-patterns/SKILL.md +101 -14
- package/skills/app-shell-patterns/references/api/create-ai-gateway-client.md +115 -0
- package/skills/app-shell-patterns/references/api/create-typed-paths.md +117 -0
- package/skills/app-shell-patterns/references/api/define-i18n-labels.md +143 -0
- package/skills/app-shell-patterns/references/api/define-module.md +247 -0
- package/skills/app-shell-patterns/references/api/define-resource.md +307 -0
- package/skills/app-shell-patterns/references/api/guards/hidden.md +202 -0
- package/skills/app-shell-patterns/references/api/guards/overview.md +354 -0
- package/skills/app-shell-patterns/references/api/guards/pass.md +129 -0
- package/skills/app-shell-patterns/references/api/guards/redirect-to.md +307 -0
- package/skills/app-shell-patterns/references/api/router/use-location.md +240 -0
- package/skills/app-shell-patterns/references/api/router/use-navigate.md +138 -0
- package/skills/app-shell-patterns/references/api/router/use-params.md +218 -0
- package/skills/app-shell-patterns/references/api/use-ai-chat.md +110 -0
- package/skills/app-shell-patterns/references/api/use-app-shell-config.md +126 -0
- package/skills/app-shell-patterns/references/api/use-app-shell-data.md +146 -0
- package/skills/app-shell-patterns/references/api/use-app-shell.md +143 -0
- package/skills/app-shell-patterns/references/api/use-auth.md +145 -0
- package/skills/app-shell-patterns/references/api/use-override-breadcrumb.md +74 -0
- package/skills/app-shell-patterns/references/api/use-page-meta.md +96 -0
- package/skills/app-shell-patterns/references/api/use-register-command-palette-actions.md +90 -0
- package/skills/app-shell-patterns/references/api/use-resolved-locale.md +67 -0
- package/skills/app-shell-patterns/references/api/use-route-error.md +214 -0
- package/skills/app-shell-patterns/references/api/use-theme.md +108 -0
- package/skills/app-shell-patterns/references/api/use-time-zone.md +80 -0
- package/skills/app-shell-patterns/references/api/use-toast.md +107 -0
- package/skills/app-shell-patterns/references/components/action-panel.md +168 -0
- package/skills/app-shell-patterns/references/components/activity-card.md +142 -0
- package/skills/app-shell-patterns/references/components/ai-chat.md +315 -0
- package/skills/app-shell-patterns/references/components/alert.md +202 -0
- package/skills/app-shell-patterns/references/components/app-shell.md +530 -0
- package/skills/app-shell-patterns/references/components/appearance-switcher.md +87 -0
- package/skills/app-shell-patterns/references/components/attachment.md +138 -0
- package/skills/app-shell-patterns/references/components/autocomplete.md +278 -0
- package/skills/app-shell-patterns/references/components/avatar.md +80 -0
- package/skills/app-shell-patterns/references/components/badge.md +309 -0
- package/skills/app-shell-patterns/references/components/button.md +164 -0
- package/skills/app-shell-patterns/references/components/card.md +109 -0
- package/skills/app-shell-patterns/references/components/checkbox.md +169 -0
- package/skills/app-shell-patterns/references/components/combobox.md +318 -0
- package/skills/app-shell-patterns/references/components/command-palette.md +413 -0
- package/skills/app-shell-patterns/references/components/csv-importer.md +214 -0
- package/skills/app-shell-patterns/references/components/data-table.md +953 -0
- package/skills/app-shell-patterns/references/components/date-picker.md +248 -0
- package/skills/app-shell-patterns/references/components/default-header.md +75 -0
- package/skills/app-shell-patterns/references/components/default-sidebar.md +136 -0
- package/skills/app-shell-patterns/references/components/description-card.md +569 -0
- package/skills/app-shell-patterns/references/components/dialog.md +164 -0
- package/skills/app-shell-patterns/references/components/document-progress-card.md +154 -0
- package/skills/app-shell-patterns/references/components/form.md +378 -0
- package/skills/app-shell-patterns/references/components/global-header-layout.md +132 -0
- package/skills/app-shell-patterns/references/components/grid.md +184 -0
- package/skills/app-shell-patterns/references/components/input.md +83 -0
- package/skills/app-shell-patterns/references/components/layout.md +539 -0
- package/skills/app-shell-patterns/references/components/menu.md +218 -0
- package/skills/app-shell-patterns/references/components/metric-card.md +94 -0
- package/skills/app-shell-patterns/references/components/select.md +283 -0
- package/skills/app-shell-patterns/references/components/sheet.md +237 -0
- package/skills/app-shell-patterns/references/components/sidebar-group.md +466 -0
- package/skills/app-shell-patterns/references/components/sidebar-item.md +458 -0
- package/skills/app-shell-patterns/references/components/sidebar-layout.md +258 -0
- package/skills/app-shell-patterns/references/components/spinner.md +81 -0
- package/skills/app-shell-patterns/references/components/table.md +188 -0
- package/skills/app-shell-patterns/references/components/tabs.md +158 -0
- package/skills/app-shell-patterns/references/components/textarea.md +122 -0
- package/skills/app-shell-patterns/references/components/timeline.md +317 -0
- package/skills/app-shell-patterns/references/components/toolbar.md +138 -0
- package/skills/app-shell-patterns/references/components/tooltip.md +144 -0
- package/skills/app-shell-patterns/references/components/with-guard.md +445 -0
- package/skills/app-shell-patterns/references/concepts/authentication.md +301 -0
- package/skills/app-shell-patterns/references/concepts/custom-components.md +59 -0
- package/skills/app-shell-patterns/references/concepts/file-based-routing.md +350 -0
- package/skills/app-shell-patterns/references/{fundamental → concepts}/graphql.md +11 -4
- package/skills/app-shell-patterns/references/concepts/modules-and-resources.md +229 -0
- package/skills/app-shell-patterns/references/concepts/routing-navigation.md +387 -0
- package/skills/app-shell-patterns/references/concepts/sidebar-navigation.md +388 -0
- package/skills/app-shell-patterns/references/{fundamental/design-system.md → concepts/styling-theming.md} +258 -110
- package/skills/app-shell-patterns/references/migrations.md +34 -0
- package/skills/app-shell-patterns/references/pages/{detail.md → document-detail.md} +4 -27
- package/skills/app-shell-patterns/references/patterns/form-composer.md +43 -45
- package/skills/app-shell-patterns/references/patterns/form-modal.md +39 -100
- package/skills/app-shell-patterns/references/patterns/form-sectioned.md +12 -38
- package/skills/app-shell-patterns/references/patterns/form-single-page.md +11 -32
- package/skills/app-shell-patterns/references/patterns/form-wizard.md +12 -53
- package/skills/app-shell-patterns/references/patterns/interaction-confirm.md +11 -27
- package/skills/app-shell-patterns/references/patterns/interaction-multi-select.md +13 -27
- package/skills/app-shell-patterns/references/patterns/interaction-toast.md +10 -34
- package/skills/app-shell-patterns/references/patterns/list-dense-scan.md +11 -86
- package/skills/app-shell-patterns/references/fundamental/components.md +0 -1009
|
@@ -1,24 +1,133 @@
|
|
|
1
1
|
import { capitalCase as e } from "change-case";
|
|
2
2
|
import { Await as t, Link as n, NavLink as r, Navigate as i, Outlet as a, createBrowserRouter as o, createMemoryRouter as s, isRouteErrorResponse as c, matchRoutes as l, redirect as u, useLocation as d, useMatch as f, useNavigate as p, useRouteError as m, useRouteLoaderData as h } from "react-router";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
3
|
+
import * as g from "react";
|
|
4
|
+
import { Suspense as _, createContext as v, useCallback as y, useContext as b, useEffect as x, useId as S, useMemo as C, useReducer as w, useRef as T, useState as E, useSyncExternalStore as D } from "react";
|
|
5
|
+
import { cva as O } from "class-variance-authority";
|
|
6
|
+
import { useRender as k } from "@base-ui/react/use-render";
|
|
7
|
+
import { clsx as A } from "clsx";
|
|
8
|
+
import { twMerge as j } from "tailwind-merge";
|
|
9
|
+
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
10
|
+
import { AlertCircle as ee, ChevronRight as te, HouseIcon as ne, SearchIcon as re, Table as ie, XIcon as ae } from "lucide-react";
|
|
11
|
+
import { getLocalTimeZone as oe, now as se, today as ce } from "@internationalized/date";
|
|
12
|
+
import { RouterProvider as le } from "react-router/dom";
|
|
13
|
+
import { Toaster as ue } from "sonner";
|
|
14
|
+
import { Dialog as F } from "@base-ui/react/dialog";
|
|
15
|
+
import { parsePath as de } from "@tailor-platform/vite-plugin-app-shell/parser";
|
|
15
16
|
//#region src/lib/utils.ts
|
|
16
|
-
function
|
|
17
|
-
return
|
|
17
|
+
function I(...e) {
|
|
18
|
+
return j(A(e));
|
|
18
19
|
}
|
|
19
20
|
//#endregion
|
|
20
|
-
//#region src/components/
|
|
21
|
-
|
|
21
|
+
//#region src/components/internals/separator/separator.tsx
|
|
22
|
+
function fe({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
|
|
23
|
+
return /* @__PURE__ */ N("div", {
|
|
24
|
+
"data-slot": "separator-root",
|
|
25
|
+
role: n ? "none" : "separator",
|
|
26
|
+
"aria-orientation": n ? void 0 : t,
|
|
27
|
+
"data-orientation": t,
|
|
28
|
+
className: I("astw:bg-border astw:shrink-0", t === "horizontal" ? "astw:h-px astw:w-full" : "astw:h-full astw:w-px", e),
|
|
29
|
+
...r
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/toolbar/toolbar.tsx
|
|
34
|
+
var pe = g.createContext(null), me = typeof document > "u" ? g.useEffect : g.useLayoutEffect;
|
|
35
|
+
function L(...e) {
|
|
36
|
+
return (t) => {
|
|
37
|
+
for (let n of e) typeof n == "function" ? n(t) : n && (n.current = t);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function he(e, t = {}) {
|
|
41
|
+
let n = g.useContext(pe), { handlesDirectionalKeys: r = !1 } = t;
|
|
42
|
+
me(() => {
|
|
43
|
+
let t = e.current;
|
|
44
|
+
if (!(!n || !t)) return n.registerItem(t, { handlesDirectionalKeys: r }), () => n.unregisterItem(t);
|
|
45
|
+
}, [n, e]), me(() => {
|
|
46
|
+
let t = e.current;
|
|
47
|
+
n && t && n.updateItem(t, { handlesDirectionalKeys: r });
|
|
48
|
+
}, [
|
|
49
|
+
n,
|
|
50
|
+
e,
|
|
51
|
+
r
|
|
52
|
+
]);
|
|
53
|
+
}
|
|
54
|
+
function ge(e) {
|
|
55
|
+
return e.isConnected && e.tabIndex >= 0 && !e.matches(":disabled") && e.getAttribute("aria-disabled") !== "true";
|
|
56
|
+
}
|
|
57
|
+
function _e({ className: e, ...t }) {
|
|
58
|
+
return /* @__PURE__ */ N("div", {
|
|
59
|
+
"data-slot": "toolbar",
|
|
60
|
+
className: I("astw:flex astw:w-full astw:flex-col astw:gap-2 astw:rounded-md astw:border astw:border-border astw:bg-card astw:p-2", e),
|
|
61
|
+
...t
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
_e.displayName = "Toolbar.Root";
|
|
65
|
+
function ve({ className: e, justify: t = "start", onKeyDown: n, ref: r, ...i }) {
|
|
66
|
+
let a = g.useRef(null), o = g.useRef(/* @__PURE__ */ new Map()), s = g.useCallback((e, t) => {
|
|
67
|
+
o.current.set(e, t);
|
|
68
|
+
}, []), c = g.useCallback((e) => {
|
|
69
|
+
o.current.delete(e);
|
|
70
|
+
}, []), l = g.useCallback((e, t) => {
|
|
71
|
+
o.current.has(e) && o.current.set(e, t);
|
|
72
|
+
}, []), u = g.useMemo(() => ({
|
|
73
|
+
registerItem: s,
|
|
74
|
+
unregisterItem: c,
|
|
75
|
+
updateItem: l
|
|
76
|
+
}), [
|
|
77
|
+
s,
|
|
78
|
+
c,
|
|
79
|
+
l
|
|
80
|
+
]);
|
|
81
|
+
return /* @__PURE__ */ N(pe.Provider, {
|
|
82
|
+
value: u,
|
|
83
|
+
children: /* @__PURE__ */ N("div", {
|
|
84
|
+
ref: L(a, r),
|
|
85
|
+
"data-slot": "toolbar-row",
|
|
86
|
+
role: "toolbar",
|
|
87
|
+
tabIndex: -1,
|
|
88
|
+
"aria-orientation": "horizontal",
|
|
89
|
+
className: I("astw:flex astw:min-w-0 astw:flex-wrap astw:items-center astw:gap-2", t === "between" && "astw:justify-between", e),
|
|
90
|
+
onKeyDown: (e) => {
|
|
91
|
+
if (n?.(e), e.defaultPrevented || ![
|
|
92
|
+
"ArrowLeft",
|
|
93
|
+
"ArrowRight",
|
|
94
|
+
"Home",
|
|
95
|
+
"End"
|
|
96
|
+
].includes(e.key)) return;
|
|
97
|
+
let t = Array.from(o.current).filter(([e]) => a.current?.contains(e) && ge(e)).toSorted(([e], [t]) => e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1), r = t.findIndex(([e]) => e === document.activeElement);
|
|
98
|
+
if (r === -1 || t[r][1].handlesDirectionalKeys) return;
|
|
99
|
+
let i = r;
|
|
100
|
+
e.key === "Home" && (i = 0), e.key === "End" && (i = t.length - 1), e.key === "ArrowLeft" && (i = (r - 1 + t.length) % t.length), e.key === "ArrowRight" && (i = (r + 1) % t.length), e.preventDefault(), t[i]?.[0].focus();
|
|
101
|
+
},
|
|
102
|
+
...i
|
|
103
|
+
})
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
ve.displayName = "Toolbar.Row";
|
|
107
|
+
function ye({ className: e, ...t }) {
|
|
108
|
+
return /* @__PURE__ */ N("div", {
|
|
109
|
+
"data-slot": "toolbar-group",
|
|
110
|
+
className: I("astw:flex astw:min-w-0 astw:flex-wrap astw:items-center astw:gap-1.5", e),
|
|
111
|
+
...t
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
ye.displayName = "Toolbar.Group";
|
|
115
|
+
function be({ className: e, ...t }) {
|
|
116
|
+
return /* @__PURE__ */ N(fe, {
|
|
117
|
+
"data-slot": "toolbar-separator",
|
|
118
|
+
decorative: !1,
|
|
119
|
+
orientation: "vertical",
|
|
120
|
+
className: I("astw:h-6", e),
|
|
121
|
+
...t
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
be.displayName = "Toolbar.Separator";
|
|
125
|
+
var xe = {
|
|
126
|
+
Root: _e,
|
|
127
|
+
Row: ve,
|
|
128
|
+
Group: ye,
|
|
129
|
+
Separator: be
|
|
130
|
+
}, Se = O("astw:inline-flex astw:cursor-pointer astw:items-center astw:justify-center astw:gap-2 astw:whitespace-nowrap astw:rounded-md astw:text-sm astw:font-medium astw:transition-all astw:disabled:pointer-events-none astw:disabled:opacity-50 astw:[&_svg]:pointer-events-none astw:[&_svg:not([class*='size-'])]:size-4 astw:shrink-0 astw:[&_svg]:shrink-0 astw:outline-none astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px] astw:aria-invalid:ring-destructive/20 astw:dark:aria-invalid:ring-destructive/40 astw:aria-invalid:border-destructive", {
|
|
22
131
|
variants: {
|
|
23
132
|
variant: {
|
|
24
133
|
default: "astw:bg-primary astw:text-primary-foreground astw:shadow-xs astw:hover:bg-primary/90",
|
|
@@ -41,23 +150,25 @@ var le = g("astw:inline-flex astw:cursor-pointer astw:items-center astw:justify-
|
|
|
41
150
|
size: "default"
|
|
42
151
|
}
|
|
43
152
|
});
|
|
44
|
-
function
|
|
45
|
-
|
|
153
|
+
function R({ className: e, variant: t, size: n, render: r, children: i, ref: a, ...o }) {
|
|
154
|
+
let s = g.useRef(null);
|
|
155
|
+
return he(s), k({
|
|
46
156
|
defaultTagName: "button",
|
|
47
157
|
render: r,
|
|
158
|
+
ref: L(s, a),
|
|
48
159
|
props: {
|
|
49
160
|
"data-slot": "button",
|
|
50
|
-
className:
|
|
161
|
+
className: I(Se({
|
|
51
162
|
variant: t,
|
|
52
163
|
size: n,
|
|
53
164
|
className: e
|
|
54
165
|
})),
|
|
55
166
|
children: i,
|
|
56
|
-
...
|
|
167
|
+
...o
|
|
57
168
|
}
|
|
58
169
|
});
|
|
59
170
|
}
|
|
60
|
-
var
|
|
171
|
+
var Ce = () => {
|
|
61
172
|
try {
|
|
62
173
|
if (typeof navigator > "u") return "en";
|
|
63
174
|
let e = navigator.languages?.[0] ?? navigator.language;
|
|
@@ -65,61 +176,61 @@ var ue = () => {
|
|
|
65
176
|
} catch {
|
|
66
177
|
return "en";
|
|
67
178
|
}
|
|
68
|
-
},
|
|
179
|
+
}, we = () => {
|
|
69
180
|
try {
|
|
70
181
|
return typeof navigator > "u" ? "en" : navigator.languages?.[0] ?? navigator.language ?? "en";
|
|
71
182
|
} catch {
|
|
72
183
|
return "en";
|
|
73
184
|
}
|
|
74
|
-
},
|
|
185
|
+
}, Te = (e) => {
|
|
75
186
|
try {
|
|
76
187
|
return new Intl.Locale(e).language;
|
|
77
188
|
} catch {
|
|
78
189
|
return e;
|
|
79
190
|
}
|
|
80
|
-
},
|
|
81
|
-
let n =
|
|
191
|
+
}, z = (e) => (t, n) => t ? typeof t == "string" ? t : t(e) ?? n : n, Ee = (t) => {
|
|
192
|
+
let n = z(t);
|
|
82
193
|
return (t, r) => n(t, typeof t == "string" ? t : e(r));
|
|
83
|
-
},
|
|
194
|
+
}, De = (e) => ({
|
|
84
195
|
modules: e.modules,
|
|
85
196
|
settingsResources: e.settingsResources ?? [],
|
|
86
|
-
errorBoundary: e.errorBoundary ?? /* @__PURE__ */
|
|
197
|
+
errorBoundary: e.errorBoundary ?? /* @__PURE__ */ N(U, {}),
|
|
87
198
|
basePath: e.basePath,
|
|
88
|
-
locale: e.locale ?
|
|
89
|
-
resolvedLocale: e.locale ??
|
|
199
|
+
locale: e.locale ? Te(e.locale) : Ce(),
|
|
200
|
+
resolvedLocale: e.locale ?? we(),
|
|
90
201
|
timeZone: e.timeZone
|
|
91
|
-
}),
|
|
202
|
+
}), B = v({ configurations: {
|
|
92
203
|
modules: [],
|
|
93
204
|
settingsResources: [],
|
|
94
205
|
locale: "en",
|
|
95
206
|
errorBoundary: null
|
|
96
|
-
} }),
|
|
97
|
-
let e =
|
|
207
|
+
} }), Oe = v({ contextData: {} }), V = () => b(B), ke = () => b(Oe), Ae = () => {
|
|
208
|
+
let e = b(B), t = b(Oe);
|
|
98
209
|
return {
|
|
99
210
|
...e,
|
|
100
211
|
...t
|
|
101
212
|
};
|
|
102
|
-
},
|
|
103
|
-
let { configurations: e } =
|
|
213
|
+
}, je = () => {
|
|
214
|
+
let { configurations: e } = b(B);
|
|
104
215
|
return {
|
|
105
216
|
locale: e.resolvedLocale ?? e.locale,
|
|
106
217
|
language: e.locale
|
|
107
218
|
};
|
|
108
|
-
},
|
|
109
|
-
let { configurations: e } =
|
|
219
|
+
}, Me = () => {
|
|
220
|
+
let { configurations: e } = b(B), t = e.timeZone ?? oe();
|
|
110
221
|
return {
|
|
111
222
|
value: t,
|
|
112
|
-
today: () =>
|
|
113
|
-
now: () =>
|
|
223
|
+
today: () => ce(t),
|
|
224
|
+
now: () => se(t)
|
|
114
225
|
};
|
|
115
|
-
},
|
|
116
|
-
let { configurations: e } =
|
|
226
|
+
}, Ne = () => {
|
|
227
|
+
let { configurations: e } = V(), t = z(e.locale);
|
|
117
228
|
return (e, n) => t(e, n);
|
|
118
|
-
},
|
|
229
|
+
}, Pe = (e) => {
|
|
119
230
|
let t = (t) => (n) => e[t]?.[n] ?? e.en[n];
|
|
120
231
|
return {
|
|
121
232
|
useT: () => {
|
|
122
|
-
let { configurations: n } =
|
|
233
|
+
let { configurations: n } = V(), r = t(n.locale), i = ((e, ...t) => {
|
|
123
234
|
let n = r(e);
|
|
124
235
|
return typeof n == "function" ? n(t[0]) : n;
|
|
125
236
|
});
|
|
@@ -133,7 +244,7 @@ var ue = () => {
|
|
|
133
244
|
return typeof i == "function" ? i(n[0]) : i;
|
|
134
245
|
}
|
|
135
246
|
};
|
|
136
|
-
},
|
|
247
|
+
}, Fe = Pe({
|
|
137
248
|
en: {
|
|
138
249
|
home: "Home",
|
|
139
250
|
error404Title: "404 Not Found",
|
|
@@ -232,26 +343,26 @@ var ue = () => {
|
|
|
232
343
|
aiChatToolResult: "結果",
|
|
233
344
|
aiChatSourcesUsed: (e) => `${e.count} 件の出典を使用`
|
|
234
345
|
}
|
|
235
|
-
}),
|
|
236
|
-
let e = m(), t =
|
|
346
|
+
}), H = Fe.useT, U = () => {
|
|
347
|
+
let e = m(), t = H(), n = {
|
|
237
348
|
role: "alert",
|
|
238
349
|
"aria-label": "default-error-boundary"
|
|
239
350
|
};
|
|
240
|
-
if (c(e) && e.status === 404) return /* @__PURE__ */
|
|
351
|
+
if (c(e) && e.status === 404) return /* @__PURE__ */ N("div", {
|
|
241
352
|
...n,
|
|
242
353
|
className: "astw:p-6",
|
|
243
|
-
children: /* @__PURE__ */
|
|
354
|
+
children: /* @__PURE__ */ P("div", {
|
|
244
355
|
className: "astw:flex astw:items-start astw:gap-4",
|
|
245
|
-
children: [/* @__PURE__ */
|
|
246
|
-
/* @__PURE__ */
|
|
356
|
+
children: [/* @__PURE__ */ N(ee, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }), /* @__PURE__ */ P("div", { children: [
|
|
357
|
+
/* @__PURE__ */ N("h1", {
|
|
247
358
|
className: "astw:font-semibold astw:text-lg",
|
|
248
359
|
children: t("error404Title")
|
|
249
360
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ N("p", {
|
|
251
362
|
className: "astw:text-sm astw:text-muted-foreground astw:mt-1",
|
|
252
363
|
children: t("error404Body")
|
|
253
364
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ N(R, {
|
|
255
366
|
variant: "outline",
|
|
256
367
|
size: "sm",
|
|
257
368
|
className: "astw:mt-4",
|
|
@@ -262,21 +373,21 @@ var ue = () => {
|
|
|
262
373
|
})
|
|
263
374
|
});
|
|
264
375
|
let r = e instanceof Error ? e.message : t("errorUnexpected");
|
|
265
|
-
return /* @__PURE__ */
|
|
376
|
+
return /* @__PURE__ */ N("div", {
|
|
266
377
|
...n,
|
|
267
378
|
className: "astw:p-6",
|
|
268
|
-
children: /* @__PURE__ */
|
|
379
|
+
children: /* @__PURE__ */ P("div", {
|
|
269
380
|
className: "astw:flex astw:items-start astw:gap-4",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ N(ee, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }), /* @__PURE__ */ P("div", { children: [
|
|
382
|
+
/* @__PURE__ */ N("h1", {
|
|
272
383
|
className: "astw:font-semibold astw:text-lg",
|
|
273
384
|
children: t("errorTitle")
|
|
274
385
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ N("p", {
|
|
276
387
|
className: "astw:text-sm astw:text-muted-foreground astw:mt-1",
|
|
277
388
|
children: r
|
|
278
389
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ N(R, {
|
|
280
391
|
variant: "outline",
|
|
281
392
|
size: "sm",
|
|
282
393
|
className: "astw:mt-4",
|
|
@@ -286,37 +397,37 @@ var ue = () => {
|
|
|
286
397
|
] })]
|
|
287
398
|
})
|
|
288
399
|
});
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
},
|
|
400
|
+
}, Ie = {}, Le = (e) => {
|
|
401
|
+
Ie = e;
|
|
402
|
+
}, Re = () => ({ type: "pass" }), ze = () => ({ type: "hidden" }), Be = (e) => ({
|
|
292
403
|
type: "redirect",
|
|
293
404
|
to: e
|
|
294
|
-
}),
|
|
405
|
+
}), W = () => new Response("Not Found", { status: 404 }), G = async (e) => {
|
|
295
406
|
if (!e || e.length === 0) return { type: "pass" };
|
|
296
|
-
let t = { context:
|
|
407
|
+
let t = { context: Ie };
|
|
297
408
|
for (let n of e) {
|
|
298
409
|
let e = await n(t);
|
|
299
410
|
if (e.type !== "pass") return e;
|
|
300
411
|
}
|
|
301
412
|
return { type: "pass" };
|
|
302
|
-
},
|
|
303
|
-
let r = await
|
|
413
|
+
}, K = (e, t) => async (n) => {
|
|
414
|
+
let r = await G(e);
|
|
304
415
|
switch (r.type) {
|
|
305
|
-
case "hidden": throw
|
|
416
|
+
case "hidden": throw W();
|
|
306
417
|
case "redirect": return u(r.to);
|
|
307
418
|
case "pass": return t ? t(n) : null;
|
|
308
419
|
}
|
|
309
|
-
},
|
|
310
|
-
let { configurations: n } =
|
|
311
|
-
return t(
|
|
420
|
+
}, Ve = (t) => t === "" || t === "/" ? Fe.t("home") : e(t), He = (e, t) => () => {
|
|
421
|
+
let { configurations: n } = V(), { metaTitle: r, fallbackTitle: i } = e;
|
|
422
|
+
return t(z(n.locale)(r, typeof i == "function" ? i(n.locale) : i));
|
|
312
423
|
};
|
|
313
|
-
function
|
|
314
|
-
let { path: t, meta: n, component: r, resources: i, errorBoundary: a, guards: o } = e, s = n?.title ??
|
|
424
|
+
function Ue(e) {
|
|
425
|
+
let { path: t, meta: n, component: r, resources: i, errorBoundary: a, guards: o } = e, s = n?.title ?? Ve(t), c = Ve(t), l = o && o.length > 0 ? K(o) : void 0;
|
|
315
426
|
return {
|
|
316
427
|
path: t,
|
|
317
428
|
type: "component",
|
|
318
429
|
_type: "module",
|
|
319
|
-
component: r ?
|
|
430
|
+
component: r ? He({
|
|
320
431
|
metaTitle: s,
|
|
321
432
|
fallbackTitle: c
|
|
322
433
|
}, (e) => r({
|
|
@@ -332,12 +443,12 @@ function Ae(e) {
|
|
|
332
443
|
icon: e.meta?.icon
|
|
333
444
|
},
|
|
334
445
|
resources: i,
|
|
335
|
-
errorBoundary: a || /* @__PURE__ */
|
|
446
|
+
errorBoundary: a || /* @__PURE__ */ N(U, {}),
|
|
336
447
|
guards: o
|
|
337
448
|
};
|
|
338
449
|
}
|
|
339
|
-
function
|
|
340
|
-
let { path: n, component: r, subResources: i, meta: a, errorBoundary: o, guards: s } = t, c = a?.title ?? e(n), l = e(n), u = s && s.length > 0 ?
|
|
450
|
+
function We(t) {
|
|
451
|
+
let { path: n, component: r, subResources: i, meta: a, errorBoundary: o, guards: s } = t, c = a?.title ?? e(n), l = e(n), u = s && s.length > 0 ? K(s) : void 0, d = r ? He({
|
|
341
452
|
metaTitle: c,
|
|
342
453
|
fallbackTitle: l
|
|
343
454
|
}, (e) => r({
|
|
@@ -355,14 +466,14 @@ function je(t) {
|
|
|
355
466
|
},
|
|
356
467
|
component: d,
|
|
357
468
|
subResources: i,
|
|
358
|
-
errorBoundary: o ?? /* @__PURE__ */
|
|
469
|
+
errorBoundary: o ?? /* @__PURE__ */ N(U, {}),
|
|
359
470
|
guards: s,
|
|
360
471
|
loader: u
|
|
361
472
|
};
|
|
362
473
|
}
|
|
363
|
-
var
|
|
474
|
+
var Ge = {
|
|
364
475
|
name: "@tailor-platform/app-shell",
|
|
365
|
-
version: "1.
|
|
476
|
+
version: "1.16.0",
|
|
366
477
|
description: "An opinionated React application framework for building ERP applications on Tailor Platform",
|
|
367
478
|
keywords: [
|
|
368
479
|
"app-shell",
|
|
@@ -412,9 +523,9 @@ var Me = {
|
|
|
412
523
|
},
|
|
413
524
|
dependencies: {
|
|
414
525
|
"@base-ui/react": "1.8.0",
|
|
415
|
-
"@internationalized/date": "3.12.
|
|
526
|
+
"@internationalized/date": "3.12.4",
|
|
416
527
|
"@standard-schema/spec": "^1.1.0",
|
|
417
|
-
"@tailor-platform/auth-public-client": "^0.
|
|
528
|
+
"@tailor-platform/auth-public-client": "^0.7.0",
|
|
418
529
|
"@tailor-platform/vite-plugin-app-shell": "workspace:*",
|
|
419
530
|
"change-case": "^5.4.4",
|
|
420
531
|
"class-variance-authority": "^0.7.1",
|
|
@@ -424,7 +535,7 @@ var Me = {
|
|
|
424
535
|
openai: "6.45.0",
|
|
425
536
|
papaparse: "^5.5.3",
|
|
426
537
|
"react-router": "^8.3.0",
|
|
427
|
-
sonner: "^2.0.
|
|
538
|
+
sonner: "^2.0.8",
|
|
428
539
|
"tailwind-merge": "^3.6.0"
|
|
429
540
|
},
|
|
430
541
|
devDependencies: {
|
|
@@ -439,8 +550,8 @@ var Me = {
|
|
|
439
550
|
"@types/react": "catalog:",
|
|
440
551
|
"@types/react-dom": "catalog:",
|
|
441
552
|
"@vitejs/plugin-react": "catalog:",
|
|
442
|
-
"@vitest/coverage-v8": "4.1.
|
|
443
|
-
"happy-dom": "20.
|
|
553
|
+
"@vitest/coverage-v8": "4.1.11",
|
|
554
|
+
"happy-dom": "20.14.5",
|
|
444
555
|
postcss: "8.5.28",
|
|
445
556
|
react: "catalog:",
|
|
446
557
|
"react-dom": "catalog:",
|
|
@@ -459,26 +570,26 @@ var Me = {
|
|
|
459
570
|
};
|
|
460
571
|
//#endregion
|
|
461
572
|
//#region src/components/card/card.tsx
|
|
462
|
-
function
|
|
463
|
-
return /* @__PURE__ */
|
|
573
|
+
function Ke({ className: e, ...t }) {
|
|
574
|
+
return /* @__PURE__ */ N("div", {
|
|
464
575
|
"data-slot": "card",
|
|
465
|
-
className:
|
|
576
|
+
className: I("astw:bg-card astw:text-card-foreground astw:flex astw:flex-col astw:rounded-xl astw:border astw:border-border astw:shadow-xs", e),
|
|
466
577
|
...t
|
|
467
578
|
});
|
|
468
579
|
}
|
|
469
|
-
|
|
470
|
-
function
|
|
471
|
-
return /* @__PURE__ */
|
|
580
|
+
Ke.displayName = "Card.Root";
|
|
581
|
+
function qe({ className: e, title: t, description: n, children: r, ...i }) {
|
|
582
|
+
return /* @__PURE__ */ P("div", {
|
|
472
583
|
"data-slot": "card-header",
|
|
473
|
-
className:
|
|
584
|
+
className: I("astw:@container/card-header astw:grid astw:auto-rows-min astw:grid-rows-[auto_auto] astw:items-start astw:gap-2 astw:px-6 astw:pt-6 astw:pb-4 astw:[.border-b]:pb-6", e),
|
|
474
585
|
...i,
|
|
475
586
|
children: [
|
|
476
|
-
t && /* @__PURE__ */
|
|
587
|
+
t && /* @__PURE__ */ N("h3", {
|
|
477
588
|
"data-slot": "card-title",
|
|
478
589
|
className: "astw:text-lg astw:font-semibold astw:leading-none astw:text-card-foreground",
|
|
479
590
|
children: t
|
|
480
591
|
}),
|
|
481
|
-
n && /* @__PURE__ */
|
|
592
|
+
n && /* @__PURE__ */ N("div", {
|
|
482
593
|
"data-slot": "card-description",
|
|
483
594
|
className: "astw:text-muted-foreground astw:text-sm",
|
|
484
595
|
children: n
|
|
@@ -487,33 +598,33 @@ function Pe({ className: e, title: t, description: n, children: r, ...i }) {
|
|
|
487
598
|
]
|
|
488
599
|
});
|
|
489
600
|
}
|
|
490
|
-
|
|
491
|
-
function
|
|
492
|
-
return /* @__PURE__ */
|
|
601
|
+
qe.displayName = "Card.Header";
|
|
602
|
+
function Je({ className: e, ...t }) {
|
|
603
|
+
return /* @__PURE__ */ N("div", {
|
|
493
604
|
"data-slot": "card-content",
|
|
494
|
-
className:
|
|
605
|
+
className: I("astw:px-6 astw:pb-6 astw:first:pt-6", e),
|
|
495
606
|
...t
|
|
496
607
|
});
|
|
497
608
|
}
|
|
498
|
-
|
|
499
|
-
var
|
|
500
|
-
Root:
|
|
501
|
-
Header:
|
|
502
|
-
Content:
|
|
503
|
-
},
|
|
504
|
-
let [t, n] =
|
|
609
|
+
Je.displayName = "Card.Content";
|
|
610
|
+
var Ye = {
|
|
611
|
+
Root: Ke,
|
|
612
|
+
Header: qe,
|
|
613
|
+
Content: Je
|
|
614
|
+
}, Xe = v(null), Ze = ({ children: e }) => {
|
|
615
|
+
let [t, n] = E(() => /* @__PURE__ */ new Map()), r = y((e, t) => {
|
|
505
616
|
n((n) => {
|
|
506
617
|
let r = new Map(n);
|
|
507
618
|
return r.set(e, t), r;
|
|
508
619
|
});
|
|
509
|
-
}, []), i =
|
|
620
|
+
}, []), i = y((e) => {
|
|
510
621
|
n((t) => {
|
|
511
622
|
if (!t.has(e)) return t;
|
|
512
623
|
let n = new Map(t);
|
|
513
624
|
return n.delete(e), n;
|
|
514
625
|
});
|
|
515
626
|
}, []);
|
|
516
|
-
return /* @__PURE__ */
|
|
627
|
+
return /* @__PURE__ */ N(Xe.Provider, {
|
|
517
628
|
value: {
|
|
518
629
|
overrides: t,
|
|
519
630
|
register: r,
|
|
@@ -521,16 +632,16 @@ var Ie = {
|
|
|
521
632
|
},
|
|
522
633
|
children: e
|
|
523
634
|
});
|
|
524
|
-
},
|
|
525
|
-
let e =
|
|
635
|
+
}, Qe = () => {
|
|
636
|
+
let e = b(Xe);
|
|
526
637
|
if (!e) throw Error("useBreadcrumbOverride must be used within BreadcrumbOverrideProvider");
|
|
527
638
|
return e;
|
|
528
|
-
},
|
|
639
|
+
}, $e = () => b(Xe);
|
|
529
640
|
//#endregion
|
|
530
641
|
//#region src/hooks/use-override-breadcrumb.ts
|
|
531
|
-
function
|
|
532
|
-
let t = d(), { register: n, unregister: r } =
|
|
533
|
-
|
|
642
|
+
function et(e) {
|
|
643
|
+
let t = d(), { register: n, unregister: r } = Qe(), i = t.pathname;
|
|
644
|
+
x(() => (e ? n(i, e) : r(i), () => r(i)), [
|
|
534
645
|
i,
|
|
535
646
|
e,
|
|
536
647
|
n,
|
|
@@ -539,25 +650,25 @@ function Ve(e) {
|
|
|
539
650
|
}
|
|
540
651
|
//#endregion
|
|
541
652
|
//#region src/components/internals/app-info/app-info.tsx
|
|
542
|
-
var
|
|
653
|
+
var tt = "__appinfo", nt = `/${tt}`, rt = Ge.version, it = (e) => e == null ? "-" : String(e), at = (e) => e.map((e) => `${e.label}: ${it(e.value)}`).join("\n"), ot = ({ label: e, value: t }) => /* @__PURE__ */ P("div", {
|
|
543
654
|
className: "astw:grid astw:gap-1 astw:py-3 astw:sm:grid-cols-[12rem_minmax(0,1fr)] astw:sm:gap-4",
|
|
544
|
-
children: [/* @__PURE__ */
|
|
655
|
+
children: [/* @__PURE__ */ N("dt", {
|
|
545
656
|
className: "astw:text-sm astw:text-muted-foreground",
|
|
546
657
|
children: e
|
|
547
|
-
}), /* @__PURE__ */
|
|
658
|
+
}), /* @__PURE__ */ N("dd", {
|
|
548
659
|
className: "astw:min-w-0 astw:text-sm astw:break-all",
|
|
549
|
-
children:
|
|
660
|
+
children: it(t)
|
|
550
661
|
})]
|
|
551
|
-
}),
|
|
552
|
-
let e =
|
|
662
|
+
}), st = () => {
|
|
663
|
+
let e = H();
|
|
553
664
|
return {
|
|
554
|
-
path:
|
|
665
|
+
path: nt,
|
|
555
666
|
title: e("appInfoTitle"),
|
|
556
667
|
breadcrumb: [e("appInfoTitle")]
|
|
557
668
|
};
|
|
558
|
-
},
|
|
559
|
-
let e =
|
|
560
|
-
|
|
669
|
+
}, ct = () => {
|
|
670
|
+
let e = H(), { title: t, appInfo: n } = V();
|
|
671
|
+
et(e("appInfoTitle"));
|
|
561
672
|
let r = [
|
|
562
673
|
...t ? [{
|
|
563
674
|
label: e("appInfoAppName"),
|
|
@@ -565,37 +676,37 @@ var He = "__appinfo", Ue = `/${He}`, We = Me.version, Ge = (e) => e == null ? "-
|
|
|
565
676
|
}] : [],
|
|
566
677
|
{
|
|
567
678
|
label: e("appInfoAppShellVersion"),
|
|
568
|
-
value:
|
|
679
|
+
value: rt
|
|
569
680
|
},
|
|
570
681
|
...n?.metadata ?? []
|
|
571
682
|
];
|
|
572
|
-
return /* @__PURE__ */
|
|
683
|
+
return /* @__PURE__ */ N("div", {
|
|
573
684
|
className: "astw:w-full astw:max-w-xl",
|
|
574
|
-
children: /* @__PURE__ */
|
|
685
|
+
children: /* @__PURE__ */ P(Ye.Root, { children: [/* @__PURE__ */ P("div", {
|
|
575
686
|
className: "astw:flex astw:items-center astw:justify-between astw:px-6 astw:pt-6 astw:pb-4",
|
|
576
|
-
children: [/* @__PURE__ */
|
|
687
|
+
children: [/* @__PURE__ */ N("h1", {
|
|
577
688
|
className: "astw:text-lg astw:font-semibold astw:leading-none",
|
|
578
689
|
children: e("appInfoTitle")
|
|
579
|
-
}), /* @__PURE__ */
|
|
690
|
+
}), /* @__PURE__ */ N(R, {
|
|
580
691
|
variant: "outline",
|
|
581
692
|
size: "sm",
|
|
582
693
|
onClick: async () => {
|
|
583
694
|
try {
|
|
584
|
-
await navigator.clipboard.writeText(
|
|
695
|
+
await navigator.clipboard.writeText(at(r));
|
|
585
696
|
} catch {}
|
|
586
697
|
},
|
|
587
698
|
children: e("appInfoCopy")
|
|
588
699
|
})]
|
|
589
|
-
}), /* @__PURE__ */
|
|
700
|
+
}), /* @__PURE__ */ N(Ye.Content, { children: /* @__PURE__ */ N("dl", { children: r.map((e, t) => /* @__PURE__ */ N("div", {
|
|
590
701
|
className: t > 0 ? "astw:border-t astw:border-border" : void 0,
|
|
591
|
-
children: /* @__PURE__ */
|
|
702
|
+
children: /* @__PURE__ */ N(ot, { ...e })
|
|
592
703
|
}, `${e.label}-${t}`)) }) })] })
|
|
593
704
|
});
|
|
594
|
-
},
|
|
705
|
+
}, lt = [
|
|
595
706
|
"light",
|
|
596
707
|
"dark",
|
|
597
708
|
"system"
|
|
598
|
-
],
|
|
709
|
+
], ut = [
|
|
599
710
|
{
|
|
600
711
|
value: "light",
|
|
601
712
|
label: "Light"
|
|
@@ -608,8 +719,8 @@ var He = "__appinfo", Ue = `/${He}`, We = Me.version, Ge = (e) => e == null ? "-
|
|
|
608
719
|
value: "system",
|
|
609
720
|
label: "System"
|
|
610
721
|
}
|
|
611
|
-
],
|
|
612
|
-
function
|
|
722
|
+
], dt = "appshell-ui-theme";
|
|
723
|
+
function ft(e, t, n) {
|
|
613
724
|
if (typeof window > "u") return n;
|
|
614
725
|
try {
|
|
615
726
|
let r = localStorage.getItem(e);
|
|
@@ -618,22 +729,22 @@ function $e(e, t, n) {
|
|
|
618
729
|
return n;
|
|
619
730
|
}
|
|
620
731
|
}
|
|
621
|
-
function
|
|
732
|
+
function pt(e, t) {
|
|
622
733
|
return e === "system" ? t ? "dark" : "light" : e;
|
|
623
734
|
}
|
|
624
|
-
function
|
|
735
|
+
function mt() {
|
|
625
736
|
return typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
626
737
|
}
|
|
627
|
-
var
|
|
628
|
-
function
|
|
629
|
-
let [n, r] =
|
|
738
|
+
var ht = v(void 0);
|
|
739
|
+
function gt({ children: e, defaultColorTheme: t = "system" }) {
|
|
740
|
+
let [n, r] = E(() => ft(dt, lt, t)), [i, a] = E(() => pt(ft(dt, lt, t), mt())), o = y((e) => {
|
|
630
741
|
let t = window.document.documentElement;
|
|
631
742
|
t.classList.remove("light", "dark"), t.classList.add(e);
|
|
632
743
|
}, []);
|
|
633
|
-
|
|
744
|
+
x(() => {
|
|
634
745
|
o(i);
|
|
635
746
|
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e) => {
|
|
636
|
-
let t =
|
|
747
|
+
let t = pt(n, e.matches);
|
|
637
748
|
a(t);
|
|
638
749
|
};
|
|
639
750
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
@@ -642,14 +753,14 @@ function rt({ children: e, defaultColorTheme: t = "system" }) {
|
|
|
642
753
|
i,
|
|
643
754
|
o
|
|
644
755
|
]);
|
|
645
|
-
let s =
|
|
756
|
+
let s = y((e) => {
|
|
646
757
|
try {
|
|
647
|
-
localStorage.setItem(
|
|
758
|
+
localStorage.setItem(dt, e);
|
|
648
759
|
} catch {}
|
|
649
760
|
r(e);
|
|
650
|
-
let t =
|
|
761
|
+
let t = pt(e, mt());
|
|
651
762
|
a(t), o(t);
|
|
652
|
-
}, [o]), c =
|
|
763
|
+
}, [o]), c = C(() => ({
|
|
653
764
|
colorTheme: n,
|
|
654
765
|
resolvedColorTheme: i,
|
|
655
766
|
setColorTheme: s
|
|
@@ -658,16 +769,16 @@ function rt({ children: e, defaultColorTheme: t = "system" }) {
|
|
|
658
769
|
i,
|
|
659
770
|
s
|
|
660
771
|
]);
|
|
661
|
-
return /* @__PURE__ */
|
|
772
|
+
return /* @__PURE__ */ N(ht.Provider, {
|
|
662
773
|
value: c,
|
|
663
774
|
children: e
|
|
664
775
|
});
|
|
665
776
|
}
|
|
666
|
-
var
|
|
667
|
-
let e =
|
|
777
|
+
var _t = () => {
|
|
778
|
+
let e = b(ht);
|
|
668
779
|
if (e === void 0) throw Error("useTheme must be used within a ThemeProvider");
|
|
669
780
|
let { colorTheme: t, resolvedColorTheme: n, setColorTheme: r } = e;
|
|
670
|
-
return
|
|
781
|
+
return C(() => ({
|
|
671
782
|
theme: t,
|
|
672
783
|
resolvedTheme: n,
|
|
673
784
|
setTheme: r
|
|
@@ -676,9 +787,9 @@ var it = () => {
|
|
|
676
787
|
n,
|
|
677
788
|
r
|
|
678
789
|
]);
|
|
679
|
-
},
|
|
680
|
-
let { resolvedTheme: t } =
|
|
681
|
-
return /* @__PURE__ */
|
|
790
|
+
}, vt = ({ ...e }) => {
|
|
791
|
+
let { resolvedTheme: t } = _t();
|
|
792
|
+
return /* @__PURE__ */ N(ue, {
|
|
682
793
|
theme: t,
|
|
683
794
|
className: "astw:toaster astw:group",
|
|
684
795
|
style: {
|
|
@@ -688,41 +799,41 @@ var it = () => {
|
|
|
688
799
|
},
|
|
689
800
|
...e
|
|
690
801
|
});
|
|
691
|
-
},
|
|
692
|
-
let e =
|
|
693
|
-
return /* @__PURE__ */
|
|
802
|
+
}, yt = () => {
|
|
803
|
+
let e = H();
|
|
804
|
+
return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("p", {
|
|
694
805
|
className: "astw:font-semibold astw:leading-none astw:tracking-tight",
|
|
695
806
|
children: e("welcomeTitle")
|
|
696
|
-
}), /* @__PURE__ */
|
|
807
|
+
}), /* @__PURE__ */ N("p", {
|
|
697
808
|
className: "pt-4",
|
|
698
809
|
children: e("welcomeBody")
|
|
699
810
|
})] });
|
|
700
|
-
},
|
|
701
|
-
let { configurations: e } =
|
|
702
|
-
return /* @__PURE__ */
|
|
811
|
+
}, bt = () => /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(a, {}), /* @__PURE__ */ N(vt, {})] }), xt = () => {
|
|
812
|
+
let { configurations: e } = Ae(), t = H(), n = Ne();
|
|
813
|
+
return /* @__PURE__ */ P("div", {
|
|
703
814
|
className: "astw:mx-auto astw:flex-col astw:flex astw:md:flex-row astw:max-w-5xl astw:gap-[10px] astw:w-full",
|
|
704
|
-
children: [/* @__PURE__ */
|
|
815
|
+
children: [/* @__PURE__ */ N("div", { children: /* @__PURE__ */ P("nav", {
|
|
705
816
|
className: "astw:bg-card astw:md:w-xs astw:rounded-md astw:border astw:border-border astw:p-3 astw:shadow-xs",
|
|
706
|
-
children: [/* @__PURE__ */
|
|
817
|
+
children: [/* @__PURE__ */ N("h2", {
|
|
707
818
|
className: "astw:text-sm astw:leading-[36px] astw:mb-2 astw:font-bold ",
|
|
708
819
|
children: t("settings")
|
|
709
|
-
}), /* @__PURE__ */
|
|
820
|
+
}), /* @__PURE__ */ N("ul", {
|
|
710
821
|
className: "astw:flex astw:flex-col astw:gap-1",
|
|
711
|
-
children: e.settingsResources.map((e) => /* @__PURE__ */
|
|
822
|
+
children: e.settingsResources.map((e) => /* @__PURE__ */ N("li", { children: /* @__PURE__ */ N(r, {
|
|
712
823
|
to: `./${e.path}`,
|
|
713
|
-
children: ({ isActive: t }) => /* @__PURE__ */
|
|
824
|
+
children: ({ isActive: t }) => /* @__PURE__ */ P(R, {
|
|
714
825
|
variant: t ? "secondary" : "ghost",
|
|
715
826
|
className: "astw:w-full astw:justify-start",
|
|
716
827
|
children: [e.meta.icon, n(e.meta.title, e.path)]
|
|
717
828
|
})
|
|
718
829
|
}) }, e.path))
|
|
719
830
|
})]
|
|
720
|
-
}) }), /* @__PURE__ */
|
|
831
|
+
}) }), /* @__PURE__ */ N("section", {
|
|
721
832
|
className: "astw:bg-card astw:flex-1 astw:rounded-md astw:border astw:border-border astw:shadow-xs",
|
|
722
|
-
children: /* @__PURE__ */
|
|
833
|
+
children: /* @__PURE__ */ N(a, {})
|
|
723
834
|
})]
|
|
724
835
|
});
|
|
725
|
-
},
|
|
836
|
+
}, St = (e) => () => /* @__PURE__ */ N(M, { children: e }), Ct = (e) => e.component ? {
|
|
726
837
|
index: !0,
|
|
727
838
|
Component: e.component,
|
|
728
839
|
...e.loader && { loader: e.loader }
|
|
@@ -732,71 +843,71 @@ var it = () => {
|
|
|
732
843
|
loader: async (t) => {
|
|
733
844
|
let n = await e.loader(t);
|
|
734
845
|
if (n instanceof Response) return n;
|
|
735
|
-
throw
|
|
846
|
+
throw W();
|
|
736
847
|
}
|
|
737
848
|
} : {
|
|
738
849
|
index: !0,
|
|
739
850
|
Component: () => null,
|
|
740
851
|
loader: () => {
|
|
741
|
-
throw
|
|
852
|
+
throw W();
|
|
742
853
|
}
|
|
743
|
-
},
|
|
744
|
-
let r = e.errorBoundary || n, i = (t ?? []).map((e) =>
|
|
854
|
+
}, wt = (e, t, n) => {
|
|
855
|
+
let r = e.errorBoundary || n, i = (t ?? []).map((e) => wt(e, e.subResources, r)), a = [Ct(e), ...i];
|
|
745
856
|
return {
|
|
746
857
|
path: e.path,
|
|
747
858
|
handle: { node: e },
|
|
748
|
-
...e.errorBoundary && { ErrorBoundary:
|
|
859
|
+
...e.errorBoundary && { ErrorBoundary: St(e.errorBoundary) },
|
|
749
860
|
...a.length > 0 ? { children: a } : {}
|
|
750
861
|
};
|
|
751
|
-
},
|
|
752
|
-
let n = e.some((e) => e.path === "") ? null :
|
|
862
|
+
}, Tt = (e) => e.map((e) => wt(e, e.resources, e.errorBoundary)), Et = ({ modules: e, settingsResources: t }) => {
|
|
863
|
+
let n = e.some((e) => e.path === "") ? null : Ct({
|
|
753
864
|
path: "",
|
|
754
|
-
component:
|
|
865
|
+
component: yt
|
|
755
866
|
}), r = t.length > 0 ? [{
|
|
756
867
|
path: "settings",
|
|
757
868
|
index: !0,
|
|
758
|
-
Component: () => /* @__PURE__ */
|
|
869
|
+
Component: () => /* @__PURE__ */ N(i, {
|
|
759
870
|
to: t[0].path,
|
|
760
871
|
relative: "path",
|
|
761
872
|
replace: !0
|
|
762
873
|
})
|
|
763
874
|
}, {
|
|
764
875
|
path: "settings",
|
|
765
|
-
Component:
|
|
876
|
+
Component: xt,
|
|
766
877
|
children: t.map((e) => {
|
|
767
878
|
if (!e.component) throw Error(`Settings resource "${e.path}" must have a component.`);
|
|
768
879
|
return {
|
|
769
880
|
path: e.path,
|
|
770
881
|
Component: e.component,
|
|
771
|
-
...e.errorBoundary && { ErrorBoundary:
|
|
882
|
+
...e.errorBoundary && { ErrorBoundary: St(e.errorBoundary) }
|
|
772
883
|
};
|
|
773
884
|
})
|
|
774
885
|
}] : [];
|
|
775
886
|
return [
|
|
776
887
|
...n ? [n] : [],
|
|
777
|
-
{ children:
|
|
888
|
+
{ children: Tt(e) },
|
|
778
889
|
{
|
|
779
|
-
path:
|
|
780
|
-
Component:
|
|
890
|
+
path: tt,
|
|
891
|
+
Component: ct
|
|
781
892
|
},
|
|
782
893
|
...r,
|
|
783
894
|
{
|
|
784
895
|
path: "*",
|
|
785
896
|
loader: () => {
|
|
786
|
-
throw
|
|
897
|
+
throw W();
|
|
787
898
|
},
|
|
788
899
|
Component: () => null,
|
|
789
|
-
ErrorBoundary:
|
|
900
|
+
ErrorBoundary: U
|
|
790
901
|
}
|
|
791
902
|
];
|
|
792
|
-
},
|
|
793
|
-
function
|
|
903
|
+
}, q = (e) => e.startsWith(":") ? e.slice(1) : null, Dt = (e) => e.split("/").some((e) => q(e) !== null);
|
|
904
|
+
function Ot(e, t) {
|
|
794
905
|
if (!t.trim()) return e;
|
|
795
906
|
let n = t.toLowerCase();
|
|
796
907
|
return e.filter((e) => e.title.toLowerCase().includes(n) || e.path.toLowerCase().includes(n));
|
|
797
908
|
}
|
|
798
|
-
var
|
|
799
|
-
let n =
|
|
909
|
+
var kt = (e, t) => typeof e.breadcrumbTitle == "function" ? e.breadcrumbTitle(t) : typeof e.breadcrumbTitle == "string" ? e.breadcrumbTitle : e.title, At = (e, t) => {
|
|
910
|
+
let n = Ee(t);
|
|
800
911
|
return e.reduce((e, t) => {
|
|
801
912
|
let r = n(t.meta.title, t.path);
|
|
802
913
|
e[t.path] = {
|
|
@@ -817,8 +928,8 @@ var gt = (e, t) => typeof e.breadcrumbTitle == "function" ? e.breadcrumbTitle(t)
|
|
|
817
928
|
return t.resources && t.resources.length > 0 && i(t.resources, t.path), e;
|
|
818
929
|
}, {});
|
|
819
930
|
};
|
|
820
|
-
function
|
|
821
|
-
let i = e.split("/").filter((e) => e !== ""), a = t && i[0] === t ? i.slice(1) : i, o =
|
|
931
|
+
function jt(e, t, n, r) {
|
|
932
|
+
let i = e.split("/").filter((e) => e !== ""), a = t && i[0] === t ? i.slice(1) : i, o = At(n, r);
|
|
822
933
|
if (a.length === 0) {
|
|
823
934
|
let e = o[""];
|
|
824
935
|
if (e) return {
|
|
@@ -826,7 +937,7 @@ function vt(e, t, n, r) {
|
|
|
826
937
|
segments: [{
|
|
827
938
|
segment: "",
|
|
828
939
|
path: "",
|
|
829
|
-
title:
|
|
940
|
+
title: kt(e, ""),
|
|
830
941
|
clickable: e.clickable
|
|
831
942
|
}]
|
|
832
943
|
};
|
|
@@ -835,13 +946,13 @@ function vt(e, t, n, r) {
|
|
|
835
946
|
let n = a.slice(0, t + 1).join("/"), r = o[n];
|
|
836
947
|
if (!r) {
|
|
837
948
|
let e = Object.entries(o).find(([e]) => {
|
|
838
|
-
let t = e.split("/").map((e) =>
|
|
949
|
+
let t = e.split("/").map((e) => q(e) === null ? e : "[^/]+").join("/");
|
|
839
950
|
return RegExp(`^${t}$`).test(n);
|
|
840
951
|
})?.[1];
|
|
841
952
|
e && (r = e);
|
|
842
953
|
}
|
|
843
954
|
let i;
|
|
844
|
-
return i = r ?
|
|
955
|
+
return i = r ? kt(r, e) : decodeURIComponent(e), {
|
|
845
956
|
segment: e,
|
|
846
957
|
path: n,
|
|
847
958
|
title: i,
|
|
@@ -855,14 +966,14 @@ function vt(e, t, n, r) {
|
|
|
855
966
|
}
|
|
856
967
|
//#endregion
|
|
857
968
|
//#region src/routing/navigation.tsx
|
|
858
|
-
var
|
|
859
|
-
loaderID:
|
|
860
|
-
loader: async () => ({ navItems:
|
|
861
|
-
}),
|
|
862
|
-
let t =
|
|
969
|
+
var Mt = "appshell-root-nav", Nt = (e) => ({
|
|
970
|
+
loaderID: Mt,
|
|
971
|
+
loader: async () => ({ navItems: Ft(e) })
|
|
972
|
+
}), Pt = () => h(Mt)?.navItems, Ft = async (e) => {
|
|
973
|
+
let t = Ee(e.locale);
|
|
863
974
|
return (await Promise.all(e.modules.map(async (e) => {
|
|
864
|
-
if (
|
|
865
|
-
let n = await
|
|
975
|
+
if (q(e.path) !== null || (await G(e.guards)).type !== "pass") return null;
|
|
976
|
+
let n = await It(e.resources, e.path, t);
|
|
866
977
|
return n.length === 0 && !e.meta.menuItemClickable ? null : {
|
|
867
978
|
module: e,
|
|
868
979
|
resources: n
|
|
@@ -870,73 +981,73 @@ var yt = "appshell-root-nav", bt = (e) => ({
|
|
|
870
981
|
}))).filter((e) => e !== null).map(({ module: e, resources: n }) => ({
|
|
871
982
|
title: t(e.meta.title, e.path),
|
|
872
983
|
url: e.meta.menuItemClickable ? e.path || "/" : void 0,
|
|
873
|
-
icon: e.meta.icon || /* @__PURE__ */
|
|
984
|
+
icon: e.meta.icon || /* @__PURE__ */ N(ie, {}),
|
|
874
985
|
items: n
|
|
875
986
|
}));
|
|
876
|
-
},
|
|
877
|
-
if (
|
|
878
|
-
let r = `${t}/${e.path}`, i = n(e.meta.title, e.path), a = e.component !== void 0, o = e.subResources ? await
|
|
987
|
+
}, It = async (e, t, n) => (await Promise.all(e.map(async (e) => {
|
|
988
|
+
if (q(e.path) !== null || (await G(e.guards)).type !== "pass") return null;
|
|
989
|
+
let r = `${t}/${e.path}`, i = n(e.meta.title, e.path), a = e.component !== void 0, o = e.subResources ? await It(e.subResources, r, n) : void 0, s = o && o.length > 0;
|
|
879
990
|
return !a && !s ? null : {
|
|
880
991
|
title: i,
|
|
881
992
|
url: a ? r : void 0,
|
|
882
993
|
items: s ? o : void 0
|
|
883
994
|
};
|
|
884
|
-
}))).filter((e) => e !== null),
|
|
885
|
-
let n =
|
|
995
|
+
}))).filter((e) => e !== null), J = (e) => e.split("/").filter((e) => e !== ""), Lt = (e, t) => {
|
|
996
|
+
let n = J(e), r = t && n[0] === t ? n.slice(1) : n;
|
|
886
997
|
return r.length > 0 ? `/${r.join("/")}` : "/";
|
|
887
|
-
},
|
|
888
|
-
let n =
|
|
998
|
+
}, Rt = (e) => e.join("/") || "/", zt = 8, Bt = (e, t) => J(e).map((e) => {
|
|
999
|
+
let n = q(e);
|
|
889
1000
|
if (n === null) return e;
|
|
890
1001
|
let r = t[n] ?? "";
|
|
891
|
-
return r.length >
|
|
892
|
-
}),
|
|
893
|
-
let i =
|
|
1002
|
+
return r.length > zt ? `${r.slice(0, zt)}...` : r;
|
|
1003
|
+
}), Vt = async ({ modules: e, locale: t, basePath: n, pathname: r }) => {
|
|
1004
|
+
let i = Ee(t), a = l(Et({
|
|
894
1005
|
modules: e,
|
|
895
1006
|
settingsResources: []
|
|
896
|
-
}),
|
|
1007
|
+
}), Lt(r, n));
|
|
897
1008
|
if (!a) return [];
|
|
898
1009
|
let o = /* @__PURE__ */ new Map(), s = a.map((e) => {
|
|
899
1010
|
let t = e.route.handle;
|
|
900
1011
|
return t?.node ? {
|
|
901
1012
|
node: t.node,
|
|
902
1013
|
params: e.params,
|
|
903
|
-
pathnameBase:
|
|
1014
|
+
pathnameBase: Rt(J(e.pathnameBase))
|
|
904
1015
|
} : null;
|
|
905
1016
|
}).filter((e) => e !== null);
|
|
906
1017
|
for (let [e, t] of s.entries()) {
|
|
907
|
-
if (!
|
|
908
|
-
let n = s.slice(0, e + 1).map(({ node: e }) => i(e.meta.title, e.path)), r = s.slice(0, e + 1).toReversed().find(({ node: e }) => "resources" in e), a = r && "resources" in r.node && r.node.meta.icon || /* @__PURE__ */
|
|
909
|
-
await
|
|
1018
|
+
if (!Dt(t.node.path)) continue;
|
|
1019
|
+
let n = s.slice(0, e + 1).map(({ node: e }) => i(e.meta.title, e.path)), r = s.slice(0, e + 1).toReversed().find(({ node: e }) => "resources" in e), a = r && "resources" in r.node && r.node.meta.icon || /* @__PURE__ */ N(ie, {});
|
|
1020
|
+
await Ht({
|
|
910
1021
|
node: t.node,
|
|
911
1022
|
params: t.params,
|
|
912
1023
|
icon: a,
|
|
913
|
-
baseSegments:
|
|
914
|
-
baseDisplaySegments: s.slice(0, e + 1).flatMap(({ node: e, params: t }) =>
|
|
1024
|
+
baseSegments: J(t.pathnameBase),
|
|
1025
|
+
baseDisplaySegments: s.slice(0, e + 1).flatMap(({ node: e, params: t }) => Bt(e.path, t)),
|
|
915
1026
|
breadcrumb: n,
|
|
916
1027
|
resolveTitle: i,
|
|
917
1028
|
routeMap: o
|
|
918
1029
|
});
|
|
919
1030
|
}
|
|
920
1031
|
return [...o.values()];
|
|
921
|
-
},
|
|
922
|
-
if ((await
|
|
1032
|
+
}, Ht = async ({ node: e, params: t, icon: n, baseSegments: r, baseDisplaySegments: i, breadcrumb: a, resolveTitle: o, routeMap: s }) => {
|
|
1033
|
+
if ((await G(e.guards)).type !== "pass") return;
|
|
923
1034
|
if ("resources" in e ? e.meta.menuItemClickable : e.component !== void 0) {
|
|
924
|
-
let t =
|
|
1035
|
+
let t = Rt(r);
|
|
925
1036
|
s.set(t, {
|
|
926
1037
|
path: t,
|
|
927
|
-
displayPath:
|
|
1038
|
+
displayPath: Rt(i),
|
|
928
1039
|
title: o(e.meta.title, e.path),
|
|
929
1040
|
icon: n,
|
|
930
1041
|
breadcrumb: a
|
|
931
1042
|
});
|
|
932
1043
|
}
|
|
933
1044
|
let c = "resources" in e ? e.resources : e.subResources;
|
|
934
|
-
if (!(!c || c.length === 0)) for (let e of c)
|
|
1045
|
+
if (!(!c || c.length === 0)) for (let e of c) Dt(e.path) || await Ht({
|
|
935
1046
|
node: e,
|
|
936
1047
|
params: t,
|
|
937
1048
|
icon: n,
|
|
938
|
-
baseSegments: [...r, ...
|
|
939
|
-
baseDisplaySegments: [...i, ...
|
|
1049
|
+
baseSegments: [...r, ...J(e.path)],
|
|
1050
|
+
baseDisplaySegments: [...i, ...Bt(e.path, t)],
|
|
940
1051
|
breadcrumb: [...a, o(e.meta.title, e.path)],
|
|
941
1052
|
resolveTitle: o,
|
|
942
1053
|
routeMap: s
|
|
@@ -944,32 +1055,32 @@ var yt = "appshell-root-nav", bt = (e) => ({
|
|
|
944
1055
|
};
|
|
945
1056
|
//#endregion
|
|
946
1057
|
//#region src/components/internals/breadcrumb/breadcrumb.tsx
|
|
947
|
-
function
|
|
948
|
-
return /* @__PURE__ */
|
|
1058
|
+
function Ut({ ...e }) {
|
|
1059
|
+
return /* @__PURE__ */ N("nav", {
|
|
949
1060
|
"aria-label": "breadcrumb",
|
|
950
1061
|
"data-slot": "breadcrumb",
|
|
951
1062
|
...e
|
|
952
1063
|
});
|
|
953
1064
|
}
|
|
954
|
-
function
|
|
955
|
-
return /* @__PURE__ */
|
|
1065
|
+
function Wt({ className: e, ...t }) {
|
|
1066
|
+
return /* @__PURE__ */ N("ol", {
|
|
956
1067
|
"data-slot": "breadcrumb-list",
|
|
957
|
-
className:
|
|
1068
|
+
className: I("astw:text-muted-foreground astw:flex astw:flex-wrap astw:items-center astw:gap-1.5 astw:text-sm astw:break-words astw:sm:gap-2.5", e),
|
|
958
1069
|
...t
|
|
959
1070
|
});
|
|
960
1071
|
}
|
|
961
|
-
function
|
|
962
|
-
return /* @__PURE__ */
|
|
1072
|
+
function Gt({ className: e, ...t }) {
|
|
1073
|
+
return /* @__PURE__ */ N("li", {
|
|
963
1074
|
"data-slot": "breadcrumb-item",
|
|
964
|
-
className:
|
|
1075
|
+
className: I("astw:inline-flex astw:items-center astw:gap-1.5", e),
|
|
965
1076
|
...t
|
|
966
1077
|
});
|
|
967
1078
|
}
|
|
968
|
-
function
|
|
969
|
-
let o =
|
|
970
|
-
return
|
|
1079
|
+
function Kt({ render: e, className: t, children: r, to: i, ...a }) {
|
|
1080
|
+
let o = I("astw:hover:text-foreground astw:transition-colors", t);
|
|
1081
|
+
return k({
|
|
971
1082
|
defaultTagName: "a",
|
|
972
|
-
render: e ?? /* @__PURE__ */
|
|
1083
|
+
render: e ?? /* @__PURE__ */ N(n, { to: i }),
|
|
973
1084
|
props: {
|
|
974
1085
|
"data-slot": "breadcrumb-link",
|
|
975
1086
|
className: o,
|
|
@@ -981,52 +1092,52 @@ function Nt({ render: e, className: t, children: r, to: i, ...a }) {
|
|
|
981
1092
|
}
|
|
982
1093
|
});
|
|
983
1094
|
}
|
|
984
|
-
function
|
|
985
|
-
return /* @__PURE__ */
|
|
1095
|
+
function qt({ className: e, ariaCurrent: t = "location", ...n }) {
|
|
1096
|
+
return /* @__PURE__ */ N("span", {
|
|
986
1097
|
"data-slot": "breadcrumb-page",
|
|
987
1098
|
"aria-disabled": "true",
|
|
988
1099
|
"aria-current": t,
|
|
989
|
-
className:
|
|
1100
|
+
className: I("astw:text-foreground astw:font-normal", e),
|
|
990
1101
|
...n
|
|
991
1102
|
});
|
|
992
1103
|
}
|
|
993
|
-
function
|
|
994
|
-
return /* @__PURE__ */
|
|
1104
|
+
function Jt({ children: e, className: t, ...n }) {
|
|
1105
|
+
return /* @__PURE__ */ N("li", {
|
|
995
1106
|
"data-slot": "breadcrumb-separator",
|
|
996
1107
|
role: "presentation",
|
|
997
1108
|
"aria-hidden": "true",
|
|
998
|
-
className:
|
|
1109
|
+
className: I("astw:[&>svg]:size-3.5", t),
|
|
999
1110
|
...n,
|
|
1000
|
-
children: e ?? /* @__PURE__ */
|
|
1111
|
+
children: e ?? /* @__PURE__ */ N(te, {})
|
|
1001
1112
|
});
|
|
1002
1113
|
}
|
|
1003
1114
|
//#endregion
|
|
1004
1115
|
//#region src/components/sidebar/dynamic-breadcrumb.tsx
|
|
1005
|
-
var
|
|
1006
|
-
let { configurations: e } =
|
|
1007
|
-
return
|
|
1008
|
-
},
|
|
1009
|
-
let { basePath: e, segments: t } =
|
|
1010
|
-
return r ? /* @__PURE__ */
|
|
1116
|
+
var Yt = () => {
|
|
1117
|
+
let { configurations: e } = V();
|
|
1118
|
+
return jt(d().pathname, e.basePath, e.modules, e.locale);
|
|
1119
|
+
}, Xt = () => {
|
|
1120
|
+
let { basePath: e, segments: t } = Yt(), { overrides: n } = Qe(), r = f("/:prefix/settings/:suffix"), i = H();
|
|
1121
|
+
return r ? /* @__PURE__ */ N(Ut, { children: /* @__PURE__ */ N(Wt, { children: /* @__PURE__ */ N("div", {
|
|
1011
1122
|
className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground",
|
|
1012
|
-
children: /* @__PURE__ */
|
|
1123
|
+
children: /* @__PURE__ */ N(Gt, { children: /* @__PURE__ */ N(Kt, {
|
|
1013
1124
|
to: `/${r.params.prefix}/settings`,
|
|
1014
1125
|
children: i("settings")
|
|
1015
1126
|
}) })
|
|
1016
|
-
}) }) }) : /* @__PURE__ */
|
|
1127
|
+
}) }) }) : /* @__PURE__ */ N(Ut, { children: /* @__PURE__ */ N(Wt, { children: t.map((r, i) => {
|
|
1017
1128
|
let a = e ? `/${e}/${r.path}` : `/${r.path}`, o = n.get(a) ?? r.title;
|
|
1018
|
-
return /* @__PURE__ */
|
|
1129
|
+
return /* @__PURE__ */ P("div", {
|
|
1019
1130
|
className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground",
|
|
1020
|
-
children: [/* @__PURE__ */
|
|
1131
|
+
children: [/* @__PURE__ */ N(Gt, { children: r.clickable ? /* @__PURE__ */ N(Kt, {
|
|
1021
1132
|
to: r.path,
|
|
1022
1133
|
children: o
|
|
1023
|
-
}) : /* @__PURE__ */
|
|
1134
|
+
}) : /* @__PURE__ */ N(qt, {
|
|
1024
1135
|
ariaCurrent: i === t.length - 1 && "location",
|
|
1025
1136
|
children: o
|
|
1026
|
-
}) }), i < t.length - 1 && /* @__PURE__ */
|
|
1137
|
+
}) }), i < t.length - 1 && /* @__PURE__ */ N(Jt, {})]
|
|
1027
1138
|
}, i);
|
|
1028
1139
|
}) }) });
|
|
1029
|
-
},
|
|
1140
|
+
}, Zt = [
|
|
1030
1141
|
{
|
|
1031
1142
|
rel: "icon",
|
|
1032
1143
|
type: "image/png",
|
|
@@ -1044,54 +1155,54 @@ var It = () => {
|
|
|
1044
1155
|
sizes: "180x180",
|
|
1045
1156
|
href: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAQAElEQVR4AexdCZwU5ZX/v+o5GA4RjDCY9V5Xo8YYE+MRj2jWxANEGAZhAI+ojBzDocCAV1pFGG4ZD06vACMyQBBBcN0oXllRQ9Zdc4hRMSjMjDKIcs3R9fZfKNkAMz1d09XV1T1f/9433VXf9b7/+9dXr95XVWPBfAwCaYSAIXQaGdMMBTCENixIKwQModPKnGYwhtCGA2mFgCF0Wpkz2mBaRp4hdMuwc4sZpSG0j6ZeskRDp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p4VU/H+obQcVqVM3RlnE00VZ2uhKwRy7rWqq27cXnZUWm3XN0UAG7yDaHdoNVAWYWVKIIpu6vmn0LOyF3LF3Za2xLDcMTAlRhCu4KrgcJ2vfeRBUEVZ/7pJPPZy8tyHwPEhv+flOzREDpOs4nKhjibOKC6CFZDrQs6ttk8jmT2/mA5oLf02zCEjtOmbVvlvskLtl1xNlMPkQ0KuU5qO/eki/HB3DS6RzlObFxVN4R2Bdehhb95iFTieHRL6F7o8MyI1W15WecFjCcH9p0Xh44+eHsMoT2xie38ywVGI2JuTAWynSG4BXWKM5Yu6vLo4sVHbom5tinYKAKG0I1CE3tGfcT6LUt/wNS0CL4WkVmwpPu2LX/91cqnOyc67Ne0TmlUwhC6OcY8qM6KZzp/WBeyB3B3tHuOazgr/8ZqlXPc0kWdhi5d2Om1desuqWcdIx4iYAjtEZgrFxz1DmD9VBUPQrFOgbcEeAXQBUxFlmWdvrSs0w3lj7WvBoTZMJ8EIGAI7SGoTnSieutfRmdLTc9QnXbNQqseVl3uzfueGFnY6W8wREaiP1aiO2hp7TtuhPMQqvPIU1nZ4dtN1MJfBhhC+4u36S3BCBhCJxhg07y/CHhNaH+1N70ZBA5CwBD6IEDMZmojYAid2vYz2h+EgCH0QYCYzdRG4P8AAAD//yMEVw4AAAAGSURBVAMA/Nw14Yt9Hn0AAAAASUVORK5CYII="
|
|
1046
1157
|
}
|
|
1047
|
-
],
|
|
1158
|
+
], Qt = " · ", $t = "data-app-shell-favicon", en = (e) => {
|
|
1048
1159
|
if (e.startsWith("data:")) return e.match(/^data:([^;,]+)/)?.[1];
|
|
1049
1160
|
if (e.endsWith(".svg")) return "image/svg+xml";
|
|
1050
1161
|
if (e.endsWith(".png")) return "image/png";
|
|
1051
1162
|
if (e.endsWith(".ico")) return "image/x-icon";
|
|
1052
|
-
},
|
|
1053
|
-
let { title: e, favicon: t } =
|
|
1163
|
+
}, tn = () => {
|
|
1164
|
+
let { title: e, favicon: t } = V(), { basePath: n, segments: r } = Yt(), i = $e()?.overrides, a = r.at(-1), o;
|
|
1054
1165
|
if (a) {
|
|
1055
1166
|
let e = n ? `/${n}/${a.path}` : `/${a.path}`;
|
|
1056
1167
|
o = i?.get(e) ?? a.title;
|
|
1057
1168
|
}
|
|
1058
|
-
let s = [o, e].filter(Boolean).join(
|
|
1169
|
+
let s = [o, e].filter(Boolean).join(Qt), c = typeof document < "u" && document.head.querySelector(`link[rel~="icon"]:not([${$t}])`), l;
|
|
1059
1170
|
return l = t ? [{
|
|
1060
1171
|
rel: "icon",
|
|
1061
1172
|
href: t,
|
|
1062
|
-
type:
|
|
1063
|
-
}] : c ? [] :
|
|
1173
|
+
type: en(t)
|
|
1174
|
+
}] : c ? [] : Zt, /* @__PURE__ */ P(M, { children: [s ? /* @__PURE__ */ N("title", { children: s }) : null, l.map(({ rel: e, href: t, type: n, sizes: r }) => /* @__PURE__ */ N("link", {
|
|
1064
1175
|
rel: e,
|
|
1065
1176
|
href: t,
|
|
1066
1177
|
"data-app-shell-favicon": "",
|
|
1067
1178
|
...n ? { type: n } : {},
|
|
1068
1179
|
...r ? { sizes: r } : {}
|
|
1069
1180
|
}, `${e}-${r ?? "any"}`))] });
|
|
1070
|
-
},
|
|
1071
|
-
let { configurations: t, contentRoutes: n, children: r } = e, { loaderID: i, loader: o } =
|
|
1181
|
+
}, nn = (e) => {
|
|
1182
|
+
let { configurations: t, contentRoutes: n, children: r } = e, { loaderID: i, loader: o } = Nt({
|
|
1072
1183
|
modules: t.modules,
|
|
1073
1184
|
locale: t.locale,
|
|
1074
1185
|
basePath: t.basePath
|
|
1075
1186
|
}), s = t.errorBoundary, c = s ? [{
|
|
1076
|
-
element: /* @__PURE__ */
|
|
1077
|
-
ErrorBoundary:
|
|
1187
|
+
element: /* @__PURE__ */ N(a, {}),
|
|
1188
|
+
ErrorBoundary: St(s),
|
|
1078
1189
|
children: n
|
|
1079
1190
|
}] : n;
|
|
1080
1191
|
return {
|
|
1081
1192
|
id: i,
|
|
1082
1193
|
loader: o,
|
|
1083
|
-
element: /* @__PURE__ */
|
|
1194
|
+
element: /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(tn, {}), r] }),
|
|
1084
1195
|
children: c,
|
|
1085
1196
|
HydrateFallback: () => null
|
|
1086
1197
|
};
|
|
1087
|
-
},
|
|
1198
|
+
}, rn = {
|
|
1088
1199
|
createBrowserRouter: o,
|
|
1089
1200
|
createMemoryRouter: s
|
|
1090
|
-
},
|
|
1091
|
-
let { children: t } = e, { configurations: n } =
|
|
1201
|
+
}, an = (e) => {
|
|
1202
|
+
let { children: t } = e, { configurations: n } = V(), r = C(() => Et({
|
|
1092
1203
|
modules: n.modules,
|
|
1093
1204
|
settingsResources: n.settingsResources
|
|
1094
|
-
}), [n.modules, n.settingsResources]), i =
|
|
1205
|
+
}), [n.modules, n.settingsResources]), i = C(() => [nn({
|
|
1095
1206
|
configurations: n,
|
|
1096
1207
|
contentRoutes: r,
|
|
1097
1208
|
children: t
|
|
@@ -1099,73 +1210,73 @@ var It = () => {
|
|
|
1099
1210
|
n,
|
|
1100
1211
|
r,
|
|
1101
1212
|
t
|
|
1102
|
-
]), a = n.basePath ? "/" + n.basePath : void 0, o = e.memory ? e.initialEntries : void 0, s =
|
|
1213
|
+
]), a = n.basePath ? "/" + n.basePath : void 0, o = e.memory ? e.initialEntries : void 0, s = C(() => e.memory ? rn.createMemoryRouter(i, {
|
|
1103
1214
|
basename: a,
|
|
1104
1215
|
...o ? { initialEntries: o } : {}
|
|
1105
|
-
}) :
|
|
1216
|
+
}) : rn.createBrowserRouter(i, { basename: a }), [
|
|
1106
1217
|
a,
|
|
1107
1218
|
o,
|
|
1108
1219
|
e.memory,
|
|
1109
1220
|
i
|
|
1110
1221
|
]);
|
|
1111
|
-
return /* @__PURE__ */
|
|
1112
|
-
},
|
|
1113
|
-
function
|
|
1114
|
-
let { pathname: n } = d(), { configurations: r } =
|
|
1222
|
+
return /* @__PURE__ */ N(le, { router: s });
|
|
1223
|
+
}, on = v(null), Y = v(null);
|
|
1224
|
+
function sn({ children: e, searchSources: t = [] }) {
|
|
1225
|
+
let { pathname: n } = d(), { configurations: r } = V(), i = T(/* @__PURE__ */ new Map()), a = T(0), o = T(n), [s, c] = E([]), [l, u] = E(!1), [f, p] = E(null), [m, h] = E([]), [g, _] = E(null), [v, b] = E(!1), S = y(() => {
|
|
1115
1226
|
c(Array.from(i.current.values()).flat());
|
|
1116
|
-
}, []),
|
|
1117
|
-
i.current.delete(e),
|
|
1118
|
-
}), [
|
|
1227
|
+
}, []), w = y((e, t) => (i.current.set(e, t), S(), () => {
|
|
1228
|
+
i.current.delete(e), S();
|
|
1229
|
+
}), [S]), D = y(() => {
|
|
1119
1230
|
p(null);
|
|
1120
|
-
}, []),
|
|
1121
|
-
a.current += 1, u(!1), h([]), _(null),
|
|
1122
|
-
}, []),
|
|
1231
|
+
}, []), O = y(() => {
|
|
1232
|
+
a.current += 1, u(!1), h([]), _(null), b(!1);
|
|
1233
|
+
}, []), k = y(() => {
|
|
1123
1234
|
let e = a.current + 1;
|
|
1124
|
-
a.current = e, h([]), _(n),
|
|
1235
|
+
a.current = e, h([]), _(n), b(!0), Vt({
|
|
1125
1236
|
modules: r.modules,
|
|
1126
1237
|
locale: r.locale,
|
|
1127
1238
|
basePath: r.basePath,
|
|
1128
1239
|
pathname: n
|
|
1129
1240
|
}).then((t) => {
|
|
1130
|
-
a.current === e && (h(t),
|
|
1241
|
+
a.current === e && (h(t), b(!1));
|
|
1131
1242
|
}).catch(() => {
|
|
1132
|
-
a.current === e &&
|
|
1243
|
+
a.current === e && b(!1);
|
|
1133
1244
|
});
|
|
1134
1245
|
}, [
|
|
1135
1246
|
r.basePath,
|
|
1136
1247
|
r.locale,
|
|
1137
1248
|
r.modules,
|
|
1138
1249
|
n
|
|
1139
|
-
]),
|
|
1140
|
-
u(!0), p({ search: e.search }),
|
|
1141
|
-
}, [
|
|
1142
|
-
e ?
|
|
1143
|
-
}, [
|
|
1144
|
-
|
|
1250
|
+
]), A = y((e = {}) => {
|
|
1251
|
+
u(!0), p({ search: e.search }), k();
|
|
1252
|
+
}, [k]), j = y((e) => {
|
|
1253
|
+
e ? A() : O();
|
|
1254
|
+
}, [O, A]);
|
|
1255
|
+
x(() => {
|
|
1145
1256
|
let e = o.current !== n;
|
|
1146
|
-
o.current = n, e && l &&
|
|
1257
|
+
o.current = n, e && l && O();
|
|
1147
1258
|
}, [
|
|
1148
|
-
|
|
1259
|
+
O,
|
|
1149
1260
|
l,
|
|
1150
1261
|
n
|
|
1151
|
-
]),
|
|
1262
|
+
]), x(() => {
|
|
1152
1263
|
let e = (e) => {
|
|
1153
|
-
(e.metaKey || e.ctrlKey) && e.key === "k" && (e.preventDefault(), l ?
|
|
1264
|
+
(e.metaKey || e.ctrlKey) && e.key === "k" && (e.preventDefault(), l ? O() : A());
|
|
1154
1265
|
};
|
|
1155
1266
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1156
1267
|
}, [
|
|
1157
|
-
|
|
1268
|
+
O,
|
|
1158
1269
|
l,
|
|
1159
|
-
|
|
1270
|
+
A
|
|
1160
1271
|
]);
|
|
1161
|
-
let
|
|
1272
|
+
let M = C(() => ({ register: w }), [w]), P = C(() => ({
|
|
1162
1273
|
actions: s,
|
|
1163
1274
|
searchSources: t,
|
|
1164
1275
|
open: l,
|
|
1165
|
-
setOpen:
|
|
1276
|
+
setOpen: j,
|
|
1166
1277
|
openRequest: f,
|
|
1167
|
-
clearOpenRequest:
|
|
1168
|
-
openCommandPalette:
|
|
1278
|
+
clearOpenRequest: D,
|
|
1279
|
+
openCommandPalette: A,
|
|
1169
1280
|
dynamicRoutes: g === n ? m : [],
|
|
1170
1281
|
isLoadingDynamicRoutes: v || l && g !== n
|
|
1171
1282
|
}), [
|
|
@@ -1173,32 +1284,32 @@ function qt({ children: e, searchSources: t = [] }) {
|
|
|
1173
1284
|
t,
|
|
1174
1285
|
l,
|
|
1175
1286
|
f,
|
|
1176
|
-
|
|
1177
|
-
|
|
1287
|
+
D,
|
|
1288
|
+
A,
|
|
1178
1289
|
m,
|
|
1179
1290
|
g,
|
|
1180
1291
|
v,
|
|
1181
1292
|
n,
|
|
1182
|
-
|
|
1293
|
+
j
|
|
1183
1294
|
]);
|
|
1184
|
-
return /* @__PURE__ */
|
|
1185
|
-
value:
|
|
1186
|
-
children: /* @__PURE__ */
|
|
1187
|
-
value:
|
|
1295
|
+
return /* @__PURE__ */ N(on.Provider, {
|
|
1296
|
+
value: M,
|
|
1297
|
+
children: /* @__PURE__ */ N(Y.Provider, {
|
|
1298
|
+
value: P,
|
|
1188
1299
|
children: e
|
|
1189
1300
|
})
|
|
1190
1301
|
});
|
|
1191
1302
|
}
|
|
1192
|
-
function
|
|
1193
|
-
let e =
|
|
1303
|
+
function cn() {
|
|
1304
|
+
let e = b(on);
|
|
1194
1305
|
if (!e) throw Error("useCommandPaletteDispatch must be used within CommandPaletteProvider");
|
|
1195
1306
|
return e;
|
|
1196
1307
|
}
|
|
1197
|
-
function
|
|
1198
|
-
let n =
|
|
1308
|
+
function ln(e, t) {
|
|
1309
|
+
let n = S(), { register: r } = cn(), i = T(t);
|
|
1199
1310
|
i.current = t;
|
|
1200
1311
|
let a = t.map((e) => `${e.key}\0${e.label}`).join("\n");
|
|
1201
|
-
|
|
1312
|
+
x(() => r(n, i.current.map((t) => ({
|
|
1202
1313
|
...t,
|
|
1203
1314
|
group: t.group ?? e,
|
|
1204
1315
|
onSelect: () => i.current.find((e) => e.key === t.key)?.onSelect()
|
|
@@ -1209,69 +1320,69 @@ function Yt(e, t) {
|
|
|
1209
1320
|
e
|
|
1210
1321
|
]);
|
|
1211
1322
|
}
|
|
1212
|
-
function
|
|
1213
|
-
let e =
|
|
1323
|
+
function un() {
|
|
1324
|
+
let e = b(Y);
|
|
1214
1325
|
if (!e) throw Error("useCommandPaletteState must be used within CommandPaletteProvider");
|
|
1215
1326
|
return e;
|
|
1216
1327
|
}
|
|
1217
|
-
function
|
|
1218
|
-
let e =
|
|
1328
|
+
function dn() {
|
|
1329
|
+
let e = b(Y);
|
|
1219
1330
|
if (!e) throw Error("useOpenCommandPalette must be used within CommandPaletteProvider");
|
|
1220
1331
|
return e.openCommandPalette;
|
|
1221
1332
|
}
|
|
1222
|
-
function
|
|
1223
|
-
let e =
|
|
1333
|
+
function fn() {
|
|
1334
|
+
let e = b(Y);
|
|
1224
1335
|
if (!e) throw Error("useCommandPaletteActions must be used within CommandPaletteProvider");
|
|
1225
1336
|
return e.actions;
|
|
1226
1337
|
}
|
|
1227
1338
|
//#endregion
|
|
1228
1339
|
//#region src/components/dialog/dialog.tsx
|
|
1229
|
-
function
|
|
1230
|
-
return /* @__PURE__ */ F
|
|
1340
|
+
function pn({ ...e }) {
|
|
1341
|
+
return /* @__PURE__ */ N(F.Root, {
|
|
1231
1342
|
"data-slot": "dialog",
|
|
1232
1343
|
...e
|
|
1233
1344
|
});
|
|
1234
1345
|
}
|
|
1235
|
-
|
|
1236
|
-
function
|
|
1237
|
-
return /* @__PURE__ */ F
|
|
1346
|
+
pn.displayName = "Dialog.Root";
|
|
1347
|
+
function mn({ ...e }) {
|
|
1348
|
+
return /* @__PURE__ */ N(F.Trigger, {
|
|
1238
1349
|
"data-slot": "dialog-trigger",
|
|
1239
1350
|
...e
|
|
1240
1351
|
});
|
|
1241
1352
|
}
|
|
1242
|
-
|
|
1243
|
-
function
|
|
1244
|
-
return /* @__PURE__ */ F
|
|
1353
|
+
mn.displayName = "Dialog.Trigger";
|
|
1354
|
+
function hn({ ...e }) {
|
|
1355
|
+
return /* @__PURE__ */ N(F.Portal, {
|
|
1245
1356
|
"data-slot": "dialog-portal",
|
|
1246
1357
|
...e
|
|
1247
1358
|
});
|
|
1248
1359
|
}
|
|
1249
|
-
|
|
1250
|
-
function
|
|
1251
|
-
return /* @__PURE__ */ F
|
|
1360
|
+
hn.displayName = "Dialog.Portal";
|
|
1361
|
+
function gn({ ...e }) {
|
|
1362
|
+
return /* @__PURE__ */ N(F.Close, {
|
|
1252
1363
|
"data-slot": "dialog-close",
|
|
1253
1364
|
...e
|
|
1254
1365
|
});
|
|
1255
1366
|
}
|
|
1256
|
-
|
|
1257
|
-
function
|
|
1258
|
-
return /* @__PURE__ */ F
|
|
1367
|
+
gn.displayName = "Dialog.Close";
|
|
1368
|
+
function _n({ className: e, ...t }) {
|
|
1369
|
+
return /* @__PURE__ */ N(F.Backdrop, {
|
|
1259
1370
|
"data-slot": "dialog-overlay",
|
|
1260
|
-
className:
|
|
1371
|
+
className: I("astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:fill-mode-forwards astw:fixed astw:inset-0 astw:z-(--z-overlay) astw:bg-black/50", e),
|
|
1261
1372
|
...t
|
|
1262
1373
|
});
|
|
1263
1374
|
}
|
|
1264
|
-
|
|
1265
|
-
function
|
|
1266
|
-
return /* @__PURE__ */
|
|
1375
|
+
_n.displayName = "Dialog.Overlay";
|
|
1376
|
+
function vn({ className: e, children: t, ...n }) {
|
|
1377
|
+
return /* @__PURE__ */ P(hn, {
|
|
1267
1378
|
"data-slot": "dialog-portal",
|
|
1268
|
-
children: [/* @__PURE__ */
|
|
1379
|
+
children: [/* @__PURE__ */ N(_n, {}), /* @__PURE__ */ P(F.Popup, {
|
|
1269
1380
|
"data-slot": "dialog-content",
|
|
1270
|
-
className:
|
|
1381
|
+
className: I("astw:bg-card astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:data-ending-style:zoom-out-95 astw:data-open:zoom-in-95 astw:fill-mode-forwards astw:fixed astw:top-[50%] astw:left-[50%] astw:z-(--z-overlay) astw:grid astw:w-full astw:max-w-[calc(100%-2rem)] astw:translate-x-[-50%] astw:translate-y-[-50%] astw:gap-4 astw:rounded-lg astw:border astw:border-border astw:p-6 astw:shadow-lg astw:duration-200 astw:sm:max-w-lg", e),
|
|
1271
1382
|
...n,
|
|
1272
|
-
children: [t, /* @__PURE__ */
|
|
1383
|
+
children: [t, /* @__PURE__ */ P(F.Close, {
|
|
1273
1384
|
className: "astw:ring-offset-bg astw:focus:ring-ring astw:data-open:bg-accent astw:data-open:text-muted-foreground astw:absolute astw:top-4 astw:right-4 astw:rounded-xs astw:opacity-70 astw:transition-opacity astw:hover:opacity-100 astw:focus:ring-2 astw:focus:ring-offset-2 astw:focus:outline-hidden astw:disabled:pointer-events-none astw:[&_svg]:pointer-events-none astw:[&_svg]:shrink-0 astw:[&_svg:not([class*='size-'])]:size-4",
|
|
1274
|
-
children: [/* @__PURE__ */
|
|
1385
|
+
children: [/* @__PURE__ */ N(ae, {}), /* @__PURE__ */ N("span", {
|
|
1275
1386
|
className: "astw:sr-only",
|
|
1276
1387
|
children: "Close"
|
|
1277
1388
|
})]
|
|
@@ -1279,77 +1390,79 @@ function an({ className: e, children: t, ...n }) {
|
|
|
1279
1390
|
})]
|
|
1280
1391
|
});
|
|
1281
1392
|
}
|
|
1282
|
-
|
|
1283
|
-
function
|
|
1284
|
-
return /* @__PURE__ */
|
|
1393
|
+
vn.displayName = "Dialog.Content";
|
|
1394
|
+
function yn({ className: e, ...t }) {
|
|
1395
|
+
return /* @__PURE__ */ N("div", {
|
|
1285
1396
|
"data-slot": "dialog-header",
|
|
1286
|
-
className:
|
|
1397
|
+
className: I("astw:flex astw:flex-col astw:gap-2 astw:text-center astw:sm:text-left", e),
|
|
1287
1398
|
...t
|
|
1288
1399
|
});
|
|
1289
1400
|
}
|
|
1290
|
-
|
|
1291
|
-
function
|
|
1292
|
-
return /* @__PURE__ */
|
|
1401
|
+
yn.displayName = "Dialog.Header";
|
|
1402
|
+
function bn({ className: e, ...t }) {
|
|
1403
|
+
return /* @__PURE__ */ N("div", {
|
|
1293
1404
|
"data-slot": "dialog-footer",
|
|
1294
|
-
className:
|
|
1405
|
+
className: I("astw:flex astw:flex-col-reverse astw:gap-2 astw:sm:flex-row astw:sm:justify-end", e),
|
|
1295
1406
|
...t
|
|
1296
1407
|
});
|
|
1297
1408
|
}
|
|
1298
|
-
|
|
1299
|
-
function
|
|
1300
|
-
return /* @__PURE__ */ F
|
|
1409
|
+
bn.displayName = "Dialog.Footer";
|
|
1410
|
+
function xn({ className: e, ...t }) {
|
|
1411
|
+
return /* @__PURE__ */ N(F.Title, {
|
|
1301
1412
|
"data-slot": "dialog-title",
|
|
1302
|
-
className:
|
|
1413
|
+
className: I("astw:text-lg astw:leading-none astw:font-semibold", e),
|
|
1303
1414
|
...t
|
|
1304
1415
|
});
|
|
1305
1416
|
}
|
|
1306
|
-
|
|
1307
|
-
function
|
|
1308
|
-
return /* @__PURE__ */ F
|
|
1417
|
+
xn.displayName = "Dialog.Title";
|
|
1418
|
+
function Sn({ className: e, ...t }) {
|
|
1419
|
+
return /* @__PURE__ */ N(F.Description, {
|
|
1309
1420
|
"data-slot": "dialog-description",
|
|
1310
|
-
className:
|
|
1421
|
+
className: I("astw:text-muted-foreground astw:text-sm", e),
|
|
1311
1422
|
...t
|
|
1312
1423
|
});
|
|
1313
1424
|
}
|
|
1314
|
-
|
|
1315
|
-
var
|
|
1316
|
-
Root:
|
|
1317
|
-
Close:
|
|
1318
|
-
Content:
|
|
1319
|
-
Description:
|
|
1320
|
-
Footer:
|
|
1321
|
-
Header:
|
|
1322
|
-
Title:
|
|
1323
|
-
Trigger:
|
|
1324
|
-
},
|
|
1425
|
+
Sn.displayName = "Dialog.Description";
|
|
1426
|
+
var X = {
|
|
1427
|
+
Root: pn,
|
|
1428
|
+
Close: gn,
|
|
1429
|
+
Content: vn,
|
|
1430
|
+
Description: Sn,
|
|
1431
|
+
Footer: bn,
|
|
1432
|
+
Header: yn,
|
|
1433
|
+
Title: xn,
|
|
1434
|
+
Trigger: mn
|
|
1435
|
+
}, Cn = [
|
|
1325
1436
|
"astw:border-input astw:flex astw:w-full astw:min-w-0 astw:rounded-md astw:border astw:bg-transparent astw:px-3 astw:text-base astw:shadow-xs astw:outline-none astw:md:text-sm",
|
|
1326
1437
|
"astw:dark:bg-input/30 astw:transition-[color,box-shadow]",
|
|
1327
1438
|
"astw:selection:bg-primary astw:selection:text-primary-foreground",
|
|
1328
1439
|
"astw:placeholder:text-muted-foreground",
|
|
1329
1440
|
"astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px]",
|
|
1330
1441
|
"astw:disabled:pointer-events-none astw:disabled:cursor-not-allowed astw:disabled:opacity-50"
|
|
1331
|
-
],
|
|
1442
|
+
], wn = [...Cn, "astw:h-9 astw:py-1"], Tn = [...Cn, "astw:min-h-16 astw:py-2 astw:resize-y"];
|
|
1332
1443
|
//#endregion
|
|
1333
1444
|
//#region src/components/input/input.tsx
|
|
1334
|
-
function
|
|
1335
|
-
|
|
1445
|
+
function En({ className: e, type: t, ref: n, ...r }) {
|
|
1446
|
+
let i = g.useRef(null);
|
|
1447
|
+
return he(i, { handlesDirectionalKeys: !0 }), /* @__PURE__ */ N("input", {
|
|
1448
|
+
ref: L(i, n),
|
|
1336
1449
|
type: t,
|
|
1337
1450
|
"data-slot": "input",
|
|
1338
|
-
className:
|
|
1339
|
-
...
|
|
1451
|
+
className: I(wn, "astw:file:text-foreground astw:file:inline-flex astw:file:h-7 astw:file:border-0 astw:file:bg-transparent astw:file:text-sm astw:file:font-medium", "astw:aria-invalid:ring-destructive/20 astw:dark:aria-invalid:ring-destructive/40 astw:aria-invalid:border-destructive", e),
|
|
1452
|
+
...r
|
|
1340
1453
|
});
|
|
1341
1454
|
}
|
|
1342
1455
|
//#endregion
|
|
1343
1456
|
//#region src/components/spinner/spinner.tsx
|
|
1344
|
-
var
|
|
1457
|
+
var Dn = {
|
|
1345
1458
|
xs: 12,
|
|
1346
1459
|
sm: 14,
|
|
1347
1460
|
default: 16,
|
|
1348
1461
|
lg: 20
|
|
1349
1462
|
};
|
|
1350
|
-
function
|
|
1351
|
-
let a = i["aria-label"] != null || i["aria-labelledby"] != null, o = i["aria-hidden"] === !0 || i["aria-hidden"] == null && i.role == null && !a, s =
|
|
1352
|
-
return /* @__PURE__ */
|
|
1463
|
+
function On({ className: e, size: t = "default", width: n, height: r, ...i }) {
|
|
1464
|
+
let a = i["aria-label"] != null || i["aria-labelledby"] != null, o = i["aria-hidden"] === !0 || i["aria-hidden"] == null && i.role == null && !a, s = Dn[t];
|
|
1465
|
+
return /* @__PURE__ */ N("svg", {
|
|
1353
1466
|
"data-slot": "spinner",
|
|
1354
1467
|
viewBox: "0 0 16 16",
|
|
1355
1468
|
fill: "none",
|
|
@@ -1357,10 +1470,10 @@ function hn({ className: e, size: t = "default", width: n, height: r, ...i }) {
|
|
|
1357
1470
|
...i,
|
|
1358
1471
|
width: n ?? s,
|
|
1359
1472
|
height: r ?? s,
|
|
1360
|
-
className:
|
|
1473
|
+
className: I("astw:animate-spin astw:shrink-0", e),
|
|
1361
1474
|
role: o ? void 0 : i.role ?? "status",
|
|
1362
1475
|
"aria-hidden": o ? !0 : i["aria-hidden"],
|
|
1363
|
-
children: /* @__PURE__ */
|
|
1476
|
+
children: /* @__PURE__ */ N("circle", {
|
|
1364
1477
|
cx: "8",
|
|
1365
1478
|
cy: "8",
|
|
1366
1479
|
r: "6",
|
|
@@ -1374,8 +1487,8 @@ function hn({ className: e, size: t = "default", width: n, height: r, ...i }) {
|
|
|
1374
1487
|
}
|
|
1375
1488
|
//#endregion
|
|
1376
1489
|
//#region src/components/command-palette/command-palette.tsx
|
|
1377
|
-
var
|
|
1378
|
-
function
|
|
1490
|
+
var Z = "astw:relative astw:flex astw:w-full astw:cursor-pointer astw:select-none astw:rounded-sm astw:px-2 astw:py-2 astw:text-sm astw:outline-none astw:text-left", Q = (e) => e ? "astw:bg-accent astw:text-accent-foreground" : "astw:hover:bg-accent astw:hover:text-accent-foreground";
|
|
1491
|
+
function kn(e) {
|
|
1379
1492
|
let t = [], n = (e, r, i) => {
|
|
1380
1493
|
e.forEach((e) => {
|
|
1381
1494
|
let a = [...i, e.title];
|
|
@@ -1396,17 +1509,17 @@ function _n(e) {
|
|
|
1396
1509
|
}), n(e.items, e.icon, [e.title]);
|
|
1397
1510
|
}), t;
|
|
1398
1511
|
}
|
|
1399
|
-
function
|
|
1512
|
+
function An(e, t) {
|
|
1400
1513
|
if (!t.trim()) return e;
|
|
1401
1514
|
let n = t.toLowerCase();
|
|
1402
1515
|
return e.filter((e) => e.label.toLowerCase().includes(n));
|
|
1403
1516
|
}
|
|
1404
|
-
var
|
|
1517
|
+
var jn = 300, Mn = (e) => e === "/" || e.startsWith("/_"), Nn = {
|
|
1405
1518
|
mode: "browse",
|
|
1406
1519
|
search: "",
|
|
1407
1520
|
selectedIndex: 0
|
|
1408
|
-
},
|
|
1409
|
-
function
|
|
1521
|
+
}, Pn = [];
|
|
1522
|
+
function Fn(e, t) {
|
|
1410
1523
|
switch (t.type) {
|
|
1411
1524
|
case "SET_SEARCH": return e.mode === "search" ? {
|
|
1412
1525
|
...e,
|
|
@@ -1444,7 +1557,7 @@ function Cn(e, t) {
|
|
|
1444
1557
|
results: [],
|
|
1445
1558
|
isSearching: !1
|
|
1446
1559
|
};
|
|
1447
|
-
case "EXIT_SEARCH_MODE": return
|
|
1560
|
+
case "EXIT_SEARCH_MODE": return Nn;
|
|
1448
1561
|
case "SEARCH_START": return e.mode === "search" ? {
|
|
1449
1562
|
...e,
|
|
1450
1563
|
isSearching: !0,
|
|
@@ -1468,10 +1581,10 @@ function Cn(e, t) {
|
|
|
1468
1581
|
...e,
|
|
1469
1582
|
selectedIndex: Math.max(e.selectedIndex - 1, 0)
|
|
1470
1583
|
};
|
|
1471
|
-
case "RESET": return
|
|
1584
|
+
case "RESET": return Nn;
|
|
1472
1585
|
}
|
|
1473
1586
|
}
|
|
1474
|
-
function
|
|
1587
|
+
function In(e, t) {
|
|
1475
1588
|
let n = e.indexOf(":");
|
|
1476
1589
|
if (n < 1) return {
|
|
1477
1590
|
activeSource: null,
|
|
@@ -1486,20 +1599,20 @@ function wn(e, t) {
|
|
|
1486
1599
|
searchQuery: e
|
|
1487
1600
|
};
|
|
1488
1601
|
}
|
|
1489
|
-
function
|
|
1490
|
-
let a = p(), o =
|
|
1602
|
+
function Ln({ routes: e, contextualActions: t = [], searchSources: n = [], open: r, setOpen: i }) {
|
|
1603
|
+
let a = p(), o = T(null), [s, c] = w(Fn, Nn), l = T(null), u = s.mode === "search" ? s.query : s.search, d = s.selectedIndex, f = s.mode === "search" ? s.source : null, m = s.mode === "search" ? s.results : Pn, h = s.mode === "search" && s.isSearching, g = C(() => f ? [] : An(t, u), [
|
|
1491
1604
|
t,
|
|
1492
1605
|
u,
|
|
1493
1606
|
f
|
|
1494
|
-
]), _ =
|
|
1495
|
-
let n =
|
|
1607
|
+
]), _ = C(() => f ? [] : Ot(e, u).toSorted((e, t) => {
|
|
1608
|
+
let n = Mn(e.path), r = Mn(t.path);
|
|
1496
1609
|
return Number(n) - Number(r) || e.path.localeCompare(t.path);
|
|
1497
1610
|
}), [
|
|
1498
1611
|
e,
|
|
1499
1612
|
u,
|
|
1500
1613
|
f
|
|
1501
1614
|
]);
|
|
1502
|
-
|
|
1615
|
+
x(() => {
|
|
1503
1616
|
if (!f) {
|
|
1504
1617
|
l.current?.abort(), l.current = null;
|
|
1505
1618
|
return;
|
|
@@ -1515,12 +1628,12 @@ function Tn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1515
1628
|
}).catch(() => {
|
|
1516
1629
|
e.signal.aborted || c({ type: "SEARCH_FAIL" });
|
|
1517
1630
|
});
|
|
1518
|
-
},
|
|
1631
|
+
}, jn);
|
|
1519
1632
|
return () => {
|
|
1520
1633
|
clearTimeout(e), l.current?.abort(), l.current = null;
|
|
1521
1634
|
};
|
|
1522
1635
|
}, [f, u]);
|
|
1523
|
-
let v =
|
|
1636
|
+
let v = C(() => {
|
|
1524
1637
|
if (f) return m.map((e) => ({
|
|
1525
1638
|
type: "search-result",
|
|
1526
1639
|
result: e,
|
|
@@ -1548,7 +1661,7 @@ function Tn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1548
1661
|
n,
|
|
1549
1662
|
g,
|
|
1550
1663
|
_
|
|
1551
|
-
]),
|
|
1664
|
+
]), b = y((e) => {
|
|
1552
1665
|
if (s.mode === "search") {
|
|
1553
1666
|
c({
|
|
1554
1667
|
type: "SET_SEARCH",
|
|
@@ -1556,28 +1669,28 @@ function Tn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1556
1669
|
});
|
|
1557
1670
|
return;
|
|
1558
1671
|
}
|
|
1559
|
-
let t =
|
|
1672
|
+
let t = In(e, n);
|
|
1560
1673
|
c({
|
|
1561
1674
|
type: "SET_SEARCH",
|
|
1562
1675
|
value: e,
|
|
1563
1676
|
detectedSource: t.activeSource ?? void 0,
|
|
1564
1677
|
detectedQuery: t.activeSource ? t.searchQuery : void 0
|
|
1565
1678
|
});
|
|
1566
|
-
}, [s.mode, n]),
|
|
1567
|
-
let t =
|
|
1679
|
+
}, [s.mode, n]), S = y((e) => {
|
|
1680
|
+
let t = In(e, n);
|
|
1568
1681
|
c({
|
|
1569
1682
|
type: "INITIALIZE_SEARCH",
|
|
1570
1683
|
value: e,
|
|
1571
1684
|
detectedSource: t.activeSource ?? void 0,
|
|
1572
1685
|
detectedQuery: t.activeSource ? t.searchQuery : void 0
|
|
1573
1686
|
});
|
|
1574
|
-
}, [n]),
|
|
1687
|
+
}, [n]), E = y((e) => {
|
|
1575
1688
|
i(e), e || (c({ type: "RESET" }), l.current?.abort(), l.current = null);
|
|
1576
1689
|
}, [i]);
|
|
1577
|
-
|
|
1690
|
+
x(() => {
|
|
1578
1691
|
o.current && o.current.querySelector(`[data-index="${d}"]`)?.scrollIntoView({ block: "nearest" });
|
|
1579
1692
|
}, [d]);
|
|
1580
|
-
let
|
|
1693
|
+
let D = y((e) => {
|
|
1581
1694
|
if (e.type === "search-mode") {
|
|
1582
1695
|
c({
|
|
1583
1696
|
type: "ENTER_SEARCH_MODE",
|
|
@@ -1595,10 +1708,10 @@ function Tn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1595
1708
|
}, [a, i]);
|
|
1596
1709
|
return {
|
|
1597
1710
|
open: r,
|
|
1598
|
-
handleOpenChange:
|
|
1711
|
+
handleOpenChange: E,
|
|
1599
1712
|
search: u,
|
|
1600
|
-
setSearch:
|
|
1601
|
-
initializeSearch:
|
|
1713
|
+
setSearch: b,
|
|
1714
|
+
initializeSearch: S,
|
|
1602
1715
|
selectedIndex: d,
|
|
1603
1716
|
filteredActions: g,
|
|
1604
1717
|
filteredRoutes: _,
|
|
@@ -1606,8 +1719,8 @@ function Tn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1606
1719
|
activeSearchSource: f,
|
|
1607
1720
|
isSearching: h,
|
|
1608
1721
|
selectableItems: v,
|
|
1609
|
-
handleSelectItem:
|
|
1610
|
-
handleKeyDown:
|
|
1722
|
+
handleSelectItem: D,
|
|
1723
|
+
handleKeyDown: y((e) => {
|
|
1611
1724
|
if (!e.nativeEvent.isComposing) switch (e.key) {
|
|
1612
1725
|
case "ArrowDown":
|
|
1613
1726
|
e.preventDefault(), c({
|
|
@@ -1619,24 +1732,24 @@ function Tn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1619
1732
|
e.preventDefault(), c({ type: "ARROW_UP" });
|
|
1620
1733
|
break;
|
|
1621
1734
|
case "Enter":
|
|
1622
|
-
e.preventDefault(), v[d] &&
|
|
1735
|
+
e.preventDefault(), v[d] && D(v[d]);
|
|
1623
1736
|
break;
|
|
1624
1737
|
case "Backspace": f && u === "" && (e.preventDefault(), c({ type: "EXIT_SEARCH_MODE" }), l.current?.abort(), l.current = null);
|
|
1625
1738
|
}
|
|
1626
1739
|
}, [
|
|
1627
1740
|
v,
|
|
1628
1741
|
d,
|
|
1629
|
-
|
|
1742
|
+
D,
|
|
1630
1743
|
f,
|
|
1631
1744
|
u
|
|
1632
1745
|
]),
|
|
1633
1746
|
listRef: o
|
|
1634
1747
|
};
|
|
1635
1748
|
}
|
|
1636
|
-
function
|
|
1637
|
-
let n =
|
|
1638
|
-
routes:
|
|
1639
|
-
...
|
|
1749
|
+
function Rn({ navItems: e, extraRoutes: t = [] }) {
|
|
1750
|
+
let n = H(), r = fn(), { searchSources: i, open: a, setOpen: o, openRequest: s, clearOpenRequest: c, dynamicRoutes: l, isLoadingDynamicRoutes: u } = un(), { open: d, handleOpenChange: f, search: p, setSearch: m, initializeSearch: h, selectedIndex: g, filteredActions: _, filteredRoutes: v, searchResults: y, activeSearchSource: b, isSearching: S, selectableItems: w, handleSelectItem: T, handleKeyDown: E, listRef: D } = Ln({
|
|
1751
|
+
routes: C(() => [
|
|
1752
|
+
...kn(e),
|
|
1640
1753
|
...t,
|
|
1641
1754
|
...l
|
|
1642
1755
|
], [
|
|
@@ -1649,35 +1762,35 @@ function En({ navItems: e, extraRoutes: t = [] }) {
|
|
|
1649
1762
|
open: a,
|
|
1650
1763
|
setOpen: o
|
|
1651
1764
|
});
|
|
1652
|
-
|
|
1765
|
+
x(() => {
|
|
1653
1766
|
s && (h(s.search ?? ""), c());
|
|
1654
1767
|
}, [
|
|
1655
1768
|
s,
|
|
1656
1769
|
h,
|
|
1657
1770
|
c
|
|
1658
1771
|
]);
|
|
1659
|
-
let
|
|
1660
|
-
return /* @__PURE__ */
|
|
1772
|
+
let O = b ? [] : w.filter((e) => e.type === "search-mode"), k = O.length, A = k, j = A + _.length;
|
|
1773
|
+
return /* @__PURE__ */ N(X.Root, {
|
|
1661
1774
|
open: d,
|
|
1662
1775
|
onOpenChange: f,
|
|
1663
|
-
children: /* @__PURE__ */
|
|
1776
|
+
children: /* @__PURE__ */ P(X.Content, {
|
|
1664
1777
|
className: "astw:p-0 astw:gap-0 astw:sm:max-w-2xl astw:lg:max-w-4xl astw:overflow-hidden astw:top-[30%] astw:translate-y-[-30%]",
|
|
1665
|
-
onKeyDown:
|
|
1778
|
+
onKeyDown: E,
|
|
1666
1779
|
"aria-describedby": void 0,
|
|
1667
1780
|
children: [
|
|
1668
|
-
/* @__PURE__ */
|
|
1781
|
+
/* @__PURE__ */ N(X.Title, {
|
|
1669
1782
|
className: "astw:sr-only",
|
|
1670
1783
|
children: n("commandPaletteSearch")
|
|
1671
1784
|
}),
|
|
1672
|
-
/* @__PURE__ */
|
|
1785
|
+
/* @__PURE__ */ P("div", {
|
|
1673
1786
|
className: "astw:flex astw:items-center astw:border-b astw:border-border astw:px-3 astw:py-1",
|
|
1674
1787
|
children: [
|
|
1675
|
-
/* @__PURE__ */
|
|
1676
|
-
b && /* @__PURE__ */
|
|
1788
|
+
/* @__PURE__ */ N(re, { className: "astw:mr-2 astw:h-4 astw:w-4 astw:shrink-0 astw:opacity-50" }),
|
|
1789
|
+
b && /* @__PURE__ */ N("span", {
|
|
1677
1790
|
className: "astw:inline-flex astw:items-center astw:shrink-0 astw:rounded astw:bg-muted astw:px-1.5 astw:py-0.5 astw:mr-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1678
1791
|
children: b.prefix
|
|
1679
1792
|
}),
|
|
1680
|
-
/* @__PURE__ */
|
|
1793
|
+
/* @__PURE__ */ N(En, {
|
|
1681
1794
|
value: p,
|
|
1682
1795
|
onChange: (e) => m(e.target.value),
|
|
1683
1796
|
placeholder: n("commandPaletteSearch"),
|
|
@@ -1686,141 +1799,141 @@ function En({ navItems: e, extraRoutes: t = [] }) {
|
|
|
1686
1799
|
})
|
|
1687
1800
|
]
|
|
1688
1801
|
}),
|
|
1689
|
-
/* @__PURE__ */
|
|
1690
|
-
ref:
|
|
1802
|
+
/* @__PURE__ */ P("div", {
|
|
1803
|
+
ref: D,
|
|
1691
1804
|
className: "astw:max-h-[50vh] astw:overflow-y-auto astw:overflow-x-hidden",
|
|
1692
|
-
children: [
|
|
1805
|
+
children: [w.length === 0 && !S && !u ? /* @__PURE__ */ N("div", {
|
|
1693
1806
|
className: "astw:py-6 astw:text-center astw:text-sm astw:text-muted-foreground",
|
|
1694
1807
|
children: n("commandPaletteNoResults")
|
|
1695
|
-
}) : /* @__PURE__ */
|
|
1808
|
+
}) : /* @__PURE__ */ P("div", {
|
|
1696
1809
|
className: "astw:p-1",
|
|
1697
1810
|
children: [
|
|
1698
|
-
u && /* @__PURE__ */
|
|
1811
|
+
u && /* @__PURE__ */ P("output", {
|
|
1699
1812
|
className: "astw:flex astw:items-center astw:justify-center astw:gap-2 astw:py-4 astw:text-sm astw:text-muted-foreground",
|
|
1700
|
-
children: [/* @__PURE__ */
|
|
1813
|
+
children: [/* @__PURE__ */ N(On, { "aria-label": n("commandPaletteLoadingRoutes") }), n("commandPaletteLoadingRoutes")]
|
|
1701
1814
|
}),
|
|
1702
|
-
|
|
1815
|
+
k > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1703
1816
|
className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1704
1817
|
children: n("commandPaletteSearchModes")
|
|
1705
|
-
}),
|
|
1818
|
+
}), O.map((e, t) => {
|
|
1706
1819
|
let n = e.type === "search-mode" ? e.source : null;
|
|
1707
|
-
return n ? /* @__PURE__ */
|
|
1820
|
+
return n ? /* @__PURE__ */ P("button", {
|
|
1708
1821
|
"data-index": t,
|
|
1709
|
-
onClick: () =>
|
|
1822
|
+
onClick: () => T({
|
|
1710
1823
|
type: "search-mode",
|
|
1711
1824
|
source: n
|
|
1712
1825
|
}),
|
|
1713
|
-
className:
|
|
1826
|
+
className: I(Z, "astw:items-center astw:gap-2", Q(t === g)),
|
|
1714
1827
|
children: [
|
|
1715
|
-
n.icon && /* @__PURE__ */
|
|
1828
|
+
n.icon && /* @__PURE__ */ N("span", {
|
|
1716
1829
|
className: "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0",
|
|
1717
1830
|
children: n.icon
|
|
1718
1831
|
}),
|
|
1719
|
-
/* @__PURE__ */
|
|
1832
|
+
/* @__PURE__ */ P("span", {
|
|
1720
1833
|
className: "astw:font-mono astw:text-xs astw:text-muted-foreground astw:shrink-0",
|
|
1721
1834
|
children: [n.prefix, ":"]
|
|
1722
1835
|
}),
|
|
1723
|
-
/* @__PURE__ */
|
|
1836
|
+
/* @__PURE__ */ N("span", {
|
|
1724
1837
|
className: "astw:truncate",
|
|
1725
1838
|
children: n.title
|
|
1726
1839
|
})
|
|
1727
1840
|
]
|
|
1728
1841
|
}, `search-mode-${n.prefix}`) : null;
|
|
1729
1842
|
})] }),
|
|
1730
|
-
_.length > 0 && /* @__PURE__ */
|
|
1843
|
+
_.length > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1731
1844
|
className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1732
1845
|
children: n("commandPaletteActions")
|
|
1733
1846
|
}), _.map((e, t) => {
|
|
1734
|
-
let n =
|
|
1735
|
-
return /* @__PURE__ */
|
|
1847
|
+
let n = A + t;
|
|
1848
|
+
return /* @__PURE__ */ P("button", {
|
|
1736
1849
|
"data-index": n,
|
|
1737
|
-
onClick: () =>
|
|
1850
|
+
onClick: () => T({
|
|
1738
1851
|
type: "action",
|
|
1739
1852
|
action: e
|
|
1740
1853
|
}),
|
|
1741
|
-
className:
|
|
1854
|
+
className: I(Z, "astw:items-center astw:gap-2", Q(n === g)),
|
|
1742
1855
|
children: [
|
|
1743
|
-
e.icon && /* @__PURE__ */
|
|
1856
|
+
e.icon && /* @__PURE__ */ N("span", {
|
|
1744
1857
|
className: "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0",
|
|
1745
1858
|
children: e.icon
|
|
1746
1859
|
}),
|
|
1747
|
-
/* @__PURE__ */
|
|
1860
|
+
/* @__PURE__ */ N("span", {
|
|
1748
1861
|
className: "astw:truncate",
|
|
1749
1862
|
children: e.label
|
|
1750
1863
|
}),
|
|
1751
|
-
e.group && /* @__PURE__ */
|
|
1864
|
+
e.group && /* @__PURE__ */ N("span", {
|
|
1752
1865
|
className: "astw:ml-auto astw:text-xs astw:text-muted-foreground astw:shrink-0",
|
|
1753
1866
|
children: e.group
|
|
1754
1867
|
})
|
|
1755
1868
|
]
|
|
1756
1869
|
}, `action-${e.key}`);
|
|
1757
1870
|
})] }),
|
|
1758
|
-
v.length > 0 && /* @__PURE__ */
|
|
1871
|
+
v.length > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1759
1872
|
className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1760
1873
|
children: n("commandPalettePages")
|
|
1761
1874
|
}), v.map((e, t) => {
|
|
1762
|
-
let n =
|
|
1763
|
-
return /* @__PURE__ */
|
|
1875
|
+
let n = j + t, r = e.displayPath ?? e.path;
|
|
1876
|
+
return /* @__PURE__ */ P("button", {
|
|
1764
1877
|
"data-index": n,
|
|
1765
|
-
onClick: () =>
|
|
1878
|
+
onClick: () => T({
|
|
1766
1879
|
type: "route",
|
|
1767
1880
|
route: e
|
|
1768
1881
|
}),
|
|
1769
|
-
className:
|
|
1770
|
-
children: [/* @__PURE__ */
|
|
1882
|
+
className: I(Z, "astw:flex-col astw:items-start", Q(n === g)),
|
|
1883
|
+
children: [/* @__PURE__ */ N("span", {
|
|
1771
1884
|
className: "astw:truncate astw:w-full astw:text-left",
|
|
1772
1885
|
children: e.breadcrumb.join(" > ")
|
|
1773
|
-
}), /* @__PURE__ */
|
|
1886
|
+
}), /* @__PURE__ */ N("span", {
|
|
1774
1887
|
className: "astw:text-[11px] astw:text-muted-foreground astw:truncate astw:w-full astw:text-left",
|
|
1775
1888
|
children: r.startsWith("/") ? r : `/${r}`
|
|
1776
1889
|
})]
|
|
1777
1890
|
}, e.path);
|
|
1778
1891
|
})] }),
|
|
1779
|
-
b && y.length > 0 && /* @__PURE__ */
|
|
1892
|
+
b && y.length > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1780
1893
|
className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1781
1894
|
children: b.title
|
|
1782
|
-
}), y.map((e, t) => /* @__PURE__ */
|
|
1895
|
+
}), y.map((e, t) => /* @__PURE__ */ P("button", {
|
|
1783
1896
|
"data-index": t,
|
|
1784
|
-
onClick: () =>
|
|
1897
|
+
onClick: () => T({
|
|
1785
1898
|
type: "search-result",
|
|
1786
1899
|
result: e,
|
|
1787
1900
|
source: b
|
|
1788
1901
|
}),
|
|
1789
|
-
className:
|
|
1790
|
-
children: [/* @__PURE__ */
|
|
1902
|
+
className: I(Z, "astw:flex-col astw:items-start", Q(t === g)),
|
|
1903
|
+
children: [/* @__PURE__ */ P("span", {
|
|
1791
1904
|
className: "astw:flex astw:items-center astw:gap-2 astw:w-full",
|
|
1792
|
-
children: [(e.icon || b.icon) && /* @__PURE__ */
|
|
1905
|
+
children: [(e.icon || b.icon) && /* @__PURE__ */ N("span", {
|
|
1793
1906
|
className: "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0",
|
|
1794
1907
|
children: e.icon ?? b.icon
|
|
1795
|
-
}), /* @__PURE__ */
|
|
1908
|
+
}), /* @__PURE__ */ N("span", {
|
|
1796
1909
|
className: "astw:truncate",
|
|
1797
1910
|
children: e.label
|
|
1798
1911
|
})]
|
|
1799
|
-
}), e.description && /* @__PURE__ */
|
|
1912
|
+
}), e.description && /* @__PURE__ */ N("span", {
|
|
1800
1913
|
className: "astw:text-[11px] astw:text-muted-foreground astw:truncate astw:w-full astw:text-left",
|
|
1801
1914
|
children: e.description
|
|
1802
1915
|
})]
|
|
1803
1916
|
}, `search-result-${e.key}`))] })
|
|
1804
1917
|
]
|
|
1805
|
-
}),
|
|
1918
|
+
}), S && /* @__PURE__ */ P("div", {
|
|
1806
1919
|
className: "astw:flex astw:items-center astw:justify-center astw:gap-2 astw:py-4 astw:text-sm astw:text-muted-foreground",
|
|
1807
|
-
children: [/* @__PURE__ */
|
|
1920
|
+
children: [/* @__PURE__ */ N(On, {}), n("commandPaletteSearching")]
|
|
1808
1921
|
})]
|
|
1809
1922
|
})
|
|
1810
1923
|
]
|
|
1811
1924
|
})
|
|
1812
1925
|
});
|
|
1813
1926
|
}
|
|
1814
|
-
function
|
|
1927
|
+
function zn() {
|
|
1815
1928
|
return null;
|
|
1816
1929
|
}
|
|
1817
|
-
function
|
|
1818
|
-
let e =
|
|
1819
|
-
return /* @__PURE__ */
|
|
1930
|
+
function Bn() {
|
|
1931
|
+
let e = Pt(), n = st();
|
|
1932
|
+
return /* @__PURE__ */ N(_, {
|
|
1820
1933
|
fallback: null,
|
|
1821
|
-
children: /* @__PURE__ */
|
|
1934
|
+
children: /* @__PURE__ */ N(t, {
|
|
1822
1935
|
resolve: e,
|
|
1823
|
-
children: (e) => /* @__PURE__ */
|
|
1936
|
+
children: (e) => /* @__PURE__ */ N(Rn, {
|
|
1824
1937
|
navItems: e ?? [],
|
|
1825
1938
|
extraRoutes: [n]
|
|
1826
1939
|
})
|
|
@@ -1829,13 +1942,13 @@ function On() {
|
|
|
1829
1942
|
}
|
|
1830
1943
|
//#endregion
|
|
1831
1944
|
//#region src/hooks/use-is-client.ts
|
|
1832
|
-
var
|
|
1833
|
-
function
|
|
1834
|
-
return
|
|
1945
|
+
var Vn = () => () => {}, Hn = () => !0, Un = () => !1;
|
|
1946
|
+
function Wn() {
|
|
1947
|
+
return D(Vn, Hn, Un);
|
|
1835
1948
|
}
|
|
1836
1949
|
//#endregion
|
|
1837
1950
|
//#region src/fs-routes/converter.tsx
|
|
1838
|
-
function
|
|
1951
|
+
function Gn(e) {
|
|
1839
1952
|
let t = {
|
|
1840
1953
|
path: "",
|
|
1841
1954
|
fullPath: "",
|
|
@@ -1843,7 +1956,7 @@ function Nn(e) {
|
|
|
1843
1956
|
children: /* @__PURE__ */ new Map()
|
|
1844
1957
|
};
|
|
1845
1958
|
for (let n of e) {
|
|
1846
|
-
let e =
|
|
1959
|
+
let e = de(n.path), r = t, i = "";
|
|
1847
1960
|
for (let t of e) t.type !== "group" && (i = i ? `${i}/${t.converted}` : t.converted, r.children.has(t.converted) || r.children.set(t.converted, {
|
|
1848
1961
|
path: t.converted,
|
|
1849
1962
|
fullPath: i,
|
|
@@ -1854,12 +1967,12 @@ function Nn(e) {
|
|
|
1854
1967
|
}
|
|
1855
1968
|
return t;
|
|
1856
1969
|
}
|
|
1857
|
-
function
|
|
1858
|
-
return e?.appShellPageProps?.meta?.title ??
|
|
1970
|
+
function Kn(e, t) {
|
|
1971
|
+
return e?.appShellPageProps?.meta?.title ?? Ve(t);
|
|
1859
1972
|
}
|
|
1860
|
-
function
|
|
1861
|
-
let t = e.component, n =
|
|
1862
|
-
for (let t of e.children.values()) o.push(
|
|
1973
|
+
function qn(e) {
|
|
1974
|
+
let t = e.component, n = Kn(t, e.path), r = t?.appShellPageProps?.meta?.icon, i = t?.appShellPageProps?.meta?.breadcrumbTitle, a = e.guards && e.guards.length > 0 ? K(e.guards) : void 0, o = [];
|
|
1975
|
+
for (let t of e.children.values()) o.push(qn(t));
|
|
1863
1976
|
return {
|
|
1864
1977
|
_type: "resource",
|
|
1865
1978
|
type: "component",
|
|
@@ -1869,16 +1982,16 @@ function Fn(e) {
|
|
|
1869
1982
|
icon: r,
|
|
1870
1983
|
...i === void 0 ? {} : { breadcrumbTitle: i }
|
|
1871
1984
|
},
|
|
1872
|
-
component: t ? () => /* @__PURE__ */
|
|
1985
|
+
component: t ? () => /* @__PURE__ */ N(t, {}) : void 0,
|
|
1873
1986
|
subResources: o.length > 0 ? o : void 0,
|
|
1874
|
-
errorBoundary: /* @__PURE__ */
|
|
1987
|
+
errorBoundary: /* @__PURE__ */ N(U, {}),
|
|
1875
1988
|
guards: e.guards,
|
|
1876
1989
|
loader: a
|
|
1877
1990
|
};
|
|
1878
1991
|
}
|
|
1879
|
-
function
|
|
1880
|
-
let t = e.component, n =
|
|
1881
|
-
for (let t of e.children.values()) o.push(
|
|
1992
|
+
function Jn(e) {
|
|
1993
|
+
let t = e.component, n = Kn(t, e.path), r = t?.appShellPageProps?.meta?.icon, i = t?.appShellPageProps?.meta?.breadcrumbTitle, a = e.guards && e.guards.length > 0 ? K(e.guards) : void 0, o = [];
|
|
1994
|
+
for (let t of e.children.values()) o.push(qn(t));
|
|
1882
1995
|
return {
|
|
1883
1996
|
_type: "module",
|
|
1884
1997
|
type: "component",
|
|
@@ -1889,41 +2002,41 @@ function In(e) {
|
|
|
1889
2002
|
...i === void 0 ? {} : { breadcrumbTitle: i },
|
|
1890
2003
|
menuItemClickable: t !== void 0
|
|
1891
2004
|
},
|
|
1892
|
-
component: t ? () => /* @__PURE__ */
|
|
2005
|
+
component: t ? () => /* @__PURE__ */ N(t, {}) : void 0,
|
|
1893
2006
|
resources: o,
|
|
1894
|
-
errorBoundary: /* @__PURE__ */
|
|
2007
|
+
errorBoundary: /* @__PURE__ */ N(U, {}),
|
|
1895
2008
|
guards: e.guards,
|
|
1896
2009
|
loader: a
|
|
1897
2010
|
};
|
|
1898
2011
|
}
|
|
1899
|
-
function
|
|
2012
|
+
function Yn(e) {
|
|
1900
2013
|
if (e.length === 0) return [];
|
|
1901
|
-
let t =
|
|
2014
|
+
let t = Gn(e), n = [];
|
|
1902
2015
|
if (t.component) {
|
|
1903
|
-
let e =
|
|
2016
|
+
let e = Jn({
|
|
1904
2017
|
...t,
|
|
1905
2018
|
path: "",
|
|
1906
2019
|
children: /* @__PURE__ */ new Map()
|
|
1907
2020
|
});
|
|
1908
2021
|
n.push(e);
|
|
1909
2022
|
}
|
|
1910
|
-
for (let e of t.children.values()) n.push(
|
|
2023
|
+
for (let e of t.children.values()) n.push(Jn(e));
|
|
1911
2024
|
return n;
|
|
1912
2025
|
}
|
|
1913
2026
|
//#endregion
|
|
1914
2027
|
//#region src/components/appshell/appshell.tsx
|
|
1915
2028
|
var $ = (e) => {
|
|
1916
|
-
let t =
|
|
1917
|
-
|
|
2029
|
+
let t = Wn();
|
|
2030
|
+
Le(e.contextData ?? {});
|
|
1918
2031
|
let { modules: n, rootComponent: r, rootGuards: i } = e, a = e.memory ? {
|
|
1919
2032
|
memory: !0,
|
|
1920
2033
|
initialEntries: e.initialEntries
|
|
1921
|
-
} : { memory: !1 }, o =
|
|
2034
|
+
} : { memory: !1 }, o = C(() => n && (n.some((e) => e.path === "") ? ((r || i?.length) && console.warn("[AppShell] Both a root module (path=\"\") and rootComponent/rootGuards are provided. The root module takes precedence; rootComponent and rootGuards will be ignored. Define guards directly on the root module instead."), n) : r || i?.length ? [Ue({
|
|
1922
2035
|
path: "",
|
|
1923
2036
|
...r ? {
|
|
1924
2037
|
meta: {
|
|
1925
|
-
title:
|
|
1926
|
-
icon: /* @__PURE__ */
|
|
2038
|
+
title: Fe.t("home"),
|
|
2039
|
+
icon: /* @__PURE__ */ N(ne, {})
|
|
1927
2040
|
},
|
|
1928
2041
|
component: () => r()
|
|
1929
2042
|
} : { meta: {} },
|
|
@@ -1933,7 +2046,7 @@ var $ = (e) => {
|
|
|
1933
2046
|
n,
|
|
1934
2047
|
r,
|
|
1935
2048
|
i
|
|
1936
|
-
]), s =
|
|
2049
|
+
]), s = C(() => o ? De({
|
|
1937
2050
|
modules: o,
|
|
1938
2051
|
settingsResources: e.settingsResources,
|
|
1939
2052
|
basePath: e.basePath,
|
|
@@ -1947,7 +2060,7 @@ var $ = (e) => {
|
|
|
1947
2060
|
e.errorBoundary,
|
|
1948
2061
|
e.locale,
|
|
1949
2062
|
e.timeZone
|
|
1950
|
-
]), c =
|
|
2063
|
+
]), c = C(() => s ? {
|
|
1951
2064
|
title: e.title,
|
|
1952
2065
|
icon: e.icon,
|
|
1953
2066
|
favicon: e.favicon,
|
|
@@ -1959,34 +2072,34 @@ var $ = (e) => {
|
|
|
1959
2072
|
e.favicon,
|
|
1960
2073
|
e.appInfo,
|
|
1961
2074
|
s
|
|
1962
|
-
]), l =
|
|
2075
|
+
]), l = C(() => ({ contextData: e.contextData ?? {} }), [e.contextData]);
|
|
1963
2076
|
if (!o || !c) {
|
|
1964
2077
|
let e = "[AppShell] No routes configured. Either use the appShellRoutes() vite-plugin for automatic page configuration, or pass the 'modules' prop for manual configuration.";
|
|
1965
|
-
return console.error(e), /* @__PURE__ */
|
|
2078
|
+
return console.error(e), /* @__PURE__ */ N("div", {
|
|
1966
2079
|
className: "astw:flex astw:min-h-screen astw:items-center astw:justify-center astw:bg-background astw:p-4",
|
|
1967
|
-
children: /* @__PURE__ */
|
|
2080
|
+
children: /* @__PURE__ */ P("div", {
|
|
1968
2081
|
className: "astw:max-w-md astw:rounded-lg astw:border astw:border-destructive/50 astw:bg-destructive/10 astw:p-6 astw:text-center",
|
|
1969
|
-
children: [/* @__PURE__ */
|
|
2082
|
+
children: [/* @__PURE__ */ N("h1", {
|
|
1970
2083
|
className: "astw:mb-2 astw:text-lg astw:font-semibold astw:text-destructive",
|
|
1971
2084
|
children: "Configuration Error"
|
|
1972
|
-
}), /* @__PURE__ */
|
|
2085
|
+
}), /* @__PURE__ */ N("p", {
|
|
1973
2086
|
className: "astw:text-sm astw:text-muted-foreground",
|
|
1974
2087
|
children: e
|
|
1975
2088
|
})]
|
|
1976
2089
|
})
|
|
1977
2090
|
});
|
|
1978
2091
|
}
|
|
1979
|
-
return t ? /* @__PURE__ */
|
|
2092
|
+
return t ? /* @__PURE__ */ N(B.Provider, {
|
|
1980
2093
|
value: c,
|
|
1981
|
-
children: /* @__PURE__ */
|
|
2094
|
+
children: /* @__PURE__ */ N(Oe.Provider, {
|
|
1982
2095
|
value: l,
|
|
1983
|
-
children: /* @__PURE__ */
|
|
2096
|
+
children: /* @__PURE__ */ N(Ze, { children: /* @__PURE__ */ N(gt, {
|
|
1984
2097
|
defaultColorTheme: e.defaultColorTheme,
|
|
1985
|
-
children: /* @__PURE__ */
|
|
2098
|
+
children: /* @__PURE__ */ N(an, {
|
|
1986
2099
|
...a,
|
|
1987
|
-
children: /* @__PURE__ */
|
|
2100
|
+
children: /* @__PURE__ */ P(sn, {
|
|
1988
2101
|
searchSources: e.searchSources,
|
|
1989
|
-
children: [e.children, /* @__PURE__ */
|
|
2102
|
+
children: [e.children, /* @__PURE__ */ N(Bn, {})]
|
|
1990
2103
|
})
|
|
1991
2104
|
})
|
|
1992
2105
|
}) })
|
|
@@ -1994,18 +2107,18 @@ var $ = (e) => {
|
|
|
1994
2107
|
}) : null;
|
|
1995
2108
|
};
|
|
1996
2109
|
$.WithPages = (e) => {
|
|
1997
|
-
let t =
|
|
1998
|
-
return (e) => /* @__PURE__ */
|
|
2110
|
+
let t = Yn(e);
|
|
2111
|
+
return (e) => /* @__PURE__ */ N($, {
|
|
1999
2112
|
...e,
|
|
2000
2113
|
modules: t,
|
|
2001
2114
|
memory: !1
|
|
2002
2115
|
});
|
|
2003
2116
|
};
|
|
2004
|
-
var
|
|
2117
|
+
var Xn = (e) => /* @__PURE__ */ N($, {
|
|
2005
2118
|
...e,
|
|
2006
2119
|
memory: !1
|
|
2007
2120
|
});
|
|
2008
|
-
|
|
2009
|
-
var
|
|
2121
|
+
Xn.WithPages = $.WithPages;
|
|
2122
|
+
var Zn = Xn;
|
|
2010
2123
|
//#endregion
|
|
2011
|
-
export {
|
|
2124
|
+
export { ke as A, I as B, ze as C, Pe as D, H as E, Se as F, xe as I, L, Me as M, z as N, Ae as O, R as P, he as R, We as S, Be as T, ut as _, En as a, Ye as b, X as c, ln as d, Xt as f, bt as g, q as h, On as i, je as j, V as k, un as l, Pt as m, $ as n, wn as o, Yt as p, zn as r, Tn as s, Zn as t, dn as u, _t as v, Re as w, Ue as x, et as y, fe as z };
|