@flamingo-stack/openframe-frontend-core 0.0.598 → 0.0.599-2039.5717.1

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 (206) hide show
  1. package/dist/chat-protocol/index.cjs +8 -1
  2. package/dist/chat-protocol/index.cjs.map +1 -1
  3. package/dist/chat-protocol/index.d.ts +1 -0
  4. package/dist/chat-protocol/index.d.ts.map +1 -1
  5. package/dist/chat-protocol/index.js +7 -2
  6. package/dist/chat-protocol/index.js.map +1 -1
  7. package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
  8. package/dist/chat-protocol/wire-narrow.d.ts +17 -0
  9. package/dist/chat-protocol/wire-narrow.d.ts.map +1 -0
  10. package/dist/{chunk-BK6CCQG6.js → chunk-2R6F56U5.js} +12 -12
  11. package/dist/{chunk-STYNZ4QM.cjs → chunk-3IXDZI3R.cjs} +3 -3
  12. package/dist/{chunk-STYNZ4QM.cjs.map → chunk-3IXDZI3R.cjs.map} +1 -1
  13. package/dist/{chunk-QIKBISZM.cjs → chunk-4ZAQSPCQ.cjs} +242 -242
  14. package/dist/{chunk-QIKBISZM.cjs.map → chunk-4ZAQSPCQ.cjs.map} +1 -1
  15. package/dist/{chunk-JVZVVZOZ.cjs → chunk-5DORSDXA.cjs} +9 -9
  16. package/dist/{chunk-JVZVVZOZ.cjs.map → chunk-5DORSDXA.cjs.map} +1 -1
  17. package/dist/{chunk-YWBAIFI2.cjs → chunk-6D4DUONA.cjs} +105 -105
  18. package/dist/{chunk-YWBAIFI2.cjs.map → chunk-6D4DUONA.cjs.map} +1 -1
  19. package/dist/{chunk-KHOZ52NR.js → chunk-7654NDQB.js} +6 -6
  20. package/dist/{chunk-DI3SVVY5.cjs → chunk-AC5SWE3S.cjs} +85 -85
  21. package/dist/{chunk-DI3SVVY5.cjs.map → chunk-AC5SWE3S.cjs.map} +1 -1
  22. package/dist/{chunk-R4UV366K.js → chunk-AJU3NYAA.js} +6 -6
  23. package/dist/{chunk-GHYFVT52.js → chunk-B23ID4DM.js} +5 -5
  24. package/dist/{chunk-SE3PVN64.js → chunk-B6HSRLC5.js} +2 -2
  25. package/dist/{chunk-EVMHJB6X.js → chunk-BLUL2TE3.js} +4 -4
  26. package/dist/{chunk-GGQZBSFN.js → chunk-BVQEU5JB.js} +2 -2
  27. package/dist/{chunk-75YW6ET4.js → chunk-C4APMQWW.js} +4 -4
  28. package/dist/{chunk-H64ZHSYR.cjs → chunk-CCWI3622.cjs} +4 -4
  29. package/dist/{chunk-H64ZHSYR.cjs.map → chunk-CCWI3622.cjs.map} +1 -1
  30. package/dist/{chunk-WPN545FW.js → chunk-CVYVYSP2.js} +12 -12
  31. package/dist/{chunk-YH6IQTPI.cjs → chunk-EHAYNUOL.cjs} +3 -3
  32. package/dist/{chunk-YH6IQTPI.cjs.map → chunk-EHAYNUOL.cjs.map} +1 -1
  33. package/dist/{chunk-VIRTMRS4.js → chunk-EZOI5UR3.js} +7 -7
  34. package/dist/{chunk-WZJOILPU.js → chunk-F2KBCLUG.js} +2 -2
  35. package/dist/{chunk-MYBXCWEI.js → chunk-FKBM6U43.js} +2 -2
  36. package/dist/{chunk-2SYX2Z7R.cjs → chunk-GIG3WQTF.cjs} +34 -34
  37. package/dist/{chunk-2SYX2Z7R.cjs.map → chunk-GIG3WQTF.cjs.map} +1 -1
  38. package/dist/{chunk-LRQCKSZC.js → chunk-IW746HJ7.js} +2 -2
  39. package/dist/{chunk-YBPFIXV4.cjs → chunk-IYEKAU4X.cjs} +801 -482
  40. package/dist/chunk-IYEKAU4X.cjs.map +1 -0
  41. package/dist/{chunk-VLJTJAHJ.cjs → chunk-J3ODLFCA.cjs} +25 -25
  42. package/dist/{chunk-VLJTJAHJ.cjs.map → chunk-J3ODLFCA.cjs.map} +1 -1
  43. package/dist/{chunk-UE7OFLLS.cjs → chunk-J4RRF2EP.cjs} +14 -14
  44. package/dist/{chunk-UE7OFLLS.cjs.map → chunk-J4RRF2EP.cjs.map} +1 -1
  45. package/dist/{chunk-M4YQUHOR.cjs → chunk-JJUV7Z4L.cjs} +15 -15
  46. package/dist/{chunk-M4YQUHOR.cjs.map → chunk-JJUV7Z4L.cjs.map} +1 -1
  47. package/dist/{chunk-UG7JNQZY.cjs → chunk-JKFWKPHW.cjs} +37 -37
  48. package/dist/{chunk-UG7JNQZY.cjs.map → chunk-JKFWKPHW.cjs.map} +1 -1
  49. package/dist/{chunk-3WSS7C2V.cjs → chunk-KAHI4QWA.cjs} +15 -15
  50. package/dist/{chunk-3WSS7C2V.cjs.map → chunk-KAHI4QWA.cjs.map} +1 -1
  51. package/dist/{chunk-VNSRNVPD.js → chunk-KJ5EQ6P6.js} +728 -409
  52. package/dist/chunk-KJ5EQ6P6.js.map +1 -0
  53. package/dist/{chunk-V2QK5W3O.cjs → chunk-L64FTMML.cjs} +3 -3
  54. package/dist/{chunk-V2QK5W3O.cjs.map → chunk-L64FTMML.cjs.map} +1 -1
  55. package/dist/{chunk-P24VPJTT.cjs → chunk-LT6GIGMZ.cjs} +15 -15
  56. package/dist/{chunk-P24VPJTT.cjs.map → chunk-LT6GIGMZ.cjs.map} +1 -1
  57. package/dist/{chunk-WDWCQD75.js → chunk-LVVDTK5X.js} +9 -9
  58. package/dist/{chunk-HWAYIK4U.cjs → chunk-MSPYY2F4.cjs} +22 -22
  59. package/dist/{chunk-HWAYIK4U.cjs.map → chunk-MSPYY2F4.cjs.map} +1 -1
  60. package/dist/{chunk-QD64Q4I2.cjs → chunk-N7LOLURS.cjs} +9 -9
  61. package/dist/{chunk-QD64Q4I2.cjs.map → chunk-N7LOLURS.cjs.map} +1 -1
  62. package/dist/{chunk-TZPVRWPU.js → chunk-O33JVUR5.js} +5 -5
  63. package/dist/{chunk-HLPAVYK7.js → chunk-ODPN724R.js} +4 -4
  64. package/dist/{chunk-NIAMPMKV.js → chunk-OQNKAF4F.js} +4 -4
  65. package/dist/{chunk-SAEJGTCI.cjs → chunk-QPAPUIF3.cjs} +35 -35
  66. package/dist/{chunk-SAEJGTCI.cjs.map → chunk-QPAPUIF3.cjs.map} +1 -1
  67. package/dist/{chunk-BPVHDDNY.cjs → chunk-R2VBMBPJ.cjs} +8 -8
  68. package/dist/{chunk-BPVHDDNY.cjs.map → chunk-R2VBMBPJ.cjs.map} +1 -1
  69. package/dist/{chunk-UAAXUFK6.js → chunk-RU3IKVY2.js} +3 -3
  70. package/dist/{chunk-EZM5DNII.js → chunk-S6WBBSII.js} +3 -3
  71. package/dist/{chunk-2JNCZDJR.js → chunk-TSCIVH7T.js} +2 -2
  72. package/dist/{chunk-PX4IPM7Q.js → chunk-TYY6HOTI.js} +3 -3
  73. package/dist/{chunk-RDTOMWDN.cjs → chunk-UPKZU6QU.cjs} +1 -1
  74. package/dist/chunk-UPKZU6QU.cjs.map +1 -0
  75. package/dist/{chunk-WCBRZCU4.cjs → chunk-UQEOAPAI.cjs} +9 -9
  76. package/dist/{chunk-WCBRZCU4.cjs.map → chunk-UQEOAPAI.cjs.map} +1 -1
  77. package/dist/{chunk-O4VZOA2Q.cjs → chunk-UXOOVP77.cjs} +3 -3
  78. package/dist/{chunk-O4VZOA2Q.cjs.map → chunk-UXOOVP77.cjs.map} +1 -1
  79. package/dist/{chunk-PTK3CINU.js → chunk-VELZVF3F.js} +5 -5
  80. package/dist/{chunk-BZEWPW5A.cjs → chunk-VIBREYUK.cjs} +3 -3
  81. package/dist/{chunk-BZEWPW5A.cjs.map → chunk-VIBREYUK.cjs.map} +1 -1
  82. package/dist/{chunk-RYXIRVDC.js → chunk-YB6FI2G3.js} +1 -1
  83. package/dist/chunk-YB6FI2G3.js.map +1 -0
  84. package/dist/{chunk-DAPOBLAK.cjs → chunk-YEO6W4CT.cjs} +39 -39
  85. package/dist/{chunk-DAPOBLAK.cjs.map → chunk-YEO6W4CT.cjs.map} +1 -1
  86. package/dist/{chunk-XNPAVMPB.js → chunk-YUELNVD5.js} +5 -5
  87. package/dist/components/case-studies/index.cjs +14 -14
  88. package/dist/components/case-studies/index.js +8 -8
  89. package/dist/components/chat/embeddable-chat.d.ts +10 -19
  90. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  91. package/dist/components/chat/hooks/index.d.ts +1 -0
  92. package/dist/components/chat/hooks/index.d.ts.map +1 -1
  93. package/dist/components/chat/hooks/use-chat-history-hydration.d.ts +13 -3
  94. package/dist/components/chat/hooks/use-chat-history-hydration.d.ts.map +1 -1
  95. package/dist/components/chat/hooks/use-managed-dialog-list.d.ts +53 -0
  96. package/dist/components/chat/hooks/use-managed-dialog-list.d.ts.map +1 -0
  97. package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts +2 -16
  98. package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
  99. package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts.map +1 -1
  100. package/dist/components/chat/hooks/use-unified-chat.d.ts +12 -1
  101. package/dist/components/chat/hooks/use-unified-chat.d.ts.map +1 -1
  102. package/dist/components/chat/index.cjs +11 -5
  103. package/dist/components/chat/index.cjs.map +1 -1
  104. package/dist/components/chat/index.js +10 -4
  105. package/dist/components/chat/types/unified-chat-state.types.d.ts +86 -6
  106. package/dist/components/chat/types/unified-chat-state.types.d.ts.map +1 -1
  107. package/dist/components/chat/utils/chat-conversations-api.d.ts +29 -0
  108. package/dist/components/chat/utils/chat-conversations-api.d.ts.map +1 -0
  109. package/dist/components/chat/utils/index.d.ts +1 -0
  110. package/dist/components/chat/utils/index.d.ts.map +1 -1
  111. package/dist/components/contact/index.cjs +9 -9
  112. package/dist/components/contact/index.js +8 -8
  113. package/dist/components/docs/index.cjs +12 -12
  114. package/dist/components/docs/index.js +11 -11
  115. package/dist/components/embeds/index.cjs +9 -9
  116. package/dist/components/embeds/index.js +8 -8
  117. package/dist/components/faq/index.cjs +10 -10
  118. package/dist/components/faq/index.js +9 -9
  119. package/dist/components/features/index.cjs +8 -8
  120. package/dist/components/features/index.js +7 -7
  121. package/dist/components/help-center-pages/index.cjs +31 -31
  122. package/dist/components/help-center-pages/index.js +22 -22
  123. package/dist/components/index.cjs +72 -66
  124. package/dist/components/index.cjs.map +1 -1
  125. package/dist/components/index.js +28 -22
  126. package/dist/components/index.js.map +1 -1
  127. package/dist/components/meeting-scheduler/index.cjs +49 -49
  128. package/dist/components/meeting-scheduler/index.js +9 -9
  129. package/dist/components/navigation/index.cjs +11 -11
  130. package/dist/components/navigation/index.js +10 -10
  131. package/dist/components/onboarding-guides/index.cjs +12 -12
  132. package/dist/components/onboarding-guides/index.js +11 -11
  133. package/dist/components/related-content/index.cjs +7 -7
  134. package/dist/components/related-content/index.js +6 -6
  135. package/dist/components/tickets/index.cjs +13 -13
  136. package/dist/components/tickets/index.js +12 -12
  137. package/dist/components/ui/index.cjs +14 -8
  138. package/dist/components/ui/index.cjs.map +1 -1
  139. package/dist/components/ui/index.js +13 -7
  140. package/dist/contexts/chat-runtime-context.d.ts +12 -0
  141. package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
  142. package/dist/contexts/index.cjs +2 -2
  143. package/dist/contexts/index.js +1 -1
  144. package/dist/hooks/index.cjs +5 -5
  145. package/dist/hooks/index.js +4 -4
  146. package/dist/index.cjs +18 -12
  147. package/dist/index.cjs.map +1 -1
  148. package/dist/index.js +17 -11
  149. package/dist/index.js.map +1 -1
  150. package/package.json +1 -1
  151. package/src/chat-protocol/index.ts +1 -0
  152. package/src/chat-protocol/nats-decoder.ts +1 -5
  153. package/src/chat-protocol/wire-narrow.ts +22 -0
  154. package/src/components/chat/.embeddable-chat.md +4 -2
  155. package/src/components/chat/embeddable-chat.tsx +131 -87
  156. package/src/components/chat/hooks/.index.md +1 -1
  157. package/src/components/chat/hooks/.use-managed-dialog-list.md +31 -0
  158. package/src/components/chat/hooks/.use-nats-chat-adapter.md +3 -1
  159. package/src/components/chat/hooks/.use-sse-chat-adapter.md +8 -1
  160. package/src/components/chat/hooks/.use-unified-chat.md +2 -2
  161. package/src/components/chat/hooks/__tests__/managed-dialog-list.test.ts +280 -0
  162. package/src/components/chat/hooks/__tests__/nats-adapter-managed-dialogs.test.ts +193 -0
  163. package/src/components/chat/hooks/__tests__/sse-managed-dialogs.test.ts +310 -0
  164. package/src/components/chat/hooks/__tests__/unified-chat-dialog-capabilities.test.ts +129 -0
  165. package/src/components/chat/hooks/index.ts +2 -0
  166. package/src/components/chat/hooks/use-chat-history-hydration.ts +67 -24
  167. package/src/components/chat/hooks/use-managed-dialog-list.ts +339 -0
  168. package/src/components/chat/hooks/use-nats-chat-adapter.ts +64 -150
  169. package/src/components/chat/hooks/use-sse-chat-adapter.ts +238 -59
  170. package/src/components/chat/hooks/use-unified-chat.ts +26 -2
  171. package/src/components/chat/types/.unified-chat-state.types.md +13 -1
  172. package/src/components/chat/types/unified-chat-state.types.ts +93 -6
  173. package/src/components/chat/utils/.chat-conversations-api.md +16 -0
  174. package/src/components/chat/utils/.index.md +1 -1
  175. package/src/components/chat/utils/__tests__/chat-conversations-api-golden.test.ts +105 -0
  176. package/src/components/chat/utils/chat-conversations-api.ts +83 -0
  177. package/src/components/chat/utils/index.ts +7 -0
  178. package/src/contexts/.chat-runtime-context.md +3 -1
  179. package/src/contexts/chat-runtime-context.tsx +12 -0
  180. package/dist/chunk-RDTOMWDN.cjs.map +0 -1
  181. package/dist/chunk-RYXIRVDC.js.map +0 -1
  182. package/dist/chunk-VNSRNVPD.js.map +0 -1
  183. package/dist/chunk-YBPFIXV4.cjs.map +0 -1
  184. /package/dist/{chunk-BK6CCQG6.js.map → chunk-2R6F56U5.js.map} +0 -0
  185. /package/dist/{chunk-KHOZ52NR.js.map → chunk-7654NDQB.js.map} +0 -0
  186. /package/dist/{chunk-R4UV366K.js.map → chunk-AJU3NYAA.js.map} +0 -0
  187. /package/dist/{chunk-GHYFVT52.js.map → chunk-B23ID4DM.js.map} +0 -0
  188. /package/dist/{chunk-SE3PVN64.js.map → chunk-B6HSRLC5.js.map} +0 -0
  189. /package/dist/{chunk-EVMHJB6X.js.map → chunk-BLUL2TE3.js.map} +0 -0
  190. /package/dist/{chunk-GGQZBSFN.js.map → chunk-BVQEU5JB.js.map} +0 -0
  191. /package/dist/{chunk-75YW6ET4.js.map → chunk-C4APMQWW.js.map} +0 -0
  192. /package/dist/{chunk-WPN545FW.js.map → chunk-CVYVYSP2.js.map} +0 -0
  193. /package/dist/{chunk-VIRTMRS4.js.map → chunk-EZOI5UR3.js.map} +0 -0
  194. /package/dist/{chunk-WZJOILPU.js.map → chunk-F2KBCLUG.js.map} +0 -0
  195. /package/dist/{chunk-MYBXCWEI.js.map → chunk-FKBM6U43.js.map} +0 -0
  196. /package/dist/{chunk-LRQCKSZC.js.map → chunk-IW746HJ7.js.map} +0 -0
  197. /package/dist/{chunk-WDWCQD75.js.map → chunk-LVVDTK5X.js.map} +0 -0
  198. /package/dist/{chunk-TZPVRWPU.js.map → chunk-O33JVUR5.js.map} +0 -0
  199. /package/dist/{chunk-HLPAVYK7.js.map → chunk-ODPN724R.js.map} +0 -0
  200. /package/dist/{chunk-NIAMPMKV.js.map → chunk-OQNKAF4F.js.map} +0 -0
  201. /package/dist/{chunk-UAAXUFK6.js.map → chunk-RU3IKVY2.js.map} +0 -0
  202. /package/dist/{chunk-EZM5DNII.js.map → chunk-S6WBBSII.js.map} +0 -0
  203. /package/dist/{chunk-2JNCZDJR.js.map → chunk-TSCIVH7T.js.map} +0 -0
  204. /package/dist/{chunk-PX4IPM7Q.js.map → chunk-TYY6HOTI.js.map} +0 -0
  205. /package/dist/{chunk-PTK3CINU.js.map → chunk-VELZVF3F.js.map} +0 -0
  206. /package/dist/{chunk-XNPAVMPB.js.map → chunk-YUELNVD5.js.map} +0 -0
@@ -4,7 +4,7 @@
4
4
  var _chunkN6CULJYRcjs = require('./chunk-N6CULJYR.cjs');
5
5
 
6
6
 
7
- var _chunkH64ZHSYRcjs = require('./chunk-H64ZHSYR.cjs');
7
+ var _chunkCCWI3622cjs = require('./chunk-CCWI3622.cjs');
8
8
 
9
9
 
10
10
 
@@ -164,7 +164,7 @@ function UnifiedPagination({
164
164
  if (syncUrl) {
165
165
  const params = new URLSearchParams(searchParams.toString());
166
166
  params.set("page", page.toString());
167
- window.history.replaceState(null, "", _chunkH64ZHSYRcjs.withQuery.call(void 0, pathname, params.toString()));
167
+ window.history.replaceState(null, "", _chunkCCWI3622cjs.withQuery.call(void 0, pathname, params.toString()));
168
168
  }
169
169
  setTimeout(() => {
170
170
  window.scrollTo({
@@ -185,4 +185,4 @@ function UnifiedPagination({
185
185
 
186
186
 
187
187
  exports.EmptyState = EmptyState; exports.UnifiedPagination = UnifiedPagination;
188
- //# sourceMappingURL=chunk-O4VZOA2Q.cjs.map
188
+ //# sourceMappingURL=chunk-UXOOVP77.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-O4VZOA2Q.cjs","../src/components/empty-state.tsx","../src/components/unified-pagination.tsx"],"names":["jsx"],"mappings":"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","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-O4VZOA2Q.cjs","sourcesContent":[null,"'use client';\n\nimport { Search, FileText, Package } from 'lucide-react';\nimport { useRouter } from '../embed-shims/next-navigation';\nimport { Button } from './ui/button';\n\nexport interface EmptyStateProps {\n type: 'vendors' | 'posts' | 'search' | 'generic';\n title?: string;\n description?: string;\n showBackButton?: boolean;\n onGoBack?: () => void;\n backButtonText?: string;\n // New CTA properties\n showCTA?: boolean;\n ctaText?: string;\n onCtaClick?: () => void;\n /**\n * Link-CTA mode: render the CTA as a navigation link (`href` — plain or\n * `mailto:`). Wins over `onCtaClick`, and SHORT-CIRCUITS the smart-CTA\n * path-sniffing below (which reads `window.location.pathname` — an\n * SSR/client divergence server-rendered pages must never enter).\n */\n ctaHref?: string;\n ctaVariant?: 'primary' | 'secondary';\n}\n\nexport function EmptyState({\n type,\n title,\n description,\n showBackButton = false,\n onGoBack,\n backButtonText = 'Go Back',\n showCTA = true,\n ctaText,\n onCtaClick,\n ctaHref,\n ctaVariant = 'primary',\n}: EmptyStateProps) {\n const router = useRouter();\n\n // Default content based on type\n const getDefaultContent = () => {\n switch (type) {\n case 'vendors':\n return {\n icon: <Package className=\"h-full w-full\" />,\n title: 'No vendors found',\n description:\n \"We couldn't find any vendors matching your criteria. Try adjusting your filters or search terms.\",\n };\n case 'posts':\n return {\n icon: <FileText className=\"h-full w-full\" />,\n title: 'No articles found',\n description:\n \"We couldn't find any articles matching your criteria. Try different categories, tags, or search terms.\",\n };\n case 'search':\n return {\n icon: <Search className=\"h-full w-full\" />,\n title: 'No results found',\n description: \"Your search didn't return any results. Try different keywords or browse our categories.\",\n };\n default:\n return {\n icon: <Search className=\"h-full w-full\" />,\n title: 'Nothing found',\n description: \"We couldn't find what you're looking for. Try adjusting your search or filters.\",\n };\n }\n };\n\n // Smart CTA logic based on context\n const getSmartCTA = () => {\n // If custom CTA is provided, use it\n if (ctaText && onCtaClick) {\n return {\n text: ctaText,\n action: onCtaClick,\n };\n }\n\n // Check if we're on the client side\n const isClient = typeof window !== 'undefined';\n const currentPath = isClient ? window.location.pathname : '';\n\n // Surgical filter reset (promoted from the hub's diverged clone during\n // the EmptyState convergence): delete ONLY the filter params the surface\n // owns — nuking the whole query string threw away unrelated state — and\n // use `replace` with `scroll: false` so resetting filters neither adds a\n // history entry nor jumps the page.\n const resetParams = (paramsToDelete: string[]) => {\n if (!isClient) return;\n const params = new URLSearchParams(window.location.search);\n for (const p of paramsToDelete) params.delete(p);\n const queryString = params.toString();\n // Keep the hash — a filter reset must not clear an unrelated\n // deep-link anchor (e.g. #delivery-123).\n const hash = window.location.hash;\n router.replace(`${window.location.pathname}${queryString ? `?${queryString}` : ''}${hash}`, { scroll: false });\n };\n\n // Smart defaults based on type and context\n switch (type) {\n case 'search':\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page']),\n };\n case 'posts':\n // Blog-style listing pages (blog, case studies) reset their filters\n if (currentPath.includes('/blog') || currentPath.includes('/case-studies')) {\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page', 'category', 'tags']),\n };\n } else if (currentPath.includes('/profile')) {\n return {\n text: 'Browse Vendors',\n action: () => router.push('/vendors'),\n };\n }\n return {\n text: 'View All Posts',\n action: () => router.push('/blog'),\n };\n case 'vendors':\n // If we're in profile or other pages, direct to main content\n if (currentPath.includes('/profile')) {\n return {\n text: 'Browse Vendors',\n action: () => router.push('/vendors'),\n };\n } else if (currentPath.includes('/vendors') || currentPath.includes('/margin-increase/compare')) {\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page', 'category', 'subcategory']),\n };\n }\n return {\n text: 'Browse Vendors',\n action: () => router.push('/vendors'),\n };\n default:\n return {\n text: 'Browse Vendors',\n action: () => router.push('/vendors'),\n };\n }\n };\n\n const defaultContent = getDefaultContent();\n const displayTitle = title || defaultContent.title;\n const displayDescription = description || defaultContent.description;\n // ctaHref short-circuits BEFORE getSmartCTA(): the smart defaults read\n // window.location.pathname (SSR-empty, client-real), so a server-rendered\n // page with a link CTA must never enter that branch. Existing callers\n // without ctaHref keep today's smart-default behavior unchanged.\n const smartCTA = ctaHref ? null : getSmartCTA();\n const ctaClassName =\n ctaVariant === 'primary'\n ? 'w-full bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover transition-all duration-150 font-body font-medium'\n : 'w-full bg-transparent border border-ods-border text-ods-text-primary hover:border-ods-accent hover:text-ods-accent transition-all duration-150 font-body font-medium';\n\n return (\n <div className=\"flex flex-col items-center justify-center px-6 py-6 text-center md:py-16\">\n {/* Icon */}\n <div className=\"mb-3 flex items-center justify-center md:mb-6\">\n <div className=\"rounded-full border border-ods-border bg-ods-card p-3 md:p-6\">\n <div className=\"flex h-8 w-8 items-center justify-center text-ods-text-secondary md:h-16 md:w-16\">\n {defaultContent.icon}\n </div>\n </div>\n </div>\n\n {/* Title */}\n <h2 className=\"mb-2 text-ods-text-primary text-h3 md:mb-3\">{displayTitle}</h2>\n\n {/* Description */}\n <p className=\"mb-4 max-w-md text-ods-text-secondary text-h6 md:mb-8\">{displayDescription}</p>\n\n {/* Link CTA (ctaHref) — SSR-safe, no path sniffing */}\n {showCTA && ctaHref && (\n <div className=\"mb-3 w-full max-w-xs\">\n <Button href={ctaHref} className={ctaClassName}>\n {ctaText || 'Contact us'}\n </Button>\n </div>\n )}\n\n {/* Smart CTA Button */}\n {showCTA && !ctaHref && smartCTA && (\n <div className=\"mb-3 w-full max-w-xs\">\n <Button onClick={smartCTA.action} className={ctaClassName}>\n {smartCTA.text}\n </Button>\n </div>\n )}\n\n {/* Optional Back Button */}\n {showBackButton && onGoBack && (\n <div className=\"w-full max-w-xs\">\n <Button\n onClick={onGoBack}\n variant=\"outline\"\n className=\"w-full font-body font-medium transition-all duration-150\"\n >\n {backButtonText}\n </Button>\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport { useSearchParams, usePathname } from '../embed-shims/next-navigation';\nimport { withQuery } from '../utils/search-params';\nimport { Pagination } from './pagination';\n\ninterface UnifiedPaginationProps {\n currentPage: number;\n totalPages: number;\n onPageChange?: (page: number) => void;\n className?: string;\n /**\n * Write `?page=` into the URL on every change (default true, the historical\n * behaviour). Set false when the CALLER owns the URL — a surface whose whole\n * filter state is one schema would otherwise get two writers racing on it.\n */\n syncUrl?: boolean;\n /**\n * Keep the row's height when there is only one page, instead of rendering\n * nothing. Stops a one-page result from shifting the content above it.\n */\n reserveSpace?: boolean;\n}\n\nexport function UnifiedPagination({\n currentPage,\n totalPages,\n onPageChange,\n className = 'mt-8 flex justify-center w-full',\n syncUrl = true,\n reserveSpace = false,\n}: UnifiedPaginationProps) {\n const searchParams = useSearchParams();\n const pathname = usePathname();\n\n const handlePageChange = (page: number) => {\n // Preserve current scroll position\n const currentScrollY = window.scrollY;\n\n // Call the callback to update local state (prevents reload)\n if (onPageChange) {\n onPageChange(page);\n }\n\n // Update URL for bookmarking without navigation — unless the caller owns\n // the URL (`syncUrl={false}`), in which case a second writer here would\n // race the caller's own param write.\n if (syncUrl) {\n const params = new URLSearchParams(searchParams.toString());\n params.set('page', page.toString());\n window.history.replaceState(null, '', withQuery(pathname, params.toString()));\n }\n\n // Restore scroll position after a brief delay to allow content to render\n setTimeout(() => {\n window.scrollTo({\n top: currentScrollY,\n behavior: 'instant', // Instant to prevent any scroll animation\n });\n }, 0);\n };\n\n // Don't render pagination if there's only one page (optionally holding the\n // row's height so the content above it does not shift).\n //\n // The reserved row renders the REAL control, hidden — an empty div reserves\n // nothing, and a hardcoded spacer height silently drifts the day the control\n // changes. `invisible` keeps the box, `aria-hidden` + `pointer-events-none`\n // keep it out of the accessibility tree and out of the way.\n if (totalPages <= 1) {\n return reserveSpace ? (\n <div className={className} aria-hidden=\"true\">\n <div className=\"pointer-events-none invisible\">\n <Pagination currentPage={1} totalPages={1} onPageChange={() => {}} />\n </div>\n </div>\n ) : null;\n }\n\n return (\n <div className={className}>\n <Pagination currentPage={currentPage} totalPages={totalPages} onPageChange={handlePageChange} />\n </div>\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-UXOOVP77.cjs","../src/components/empty-state.tsx","../src/components/unified-pagination.tsx"],"names":["jsx"],"mappings":"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","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-UXOOVP77.cjs","sourcesContent":[null,"'use client';\n\nimport { Search, FileText, Package } from 'lucide-react';\nimport { useRouter } from '../embed-shims/next-navigation';\nimport { Button } from './ui/button';\n\nexport interface EmptyStateProps {\n type: 'vendors' | 'posts' | 'search' | 'generic';\n title?: string;\n description?: string;\n showBackButton?: boolean;\n onGoBack?: () => void;\n backButtonText?: string;\n // New CTA properties\n showCTA?: boolean;\n ctaText?: string;\n onCtaClick?: () => void;\n /**\n * Link-CTA mode: render the CTA as a navigation link (`href` — plain or\n * `mailto:`). Wins over `onCtaClick`, and SHORT-CIRCUITS the smart-CTA\n * path-sniffing below (which reads `window.location.pathname` — an\n * SSR/client divergence server-rendered pages must never enter).\n */\n ctaHref?: string;\n ctaVariant?: 'primary' | 'secondary';\n}\n\nexport function EmptyState({\n type,\n title,\n description,\n showBackButton = false,\n onGoBack,\n backButtonText = 'Go Back',\n showCTA = true,\n ctaText,\n onCtaClick,\n ctaHref,\n ctaVariant = 'primary',\n}: EmptyStateProps) {\n const router = useRouter();\n\n // Default content based on type\n const getDefaultContent = () => {\n switch (type) {\n case 'vendors':\n return {\n icon: <Package className=\"h-full w-full\" />,\n title: 'No vendors found',\n description:\n \"We couldn't find any vendors matching your criteria. Try adjusting your filters or search terms.\",\n };\n case 'posts':\n return {\n icon: <FileText className=\"h-full w-full\" />,\n title: 'No articles found',\n description:\n \"We couldn't find any articles matching your criteria. Try different categories, tags, or search terms.\",\n };\n case 'search':\n return {\n icon: <Search className=\"h-full w-full\" />,\n title: 'No results found',\n description: \"Your search didn't return any results. Try different keywords or browse our categories.\",\n };\n default:\n return {\n icon: <Search className=\"h-full w-full\" />,\n title: 'Nothing found',\n description: \"We couldn't find what you're looking for. Try adjusting your search or filters.\",\n };\n }\n };\n\n // Smart CTA logic based on context\n const getSmartCTA = () => {\n // If custom CTA is provided, use it\n if (ctaText && onCtaClick) {\n return {\n text: ctaText,\n action: onCtaClick,\n };\n }\n\n // Check if we're on the client side\n const isClient = typeof window !== 'undefined';\n const currentPath = isClient ? window.location.pathname : '';\n\n // Surgical filter reset (promoted from the hub's diverged clone during\n // the EmptyState convergence): delete ONLY the filter params the surface\n // owns — nuking the whole query string threw away unrelated state — and\n // use `replace` with `scroll: false` so resetting filters neither adds a\n // history entry nor jumps the page.\n const resetParams = (paramsToDelete: string[]) => {\n if (!isClient) return;\n const params = new URLSearchParams(window.location.search);\n for (const p of paramsToDelete) params.delete(p);\n const queryString = params.toString();\n // Keep the hash — a filter reset must not clear an unrelated\n // deep-link anchor (e.g. #delivery-123).\n const hash = window.location.hash;\n router.replace(`${window.location.pathname}${queryString ? `?${queryString}` : ''}${hash}`, { scroll: false });\n };\n\n // Smart defaults based on type and context\n switch (type) {\n case 'search':\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page']),\n };\n case 'posts':\n // Blog-style listing pages (blog, case studies) reset their filters\n if (currentPath.includes('/blog') || currentPath.includes('/case-studies')) {\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page', 'category', 'tags']),\n };\n } else if (currentPath.includes('/profile')) {\n return {\n text: 'Browse Vendors',\n action: () => router.push('/vendors'),\n };\n }\n return {\n text: 'View All Posts',\n action: () => router.push('/blog'),\n };\n case 'vendors':\n // If we're in profile or other pages, direct to main content\n if (currentPath.includes('/profile')) {\n return {\n text: 'Browse Vendors',\n action: () => router.push('/vendors'),\n };\n } else if (currentPath.includes('/vendors') || currentPath.includes('/margin-increase/compare')) {\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page', 'category', 'subcategory']),\n };\n }\n return {\n text: 'Browse Vendors',\n action: () => router.push('/vendors'),\n };\n default:\n return {\n text: 'Browse Vendors',\n action: () => router.push('/vendors'),\n };\n }\n };\n\n const defaultContent = getDefaultContent();\n const displayTitle = title || defaultContent.title;\n const displayDescription = description || defaultContent.description;\n // ctaHref short-circuits BEFORE getSmartCTA(): the smart defaults read\n // window.location.pathname (SSR-empty, client-real), so a server-rendered\n // page with a link CTA must never enter that branch. Existing callers\n // without ctaHref keep today's smart-default behavior unchanged.\n const smartCTA = ctaHref ? null : getSmartCTA();\n const ctaClassName =\n ctaVariant === 'primary'\n ? 'w-full bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover transition-all duration-150 font-body font-medium'\n : 'w-full bg-transparent border border-ods-border text-ods-text-primary hover:border-ods-accent hover:text-ods-accent transition-all duration-150 font-body font-medium';\n\n return (\n <div className=\"flex flex-col items-center justify-center px-6 py-6 text-center md:py-16\">\n {/* Icon */}\n <div className=\"mb-3 flex items-center justify-center md:mb-6\">\n <div className=\"rounded-full border border-ods-border bg-ods-card p-3 md:p-6\">\n <div className=\"flex h-8 w-8 items-center justify-center text-ods-text-secondary md:h-16 md:w-16\">\n {defaultContent.icon}\n </div>\n </div>\n </div>\n\n {/* Title */}\n <h2 className=\"mb-2 text-ods-text-primary text-h3 md:mb-3\">{displayTitle}</h2>\n\n {/* Description */}\n <p className=\"mb-4 max-w-md text-ods-text-secondary text-h6 md:mb-8\">{displayDescription}</p>\n\n {/* Link CTA (ctaHref) — SSR-safe, no path sniffing */}\n {showCTA && ctaHref && (\n <div className=\"mb-3 w-full max-w-xs\">\n <Button href={ctaHref} className={ctaClassName}>\n {ctaText || 'Contact us'}\n </Button>\n </div>\n )}\n\n {/* Smart CTA Button */}\n {showCTA && !ctaHref && smartCTA && (\n <div className=\"mb-3 w-full max-w-xs\">\n <Button onClick={smartCTA.action} className={ctaClassName}>\n {smartCTA.text}\n </Button>\n </div>\n )}\n\n {/* Optional Back Button */}\n {showBackButton && onGoBack && (\n <div className=\"w-full max-w-xs\">\n <Button\n onClick={onGoBack}\n variant=\"outline\"\n className=\"w-full font-body font-medium transition-all duration-150\"\n >\n {backButtonText}\n </Button>\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport { useSearchParams, usePathname } from '../embed-shims/next-navigation';\nimport { withQuery } from '../utils/search-params';\nimport { Pagination } from './pagination';\n\ninterface UnifiedPaginationProps {\n currentPage: number;\n totalPages: number;\n onPageChange?: (page: number) => void;\n className?: string;\n /**\n * Write `?page=` into the URL on every change (default true, the historical\n * behaviour). Set false when the CALLER owns the URL — a surface whose whole\n * filter state is one schema would otherwise get two writers racing on it.\n */\n syncUrl?: boolean;\n /**\n * Keep the row's height when there is only one page, instead of rendering\n * nothing. Stops a one-page result from shifting the content above it.\n */\n reserveSpace?: boolean;\n}\n\nexport function UnifiedPagination({\n currentPage,\n totalPages,\n onPageChange,\n className = 'mt-8 flex justify-center w-full',\n syncUrl = true,\n reserveSpace = false,\n}: UnifiedPaginationProps) {\n const searchParams = useSearchParams();\n const pathname = usePathname();\n\n const handlePageChange = (page: number) => {\n // Preserve current scroll position\n const currentScrollY = window.scrollY;\n\n // Call the callback to update local state (prevents reload)\n if (onPageChange) {\n onPageChange(page);\n }\n\n // Update URL for bookmarking without navigation — unless the caller owns\n // the URL (`syncUrl={false}`), in which case a second writer here would\n // race the caller's own param write.\n if (syncUrl) {\n const params = new URLSearchParams(searchParams.toString());\n params.set('page', page.toString());\n window.history.replaceState(null, '', withQuery(pathname, params.toString()));\n }\n\n // Restore scroll position after a brief delay to allow content to render\n setTimeout(() => {\n window.scrollTo({\n top: currentScrollY,\n behavior: 'instant', // Instant to prevent any scroll animation\n });\n }, 0);\n };\n\n // Don't render pagination if there's only one page (optionally holding the\n // row's height so the content above it does not shift).\n //\n // The reserved row renders the REAL control, hidden — an empty div reserves\n // nothing, and a hardcoded spacer height silently drifts the day the control\n // changes. `invisible` keeps the box, `aria-hidden` + `pointer-events-none`\n // keep it out of the accessibility tree and out of the way.\n if (totalPages <= 1) {\n return reserveSpace ? (\n <div className={className} aria-hidden=\"true\">\n <div className=\"pointer-events-none invisible\">\n <Pagination currentPage={1} totalPages={1} onPageChange={() => {}} />\n </div>\n </div>\n ) : null;\n }\n\n return (\n <div className={className}>\n <Pagination currentPage={currentPage} totalPages={totalPages} onPageChange={handlePageChange} />\n </div>\n );\n}\n"]}
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import {
3
3
  useSelfFetch
4
- } from "./chunk-WZJOILPU.js";
4
+ } from "./chunk-F2KBCLUG.js";
5
5
  import {
6
6
  PageLayout,
7
7
  PageShell
8
- } from "./chunk-GHYFVT52.js";
8
+ } from "./chunk-B23ID4DM.js";
9
9
  import {
10
10
  useScrollToHash
11
- } from "./chunk-EZM5DNII.js";
11
+ } from "./chunk-S6WBBSII.js";
12
12
  import {
13
13
  buildSuggestionUrl
14
14
  } from "./chunk-GBON2OCG.js";
@@ -17,7 +17,7 @@ import {
17
17
  faqItemAnchor,
18
18
  faqSectionSlug,
19
19
  parseFaqHash
20
- } from "./chunk-VNSRNVPD.js";
20
+ } from "./chunk-KJ5EQ6P6.js";
21
21
  import {
22
22
  STICKY_HEADER_OFFSET_PX,
23
23
  navigateSamePageHash,
@@ -355,4 +355,4 @@ export {
355
355
  FaqSection,
356
356
  FaqDocumentPage
357
357
  };
358
- //# sourceMappingURL=chunk-PTK3CINU.js.map
358
+ //# sourceMappingURL=chunk-VELZVF3F.js.map
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _chunkO4VZOA2Qcjs = require('./chunk-O4VZOA2Q.cjs');
4
+ var _chunkUXOOVP77cjs = require('./chunk-UXOOVP77.cjs');
5
5
 
6
6
 
7
7
  var _chunk23V5BSHDcjs = require('./chunk-23V5BSHD.cjs');
@@ -116,7 +116,7 @@ function PersistentPaginationWrapper({
116
116
  },
117
117
  "aria-hidden": isPaginationDisabled,
118
118
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
119
- _chunkO4VZOA2Qcjs.UnifiedPagination,
119
+ _chunkUXOOVP77cjs.UnifiedPagination,
120
120
  {
121
121
  currentPage: displayCurrentPage,
122
122
  totalPages: displayTotalPages,
@@ -136,4 +136,4 @@ function PersistentPaginationWrapper({
136
136
 
137
137
 
138
138
  exports.PersistentPagination = PersistentPagination; exports.usePaginationLoading = usePaginationLoading; exports.PersistentPaginationWrapper = PersistentPaginationWrapper;
139
- //# sourceMappingURL=chunk-BZEWPW5A.cjs.map
139
+ //# sourceMappingURL=chunk-VIBREYUK.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-BZEWPW5A.cjs","../src/components/persistent-pagination.tsx"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACwFQ,+CAAA;AA/BD,SAAS,oBAAA,CAAqB;AAAA,EACnC,SAAA;AAAA,EACA,QAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,gBAAA,EAAkB,GAAA;AAAA,EAClB,mBAAA,EAAqB;AACvB,CAAA,EAA8B;AAI5B,EAAA,uBACE,8BAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,kCAAA;AAAA,QACT,qCAAA;AAAA,QACA,kCAAA;AAAA,QACA,UAAA,GAAa,qBAAA;AAAA,QACb;AAAA,MACF,CAAA;AAAA,MACA,KAAA,EAAO;AAAA,QACL,OAAA,EAAS,UAAA,EAAY,gBAAA,EAAkB,CAAA;AAAA,QACvC,kBAAA,EAAoB,CAAA,EAAA;AACtB,MAAA;AACK,MAAA;AACM,MAAA;AACA,MAAA;AACG,MAAA;AAGb,MAAA;AACC,QAAA;AAA0D,UAAA;AACJ,UAAA;AAAY,UAAA;AAAK,UAAA;AACvE,QAAA;AAIF,wBAAA;AAAC,UAAA;AAAA,UAAA;AACe,YAAA;AACP,YAAA;AACL,cAAA;AACF,YAAA;AACa,YAAA;AAEZ,YAAA;AAAA,UAAA;AACH,QAAA;AAAA,MAAA;AAAA,IAAA;AAGF,EAAA;AAEJ;AAKgB;AACR,EAAA;AAEkB,EAAA;AACT,IAAA;AACG,IAAA;AACK,IAAA;AACD,IAAA;AACtB,EAAA;AAE0B,EAAA;AACT,IAAA;AACU,MAAA;AACzB,IAAA;AACe,IAAA;AACjB,EAAA;AAEO,EAAA;AACL,IAAA;AACA,IAAA;AACA,IAAA;AACF,EAAA;AACF;AAcgB;AACd,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACmC;AAGhB,EAAA;AACO,EAAA;AACC,EAAA;AAErB,EAAA;AACgB,EAAA;AAGpB,EAAA;AAAC,IAAA;AAAA,IAAA;AACY,MAAA;AACT,QAAA;AACC,QAAA;AACD,QAAA;AACF,MAAA;AACO,MAAA;AACI,QAAA;AACW,QAAA;AACtB,MAAA;AACK,MAAA;AACM,MAAA;AACA,MAAA;AACG,MAAA;AACI,MAAA;AAGhB,MAAA;AAAc,QAAA;AAShB,wBAAA;AAAC,UAAA;AAAA,UAAA;AACe,YAAA;AACP,YAAA;AACL,cAAA;AACF,YAAA;AACa,YAAA;AAKb,YAAA;AAAC,cAAA;AAAA,cAAA;AACc,gBAAA;AACD,gBAAA;AACZ,gBAAA;AAAiD,gBAAA;AAAA,cAAA;AACnD,YAAA;AAAA,UAAA;AACF,QAAA;AAAA,MAAA;AAAA,IAAA;AAGF,EAAA;AAEJ;ADvF6B;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-BZEWPW5A.cjs","sourcesContent":[null,"'use client';\n\nimport type { ReactNode } from 'react';\nimport { cn } from '../utils/cn';\nimport { UnifiedPagination } from './unified-pagination';\n\ninterface PersistentPaginationProps {\n /**\n * Whether pagination is currently in a loading state\n */\n isLoading: boolean;\n /**\n * The pagination component\n */\n children: ReactNode;\n /**\n * Current page number\n */\n currentPage: number;\n /**\n * Total number of pages\n */\n totalPages: number;\n /**\n * Additional CSS classes\n */\n className?: string;\n /**\n * Disabled opacity (0-1)\n */\n disabledOpacity?: number;\n /**\n * Transition duration in milliseconds\n */\n transitionDuration?: number;\n /**\n * Whether to show loading state in pagination\n */\n showLoadingState?: boolean;\n}\n\n/**\n * PersistentPagination\n *\n * A wrapper component that keeps pagination visible during loading states\n * but provides visual feedback that it's temporarily disabled.\n *\n * Features:\n * - Maintains pagination visibility during content loading\n * - Disables interaction but preserves layout\n * - Shows current page context even when loading\n * - Provides accessibility support for loading states\n * - Smooth transitions between enabled/disabled states\n *\n * Usage:\n * ```tsx\n * <PersistentPagination\n * isLoading={isLoadingVendors}\n * currentPage={currentPage}\n * totalPages={totalPages}\n * >\n * <Pagination currentPage={currentPage} totalPages={totalPages} />\n * </PersistentPagination>\n * ```\n */\nexport function PersistentPagination({\n isLoading,\n children,\n currentPage,\n totalPages,\n className,\n disabledOpacity = 0.5,\n transitionDuration = 300,\n}: PersistentPaginationProps) {\n // ALWAYS show pagination for predictable layout - just gray it out when not needed\n // Removed condition that hides pagination completely\n\n return (\n <div\n className={cn(\n 'relative transition-all ease-in-out',\n 'flex items-center justify-center',\n isLoading && 'pointer-events-none',\n className,\n )}\n style={{\n opacity: isLoading ? disabledOpacity : 1,\n transitionDuration: `${transitionDuration}ms`,\n }}\n role=\"navigation\"\n aria-label=\"Pagination\"\n aria-busy={isLoading}\n data-loading={isLoading}\n >\n {/* Loading state announcement for screen readers */}\n {isLoading && (\n <div className=\"sr-only\" role=\"status\" aria-live=\"polite\">\n Pagination temporarily disabled while loading page {currentPage} of {totalPages}\n </div>\n )}\n\n {/* Pagination controls with disabled state */}\n <div\n className={cn('relative transition-all ease-in-out', isLoading && 'cursor-not-allowed')}\n style={{\n transitionDuration: `${transitionDuration}ms`,\n }}\n aria-hidden={isLoading}\n >\n {children}\n </div>\n\n {/* REMOVED: Loading overlay - only card skeletons should show during loading */}\n </div>\n );\n}\n\n/**\n * Hook for managing pagination loading states\n */\nexport function usePaginationLoading(isLoading: boolean, currentPage: number, totalPages: number) {\n const shouldShowPagination = totalPages > 1 || isLoading;\n\n const paginationProps = {\n 'aria-busy': isLoading,\n 'data-loading': isLoading,\n 'data-current-page': currentPage,\n 'data-total-pages': totalPages,\n };\n\n const getLoadingMessage = () => {\n if (isLoading) {\n return `Loading page ${currentPage} of ${totalPages}`;\n }\n return `Page ${currentPage} of ${totalPages}`;\n };\n\n return {\n shouldShowPagination,\n paginationProps,\n getLoadingMessage,\n };\n}\n\n/**\n * Enhanced pagination component that includes loading states\n */\ninterface PersistentPaginationWrapperProps {\n isLoading: boolean;\n currentPage: number;\n totalPages: number;\n onPageChange?: (page: number) => void;\n className?: string;\n variant?: 'vendor' | 'blog';\n}\n\nexport function PersistentPaginationWrapper({\n isLoading,\n currentPage,\n totalPages,\n onPageChange,\n className,\n}: PersistentPaginationWrapperProps) {\n // ALWAYS show pagination for predictable layout\n // For no results (totalPages = 0), show grayed out pagination\n const hasResults = totalPages > 0;\n const displayTotalPages = hasResults ? totalPages : 1;\n const displayCurrentPage = hasResults ? currentPage : 1;\n // Only disable during loading, but still show when no results (just grayed out)\n const isPaginationDisabled = isLoading;\n const hasNoResults = !hasResults && !isLoading;\n\n return (\n <div\n className={cn(\n 'relative flex items-center justify-center transition-all ease-in-out',\n (isPaginationDisabled || hasNoResults) && 'pointer-events-none',\n className,\n )}\n style={{\n opacity: isPaginationDisabled ? 0.3 : hasNoResults ? 0.5 : 1,\n transitionDuration: '300ms',\n }}\n role=\"navigation\"\n aria-label=\"Pagination\"\n aria-busy={isLoading}\n data-loading={isLoading}\n data-has-results={hasResults}\n >\n {/* Loading/no results state announcement for screen readers */}\n {(isLoading || !hasResults) && (\n <div className=\"sr-only\" role=\"status\" aria-live=\"polite\">\n {isLoading\n ? `Pagination temporarily disabled while loading page ${displayCurrentPage} of ${displayTotalPages}`\n : `No results available - pagination disabled`}\n </div>\n )}\n\n {/* Pagination controls with disabled state */}\n <div\n className={cn('relative transition-all ease-in-out', isPaginationDisabled && 'cursor-not-allowed')}\n style={{\n transitionDuration: '300ms',\n }}\n aria-hidden={isPaginationDisabled}\n >\n {/* UnifiedPagination directly — Pagination and BlogPagination in\n multi-platform-hub are both thin wrappers around it, so the wrapper\n never has to be handed down from the consuming app. */}\n <UnifiedPagination\n currentPage={displayCurrentPage}\n totalPages={displayTotalPages}\n onPageChange={hasResults ? onPageChange : () => {}} // Provide empty function instead of undefined\n />\n </div>\n\n {/* REMOVED: Loading overlays - only card skeletons should show during loading */}\n </div>\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-VIBREYUK.cjs","../src/components/persistent-pagination.tsx"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACwFQ,+CAAA;AA/BD,SAAS,oBAAA,CAAqB;AAAA,EACnC,SAAA;AAAA,EACA,QAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,gBAAA,EAAkB,GAAA;AAAA,EAClB,mBAAA,EAAqB;AACvB,CAAA,EAA8B;AAI5B,EAAA,uBACE,8BAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,kCAAA;AAAA,QACT,qCAAA;AAAA,QACA,kCAAA;AAAA,QACA,UAAA,GAAa,qBAAA;AAAA,QACb;AAAA,MACF,CAAA;AAAA,MACA,KAAA,EAAO;AAAA,QACL,OAAA,EAAS,UAAA,EAAY,gBAAA,EAAkB,CAAA;AAAA,QACvC,kBAAA,EAAoB,CAAA,EAAA;AACtB,MAAA;AACK,MAAA;AACM,MAAA;AACA,MAAA;AACG,MAAA;AAGb,MAAA;AACC,QAAA;AAA0D,UAAA;AACJ,UAAA;AAAY,UAAA;AAAK,UAAA;AACvE,QAAA;AAIF,wBAAA;AAAC,UAAA;AAAA,UAAA;AACe,YAAA;AACP,YAAA;AACL,cAAA;AACF,YAAA;AACa,YAAA;AAEZ,YAAA;AAAA,UAAA;AACH,QAAA;AAAA,MAAA;AAAA,IAAA;AAGF,EAAA;AAEJ;AAKgB;AACR,EAAA;AAEkB,EAAA;AACT,IAAA;AACG,IAAA;AACK,IAAA;AACD,IAAA;AACtB,EAAA;AAE0B,EAAA;AACT,IAAA;AACU,MAAA;AACzB,IAAA;AACe,IAAA;AACjB,EAAA;AAEO,EAAA;AACL,IAAA;AACA,IAAA;AACA,IAAA;AACF,EAAA;AACF;AAcgB;AACd,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACmC;AAGhB,EAAA;AACO,EAAA;AACC,EAAA;AAErB,EAAA;AACgB,EAAA;AAGpB,EAAA;AAAC,IAAA;AAAA,IAAA;AACY,MAAA;AACT,QAAA;AACC,QAAA;AACD,QAAA;AACF,MAAA;AACO,MAAA;AACI,QAAA;AACW,QAAA;AACtB,MAAA;AACK,MAAA;AACM,MAAA;AACA,MAAA;AACG,MAAA;AACI,MAAA;AAGhB,MAAA;AAAc,QAAA;AAShB,wBAAA;AAAC,UAAA;AAAA,UAAA;AACe,YAAA;AACP,YAAA;AACL,cAAA;AACF,YAAA;AACa,YAAA;AAKb,YAAA;AAAC,cAAA;AAAA,cAAA;AACc,gBAAA;AACD,gBAAA;AACZ,gBAAA;AAAiD,gBAAA;AAAA,cAAA;AACnD,YAAA;AAAA,UAAA;AACF,QAAA;AAAA,MAAA;AAAA,IAAA;AAGF,EAAA;AAEJ;ADvF6B;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-VIBREYUK.cjs","sourcesContent":[null,"'use client';\n\nimport type { ReactNode } from 'react';\nimport { cn } from '../utils/cn';\nimport { UnifiedPagination } from './unified-pagination';\n\ninterface PersistentPaginationProps {\n /**\n * Whether pagination is currently in a loading state\n */\n isLoading: boolean;\n /**\n * The pagination component\n */\n children: ReactNode;\n /**\n * Current page number\n */\n currentPage: number;\n /**\n * Total number of pages\n */\n totalPages: number;\n /**\n * Additional CSS classes\n */\n className?: string;\n /**\n * Disabled opacity (0-1)\n */\n disabledOpacity?: number;\n /**\n * Transition duration in milliseconds\n */\n transitionDuration?: number;\n /**\n * Whether to show loading state in pagination\n */\n showLoadingState?: boolean;\n}\n\n/**\n * PersistentPagination\n *\n * A wrapper component that keeps pagination visible during loading states\n * but provides visual feedback that it's temporarily disabled.\n *\n * Features:\n * - Maintains pagination visibility during content loading\n * - Disables interaction but preserves layout\n * - Shows current page context even when loading\n * - Provides accessibility support for loading states\n * - Smooth transitions between enabled/disabled states\n *\n * Usage:\n * ```tsx\n * <PersistentPagination\n * isLoading={isLoadingVendors}\n * currentPage={currentPage}\n * totalPages={totalPages}\n * >\n * <Pagination currentPage={currentPage} totalPages={totalPages} />\n * </PersistentPagination>\n * ```\n */\nexport function PersistentPagination({\n isLoading,\n children,\n currentPage,\n totalPages,\n className,\n disabledOpacity = 0.5,\n transitionDuration = 300,\n}: PersistentPaginationProps) {\n // ALWAYS show pagination for predictable layout - just gray it out when not needed\n // Removed condition that hides pagination completely\n\n return (\n <div\n className={cn(\n 'relative transition-all ease-in-out',\n 'flex items-center justify-center',\n isLoading && 'pointer-events-none',\n className,\n )}\n style={{\n opacity: isLoading ? disabledOpacity : 1,\n transitionDuration: `${transitionDuration}ms`,\n }}\n role=\"navigation\"\n aria-label=\"Pagination\"\n aria-busy={isLoading}\n data-loading={isLoading}\n >\n {/* Loading state announcement for screen readers */}\n {isLoading && (\n <div className=\"sr-only\" role=\"status\" aria-live=\"polite\">\n Pagination temporarily disabled while loading page {currentPage} of {totalPages}\n </div>\n )}\n\n {/* Pagination controls with disabled state */}\n <div\n className={cn('relative transition-all ease-in-out', isLoading && 'cursor-not-allowed')}\n style={{\n transitionDuration: `${transitionDuration}ms`,\n }}\n aria-hidden={isLoading}\n >\n {children}\n </div>\n\n {/* REMOVED: Loading overlay - only card skeletons should show during loading */}\n </div>\n );\n}\n\n/**\n * Hook for managing pagination loading states\n */\nexport function usePaginationLoading(isLoading: boolean, currentPage: number, totalPages: number) {\n const shouldShowPagination = totalPages > 1 || isLoading;\n\n const paginationProps = {\n 'aria-busy': isLoading,\n 'data-loading': isLoading,\n 'data-current-page': currentPage,\n 'data-total-pages': totalPages,\n };\n\n const getLoadingMessage = () => {\n if (isLoading) {\n return `Loading page ${currentPage} of ${totalPages}`;\n }\n return `Page ${currentPage} of ${totalPages}`;\n };\n\n return {\n shouldShowPagination,\n paginationProps,\n getLoadingMessage,\n };\n}\n\n/**\n * Enhanced pagination component that includes loading states\n */\ninterface PersistentPaginationWrapperProps {\n isLoading: boolean;\n currentPage: number;\n totalPages: number;\n onPageChange?: (page: number) => void;\n className?: string;\n variant?: 'vendor' | 'blog';\n}\n\nexport function PersistentPaginationWrapper({\n isLoading,\n currentPage,\n totalPages,\n onPageChange,\n className,\n}: PersistentPaginationWrapperProps) {\n // ALWAYS show pagination for predictable layout\n // For no results (totalPages = 0), show grayed out pagination\n const hasResults = totalPages > 0;\n const displayTotalPages = hasResults ? totalPages : 1;\n const displayCurrentPage = hasResults ? currentPage : 1;\n // Only disable during loading, but still show when no results (just grayed out)\n const isPaginationDisabled = isLoading;\n const hasNoResults = !hasResults && !isLoading;\n\n return (\n <div\n className={cn(\n 'relative flex items-center justify-center transition-all ease-in-out',\n (isPaginationDisabled || hasNoResults) && 'pointer-events-none',\n className,\n )}\n style={{\n opacity: isPaginationDisabled ? 0.3 : hasNoResults ? 0.5 : 1,\n transitionDuration: '300ms',\n }}\n role=\"navigation\"\n aria-label=\"Pagination\"\n aria-busy={isLoading}\n data-loading={isLoading}\n data-has-results={hasResults}\n >\n {/* Loading/no results state announcement for screen readers */}\n {(isLoading || !hasResults) && (\n <div className=\"sr-only\" role=\"status\" aria-live=\"polite\">\n {isLoading\n ? `Pagination temporarily disabled while loading page ${displayCurrentPage} of ${displayTotalPages}`\n : `No results available - pagination disabled`}\n </div>\n )}\n\n {/* Pagination controls with disabled state */}\n <div\n className={cn('relative transition-all ease-in-out', isPaginationDisabled && 'cursor-not-allowed')}\n style={{\n transitionDuration: '300ms',\n }}\n aria-hidden={isPaginationDisabled}\n >\n {/* UnifiedPagination directly — Pagination and BlogPagination in\n multi-platform-hub are both thin wrappers around it, so the wrapper\n never has to be handed down from the consuming app. */}\n <UnifiedPagination\n currentPage={displayCurrentPage}\n totalPages={displayTotalPages}\n onPageChange={hasResults ? onPageChange : () => {}} // Provide empty function instead of undefined\n />\n </div>\n\n {/* REMOVED: Loading overlays - only card skeletons should show during loading */}\n </div>\n );\n}\n"]}
@@ -21,4 +21,4 @@ export {
21
21
  useChatRuntime,
22
22
  useRequiredChatRuntime
23
23
  };
24
- //# sourceMappingURL=chunk-RYXIRVDC.js.map
24
+ //# sourceMappingURL=chunk-YB6FI2G3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/contexts/chat-runtime-context.tsx"],"sourcesContent":["'use client';\n\n/**\n * Chat runtime context — single seam for embedding the chat panel in a\n * different host (e.g. user1.openframe.ai reverse-proxying API calls\n * under /api/mingo-guide/* to hub.openframe.ai/api/*).\n *\n * Three concerns, one context:\n * 1. API endpoints: chatStreamUrl / approvalToolUrl / commandsUrl /\n * buildListUrl + attachment endpoints + chat-identity. The chat\n * reads them from runtime; hub vs embedded app supply different\n * strings via different providers.\n * 2. Navigation mode + callbacks: 'host' or 'embed' mode. Host wires\n * its own router/docNav via the optional `navigate` callback\n * (plain function, NOT a hook); embed forces new-tab via\n * `defaultContentOrigin` + lib's `resolveExternalNavigation`.\n * 3. Identity context: only `source` (required for localStorage\n * namespacing). The display identity (greeting first-name etc.)\n * comes from the server via `useChatIdentity()` — never injected\n * client-side, so it always matches the server-resolved auth.\n *\n * Sibling of EndpointsRuntimeContext (announcement bar, contact form,\n * access codes). Each runtime stays an independent React context so\n * embedders can opt into either feature without forcing the other.\n *\n * IMPORTANT for embedders: memoize the value passed to\n * `<ChatRuntimeContext.Provider value={...}>` (e.g. via React.useMemo).\n * Every change to its reference identity invalidates downstream\n * `useMemo` consumers (the chat input's slash-commands binding,\n * useNavLink's embed-resolution memo, useDocChat's streamFn factory).\n * The hub's `<HubRuntimeProvider>` already memoizes correctly with\n * stable deps. Embedded apps that build the value inline on each render\n * will pay an avoidable re-render cost across the entire chat tree.\n */\n\nimport { createContext, useContext } from 'react';\n\nimport type { ComposeContentUrl } from '../utils/content-href';\n\n/**\n * Runtime config consumed by the chat panel.\n */\nexport interface ChatRuntime {\n endpoints: {\n /** POST streaming chat. Hub: '/api/docs/chat'. */\n chatStreamUrl: string;\n /** POST agent approve/reject. Hub: '/api/chat/agent/confirm-tool'. */\n approvalToolUrl: string;\n /** Customer-ticket agent endpoints (Help Center). OPTIONAL — when unset,\n * the ticket hooks fall back to the bare hub paths\n * (`/api/chat/agent/{find-ticket,ticket-action,list-engagements}`).\n * Embedders behind a reverse proxy set these to their proxied paths\n * (e.g. `/content/api/chat/agent/...`) so tickets route through the SAME\n * endpoint config + proxy as every other endpoint. */\n findTicketUrl?: string;\n ticketActionUrl?: string;\n listEngagementsUrl?: string;\n /** Ticket live-stream + read-receipt endpoints (Help Center\n * realtime). OPTIONAL — unset → bare hub paths under the DEDICATED\n * ticket surface (`/api/tickets/{stream,read}` — deliberately NOT\n * the chat agent's `/api/chat/agent/*` prefix). Reverse-proxy\n * embedders set their proxied paths. Consumed by\n * `TicketLiveProvider`. The unread summary has NO endpoint — it\n * arrives as `ticket-summary` frames on the stream and in\n * `ticket-read` responses. */\n ticketStreamUrl?: string;\n ticketReadUrl?: string;\n /** GET slash-command catalog. Hub: '/api/docs/commands'. */\n commandsUrl: string;\n /** GET server-side conversation history (`?conversationId=<id>`) — the\n * chat panel's mount-time hydration read against the server transcript\n * store (localStorage keeps only the server-issued conversation id).\n * OPTIONAL — defaults to `<chatStreamUrl>/history`, which is correct for\n * same-origin hosts AND for reverse-proxy embedders (the proxied chat\n * prefix covers it). Set explicitly only when the history route lives\n * elsewhere. */\n chatHistoryUrl?: string;\n /**\n * Conversation-list surface for the SSE/Guide chat — the server-side\n * transcript store exposed as a dialog list:\n * GET `<url>?status=active|archived&cursor=&limit=&search=` → `{ dialogs, nextCursor }`\n * PATCH `<url>/<id>` with `{ title }` (rename) or `{ archived }` (archive / restore)\n * Hub: '/api/docs/chat/conversations'. OPTIONAL and NEVER derived: unset =\n * the Guide adapter has no dialog list and the panel keeps its single-thread\n * UI. Set it to enable the \"Current Chats\" rail / archive / rename in Guide\n * mode (the same UX openframe gets in Mingo mode). Selecting a row hydrates\n * through `chatHistoryUrl`.\n */\n chatConversationsUrl?: string;\n /** GET RAG-search endpoint behind `<DocSearchBar>` (the in-source search\n * bar mounted by `<DocViewer>` / `<DocsHubPage>` when `showAIChat` is on).\n * Hub: '/api/docs/search'. OPTIONAL — falls back to the hub path so\n * same-origin Next.js hosts don't need to set it. Cross-origin embedders\n * set their proxied path so the search bar routes through the same\n * reverse proxy as everything else. Same pattern as `findTicketUrl`. */\n docsSearchUrl?: string;\n /** POST internal-link resolver. The in-source markdown renderer (lib or\n * custom) calls `<DocViewer>`'s `handlers.onResolveLink(href, currentPath)`\n * for relative hrefs like `./getting-started/intro.md` — that callback\n * posts to this URL with `{ link, currentPath, source }` and expects a\n * `ResolveLinkResult` back. Hub: '/api/docs/resolve-link'. OPTIONAL — same\n * fall-back chain as `docsSearchUrl`: prop override → runtime → default. */\n docsResolveLinkUrl?: string;\n /** GET per-platform empty-state config (admin-edited in\n * `/admin/chat-config`): `{ greeting, enabledRagTableIds, suggestedQueries }`.\n * Hub: '/api/docs/empty-state'. OPTIONAL — the in-app (host-mode) chat\n * injects these values as SSR props instead, so it leaves this unset.\n * Cross-origin EMBEDDERS (no server hop) set it to their proxied path\n * (e.g. '/content/api/docs/empty-state') so `<EmbeddableChat>` can fetch\n * the greeting / quick-action chips / RAG-source filter at runtime. When\n * unset, the chat falls back to the explicit `emptyStateGreeting` /\n * `suggestedQueries` / `enabledRagTableIds` props (or in-code defaults). */\n emptyStateUrl?: string;\n /** Build the per-agent display-config URL for an OpenFrame AI agent\n * (Fae/Mingo). OPTIONAL. The returned endpoint MUST be byte-compatible\n * with the empty-state wire shape ({ greeting, suggestedQueries,\n * enabledRagTableIds }). When set AND `EmbeddableChat` receives an\n * `activeAgentSlug` in embed mode, the chat fetches THIS url instead of\n * `emptyStateUrl` to render the selected agent's greeting + suggested\n * prompts (the \"agent mode\" URL override). Hub: `(slug) =>\n * '/api/ai-agents/' + encodeURIComponent(slug)`. */\n aiAgentConfigUrl?: (slug: string) => string;\n /** Build entity-card list URL for a content type + ids. Hub delegates\n * to the rag-table-config registry; embedded app provides its own\n * per-type URL builder against the reverse proxy. Returns null when\n * the type has no list endpoint (caller skips rendering). */\n buildListUrl: (type: string, ids: string[]) => string | null;\n /** Chat-attachment endpoints — added for the v2 attachment feature.\n *\n * Three concerns:\n * - `attachmentUploadUrl` — POSTed by the chat-attachment hook\n * to mint a Supabase signed-upload-URL + HMAC view token.\n * - `attachmentViewUrlPrefix` — embedded in markdown URLs the\n * chat hosts in user message bubbles (`![]()` / `[Attached]`).\n * Stored in chat history; chosen at SEND time. In host mode the\n * relative `/api/storage/view/chat-attachments/` is sufficient\n * (same-origin); embedders supply an absolute hub URL so the\n * browser can fetch cross-origin.\n * - `identityUrl` — GET endpoint the `useChatIdentity` hook\n * hits to learn the `{authTier, source, attachmentsEnabled}`\n * capability bag for the current session. Used beyond chat\n * (tickets / contact form / any embedded surface that needs\n * to identify the proxied customer), so the name has no\n * \"chat\" prefix even though the consuming hook still does. */\n attachmentUploadUrl: string;\n attachmentViewUrlPrefix: string;\n identityUrl: string;\n /** Optional URL prefix for the image proxy (`<prefix>?url=<external>`).\n * When unset, lib's `getProxiedImageUrl` returns the original URL\n * unchanged. Hub default: '/api/image-proxy'. Embedders that don't\n * host an image-proxy route leave this undefined → images load\n * directly cross-origin (CORS-permitting). */\n imageProxyUrlPrefix?: string;\n /** Optional list of hostnames that should bypass the image proxy\n * (rendered direct). Hub uses ['openmsp.ai']; embedders typically\n * leave it unset. Matches the `skipDomains` parameter of\n * `getProxiedImageUrl`. */\n imageProxySkipDomains?: string[];\n /** Optional base URL for the branded og-placeholder image route — the\n * DEFAULT cover-image fallback for entity cards with no image. The lib\n * appends `?title=…` (+ `w`/`h` for square slots) itself, so this is\n * the base, NOT a full URL: relative (`/api/og-placeholder`) for same-\n * origin hosts, or the proxied path (`/content/api/og-placeholder`) for\n * cross-origin embedders. May carry baked-in query params (preserved when\n * the lib layers `title`/dimensions on top) — but per-platform brand\n * colors are NO LONGER baked here; the `/api/og-placeholder` route\n * resolves them server-side from the platform. Most hosts leave this unset\n * and let the lib derive the base from `imageProxyUrlPrefix`.\n *\n * OPTIONAL — when unset the lib derives the base from the sibling\n * `imageProxyUrlPrefix` (same API base, route name swapped), then falls\n * back to the relative `/api/og-placeholder`. So an embedder that already\n * proxies images needs NO og-placeholder wiring. See\n * `resolveOgPlaceholderBase` / `buildOgPlaceholderUrl` in `../utils`. */\n ogPlaceholderUrl?: string;\n /** Base URL prefix for the captions route (`/api/captions` — the native\n * `<track>` VTT endpoint every video surface uses since captions stopped\n * being burned into video pixels). Plain path base, no query params.\n * Embedders point it at their proxied route (e.g. `/content/api/captions`);\n * unset ⇒ the same-origin relative `/api/captions` (the hub). Consumed via\n * `getEntityCaptionUrls` / `rebaseCaptionsUrl` in\n * `components/features/captions-url.ts`. */\n captionsUrlPrefix?: string;\n /** Supabase storage origin (e.g. `https://xyz.supabase.co`) — used\n * by `useVideoWarmup` to scope the `<link rel=\"preload\" as=\"video\">`\n * hint to MP4s the deployment actually hosts. Hub wires it via\n * `getSupabaseStorageOrigin()`; embedders without a Supabase\n * storage origin leave it unset (preload is then skipped; Mux/\n * YouTube preconnect still fires). */\n supabaseStorageOrigin?: string;\n };\n navigation: {\n /** ONE knob, two behaviors:\n * - 'host' = use the host page's existing click-routing untouched.\n * The chat panel calls `navigate?.()` for in-app routing.\n * - 'embed' = guest inside another app: short-circuit at the top\n * of click handlers to force new-tab + absolutize via\n * resolveExternalNavigation. */\n mode: 'host' | 'embed';\n /** Embed-only fallback origin for relative URLs whose target platform\n * can't be inferred. Used by resolveExternalNavigation when\n * `targetPlatform` is null — without this, a relative `/foo` href would\n * window.open against the embedder's origin, which is WRONG.\n * Set to your content host (e.g. 'https://hub.openframe.ai').\n * Required by the embedded app whenever mode='embed'. */\n defaultContentOrigin?: string;\n /** Override for opening external URLs. MUST BE SYNCHRONOUS —\n * Safari/Firefox block popups opened outside a direct user gesture.\n * Default: window.open(href, '_blank', 'noopener,noreferrer'). */\n openExternal?: (href: string) => void;\n /** Optional in-app navigation callback (host-mode only).\n * Returns `true` if the host handled the click in-app\n * (router.push + docNav.navigate); returns `false`, `undefined`,\n * or `void` → lib falls back to window.location.assign(href).\n * Hub wires this via HubRuntimeProvider's HubNavigationWiring;\n * embedders not in Next.js leave it undefined. */\n navigate?: (input: { href: string; path?: string | null; targetPlatform?: string | null }) => boolean | void;\n /** Optional new-tab decision callback. Returns true → lib opens in\n * new tab; false → same tab via `navigate`. Hub wires the existing\n * `decideNewTab` logic from use-nav-link.tsx (re-imports the pure\n * helper from lib). Embedders may omit; lib defaults to:\n * same-origin/same-platform → same tab, else new tab. */\n decideNewTab?: (args: { href: string; targetPlatform?: string | null }) => boolean;\n };\n /** Optional content-URL composer. Returns the platform-aware href +\n * target-platform tuple for a content entity. Hub wires this to its\n * `buildContentURL(type, slug, extractPrimaryPlatform(platforms))`\n * pipeline so the lib catalog/detail views can derive cross-\n * platform hrefs without knowing the hub's platform topology\n * (openmsp.ai / openframe.app / flamingo.run / tmcg).\n *\n * THE single content-href authority for every embeddable surface — page\n * views (onboarding catalog/detail, releases) AND chat cards / chips /\n * search results all resolve content links through this one seam, so a\n * given type lands in the SAME place regardless of where it's rendered.\n * Embedders wire `makeComposeContentUrl({ hostedTypes, contentOrigin })`;\n * omit it and lib views fall back to a same-origin relative path\n * (`buildDefaultHref`).\n *\n * Takes a single `ComposeContentUrlInput`: `type` + `identifier` (page\n * views pass the slug; chat rows pass the id + `externalUrl`, whose path\n * yields the slug for in-app routing) + optional `platforms` /\n * `externalUrl` / `targetPlatform`. */\n composeContentUrl?: ComposeContentUrl;\n /** Per-`documentType` doc-viewer targets — the UNIFIED, DYNAMIC replacement for\n * the single `chipBasePlatform` prop. Maps a doc-table documentType\n * (`'markdown'`, `'data_room_doc'`, …) → `{ platform, basePath }` for the PUBLIC\n * doc viewer that hosts it. Doc chips with no `externalUrl` resolve PER ROW to\n * `getBaseUrl(platform)/<basePath>/<path>`, so a chat mixing several doc sources\n * sends EACH to its own home (markdown→flamingo/knowledge-base,\n * data_room_doc→company-hub/data-room) instead of one static fallback. The hub\n * may keep using `chipBasePlatform` (one doc source per platform); embedders that\n * surface multiple doc sources wire this. Threaded into `resolveSourceRowCTA`. */\n docPlatformTargets?: Record<string, { platform: string; basePath: string }>;\n /** Chat source / platform identifier — OPTIONAL. The hub sets it from\n * `currentPlatform()`; EMBEDDERS leave it unset and stay platform-agnostic.\n *\n * It is NOT required for chat to work. The wire resolves source server-side\n * (`/docs/chat|search|commands` reject any client `source`); the\n * same-tab-vs-new-tab link decision falls back to an origin comparison when\n * it's absent (`decideNewTab` → `isCrossOriginUrl`); and the localStorage\n * history namespace falls back to a stable constant. Set it only where the\n * client legitimately needs to know its platform a priori — i.e. the hub,\n * where several platforms share related origins so \"same platform\" can't be\n * inferred from a URL alone. */\n source?: string;\n // NOTE: No `user` field. The chat's display identity (greeting\n // first-name, etc.) comes from the SERVER-resolved auth via\n // `useChatIdentity()` — the same identity the server uses to\n // authorize requests. Letting embedders pass a client-side `user`\n // would let it desync from the actual auth tier, causing greetings\n // like \"Hey Bob\" while the server treats the session as\n // alice@example.com. Single source of truth: the server.\n}\n\nexport const ChatRuntimeContext = createContext<ChatRuntime | null>(null);\n\n/**\n * Returns the active runtime, or null when no provider is mounted.\n * NULL is a first-class value — it signals \"no chat runtime configured.\"\n * Optional consumers fall back to no-op behavior; strict consumers\n * use `useRequiredChatRuntime` (below).\n */\nexport function useChatRuntime(): ChatRuntime | null {\n return useContext(ChatRuntimeContext);\n}\n\n/**\n * Strict variant used INSIDE the chat panel. Throws if no provider.\n * The hub guarantees one exists by mounting `<HubRuntimeProvider>` at\n * root; the embedded app mounts its own `<ChatRuntimeContext.Provider>`\n * at the tree root. In Jest / Storybook tests that render chat\n * internals directly, wrap with `<HubRuntimeProvider>` (hub defaults)\n * or supply `<ChatRuntimeContext.Provider value={mockedRuntime}>`.\n */\nexport function useRequiredChatRuntime(): ChatRuntime {\n const v = useContext(ChatRuntimeContext);\n if (!v) {\n throw new Error(\n '[chat-runtime] hook called outside a <ChatRuntimeContext.Provider>. ' +\n 'The hub mounts <HubRuntimeProvider> at root — this only fires when ' +\n 'chat internals are rendered above the provider tree. ' +\n 'Fix: ensure the rendering subtree descends from the runtime provider. ' +\n 'In tests/Storybook: wrap with <HubRuntimeProvider> or supply ' +\n 'a <ChatRuntimeContext.Provider value={mockedRuntime}>.',\n );\n }\n return v;\n}\n"],"mappings":";;;AAmCA,SAAS,eAAe,kBAAkB;AAgPnC,IAAM,qBAAqB,cAAkC,IAAI;AAQjE,SAAS,iBAAqC;AACnD,SAAO,WAAW,kBAAkB;AACtC;AAUO,SAAS,yBAAsC;AACpD,QAAM,IAAI,WAAW,kBAAkB;AACvC,MAAI,CAAC,GAAG;AACN,UAAM,IAAI;AAAA,MACR;AAAA,IAMF;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
@@ -3,16 +3,16 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkJVZVVZOZcjs = require('./chunk-JVZVVZOZ.cjs');
6
+ var _chunk5DORSDXAcjs = require('./chunk-5DORSDXA.cjs');
7
7
 
8
8
 
9
9
 
10
10
 
11
- var _chunkV2QK5W3Ocjs = require('./chunk-V2QK5W3O.cjs');
11
+ var _chunkL64FTMMLcjs = require('./chunk-L64FTMML.cjs');
12
12
 
13
13
 
14
14
 
15
- var _chunkP24VPJTTcjs = require('./chunk-P24VPJTT.cjs');
15
+ var _chunkLT6GIGMZcjs = require('./chunk-LT6GIGMZ.cjs');
16
16
 
17
17
 
18
18
 
@@ -22,10 +22,10 @@ var _chunkP24VPJTTcjs = require('./chunk-P24VPJTT.cjs');
22
22
 
23
23
 
24
24
 
25
- var _chunkQIKBISZMcjs = require('./chunk-QIKBISZM.cjs');
25
+ var _chunk4ZAQSPCQcjs = require('./chunk-4ZAQSPCQ.cjs');
26
26
 
27
27
 
28
- var _chunkH64ZHSYRcjs = require('./chunk-H64ZHSYR.cjs');
28
+ var _chunkCCWI3622cjs = require('./chunk-CCWI3622.cjs');
29
29
 
30
30
 
31
31
 
@@ -37,7 +37,7 @@ var _chunkYXWGSDK4cjs = require('./chunk-YXWGSDK4.cjs');
37
37
  var _chunkSADRZ4YIcjs = require('./chunk-SADRZ4YI.cjs');
38
38
 
39
39
 
40
- var _chunkRDTOMWDNcjs = require('./chunk-RDTOMWDN.cjs');
40
+ var _chunkUPKZU6QUcjs = require('./chunk-UPKZU6QU.cjs');
41
41
 
42
42
 
43
43
  var _chunk23V5BSHDcjs = require('./chunk-23V5BSHD.cjs');
@@ -192,12 +192,12 @@ function toResolveLinkResult(body) {
192
192
  };
193
193
  }
194
194
  function useDocsResolveLink(sourceId, resolveLinkEndpoint) {
195
- const chatRuntime = _chunkRDTOMWDNcjs.useChatRuntime.call(void 0, );
195
+ const chatRuntime = _chunkUPKZU6QUcjs.useChatRuntime.call(void 0, );
196
196
  const resolvedResolveLinkEndpoint = _nullishCoalesce(_nullishCoalesce(resolveLinkEndpoint, () => ( _optionalChain([chatRuntime, 'optionalAccess', _2 => _2.endpoints, 'access', _3 => _3.docsResolveLinkUrl]))), () => ( "/api/docs/resolve-link"));
197
197
  return _react.useCallback.call(void 0,
198
198
  async (href, currentPath) => {
199
199
  try {
200
- const response = await _chunkH64ZHSYRcjs.contentFetch.call(void 0, resolvedResolveLinkEndpoint, {
200
+ const response = await _chunkCCWI3622cjs.contentFetch.call(void 0, resolvedResolveLinkEndpoint, {
201
201
  method: "POST",
202
202
  headers: { "Content-Type": "application/json" },
203
203
  body: JSON.stringify({ link: href, currentPath, source: sourceId })
@@ -324,8 +324,8 @@ function toDocContent(value, requestedPath) {
324
324
  }
325
325
  function useDocumentTree(config, initialPath) {
326
326
  const { structureEndpoint, contentEndpoint, baseRoute } = config;
327
- const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => ( _chunkQIKBISZMcjs.DEFAULT_FOLDER_INDEX_FILE));
328
- const cleanInitialPath = _chunkQIKBISZMcjs.stripFolderIndexFromPath.call(void 0, _optionalChain([initialPath, 'optionalAccess', _4 => _4.replace, 'call', _5 => _5(/\/$/, "")]) || "", folderIndexFile);
327
+ const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => ( _chunk4ZAQSPCQcjs.DEFAULT_FOLDER_INDEX_FILE));
328
+ const cleanInitialPath = _chunk4ZAQSPCQcjs.stripFolderIndexFromPath.call(void 0, _optionalChain([initialPath, 'optionalAccess', _4 => _4.replace, 'call', _5 => _5(/\/$/, "")]) || "", folderIndexFile);
329
329
  const [structure, setStructure] = _react.useState.call(void 0, []);
330
330
  const [selectedPath, setSelectedPath] = _react.useState.call(void 0, cleanInitialPath);
331
331
  const [content, setContent] = _react.useState.call(void 0, null);
@@ -349,12 +349,12 @@ function useDocumentTree(config, initialPath) {
349
349
  } else if (pathname.startsWith(`${normalizedBaseRoute}/`)) {
350
350
  pathFromUrl = pathname.substring(`${normalizedBaseRoute}/`.length);
351
351
  }
352
- pathFromUrl = _chunkQIKBISZMcjs.stripFolderIndexFromPath.call(void 0, pathFromUrl, folderIndexFile);
352
+ pathFromUrl = _chunk4ZAQSPCQcjs.stripFolderIndexFromPath.call(void 0, pathFromUrl, folderIndexFile);
353
353
  if (pathFromUrl !== selectedPathRef.current) {
354
354
  setSelectedPath(pathFromUrl);
355
355
  if (pathFromUrl) {
356
356
  const parentPath = pathFromUrl.includes("/") ? pathFromUrl.substring(0, pathFromUrl.lastIndexOf("/")) : pathFromUrl;
357
- setExpandedNodes(new Set(_chunkQIKBISZMcjs.getDocAncestorNodeIds.call(void 0, parentPath)));
357
+ setExpandedNodes(new Set(_chunk4ZAQSPCQcjs.getDocAncestorNodeIds.call(void 0, parentPath)));
358
358
  }
359
359
  setTimeout(() => {
360
360
  scrollToContent();
@@ -372,7 +372,7 @@ function useDocumentTree(config, initialPath) {
372
372
  setSelectedPath(cleanInitialPath);
373
373
  if (cleanInitialPath) {
374
374
  const parentPath = cleanInitialPath.includes("/") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
375
- setExpandedNodes(new Set(_chunkQIKBISZMcjs.getDocAncestorNodeIds.call(void 0, parentPath)));
375
+ setExpandedNodes(new Set(_chunk4ZAQSPCQcjs.getDocAncestorNodeIds.call(void 0, parentPath)));
376
376
  }
377
377
  setExternalNavCount((n) => n + 1);
378
378
  }
@@ -386,7 +386,7 @@ function useDocumentTree(config, initialPath) {
386
386
  try {
387
387
  setIsLoadingStructure(true);
388
388
  setError(null);
389
- const response = await _chunkH64ZHSYRcjs.contentFetch.call(void 0, structureEndpoint);
389
+ const response = await _chunkCCWI3622cjs.contentFetch.call(void 0, structureEndpoint);
390
390
  if (!response.ok) {
391
391
  throw new Error("Failed to load documentation structure");
392
392
  }
@@ -397,7 +397,7 @@ function useDocumentTree(config, initialPath) {
397
397
  if (cleanInitialPath) {
398
398
  const pathForExpansion = cleanInitialPath.includes(".") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
399
399
  if (pathForExpansion) {
400
- setExpandedNodes(new Set(_chunkQIKBISZMcjs.getDocAncestorNodeIds.call(void 0, pathForExpansion)));
400
+ setExpandedNodes(new Set(_chunk4ZAQSPCQcjs.getDocAncestorNodeIds.call(void 0, pathForExpansion)));
401
401
  }
402
402
  } else if (nodes.length > 0) {
403
403
  const hasRootReadme = nodes.some((node) => node.type === "file" && node.path === folderIndexFile);
@@ -425,7 +425,7 @@ function useDocumentTree(config, initialPath) {
425
425
  const fetchContent = async (path) => {
426
426
  try {
427
427
  setIsLoadingContent(true);
428
- const response = await _chunkH64ZHSYRcjs.contentFetch.call(void 0, `${contentEndpoint}?path=${encodeURIComponent(path)}`);
428
+ const response = await _chunkCCWI3622cjs.contentFetch.call(void 0, `${contentEndpoint}?path=${encodeURIComponent(path)}`);
429
429
  if (path !== lastFetchedPath.current) return;
430
430
  if (!response.ok) {
431
431
  if (response.status === 404) {
@@ -437,7 +437,7 @@ function useDocumentTree(config, initialPath) {
437
437
  setContent(null);
438
438
  return;
439
439
  }
440
- const probe = _chunkQIKBISZMcjs.findDocNodeByPath.call(void 0, _chunkQIKBISZMcjs.stripFolderIndexFromPath.call(void 0, path, folderIndexFile), structure);
440
+ const probe = _chunk4ZAQSPCQcjs.findDocNodeByPath.call(void 0, _chunk4ZAQSPCQcjs.stripFolderIndexFromPath.call(void 0, path, folderIndexFile), structure);
441
441
  const probeIsNoReadmeFolder = !!probe && probe.type === "folder" && !probe.hasReadme;
442
442
  const preStructureFolderLike = structure.length === 0 && !path.endsWith(".md");
443
443
  if (probeIsNoReadmeFolder || preStructureFolderLike) {
@@ -494,7 +494,7 @@ function useDocumentTree(config, initialPath) {
494
494
  if (selectedPath === "") {
495
495
  pathToFetch = folderIndexFile;
496
496
  } else {
497
- const node = _chunkQIKBISZMcjs.findDocNodeByPath.call(void 0, selectedPath, structure);
497
+ const node = _chunk4ZAQSPCQcjs.findDocNodeByPath.call(void 0, selectedPath, structure);
498
498
  if (node && node.type === "folder" && !node.hasReadme) {
499
499
  const firstDocPath = findFirstDocPath(node);
500
500
  if (!firstDocPath) {
@@ -535,16 +535,16 @@ function useDocumentTree(config, initialPath) {
535
535
  if (node.type === "folder") {
536
536
  setExpandedNodes((prev) => {
537
537
  if (prev.has(node.id)) {
538
- const ancestorIds = _chunkQIKBISZMcjs.getDocAncestorNodeIds.call(void 0, node.path);
538
+ const ancestorIds = _chunk4ZAQSPCQcjs.getDocAncestorNodeIds.call(void 0, node.path);
539
539
  ancestorIds.pop();
540
540
  return new Set(ancestorIds);
541
541
  }
542
- return new Set(_chunkQIKBISZMcjs.getDocAncestorNodeIds.call(void 0, node.path));
542
+ return new Set(_chunk4ZAQSPCQcjs.getDocAncestorNodeIds.call(void 0, node.path));
543
543
  });
544
544
  } else {
545
545
  const lastSlash = node.path.lastIndexOf("/");
546
546
  if (lastSlash > 0) {
547
- setExpandedNodes(new Set(_chunkQIKBISZMcjs.getDocAncestorNodeIds.call(void 0, node.path.substring(0, lastSlash))));
547
+ setExpandedNodes(new Set(_chunk4ZAQSPCQcjs.getDocAncestorNodeIds.call(void 0, node.path.substring(0, lastSlash))));
548
548
  }
549
549
  }
550
550
  lastFetchedPath.current = null;
@@ -559,7 +559,7 @@ function useDocumentTree(config, initialPath) {
559
559
  const hashIndex = path.indexOf("#");
560
560
  const anchor = hashIndex !== -1 ? path.substring(hashIndex) : "";
561
561
  const cleanPath = path.replace(/\/$/, "").split("#")[0];
562
- const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _6 => _6.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current : _chunkQIKBISZMcjs.stripFolderIndexFromPath.call(void 0, cleanPath, folderIndexFile);
562
+ const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _6 => _6.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current : _chunk4ZAQSPCQcjs.stripFolderIndexFromPath.call(void 0, cleanPath, folderIndexFile);
563
563
  if (anchor && _optionalChain([options, 'optionalAccess', _7 => _7.fromInternalLink]) && pathForSelection === selectedPathRef.current) {
564
564
  _chunkYXWGSDK4cjs.navigateSamePageHash.call(void 0, anchor, { headerOffset: _chunkYXWGSDK4cjs.HUB_HEADER_OFFSET_PX });
565
565
  return;
@@ -623,15 +623,15 @@ function useDocumentTree(config, initialPath) {
623
623
  return docNavigation.register({
624
624
  baseRoute: normalizedBaseRoute,
625
625
  findNodeByPath: (path) => {
626
- const clean = _chunkQIKBISZMcjs.stripFolderIndexFromPath.call(void 0, path.replace(/\/$/, "").split("#")[0], folderIndexFile);
627
- return _nullishCoalesce(_chunkQIKBISZMcjs.findDocNodeByPath.call(void 0, clean, structure), () => ( null));
626
+ const clean = _chunk4ZAQSPCQcjs.stripFolderIndexFromPath.call(void 0, path.replace(/\/$/, "").split("#")[0], folderIndexFile);
627
+ return _nullishCoalesce(_chunk4ZAQSPCQcjs.findDocNodeByPath.call(void 0, clean, structure), () => ( null));
628
628
  },
629
629
  selectNode
630
630
  });
631
631
  }, [docNavigation, normalizedBaseRoute, structure, selectNode, folderIndexFile]);
632
632
  const isEmptyFolder = _react.useMemo.call(void 0, () => {
633
633
  if (!selectedPath || structure.length === 0) return false;
634
- const node = _chunkQIKBISZMcjs.findDocNodeByPath.call(void 0, selectedPath, structure);
634
+ const node = _chunk4ZAQSPCQcjs.findDocNodeByPath.call(void 0, selectedPath, structure);
635
635
  return !!node && node.type === "folder" && !node.hasReadme && !findFirstDocPath(node);
636
636
  }, [selectedPath, structure]);
637
637
  return {
@@ -767,7 +767,7 @@ function DocViewerContent({
767
767
  label: _nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _16 => _16.label]), () => ( "Back to home")),
768
768
  onClick: () => router.push(_nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _17 => _17.href]), () => ( "/")))
769
769
  };
770
- const docSearch = _chunkP24VPJTTcjs.useDocSearch.call(void 0, {
770
+ const docSearch = _chunkLT6GIGMZcjs.useDocSearch.call(void 0, {
771
771
  source: chatSource,
772
772
  baseRoute,
773
773
  searchEndpoint,
@@ -791,7 +791,7 @@ function DocViewerContent({
791
791
  onResolveLink: resolveLink
792
792
  });
793
793
  }, [content, renderContent, navigateToDoc, sourceId, resolveLink]);
794
- const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([_chunkQIKBISZMcjs.findDocNodeByPath.call(void 0, selectedPath, structure), 'optionalAccess', _18 => _18.documentType]) : void 0;
794
+ const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([_chunk4ZAQSPCQcjs.findDocNodeByPath.call(void 0, selectedPath, structure), 'optionalAccess', _18 => _18.documentType]) : void 0;
795
795
  const activeDocType = _nullishCoalesce(_optionalChain([content, 'optionalAccess', _19 => _19.documentType]), () => ( selectedNodeDocType));
796
796
  const isMarkdownContent = !activeDocType || activeDocType === "markdown";
797
797
  const showStickyNav = isMarkdownContent;
@@ -802,9 +802,9 @@ function DocViewerContent({
802
802
  const containerBgStyle = colorPalette.containerBackground !== "transparent" ? { backgroundColor: colorPalette.containerBackground } : {};
803
803
  const defaultEmptyText = structure.length > 0 ? "Select a document from the sidebar to view" : "No documents yet. Add content from the admin panel.";
804
804
  const resolvedEmptyText = emptyStateText || defaultEmptyText;
805
- const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQIKBISZMcjs.PageLayout, { title, subtitle, titleSize: "h1", titleWrap: true, backButton: _nullishCoalesce(backCfg, () => ( void 0)), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-10", children: [
805
+ const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4ZAQSPCQcjs.PageLayout, { title, subtitle, titleSize: "h1", titleWrap: true, backButton: _nullishCoalesce(backCfg, () => ( void 0)), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-10", children: [
806
806
  showAIChat && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
807
- _chunkP24VPJTTcjs.DocSearchBar,
807
+ _chunkLT6GIGMZcjs.DocSearchBar,
808
808
  {
809
809
  placeholder: `Search ${_optionalChain([sidebarLabel, 'optionalAccess', _23 => _23.toLowerCase, 'call', _24 => _24()]) || "documents"}...`,
810
810
  query: docSearch.query,
@@ -823,9 +823,9 @@ function DocViewerContent({
823
823
  ] })
824
824
  ] }) }),
825
825
  !error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-1 flex-col items-start gap-6 lg:flex-row lg:gap-10", children: [
826
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full lg:w-[320px] lg:shrink-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "lg:sticky lg:top-20", children: isLoadingStructure ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQIKBISZMcjs.CategorySidebarSkeleton, {}) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
826
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full lg:w-[320px] lg:shrink-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "lg:sticky lg:top-20", children: isLoadingStructure ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4ZAQSPCQcjs.CategorySidebarSkeleton, {}) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
827
827
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PersistentMobileDropdown, { isLoading: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
828
- _chunkV2QK5W3Ocjs.MobileNavigationDropdown,
828
+ _chunkL64FTMMLcjs.MobileNavigationDropdown,
829
829
  {
830
830
  nodes: structure,
831
831
  selectedPath,
@@ -839,7 +839,7 @@ function DocViewerContent({
839
839
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PersistentSidebar, { isLoading: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hidden lg:block", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
840
840
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-ods-text-secondary text-h5", children: sidebarLabel }),
841
841
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
842
- _chunkV2QK5W3Ocjs.MultiLevelNavigation,
842
+ _chunkL64FTMMLcjs.MultiLevelNavigation,
843
843
  {
844
844
  nodes: structure,
845
845
  selectedPath,
@@ -878,7 +878,7 @@ function DocViewerContent({
878
878
  showStickyNav && content && stickyNavSections.length > 0 && !isLoadingContent && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hidden lg:block", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "sticky top-24", children: [
879
879
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-4 font-semibold text-ods-text-secondary text-h5", children: "ON THIS PAGE" }),
880
880
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
881
- _chunkV2QK5W3Ocjs.StickySectionNav,
881
+ _chunkL64FTMMLcjs.StickySectionNav,
882
882
  {
883
883
  sections: stickyNavSections,
884
884
  activeSection,
@@ -893,7 +893,7 @@ function DocViewerContent({
893
893
  ) })
894
894
  ] })
895
895
  ] }) }) });
896
- return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQIKBISZMcjs.PageShell, { contentClassName: `${bgClass} ${className}`, children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `page-shell-content ${bgClass} ${className}`.trim(), children: inner });
896
+ return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4ZAQSPCQcjs.PageShell, { contentClassName: `${bgClass} ${className}`, children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `page-shell-content ${bgClass} ${className}`.trim(), children: inner });
897
897
  }
898
898
 
899
899
  // src/components/docs/skeletons.tsx
@@ -983,11 +983,11 @@ function EmbedSkeleton({ documentType } = {}) {
983
983
 
984
984
  var DEFAULT_TITLE = "Documents";
985
985
  var defaultFallbackRenderer = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "py-16 text-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary", children: "Unsupported document type" }) });
986
- var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJVZVVZOZcjs.PdfViewer, { src: content.fileUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
987
- var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJVZVVZOZcjs.GoogleSheetsViewer, { externalUrl: content.externalUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
988
- var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQIKBISZMcjs.FigmaEmbed, { url: content.externalUrl, title: content.fileName, loading: "eager" }) : defaultFallbackRenderer(content, handlers);
986
+ var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5DORSDXAcjs.PdfViewer, { src: content.fileUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
987
+ var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5DORSDXAcjs.GoogleSheetsViewer, { externalUrl: content.externalUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
988
+ var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4ZAQSPCQcjs.FigmaEmbed, { url: content.externalUrl, title: content.fileName, loading: "eager" }) : defaultFallbackRenderer(content, handlers);
989
989
  var defaultFileRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
990
- _chunkJVZVVZOZcjs.FileDownloadCard,
990
+ _chunk5DORSDXAcjs.FileDownloadCard,
991
991
  {
992
992
  fileName: content.fileName,
993
993
  mimeType: content.mimeType,
@@ -1050,4 +1050,4 @@ function DocsHubPage({
1050
1050
 
1051
1051
 
1052
1052
  exports.PersistentFilterControls = PersistentFilterControls; exports.PersistentSearchContainer = PersistentSearchContainer; exports.PersistentSidebar = PersistentSidebar; exports.PersistentMobileDropdown = PersistentMobileDropdown; exports.DocNavigationProvider = DocNavigationProvider; exports.useDocNavigation = useDocNavigation; exports.useDocumentTree = useDocumentTree; exports.useScrollSpy = useScrollSpy; exports.DocViewer = DocViewer; exports.MarkdownSkeleton = MarkdownSkeleton; exports.EmbedSkeleton = EmbedSkeleton; exports.DocsHubPage = DocsHubPage;
1053
- //# sourceMappingURL=chunk-DAPOBLAK.cjs.map
1053
+ //# sourceMappingURL=chunk-YEO6W4CT.cjs.map