@flamingo-stack/openframe-frontend-core 0.0.295 → 0.0.296-snapshot.20260621021605

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 (291) hide show
  1. package/README.md +9 -0
  2. package/dist/{chunk-7RIYT7ZH.js → chunk-2QG57XOJ.js} +1067 -205
  3. package/dist/chunk-2QG57XOJ.js.map +1 -0
  4. package/dist/{chunk-7KXD7CWD.js → chunk-3JIQVE7T.js} +9 -15
  5. package/dist/{chunk-7KXD7CWD.js.map → chunk-3JIQVE7T.js.map} +1 -1
  6. package/dist/{chunk-FT4FCV7L.cjs → chunk-4PSQS3SW.cjs} +7 -9
  7. package/dist/chunk-4PSQS3SW.cjs.map +1 -0
  8. package/dist/{chunk-OOKKGOPQ.js → chunk-4TLE6VLU.js} +30 -24
  9. package/dist/chunk-4TLE6VLU.js.map +1 -0
  10. package/dist/{chunk-6IBA2MQV.cjs → chunk-53FUMSZ5.cjs} +40 -46
  11. package/dist/chunk-53FUMSZ5.cjs.map +1 -0
  12. package/dist/{chunk-D3LEFMOA.cjs → chunk-54KNMC2R.cjs} +3 -3
  13. package/dist/{chunk-D3LEFMOA.cjs.map → chunk-54KNMC2R.cjs.map} +1 -1
  14. package/dist/{chunk-EYEW6PTA.cjs → chunk-6C526VNN.cjs} +358 -118
  15. package/dist/chunk-6C526VNN.cjs.map +1 -0
  16. package/dist/{chunk-5O6N3BKR.cjs → chunk-7OVGB2DQ.cjs} +19 -25
  17. package/dist/chunk-7OVGB2DQ.cjs.map +1 -0
  18. package/dist/{chunk-6GCI7JOE.js → chunk-AD6C23QY.js} +8 -7
  19. package/dist/{chunk-6GCI7JOE.js.map → chunk-AD6C23QY.js.map} +1 -1
  20. package/dist/chunk-F5OB2YAL.cjs +144 -0
  21. package/dist/chunk-F5OB2YAL.cjs.map +1 -0
  22. package/dist/chunk-FBWXMMRB.cjs +2 -0
  23. package/dist/chunk-FBWXMMRB.cjs.map +1 -0
  24. package/dist/{chunk-YIGPRLQY.cjs → chunk-FCDQNTDG.cjs} +21 -20
  25. package/dist/chunk-FCDQNTDG.cjs.map +1 -0
  26. package/dist/{chunk-XXI7BNB6.cjs → chunk-FQOTC3UU.cjs} +321 -18
  27. package/dist/chunk-FQOTC3UU.cjs.map +1 -0
  28. package/dist/{chunk-INDQMNP6.cjs → chunk-GUTS7HGA.cjs} +11658 -2146
  29. package/dist/chunk-GUTS7HGA.cjs.map +1 -0
  30. package/dist/chunk-GZ4C3XW6.js +2 -0
  31. package/dist/chunk-GZ4C3XW6.js.map +1 -0
  32. package/dist/{chunk-HOVJGXF7.js → chunk-IL47XWV5.js} +8 -14
  33. package/dist/{chunk-HOVJGXF7.js.map → chunk-IL47XWV5.js.map} +1 -1
  34. package/dist/{chunk-LCNMR277.js → chunk-IZ7JSBFP.js} +1 -1
  35. package/dist/chunk-IZ7JSBFP.js.map +1 -0
  36. package/dist/{chunk-5IJ46KAV.js → chunk-JALO4TAZ.js} +360 -57
  37. package/dist/chunk-JALO4TAZ.js.map +1 -0
  38. package/dist/{chunk-AQOWFSMB.cjs → chunk-L6PSSIUQ.cjs} +1 -1
  39. package/dist/chunk-L6PSSIUQ.cjs.map +1 -0
  40. package/dist/{chunk-J3RDKZ32.js → chunk-L7ULJKG7.js} +6 -10
  41. package/dist/{chunk-J3RDKZ32.js.map → chunk-L7ULJKG7.js.map} +1 -1
  42. package/dist/{chunk-6BZEAPNT.js → chunk-PC746XCO.js} +15120 -5608
  43. package/dist/chunk-PC746XCO.js.map +1 -0
  44. package/dist/{chunk-3ZXUQQL4.js → chunk-PI4WSYQV.js} +2 -2
  45. package/dist/{chunk-E4XABBSU.js → chunk-PWQUAVA3.js} +338 -98
  46. package/dist/chunk-PWQUAVA3.js.map +1 -0
  47. package/dist/chunk-SA2WPJVO.js +144 -0
  48. package/dist/chunk-SA2WPJVO.js.map +1 -0
  49. package/dist/{chunk-ETACGX2A.cjs → chunk-UNVE2SDJ.cjs} +37 -31
  50. package/dist/chunk-UNVE2SDJ.cjs.map +1 -0
  51. package/dist/{chunk-5E2HOSSH.cjs → chunk-WMSTJAZT.cjs} +913 -51
  52. package/dist/chunk-WMSTJAZT.cjs.map +1 -0
  53. package/dist/{chunk-EJXHZX2E.js → chunk-X4DOXQRT.js} +4 -6
  54. package/dist/{chunk-EJXHZX2E.js.map → chunk-X4DOXQRT.js.map} +1 -1
  55. package/dist/{chunk-A2YL7QRX.cjs → chunk-YBYI62OE.cjs} +33 -37
  56. package/dist/chunk-YBYI62OE.cjs.map +1 -0
  57. package/dist/components/case-studies/index.cjs +126 -0
  58. package/dist/components/case-studies/index.cjs.map +1 -0
  59. package/dist/components/case-studies/index.d.ts +2 -0
  60. package/dist/components/case-studies/index.d.ts.map +1 -0
  61. package/dist/components/case-studies/index.js +126 -0
  62. package/dist/components/case-studies/index.js.map +1 -0
  63. package/dist/components/case-studies/share-experience-section.d.ts +48 -0
  64. package/dist/components/case-studies/share-experience-section.d.ts.map +1 -0
  65. package/dist/components/chat/chat-container.d.ts.map +1 -1
  66. package/dist/components/chat/error-message-display.d.ts.map +1 -1
  67. package/dist/components/chat/index.cjs +8 -18
  68. package/dist/components/chat/index.cjs.map +1 -1
  69. package/dist/components/chat/index.js +75 -85
  70. package/dist/components/chat/types/component.types.d.ts +2 -0
  71. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  72. package/dist/components/contact/index.cjs +8 -15
  73. package/dist/components/contact/index.cjs.map +1 -1
  74. package/dist/components/contact/index.js +7 -14
  75. package/dist/components/docs/doc-viewer.d.ts +39 -2
  76. package/dist/components/docs/doc-viewer.d.ts.map +1 -1
  77. package/dist/components/docs/docs-hub-page.d.ts +46 -0
  78. package/dist/components/docs/docs-hub-page.d.ts.map +1 -0
  79. package/dist/components/docs/index.cjs +17 -9
  80. package/dist/components/docs/index.cjs.map +1 -1
  81. package/dist/components/docs/index.d.ts +4 -0
  82. package/dist/components/docs/index.d.ts.map +1 -1
  83. package/dist/components/docs/index.js +16 -8
  84. package/dist/components/docs/skeletons.d.ts +32 -0
  85. package/dist/components/docs/skeletons.d.ts.map +1 -0
  86. package/dist/components/docs/use-docs-resolve-link.d.ts +20 -0
  87. package/dist/components/docs/use-docs-resolve-link.d.ts.map +1 -0
  88. package/dist/components/docs/use-document-tree.d.ts.map +1 -1
  89. package/dist/components/embeds/embed-container.d.ts +37 -0
  90. package/dist/components/embeds/embed-container.d.ts.map +1 -0
  91. package/dist/components/embeds/embed-iframe.d.ts.map +1 -1
  92. package/dist/components/embeds/file-download-card.d.ts +18 -0
  93. package/dist/components/embeds/file-download-card.d.ts.map +1 -0
  94. package/dist/components/embeds/index.cjs +38 -15
  95. package/dist/components/embeds/index.cjs.map +1 -1
  96. package/dist/components/embeds/index.d.ts +8 -0
  97. package/dist/components/embeds/index.d.ts.map +1 -1
  98. package/dist/components/embeds/index.js +40 -17
  99. package/dist/components/embeds/linkedin-embed-client.d.ts +8 -0
  100. package/dist/components/embeds/linkedin-embed-client.d.ts.map +1 -0
  101. package/dist/components/embeds/markdown-image.d.ts +5 -0
  102. package/dist/components/embeds/markdown-image.d.ts.map +1 -0
  103. package/dist/components/embeds/reddit-embed-client.d.ts +7 -0
  104. package/dist/components/embeds/reddit-embed-client.d.ts.map +1 -0
  105. package/dist/components/embeds/rich-markdown-runtime.d.ts +46 -0
  106. package/dist/components/embeds/rich-markdown-runtime.d.ts.map +1 -0
  107. package/dist/components/embeds/twitter-embed-client.d.ts +8 -0
  108. package/dist/components/embeds/twitter-embed-client.d.ts.map +1 -0
  109. package/dist/components/faq/index.cjs +9 -16
  110. package/dist/components/faq/index.cjs.map +1 -1
  111. package/dist/components/faq/index.js +8 -15
  112. package/dist/components/features/index.cjs +8 -16
  113. package/dist/components/features/index.cjs.map +1 -1
  114. package/dist/components/features/index.js +24 -32
  115. package/dist/components/features/notifications/notification-drawer.d.ts.map +1 -1
  116. package/dist/components/features/notifications/notifications-context.d.ts +5 -1
  117. package/dist/components/features/notifications/notifications-context.d.ts.map +1 -1
  118. package/dist/components/index.cjs +257 -452
  119. package/dist/components/index.cjs.map +1 -1
  120. package/dist/components/index.js +781 -976
  121. package/dist/components/index.js.map +1 -1
  122. package/dist/components/layout/page-header.d.ts +78 -0
  123. package/dist/components/layout/page-header.d.ts.map +1 -0
  124. package/dist/components/layout/page-layout.d.ts +10 -1
  125. package/dist/components/layout/page-layout.d.ts.map +1 -1
  126. package/dist/components/layout/page-with-header.d.ts +67 -0
  127. package/dist/components/layout/page-with-header.d.ts.map +1 -0
  128. package/dist/components/layout/title-block.d.ts +17 -1
  129. package/dist/components/layout/title-block.d.ts.map +1 -1
  130. package/dist/components/navigation/index.cjs +7 -15
  131. package/dist/components/navigation/index.cjs.map +1 -1
  132. package/dist/components/navigation/index.js +9 -17
  133. package/dist/components/onboarding-guides/index.cjs +35 -36
  134. package/dist/components/onboarding-guides/index.cjs.map +1 -1
  135. package/dist/components/onboarding-guides/index.js +13 -14
  136. package/dist/components/onboarding-guides/index.js.map +1 -1
  137. package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts +1 -1
  138. package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts.map +1 -1
  139. package/dist/components/related-content/index.cjs +9 -16
  140. package/dist/components/related-content/index.cjs.map +1 -1
  141. package/dist/components/related-content/index.js +8 -15
  142. package/dist/components/shared/dev-section/dev-section-page.d.ts +9 -0
  143. package/dist/components/shared/dev-section/dev-section-page.d.ts.map +1 -1
  144. package/dist/components/shared/dev-section/dev-section-view.d.ts.map +1 -1
  145. package/dist/components/shared/dev-section/index.d.ts +1 -1
  146. package/dist/components/shared/dev-section/index.d.ts.map +1 -1
  147. package/dist/components/shared/doc-search/use-doc-search.d.ts.map +1 -1
  148. package/dist/components/shared/legal-document/legal-document-page.d.ts.map +1 -1
  149. package/dist/components/shared/product-release/release-detail-page.d.ts.map +1 -1
  150. package/dist/components/tickets/index.cjs +100 -112
  151. package/dist/components/tickets/index.cjs.map +1 -1
  152. package/dist/components/tickets/index.js +20 -32
  153. package/dist/components/tickets/index.js.map +1 -1
  154. package/dist/components/ui/button/split-button.d.ts.map +1 -1
  155. package/dist/components/ui/file-manager/index.cjs +50 -52
  156. package/dist/components/ui/file-manager/index.cjs.map +1 -1
  157. package/dist/components/ui/file-manager/index.js +4 -6
  158. package/dist/components/ui/file-manager/index.js.map +1 -1
  159. package/dist/components/ui/index.cjs +13 -19
  160. package/dist/components/ui/index.cjs.map +1 -1
  161. package/dist/components/ui/index.d.ts +2 -0
  162. package/dist/components/ui/index.d.ts.map +1 -1
  163. package/dist/components/ui/index.js +133 -139
  164. package/dist/components/ui/release-changelog-section.d.ts +6 -2
  165. package/dist/components/ui/release-changelog-section.d.ts.map +1 -1
  166. package/dist/components/ui/rich-markdown-renderer.d.ts +34 -0
  167. package/dist/components/ui/rich-markdown-renderer.d.ts.map +1 -0
  168. package/dist/components/ui/simple-markdown-renderer.d.ts +2 -8
  169. package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
  170. package/dist/contexts/chat-runtime-context.d.ts +14 -0
  171. package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
  172. package/dist/contexts/index.cjs +3 -3
  173. package/dist/contexts/index.js +5 -5
  174. package/dist/embed-shims/index.cjs +3 -3
  175. package/dist/embed-shims/index.cjs.map +1 -1
  176. package/dist/embed-shims/index.js +4 -4
  177. package/dist/hooks/index.cjs +4 -9
  178. package/dist/hooks/index.cjs.map +1 -1
  179. package/dist/hooks/index.js +6 -11
  180. package/dist/index.cjs +14 -20
  181. package/dist/index.cjs.map +1 -1
  182. package/dist/index.js +362 -368
  183. package/dist/types/doc-source.d.ts +31 -1
  184. package/dist/types/doc-source.d.ts.map +1 -1
  185. package/dist/utils/index.cjs +4 -0
  186. package/dist/utils/index.cjs.map +1 -1
  187. package/dist/utils/index.d.ts +1 -0
  188. package/dist/utils/index.d.ts.map +1 -1
  189. package/dist/utils/index.js +4 -1
  190. package/dist/utils/index.js.map +1 -1
  191. package/dist/utils/page-header-constants.d.ts +15 -0
  192. package/dist/utils/page-header-constants.d.ts.map +1 -0
  193. package/dist/utils/social-embed-cache.d.ts +29 -0
  194. package/dist/utils/social-embed-cache.d.ts.map +1 -0
  195. package/package.json +7 -1
  196. package/src/components/case-studies/index.ts +4 -0
  197. package/src/components/case-studies/share-experience-section.tsx +185 -0
  198. package/src/components/chat/chat-container.tsx +5 -7
  199. package/src/components/chat/embeddable-chat.tsx +1 -1
  200. package/src/components/chat/error-message-display.tsx +49 -31
  201. package/src/components/chat/types/component.types.ts +2 -0
  202. package/src/components/docs/doc-viewer.tsx +111 -19
  203. package/src/components/docs/docs-hub-page.tsx +149 -0
  204. package/src/components/docs/index.ts +17 -0
  205. package/src/components/docs/skeletons.tsx +138 -0
  206. package/src/components/docs/use-docs-resolve-link.ts +52 -0
  207. package/src/components/docs/use-document-tree.ts +21 -0
  208. package/src/components/embeds/embed-container.tsx +80 -0
  209. package/src/components/embeds/embed-iframe.tsx +7 -9
  210. package/src/components/embeds/file-download-card.tsx +54 -0
  211. package/src/components/embeds/index.ts +30 -0
  212. package/src/components/embeds/linkedin-embed-client.tsx +100 -0
  213. package/src/components/embeds/markdown-image.tsx +88 -0
  214. package/src/components/embeds/og-link-preview.tsx +13 -13
  215. package/src/components/embeds/reddit-embed-client.tsx +550 -0
  216. package/src/components/embeds/rich-markdown-runtime.tsx +79 -0
  217. package/src/components/embeds/twitter-embed-client.tsx +308 -0
  218. package/src/components/features/notifications/notification-drawer.tsx +18 -7
  219. package/src/components/features/notifications/notifications-context.tsx +7 -0
  220. package/src/components/layout/page-header.tsx +182 -0
  221. package/src/components/layout/page-layout.tsx +14 -1
  222. package/src/components/layout/page-with-header.tsx +110 -0
  223. package/src/components/layout/title-block.tsx +40 -62
  224. package/src/components/onboarding-guides/onboarding-guide-detail-view.tsx +3 -3
  225. package/src/components/shared/dev-section/dev-section-page.tsx +9 -1
  226. package/src/components/shared/dev-section/dev-section-view.tsx +14 -9
  227. package/src/components/shared/dev-section/index.ts +1 -1
  228. package/src/components/shared/doc-search/use-doc-search.ts +7 -3
  229. package/src/components/shared/legal-document/legal-document-page.tsx +2 -2
  230. package/src/components/shared/product-release/release-detail-page.tsx +6 -4
  231. package/src/components/ui/button/split-button.tsx +5 -2
  232. package/src/components/ui/index.ts +2 -0
  233. package/src/components/ui/release-changelog-section.tsx +7 -2
  234. package/src/components/ui/rich-markdown-renderer.tsx +1203 -0
  235. package/src/components/ui/simple-markdown-renderer.tsx +7 -11
  236. package/src/contexts/chat-runtime-context.tsx +14 -0
  237. package/src/stories/NotificationDrawer.stories.tsx +2 -0
  238. package/src/types/doc-source.ts +33 -1
  239. package/src/utils/index.ts +1 -0
  240. package/src/utils/page-header-constants.ts +15 -0
  241. package/src/utils/social-embed-cache.ts +391 -0
  242. package/dist/chunk-26PKDALD.js +0 -2379
  243. package/dist/chunk-26PKDALD.js.map +0 -1
  244. package/dist/chunk-3MCHAFHB.js +0 -89
  245. package/dist/chunk-3MCHAFHB.js.map +0 -1
  246. package/dist/chunk-3XIB4VKS.cjs +0 -619
  247. package/dist/chunk-3XIB4VKS.cjs.map +0 -1
  248. package/dist/chunk-4W7NYJ3B.cjs +0 -3009
  249. package/dist/chunk-4W7NYJ3B.cjs.map +0 -1
  250. package/dist/chunk-5E2HOSSH.cjs.map +0 -1
  251. package/dist/chunk-5IJ46KAV.js.map +0 -1
  252. package/dist/chunk-5O6N3BKR.cjs.map +0 -1
  253. package/dist/chunk-6BZEAPNT.js.map +0 -1
  254. package/dist/chunk-6IBA2MQV.cjs.map +0 -1
  255. package/dist/chunk-6JINAOI7.cjs +0 -311
  256. package/dist/chunk-6JINAOI7.cjs.map +0 -1
  257. package/dist/chunk-7RIYT7ZH.js.map +0 -1
  258. package/dist/chunk-A2YL7QRX.cjs.map +0 -1
  259. package/dist/chunk-AQOWFSMB.cjs.map +0 -1
  260. package/dist/chunk-E4XABBSU.js.map +0 -1
  261. package/dist/chunk-ETACGX2A.cjs.map +0 -1
  262. package/dist/chunk-EYEW6PTA.cjs.map +0 -1
  263. package/dist/chunk-FQJK446R.js +0 -1606
  264. package/dist/chunk-FQJK446R.js.map +0 -1
  265. package/dist/chunk-FT4FCV7L.cjs.map +0 -1
  266. package/dist/chunk-INDQMNP6.cjs.map +0 -1
  267. package/dist/chunk-J54Z3OCR.cjs +0 -1606
  268. package/dist/chunk-J54Z3OCR.cjs.map +0 -1
  269. package/dist/chunk-KXCRGTRN.cjs +0 -2379
  270. package/dist/chunk-KXCRGTRN.cjs.map +0 -1
  271. package/dist/chunk-LCNMR277.js.map +0 -1
  272. package/dist/chunk-LFGGF7OT.cjs +0 -449
  273. package/dist/chunk-LFGGF7OT.cjs.map +0 -1
  274. package/dist/chunk-M2OCXTNT.js +0 -311
  275. package/dist/chunk-M2OCXTNT.js.map +0 -1
  276. package/dist/chunk-NSPOYUBH.js +0 -3009
  277. package/dist/chunk-NSPOYUBH.js.map +0 -1
  278. package/dist/chunk-OOKKGOPQ.js.map +0 -1
  279. package/dist/chunk-OQ6X7ZOC.js +0 -449
  280. package/dist/chunk-OQ6X7ZOC.js.map +0 -1
  281. package/dist/chunk-POKKCWKF.js +0 -354
  282. package/dist/chunk-POKKCWKF.js.map +0 -1
  283. package/dist/chunk-TFSYSWPS.cjs +0 -89
  284. package/dist/chunk-TFSYSWPS.cjs.map +0 -1
  285. package/dist/chunk-XXI7BNB6.cjs.map +0 -1
  286. package/dist/chunk-YD43AKI5.js +0 -619
  287. package/dist/chunk-YD43AKI5.js.map +0 -1
  288. package/dist/chunk-YETA25JW.cjs +0 -354
  289. package/dist/chunk-YETA25JW.cjs.map +0 -1
  290. package/dist/chunk-YIGPRLQY.cjs.map +0 -1
  291. /package/dist/{chunk-3ZXUQQL4.js.map → chunk-PI4WSYQV.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  contentFetch
4
- } from "./chunk-3MCHAFHB.js";
4
+ } from "./chunk-2QG57XOJ.js";
5
5
 
6
6
  // src/hooks/use-self-fetch.ts
7
7
  import { useEffect, useRef, useState } from "react";
@@ -65,4 +65,4 @@ function useSelfFetch(url, options) {
65
65
  export {
66
66
  useSelfFetch
67
67
  };
68
- //# sourceMappingURL=chunk-3ZXUQQL4.js.map
68
+ //# sourceMappingURL=chunk-PI4WSYQV.js.map
@@ -1,25 +1,38 @@
1
1
  "use client";
2
+ import {
3
+ FileDownloadCard,
4
+ GoogleSheetsViewer,
5
+ PdfViewer
6
+ } from "./chunk-SA2WPJVO.js";
2
7
  import {
3
8
  DocSearchBar,
4
9
  useDocSearch
5
- } from "./chunk-6GCI7JOE.js";
10
+ } from "./chunk-AD6C23QY.js";
6
11
  import {
7
12
  DEFAULT_FOLDER_INDEX_FILE,
13
+ FigmaEmbed,
8
14
  MobileNavigationDropdown,
9
15
  MultiLevelNavigation,
16
+ PageHeader,
17
+ PageLayout,
18
+ PageShell,
10
19
  StickySectionNav,
11
20
  findDocNodeByPath,
12
21
  getDocAncestorNodeIds,
13
22
  stripFolderIndexFromPath
14
- } from "./chunk-26PKDALD.js";
23
+ } from "./chunk-PC746XCO.js";
15
24
  import {
16
25
  HUB_HEADER_OFFSET_PX,
17
26
  navigateSamePageHash,
18
27
  scrollElementIntoView
19
- } from "./chunk-OQ6X7ZOC.js";
28
+ } from "./chunk-2QG57XOJ.js";
29
+ import {
30
+ useChatRuntime
31
+ } from "./chunk-IZ7JSBFP.js";
20
32
  import {
21
- PageHeading
22
- } from "./chunk-FQJK446R.js";
33
+ init_next_navigation,
34
+ useRouter
35
+ } from "./chunk-PLJLE4A4.js";
23
36
  import {
24
37
  cn,
25
38
  init_cn
@@ -27,6 +40,7 @@ import {
27
40
 
28
41
  // src/components/docs/doc-viewer.tsx
29
42
  import { useMemo as useMemo2 } from "react";
43
+ init_next_navigation();
30
44
 
31
45
  // src/components/persistent-filter-controls.tsx
32
46
  init_cn();
@@ -1078,6 +1092,15 @@ function useDocumentTree(config, initialPath) {
1078
1092
  window.addEventListener("popstate", handlePopState);
1079
1093
  return () => window.removeEventListener("popstate", handlePopState);
1080
1094
  }, [normalizedBaseRoute, folderIndexFile]);
1095
+ useEffect(() => {
1096
+ if (cleanInitialPath === selectedPathRef.current) return;
1097
+ setSelectedPath(cleanInitialPath);
1098
+ if (cleanInitialPath) {
1099
+ const parentPath = cleanInitialPath.includes("/") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
1100
+ setExpandedNodes(new Set(getDocAncestorNodeIds(parentPath)));
1101
+ }
1102
+ setTimeout(scrollToContent, 150);
1103
+ }, [cleanInitialPath]);
1081
1104
  useEffect(() => {
1082
1105
  if (!isInitialized) {
1083
1106
  const speculativeContentPath = cleanInitialPath || folderIndexFile;
@@ -1387,6 +1410,35 @@ function useScrollSpy(sections) {
1387
1410
  return { activeSection, handleSectionClick };
1388
1411
  }
1389
1412
 
1413
+ // src/components/docs/use-docs-resolve-link.ts
1414
+ import { useCallback as useCallback4 } from "react";
1415
+ function useDocsResolveLink(sourceId, resolveLinkEndpoint) {
1416
+ const chatRuntime = useChatRuntime();
1417
+ const resolvedResolveLinkEndpoint = resolveLinkEndpoint ?? chatRuntime?.endpoints.docsResolveLinkUrl ?? "/api/docs/resolve-link";
1418
+ return useCallback4(
1419
+ async (href, currentPath) => {
1420
+ try {
1421
+ const response = await fetch(resolvedResolveLinkEndpoint, {
1422
+ method: "POST",
1423
+ headers: { "Content-Type": "application/json" },
1424
+ body: JSON.stringify({ link: href, currentPath, source: sourceId })
1425
+ });
1426
+ if (!response.ok) {
1427
+ return { success: false, error: `Resolve failed: ${response.status}` };
1428
+ }
1429
+ const json = await response.json();
1430
+ return json.data ?? json;
1431
+ } catch (error) {
1432
+ return {
1433
+ success: false,
1434
+ error: error instanceof Error ? error.message : "Resolve failed"
1435
+ };
1436
+ }
1437
+ },
1438
+ [resolvedResolveLinkEndpoint, sourceId]
1439
+ );
1440
+ }
1441
+
1390
1442
  // src/components/docs/doc-viewer.tsx
1391
1443
  import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
1392
1444
  var DEFAULT_DOC_VIEWER_PALETTE = {
@@ -1408,19 +1460,26 @@ function DocViewerContent({
1408
1460
  renderSkeleton,
1409
1461
  chatSource,
1410
1462
  title,
1463
+ titleIcon,
1464
+ subtitle,
1465
+ accentDot,
1411
1466
  colorPalette = DEFAULT_DOC_VIEWER_PALETTE,
1412
1467
  className = "",
1413
1468
  docPath,
1414
1469
  sidebarLabel = "DOCUMENTATION",
1415
1470
  structureEndpoint,
1416
1471
  contentEndpoint,
1472
+ searchEndpoint,
1473
+ resolveLinkEndpoint,
1417
1474
  baseRoute,
1418
1475
  emptyStateText,
1419
1476
  showAIChat = false,
1420
- folderIndexFile
1477
+ folderIndexFile,
1478
+ backButton
1421
1479
  }) {
1422
1480
  const resolvedStructureEndpoint = structureEndpoint ?? `/api/docs/sources/${sourceId}/structure`;
1423
1481
  const resolvedContentEndpoint = contentEndpoint ?? `/api/docs/sources/${sourceId}/content`;
1482
+ const resolveLink = useDocsResolveLink(sourceId, resolveLinkEndpoint);
1424
1483
  const {
1425
1484
  structure,
1426
1485
  selectedPath,
@@ -1443,9 +1502,15 @@ function DocViewerContent({
1443
1502
  );
1444
1503
  const { activeSection, handleSectionClick } = useScrollSpy(content?.sections);
1445
1504
  const docNav = useDocNavigation();
1505
+ const router = useRouter();
1506
+ const backCfg = backButton === false ? null : {
1507
+ label: backButton?.label ?? "Back to home",
1508
+ onClick: () => router.push(backButton?.href ?? "/")
1509
+ };
1446
1510
  const docSearch = useDocSearch({
1447
1511
  source: chatSource,
1448
1512
  baseRoute,
1513
+ searchEndpoint,
1449
1514
  onNavigate: (path) => navigateToDoc(path, { fromInternalLink: true }),
1450
1515
  onInPageSwap: (path) => docNav.navigate(path)
1451
1516
  });
@@ -1454,9 +1519,10 @@ function DocViewerContent({
1454
1519
  return renderContent(content, {
1455
1520
  onInternalLinkClick: navigateToDoc,
1456
1521
  currentPath: selectedPath,
1457
- sourceId
1522
+ sourceId,
1523
+ onResolveLink: resolveLink
1458
1524
  });
1459
- }, [content, selectedPath, renderContent, navigateToDoc, sourceId]);
1525
+ }, [content, selectedPath, renderContent, navigateToDoc, sourceId, resolveLink]);
1460
1526
  const selectedNodeDocType = selectedPath && structure.length > 0 ? findDocNodeByPath(selectedPath, structure)?.documentType : void 0;
1461
1527
  const activeDocType = content?.documentType ?? selectedNodeDocType;
1462
1528
  const isMarkdownContent = !activeDocType || activeDocType === "markdown";
@@ -1468,36 +1534,70 @@ function DocViewerContent({
1468
1534
  const containerBgStyle = colorPalette.containerBackground !== "transparent" ? { backgroundColor: colorPalette.containerBackground } : {};
1469
1535
  const defaultEmptyText = structure.length > 0 ? "Select a document from the sidebar to view" : "No documents yet. Add content from the admin panel.";
1470
1536
  const resolvedEmptyText = emptyStateText || defaultEmptyText;
1471
- return /* @__PURE__ */ jsx6("section", { className: `${bgClass} ${className}`, style: bgStyle, children: /* @__PURE__ */ jsx6(
1472
- "div",
1473
- {
1474
- className: "max-w-[1920px] px-6 md:px-20 py-6 md:py-10 mx-auto",
1475
- style: containerBgStyle,
1476
- children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-6", children: [
1477
- /* @__PURE__ */ jsx6("div", { className: "flex flex-col gap-4", children: typeof title === "string" ? /* @__PURE__ */ jsx6(PageHeading, { children: title }) : title }),
1478
- showAIChat && /* @__PURE__ */ jsx6(
1479
- DocSearchBar,
1480
- {
1481
- placeholder: `Search ${sidebarLabel?.toLowerCase() || "documents"}...`,
1482
- query: docSearch.query,
1483
- onQueryChange: docSearch.setQuery,
1484
- results: docSearch.results,
1485
- isLoading: docSearch.isLoading,
1486
- onResultSelect: docSearch.handleResultSelect,
1487
- showDropdown: docSearch.keepDropdownOpen
1488
- }
1489
- ),
1490
- error && /* @__PURE__ */ jsx6("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs4("div", { className: "rounded-lg border bg-ods-card p-8 text-center max-w-md border-ods-border", children: [
1491
- /* @__PURE__ */ jsx6("h2", { className: "text-xl font-semibold text-ods-text-primary", children: "Error Loading Documents" }),
1492
- /* @__PURE__ */ jsxs4("p", { className: "mt-2 text-ods-text-secondary", children: [
1493
- error,
1494
- ". Please try again later."
1495
- ] })
1496
- ] }) }),
1497
- !error && /* @__PURE__ */ jsxs4("div", { className: "flex flex-col lg:flex-row gap-6 lg:gap-10 items-start flex-1", children: [
1498
- /* @__PURE__ */ jsx6("div", { className: "w-full lg:w-[320px] lg:shrink-0", children: /* @__PURE__ */ jsx6("div", { className: "lg:sticky lg:top-20", children: isLoadingStructure ? /* @__PURE__ */ jsx6(CategorySidebarSkeleton, {}) : /* @__PURE__ */ jsxs4(Fragment3, { children: [
1499
- /* @__PURE__ */ jsx6(PersistentMobileDropdown, { isLoading: false, children: /* @__PURE__ */ jsx6(
1500
- MobileNavigationDropdown,
1537
+ return (
1538
+ // STRUCTURAL UNIFICATION: render through the IDENTICAL wrapper chain
1539
+ // `<DevSectionPage>` uses (PageShell → PageLayout → `gap-10 flex-col`),
1540
+ // not a hand-rolled custom container with similar-looking spacing.
1541
+ // PageLayout owns the back-button row; the inner `gap-10` div +
1542
+ // `<PageHeader noTopPadding noBottomMargin>` renders the title section
1543
+ // the same way `<DevSectionView>`'s hero does. This is the only way to
1544
+ // guarantee /knowledge-base sits at pixel-identical vertical rhythm to
1545
+ // /roadmap / /releases / /onboarding-guides — same components, same DOM,
1546
+ // not "same CSS classes that look similar on paper."
1547
+ //
1548
+ // `colorPalette` / `className` / `bgStyle` flow through PageShell's
1549
+ // contentClassName + an inner style-passthrough wrapper so legacy
1550
+ // palette overrides still apply (none in the codebase today; the API
1551
+ // surface is preserved).
1552
+ /* @__PURE__ */ jsx6(PageShell, { contentClassName: `${bgClass} ${className}`, children: /* @__PURE__ */ jsx6("div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ jsx6(PageLayout, { backButton: backCfg ?? void 0, children: /* @__PURE__ */ jsxs4("div", { className: "w-full flex flex-col gap-10", children: [
1553
+ /* @__PURE__ */ jsx6(
1554
+ PageHeader,
1555
+ {
1556
+ title,
1557
+ titleIcon,
1558
+ subtitle,
1559
+ accentDot,
1560
+ noTopPadding: true,
1561
+ noBottomMargin: true
1562
+ }
1563
+ ),
1564
+ showAIChat && /* @__PURE__ */ jsx6(
1565
+ DocSearchBar,
1566
+ {
1567
+ placeholder: `Search ${sidebarLabel?.toLowerCase() || "documents"}...`,
1568
+ query: docSearch.query,
1569
+ onQueryChange: docSearch.setQuery,
1570
+ results: docSearch.results,
1571
+ isLoading: docSearch.isLoading,
1572
+ onResultSelect: docSearch.handleResultSelect,
1573
+ showDropdown: docSearch.keepDropdownOpen
1574
+ }
1575
+ ),
1576
+ error && /* @__PURE__ */ jsx6("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs4("div", { className: "rounded-lg border bg-ods-card p-8 text-center max-w-md border-ods-border", children: [
1577
+ /* @__PURE__ */ jsx6("h2", { className: "text-xl font-semibold text-ods-text-primary", children: "Error Loading Documents" }),
1578
+ /* @__PURE__ */ jsxs4("p", { className: "mt-2 text-ods-text-secondary", children: [
1579
+ error,
1580
+ ". Please try again later."
1581
+ ] })
1582
+ ] }) }),
1583
+ !error && /* @__PURE__ */ jsxs4("div", { className: "flex flex-col lg:flex-row gap-6 lg:gap-10 items-start flex-1", children: [
1584
+ /* @__PURE__ */ jsx6("div", { className: "w-full lg:w-[320px] lg:shrink-0", children: /* @__PURE__ */ jsx6("div", { className: "lg:sticky lg:top-20", children: isLoadingStructure ? /* @__PURE__ */ jsx6(CategorySidebarSkeleton, {}) : /* @__PURE__ */ jsxs4(Fragment3, { children: [
1585
+ /* @__PURE__ */ jsx6(PersistentMobileDropdown, { isLoading: false, children: /* @__PURE__ */ jsx6(
1586
+ MobileNavigationDropdown,
1587
+ {
1588
+ nodes: structure,
1589
+ selectedPath,
1590
+ expandedNodes,
1591
+ onNodeClick: selectNode,
1592
+ onToggleExpand: toggleNode,
1593
+ isLoading: false,
1594
+ folderIndexFile
1595
+ }
1596
+ ) }),
1597
+ /* @__PURE__ */ jsx6(PersistentSidebar, { isLoading: false, children: /* @__PURE__ */ jsx6("div", { className: "hidden lg:block", children: /* @__PURE__ */ jsxs4("div", { className: "space-y-4", children: [
1598
+ /* @__PURE__ */ jsx6("h3", { className: "text-[14px] font-['Azeret_Mono'] font-semibold uppercase text-ods-text-secondary tracking-[-0.02em] leading-[1.43em]", children: sidebarLabel }),
1599
+ /* @__PURE__ */ jsx6(
1600
+ MultiLevelNavigation,
1501
1601
  {
1502
1602
  nodes: structure,
1503
1603
  selectedPath,
@@ -1507,66 +1607,203 @@ function DocViewerContent({
1507
1607
  isLoading: false,
1508
1608
  folderIndexFile
1509
1609
  }
1510
- ) }),
1511
- /* @__PURE__ */ jsx6(PersistentSidebar, { isLoading: false, children: /* @__PURE__ */ jsx6("div", { className: "hidden lg:block", children: /* @__PURE__ */ jsxs4("div", { className: "space-y-4", children: [
1512
- /* @__PURE__ */ jsx6("h3", { className: "text-[14px] font-['Azeret_Mono'] font-semibold uppercase text-ods-text-secondary tracking-[-0.02em] leading-[1.43em]", children: sidebarLabel }),
1513
- /* @__PURE__ */ jsx6(
1514
- MultiLevelNavigation,
1515
- {
1516
- nodes: structure,
1517
- selectedPath,
1518
- expandedNodes,
1519
- onNodeClick: selectNode,
1520
- onToggleExpand: toggleNode,
1521
- isLoading: false,
1522
- folderIndexFile
1523
- }
1524
- )
1525
- ] }) }) })
1526
- ] }) }) }),
1527
- /* @__PURE__ */ jsx6("div", { className: "flex-1 min-w-0 w-full", children: /* @__PURE__ */ jsxs4(
1528
- "div",
1529
- {
1530
- className: `grid grid-cols-1 ${showStickyNav && stickyNavSections.length > 0 || isLoadingContent || isLoadingStructure ? "lg:grid-cols-[1fr_280px]" : ""} gap-8`,
1531
- children: [
1532
- /* @__PURE__ */ jsx6("div", { className: `w-full ${isMarkdownContent ? "max-w-4xl mx-auto" : ""}`, children: /* @__PURE__ */ jsx6("article", { className: "space-y-2", children: isLoadingContent || isLoadingStructure ? renderSkeleton(selectedNodeDocType) : !content ? /* @__PURE__ */ jsx6("div", { className: "text-center py-16", children: /* @__PURE__ */ jsx6("p", { className: "text-xl text-ods-text-secondary", children: resolvedEmptyText }) }) : renderedContent }) }),
1533
- (isLoadingContent || isLoadingStructure) && /* @__PURE__ */ jsx6("div", { className: "hidden lg:block", children: /* @__PURE__ */ jsxs4("div", { className: "sticky top-24", children: [
1534
- /* @__PURE__ */ jsx6("div", { className: "h-[14px] w-28 bg-ods-border rounded animate-pulse mb-5" }),
1535
- /* @__PURE__ */ jsx6("div", { className: "space-y-0", children: [130, 170, 190, 220, 110, 200, 80, 100, 120, 140, 90].map((w, i) => /* @__PURE__ */ jsx6(
1536
- "div",
1537
- {
1538
- className: `py-[13px] pl-3 border-l-2 ${i === 0 ? "border-ods-accent" : "border-transparent"}`,
1539
- children: /* @__PURE__ */ jsx6(
1540
- "div",
1541
- {
1542
- className: "h-[13px] bg-ods-border rounded animate-pulse",
1543
- style: { width: w }
1544
- }
1545
- )
1546
- },
1547
- i
1548
- )) })
1549
- ] }) }),
1550
- showStickyNav && content && stickyNavSections.length > 0 && !isLoadingContent && /* @__PURE__ */ jsx6("div", { className: "hidden lg:block", children: /* @__PURE__ */ jsxs4("div", { className: "sticky top-24", children: [
1551
- /* @__PURE__ */ jsx6("h3", { className: "text-[14px] font-['Azeret_Mono'] font-semibold uppercase text-ods-text-secondary tracking-[-0.02em] leading-[1.43em] mb-4", children: "ON THIS PAGE" }),
1552
- /* @__PURE__ */ jsx6(
1553
- StickySectionNav,
1554
- {
1555
- sections: stickyNavSections,
1556
- activeSection,
1557
- onSectionClick: handleSectionClick,
1558
- ribbonPosition: "left",
1559
- ribbonColor: "var(--ods-accent)"
1560
- }
1561
- )
1562
- ] }) })
1563
- ]
1564
- }
1565
- ) })
1566
- ] })
1610
+ )
1611
+ ] }) }) })
1612
+ ] }) }) }),
1613
+ /* @__PURE__ */ jsx6("div", { className: "flex-1 min-w-0 w-full", children: /* @__PURE__ */ jsxs4(
1614
+ "div",
1615
+ {
1616
+ className: `grid grid-cols-1 ${// "On this page" right column only makes sense for
1617
+ // MARKDOWN content (PDFs / Sheets / Figma / file have no
1618
+ // sections to navigate to). Gating the grid template on
1619
+ // `isMarkdownContent` also suppresses the section-skeleton
1620
+ // bars during embed loads — the user-reported "skeleton
1621
+ // shouldn't be on file pages" bug.
1622
+ isMarkdownContent && (showStickyNav && stickyNavSections.length > 0 || isLoadingContent || isLoadingStructure) ? "lg:grid-cols-[1fr_280px]" : ""} gap-8`,
1623
+ children: [
1624
+ /* @__PURE__ */ jsx6("div", { className: `w-full ${isMarkdownContent ? "max-w-4xl mx-auto" : ""}`, children: /* @__PURE__ */ jsx6("article", { className: "space-y-2", children: isLoadingContent || isLoadingStructure ? renderSkeleton(selectedNodeDocType) : !content ? /* @__PURE__ */ jsx6("div", { className: "text-center py-16", children: /* @__PURE__ */ jsx6("p", { className: "text-xl text-ods-text-secondary", children: resolvedEmptyText }) }) : renderedContent }) }),
1625
+ isMarkdownContent && (isLoadingContent || isLoadingStructure) && /* @__PURE__ */ jsx6("div", { className: "hidden lg:block", children: /* @__PURE__ */ jsxs4("div", { className: "sticky top-24", children: [
1626
+ /* @__PURE__ */ jsx6("div", { className: "h-[14px] w-28 bg-ods-border rounded animate-pulse mb-5" }),
1627
+ /* @__PURE__ */ jsx6("div", { className: "space-y-0", children: [130, 170, 190, 220, 110, 200, 80, 100, 120, 140, 90].map((w, i) => /* @__PURE__ */ jsx6(
1628
+ "div",
1629
+ {
1630
+ className: `py-[13px] pl-3 border-l-2 ${i === 0 ? "border-ods-accent" : "border-transparent"}`,
1631
+ children: /* @__PURE__ */ jsx6(
1632
+ "div",
1633
+ {
1634
+ className: "h-[13px] bg-ods-border rounded animate-pulse",
1635
+ style: { width: w }
1636
+ }
1637
+ )
1638
+ },
1639
+ i
1640
+ )) })
1641
+ ] }) }),
1642
+ showStickyNav && content && stickyNavSections.length > 0 && !isLoadingContent && /* @__PURE__ */ jsx6("div", { className: "hidden lg:block", children: /* @__PURE__ */ jsxs4("div", { className: "sticky top-24", children: [
1643
+ /* @__PURE__ */ jsx6("h3", { className: "text-[14px] font-['Azeret_Mono'] font-semibold uppercase text-ods-text-secondary tracking-[-0.02em] leading-[1.43em] mb-4", children: "ON THIS PAGE" }),
1644
+ /* @__PURE__ */ jsx6(
1645
+ StickySectionNav,
1646
+ {
1647
+ sections: stickyNavSections,
1648
+ activeSection,
1649
+ onSectionClick: handleSectionClick,
1650
+ ribbonPosition: "left",
1651
+ ribbonColor: "var(--ods-accent)"
1652
+ }
1653
+ )
1654
+ ] }) })
1655
+ ]
1656
+ }
1657
+ ) })
1567
1658
  ] })
1659
+ ] }) }) }) })
1660
+ );
1661
+ }
1662
+
1663
+ // src/components/docs/skeletons.tsx
1664
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
1665
+ function MarkdownSkeleton() {
1666
+ return /* @__PURE__ */ jsxs5("div", { className: "space-y-7 mt-6", children: [
1667
+ /* @__PURE__ */ jsxs5("div", { className: "space-y-[14px]", children: [
1668
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1669
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1670
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1671
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-3/4 animate-pulse" })
1672
+ ] }),
1673
+ /* @__PURE__ */ jsxs5("div", { className: "space-y-[14px]", children: [
1674
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1675
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1676
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1677
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-5/6 animate-pulse" })
1678
+ ] }),
1679
+ /* @__PURE__ */ jsxs5("div", { className: "space-y-[14px]", children: [
1680
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1681
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1682
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1683
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1684
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-2/3 animate-pulse" })
1685
+ ] }),
1686
+ /* @__PURE__ */ jsx7("div", { className: "h-[88px] bg-ods-card border border-ods-border rounded-lg animate-pulse" }),
1687
+ /* @__PURE__ */ jsx7("div", { className: "h-7 bg-ods-border rounded w-1/3 animate-pulse" }),
1688
+ /* @__PURE__ */ jsxs5("div", { className: "space-y-[14px]", children: [
1689
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1690
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1691
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1692
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-[72%] animate-pulse" })
1693
+ ] }),
1694
+ /* @__PURE__ */ jsxs5("div", { className: "space-y-[14px]", children: [
1695
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1696
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1697
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1698
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1699
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-[58%] animate-pulse" })
1700
+ ] }),
1701
+ /* @__PURE__ */ jsx7("div", { className: "h-7 bg-ods-border rounded w-2/5 animate-pulse" }),
1702
+ /* @__PURE__ */ jsxs5("div", { className: "space-y-[14px]", children: [
1703
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1704
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1705
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-[90%] animate-pulse" })
1706
+ ] }),
1707
+ /* @__PURE__ */ jsxs5("div", { className: "space-y-[14px]", children: [
1708
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1709
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1710
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-full animate-pulse" }),
1711
+ /* @__PURE__ */ jsx7("div", { className: "h-[16px] bg-ods-border rounded w-[70%] animate-pulse" })
1712
+ ] }),
1713
+ /* @__PURE__ */ jsx7("div", { className: "h-[88px] bg-ods-card border border-ods-border rounded-lg animate-pulse" })
1714
+ ] });
1715
+ }
1716
+ function EmbedSkeleton({ documentType } = {}) {
1717
+ if (documentType === "file") {
1718
+ return /* @__PURE__ */ jsx7("div", { className: "flex flex-col items-center justify-center py-16", children: /* @__PURE__ */ jsxs5("div", { className: "bg-ods-card border border-ods-border rounded-xl p-8 max-w-md w-full text-center space-y-4", children: [
1719
+ /* @__PURE__ */ jsx7("div", { className: "w-16 h-16 rounded mx-auto bg-ods-border animate-pulse" }),
1720
+ /* @__PURE__ */ jsxs5("div", { className: "space-y-2", children: [
1721
+ /* @__PURE__ */ jsx7("div", { className: "h-5 w-2/3 mx-auto rounded bg-ods-border animate-pulse" }),
1722
+ /* @__PURE__ */ jsx7("div", { className: "h-4 w-1/2 mx-auto rounded bg-ods-border animate-pulse" })
1723
+ ] }),
1724
+ /* @__PURE__ */ jsx7("div", { className: "h-10 w-full rounded bg-ods-border animate-pulse" })
1725
+ ] }) });
1726
+ }
1727
+ const buttonCount = documentType === "pdf" ? 2 : 1;
1728
+ return /* @__PURE__ */ jsxs5("div", { className: "space-y-4", children: [
1729
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between", children: [
1730
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: [
1731
+ /* @__PURE__ */ jsx7("div", { className: "w-5 h-5 shrink-0 rounded bg-ods-border animate-pulse" }),
1732
+ /* @__PURE__ */ jsx7("div", { className: "h-6 w-2/3 rounded bg-ods-border animate-pulse" })
1733
+ ] }),
1734
+ /* @__PURE__ */ jsx7("div", { className: "flex items-center gap-2 w-full sm:w-auto", children: Array.from({ length: buttonCount }).map((_, i) => /* @__PURE__ */ jsx7(
1735
+ "div",
1736
+ {
1737
+ className: "h-10 w-full sm:w-32 rounded bg-ods-border animate-pulse flex-1 sm:flex-initial"
1738
+ },
1739
+ i
1740
+ )) })
1741
+ ] }),
1742
+ /* @__PURE__ */ jsx7(
1743
+ "div",
1744
+ {
1745
+ className: "w-full rounded-lg border border-ods-border bg-ods-card animate-pulse",
1746
+ style: { height: "calc(100vh - 250px)" }
1747
+ }
1748
+ )
1749
+ ] });
1750
+ }
1751
+
1752
+ // src/components/docs/docs-hub-page.tsx
1753
+ import { jsx as jsx8 } from "react/jsx-runtime";
1754
+ var DEFAULT_TITLE = "Documents";
1755
+ var defaultFallbackRenderer = () => /* @__PURE__ */ jsx8("div", { className: "text-center py-16", children: /* @__PURE__ */ jsx8("p", { className: "text-ods-text-secondary", children: "Unsupported document type" }) });
1756
+ var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ jsx8(PdfViewer, { src: content.fileUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
1757
+ var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ jsx8(GoogleSheetsViewer, { externalUrl: content.externalUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
1758
+ var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ jsx8(FigmaEmbed, { url: content.externalUrl, title: content.fileName, loading: "eager" }) : defaultFallbackRenderer(content, handlers);
1759
+ var defaultFileRenderer = (content) => /* @__PURE__ */ jsx8(
1760
+ FileDownloadCard,
1761
+ {
1762
+ fileName: content.fileName,
1763
+ mimeType: content.mimeType,
1764
+ fileSize: content.fileSize,
1765
+ fileUrl: content.fileUrl
1766
+ }
1767
+ );
1768
+ var defaultRenderSkeleton = (documentType) => !documentType || documentType === "markdown" ? /* @__PURE__ */ jsx8(MarkdownSkeleton, {}) : (
1769
+ // Forward the documentType so the embed skeleton renders the right
1770
+ // shape (PDF=2 buttons, sheets/figma=1 button, file=centered card).
1771
+ /* @__PURE__ */ jsx8(EmbedSkeleton, { documentType })
1772
+ );
1773
+ function DocsHubPage({
1774
+ title = DEFAULT_TITLE,
1775
+ documentTypeRenderers,
1776
+ fallbackRenderer = defaultFallbackRenderer,
1777
+ renderSkeleton = defaultRenderSkeleton,
1778
+ showAIChat = true,
1779
+ className = "min-h-screen",
1780
+ sidebarLabel = "DOCUMENTATION",
1781
+ ...docViewerProps
1782
+ }) {
1783
+ const resolvedRenderers = {
1784
+ markdown: documentTypeRenderers.markdown,
1785
+ pdf: documentTypeRenderers.pdf ?? defaultPdfRenderer,
1786
+ google_sheet: documentTypeRenderers.google_sheet ?? defaultGoogleSheetRenderer,
1787
+ figma: documentTypeRenderers.figma ?? defaultFigmaRenderer,
1788
+ file: documentTypeRenderers.file ?? defaultFileRenderer
1789
+ };
1790
+ const renderContent = (content, handlers) => {
1791
+ const type = content.documentType ?? "markdown";
1792
+ const renderer = resolvedRenderers[type] ?? fallbackRenderer;
1793
+ return renderer(content, handlers);
1794
+ };
1795
+ return /* @__PURE__ */ jsx8(
1796
+ DocViewer,
1797
+ {
1798
+ ...docViewerProps,
1799
+ title,
1800
+ showAIChat,
1801
+ className,
1802
+ sidebarLabel,
1803
+ renderContent,
1804
+ renderSkeleton
1568
1805
  }
1569
- ) });
1806
+ );
1570
1807
  }
1571
1808
 
1572
1809
  export {
@@ -1597,6 +1834,9 @@ export {
1597
1834
  useDocNavigation,
1598
1835
  useDocumentTree,
1599
1836
  useScrollSpy,
1600
- DocViewer
1837
+ DocViewer,
1838
+ MarkdownSkeleton,
1839
+ EmbedSkeleton,
1840
+ DocsHubPage
1601
1841
  };
1602
- //# sourceMappingURL=chunk-E4XABBSU.js.map
1842
+ //# sourceMappingURL=chunk-PWQUAVA3.js.map