@flamingo-stack/openframe-frontend-core 0.0.215 → 0.0.216
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/dist/chunk-2V4SACHE.js +302 -0
- package/dist/chunk-2V4SACHE.js.map +1 -0
- package/dist/chunk-572WQWIX.cjs +348 -0
- package/dist/chunk-572WQWIX.cjs.map +1 -0
- package/dist/{chunk-WT5JV2GS.cjs → chunk-5V6MSE3B.cjs} +39 -39
- package/dist/chunk-5V6MSE3B.cjs.map +1 -0
- package/dist/{chunk-WQZP3JIZ.js → chunk-CDLYRFDE.js} +1894 -1472
- package/dist/chunk-CDLYRFDE.js.map +1 -0
- package/dist/chunk-GVNQAGXB.js +232 -0
- package/dist/chunk-GVNQAGXB.js.map +1 -0
- package/dist/{chunk-P5EE2VJX.cjs → chunk-HOHDXYPR.cjs} +1 -1
- package/dist/chunk-HOHDXYPR.cjs.map +1 -0
- package/dist/chunk-IH76P5R6.cjs +232 -0
- package/dist/chunk-IH76P5R6.cjs.map +1 -0
- package/dist/{chunk-24KCAECR.cjs → chunk-JJR27M56.cjs} +3 -3
- package/dist/{chunk-24KCAECR.cjs.map → chunk-JJR27M56.cjs.map} +1 -1
- package/dist/chunk-K4DFAVSO.cjs +302 -0
- package/dist/chunk-K4DFAVSO.cjs.map +1 -0
- package/dist/{chunk-HICZPTRR.js → chunk-LCLTCCXS.js} +14 -14
- package/dist/chunk-LCLTCCXS.js.map +1 -0
- package/dist/{chunk-VFKQMAUF.cjs → chunk-OB45JHDY.cjs} +3 -3
- package/dist/{chunk-VFKQMAUF.cjs.map → chunk-OB45JHDY.cjs.map} +1 -1
- package/dist/{chunk-4XLJWX2N.js → chunk-ORJREQ2W.js} +4 -4
- package/dist/{chunk-7PCP7YQR.js → chunk-QTKU6ULP.js} +6 -6
- package/dist/{chunk-CIPO6DXK.js → chunk-QY75VKAS.js} +5 -5
- package/dist/{chunk-ZG2YY5E7.js → chunk-RFONYT63.js} +1 -1
- package/dist/chunk-RFONYT63.js.map +1 -0
- package/dist/{chunk-NGFP4RVL.cjs → chunk-SMCG2CCC.cjs} +30 -30
- package/dist/{chunk-NGFP4RVL.cjs.map → chunk-SMCG2CCC.cjs.map} +1 -1
- package/dist/{chunk-MX5MIFWA.js → chunk-UEBM4PC4.js} +5 -5
- package/dist/chunk-VC3ND5RB.js +348 -0
- package/dist/chunk-VC3ND5RB.js.map +1 -0
- package/dist/{chunk-UXZ3ZJ3M.cjs → chunk-XDPSSE4O.cjs} +4 -4
- package/dist/{chunk-UXZ3ZJ3M.cjs.map → chunk-XDPSSE4O.cjs.map} +1 -1
- package/dist/{chunk-D4MNFY67.cjs → chunk-ZGTDUPTW.cjs} +1316 -894
- package/dist/chunk-ZGTDUPTW.cjs.map +1 -0
- package/dist/components/chat/entity-cards/blog-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/blog-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/case-study-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/case-study-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/customer-interview-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/customer-interview-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/investor-update-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/investor-update-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/program-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/program-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/use-entity-card-link.d.ts +14 -0
- package/dist/components/chat/entity-cards/use-entity-card-link.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/use-entity-card-placeholder.d.ts +13 -0
- package/dist/components/chat/entity-cards/use-entity-card-placeholder.d.ts.map +1 -0
- package/dist/components/chat/index.cjs +11 -11
- package/dist/components/chat/index.js +10 -10
- package/dist/components/contact/index.cjs +12 -12
- package/dist/components/contact/index.js +11 -11
- package/dist/components/features/captions-url.d.ts +18 -0
- package/dist/components/features/captions-url.d.ts.map +1 -0
- package/dist/components/features/index.cjs +23 -11
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.d.ts +2 -0
- package/dist/components/features/index.d.ts.map +1 -1
- package/dist/components/features/index.js +24 -12
- package/dist/components/features/mux-origins.cjs +10 -0
- package/dist/components/features/mux-origins.cjs.map +1 -0
- package/dist/components/features/mux-origins.d.ts +26 -0
- package/dist/components/features/mux-origins.d.ts.map +1 -0
- package/dist/components/features/mux-origins.js +7 -0
- package/dist/components/features/mux-origins.js.map +1 -0
- package/dist/components/features/notifications/index.d.ts +2 -0
- package/dist/components/features/notifications/index.d.ts.map +1 -1
- package/dist/components/features/notifications/notification-drawer.d.ts +2 -1
- package/dist/components/features/notifications/notification-drawer.d.ts.map +1 -1
- package/dist/components/features/notifications/notification-popups.d.ts +10 -0
- package/dist/components/features/notifications/notification-popups.d.ts.map +1 -0
- package/dist/components/features/notifications/notifications-context.d.ts +8 -1
- package/dist/components/features/notifications/notifications-context.d.ts.map +1 -1
- package/dist/components/features/notifications/types.d.ts +1 -0
- package/dist/components/features/notifications/types.d.ts.map +1 -1
- package/dist/components/features/use-video-warmup.d.ts +53 -0
- package/dist/components/features/use-video-warmup.d.ts.map +1 -0
- package/dist/components/icons/index.cjs +3 -3
- package/dist/components/icons/index.js +2 -2
- package/dist/components/icons-v2-generated/index.cjs +2 -2
- package/dist/components/icons-v2-generated/index.cjs.map +1 -1
- package/dist/components/icons-v2-generated/index.js +4 -4
- package/dist/components/index.cjs +132 -102
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +94 -64
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +11 -11
- package/dist/components/navigation/index.js +10 -10
- package/dist/components/onboarding-guides/build-default-href.d.ts +15 -0
- package/dist/components/onboarding-guides/build-default-href.d.ts.map +1 -0
- package/dist/components/onboarding-guides/hooks/use-onboarding-guides.d.ts +28 -0
- package/dist/components/onboarding-guides/hooks/use-onboarding-guides.d.ts.map +1 -0
- package/dist/components/onboarding-guides/index.cjs +373 -0
- package/dist/components/onboarding-guides/index.cjs.map +1 -0
- package/dist/components/onboarding-guides/index.d.ts +25 -0
- package/dist/components/onboarding-guides/index.d.ts.map +1 -0
- package/dist/components/onboarding-guides/index.js +373 -0
- package/dist/components/onboarding-guides/index.js.map +1 -0
- package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts +52 -0
- package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts.map +1 -0
- package/dist/components/onboarding-guides/onboarding-guides-catalog-skeleton.d.ts +17 -0
- package/dist/components/onboarding-guides/onboarding-guides-catalog-skeleton.d.ts.map +1 -0
- package/dist/components/onboarding-guides/onboarding-guides-catalog-view.d.ts +43 -0
- package/dist/components/onboarding-guides/onboarding-guides-catalog-view.d.ts.map +1 -0
- package/dist/components/shared/doc-search/doc-search-bar.d.ts +59 -0
- package/dist/components/shared/doc-search/doc-search-bar.d.ts.map +1 -0
- package/dist/components/shared/doc-search/doc-search-result-row.d.ts +18 -0
- package/dist/components/shared/doc-search/doc-search-result-row.d.ts.map +1 -0
- package/dist/components/shared/doc-search/format-relative-path.d.ts +10 -0
- package/dist/components/shared/doc-search/format-relative-path.d.ts.map +1 -0
- package/dist/components/shared/doc-search/index.d.ts +8 -0
- package/dist/components/shared/doc-search/index.d.ts.map +1 -0
- package/dist/components/shared/doc-search/map-doc-search-results.d.ts +15 -0
- package/dist/components/shared/doc-search/map-doc-search-results.d.ts.map +1 -0
- package/dist/components/shared/doc-search/resolve-search-result-action.d.ts +37 -0
- package/dist/components/shared/doc-search/resolve-search-result-action.d.ts.map +1 -0
- package/dist/components/shared/doc-search/types.d.ts +29 -0
- package/dist/components/shared/doc-search/types.d.ts.map +1 -0
- package/dist/components/shared/doc-search/use-doc-search.d.ts +46 -0
- package/dist/components/shared/doc-search/use-doc-search.d.ts.map +1 -0
- package/dist/components/tickets/help-center-card.d.ts +5 -1
- package/dist/components/tickets/help-center-card.d.ts.map +1 -1
- package/dist/components/tickets/hooks/use-ticket-actions.d.ts +8 -0
- package/dist/components/tickets/hooks/use-ticket-actions.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +316 -145
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +237 -66
- package/dist/components/tickets/index.js.map +1 -1
- package/dist/components/tickets/ticket-detail-drawer.d.ts +11 -2
- package/dist/components/tickets/ticket-detail-drawer.d.ts.map +1 -1
- package/dist/components/tickets/types.d.ts +50 -1
- package/dist/components/tickets/types.d.ts.map +1 -1
- package/dist/components/ui/file-manager/index.cjs +51 -51
- package/dist/components/ui/file-manager/index.cjs.map +1 -1
- package/dist/components/ui/file-manager/index.js +2 -2
- package/dist/components/ui/filter-pill-row.d.ts +20 -0
- package/dist/components/ui/filter-pill-row.d.ts.map +1 -0
- package/dist/components/ui/index.cjs +16 -14
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +21 -19
- package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
- package/dist/contexts/chat-runtime-context.d.ts +42 -0
- package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/embed-shims/index.cjs +3 -3
- package/dist/embed-shims/index.cjs.map +1 -1
- package/dist/embed-shims/index.js +5 -5
- package/dist/hooks/index.cjs +6 -6
- package/dist/hooks/index.js +5 -5
- package/dist/index.cjs +28 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +59 -45
- package/dist/utils/dev-sections/openframe-dev-sections.d.ts +2 -2
- package/dist/utils/dev-sections/openframe-dev-sections.d.ts.map +1 -1
- package/dist/utils/index.cjs +11 -5
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +11 -5
- package/dist/utils/index.js.map +1 -1
- package/package.json +13 -1
- package/src/components/chat/entity-cards/blog-card.tsx +17 -5
- package/src/components/chat/entity-cards/case-study-card.tsx +23 -1
- package/src/components/chat/entity-cards/customer-interview-card.tsx +23 -1
- package/src/components/chat/entity-cards/dispatch.tsx +21 -0
- package/src/components/chat/entity-cards/investor-update-card.tsx +23 -1
- package/src/components/chat/entity-cards/onboarding-guide-card.tsx +30 -4
- package/src/components/chat/entity-cards/program-card.tsx +17 -3
- package/src/components/chat/entity-cards/use-entity-card-link.ts +66 -0
- package/src/components/chat/entity-cards/use-entity-card-placeholder.ts +50 -0
- package/src/components/features/captions-url.ts +25 -0
- package/src/components/features/index.ts +2 -0
- package/src/components/features/mux-origins.ts +27 -0
- package/src/components/features/notifications/index.ts +2 -0
- package/src/components/features/notifications/notification-drawer.tsx +100 -16
- package/src/components/features/notifications/notification-popups.tsx +105 -0
- package/src/components/features/notifications/notifications-context.tsx +16 -0
- package/src/components/features/notifications/types.ts +1 -0
- package/src/components/features/use-video-warmup.ts +176 -0
- package/src/components/index.ts +5 -0
- package/src/components/onboarding-guides/build-default-href.ts +16 -0
- package/src/components/onboarding-guides/hooks/use-onboarding-guides.ts +90 -0
- package/src/components/onboarding-guides/index.ts +39 -0
- package/src/components/onboarding-guides/onboarding-guide-detail-view.tsx +215 -0
- package/src/components/onboarding-guides/onboarding-guides-catalog-skeleton.tsx +62 -0
- package/src/components/onboarding-guides/onboarding-guides-catalog-view.tsx +230 -0
- package/src/components/shared/doc-search/doc-search-bar.tsx +100 -0
- package/src/components/shared/doc-search/doc-search-result-row.tsx +73 -0
- package/src/components/shared/doc-search/format-relative-path.ts +17 -0
- package/src/components/shared/doc-search/index.ts +24 -0
- package/src/components/shared/doc-search/map-doc-search-results.ts +113 -0
- package/src/components/shared/doc-search/resolve-search-result-action.ts +68 -0
- package/src/components/shared/doc-search/types.ts +28 -0
- package/src/components/shared/doc-search/use-doc-search.ts +263 -0
- package/src/components/tickets/help-center-card.tsx +8 -0
- package/src/components/tickets/help-center-list.tsx +17 -3
- package/src/components/tickets/hooks/use-ticket-actions.ts +210 -14
- package/src/components/tickets/ticket-detail-drawer.tsx +145 -5
- package/src/components/tickets/types.ts +55 -0
- package/src/components/ui/filter-pill-row.tsx +72 -0
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/simple-markdown-renderer.tsx +24 -1
- package/src/components/ui/toaster.tsx +3 -3
- package/src/contexts/chat-runtime-context.tsx +41 -0
- package/src/stories/NotificationDrawer.stories.tsx +18 -2
- package/src/utils/dev-sections/openframe-dev-sections.ts +12 -5
- package/dist/chunk-2G3NXF6J.cjs +0 -521
- package/dist/chunk-2G3NXF6J.cjs.map +0 -1
- package/dist/chunk-D4MNFY67.cjs.map +0 -1
- package/dist/chunk-HICZPTRR.js.map +0 -1
- package/dist/chunk-P5EE2VJX.cjs.map +0 -1
- package/dist/chunk-R6MLPU4A.js +0 -521
- package/dist/chunk-R6MLPU4A.js.map +0 -1
- package/dist/chunk-WQZP3JIZ.js.map +0 -1
- package/dist/chunk-WT5JV2GS.cjs.map +0 -1
- package/dist/chunk-ZG2YY5E7.js.map +0 -1
- /package/dist/{chunk-4XLJWX2N.js.map → chunk-ORJREQ2W.js.map} +0 -0
- /package/dist/{chunk-7PCP7YQR.js.map → chunk-QTKU6ULP.js.map} +0 -0
- /package/dist/{chunk-CIPO6DXK.js.map → chunk-QY75VKAS.js.map} +0 -0
- /package/dist/{chunk-MX5MIFWA.js.map → chunk-UEBM4PC4.js.map} +0 -0
|
@@ -222,7 +222,30 @@ const SAFE_HTML_TAGS = new Set([
|
|
|
222
222
|
* 3 — everything between the name and the closing `>` (attrs etc.)
|
|
223
223
|
* 4 — optional `/` for void-element self-close
|
|
224
224
|
*/
|
|
225
|
-
|
|
225
|
+
// ReDoS-safe shape (CodeQL polynomial-regex hardening):
|
|
226
|
+
//
|
|
227
|
+
// Every quantifier is hard-bounded so the engine has no possible
|
|
228
|
+
// polynomial path. The original `[a-zA-Z0-9-]*` + `[^>]*?` admitted
|
|
229
|
+
// O(n²) backtracking on `<A-----…` because both classes include `-`;
|
|
230
|
+
// CodeQL flagged that as a polynomial regex. Bounding the tag-name
|
|
231
|
+
// at 63 chars (covers every real HTML tag — `animateTransform` at 16
|
|
232
|
+
// is the longest in practice) and the rest at 4096 chars (sane upper
|
|
233
|
+
// bound for `<a href="…">` attribute strings) means matching is
|
|
234
|
+
// constant-time per tag, NOT proportional to input length.
|
|
235
|
+
//
|
|
236
|
+
// Lazy `{0,4096}?` is deliberately lazy (not greedy) so the trailing
|
|
237
|
+
// `(\/?)>` still captures the self-close `/` — greedy would swallow
|
|
238
|
+
// the slash into the rest. Bounded lazy backtracking is constant-time
|
|
239
|
+
// per match (capped at 4096 expansions), so the laziness is safe.
|
|
240
|
+
//
|
|
241
|
+
// Anything longer than 4159 chars per tag simply doesn't match —
|
|
242
|
+
// falls through as plain text, the safe-degrade behavior for
|
|
243
|
+
// HTML-in-markdown.
|
|
244
|
+
//
|
|
245
|
+
// Tag shapes still covered: `<a>`, `<a/>`, `<a class="x">`,
|
|
246
|
+
// `<a class="x" />`, `</a>`, `<input type="text" />`,
|
|
247
|
+
// `<custom-element data-foo="bar">`, `<animateTransform>`, etc.
|
|
248
|
+
const TAG_LIKE_REGEX = /<(\/?)([a-zA-Z][a-zA-Z0-9-]{0,63})((?:\s[^>]{0,4096}?)?)(\/?)>/g
|
|
226
249
|
|
|
227
250
|
function escapeUnknownHtmlTags(text: string): string {
|
|
228
251
|
if (!text || text.indexOf('<') === -1) return text
|
|
@@ -16,15 +16,15 @@ export const dotColorByVariant: Record<ToastVariant, string> = {
|
|
|
16
16
|
success: 'bg-ods-success',
|
|
17
17
|
warning: 'bg-ods-warning',
|
|
18
18
|
error: 'bg-ods-error',
|
|
19
|
-
info: 'bg-ods-
|
|
19
|
+
info: 'bg-ods-text-secondary',
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export const progressColorByVariant: Record<ToastVariant, string> = {
|
|
23
23
|
default: 'bg-ods-text-secondary',
|
|
24
24
|
success: 'bg-ods-success',
|
|
25
|
-
warning: 'bg-ods-
|
|
25
|
+
warning: 'bg-ods-warning',
|
|
26
26
|
error: 'bg-ods-error',
|
|
27
|
-
info: 'bg-ods-
|
|
27
|
+
info: 'bg-ods-text-secondary',
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
interface ToastHeaderProps {
|
|
@@ -82,6 +82,13 @@ export interface ChatRuntime {
|
|
|
82
82
|
* leave it unset. Matches the `skipDomains` parameter of
|
|
83
83
|
* `getProxiedImageUrl`. */
|
|
84
84
|
imageProxySkipDomains?: string[]
|
|
85
|
+
/** Supabase storage origin (e.g. `https://xyz.supabase.co`) — used
|
|
86
|
+
* by `useVideoWarmup` to scope the `<link rel="preload" as="video">`
|
|
87
|
+
* hint to MP4s the deployment actually hosts. Hub wires it via
|
|
88
|
+
* `getSupabaseStorageOrigin()`; embedders without a Supabase
|
|
89
|
+
* storage origin leave it unset (preload is then skipped; Mux/
|
|
90
|
+
* YouTube preconnect still fires). */
|
|
91
|
+
supabaseStorageOrigin?: string
|
|
85
92
|
}
|
|
86
93
|
navigation: {
|
|
87
94
|
/** ONE knob, two behaviors:
|
|
@@ -116,6 +123,40 @@ export interface ChatRuntime {
|
|
|
116
123
|
* same-origin/same-platform → same tab, else new tab. */
|
|
117
124
|
decideNewTab?: (args: { href: string; targetPlatform?: string | null }) => boolean
|
|
118
125
|
}
|
|
126
|
+
/** Optional OG placeholder URL builder. Returns a branded
|
|
127
|
+
* `/api/og-placeholder?...` URL for the given title. Hub wires this
|
|
128
|
+
* to its `buildOgPlaceholderUrl` (resolves CSS-var ODS colors to
|
|
129
|
+
* hex via the static map). Embedders can wire any equivalent that
|
|
130
|
+
* hits their own placeholder route — or omit, in which case entity
|
|
131
|
+
* cards fall back to no placeholder.
|
|
132
|
+
*
|
|
133
|
+
* Pure synchronous function — NOT a hook. Callers wrap with
|
|
134
|
+
* `useMemo`/`useOgPlaceholder` for memoization. */
|
|
135
|
+
resolvePlaceholderUrl?: (
|
|
136
|
+
title: string,
|
|
137
|
+
options?: { site?: string; aspect?: 'wide' | 'square' },
|
|
138
|
+
) => string
|
|
139
|
+
/** Optional content-URL composer. Returns the platform-aware href +
|
|
140
|
+
* target-platform tuple for a content entity. Hub wires this to its
|
|
141
|
+
* `buildContentURL(type, slug, extractPrimaryPlatform(platforms))`
|
|
142
|
+
* pipeline so the lib catalog/detail views can derive cross-
|
|
143
|
+
* platform hrefs without knowing the hub's platform topology
|
|
144
|
+
* (openmsp.ai / openframe.app / flamingo.run / tmcg).
|
|
145
|
+
*
|
|
146
|
+
* Embedders that don't host multi-platform content can wire this to
|
|
147
|
+
* a simple `(type, slug) => ({ href: '/' + type + '/' + slug,
|
|
148
|
+
* targetPlatform: null })` — or omit, in which case lib views fall
|
|
149
|
+
* back to a same-origin relative path with `targetPlatform: null`.
|
|
150
|
+
*
|
|
151
|
+
* `platforms` is the entity's flattened junction array (e.g.
|
|
152
|
+
* `guide.onboarding_guide_platforms`) — the callback runs
|
|
153
|
+
* `extractPrimaryPlatform` internally before dispatching to its
|
|
154
|
+
* composer. */
|
|
155
|
+
composeContentUrl?: (
|
|
156
|
+
type: string,
|
|
157
|
+
slug: string,
|
|
158
|
+
platforms?: Array<{ name?: string }>,
|
|
159
|
+
) => { href: string; targetPlatform: string | null }
|
|
119
160
|
/** Chat source identifier — REQUIRED. Used for localStorage
|
|
120
161
|
* namespacing (`mingo-chat-<source>-v1`). Hub sets via
|
|
121
162
|
* `currentPlatform()`; embedders set explicitly.
|
|
@@ -3,6 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { Button } from '../components/ui/button';
|
|
4
4
|
import {
|
|
5
5
|
NotificationDrawer,
|
|
6
|
+
NotificationPopups,
|
|
6
7
|
NotificationTile,
|
|
7
8
|
NotificationsProvider,
|
|
8
9
|
useNotifications,
|
|
@@ -218,13 +219,16 @@ export const DrawerWithSeedData: Story = {
|
|
|
218
219
|
|
|
219
220
|
/**
|
|
220
221
|
* Live playground — fire notifications from outside the drawer the same way a
|
|
221
|
-
* NATS subscription would.
|
|
222
|
+
* NATS subscription would. New notifications surface as top-right pop-ups
|
|
223
|
+
* (toast-style) via `<NotificationPopups>`; opening the drawer hides them so
|
|
224
|
+
* the same tile isn't shown twice. Toggle "Show Notifications" inside the
|
|
225
|
+
* drawer to disable pop-ups entirely.
|
|
222
226
|
*/
|
|
223
227
|
export const LivePlayground: Story = {
|
|
224
228
|
render: () => (
|
|
225
229
|
<NotificationsProvider onHistoryClick={() => alert('Navigate to /notifications')}>
|
|
226
|
-
<AutoOpen />
|
|
227
230
|
<NotificationDrawer />
|
|
231
|
+
<NotificationPopups />
|
|
228
232
|
<PlaygroundControls />
|
|
229
233
|
<Toaster />
|
|
230
234
|
</NotificationsProvider>
|
|
@@ -239,6 +243,15 @@ function PlaygroundControls() {
|
|
|
239
243
|
addNotification({ variant, title, description });
|
|
240
244
|
};
|
|
241
245
|
|
|
246
|
+
const fireWithDeepLink = () => {
|
|
247
|
+
addNotification({
|
|
248
|
+
variant: 'success',
|
|
249
|
+
title: 'Script Execution Complete',
|
|
250
|
+
description: 'Click to view run details for SRV-DB01',
|
|
251
|
+
onClick: () => alert('Navigate to /scripts/runs/abc-123'),
|
|
252
|
+
});
|
|
253
|
+
};
|
|
254
|
+
|
|
242
255
|
return (
|
|
243
256
|
<div className="flex max-w-2xl flex-col gap-4">
|
|
244
257
|
<div className="rounded-md border border-ods-border bg-ods-card p-3">
|
|
@@ -284,6 +297,9 @@ function PlaygroundControls() {
|
|
|
284
297
|
>
|
|
285
298
|
Fire default
|
|
286
299
|
</Button>
|
|
300
|
+
<Button variant="outline" onClick={fireWithDeepLink}>
|
|
301
|
+
Fire with deep-link
|
|
302
|
+
</Button>
|
|
287
303
|
</div>
|
|
288
304
|
|
|
289
305
|
<div className="flex flex-wrap gap-2">
|
|
@@ -145,11 +145,18 @@ export const OPENFRAME_DEV_SECTIONS = {
|
|
|
145
145
|
title: 'Onboarding Guides',
|
|
146
146
|
description: 'Step-by-step product walkthroughs.',
|
|
147
147
|
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
148
|
+
hero: {
|
|
149
|
+
title: 'Getting Started',
|
|
150
|
+
description:
|
|
151
|
+
'Step-by-step walkthroughs for getting up and running with OpenFrame — from your first device deployment to advanced integrations.',
|
|
152
|
+
},
|
|
153
|
+
// `search` / `filter` are intentionally null — onboarding-guides
|
|
154
|
+
// uses a custom RAG-backed search dropdown (`useDocSearch`, not the
|
|
155
|
+
// local text filter `DevSectionView` ships) and dynamic section
|
|
156
|
+
// pills (counts vary with content, vs the static status options
|
|
157
|
+
// every other dev-center surface uses). Both controls are injected
|
|
158
|
+
// by the host via `DevSectionPage`'s `preControls` slot — same
|
|
159
|
+
// mechanism tickets uses for its "Open a new ticket" form.
|
|
153
160
|
search: null,
|
|
154
161
|
filter: null,
|
|
155
162
|
},
|