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

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 (276) hide show
  1. package/README.md +0 -9
  2. package/dist/chunk-26PKDALD.js +2379 -0
  3. package/dist/chunk-26PKDALD.js.map +1 -0
  4. package/dist/chunk-3MCHAFHB.js +89 -0
  5. package/dist/chunk-3MCHAFHB.js.map +1 -0
  6. package/dist/{chunk-PI4WSYQV.js → chunk-3ZXUQQL4.js} +2 -2
  7. package/dist/{chunk-WMSTJAZT.cjs → chunk-5E2HOSSH.cjs} +51 -913
  8. package/dist/chunk-5E2HOSSH.cjs.map +1 -0
  9. package/dist/{chunk-IL47XWV5.js → chunk-5P3B2LZW.js} +14 -8
  10. package/dist/{chunk-IL47XWV5.js.map → chunk-5P3B2LZW.js.map} +1 -1
  11. package/dist/chunk-66AANIOC.cjs +619 -0
  12. package/dist/chunk-66AANIOC.cjs.map +1 -0
  13. package/dist/{chunk-AD6C23QY.js → chunk-6GCI7JOE.js} +7 -8
  14. package/dist/{chunk-AD6C23QY.js.map → chunk-6GCI7JOE.js.map} +1 -1
  15. package/dist/chunk-6JINAOI7.cjs +311 -0
  16. package/dist/chunk-6JINAOI7.cjs.map +1 -0
  17. package/dist/{chunk-2QG57XOJ.js → chunk-7RIYT7ZH.js} +205 -1067
  18. package/dist/chunk-7RIYT7ZH.js.map +1 -0
  19. package/dist/{chunk-L6PSSIUQ.cjs → chunk-AQOWFSMB.cjs} +1 -1
  20. package/dist/chunk-AQOWFSMB.cjs.map +1 -0
  21. package/dist/chunk-BOCFIKYS.cjs +3009 -0
  22. package/dist/chunk-BOCFIKYS.cjs.map +1 -0
  23. package/dist/{chunk-54KNMC2R.cjs → chunk-D3LEFMOA.cjs} +3 -3
  24. package/dist/{chunk-54KNMC2R.cjs.map → chunk-D3LEFMOA.cjs.map} +1 -1
  25. package/dist/chunk-D652TJBQ.js +3009 -0
  26. package/dist/chunk-D652TJBQ.js.map +1 -0
  27. package/dist/{chunk-PWQUAVA3.js → chunk-E4XABBSU.js} +98 -338
  28. package/dist/chunk-E4XABBSU.js.map +1 -0
  29. package/dist/{chunk-JALO4TAZ.js → chunk-EL6QLAWX.js} +55 -357
  30. package/dist/chunk-EL6QLAWX.js.map +1 -0
  31. package/dist/{chunk-6C526VNN.cjs → chunk-EYEW6PTA.cjs} +118 -358
  32. package/dist/chunk-EYEW6PTA.cjs.map +1 -0
  33. package/dist/chunk-FQJK446R.js +1606 -0
  34. package/dist/chunk-FQJK446R.js.map +1 -0
  35. package/dist/{chunk-4PSQS3SW.cjs → chunk-GLLDTKZK.cjs} +9 -7
  36. package/dist/chunk-GLLDTKZK.cjs.map +1 -0
  37. package/dist/{chunk-FQOTC3UU.cjs → chunk-IE6OU3WQ.cjs} +16 -318
  38. package/dist/chunk-IE6OU3WQ.cjs.map +1 -0
  39. package/dist/chunk-J54Z3OCR.cjs +1606 -0
  40. package/dist/chunk-J54Z3OCR.cjs.map +1 -0
  41. package/dist/{chunk-PC746XCO.js → chunk-K2PFPBMF.js} +5563 -15048
  42. package/dist/chunk-K2PFPBMF.js.map +1 -0
  43. package/dist/chunk-KXCRGTRN.cjs +2379 -0
  44. package/dist/chunk-KXCRGTRN.cjs.map +1 -0
  45. package/dist/{chunk-IZ7JSBFP.js → chunk-LCNMR277.js} +1 -1
  46. package/dist/chunk-LCNMR277.js.map +1 -0
  47. package/dist/chunk-LFGGF7OT.cjs +449 -0
  48. package/dist/chunk-LFGGF7OT.cjs.map +1 -0
  49. package/dist/chunk-M2OCXTNT.js +311 -0
  50. package/dist/chunk-M2OCXTNT.js.map +1 -0
  51. package/dist/{chunk-L7ULJKG7.js → chunk-MBFWU2EM.js} +10 -6
  52. package/dist/{chunk-L7ULJKG7.js.map → chunk-MBFWU2EM.js.map} +1 -1
  53. package/dist/chunk-ME4EVDFP.js +619 -0
  54. package/dist/chunk-ME4EVDFP.js.map +1 -0
  55. package/dist/chunk-OQ6X7ZOC.js +449 -0
  56. package/dist/chunk-OQ6X7ZOC.js.map +1 -0
  57. package/dist/{chunk-4TLE6VLU.js → chunk-OY7OF7E7.js} +24 -30
  58. package/dist/chunk-OY7OF7E7.js.map +1 -0
  59. package/dist/chunk-POKKCWKF.js +354 -0
  60. package/dist/chunk-POKKCWKF.js.map +1 -0
  61. package/dist/{chunk-GUTS7HGA.cjs → chunk-QHIXS3W2.cjs} +2514 -11999
  62. package/dist/chunk-QHIXS3W2.cjs.map +1 -0
  63. package/dist/chunk-TFSYSWPS.cjs +89 -0
  64. package/dist/chunk-TFSYSWPS.cjs.map +1 -0
  65. package/dist/{chunk-53FUMSZ5.cjs → chunk-W6M2FLLT.cjs} +46 -40
  66. package/dist/chunk-W6M2FLLT.cjs.map +1 -0
  67. package/dist/{chunk-3JIQVE7T.js → chunk-WHMATDVP.js} +15 -9
  68. package/dist/{chunk-3JIQVE7T.js.map → chunk-WHMATDVP.js.map} +1 -1
  69. package/dist/{chunk-YBYI62OE.cjs → chunk-X647HY3F.cjs} +37 -33
  70. package/dist/chunk-X647HY3F.cjs.map +1 -0
  71. package/dist/{chunk-UNVE2SDJ.cjs → chunk-X6BV7MB7.cjs} +31 -37
  72. package/dist/chunk-X6BV7MB7.cjs.map +1 -0
  73. package/dist/{chunk-7OVGB2DQ.cjs → chunk-XREEV72C.cjs} +25 -19
  74. package/dist/chunk-XREEV72C.cjs.map +1 -0
  75. package/dist/chunk-YETA25JW.cjs +354 -0
  76. package/dist/chunk-YETA25JW.cjs.map +1 -0
  77. package/dist/{chunk-FCDQNTDG.cjs → chunk-YIGPRLQY.cjs} +20 -21
  78. package/dist/chunk-YIGPRLQY.cjs.map +1 -0
  79. package/dist/{chunk-X4DOXQRT.js → chunk-ZP4AVIZP.js} +6 -4
  80. package/dist/{chunk-X4DOXQRT.js.map → chunk-ZP4AVIZP.js.map} +1 -1
  81. package/dist/components/chat/index.cjs +18 -8
  82. package/dist/components/chat/index.cjs.map +1 -1
  83. package/dist/components/chat/index.js +85 -75
  84. package/dist/components/contact/index.cjs +15 -8
  85. package/dist/components/contact/index.cjs.map +1 -1
  86. package/dist/components/contact/index.js +14 -7
  87. package/dist/components/docs/doc-viewer.d.ts +2 -39
  88. package/dist/components/docs/doc-viewer.d.ts.map +1 -1
  89. package/dist/components/docs/index.cjs +9 -17
  90. package/dist/components/docs/index.cjs.map +1 -1
  91. package/dist/components/docs/index.d.ts +0 -4
  92. package/dist/components/docs/index.d.ts.map +1 -1
  93. package/dist/components/docs/index.js +8 -16
  94. package/dist/components/docs/use-document-tree.d.ts.map +1 -1
  95. package/dist/components/embeds/embed-iframe.d.ts.map +1 -1
  96. package/dist/components/embeds/index.cjs +15 -38
  97. package/dist/components/embeds/index.cjs.map +1 -1
  98. package/dist/components/embeds/index.d.ts +0 -8
  99. package/dist/components/embeds/index.d.ts.map +1 -1
  100. package/dist/components/embeds/index.js +17 -40
  101. package/dist/components/faq/index.cjs +16 -9
  102. package/dist/components/faq/index.cjs.map +1 -1
  103. package/dist/components/faq/index.js +15 -8
  104. package/dist/components/features/index.cjs +16 -8
  105. package/dist/components/features/index.cjs.map +1 -1
  106. package/dist/components/features/index.js +32 -24
  107. package/dist/components/index.cjs +452 -257
  108. package/dist/components/index.cjs.map +1 -1
  109. package/dist/components/index.js +976 -781
  110. package/dist/components/index.js.map +1 -1
  111. package/dist/components/layout/page-layout.d.ts +1 -10
  112. package/dist/components/layout/page-layout.d.ts.map +1 -1
  113. package/dist/components/layout/title-block.d.ts +1 -17
  114. package/dist/components/layout/title-block.d.ts.map +1 -1
  115. package/dist/components/navigation/index.cjs +15 -7
  116. package/dist/components/navigation/index.cjs.map +1 -1
  117. package/dist/components/navigation/index.js +17 -9
  118. package/dist/components/onboarding-guides/index.cjs +36 -35
  119. package/dist/components/onboarding-guides/index.cjs.map +1 -1
  120. package/dist/components/onboarding-guides/index.js +14 -13
  121. package/dist/components/onboarding-guides/index.js.map +1 -1
  122. package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts +1 -1
  123. package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts.map +1 -1
  124. package/dist/components/related-content/index.cjs +16 -9
  125. package/dist/components/related-content/index.cjs.map +1 -1
  126. package/dist/components/related-content/index.js +15 -8
  127. package/dist/components/shared/dev-section/dev-section-page.d.ts +0 -9
  128. package/dist/components/shared/dev-section/dev-section-page.d.ts.map +1 -1
  129. package/dist/components/shared/dev-section/dev-section-view.d.ts.map +1 -1
  130. package/dist/components/shared/dev-section/index.d.ts +1 -1
  131. package/dist/components/shared/dev-section/index.d.ts.map +1 -1
  132. package/dist/components/shared/doc-search/use-doc-search.d.ts.map +1 -1
  133. package/dist/components/shared/legal-document/legal-document-page.d.ts.map +1 -1
  134. package/dist/components/shared/product-release/release-detail-page.d.ts.map +1 -1
  135. package/dist/components/tickets/index.cjs +112 -100
  136. package/dist/components/tickets/index.cjs.map +1 -1
  137. package/dist/components/tickets/index.js +32 -20
  138. package/dist/components/tickets/index.js.map +1 -1
  139. package/dist/components/ui/file-manager/index.cjs +52 -50
  140. package/dist/components/ui/file-manager/index.cjs.map +1 -1
  141. package/dist/components/ui/file-manager/index.js +6 -4
  142. package/dist/components/ui/file-manager/index.js.map +1 -1
  143. package/dist/components/ui/index.cjs +19 -13
  144. package/dist/components/ui/index.cjs.map +1 -1
  145. package/dist/components/ui/index.d.ts +0 -2
  146. package/dist/components/ui/index.d.ts.map +1 -1
  147. package/dist/components/ui/index.js +139 -133
  148. package/dist/components/ui/release-changelog-section.d.ts +2 -6
  149. package/dist/components/ui/release-changelog-section.d.ts.map +1 -1
  150. package/dist/components/ui/simple-markdown-renderer.d.ts +8 -2
  151. package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
  152. package/dist/contexts/chat-runtime-context.d.ts +0 -14
  153. package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
  154. package/dist/contexts/index.cjs +3 -3
  155. package/dist/contexts/index.js +5 -5
  156. package/dist/embed-shims/index.cjs +3 -3
  157. package/dist/embed-shims/index.cjs.map +1 -1
  158. package/dist/embed-shims/index.js +4 -4
  159. package/dist/hooks/index.cjs +9 -4
  160. package/dist/hooks/index.cjs.map +1 -1
  161. package/dist/hooks/index.js +11 -6
  162. package/dist/index.cjs +20 -14
  163. package/dist/index.cjs.map +1 -1
  164. package/dist/index.js +364 -358
  165. package/dist/types/doc-source.d.ts +1 -31
  166. package/dist/types/doc-source.d.ts.map +1 -1
  167. package/dist/utils/index.cjs +0 -4
  168. package/dist/utils/index.cjs.map +1 -1
  169. package/dist/utils/index.d.ts +0 -1
  170. package/dist/utils/index.d.ts.map +1 -1
  171. package/dist/utils/index.js +1 -4
  172. package/dist/utils/index.js.map +1 -1
  173. package/package.json +1 -7
  174. package/src/components/chat/embeddable-chat.tsx +1 -1
  175. package/src/components/docs/doc-viewer.tsx +19 -111
  176. package/src/components/docs/index.ts +0 -17
  177. package/src/components/docs/use-document-tree.ts +0 -21
  178. package/src/components/embeds/embed-iframe.tsx +9 -7
  179. package/src/components/embeds/index.ts +0 -30
  180. package/src/components/embeds/og-link-preview.tsx +13 -13
  181. package/src/components/layout/page-layout.tsx +1 -14
  182. package/src/components/layout/title-block.tsx +62 -40
  183. package/src/components/onboarding-guides/onboarding-guide-detail-view.tsx +3 -3
  184. package/src/components/shared/dev-section/dev-section-page.tsx +1 -9
  185. package/src/components/shared/dev-section/dev-section-view.tsx +9 -14
  186. package/src/components/shared/dev-section/index.ts +1 -1
  187. package/src/components/shared/doc-search/use-doc-search.ts +3 -7
  188. package/src/components/shared/legal-document/legal-document-page.tsx +2 -2
  189. package/src/components/shared/product-release/release-detail-page.tsx +4 -6
  190. package/src/components/ui/index.ts +0 -2
  191. package/src/components/ui/release-changelog-section.tsx +2 -7
  192. package/src/components/ui/simple-markdown-renderer.tsx +11 -7
  193. package/src/contexts/chat-runtime-context.tsx +0 -14
  194. package/src/types/doc-source.ts +1 -33
  195. package/src/utils/index.ts +0 -1
  196. package/dist/chunk-2QG57XOJ.js.map +0 -1
  197. package/dist/chunk-4PSQS3SW.cjs.map +0 -1
  198. package/dist/chunk-4TLE6VLU.js.map +0 -1
  199. package/dist/chunk-53FUMSZ5.cjs.map +0 -1
  200. package/dist/chunk-6C526VNN.cjs.map +0 -1
  201. package/dist/chunk-7OVGB2DQ.cjs.map +0 -1
  202. package/dist/chunk-F5OB2YAL.cjs +0 -144
  203. package/dist/chunk-F5OB2YAL.cjs.map +0 -1
  204. package/dist/chunk-FBWXMMRB.cjs +0 -2
  205. package/dist/chunk-FBWXMMRB.cjs.map +0 -1
  206. package/dist/chunk-FCDQNTDG.cjs.map +0 -1
  207. package/dist/chunk-FQOTC3UU.cjs.map +0 -1
  208. package/dist/chunk-GUTS7HGA.cjs.map +0 -1
  209. package/dist/chunk-GZ4C3XW6.js +0 -2
  210. package/dist/chunk-GZ4C3XW6.js.map +0 -1
  211. package/dist/chunk-IZ7JSBFP.js.map +0 -1
  212. package/dist/chunk-JALO4TAZ.js.map +0 -1
  213. package/dist/chunk-L6PSSIUQ.cjs.map +0 -1
  214. package/dist/chunk-PC746XCO.js.map +0 -1
  215. package/dist/chunk-PWQUAVA3.js.map +0 -1
  216. package/dist/chunk-SA2WPJVO.js +0 -144
  217. package/dist/chunk-SA2WPJVO.js.map +0 -1
  218. package/dist/chunk-UNVE2SDJ.cjs.map +0 -1
  219. package/dist/chunk-WMSTJAZT.cjs.map +0 -1
  220. package/dist/chunk-YBYI62OE.cjs.map +0 -1
  221. package/dist/components/case-studies/index.cjs +0 -126
  222. package/dist/components/case-studies/index.cjs.map +0 -1
  223. package/dist/components/case-studies/index.d.ts +0 -2
  224. package/dist/components/case-studies/index.d.ts.map +0 -1
  225. package/dist/components/case-studies/index.js +0 -126
  226. package/dist/components/case-studies/index.js.map +0 -1
  227. package/dist/components/case-studies/share-experience-section.d.ts +0 -48
  228. package/dist/components/case-studies/share-experience-section.d.ts.map +0 -1
  229. package/dist/components/docs/docs-hub-page.d.ts +0 -46
  230. package/dist/components/docs/docs-hub-page.d.ts.map +0 -1
  231. package/dist/components/docs/skeletons.d.ts +0 -32
  232. package/dist/components/docs/skeletons.d.ts.map +0 -1
  233. package/dist/components/docs/use-docs-resolve-link.d.ts +0 -20
  234. package/dist/components/docs/use-docs-resolve-link.d.ts.map +0 -1
  235. package/dist/components/embeds/embed-container.d.ts +0 -37
  236. package/dist/components/embeds/embed-container.d.ts.map +0 -1
  237. package/dist/components/embeds/file-download-card.d.ts +0 -18
  238. package/dist/components/embeds/file-download-card.d.ts.map +0 -1
  239. package/dist/components/embeds/linkedin-embed-client.d.ts +0 -8
  240. package/dist/components/embeds/linkedin-embed-client.d.ts.map +0 -1
  241. package/dist/components/embeds/markdown-image.d.ts +0 -5
  242. package/dist/components/embeds/markdown-image.d.ts.map +0 -1
  243. package/dist/components/embeds/reddit-embed-client.d.ts +0 -7
  244. package/dist/components/embeds/reddit-embed-client.d.ts.map +0 -1
  245. package/dist/components/embeds/rich-markdown-runtime.d.ts +0 -46
  246. package/dist/components/embeds/rich-markdown-runtime.d.ts.map +0 -1
  247. package/dist/components/embeds/twitter-embed-client.d.ts +0 -8
  248. package/dist/components/embeds/twitter-embed-client.d.ts.map +0 -1
  249. package/dist/components/layout/page-header.d.ts +0 -78
  250. package/dist/components/layout/page-header.d.ts.map +0 -1
  251. package/dist/components/layout/page-with-header.d.ts +0 -67
  252. package/dist/components/layout/page-with-header.d.ts.map +0 -1
  253. package/dist/components/ui/rich-markdown-renderer.d.ts +0 -34
  254. package/dist/components/ui/rich-markdown-renderer.d.ts.map +0 -1
  255. package/dist/utils/page-header-constants.d.ts +0 -15
  256. package/dist/utils/page-header-constants.d.ts.map +0 -1
  257. package/dist/utils/social-embed-cache.d.ts +0 -29
  258. package/dist/utils/social-embed-cache.d.ts.map +0 -1
  259. package/src/components/case-studies/index.ts +0 -4
  260. package/src/components/case-studies/share-experience-section.tsx +0 -185
  261. package/src/components/docs/docs-hub-page.tsx +0 -149
  262. package/src/components/docs/skeletons.tsx +0 -138
  263. package/src/components/docs/use-docs-resolve-link.ts +0 -52
  264. package/src/components/embeds/embed-container.tsx +0 -80
  265. package/src/components/embeds/file-download-card.tsx +0 -54
  266. package/src/components/embeds/linkedin-embed-client.tsx +0 -100
  267. package/src/components/embeds/markdown-image.tsx +0 -88
  268. package/src/components/embeds/reddit-embed-client.tsx +0 -550
  269. package/src/components/embeds/rich-markdown-runtime.tsx +0 -79
  270. package/src/components/embeds/twitter-embed-client.tsx +0 -308
  271. package/src/components/layout/page-header.tsx +0 -182
  272. package/src/components/layout/page-with-header.tsx +0 -110
  273. package/src/components/ui/rich-markdown-renderer.tsx +0 -1203
  274. package/src/utils/page-header-constants.ts +0 -15
  275. package/src/utils/social-embed-cache.ts +0 -391
  276. /package/dist/{chunk-PI4WSYQV.js.map → chunk-3ZXUQQL4.js.map} +0 -0
@@ -1,38 +1,25 @@
1
1
  "use client";
2
- import {
3
- FileDownloadCard,
4
- GoogleSheetsViewer,
5
- PdfViewer
6
- } from "./chunk-SA2WPJVO.js";
7
2
  import {
8
3
  DocSearchBar,
9
4
  useDocSearch
10
- } from "./chunk-AD6C23QY.js";
5
+ } from "./chunk-6GCI7JOE.js";
11
6
  import {
12
7
  DEFAULT_FOLDER_INDEX_FILE,
13
- FigmaEmbed,
14
8
  MobileNavigationDropdown,
15
9
  MultiLevelNavigation,
16
- PageHeader,
17
- PageLayout,
18
- PageShell,
19
10
  StickySectionNav,
20
11
  findDocNodeByPath,
21
12
  getDocAncestorNodeIds,
22
13
  stripFolderIndexFromPath
23
- } from "./chunk-PC746XCO.js";
14
+ } from "./chunk-26PKDALD.js";
24
15
  import {
25
16
  HUB_HEADER_OFFSET_PX,
26
17
  navigateSamePageHash,
27
18
  scrollElementIntoView
28
- } from "./chunk-2QG57XOJ.js";
29
- import {
30
- useChatRuntime
31
- } from "./chunk-IZ7JSBFP.js";
19
+ } from "./chunk-OQ6X7ZOC.js";
32
20
  import {
33
- init_next_navigation,
34
- useRouter
35
- } from "./chunk-PLJLE4A4.js";
21
+ PageHeading
22
+ } from "./chunk-FQJK446R.js";
36
23
  import {
37
24
  cn,
38
25
  init_cn
@@ -40,7 +27,6 @@ import {
40
27
 
41
28
  // src/components/docs/doc-viewer.tsx
42
29
  import { useMemo as useMemo2 } from "react";
43
- init_next_navigation();
44
30
 
45
31
  // src/components/persistent-filter-controls.tsx
46
32
  init_cn();
@@ -1092,15 +1078,6 @@ function useDocumentTree(config, initialPath) {
1092
1078
  window.addEventListener("popstate", handlePopState);
1093
1079
  return () => window.removeEventListener("popstate", handlePopState);
1094
1080
  }, [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]);
1104
1081
  useEffect(() => {
1105
1082
  if (!isInitialized) {
1106
1083
  const speculativeContentPath = cleanInitialPath || folderIndexFile;
@@ -1410,35 +1387,6 @@ function useScrollSpy(sections) {
1410
1387
  return { activeSection, handleSectionClick };
1411
1388
  }
1412
1389
 
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
-
1442
1390
  // src/components/docs/doc-viewer.tsx
1443
1391
  import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
1444
1392
  var DEFAULT_DOC_VIEWER_PALETTE = {
@@ -1460,26 +1408,19 @@ function DocViewerContent({
1460
1408
  renderSkeleton,
1461
1409
  chatSource,
1462
1410
  title,
1463
- titleIcon,
1464
- subtitle,
1465
- accentDot,
1466
1411
  colorPalette = DEFAULT_DOC_VIEWER_PALETTE,
1467
1412
  className = "",
1468
1413
  docPath,
1469
1414
  sidebarLabel = "DOCUMENTATION",
1470
1415
  structureEndpoint,
1471
1416
  contentEndpoint,
1472
- searchEndpoint,
1473
- resolveLinkEndpoint,
1474
1417
  baseRoute,
1475
1418
  emptyStateText,
1476
1419
  showAIChat = false,
1477
- folderIndexFile,
1478
- backButton
1420
+ folderIndexFile
1479
1421
  }) {
1480
1422
  const resolvedStructureEndpoint = structureEndpoint ?? `/api/docs/sources/${sourceId}/structure`;
1481
1423
  const resolvedContentEndpoint = contentEndpoint ?? `/api/docs/sources/${sourceId}/content`;
1482
- const resolveLink = useDocsResolveLink(sourceId, resolveLinkEndpoint);
1483
1424
  const {
1484
1425
  structure,
1485
1426
  selectedPath,
@@ -1502,15 +1443,9 @@ function DocViewerContent({
1502
1443
  );
1503
1444
  const { activeSection, handleSectionClick } = useScrollSpy(content?.sections);
1504
1445
  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
- };
1510
1446
  const docSearch = useDocSearch({
1511
1447
  source: chatSource,
1512
1448
  baseRoute,
1513
- searchEndpoint,
1514
1449
  onNavigate: (path) => navigateToDoc(path, { fromInternalLink: true }),
1515
1450
  onInPageSwap: (path) => docNav.navigate(path)
1516
1451
  });
@@ -1519,10 +1454,9 @@ function DocViewerContent({
1519
1454
  return renderContent(content, {
1520
1455
  onInternalLinkClick: navigateToDoc,
1521
1456
  currentPath: selectedPath,
1522
- sourceId,
1523
- onResolveLink: resolveLink
1457
+ sourceId
1524
1458
  });
1525
- }, [content, selectedPath, renderContent, navigateToDoc, sourceId, resolveLink]);
1459
+ }, [content, selectedPath, renderContent, navigateToDoc, sourceId]);
1526
1460
  const selectedNodeDocType = selectedPath && structure.length > 0 ? findDocNodeByPath(selectedPath, structure)?.documentType : void 0;
1527
1461
  const activeDocType = content?.documentType ?? selectedNodeDocType;
1528
1462
  const isMarkdownContent = !activeDocType || activeDocType === "markdown";
@@ -1534,70 +1468,36 @@ function DocViewerContent({
1534
1468
  const containerBgStyle = colorPalette.containerBackground !== "transparent" ? { backgroundColor: colorPalette.containerBackground } : {};
1535
1469
  const defaultEmptyText = structure.length > 0 ? "Select a document from the sidebar to view" : "No documents yet. Add content from the admin panel.";
1536
1470
  const resolvedEmptyText = emptyStateText || defaultEmptyText;
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,
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,
1601
1501
  {
1602
1502
  nodes: structure,
1603
1503
  selectedPath,
@@ -1607,203 +1507,66 @@ function DocViewerContent({
1607
1507
  isLoading: false,
1608
1508
  folderIndexFile
1609
1509
  }
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
- ) })
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
+ ] })
1658
1567
  ] })
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
1805
1568
  }
1806
- );
1569
+ ) });
1807
1570
  }
1808
1571
 
1809
1572
  export {
@@ -1834,9 +1597,6 @@ export {
1834
1597
  useDocNavigation,
1835
1598
  useDocumentTree,
1836
1599
  useScrollSpy,
1837
- DocViewer,
1838
- MarkdownSkeleton,
1839
- EmbedSkeleton,
1840
- DocsHubPage
1600
+ DocViewer
1841
1601
  };
1842
- //# sourceMappingURL=chunk-PWQUAVA3.js.map
1602
+ //# sourceMappingURL=chunk-E4XABBSU.js.map