@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.
Files changed (111) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/{chunk-OXEAN3EQ.cjs → chunk-35BJY5RR.cjs} +44 -44
  3. package/dist/{chunk-ZYRRRKSZ.cjs → chunk-5E6JHOGX.cjs} +3 -3
  4. package/dist/{chunk-35RU25PJ.cjs → chunk-7Z4EQOIX.cjs} +44 -44
  5. package/dist/{chunk-4PEG4JTM.cjs → chunk-B27XV2TC.cjs} +6 -6
  6. package/dist/{chunk-4OTCQEP3.cjs → chunk-BLZIUELR.cjs} +11 -11
  7. package/dist/{chunk-KBJSZFBZ.cjs → chunk-BQQ3JGEO.cjs} +3 -3
  8. package/dist/{chunk-RDH63XXW.cjs → chunk-DW5OKTUP.cjs} +34 -34
  9. package/dist/{chunk-KUVYVAS2.cjs → chunk-EDSFLB7J.cjs} +19 -17
  10. package/dist/{chunk-WQCLN27R.cjs → chunk-FAFFWYEH.cjs} +4 -4
  11. package/dist/{chunk-P4ODFQGA.cjs → chunk-GQYCVZJI.cjs} +4 -4
  12. package/dist/{chunk-Y6PVZRYL.cjs → chunk-IVAAQSOU.cjs} +12 -12
  13. package/dist/{chunk-EUQJ7QHW.cjs → chunk-JXACH52M.cjs} +4 -4
  14. package/dist/{chunk-JI6NRWCC.cjs → chunk-MOEILCEX.cjs} +13 -13
  15. package/dist/{chunk-IPVJAML5.cjs → chunk-OGKV5NOP.cjs} +69 -69
  16. package/dist/{chunk-OXCGQV6B.cjs → chunk-RTQN35EP.cjs} +153 -146
  17. package/dist/{chunk-EM4OEWCM.cjs → chunk-SDF5UUTE.cjs} +749 -608
  18. package/dist/{chunk-7OEVVMAU.cjs → chunk-T4BBZ5ST.cjs} +2 -2
  19. package/dist/{chunk-XADJG35G.cjs → chunk-TBDVF4SN.cjs} +31 -31
  20. package/dist/{chunk-G44V3UGE.cjs → chunk-TPJTFN7O.cjs} +81 -81
  21. package/dist/{chunk-J5G4CF2V.cjs → chunk-U4I3QR2A.cjs} +16 -16
  22. package/dist/{chunk-U2AE4UG7.cjs → chunk-UNRNLSG4.cjs} +2 -2
  23. package/dist/{chunk-ZVOXBSDP.cjs → chunk-WBOHLXFC.cjs} +2 -2
  24. package/dist/{chunk-VD3XBUQR.cjs → chunk-YSFOYBYC.cjs} +158 -158
  25. package/dist/{chunk-7WEGXNNS.cjs → chunk-ZNV5FE4T.cjs} +30 -30
  26. package/dist/{cloud-tenants-WAOMZZQ2.cjs → cloud-tenants-5OTPO7FL.cjs} +7 -7
  27. package/dist/components/announcement-bar.d.ts +1 -1
  28. package/dist/components/announcement-bar.d.ts.map +1 -1
  29. package/dist/components/announcement-bar.js +3 -1
  30. package/dist/components/case-studies/index.cjs +20 -20
  31. package/dist/components/chat/chat-dialog-menu-items.js +6 -6
  32. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  33. package/dist/components/chat/chat-message-enhanced.js +3 -0
  34. package/dist/components/chat/chat-panel-context.d.ts +3 -0
  35. package/dist/components/chat/chat-panel-context.d.ts.map +1 -1
  36. package/dist/components/chat/embeddable-chat.d.ts +20 -0
  37. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  38. package/dist/components/chat/embeddable-chat.js +78 -8
  39. package/dist/components/chat/hooks/index.d.ts +1 -0
  40. package/dist/components/chat/hooks/index.d.ts.map +1 -1
  41. package/dist/components/chat/hooks/index.js +1 -0
  42. package/dist/components/chat/hooks/use-what-to-ask.d.ts +69 -0
  43. package/dist/components/chat/hooks/use-what-to-ask.d.ts.map +1 -0
  44. package/dist/components/chat/hooks/use-what-to-ask.js +106 -0
  45. package/dist/components/chat/index.cjs +13 -5
  46. package/dist/components/chat/index.d.ts +1 -0
  47. package/dist/components/chat/index.d.ts.map +1 -1
  48. package/dist/components/chat/index.js +1 -0
  49. package/dist/components/chat/mingo-chat-header.d.ts +4 -2
  50. package/dist/components/chat/mingo-chat-header.d.ts.map +1 -1
  51. package/dist/components/chat/mingo-chat-header.js +7 -2
  52. package/dist/components/chat/suggestions-display.d.ts +11 -0
  53. package/dist/components/chat/suggestions-display.d.ts.map +1 -0
  54. package/dist/components/chat/suggestions-display.js +27 -0
  55. package/dist/components/chat/types/message.types.d.ts +27 -1
  56. package/dist/components/chat/types/message.types.d.ts.map +1 -1
  57. package/dist/components/chat/utils/extract-incomplete-message-state.d.ts.map +1 -1
  58. package/dist/components/chat/utils/extract-incomplete-message-state.js +2 -0
  59. package/dist/components/chat/utils/message-segment-accumulator.d.ts.map +1 -1
  60. package/dist/components/chat/utils/message-segment-accumulator.js +3 -0
  61. package/dist/components/contact/index.cjs +8 -8
  62. package/dist/components/docs/index.cjs +11 -11
  63. package/dist/components/embeds/index.cjs +8 -8
  64. package/dist/components/faq/index.cjs +9 -9
  65. package/dist/components/features/index.cjs +7 -7
  66. package/dist/components/help-center-pages/index.cjs +84 -84
  67. package/dist/components/index.cjs +66 -56
  68. package/dist/components/meeting-scheduler/index.cjs +31 -31
  69. package/dist/components/navigation/index.cjs +10 -10
  70. package/dist/components/onboarding-guides/index.cjs +10 -10
  71. package/dist/components/product-demo/index.cjs +7 -7
  72. package/dist/components/related-content/index.cjs +5 -5
  73. package/dist/components/tickets/index.cjs +13 -13
  74. package/dist/components/ui/index.cjs +15 -7
  75. package/dist/{devices-VFEPXW2N.cjs → devices-MBGMD7BO.cjs} +8 -8
  76. package/dist/{embeddable-chat-BYQBABDV.cjs → embeddable-chat-CMEHSDV7.cjs} +163 -91
  77. package/dist/index.cjs +23 -11
  78. package/dist/{knowledge-4TE7AWZX.cjs → knowledge-LO5RK6PM.cjs} +8 -8
  79. package/dist/{logs-3B2P3JXN.cjs → logs-QRGJSZ4G.cjs} +15 -15
  80. package/dist/{policies-DVI6V22X.cjs → policies-OIQDO6F5.cjs} +11 -11
  81. package/dist/{scripts-JJ2BVYQ5.cjs → scripts-XULUNPDV.cjs} +12 -12
  82. package/dist/{software-update-BN23RATE.cjs → software-update-SRF55434.cjs} +10 -10
  83. package/dist/types/announcement.cjs +2 -0
  84. package/dist/types/announcement.d.ts +21 -0
  85. package/dist/types/announcement.d.ts.map +1 -1
  86. package/dist/types/announcement.js +2 -0
  87. package/dist/types/index.cjs +2 -0
  88. package/dist/utils/announcement-surface.d.ts +8 -0
  89. package/dist/utils/announcement-surface.d.ts.map +1 -0
  90. package/dist/utils/announcement-surface.js +7 -0
  91. package/dist/utils/index.cjs +7 -0
  92. package/dist/utils/index.d.ts +1 -0
  93. package/dist/utils/index.d.ts.map +1 -1
  94. package/dist/utils/index.js +1 -0
  95. package/package.json +1 -1
  96. package/src/components/announcement-bar.tsx +9 -1
  97. package/src/components/chat/chat-dialog-menu-items.tsx +6 -6
  98. package/src/components/chat/chat-message-enhanced.tsx +3 -0
  99. package/src/components/chat/chat-panel-context.tsx +3 -0
  100. package/src/components/chat/embeddable-chat.tsx +132 -9
  101. package/src/components/chat/hooks/index.ts +1 -0
  102. package/src/components/chat/hooks/use-what-to-ask.ts +203 -0
  103. package/src/components/chat/index.ts +1 -0
  104. package/src/components/chat/mingo-chat-header.tsx +11 -4
  105. package/src/components/chat/suggestions-display.tsx +41 -0
  106. package/src/components/chat/types/message.types.ts +31 -1
  107. package/src/components/chat/utils/extract-incomplete-message-state.ts +2 -0
  108. package/src/components/chat/utils/message-segment-accumulator.ts +4 -0
  109. package/src/types/announcement.ts +22 -0
  110. package/src/utils/announcement-surface.ts +14 -0
  111. 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
+ }
@@ -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';