@genesislcap/ai-assistant 15.70.0 → 15.71.0-FUI-2650.1

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.
Files changed (139) hide show
  1. package/dist/ai-assistant.api.json +97 -0
  2. package/dist/ai-assistant.d.ts +65 -0
  3. package/dist/chat-driver.cjs +18031 -0
  4. package/dist/chat-driver.cjs.map +4 -4
  5. package/dist/chat-driver.mjs +18024 -0
  6. package/dist/chat-driver.mjs.map +4 -4
  7. package/dist/custom-elements.json +9287 -6447
  8. package/dist/dts/chat-driver-node.d.ts +2 -0
  9. package/dist/dts/chat-driver-node.d.ts.map +1 -1
  10. package/dist/dts/code-review/code-review.types.d.ts +76 -0
  11. package/dist/dts/code-review/code-review.types.d.ts.map +1 -0
  12. package/dist/dts/code-review/code-reviewer.agent.d.ts +77 -0
  13. package/dist/dts/code-review/code-reviewer.agent.d.ts.map +1 -0
  14. package/dist/dts/code-review/code-reviewer.prompt.d.ts +23 -0
  15. package/dist/dts/code-review/code-reviewer.prompt.d.ts.map +1 -0
  16. package/dist/dts/code-review/gate.d.ts +44 -0
  17. package/dist/dts/code-review/gate.d.ts.map +1 -0
  18. package/dist/dts/code-review/index.d.ts +27 -0
  19. package/dist/dts/code-review/index.d.ts.map +1 -0
  20. package/dist/dts/code-review/review-changes.d.ts +70 -0
  21. package/dist/dts/code-review/review-changes.d.ts.map +1 -0
  22. package/dist/dts/code-review/rules/context-trigger-map.d.ts +6 -0
  23. package/dist/dts/code-review/rules/context-trigger-map.d.ts.map +1 -0
  24. package/dist/dts/code-review/rules/context.registry.d.ts +123 -0
  25. package/dist/dts/code-review/rules/context.registry.d.ts.map +1 -0
  26. package/dist/dts/code-review/rules/fui-ai-extensions.d.ts +13 -0
  27. package/dist/dts/code-review/rules/fui-ai-extensions.d.ts.map +1 -0
  28. package/dist/dts/code-review/rules/fui-blotter.d.ts +16 -0
  29. package/dist/dts/code-review/rules/fui-blotter.d.ts.map +1 -0
  30. package/dist/dts/code-review/rules/fui-chart.d.ts +20 -0
  31. package/dist/dts/code-review/rules/fui-chart.d.ts.map +1 -0
  32. package/dist/dts/code-review/rules/fui-column-defs.d.ts +21 -0
  33. package/dist/dts/code-review/rules/fui-column-defs.d.ts.map +1 -0
  34. package/dist/dts/code-review/rules/fui-components.d.ts +9 -0
  35. package/dist/dts/code-review/rules/fui-components.d.ts.map +1 -0
  36. package/dist/dts/code-review/rules/fui-criteria.d.ts +32 -0
  37. package/dist/dts/code-review/rules/fui-criteria.d.ts.map +1 -0
  38. package/dist/dts/code-review/rules/fui-custom-renderer.d.ts +15 -0
  39. package/dist/dts/code-review/rules/fui-custom-renderer.d.ts.map +1 -0
  40. package/dist/dts/code-review/rules/fui-dashboard.d.ts +19 -0
  41. package/dist/dts/code-review/rules/fui-dashboard.d.ts.map +1 -0
  42. package/dist/dts/code-review/rules/fui-dialogs.d.ts +19 -0
  43. package/dist/dts/code-review/rules/fui-dialogs.d.ts.map +1 -0
  44. package/dist/dts/code-review/rules/fui-entity-management.d.ts +19 -0
  45. package/dist/dts/code-review/rules/fui-entity-management.d.ts.map +1 -0
  46. package/dist/dts/code-review/rules/fui-error-boundary.d.ts +9 -0
  47. package/dist/dts/code-review/rules/fui-error-boundary.d.ts.map +1 -0
  48. package/dist/dts/code-review/rules/fui-eventing.d.ts +8 -0
  49. package/dist/dts/code-review/rules/fui-eventing.d.ts.map +1 -0
  50. package/dist/dts/code-review/rules/fui-flexlayout.d.ts +17 -0
  51. package/dist/dts/code-review/rules/fui-flexlayout.d.ts.map +1 -0
  52. package/dist/dts/code-review/rules/fui-flyout-panel.d.ts +10 -0
  53. package/dist/dts/code-review/rules/fui-flyout-panel.d.ts.map +1 -0
  54. package/dist/dts/code-review/rules/fui-form-component.d.ts +9 -0
  55. package/dist/dts/code-review/rules/fui-form-component.d.ts.map +1 -0
  56. package/dist/dts/code-review/rules/fui-formatters.d.ts +12 -0
  57. package/dist/dts/code-review/rules/fui-formatters.d.ts.map +1 -0
  58. package/dist/dts/code-review/rules/fui-foundation-comms.d.ts +10 -0
  59. package/dist/dts/code-review/rules/fui-foundation-comms.d.ts.map +1 -0
  60. package/dist/dts/code-review/rules/fui-global-filters.d.ts +33 -0
  61. package/dist/dts/code-review/rules/fui-global-filters.d.ts.map +1 -0
  62. package/dist/dts/code-review/rules/fui-import-surface.d.ts +37 -0
  63. package/dist/dts/code-review/rules/fui-import-surface.d.ts.map +1 -0
  64. package/dist/dts/code-review/rules/fui-inline-editing.d.ts +10 -0
  65. package/dist/dts/code-review/rules/fui-inline-editing.d.ts.map +1 -0
  66. package/dist/dts/code-review/rules/fui-layout.d.ts +7 -0
  67. package/dist/dts/code-review/rules/fui-layout.d.ts.map +1 -0
  68. package/dist/dts/code-review/rules/fui-notifications.d.ts +12 -0
  69. package/dist/dts/code-review/rules/fui-notifications.d.ts.map +1 -0
  70. package/dist/dts/code-review/rules/fui-primitives.d.ts +26 -0
  71. package/dist/dts/code-review/rules/fui-primitives.d.ts.map +1 -0
  72. package/dist/dts/code-review/rules/fui-rapid-grid-pro.d.ts +18 -0
  73. package/dist/dts/code-review/rules/fui-rapid-grid-pro.d.ts.map +1 -0
  74. package/dist/dts/code-review/rules/fui-redux-store.d.ts +8 -0
  75. package/dist/dts/code-review/rules/fui-redux-store.d.ts.map +1 -0
  76. package/dist/dts/code-review/rules/fui-reporting.d.ts +19 -0
  77. package/dist/dts/code-review/rules/fui-reporting.d.ts.map +1 -0
  78. package/dist/dts/code-review/rules/fui-styling.d.ts +15 -0
  79. package/dist/dts/code-review/rules/fui-styling.d.ts.map +1 -0
  80. package/dist/dts/code-review/rules/fui-trade-form.d.ts +13 -0
  81. package/dist/dts/code-review/rules/fui-trade-form.d.ts.map +1 -0
  82. package/dist/dts/code-review/submit-code-review.tool.d.ts +12 -0
  83. package/dist/dts/code-review/submit-code-review.tool.d.ts.map +1 -0
  84. package/dist/dts/code-review/unified-diff.d.ts +7 -0
  85. package/dist/dts/code-review/unified-diff.d.ts.map +1 -0
  86. package/dist/dts/code-review/verdict.d.ts +23 -0
  87. package/dist/dts/code-review/verdict.d.ts.map +1 -0
  88. package/dist/dts/components/code-review-result/code-review-result.d.ts +26 -0
  89. package/dist/dts/components/code-review-result/code-review-result.d.ts.map +1 -0
  90. package/dist/dts/index.d.ts +1 -0
  91. package/dist/dts/index.d.ts.map +1 -1
  92. package/dist/dts/react.d.ts +10 -0
  93. package/dist/esm/chat-driver-node.js +6 -0
  94. package/dist/esm/code-review/code-review.types.js +6 -0
  95. package/dist/esm/code-review/code-reviewer.agent.js +167 -0
  96. package/dist/esm/code-review/code-reviewer.prompt.js +103 -0
  97. package/dist/esm/code-review/gate.js +93 -0
  98. package/dist/esm/code-review/index.js +28 -0
  99. package/dist/esm/code-review/review-changes.js +123 -0
  100. package/dist/esm/code-review/rules/context-trigger-map.js +20 -0
  101. package/dist/esm/code-review/rules/context.registry.js +772 -0
  102. package/dist/esm/code-review/rules/fui-ai-extensions.js +306 -0
  103. package/dist/esm/code-review/rules/fui-blotter.js +596 -0
  104. package/dist/esm/code-review/rules/fui-chart.js +669 -0
  105. package/dist/esm/code-review/rules/fui-column-defs.js +862 -0
  106. package/dist/esm/code-review/rules/fui-components.js +245 -0
  107. package/dist/esm/code-review/rules/fui-criteria.js +538 -0
  108. package/dist/esm/code-review/rules/fui-custom-renderer.js +612 -0
  109. package/dist/esm/code-review/rules/fui-dashboard.js +604 -0
  110. package/dist/esm/code-review/rules/fui-dialogs.js +588 -0
  111. package/dist/esm/code-review/rules/fui-entity-management.js +1014 -0
  112. package/dist/esm/code-review/rules/fui-error-boundary.js +244 -0
  113. package/dist/esm/code-review/rules/fui-eventing.js +628 -0
  114. package/dist/esm/code-review/rules/fui-flexlayout.js +860 -0
  115. package/dist/esm/code-review/rules/fui-flyout-panel.js +432 -0
  116. package/dist/esm/code-review/rules/fui-form-component.js +898 -0
  117. package/dist/esm/code-review/rules/fui-formatters.js +415 -0
  118. package/dist/esm/code-review/rules/fui-foundation-comms.js +518 -0
  119. package/dist/esm/code-review/rules/fui-global-filters.js +778 -0
  120. package/dist/esm/code-review/rules/fui-import-surface.js +452 -0
  121. package/dist/esm/code-review/rules/fui-inline-editing.js +445 -0
  122. package/dist/esm/code-review/rules/fui-layout.js +431 -0
  123. package/dist/esm/code-review/rules/fui-notifications.js +439 -0
  124. package/dist/esm/code-review/rules/fui-primitives.js +1216 -0
  125. package/dist/esm/code-review/rules/fui-rapid-grid-pro.js +650 -0
  126. package/dist/esm/code-review/rules/fui-redux-store.js +522 -0
  127. package/dist/esm/code-review/rules/fui-reporting.js +506 -0
  128. package/dist/esm/code-review/rules/fui-styling.js +1229 -0
  129. package/dist/esm/code-review/rules/fui-trade-form.js +618 -0
  130. package/dist/esm/code-review/submit-code-review.tool.js +43 -0
  131. package/dist/esm/code-review/unified-diff.js +96 -0
  132. package/dist/esm/code-review/verdict.js +24 -0
  133. package/dist/esm/components/code-review-result/code-review-result.js +89 -0
  134. package/dist/esm/index.js +3 -0
  135. package/dist/react.cjs +7 -0
  136. package/dist/react.mjs +6 -0
  137. package/docs/code-review.md +137 -0
  138. package/package.json +24 -17
  139. package/scripts/smoke-chat-driver-node.mjs +15 -0
@@ -0,0 +1,439 @@
1
+ /**
2
+ * Context injected into the UI Builder system prompt.
3
+ * Covers the foundation-notifications imperative API: toast, snackbar, banner, dialog, alert,
4
+ * and the notify-container configuration for stacking / positioning.
5
+ *
6
+ * NOTE: foundation-notifications has NO React web-component wrapper and no /react subpath.
7
+ * It is a pure imperative TypeScript API — import functions directly from the package root.
8
+ * All functions are safe to call from React event handlers, useEffect, etc.
9
+ */
10
+ export const FUI_NOTIFICATIONS_TAGS = [
11
+ 'toast',
12
+ 'notification',
13
+ 'notify',
14
+ 'snackbar',
15
+ 'banner',
16
+ 'alert',
17
+ 'show a message',
18
+ 'show a popup message',
19
+ 'success message',
20
+ 'error message',
21
+ 'warning message',
22
+ 'info message',
23
+ 'toast message',
24
+ 'show notification',
25
+ 'display notification',
26
+ 'notification dialog',
27
+ 'confirmation dialog',
28
+ 'confirm before action',
29
+ 'show a dialog',
30
+ 'dismissible notification',
31
+ 'auto close',
32
+ 'auto-close notification',
33
+ 'notification with actions',
34
+ 'notification position',
35
+ 'top-right toast',
36
+ 'notification stack',
37
+ 'configureNotifications',
38
+ 'showNotificationToast',
39
+ 'showNotificationSnackbar',
40
+ 'showNotificationBanner',
41
+ 'showNotificationDialog',
42
+ ];
43
+ // No dependsOn — this module is self-contained (pure imperative functions, no sibling modules required)
44
+ export const FUI_NOTIFICATIONS_CONTEXT = `
45
+ ## NOTIFICATIONS (toast / snackbar / banner / dialog / alert)
46
+
47
+ ### Overview
48
+
49
+ \`foundation-notifications\` is a **pure imperative API** — there are no React web components to
50
+ render, no JSX, and no \`/react\` subpath. Call the exported functions directly from event handlers,
51
+ \`useEffect\`, async callbacks, etc.
52
+
53
+ The design-system prefix (always \`'rapid'\` in this project) is the second argument of every
54
+ function and drives the tag name of the UI component that gets created in the DOM.
55
+
56
+ ### Import paths (verified from package source and real usage)
57
+
58
+ \`\`\`ts
59
+ // All notification functions — import from the package root (NOT /react, there is none)
60
+ import {
61
+ showNotificationToast,
62
+ showNotificationSnackbar,
63
+ showNotificationBanner,
64
+ showNotificationDialog,
65
+ showNotificationAlert,
66
+ showNotification,
67
+ configureNotifications,
68
+ sortNotificationBySeverity,
69
+ } from '@genesislcap/foundation-notifications';
70
+
71
+ // Types — also from the package root
72
+ import type {
73
+ ToastStructure,
74
+ SnackbarStructure,
75
+ BannerStructure,
76
+ DialogStructure,
77
+ AlertStructure,
78
+ NotificationStructure,
79
+ NotificationType,
80
+ ToastPosition,
81
+ Toast,
82
+ Snackbar,
83
+ Banner,
84
+ Dialog,
85
+ ToastButton,
86
+ NotificationDataRow,
87
+ NotifyContainerConfig,
88
+ } from '@genesislcap/foundation-notifications';
89
+ \`\`\`
90
+
91
+ > **CRITICAL:** Do NOT import from \`@genesislcap/foundation-notifications/react\` — this subpath
92
+ > does not exist. Do NOT add JSX for notification components.
93
+
94
+ ---
95
+
96
+ ### API reference (source-verified)
97
+
98
+ #### \`showNotificationToast(config: ToastStructure, tagName: string, container?: HTMLElement): void\`
99
+
100
+ Displays a toast overlay. Required: \`title\` + \`body\`.
101
+
102
+ | Field | Type | Required | Notes |
103
+ |---|---|---|---|
104
+ | \`title\` | \`string\` | yes | |
105
+ | \`body\` | \`string\` | yes | |
106
+ | \`iconName\` | \`string\` | no | icon name string (e.g. \`'check'\`, \`'bell'\`) |
107
+ | \`createdAt\` | \`Date\` | no | shown in date slot |
108
+ | \`logLevel\` | \`LogLevel\` | no | |
109
+ | \`toast\` | \`Toast\` | no | see Toast interface below |
110
+
111
+ **\`Toast\` interface:**
112
+
113
+ | Field | Type | Default | Notes |
114
+ |---|---|---|---|
115
+ | \`type\` | \`'error' | 'warning' | 'success'\` | none | visual style |
116
+ | \`position\` | \`'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'\` | \`'top-right'\` | |
117
+ | \`autoClose\` | \`boolean\` | \`false\` | auto-dismiss on timeout |
118
+ | \`closeTimeout\` | \`number\` | — | milliseconds until auto-close |
119
+ | \`buttons\` | \`ToastButton[]\` | — | action buttons in the toast footer |
120
+ | \`details\` | \`NotificationDataRow\` | — | passed to button action callbacks |
121
+
122
+ #### \`showNotificationSnackbar(config: SnackbarStructure, tagName: string): void\`
123
+
124
+ Displays a snackbar at the bottom-left. Required: \`body\`. No \`title\` field.
125
+
126
+ | Field | Type | Required | Notes |
127
+ |---|---|---|---|
128
+ | \`body\` | \`string\` | yes | |
129
+ | \`logLevel\` | \`LogLevel\` | no | |
130
+ | \`snackbar\` | \`Snackbar\` | no | |
131
+
132
+ **\`Snackbar\` interface:**
133
+
134
+ | Field | Type | Notes |
135
+ |---|---|---|
136
+ | \`type\` | \`'error' | 'success'\` | visual style (only 2 values — no \`'warning'\`) |
137
+ | \`autoClose\` | \`boolean\` | |
138
+ | \`closeTimeout\` | \`number\` | ms |
139
+ | \`confirmingActions\` | \`ConfirmingAction[]\` | action buttons |
140
+
141
+ #### \`showNotificationBanner(config: BannerStructure, tagName: string, boundary?: HTMLElement): void\`
142
+
143
+ Inline banner anchored inside a container. Required: \`body\`. No \`title\` field.
144
+
145
+ | Field | Type | Notes |
146
+ |---|---|---|
147
+ | \`body\` | \`string\` | required |
148
+ | \`logLevel\` | \`LogLevel\` | |
149
+ | \`banner\` | \`Banner\` | |
150
+
151
+ **\`Banner\` interface:** \`dismissingAction?: DismissingAction\`, \`confirmingActions?: ConfirmingAction[]\`
152
+
153
+ #### \`showNotificationDialog(config: DialogStructure, tagName: string, boundary?: HTMLElement): void\`
154
+
155
+ Modal-style dialog requiring user action. Required: \`title\` + \`body\`.
156
+
157
+ | Field | Type | Notes |
158
+ |---|---|---|
159
+ | \`title\` | \`string\` | required |
160
+ | \`body\` | \`string\` | required |
161
+ | \`logLevel\` | \`LogLevel\` | |
162
+ | \`dialog\` | \`Dialog\` | |
163
+
164
+ **\`Dialog\` interface:** \`confirmingActions?: ConfirmingAction[]\`, \`dismissingAction?: DismissingAction\`
165
+
166
+ **\`ConfirmingAction\`:** \`{ label: string; action: Function }\`
167
+ **\`DismissingAction\`:** \`{ label: string; action?: Function }\`
168
+
169
+ #### \`showNotificationAlert(config: AlertStructure): void\`
170
+
171
+ Calls the browser's native \`alert()\`. Required: \`title\` + \`body\`. No \`tagName\` argument.
172
+ Avoid this — prefer toast or dialog for a better user experience.
173
+
174
+ #### \`showNotification(structure: NotificationStructure, tagName: string, boundary?: HTMLElement): void\`
175
+
176
+ Low-level dispatcher that reads \`structure.config\` keys (\`toast\`, \`snackbar\`, \`banner\`, \`dialog\`,
177
+ \`alert\`) and delegates to the appropriate launcher. Use the typed helpers above instead.
178
+
179
+ #### \`configureNotifications(config: Partial<NotifyContainerConfig>): void\`
180
+
181
+ Creates or updates a \`notify-container\` in the DOM for stacking toast behaviour.
182
+ Call once during app initialisation (e.g. in \`useEffect(() => { ... }, [])\` or app root).
183
+
184
+ **\`NotifyContainerConfig\`** key fields:
185
+
186
+ | Field | Type | Default | Notes |
187
+ |---|---|---|---|
188
+ | \`position\` | \`ToastPosition\` | \`'top-right'\` | only \`top-left\` / \`top-right\` supported currently |
189
+ | \`stackThreshold\` | \`number\` | \`5\` | visible count that triggers auto-collapse |
190
+ | \`allowManualCollapse\` | \`boolean\` | \`true\` | shows Expand/Collapse header button |
191
+ | \`allowCloseAll\` | \`boolean\` | \`true\` | shows Close All header button |
192
+ | \`showCount\` | \`boolean\` | \`true\` | shows count in header |
193
+ | \`notificationInterval\` | \`number\` | \`0\` | ms delay between sequentially revealed notifications |
194
+ | \`designSystemPrefix\` | \`string\` | \`'rapid'\` | |
195
+ | \`sortFn\` | \`(a, b) => number\` | none | custom sort; use \`sortNotificationBySeverity\` for severity order |
196
+
197
+ ---
198
+
199
+ ### Example 1 — Toast on button click (most common pattern)
200
+
201
+ \`\`\`tsx
202
+ import { showNotificationToast } from '@genesislcap/foundation-notifications';
203
+ import { Button } from '@genesislcap/rapid-design-system/react';
204
+
205
+ function TradeActions() {
206
+ const handleSubmit = async () => {
207
+ try {
208
+ // ... submit logic ...
209
+ showNotificationToast(
210
+ {
211
+ title: 'Trade submitted',
212
+ body: 'Your trade has been sent for execution.',
213
+ toast: { type: 'success', autoClose: true, closeTimeout: 4000 },
214
+ },
215
+ 'rapid',
216
+ );
217
+ } catch (err) {
218
+ showNotificationToast(
219
+ {
220
+ title: 'Submission failed',
221
+ body: err instanceof Error ? err.message : String(err),
222
+ toast: { type: 'error', autoClose: false },
223
+ },
224
+ 'rapid',
225
+ );
226
+ }
227
+ };
228
+
229
+ return <Button appearance="primary" onClick={handleSubmit}>Submit</Button>;
230
+ }
231
+ \`\`\`
232
+
233
+ ---
234
+
235
+ ### Example 2 — Confirmation dialog before a destructive action
236
+
237
+ \`\`\`tsx
238
+ import { showNotificationDialog } from '@genesislcap/foundation-notifications';
239
+ import { getConnect, commitGenesisEvent } from '@genesislcap/foundation-comms';
240
+ import { Button } from '@genesislcap/rapid-design-system/react';
241
+ import { EventTradeDelete } from '../generated/genesis-event-types'; // typed DETAILS — when listed (depth like store imports — e.g. ../../ from a route page)
242
+
243
+ function DeleteButton({ tradeId }: { tradeId: string }) {
244
+ const handleDelete = () => {
245
+ showNotificationDialog(
246
+ {
247
+ title: 'Delete trade',
248
+ body: \`Are you sure you want to delete trade \${tradeId}? This cannot be undone.\`,
249
+ dialog: {
250
+ confirmingActions: [
251
+ {
252
+ label: 'Delete',
253
+ action: async () => {
254
+ // typed-first (import EventTradeDelete from ../generated/genesis-event-types when listed — depth like store imports; never create or edit that generated file):
255
+ await commitGenesisEvent(getConnect(), new EventTradeDelete({ TRADE_ID: tradeId }));
256
+ // Plain fallback when the generated map is absent or lacks this event (see fui-foundation-comms):
257
+ // await getConnect().commitEvent('EVENT_TRADE_DELETE', { DETAILS: { TRADE_ID: tradeId } });
258
+ showNotificationToast(
259
+ { title: 'Deleted', body: \`Trade \${tradeId} deleted.\`, toast: { type: 'success', autoClose: true } },
260
+ 'rapid',
261
+ );
262
+ },
263
+ },
264
+ ],
265
+ dismissingAction: { label: 'Cancel' },
266
+ },
267
+ },
268
+ 'rapid',
269
+ );
270
+ };
271
+
272
+ return <Button appearance="danger" onClick={handleDelete}>Delete</Button>;
273
+ }
274
+ \`\`\`
275
+
276
+ ---
277
+
278
+ ### Example 3 — Configure notification stacking at app startup
279
+
280
+ \`\`\`tsx
281
+ import { useEffect } from 'react';
282
+ import {
283
+ configureNotifications,
284
+ sortNotificationBySeverity,
285
+ } from '@genesislcap/foundation-notifications';
286
+
287
+ function App() {
288
+ useEffect(() => {
289
+ // Set up stacking toast container once on mount
290
+ configureNotifications({
291
+ position: 'top-right',
292
+ stackThreshold: 3,
293
+ allowCloseAll: true,
294
+ sortFn: sortNotificationBySeverity, // errors rise to top
295
+ });
296
+ }, []);
297
+
298
+ return <div>{/* ... */}</div>;
299
+ }
300
+ \`\`\`
301
+
302
+ ---
303
+
304
+ ### Example 4 — Snackbar for non-blocking feedback
305
+
306
+ \`\`\`tsx
307
+ import { showNotificationSnackbar } from '@genesislcap/foundation-notifications';
308
+
309
+ showNotificationSnackbar(
310
+ {
311
+ body: 'Changes saved successfully.',
312
+ snackbar: {
313
+ type: 'success',
314
+ autoClose: true,
315
+ closeTimeout: 3000,
316
+ confirmingActions: [{ label: 'OK', action: () => {} }],
317
+ },
318
+ },
319
+ 'rapid',
320
+ );
321
+ \`\`\`
322
+
323
+ ---
324
+
325
+ ### Example 5 — Reusable toast helper (pattern from sales-trader-hub)
326
+
327
+ \`\`\`ts
328
+ // utils/toast.ts
329
+ import { showNotificationToast } from '@genesislcap/foundation-notifications';
330
+
331
+ export function showErrorToast(title: string, body: string) {
332
+ showNotificationToast(
333
+ { title, body, toast: { type: 'error', autoClose: true } },
334
+ 'rapid',
335
+ );
336
+ }
337
+
338
+ export function showSuccessToast(title: string, body: string) {
339
+ showNotificationToast(
340
+ { title, body, toast: { type: 'success', autoClose: true } },
341
+ 'rapid',
342
+ );
343
+ }
344
+ \`\`\`
345
+
346
+ ---
347
+
348
+ ### DANGEROUS PATTERNS
349
+
350
+ #### DP-1: Importing from /react (subpath does not exist)
351
+
352
+ \`\`\`ts
353
+ // WRONG — /react subpath does not exist for foundation-notifications:
354
+ import { showNotificationToast } from '@genesislcap/foundation-notifications/react';
355
+
356
+ // CORRECT — import from the package root:
357
+ import { showNotificationToast } from '@genesislcap/foundation-notifications';
358
+ \`\`\`
359
+
360
+ #### DP-2: Using 'warning' as a SnackbarType
361
+
362
+ \`\`\`ts
363
+ // WRONG — SnackbarType is 'error' | 'success' only; 'warning' does not exist:
364
+ showNotificationSnackbar(
365
+ { body: 'Something went wrong', snackbar: { type: 'warning' } },
366
+ 'rapid',
367
+ );
368
+
369
+ // CORRECT — use 'error' for warning/error-level snackbars:
370
+ showNotificationSnackbar(
371
+ { body: 'Something went wrong', snackbar: { type: 'error' } },
372
+ 'rapid',
373
+ );
374
+ \`\`\`
375
+
376
+ #### DP-3: Calling showNotificationAlert with a tagName argument
377
+
378
+ \`\`\`ts
379
+ // WRONG — showNotificationAlert takes only the AlertStructure, no tagName:
380
+ showNotificationAlert({ title: 'Error', body: 'Something failed' }, 'rapid');
381
+
382
+ // CORRECT — no tagName argument; it calls the native browser alert():
383
+ showNotificationAlert({ title: 'Error', body: 'Something failed' });
384
+ \`\`\`
385
+
386
+ #### DP-4: Missing required fields
387
+
388
+ \`\`\`ts
389
+ // WRONG — showNotificationToast requires both title AND body:
390
+ showNotificationToast({ body: 'Saved' }, 'rapid'); // missing title → throws
391
+ showNotificationToast({ title: 'Saved' }, 'rapid'); // missing body → throws
392
+
393
+ // WRONG — showNotificationDialog requires both title AND body:
394
+ showNotificationDialog({ body: 'Are you sure?' }, 'rapid'); // missing title → throws
395
+
396
+ // CORRECT:
397
+ showNotificationToast({ title: 'Saved', body: 'Trade saved.' }, 'rapid');
398
+ showNotificationDialog({ title: 'Confirm', body: 'Are you sure?' }, 'rapid');
399
+ \`\`\`
400
+
401
+ #### DP-5: Using the deprecated NotificationBuilder class
402
+
403
+ \`\`\`ts
404
+ // WRONG — NotificationBuilder and getNotificationBuilder are deprecated:
405
+ import { getNotificationBuilder } from '@genesislcap/foundation-notifications';
406
+ const n = getNotificationBuilder().withTitle('Error').withBody('...').build();
407
+
408
+ // CORRECT — use the dedicated show* helpers directly:
409
+ import { showNotificationToast } from '@genesislcap/foundation-notifications';
410
+ showNotificationToast({ title: 'Error', body: '...' }, 'rapid');
411
+ \`\`\`
412
+
413
+ #### DP-6: Rendering notification components as JSX elements
414
+
415
+ \`\`\`tsx
416
+ // WRONG — these are not React components; there is no JSX API:
417
+ return (
418
+ <rapid-toast title="Success" body="Done" />
419
+ );
420
+
421
+ // CORRECT — call the imperative function from an event handler or useEffect:
422
+ import { showNotificationToast } from '@genesislcap/foundation-notifications';
423
+ showNotificationToast({ title: 'Success', body: 'Done' }, 'rapid');
424
+ \`\`\`
425
+
426
+ #### DP-7: Calling configureNotifications with bottom corner positions
427
+
428
+ \`ToastPosition\` is typed with all four corners, but the container's JSDoc
429
+ (\`NotifyContainerConfig.position\`) states bottom-left and bottom-right are **not currently
430
+ supported** — a bottom value will not position the stack as expected.
431
+
432
+ \`\`\`ts
433
+ // WRONG — bottom-left and bottom-right are not currently supported:
434
+ configureNotifications({ position: 'bottom-right' });
435
+
436
+ // CORRECT — use only top-left or top-right:
437
+ configureNotifications({ position: 'top-right' });
438
+ \`\`\`
439
+ `.trim();