@voyant-travel/admin 0.111.4 → 0.111.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.d.ts +1 -1
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +1 -1
- package/dist/app/router.d.ts +3 -1
- package/dist/app/router.d.ts.map +1 -1
- package/dist/app/router.js +6 -2
- package/package.json +5 -5
package/dist/app/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { adminExtensionChildRoutes, adminExtensionRouteOptions, attachAdminExten
|
|
|
3
3
|
export type { AdminRootErrorBoundaryProps, AdminRootHeadOptions } from "./root.js";
|
|
4
4
|
export { AdminRootErrorBoundary, AdminRootShell, adminRootHead } from "./root.js";
|
|
5
5
|
export type { AdminRouterContext, CreateAdminRouterOptions } from "./router.js";
|
|
6
|
-
export { AdminNotFound, createAdminQueryClient, createAdminRouter } from "./router.js";
|
|
6
|
+
export { AdminNotFound, AdminPendingFallback, createAdminQueryClient, createAdminRouter, } from "./router.js";
|
|
7
7
|
export type { AdminWorkspaceShellProps, AdminWorkspaceShellUser, CreateAdminWorkspaceBeforeLoadOptions, } from "./workspace.js";
|
|
8
8
|
export { AdminRouterLink, AdminWorkspacePendingFallback, AdminWorkspaceShell, createAdminWorkspaceBeforeLoad, defaultAdminWorkspaceUser, } from "./workspace.js";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/app/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gCAAgC,EAChC,6BAA6B,EAC7B,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,uBAAuB,CAAA;AAC9B,YAAY,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAClF,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACjF,YAAY,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAC/E,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gCAAgC,EAChC,6BAA6B,EAC7B,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,uBAAuB,CAAA;AAC9B,YAAY,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAClF,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACjF,YAAY,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAC/E,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,aAAa,CAAA;AACpB,YAAY,EACV,wBAAwB,EACxB,uBAAuB,EACvB,qCAAqC,GACtC,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,eAAe,EACf,6BAA6B,EAC7B,mBAAmB,EACnB,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,gBAAgB,CAAA"}
|
package/dist/app/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { adminExtensionChildRoutes, adminExtensionRouteOptions, attachAdminExtensionRoutes, } from "./extension-routes.js";
|
|
2
2
|
export { AdminRootErrorBoundary, AdminRootShell, adminRootHead } from "./root.js";
|
|
3
|
-
export { AdminNotFound, createAdminQueryClient, createAdminRouter } from "./router.js";
|
|
3
|
+
export { AdminNotFound, AdminPendingFallback, createAdminQueryClient, createAdminRouter, } from "./router.js";
|
|
4
4
|
export { AdminRouterLink, AdminWorkspacePendingFallback, AdminWorkspaceShell, createAdminWorkspaceBeforeLoad, defaultAdminWorkspaceUser, } from "./workspace.js";
|
package/dist/app/router.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare function createAdminQueryClient(): QueryClient;
|
|
|
13
13
|
export interface CreateAdminRouterOptions<TRouteTree extends AnyRoute> {
|
|
14
14
|
routeTree: TRouteTree;
|
|
15
15
|
queryClient?: QueryClient;
|
|
16
|
+
pendingComponent?: () => ReactNode;
|
|
16
17
|
notFoundComponent?: () => ReactNode;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
@@ -23,8 +24,9 @@ export interface CreateAdminRouterOptions<TRouteTree extends AnyRoute> {
|
|
|
23
24
|
* SSR dehydrate/hydrate so loader-prefetched queries survive the
|
|
24
25
|
* server→client boundary on routes that opt into SSR.
|
|
25
26
|
*/
|
|
26
|
-
export declare function createAdminRouter<TRouteTree extends AnyRoute>({ routeTree, queryClient, notFoundComponent, }: CreateAdminRouterOptions<TRouteTree>): import("@tanstack/router-core").RouterCore<TRouteTree, "never", false, import("@tanstack/history").RouterHistory, {
|
|
27
|
+
export declare function createAdminRouter<TRouteTree extends AnyRoute>({ routeTree, queryClient, pendingComponent, notFoundComponent, }: CreateAdminRouterOptions<TRouteTree>): import("@tanstack/router-core").RouterCore<TRouteTree, "never", false, import("@tanstack/history").RouterHistory, {
|
|
27
28
|
queryClient: object;
|
|
28
29
|
}>;
|
|
30
|
+
export declare function AdminPendingFallback(): import("react/jsx-runtime").JSX.Element;
|
|
29
31
|
export declare function AdminNotFound(): import("react/jsx-runtime").JSX.Element;
|
|
30
32
|
//# sourceMappingURL=router.d.ts.map
|
package/dist/app/router.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/app/router.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,WAAW,EAAE,MAAM,uBAAuB,C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C,gBAAuC,EACvC,iBAAiC,GAClC,EAAE,wBAAwB,CAAC,UAAU,CAAC;iBAawB,MAAM;GAKpE;AAED,wBAAgB,oBAAoB,4CAcnC;AAED,wBAAgB,aAAa,4CAqB5B"}
|
package/dist/app/router.js
CHANGED
|
@@ -3,7 +3,7 @@ import { dehydrate, hydrate, QueryClient } from "@tanstack/react-query";
|
|
|
3
3
|
import { createRouter as createTanStackRouter, Link } from "@tanstack/react-router";
|
|
4
4
|
import { buttonVariants } from "@voyant-travel/ui/components/button";
|
|
5
5
|
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, } from "@voyant-travel/ui/components/empty";
|
|
6
|
-
import { SearchX } from "lucide-react";
|
|
6
|
+
import { Loader2, SearchX } from "lucide-react";
|
|
7
7
|
/**
|
|
8
8
|
* QueryClient with the admin defaults: no focus refetch, one retry, and a
|
|
9
9
|
* 30s staleTime that keeps hover-preloaded data fresh long enough for the
|
|
@@ -28,13 +28,14 @@ export function createAdminQueryClient() {
|
|
|
28
28
|
* SSR dehydrate/hydrate so loader-prefetched queries survive the
|
|
29
29
|
* server→client boundary on routes that opt into SSR.
|
|
30
30
|
*/
|
|
31
|
-
export function createAdminRouter({ routeTree, queryClient = createAdminQueryClient(), notFoundComponent = AdminNotFound, }) {
|
|
31
|
+
export function createAdminRouter({ routeTree, queryClient = createAdminQueryClient(), pendingComponent = AdminPendingFallback, notFoundComponent = AdminNotFound, }) {
|
|
32
32
|
return createTanStackRouter({
|
|
33
33
|
routeTree,
|
|
34
34
|
context: { queryClient },
|
|
35
35
|
scrollRestoration: true,
|
|
36
36
|
defaultPreload: "intent",
|
|
37
37
|
defaultPreloadStaleTime: 30_000,
|
|
38
|
+
defaultPendingComponent: pendingComponent,
|
|
38
39
|
defaultNotFoundComponent: notFoundComponent,
|
|
39
40
|
// Cast around Router's ValidateSerializableInput, which is stricter than
|
|
40
41
|
// DehydratedState's recursive `unknown` slots. Runtime payload is
|
|
@@ -46,6 +47,9 @@ export function createAdminRouter({ routeTree, queryClient = createAdminQueryCli
|
|
|
46
47
|
},
|
|
47
48
|
});
|
|
48
49
|
}
|
|
50
|
+
export function AdminPendingFallback() {
|
|
51
|
+
return (_jsx("div", { className: "flex min-h-screen items-center justify-center bg-background p-6", children: _jsxs("div", { className: "flex flex-col items-center gap-4 text-muted-foreground", role: "status", "aria-live": "polite", "aria-label": "Loading admin workspace", children: [_jsx(Loader2, { className: "size-8 animate-spin", "aria-hidden": "true" }), _jsx("span", { className: "text-sm", children: "Loading workspace" })] }) }));
|
|
52
|
+
}
|
|
49
53
|
export function AdminNotFound() {
|
|
50
54
|
return (_jsx("div", { className: "flex min-h-screen items-center justify-center bg-background p-6", children: _jsxs(Empty, { className: "max-w-xl border border-border bg-card", children: [_jsxs(EmptyHeader, { children: [_jsx(EmptyMedia, { variant: "icon", children: _jsx(SearchX, {}) }), _jsx(EmptyTitle, { children: "Page not found" }), _jsx(EmptyDescription, { children: "The page you requested does not exist or is no longer available." })] }), _jsx(EmptyContent, { children: _jsx(Link, { to: "/", className: buttonVariants({ variant: "default" }), children: "Go to dashboard" }) })] }) }));
|
|
51
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyant-travel/admin",
|
|
3
|
-
"version": "0.111.
|
|
3
|
+
"version": "0.111.5",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -184,8 +184,8 @@
|
|
|
184
184
|
"@voyant-travel/ui": "^0.106.2"
|
|
185
185
|
},
|
|
186
186
|
"dependencies": {
|
|
187
|
-
"@voyant-travel/
|
|
188
|
-
"@voyant-travel/
|
|
187
|
+
"@voyant-travel/i18n": "^0.106.1",
|
|
188
|
+
"@voyant-travel/react": "^0.104.1"
|
|
189
189
|
},
|
|
190
190
|
"devDependencies": {
|
|
191
191
|
"@tanstack/react-query": "^5.100.11",
|
|
@@ -200,8 +200,8 @@
|
|
|
200
200
|
"recharts": "3.8.1",
|
|
201
201
|
"typescript": "^6.0.2",
|
|
202
202
|
"vitest": "^4.1.2",
|
|
203
|
-
"@voyant-travel/
|
|
204
|
-
"@voyant-travel/
|
|
203
|
+
"@voyant-travel/voyant-typescript-config": "^0.1.0",
|
|
204
|
+
"@voyant-travel/ui": "^0.106.2"
|
|
205
205
|
},
|
|
206
206
|
"files": [
|
|
207
207
|
"dist",
|