@tailor-platform/app-shell 1.14.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/LICENSE.md +21 -0
- package/dist/app-shell-core.css +1 -1
- package/dist/app-shell.d.ts +1203 -316
- package/dist/app-shell.js +4562 -3307
- package/dist/{appshell-CtS8Y3LW.js → appshell-B0wh5Lq0.js} +850 -549
- package/dist/style-entry.d.ts +118 -98
- package/dist/testing.d.ts +118 -98
- package/dist/testing.js +1 -1
- package/dist/themes/_template.css +1 -1
- package/dist/vite-plugin.d.ts +118 -98
- package/package.json +13 -13
- package/skills/app-shell-patterns/SKILL.md +108 -24
- 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} +260 -105
- package/skills/app-shell-patterns/references/migrations.md +34 -0
- package/skills/app-shell-patterns/references/pages/document-detail.md +1125 -0
- package/skills/app-shell-patterns/references/patterns/form-composer.md +44 -46
- 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 +14 -28
- 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 -981
- package/skills/app-shell-patterns/references/patterns/detail-hero-with-actions.md +0 -201
|
@@ -1,24 +1,133 @@
|
|
|
1
1
|
import { capitalCase as e } from "change-case";
|
|
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,
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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 * 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";
|
|
9
11
|
import { getLocalTimeZone as oe, now as se, today as ce } from "@internationalized/date";
|
|
10
|
-
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
11
12
|
import { RouterProvider as le } from "react-router/dom";
|
|
12
13
|
import { Toaster as ue } from "sonner";
|
|
13
|
-
import { Dialog as
|
|
14
|
+
import { Dialog as F } from "@base-ui/react/dialog";
|
|
14
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 fe = h("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 pe = () => {
|
|
|
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
223
|
today: () => ce(t),
|
|
113
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 pe = () => {
|
|
|
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",
|
|
@@ -158,11 +269,30 @@ var pe = () => {
|
|
|
158
269
|
commandPalettePages: "Pages",
|
|
159
270
|
commandPaletteSearchModes: "Search Modes",
|
|
160
271
|
commandPaletteSearching: "Searching...",
|
|
272
|
+
commandPaletteLoadingRoutes: "Loading current page routes...",
|
|
161
273
|
appInfoTitle: "App info",
|
|
162
274
|
appInfoDescription: "Information about the current app and AppShell.",
|
|
163
275
|
appInfoAppName: "App name",
|
|
164
276
|
appInfoAppShellVersion: "AppShell version",
|
|
165
|
-
appInfoCopy: "Copy"
|
|
277
|
+
appInfoCopy: "Copy",
|
|
278
|
+
aiChatMessage: "Message",
|
|
279
|
+
aiChatSend: "Send",
|
|
280
|
+
aiChatSending: "Sending…",
|
|
281
|
+
aiChatStop: "Stop",
|
|
282
|
+
aiChatScrollToLatest: "Scroll to latest message",
|
|
283
|
+
aiChatDeleteConversation: (e) => `Delete "${e.title}"`,
|
|
284
|
+
aiChatConversationHistory: "Conversation history",
|
|
285
|
+
aiChatThinking: "Thinking…",
|
|
286
|
+
aiChatThoughtFor: (e) => `Thought for ${e.seconds}s`,
|
|
287
|
+
aiChatReasoning: "Reasoning",
|
|
288
|
+
aiChatChainOfThought: "Chain of thought",
|
|
289
|
+
aiChatToolPreparing: "Preparing",
|
|
290
|
+
aiChatToolRunning: "Running",
|
|
291
|
+
aiChatToolDone: "Done",
|
|
292
|
+
aiChatToolError: "Error",
|
|
293
|
+
aiChatToolParameters: "Parameters",
|
|
294
|
+
aiChatToolResult: "Result",
|
|
295
|
+
aiChatSourcesUsed: (e) => `Used ${e.count} ${e.count === 1 ? "source" : "sources"}`
|
|
166
296
|
},
|
|
167
297
|
ja: {
|
|
168
298
|
home: "ホーム",
|
|
@@ -188,32 +318,51 @@ var pe = () => {
|
|
|
188
318
|
commandPalettePages: "ページ",
|
|
189
319
|
commandPaletteSearchModes: "検索モード",
|
|
190
320
|
commandPaletteSearching: "検索中...",
|
|
321
|
+
commandPaletteLoadingRoutes: "現在のページの候補を読み込み中...",
|
|
191
322
|
appInfoTitle: "アプリ情報",
|
|
192
323
|
appInfoDescription: "現在のアプリと AppShell の情報です。",
|
|
193
324
|
appInfoAppName: "アプリ名",
|
|
194
325
|
appInfoAppShellVersion: "AppShell バージョン",
|
|
195
|
-
appInfoCopy: "コピー"
|
|
326
|
+
appInfoCopy: "コピー",
|
|
327
|
+
aiChatMessage: "メッセージ",
|
|
328
|
+
aiChatSend: "送信",
|
|
329
|
+
aiChatSending: "送信中…",
|
|
330
|
+
aiChatStop: "停止",
|
|
331
|
+
aiChatScrollToLatest: "最新のメッセージまでスクロール",
|
|
332
|
+
aiChatDeleteConversation: (e) => `「${e.title}」を削除`,
|
|
333
|
+
aiChatConversationHistory: "会話履歴",
|
|
334
|
+
aiChatThinking: "思考中…",
|
|
335
|
+
aiChatThoughtFor: (e) => `${e.seconds}秒 思考しました`,
|
|
336
|
+
aiChatReasoning: "思考",
|
|
337
|
+
aiChatChainOfThought: "思考の流れ",
|
|
338
|
+
aiChatToolPreparing: "準備中",
|
|
339
|
+
aiChatToolRunning: "実行中",
|
|
340
|
+
aiChatToolDone: "完了",
|
|
341
|
+
aiChatToolError: "エラー",
|
|
342
|
+
aiChatToolParameters: "パラメータ",
|
|
343
|
+
aiChatToolResult: "結果",
|
|
344
|
+
aiChatSourcesUsed: (e) => `${e.count} 件の出典を使用`
|
|
196
345
|
}
|
|
197
|
-
}), H =
|
|
198
|
-
let e =
|
|
346
|
+
}), H = Fe.useT, U = () => {
|
|
347
|
+
let e = m(), t = H(), n = {
|
|
199
348
|
role: "alert",
|
|
200
349
|
"aria-label": "default-error-boundary"
|
|
201
350
|
};
|
|
202
|
-
if (c(e) && e.status === 404) return /* @__PURE__ */
|
|
351
|
+
if (c(e) && e.status === 404) return /* @__PURE__ */ N("div", {
|
|
203
352
|
...n,
|
|
204
353
|
className: "astw:p-6",
|
|
205
|
-
children: /* @__PURE__ */
|
|
354
|
+
children: /* @__PURE__ */ P("div", {
|
|
206
355
|
className: "astw:flex astw:items-start astw:gap-4",
|
|
207
|
-
children: [/* @__PURE__ */
|
|
208
|
-
/* @__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", {
|
|
209
358
|
className: "astw:font-semibold astw:text-lg",
|
|
210
359
|
children: t("error404Title")
|
|
211
360
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ N("p", {
|
|
213
362
|
className: "astw:text-sm astw:text-muted-foreground astw:mt-1",
|
|
214
363
|
children: t("error404Body")
|
|
215
364
|
}),
|
|
216
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ N(R, {
|
|
217
366
|
variant: "outline",
|
|
218
367
|
size: "sm",
|
|
219
368
|
className: "astw:mt-4",
|
|
@@ -224,21 +373,21 @@ var pe = () => {
|
|
|
224
373
|
})
|
|
225
374
|
});
|
|
226
375
|
let r = e instanceof Error ? e.message : t("errorUnexpected");
|
|
227
|
-
return /* @__PURE__ */
|
|
376
|
+
return /* @__PURE__ */ N("div", {
|
|
228
377
|
...n,
|
|
229
378
|
className: "astw:p-6",
|
|
230
|
-
children: /* @__PURE__ */
|
|
379
|
+
children: /* @__PURE__ */ P("div", {
|
|
231
380
|
className: "astw:flex astw:items-start astw:gap-4",
|
|
232
|
-
children: [/* @__PURE__ */
|
|
233
|
-
/* @__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", {
|
|
234
383
|
className: "astw:font-semibold astw:text-lg",
|
|
235
384
|
children: t("errorTitle")
|
|
236
385
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ N("p", {
|
|
238
387
|
className: "astw:text-sm astw:text-muted-foreground astw:mt-1",
|
|
239
388
|
children: r
|
|
240
389
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ N(R, {
|
|
242
391
|
variant: "outline",
|
|
243
392
|
size: "sm",
|
|
244
393
|
className: "astw:mt-4",
|
|
@@ -248,14 +397,14 @@ var pe = () => {
|
|
|
248
397
|
] })]
|
|
249
398
|
})
|
|
250
399
|
});
|
|
251
|
-
},
|
|
252
|
-
|
|
253
|
-
},
|
|
400
|
+
}, Ie = {}, Le = (e) => {
|
|
401
|
+
Ie = e;
|
|
402
|
+
}, Re = () => ({ type: "pass" }), ze = () => ({ type: "hidden" }), Be = (e) => ({
|
|
254
403
|
type: "redirect",
|
|
255
404
|
to: e
|
|
256
405
|
}), W = () => new Response("Not Found", { status: 404 }), G = async (e) => {
|
|
257
406
|
if (!e || e.length === 0) return { type: "pass" };
|
|
258
|
-
let t = { context:
|
|
407
|
+
let t = { context: Ie };
|
|
259
408
|
for (let n of e) {
|
|
260
409
|
let e = await n(t);
|
|
261
410
|
if (e.type !== "pass") return e;
|
|
@@ -265,20 +414,20 @@ var pe = () => {
|
|
|
265
414
|
let r = await G(e);
|
|
266
415
|
switch (r.type) {
|
|
267
416
|
case "hidden": throw W();
|
|
268
|
-
case "redirect": return
|
|
417
|
+
case "redirect": return u(r.to);
|
|
269
418
|
case "pass": return t ? t(n) : null;
|
|
270
419
|
}
|
|
271
|
-
},
|
|
272
|
-
let { configurations: n } =
|
|
273
|
-
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));
|
|
274
423
|
};
|
|
275
|
-
function
|
|
276
|
-
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;
|
|
277
426
|
return {
|
|
278
427
|
path: t,
|
|
279
428
|
type: "component",
|
|
280
429
|
_type: "module",
|
|
281
|
-
component: r ?
|
|
430
|
+
component: r ? He({
|
|
282
431
|
metaTitle: s,
|
|
283
432
|
fallbackTitle: c
|
|
284
433
|
}, (e) => r({
|
|
@@ -294,12 +443,12 @@ function Ae(e) {
|
|
|
294
443
|
icon: e.meta?.icon
|
|
295
444
|
},
|
|
296
445
|
resources: i,
|
|
297
|
-
errorBoundary: a || /* @__PURE__ */
|
|
446
|
+
errorBoundary: a || /* @__PURE__ */ N(U, {}),
|
|
298
447
|
guards: o
|
|
299
448
|
};
|
|
300
449
|
}
|
|
301
|
-
function
|
|
302
|
-
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 ?
|
|
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({
|
|
303
452
|
metaTitle: c,
|
|
304
453
|
fallbackTitle: l
|
|
305
454
|
}, (e) => r({
|
|
@@ -317,14 +466,14 @@ function je(t) {
|
|
|
317
466
|
},
|
|
318
467
|
component: d,
|
|
319
468
|
subResources: i,
|
|
320
|
-
errorBoundary: o ?? /* @__PURE__ */
|
|
469
|
+
errorBoundary: o ?? /* @__PURE__ */ N(U, {}),
|
|
321
470
|
guards: s,
|
|
322
471
|
loader: u
|
|
323
472
|
};
|
|
324
473
|
}
|
|
325
|
-
var
|
|
474
|
+
var Ge = {
|
|
326
475
|
name: "@tailor-platform/app-shell",
|
|
327
|
-
version: "1.
|
|
476
|
+
version: "1.16.0",
|
|
328
477
|
description: "An opinionated React application framework for building ERP applications on Tailor Platform",
|
|
329
478
|
keywords: [
|
|
330
479
|
"app-shell",
|
|
@@ -373,20 +522,20 @@ var Me = {
|
|
|
373
522
|
"type-check": "tsc --incremental"
|
|
374
523
|
},
|
|
375
524
|
dependencies: {
|
|
376
|
-
"@base-ui/react": "1.
|
|
377
|
-
"@internationalized/date": "3.12.
|
|
525
|
+
"@base-ui/react": "1.8.0",
|
|
526
|
+
"@internationalized/date": "3.12.4",
|
|
378
527
|
"@standard-schema/spec": "^1.1.0",
|
|
379
|
-
"@tailor-platform/auth-public-client": "^0.
|
|
528
|
+
"@tailor-platform/auth-public-client": "^0.7.0",
|
|
380
529
|
"@tailor-platform/vite-plugin-app-shell": "workspace:*",
|
|
381
530
|
"change-case": "^5.4.4",
|
|
382
531
|
"class-variance-authority": "^0.7.1",
|
|
383
532
|
clsx: "^2.1.1",
|
|
384
533
|
"encoding-japanese": "^2.2.0",
|
|
385
|
-
"lucide-react": "
|
|
534
|
+
"lucide-react": "catalog:",
|
|
386
535
|
openai: "6.45.0",
|
|
387
536
|
papaparse: "^5.5.3",
|
|
388
537
|
"react-router": "^8.3.0",
|
|
389
|
-
sonner: "^2.0.
|
|
538
|
+
sonner: "^2.0.8",
|
|
390
539
|
"tailwind-merge": "^3.6.0"
|
|
391
540
|
},
|
|
392
541
|
devDependencies: {
|
|
@@ -401,9 +550,9 @@ var Me = {
|
|
|
401
550
|
"@types/react": "catalog:",
|
|
402
551
|
"@types/react-dom": "catalog:",
|
|
403
552
|
"@vitejs/plugin-react": "catalog:",
|
|
404
|
-
"@vitest/coverage-v8": "4.1.
|
|
405
|
-
"happy-dom": "20.
|
|
406
|
-
postcss: "8.5.
|
|
553
|
+
"@vitest/coverage-v8": "4.1.11",
|
|
554
|
+
"happy-dom": "20.14.5",
|
|
555
|
+
postcss: "8.5.28",
|
|
407
556
|
react: "catalog:",
|
|
408
557
|
"react-dom": "catalog:",
|
|
409
558
|
"react-hook-form": "7.71.2",
|
|
@@ -421,26 +570,26 @@ var Me = {
|
|
|
421
570
|
};
|
|
422
571
|
//#endregion
|
|
423
572
|
//#region src/components/card/card.tsx
|
|
424
|
-
function
|
|
425
|
-
return /* @__PURE__ */
|
|
573
|
+
function Ke({ className: e, ...t }) {
|
|
574
|
+
return /* @__PURE__ */ N("div", {
|
|
426
575
|
"data-slot": "card",
|
|
427
|
-
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),
|
|
428
577
|
...t
|
|
429
578
|
});
|
|
430
579
|
}
|
|
431
|
-
|
|
432
|
-
function
|
|
433
|
-
return /* @__PURE__ */
|
|
580
|
+
Ke.displayName = "Card.Root";
|
|
581
|
+
function qe({ className: e, title: t, description: n, children: r, ...i }) {
|
|
582
|
+
return /* @__PURE__ */ P("div", {
|
|
434
583
|
"data-slot": "card-header",
|
|
435
|
-
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),
|
|
436
585
|
...i,
|
|
437
586
|
children: [
|
|
438
|
-
t && /* @__PURE__ */
|
|
587
|
+
t && /* @__PURE__ */ N("h3", {
|
|
439
588
|
"data-slot": "card-title",
|
|
440
589
|
className: "astw:text-lg astw:font-semibold astw:leading-none astw:text-card-foreground",
|
|
441
590
|
children: t
|
|
442
591
|
}),
|
|
443
|
-
n && /* @__PURE__ */
|
|
592
|
+
n && /* @__PURE__ */ N("div", {
|
|
444
593
|
"data-slot": "card-description",
|
|
445
594
|
className: "astw:text-muted-foreground astw:text-sm",
|
|
446
595
|
children: n
|
|
@@ -449,33 +598,33 @@ function Pe({ className: e, title: t, description: n, children: r, ...i }) {
|
|
|
449
598
|
]
|
|
450
599
|
});
|
|
451
600
|
}
|
|
452
|
-
|
|
453
|
-
function
|
|
454
|
-
return /* @__PURE__ */
|
|
601
|
+
qe.displayName = "Card.Header";
|
|
602
|
+
function Je({ className: e, ...t }) {
|
|
603
|
+
return /* @__PURE__ */ N("div", {
|
|
455
604
|
"data-slot": "card-content",
|
|
456
|
-
className:
|
|
605
|
+
className: I("astw:px-6 astw:pb-6 astw:first:pt-6", e),
|
|
457
606
|
...t
|
|
458
607
|
});
|
|
459
608
|
}
|
|
460
|
-
|
|
461
|
-
var
|
|
462
|
-
Root:
|
|
463
|
-
Header:
|
|
464
|
-
Content:
|
|
465
|
-
},
|
|
466
|
-
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) => {
|
|
467
616
|
n((n) => {
|
|
468
617
|
let r = new Map(n);
|
|
469
618
|
return r.set(e, t), r;
|
|
470
619
|
});
|
|
471
|
-
}, []), i =
|
|
620
|
+
}, []), i = y((e) => {
|
|
472
621
|
n((t) => {
|
|
473
622
|
if (!t.has(e)) return t;
|
|
474
623
|
let n = new Map(t);
|
|
475
624
|
return n.delete(e), n;
|
|
476
625
|
});
|
|
477
626
|
}, []);
|
|
478
|
-
return /* @__PURE__ */
|
|
627
|
+
return /* @__PURE__ */ N(Xe.Provider, {
|
|
479
628
|
value: {
|
|
480
629
|
overrides: t,
|
|
481
630
|
register: r,
|
|
@@ -483,16 +632,16 @@ var J = {
|
|
|
483
632
|
},
|
|
484
633
|
children: e
|
|
485
634
|
});
|
|
486
|
-
},
|
|
487
|
-
let e =
|
|
635
|
+
}, Qe = () => {
|
|
636
|
+
let e = b(Xe);
|
|
488
637
|
if (!e) throw Error("useBreadcrumbOverride must be used within BreadcrumbOverrideProvider");
|
|
489
638
|
return e;
|
|
490
|
-
},
|
|
639
|
+
}, $e = () => b(Xe);
|
|
491
640
|
//#endregion
|
|
492
641
|
//#region src/hooks/use-override-breadcrumb.ts
|
|
493
|
-
function
|
|
494
|
-
let t =
|
|
495
|
-
|
|
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)), [
|
|
496
645
|
i,
|
|
497
646
|
e,
|
|
498
647
|
n,
|
|
@@ -501,25 +650,25 @@ function Be(e) {
|
|
|
501
650
|
}
|
|
502
651
|
//#endregion
|
|
503
652
|
//#region src/components/internals/app-info/app-info.tsx
|
|
504
|
-
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", {
|
|
505
654
|
className: "astw:grid astw:gap-1 astw:py-3 astw:sm:grid-cols-[12rem_minmax(0,1fr)] astw:sm:gap-4",
|
|
506
|
-
children: [/* @__PURE__ */
|
|
655
|
+
children: [/* @__PURE__ */ N("dt", {
|
|
507
656
|
className: "astw:text-sm astw:text-muted-foreground",
|
|
508
657
|
children: e
|
|
509
|
-
}), /* @__PURE__ */
|
|
658
|
+
}), /* @__PURE__ */ N("dd", {
|
|
510
659
|
className: "astw:min-w-0 astw:text-sm astw:break-all",
|
|
511
|
-
children:
|
|
660
|
+
children: it(t)
|
|
512
661
|
})]
|
|
513
|
-
}),
|
|
662
|
+
}), st = () => {
|
|
514
663
|
let e = H();
|
|
515
664
|
return {
|
|
516
|
-
path:
|
|
665
|
+
path: nt,
|
|
517
666
|
title: e("appInfoTitle"),
|
|
518
667
|
breadcrumb: [e("appInfoTitle")]
|
|
519
668
|
};
|
|
520
|
-
},
|
|
521
|
-
let e = H(), { title: t, appInfo: n } =
|
|
522
|
-
|
|
669
|
+
}, ct = () => {
|
|
670
|
+
let e = H(), { title: t, appInfo: n } = V();
|
|
671
|
+
et(e("appInfoTitle"));
|
|
523
672
|
let r = [
|
|
524
673
|
...t ? [{
|
|
525
674
|
label: e("appInfoAppName"),
|
|
@@ -527,37 +676,37 @@ var Ve = "__appinfo", He = `/${Ve}`, Ue = Me.version, We = (e) => e == null ? "-
|
|
|
527
676
|
}] : [],
|
|
528
677
|
{
|
|
529
678
|
label: e("appInfoAppShellVersion"),
|
|
530
|
-
value:
|
|
679
|
+
value: rt
|
|
531
680
|
},
|
|
532
681
|
...n?.metadata ?? []
|
|
533
682
|
];
|
|
534
|
-
return /* @__PURE__ */
|
|
683
|
+
return /* @__PURE__ */ N("div", {
|
|
535
684
|
className: "astw:w-full astw:max-w-xl",
|
|
536
|
-
children: /* @__PURE__ */
|
|
685
|
+
children: /* @__PURE__ */ P(Ye.Root, { children: [/* @__PURE__ */ P("div", {
|
|
537
686
|
className: "astw:flex astw:items-center astw:justify-between astw:px-6 astw:pt-6 astw:pb-4",
|
|
538
|
-
children: [/* @__PURE__ */
|
|
687
|
+
children: [/* @__PURE__ */ N("h1", {
|
|
539
688
|
className: "astw:text-lg astw:font-semibold astw:leading-none",
|
|
540
689
|
children: e("appInfoTitle")
|
|
541
|
-
}), /* @__PURE__ */
|
|
690
|
+
}), /* @__PURE__ */ N(R, {
|
|
542
691
|
variant: "outline",
|
|
543
692
|
size: "sm",
|
|
544
693
|
onClick: async () => {
|
|
545
694
|
try {
|
|
546
|
-
await navigator.clipboard.writeText(
|
|
695
|
+
await navigator.clipboard.writeText(at(r));
|
|
547
696
|
} catch {}
|
|
548
697
|
},
|
|
549
698
|
children: e("appInfoCopy")
|
|
550
699
|
})]
|
|
551
|
-
}), /* @__PURE__ */
|
|
700
|
+
}), /* @__PURE__ */ N(Ye.Content, { children: /* @__PURE__ */ N("dl", { children: r.map((e, t) => /* @__PURE__ */ N("div", {
|
|
552
701
|
className: t > 0 ? "astw:border-t astw:border-border" : void 0,
|
|
553
|
-
children: /* @__PURE__ */
|
|
702
|
+
children: /* @__PURE__ */ N(ot, { ...e })
|
|
554
703
|
}, `${e.label}-${t}`)) }) })] })
|
|
555
704
|
});
|
|
556
|
-
},
|
|
705
|
+
}, lt = [
|
|
557
706
|
"light",
|
|
558
707
|
"dark",
|
|
559
708
|
"system"
|
|
560
|
-
],
|
|
709
|
+
], ut = [
|
|
561
710
|
{
|
|
562
711
|
value: "light",
|
|
563
712
|
label: "Light"
|
|
@@ -570,8 +719,8 @@ var Ve = "__appinfo", He = `/${Ve}`, Ue = Me.version, We = (e) => e == null ? "-
|
|
|
570
719
|
value: "system",
|
|
571
720
|
label: "System"
|
|
572
721
|
}
|
|
573
|
-
],
|
|
574
|
-
function
|
|
722
|
+
], dt = "appshell-ui-theme";
|
|
723
|
+
function ft(e, t, n) {
|
|
575
724
|
if (typeof window > "u") return n;
|
|
576
725
|
try {
|
|
577
726
|
let r = localStorage.getItem(e);
|
|
@@ -580,22 +729,22 @@ function Qe(e, t, n) {
|
|
|
580
729
|
return n;
|
|
581
730
|
}
|
|
582
731
|
}
|
|
583
|
-
function
|
|
732
|
+
function pt(e, t) {
|
|
584
733
|
return e === "system" ? t ? "dark" : "light" : e;
|
|
585
734
|
}
|
|
586
|
-
function
|
|
735
|
+
function mt() {
|
|
587
736
|
return typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
588
737
|
}
|
|
589
|
-
var
|
|
590
|
-
function
|
|
591
|
-
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) => {
|
|
592
741
|
let t = window.document.documentElement;
|
|
593
742
|
t.classList.remove("light", "dark"), t.classList.add(e);
|
|
594
743
|
}, []);
|
|
595
|
-
|
|
744
|
+
x(() => {
|
|
596
745
|
o(i);
|
|
597
746
|
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e) => {
|
|
598
|
-
let t =
|
|
747
|
+
let t = pt(n, e.matches);
|
|
599
748
|
a(t);
|
|
600
749
|
};
|
|
601
750
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
@@ -604,14 +753,14 @@ function nt({ children: e, defaultColorTheme: t = "system" }) {
|
|
|
604
753
|
i,
|
|
605
754
|
o
|
|
606
755
|
]);
|
|
607
|
-
let s =
|
|
756
|
+
let s = y((e) => {
|
|
608
757
|
try {
|
|
609
|
-
localStorage.setItem(
|
|
758
|
+
localStorage.setItem(dt, e);
|
|
610
759
|
} catch {}
|
|
611
760
|
r(e);
|
|
612
|
-
let t =
|
|
761
|
+
let t = pt(e, mt());
|
|
613
762
|
a(t), o(t);
|
|
614
|
-
}, [o]), c =
|
|
763
|
+
}, [o]), c = C(() => ({
|
|
615
764
|
colorTheme: n,
|
|
616
765
|
resolvedColorTheme: i,
|
|
617
766
|
setColorTheme: s
|
|
@@ -620,16 +769,16 @@ function nt({ children: e, defaultColorTheme: t = "system" }) {
|
|
|
620
769
|
i,
|
|
621
770
|
s
|
|
622
771
|
]);
|
|
623
|
-
return /* @__PURE__ */
|
|
772
|
+
return /* @__PURE__ */ N(ht.Provider, {
|
|
624
773
|
value: c,
|
|
625
774
|
children: e
|
|
626
775
|
});
|
|
627
776
|
}
|
|
628
|
-
var
|
|
629
|
-
let e =
|
|
777
|
+
var _t = () => {
|
|
778
|
+
let e = b(ht);
|
|
630
779
|
if (e === void 0) throw Error("useTheme must be used within a ThemeProvider");
|
|
631
780
|
let { colorTheme: t, resolvedColorTheme: n, setColorTheme: r } = e;
|
|
632
|
-
return
|
|
781
|
+
return C(() => ({
|
|
633
782
|
theme: t,
|
|
634
783
|
resolvedTheme: n,
|
|
635
784
|
setTheme: r
|
|
@@ -638,9 +787,9 @@ var rt = () => {
|
|
|
638
787
|
n,
|
|
639
788
|
r
|
|
640
789
|
]);
|
|
641
|
-
},
|
|
642
|
-
let { resolvedTheme: t } =
|
|
643
|
-
return /* @__PURE__ */
|
|
790
|
+
}, vt = ({ ...e }) => {
|
|
791
|
+
let { resolvedTheme: t } = _t();
|
|
792
|
+
return /* @__PURE__ */ N(ue, {
|
|
644
793
|
theme: t,
|
|
645
794
|
className: "astw:toaster astw:group",
|
|
646
795
|
style: {
|
|
@@ -650,41 +799,41 @@ var rt = () => {
|
|
|
650
799
|
},
|
|
651
800
|
...e
|
|
652
801
|
});
|
|
653
|
-
},
|
|
802
|
+
}, yt = () => {
|
|
654
803
|
let e = H();
|
|
655
|
-
return /* @__PURE__ */
|
|
804
|
+
return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("p", {
|
|
656
805
|
className: "astw:font-semibold astw:leading-none astw:tracking-tight",
|
|
657
806
|
children: e("welcomeTitle")
|
|
658
|
-
}), /* @__PURE__ */
|
|
807
|
+
}), /* @__PURE__ */ N("p", {
|
|
659
808
|
className: "pt-4",
|
|
660
809
|
children: e("welcomeBody")
|
|
661
810
|
})] });
|
|
662
|
-
},
|
|
663
|
-
let { configurations: e } =
|
|
664
|
-
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", {
|
|
665
814
|
className: "astw:mx-auto astw:flex-col astw:flex astw:md:flex-row astw:max-w-5xl astw:gap-[10px] astw:w-full",
|
|
666
|
-
children: [/* @__PURE__ */
|
|
815
|
+
children: [/* @__PURE__ */ N("div", { children: /* @__PURE__ */ P("nav", {
|
|
667
816
|
className: "astw:bg-card astw:md:w-xs astw:rounded-md astw:border astw:border-border astw:p-3 astw:shadow-xs",
|
|
668
|
-
children: [/* @__PURE__ */
|
|
817
|
+
children: [/* @__PURE__ */ N("h2", {
|
|
669
818
|
className: "astw:text-sm astw:leading-[36px] astw:mb-2 astw:font-bold ",
|
|
670
819
|
children: t("settings")
|
|
671
|
-
}), /* @__PURE__ */
|
|
820
|
+
}), /* @__PURE__ */ N("ul", {
|
|
672
821
|
className: "astw:flex astw:flex-col astw:gap-1",
|
|
673
|
-
children: e.settingsResources.map((e) => /* @__PURE__ */
|
|
822
|
+
children: e.settingsResources.map((e) => /* @__PURE__ */ N("li", { children: /* @__PURE__ */ N(r, {
|
|
674
823
|
to: `./${e.path}`,
|
|
675
|
-
children: ({ isActive: t }) => /* @__PURE__ */
|
|
824
|
+
children: ({ isActive: t }) => /* @__PURE__ */ P(R, {
|
|
676
825
|
variant: t ? "secondary" : "ghost",
|
|
677
826
|
className: "astw:w-full astw:justify-start",
|
|
678
827
|
children: [e.meta.icon, n(e.meta.title, e.path)]
|
|
679
828
|
})
|
|
680
829
|
}) }, e.path))
|
|
681
830
|
})]
|
|
682
|
-
}) }), /* @__PURE__ */
|
|
831
|
+
}) }), /* @__PURE__ */ N("section", {
|
|
683
832
|
className: "astw:bg-card astw:flex-1 astw:rounded-md astw:border astw:border-border astw:shadow-xs",
|
|
684
|
-
children: /* @__PURE__ */
|
|
833
|
+
children: /* @__PURE__ */ N(a, {})
|
|
685
834
|
})]
|
|
686
835
|
});
|
|
687
|
-
},
|
|
836
|
+
}, St = (e) => () => /* @__PURE__ */ N(M, { children: e }), Ct = (e) => e.component ? {
|
|
688
837
|
index: !0,
|
|
689
838
|
Component: e.component,
|
|
690
839
|
...e.loader && { loader: e.loader }
|
|
@@ -702,43 +851,44 @@ var rt = () => {
|
|
|
702
851
|
loader: () => {
|
|
703
852
|
throw W();
|
|
704
853
|
}
|
|
705
|
-
},
|
|
706
|
-
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];
|
|
707
856
|
return {
|
|
708
857
|
path: e.path,
|
|
709
|
-
|
|
858
|
+
handle: { node: e },
|
|
859
|
+
...e.errorBoundary && { ErrorBoundary: St(e.errorBoundary) },
|
|
710
860
|
...a.length > 0 ? { children: a } : {}
|
|
711
861
|
};
|
|
712
|
-
},
|
|
713
|
-
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({
|
|
714
864
|
path: "",
|
|
715
|
-
component:
|
|
865
|
+
component: yt
|
|
716
866
|
}), r = t.length > 0 ? [{
|
|
717
867
|
path: "settings",
|
|
718
868
|
index: !0,
|
|
719
|
-
Component: () => /* @__PURE__ */
|
|
869
|
+
Component: () => /* @__PURE__ */ N(i, {
|
|
720
870
|
to: t[0].path,
|
|
721
871
|
relative: "path",
|
|
722
872
|
replace: !0
|
|
723
873
|
})
|
|
724
874
|
}, {
|
|
725
875
|
path: "settings",
|
|
726
|
-
Component:
|
|
876
|
+
Component: xt,
|
|
727
877
|
children: t.map((e) => {
|
|
728
878
|
if (!e.component) throw Error(`Settings resource "${e.path}" must have a component.`);
|
|
729
879
|
return {
|
|
730
880
|
path: e.path,
|
|
731
881
|
Component: e.component,
|
|
732
|
-
...e.errorBoundary && { ErrorBoundary:
|
|
882
|
+
...e.errorBoundary && { ErrorBoundary: St(e.errorBoundary) }
|
|
733
883
|
};
|
|
734
884
|
})
|
|
735
885
|
}] : [];
|
|
736
886
|
return [
|
|
737
887
|
...n ? [n] : [],
|
|
738
|
-
{ children:
|
|
888
|
+
{ children: Tt(e) },
|
|
739
889
|
{
|
|
740
|
-
path:
|
|
741
|
-
Component:
|
|
890
|
+
path: tt,
|
|
891
|
+
Component: ct
|
|
742
892
|
},
|
|
743
893
|
...r,
|
|
744
894
|
{
|
|
@@ -750,100 +900,14 @@ var rt = () => {
|
|
|
750
900
|
ErrorBoundary: U
|
|
751
901
|
}
|
|
752
902
|
];
|
|
753
|
-
},
|
|
754
|
-
|
|
755
|
-
loader: async () => ({ navItems: gt(e) })
|
|
756
|
-
}), ht = () => m(pt)?.navItems, gt = async (e) => {
|
|
757
|
-
let t = ge(e.locale);
|
|
758
|
-
return (await Promise.all(e.modules.map(async (e) => {
|
|
759
|
-
if (e.path.startsWith(":") || (await G(e.guards)).type !== "pass") return null;
|
|
760
|
-
let n = await _t(e.resources, e.path, t);
|
|
761
|
-
return n.length === 0 && !e.meta.menuItemClickable ? null : {
|
|
762
|
-
module: e,
|
|
763
|
-
resources: n
|
|
764
|
-
};
|
|
765
|
-
}))).filter((e) => e !== null).map(({ module: e, resources: n }) => ({
|
|
766
|
-
title: t(e.meta.title, e.path),
|
|
767
|
-
url: e.meta.menuItemClickable ? e.path || "/" : void 0,
|
|
768
|
-
icon: e.meta.icon || /* @__PURE__ */ M(te, {}),
|
|
769
|
-
items: n
|
|
770
|
-
}));
|
|
771
|
-
}, _t = async (e, t, n) => (await Promise.all(e.map(async (e) => {
|
|
772
|
-
if (e.path.startsWith(":") || (await G(e.guards)).type !== "pass") return null;
|
|
773
|
-
let r = `${t}/${e.path}`, i = n(e.meta.title, e.path), a = e.component !== void 0, o = e.subResources ? await _t(e.subResources, r, n) : void 0, s = o && o.length > 0;
|
|
774
|
-
return !a && !s ? null : {
|
|
775
|
-
title: i,
|
|
776
|
-
url: a ? r : void 0,
|
|
777
|
-
items: s ? o : void 0
|
|
778
|
-
};
|
|
779
|
-
}))).filter((e) => e !== null);
|
|
780
|
-
//#endregion
|
|
781
|
-
//#region src/components/internals/breadcrumb/breadcrumb.tsx
|
|
782
|
-
function vt({ ...e }) {
|
|
783
|
-
return /* @__PURE__ */ M("nav", {
|
|
784
|
-
"aria-label": "breadcrumb",
|
|
785
|
-
"data-slot": "breadcrumb",
|
|
786
|
-
...e
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
function yt({ className: e, ...t }) {
|
|
790
|
-
return /* @__PURE__ */ M("ol", {
|
|
791
|
-
"data-slot": "breadcrumb-list",
|
|
792
|
-
className: F("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),
|
|
793
|
-
...t
|
|
794
|
-
});
|
|
795
|
-
}
|
|
796
|
-
function bt({ className: e, ...t }) {
|
|
797
|
-
return /* @__PURE__ */ M("li", {
|
|
798
|
-
"data-slot": "breadcrumb-item",
|
|
799
|
-
className: F("astw:inline-flex astw:items-center astw:gap-1.5", e),
|
|
800
|
-
...t
|
|
801
|
-
});
|
|
802
|
-
}
|
|
803
|
-
function xt({ render: e, className: t, children: r, to: i, ...a }) {
|
|
804
|
-
let o = F("astw:hover:text-foreground astw:transition-colors", t);
|
|
805
|
-
return g({
|
|
806
|
-
defaultTagName: "a",
|
|
807
|
-
render: e ?? /* @__PURE__ */ M(n, { to: i }),
|
|
808
|
-
props: {
|
|
809
|
-
"data-slot": "breadcrumb-link",
|
|
810
|
-
className: o,
|
|
811
|
-
children: r,
|
|
812
|
-
...e ? a : {
|
|
813
|
-
to: i,
|
|
814
|
-
...a
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
});
|
|
818
|
-
}
|
|
819
|
-
function St({ className: e, ariaCurrent: t = "location", ...n }) {
|
|
820
|
-
return /* @__PURE__ */ M("span", {
|
|
821
|
-
"data-slot": "breadcrumb-page",
|
|
822
|
-
"aria-disabled": "true",
|
|
823
|
-
"aria-current": t,
|
|
824
|
-
className: F("astw:text-foreground astw:font-normal", e),
|
|
825
|
-
...n
|
|
826
|
-
});
|
|
827
|
-
}
|
|
828
|
-
function Ct({ children: e, className: t, ...n }) {
|
|
829
|
-
return /* @__PURE__ */ M("li", {
|
|
830
|
-
"data-slot": "breadcrumb-separator",
|
|
831
|
-
role: "presentation",
|
|
832
|
-
"aria-hidden": "true",
|
|
833
|
-
className: F("astw:[&>svg]:size-3.5", t),
|
|
834
|
-
...n,
|
|
835
|
-
children: e ?? /* @__PURE__ */ M(b, {})
|
|
836
|
-
});
|
|
837
|
-
}
|
|
838
|
-
//#endregion
|
|
839
|
-
//#region src/routing/path.ts
|
|
840
|
-
function wt(e, t) {
|
|
903
|
+
}, q = (e) => e.startsWith(":") ? e.slice(1) : null, Dt = (e) => e.split("/").some((e) => q(e) !== null);
|
|
904
|
+
function Ot(e, t) {
|
|
841
905
|
if (!t.trim()) return e;
|
|
842
906
|
let n = t.toLowerCase();
|
|
843
907
|
return e.filter((e) => e.title.toLowerCase().includes(n) || e.path.toLowerCase().includes(n));
|
|
844
908
|
}
|
|
845
|
-
var
|
|
846
|
-
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);
|
|
847
911
|
return e.reduce((e, t) => {
|
|
848
912
|
let r = n(t.meta.title, t.path);
|
|
849
913
|
e[t.path] = {
|
|
@@ -864,8 +928,8 @@ var Tt = (e, t) => typeof e.breadcrumbTitle == "function" ? e.breadcrumbTitle(t)
|
|
|
864
928
|
return t.resources && t.resources.length > 0 && i(t.resources, t.path), e;
|
|
865
929
|
}, {});
|
|
866
930
|
};
|
|
867
|
-
function
|
|
868
|
-
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);
|
|
869
933
|
if (a.length === 0) {
|
|
870
934
|
let e = o[""];
|
|
871
935
|
if (e) return {
|
|
@@ -873,7 +937,7 @@ function Dt(e, t, n, r) {
|
|
|
873
937
|
segments: [{
|
|
874
938
|
segment: "",
|
|
875
939
|
path: "",
|
|
876
|
-
title:
|
|
940
|
+
title: kt(e, ""),
|
|
877
941
|
clickable: e.clickable
|
|
878
942
|
}]
|
|
879
943
|
};
|
|
@@ -882,13 +946,13 @@ function Dt(e, t, n, r) {
|
|
|
882
946
|
let n = a.slice(0, t + 1).join("/"), r = o[n];
|
|
883
947
|
if (!r) {
|
|
884
948
|
let e = Object.entries(o).find(([e]) => {
|
|
885
|
-
let t = e.split("/").map((e) => e
|
|
949
|
+
let t = e.split("/").map((e) => q(e) === null ? e : "[^/]+").join("/");
|
|
886
950
|
return RegExp(`^${t}$`).test(n);
|
|
887
951
|
})?.[1];
|
|
888
952
|
e && (r = e);
|
|
889
953
|
}
|
|
890
954
|
let i;
|
|
891
|
-
return i = r ?
|
|
955
|
+
return i = r ? kt(r, e) : decodeURIComponent(e), {
|
|
892
956
|
segment: e,
|
|
893
957
|
path: n,
|
|
894
958
|
title: i,
|
|
@@ -901,32 +965,179 @@ function Dt(e, t, n, r) {
|
|
|
901
965
|
};
|
|
902
966
|
}
|
|
903
967
|
//#endregion
|
|
968
|
+
//#region src/routing/navigation.tsx
|
|
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);
|
|
974
|
+
return (await Promise.all(e.modules.map(async (e) => {
|
|
975
|
+
if (q(e.path) !== null || (await G(e.guards)).type !== "pass") return null;
|
|
976
|
+
let n = await It(e.resources, e.path, t);
|
|
977
|
+
return n.length === 0 && !e.meta.menuItemClickable ? null : {
|
|
978
|
+
module: e,
|
|
979
|
+
resources: n
|
|
980
|
+
};
|
|
981
|
+
}))).filter((e) => e !== null).map(({ module: e, resources: n }) => ({
|
|
982
|
+
title: t(e.meta.title, e.path),
|
|
983
|
+
url: e.meta.menuItemClickable ? e.path || "/" : void 0,
|
|
984
|
+
icon: e.meta.icon || /* @__PURE__ */ N(ie, {}),
|
|
985
|
+
items: n
|
|
986
|
+
}));
|
|
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;
|
|
990
|
+
return !a && !s ? null : {
|
|
991
|
+
title: i,
|
|
992
|
+
url: a ? r : void 0,
|
|
993
|
+
items: s ? o : void 0
|
|
994
|
+
};
|
|
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;
|
|
997
|
+
return r.length > 0 ? `/${r.join("/")}` : "/";
|
|
998
|
+
}, Rt = (e) => e.join("/") || "/", zt = 8, Bt = (e, t) => J(e).map((e) => {
|
|
999
|
+
let n = q(e);
|
|
1000
|
+
if (n === null) return e;
|
|
1001
|
+
let r = t[n] ?? "";
|
|
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({
|
|
1005
|
+
modules: e,
|
|
1006
|
+
settingsResources: []
|
|
1007
|
+
}), Lt(r, n));
|
|
1008
|
+
if (!a) return [];
|
|
1009
|
+
let o = /* @__PURE__ */ new Map(), s = a.map((e) => {
|
|
1010
|
+
let t = e.route.handle;
|
|
1011
|
+
return t?.node ? {
|
|
1012
|
+
node: t.node,
|
|
1013
|
+
params: e.params,
|
|
1014
|
+
pathnameBase: Rt(J(e.pathnameBase))
|
|
1015
|
+
} : null;
|
|
1016
|
+
}).filter((e) => e !== null);
|
|
1017
|
+
for (let [e, t] of s.entries()) {
|
|
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({
|
|
1021
|
+
node: t.node,
|
|
1022
|
+
params: t.params,
|
|
1023
|
+
icon: a,
|
|
1024
|
+
baseSegments: J(t.pathnameBase),
|
|
1025
|
+
baseDisplaySegments: s.slice(0, e + 1).flatMap(({ node: e, params: t }) => Bt(e.path, t)),
|
|
1026
|
+
breadcrumb: n,
|
|
1027
|
+
resolveTitle: i,
|
|
1028
|
+
routeMap: o
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
1031
|
+
return [...o.values()];
|
|
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;
|
|
1034
|
+
if ("resources" in e ? e.meta.menuItemClickable : e.component !== void 0) {
|
|
1035
|
+
let t = Rt(r);
|
|
1036
|
+
s.set(t, {
|
|
1037
|
+
path: t,
|
|
1038
|
+
displayPath: Rt(i),
|
|
1039
|
+
title: o(e.meta.title, e.path),
|
|
1040
|
+
icon: n,
|
|
1041
|
+
breadcrumb: a
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
let c = "resources" in e ? e.resources : e.subResources;
|
|
1045
|
+
if (!(!c || c.length === 0)) for (let e of c) Dt(e.path) || await Ht({
|
|
1046
|
+
node: e,
|
|
1047
|
+
params: t,
|
|
1048
|
+
icon: n,
|
|
1049
|
+
baseSegments: [...r, ...J(e.path)],
|
|
1050
|
+
baseDisplaySegments: [...i, ...Bt(e.path, t)],
|
|
1051
|
+
breadcrumb: [...a, o(e.meta.title, e.path)],
|
|
1052
|
+
resolveTitle: o,
|
|
1053
|
+
routeMap: s
|
|
1054
|
+
});
|
|
1055
|
+
};
|
|
1056
|
+
//#endregion
|
|
1057
|
+
//#region src/components/internals/breadcrumb/breadcrumb.tsx
|
|
1058
|
+
function Ut({ ...e }) {
|
|
1059
|
+
return /* @__PURE__ */ N("nav", {
|
|
1060
|
+
"aria-label": "breadcrumb",
|
|
1061
|
+
"data-slot": "breadcrumb",
|
|
1062
|
+
...e
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
function Wt({ className: e, ...t }) {
|
|
1066
|
+
return /* @__PURE__ */ N("ol", {
|
|
1067
|
+
"data-slot": "breadcrumb-list",
|
|
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),
|
|
1069
|
+
...t
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
function Gt({ className: e, ...t }) {
|
|
1073
|
+
return /* @__PURE__ */ N("li", {
|
|
1074
|
+
"data-slot": "breadcrumb-item",
|
|
1075
|
+
className: I("astw:inline-flex astw:items-center astw:gap-1.5", e),
|
|
1076
|
+
...t
|
|
1077
|
+
});
|
|
1078
|
+
}
|
|
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({
|
|
1082
|
+
defaultTagName: "a",
|
|
1083
|
+
render: e ?? /* @__PURE__ */ N(n, { to: i }),
|
|
1084
|
+
props: {
|
|
1085
|
+
"data-slot": "breadcrumb-link",
|
|
1086
|
+
className: o,
|
|
1087
|
+
children: r,
|
|
1088
|
+
...e ? a : {
|
|
1089
|
+
to: i,
|
|
1090
|
+
...a
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
function qt({ className: e, ariaCurrent: t = "location", ...n }) {
|
|
1096
|
+
return /* @__PURE__ */ N("span", {
|
|
1097
|
+
"data-slot": "breadcrumb-page",
|
|
1098
|
+
"aria-disabled": "true",
|
|
1099
|
+
"aria-current": t,
|
|
1100
|
+
className: I("astw:text-foreground astw:font-normal", e),
|
|
1101
|
+
...n
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
function Jt({ children: e, className: t, ...n }) {
|
|
1105
|
+
return /* @__PURE__ */ N("li", {
|
|
1106
|
+
"data-slot": "breadcrumb-separator",
|
|
1107
|
+
role: "presentation",
|
|
1108
|
+
"aria-hidden": "true",
|
|
1109
|
+
className: I("astw:[&>svg]:size-3.5", t),
|
|
1110
|
+
...n,
|
|
1111
|
+
children: e ?? /* @__PURE__ */ N(te, {})
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
//#endregion
|
|
904
1115
|
//#region src/components/sidebar/dynamic-breadcrumb.tsx
|
|
905
|
-
var
|
|
906
|
-
let { configurations: e } =
|
|
907
|
-
return
|
|
908
|
-
},
|
|
909
|
-
let { basePath: e, segments: t } =
|
|
910
|
-
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", {
|
|
911
1122
|
className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground",
|
|
912
|
-
children: /* @__PURE__ */
|
|
1123
|
+
children: /* @__PURE__ */ N(Gt, { children: /* @__PURE__ */ N(Kt, {
|
|
913
1124
|
to: `/${r.params.prefix}/settings`,
|
|
914
1125
|
children: i("settings")
|
|
915
1126
|
}) })
|
|
916
|
-
}) }) }) : /* @__PURE__ */
|
|
1127
|
+
}) }) }) : /* @__PURE__ */ N(Ut, { children: /* @__PURE__ */ N(Wt, { children: t.map((r, i) => {
|
|
917
1128
|
let a = e ? `/${e}/${r.path}` : `/${r.path}`, o = n.get(a) ?? r.title;
|
|
918
|
-
return /* @__PURE__ */
|
|
1129
|
+
return /* @__PURE__ */ P("div", {
|
|
919
1130
|
className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground",
|
|
920
|
-
children: [/* @__PURE__ */
|
|
1131
|
+
children: [/* @__PURE__ */ N(Gt, { children: r.clickable ? /* @__PURE__ */ N(Kt, {
|
|
921
1132
|
to: r.path,
|
|
922
1133
|
children: o
|
|
923
|
-
}) : /* @__PURE__ */
|
|
1134
|
+
}) : /* @__PURE__ */ N(qt, {
|
|
924
1135
|
ariaCurrent: i === t.length - 1 && "location",
|
|
925
1136
|
children: o
|
|
926
|
-
}) }), i < t.length - 1 && /* @__PURE__ */
|
|
1137
|
+
}) }), i < t.length - 1 && /* @__PURE__ */ N(Jt, {})]
|
|
927
1138
|
}, i);
|
|
928
1139
|
}) }) });
|
|
929
|
-
},
|
|
1140
|
+
}, Zt = [
|
|
930
1141
|
{
|
|
931
1142
|
rel: "icon",
|
|
932
1143
|
type: "image/png",
|
|
@@ -944,53 +1155,54 @@ var Ot = () => {
|
|
|
944
1155
|
sizes: "180x180",
|
|
945
1156
|
href: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAQAElEQVR4AexdCZwU5ZX/v+o5GA4RjDCY9V5Xo8YYE+MRj2jWxANEGAZhAI+ojBzDocCAV1pFGG4ZD06vACMyQBBBcN0oXllRQ9Zdc4hRMSjMjDKIcs3R9fZfKNkAMz1d09XV1T1f/9433VXf9b7/+9dXr95XVWPBfAwCaYSAIXQaGdMMBTCENixIKwQModPKnGYwhtCGA2mFgCF0Wpkz2mBaRp4hdMuwc4sZpSG0j6ZeskRDpaV62Jw5+p2HH9YjnghrKx+7bxFdGUL7YOY5Jdp+9gzt+eVWzMgCluherMqMYGVNB8yfPVO7+6BCi+nCEDphplYJh9WaVapD7Rx8yADpMhsoguKX7PIcBc7ndz+mFXNK9QFAhb+NxImAIXScADZUnbPuSbNLcWduB2wUxUNk6hENldu/TxVFsx5Ez/3b5rv5CBhCA2g+fAfWdPzj2aV6L2ffV6EIAziRKRZpJ4LCWAqaMtERMISOjk9MuU/xAm/uw9qb/vHrJPI9nJFzWTHE5EYuKuPFopsKpuyhCBhCH4pJzHvCYfrID2rengiW2/VYQDJ/P+bKhxbM3rEb+YfuNnvcIGAI7Qatb8sy7JbJC7kTO3fAEroKS7n7Igg4QfNXHGKFcEkc1U1VImAxGXGBgENkuwYTeSH3Gl2LPBdVmyzKNn/cZCFTICoChtBR4fn/TLoXGQzBDSPp3mLk4jbmdGHyWo55+WXN8LrRltReE4RuSVA0PNbHHtN2jFx0y+2IF0nk6SzVkYmTM/96LWx140YcDvNpNgKG0FGgmzt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seVl3uzfueGFnY6W8wREaiP1aiO2hp7TtuhPMQqvPIU1nZ4dtN1MJfBhhC+4u36S3BCBhCJxhg07y/CHhNaH+1N70ZBA5CwBD6IEDMZmojYAid2vYz2h+EgCH0QYCYzdRG4P8AAAD//yMEVw4AAAAGSURBVAMA/Nw14Yt9Hn0AAAAASUVORK5CYII="
|
|
946
1157
|
}
|
|
947
|
-
],
|
|
1158
|
+
], Qt = " · ", $t = "data-app-shell-favicon", en = (e) => {
|
|
948
1159
|
if (e.startsWith("data:")) return e.match(/^data:([^;,]+)/)?.[1];
|
|
949
1160
|
if (e.endsWith(".svg")) return "image/svg+xml";
|
|
950
1161
|
if (e.endsWith(".png")) return "image/png";
|
|
951
1162
|
if (e.endsWith(".ico")) return "image/x-icon";
|
|
952
|
-
},
|
|
953
|
-
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;
|
|
954
1165
|
if (a) {
|
|
955
1166
|
let e = n ? `/${n}/${a.path}` : `/${a.path}`;
|
|
956
1167
|
o = i?.get(e) ?? a.title;
|
|
957
1168
|
}
|
|
958
|
-
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;
|
|
959
1170
|
return l = t ? [{
|
|
960
1171
|
rel: "icon",
|
|
961
1172
|
href: t,
|
|
962
|
-
type:
|
|
963
|
-
}] : 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", {
|
|
964
1175
|
rel: e,
|
|
965
1176
|
href: t,
|
|
966
1177
|
"data-app-shell-favicon": "",
|
|
967
1178
|
...n ? { type: n } : {},
|
|
968
1179
|
...r ? { sizes: r } : {}
|
|
969
1180
|
}, `${e}-${r ?? "any"}`))] });
|
|
970
|
-
},
|
|
971
|
-
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({
|
|
972
1183
|
modules: t.modules,
|
|
973
|
-
locale: t.locale
|
|
1184
|
+
locale: t.locale,
|
|
1185
|
+
basePath: t.basePath
|
|
974
1186
|
}), s = t.errorBoundary, c = s ? [{
|
|
975
|
-
element: /* @__PURE__ */
|
|
976
|
-
ErrorBoundary:
|
|
1187
|
+
element: /* @__PURE__ */ N(a, {}),
|
|
1188
|
+
ErrorBoundary: St(s),
|
|
977
1189
|
children: n
|
|
978
1190
|
}] : n;
|
|
979
1191
|
return {
|
|
980
1192
|
id: i,
|
|
981
1193
|
loader: o,
|
|
982
|
-
element: /* @__PURE__ */
|
|
1194
|
+
element: /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(tn, {}), r] }),
|
|
983
1195
|
children: c,
|
|
984
1196
|
HydrateFallback: () => null
|
|
985
1197
|
};
|
|
986
|
-
},
|
|
1198
|
+
}, rn = {
|
|
987
1199
|
createBrowserRouter: o,
|
|
988
1200
|
createMemoryRouter: s
|
|
989
|
-
},
|
|
990
|
-
let { children: t } = e, { configurations: n } =
|
|
1201
|
+
}, an = (e) => {
|
|
1202
|
+
let { children: t } = e, { configurations: n } = V(), r = C(() => Et({
|
|
991
1203
|
modules: n.modules,
|
|
992
1204
|
settingsResources: n.settingsResources
|
|
993
|
-
}), [n.modules, n.settingsResources]), i =
|
|
1205
|
+
}), [n.modules, n.settingsResources]), i = C(() => [nn({
|
|
994
1206
|
configurations: n,
|
|
995
1207
|
contentRoutes: r,
|
|
996
1208
|
children: t
|
|
@@ -998,67 +1210,106 @@ var Ot = () => {
|
|
|
998
1210
|
n,
|
|
999
1211
|
r,
|
|
1000
1212
|
t
|
|
1001
|
-
]), 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, {
|
|
1002
1214
|
basename: a,
|
|
1003
1215
|
...o ? { initialEntries: o } : {}
|
|
1004
|
-
}) :
|
|
1216
|
+
}) : rn.createBrowserRouter(i, { basename: a }), [
|
|
1005
1217
|
a,
|
|
1006
1218
|
o,
|
|
1007
1219
|
e.memory,
|
|
1008
1220
|
i
|
|
1009
1221
|
]);
|
|
1010
|
-
return /* @__PURE__ */
|
|
1011
|
-
},
|
|
1012
|
-
function
|
|
1013
|
-
let n =
|
|
1014
|
-
|
|
1015
|
-
}, []),
|
|
1016
|
-
|
|
1017
|
-
}), [
|
|
1018
|
-
|
|
1019
|
-
}, []),
|
|
1020
|
-
|
|
1021
|
-
}, [])
|
|
1022
|
-
|
|
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(() => {
|
|
1226
|
+
c(Array.from(i.current.values()).flat());
|
|
1227
|
+
}, []), w = y((e, t) => (i.current.set(e, t), S(), () => {
|
|
1228
|
+
i.current.delete(e), S();
|
|
1229
|
+
}), [S]), D = y(() => {
|
|
1230
|
+
p(null);
|
|
1231
|
+
}, []), O = y(() => {
|
|
1232
|
+
a.current += 1, u(!1), h([]), _(null), b(!1);
|
|
1233
|
+
}, []), k = y(() => {
|
|
1234
|
+
let e = a.current + 1;
|
|
1235
|
+
a.current = e, h([]), _(n), b(!0), Vt({
|
|
1236
|
+
modules: r.modules,
|
|
1237
|
+
locale: r.locale,
|
|
1238
|
+
basePath: r.basePath,
|
|
1239
|
+
pathname: n
|
|
1240
|
+
}).then((t) => {
|
|
1241
|
+
a.current === e && (h(t), b(!1));
|
|
1242
|
+
}).catch(() => {
|
|
1243
|
+
a.current === e && b(!1);
|
|
1244
|
+
});
|
|
1245
|
+
}, [
|
|
1246
|
+
r.basePath,
|
|
1247
|
+
r.locale,
|
|
1248
|
+
r.modules,
|
|
1249
|
+
n
|
|
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(() => {
|
|
1256
|
+
let e = o.current !== n;
|
|
1257
|
+
o.current = n, e && l && O();
|
|
1258
|
+
}, [
|
|
1259
|
+
O,
|
|
1260
|
+
l,
|
|
1261
|
+
n
|
|
1262
|
+
]), x(() => {
|
|
1023
1263
|
let e = (e) => {
|
|
1024
|
-
(e.metaKey || e.ctrlKey) && e.key === "k" && (e.preventDefault(),
|
|
1264
|
+
(e.metaKey || e.ctrlKey) && e.key === "k" && (e.preventDefault(), l ? O() : A());
|
|
1025
1265
|
};
|
|
1026
1266
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1027
|
-
}, [
|
|
1028
|
-
|
|
1029
|
-
|
|
1267
|
+
}, [
|
|
1268
|
+
O,
|
|
1269
|
+
l,
|
|
1270
|
+
A
|
|
1271
|
+
]);
|
|
1272
|
+
let M = C(() => ({ register: w }), [w]), P = C(() => ({
|
|
1273
|
+
actions: s,
|
|
1030
1274
|
searchSources: t,
|
|
1031
|
-
open:
|
|
1032
|
-
setOpen:
|
|
1033
|
-
openRequest:
|
|
1034
|
-
clearOpenRequest:
|
|
1035
|
-
openCommandPalette:
|
|
1275
|
+
open: l,
|
|
1276
|
+
setOpen: j,
|
|
1277
|
+
openRequest: f,
|
|
1278
|
+
clearOpenRequest: D,
|
|
1279
|
+
openCommandPalette: A,
|
|
1280
|
+
dynamicRoutes: g === n ? m : [],
|
|
1281
|
+
isLoadingDynamicRoutes: v || l && g !== n
|
|
1036
1282
|
}), [
|
|
1037
|
-
r,
|
|
1038
|
-
t,
|
|
1039
|
-
a,
|
|
1040
1283
|
s,
|
|
1041
|
-
|
|
1042
|
-
|
|
1284
|
+
t,
|
|
1285
|
+
l,
|
|
1286
|
+
f,
|
|
1287
|
+
D,
|
|
1288
|
+
A,
|
|
1289
|
+
m,
|
|
1290
|
+
g,
|
|
1291
|
+
v,
|
|
1292
|
+
n,
|
|
1293
|
+
j
|
|
1043
1294
|
]);
|
|
1044
|
-
return /* @__PURE__ */
|
|
1045
|
-
value:
|
|
1046
|
-
children: /* @__PURE__ */
|
|
1047
|
-
value:
|
|
1295
|
+
return /* @__PURE__ */ N(on.Provider, {
|
|
1296
|
+
value: M,
|
|
1297
|
+
children: /* @__PURE__ */ N(Y.Provider, {
|
|
1298
|
+
value: P,
|
|
1048
1299
|
children: e
|
|
1049
1300
|
})
|
|
1050
1301
|
});
|
|
1051
1302
|
}
|
|
1052
|
-
function
|
|
1053
|
-
let e =
|
|
1303
|
+
function cn() {
|
|
1304
|
+
let e = b(on);
|
|
1054
1305
|
if (!e) throw Error("useCommandPaletteDispatch must be used within CommandPaletteProvider");
|
|
1055
1306
|
return e;
|
|
1056
1307
|
}
|
|
1057
|
-
function
|
|
1058
|
-
let n =
|
|
1308
|
+
function ln(e, t) {
|
|
1309
|
+
let n = S(), { register: r } = cn(), i = T(t);
|
|
1059
1310
|
i.current = t;
|
|
1060
1311
|
let a = t.map((e) => `${e.key}\0${e.label}`).join("\n");
|
|
1061
|
-
|
|
1312
|
+
x(() => r(n, i.current.map((t) => ({
|
|
1062
1313
|
...t,
|
|
1063
1314
|
group: t.group ?? e,
|
|
1064
1315
|
onSelect: () => i.current.find((e) => e.key === t.key)?.onSelect()
|
|
@@ -1069,69 +1320,69 @@ function Vt(e, t) {
|
|
|
1069
1320
|
e
|
|
1070
1321
|
]);
|
|
1071
1322
|
}
|
|
1072
|
-
function
|
|
1073
|
-
let e =
|
|
1323
|
+
function un() {
|
|
1324
|
+
let e = b(Y);
|
|
1074
1325
|
if (!e) throw Error("useCommandPaletteState must be used within CommandPaletteProvider");
|
|
1075
1326
|
return e;
|
|
1076
1327
|
}
|
|
1077
|
-
function
|
|
1078
|
-
let e =
|
|
1328
|
+
function dn() {
|
|
1329
|
+
let e = b(Y);
|
|
1079
1330
|
if (!e) throw Error("useOpenCommandPalette must be used within CommandPaletteProvider");
|
|
1080
1331
|
return e.openCommandPalette;
|
|
1081
1332
|
}
|
|
1082
|
-
function
|
|
1083
|
-
let e =
|
|
1333
|
+
function fn() {
|
|
1334
|
+
let e = b(Y);
|
|
1084
1335
|
if (!e) throw Error("useCommandPaletteActions must be used within CommandPaletteProvider");
|
|
1085
1336
|
return e.actions;
|
|
1086
1337
|
}
|
|
1087
1338
|
//#endregion
|
|
1088
1339
|
//#region src/components/dialog/dialog.tsx
|
|
1089
|
-
function
|
|
1090
|
-
return /* @__PURE__ */
|
|
1340
|
+
function pn({ ...e }) {
|
|
1341
|
+
return /* @__PURE__ */ N(F.Root, {
|
|
1091
1342
|
"data-slot": "dialog",
|
|
1092
1343
|
...e
|
|
1093
1344
|
});
|
|
1094
1345
|
}
|
|
1095
|
-
|
|
1096
|
-
function
|
|
1097
|
-
return /* @__PURE__ */
|
|
1346
|
+
pn.displayName = "Dialog.Root";
|
|
1347
|
+
function mn({ ...e }) {
|
|
1348
|
+
return /* @__PURE__ */ N(F.Trigger, {
|
|
1098
1349
|
"data-slot": "dialog-trigger",
|
|
1099
1350
|
...e
|
|
1100
1351
|
});
|
|
1101
1352
|
}
|
|
1102
|
-
|
|
1103
|
-
function
|
|
1104
|
-
return /* @__PURE__ */
|
|
1353
|
+
mn.displayName = "Dialog.Trigger";
|
|
1354
|
+
function hn({ ...e }) {
|
|
1355
|
+
return /* @__PURE__ */ N(F.Portal, {
|
|
1105
1356
|
"data-slot": "dialog-portal",
|
|
1106
1357
|
...e
|
|
1107
1358
|
});
|
|
1108
1359
|
}
|
|
1109
|
-
|
|
1110
|
-
function
|
|
1111
|
-
return /* @__PURE__ */
|
|
1360
|
+
hn.displayName = "Dialog.Portal";
|
|
1361
|
+
function gn({ ...e }) {
|
|
1362
|
+
return /* @__PURE__ */ N(F.Close, {
|
|
1112
1363
|
"data-slot": "dialog-close",
|
|
1113
1364
|
...e
|
|
1114
1365
|
});
|
|
1115
1366
|
}
|
|
1116
|
-
|
|
1117
|
-
function
|
|
1118
|
-
return /* @__PURE__ */
|
|
1367
|
+
gn.displayName = "Dialog.Close";
|
|
1368
|
+
function _n({ className: e, ...t }) {
|
|
1369
|
+
return /* @__PURE__ */ N(F.Backdrop, {
|
|
1119
1370
|
"data-slot": "dialog-overlay",
|
|
1120
|
-
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),
|
|
1121
1372
|
...t
|
|
1122
1373
|
});
|
|
1123
1374
|
}
|
|
1124
|
-
|
|
1125
|
-
function
|
|
1126
|
-
return /* @__PURE__ */
|
|
1375
|
+
_n.displayName = "Dialog.Overlay";
|
|
1376
|
+
function vn({ className: e, children: t, ...n }) {
|
|
1377
|
+
return /* @__PURE__ */ P(hn, {
|
|
1127
1378
|
"data-slot": "dialog-portal",
|
|
1128
|
-
children: [/* @__PURE__ */
|
|
1379
|
+
children: [/* @__PURE__ */ N(_n, {}), /* @__PURE__ */ P(F.Popup, {
|
|
1129
1380
|
"data-slot": "dialog-content",
|
|
1130
|
-
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),
|
|
1131
1382
|
...n,
|
|
1132
|
-
children: [t, /* @__PURE__ */
|
|
1383
|
+
children: [t, /* @__PURE__ */ P(F.Close, {
|
|
1133
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",
|
|
1134
|
-
children: [/* @__PURE__ */
|
|
1385
|
+
children: [/* @__PURE__ */ N(ae, {}), /* @__PURE__ */ N("span", {
|
|
1135
1386
|
className: "astw:sr-only",
|
|
1136
1387
|
children: "Close"
|
|
1137
1388
|
})]
|
|
@@ -1139,70 +1390,105 @@ function Xt({ className: e, children: t, ...n }) {
|
|
|
1139
1390
|
})]
|
|
1140
1391
|
});
|
|
1141
1392
|
}
|
|
1142
|
-
|
|
1143
|
-
function
|
|
1144
|
-
return /* @__PURE__ */
|
|
1393
|
+
vn.displayName = "Dialog.Content";
|
|
1394
|
+
function yn({ className: e, ...t }) {
|
|
1395
|
+
return /* @__PURE__ */ N("div", {
|
|
1145
1396
|
"data-slot": "dialog-header",
|
|
1146
|
-
className:
|
|
1397
|
+
className: I("astw:flex astw:flex-col astw:gap-2 astw:text-center astw:sm:text-left", e),
|
|
1147
1398
|
...t
|
|
1148
1399
|
});
|
|
1149
1400
|
}
|
|
1150
|
-
|
|
1151
|
-
function
|
|
1152
|
-
return /* @__PURE__ */
|
|
1401
|
+
yn.displayName = "Dialog.Header";
|
|
1402
|
+
function bn({ className: e, ...t }) {
|
|
1403
|
+
return /* @__PURE__ */ N("div", {
|
|
1153
1404
|
"data-slot": "dialog-footer",
|
|
1154
|
-
className:
|
|
1405
|
+
className: I("astw:flex astw:flex-col-reverse astw:gap-2 astw:sm:flex-row astw:sm:justify-end", e),
|
|
1155
1406
|
...t
|
|
1156
1407
|
});
|
|
1157
1408
|
}
|
|
1158
|
-
|
|
1159
|
-
function
|
|
1160
|
-
return /* @__PURE__ */
|
|
1409
|
+
bn.displayName = "Dialog.Footer";
|
|
1410
|
+
function xn({ className: e, ...t }) {
|
|
1411
|
+
return /* @__PURE__ */ N(F.Title, {
|
|
1161
1412
|
"data-slot": "dialog-title",
|
|
1162
|
-
className:
|
|
1413
|
+
className: I("astw:text-lg astw:leading-none astw:font-semibold", e),
|
|
1163
1414
|
...t
|
|
1164
1415
|
});
|
|
1165
1416
|
}
|
|
1166
|
-
|
|
1167
|
-
function
|
|
1168
|
-
return /* @__PURE__ */
|
|
1417
|
+
xn.displayName = "Dialog.Title";
|
|
1418
|
+
function Sn({ className: e, ...t }) {
|
|
1419
|
+
return /* @__PURE__ */ N(F.Description, {
|
|
1169
1420
|
"data-slot": "dialog-description",
|
|
1170
|
-
className:
|
|
1421
|
+
className: I("astw:text-muted-foreground astw:text-sm", e),
|
|
1171
1422
|
...t
|
|
1172
1423
|
});
|
|
1173
1424
|
}
|
|
1174
|
-
|
|
1425
|
+
Sn.displayName = "Dialog.Description";
|
|
1175
1426
|
var X = {
|
|
1176
|
-
Root:
|
|
1177
|
-
Close:
|
|
1178
|
-
Content:
|
|
1179
|
-
Description:
|
|
1180
|
-
Footer:
|
|
1181
|
-
Header:
|
|
1182
|
-
Title:
|
|
1183
|
-
Trigger:
|
|
1184
|
-
},
|
|
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 = [
|
|
1185
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",
|
|
1186
1437
|
"astw:dark:bg-input/30 astw:transition-[color,box-shadow]",
|
|
1187
1438
|
"astw:selection:bg-primary astw:selection:text-primary-foreground",
|
|
1188
1439
|
"astw:placeholder:text-muted-foreground",
|
|
1189
1440
|
"astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px]",
|
|
1190
1441
|
"astw:disabled:pointer-events-none astw:disabled:cursor-not-allowed astw:disabled:opacity-50"
|
|
1191
|
-
],
|
|
1442
|
+
], wn = [...Cn, "astw:h-9 astw:py-1"], Tn = [...Cn, "astw:min-h-16 astw:py-2 astw:resize-y"];
|
|
1192
1443
|
//#endregion
|
|
1193
1444
|
//#region src/components/input/input.tsx
|
|
1194
|
-
function
|
|
1195
|
-
|
|
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),
|
|
1196
1449
|
type: t,
|
|
1197
1450
|
"data-slot": "input",
|
|
1198
|
-
className:
|
|
1199
|
-
...
|
|
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
|
|
1453
|
+
});
|
|
1454
|
+
}
|
|
1455
|
+
//#endregion
|
|
1456
|
+
//#region src/components/spinner/spinner.tsx
|
|
1457
|
+
var Dn = {
|
|
1458
|
+
xs: 12,
|
|
1459
|
+
sm: 14,
|
|
1460
|
+
default: 16,
|
|
1461
|
+
lg: 20
|
|
1462
|
+
};
|
|
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", {
|
|
1466
|
+
"data-slot": "spinner",
|
|
1467
|
+
viewBox: "0 0 16 16",
|
|
1468
|
+
fill: "none",
|
|
1469
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1470
|
+
...i,
|
|
1471
|
+
width: n ?? s,
|
|
1472
|
+
height: r ?? s,
|
|
1473
|
+
className: I("astw:animate-spin astw:shrink-0", e),
|
|
1474
|
+
role: o ? void 0 : i.role ?? "status",
|
|
1475
|
+
"aria-hidden": o ? !0 : i["aria-hidden"],
|
|
1476
|
+
children: /* @__PURE__ */ N("circle", {
|
|
1477
|
+
cx: "8",
|
|
1478
|
+
cy: "8",
|
|
1479
|
+
r: "6",
|
|
1480
|
+
stroke: "currentColor",
|
|
1481
|
+
strokeWidth: "2",
|
|
1482
|
+
strokeLinecap: "round",
|
|
1483
|
+
strokeDasharray: "24 24",
|
|
1484
|
+
strokeDashoffset: "8"
|
|
1485
|
+
})
|
|
1200
1486
|
});
|
|
1201
1487
|
}
|
|
1202
1488
|
//#endregion
|
|
1203
1489
|
//#region src/components/command-palette/command-palette.tsx
|
|
1204
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";
|
|
1205
|
-
function
|
|
1491
|
+
function kn(e) {
|
|
1206
1492
|
let t = [], n = (e, r, i) => {
|
|
1207
1493
|
e.forEach((e) => {
|
|
1208
1494
|
let a = [...i, e.title];
|
|
@@ -1223,17 +1509,17 @@ function on(e) {
|
|
|
1223
1509
|
}), n(e.items, e.icon, [e.title]);
|
|
1224
1510
|
}), t;
|
|
1225
1511
|
}
|
|
1226
|
-
function
|
|
1512
|
+
function An(e, t) {
|
|
1227
1513
|
if (!t.trim()) return e;
|
|
1228
1514
|
let n = t.toLowerCase();
|
|
1229
1515
|
return e.filter((e) => e.label.toLowerCase().includes(n));
|
|
1230
1516
|
}
|
|
1231
|
-
var
|
|
1517
|
+
var jn = 300, Mn = (e) => e === "/" || e.startsWith("/_"), Nn = {
|
|
1232
1518
|
mode: "browse",
|
|
1233
1519
|
search: "",
|
|
1234
1520
|
selectedIndex: 0
|
|
1235
|
-
},
|
|
1236
|
-
function
|
|
1521
|
+
}, Pn = [];
|
|
1522
|
+
function Fn(e, t) {
|
|
1237
1523
|
switch (t.type) {
|
|
1238
1524
|
case "SET_SEARCH": return e.mode === "search" ? {
|
|
1239
1525
|
...e,
|
|
@@ -1271,7 +1557,7 @@ function dn(e, t) {
|
|
|
1271
1557
|
results: [],
|
|
1272
1558
|
isSearching: !1
|
|
1273
1559
|
};
|
|
1274
|
-
case "EXIT_SEARCH_MODE": return
|
|
1560
|
+
case "EXIT_SEARCH_MODE": return Nn;
|
|
1275
1561
|
case "SEARCH_START": return e.mode === "search" ? {
|
|
1276
1562
|
...e,
|
|
1277
1563
|
isSearching: !0,
|
|
@@ -1295,10 +1581,10 @@ function dn(e, t) {
|
|
|
1295
1581
|
...e,
|
|
1296
1582
|
selectedIndex: Math.max(e.selectedIndex - 1, 0)
|
|
1297
1583
|
};
|
|
1298
|
-
case "RESET": return
|
|
1584
|
+
case "RESET": return Nn;
|
|
1299
1585
|
}
|
|
1300
1586
|
}
|
|
1301
|
-
function
|
|
1587
|
+
function In(e, t) {
|
|
1302
1588
|
let n = e.indexOf(":");
|
|
1303
1589
|
if (n < 1) return {
|
|
1304
1590
|
activeSource: null,
|
|
@@ -1313,25 +1599,28 @@ function fn(e, t) {
|
|
|
1313
1599
|
searchQuery: e
|
|
1314
1600
|
};
|
|
1315
1601
|
}
|
|
1316
|
-
function
|
|
1317
|
-
let a =
|
|
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), [
|
|
1318
1604
|
t,
|
|
1319
1605
|
u,
|
|
1320
|
-
|
|
1321
|
-
]), _ =
|
|
1606
|
+
f
|
|
1607
|
+
]), _ = C(() => f ? [] : Ot(e, u).toSorted((e, t) => {
|
|
1608
|
+
let n = Mn(e.path), r = Mn(t.path);
|
|
1609
|
+
return Number(n) - Number(r) || e.path.localeCompare(t.path);
|
|
1610
|
+
}), [
|
|
1322
1611
|
e,
|
|
1323
1612
|
u,
|
|
1324
|
-
|
|
1613
|
+
f
|
|
1325
1614
|
]);
|
|
1326
|
-
|
|
1327
|
-
if (!
|
|
1615
|
+
x(() => {
|
|
1616
|
+
if (!f) {
|
|
1328
1617
|
l.current?.abort(), l.current = null;
|
|
1329
1618
|
return;
|
|
1330
1619
|
}
|
|
1331
1620
|
let e = setTimeout(() => {
|
|
1332
1621
|
c({ type: "SEARCH_START" }), l.current?.abort();
|
|
1333
1622
|
let e = new AbortController();
|
|
1334
|
-
l.current = e,
|
|
1623
|
+
l.current = e, f.search(u, { signal: e.signal }).then((t) => {
|
|
1335
1624
|
e.signal.aborted || c({
|
|
1336
1625
|
type: "SEARCH_DONE",
|
|
1337
1626
|
results: t
|
|
@@ -1339,16 +1628,16 @@ function pn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1339
1628
|
}).catch(() => {
|
|
1340
1629
|
e.signal.aborted || c({ type: "SEARCH_FAIL" });
|
|
1341
1630
|
});
|
|
1342
|
-
},
|
|
1631
|
+
}, jn);
|
|
1343
1632
|
return () => {
|
|
1344
1633
|
clearTimeout(e), l.current?.abort(), l.current = null;
|
|
1345
1634
|
};
|
|
1346
|
-
}, [
|
|
1347
|
-
let v =
|
|
1348
|
-
if (
|
|
1635
|
+
}, [f, u]);
|
|
1636
|
+
let v = C(() => {
|
|
1637
|
+
if (f) return m.map((e) => ({
|
|
1349
1638
|
type: "search-result",
|
|
1350
1639
|
result: e,
|
|
1351
|
-
source:
|
|
1640
|
+
source: f
|
|
1352
1641
|
}));
|
|
1353
1642
|
let e = [];
|
|
1354
1643
|
if (n.length > 0) {
|
|
@@ -1366,13 +1655,13 @@ function pn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1366
1655
|
route: e
|
|
1367
1656
|
}))), e;
|
|
1368
1657
|
}, [
|
|
1369
|
-
|
|
1658
|
+
f,
|
|
1370
1659
|
m,
|
|
1371
1660
|
u,
|
|
1372
1661
|
n,
|
|
1373
1662
|
g,
|
|
1374
1663
|
_
|
|
1375
|
-
]),
|
|
1664
|
+
]), b = y((e) => {
|
|
1376
1665
|
if (s.mode === "search") {
|
|
1377
1666
|
c({
|
|
1378
1667
|
type: "SET_SEARCH",
|
|
@@ -1380,28 +1669,28 @@ function pn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1380
1669
|
});
|
|
1381
1670
|
return;
|
|
1382
1671
|
}
|
|
1383
|
-
let t =
|
|
1672
|
+
let t = In(e, n);
|
|
1384
1673
|
c({
|
|
1385
1674
|
type: "SET_SEARCH",
|
|
1386
1675
|
value: e,
|
|
1387
1676
|
detectedSource: t.activeSource ?? void 0,
|
|
1388
1677
|
detectedQuery: t.activeSource ? t.searchQuery : void 0
|
|
1389
1678
|
});
|
|
1390
|
-
}, [s.mode, n]),
|
|
1391
|
-
let t =
|
|
1679
|
+
}, [s.mode, n]), S = y((e) => {
|
|
1680
|
+
let t = In(e, n);
|
|
1392
1681
|
c({
|
|
1393
1682
|
type: "INITIALIZE_SEARCH",
|
|
1394
1683
|
value: e,
|
|
1395
1684
|
detectedSource: t.activeSource ?? void 0,
|
|
1396
1685
|
detectedQuery: t.activeSource ? t.searchQuery : void 0
|
|
1397
1686
|
});
|
|
1398
|
-
}, [n]),
|
|
1687
|
+
}, [n]), E = y((e) => {
|
|
1399
1688
|
i(e), e || (c({ type: "RESET" }), l.current?.abort(), l.current = null);
|
|
1400
1689
|
}, [i]);
|
|
1401
|
-
|
|
1690
|
+
x(() => {
|
|
1402
1691
|
o.current && o.current.querySelector(`[data-index="${d}"]`)?.scrollIntoView({ block: "nearest" });
|
|
1403
1692
|
}, [d]);
|
|
1404
|
-
let
|
|
1693
|
+
let D = y((e) => {
|
|
1405
1694
|
if (e.type === "search-mode") {
|
|
1406
1695
|
c({
|
|
1407
1696
|
type: "ENTER_SEARCH_MODE",
|
|
@@ -1419,19 +1708,19 @@ function pn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1419
1708
|
}, [a, i]);
|
|
1420
1709
|
return {
|
|
1421
1710
|
open: r,
|
|
1422
|
-
handleOpenChange:
|
|
1711
|
+
handleOpenChange: E,
|
|
1423
1712
|
search: u,
|
|
1424
|
-
setSearch:
|
|
1425
|
-
initializeSearch:
|
|
1713
|
+
setSearch: b,
|
|
1714
|
+
initializeSearch: S,
|
|
1426
1715
|
selectedIndex: d,
|
|
1427
1716
|
filteredActions: g,
|
|
1428
1717
|
filteredRoutes: _,
|
|
1429
1718
|
searchResults: m,
|
|
1430
|
-
activeSearchSource:
|
|
1719
|
+
activeSearchSource: f,
|
|
1431
1720
|
isSearching: h,
|
|
1432
1721
|
selectableItems: v,
|
|
1433
|
-
handleSelectItem:
|
|
1434
|
-
handleKeyDown:
|
|
1722
|
+
handleSelectItem: D,
|
|
1723
|
+
handleKeyDown: y((e) => {
|
|
1435
1724
|
if (!e.nativeEvent.isComposing) switch (e.key) {
|
|
1436
1725
|
case "ArrowDown":
|
|
1437
1726
|
e.preventDefault(), c({
|
|
@@ -1443,196 +1732,208 @@ function pn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1443
1732
|
e.preventDefault(), c({ type: "ARROW_UP" });
|
|
1444
1733
|
break;
|
|
1445
1734
|
case "Enter":
|
|
1446
|
-
e.preventDefault(), v[d] &&
|
|
1735
|
+
e.preventDefault(), v[d] && D(v[d]);
|
|
1447
1736
|
break;
|
|
1448
|
-
case "Backspace":
|
|
1737
|
+
case "Backspace": f && u === "" && (e.preventDefault(), c({ type: "EXIT_SEARCH_MODE" }), l.current?.abort(), l.current = null);
|
|
1449
1738
|
}
|
|
1450
1739
|
}, [
|
|
1451
1740
|
v,
|
|
1452
1741
|
d,
|
|
1453
|
-
|
|
1454
|
-
|
|
1742
|
+
D,
|
|
1743
|
+
f,
|
|
1455
1744
|
u
|
|
1456
1745
|
]),
|
|
1457
1746
|
listRef: o
|
|
1458
1747
|
};
|
|
1459
1748
|
}
|
|
1460
|
-
function
|
|
1461
|
-
let n = H(), r =
|
|
1462
|
-
routes:
|
|
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),
|
|
1753
|
+
...t,
|
|
1754
|
+
...l
|
|
1755
|
+
], [
|
|
1756
|
+
l,
|
|
1757
|
+
t,
|
|
1758
|
+
e
|
|
1759
|
+
]),
|
|
1463
1760
|
contextualActions: r,
|
|
1464
1761
|
searchSources: i,
|
|
1465
1762
|
open: a,
|
|
1466
1763
|
setOpen: o
|
|
1467
1764
|
});
|
|
1468
|
-
|
|
1469
|
-
s && (
|
|
1765
|
+
x(() => {
|
|
1766
|
+
s && (h(s.search ?? ""), c());
|
|
1470
1767
|
}, [
|
|
1471
1768
|
s,
|
|
1472
|
-
|
|
1769
|
+
h,
|
|
1473
1770
|
c
|
|
1474
1771
|
]);
|
|
1475
|
-
let
|
|
1476
|
-
return /* @__PURE__ */
|
|
1477
|
-
open:
|
|
1478
|
-
onOpenChange:
|
|
1479
|
-
children: /* @__PURE__ */
|
|
1480
|
-
className: "astw:p-0 astw:gap-0 astw:sm:max-w-2xl astw:overflow-hidden astw:top-[30%] astw:translate-y-[-30%]",
|
|
1481
|
-
onKeyDown:
|
|
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, {
|
|
1774
|
+
open: d,
|
|
1775
|
+
onOpenChange: f,
|
|
1776
|
+
children: /* @__PURE__ */ P(X.Content, {
|
|
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%]",
|
|
1778
|
+
onKeyDown: E,
|
|
1482
1779
|
"aria-describedby": void 0,
|
|
1483
1780
|
children: [
|
|
1484
|
-
/* @__PURE__ */
|
|
1781
|
+
/* @__PURE__ */ N(X.Title, {
|
|
1485
1782
|
className: "astw:sr-only",
|
|
1486
1783
|
children: n("commandPaletteSearch")
|
|
1487
1784
|
}),
|
|
1488
|
-
/* @__PURE__ */
|
|
1785
|
+
/* @__PURE__ */ P("div", {
|
|
1489
1786
|
className: "astw:flex astw:items-center astw:border-b astw:border-border astw:px-3 astw:py-1",
|
|
1490
1787
|
children: [
|
|
1491
|
-
/* @__PURE__ */
|
|
1492
|
-
|
|
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", {
|
|
1493
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",
|
|
1494
|
-
children:
|
|
1791
|
+
children: b.prefix
|
|
1495
1792
|
}),
|
|
1496
|
-
/* @__PURE__ */
|
|
1497
|
-
value:
|
|
1498
|
-
onChange: (e) =>
|
|
1793
|
+
/* @__PURE__ */ N(En, {
|
|
1794
|
+
value: p,
|
|
1795
|
+
onChange: (e) => m(e.target.value),
|
|
1499
1796
|
placeholder: n("commandPaletteSearch"),
|
|
1500
1797
|
className: "astw:flex astw:h-10 astw:w-full astw:rounded-md astw:bg-transparent astw:py-3 astw:text-sm astw:outline-none astw:border-0 astw:shadow-none astw:focus-visible:ring-0 astw:placeholder:text-muted-foreground astw:disabled:cursor-not-allowed astw:disabled:opacity-50",
|
|
1501
1798
|
autoFocus: !0
|
|
1502
1799
|
})
|
|
1503
1800
|
]
|
|
1504
1801
|
}),
|
|
1505
|
-
/* @__PURE__ */
|
|
1506
|
-
ref:
|
|
1802
|
+
/* @__PURE__ */ P("div", {
|
|
1803
|
+
ref: D,
|
|
1507
1804
|
className: "astw:max-h-[50vh] astw:overflow-y-auto astw:overflow-x-hidden",
|
|
1508
|
-
children: [
|
|
1805
|
+
children: [w.length === 0 && !S && !u ? /* @__PURE__ */ N("div", {
|
|
1509
1806
|
className: "astw:py-6 astw:text-center astw:text-sm astw:text-muted-foreground",
|
|
1510
1807
|
children: n("commandPaletteNoResults")
|
|
1511
|
-
}) : /* @__PURE__ */
|
|
1808
|
+
}) : /* @__PURE__ */ P("div", {
|
|
1512
1809
|
className: "astw:p-1",
|
|
1513
1810
|
children: [
|
|
1514
|
-
|
|
1811
|
+
u && /* @__PURE__ */ P("output", {
|
|
1812
|
+
className: "astw:flex astw:items-center astw:justify-center astw:gap-2 astw:py-4 astw:text-sm astw:text-muted-foreground",
|
|
1813
|
+
children: [/* @__PURE__ */ N(On, { "aria-label": n("commandPaletteLoadingRoutes") }), n("commandPaletteLoadingRoutes")]
|
|
1814
|
+
}),
|
|
1815
|
+
k > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1515
1816
|
className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1516
1817
|
children: n("commandPaletteSearchModes")
|
|
1517
|
-
}),
|
|
1818
|
+
}), O.map((e, t) => {
|
|
1518
1819
|
let n = e.type === "search-mode" ? e.source : null;
|
|
1519
|
-
return n ? /* @__PURE__ */
|
|
1820
|
+
return n ? /* @__PURE__ */ P("button", {
|
|
1520
1821
|
"data-index": t,
|
|
1521
|
-
onClick: () =>
|
|
1822
|
+
onClick: () => T({
|
|
1522
1823
|
type: "search-mode",
|
|
1523
1824
|
source: n
|
|
1524
1825
|
}),
|
|
1525
|
-
className:
|
|
1826
|
+
className: I(Z, "astw:items-center astw:gap-2", Q(t === g)),
|
|
1526
1827
|
children: [
|
|
1527
|
-
n.icon && /* @__PURE__ */
|
|
1828
|
+
n.icon && /* @__PURE__ */ N("span", {
|
|
1528
1829
|
className: "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0",
|
|
1529
1830
|
children: n.icon
|
|
1530
1831
|
}),
|
|
1531
|
-
/* @__PURE__ */
|
|
1832
|
+
/* @__PURE__ */ P("span", {
|
|
1532
1833
|
className: "astw:font-mono astw:text-xs astw:text-muted-foreground astw:shrink-0",
|
|
1533
1834
|
children: [n.prefix, ":"]
|
|
1534
1835
|
}),
|
|
1535
|
-
/* @__PURE__ */
|
|
1836
|
+
/* @__PURE__ */ N("span", {
|
|
1536
1837
|
className: "astw:truncate",
|
|
1537
1838
|
children: n.title
|
|
1538
1839
|
})
|
|
1539
1840
|
]
|
|
1540
1841
|
}, `search-mode-${n.prefix}`) : null;
|
|
1541
1842
|
})] }),
|
|
1542
|
-
|
|
1843
|
+
_.length > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1543
1844
|
className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1544
1845
|
children: n("commandPaletteActions")
|
|
1545
|
-
}),
|
|
1546
|
-
let n =
|
|
1547
|
-
return /* @__PURE__ */
|
|
1846
|
+
}), _.map((e, t) => {
|
|
1847
|
+
let n = A + t;
|
|
1848
|
+
return /* @__PURE__ */ P("button", {
|
|
1548
1849
|
"data-index": n,
|
|
1549
|
-
onClick: () =>
|
|
1850
|
+
onClick: () => T({
|
|
1550
1851
|
type: "action",
|
|
1551
1852
|
action: e
|
|
1552
1853
|
}),
|
|
1553
|
-
className:
|
|
1854
|
+
className: I(Z, "astw:items-center astw:gap-2", Q(n === g)),
|
|
1554
1855
|
children: [
|
|
1555
|
-
e.icon && /* @__PURE__ */
|
|
1856
|
+
e.icon && /* @__PURE__ */ N("span", {
|
|
1556
1857
|
className: "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0",
|
|
1557
1858
|
children: e.icon
|
|
1558
1859
|
}),
|
|
1559
|
-
/* @__PURE__ */
|
|
1860
|
+
/* @__PURE__ */ N("span", {
|
|
1560
1861
|
className: "astw:truncate",
|
|
1561
1862
|
children: e.label
|
|
1562
1863
|
}),
|
|
1563
|
-
e.group && /* @__PURE__ */
|
|
1864
|
+
e.group && /* @__PURE__ */ N("span", {
|
|
1564
1865
|
className: "astw:ml-auto astw:text-xs astw:text-muted-foreground astw:shrink-0",
|
|
1565
1866
|
children: e.group
|
|
1566
1867
|
})
|
|
1567
1868
|
]
|
|
1568
1869
|
}, `action-${e.key}`);
|
|
1569
1870
|
})] }),
|
|
1570
|
-
|
|
1871
|
+
v.length > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1571
1872
|
className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1572
1873
|
children: n("commandPalettePages")
|
|
1573
|
-
}),
|
|
1574
|
-
let n =
|
|
1575
|
-
return /* @__PURE__ */
|
|
1874
|
+
}), v.map((e, t) => {
|
|
1875
|
+
let n = j + t, r = e.displayPath ?? e.path;
|
|
1876
|
+
return /* @__PURE__ */ P("button", {
|
|
1576
1877
|
"data-index": n,
|
|
1577
|
-
onClick: () =>
|
|
1878
|
+
onClick: () => T({
|
|
1578
1879
|
type: "route",
|
|
1579
1880
|
route: e
|
|
1580
1881
|
}),
|
|
1581
|
-
className:
|
|
1582
|
-
children: [/* @__PURE__ */
|
|
1882
|
+
className: I(Z, "astw:flex-col astw:items-start", Q(n === g)),
|
|
1883
|
+
children: [/* @__PURE__ */ N("span", {
|
|
1583
1884
|
className: "astw:truncate astw:w-full astw:text-left",
|
|
1584
1885
|
children: e.breadcrumb.join(" > ")
|
|
1585
|
-
}), /* @__PURE__ */
|
|
1886
|
+
}), /* @__PURE__ */ N("span", {
|
|
1586
1887
|
className: "astw:text-[11px] astw:text-muted-foreground astw:truncate astw:w-full astw:text-left",
|
|
1587
|
-
children:
|
|
1888
|
+
children: r.startsWith("/") ? r : `/${r}`
|
|
1588
1889
|
})]
|
|
1589
1890
|
}, e.path);
|
|
1590
1891
|
})] }),
|
|
1591
|
-
|
|
1892
|
+
b && y.length > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1592
1893
|
className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1593
|
-
children:
|
|
1594
|
-
}),
|
|
1894
|
+
children: b.title
|
|
1895
|
+
}), y.map((e, t) => /* @__PURE__ */ P("button", {
|
|
1595
1896
|
"data-index": t,
|
|
1596
|
-
onClick: () =>
|
|
1897
|
+
onClick: () => T({
|
|
1597
1898
|
type: "search-result",
|
|
1598
1899
|
result: e,
|
|
1599
|
-
source:
|
|
1900
|
+
source: b
|
|
1600
1901
|
}),
|
|
1601
|
-
className:
|
|
1602
|
-
children: [/* @__PURE__ */
|
|
1902
|
+
className: I(Z, "astw:flex-col astw:items-start", Q(t === g)),
|
|
1903
|
+
children: [/* @__PURE__ */ P("span", {
|
|
1603
1904
|
className: "astw:flex astw:items-center astw:gap-2 astw:w-full",
|
|
1604
|
-
children: [(e.icon ||
|
|
1905
|
+
children: [(e.icon || b.icon) && /* @__PURE__ */ N("span", {
|
|
1605
1906
|
className: "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0",
|
|
1606
|
-
children: e.icon ??
|
|
1607
|
-
}), /* @__PURE__ */
|
|
1907
|
+
children: e.icon ?? b.icon
|
|
1908
|
+
}), /* @__PURE__ */ N("span", {
|
|
1608
1909
|
className: "astw:truncate",
|
|
1609
1910
|
children: e.label
|
|
1610
1911
|
})]
|
|
1611
|
-
}), e.description && /* @__PURE__ */
|
|
1912
|
+
}), e.description && /* @__PURE__ */ N("span", {
|
|
1612
1913
|
className: "astw:text-[11px] astw:text-muted-foreground astw:truncate astw:w-full astw:text-left",
|
|
1613
1914
|
children: e.description
|
|
1614
1915
|
})]
|
|
1615
1916
|
}, `search-result-${e.key}`))] })
|
|
1616
1917
|
]
|
|
1617
|
-
}),
|
|
1918
|
+
}), S && /* @__PURE__ */ P("div", {
|
|
1618
1919
|
className: "astw:flex astw:items-center astw:justify-center astw:gap-2 astw:py-4 astw:text-sm astw:text-muted-foreground",
|
|
1619
|
-
children: [/* @__PURE__ */
|
|
1920
|
+
children: [/* @__PURE__ */ N(On, {}), n("commandPaletteSearching")]
|
|
1620
1921
|
})]
|
|
1621
1922
|
})
|
|
1622
1923
|
]
|
|
1623
1924
|
})
|
|
1624
1925
|
});
|
|
1625
1926
|
}
|
|
1626
|
-
function
|
|
1927
|
+
function zn() {
|
|
1627
1928
|
return null;
|
|
1628
1929
|
}
|
|
1629
|
-
function
|
|
1630
|
-
let e =
|
|
1631
|
-
return /* @__PURE__ */
|
|
1930
|
+
function Bn() {
|
|
1931
|
+
let e = Pt(), n = st();
|
|
1932
|
+
return /* @__PURE__ */ N(_, {
|
|
1632
1933
|
fallback: null,
|
|
1633
|
-
children: /* @__PURE__ */
|
|
1934
|
+
children: /* @__PURE__ */ N(t, {
|
|
1634
1935
|
resolve: e,
|
|
1635
|
-
children: (e) => /* @__PURE__ */
|
|
1936
|
+
children: (e) => /* @__PURE__ */ N(Rn, {
|
|
1636
1937
|
navItems: e ?? [],
|
|
1637
1938
|
extraRoutes: [n]
|
|
1638
1939
|
})
|
|
@@ -1641,13 +1942,13 @@ function gn() {
|
|
|
1641
1942
|
}
|
|
1642
1943
|
//#endregion
|
|
1643
1944
|
//#region src/hooks/use-is-client.ts
|
|
1644
|
-
var
|
|
1645
|
-
function
|
|
1646
|
-
return
|
|
1945
|
+
var Vn = () => () => {}, Hn = () => !0, Un = () => !1;
|
|
1946
|
+
function Wn() {
|
|
1947
|
+
return D(Vn, Hn, Un);
|
|
1647
1948
|
}
|
|
1648
1949
|
//#endregion
|
|
1649
1950
|
//#region src/fs-routes/converter.tsx
|
|
1650
|
-
function
|
|
1951
|
+
function Gn(e) {
|
|
1651
1952
|
let t = {
|
|
1652
1953
|
path: "",
|
|
1653
1954
|
fullPath: "",
|
|
@@ -1666,12 +1967,12 @@ function xn(e) {
|
|
|
1666
1967
|
}
|
|
1667
1968
|
return t;
|
|
1668
1969
|
}
|
|
1669
|
-
function
|
|
1670
|
-
return e?.appShellPageProps?.meta?.title ??
|
|
1970
|
+
function Kn(e, t) {
|
|
1971
|
+
return e?.appShellPageProps?.meta?.title ?? Ve(t);
|
|
1671
1972
|
}
|
|
1672
|
-
function
|
|
1673
|
-
let t = e.component, n =
|
|
1674
|
-
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));
|
|
1675
1976
|
return {
|
|
1676
1977
|
_type: "resource",
|
|
1677
1978
|
type: "component",
|
|
@@ -1681,16 +1982,16 @@ function Cn(e) {
|
|
|
1681
1982
|
icon: r,
|
|
1682
1983
|
...i === void 0 ? {} : { breadcrumbTitle: i }
|
|
1683
1984
|
},
|
|
1684
|
-
component: t ? () => /* @__PURE__ */
|
|
1985
|
+
component: t ? () => /* @__PURE__ */ N(t, {}) : void 0,
|
|
1685
1986
|
subResources: o.length > 0 ? o : void 0,
|
|
1686
|
-
errorBoundary: /* @__PURE__ */
|
|
1987
|
+
errorBoundary: /* @__PURE__ */ N(U, {}),
|
|
1687
1988
|
guards: e.guards,
|
|
1688
1989
|
loader: a
|
|
1689
1990
|
};
|
|
1690
1991
|
}
|
|
1691
|
-
function
|
|
1692
|
-
let t = e.component, n =
|
|
1693
|
-
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));
|
|
1694
1995
|
return {
|
|
1695
1996
|
_type: "module",
|
|
1696
1997
|
type: "component",
|
|
@@ -1701,41 +2002,41 @@ function wn(e) {
|
|
|
1701
2002
|
...i === void 0 ? {} : { breadcrumbTitle: i },
|
|
1702
2003
|
menuItemClickable: t !== void 0
|
|
1703
2004
|
},
|
|
1704
|
-
component: t ? () => /* @__PURE__ */
|
|
2005
|
+
component: t ? () => /* @__PURE__ */ N(t, {}) : void 0,
|
|
1705
2006
|
resources: o,
|
|
1706
|
-
errorBoundary: /* @__PURE__ */
|
|
2007
|
+
errorBoundary: /* @__PURE__ */ N(U, {}),
|
|
1707
2008
|
guards: e.guards,
|
|
1708
2009
|
loader: a
|
|
1709
2010
|
};
|
|
1710
2011
|
}
|
|
1711
|
-
function
|
|
2012
|
+
function Yn(e) {
|
|
1712
2013
|
if (e.length === 0) return [];
|
|
1713
|
-
let t =
|
|
2014
|
+
let t = Gn(e), n = [];
|
|
1714
2015
|
if (t.component) {
|
|
1715
|
-
let e =
|
|
2016
|
+
let e = Jn({
|
|
1716
2017
|
...t,
|
|
1717
2018
|
path: "",
|
|
1718
2019
|
children: /* @__PURE__ */ new Map()
|
|
1719
2020
|
});
|
|
1720
2021
|
n.push(e);
|
|
1721
2022
|
}
|
|
1722
|
-
for (let e of t.children.values()) n.push(
|
|
2023
|
+
for (let e of t.children.values()) n.push(Jn(e));
|
|
1723
2024
|
return n;
|
|
1724
2025
|
}
|
|
1725
2026
|
//#endregion
|
|
1726
2027
|
//#region src/components/appshell/appshell.tsx
|
|
1727
2028
|
var $ = (e) => {
|
|
1728
|
-
let t =
|
|
1729
|
-
|
|
2029
|
+
let t = Wn();
|
|
2030
|
+
Le(e.contextData ?? {});
|
|
1730
2031
|
let { modules: n, rootComponent: r, rootGuards: i } = e, a = e.memory ? {
|
|
1731
2032
|
memory: !0,
|
|
1732
2033
|
initialEntries: e.initialEntries
|
|
1733
|
-
} : { 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({
|
|
1734
2035
|
path: "",
|
|
1735
2036
|
...r ? {
|
|
1736
2037
|
meta: {
|
|
1737
|
-
title:
|
|
1738
|
-
icon: /* @__PURE__ */
|
|
2038
|
+
title: Fe.t("home"),
|
|
2039
|
+
icon: /* @__PURE__ */ N(ne, {})
|
|
1739
2040
|
},
|
|
1740
2041
|
component: () => r()
|
|
1741
2042
|
} : { meta: {} },
|
|
@@ -1745,7 +2046,7 @@ var $ = (e) => {
|
|
|
1745
2046
|
n,
|
|
1746
2047
|
r,
|
|
1747
2048
|
i
|
|
1748
|
-
]), s =
|
|
2049
|
+
]), s = C(() => o ? De({
|
|
1749
2050
|
modules: o,
|
|
1750
2051
|
settingsResources: e.settingsResources,
|
|
1751
2052
|
basePath: e.basePath,
|
|
@@ -1759,7 +2060,7 @@ var $ = (e) => {
|
|
|
1759
2060
|
e.errorBoundary,
|
|
1760
2061
|
e.locale,
|
|
1761
2062
|
e.timeZone
|
|
1762
|
-
]), c =
|
|
2063
|
+
]), c = C(() => s ? {
|
|
1763
2064
|
title: e.title,
|
|
1764
2065
|
icon: e.icon,
|
|
1765
2066
|
favicon: e.favicon,
|
|
@@ -1771,34 +2072,34 @@ var $ = (e) => {
|
|
|
1771
2072
|
e.favicon,
|
|
1772
2073
|
e.appInfo,
|
|
1773
2074
|
s
|
|
1774
|
-
]), l =
|
|
2075
|
+
]), l = C(() => ({ contextData: e.contextData ?? {} }), [e.contextData]);
|
|
1775
2076
|
if (!o || !c) {
|
|
1776
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.";
|
|
1777
|
-
return console.error(e), /* @__PURE__ */
|
|
2078
|
+
return console.error(e), /* @__PURE__ */ N("div", {
|
|
1778
2079
|
className: "astw:flex astw:min-h-screen astw:items-center astw:justify-center astw:bg-background astw:p-4",
|
|
1779
|
-
children: /* @__PURE__ */
|
|
2080
|
+
children: /* @__PURE__ */ P("div", {
|
|
1780
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",
|
|
1781
|
-
children: [/* @__PURE__ */
|
|
2082
|
+
children: [/* @__PURE__ */ N("h1", {
|
|
1782
2083
|
className: "astw:mb-2 astw:text-lg astw:font-semibold astw:text-destructive",
|
|
1783
2084
|
children: "Configuration Error"
|
|
1784
|
-
}), /* @__PURE__ */
|
|
2085
|
+
}), /* @__PURE__ */ N("p", {
|
|
1785
2086
|
className: "astw:text-sm astw:text-muted-foreground",
|
|
1786
2087
|
children: e
|
|
1787
2088
|
})]
|
|
1788
2089
|
})
|
|
1789
2090
|
});
|
|
1790
2091
|
}
|
|
1791
|
-
return t ? /* @__PURE__ */
|
|
2092
|
+
return t ? /* @__PURE__ */ N(B.Provider, {
|
|
1792
2093
|
value: c,
|
|
1793
|
-
children: /* @__PURE__ */
|
|
2094
|
+
children: /* @__PURE__ */ N(Oe.Provider, {
|
|
1794
2095
|
value: l,
|
|
1795
|
-
children: /* @__PURE__ */
|
|
1796
|
-
|
|
1797
|
-
children: /* @__PURE__ */
|
|
1798
|
-
|
|
1799
|
-
children: /* @__PURE__ */
|
|
1800
|
-
|
|
1801
|
-
children: [e.children, /* @__PURE__ */
|
|
2096
|
+
children: /* @__PURE__ */ N(Ze, { children: /* @__PURE__ */ N(gt, {
|
|
2097
|
+
defaultColorTheme: e.defaultColorTheme,
|
|
2098
|
+
children: /* @__PURE__ */ N(an, {
|
|
2099
|
+
...a,
|
|
2100
|
+
children: /* @__PURE__ */ P(sn, {
|
|
2101
|
+
searchSources: e.searchSources,
|
|
2102
|
+
children: [e.children, /* @__PURE__ */ N(Bn, {})]
|
|
1802
2103
|
})
|
|
1803
2104
|
})
|
|
1804
2105
|
}) })
|
|
@@ -1806,18 +2107,18 @@ var $ = (e) => {
|
|
|
1806
2107
|
}) : null;
|
|
1807
2108
|
};
|
|
1808
2109
|
$.WithPages = (e) => {
|
|
1809
|
-
let t =
|
|
1810
|
-
return (e) => /* @__PURE__ */
|
|
2110
|
+
let t = Yn(e);
|
|
2111
|
+
return (e) => /* @__PURE__ */ N($, {
|
|
1811
2112
|
...e,
|
|
1812
2113
|
modules: t,
|
|
1813
2114
|
memory: !1
|
|
1814
2115
|
});
|
|
1815
2116
|
};
|
|
1816
|
-
var
|
|
2117
|
+
var Xn = (e) => /* @__PURE__ */ N($, {
|
|
1817
2118
|
...e,
|
|
1818
2119
|
memory: !1
|
|
1819
2120
|
});
|
|
1820
|
-
|
|
1821
|
-
var
|
|
2121
|
+
Xn.WithPages = $.WithPages;
|
|
2122
|
+
var Zn = Xn;
|
|
1822
2123
|
//#endregion
|
|
1823
|
-
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 };
|