@voyantjs/distribution-react 0.107.3 → 0.109.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.
@@ -0,0 +1,35 @@
1
+ import { type AdminExtension } from "@voyantjs/admin";
2
+ export interface CreateDistributionAdminExtensionOptions {
3
+ /** Mount path of the channel-sync page inside the admin workspace. Default `/channel-sync`. */
4
+ basePath?: string;
5
+ /** Localized page titles. Defaults are the English operator nav labels. */
6
+ labels?: {
7
+ channelSync?: string;
8
+ };
9
+ }
10
+ /**
11
+ * The distribution admin contribution (packaged-admin RFC Phase 3,
12
+ * `@voyantjs/<domain>-ui/admin` convention).
13
+ *
14
+ * NAVIGATION: deliberately none. The Channel sync nav item is part of the
15
+ * BASE operator navigation — see `createOperatorAdminNavigation` in
16
+ * `@voyantjs/admin` — so contributing a nav entry here would duplicate it.
17
+ * If the base nav ever drops the item, this extension is where the entry
18
+ * moves.
19
+ *
20
+ * ROUTES: one full implementation (packaged-admin RFC §4.8 endgame) — a lazy
21
+ * `page` module loader for {@link ChannelSyncPage}, so hosts bind it through
22
+ * their code-assembled admin route tree with no per-route file. The page
23
+ * keeps its filter/tab state component-local and fetches client-side through
24
+ * the shared `@voyantjs/react` provider context (`baseUrl` + credentialed
25
+ * fetcher), so the contribution carries no loader, no search contract and no
26
+ * SSR override. `adminRoutePageModule` adapts the page's all-optional props
27
+ * bag past TypeScript's weak-type rule. No destination key is declared:
28
+ * nothing navigates here semantically — the base nav links the path
29
+ * directly.
30
+ *
31
+ * WIDGETS: none today. Per-booking sync state on the booking detail page is
32
+ * that host's concern.
33
+ */
34
+ export declare function createDistributionAdminExtension(options?: CreateDistributionAdminExtensionOptions): AdminExtension;
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/admin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA8C,MAAM,iBAAiB,CAAA;AAEjG,MAAM,WAAW,uCAAuC;IACtD,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2EAA2E;IAC3E,MAAM,CAAC,EAAE;QACP,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAA;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,GAAE,uCAA4C,GACpD,cAAc,CAkBhB"}
@@ -0,0 +1,40 @@
1
+ import { adminRoutePageModule, defineAdminExtension } from "@voyantjs/admin";
2
+ /**
3
+ * The distribution admin contribution (packaged-admin RFC Phase 3,
4
+ * `@voyantjs/<domain>-ui/admin` convention).
5
+ *
6
+ * NAVIGATION: deliberately none. The Channel sync nav item is part of the
7
+ * BASE operator navigation — see `createOperatorAdminNavigation` in
8
+ * `@voyantjs/admin` — so contributing a nav entry here would duplicate it.
9
+ * If the base nav ever drops the item, this extension is where the entry
10
+ * moves.
11
+ *
12
+ * ROUTES: one full implementation (packaged-admin RFC §4.8 endgame) — a lazy
13
+ * `page` module loader for {@link ChannelSyncPage}, so hosts bind it through
14
+ * their code-assembled admin route tree with no per-route file. The page
15
+ * keeps its filter/tab state component-local and fetches client-side through
16
+ * the shared `@voyantjs/react` provider context (`baseUrl` + credentialed
17
+ * fetcher), so the contribution carries no loader, no search contract and no
18
+ * SSR override. `adminRoutePageModule` adapts the page's all-optional props
19
+ * bag past TypeScript's weak-type rule. No destination key is declared:
20
+ * nothing navigates here semantically — the base nav links the path
21
+ * directly.
22
+ *
23
+ * WIDGETS: none today. Per-booking sync state on the booking detail page is
24
+ * that host's concern.
25
+ */
26
+ export function createDistributionAdminExtension(options = {}) {
27
+ const { basePath = "/channel-sync", labels = {} } = options;
28
+ const { channelSync = "Channel sync" } = labels;
29
+ return defineAdminExtension({
30
+ id: "distribution",
31
+ routes: [
32
+ {
33
+ id: "distribution-channel-sync",
34
+ path: basePath,
35
+ title: channelSync,
36
+ page: () => import("../components/channel-sync-page.js").then((module) => adminRoutePageModule(module.ChannelSyncPage)),
37
+ },
38
+ ],
39
+ });
40
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/distribution-react",
3
- "version": "0.107.3",
3
+ "version": "0.109.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -58,6 +58,11 @@
58
58
  "import": "./dist/i18n/ro.js",
59
59
  "default": "./dist/i18n/ro.js"
60
60
  },
61
+ "./admin": {
62
+ "types": "./dist/admin/index.d.ts",
63
+ "import": "./dist/admin/index.js",
64
+ "default": "./dist/admin/index.js"
65
+ },
61
66
  "./components/*": {
62
67
  "types": "./dist/components/*.d.ts",
63
68
  "import": "./dist/components/*.js",
@@ -70,13 +75,17 @@
70
75
  "react": "^19.0.0",
71
76
  "react-dom": "^19.0.0",
72
77
  "zod": "^4.0.0",
73
- "@voyantjs/distribution": "^0.107.3",
78
+ "@voyantjs/admin": "^0.111.0",
79
+ "@voyantjs/distribution": "^0.109.0",
74
80
  "@voyantjs/ui": "^0.106.0"
75
81
  },
76
82
  "peerDependenciesMeta": {
77
83
  "@tanstack/react-table": {
78
84
  "optional": true
79
85
  },
86
+ "@voyantjs/admin": {
87
+ "optional": true
88
+ },
80
89
  "@voyantjs/ui": {
81
90
  "optional": true
82
91
  }
@@ -96,7 +105,8 @@
96
105
  "typescript": "^6.0.2",
97
106
  "vitest": "^4.1.2",
98
107
  "zod": "^4.3.6",
99
- "@voyantjs/distribution": "^0.107.3",
108
+ "@voyantjs/admin": "^0.111.0",
109
+ "@voyantjs/distribution": "^0.109.0",
100
110
  "@voyantjs/i18n": "^0.106.0",
101
111
  "@voyantjs/react": "^0.104.1",
102
112
  "@voyantjs/ui": "^0.106.0",