@flamingo-stack/openframe-frontend-core 0.0.586 → 0.0.587-1973.5528.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/chat-protocol/events.d.ts +8 -2
- package/dist/chat-protocol/events.d.ts.map +1 -1
- package/dist/chat-protocol/index.cjs +188 -0
- package/dist/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.js +188 -0
- package/dist/chat-protocol/index.js.map +1 -1
- package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
- package/dist/chat-protocol/source-metadata.d.ts +5 -0
- package/dist/chat-protocol/source-metadata.d.ts.map +1 -0
- package/dist/{chunk-BMORFCT2.cjs → chunk-3UJMZADA.cjs} +43 -43
- package/dist/{chunk-BMORFCT2.cjs.map → chunk-3UJMZADA.cjs.map} +1 -1
- package/dist/{chunk-D7YISHXC.js → chunk-4MVGFYRE.js} +534 -190
- package/dist/chunk-4MVGFYRE.js.map +1 -0
- package/dist/{chunk-3WR5R6H6.cjs → chunk-4S7GMJYA.cjs} +21 -21
- package/dist/{chunk-3WR5R6H6.cjs.map → chunk-4S7GMJYA.cjs.map} +1 -1
- package/dist/{chunk-EAYMX22G.cjs → chunk-5VCDP6UA.cjs} +10 -10
- package/dist/{chunk-EAYMX22G.cjs.map → chunk-5VCDP6UA.cjs.map} +1 -1
- package/dist/{chunk-XMTGLQSD.js → chunk-5X7AJ67N.js} +3 -3
- package/dist/{chunk-OZNFPQT5.js → chunk-7A6J4JTW.js} +3 -3
- package/dist/{chunk-QZYYNBMI.cjs → chunk-7COFWOCJ.cjs} +22 -22
- package/dist/{chunk-QZYYNBMI.cjs.map → chunk-7COFWOCJ.cjs.map} +1 -1
- package/dist/{chunk-6ZNWY6WW.cjs → chunk-AIUIIGO3.cjs} +24 -24
- package/dist/{chunk-6ZNWY6WW.cjs.map → chunk-AIUIIGO3.cjs.map} +1 -1
- package/dist/{chunk-M36XSGZV.cjs → chunk-BLC4JOFC.cjs} +15 -15
- package/dist/{chunk-M36XSGZV.cjs.map → chunk-BLC4JOFC.cjs.map} +1 -1
- package/dist/{chunk-NISAGFEM.cjs → chunk-DSXD77KX.cjs} +3 -3
- package/dist/{chunk-NISAGFEM.cjs.map → chunk-DSXD77KX.cjs.map} +1 -1
- package/dist/{chunk-P2CKLIOM.cjs → chunk-DVMQV3M4.cjs} +69 -69
- package/dist/{chunk-P2CKLIOM.cjs.map → chunk-DVMQV3M4.cjs.map} +1 -1
- package/dist/{chunk-S7YXLZNG.js → chunk-E2QFZDCP.js} +5 -5
- package/dist/{chunk-G45RGWHF.cjs → chunk-EKKR5ZFB.cjs} +887 -543
- package/dist/chunk-EKKR5ZFB.cjs.map +1 -0
- package/dist/{chunk-L4WLYGB4.js → chunk-FDWGO244.js} +2 -2
- package/dist/{chunk-3JVYM4ZN.js → chunk-JQO47UHC.js} +5 -5
- package/dist/{chunk-C3MRLZUI.cjs → chunk-JR37UTA2.cjs} +33 -33
- package/dist/{chunk-C3MRLZUI.cjs.map → chunk-JR37UTA2.cjs.map} +1 -1
- package/dist/{chunk-LV6CORVJ.js → chunk-KQWI25NP.js} +2 -2
- package/dist/{chunk-V7ZJTUV2.cjs → chunk-NEI7XMCM.cjs} +9 -9
- package/dist/{chunk-V7ZJTUV2.cjs.map → chunk-NEI7XMCM.cjs.map} +1 -1
- package/dist/{chunk-YEQAA6I4.js → chunk-OW3FUJ2I.js} +3 -3
- package/dist/{chunk-PLMJVA2H.js → chunk-OZRT3ZI3.js} +3 -3
- package/dist/{chunk-XMK24INA.cjs → chunk-QKAUBYU5.cjs} +3 -3
- package/dist/{chunk-XMK24INA.cjs.map → chunk-QKAUBYU5.cjs.map} +1 -1
- package/dist/{chunk-6EZGJZVH.js → chunk-QSO24MEK.js} +2 -2
- package/dist/{chunk-DQUEVRDU.js → chunk-QYDIVL4X.js} +6 -6
- package/dist/{chunk-3HYHYKNL.js → chunk-RE3KVI2Q.js} +5 -5
- package/dist/{chunk-KLWJRGNN.js → chunk-RQ5PYSRJ.js} +4 -4
- package/dist/{chunk-NYLWMAHP.cjs → chunk-S2UY2C4A.cjs} +10 -10
- package/dist/{chunk-NYLWMAHP.cjs.map → chunk-S2UY2C4A.cjs.map} +1 -1
- package/dist/{chunk-SSGM2NKA.cjs → chunk-SCVIBVFS.cjs} +4 -4
- package/dist/{chunk-SSGM2NKA.cjs.map → chunk-SCVIBVFS.cjs.map} +1 -1
- package/dist/{chunk-4VZFJKPT.cjs → chunk-ULOMJH7C.cjs} +5 -5
- package/dist/{chunk-4VZFJKPT.cjs.map → chunk-ULOMJH7C.cjs.map} +1 -1
- package/dist/{chunk-5OIXAV4P.js → chunk-UODM3HJC.js} +3 -3
- package/dist/{chunk-A6ETQEWK.cjs → chunk-UYHETUX3.cjs} +159 -159
- package/dist/{chunk-A6ETQEWK.cjs.map → chunk-UYHETUX3.cjs.map} +1 -1
- package/dist/{chunk-2Y5UT5VF.js → chunk-WFWWQO2I.js} +2 -2
- package/dist/{chunk-YYC7V7YC.js → chunk-ZRFSUCAH.js} +2 -2
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts +4 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-slash-commands.d.ts +3 -3
- package/dist/components/chat/hooks/use-slash-commands.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts +2 -28
- package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/remark-strip-citations.d.ts.map +1 -1
- package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
- package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +4 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/chat/types/message.types.d.ts +35 -1
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/types/unified-chat-state.types.d.ts +3 -3
- package/dist/components/chat/types/unified-chat-state.types.d.ts.map +1 -1
- package/dist/components/chat/utils/chat-source-metadata.d.ts +5 -0
- package/dist/components/chat/utils/chat-source-metadata.d.ts.map +1 -0
- package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +23 -23
- package/dist/components/help-center-pages/index.js +14 -14
- package/dist/components/index.cjs +36 -36
- package/dist/components/index.js +13 -13
- package/dist/components/meeting-scheduler/index.cjs +21 -21
- package/dist/components/meeting-scheduler/index.js +2 -2
- package/dist/components/navigation/index.cjs +6 -6
- package/dist/components/navigation/index.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/onboarding-guides/index.js +5 -5
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/hover-dropdown.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +2 -1
- package/src/chat-protocol/__tests__/nats-decoder-golden.test.ts +130 -0
- package/src/chat-protocol/__tests__/source-metadata.test.ts +74 -0
- package/src/chat-protocol/events.ts +9 -1
- package/src/chat-protocol/nats-decoder.ts +7 -0
- package/src/chat-protocol/source-metadata.ts +202 -0
- package/src/components/chat/__tests__/chat-message-list.test.tsx +70 -0
- package/src/components/chat/__tests__/chat-message-streaming-memo.test.tsx +86 -0
- package/src/components/chat/__tests__/embeddable-chat-sources.test.tsx +411 -0
- package/src/components/chat/__tests__/remark-strip-citations.test.ts +52 -0
- package/src/components/chat/__tests__/tool-execution-display.test.tsx +93 -0
- package/src/components/chat/chat-message-enhanced.tsx +28 -13
- package/src/components/chat/chat-message-list.tsx +27 -22
- package/src/components/chat/embeddable-chat.tsx +55 -36
- package/src/components/chat/entity-cards/__tests__/dispatch-video-refs.test.tsx +74 -0
- package/src/components/chat/entity-cards/dispatch.tsx +86 -17
- package/src/components/chat/hooks/__tests__/use-slash-commands.test.ts +64 -0
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +7 -0
- package/src/components/chat/hooks/use-slash-commands.ts +9 -5
- package/src/components/chat/hooks/use-sse-chat-adapter.ts +2 -29
- package/src/components/chat/remark-strip-citations.ts +5 -3
- package/src/components/chat/stream/__tests__/chat-stream-reducer.test.ts +56 -0
- package/src/components/chat/stream/chat-stream-reducer.ts +31 -0
- package/src/components/chat/tool-execution-display.tsx +5 -2
- package/src/components/chat/types/component.types.ts +4 -0
- package/src/components/chat/types/message.types.ts +39 -0
- package/src/components/chat/types/unified-chat-state.types.ts +4 -3
- package/src/components/chat/utils/__tests__/process-historical-messages-golden.test.ts +57 -0
- package/src/components/chat/utils/chat-source-metadata.ts +19 -0
- package/src/components/chat/utils/process-historical-messages.ts +19 -1
- package/src/components/ui/hover-dropdown.tsx +8 -3
- package/dist/chunk-D7YISHXC.js.map +0 -1
- package/dist/chunk-G45RGWHF.cjs.map +0 -1
- /package/dist/{chunk-XMTGLQSD.js.map → chunk-5X7AJ67N.js.map} +0 -0
- /package/dist/{chunk-OZNFPQT5.js.map → chunk-7A6J4JTW.js.map} +0 -0
- /package/dist/{chunk-S7YXLZNG.js.map → chunk-E2QFZDCP.js.map} +0 -0
- /package/dist/{chunk-L4WLYGB4.js.map → chunk-FDWGO244.js.map} +0 -0
- /package/dist/{chunk-3JVYM4ZN.js.map → chunk-JQO47UHC.js.map} +0 -0
- /package/dist/{chunk-LV6CORVJ.js.map → chunk-KQWI25NP.js.map} +0 -0
- /package/dist/{chunk-YEQAA6I4.js.map → chunk-OW3FUJ2I.js.map} +0 -0
- /package/dist/{chunk-PLMJVA2H.js.map → chunk-OZRT3ZI3.js.map} +0 -0
- /package/dist/{chunk-6EZGJZVH.js.map → chunk-QSO24MEK.js.map} +0 -0
- /package/dist/{chunk-DQUEVRDU.js.map → chunk-QYDIVL4X.js.map} +0 -0
- /package/dist/{chunk-3HYHYKNL.js.map → chunk-RE3KVI2Q.js.map} +0 -0
- /package/dist/{chunk-KLWJRGNN.js.map → chunk-RQ5PYSRJ.js.map} +0 -0
- /package/dist/{chunk-5OIXAV4P.js.map → chunk-UODM3HJC.js.map} +0 -0
- /package/dist/{chunk-2Y5UT5VF.js.map → chunk-WFWWQO2I.js.map} +0 -0
- /package/dist/{chunk-YYC7V7YC.js.map → chunk-ZRFSUCAH.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
StatusFilterComponent,
|
|
8
8
|
TASK_TYPE_LABELS,
|
|
9
9
|
TASK_TYPE_TEXT_COLORS
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZRFSUCAH.js";
|
|
11
11
|
import {
|
|
12
12
|
usePathname,
|
|
13
13
|
useRouter,
|
|
@@ -267,4 +267,4 @@ export {
|
|
|
267
267
|
DevCardRowSkeletonList,
|
|
268
268
|
DeliveryRow
|
|
269
269
|
};
|
|
270
|
-
//# sourceMappingURL=chunk-
|
|
270
|
+
//# sourceMappingURL=chunk-FDWGO244.js.map
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
FileDownloadCard,
|
|
4
4
|
GoogleSheetsViewer,
|
|
5
5
|
PdfViewer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KQWI25NP.js";
|
|
7
7
|
import {
|
|
8
8
|
MobileNavigationDropdown,
|
|
9
9
|
MultiLevelNavigation,
|
|
10
10
|
StickySectionNav
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QSO24MEK.js";
|
|
12
12
|
import {
|
|
13
13
|
DocSearchBar,
|
|
14
14
|
useDocSearch
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-OZRT3ZI3.js";
|
|
16
16
|
import {
|
|
17
17
|
CategorySidebarSkeleton,
|
|
18
18
|
DEFAULT_FOLDER_INDEX_FILE,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
findDocNodeByPath,
|
|
23
23
|
getDocAncestorNodeIds,
|
|
24
24
|
stripFolderIndexFromPath
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ZRFSUCAH.js";
|
|
26
26
|
import {
|
|
27
27
|
apiErrorMessage
|
|
28
28
|
} from "./chunk-T5HDPHN6.js";
|
|
@@ -1052,4 +1052,4 @@ export {
|
|
|
1052
1052
|
EmbedSkeleton,
|
|
1053
1053
|
DocsHubPage
|
|
1054
1054
|
};
|
|
1055
|
-
//# sourceMappingURL=chunk-
|
|
1055
|
+
//# sourceMappingURL=chunk-JQO47UHC.js.map
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkSCVIBVFScjs = require('./chunk-SCVIBVFS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkDSXD77KXcjs = require('./chunk-DSXD77KX.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkNEI7XMCMcjs = require('./chunk-NEI7XMCM.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ var _chunkV7ZJTUV2cjs = require('./chunk-V7ZJTUV2.cjs');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkUYHETUX3cjs = require('./chunk-UYHETUX3.cjs');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunkLEISUAHFcjs = require('./chunk-LEISUAHF.cjs');
|
|
@@ -326,8 +326,8 @@ function toDocContent(value, requestedPath) {
|
|
|
326
326
|
}
|
|
327
327
|
function useDocumentTree(config, initialPath) {
|
|
328
328
|
const { structureEndpoint, contentEndpoint, baseRoute } = config;
|
|
329
|
-
const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => (
|
|
330
|
-
const cleanInitialPath =
|
|
329
|
+
const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => ( _chunkUYHETUX3cjs.DEFAULT_FOLDER_INDEX_FILE));
|
|
330
|
+
const cleanInitialPath = _chunkUYHETUX3cjs.stripFolderIndexFromPath.call(void 0, _optionalChain([initialPath, 'optionalAccess', _4 => _4.replace, 'call', _5 => _5(/\/$/, "")]) || "", folderIndexFile);
|
|
331
331
|
const [structure, setStructure] = _react.useState.call(void 0, []);
|
|
332
332
|
const [selectedPath, setSelectedPath] = _react.useState.call(void 0, cleanInitialPath);
|
|
333
333
|
const [content, setContent] = _react.useState.call(void 0, null);
|
|
@@ -351,12 +351,12 @@ function useDocumentTree(config, initialPath) {
|
|
|
351
351
|
} else if (pathname.startsWith(`${normalizedBaseRoute}/`)) {
|
|
352
352
|
pathFromUrl = pathname.substring(`${normalizedBaseRoute}/`.length);
|
|
353
353
|
}
|
|
354
|
-
pathFromUrl =
|
|
354
|
+
pathFromUrl = _chunkUYHETUX3cjs.stripFolderIndexFromPath.call(void 0, pathFromUrl, folderIndexFile);
|
|
355
355
|
if (pathFromUrl !== selectedPathRef.current) {
|
|
356
356
|
setSelectedPath(pathFromUrl);
|
|
357
357
|
if (pathFromUrl) {
|
|
358
358
|
const parentPath = pathFromUrl.includes("/") ? pathFromUrl.substring(0, pathFromUrl.lastIndexOf("/")) : pathFromUrl;
|
|
359
|
-
setExpandedNodes(new Set(
|
|
359
|
+
setExpandedNodes(new Set(_chunkUYHETUX3cjs.getDocAncestorNodeIds.call(void 0, parentPath)));
|
|
360
360
|
}
|
|
361
361
|
setTimeout(() => {
|
|
362
362
|
scrollToContent();
|
|
@@ -374,7 +374,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
374
374
|
setSelectedPath(cleanInitialPath);
|
|
375
375
|
if (cleanInitialPath) {
|
|
376
376
|
const parentPath = cleanInitialPath.includes("/") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
|
|
377
|
-
setExpandedNodes(new Set(
|
|
377
|
+
setExpandedNodes(new Set(_chunkUYHETUX3cjs.getDocAncestorNodeIds.call(void 0, parentPath)));
|
|
378
378
|
}
|
|
379
379
|
setExternalNavCount((n) => n + 1);
|
|
380
380
|
}
|
|
@@ -399,7 +399,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
399
399
|
if (cleanInitialPath) {
|
|
400
400
|
const pathForExpansion = cleanInitialPath.includes(".") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
|
|
401
401
|
if (pathForExpansion) {
|
|
402
|
-
setExpandedNodes(new Set(
|
|
402
|
+
setExpandedNodes(new Set(_chunkUYHETUX3cjs.getDocAncestorNodeIds.call(void 0, pathForExpansion)));
|
|
403
403
|
}
|
|
404
404
|
} else if (nodes.length > 0) {
|
|
405
405
|
const hasRootReadme = nodes.some((node) => node.type === "file" && node.path === folderIndexFile);
|
|
@@ -439,7 +439,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
439
439
|
setContent(null);
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
442
|
-
const probe =
|
|
442
|
+
const probe = _chunkUYHETUX3cjs.findDocNodeByPath.call(void 0, _chunkUYHETUX3cjs.stripFolderIndexFromPath.call(void 0, path, folderIndexFile), structure);
|
|
443
443
|
const probeIsNoReadmeFolder = !!probe && probe.type === "folder" && !probe.hasReadme;
|
|
444
444
|
const preStructureFolderLike = structure.length === 0 && !path.endsWith(".md");
|
|
445
445
|
if (probeIsNoReadmeFolder || preStructureFolderLike) {
|
|
@@ -496,7 +496,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
496
496
|
if (selectedPath === "") {
|
|
497
497
|
pathToFetch = folderIndexFile;
|
|
498
498
|
} else {
|
|
499
|
-
const node =
|
|
499
|
+
const node = _chunkUYHETUX3cjs.findDocNodeByPath.call(void 0, selectedPath, structure);
|
|
500
500
|
if (node && node.type === "folder" && !node.hasReadme) {
|
|
501
501
|
const firstDocPath = findFirstDocPath(node);
|
|
502
502
|
if (!firstDocPath) {
|
|
@@ -537,16 +537,16 @@ function useDocumentTree(config, initialPath) {
|
|
|
537
537
|
if (node.type === "folder") {
|
|
538
538
|
setExpandedNodes((prev) => {
|
|
539
539
|
if (prev.has(node.id)) {
|
|
540
|
-
const ancestorIds =
|
|
540
|
+
const ancestorIds = _chunkUYHETUX3cjs.getDocAncestorNodeIds.call(void 0, node.path);
|
|
541
541
|
ancestorIds.pop();
|
|
542
542
|
return new Set(ancestorIds);
|
|
543
543
|
}
|
|
544
|
-
return new Set(
|
|
544
|
+
return new Set(_chunkUYHETUX3cjs.getDocAncestorNodeIds.call(void 0, node.path));
|
|
545
545
|
});
|
|
546
546
|
} else {
|
|
547
547
|
const lastSlash = node.path.lastIndexOf("/");
|
|
548
548
|
if (lastSlash > 0) {
|
|
549
|
-
setExpandedNodes(new Set(
|
|
549
|
+
setExpandedNodes(new Set(_chunkUYHETUX3cjs.getDocAncestorNodeIds.call(void 0, node.path.substring(0, lastSlash))));
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
552
|
lastFetchedPath.current = null;
|
|
@@ -561,7 +561,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
561
561
|
const hashIndex = path.indexOf("#");
|
|
562
562
|
const anchor = hashIndex !== -1 ? path.substring(hashIndex) : "";
|
|
563
563
|
const cleanPath = path.replace(/\/$/, "").split("#")[0];
|
|
564
|
-
const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _6 => _6.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current :
|
|
564
|
+
const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _6 => _6.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current : _chunkUYHETUX3cjs.stripFolderIndexFromPath.call(void 0, cleanPath, folderIndexFile);
|
|
565
565
|
if (anchor && _optionalChain([options, 'optionalAccess', _7 => _7.fromInternalLink]) && pathForSelection === selectedPathRef.current) {
|
|
566
566
|
_chunkZI27ALYXcjs.navigateSamePageHash.call(void 0, anchor, { headerOffset: _chunkZI27ALYXcjs.HUB_HEADER_OFFSET_PX });
|
|
567
567
|
return;
|
|
@@ -625,15 +625,15 @@ function useDocumentTree(config, initialPath) {
|
|
|
625
625
|
return docNavigation.register({
|
|
626
626
|
baseRoute: normalizedBaseRoute,
|
|
627
627
|
findNodeByPath: (path) => {
|
|
628
|
-
const clean =
|
|
629
|
-
return _nullishCoalesce(
|
|
628
|
+
const clean = _chunkUYHETUX3cjs.stripFolderIndexFromPath.call(void 0, path.replace(/\/$/, "").split("#")[0], folderIndexFile);
|
|
629
|
+
return _nullishCoalesce(_chunkUYHETUX3cjs.findDocNodeByPath.call(void 0, clean, structure), () => ( null));
|
|
630
630
|
},
|
|
631
631
|
selectNode
|
|
632
632
|
});
|
|
633
633
|
}, [docNavigation, normalizedBaseRoute, structure, selectNode, folderIndexFile]);
|
|
634
634
|
const isEmptyFolder = _react.useMemo.call(void 0, () => {
|
|
635
635
|
if (!selectedPath || structure.length === 0) return false;
|
|
636
|
-
const node =
|
|
636
|
+
const node = _chunkUYHETUX3cjs.findDocNodeByPath.call(void 0, selectedPath, structure);
|
|
637
637
|
return !!node && node.type === "folder" && !node.hasReadme && !findFirstDocPath(node);
|
|
638
638
|
}, [selectedPath, structure]);
|
|
639
639
|
return {
|
|
@@ -769,7 +769,7 @@ function DocViewerContent({
|
|
|
769
769
|
label: _nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _16 => _16.label]), () => ( "Back to home")),
|
|
770
770
|
onClick: () => router.push(_nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _17 => _17.href]), () => ( "/")))
|
|
771
771
|
};
|
|
772
|
-
const docSearch =
|
|
772
|
+
const docSearch = _chunkNEI7XMCMcjs.useDocSearch.call(void 0, {
|
|
773
773
|
source: chatSource,
|
|
774
774
|
baseRoute,
|
|
775
775
|
searchEndpoint,
|
|
@@ -793,7 +793,7 @@ function DocViewerContent({
|
|
|
793
793
|
onResolveLink: resolveLink
|
|
794
794
|
});
|
|
795
795
|
}, [content, renderContent, navigateToDoc, sourceId, resolveLink]);
|
|
796
|
-
const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([
|
|
796
|
+
const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([_chunkUYHETUX3cjs.findDocNodeByPath.call(void 0, selectedPath, structure), 'optionalAccess', _18 => _18.documentType]) : void 0;
|
|
797
797
|
const activeDocType = _nullishCoalesce(_optionalChain([content, 'optionalAccess', _19 => _19.documentType]), () => ( selectedNodeDocType));
|
|
798
798
|
const isMarkdownContent = !activeDocType || activeDocType === "markdown";
|
|
799
799
|
const showStickyNav = isMarkdownContent;
|
|
@@ -804,9 +804,9 @@ function DocViewerContent({
|
|
|
804
804
|
const containerBgStyle = colorPalette.containerBackground !== "transparent" ? { backgroundColor: colorPalette.containerBackground } : {};
|
|
805
805
|
const defaultEmptyText = structure.length > 0 ? "Select a document from the sidebar to view" : "No documents yet. Add content from the admin panel.";
|
|
806
806
|
const resolvedEmptyText = emptyStateText || defaultEmptyText;
|
|
807
|
-
const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
807
|
+
const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYHETUX3cjs.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: [
|
|
808
808
|
showAIChat && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
809
|
-
|
|
809
|
+
_chunkNEI7XMCMcjs.DocSearchBar,
|
|
810
810
|
{
|
|
811
811
|
placeholder: `Search ${_optionalChain([sidebarLabel, 'optionalAccess', _23 => _23.toLowerCase, 'call', _24 => _24()]) || "documents"}...`,
|
|
812
812
|
query: docSearch.query,
|
|
@@ -825,9 +825,9 @@ function DocViewerContent({
|
|
|
825
825
|
] })
|
|
826
826
|
] }) }),
|
|
827
827
|
!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: [
|
|
828
|
-
/* @__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,
|
|
828
|
+
/* @__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, _chunkUYHETUX3cjs.CategorySidebarSkeleton, {}) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
829
829
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PersistentMobileDropdown, { isLoading: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
830
|
-
|
|
830
|
+
_chunkDSXD77KXcjs.MobileNavigationDropdown,
|
|
831
831
|
{
|
|
832
832
|
nodes: structure,
|
|
833
833
|
selectedPath,
|
|
@@ -841,7 +841,7 @@ function DocViewerContent({
|
|
|
841
841
|
/* @__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: [
|
|
842
842
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-ods-text-secondary text-h5", children: sidebarLabel }),
|
|
843
843
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
844
|
-
|
|
844
|
+
_chunkDSXD77KXcjs.MultiLevelNavigation,
|
|
845
845
|
{
|
|
846
846
|
nodes: structure,
|
|
847
847
|
selectedPath,
|
|
@@ -880,7 +880,7 @@ function DocViewerContent({
|
|
|
880
880
|
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: [
|
|
881
881
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-4 font-semibold text-ods-text-secondary text-h5", children: "ON THIS PAGE" }),
|
|
882
882
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
883
|
-
|
|
883
|
+
_chunkDSXD77KXcjs.StickySectionNav,
|
|
884
884
|
{
|
|
885
885
|
sections: stickyNavSections,
|
|
886
886
|
activeSection,
|
|
@@ -895,7 +895,7 @@ function DocViewerContent({
|
|
|
895
895
|
) })
|
|
896
896
|
] })
|
|
897
897
|
] }) }) });
|
|
898
|
-
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
898
|
+
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYHETUX3cjs.PageShell, { contentClassName: `${bgClass} ${className}`, children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `page-shell-content ${bgClass} ${className}`.trim(), children: inner });
|
|
899
899
|
}
|
|
900
900
|
|
|
901
901
|
// src/components/docs/skeletons.tsx
|
|
@@ -985,11 +985,11 @@ function EmbedSkeleton({ documentType } = {}) {
|
|
|
985
985
|
|
|
986
986
|
var DEFAULT_TITLE = "Documents";
|
|
987
987
|
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" }) });
|
|
988
|
-
var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
989
|
-
var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
990
|
-
var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
988
|
+
var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSCVIBVFScjs.PdfViewer, { src: content.fileUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
|
|
989
|
+
var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSCVIBVFScjs.GoogleSheetsViewer, { externalUrl: content.externalUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
|
|
990
|
+
var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYHETUX3cjs.FigmaEmbed, { url: content.externalUrl, title: content.fileName, loading: "eager" }) : defaultFallbackRenderer(content, handlers);
|
|
991
991
|
var defaultFileRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
992
|
-
|
|
992
|
+
_chunkSCVIBVFScjs.FileDownloadCard,
|
|
993
993
|
{
|
|
994
994
|
fileName: content.fileName,
|
|
995
995
|
mimeType: content.mimeType,
|
|
@@ -1052,4 +1052,4 @@ function DocsHubPage({
|
|
|
1052
1052
|
|
|
1053
1053
|
|
|
1054
1054
|
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;
|
|
1055
|
-
//# sourceMappingURL=chunk-
|
|
1055
|
+
//# sourceMappingURL=chunk-JR37UTA2.cjs.map
|