@flamingo-stack/openframe-frontend-core 0.0.673 → 0.0.674-2431.7289.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-3UDBK2YG.cjs → chunk-4J7CFT6D.cjs} +57 -57
- package/dist/chunk-4J7CFT6D.cjs.map +1 -0
- package/dist/{chunk-L3KN6HLJ.cjs → chunk-4Q6P3VHS.cjs} +26 -26
- package/dist/{chunk-L3KN6HLJ.cjs.map → chunk-4Q6P3VHS.cjs.map} +1 -1
- package/dist/{chunk-A6WWJR7C.cjs → chunk-7F73YNDS.cjs} +7 -7
- package/dist/{chunk-A6WWJR7C.cjs.map → chunk-7F73YNDS.cjs.map} +1 -1
- package/dist/{chunk-GH236QRY.js → chunk-BQICLH4C.js} +7 -7
- package/dist/{chunk-FO26QOTY.cjs → chunk-CHKIZRUP.cjs} +39 -39
- package/dist/{chunk-FO26QOTY.cjs.map → chunk-CHKIZRUP.cjs.map} +1 -1
- package/dist/{chunk-RNERYM2P.cjs → chunk-EGQOPBXC.cjs} +5 -5
- package/dist/{chunk-RNERYM2P.cjs.map → chunk-EGQOPBXC.cjs.map} +1 -1
- package/dist/{chunk-4IXJYRVE.cjs → chunk-EJZV4QGU.cjs} +403 -403
- package/dist/{chunk-4IXJYRVE.cjs.map → chunk-EJZV4QGU.cjs.map} +1 -1
- package/dist/{chunk-MT44R3LJ.js → chunk-EPKQTPNJ.js} +6 -6
- package/dist/{chunk-EP7QPXSI.cjs → chunk-FUEAXTZE.cjs} +17 -17
- package/dist/{chunk-EP7QPXSI.cjs.map → chunk-FUEAXTZE.cjs.map} +1 -1
- package/dist/{chunk-YIPFHZHY.js → chunk-G7HMYIDN.js} +2 -2
- package/dist/{chunk-YTGB5CHX.js → chunk-GJTLUW2H.js} +4 -4
- package/dist/{chunk-Y2CXELYC.cjs → chunk-HN7KNVKL.cjs} +6 -5
- package/dist/chunk-HN7KNVKL.cjs.map +1 -0
- package/dist/{chunk-3T4GPKSB.js → chunk-IGKXYFCP.js} +2 -1
- package/dist/{chunk-3T4GPKSB.js.map → chunk-IGKXYFCP.js.map} +1 -1
- package/dist/{chunk-V2A4MAAL.cjs → chunk-ILAHSBZI.cjs} +3 -2
- package/dist/chunk-ILAHSBZI.cjs.map +1 -0
- package/dist/{chunk-6MGQOZPT.cjs → chunk-L7PO6NSD.cjs} +10 -10
- package/dist/{chunk-6MGQOZPT.cjs.map → chunk-L7PO6NSD.cjs.map} +1 -1
- package/dist/{chunk-2HEZSBUU.js → chunk-M76D6OJZ.js} +8 -8
- package/dist/{chunk-MENONRB4.js → chunk-MMOXFVQN.js} +3 -3
- package/dist/{chunk-PWRRSAO6.cjs → chunk-MRT6DZG5.cjs} +50 -50
- package/dist/{chunk-PWRRSAO6.cjs.map → chunk-MRT6DZG5.cjs.map} +1 -1
- package/dist/{chunk-O4KO4CT6.cjs → chunk-N6CI2E7D.cjs} +12 -12
- package/dist/{chunk-O4KO4CT6.cjs.map → chunk-N6CI2E7D.cjs.map} +1 -1
- package/dist/{chunk-2OYZ5INK.js → chunk-NRHEKFPG.js} +4 -4
- package/dist/{chunk-WJJA42FG.cjs → chunk-OAQROGFN.cjs} +80 -80
- package/dist/{chunk-WJJA42FG.cjs.map → chunk-OAQROGFN.cjs.map} +1 -1
- package/dist/{chunk-DKFWIJD7.cjs → chunk-PP3N5MN4.cjs} +3 -3
- package/dist/{chunk-DKFWIJD7.cjs.map → chunk-PP3N5MN4.cjs.map} +1 -1
- package/dist/{chunk-SEGLWILF.js → chunk-PXWMRXVI.js} +55 -26
- package/dist/{chunk-SEGLWILF.js.map → chunk-PXWMRXVI.js.map} +1 -1
- package/dist/{chunk-32JKIRN4.js → chunk-QO4RASGC.js} +4 -3
- package/dist/chunk-QO4RASGC.js.map +1 -0
- package/dist/{chunk-JYDAEBWM.cjs → chunk-QZMKKQQN.cjs} +20 -20
- package/dist/{chunk-JYDAEBWM.cjs.map → chunk-QZMKKQQN.cjs.map} +1 -1
- package/dist/{chunk-6EBW4HFR.cjs → chunk-RCLYHHB3.cjs} +12 -12
- package/dist/{chunk-6EBW4HFR.cjs.map → chunk-RCLYHHB3.cjs.map} +1 -1
- package/dist/{chunk-QPPDBX5E.js → chunk-RSOBME56.js} +5 -5
- package/dist/{chunk-2GF77XVC.js → chunk-TECYEWVQ.js} +5 -5
- package/dist/{chunk-MU5ORFBU.cjs → chunk-TWQWCOJ7.cjs} +22 -22
- package/dist/{chunk-MU5ORFBU.cjs.map → chunk-TWQWCOJ7.cjs.map} +1 -1
- package/dist/{chunk-5WG4GVJS.cjs → chunk-UIQQBZLU.cjs} +90 -61
- package/dist/chunk-UIQQBZLU.cjs.map +1 -0
- package/dist/{chunk-JFTWABV6.js → chunk-UYPICURQ.js} +2 -2
- package/dist/{chunk-JD4U7QMG.js → chunk-VQX6JGWJ.js} +6 -6
- package/dist/chunk-VQX6JGWJ.js.map +1 -0
- package/dist/{chunk-EEIN4JOR.js → chunk-XBNO42PI.js} +3 -3
- package/dist/{chunk-OO45SNKF.js → chunk-XYZQXHAX.js} +5 -5
- package/dist/{chunk-EUL7CPOO.js → chunk-YRNYKT4J.js} +2 -2
- package/dist/{chunk-FGQNWXIT.js → chunk-YVJDVVHY.js} +4 -4
- package/dist/components/case-studies/index.cjs +17 -17
- package/dist/components/case-studies/index.js +5 -5
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/index.cjs +6 -6
- package/dist/components/contact/index.js +5 -5
- package/dist/components/docs/index.cjs +9 -9
- package/dist/components/docs/index.js +8 -8
- package/dist/components/docs/use-scroll-spy.d.ts +17 -5
- package/dist/components/docs/use-scroll-spy.d.ts.map +1 -1
- package/dist/components/embeds/index.cjs +6 -6
- package/dist/components/embeds/index.js +5 -5
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/faq/index.js +5 -5
- package/dist/components/features/index.cjs +5 -5
- package/dist/components/features/index.js +4 -4
- package/dist/components/help-center-pages/index.cjs +85 -86
- package/dist/components/help-center-pages/index.cjs.map +1 -1
- package/dist/components/help-center-pages/index.js +20 -21
- package/dist/components/help-center-pages/index.js.map +1 -1
- package/dist/components/help-center-pages/trust-center-page.d.ts.map +1 -1
- package/dist/components/index.cjs +45 -45
- package/dist/components/index.js +15 -15
- package/dist/components/meeting-scheduler/index.cjs +30 -30
- package/dist/components/meeting-scheduler/index.js +4 -4
- package/dist/components/navigation/index.cjs +8 -8
- package/dist/components/navigation/index.js +7 -7
- package/dist/components/navigation/sticky-section-nav.d.ts.map +1 -1
- package/dist/components/onboarding-guides/index.cjs +8 -8
- package/dist/components/onboarding-guides/index.js +7 -7
- package/dist/components/tickets/index.cjs +9 -9
- package/dist/components/tickets/index.js +8 -8
- package/dist/components/ui/index.cjs +5 -5
- package/dist/components/ui/index.js +4 -4
- package/dist/hooks/index.cjs +3 -3
- package/dist/hooks/index.js +2 -2
- package/dist/index.cjs +10 -10
- package/dist/index.js +8 -8
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/scroll-into-view.d.ts +10 -0
- package/dist/utils/scroll-into-view.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-message-enhanced.tsx +12 -3
- package/src/components/chat/chat-message-list.tsx +1 -1
- package/src/components/chat/entity-cards/dispatch.tsx +1 -1
- package/src/components/docs/__tests__/use-scroll-spy.test.tsx +163 -3
- package/src/components/docs/use-scroll-spy.ts +109 -37
- package/src/components/help-center-pages/__tests__/trust-center-page.test.tsx +5 -1
- package/src/components/help-center-pages/trust-center-page.tsx +15 -11
- package/src/components/navigation/sticky-section-nav.tsx +3 -0
- package/src/stories/TrustCenterPage.stories.tsx +38 -0
- package/src/utils/scroll-into-view.ts +7 -2
- package/dist/chunk-32JKIRN4.js.map +0 -1
- package/dist/chunk-3UDBK2YG.cjs.map +0 -1
- package/dist/chunk-5WG4GVJS.cjs.map +0 -1
- package/dist/chunk-JD4U7QMG.js.map +0 -1
- package/dist/chunk-V2A4MAAL.cjs.map +0 -1
- package/dist/chunk-Y2CXELYC.cjs.map +0 -1
- /package/dist/{chunk-GH236QRY.js.map → chunk-BQICLH4C.js.map} +0 -0
- /package/dist/{chunk-MT44R3LJ.js.map → chunk-EPKQTPNJ.js.map} +0 -0
- /package/dist/{chunk-YIPFHZHY.js.map → chunk-G7HMYIDN.js.map} +0 -0
- /package/dist/{chunk-YTGB5CHX.js.map → chunk-GJTLUW2H.js.map} +0 -0
- /package/dist/{chunk-2HEZSBUU.js.map → chunk-M76D6OJZ.js.map} +0 -0
- /package/dist/{chunk-MENONRB4.js.map → chunk-MMOXFVQN.js.map} +0 -0
- /package/dist/{chunk-2OYZ5INK.js.map → chunk-NRHEKFPG.js.map} +0 -0
- /package/dist/{chunk-QPPDBX5E.js.map → chunk-RSOBME56.js.map} +0 -0
- /package/dist/{chunk-2GF77XVC.js.map → chunk-TECYEWVQ.js.map} +0 -0
- /package/dist/{chunk-JFTWABV6.js.map → chunk-UYPICURQ.js.map} +0 -0
- /package/dist/{chunk-EEIN4JOR.js.map → chunk-XBNO42PI.js.map} +0 -0
- /package/dist/{chunk-OO45SNKF.js.map → chunk-XYZQXHAX.js.map} +0 -0
- /package/dist/{chunk-EUL7CPOO.js.map → chunk-YRNYKT4J.js.map} +0 -0
- /package/dist/{chunk-FGQNWXIT.js.map → chunk-YVJDVVHY.js.map} +0 -0
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk7F73YNDScjs = require('./chunk-7F73YNDS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkHN7KNVKLcjs = require('./chunk-HN7KNVKL.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkN6CI2E7Dcjs = require('./chunk-N6CI2E7D.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ var _chunkO4KO4CT6cjs = require('./chunk-O4KO4CT6.cjs');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkEJZV4QGUcjs = require('./chunk-EJZV4QGU.cjs');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunkVTYP25OWcjs = require('./chunk-VTYP25OW.cjs');
|
|
@@ -31,7 +31,8 @@ var _chunkVTYP25OWcjs = require('./chunk-VTYP25OW.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
|
|
35
|
+
var _chunkILAHSBZIcjs = require('./chunk-ILAHSBZI.cjs');
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
var _chunkSADRZ4YIcjs = require('./chunk-SADRZ4YI.cjs');
|
|
@@ -223,9 +224,9 @@ function useDocsResolveLink(sourceId, resolveLinkEndpoint) {
|
|
|
223
224
|
function scrollToContent() {
|
|
224
225
|
const article = document.querySelector("article");
|
|
225
226
|
if (article) {
|
|
226
|
-
|
|
227
|
+
_chunkILAHSBZIcjs.scrollElementIntoView.call(void 0, article, { headerOffset: _chunkILAHSBZIcjs.HUB_HEADER_OFFSET_PX });
|
|
227
228
|
} else {
|
|
228
|
-
|
|
229
|
+
_chunkILAHSBZIcjs.scrollElementIntoView.call(void 0, document.documentElement);
|
|
229
230
|
}
|
|
230
231
|
}
|
|
231
232
|
function findFirstDocPath(folder) {
|
|
@@ -324,8 +325,8 @@ function toDocContent(value, requestedPath) {
|
|
|
324
325
|
}
|
|
325
326
|
function useDocumentTree(config, initialPath) {
|
|
326
327
|
const { structureEndpoint, contentEndpoint, baseRoute } = config;
|
|
327
|
-
const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => (
|
|
328
|
-
const cleanInitialPath =
|
|
328
|
+
const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => ( _chunkEJZV4QGUcjs.DEFAULT_FOLDER_INDEX_FILE));
|
|
329
|
+
const cleanInitialPath = _chunkEJZV4QGUcjs.stripFolderIndexFromPath.call(void 0, _optionalChain([initialPath, 'optionalAccess', _4 => _4.replace, 'call', _5 => _5(/\/$/, "")]) || "", folderIndexFile);
|
|
329
330
|
const [structure, setStructure] = _react.useState.call(void 0, []);
|
|
330
331
|
const [selectedPath, setSelectedPath] = _react.useState.call(void 0, cleanInitialPath);
|
|
331
332
|
const [content, setContent] = _react.useState.call(void 0, null);
|
|
@@ -349,12 +350,12 @@ function useDocumentTree(config, initialPath) {
|
|
|
349
350
|
} else if (pathname.startsWith(`${normalizedBaseRoute}/`)) {
|
|
350
351
|
pathFromUrl = pathname.substring(`${normalizedBaseRoute}/`.length);
|
|
351
352
|
}
|
|
352
|
-
pathFromUrl =
|
|
353
|
+
pathFromUrl = _chunkEJZV4QGUcjs.stripFolderIndexFromPath.call(void 0, pathFromUrl, folderIndexFile);
|
|
353
354
|
if (pathFromUrl !== selectedPathRef.current) {
|
|
354
355
|
setSelectedPath(pathFromUrl);
|
|
355
356
|
if (pathFromUrl) {
|
|
356
357
|
const parentPath = pathFromUrl.includes("/") ? pathFromUrl.substring(0, pathFromUrl.lastIndexOf("/")) : pathFromUrl;
|
|
357
|
-
setExpandedNodes(new Set(
|
|
358
|
+
setExpandedNodes(new Set(_chunkEJZV4QGUcjs.getDocAncestorNodeIds.call(void 0, parentPath)));
|
|
358
359
|
}
|
|
359
360
|
setTimeout(() => {
|
|
360
361
|
scrollToContent();
|
|
@@ -372,7 +373,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
372
373
|
setSelectedPath(cleanInitialPath);
|
|
373
374
|
if (cleanInitialPath) {
|
|
374
375
|
const parentPath = cleanInitialPath.includes("/") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
|
|
375
|
-
setExpandedNodes(new Set(
|
|
376
|
+
setExpandedNodes(new Set(_chunkEJZV4QGUcjs.getDocAncestorNodeIds.call(void 0, parentPath)));
|
|
376
377
|
}
|
|
377
378
|
setExternalNavCount((n) => n + 1);
|
|
378
379
|
}
|
|
@@ -397,7 +398,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
397
398
|
if (cleanInitialPath) {
|
|
398
399
|
const pathForExpansion = cleanInitialPath.includes(".") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
|
|
399
400
|
if (pathForExpansion) {
|
|
400
|
-
setExpandedNodes(new Set(
|
|
401
|
+
setExpandedNodes(new Set(_chunkEJZV4QGUcjs.getDocAncestorNodeIds.call(void 0, pathForExpansion)));
|
|
401
402
|
}
|
|
402
403
|
} else if (nodes.length > 0) {
|
|
403
404
|
const hasRootReadme = nodes.some((node) => node.type === "file" && node.path === folderIndexFile);
|
|
@@ -413,7 +414,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
413
414
|
}
|
|
414
415
|
}
|
|
415
416
|
} else {
|
|
416
|
-
setError(
|
|
417
|
+
setError(_chunkILAHSBZIcjs.apiErrorMessage.call(void 0, payload, "Failed to load documentation structure"));
|
|
417
418
|
}
|
|
418
419
|
} catch (err) {
|
|
419
420
|
console.error("Error fetching documentation structure:", err);
|
|
@@ -437,7 +438,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
437
438
|
setContent(null);
|
|
438
439
|
return;
|
|
439
440
|
}
|
|
440
|
-
const probe =
|
|
441
|
+
const probe = _chunkEJZV4QGUcjs.findDocNodeByPath.call(void 0, _chunkEJZV4QGUcjs.stripFolderIndexFromPath.call(void 0, path, folderIndexFile), structure);
|
|
441
442
|
const probeIsNoReadmeFolder = !!probe && probe.type === "folder" && !probe.hasReadme;
|
|
442
443
|
const preStructureFolderLike = structure.length === 0 && !path.endsWith(".md");
|
|
443
444
|
if (probeIsNoReadmeFolder || preStructureFolderLike) {
|
|
@@ -446,7 +447,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
446
447
|
setContent(null);
|
|
447
448
|
return;
|
|
448
449
|
}
|
|
449
|
-
setError(
|
|
450
|
+
setError(_chunkILAHSBZIcjs.apiErrorMessage.call(void 0, errorPayload, "Documentation file not found"));
|
|
450
451
|
setContent(null);
|
|
451
452
|
return;
|
|
452
453
|
}
|
|
@@ -464,7 +465,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
464
465
|
}
|
|
465
466
|
setContent(doc);
|
|
466
467
|
} else {
|
|
467
|
-
setError(
|
|
468
|
+
setError(_chunkILAHSBZIcjs.apiErrorMessage.call(void 0, payload, "Failed to load content"));
|
|
468
469
|
setContent(null);
|
|
469
470
|
}
|
|
470
471
|
} catch (err) {
|
|
@@ -494,7 +495,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
494
495
|
if (selectedPath === "") {
|
|
495
496
|
pathToFetch = folderIndexFile;
|
|
496
497
|
} else {
|
|
497
|
-
const node =
|
|
498
|
+
const node = _chunkEJZV4QGUcjs.findDocNodeByPath.call(void 0, selectedPath, structure);
|
|
498
499
|
if (node && node.type === "folder" && !node.hasReadme) {
|
|
499
500
|
const firstDocPath = findFirstDocPath(node);
|
|
500
501
|
if (!firstDocPath) {
|
|
@@ -535,16 +536,16 @@ function useDocumentTree(config, initialPath) {
|
|
|
535
536
|
if (node.type === "folder") {
|
|
536
537
|
setExpandedNodes((prev) => {
|
|
537
538
|
if (prev.has(node.id)) {
|
|
538
|
-
const ancestorIds =
|
|
539
|
+
const ancestorIds = _chunkEJZV4QGUcjs.getDocAncestorNodeIds.call(void 0, node.path);
|
|
539
540
|
ancestorIds.pop();
|
|
540
541
|
return new Set(ancestorIds);
|
|
541
542
|
}
|
|
542
|
-
return new Set(
|
|
543
|
+
return new Set(_chunkEJZV4QGUcjs.getDocAncestorNodeIds.call(void 0, node.path));
|
|
543
544
|
});
|
|
544
545
|
} else {
|
|
545
546
|
const lastSlash = node.path.lastIndexOf("/");
|
|
546
547
|
if (lastSlash > 0) {
|
|
547
|
-
setExpandedNodes(new Set(
|
|
548
|
+
setExpandedNodes(new Set(_chunkEJZV4QGUcjs.getDocAncestorNodeIds.call(void 0, node.path.substring(0, lastSlash))));
|
|
548
549
|
}
|
|
549
550
|
}
|
|
550
551
|
lastFetchedPath.current = null;
|
|
@@ -559,9 +560,9 @@ function useDocumentTree(config, initialPath) {
|
|
|
559
560
|
const hashIndex = path.indexOf("#");
|
|
560
561
|
const anchor = hashIndex !== -1 ? path.substring(hashIndex) : "";
|
|
561
562
|
const cleanPath = path.replace(/\/$/, "").split("#")[0];
|
|
562
|
-
const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _6 => _6.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current :
|
|
563
|
+
const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _6 => _6.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current : _chunkEJZV4QGUcjs.stripFolderIndexFromPath.call(void 0, cleanPath, folderIndexFile);
|
|
563
564
|
if (anchor && _optionalChain([options, 'optionalAccess', _7 => _7.fromInternalLink]) && pathForSelection === selectedPathRef.current) {
|
|
564
|
-
|
|
565
|
+
_chunkILAHSBZIcjs.navigateSamePageHash.call(void 0, anchor, { headerOffset: _chunkILAHSBZIcjs.HUB_HEADER_OFFSET_PX });
|
|
565
566
|
return;
|
|
566
567
|
}
|
|
567
568
|
const scrollAfterNav = () => {
|
|
@@ -569,7 +570,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
569
570
|
setTimeout(() => {
|
|
570
571
|
const el = document.getElementById(anchor.substring(1));
|
|
571
572
|
if (el) {
|
|
572
|
-
|
|
573
|
+
_chunkILAHSBZIcjs.scrollElementIntoView.call(void 0, el, { headerOffset: _chunkILAHSBZIcjs.HUB_HEADER_OFFSET_PX });
|
|
573
574
|
} else {
|
|
574
575
|
scrollToContent();
|
|
575
576
|
}
|
|
@@ -623,15 +624,15 @@ function useDocumentTree(config, initialPath) {
|
|
|
623
624
|
return docNavigation.register({
|
|
624
625
|
baseRoute: normalizedBaseRoute,
|
|
625
626
|
findNodeByPath: (path) => {
|
|
626
|
-
const clean =
|
|
627
|
-
return _nullishCoalesce(
|
|
627
|
+
const clean = _chunkEJZV4QGUcjs.stripFolderIndexFromPath.call(void 0, path.replace(/\/$/, "").split("#")[0], folderIndexFile);
|
|
628
|
+
return _nullishCoalesce(_chunkEJZV4QGUcjs.findDocNodeByPath.call(void 0, clean, structure), () => ( null));
|
|
628
629
|
},
|
|
629
630
|
selectNode
|
|
630
631
|
});
|
|
631
632
|
}, [docNavigation, normalizedBaseRoute, structure, selectNode, folderIndexFile]);
|
|
632
633
|
const isEmptyFolder = _react.useMemo.call(void 0, () => {
|
|
633
634
|
if (!selectedPath || structure.length === 0) return false;
|
|
634
|
-
const node =
|
|
635
|
+
const node = _chunkEJZV4QGUcjs.findDocNodeByPath.call(void 0, selectedPath, structure);
|
|
635
636
|
return !!node && node.type === "folder" && !node.hasReadme && !findFirstDocPath(node);
|
|
636
637
|
}, [selectedPath, structure]);
|
|
637
638
|
return {
|
|
@@ -661,37 +662,65 @@ function replaceHash(sectionId) {
|
|
|
661
662
|
if (hash === next) return;
|
|
662
663
|
window.history.replaceState(window.history.state, "", `${pathname}${search}${next}`);
|
|
663
664
|
}
|
|
665
|
+
function resolveScroller(firstSection) {
|
|
666
|
+
const container = firstSection ? _chunkILAHSBZIcjs.getScrollableAncestor.call(void 0, firstSection) : null;
|
|
667
|
+
if (container) {
|
|
668
|
+
return {
|
|
669
|
+
target: container,
|
|
670
|
+
scrollTop: () => container.scrollTop,
|
|
671
|
+
viewportTop: () => container.getBoundingClientRect().top,
|
|
672
|
+
clientHeight: () => container.clientHeight,
|
|
673
|
+
scrollHeight: () => container.scrollHeight
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
return {
|
|
677
|
+
target: window,
|
|
678
|
+
scrollTop: () => window.scrollY,
|
|
679
|
+
viewportTop: () => 0,
|
|
680
|
+
clientHeight: () => window.innerHeight,
|
|
681
|
+
scrollHeight: () => document.documentElement.scrollHeight
|
|
682
|
+
};
|
|
683
|
+
}
|
|
664
684
|
function useScrollSpy(sections, options = {}) {
|
|
665
|
-
const { syncHash = false } = options;
|
|
685
|
+
const { syncHash = false, headerOffset = SCROLL_OFFSET } = options;
|
|
666
686
|
const [activeSection, setActiveSection] = _react.useState.call(void 0, "");
|
|
667
687
|
const isScrollingFromClick = _react.useRef.call(void 0, false);
|
|
668
688
|
const sectionIdsKey = _react.useMemo.call(void 0, () => _nullishCoalesce(_optionalChain([sections, 'optionalAccess', _11 => _11.map, 'call', _12 => _12((s) => s.id), 'access', _13 => _13.join, 'call', _14 => _14(ID_SEPARATOR)]), () => ( "")), [sections]);
|
|
669
|
-
const handleSectionClick = _react.useCallback.call(void 0,
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
689
|
+
const handleSectionClick = _react.useCallback.call(void 0,
|
|
690
|
+
(sectionId) => {
|
|
691
|
+
const targetElement = document.getElementById(sectionId);
|
|
692
|
+
if (!targetElement) return;
|
|
693
|
+
isScrollingFromClick.current = true;
|
|
694
|
+
setActiveSection(sectionId);
|
|
695
|
+
if (syncHash) replaceHash(sectionId);
|
|
696
|
+
_chunkILAHSBZIcjs.scrollElementIntoView.call(void 0, targetElement, { headerOffset });
|
|
697
|
+
setTimeout(() => {
|
|
698
|
+
isScrollingFromClick.current = false;
|
|
699
|
+
}, 800);
|
|
700
|
+
},
|
|
701
|
+
[syncHash, headerOffset]
|
|
702
|
+
);
|
|
679
703
|
_react.useEffect.call(void 0, () => {
|
|
680
704
|
const sectionIds = sectionIdsKey === "" ? [] : sectionIdsKey.split(ID_SEPARATOR);
|
|
681
705
|
if (sectionIds.length === 0) return void 0;
|
|
706
|
+
const scroller = resolveScroller(document.getElementById(_nullishCoalesce(sectionIds[0], () => ( ""))));
|
|
682
707
|
const handleScroll = (fromScroll = false) => {
|
|
683
708
|
if (isScrollingFromClick.current) return;
|
|
684
|
-
const
|
|
709
|
+
const scrollTop = scroller.scrollTop();
|
|
710
|
+
const viewportTop = scroller.viewportTop();
|
|
711
|
+
const scrollPosition = scrollTop + headerOffset;
|
|
712
|
+
const sectionTop = (element) => element.getBoundingClientRect().top - viewportTop + scrollTop;
|
|
685
713
|
let currentSection = _nullishCoalesce(sectionIds[0], () => ( ""));
|
|
686
|
-
const
|
|
687
|
-
const
|
|
688
|
-
const
|
|
714
|
+
const scrollHeight = scroller.scrollHeight();
|
|
715
|
+
const clientHeight = scroller.clientHeight();
|
|
716
|
+
const scrollable = scrollHeight > clientHeight + 2;
|
|
717
|
+
const atBottom = scrollable && clientHeight + scrollTop >= scrollHeight - 2;
|
|
689
718
|
if (atBottom) {
|
|
690
719
|
currentSection = _nullishCoalesce(sectionIds[sectionIds.length - 1], () => ( currentSection));
|
|
691
720
|
} else {
|
|
692
721
|
for (let i = sectionIds.length - 1; i >= 0; i--) {
|
|
693
722
|
const element = document.getElementById(sectionIds[i]);
|
|
694
|
-
if (element && scrollPosition >= element
|
|
723
|
+
if (element && scrollPosition >= sectionTop(element)) {
|
|
695
724
|
currentSection = sectionIds[i];
|
|
696
725
|
break;
|
|
697
726
|
}
|
|
@@ -700,7 +729,7 @@ function useScrollSpy(sections, options = {}) {
|
|
|
700
729
|
setActiveSection((prev) => prev !== currentSection ? currentSection : prev);
|
|
701
730
|
if (syncHash && fromScroll) {
|
|
702
731
|
const first = document.getElementById(_nullishCoalesce(sectionIds[0], () => ( "")));
|
|
703
|
-
const aboveFirst = !atBottom && first !== null && scrollPosition < first
|
|
732
|
+
const aboveFirst = !atBottom && first !== null && scrollPosition < sectionTop(first);
|
|
704
733
|
replaceHash(aboveFirst ? null : currentSection);
|
|
705
734
|
}
|
|
706
735
|
};
|
|
@@ -709,13 +738,13 @@ function useScrollSpy(sections, options = {}) {
|
|
|
709
738
|
clearTimeout(scrollTimer);
|
|
710
739
|
scrollTimer = setTimeout(() => handleScroll(true), 100);
|
|
711
740
|
};
|
|
712
|
-
|
|
741
|
+
scroller.target.addEventListener("scroll", throttledScroll);
|
|
713
742
|
handleScroll();
|
|
714
743
|
return () => {
|
|
715
|
-
|
|
744
|
+
scroller.target.removeEventListener("scroll", throttledScroll);
|
|
716
745
|
clearTimeout(scrollTimer);
|
|
717
746
|
};
|
|
718
|
-
}, [sectionIdsKey, syncHash]);
|
|
747
|
+
}, [sectionIdsKey, syncHash, headerOffset]);
|
|
719
748
|
return { activeSection, handleSectionClick };
|
|
720
749
|
}
|
|
721
750
|
|
|
@@ -786,7 +815,7 @@ function DocViewerContent({
|
|
|
786
815
|
label: _nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _16 => _16.label]), () => ( "Back to home")),
|
|
787
816
|
onClick: () => router.push(_nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _17 => _17.href]), () => ( "/")))
|
|
788
817
|
};
|
|
789
|
-
const docSearch =
|
|
818
|
+
const docSearch = _chunkN6CI2E7Dcjs.useDocSearch.call(void 0, {
|
|
790
819
|
source: chatSource,
|
|
791
820
|
baseRoute,
|
|
792
821
|
searchEndpoint,
|
|
@@ -810,7 +839,7 @@ function DocViewerContent({
|
|
|
810
839
|
onResolveLink: resolveLink
|
|
811
840
|
});
|
|
812
841
|
}, [content, renderContent, navigateToDoc, sourceId, resolveLink]);
|
|
813
|
-
const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([
|
|
842
|
+
const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([_chunkEJZV4QGUcjs.findDocNodeByPath.call(void 0, selectedPath, structure), 'optionalAccess', _18 => _18.documentType]) : void 0;
|
|
814
843
|
const activeDocType = _nullishCoalesce(_optionalChain([content, 'optionalAccess', _19 => _19.documentType]), () => ( selectedNodeDocType));
|
|
815
844
|
const isMarkdownContent = !activeDocType || activeDocType === "markdown";
|
|
816
845
|
const showStickyNav = isMarkdownContent;
|
|
@@ -821,9 +850,9 @@ function DocViewerContent({
|
|
|
821
850
|
const containerBgStyle = colorPalette.containerBackground !== "transparent" ? { backgroundColor: colorPalette.containerBackground } : {};
|
|
822
851
|
const defaultEmptyText = structure.length > 0 ? "Select a document from the sidebar to view" : "No documents yet. Add content from the admin panel.";
|
|
823
852
|
const resolvedEmptyText = emptyStateText || defaultEmptyText;
|
|
824
|
-
const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
853
|
+
const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEJZV4QGUcjs.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: [
|
|
825
854
|
showAIChat && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
826
|
-
|
|
855
|
+
_chunkN6CI2E7Dcjs.DocSearchBar,
|
|
827
856
|
{
|
|
828
857
|
placeholder: `Search ${_optionalChain([sidebarLabel, 'optionalAccess', _23 => _23.toLowerCase, 'call', _24 => _24()]) || "documents"}...`,
|
|
829
858
|
query: docSearch.query,
|
|
@@ -842,9 +871,9 @@ function DocViewerContent({
|
|
|
842
871
|
] })
|
|
843
872
|
] }) }),
|
|
844
873
|
!error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-1 flex-col items-start gap-6 lg:flex-row lg:gap-10", children: [
|
|
845
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full lg:w-[320px] lg:shrink-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "lg:sticky lg:top-20", children: isLoadingStructure ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
874
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full lg:w-[320px] lg:shrink-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "lg:sticky lg:top-20", children: isLoadingStructure ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEJZV4QGUcjs.CategorySidebarSkeleton, {}) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
846
875
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PersistentMobileDropdown, { isLoading: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
847
|
-
|
|
876
|
+
_chunkHN7KNVKLcjs.MobileNavigationDropdown,
|
|
848
877
|
{
|
|
849
878
|
nodes: structure,
|
|
850
879
|
selectedPath,
|
|
@@ -858,7 +887,7 @@ function DocViewerContent({
|
|
|
858
887
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PersistentSidebar, { isLoading: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hidden lg:block", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
|
|
859
888
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-ods-text-secondary text-h5", children: sidebarLabel }),
|
|
860
889
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
861
|
-
|
|
890
|
+
_chunkHN7KNVKLcjs.MultiLevelNavigation,
|
|
862
891
|
{
|
|
863
892
|
nodes: structure,
|
|
864
893
|
selectedPath,
|
|
@@ -897,7 +926,7 @@ function DocViewerContent({
|
|
|
897
926
|
showStickyNav && content && stickyNavSections.length > 0 && !isLoadingContent && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hidden lg:block", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "sticky top-24", children: [
|
|
898
927
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-4 font-semibold text-ods-text-secondary text-h5", children: "ON THIS PAGE" }),
|
|
899
928
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
900
|
-
|
|
929
|
+
_chunkHN7KNVKLcjs.StickySectionNav,
|
|
901
930
|
{
|
|
902
931
|
sections: stickyNavSections,
|
|
903
932
|
activeSection,
|
|
@@ -912,7 +941,7 @@ function DocViewerContent({
|
|
|
912
941
|
) })
|
|
913
942
|
] })
|
|
914
943
|
] }) }) });
|
|
915
|
-
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
944
|
+
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEJZV4QGUcjs.PageShell, { contentClassName: `${bgClass} ${className}`, children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `page-shell-content ${bgClass} ${className}`.trim(), children: inner });
|
|
916
945
|
}
|
|
917
946
|
|
|
918
947
|
// src/components/docs/skeletons.tsx
|
|
@@ -1002,11 +1031,11 @@ function EmbedSkeleton({ documentType } = {}) {
|
|
|
1002
1031
|
|
|
1003
1032
|
var DEFAULT_TITLE = "Documents";
|
|
1004
1033
|
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" }) });
|
|
1005
|
-
var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1006
|
-
var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1007
|
-
var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1034
|
+
var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7F73YNDScjs.PdfViewer, { src: content.fileUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
|
|
1035
|
+
var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7F73YNDScjs.GoogleSheetsViewer, { externalUrl: content.externalUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
|
|
1036
|
+
var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEJZV4QGUcjs.FigmaEmbed, { url: content.externalUrl, title: content.fileName, loading: "eager" }) : defaultFallbackRenderer(content, handlers);
|
|
1008
1037
|
var defaultFileRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1009
|
-
|
|
1038
|
+
_chunk7F73YNDScjs.FileDownloadCard,
|
|
1010
1039
|
{
|
|
1011
1040
|
fileName: content.fileName,
|
|
1012
1041
|
mimeType: content.mimeType,
|
|
@@ -1069,4 +1098,4 @@ function DocsHubPage({
|
|
|
1069
1098
|
|
|
1070
1099
|
|
|
1071
1100
|
exports.PersistentFilterControls = PersistentFilterControls; exports.PersistentSearchContainer = PersistentSearchContainer; exports.PersistentSidebar = PersistentSidebar; exports.PersistentMobileDropdown = PersistentMobileDropdown; exports.DocNavigationProvider = DocNavigationProvider; exports.useDocNavigation = useDocNavigation; exports.useDocumentTree = useDocumentTree; exports.useScrollSpy = useScrollSpy; exports.DocViewer = DocViewer; exports.MarkdownSkeleton = MarkdownSkeleton; exports.EmbedSkeleton = EmbedSkeleton; exports.DocsHubPage = DocsHubPage;
|
|
1072
|
-
//# sourceMappingURL=chunk-
|
|
1101
|
+
//# sourceMappingURL=chunk-UIQQBZLU.cjs.map
|