@voyant-travel/admin-app 0.10.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 ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may accept and charge a
167
+ fee for, the acceptance of support, warranty, indemnity, or
168
+ other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 PixelMakers Studio SRL
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # @voyant-travel/admin-app
2
+
3
+ First-party admin app composition package.
4
+
5
+ The reusable shell implementation lives in `@voyant-travel/admin/app/*` so the
6
+ top-level `admin` package owns the packaged staff shell and extension surface.
7
+ This package re-exports those shell helpers for compatibility and owns the
8
+ domain-backed core extension bundle that imports first-party domain React
9
+ packages.
10
+
11
+ ## What it provides
12
+
13
+ - **`createAdminRouter({ routeTree })`** / **`createAdminQueryClient()`** —
14
+ TanStack Router + QueryClient with the Voyant defaults: intent preloading
15
+ with matched staleTime, scroll restoration, default not-found page, and
16
+ QueryClient SSR dehydrate/hydrate.
17
+ - **`adminRootHead({ title, ... })`** / **`AdminRootShell`** /
18
+ **`AdminRootErrorBoundary`** — the root route internals, including the
19
+ pre-hydration theme/locale bootstrap script (no theme flash) and an error
20
+ boundary that survives outside the provider tree.
21
+ - **`createAdminWorkspaceBeforeLoad({ getCurrentUser })`** — the auth guard,
22
+ in `beforeLoad` so the redirect short-circuits child loaders instead of
23
+ racing them.
24
+ - **`AdminWorkspaceShell`** — bootstrap gate → per-user message overrides →
25
+ locale sync → workspace layout, with `AdminRouterLink` (Slot-compatible,
26
+ external-URL-aware) as the default nav link. Pass `destinations` (a
27
+ `satisfies AdminDestinationResolvers` map) to mount the semantic-destination
28
+ contract: packaged pages resolve `AdminDestinations` keys to hrefs via
29
+ `useAdminHref`/`useAdminNavigate`, and the shell routes them through the app
30
+ router.
31
+ - **`createAdminCoreExtension(options?)`** — dashboard, account, and settings
32
+ route contributions backed by first-party domain React packages.
33
+
34
+ ## Usage
35
+
36
+ ```tsx
37
+ // src/router.tsx
38
+ import { createAdminRouter } from "@voyant-travel/admin/app"
39
+
40
+ export const getRouter = () => createAdminRouter({ routeTree })
41
+
42
+ // src/routes/__root.tsx
43
+ import { AdminRootErrorBoundary, AdminRootShell, adminRootHead } from "@voyant-travel/admin/app/root"
44
+
45
+ export const Route = createRootRouteWithContext<AdminRouterContext>()({
46
+ head: () => adminRootHead({ title: "Acme Admin" }),
47
+ shellComponent: AdminRootShell,
48
+ component: RootComponent, // app-owned: mounts the app's provider stack
49
+ errorComponent: AdminRootErrorBoundary,
50
+ })
51
+
52
+ // src/routes/_workspace/route.tsx
53
+ import {
54
+ AdminWorkspacePendingFallback,
55
+ AdminWorkspaceShell,
56
+ createAdminWorkspaceBeforeLoad,
57
+ } from "@voyant-travel/admin/app/workspace"
58
+
59
+ export const Route = createFileRoute("/_workspace")({
60
+ ssr: "data-only",
61
+ beforeLoad: createAdminWorkspaceBeforeLoad({ getCurrentUser }),
62
+ loader: ({ context }) => ({ user: context.user }),
63
+ pendingComponent: AdminWorkspacePendingFallback,
64
+ component: () => (
65
+ <AdminWorkspaceShell
66
+ user={user}
67
+ icons={navigationIcons}
68
+ extensions={(messages) => createMyAdminExtensions(messages)}
69
+ destinations={myAdminDestinations} // key → href resolvers, satisfies AdminDestinationResolvers
70
+ onSignOut={() => signOut({ redirectTo: "/sign-in" })}
71
+ >
72
+ <Outlet />
73
+ </AdminWorkspaceShell>
74
+ ),
75
+ })
76
+ ```
77
+
78
+ What stays app-owned: the provider list (which domain modules are mounted),
79
+ extension definitions, navigation icons, branding, and the auth client.
80
+
81
+ New first-party code should import shell helpers from `@voyant-travel/admin/app/*`
82
+ and the domain-backed core extension from `@voyant-travel/admin-app/core-extension`.
83
+
84
+ ## License
85
+
86
+ Apache-2.0
@@ -0,0 +1,105 @@
1
+ import { type AdminExtension, type AdminRouteLoaderContext, type AdminRoutePageModule } from "@voyant-travel/admin/extensions";
2
+ import { type AdminCoreSettingsExtraNavEntry, type AdminCoreSettingsNavGroup, type AdminCoreSettingsNavIcon, type AdminCoreSettingsPageId } from "./settings-nav.js";
3
+ export type { AdminCoreSettingsNavGroup, AdminCoreSettingsNavIcon, AdminCoreSettingsPageId, } from "./settings-nav.js";
4
+ /**
5
+ * The CORE admin extension (packaged-admin RFC §4.2/§4.8): the pages every
6
+ * Voyant admin ships regardless of mounted domains — the dashboard host,
7
+ * the account page, and the settings area (layout + built-in pages). These
8
+ * were the last starter-owned operator pages; they now arrive as
9
+ * extension route contributions bound through the host's code-assembled
10
+ * route tree, exactly like the domain extensions.
11
+ *
12
+ * NAVIGATION: deliberately none — Dashboard and Settings are part of the
13
+ * BASE operator navigation (`createOperatorAdminNavigation` in
14
+ * `@voyant-travel/admin`), and Account is linked from the user menu.
15
+ *
16
+ * ROUTES:
17
+ * - `/` — the dashboard (`DashboardPage` from `@voyant-travel/admin/dashboard`,
18
+ * kept behind a lazy page module because it pulls recharts). Data comes
19
+ * from the page's own client-side queries; hosts with SSR aggregates
20
+ * supply a loader via {@link AdminCoreDashboardOptions.loader} (the
21
+ * loader and the page share the dashboard query keys).
22
+ * - `/account` — `AccountPage` from `@voyant-travel/auth-react`. Localized when
23
+ * the host mounts `AuthUiMessagesProvider` (e.g. through the shell's
24
+ * `domainMessageProviders`); otherwise English defaults.
25
+ * - `/settings` — layout route (grouped sub-nav + outlet) with nested
26
+ * children (the first nested contributions — hosts bind them via
27
+ * `adminExtensionRouteOptions` for the statically known children plus
28
+ * `adminExtensionChildRoutes` for app-supplied {@link
29
+ * AdminCoreSettingsOptions.extraPages}): an index redirect and the nine
30
+ * built-in pages (team, API tokens, channels, taxes, cost categories,
31
+ * pricing categories, price catalogs, product types, product tags).
32
+ *
33
+ * EJECTION/DISABLING: pass `false` for a surface (`dashboard`, `account`,
34
+ * `settings`) to drop its contributions entirely (then own the route in
35
+ * the host), or `settings.omit` to drop individual built-in settings pages.
36
+ */
37
+ export interface CreateAdminCoreExtensionOptions {
38
+ /** `false` ejects the dashboard route from the extension. */
39
+ dashboard?: false | AdminCoreDashboardOptions;
40
+ /** `false` ejects the account route from the extension. */
41
+ account?: false | AdminCoreAccountOptions;
42
+ /** `false` ejects the whole settings area from the extension. */
43
+ settings?: false | AdminCoreSettingsOptions;
44
+ }
45
+ export interface AdminCoreDashboardOptions {
46
+ /**
47
+ * App-supplied data loader (e.g. server-function aggregates that read the
48
+ * database directly during SSR). Must populate the dashboard query keys
49
+ * (`dashboardQueryKeys` from `@voyant-travel/admin/dashboard/query-options`);
50
+ * without it the page fetches client-side through the admin API.
51
+ */
52
+ loader?: (ctx: AdminRouteLoaderContext) => unknown;
53
+ /** Per-route SSR mode. Default `"data-only"`. */
54
+ ssr?: boolean | "data-only";
55
+ }
56
+ export interface AdminCoreAccountOptions {
57
+ /** Per-route SSR mode. Default: inherit the router/parent default. */
58
+ ssr?: boolean | "data-only";
59
+ }
60
+ export interface AdminCoreSettingsOptions {
61
+ /** Mount path of the settings area. Default `/settings`. */
62
+ basePath?: string;
63
+ /**
64
+ * Where the settings index redirects. Default `<basePath>/channels`
65
+ * (skipped automatically when `channels` is omitted — then the first
66
+ * remaining built-in page wins).
67
+ */
68
+ indexRedirectTo?: string;
69
+ /** Built-in settings pages to drop (route + nav entry). */
70
+ omit?: ReadonlyArray<AdminCoreSettingsPageId>;
71
+ /**
72
+ * App-custom settings pages: spliced into the layout's sub-navigation
73
+ * and bound as child routes of the settings layout. Hosts bind them at
74
+ * runtime via `adminExtensionChildRoutes` (they are invisible to
75
+ * `voyant admin generate --routes`, so they get no typed-link entries).
76
+ */
77
+ extraPages?: ReadonlyArray<AdminCoreSettingsExtraPage>;
78
+ }
79
+ export interface AdminCoreSettingsExtraPage {
80
+ /** Unique page id; the contribution id becomes `core-settings-<id>`. */
81
+ id: string;
82
+ /** Path relative to the settings base path, starting with `/` (e.g. `"/operator"`). */
83
+ path: string;
84
+ /** Route title ({@link AdminRoutePageModule} pages receive it as `title`). */
85
+ title: string;
86
+ /**
87
+ * Settings sub-nav label. The function form resolves against the live
88
+ * operator admin messages (stays localized on locale switch); defaults
89
+ * to `title`.
90
+ */
91
+ label?: AdminCoreSettingsExtraNavEntry["label"];
92
+ icon?: AdminCoreSettingsNavIcon;
93
+ /** Nav group. Default `"general"`. */
94
+ group?: AdminCoreSettingsNavGroup;
95
+ /**
96
+ * Position within the group. Built-ins use 20–80 (general) and 10–20
97
+ * (products); pass e.g. `10` to lead the general group. Default `100`.
98
+ */
99
+ order?: number;
100
+ page: () => Promise<AdminRoutePageModule>;
101
+ loader?: (ctx: AdminRouteLoaderContext) => unknown;
102
+ ssr?: boolean | "data-only";
103
+ }
104
+ export declare function createAdminCoreExtension(options?: CreateAdminCoreExtensionOptions): AdminExtension;
105
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core-extension/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAI1B,MAAM,iCAAiC,CAAA;AAExC,OAAO,EACL,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAE7B,MAAM,mBAAmB,CAAA;AAE1B,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,mBAAmB,CAAA;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,+BAA+B;IAC9C,6DAA6D;IAC7D,SAAS,CAAC,EAAE,KAAK,GAAG,yBAAyB,CAAA;IAC7C,2DAA2D;IAC3D,OAAO,CAAC,EAAE,KAAK,GAAG,uBAAuB,CAAA;IACzC,iEAAiE;IACjE,QAAQ,CAAC,EAAE,KAAK,GAAG,wBAAwB,CAAA;CAC5C;AAED,MAAM,WAAW,yBAAyB;IACxC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,uBAAuB,KAAK,OAAO,CAAA;IAClD,iDAAiD;IACjD,GAAG,CAAC,EAAE,OAAO,GAAG,WAAW,CAAA;CAC5B;AAED,MAAM,WAAW,uBAAuB;IACtC,sEAAsE;IACtE,GAAG,CAAC,EAAE,OAAO,GAAG,WAAW,CAAA;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAA;IAC7C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAA;CACvD;AAED,MAAM,WAAW,0BAA0B;IACzC,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAA;IACV,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAA;IACZ,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,8BAA8B,CAAC,OAAO,CAAC,CAAA;IAC/C,IAAI,CAAC,EAAE,wBAAwB,CAAA;IAC/B,sCAAsC;IACtC,KAAK,CAAC,EAAE,yBAAyB,CAAA;IACjC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,OAAO,CAAC,oBAAoB,CAAC,CAAA;IACzC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,uBAAuB,KAAK,OAAO,CAAA;IAClD,GAAG,CAAC,EAAE,OAAO,GAAG,WAAW,CAAA;CAC5B;AAUD,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,+BAAoC,GAC5C,cAAc,CA4ChB"}
@@ -0,0 +1,179 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Lean static only: the dashboard skeleton (pending boundary). Every page —
3
+ // dashboard (recharts), account, and the settings pages — resolves through
4
+ // dynamic imports of SPECIFIC modules (never barrels) inside `page`/`loader`
5
+ // thunks, so the heavy chunks load on navigation, not with workspace chrome.
6
+ import { DashboardSkeleton } from "@voyant-travel/admin/dashboard/skeleton";
7
+ import { adminRoutePageModule, defineAdminExtension, } from "@voyant-travel/admin/extensions";
8
+ import { adminCoreSettingsNavEntries, } from "./settings-nav.js";
9
+ /** Default fetcher for the built-in settings loaders (cookie-authenticated). */
10
+ const coreFetcher = (url, init) => fetch(url, { credentials: "include", ...init });
11
+ function coreClient(ctx) {
12
+ return { baseUrl: ctx.runtime.baseUrl, fetcher: ctx.runtime.fetcher ?? coreFetcher };
13
+ }
14
+ export function createAdminCoreExtension(options = {}) {
15
+ const { dashboard = {}, account = {}, settings = {} } = options;
16
+ const routes = [];
17
+ if (dashboard !== false) {
18
+ routes.push({
19
+ id: "core-dashboard",
20
+ path: "/",
21
+ title: "Dashboard",
22
+ ssr: dashboard.ssr ?? "data-only",
23
+ // DashboardPage pulls recharts — the lazy page module keeps it out of
24
+ // the workspace-chrome chunk that evaluates this factory.
25
+ page: () => import("@voyant-travel/admin/dashboard").then((module) => adminRoutePageModule(module.DashboardPage)),
26
+ loader: dashboard.loader,
27
+ pendingComponent: DashboardSkeleton,
28
+ });
29
+ }
30
+ if (account !== false) {
31
+ routes.push({
32
+ id: "core-account",
33
+ path: "/account",
34
+ title: "Account",
35
+ ssr: account.ssr,
36
+ page: async () => {
37
+ const { AccountPage } = await import("@voyant-travel/auth-react/account");
38
+ // The workspace inset header already renders the sidebar trigger —
39
+ // suppress the page shell's own to avoid doubling it.
40
+ function CoreAccountPage() {
41
+ return _jsx(AccountPage, { showSidebarTrigger: false });
42
+ }
43
+ return { default: CoreAccountPage };
44
+ },
45
+ });
46
+ }
47
+ if (settings !== false) {
48
+ routes.push(createSettingsContribution(settings));
49
+ }
50
+ return defineAdminExtension({ id: "core", routes });
51
+ }
52
+ function createSettingsContribution(options) {
53
+ const { basePath = "/settings", omit = [], extraPages = [] } = options;
54
+ const entries = adminCoreSettingsNavEntries.filter((entry) => !omit.includes(entry.id));
55
+ const indexRedirectTo = options.indexRedirectTo ??
56
+ (entries.some((entry) => entry.id === "channels")
57
+ ? `${basePath}/channels`
58
+ : `${basePath}${entries[0]?.path ?? "/channels"}`);
59
+ const extras = extraPages.map((page) => ({
60
+ id: page.id,
61
+ href: `${basePath}${page.path}`,
62
+ icon: page.icon,
63
+ group: page.group ?? "general",
64
+ order: page.order ?? 100,
65
+ label: page.label ?? page.title,
66
+ }));
67
+ const children = [
68
+ {
69
+ id: "core-settings-index",
70
+ path: "/",
71
+ title: "Settings",
72
+ redirectTo: indexRedirectTo,
73
+ },
74
+ ...entries.map((entry) => createBuiltInSettingsPage(entry.id)),
75
+ ...extraPages.map((page) => ({
76
+ id: `core-settings-${page.id}`,
77
+ path: page.path,
78
+ title: page.title,
79
+ page: page.page,
80
+ loader: page.loader,
81
+ ssr: page.ssr,
82
+ })),
83
+ ];
84
+ return {
85
+ id: "core-settings",
86
+ path: basePath,
87
+ title: "Settings",
88
+ page: async () => {
89
+ const { AdminCoreSettingsLayout } = await import("./settings-layout.js");
90
+ function CoreSettingsLayoutPage() {
91
+ return _jsx(AdminCoreSettingsLayout, { basePath: basePath, omit: omit, extras: extras });
92
+ }
93
+ return { default: CoreSettingsLayoutPage };
94
+ },
95
+ children,
96
+ };
97
+ }
98
+ function createBuiltInSettingsPage(id) {
99
+ const entry = adminCoreSettingsNavEntries.find((candidate) => candidate.id === id);
100
+ if (!entry) {
101
+ throw new Error(`[voyant-admin] Unknown core settings page "${id}".`);
102
+ }
103
+ const base = { id: `core-settings-${id}`, path: entry.path, title: entry.defaultTitle };
104
+ switch (id) {
105
+ case "team":
106
+ return {
107
+ ...base,
108
+ page: () => import("@voyant-travel/admin/components/team-settings-page").then((module) => adminRoutePageModule(module.TeamSettingsPage)),
109
+ };
110
+ case "api-tokens":
111
+ return {
112
+ ...base,
113
+ page: () => import("@voyant-travel/auth-react/components/service-api-keys-page").then((module) => adminRoutePageModule(module.ApiTokensPage)),
114
+ };
115
+ case "channels":
116
+ return {
117
+ ...base,
118
+ ssr: "data-only",
119
+ page: () => import("@voyant-travel/distribution-react/components/channels-page").then((module) => adminRoutePageModule(module.ChannelsPage)),
120
+ // Dynamic import on purpose: the query options pull the domain data
121
+ // layer (client + response schemas), and a static import here would
122
+ // pin it into the workspace-chrome chunk evaluating this factory.
123
+ loader: async (ctx) => {
124
+ const { getChannelsQueryOptions } = await import("@voyant-travel/distribution-react");
125
+ return ctx.queryClient.ensureQueryData(getChannelsQueryOptions(coreClient(ctx), { limit: 25, offset: 0 }));
126
+ },
127
+ };
128
+ case "taxes":
129
+ return {
130
+ ...base,
131
+ page: () => import("@voyant-travel/finance-react/components/taxes-page").then((module) => adminRoutePageModule(module.TaxesPage)),
132
+ };
133
+ case "cost-categories":
134
+ return {
135
+ ...base,
136
+ page: () => import("@voyant-travel/finance-react/components/cost-categories-page").then((module) => adminRoutePageModule(module.CostCategoriesPage)),
137
+ };
138
+ case "pricing-categories":
139
+ return {
140
+ ...base,
141
+ ssr: "data-only",
142
+ page: () => import("@voyant-travel/commerce-react/pricing/components/pricing-categories-page").then((module) => adminRoutePageModule(module.PricingCategoriesPage)),
143
+ loader: async (ctx) => {
144
+ const { getPricingCategoriesQueryOptions } = await import("@voyant-travel/commerce-react/pricing");
145
+ return ctx.queryClient.ensureQueryData(getPricingCategoriesQueryOptions(coreClient(ctx), { limit: 25, active: undefined }));
146
+ },
147
+ };
148
+ case "price-catalogs":
149
+ return {
150
+ ...base,
151
+ ssr: "data-only",
152
+ page: () => import("@voyant-travel/commerce-react/pricing/components/price-catalogs-page").then((module) => adminRoutePageModule(module.PriceCatalogsPage)),
153
+ loader: async (ctx) => {
154
+ const { getPriceCatalogsQueryOptions } = await import("@voyant-travel/commerce-react/pricing");
155
+ return ctx.queryClient.ensureQueryData(getPriceCatalogsQueryOptions(coreClient(ctx), { limit: 25, offset: 0 }));
156
+ },
157
+ };
158
+ case "product-types":
159
+ return {
160
+ ...base,
161
+ ssr: "data-only",
162
+ page: () => import("@voyant-travel/inventory-react/components/product-types-page").then((module) => adminRoutePageModule(module.ProductTypesPage)),
163
+ loader: async (ctx) => {
164
+ const { getProductTypesQueryOptions } = await import("@voyant-travel/inventory-react");
165
+ return ctx.queryClient.ensureQueryData(getProductTypesQueryOptions(coreClient(ctx), { limit: 25, offset: 0 }));
166
+ },
167
+ };
168
+ case "product-tags":
169
+ return {
170
+ ...base,
171
+ ssr: "data-only",
172
+ page: () => import("@voyant-travel/inventory-react/components/product-tags-page").then((module) => adminRoutePageModule(module.ProductTagsPage)),
173
+ loader: async (ctx) => {
174
+ const { getProductTagsQueryOptions } = await import("@voyant-travel/inventory-react");
175
+ return ctx.queryClient.ensureQueryData(getProductTagsQueryOptions(coreClient(ctx), { limit: 25, offset: 0 }));
176
+ },
177
+ };
178
+ }
179
+ }
@@ -0,0 +1,18 @@
1
+ import { type AdminCoreSettingsExtraNavEntry, type AdminCoreSettingsPageId } from "./settings-nav.js";
2
+ /**
3
+ * The settings area layout (packaged from the operator starter's
4
+ * `SettingsLayout`): a grouped sub-navigation sidebar plus an outlet for
5
+ * the active settings page. Mounted as the core extension's `/settings`
6
+ * layout route; the child pages render into the outlet.
7
+ *
8
+ * Built-in nav entries resolve their labels reactively through
9
+ * `useOperatorAdminMessages`; app-supplied extras pass a string or a
10
+ * messages-resolver through the core extension factory.
11
+ */
12
+ export interface AdminCoreSettingsLayoutProps {
13
+ basePath: string;
14
+ omit?: ReadonlyArray<AdminCoreSettingsPageId>;
15
+ extras?: ReadonlyArray<AdminCoreSettingsExtraNavEntry>;
16
+ }
17
+ export declare function AdminCoreSettingsLayout({ basePath, omit, extras, }: AdminCoreSettingsLayoutProps): import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=settings-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-layout.d.ts","sourceRoot":"","sources":["../../src/core-extension/settings-layout.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,8BAA8B,EAGnC,KAAK,uBAAuB,EAE7B,MAAM,mBAAmB,CAAA;AAE1B;;;;;;;;;GASG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAA;IAC7C,MAAM,CAAC,EAAE,aAAa,CAAC,8BAA8B,CAAC,CAAA;CACvD;AAUD,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,IAAS,EACT,MAAW,GACZ,EAAE,4BAA4B,2CAmF9B"}
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Link, Outlet, useRouterState } from "@tanstack/react-router";
3
+ import { useOperatorAdminMessages } from "@voyant-travel/admin/providers/operator-admin-messages";
4
+ import { cn } from "@voyant-travel/ui/lib/utils";
5
+ import { adminCoreSettingsNavEntries, } from "./settings-nav.js";
6
+ export function AdminCoreSettingsLayout({ basePath, omit = [], extras = [], }) {
7
+ const messages = useOperatorAdminMessages();
8
+ const pathname = useRouterState({ select: (state) => state.location.pathname });
9
+ const itemsByGroup = new Map();
10
+ const push = (group, item) => {
11
+ const bucket = itemsByGroup.get(group) ?? [];
12
+ bucket.push(item);
13
+ itemsByGroup.set(group, bucket);
14
+ };
15
+ for (const entry of adminCoreSettingsNavEntries) {
16
+ if (omit.includes(entry.id))
17
+ continue;
18
+ push(entry.group, {
19
+ id: entry.id,
20
+ label: entry.label(messages.settings),
21
+ href: `${basePath}${entry.path}`,
22
+ icon: entry.icon,
23
+ order: entry.order,
24
+ });
25
+ }
26
+ for (const extra of extras) {
27
+ push(extra.group, {
28
+ id: extra.id,
29
+ label: typeof extra.label === "function" ? extra.label(messages) : extra.label,
30
+ href: extra.href,
31
+ icon: extra.icon,
32
+ order: extra.order,
33
+ });
34
+ }
35
+ const navGroups = [
36
+ { group: "general", title: messages.settings.generalGroup },
37
+ { group: "products", title: messages.settings.productsGroup },
38
+ ]
39
+ .map(({ group, title }) => ({
40
+ title,
41
+ items: [...(itemsByGroup.get(group) ?? [])].sort((a, b) => a.order - b.order),
42
+ }))
43
+ .filter((group) => group.items.length > 0);
44
+ const isActive = (href) => pathname.replace(/\/$/, "") === href;
45
+ return (_jsxs("div", { className: "flex h-[calc(100vh-0px)]", children: [_jsxs("aside", { className: "w-64 shrink-0 overflow-y-auto border-r p-6", children: [_jsx("h1", { className: "text-xl font-semibold tracking-tight", children: messages.settings.title }), _jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: messages.settings.description }), _jsx("nav", { className: "mt-6 flex flex-col gap-6", children: navGroups.map((group) => (_jsxs("div", { children: [_jsx("h3", { className: "mb-2 px-3 text-xs font-medium uppercase tracking-wider text-muted-foreground", children: group.title }), _jsx("ul", { className: "flex flex-col gap-0.5", children: group.items.map((item) => (_jsx("li", { children: _jsxs(Link, { to: item.href, className: cn("flex items-center gap-2.5 rounded-md px-3 py-2 text-sm transition-colors", isActive(item.href)
46
+ ? "bg-accent font-medium text-accent-foreground"
47
+ : "text-muted-foreground hover:bg-accent/50 hover:text-foreground"), children: [item.icon ? _jsx(item.icon, { className: "h-4 w-4" }) : null, item.label] }) }, item.href))) })] }, group.title))) })] }), _jsx("div", { className: "flex-1 overflow-y-auto", children: _jsx(Outlet, {}) })] }));
48
+ }
@@ -0,0 +1,43 @@
1
+ import type { OperatorAdminMessages } from "@voyant-travel/admin/providers/operator-admin-messages";
2
+ import type * as React from "react";
3
+ /**
4
+ * Catalog of the BUILT-IN settings pages the admin core extension ships
5
+ * (packaged-admin RFC §4.2 — the operator's former
6
+ * `src/routes/_workspace/settings/*` files). One entry drives both the
7
+ * route contribution (id/path) and the settings layout's sub-navigation
8
+ * (label/icon/group/order), so the two can never drift.
9
+ */
10
+ export type AdminCoreSettingsPageId = "team" | "api-tokens" | "channels" | "taxes" | "cost-categories" | "pricing-categories" | "price-catalogs" | "product-types" | "product-tags";
11
+ export type AdminCoreSettingsNavGroup = "general" | "products";
12
+ /** Icon component contract — lucide icons satisfy it without depending on them. */
13
+ export type AdminCoreSettingsNavIcon = React.ComponentType<{
14
+ className?: string;
15
+ }>;
16
+ export interface AdminCoreSettingsNavEntry {
17
+ id: AdminCoreSettingsPageId;
18
+ /** Child path relative to the settings base path (starts with `/`). */
19
+ path: string;
20
+ icon: AdminCoreSettingsNavIcon;
21
+ group: AdminCoreSettingsNavGroup;
22
+ /**
23
+ * Position within the group. Built-ins use 20–80 (general) and 10–20
24
+ * (products); app extras pick numbers around them (e.g. 10 to lead the
25
+ * general group).
26
+ */
27
+ order: number;
28
+ /** Reactive nav label, resolved against the live operator admin messages. */
29
+ label: (settings: OperatorAdminMessages["settings"]) => string;
30
+ /** Default (English) route title for the contribution. */
31
+ defaultTitle: string;
32
+ }
33
+ export declare const adminCoreSettingsNavEntries: ReadonlyArray<AdminCoreSettingsNavEntry>;
34
+ /** Extra (app-supplied) entry the settings layout splices into its nav. */
35
+ export interface AdminCoreSettingsExtraNavEntry {
36
+ id: string;
37
+ href: string;
38
+ icon?: AdminCoreSettingsNavIcon;
39
+ group: AdminCoreSettingsNavGroup;
40
+ order: number;
41
+ label: string | ((messages: OperatorAdminMessages) => string);
42
+ }
43
+ //# sourceMappingURL=settings-nav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-nav.d.ts","sourceRoot":"","sources":["../../src/core-extension/settings-nav.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAA;AAEnG,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC;;;;;;GAMG;AAEH,MAAM,MAAM,uBAAuB,GAC/B,MAAM,GACN,YAAY,GACZ,UAAU,GACV,OAAO,GACP,iBAAiB,GACjB,oBAAoB,GACpB,gBAAgB,GAChB,eAAe,GACf,cAAc,CAAA;AAElB,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,UAAU,CAAA;AAE9D,mFAAmF;AACnF,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,aAAa,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAElF,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,uBAAuB,CAAA;IAC3B,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,wBAAwB,CAAA;IAC9B,KAAK,EAAE,yBAAyB,CAAA;IAChC;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,6EAA6E;IAC7E,KAAK,EAAE,CAAC,QAAQ,EAAE,qBAAqB,CAAC,UAAU,CAAC,KAAK,MAAM,CAAA;IAC9D,0DAA0D;IAC1D,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,eAAO,MAAM,2BAA2B,EAAE,aAAa,CAAC,yBAAyB,CAkFhF,CAAA;AAED,2EAA2E;AAC3E,MAAM,WAAW,8BAA8B;IAC7C,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,wBAAwB,CAAA;IAC/B,KAAK,EAAE,yBAAyB,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,qBAAqB,KAAK,MAAM,CAAC,CAAA;CAC9D"}
@@ -0,0 +1,84 @@
1
+ import { Coins, Hash, KeyRound, Layers, Package, Percent, Tag, Tags, Users } from "lucide-react";
2
+ export const adminCoreSettingsNavEntries = [
3
+ {
4
+ id: "team",
5
+ path: "/team",
6
+ icon: Users,
7
+ group: "general",
8
+ order: 20,
9
+ label: (settings) => settings.team,
10
+ defaultTitle: "Team",
11
+ },
12
+ {
13
+ id: "api-tokens",
14
+ path: "/api-tokens",
15
+ icon: KeyRound,
16
+ group: "general",
17
+ order: 30,
18
+ label: (settings) => settings.apiTokens,
19
+ defaultTitle: "API Tokens",
20
+ },
21
+ {
22
+ id: "channels",
23
+ path: "/channels",
24
+ icon: Hash,
25
+ group: "general",
26
+ order: 40,
27
+ label: (settings) => settings.channels,
28
+ defaultTitle: "Channels",
29
+ },
30
+ {
31
+ id: "taxes",
32
+ path: "/taxes",
33
+ icon: Percent,
34
+ group: "general",
35
+ order: 50,
36
+ label: (settings) => settings.taxes,
37
+ defaultTitle: "Taxes",
38
+ },
39
+ {
40
+ id: "cost-categories",
41
+ path: "/cost-categories",
42
+ icon: Coins,
43
+ group: "general",
44
+ order: 60,
45
+ label: (settings) => settings.costCategories,
46
+ defaultTitle: "Cost Categories",
47
+ },
48
+ {
49
+ id: "pricing-categories",
50
+ path: "/pricing-categories",
51
+ icon: Tags,
52
+ group: "general",
53
+ order: 70,
54
+ label: (settings) => settings.pricingCategories,
55
+ defaultTitle: "Pricing Categories",
56
+ },
57
+ {
58
+ id: "price-catalogs",
59
+ path: "/price-catalogs",
60
+ icon: Layers,
61
+ group: "general",
62
+ order: 80,
63
+ label: (settings) => settings.priceCatalogs,
64
+ defaultTitle: "Price Catalogs",
65
+ },
66
+ {
67
+ id: "product-types",
68
+ path: "/product-types",
69
+ icon: Package,
70
+ group: "products",
71
+ order: 10,
72
+ label: (settings) => settings.productTypes,
73
+ defaultTitle: "Product Types",
74
+ },
75
+ {
76
+ id: "product-tags",
77
+ path: "/product-tags",
78
+ icon: Tag,
79
+ group: "products",
80
+ order: 20,
81
+ label: (settings) => settings.productTags,
82
+ defaultTitle: "Product Tags",
83
+ },
84
+ ];
@@ -0,0 +1,2 @@
1
+ export * from "@voyant-travel/admin/app/extension-routes";
2
+ //# sourceMappingURL=extension-routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension-routes.d.ts","sourceRoot":"","sources":["../src/extension-routes.tsx"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAA"}
@@ -0,0 +1 @@
1
+ export * from "@voyant-travel/admin/app/extension-routes";
@@ -0,0 +1,3 @@
1
+ export * from "@voyant-travel/admin/app";
2
+ export * from "./core-extension/index.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from "@voyant-travel/admin/app";
2
+ export * from "./core-extension/index.js";
package/dist/root.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "@voyant-travel/admin/app/root";
2
+ //# sourceMappingURL=root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../src/root.tsx"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA"}
package/dist/root.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@voyant-travel/admin/app/root";
@@ -0,0 +1,2 @@
1
+ export * from "@voyant-travel/admin/app/router";
2
+ //# sourceMappingURL=router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.tsx"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
package/dist/router.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@voyant-travel/admin/app/router";
@@ -0,0 +1,2 @@
1
+ export * from "@voyant-travel/admin/app/workspace";
2
+ //# sourceMappingURL=workspace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../src/workspace.tsx"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAA"}
@@ -0,0 +1 @@
1
+ export * from "@voyant-travel/admin/app/workspace";
package/package.json ADDED
@@ -0,0 +1,104 @@
1
+ {
2
+ "name": "@voyant-travel/admin-app",
3
+ "version": "0.10.0",
4
+ "license": "Apache-2.0",
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "./root": {
14
+ "types": "./dist/root.d.ts",
15
+ "import": "./dist/root.js",
16
+ "default": "./dist/root.js"
17
+ },
18
+ "./router": {
19
+ "types": "./dist/router.d.ts",
20
+ "import": "./dist/router.js",
21
+ "default": "./dist/router.js"
22
+ },
23
+ "./workspace": {
24
+ "types": "./dist/workspace.d.ts",
25
+ "import": "./dist/workspace.js",
26
+ "default": "./dist/workspace.js"
27
+ },
28
+ "./core-extension": {
29
+ "types": "./dist/core-extension/index.d.ts",
30
+ "import": "./dist/core-extension/index.js",
31
+ "default": "./dist/core-extension/index.js"
32
+ }
33
+ },
34
+ "peerDependencies": {
35
+ "@tanstack/react-query": "^5.0.0",
36
+ "@tanstack/react-router": "^1.0.0",
37
+ "lucide-react": "^0.475.0",
38
+ "react": "^19.0.0",
39
+ "react-dom": "^19.0.0",
40
+ "@voyant-travel/admin": "^0.111.0",
41
+ "@voyant-travel/auth-react": "^0.113.3",
42
+ "@voyant-travel/commerce-react": "^0.1.0",
43
+ "@voyant-travel/distribution-react": "^0.109.8",
44
+ "@voyant-travel/inventory-react": "^0.1.0",
45
+ "@voyant-travel/finance-react": "^0.119.5",
46
+ "@voyant-travel/ui": "^0.106.1"
47
+ },
48
+ "devDependencies": {
49
+ "@tanstack/react-query": "^5.100.11",
50
+ "@tanstack/react-router": "^1.170.4",
51
+ "@types/react": "^19.2.14",
52
+ "@types/react-dom": "^19.2.3",
53
+ "lucide-react": "^1.7.0",
54
+ "react": "^19.2.4",
55
+ "react-dom": "^19.2.4",
56
+ "typescript": "^6.0.2",
57
+ "vitest": "^4.1.2",
58
+ "@voyant-travel/admin": "^0.111.0",
59
+ "@voyant-travel/commerce-react": "^0.1.0",
60
+ "@voyant-travel/auth-react": "^0.113.3",
61
+ "@voyant-travel/distribution-react": "^0.109.8",
62
+ "@voyant-travel/finance-react": "^0.119.5",
63
+ "@voyant-travel/inventory-react": "^0.1.0",
64
+ "@voyant-travel/ui": "^0.106.1",
65
+ "@voyant-travel/voyant-typescript-config": "^0.1.0"
66
+ },
67
+ "files": [
68
+ "dist"
69
+ ],
70
+ "publishConfig": {
71
+ "access": "public"
72
+ },
73
+ "repository": {
74
+ "type": "git",
75
+ "url": "https://github.com/voyant-travel/voyant.git",
76
+ "directory": "packages/admin-app"
77
+ },
78
+ "peerDependenciesMeta": {
79
+ "@voyant-travel/auth-react": {
80
+ "optional": true
81
+ },
82
+ "@voyant-travel/commerce-react": {
83
+ "optional": true
84
+ },
85
+ "@voyant-travel/distribution-react": {
86
+ "optional": true
87
+ },
88
+ "@voyant-travel/finance-react": {
89
+ "optional": true
90
+ },
91
+ "@voyant-travel/inventory-react": {
92
+ "optional": true
93
+ }
94
+ },
95
+ "scripts": {
96
+ "build": "tsc -p tsconfig.json",
97
+ "clean": "rm -rf dist tsconfig.tsbuildinfo",
98
+ "typecheck": "tsc --noEmit",
99
+ "lint": "biome check src/ tests/",
100
+ "test": "vitest run --passWithNoTests"
101
+ },
102
+ "main": "./dist/index.js",
103
+ "types": "./dist/index.d.ts"
104
+ }