@voyantjs/notifications-react 0.107.0 → 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.
@@ -22,18 +22,8 @@ declare module "@voyantjs/admin" {
22
22
  };
23
23
  }
24
24
  }
25
- export { NotificationDeliveriesHost } from "./notification-deliveries-host.js";
26
- export { NotificationDeliveryDetailDialog } from "./notification-delivery-detail-dialog.js";
27
- export { NotificationReminderRuleDetailHost, type NotificationReminderRuleDetailHostProps, } from "./notification-reminder-rule-detail-host.js";
28
- export { NotificationReminderRuleDialog } from "./notification-reminder-rule-dialog.js";
29
- export { NotificationReminderRulesHost } from "./notification-reminder-rules-host.js";
30
- export { NotificationReminderRunsHost } from "./notification-reminder-runs-host.js";
31
- export { NotificationSettingsHost } from "./notification-settings-host.js";
32
- export { NotificationTemplateAuthoringHelp } from "./notification-template-authoring-help.js";
33
- export { NotificationTemplateDetailHost, type NotificationTemplateDetailHostProps, } from "./notification-template-detail-host.js";
34
- export { NotificationTemplateDialog } from "./notification-template-dialog.js";
35
- export { NotificationTemplatesHost } from "./notification-templates-host.js";
36
- export { RemindersPreviewHost } from "./reminders-preview-host.js";
25
+ export type { NotificationReminderRuleDetailHostProps } from "./notification-reminder-rule-detail-host.js";
26
+ export type { NotificationTemplateDetailHostProps } from "./notification-template-detail-host.js";
37
27
  export interface CreateNotificationsAdminExtensionOptions {
38
28
  /** Mount path of the notifications pages inside the admin workspace. Default `/notifications`. */
39
29
  basePath?: string;
@@ -58,22 +48,20 @@ export interface CreateNotificationsAdminExtensionOptions {
58
48
  * them. If the base nav ever drops the notifications group, this extension
59
49
  * is where the entries move.
60
50
  *
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},
51
+ * ROUTES: full implementations (packaged-admin RFC §4.8 endgame) each
52
+ * contribution carries a lazy `page` module loader, so hosts bind them
53
+ * through their code-assembled admin route tree with no per-route files.
54
+ * The notifications pages keep their filter state component-local and fetch
55
+ * client-side, so contributions carry no loader, no search contract and no
56
+ * SSR override. {@link NotificationTemplatesHost},
64
57
  * {@link NotificationReminderRulesHost}, {@link NotificationDeliveriesHost},
65
58
  * {@link NotificationReminderRunsHost}, {@link RemindersPreviewHost} and
66
- * {@link NotificationSettingsHost} are zero-prop;
59
+ * {@link NotificationSettingsHost} are zero-prop; the detail contributions
60
+ * resolve wrapper pages (`./pages/*`) that bind the matched `$id` param onto
67
61
  * {@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.
62
+ * {@link NotificationReminderRuleDetailHost}. Pages stay code-split because
63
+ * every `page` is a dynamic import of the specific host module, never a
64
+ * static reference from this factory.
77
65
  *
78
66
  * WIDGETS: none today. No cross-domain notifications card is slot-mounted —
79
67
  * deliveries shown on other domains' detail pages are those hosts' concern.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/admin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,iBAAiB,CAAA;AAE3E;;;;;;GAMG;AACH,OAAO,QAAQ,iBAAiB,CAAC;IAC/B,UAAU,iBAAiB;QACzB,4CAA4C;QAC5C,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAClD,6CAA6C;QAC7C,6BAA6B,EAAE;YAAE,UAAU,EAAE,MAAM,CAAA;SAAE,CAAA;QACrD,oCAAoC;QACpC,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE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wCAA6C,GACrD,cAAc,CAwDhB"}
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;;;;;;GAMG;AACH,OAAO,QAAQ,iBAAiB,CAAC;IAC/B,UAAU,iBAAiB;QACzB,4CAA4C;QAC5C,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAClD,6CAA6C;QAC7C,6BAA6B,EAAE;YAAE,UAAU,EAAE,MAAM,CAAA;SAAE,CAAA;QACrD,oCAAoC;QACpC,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACtD,6DAA6D;QAC7D,iCAAiC,EAAE;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE,CAAA;KACtD;CACF;AAWD,YAAY,EAAE,uCAAuC,EAAE,MAAM,6CAA6C,CAAA;AAC1G,YAAY,EAAE,mCAAmC,EAAE,MAAM,wCAAwC,CAAA;AAEjG,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,CA2FhB"}
@@ -1,19 +1,4 @@
1
- import { defineAdminExtension } from "@voyantjs/admin";
2
- // Packaged admin hosts (packaged-admin RFC Phase 3): the operator-grade
3
- // notifications pages bound to their data wiring + semantic-destination
4
- // navigation. Host route files only bind route params onto these.
5
- export { NotificationDeliveriesHost } from "./notification-deliveries-host.js";
6
- export { NotificationDeliveryDetailDialog } from "./notification-delivery-detail-dialog.js";
7
- export { NotificationReminderRuleDetailHost, } from "./notification-reminder-rule-detail-host.js";
8
- export { NotificationReminderRuleDialog } from "./notification-reminder-rule-dialog.js";
9
- export { NotificationReminderRulesHost } from "./notification-reminder-rules-host.js";
10
- export { NotificationReminderRunsHost } from "./notification-reminder-runs-host.js";
11
- export { NotificationSettingsHost } from "./notification-settings-host.js";
12
- export { NotificationTemplateAuthoringHelp } from "./notification-template-authoring-help.js";
13
- export { NotificationTemplateDetailHost, } from "./notification-template-detail-host.js";
14
- export { NotificationTemplateDialog } from "./notification-template-dialog.js";
15
- export { NotificationTemplatesHost } from "./notification-templates-host.js";
16
- export { RemindersPreviewHost } from "./reminders-preview-host.js";
1
+ import { adminRoutePageModule, defineAdminExtension } from "@voyantjs/admin";
17
2
  /**
18
3
  * The notifications admin contribution (packaged-admin RFC Phase 3,
19
4
  * `@voyantjs/<domain>-ui/admin` convention).
@@ -25,22 +10,20 @@ export { RemindersPreviewHost } from "./reminders-preview-host.js";
25
10
  * them. If the base nav ever drops the notifications group, this extension
26
11
  * is where the entries move.
27
12
  *
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},
13
+ * ROUTES: full implementations (packaged-admin RFC §4.8 endgame) each
14
+ * contribution carries a lazy `page` module loader, so hosts bind them
15
+ * through their code-assembled admin route tree with no per-route files.
16
+ * The notifications pages keep their filter state component-local and fetch
17
+ * client-side, so contributions carry no loader, no search contract and no
18
+ * SSR override. {@link NotificationTemplatesHost},
31
19
  * {@link NotificationReminderRulesHost}, {@link NotificationDeliveriesHost},
32
20
  * {@link NotificationReminderRunsHost}, {@link RemindersPreviewHost} and
33
- * {@link NotificationSettingsHost} are zero-prop;
21
+ * {@link NotificationSettingsHost} are zero-prop; the detail contributions
22
+ * resolve wrapper pages (`./pages/*`) that bind the matched `$id` param onto
34
23
  * {@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.
24
+ * {@link NotificationReminderRuleDetailHost}. Pages stay code-split because
25
+ * every `page` is a dynamic import of the specific host module, never a
26
+ * static reference from this factory.
44
27
  *
45
28
  * WIDGETS: none today. No cross-domain notifications card is slot-mounted —
46
29
  * deliveries shown on other domains' detail pages are those hosts' concern.
@@ -55,41 +38,58 @@ export function createNotificationsAdminExtension(options = {}) {
55
38
  id: "notifications-templates-index",
56
39
  path: `${basePath}/templates`,
57
40
  title: templates,
41
+ // Route-backed destination (RFC §4.7 endgame): the key resolves by
42
+ // pure path interpolation of this route, so the host's resolver is
43
+ // generated (`voyant admin generate --destinations`).
44
+ destination: "notificationTemplate.list",
45
+ page: () => import("./notification-templates-host.js").then((module) => adminRoutePageModule(module.NotificationTemplatesHost)),
58
46
  },
59
47
  {
60
48
  id: "notifications-templates-detail",
61
49
  path: `${basePath}/templates/$id`,
62
50
  title: templates,
51
+ destination: "notificationTemplate.detail",
52
+ destinationParams: { id: "templateId" },
53
+ page: () => import("./pages/notification-template-detail-page.js"),
63
54
  },
64
55
  {
65
56
  id: "notifications-reminder-rules-index",
66
57
  path: `${basePath}/reminder-rules`,
67
58
  title: reminderRules,
59
+ destination: "notificationReminderRule.list",
60
+ page: () => import("./notification-reminder-rules-host.js").then((module) => adminRoutePageModule(module.NotificationReminderRulesHost)),
68
61
  },
69
62
  {
70
63
  id: "notifications-reminder-rules-detail",
71
64
  path: `${basePath}/reminder-rules/$id`,
72
65
  title: reminderRules,
66
+ destination: "notificationReminderRule.detail",
67
+ destinationParams: { id: "ruleId" },
68
+ page: () => import("./pages/notification-reminder-rule-detail-page.js"),
73
69
  },
74
70
  {
75
71
  id: "notifications-deliveries",
76
72
  path: `${basePath}/deliveries`,
77
73
  title: deliveries,
74
+ page: () => import("./notification-deliveries-host.js").then((module) => adminRoutePageModule(module.NotificationDeliveriesHost)),
78
75
  },
79
76
  {
80
77
  id: "notifications-reminder-runs",
81
78
  path: `${basePath}/reminder-runs`,
82
79
  title: reminderRuns,
80
+ page: () => import("./notification-reminder-runs-host.js").then((module) => adminRoutePageModule(module.NotificationReminderRunsHost)),
83
81
  },
84
82
  {
85
83
  id: "notifications-preview",
86
84
  path: `${basePath}/preview`,
87
85
  title: preview,
86
+ page: () => import("./reminders-preview-host.js").then((module) => adminRoutePageModule(module.RemindersPreviewHost)),
88
87
  },
89
88
  {
90
89
  id: "notifications-settings",
91
90
  path: `${basePath}/settings`,
92
91
  title: settings,
92
+ page: () => import("./notification-settings-host.js").then((module) => adminRoutePageModule(module.NotificationSettingsHost)),
93
93
  },
94
94
  ],
95
95
  });
@@ -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.109.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.109.0",
80
+ "@voyantjs/notifications": "^0.109.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.109.0",
116
116
  "@voyantjs/i18n": "^0.106.0",
117
- "@voyantjs/notifications": "^0.107.0",
117
+ "@voyantjs/notifications": "^0.109.0",
118
118
  "@voyantjs/react": "^0.104.1",
119
119
  "@voyantjs/ui": "^0.106.0",
120
120
  "@voyantjs/voyant-typescript-config": "^0.1.0"