@flamingo-stack/openframe-frontend-core 0.0.752 → 0.0.754
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/build/export-map.json +1 -1
- package/dist/{chunk-OXEAN3EQ.cjs → chunk-35BJY5RR.cjs} +44 -44
- package/dist/{chunk-ZYRRRKSZ.cjs → chunk-5E6JHOGX.cjs} +3 -3
- package/dist/{chunk-35RU25PJ.cjs → chunk-7Z4EQOIX.cjs} +44 -44
- package/dist/{chunk-4PEG4JTM.cjs → chunk-B27XV2TC.cjs} +6 -6
- package/dist/{chunk-4OTCQEP3.cjs → chunk-BLZIUELR.cjs} +11 -11
- package/dist/{chunk-KBJSZFBZ.cjs → chunk-BQQ3JGEO.cjs} +3 -3
- package/dist/{chunk-RDH63XXW.cjs → chunk-DW5OKTUP.cjs} +34 -34
- package/dist/{chunk-KUVYVAS2.cjs → chunk-EDSFLB7J.cjs} +19 -17
- package/dist/{chunk-WQCLN27R.cjs → chunk-FAFFWYEH.cjs} +4 -4
- package/dist/{chunk-P4ODFQGA.cjs → chunk-GQYCVZJI.cjs} +4 -4
- package/dist/{chunk-Y6PVZRYL.cjs → chunk-IVAAQSOU.cjs} +12 -12
- package/dist/{chunk-EUQJ7QHW.cjs → chunk-JXACH52M.cjs} +4 -4
- package/dist/{chunk-JI6NRWCC.cjs → chunk-MOEILCEX.cjs} +13 -13
- package/dist/{chunk-IPVJAML5.cjs → chunk-OGKV5NOP.cjs} +69 -69
- package/dist/{chunk-OXCGQV6B.cjs → chunk-RTQN35EP.cjs} +153 -146
- package/dist/{chunk-EM4OEWCM.cjs → chunk-SDF5UUTE.cjs} +749 -608
- package/dist/{chunk-7OEVVMAU.cjs → chunk-T4BBZ5ST.cjs} +2 -2
- package/dist/{chunk-XADJG35G.cjs → chunk-TBDVF4SN.cjs} +31 -31
- package/dist/{chunk-G44V3UGE.cjs → chunk-TPJTFN7O.cjs} +81 -81
- package/dist/{chunk-J5G4CF2V.cjs → chunk-U4I3QR2A.cjs} +16 -16
- package/dist/{chunk-U2AE4UG7.cjs → chunk-UNRNLSG4.cjs} +2 -2
- package/dist/{chunk-ZVOXBSDP.cjs → chunk-WBOHLXFC.cjs} +2 -2
- package/dist/{chunk-VD3XBUQR.cjs → chunk-YSFOYBYC.cjs} +158 -158
- package/dist/{chunk-7WEGXNNS.cjs → chunk-ZNV5FE4T.cjs} +30 -30
- package/dist/{cloud-tenants-WAOMZZQ2.cjs → cloud-tenants-5OTPO7FL.cjs} +7 -7
- package/dist/components/announcement-bar.d.ts +1 -1
- package/dist/components/announcement-bar.d.ts.map +1 -1
- package/dist/components/announcement-bar.js +3 -1
- package/dist/components/case-studies/index.cjs +20 -20
- package/dist/components/chat/chat-dialog-menu-items.js +6 -6
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-enhanced.js +3 -0
- package/dist/components/chat/chat-panel-context.d.ts +3 -0
- package/dist/components/chat/chat-panel-context.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.d.ts +20 -0
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.js +78 -8
- package/dist/components/chat/hooks/index.d.ts +1 -0
- package/dist/components/chat/hooks/index.d.ts.map +1 -1
- package/dist/components/chat/hooks/index.js +1 -0
- package/dist/components/chat/hooks/use-what-to-ask.d.ts +69 -0
- package/dist/components/chat/hooks/use-what-to-ask.d.ts.map +1 -0
- package/dist/components/chat/hooks/use-what-to-ask.js +106 -0
- package/dist/components/chat/index.cjs +13 -5
- package/dist/components/chat/index.d.ts +1 -0
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +1 -0
- package/dist/components/chat/mingo-chat-header.d.ts +4 -2
- package/dist/components/chat/mingo-chat-header.d.ts.map +1 -1
- package/dist/components/chat/mingo-chat-header.js +7 -2
- package/dist/components/chat/suggestions-display.d.ts +11 -0
- package/dist/components/chat/suggestions-display.d.ts.map +1 -0
- package/dist/components/chat/suggestions-display.js +27 -0
- package/dist/components/chat/types/message.types.d.ts +27 -1
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/utils/extract-incomplete-message-state.d.ts.map +1 -1
- package/dist/components/chat/utils/extract-incomplete-message-state.js +2 -0
- package/dist/components/chat/utils/message-segment-accumulator.d.ts.map +1 -1
- package/dist/components/chat/utils/message-segment-accumulator.js +3 -0
- package/dist/components/contact/index.cjs +8 -8
- package/dist/components/docs/index.cjs +11 -11
- package/dist/components/embeds/index.cjs +8 -8
- package/dist/components/faq/index.cjs +9 -9
- package/dist/components/features/index.cjs +7 -7
- package/dist/components/help-center-pages/index.cjs +84 -84
- package/dist/components/index.cjs +66 -56
- package/dist/components/meeting-scheduler/index.cjs +31 -31
- package/dist/components/navigation/index.cjs +10 -10
- package/dist/components/onboarding-guides/index.cjs +10 -10
- package/dist/components/product-demo/index.cjs +7 -7
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/tickets/index.cjs +13 -13
- package/dist/components/ui/index.cjs +15 -7
- package/dist/{devices-VFEPXW2N.cjs → devices-MBGMD7BO.cjs} +8 -8
- package/dist/{embeddable-chat-BYQBABDV.cjs → embeddable-chat-CMEHSDV7.cjs} +163 -91
- package/dist/index.cjs +23 -11
- package/dist/{knowledge-4TE7AWZX.cjs → knowledge-LO5RK6PM.cjs} +8 -8
- package/dist/{logs-3B2P3JXN.cjs → logs-QRGJSZ4G.cjs} +15 -15
- package/dist/{policies-DVI6V22X.cjs → policies-OIQDO6F5.cjs} +11 -11
- package/dist/{scripts-JJ2BVYQ5.cjs → scripts-XULUNPDV.cjs} +12 -12
- package/dist/{software-update-BN23RATE.cjs → software-update-SRF55434.cjs} +10 -10
- package/dist/types/announcement.cjs +2 -0
- package/dist/types/announcement.d.ts +21 -0
- package/dist/types/announcement.d.ts.map +1 -1
- package/dist/types/announcement.js +2 -0
- package/dist/types/index.cjs +2 -0
- package/dist/utils/announcement-surface.d.ts +8 -0
- package/dist/utils/announcement-surface.d.ts.map +1 -0
- package/dist/utils/announcement-surface.js +7 -0
- package/dist/utils/index.cjs +7 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/package.json +1 -1
- package/src/components/announcement-bar.tsx +9 -1
- package/src/components/chat/chat-dialog-menu-items.tsx +6 -6
- package/src/components/chat/chat-message-enhanced.tsx +3 -0
- package/src/components/chat/chat-panel-context.tsx +3 -0
- package/src/components/chat/embeddable-chat.tsx +132 -9
- package/src/components/chat/hooks/index.ts +1 -0
- package/src/components/chat/hooks/use-what-to-ask.ts +203 -0
- package/src/components/chat/index.ts +1 -0
- package/src/components/chat/mingo-chat-header.tsx +11 -4
- package/src/components/chat/suggestions-display.tsx +41 -0
- package/src/components/chat/types/message.types.ts +31 -1
- package/src/components/chat/utils/extract-incomplete-message-state.ts +2 -0
- package/src/components/chat/utils/message-segment-accumulator.ts +4 -0
- package/src/types/announcement.ts +22 -0
- package/src/utils/announcement-surface.ts +14 -0
- package/src/utils/index.ts +2 -0
|
@@ -707,6 +707,10 @@ export class MessageSegmentAccumulator {
|
|
|
707
707
|
this.completeContextCompaction(segment.summary);
|
|
708
708
|
}
|
|
709
709
|
break;
|
|
710
|
+
case 'suggestions':
|
|
711
|
+
// Built locally by the host, never streamed: kept as it is.
|
|
712
|
+
this.segments.push(segment);
|
|
713
|
+
break;
|
|
710
714
|
}
|
|
711
715
|
}
|
|
712
716
|
return this.getSegments();
|
|
@@ -2,6 +2,14 @@ import type { EntityPlatformAssoc } from './entity-platform';
|
|
|
2
2
|
// Announcement system TypeScript types
|
|
3
3
|
import type { LegacyPlatform, PlatformFilter } from './platform';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Where an announcement bar is drawn: `web` is any browser (a website, a web app, a sign-in
|
|
7
|
+
* page), `desktop` and `mobile` are the desktop and phone apps. Not a platform: platforms are
|
|
8
|
+
* the brands an announcement belongs to (`announcement_platforms`).
|
|
9
|
+
*/
|
|
10
|
+
export const ANNOUNCEMENT_SURFACES = ['web', 'desktop', 'mobile'] as const;
|
|
11
|
+
export type AnnouncementSurface = (typeof ANNOUNCEMENT_SURFACES)[number];
|
|
12
|
+
|
|
5
13
|
// Database Models
|
|
6
14
|
export interface Announcement {
|
|
7
15
|
id: string;
|
|
@@ -20,6 +28,8 @@ export interface Announcement {
|
|
|
20
28
|
short_title?: string | null;
|
|
21
29
|
/** Path patterns the bar is NOT shown on (regular expressions matched against the whole path): the page shows the news itself. */
|
|
22
30
|
excluded_paths?: string[] | null;
|
|
31
|
+
/** The surfaces the bar is shown on. Null or empty: every surface. */
|
|
32
|
+
surfaces?: AnnouncementSurface[] | null;
|
|
23
33
|
// CTA (Call-To-Action) fields
|
|
24
34
|
cta_enabled?: boolean;
|
|
25
35
|
cta_text?: string;
|
|
@@ -69,6 +79,8 @@ export interface CreateAnnouncementData {
|
|
|
69
79
|
short_title?: string | null;
|
|
70
80
|
/** Paths the bar is not shown on (exact match). */
|
|
71
81
|
excluded_paths?: string[];
|
|
82
|
+
/** The surfaces the bar is shown on. Empty: every surface. */
|
|
83
|
+
surfaces?: AnnouncementSurface[];
|
|
72
84
|
// CTA (Call-To-Action) fields
|
|
73
85
|
cta_enabled?: boolean;
|
|
74
86
|
cta_text?: string;
|
|
@@ -96,6 +108,8 @@ export interface UpdateAnnouncementData {
|
|
|
96
108
|
short_title?: string | null;
|
|
97
109
|
/** Paths the bar is not shown on (exact match). */
|
|
98
110
|
excluded_paths?: string[];
|
|
111
|
+
/** The surfaces the bar is shown on. Empty: every surface. */
|
|
112
|
+
surfaces?: AnnouncementSurface[];
|
|
99
113
|
// CTA (Call-To-Action) fields
|
|
100
114
|
cta_enabled?: boolean;
|
|
101
115
|
cta_text?: string;
|
|
@@ -170,6 +184,8 @@ export interface AnnouncementFormData {
|
|
|
170
184
|
short_title?: string;
|
|
171
185
|
/** Paths the bar is not shown on, as the form holds them. */
|
|
172
186
|
excluded_paths?: string[];
|
|
187
|
+
/** The ticked surfaces. Never empty in a form: stored empty means every surface. */
|
|
188
|
+
surfaces?: AnnouncementSurface[];
|
|
173
189
|
}
|
|
174
190
|
|
|
175
191
|
// API Query Parameters
|
|
@@ -262,6 +278,12 @@ export interface AnnouncementBarProps {
|
|
|
262
278
|
* disappear by deactivating the announcement. Default true.
|
|
263
279
|
*/
|
|
264
280
|
dismissible?: boolean;
|
|
281
|
+
/**
|
|
282
|
+
* The surface this bar is drawn on, matched against the announcement's
|
|
283
|
+
* `surfaces`: an announcement that lists others stays collapsed here. Only
|
|
284
|
+
* the host knows it (a browser, or which app shell). Default `'web'`.
|
|
285
|
+
*/
|
|
286
|
+
surface?: AnnouncementSurface;
|
|
265
287
|
className?: string;
|
|
266
288
|
}
|
|
267
289
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Announcement, AnnouncementSurface } from '../types/announcement';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Whether an announcement is shown on a surface: it lists that surface, or it
|
|
5
|
+
* lists none (every surface). The bar asks it for its own surface; a server
|
|
6
|
+
* that draws an announcement elsewhere (a hero's news pill) asks it too.
|
|
7
|
+
*/
|
|
8
|
+
export function isAnnouncementOnSurface(
|
|
9
|
+
announcement: Pick<Announcement, 'surfaces'>,
|
|
10
|
+
surface: AnnouncementSurface,
|
|
11
|
+
): boolean {
|
|
12
|
+
const surfaces = announcement.surfaces;
|
|
13
|
+
return !surfaces?.length || surfaces.includes(surface);
|
|
14
|
+
}
|
package/src/utils/index.ts
CHANGED
|
@@ -135,6 +135,8 @@ export * from './color-analysis';
|
|
|
135
135
|
|
|
136
136
|
// Announcement dismissal store (cookie SSOT; server-safe name/match helpers)
|
|
137
137
|
export * from './announcement-storage';
|
|
138
|
+
// Which surfaces (browser, desktop app, phone app) an announcement is shown on
|
|
139
|
+
export * from './announcement-surface';
|
|
138
140
|
// cookie id-match dismissal store (walkthrough video widget)
|
|
139
141
|
export * from './dismiss-cookie';
|
|
140
142
|
export * from './dismissal-storage';
|