@flamingo-stack/openframe-frontend-core 0.0.848 → 0.0.849

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 (117) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/{chunk-Y4BG7SPX.cjs → chunk-36XWCVSM.cjs} +63 -63
  3. package/dist/{chunk-YXKAHQYS.cjs → chunk-533QK4R6.cjs} +2 -1
  4. package/dist/{chunk-5HOWR4TG.cjs → chunk-5CBI2ZYV.cjs} +5 -5
  5. package/dist/{chunk-NYT6IBIX.cjs → chunk-5PIR77V5.cjs} +4 -4
  6. package/dist/{chunk-IIUZE73M.cjs → chunk-6AJYGXXS.cjs} +14 -14
  7. package/dist/{chunk-U7UBYJEZ.cjs → chunk-BU2PSRAS.cjs} +5 -5
  8. package/dist/{chunk-I3YRYS23.cjs → chunk-C3P7IUTU.cjs} +37 -12
  9. package/dist/{chunk-O4BXHCMK.cjs → chunk-FRG724DU.cjs} +2 -2
  10. package/dist/{chunk-YAW7CHLV.cjs → chunk-FXLROQUT.cjs} +41 -38
  11. package/dist/{chunk-7YJQTQPV.cjs → chunk-IG6ROHPS.cjs} +46 -46
  12. package/dist/{chunk-INA2FX2N.cjs → chunk-IHY7E4EX.cjs} +2 -2
  13. package/dist/{chunk-Y2ZWWIUA.cjs → chunk-IN3LA2FU.cjs} +2 -2
  14. package/dist/{chunk-7LE4HWHA.cjs → chunk-KXBZCUDW.cjs} +11 -11
  15. package/dist/{chunk-C3WZXOZJ.cjs → chunk-MC3L525K.cjs} +3 -3
  16. package/dist/{chunk-7DW3LZ52.cjs → chunk-PV2XQJ2R.cjs} +92 -171
  17. package/dist/{chunk-GASFYPGH.cjs → chunk-R5JPZ6TY.cjs} +14 -14
  18. package/dist/{chunk-MWYEROAP.cjs → chunk-SHQY4GOE.cjs} +55 -55
  19. package/dist/{chunk-VW4446JR.cjs → chunk-TEKN6TJ5.cjs} +14 -14
  20. package/dist/{chunk-QUSCSYHJ.cjs → chunk-TX4NTH22.cjs} +45 -26
  21. package/dist/{chunk-2V6FCVUL.cjs → chunk-YLETC7LP.cjs} +187 -169
  22. package/dist/{chunk-OCJXOSIH.cjs → chunk-YYHQY3K6.cjs} +30 -30
  23. package/dist/{chunk-74Z34I2C.cjs → chunk-Z5UCDEKZ.cjs} +4 -4
  24. package/dist/{chunk-IUZVOQXP.cjs → chunk-ZY34R37A.cjs} +45 -45
  25. package/dist/{cloud-tenants-YAZHLPOQ.cjs → cloud-tenants-HKUUEUAY.cjs} +7 -7
  26. package/dist/components/case-studies/index.cjs +21 -21
  27. package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
  28. package/dist/components/chat/entity-cards/dispatch.js +1 -0
  29. package/dist/components/chat/index.cjs +5 -5
  30. package/dist/components/contact/index.cjs +8 -8
  31. package/dist/components/docs/doc-viewer.d.ts +7 -7
  32. package/dist/components/docs/doc-viewer.d.ts.map +1 -1
  33. package/dist/components/docs/doc-viewer.js +29 -16
  34. package/dist/components/docs/docs-hub-page.d.ts +1 -1
  35. package/dist/components/docs/docs-hub-page.d.ts.map +1 -1
  36. package/dist/components/docs/docs-hub-page.js +4 -11
  37. package/dist/components/docs/index.cjs +11 -11
  38. package/dist/components/docs/use-document-tree.d.ts.map +1 -1
  39. package/dist/components/docs/use-document-tree.js +24 -24
  40. package/dist/components/embeds/claude-embed.d.ts +2 -2
  41. package/dist/components/embeds/claude-embed.d.ts.map +1 -1
  42. package/dist/components/embeds/claude-embed.js +3 -3
  43. package/dist/components/embeds/embed-iframe.d.ts +5 -3
  44. package/dist/components/embeds/embed-iframe.d.ts.map +1 -1
  45. package/dist/components/embeds/embed-iframe.js +4 -3
  46. package/dist/components/embeds/embed-viewer-frame.d.ts +12 -9
  47. package/dist/components/embeds/embed-viewer-frame.d.ts.map +1 -1
  48. package/dist/components/embeds/embed-viewer-frame.js +21 -7
  49. package/dist/components/embeds/figma-embed.d.ts +4 -2
  50. package/dist/components/embeds/figma-embed.d.ts.map +1 -1
  51. package/dist/components/embeds/figma-embed.js +4 -3
  52. package/dist/components/embeds/file-download-card.d.ts +3 -1
  53. package/dist/components/embeds/file-download-card.d.ts.map +1 -1
  54. package/dist/components/embeds/file-download-card.js +18 -3
  55. package/dist/components/embeds/google-sheets-viewer.d.ts +3 -1
  56. package/dist/components/embeds/google-sheets-viewer.d.ts.map +1 -1
  57. package/dist/components/embeds/google-sheets-viewer.js +7 -4
  58. package/dist/components/embeds/index.cjs +8 -8
  59. package/dist/components/embeds/pdf-viewer.d.ts +3 -1
  60. package/dist/components/embeds/pdf-viewer.d.ts.map +1 -1
  61. package/dist/components/embeds/pdf-viewer.js +6 -2
  62. package/dist/components/faq/index.cjs +9 -9
  63. package/dist/components/features/index.cjs +7 -7
  64. package/dist/components/help-center-pages/index.cjs +81 -81
  65. package/dist/components/index.cjs +49 -49
  66. package/dist/components/meeting-scheduler/index.cjs +32 -32
  67. package/dist/components/navigation/index.cjs +10 -10
  68. package/dist/components/onboarding-guides/index.cjs +10 -10
  69. package/dist/components/product-demo/index.cjs +16 -16
  70. package/dist/components/related-content/index.cjs +4 -4
  71. package/dist/components/tickets/index.cjs +12 -12
  72. package/dist/components/ui/index.cjs +7 -7
  73. package/dist/components/ui/markdown/rich/rich-markdown-renderer.d.ts.map +1 -1
  74. package/dist/components/ui/markdown/rich/rich-markdown-renderer.js +7 -3
  75. package/dist/{devices-IZROCLFK.cjs → devices-P7M4Z7VP.cjs} +8 -8
  76. package/dist/{embeddable-chat-ETW6S22E.cjs → embeddable-chat-322NDFP5.cjs} +74 -74
  77. package/dist/index.cjs +15 -11
  78. package/dist/{knowledge-4IRWLTNW.cjs → knowledge-TC7JLOWI.cjs} +8 -8
  79. package/dist/{logs-EFDGY5IO.cjs → logs-GPOYCP4B.cjs} +14 -14
  80. package/dist/{policies-3KEXZ5BP.cjs → policies-ZUHOUMDD.cjs} +11 -11
  81. package/dist/{scripts-PCGTZLZL.cjs → scripts-FOEVDGTH.cjs} +12 -12
  82. package/dist/{software-update-YCDNVFJE.cjs → software-update-XGTMNFST.cjs} +10 -10
  83. package/dist/types/doc-source.d.ts +2 -2
  84. package/dist/types/doc-source.d.ts.map +1 -1
  85. package/dist/utils/doc-tree-nav.d.ts +7 -0
  86. package/dist/utils/doc-tree-nav.d.ts.map +1 -1
  87. package/dist/utils/doc-tree-nav.js +19 -0
  88. package/dist/utils/index.cjs +25 -2
  89. package/dist/utils/list-url.d.ts.map +1 -1
  90. package/dist/utils/list-url.js +2 -1
  91. package/dist/utils/source-grouping.d.ts +2 -2
  92. package/dist/utils/source-grouping.d.ts.map +1 -1
  93. package/dist/utils/source-grouping.js +1 -1
  94. package/dist/utils/source-icons.d.ts.map +1 -1
  95. package/dist/utils/source-icons.js +3 -0
  96. package/package.json +1 -1
  97. package/src/components/chat/entity-cards/dispatch.tsx +3 -0
  98. package/src/components/docs/doc-viewer.tsx +56 -35
  99. package/src/components/docs/docs-hub-page.tsx +13 -37
  100. package/src/components/docs/use-document-tree.ts +33 -23
  101. package/src/components/embeds/claude-embed.tsx +4 -4
  102. package/src/components/embeds/embed-iframe.tsx +8 -5
  103. package/src/components/embeds/embed-viewer-frame.tsx +35 -15
  104. package/src/components/embeds/figma-embed.tsx +9 -4
  105. package/src/components/embeds/file-download-card.tsx +28 -4
  106. package/src/components/embeds/google-sheets-viewer.tsx +9 -3
  107. package/src/components/embeds/pdf-viewer.tsx +9 -2
  108. package/src/components/ui/markdown/rich/rich-markdown-renderer.tsx +4 -0
  109. package/src/types/doc-source.ts +2 -2
  110. package/src/utils/doc-tree-nav.ts +27 -0
  111. package/src/utils/list-url.ts +2 -1
  112. package/src/utils/source-grouping.ts +2 -2
  113. package/src/utils/source-icons.ts +3 -0
  114. package/dist/components/docs/skeletons.d.ts +0 -25
  115. package/dist/components/docs/skeletons.d.ts.map +0 -1
  116. package/dist/components/docs/skeletons.js +0 -83
  117. package/src/components/docs/skeletons.tsx +0 -131
@@ -3,24 +3,23 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkI3YRYS23cjs = require('./chunk-I3YRYS23.cjs');
6
+ var _chunkC3P7IUTUcjs = require('./chunk-C3P7IUTU.cjs');
7
7
 
8
8
 
9
9
 
10
10
 
11
11
 
12
- var _chunkO4BXHCMKcjs = require('./chunk-O4BXHCMK.cjs');
12
+ var _chunkFRG724DUcjs = require('./chunk-FRG724DU.cjs');
13
13
 
14
14
 
15
15
 
16
- var _chunk5HOWR4TGcjs = require('./chunk-5HOWR4TG.cjs');
16
+ var _chunk5CBI2ZYVcjs = require('./chunk-5CBI2ZYV.cjs');
17
17
 
18
18
 
19
19
 
20
20
 
21
21
 
22
-
23
- var _chunk2V6FCVULcjs = require('./chunk-2V6FCVUL.cjs');
22
+ var _chunkYLETC7LPcjs = require('./chunk-YLETC7LP.cjs');
24
23
 
25
24
 
26
25
  var _chunkIKOL6NJYcjs = require('./chunk-IKOL6NJY.cjs');
@@ -29,13 +28,9 @@ var _chunkIKOL6NJYcjs = require('./chunk-IKOL6NJY.cjs');
29
28
 
30
29
 
31
30
 
32
- var _chunkQUSCSYHJcjs = require('./chunk-QUSCSYHJ.cjs');
33
-
34
-
35
31
 
36
32
 
37
-
38
- var _chunkYAW7CHLVcjs = require('./chunk-YAW7CHLV.cjs');
33
+ var _chunkTX4NTH22cjs = require('./chunk-TX4NTH22.cjs');
39
34
 
40
35
 
41
36
 
@@ -53,12 +48,6 @@ var _chunkFX35L4Y6cjs = require('./chunk-FX35L4Y6.cjs');
53
48
  var _chunkUJ7AXHRZcjs = require('./chunk-UJ7AXHRZ.cjs');
54
49
 
55
50
 
56
- var _chunk2XCORRJVcjs = require('./chunk-2XCORRJV.cjs');
57
-
58
-
59
-
60
- var _chunkPMUCEUFQcjs = require('./chunk-PMUCEUFQ.cjs');
61
-
62
51
 
63
52
 
64
53
  var _chunk63A4GZMBcjs = require('./chunk-63A4GZMB.cjs');
@@ -221,7 +210,7 @@ function toResolveLinkResult(body) {
221
210
  }
222
211
  function useDocsResolveLink(sourceId, resolveLinkEndpoint) {
223
212
  const chatRuntime = _chunkUJ7AXHRZcjs.useChatRuntime.call(void 0, );
224
- const resolvedResolveLinkEndpoint = _nullishCoalesce(_nullishCoalesce(resolveLinkEndpoint, () => ( _optionalChain([chatRuntime, 'optionalAccess', _2 => _2.endpoints, 'access', _3 => _3.docsResolveLinkUrl]))), () => ( "/api/docs/resolve-link"));
213
+ const resolvedResolveLinkEndpoint = _nullishCoalesce(_nullishCoalesce(resolveLinkEndpoint, () => ( _optionalChain([chatRuntime, 'optionalAccess', _ => _.endpoints, 'access', _2 => _2.docsResolveLinkUrl]))), () => ( "/api/docs/resolve-link"));
225
214
  return _react.useCallback.call(void 0,
226
215
  async (href, currentPath) => {
227
216
  try {
@@ -256,21 +245,6 @@ function scrollToContent() {
256
245
  _chunkGRCOEICKcjs.scrollElementIntoView.call(void 0, document.documentElement);
257
246
  }
258
247
  }
259
- function findFirstDocPath(folder) {
260
- const children = _nullishCoalesce(folder.children, () => ( []));
261
- for (const child of children) {
262
- if (child.type === "file" && !child.path.toLowerCase().endsWith(".mmd")) {
263
- return child.path;
264
- }
265
- }
266
- for (const child of children) {
267
- if (child.type === "folder") {
268
- const nested = findFirstDocPath(child);
269
- if (nested) return nested;
270
- }
271
- }
272
- return null;
273
- }
274
248
  function isRecord(value) {
275
249
  return typeof value === "object" && value !== null;
276
250
  }
@@ -354,14 +328,18 @@ function toDocContent(value, requestedPath) {
354
328
  function toDataSync(value) {
355
329
  if (!isRecord(value)) return void 0;
356
330
  const source = readString(value, "source");
357
- if (!_chunk2V6FCVULcjs.isDataSyncSource.call(void 0, source)) return void 0;
331
+ if (!_chunkYLETC7LPcjs.isDataSyncSource.call(void 0, source)) return void 0;
358
332
  return { source, syncedAt: _nullishCoalesce(readString(value, "syncedAt"), () => ( null)) };
359
333
  }
360
334
  function useDocumentTree(config, initialPath) {
361
335
  const { structureEndpoint, contentEndpoint, baseRoute } = config;
362
- const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => ( _chunkQUSCSYHJcjs.DEFAULT_FOLDER_INDEX_FILE));
363
- const cleanInitialPath = _chunkQUSCSYHJcjs.stripFolderIndexFromPath.call(void 0, _optionalChain([initialPath, 'optionalAccess', _4 => _4.replace, 'call', _5 => _5(/\/$/, "")]) || "", folderIndexFile);
336
+ const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => ( _chunkTX4NTH22cjs.DEFAULT_FOLDER_INDEX_FILE));
337
+ const cleanInitialPath = _chunkTX4NTH22cjs.stripFolderIndexFromPath.call(void 0, _optionalChain([initialPath, 'optionalAccess', _3 => _3.replace, 'call', _4 => _4(/\/$/, "")]) || "", folderIndexFile);
364
338
  const [structure, setStructure] = _react.useState.call(void 0, []);
339
+ const structureRef = _react.useRef.call(void 0, structure);
340
+ _react.useEffect.call(void 0, () => {
341
+ structureRef.current = structure;
342
+ }, [structure]);
365
343
  const [selectedPath, setSelectedPath] = _react.useState.call(void 0, cleanInitialPath);
366
344
  const [content, setContent] = _react.useState.call(void 0, null);
367
345
  const [isLoadingStructure, setIsLoadingStructure] = _react.useState.call(void 0, true);
@@ -386,12 +364,12 @@ function useDocumentTree(config, initialPath) {
386
364
  } else if (pathname.startsWith(`${normalizedBaseRoute}/`)) {
387
365
  pathFromUrl = pathname.substring(`${normalizedBaseRoute}/`.length);
388
366
  }
389
- pathFromUrl = _chunkQUSCSYHJcjs.stripFolderIndexFromPath.call(void 0, pathFromUrl, folderIndexFile);
367
+ pathFromUrl = _chunkTX4NTH22cjs.stripFolderIndexFromPath.call(void 0, pathFromUrl, folderIndexFile);
390
368
  if (pathFromUrl !== selectedPathRef.current) {
391
369
  setSelectedPath(pathFromUrl);
392
370
  if (pathFromUrl) {
393
371
  const parentPath = pathFromUrl.includes("/") ? pathFromUrl.substring(0, pathFromUrl.lastIndexOf("/")) : pathFromUrl;
394
- setExpandedNodes(new Set(_chunkQUSCSYHJcjs.getDocAncestorNodeIds.call(void 0, parentPath)));
372
+ setExpandedNodes(new Set(_chunkTX4NTH22cjs.getDocAncestorNodeIds.call(void 0, parentPath)));
395
373
  }
396
374
  setTimeout(() => {
397
375
  scrollToContent();
@@ -409,7 +387,7 @@ function useDocumentTree(config, initialPath) {
409
387
  setSelectedPath(cleanInitialPath);
410
388
  if (cleanInitialPath) {
411
389
  const parentPath = cleanInitialPath.includes("/") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
412
- setExpandedNodes(new Set(_chunkQUSCSYHJcjs.getDocAncestorNodeIds.call(void 0, parentPath)));
390
+ setExpandedNodes(new Set(_chunkTX4NTH22cjs.getDocAncestorNodeIds.call(void 0, parentPath)));
413
391
  }
414
392
  setExternalNavCount((n) => n + 1);
415
393
  }
@@ -434,7 +412,7 @@ function useDocumentTree(config, initialPath) {
434
412
  if (cleanInitialPath) {
435
413
  const pathForExpansion = cleanInitialPath.includes(".") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
436
414
  if (pathForExpansion) {
437
- setExpandedNodes(new Set(_chunkQUSCSYHJcjs.getDocAncestorNodeIds.call(void 0, pathForExpansion)));
415
+ setExpandedNodes(new Set(_chunkTX4NTH22cjs.getDocAncestorNodeIds.call(void 0, pathForExpansion)));
438
416
  }
439
417
  } else if (nodes.length > 0) {
440
418
  const hasRootReadme = nodes.some((node) => node.type === "file" && node.path === folderIndexFile);
@@ -474,9 +452,10 @@ function useDocumentTree(config, initialPath) {
474
452
  setContent(null);
475
453
  return;
476
454
  }
477
- const probe = _chunkQUSCSYHJcjs.findDocNodeByPath.call(void 0, _chunkQUSCSYHJcjs.stripFolderIndexFromPath.call(void 0, path, folderIndexFile), structure);
455
+ const latestStructure = structureRef.current;
456
+ const probe = _chunkTX4NTH22cjs.findDocNodeByPath.call(void 0, _chunkTX4NTH22cjs.stripFolderIndexFromPath.call(void 0, path, folderIndexFile), latestStructure);
478
457
  const probeIsNoReadmeFolder = !!probe && probe.type === "folder" && !probe.hasReadme;
479
- const preStructureFolderLike = structure.length === 0 && !path.endsWith(".md");
458
+ const preStructureFolderLike = latestStructure.length === 0 && !path.endsWith(".md");
480
459
  if (probeIsNoReadmeFolder || preStructureFolderLike) {
481
460
  lastFetchedPath.current = null;
482
461
  setError(null);
@@ -531,11 +510,16 @@ function useDocumentTree(config, initialPath) {
531
510
  if (!structure || structure.length === 0) return;
532
511
  let pathToFetch = null;
533
512
  if (selectedPath === "") {
534
- pathToFetch = folderIndexFile;
513
+ const rootPath = _chunkTX4NTH22cjs.rootDocumentPath.call(void 0, structure, folderIndexFile);
514
+ if (!rootPath) {
515
+ lastFetchedPath.current = null;
516
+ return;
517
+ }
518
+ pathToFetch = rootPath;
535
519
  } else {
536
- const node = _chunkQUSCSYHJcjs.findDocNodeByPath.call(void 0, selectedPath, structure);
520
+ const node = _chunkTX4NTH22cjs.findDocNodeByPath.call(void 0, selectedPath, structure);
537
521
  if (node && node.type === "folder" && !node.hasReadme) {
538
- const firstDocPath = findFirstDocPath(node);
522
+ const firstDocPath = _chunkTX4NTH22cjs.findFirstDocPath.call(void 0, node);
539
523
  if (!firstDocPath) {
540
524
  lastFetchedPath.current = null;
541
525
  return;
@@ -574,16 +558,16 @@ function useDocumentTree(config, initialPath) {
574
558
  if (node.type === "folder") {
575
559
  setExpandedNodes((prev) => {
576
560
  if (prev.has(node.id)) {
577
- const ancestorIds = _chunkQUSCSYHJcjs.getDocAncestorNodeIds.call(void 0, node.path);
561
+ const ancestorIds = _chunkTX4NTH22cjs.getDocAncestorNodeIds.call(void 0, node.path);
578
562
  ancestorIds.pop();
579
563
  return new Set(ancestorIds);
580
564
  }
581
- return new Set(_chunkQUSCSYHJcjs.getDocAncestorNodeIds.call(void 0, node.path));
565
+ return new Set(_chunkTX4NTH22cjs.getDocAncestorNodeIds.call(void 0, node.path));
582
566
  });
583
567
  } else {
584
568
  const lastSlash = node.path.lastIndexOf("/");
585
569
  if (lastSlash > 0) {
586
- setExpandedNodes(new Set(_chunkQUSCSYHJcjs.getDocAncestorNodeIds.call(void 0, node.path.substring(0, lastSlash))));
570
+ setExpandedNodes(new Set(_chunkTX4NTH22cjs.getDocAncestorNodeIds.call(void 0, node.path.substring(0, lastSlash))));
587
571
  }
588
572
  }
589
573
  lastFetchedPath.current = null;
@@ -598,8 +582,8 @@ function useDocumentTree(config, initialPath) {
598
582
  const hashIndex = path.indexOf("#");
599
583
  const anchor = hashIndex !== -1 ? path.substring(hashIndex) : "";
600
584
  const cleanPath = path.replace(/\/$/, "").split("#")[0];
601
- const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _6 => _6.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current : _chunkQUSCSYHJcjs.stripFolderIndexFromPath.call(void 0, cleanPath, folderIndexFile);
602
- if (anchor && _optionalChain([options, 'optionalAccess', _7 => _7.fromInternalLink]) && pathForSelection === selectedPathRef.current) {
585
+ const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _5 => _5.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current : _chunkTX4NTH22cjs.stripFolderIndexFromPath.call(void 0, cleanPath, folderIndexFile);
586
+ if (anchor && _optionalChain([options, 'optionalAccess', _6 => _6.fromInternalLink]) && pathForSelection === selectedPathRef.current) {
603
587
  _chunkGRCOEICKcjs.navigateSamePageHash.call(void 0, anchor, { headerOffset: _chunkGRCOEICKcjs.HUB_HEADER_OFFSET_PX });
604
588
  return;
605
589
  }
@@ -619,7 +603,7 @@ function useDocumentTree(config, initialPath) {
619
603
  }, 150);
620
604
  }
621
605
  };
622
- if (_optionalChain([options, 'optionalAccess', _8 => _8.expandFolder])) {
606
+ if (_optionalChain([options, 'optionalAccess', _7 => _7.expandFolder])) {
623
607
  lastFetchedPath.current = null;
624
608
  setSelectedPath(cleanPath);
625
609
  window.history.pushState({}, "", `${normalizedBaseRoute}/${cleanPath}${anchor}`);
@@ -631,7 +615,7 @@ function useDocumentTree(config, initialPath) {
631
615
  nodeIdsToExpand.push(currentPath2.toLowerCase());
632
616
  }
633
617
  setExpandedNodes(new Set(nodeIdsToExpand));
634
- if (_optionalChain([options, 'optionalAccess', _9 => _9.fromInternalLink])) {
618
+ if (_optionalChain([options, 'optionalAccess', _8 => _8.fromInternalLink])) {
635
619
  scrollAfterNav();
636
620
  }
637
621
  setError(null);
@@ -641,7 +625,7 @@ function useDocumentTree(config, initialPath) {
641
625
  lastFetchedPath.current = null;
642
626
  setSelectedPath(pathForSelection);
643
627
  window.history.pushState({}, "", `${normalizedBaseRoute}/${urlPath}${anchor}`);
644
- if (_optionalChain([options, 'optionalAccess', _10 => _10.fromInternalLink])) {
628
+ if (_optionalChain([options, 'optionalAccess', _9 => _9.fromInternalLink])) {
645
629
  scrollAfterNav();
646
630
  }
647
631
  const pathParts = cleanPath.split("/");
@@ -662,25 +646,28 @@ function useDocumentTree(config, initialPath) {
662
646
  return docNavigation.register({
663
647
  baseRoute: normalizedBaseRoute,
664
648
  findNodeByPath: (path) => {
665
- const clean = _chunkQUSCSYHJcjs.stripFolderIndexFromPath.call(void 0, path.replace(/\/$/, "").split("#")[0], folderIndexFile);
666
- return _nullishCoalesce(_chunkQUSCSYHJcjs.findDocNodeByPath.call(void 0, clean, structure), () => ( null));
649
+ const clean = _chunkTX4NTH22cjs.stripFolderIndexFromPath.call(void 0, path.replace(/\/$/, "").split("#")[0], folderIndexFile);
650
+ return _nullishCoalesce(_chunkTX4NTH22cjs.findDocNodeByPath.call(void 0, clean, structure), () => ( null));
667
651
  },
668
652
  selectNode
669
653
  });
670
654
  }, [docNavigation, normalizedBaseRoute, structure, selectNode, folderIndexFile]);
671
655
  const isEmptyFolder = _react.useMemo.call(void 0, () => {
672
- if (!selectedPath || structure.length === 0) return false;
673
- const node = _chunkQUSCSYHJcjs.findDocNodeByPath.call(void 0, selectedPath, structure);
674
- return !!node && node.type === "folder" && !node.hasReadme && !findFirstDocPath(node);
675
- }, [selectedPath, structure]);
656
+ if (structure.length === 0) return false;
657
+ if (!selectedPath) return !_chunkTX4NTH22cjs.rootDocumentPath.call(void 0, structure, folderIndexFile);
658
+ const node = _chunkTX4NTH22cjs.findDocNodeByPath.call(void 0, selectedPath, structure);
659
+ return !!node && node.type === "folder" && !node.hasReadme && !_chunkTX4NTH22cjs.findFirstDocPath.call(void 0, node);
660
+ }, [selectedPath, structure, folderIndexFile]);
661
+ const isEmptySource = !isLoadingStructure && structure.length === 0;
662
+ const settled = isEmptyFolder || isEmptySource;
676
663
  return {
677
664
  structure,
678
665
  selectedPath,
679
666
  setSelectedPath,
680
- content: isEmptyFolder ? null : content,
667
+ content: settled ? null : content,
681
668
  isLoadingStructure,
682
- isLoadingContent: isEmptyFolder ? false : isLoadingContent,
683
- error: isEmptyFolder ? null : error,
669
+ isLoadingContent: settled ? false : isLoadingContent,
670
+ error: settled ? null : error,
684
671
  expandedNodes,
685
672
  toggleNode,
686
673
  selectNode,
@@ -706,11 +693,12 @@ function DocViewer(props) {
706
693
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DocViewerContent, { ...props });
707
694
  }
708
695
  var ON_THIS_PAGE_LABEL = "ON THIS PAGE";
696
+ var NO_SECTION_CLICK = () => {
697
+ };
709
698
  var ON_THIS_PAGE_HEADING_CLASS = "mb-4 font-semibold text-ods-text-secondary text-h5";
710
699
  function DocViewerContent({
711
700
  sourceId,
712
701
  renderContent,
713
- renderSkeleton,
714
702
  chatSource,
715
703
  title,
716
704
  subtitle,
@@ -718,6 +706,7 @@ function DocViewerContent({
718
706
  className = "",
719
707
  shell = true,
720
708
  docPath,
709
+ initialDocumentType,
721
710
  sidebarLabel = "DOCUMENTATION",
722
711
  structureEndpoint,
723
712
  contentEndpoint,
@@ -753,14 +742,14 @@ function DocViewerContent({
753
742
  },
754
743
  docPath
755
744
  );
756
- const { activeSection, handleSectionClick } = _chunkO4BXHCMKcjs.useScrollSpy.call(void 0, _optionalChain([content, 'optionalAccess', _11 => _11.sections]));
745
+ const { activeSection, handleSectionClick } = _chunkFRG724DUcjs.useScrollSpy.call(void 0, _optionalChain([content, 'optionalAccess', _10 => _10.sections]));
757
746
  const docNav = useDocNavigation();
758
747
  const router = _chunk7DNL734Scjs.useRouter.call(void 0, );
759
748
  const backCfg = backButton === false ? null : {
760
- label: _nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _12 => _12.label]), () => ( "Back to home")),
761
- onClick: () => router.push(_nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _13 => _13.href]), () => ( "/")))
749
+ label: _nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _11 => _11.label]), () => ( "Back to home")),
750
+ onClick: () => router.push(_nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _12 => _12.href]), () => ( "/")))
762
751
  };
763
- const docSearch = _chunk5HOWR4TGcjs.useDocSearch.call(void 0, {
752
+ const docSearch = _chunk5CBI2ZYVcjs.useDocSearch.call(void 0, {
764
753
  source: chatSource,
765
754
  baseRoute,
766
755
  searchEndpoint,
@@ -784,23 +773,28 @@ function DocViewerContent({
784
773
  onResolveLink: resolveLink
785
774
  });
786
775
  }, [content, renderContent, navigateToDoc, sourceId, resolveLink]);
787
- const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([_chunkQUSCSYHJcjs.findDocNodeByPath.call(void 0, selectedPath, structure), 'optionalAccess', _14 => _14.documentType]) : void 0;
788
- const activeDocType = _nullishCoalesce(_optionalChain([content, 'optionalAccess', _15 => _15.documentType]), () => ( selectedNodeDocType));
776
+ const selectedNodePath = structure.length > 0 && !selectedPath ? _chunkTX4NTH22cjs.rootDocumentPath.call(void 0, structure, folderIndexFile) : selectedPath;
777
+ const selectedNodeDocType = structure.length > 0 ? selectedNodePath ? _optionalChain([_chunkTX4NTH22cjs.findDocNodeByPath.call(void 0, selectedNodePath, structure), 'optionalAccess', _13 => _13.documentType]) : void 0 : initialDocumentType;
778
+ const isLoadingDocument = isLoadingContent || isLoadingStructure;
779
+ const loadingContent = isLoadingDocument ? renderContent(
780
+ { content: "", sections: [], path: _nullishCoalesce(selectedPath, () => ( "")), documentType: selectedNodeDocType },
781
+ { onInternalLinkClick: navigateToDoc, currentPath: _nullishCoalesce(selectedPath, () => ( "")), sourceId }
782
+ ) : null;
783
+ const activeDocType = isLoadingDocument ? selectedNodeDocType : _nullishCoalesce(_optionalChain([content, 'optionalAccess', _14 => _14.documentType]), () => ( selectedNodeDocType));
789
784
  const isMarkdownContent = !activeDocType || activeDocType === "markdown";
790
785
  const showStickyNav = isMarkdownContent;
791
- const stickyNavSections = _nullishCoalesce(_optionalChain([content, 'optionalAccess', _16 => _16.sections, 'optionalAccess', _17 => _17.map, 'call', _18 => _18((s) => ({ id: s.id, label: s.title }))]), () => ( []));
786
+ const stickyNavSections = _nullishCoalesce(_optionalChain([content, 'optionalAccess', _15 => _15.sections, 'optionalAccess', _16 => _16.map, 'call', _17 => _17((s) => ({ id: s.id, label: s.title }))]), () => ( []));
792
787
  const isColorValue = colorPalette.background.startsWith("#") || colorPalette.background.startsWith("rgb") || colorPalette.background.startsWith("var(");
793
788
  const bgStyle = isColorValue ? { backgroundColor: colorPalette.background } : {};
794
789
  const bgClass = !isColorValue ? colorPalette.background : "";
795
790
  const containerBgStyle = colorPalette.containerBackground !== "transparent" ? { backgroundColor: colorPalette.containerBackground } : {};
796
- const defaultEmptyText = structure.length > 0 ? "Select a document from the sidebar to view" : "No documents yet. Add content from the admin panel.";
797
- const resolvedEmptyText = emptyStateText || defaultEmptyText;
791
+ const resolvedEmptyText = structure.length > 0 ? "Select a document from the sidebar to view" : emptyStateText || "No documents yet.";
798
792
  const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIKOL6NJYcjs.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: [
799
- synced && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2V6FCVULcjs.DataSyncLine, { sync: _optionalChain([content, 'optionalAccess', _19 => _19.sync]), loading: !content && (isLoadingContent || isLoadingStructure) }),
793
+ synced && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYLETC7LPcjs.DataSyncLine, { sync: _optionalChain([content, 'optionalAccess', _18 => _18.sync]), loading: !content && (isLoadingContent || isLoadingStructure) }),
800
794
  showAIChat && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
801
- _chunk5HOWR4TGcjs.DocSearchBar,
795
+ _chunk5CBI2ZYVcjs.DocSearchBar,
802
796
  {
803
- placeholder: `Search ${_optionalChain([sidebarLabel, 'optionalAccess', _20 => _20.toLowerCase, 'call', _21 => _21()]) || "documents"}...`,
797
+ placeholder: `Search ${_optionalChain([sidebarLabel, 'optionalAccess', _19 => _19.toLowerCase, 'call', _20 => _20()]) || "documents"}...`,
804
798
  query: docSearch.query,
805
799
  onQueryChange: docSearch.setQuery,
806
800
  results: docSearch.results,
@@ -819,7 +813,7 @@ function DocViewerContent({
819
813
  !error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-1 flex-col items-start gap-6 content-lg:flex-row content-lg:gap-10", children: [
820
814
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full content-lg:w-[320px] content-lg:shrink-0", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "content-lg:sticky content-lg:top-20", children: [
821
815
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PersistentMobileDropdown, { isLoading: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
822
- _chunkO4BXHCMKcjs.MobileNavigationDropdown,
816
+ _chunkFRG724DUcjs.MobileNavigationDropdown,
823
817
  {
824
818
  nodes: structure,
825
819
  selectedPath,
@@ -833,7 +827,7 @@ function DocViewerContent({
833
827
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PersistentSidebar, { isLoading: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hidden content-lg:block", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
834
828
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-ods-text-secondary text-h5", children: sidebarLabel }),
835
829
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
836
- _chunkO4BXHCMKcjs.MultiLevelNavigation,
830
+ _chunkFRG724DUcjs.MultiLevelNavigation,
837
831
  {
838
832
  nodes: structure,
839
833
  selectedPath,
@@ -857,22 +851,28 @@ function DocViewerContent({
857
851
  // shouldn't be on file pages" bug.
858
852
  isMarkdownContent && (showStickyNav && stickyNavSections.length > 0 || isLoadingContent || isLoadingStructure) ? "content-lg:grid-cols-[1fr_280px]" : ""} gap-8`,
859
853
  children: [
860
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `w-full min-w-0 ${isMarkdownContent ? "mx-auto max-w-4xl" : ""}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "article", { className: "space-y-2", children: isLoadingContent || isLoadingStructure ? renderSkeleton(selectedNodeDocType) : !content ? /* @__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 text-h4", children: resolvedEmptyText }) }) : renderedContent }) }),
861
- isMarkdownContent && (isLoadingContent || isLoadingStructure) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hidden content-lg:block", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "sticky top-24", children: [
854
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `w-full min-w-0 ${isMarkdownContent ? "mx-auto max-w-4xl" : ""}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "article", { className: "space-y-2", children: isLoadingDocument ? (
855
+ // The document being opened draws its own loading form: its renderer, in a loading scope,
856
+ // with an empty document of its type (no words, no address), never a skeleton picked here.
857
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk63A4GZMBcjs.LoadingScope, { children: loadingContent })
858
+ ) : !content ? /* @__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 text-h4", children: resolvedEmptyText }) }) : renderedContent }) }),
859
+ isMarkdownContent && isLoadingDocument && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hidden content-lg:block", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "sticky top-24", children: [
862
860
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: ON_THIS_PAGE_HEADING_CLASS, children: ON_THIS_PAGE_LABEL }),
863
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-0", children: [130, 170, 190, 220, 110, 200, 80, 100, 120, 140, 90].map((w, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
864
- "div",
861
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk63A4GZMBcjs.LoadingScope, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
862
+ _chunkFRG724DUcjs.StickySectionNav,
865
863
  {
866
- className: `border-l-2 py-[13px] pl-3 ${i === 0 ? "border-ods-accent" : "border-transparent"}`,
867
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.UnifiedSkeleton, { className: "h-[13px] rounded", width: w })
868
- },
869
- i
870
- )) })
864
+ sections: [],
865
+ activeSection: "",
866
+ onSectionClick: NO_SECTION_CLICK,
867
+ ribbonPosition: "left",
868
+ ribbonColor: "var(--ods-accent)"
869
+ }
870
+ ) })
871
871
  ] }) }),
872
872
  showStickyNav && content && stickyNavSections.length > 0 && !isLoadingContent && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hidden content-lg:block", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "sticky top-24", children: [
873
873
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: ON_THIS_PAGE_HEADING_CLASS, children: ON_THIS_PAGE_LABEL }),
874
874
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
875
- _chunkO4BXHCMKcjs.StickySectionNav,
875
+ _chunkFRG724DUcjs.StickySectionNav,
876
876
  {
877
877
  sections: stickyNavSections,
878
878
  activeSection,
@@ -887,91 +887,18 @@ function DocViewerContent({
887
887
  ) })
888
888
  ] })
889
889
  ] }) }) });
890
- return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2V6FCVULcjs.PageShell, { contentClassName: `${bgClass} ${className}`, children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `page-shell-content ${bgClass} ${className}`.trim(), children: inner });
891
- }
892
-
893
- // src/components/docs/skeletons.tsx
894
-
895
- var MARKDOWN_SKELETON_BLOCKS = [
896
- { kind: "p", lines: 4 },
897
- { kind: "p", lines: 4 },
898
- { kind: "p", lines: 5 },
899
- { kind: "h2" },
900
- { kind: "p", lines: 4 },
901
- { kind: "p", lines: 5 },
902
- { kind: "h2" },
903
- { kind: "p", lines: 3 },
904
- { kind: "p", lines: 4 }
905
- ];
906
- var MARKDOWN_SKELETON_H2_CLASS = _chunk63A4GZMBcjs.cn.call(void 0, _chunkYAW7CHLVcjs.MARKDOWN_H2_CLASS, _chunkYAW7CHLVcjs.TEXT_SIZE_PRESETS.default.h2);
907
- var MARKDOWN_SKELETON_P_CLASS = _chunk63A4GZMBcjs.cn.call(void 0, _chunkYAW7CHLVcjs.MARKDOWN_PARAGRAPH_CLASS, _chunkYAW7CHLVcjs.TEXT_SIZE_PRESETS.default.p);
908
- function MarkdownSkeleton({
909
- region = true
910
- } = {}) {
911
- return (
912
- // The renderer's root class, and its box (no margin of its own, like the rendered body): the document's first fold.
913
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2XCORRJVcjs.LoadingRegion, { label: "Loading the document", announce: region, className: _chunkYAW7CHLVcjs.MARKDOWN_RENDERER_CLASS, children: MARKDOWN_SKELETON_BLOCKS.map(
914
- (block, i) => block.kind === "h2" ? (
915
- // biome-ignore lint/suspicious/noArrayIndexKey: skeleton blocks never reorder
916
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: MARKDOWN_SKELETON_H2_CLASS, "aria-hidden": true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.TextLineSkeleton, { type: "inherit", as: "span", className: "w-1/3" }) }, i)
917
- ) : (
918
- // The last block ends the body with no margin, like the rendered one. Its own `last:mb-0` does not apply here:
919
- // the region's status line follows the blocks, so the paragraph is not the last child.
920
- // biome-ignore lint/suspicious/noArrayIndexKey: skeleton blocks never reorder
921
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
922
- "p",
923
- {
924
- className: _chunk63A4GZMBcjs.cn.call(void 0, MARKDOWN_SKELETON_P_CLASS, i === MARKDOWN_SKELETON_BLOCKS.length - 1 && "mb-0"),
925
- "aria-hidden": true,
926
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.TextLineSkeleton, { type: "inherit", as: "span", lines: block.lines, className: "w-full" })
927
- },
928
- i
929
- )
930
- )
931
- ) })
932
- );
933
- }
934
- function EmbedSkeleton({ documentType, region = true } = {}) {
935
- if (documentType === "file") {
936
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
937
- _chunk2XCORRJVcjs.LoadingRegion,
938
- {
939
- label: "Loading the document",
940
- announce: region,
941
- className: "flex flex-col items-center justify-center py-16",
942
- children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-full max-w-md space-y-4 rounded-xl border border-ods-border bg-ods-card p-8 text-center", children: [
943
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.UnifiedSkeleton, { className: "mx-auto h-16 w-16 rounded" }),
944
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
945
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.UnifiedSkeleton, { className: "mx-auto h-5 w-2/3 rounded" }),
946
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.UnifiedSkeleton, { className: "mx-auto h-4 w-1/2 rounded" })
947
- ] }),
948
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.UnifiedSkeleton, { className: "h-10 w-full rounded" })
949
- ] })
950
- }
951
- );
952
- }
953
- const buttonCount = documentType === "pdf" ? 2 : 1;
954
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2XCORRJVcjs.LoadingRegion, { label: "Loading the document", announce: region, className: "space-y-4", children: [
955
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3 content-sm:flex-row content-sm:items-center content-sm:justify-between", children: [
956
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
957
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.UnifiedSkeleton, { className: "h-5 w-5 shrink-0 rounded" }),
958
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.UnifiedSkeleton, { className: "h-6 w-2/3 rounded" })
959
- ] }),
960
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full items-center gap-2 content-sm:w-auto", children: Array.from({ length: buttonCount }).map((_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.UnifiedSkeleton, { className: "h-10 w-full flex-1 rounded content-sm:w-32 content-sm:flex-initial" }, i)) })
961
- ] }),
962
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2V6FCVULcjs.EmbedLoadingSkeleton, { region: false })
963
- ] });
890
+ return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYLETC7LPcjs.PageShell, { contentClassName: `${bgClass} ${className}`, children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `page-shell-content ${bgClass} ${className}`.trim(), children: inner });
964
891
  }
965
892
 
966
893
  // src/components/docs/docs-hub-page.tsx
967
894
 
968
895
  var DEFAULT_TITLE = "Documents";
969
896
  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" }) });
970
- var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkI3YRYS23cjs.PdfViewer, { src: content.fileUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
971
- var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkI3YRYS23cjs.GoogleSheetsViewer, { externalUrl: content.externalUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
972
- var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2V6FCVULcjs.FigmaEmbed, { url: content.externalUrl, title: content.fileName, loading: "eager" }) : defaultFallbackRenderer(content, handlers);
897
+ var defaultPdfRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkC3P7IUTUcjs.PdfViewer, { src: _nullishCoalesce(content.fileUrl, () => ( "")), fileName: content.fileName });
898
+ var defaultGoogleSheetRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkC3P7IUTUcjs.GoogleSheetsViewer, { externalUrl: _nullishCoalesce(content.externalUrl, () => ( "")), fileName: content.fileName });
899
+ var defaultFigmaRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYLETC7LPcjs.FigmaEmbed, { url: _nullishCoalesce(content.externalUrl, () => ( "")), title: content.fileName, iframeLoading: "eager" });
973
900
  var defaultFileRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
974
- _chunkI3YRYS23cjs.FileDownloadCard,
901
+ _chunkC3P7IUTUcjs.FileDownloadCard,
975
902
  {
976
903
  fileName: content.fileName,
977
904
  mimeType: content.mimeType,
@@ -979,11 +906,6 @@ var defaultFileRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void
979
906
  fileUrl: content.fileUrl
980
907
  }
981
908
  );
982
- var documentLoadingForm = (documentType) => !documentType || documentType === "markdown" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MarkdownSkeleton, {}) : (
983
- // Forward the documentType so the embed skeleton renders the right
984
- // shape (PDF=2 buttons, sheets/figma=1 button, file=centered card).
985
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmbedSkeleton, { documentType })
986
- );
987
909
  function DocsHubPage({
988
910
  title = DEFAULT_TITLE,
989
911
  documentTypeRenderers,
@@ -1013,8 +935,7 @@ function DocsHubPage({
1013
935
  showAIChat,
1014
936
  className,
1015
937
  sidebarLabel,
1016
- renderContent,
1017
- renderSkeleton: documentLoadingForm
938
+ renderContent
1018
939
  }
1019
940
  );
1020
941
  }
@@ -8,13 +8,13 @@ var _chunkMZ4KBSH7cjs = require('./chunk-MZ4KBSH7.cjs');
8
8
 
9
9
 
10
10
 
11
- var _chunkQUSCSYHJcjs = require('./chunk-QUSCSYHJ.cjs');
11
+ var _chunkTX4NTH22cjs = require('./chunk-TX4NTH22.cjs');
12
12
 
13
13
 
14
14
 
15
15
 
16
16
 
17
- var _chunkYAW7CHLVcjs = require('./chunk-YAW7CHLV.cjs');
17
+ var _chunkFXLROQUTcjs = require('./chunk-FXLROQUT.cjs');
18
18
 
19
19
 
20
20
 
@@ -33,10 +33,10 @@ var _chunkIX2E3AN7cjs = require('./chunk-IX2E3AN7.cjs');
33
33
 
34
34
 
35
35
 
36
- var _chunkU7UBYJEZcjs = require('./chunk-U7UBYJEZ.cjs');
36
+ var _chunkBU2PSRAScjs = require('./chunk-BU2PSRAS.cjs');
37
37
 
38
38
 
39
- var _chunkYXKAHQYScjs = require('./chunk-YXKAHQYS.cjs');
39
+ var _chunk533QK4R6cjs = require('./chunk-533QK4R6.cjs');
40
40
 
41
41
 
42
42
  var _chunkFX35L4Y6cjs = require('./chunk-FX35L4Y6.cjs');
@@ -82,7 +82,7 @@ function FaqAccordion({ items, defaultOpenIds = [], loading: loadingProp, skelet
82
82
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
83
83
  "div",
84
84
  {
85
- id: _chunkYAW7CHLVcjs.faqItemAnchor.call(void 0, item.id),
85
+ id: _chunkFXLROQUTcjs.faqItemAnchor.call(void 0, item.id),
86
86
  className: _chunk63A4GZMBcjs.cn.call(void 0, ROW_FRAME_CLASS, "hover:bg-ods-bg-hover"),
87
87
  "data-loading-item": true,
88
88
  children: [
@@ -148,14 +148,14 @@ function FaqAccordionSkeleton({
148
148
 
149
149
  var PICK_ROOT_MARGIN = "600px";
150
150
  function faqAskCardShown(assistant) {
151
- return _chunkQUSCSYHJcjs.assistantAvailable.call(void 0, assistant) && !!assistant.name;
151
+ return _chunkTX4NTH22cjs.assistantAvailable.call(void 0, assistant) && !!assistant.name;
152
152
  }
153
153
  function FaqAskCard({ exclude, count, title, description, onOpen }) {
154
154
  const { ref, inView } = _chunkGRCOEICKcjs.useInView.call(void 0, { rootMargin: PICK_ROOT_MARGIN });
155
155
  const [reached, setReached] = _react.useState.call(void 0, false);
156
156
  if (inView && !reached) setReached(true);
157
157
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
158
- _chunkQUSCSYHJcjs.AssistantAskPrompts,
158
+ _chunkTX4NTH22cjs.AssistantAskPrompts,
159
159
  {
160
160
  variant: "card",
161
161
  count,
@@ -214,7 +214,7 @@ var CATEGORY_NAV_SKELETON_LINE_CLASS = "flex min-w-0 flex-nowrap gap-2 overflow-
214
214
  var FAQ_NAV_SKELETON_PILLS = 8;
215
215
  var CATEGORY_PILL_CLASS = "rounded-full border px-4 py-2 transition-colors text-h6";
216
216
  var CATEGORY_SECTION_CLASS = "scroll-mt-24";
217
- var CATEGORY_HEADING_CLASS = _chunk63A4GZMBcjs.cn.call(void 0, _chunkYXKAHQYScjs.SECTION_HEADING_CLASS, "pb-4");
217
+ var CATEGORY_HEADING_CLASS = _chunk63A4GZMBcjs.cn.call(void 0, _chunk533QK4R6cjs.SECTION_HEADING_CLASS, "pb-4");
218
218
  var FAQ_SECTION_SKELETON_QUESTIONS = FAQ_ACCORDION_SKELETON_ROWS;
219
219
  function FaqLayout({
220
220
  heading,
@@ -240,11 +240,11 @@ function FaqLayout({
240
240
  ] });
241
241
  }
242
242
  function faqHeadingNode(heading, showTopic, topic) {
243
- const titleNode = heading === void 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: _chunkYXKAHQYScjs.SECTION_HEADING_CLASS, children: DEFAULT_HEADING_TEXT }) : heading;
243
+ const titleNode = heading === void 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: _chunk533QK4R6cjs.SECTION_HEADING_CLASS, children: DEFAULT_HEADING_TEXT }) : heading;
244
244
  if (!(showTopic && topic)) return titleNode;
245
245
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: TOPIC_STACK_CLASS, children: [
246
246
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: titleNode }),
247
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYAW7CHLVcjs.PageTopicLabel, {})
247
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFXLROQUTcjs.PageTopicLabel, {})
248
248
  ] });
249
249
  }
250
250
  var PAGE_FAQ_SECTION_ID = "faq";
@@ -255,7 +255,7 @@ function SharedPageFaq() {
255
255
  }
256
256
  function buildFaqsUrl(endpoint, entityType, entityId, minResults, topic) {
257
257
  const entityScoped = !!entityType && entityId !== void 0 && entityId !== null && entityId !== "";
258
- return _chunkU7UBYJEZcjs.buildSuggestionUrl.call(void 0, endpoint, {
258
+ return _chunkBU2PSRAScjs.buildSuggestionUrl.call(void 0, endpoint, {
259
259
  entityType,
260
260
  entityId,
261
261
  count: minResults,
@@ -275,7 +275,7 @@ function groupFaqsBySection(faqs) {
275
275
  }
276
276
  let group = byName.get(name);
277
277
  if (!group) {
278
- group = { section: name, slug: _chunkYAW7CHLVcjs.faqSectionSlug.call(void 0, name), items: [] };
278
+ group = { section: name, slug: _chunkFXLROQUTcjs.faqSectionSlug.call(void 0, name), items: [] };
279
279
  byName.set(name, group);
280
280
  }
281
281
  group.items.push(item);
@@ -331,7 +331,7 @@ function GroupedFaqList({
331
331
  }, [slugKey]);
332
332
  const [hashTarget, setHashTarget] = _react.useState.call(void 0, null);
333
333
  _react.useEffect.call(void 0, () => {
334
- const refresh = () => setHashTarget(_chunkYAW7CHLVcjs.parseFaqHash.call(void 0, window.location.hash));
334
+ const refresh = () => setHashTarget(_chunkFXLROQUTcjs.parseFaqHash.call(void 0, window.location.hash));
335
335
  refresh();
336
336
  window.addEventListener("hashchange", refresh);
337
337
  return () => window.removeEventListener("hashchange", refresh);
@@ -435,7 +435,7 @@ function FaqSection({
435
435
  () => initialFaqs ? { faqs: initialFaqs } : void 0,
436
436
  [initialFaqs]
437
437
  );
438
- const { data, dataUrl, isLoading, error } = _chunkU7UBYJEZcjs.useSelfFetch.call(void 0, inScope ? null : url, { initialData });
438
+ const { data, dataUrl, isLoading, error } = _chunkBU2PSRAScjs.useSelfFetch.call(void 0, inScope ? null : url, { initialData });
439
439
  const held = dataUrl === url ? _optionalChain([data, 'optionalAccess', _15 => _15.faqs]) : void 0;
440
440
  const faqs = _react.useMemo.call(void 0, () => _nullishCoalesce(held, () => ( [])), [held]);
441
441
  const groups = _react.useMemo.call(void 0, () => faqs.length > 0 ? groupFaqsBySection(faqs) : [], [faqs]);