@flamingo-stack/openframe-frontend-core 0.0.830 → 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 (111) 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-QTLWU6FY.cjs → chunk-5L3UKDC6.cjs} +11 -11
  6. package/dist/{chunk-HYCMMECU.cjs → chunk-7COZUANC.cjs} +58 -67
  7. package/dist/{chunk-ULF4ZOUM.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-WCCE4WF3.cjs → chunk-CP46CVUC.cjs} +91 -91
  12. package/dist/{chunk-5LED4QHZ.cjs → chunk-D6ZSRGH2.cjs} +237 -237
  13. package/dist/{chunk-HYGWRUEM.cjs → chunk-DAQMCWCK.cjs} +3 -3
  14. package/dist/{chunk-56EP4QM2.cjs → chunk-EYSIQORA.cjs} +94 -94
  15. package/dist/{chunk-2BGLALP5.cjs → chunk-FNNDGOR3.cjs} +19 -19
  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-RRPID7Z7.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-E6W4YDPS.cjs → chunk-OGPAVRNF.cjs} +17 -17
  24. package/dist/{chunk-D2LXFMZI.cjs → chunk-P5DWAVWK.cjs} +28 -28
  25. package/dist/{chunk-TUMSVFVS.cjs → chunk-QHBKZJ6A.cjs} +4 -4
  26. package/dist/{chunk-WZYBUJJG.cjs → chunk-R6QZHOJB.cjs} +46 -46
  27. package/dist/{chunk-F2J5WN6U.cjs → chunk-SOCCHWDK.cjs} +2 -2
  28. package/dist/{chunk-CAGQAMJ6.cjs → chunk-SRHHLDBP.cjs} +36 -36
  29. package/dist/{chunk-WWDNLMB7.cjs → chunk-SWMUW3RR.cjs} +11 -11
  30. package/dist/{chunk-6GPMVHJN.cjs → chunk-TD4CC4KV.cjs} +20 -20
  31. package/dist/{chunk-SAW7V7CU.cjs → chunk-UGM3YDCK.cjs} +25 -25
  32. package/dist/{chunk-FFFN4IY2.cjs → chunk-UQS2RI5Y.cjs} +12 -12
  33. package/dist/{chunk-5KSPG3TV.cjs → chunk-VBGBKRDO.cjs} +665 -642
  34. package/dist/{chunk-X425BGXS.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-DUGOOTER.cjs → chunk-X76TZ5YR.cjs} +21 -21
  38. package/dist/{chunk-PUXYAHH3.cjs → chunk-X7VQM5TU.cjs} +6 -6
  39. package/dist/{chunk-W4VEDSAX.cjs → chunk-ZABZIM2Y.cjs} +6 -6
  40. package/dist/{chunk-M75723HD.cjs → chunk-ZJ5K6XHW.cjs} +21 -21
  41. package/dist/{cloud-tenants-4KQQPXPM.cjs → cloud-tenants-E2AC4WEJ.cjs} +19 -19
  42. package/dist/components/case-studies/index.cjs +35 -35
  43. package/dist/components/chat/index.cjs +14 -14
  44. package/dist/components/chat/utils/icon-registry.d.ts +2 -2
  45. package/dist/components/chat/utils/icon-registry.js +2 -2
  46. package/dist/components/contact/index.cjs +20 -20
  47. package/dist/components/docs/index.cjs +23 -23
  48. package/dist/components/embeds/index.cjs +20 -20
  49. package/dist/components/faq/index.cjs +21 -21
  50. package/dist/components/features/index.cjs +21 -19
  51. package/dist/components/features/notifications/index.d.ts +3 -1
  52. package/dist/components/features/notifications/index.d.ts.map +1 -1
  53. package/dist/components/features/notifications/index.js +2 -0
  54. package/dist/components/features/notifications/notification-category-icon.d.ts +7 -0
  55. package/dist/components/features/notifications/notification-category-icon.d.ts.map +1 -0
  56. package/dist/components/features/notifications/notification-category-icon.js +26 -0
  57. package/dist/components/features/notifications/notification-tile.d.ts.map +1 -1
  58. package/dist/components/features/notifications/types.d.ts +1 -1
  59. package/dist/components/features/notifications/types.d.ts.map +1 -1
  60. package/dist/components/help-center-pages/index.cjs +124 -124
  61. package/dist/components/index.cjs +85 -81
  62. package/dist/components/meeting-scheduler/index.cjs +68 -68
  63. package/dist/components/navigation/index.cjs +22 -22
  64. package/dist/components/navigation/site-footer.d.ts.map +1 -1
  65. package/dist/components/navigation/site-footer.js +2 -12
  66. package/dist/components/onboarding-guides/index.cjs +22 -22
  67. package/dist/components/product-demo/index.cjs +30 -30
  68. package/dist/components/related-content/index.cjs +9 -9
  69. package/dist/components/social-icon-row.d.ts +6 -2
  70. package/dist/components/social-icon-row.d.ts.map +1 -1
  71. package/dist/components/social-icon-row.js +5 -6
  72. package/dist/components/tickets/index.cjs +26 -26
  73. package/dist/components/ui/index.cjs +19 -19
  74. package/dist/{devices-H6C4NMIY.cjs → devices-CAYUGD2N.cjs} +20 -20
  75. package/dist/{embeddable-chat-KUESE7P6.cjs → embeddable-chat-FYHMR66R.cjs} +91 -91
  76. package/dist/hooks/index.cjs +7 -7
  77. package/dist/index.cjs +26 -24
  78. package/dist/{knowledge-O6IBO5Y5.cjs → knowledge-OI4OPEVL.cjs} +20 -20
  79. package/dist/{logs-Y2UCF24Z.cjs → logs-B3XV2NHV.cjs} +26 -26
  80. package/dist/platform-domains.cjs +4 -0
  81. package/dist/platform-domains.d.ts +2 -0
  82. package/dist/platform-domains.d.ts.map +1 -1
  83. package/dist/platform-domains.js +4 -0
  84. package/dist/{policies-J6O3RLJT.cjs → policies-ZB4Z42DV.cjs} +23 -23
  85. package/dist/{remote-session-RVTFWSU4.cjs → remote-session-CN3G7JNR.cjs} +6 -6
  86. package/dist/{scripts-N67MM4T2.cjs → scripts-I4DNUOQC.cjs} +26 -26
  87. package/dist/{software-update-HB7F6KNG.cjs → software-update-AWH4WXOH.cjs} +23 -23
  88. package/dist/{tickets-board-2K3PBCNW.cjs → tickets-board-PLYD2NSY.cjs} +10 -10
  89. package/dist/types/marketing.d.ts +61 -216
  90. package/dist/types/marketing.d.ts.map +1 -1
  91. package/dist/utils/index.cjs +2 -2
  92. package/dist/utils/notifications.cjs +55 -0
  93. package/dist/utils/notifications.d.ts +29 -0
  94. package/dist/utils/notifications.d.ts.map +1 -0
  95. package/dist/utils/notifications.js +53 -0
  96. package/dist/utils/social-platforms.d.ts +9 -9
  97. package/dist/utils/social-platforms.d.ts.map +1 -1
  98. package/package.json +7 -1
  99. package/src/components/chat/utils/icon-registry.ts +5 -5
  100. package/src/components/chat/utils/index.ts +1 -1
  101. package/src/components/features/notifications/index.ts +2 -1
  102. package/src/components/features/notifications/notification-category-icon.tsx +38 -0
  103. package/src/components/features/notifications/notification-tile.tsx +2 -1
  104. package/src/components/features/notifications/types.ts +1 -2
  105. package/src/components/navigation/site-footer.tsx +2 -11
  106. package/src/components/social-icon-row.tsx +11 -10
  107. package/src/platform-domains.ts +5 -0
  108. package/src/types/marketing.ts +90 -268
  109. package/src/utils/index.ts +1 -1
  110. package/src/utils/notifications.ts +71 -0
  111. 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,CAAC;IACb,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAS1D,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAK1F;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAKxF;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAMvE,CAAC;AAYF,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,MAAM,EAAE,CAGhF;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9B,SAAS,EAAE,SAAS,wBAAwB,EAAE,GAC7C,MAAM,GAAG,IAAI,CASf;AAED;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG;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"}
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,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAS1D,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAK1F;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAKxF;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAMvE,CAAC;AAYF,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,MAAM,EAAE,CAGhF;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9B,SAAS,EAAE,SAAS,wBAAwB,EAAE,GAC7C,MAAM,GAAG,IAAI,CASf;AAED;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG;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.830",
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",
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * - `chat_admin_slash_commands.icon_name` — kebab-case (`'rocket'`,
9
9
  * `'hubspot'`, `'github'`, `'dollar-sign'`).
10
- * - `social_platforms.icon_name` — PascalCase component names
10
+ * - `channel_platforms.icon_name` — PascalCase component names
11
11
  * (`'LinkedInIcon'`, `'XLogo'`, `'YouTubeIcon'`, `'Github'`).
12
12
  *
13
13
  * The registry stores entries under kebab-case keys (URL/DB-friendly,
@@ -53,7 +53,7 @@ export const ICON_REGISTRY: Readonly<Record<string, IconRef>> = {
53
53
  'facebook-lucide': lucide('facebook'),
54
54
  'file-text': lucide('file-text'),
55
55
  // `'github-lucide'` is the lucide outline glyph (used by
56
- // `social_platforms.icon_name='Github'`); `'github'` is the brand icon
56
+ // `channel_platforms.icon_name='Github'`); `'github'` is the brand icon
57
57
  // (used by `chat_admin_slash_commands.icon_name='github'`).
58
58
  github: fromSet('GithubClassicIcon'),
59
59
  'github-lucide': lucide('github'),
@@ -115,7 +115,7 @@ const fallbackIcon = (name: string): IconComponent => lucideIcon(name) as IconCo
115
115
 
116
116
  /**
117
117
  * PascalCase → kebab-case alias table for DB columns that store icon
118
- * names as component identifiers (currently `social_platforms.icon_name`).
118
+ * names as component identifiers (currently `channel_platforms.icon_name`).
119
119
  * Keep these in sync with the actual rows in those tables.
120
120
  */
121
121
  const PASCAL_TO_KEBAB_ALIASES: Record<string, string> = {
@@ -164,7 +164,7 @@ const PASCAL_TO_KEBAB_ALIASES: Record<string, string> = {
164
164
  ClickUpIcon: 'clickup',
165
165
  HubspotIcon: 'hubspot',
166
166
  LinkedInIcon: 'linkedin',
167
- // `social_platforms.icon_name` stores the names these marks were first exported under.
167
+ // `channel_platforms.icon_name` stores the names these marks were first exported under.
168
168
  FacebookIcon: 'facebook',
169
169
  InstagramIcon: 'instagram',
170
170
  FacebookClassicIcon: 'facebook',
@@ -179,7 +179,7 @@ const PASCAL_TO_KEBAB_ALIASES: Record<string, string> = {
179
179
 
180
180
  /**
181
181
  * Normalize an icon key to the registry's canonical kebab-case form.
182
- * Accepts PascalCase variants (from `social_platforms.icon_name`-style
182
+ * Accepts PascalCase variants (from `channel_platforms.icon_name`-style
183
183
  * columns) and passes kebab-case keys through unchanged.
184
184
  */
185
185
  export function normalizeIconKey(key: string): string {
@@ -154,7 +154,7 @@ export {
154
154
  // the SINGLE source of truth for all icon-name → React-component lookup
155
155
  // across the lib + the hub — kebab-case keys, with PascalCase aliases
156
156
  // routed through `normalizeIconKey()` for DB columns that store
157
- // component-style names (e.g. social_platforms.icon_name).
157
+ // component-style names (e.g. channel_platforms.icon_name).
158
158
  export {
159
159
  ICON_REGISTRY,
160
160
  getIconComponent,
@@ -3,6 +3,7 @@ export type { NotificationsProviderProps, NotificationsActions } from './notific
3
3
  export { NotificationDrawer } from './notification-drawer';
4
4
  export type { NotificationDrawerProps } from './notification-drawer';
5
5
  export { NotificationTile } from './notification-tile';
6
+ export { notificationCategoryIcon } from './notification-category-icon';
6
7
  export type { NotificationTileProps } from './notification-tile';
7
8
  export { NotificationPopups } from './notification-popups';
8
9
  export type { NotificationPopupsProps, NotificationPopupsPosition } from './notification-popups';
@@ -20,9 +21,9 @@ export {
20
21
  export type {
21
22
  Notification,
22
23
  NotificationVariant,
23
- NotificationSeverity,
24
24
  AddNotificationInput,
25
25
  ApprovalNotificationMeta,
26
26
  ApprovalToolCallMeta,
27
27
  RenderNotificationTile,
28
28
  } from './types';
29
+ export type { NotificationCategory, NotificationSeverity } from '../../../utils/notifications';
@@ -0,0 +1,38 @@
1
+ import type { ReactNode } from 'react';
2
+ import { AgentMark } from '../../agent-mark';
3
+ import { NamedIcon, type IconRef } from '../../chat/utils/icon-loading';
4
+
5
+ /**
6
+ * Backend `NotificationCategory` → icon, the icon of the dashboard section the
7
+ * notification belongs to (the app navigation's own). A table of icon NAMES: an
8
+ * icon is loaded when a notification of its category is drawn. GENERIC,
9
+ * INTEGRATIONS and unknown categories have none (the tile draws its severity
10
+ * dot). Every icon takes the host's text colour, so a row of them is one colour.
11
+ */
12
+ const ICON_BY_CATEGORY: Readonly<Record<string, IconRef>> = {
13
+ DASHBOARD: { set: 'ChartDonutIcon' },
14
+ CUSTOMERS: { set: 'IdCardIcon' },
15
+ DEVICES: { set: 'MonitorIcon' },
16
+ SCRIPTS: { set: 'BracketCurlyIcon' },
17
+ MONITORING: { set: 'RadarIcon' },
18
+ SOFTWARE: { set: 'PackageIcon' },
19
+ LOGS: { set: 'ClipboardListIcon' },
20
+ TICKETS: { set: 'TagIcon' },
21
+ INSIGHTS: { set: 'AlertTriangleIcon' },
22
+ };
23
+
24
+ /** The category whose notifications carry the assistant's own mark, drawn from its identity. */
25
+ const ASSISTANT_CATEGORY = 'MINGO';
26
+
27
+ /**
28
+ * The icon a notification of this category shows in its tile's header, or
29
+ * `undefined` when the category has none. Pass it as `Notification.icon`.
30
+ */
31
+ export function notificationCategoryIcon(category: string | null | undefined): ReactNode | undefined {
32
+ const key = category?.toUpperCase();
33
+ if (!key) return undefined;
34
+ if (key === ASSISTANT_CATEGORY) return <AgentMark agent="mingo" className="size-4" color="currentColor" />;
35
+ // A table's own entry only: a backend string never resolves to `Object.prototype` (`constructor`, `toString`).
36
+ const icon = Object.prototype.hasOwnProperty.call(ICON_BY_CATEGORY, key) ? ICON_BY_CATEGORY[key] : undefined;
37
+ return icon ? <NamedIcon icon={icon} size={16} /> : undefined;
38
+ }
@@ -6,13 +6,14 @@ import { ICON_SIZE } from '../../../styles/component-sizes';
6
6
  import { IMAGE_FIXED_PX } from '../../../styles/image-sizes';
7
7
  import { cn } from '../../../utils/cn';
8
8
  import { formatTicketRelativeTime } from '../../../utils/date-utils';
9
+ import type { NotificationSeverity } from '../../../utils/notifications';
9
10
  import { CheckCircleIcon } from '../../icons-v2-generated/signs-and-symbols/check-circle-icon';
10
11
  import { XmarkIcon } from '../../icons-v2-generated/signs-and-symbols/xmark-icon';
11
12
  import { InteractiveSkeleton, TextLineSkeleton, UnifiedSkeleton } from '../../loading/unified-skeleton';
12
13
  import { Button } from '../../ui/button';
13
14
  import { useLoadingScope } from '../../ui/loading-scope';
14
15
  import { dotColorByVariant, progressColorByVariant as toastProgressColorByVariant } from '../../ui/toaster';
15
- import type { Notification, NotificationSeverity, NotificationVariant } from './types';
16
+ import type { Notification, NotificationVariant } from './types';
16
17
 
17
18
  /** Backend severity → tile color variant; overrides `notification.variant` when present. */
18
19
  const variantBySeverity: Record<NotificationSeverity, NotificationVariant> = {
@@ -1,10 +1,9 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { NotificationSeverity } from '../../../utils/notifications';
2
3
  import { APPROVAL_STATUS, type ApprovalBatchData, type ChatApprovalStatus } from '../../chat/types';
3
4
 
4
5
  export type NotificationVariant = 'default' | 'success' | 'warning' | 'error' | 'info';
5
6
 
6
- export type NotificationSeverity = 'INFO' | 'SUCCESS' | 'WARNING' | 'DANGER';
7
-
8
7
  export interface Notification {
9
8
  id: string;
10
9
  variant?: NotificationVariant;
@@ -5,7 +5,7 @@ import { useState } from 'react';
5
5
  import type { NavGroup, SiteNav } from '../../types/navigation';
6
6
  import { cn } from '../../utils/cn';
7
7
  import { Chevron02DownIcon } from '../icons-v2-generated/arrows/chevron-02-down-icon';
8
- import { SocialIconRow } from '../social-icon-row';
8
+ import { SocialIconRow, siteNavSocialLinks } from '../social-icon-row';
9
9
  import { Button } from '../ui/button';
10
10
  import { NavItemRow } from './nav-item-row';
11
11
  import { defaultRenderSiteNavLink, NAV_FOCUS_CLASS, navLinkLabel, type SiteNavLinkRenderer } from './site-nav-link';
@@ -157,16 +157,7 @@ export function SiteFooter({
157
157
  const accordion = columns.length > ACCORDION_OVER;
158
158
  const socialRow =
159
159
  social ??
160
- (nav.brand.social.length > 0 ? (
161
- <SocialIconRow
162
- compact
163
- links={nav.brand.social.map(link => ({
164
- platform: link.iconName ?? link.id,
165
- href: link.href,
166
- label: link.label,
167
- }))}
168
- />
169
- ) : null);
160
+ (nav.brand.social.length > 0 ? <SocialIconRow compact links={siteNavSocialLinks(nav.brand.social)} /> : null);
170
161
 
171
162
  return (
172
163
  <footer
@@ -1,13 +1,15 @@
1
1
  'use client';
2
2
 
3
3
  import { createElement } from 'react';
4
+ import type { NavLink } from '../types/navigation';
4
5
  import { normalizeSocialPlatform, type SocialIconLink } from '../utils/social-platforms';
5
6
  import { iconOf, type IconComponent, type IconRef } from './chat/utils/icon-loading';
6
7
  import { Button } from './ui/button';
7
8
 
8
9
  interface SocialIconRowProps {
9
10
  className?: string;
10
- links?: SocialIconLink[];
11
+ /** The links to draw: a person's profiles, or a site's own (`siteNavSocialLinks`). */
12
+ links: SocialIconLink[];
11
13
  variant?: 'accent' | 'outline' | 'transparent' | 'destructive' | null | undefined;
12
14
  /** Quiet metadata row for page-level identity/share slots: 32px ghost
13
15
  * icon buttons (size="icon-sm", 16px glyphs), gap-2, w-fit container,
@@ -22,16 +24,15 @@ interface SocialIconRowProps {
22
24
  groupByVisibility?: boolean;
23
25
  /**
24
26
  * The links are a read list (a person's profiles, whose number is the data's): every button carries
25
- * `data-loading-item`, as the caller's loading state's buttons do. Default false (a fixed set, e.g. the defaults).
27
+ * `data-loading-item`, as the caller's loading state's buttons do. Default false (a fixed set, e.g. a site's own).
26
28
  */
27
29
  listItems?: boolean;
28
30
  }
29
31
 
30
- const defaultLinks: SocialIconLink[] = [
31
- { platform: 'github', href: 'https://github.com/flamingo-stack', label: 'GitHub' },
32
- { platform: 'linkedin', href: 'https://linkedin.com/company/flamingo.run', label: 'LinkedIn' },
33
- { platform: 'facebook', href: 'https://www.facebook.com/flamingoai.msp', label: 'Facebook' },
34
- ];
32
+ /** A site's social links as a row draws them: the `brand.social` links of its navigation (the header and the footer read the same list). */
33
+ export function siteNavSocialLinks(social: readonly NavLink[]): SocialIconLink[] {
34
+ return social.map(link => ({ platform: link.iconName ?? link.id, href: link.href, label: link.label }));
35
+ }
35
36
 
36
37
  /** The colour a social mark is drawn in: the themed foreground, so a row reads as one set. */
37
38
  const MARK = 'var(--color-text-primary)';
@@ -40,10 +41,10 @@ const MARK = 'var(--color-text-primary)';
40
41
  * Platform name → the icon it draws, as DATA: the icon is loaded when a link to
41
42
  * that platform is drawn, so a row fetches only the marks of its own links. The
42
43
  * ONLY thing about a social platform that lives in code; the DB names the glyph
43
- * it wants through `social_platforms.icon_name`.
44
+ * it wants through `channel_platforms.icon_name`.
44
45
  *
45
46
  * Deliberately an OPEN record, not `satisfies Record<SomeUnion, …>`: the set of
46
- * platforms is the `social_platforms` table's to decide, and a row added there
47
+ * platforms is the `channel_platforms` table's to decide, and a row added there
47
48
  * must render — with the globe, until somebody adds art for it — rather than
48
49
  * fail to type-check against a list in this file.
49
50
  */
@@ -94,7 +95,7 @@ export function socialIconButtonProps(compact = false): { size: 'icon-sm' | 'ico
94
95
 
95
96
  export function SocialIconRow({
96
97
  className = '',
97
- links = defaultLinks,
98
+ links,
98
99
  variant,
99
100
  compact = false,
100
101
  groupByVisibility = false,
@@ -297,6 +297,11 @@ export function isPreviewEnv(): boolean {
297
297
  return process.env.VERCEL_ENV === 'preview';
298
298
  }
299
299
 
300
+ /** Env-form production predicate (Vercel `VERCEL_ENV`): the production deployment, not a preview, not a local run. */
301
+ export function isProductionEnv(env: Record<string, string | undefined> = process.env): boolean {
302
+ return env.VERCEL_ENV === 'production';
303
+ }
304
+
300
305
  /** Host-form preview predicate (a `*.vercel.app` host). Dot-bounded suffix so a
301
306
  * malicious `foo.vercel.app.evil.com` is NOT treated as preview. */
302
307
  export function isPreviewHost(hostname: string): boolean {