@flamingo-stack/openframe-frontend-core 0.0.829 → 0.0.831

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 (135) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/{case-study-card-QMFGPABF.cjs → case-study-card-TK7ZCNLM.cjs} +5 -5
  3. package/dist/{chunk-LKP5R3EQ.cjs → chunk-46LATWQR.cjs} +2 -2
  4. package/dist/{chunk-IBD2FPSX.cjs → chunk-4JHO2NVI.cjs} +2 -2
  5. package/dist/{chunk-3B6ZE4EZ.cjs → chunk-5L3UKDC6.cjs} +16 -16
  6. package/dist/{chunk-THPAGFT6.cjs → chunk-7COZUANC.cjs} +60 -69
  7. package/dist/{chunk-DWSU35QQ.cjs → chunk-7WQD3R5J.cjs} +84 -84
  8. package/dist/{chunk-DAKGX2WF.cjs → chunk-APNONOHY.cjs} +2 -2
  9. package/dist/{chunk-KPGKTEEB.cjs → chunk-BUEEQD3G.cjs} +2 -2
  10. package/dist/{chunk-YMLRDVPO.cjs → chunk-C4OQIYGW.cjs} +11 -11
  11. package/dist/{chunk-IFLGIBFZ.cjs → chunk-CP46CVUC.cjs} +91 -91
  12. package/dist/{chunk-UO6F6LLI.cjs → chunk-D6ZSRGH2.cjs} +699 -642
  13. package/dist/{chunk-UE5ZBCJ4.cjs → chunk-DAQMCWCK.cjs} +3 -3
  14. package/dist/{chunk-MFYSV7DE.cjs → chunk-EYSIQORA.cjs} +94 -94
  15. package/dist/{chunk-DU6AF77X.cjs → chunk-FNNDGOR3.cjs} +33 -33
  16. package/dist/{chunk-OKTNRGM5.cjs → chunk-GPXKG34G.cjs} +54 -54
  17. package/dist/{chunk-FMSAN6SR.cjs → chunk-H3WTYAVR.cjs} +129 -129
  18. package/dist/{chunk-HMC2IWV4.cjs → chunk-HDLY6OMQ.cjs} +6 -6
  19. package/dist/{chunk-2VLPXUQK.cjs → chunk-HLJXCOMA.cjs} +4 -4
  20. package/dist/{chunk-PBHP3FHO.cjs → chunk-JBTH3O2C.cjs} +4 -4
  21. package/dist/{chunk-2HQNXX2K.cjs → chunk-JQCQCE6U.cjs} +2 -2
  22. package/dist/{chunk-AY6XJOIN.cjs → chunk-LWMWY3JO.cjs} +45 -45
  23. package/dist/{chunk-R3PKAIX3.cjs → chunk-OGPAVRNF.cjs} +17 -17
  24. package/dist/{chunk-4DUVTJ6A.cjs → chunk-P5DWAVWK.cjs} +28 -28
  25. package/dist/{chunk-4ZIKDOPY.cjs → chunk-QHBKZJ6A.cjs} +4 -4
  26. package/dist/{chunk-PRZAEPGG.cjs → chunk-R6QZHOJB.cjs} +46 -46
  27. package/dist/{chunk-F2J5WN6U.cjs → chunk-SOCCHWDK.cjs} +2 -2
  28. package/dist/{chunk-IMDYB77M.cjs → chunk-SRHHLDBP.cjs} +36 -36
  29. package/dist/{chunk-7PZQ7SHB.cjs → chunk-SWMUW3RR.cjs} +18 -18
  30. package/dist/{chunk-6GPMVHJN.cjs → chunk-TD4CC4KV.cjs} +20 -20
  31. package/dist/{chunk-6WNSZ5XP.cjs → chunk-UGM3YDCK.cjs} +25 -25
  32. package/dist/{chunk-AH4YWTWZ.cjs → chunk-UQS2RI5Y.cjs} +12 -12
  33. package/dist/{chunk-IHRMX3X6.cjs → chunk-VBGBKRDO.cjs} +684 -661
  34. package/dist/{chunk-YHQDB5QJ.cjs → chunk-VQG2A7GA.cjs} +2 -2
  35. package/dist/{chunk-S6UJEW4G.cjs → chunk-WCOSGDGA.cjs} +2 -2
  36. package/dist/{chunk-ENMPSEEQ.cjs → chunk-WVNUCKB7.cjs} +4 -4
  37. package/dist/{chunk-LNXRTVOY.cjs → chunk-X76TZ5YR.cjs} +21 -21
  38. package/dist/{chunk-IBQ3CSKL.cjs → chunk-X7VQM5TU.cjs} +6 -6
  39. package/dist/{chunk-BIG3O33P.cjs → chunk-YJZ7R3W5.cjs} +28 -2
  40. package/dist/{chunk-W4VEDSAX.cjs → chunk-ZABZIM2Y.cjs} +6 -6
  41. package/dist/{chunk-ZJXLNIWC.cjs → chunk-ZJ5K6XHW.cjs} +21 -21
  42. package/dist/{cloud-tenants-YVCSVVIS.cjs → cloud-tenants-E2AC4WEJ.cjs} +20 -20
  43. package/dist/components/case-studies/index.cjs +36 -36
  44. package/dist/components/chat/embeddable-chat.d.ts +3 -3
  45. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  46. package/dist/components/chat/embeddable-chat.js +21 -14
  47. package/dist/components/chat/guide-welcome.d.ts +5 -16
  48. package/dist/components/chat/guide-welcome.d.ts.map +1 -1
  49. package/dist/components/chat/guide-welcome.js +4 -29
  50. package/dist/components/chat/index.cjs +19 -15
  51. package/dist/components/chat/mingo-quick-action-wall.d.ts +42 -16
  52. package/dist/components/chat/mingo-quick-action-wall.d.ts.map +1 -1
  53. package/dist/components/chat/mingo-quick-action-wall.js +105 -19
  54. package/dist/components/chat/mingo-welcome.d.ts +6 -13
  55. package/dist/components/chat/mingo-welcome.d.ts.map +1 -1
  56. package/dist/components/chat/mingo-welcome.js +5 -9
  57. package/dist/components/chat/quick-action-chip.d.ts +8 -2
  58. package/dist/components/chat/quick-action-chip.d.ts.map +1 -1
  59. package/dist/components/chat/quick-action-chip.js +18 -8
  60. package/dist/components/chat/utils/icon-registry.d.ts +2 -2
  61. package/dist/components/chat/utils/icon-registry.js +2 -2
  62. package/dist/components/contact/index.cjs +21 -21
  63. package/dist/components/docs/index.cjs +24 -24
  64. package/dist/components/embeds/index.cjs +21 -21
  65. package/dist/components/faq/index.cjs +22 -22
  66. package/dist/components/features/index.cjs +22 -20
  67. package/dist/components/features/notifications/index.d.ts +3 -1
  68. package/dist/components/features/notifications/index.d.ts.map +1 -1
  69. package/dist/components/features/notifications/index.js +2 -0
  70. package/dist/components/features/notifications/notification-category-icon.d.ts +7 -0
  71. package/dist/components/features/notifications/notification-category-icon.d.ts.map +1 -0
  72. package/dist/components/features/notifications/notification-category-icon.js +26 -0
  73. package/dist/components/features/notifications/notification-tile.d.ts.map +1 -1
  74. package/dist/components/features/notifications/types.d.ts +1 -1
  75. package/dist/components/features/notifications/types.d.ts.map +1 -1
  76. package/dist/components/help-center-pages/index.cjs +125 -125
  77. package/dist/components/index.cjs +90 -82
  78. package/dist/components/meeting-scheduler/index.cjs +69 -69
  79. package/dist/components/navigation/index.cjs +23 -23
  80. package/dist/components/navigation/site-footer.d.ts.map +1 -1
  81. package/dist/components/navigation/site-footer.js +2 -12
  82. package/dist/components/onboarding-guides/index.cjs +23 -23
  83. package/dist/components/product-demo/index.cjs +31 -31
  84. package/dist/components/related-content/index.cjs +9 -9
  85. package/dist/components/social-icon-row.d.ts +6 -2
  86. package/dist/components/social-icon-row.d.ts.map +1 -1
  87. package/dist/components/social-icon-row.js +5 -6
  88. package/dist/components/tickets/index.cjs +27 -27
  89. package/dist/components/ui/actions-menu.d.ts.map +1 -1
  90. package/dist/components/ui/actions-menu.js +27 -1
  91. package/dist/components/ui/index.cjs +24 -20
  92. package/dist/{devices-AW6BERJF.cjs → devices-CAYUGD2N.cjs} +21 -21
  93. package/dist/{embeddable-chat-ZJIOMMSA.cjs → embeddable-chat-FYHMR66R.cjs} +121 -114
  94. package/dist/hooks/index.cjs +7 -7
  95. package/dist/index.cjs +31 -25
  96. package/dist/{knowledge-PEOXTIVS.cjs → knowledge-OI4OPEVL.cjs} +21 -21
  97. package/dist/{logs-CYA7H4KM.cjs → logs-B3XV2NHV.cjs} +27 -27
  98. package/dist/platform-domains.cjs +4 -0
  99. package/dist/platform-domains.d.ts +2 -0
  100. package/dist/platform-domains.d.ts.map +1 -1
  101. package/dist/platform-domains.js +4 -0
  102. package/dist/{policies-M6QSFL5G.cjs → policies-ZB4Z42DV.cjs} +24 -24
  103. package/dist/{remote-session-QGFG5WAL.cjs → remote-session-CN3G7JNR.cjs} +7 -7
  104. package/dist/{scripts-Y46ECDDP.cjs → scripts-I4DNUOQC.cjs} +27 -27
  105. package/dist/{software-update-OTC2DGQZ.cjs → software-update-AWH4WXOH.cjs} +24 -24
  106. package/dist/{tickets-board-KCH6ITUV.cjs → tickets-board-PLYD2NSY.cjs} +11 -11
  107. package/dist/types/marketing.d.ts +61 -216
  108. package/dist/types/marketing.d.ts.map +1 -1
  109. package/dist/utils/index.cjs +2 -2
  110. package/dist/utils/notifications.cjs +55 -0
  111. package/dist/utils/notifications.d.ts +29 -0
  112. package/dist/utils/notifications.d.ts.map +1 -0
  113. package/dist/utils/notifications.js +53 -0
  114. package/dist/utils/social-platforms.d.ts +9 -9
  115. package/dist/utils/social-platforms.d.ts.map +1 -1
  116. package/package.json +7 -1
  117. package/src/components/chat/embeddable-chat.tsx +29 -45
  118. package/src/components/chat/guide-welcome.tsx +12 -57
  119. package/src/components/chat/mingo-quick-action-wall.tsx +166 -31
  120. package/src/components/chat/mingo-welcome.tsx +16 -35
  121. package/src/components/chat/quick-action-chip.tsx +32 -8
  122. package/src/components/chat/utils/icon-registry.ts +5 -5
  123. package/src/components/chat/utils/index.ts +1 -1
  124. package/src/components/features/notifications/index.ts +2 -1
  125. package/src/components/features/notifications/notification-category-icon.tsx +38 -0
  126. package/src/components/features/notifications/notification-tile.tsx +2 -1
  127. package/src/components/features/notifications/types.ts +1 -2
  128. package/src/components/navigation/site-footer.tsx +2 -11
  129. package/src/components/social-icon-row.tsx +11 -10
  130. package/src/components/ui/actions-menu.tsx +35 -1
  131. package/src/platform-domains.ts +5 -0
  132. package/src/types/marketing.ts +90 -268
  133. package/src/utils/index.ts +1 -1
  134. package/src/utils/notifications.ts +71 -0
  135. package/src/utils/social-platforms.ts +9 -9
@@ -0,0 +1,29 @@
1
+ /**
2
+ * What an OpenFrame notification can say about itself: its severity and the
3
+ * dashboard section (category) it belongs to, as the backend's enums name them.
4
+ * Stated once for every host that writes or draws one: the OpenFrame app's
5
+ * notification tiles, the Backoffice API's announcement request and the hub's
6
+ * preview of an announcement before it is sent.
7
+ *
8
+ * Pure and server-safe; also published as the granular subpath
9
+ * `./utils/notifications`, so server code reads the vocabulary without React.
10
+ */
11
+ /** The backend's notification severities, drawn as the tile's colour. */
12
+ export declare const NOTIFICATION_SEVERITIES: readonly ["INFO", "SUCCESS", "WARNING", "DANGER"];
13
+ export type NotificationSeverity = (typeof NOTIFICATION_SEVERITIES)[number];
14
+ export declare const NOTIFICATION_SEVERITY_LABELS: Readonly<Record<NotificationSeverity, string>>;
15
+ /** The severity a notification has when it states none. */
16
+ export declare const DEFAULT_NOTIFICATION_SEVERITY: NotificationSeverity;
17
+ /**
18
+ * The backend's `NotificationCategory`: the dashboard section a notification
19
+ * belongs to. Any section but GENERIC shows an unread counter on its menu item.
20
+ */
21
+ export declare const NOTIFICATION_CATEGORIES: readonly ["DASHBOARD", "CUSTOMERS", "DEVICES", "SCRIPTS", "MONITORING", "SOFTWARE", "LOGS", "TICKETS", "INSIGHTS", "MINGO", "INTEGRATIONS", "GENERIC"];
22
+ export type NotificationCategory = (typeof NOTIFICATION_CATEGORIES)[number];
23
+ /** Each category as the app's navigation names its section. */
24
+ export declare const NOTIFICATION_CATEGORY_LABELS: Readonly<Record<NotificationCategory, string>>;
25
+ /** The category a notification has when it states none. */
26
+ export declare const DEFAULT_NOTIFICATION_CATEGORY: NotificationCategory;
27
+ export declare function isNotificationSeverity(value: unknown): value is NotificationSeverity;
28
+ export declare function isNotificationCategory(value: unknown): value is NotificationCategory;
29
+ //# sourceMappingURL=notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/utils/notifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,yEAAyE;AACzE,eAAO,MAAM,uBAAuB,mDAAoD,CAAC;AACzF,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAKvF,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,6BAA6B,EAAE,oBAA6B,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,uBAAuB,wJAa1B,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,+DAA+D;AAC/D,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAavF,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,6BAA6B,EAAE,oBAAgC,CAAC;AAE7E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,oBAAoB,CAEpF;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,oBAAoB,CAEpF"}
@@ -0,0 +1,53 @@
1
+ const NOTIFICATION_SEVERITIES = ["INFO", "SUCCESS", "WARNING", "DANGER"];
2
+ const NOTIFICATION_SEVERITY_LABELS = {
3
+ INFO: "Info",
4
+ SUCCESS: "Success",
5
+ WARNING: "Warning",
6
+ DANGER: "Danger"
7
+ };
8
+ const DEFAULT_NOTIFICATION_SEVERITY = "INFO";
9
+ const NOTIFICATION_CATEGORIES = [
10
+ "DASHBOARD",
11
+ "CUSTOMERS",
12
+ "DEVICES",
13
+ "SCRIPTS",
14
+ "MONITORING",
15
+ "SOFTWARE",
16
+ "LOGS",
17
+ "TICKETS",
18
+ "INSIGHTS",
19
+ "MINGO",
20
+ "INTEGRATIONS",
21
+ "GENERIC"
22
+ ];
23
+ const NOTIFICATION_CATEGORY_LABELS = {
24
+ DASHBOARD: "Dashboard",
25
+ CUSTOMERS: "Customers",
26
+ DEVICES: "Devices",
27
+ SCRIPTS: "Scripts",
28
+ MONITORING: "Monitoring",
29
+ SOFTWARE: "Software",
30
+ LOGS: "Logs",
31
+ TICKETS: "Tickets",
32
+ INSIGHTS: "Insights",
33
+ MINGO: "Mingo",
34
+ INTEGRATIONS: "Integrations",
35
+ GENERIC: "General"
36
+ };
37
+ const DEFAULT_NOTIFICATION_CATEGORY = "GENERIC";
38
+ function isNotificationSeverity(value) {
39
+ return typeof value === "string" && NOTIFICATION_SEVERITIES.includes(value);
40
+ }
41
+ function isNotificationCategory(value) {
42
+ return typeof value === "string" && NOTIFICATION_CATEGORIES.includes(value);
43
+ }
44
+ export {
45
+ DEFAULT_NOTIFICATION_CATEGORY,
46
+ DEFAULT_NOTIFICATION_SEVERITY,
47
+ NOTIFICATION_CATEGORIES,
48
+ NOTIFICATION_CATEGORY_LABELS,
49
+ NOTIFICATION_SEVERITIES,
50
+ NOTIFICATION_SEVERITY_LABELS,
51
+ isNotificationCategory,
52
+ isNotificationSeverity
53
+ };
@@ -3,10 +3,10 @@
3
3
  * type, and the "find the link for a platform" picker.
4
4
  *
5
5
  * **This module does NOT own the list of platforms.** That list lives in the
6
- * `social_platforms` table and only there: it is admin-editable, it carries
6
+ * `channel_platforms` table and only there: it is admin-editable, it carries
7
7
  * `display_name`, `icon_name`, `base_url`, `url_pattern`, `category` and
8
8
  * `sort_order`, and the hub already reads it everywhere
9
- * (`lib/data/social-platforms-utils.ts`, `useSocialPlatforms`). A hardcoded
9
+ * (`lib/data/channel-platforms-utils.ts`, `useChannelPlatforms`). A hardcoded
10
10
  * tuple here would be a second vocabulary that drifts the first time somebody
11
11
  * adds a row — and, being a compile-time union, would reject that row outright.
12
12
  *
@@ -22,24 +22,24 @@
22
22
  * scripts can import the type and the classifier without pulling in React.
23
23
  */
24
24
  /**
25
- * One row of `social_platforms`, in the shape callers pass around.
25
+ * One row of `channel_platforms`, in the shape callers pass around.
26
26
  *
27
27
  * Deliberately a narrow READ view: the columns that decide presentation and
28
28
  * URL-building, not the OAuth or media-config columns, which have their own
29
29
  * consumers and no business here.
30
30
  */
31
31
  export interface SocialPlatformDefinition {
32
- /** `social_platforms.name` — the canonical key, lowercase. */
32
+ /** `channel_platforms.name` — the canonical key, lowercase. */
33
33
  name: string;
34
- /** `social_platforms.base_url`, e.g. `https://twitter.com/`. */
34
+ /** `channel_platforms.base_url`, e.g. `https://twitter.com/`. */
35
35
  baseUrl?: string | null;
36
- /** `social_platforms.url_pattern`, e.g. `https://twitter.com/{username}`. */
36
+ /** `channel_platforms.url_pattern`, e.g. `https://twitter.com/{username}`. */
37
37
  urlPattern?: string | null;
38
38
  }
39
39
  /**
40
40
  * Accepted SPELLINGS that resolve onto a platform name.
41
41
  *
42
- * Not a vocabulary — every value here must be a `social_platforms.name`. These
42
+ * Not a vocabulary — every value here must be a `channel_platforms.name`. These
43
43
  * exist because external data says `x`, `fb` or `generic` where the table says
44
44
  * `twitter`, `facebook` and `website`.
45
45
  */
@@ -60,7 +60,7 @@ export declare function hostMatches(hostname: string | null | undefined, domain:
60
60
  * (`x.com`), a share domain (`youtu.be`), an invite domain (`discord.gg`).
61
61
  *
62
62
  * The ONLY hardcoded host knowledge left, and it is additive: every primary
63
- * host is derived from the row. Keyed by `social_platforms.name`, so a row that
63
+ * host is derived from the row. Keyed by `channel_platforms.name`, so a row that
64
64
  * does not exist contributes nothing. If this grows, the answer is an
65
65
  * `alt_hosts` column on the table, not a longer map here.
66
66
  */
@@ -70,7 +70,7 @@ export declare function socialPlatformHosts(platform: SocialPlatformDefinition):
70
70
  /**
71
71
  * Classify a URL by its host against the platforms the DATABASE defines.
72
72
  *
73
- * `platforms` is the caller's loaded `social_platforms` rows — passing them in
73
+ * `platforms` is the caller's loaded `channel_platforms` rows — passing them in
74
74
  * is what keeps this function pure and this module free of a platform list.
75
75
  * Returns `'website'` for a URL that parses but matches no row (the table's own
76
76
  * catch-all row), and `null` for something that is not a URL at all.
@@ -1 +1 @@
1
- {"version":3,"file":"social-platforms.d.ts","sourceRoot":"","sources":["../../src/utils/social-platforms.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAA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G;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4FAA4F;IAC5F,UAAU,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;CACtC,GAAG,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC;AAEhF;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,EAC3D,KAAK,EAAE,SAAS,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,EACtC,QAAQ,EAAE,MAAM,GACf,CAAC,GAAG,SAAS,CAIf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamingo-stack/openframe-frontend-core",
3
- "version": "0.0.829",
3
+ "version": "0.0.831",
4
4
  "description": "Shared design system and components for all Flamingo platforms",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -293,6 +293,12 @@
293
293
  "require": "./dist/utils/mobile-app.cjs",
294
294
  "default": "./dist/utils/mobile-app.js"
295
295
  },
296
+ "./utils/notifications": {
297
+ "types": "./dist/utils/notifications.d.ts",
298
+ "import": "./dist/utils/notifications.js",
299
+ "require": "./dist/utils/notifications.cjs",
300
+ "default": "./dist/utils/notifications.js"
301
+ },
296
302
  "./utils/platform-identity": {
297
303
  "types": "./dist/utils/platform-identity.d.ts",
298
304
  "import": "./dist/utils/platform-identity.js",
@@ -399,13 +399,10 @@ export interface EmbeddableChatProps {
399
399
  * extra `quickActions` chips.
400
400
  * Each field falls back to the built-in OpenFrame defaults, so the kit
401
401
  * stays platform-agnostic. `onStartGuideChat` and `hasExistingChats` are
402
- * wired internally and are NOT overridable here. The quick-action
403
- * hover-preview callbacks are also wired internally.
402
+ * wired internally and are NOT overridable here. A quick action's click is wired internally too: it puts the
403
+ * action's prompt into the composer to edit and send, then calls the action's own `onClick` (e.g. analytics).
404
404
  */
405
- mingoWelcome?: Omit<
406
- MingoWelcomeProps,
407
- 'onStartGuideChat' | 'hasExistingChats' | 'onQuickActionHover' | 'onQuickActionHoverEnd'
408
- >;
405
+ mingoWelcome?: Omit<MingoWelcomeProps, 'onStartGuideChat' | 'hasExistingChats'>;
409
406
 
410
407
  /**
411
408
  * The host's conversation page size: how many dialogs one page of the list
@@ -1271,11 +1268,20 @@ function EmbeddableChatInner({
1271
1268
 
1272
1269
  // Imperative handle to the chat input.
1273
1270
  const chatInputRef = useRef<ChatInputRef | null>(null);
1274
- // Full prompt of the currently hovered/focused quick-action chip, previewed
1275
- // as ghost text in the empty composer (`ChatInput.previewText`) — declarative
1276
- // + non-destructive: it never writes the editor value, so it can't clobber a
1277
- // draft. `null` = not previewing.
1278
- const [quickActionPreview, setQuickActionPreview] = useState<string | null>(null);
1271
+ // A quick action (a starter) puts its prompt into the composer to edit and send, the way support prompts that
1272
+ // start a conversation work (AWS Cloudscape, "support prompts"): nothing is sent on the click. It never loses what
1273
+ // the user typed: an empty composer, or one holding only the prompt a quick action put there, takes the new prompt;
1274
+ // a draft of the user's own keeps its text and gets the prompt after it.
1275
+ const insertedPromptRef = useRef<string | null>(null);
1276
+ const insertQuickAction = useCallback((prompt: string) => {
1277
+ const input = chatInputRef.current;
1278
+ if (!input) return;
1279
+ const draft = input.getValue().trim();
1280
+ const next = draft === '' || draft === insertedPromptRef.current ? prompt : `${draft}\n\n${prompt}`;
1281
+ insertedPromptRef.current = next;
1282
+ input.setValue(next);
1283
+ input.focus();
1284
+ }, []);
1279
1285
 
1280
1286
  // The slash-command registry (Guide onboarding cards) is loaded via
1281
1287
  // react-query below, after `activeMode` is resolved — gated on Guide mode and
@@ -2117,16 +2123,6 @@ function EmbeddableChatInner({
2117
2123
  // Guide-mode empty state (no open conversation) — drives the "Mingo Guide"
2118
2124
  // header, the guide banner, and the GuideWelcome content branch.
2119
2125
  const isGuideEmpty = !hasConversation && activeMode === 'guide';
2120
- // Quick-action chips exist in BOTH empty states (Guide onboarding + Mingo
2121
- // welcome). If the chip row goes away (a message is sent, or the mode
2122
- // switches) while a chip is still hovered, drop the in-flight preview so it
2123
- // can't leak into the next composer state.
2124
- const isQuickActionEmpty = !hasConversation && (activeMode === 'guide' || activeMode === 'mingo');
2125
- // Dropped while rendering, not from an effect: the composer reads
2126
- // `quickActionPreview` in THIS render, so an effect committed one frame with
2127
- // the hovered chip's prompt still ghosted into a composer whose chip row had
2128
- // already gone. Guarded, so the extra render pass takes the early exit.
2129
- if (!isQuickActionEmpty && quickActionPreview !== null) setQuickActionPreview(null);
2130
2126
  // The guide-empty back-chevron returns to Mingo — only offer it when Mingo
2131
2127
  // mode actually exists to return to (guide is normally entered from Mingo).
2132
2128
  const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
@@ -2876,15 +2872,15 @@ function EmbeddableChatInner({
2876
2872
  // the new-user compose surface: greeting + grid + promo +
2877
2873
  // primary Guide chip.
2878
2874
  hasExistingChats={false}
2879
- // Hover/focus PREVIEWS the action's full prompt as ghost text
2880
- // in the empty composer (see `quickActionPreview` /
2881
- // `ChatInput.previewText`). Wired after the `{...mingoWelcome}`
2882
- // spread so the host can't override it.
2883
- onQuickActionHover={action => setQuickActionPreview(action.prompt ?? action.label)}
2884
- onQuickActionHoverEnd={() => setQuickActionPreview(null)}
2885
- // A built-in agent caps the quick-action wall at 2 rows;
2886
- // this is the Mingo surface, so fall back to 'mingo'.
2887
- agentSlug={activeAgentSlug ?? 'mingo'}
2875
+ // A quick action puts its prompt into the composer to edit and send (`insertQuickAction`), then runs
2876
+ // the host's own click. Wired after the `{...mingoWelcome}` spread so nothing is sent from here.
2877
+ quickActions={mingoWelcome?.quickActions?.map(action => ({
2878
+ ...action,
2879
+ onClick: () => {
2880
+ insertQuickAction(action.prompt ?? action.label);
2881
+ action.onClick?.();
2882
+ },
2883
+ }))}
2888
2884
  />
2889
2885
  ) : (
2890
2886
  /* Figma node 7532:328214 — Guide-mode empty state: greeting
@@ -2922,20 +2918,8 @@ function EmbeddableChatInner({
2922
2918
  ? guideSuggestedActions
2923
2919
  : (guideWelcome?.quickActions ?? guideSuggestedActions)
2924
2920
  }
2925
- // Quick-action chips SEND the prompt immediately on click.
2926
- onQuickAction={action => {
2927
- setQuickActionPreview(null);
2928
- handleSend(action.prompt ?? action.label);
2929
- }}
2930
- // Hover/focus PREVIEWS the action's full prompt as ghost text
2931
- // in the empty composer (the chip label is short; this reveals
2932
- // what will be sent). Declarative + non-destructive — see
2933
- // `quickActionPreview` / `ChatInput.previewText`.
2934
- onQuickActionHover={action => setQuickActionPreview(action.prompt ?? action.label)}
2935
- onQuickActionHoverEnd={() => setQuickActionPreview(null)}
2936
- // In agent mode a built-in agent (fae/mingo) caps the wall at
2937
- // 2 rows; host/guide mode (no active agent) keeps the default.
2938
- agentSlug={activeAgentSlug}
2921
+ // A quick action puts its prompt into the composer to edit and send.
2922
+ onQuickAction={action => insertQuickAction(action.prompt ?? action.label)}
2939
2923
  >
2940
2924
  {/* Figma node 7363:205938 — single-column slash-command
2941
2925
  list. No own scroll (GuideWelcome's region scrolls); the
@@ -3009,7 +2993,7 @@ function EmbeddableChatInner({
3009
2993
  }
3010
2994
  autoFocus={previewMode ? false : autoFocusInput}
3011
2995
  slashCommands={slashCommandsProp}
3012
- previewText={quickActionPreview ?? composerPreviewText ?? undefined}
2996
+ previewText={composerPreviewText ?? undefined}
3013
2997
  safeAreaBottom={safeAreaBottom}
3014
2998
  edgeLight={composerEdgeLight}
3015
2999
  showAttachmentButton={attachmentsEnabled && activeMode === 'guide'}
@@ -1,16 +1,14 @@
1
1
  'use client';
2
2
 
3
3
  import { type ReactNode, useMemo } from 'react';
4
- import { usePageTopicStamp } from '../../contexts/page-topics-context';
5
4
  import { cn } from '../../utils/cn';
6
5
  import { AgentMark } from '../agent-mark';
7
6
  import { EntityIcon } from '../icon-display';
8
7
  import { TextLineSkeleton } from '../loading/unified-skeleton';
9
- import { PageTopicLabel } from '../page-topic-label';
10
8
  import { useLoadingScope } from '../ui/loading-scope';
11
9
  import { ScrollFadeOverlay, useScrollFade } from '../ui/scroll-fade';
10
+ import { QuickActionSet } from './mingo-quick-action-wall';
12
11
  import { accentFromIdentityIcon, type QuickActionAccent } from './quick-action-chip';
13
- import { QuickActionWall } from './quick-action-wall';
14
12
 
15
13
  // =============================================================================
16
14
  // Types
@@ -50,10 +48,9 @@ export interface GuideWelcomeProps {
50
48
  * `subtitle` is present. A loading scope draws the skeleton too. */
51
49
  subtitleLoading?: boolean;
52
50
  /** Quick-action chips — caller-provided; there are no built-in defaults, so
53
- * the chip row is omitted entirely unless the host supplies actions. ALL
54
- * chips render in a wrapping row (no "⋯" overflow collapse) so every action
55
- * is directly hoverable — hover/focus previews the action's full `prompt` in
56
- * the composer; click sends it. */
51
+ * the set is omitted entirely unless the host supplies actions. The first
52
+ * ones fill the set's slots and the rest open from its "More" slot; a click
53
+ * hands the action to `onQuickAction` (the chat puts its `prompt` into the composer). */
57
54
  quickActions?: ReadonlyArray<GuideQuickAction>;
58
55
  /** The host is still reading the chips (e.g. the quick actions of the page's
59
56
  * topic): with none to show yet the wall draws its own loading form. A
@@ -66,15 +63,6 @@ export interface GuideWelcomeProps {
66
63
  showTopic?: boolean;
67
64
  /** Fired when a quick-action chip is activated (click). */
68
65
  onQuickAction?: (action: GuideQuickAction) => void;
69
- /** Pointer/keyboard focus enters a quick-action chip — e.g. preview the
70
- * action's full `prompt` in the composer input. */
71
- onQuickActionHover?: (action: GuideQuickAction) => void;
72
- /** Pointer/keyboard focus leaves the chip — e.g. restore the composer. */
73
- onQuickActionHoverEnd?: () => void;
74
- /** Agent this empty state belongs to — forwarded to the quick-action
75
- * {@link QuickActionWall} so a built-in agent (`'fae'`/`'mingo'`) caps the
76
- * brick stack at 2 rows. Unset (host/guide mode) keeps the full `rows` cap. */
77
- agentSlug?: string;
78
66
  /** Slash-command onboarding list — rendered inside the shared scroll region
79
67
  * below the greeting (so greeting + list scroll together, with edge fades). */
80
68
  children?: ReactNode;
@@ -96,8 +84,7 @@ const DEFAULT_TITLE = 'Guide Mode Chat';
96
84
  *
97
85
  * Guide-mode chat empty state: a centred greeting and the slash-command
98
86
  * onboarding list share one scroll region (with top/bottom fade affordances),
99
- * and a pinned quick-action chip row sits above the composer. The first few
100
- * quick actions render as chips; the remainder collapse under a "⋯" menu.
87
+ * and the pinned quick-action set sits above the composer.
101
88
  *
102
89
  * Mirrors `MingoWelcome` (the default-mode empty state) — content is
103
90
  * configurable with OpenFrame defaults.
@@ -111,15 +98,9 @@ export function GuideWelcome({
111
98
  quickActionsLoading = false,
112
99
  showTopic: showTopicProp,
113
100
  onQuickAction,
114
- onQuickActionHover,
115
- onQuickActionHoverEnd,
116
- agentSlug,
117
101
  children,
118
102
  className,
119
103
  }: GuideWelcomeProps) {
120
- // The host's choice (`PageTopicsProvider showTopic`) unless this surface states its own.
121
- const topicStamp = usePageTopicStamp();
122
- const showTopic = showTopicProp ?? topicStamp;
123
104
  // Scroll-fade affordances: a 48px gradient at the top/bottom edge of the
124
105
  // scroll region, shown only while content is actually hidden in that
125
106
  // direction. (Same behaviour as MingoWelcome.)
@@ -130,11 +111,8 @@ export function GuideWelcome({
130
111
  // The same switch for the chips (read data): the wall draws its loading form while there are none to show yet.
131
112
  const chipsAreLoading = inLoadingScope || (quickActionsLoading && quickActions.length === 0);
132
113
 
133
- // Map to the shared {@link QuickActionChip} shape consumed by the unified
134
- // `QuickActionWall` — the SAME chip wall the website hero + deck render, so
135
- // the chat's quick actions read as "the work the agent does". Every chip
136
- // stays interactive (clone copies included); `onHoverStart`/`onHoverEnd` drive
137
- // the composer prompt preview and `onSelect` sends.
114
+ // Map to the shared {@link QuickActionChip} shape the chat's {@link QuickActionSet} draws (the set Mingo's empty
115
+ // state and the OpenFrame dock draw too). `onSelect` hands the action to the host.
138
116
  const chipItems = useMemo(
139
117
  () =>
140
118
  quickActions.map(action => ({
@@ -152,10 +130,8 @@ export function GuideWelcome({
152
130
  accent: action.accent ?? accentFromIdentityIcon(icon) ?? 'cyan',
153
131
  },
154
132
  onSelect: () => onQuickAction?.(action),
155
- onHoverStart: () => onQuickActionHover?.(action),
156
- onHoverEnd: () => onQuickActionHoverEnd?.(),
157
133
  })),
158
- [quickActions, icon, onQuickAction, onQuickActionHover, onQuickActionHoverEnd],
134
+ [quickActions, icon, onQuickAction],
159
135
  );
160
136
 
161
137
  return (
@@ -211,32 +187,11 @@ export function GuideWelcome({
211
187
  <ScrollFadeOverlay edge="bottom" visible={fadeBottom} className="h-12" />
212
188
  </div>
213
189
 
214
- {/* Pinned quick-action wall above the composer — the shared
215
- {@link QuickActionWall} in BRICK mode (the SAME "wall of the work
216
- agents do" the website hero renders): up to 4 stacked row marquees,
217
- chips packed edge-to-edge, drifting under left/right edge fades so a
218
- long agent action set gets "reach" without squeezing the composer.
219
- Chips stay directly hoverable — hover/focus previews the action's full
220
- prompt in the composer, click sends it — and `pauseOnHover` freezes
221
- the hovered row so a moving chip never dodges a click. */}
222
- {/* Right-aligned and pulled against the chips, so it reads as a stamp on the wall, not a row of its own. */}
223
- {showTopic && (
224
- <PageTopicLabel className="-mb-[var(--spacing-system-xs)] shrink-0 px-[var(--spacing-system-l)] text-right" />
225
- )}
190
+ {/* The quick actions, pinned above the composer: the static {@link QuickActionSet} (fixed slots, its height
191
+ set by the width alone, "More" for the rest). A click hands the action to `onQuickAction`. The set prints
192
+ the page's topic over itself. */}
226
193
  {(quickActions.length > 0 || chipsAreLoading) && (
227
- <QuickActionWall
228
- chips={chipItems}
229
- loading={chipsAreLoading}
230
- agentSlug={agentSlug}
231
- rows={4}
232
- pauseOnHover
233
- dragScroll
234
- fade={['left', 'right']}
235
- fadeSize={{ left: 32 }}
236
- fadeColor="var(--color-bg)"
237
- copyGap="var(--spacing-system-xxs)"
238
- className="max-h-44 shrink-0"
239
- />
194
+ <QuickActionSet chips={chipItems} loading={chipsAreLoading} showTopic={showTopicProp} />
240
195
  )}
241
196
  </div>
242
197
  );