@flamingo-stack/openframe-frontend-core 0.0.735 → 0.0.737

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 (118) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/{chunk-F7STMHT7.cjs → chunk-4FJZ7RJD.cjs} +66 -66
  3. package/dist/{chunk-SZRZBCWC.cjs → chunk-4ISP3XP4.cjs} +75 -69
  4. package/dist/{chunk-EQ7OOK4B.cjs → chunk-4RMLAHU2.cjs} +24 -16
  5. package/dist/{chunk-XKB7YGQM.cjs → chunk-77SD7RXY.cjs} +18 -6
  6. package/dist/{chunk-NVCSVGNI.cjs → chunk-CM35DLKS.cjs} +33 -33
  7. package/dist/{chunk-T323E2Y6.cjs → chunk-DA4VS6TS.cjs} +4 -4
  8. package/dist/{chunk-36CCUJOE.cjs → chunk-E2JCZU36.cjs} +313 -313
  9. package/dist/{chunk-RH3AKULV.cjs → chunk-EJOXXJJB.cjs} +56 -4
  10. package/dist/{chunk-SHQZN5LF.cjs → chunk-EX2GYIGW.cjs} +6 -6
  11. package/dist/{chunk-EQH7BUNS.cjs → chunk-FA2LATDM.cjs} +4 -4
  12. package/dist/{chunk-3JP2OVH3.cjs → chunk-KVGBDWYV.cjs} +30 -30
  13. package/dist/{chunk-HBUUCLQM.cjs → chunk-L535OD7V.cjs} +2 -2
  14. package/dist/{chunk-3X4N3IT7.cjs → chunk-LW3QSP47.cjs} +16 -16
  15. package/dist/{chunk-OXJ57643.cjs → chunk-MGW5DO6P.cjs} +76 -17
  16. package/dist/{chunk-4F7V2MAC.cjs → chunk-N6YOOGCD.cjs} +14 -14
  17. package/dist/chunk-O4MG7FXW.cjs +57 -0
  18. package/dist/{chunk-TUMUT7CV.cjs → chunk-SGVQO5J6.cjs} +11 -11
  19. package/dist/{chunk-MRVZ56GT.cjs → chunk-TJQYX3QC.cjs} +81 -81
  20. package/dist/{chunk-7HT3VHLJ.cjs → chunk-URIJ6YUG.cjs} +43 -69
  21. package/dist/{chunk-JDXQ6T5P.cjs → chunk-VL4JKXU2.cjs} +253 -290
  22. package/dist/{chunk-HLBFTDUL.cjs → chunk-VRNNIV5Y.cjs} +2 -2
  23. package/dist/{chunk-W6E7XCBI.cjs → chunk-VYODTHMR.cjs} +31 -31
  24. package/dist/{chunk-3FZZPR76.cjs → chunk-XLSVQJBA.cjs} +44 -44
  25. package/dist/{chunk-6TTAILSV.cjs → chunk-XPP7VCNY.cjs} +3 -3
  26. package/dist/{cloud-tenants-H5D57P4U.cjs → cloud-tenants-IWQ5FFLY.cjs} +7 -7
  27. package/dist/components/case-studies/index.cjs +19 -19
  28. package/dist/components/chat/entity-cards/index.d.ts +1 -0
  29. package/dist/components/chat/entity-cards/index.d.ts.map +1 -1
  30. package/dist/components/chat/entity-cards/index.js +2 -0
  31. package/dist/components/chat/hooks/use-ask-prompts.d.ts +1 -1
  32. package/dist/components/chat/hooks/use-ask-prompts.js +1 -1
  33. package/dist/components/chat/index.cjs +10 -8
  34. package/dist/components/chat/mingo-info-card.d.ts +17 -1
  35. package/dist/components/chat/mingo-info-card.d.ts.map +1 -1
  36. package/dist/components/chat/mingo-info-card.js +15 -3
  37. package/dist/components/contact/index.cjs +8 -8
  38. package/dist/components/docs/index.cjs +11 -11
  39. package/dist/components/embeds/index.cjs +8 -8
  40. package/dist/components/faq/faq-ask-card.d.ts +5 -4
  41. package/dist/components/faq/faq-ask-card.d.ts.map +1 -1
  42. package/dist/components/faq/faq-document-page.d.ts +3 -1
  43. package/dist/components/faq/faq-document-page.d.ts.map +1 -1
  44. package/dist/components/faq/faq-document-page.js +2 -0
  45. package/dist/components/faq/faq-section.d.ts +37 -5
  46. package/dist/components/faq/faq-section.d.ts.map +1 -1
  47. package/dist/components/faq/faq-section.js +31 -9
  48. package/dist/components/faq/index.cjs +14 -8
  49. package/dist/components/faq/index.d.ts +1 -1
  50. package/dist/components/faq/index.d.ts.map +1 -1
  51. package/dist/components/faq/index.js +4 -2
  52. package/dist/components/features/index.cjs +7 -7
  53. package/dist/components/help-center-pages/delivery-page.d.ts +8 -1
  54. package/dist/components/help-center-pages/delivery-page.d.ts.map +1 -1
  55. package/dist/components/help-center-pages/delivery-page.js +16 -4
  56. package/dist/components/help-center-pages/download-apps-page.d.ts +8 -1
  57. package/dist/components/help-center-pages/download-apps-page.d.ts.map +1 -1
  58. package/dist/components/help-center-pages/download-apps-page.js +11 -6
  59. package/dist/components/help-center-pages/index.cjs +195 -140
  60. package/dist/components/help-center-pages/onboarding-guides-catalog-page.d.ts +8 -1
  61. package/dist/components/help-center-pages/onboarding-guides-catalog-page.d.ts.map +1 -1
  62. package/dist/components/help-center-pages/onboarding-guides-catalog-page.js +26 -14
  63. package/dist/components/help-center-pages/product-releases-list-page.d.ts +8 -1
  64. package/dist/components/help-center-pages/product-releases-list-page.d.ts.map +1 -1
  65. package/dist/components/help-center-pages/product-releases-list-page.js +24 -12
  66. package/dist/components/help-center-pages/roadmap-page.d.ts +8 -1
  67. package/dist/components/help-center-pages/roadmap-page.d.ts.map +1 -1
  68. package/dist/components/help-center-pages/roadmap-page.js +25 -13
  69. package/dist/components/index.cjs +67 -59
  70. package/dist/components/meeting-scheduler/index.cjs +29 -29
  71. package/dist/components/navigation/index.cjs +10 -10
  72. package/dist/components/onboarding-guides/index.cjs +10 -10
  73. package/dist/components/pagination.d.ts +9 -1
  74. package/dist/components/pagination.d.ts.map +1 -1
  75. package/dist/components/pagination.js +72 -17
  76. package/dist/components/product-demo/index.cjs +6 -6
  77. package/dist/components/related-content/index.cjs +5 -5
  78. package/dist/components/shared/dev-section/dev-section-page.d.ts +8 -1
  79. package/dist/components/shared/dev-section/dev-section-page.d.ts.map +1 -1
  80. package/dist/components/shared/dev-section/dev-section-page.js +8 -3
  81. package/dist/components/shared/legal-document/legal-document-page.d.ts +8 -1
  82. package/dist/components/shared/legal-document/legal-document-page.d.ts.map +1 -1
  83. package/dist/components/shared/legal-document/legal-document-page.js +4 -1
  84. package/dist/components/tickets/index.cjs +13 -12
  85. package/dist/components/ui/index.cjs +12 -10
  86. package/dist/components/unified-pagination.d.ts.map +1 -1
  87. package/dist/components/unified-pagination.js +16 -4
  88. package/dist/contexts/assistant-runtime-context.d.ts +5 -5
  89. package/dist/{devices-SQTEXY2H.cjs → devices-OUHGWA6Y.cjs} +8 -8
  90. package/dist/{embeddable-chat-S5ODWE3L.cjs → embeddable-chat-U3C4WWB7.cjs} +72 -72
  91. package/dist/index.cjs +20 -14
  92. package/dist/{knowledge-FO3TPLFO.cjs → knowledge-3ZASPWMF.cjs} +8 -8
  93. package/dist/{logs-Y4WQB2YR.cjs → logs-E6Y54P6K.cjs} +15 -15
  94. package/dist/{policies-D6VY2ODF.cjs → policies-LAV75B5B.cjs} +11 -11
  95. package/dist/{software-update-7XN6U7HC.cjs → software-update-2CAL3AMJ.cjs} +10 -10
  96. package/dist/types/faq.d.ts +17 -0
  97. package/dist/types/faq.d.ts.map +1 -1
  98. package/dist/types/faq.js +4 -0
  99. package/dist/types/index.cjs +4 -0
  100. package/package.json +1 -1
  101. package/src/components/chat/entity-cards/index.ts +1 -0
  102. package/src/components/chat/hooks/use-ask-prompts.ts +2 -2
  103. package/src/components/chat/mingo-info-card.tsx +39 -4
  104. package/src/components/faq/faq-ask-card.tsx +5 -4
  105. package/src/components/faq/faq-document-page.tsx +4 -0
  106. package/src/components/faq/faq-section.tsx +83 -14
  107. package/src/components/faq/index.ts +1 -1
  108. package/src/components/help-center-pages/delivery-page.tsx +16 -1
  109. package/src/components/help-center-pages/download-apps-page.tsx +9 -0
  110. package/src/components/help-center-pages/onboarding-guides-catalog-page.tsx +16 -1
  111. package/src/components/help-center-pages/product-releases-list-page.tsx +16 -1
  112. package/src/components/help-center-pages/roadmap-page.tsx +16 -1
  113. package/src/components/pagination.tsx +117 -21
  114. package/src/components/shared/dev-section/dev-section-page.tsx +9 -0
  115. package/src/components/shared/legal-document/legal-document-page.tsx +9 -0
  116. package/src/components/unified-pagination.tsx +23 -7
  117. package/src/contexts/assistant-runtime-context.tsx +5 -5
  118. package/src/types/faq.ts +18 -0
@@ -33,6 +33,17 @@ export function UnifiedPagination({
33
33
  const searchParams = useSearchParams();
34
34
  const pathname = usePathname();
35
35
 
36
+ /**
37
+ * The address of a page of this list: the current URL with `page` set. Page 1
38
+ * is the list's own address (no `page`), so the first page has one URL.
39
+ */
40
+ const pageHref = (page: number) => {
41
+ const params = new URLSearchParams(searchParams.toString());
42
+ if (page <= 1) params.delete('page');
43
+ else params.set('page', page.toString());
44
+ return withQuery(pathname, params.toString());
45
+ };
46
+
36
47
  const handlePageChange = (page: number) => {
37
48
  // Preserve current scroll position
38
49
  const currentScrollY = window.scrollY;
@@ -42,13 +53,12 @@ export function UnifiedPagination({
42
53
  onPageChange(page);
43
54
  }
44
55
 
45
- // Update URL for bookmarking without navigation — unless the caller owns
46
- // the URL (`syncUrl={false}`), in which case a second writer here would
47
- // race the caller's own param write.
56
+ // Update the address bar in place (a bookmark, a shared link), unless the
57
+ // caller owns the URL (`syncUrl={false}`): a second writer here would race
58
+ // the caller's own param write. The address is the one the page's link
59
+ // carries (`pageHref`), so a click and a new-tab open land on the same URL.
48
60
  if (syncUrl) {
49
- const params = new URLSearchParams(searchParams.toString());
50
- params.set('page', page.toString());
51
- window.history.replaceState(null, '', withQuery(pathname, params.toString()));
61
+ window.history.replaceState(null, '', pageHref(page));
52
62
  }
53
63
 
54
64
  // Restore scroll position after a brief delay to allow content to render
@@ -79,7 +89,13 @@ export function UnifiedPagination({
79
89
 
80
90
  return (
81
91
  <div className={className}>
82
- <Pagination currentPage={currentPage} totalPages={totalPages} onPageChange={handlePageChange} />
92
+ {/* Real links only while this component owns `?page=`: a caller that owns the URL names its own parameter. */}
93
+ <Pagination
94
+ currentPage={currentPage}
95
+ totalPages={totalPages}
96
+ onPageChange={handlePageChange}
97
+ getPageHref={syncUrl ? pageHref : undefined}
98
+ />
83
99
  </div>
84
100
  );
85
101
  }
@@ -56,11 +56,11 @@ export interface AssistantRuntime {
56
56
  source?: string;
57
57
  /**
58
58
  * GET endpoint the questions are read from:
59
- * `<url>?count=<n>&section=<topic>&exclude=<id,id>` → `{ prompts: AskPrompt[] }`
60
- * `section` is ANY string: the host decides what topics exist (the hub: the
61
- * `section` attribute of a quick action, set in chat config), so a new topic
62
- * needs no change here. Hub: '/api/quick-actions/questions'. Absent: an "ask"
63
- * surface shows its launcher with no questions.
59
+ * `<url>?count=<n>&topic=<topic>&exclude=<id,id>` → `{ prompts: AskPrompt[] }`
60
+ * `topic` is ANY string: the host decides what topics exist (the hub: the
61
+ * topics of its FAQs, set in the FAQ admin), so a new topic needs no change
62
+ * here. Hub: '/api/faqs/questions'. Absent: an "ask" surface shows its
63
+ * launcher with no questions.
64
64
  */
65
65
  askPromptsUrl?: string;
66
66
  /**
package/src/types/faq.ts CHANGED
@@ -1,8 +1,26 @@
1
+ /**
2
+ * The two kinds of FAQ. An `answer` is a question with its written answer (the
3
+ * accordion, FAQPage JSON-LD). An `ask` is a question the assistant answers: it
4
+ * has a `prompt` (what is sent to the chat) and no written answer, and is what
5
+ * every "ask the assistant" surface offers.
6
+ */
7
+ export const FAQ_KINDS = ['answer', 'ask'] as const;
8
+ export type FaqKind = (typeof FAQ_KINDS)[number];
9
+
1
10
  export interface Faq {
2
11
  id: number;
3
12
  question: string;
4
13
  answer: string;
5
14
  section?: string | null;
15
+ /** Absent on a host that predates kinds: an `answer`. */
16
+ kind?: FaqKind;
17
+ /** An `ask` FAQ's prompt for the chat; null on an `answer`. */
18
+ prompt?: string | null;
19
+ /**
20
+ * The places the FAQ is written for, shared by both kinds: a page's topic
21
+ * (`pricing`, `careers`, `home`) or a section's. Empty: written for no place.
22
+ */
23
+ topics?: string[];
6
24
  display_order: number;
7
25
  is_active: boolean;
8
26
  created_at: string;