@voyantjs/notifications-react 0.107.0 → 0.108.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.
@@ -58,22 +58,20 @@ export interface CreateNotificationsAdminExtensionOptions {
58
58
  * them. If the base nav ever drops the notifications group, this extension
59
59
  * is where the entries move.
60
60
  *
61
- * ROUTES: contributions are metadata only the notifications pages keep
62
- * their filter state component-local, so there are no URL search contracts.
63
- * The PAGES are package-owned: {@link NotificationTemplatesHost},
61
+ * ROUTES: full implementations (packaged-admin RFC §4.8 endgame) each
62
+ * contribution carries a lazy `page` module loader, so hosts bind them
63
+ * through their code-assembled admin route tree with no per-route files.
64
+ * The notifications pages keep their filter state component-local and fetch
65
+ * client-side, so contributions carry no loader, no search contract and no
66
+ * SSR override. {@link NotificationTemplatesHost},
64
67
  * {@link NotificationReminderRulesHost}, {@link NotificationDeliveriesHost},
65
68
  * {@link NotificationReminderRunsHost}, {@link RemindersPreviewHost} and
66
- * {@link NotificationSettingsHost} are zero-prop;
69
+ * {@link NotificationSettingsHost} are zero-prop; the detail contributions
70
+ * resolve wrapper pages (`./pages/*`) that bind the matched `$id` param onto
67
71
  * {@link NotificationTemplateDetailHost} and
68
- * {@link NotificationReminderRuleDetailHost} bind the detail pages to their
69
- * data wiring and resolve every cross-route link through the semantic
70
- * destinations declared above. `component:` is intentionally NOT attached
71
- * to these contributions yet: the contribution contract renders zero-prop
72
- * pages (route components read params via the router, per RFC §4.2), while
73
- * the detail hosts take the record id as a prop. Host route files stay the
74
- * thin binding layer (`Route.useParams()` → host props) until the §4.2
75
- * code-based route assembly gives packaged pages a router-agnostic way to
76
- * read route state.
72
+ * {@link NotificationReminderRuleDetailHost}. Pages stay code-split because
73
+ * every `page` is a dynamic import of the specific host module, never a
74
+ * static reference from this factory.
77
75
  *
78
76
  * WIDGETS: none today. No cross-domain notifications card is slot-mounted —
79
77
  * deliveries shown on other domains' detail pages are those hosts' concern.
@@ -1 +1 @@
1
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AE,MAAM,uCAAuC,CAAA;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAA;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAC1E,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAA;AAC7F,OAAO,EACL,8BAA8B,EAC9B,KAAK,mCAAmC,GACzC,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAA;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAElE,MAAM,WAAW,wCAAwC;IACvD,kGAAkG;IAClG,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2EAA2E;IAC3E,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,GAAE,wCAA6C,GACrD,cAAc,CAkFhB"}
@@ -1,4 +1,4 @@
1
- import { defineAdminExtension } from "@voyantjs/admin";
1
+ import { adminRoutePageModule, defineAdminExtension } from "@voyantjs/admin";
2
2
  // Packaged admin hosts (packaged-admin RFC Phase 3): the operator-grade
3
3
  // notifications pages bound to their data wiring + semantic-destination
4
4
  // navigation. Host route files only bind route params onto these.
@@ -25,22 +25,20 @@ export { RemindersPreviewHost } from "./reminders-preview-host.js";
25
25
  * them. If the base nav ever drops the notifications group, this extension
26
26
  * is where the entries move.
27
27
  *
28
- * ROUTES: contributions are metadata only the notifications pages keep
29
- * their filter state component-local, so there are no URL search contracts.
30
- * The PAGES are package-owned: {@link NotificationTemplatesHost},
28
+ * ROUTES: full implementations (packaged-admin RFC §4.8 endgame) each
29
+ * contribution carries a lazy `page` module loader, so hosts bind them
30
+ * through their code-assembled admin route tree with no per-route files.
31
+ * The notifications pages keep their filter state component-local and fetch
32
+ * client-side, so contributions carry no loader, no search contract and no
33
+ * SSR override. {@link NotificationTemplatesHost},
31
34
  * {@link NotificationReminderRulesHost}, {@link NotificationDeliveriesHost},
32
35
  * {@link NotificationReminderRunsHost}, {@link RemindersPreviewHost} and
33
- * {@link NotificationSettingsHost} are zero-prop;
36
+ * {@link NotificationSettingsHost} are zero-prop; the detail contributions
37
+ * resolve wrapper pages (`./pages/*`) that bind the matched `$id` param onto
34
38
  * {@link NotificationTemplateDetailHost} and
35
- * {@link NotificationReminderRuleDetailHost} bind the detail pages to their
36
- * data wiring and resolve every cross-route link through the semantic
37
- * destinations declared above. `component:` is intentionally NOT attached
38
- * to these contributions yet: the contribution contract renders zero-prop
39
- * pages (route components read params via the router, per RFC §4.2), while
40
- * the detail hosts take the record id as a prop. Host route files stay the
41
- * thin binding layer (`Route.useParams()` → host props) until the §4.2
42
- * code-based route assembly gives packaged pages a router-agnostic way to
43
- * read route state.
39
+ * {@link NotificationReminderRuleDetailHost}. Pages stay code-split because
40
+ * every `page` is a dynamic import of the specific host module, never a
41
+ * static reference from this factory.
44
42
  *
45
43
  * WIDGETS: none today. No cross-domain notifications card is slot-mounted —
46
44
  * deliveries shown on other domains' detail pages are those hosts' concern.
@@ -55,41 +53,49 @@ export function createNotificationsAdminExtension(options = {}) {
55
53
  id: "notifications-templates-index",
56
54
  path: `${basePath}/templates`,
57
55
  title: templates,
56
+ page: () => import("./notification-templates-host.js").then((module) => adminRoutePageModule(module.NotificationTemplatesHost)),
58
57
  },
59
58
  {
60
59
  id: "notifications-templates-detail",
61
60
  path: `${basePath}/templates/$id`,
62
61
  title: templates,
62
+ page: () => import("./pages/notification-template-detail-page.js"),
63
63
  },
64
64
  {
65
65
  id: "notifications-reminder-rules-index",
66
66
  path: `${basePath}/reminder-rules`,
67
67
  title: reminderRules,
68
+ page: () => import("./notification-reminder-rules-host.js").then((module) => adminRoutePageModule(module.NotificationReminderRulesHost)),
68
69
  },
69
70
  {
70
71
  id: "notifications-reminder-rules-detail",
71
72
  path: `${basePath}/reminder-rules/$id`,
72
73
  title: reminderRules,
74
+ page: () => import("./pages/notification-reminder-rule-detail-page.js"),
73
75
  },
74
76
  {
75
77
  id: "notifications-deliveries",
76
78
  path: `${basePath}/deliveries`,
77
79
  title: deliveries,
80
+ page: () => import("./notification-deliveries-host.js").then((module) => adminRoutePageModule(module.NotificationDeliveriesHost)),
78
81
  },
79
82
  {
80
83
  id: "notifications-reminder-runs",
81
84
  path: `${basePath}/reminder-runs`,
82
85
  title: reminderRuns,
86
+ page: () => import("./notification-reminder-runs-host.js").then((module) => adminRoutePageModule(module.NotificationReminderRunsHost)),
83
87
  },
84
88
  {
85
89
  id: "notifications-preview",
86
90
  path: `${basePath}/preview`,
87
91
  title: preview,
92
+ page: () => import("./reminders-preview-host.js").then((module) => adminRoutePageModule(module.RemindersPreviewHost)),
88
93
  },
89
94
  {
90
95
  id: "notifications-settings",
91
96
  path: `${basePath}/settings`,
92
97
  title: settings,
98
+ page: () => import("./notification-settings-host.js").then((module) => adminRoutePageModule(module.NotificationSettingsHost)),
93
99
  },
94
100
  ],
95
101
  });
@@ -0,0 +1,8 @@
1
+ import type { AdminRoutePageProps } from "@voyantjs/admin";
2
+ /**
3
+ * Route page for the `notifications-reminder-rules-detail` contribution:
4
+ * binds the matched route's `$id` param onto
5
+ * {@link NotificationReminderRuleDetailHost}.
6
+ */
7
+ export default function NotificationReminderRuleDetailPage({ params }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=notification-reminder-rule-detail-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-reminder-rule-detail-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/notification-reminder-rule-detail-page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAI1D;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,kCAAkC,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,2CAEzF"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { NotificationReminderRuleDetailHost } from "../notification-reminder-rule-detail-host.js";
3
+ /**
4
+ * Route page for the `notifications-reminder-rules-detail` contribution:
5
+ * binds the matched route's `$id` param onto
6
+ * {@link NotificationReminderRuleDetailHost}.
7
+ */
8
+ export default function NotificationReminderRuleDetailPage({ params }) {
9
+ return _jsx(NotificationReminderRuleDetailHost, { id: params.id ?? "" });
10
+ }
@@ -0,0 +1,7 @@
1
+ import type { AdminRoutePageProps } from "@voyantjs/admin";
2
+ /**
3
+ * Route page for the `notifications-templates-detail` contribution: binds
4
+ * the matched route's `$id` param onto {@link NotificationTemplateDetailHost}.
5
+ */
6
+ export default function NotificationTemplateDetailPage({ params }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=notification-template-detail-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-template-detail-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/notification-template-detail-page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAI1D;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,2CAErF"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { NotificationTemplateDetailHost } from "../notification-template-detail-host.js";
3
+ /**
4
+ * Route page for the `notifications-templates-detail` contribution: binds
5
+ * the matched route's `$id` param onto {@link NotificationTemplateDetailHost}.
6
+ */
7
+ export default function NotificationTemplateDetailPage({ params }) {
8
+ return _jsx(NotificationTemplateDetailHost, { id: params.id ?? "" });
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/notifications-react",
3
- "version": "0.107.0",
3
+ "version": "0.108.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -76,8 +76,8 @@
76
76
  "react-dom": "^19.0.0",
77
77
  "react-hook-form": "^7.60.0",
78
78
  "zod": "^4.0.0",
79
- "@voyantjs/admin": "^0.107.0",
80
- "@voyantjs/notifications": "^0.107.0",
79
+ "@voyantjs/admin": "^0.108.0",
80
+ "@voyantjs/notifications": "^0.108.0",
81
81
  "@voyantjs/ui": "^0.106.0"
82
82
  },
83
83
  "peerDependenciesMeta": {
@@ -112,9 +112,9 @@
112
112
  "typescript": "^6.0.2",
113
113
  "vitest": "^4.1.2",
114
114
  "zod": "^4.3.6",
115
- "@voyantjs/admin": "^0.107.0",
115
+ "@voyantjs/admin": "^0.108.0",
116
116
  "@voyantjs/i18n": "^0.106.0",
117
- "@voyantjs/notifications": "^0.107.0",
117
+ "@voyantjs/notifications": "^0.108.0",
118
118
  "@voyantjs/react": "^0.104.1",
119
119
  "@voyantjs/ui": "^0.106.0",
120
120
  "@voyantjs/voyant-typescript-config": "^0.1.0"