@flamingo-stack/openframe-frontend-core 0.0.854 → 0.0.856
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/build/export-map.json +1 -1
- package/dist/{case-study-card-WP5Z234Q.cjs → case-study-card-6VAMNHLU.cjs} +8 -8
- package/dist/{chunk-ZDPPNHA2.cjs → chunk-2BTEERLH.cjs} +3 -3
- package/dist/{chunk-FBANHIAG.cjs → chunk-2JCA7BRK.cjs} +19 -19
- package/dist/{chunk-GVHCQRUE.cjs → chunk-2P72KAG5.cjs} +23 -23
- package/dist/{chunk-YY3WP2YQ.cjs → chunk-3GJ75OUL.cjs} +183 -183
- package/dist/{chunk-FJXSKMQJ.cjs → chunk-4H3J57AN.cjs} +25 -25
- package/dist/{chunk-6GWRPW6B.cjs → chunk-5NK3FUHY.cjs} +4 -4
- package/dist/{chunk-DLTPSP5F.cjs → chunk-5TYG5JNB.cjs} +2 -2
- package/dist/{chunk-63ZV3UGG.cjs → chunk-65NMKAPQ.cjs} +12 -12
- package/dist/{chunk-IGVAPIEW.cjs → chunk-6C4OR4MZ.cjs} +2 -2
- package/dist/{chunk-GG466XFQ.cjs → chunk-6DMH4GXN.cjs} +30 -5
- package/dist/{chunk-2IJMHBOK.cjs → chunk-77GX573I.cjs} +9 -9
- package/dist/{chunk-O3EKOXFZ.cjs → chunk-AYMY2VNB.cjs} +37 -43
- package/dist/{chunk-JKBNK5U6.cjs → chunk-D6GEMVHD.cjs} +3 -3
- package/dist/{chunk-SSKMGH5O.cjs → chunk-DXVGGWLG.cjs} +10 -10
- package/dist/{chunk-S5P6CF5R.cjs → chunk-E5OQHFM6.cjs} +54 -54
- package/dist/{chunk-5TXE7BXT.cjs → chunk-EOUEUYCQ.cjs} +54 -54
- package/dist/{chunk-EIHMPQRQ.cjs → chunk-ESGE7CUX.cjs} +14 -14
- package/dist/{chunk-ETZFBB7O.cjs → chunk-EXQSIX2I.cjs} +4 -4
- package/dist/{chunk-3WXHPD6N.cjs → chunk-F33EAPD2.cjs} +124 -124
- package/dist/{chunk-4SSJ3T3N.cjs → chunk-GK577ZLJ.cjs} +3 -13
- package/dist/{chunk-ETQNMR2K.cjs → chunk-GTUQGVXH.cjs} +8 -8
- package/dist/{chunk-7MOBD44H.cjs → chunk-HGM7WDJT.cjs} +28 -28
- package/dist/{chunk-VMAOZA2V.cjs → chunk-HML3JUXF.cjs} +324 -322
- package/dist/{chunk-4O5N5CGK.cjs → chunk-J3CFRGZ2.cjs} +17 -17
- package/dist/{chunk-LQDAB5V5.cjs → chunk-KZAQPRTA.cjs} +9 -11
- package/dist/{chunk-6DCUGIGU.cjs → chunk-LSLRJJFP.cjs} +2 -2
- package/dist/{chunk-ONYANAMA.cjs → chunk-MX52LZ6M.cjs} +6 -6
- package/dist/{chunk-OH5TXFRR.cjs → chunk-O4CPT3RK.cjs} +7 -7
- package/dist/{chunk-BAA3YCLT.cjs → chunk-OW5MQKCI.cjs} +103 -103
- package/dist/{chunk-5HMENXSR.cjs → chunk-PCQ2HKU3.cjs} +5 -5
- package/dist/{chunk-D2XGRWPW.cjs → chunk-QLFNMWBP.cjs} +90 -90
- package/dist/{chunk-UPQ4MAR7.cjs → chunk-QZXCUY36.cjs} +53 -53
- package/dist/{chunk-KKFDRCQF.cjs → chunk-RY7INTYU.cjs} +14 -1
- package/dist/{chunk-PRJZMZ3X.cjs → chunk-SJZWVMBF.cjs} +678 -678
- package/dist/{chunk-GI3MMBP3.cjs → chunk-SQ7YHWEP.cjs} +228 -15
- package/dist/{chunk-ACPOJE32.cjs → chunk-STV6VJ3U.cjs} +21 -21
- package/dist/{chunk-QD727QFI.cjs → chunk-T54I5ZZY.cjs} +7 -7
- package/dist/{chunk-4LTLEUY5.cjs → chunk-TW5Y4D5I.cjs} +7 -7
- package/dist/{chunk-6XU3RCK3.cjs → chunk-UHGARY3S.cjs} +27 -27
- package/dist/{chunk-7J5NSWJG.cjs → chunk-UZIGMLTH.cjs} +100 -100
- package/dist/{chunk-FX35L4Y6.cjs → chunk-XCQ5I27Z.cjs} +3 -3
- package/dist/{chunk-5OENPMRU.cjs → chunk-XI3AMOW6.cjs} +65 -62
- package/dist/{chunk-TMPLHUUU.cjs → chunk-XTLMWLFB.cjs} +6 -6
- package/dist/{chunk-AZEO7HBB.cjs → chunk-Y44EF4JW.cjs} +2 -2
- package/dist/{chunk-RMI6O3AE.cjs → chunk-YB244RRB.cjs} +36 -36
- package/dist/{chunk-KA3L6D5N.cjs → chunk-YSXVRTGT.cjs} +9 -12
- package/dist/{chunk-H3GBPYPS.cjs → chunk-ZYAVIRQV.cjs} +25 -25
- package/dist/{cloud-tenants-5RNK4ZAT.cjs → cloud-tenants-J5T4YL2P.cjs} +28 -29
- package/dist/components/case-studies/index.cjs +44 -45
- package/dist/components/chat/chat-message-row.d.ts +1 -1
- package/dist/components/chat/chat-message-row.d.ts.map +1 -1
- package/dist/components/chat/chat-message-row.js +4 -4
- package/dist/components/chat/entity-cards/use-cover-image-fallback.d.ts +7 -13
- package/dist/components/chat/entity-cards/use-cover-image-fallback.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/use-cover-image-fallback.js +2 -8
- package/dist/components/chat/hooks/use-chat-attachment-image-gallery.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-chat-attachment-image-gallery.js +8 -4
- package/dist/components/chat/index.cjs +22 -23
- package/dist/components/contact/index.cjs +29 -30
- package/dist/components/docs/index.cjs +32 -33
- package/dist/components/embeds/index.cjs +29 -30
- package/dist/components/faq/index.cjs +30 -31
- package/dist/components/features/index.cjs +28 -29
- package/dist/components/features/remote-session/remote-session-viewers.d.ts +6 -1
- package/dist/components/features/remote-session/remote-session-viewers.d.ts.map +1 -1
- package/dist/components/features/remote-session/remote-session-viewers.js +10 -3
- package/dist/components/help-center-pages/index.cjs +134 -135
- package/dist/components/index.cjs +112 -113
- package/dist/components/meeting-scheduler/index.cjs +102 -103
- package/dist/components/navigation/index.cjs +31 -32
- package/dist/components/onboarding-guides/index.cjs +31 -32
- package/dist/components/product-demo/index.cjs +39 -40
- package/dist/components/related-content/index.cjs +16 -17
- package/dist/components/tickets/index.cjs +35 -36
- package/dist/components/ui/entity-image.d.ts +1 -2
- package/dist/components/ui/entity-image.d.ts.map +1 -1
- package/dist/components/ui/entity-image.js +4 -8
- package/dist/components/ui/index.cjs +28 -29
- package/dist/components/ui/markdown/base-components.d.ts +0 -13
- package/dist/components/ui/markdown/base-components.d.ts.map +1 -1
- package/dist/components/ui/markdown/base-components.js +7 -7
- package/dist/components/ui/square-avatar.d.ts.map +1 -1
- package/dist/components/ui/square-avatar.js +3 -8
- package/dist/{devices-44O5PZOW.cjs → devices-IJDF7SSK.cjs} +29 -30
- package/dist/embed-shims/index.cjs +3 -2
- package/dist/embed-shims/next-image.cjs +3 -2
- package/dist/embed-shims/next-image.d.ts +2 -0
- package/dist/embed-shims/next-image.d.ts.map +1 -1
- package/dist/embed-shims/next-image.js +14 -4
- package/dist/{embeddable-chat-W3CLMGC3.cjs → embeddable-chat-QD7NFD2H.cjs} +100 -101
- package/dist/hooks/index.cjs +23 -16
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/use-authed-asset-src.d.ts +77 -2
- package/dist/hooks/use-authed-asset-src.d.ts.map +1 -1
- package/dist/hooks/use-authed-asset-src.js +185 -73
- package/dist/hooks/use-authed-image-src.d.ts +11 -4
- package/dist/hooks/use-authed-image-src.d.ts.map +1 -1
- package/dist/hooks/use-authed-image-src.js +6 -2
- package/dist/hooks/use-image-fallback.d.ts +16 -0
- package/dist/hooks/use-image-fallback.d.ts.map +1 -0
- package/dist/hooks/use-image-fallback.js +14 -0
- package/dist/index.cjs +40 -36
- package/dist/{knowledge-UUU3WVO3.cjs → knowledge-5LIK6Q4E.cjs} +29 -30
- package/dist/{logs-DFHNSODA.cjs → logs-FMENCAXT.cjs} +35 -36
- package/dist/{policies-RGFUGDBP.cjs → policies-DKQEEKB4.cjs} +32 -33
- package/dist/{remote-session-U3H77HKR.cjs → remote-session-6X7CAHBC.cjs} +13 -14
- package/dist/{scripts-KOVO5DHW.cjs → scripts-4EPUIFHF.cjs} +35 -36
- package/dist/{software-update-4EKHVV5W.cjs → software-update-IMNRXBAI.cjs} +32 -33
- package/dist/{tickets-board-YIFOVMDX.cjs → tickets-board-POYZS7BW.cjs} +16 -17
- package/dist/utils/app-origins.d.ts +3 -6
- package/dist/utils/app-origins.d.ts.map +1 -1
- package/dist/utils/app-origins.js +8 -1
- package/dist/utils/embed-authed-fetch.d.ts +46 -26
- package/dist/utils/embed-authed-fetch.d.ts.map +1 -1
- package/dist/utils/embed-authed-fetch.js +24 -8
- package/dist/utils/index.cjs +4 -1
- package/dist/{video-file-player-XMOB234V.cjs → video-file-player-RIOT24NT.cjs} +3 -4
- package/package.json +1 -1
- package/src/components/chat/chat-message-row.tsx +8 -7
- package/src/components/chat/entity-cards/use-cover-image-fallback.ts +8 -28
- package/src/components/chat/hooks/use-chat-attachment-image-gallery.tsx +19 -8
- package/src/components/features/remote-session/remote-session-viewers.tsx +16 -3
- package/src/components/ui/entity-image.tsx +4 -12
- package/src/components/ui/markdown/base-components.tsx +15 -20
- package/src/components/ui/square-avatar.tsx +5 -8
- package/src/embed-shims/next-image.tsx +34 -3
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-authed-asset-src.ts +323 -107
- package/src/hooks/use-authed-image-src.ts +15 -5
- package/src/hooks/use-image-fallback.ts +31 -0
- package/src/utils/app-origins.ts +12 -7
- package/src/utils/embed-authed-fetch.ts +71 -32
- package/dist/chunk-YSDB6HGQ.cjs +0 -102
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkGTUQGVXHcjs = require('./chunk-GTUQGVXH.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkJ3CFRGZ2cjs = require('./chunk-J3CFRGZ2.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkESGE7CUXcjs = require('./chunk-ESGE7CUX.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkSJZWVMBFcjs = require('./chunk-SJZWVMBF.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkXI3AMOW6cjs = require('./chunk-XI3AMOW6.cjs');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
@@ -30,19 +30,19 @@ var _chunk5OENPMRUcjs = require('./chunk-5OENPMRU.cjs');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkF33EAPD2cjs = require('./chunk-F33EAPD2.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunk77GX573Icjs = require('./chunk-77GX573I.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
var _chunk7DNL734Scjs = require('./chunk-7DNL734S.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
var
|
|
45
|
+
var _chunkXCQ5I27Zcjs = require('./chunk-XCQ5I27Z.cjs');
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
var _chunkUJ7AXHRZcjs = require('./chunk-UJ7AXHRZ.cjs');
|
|
@@ -214,7 +214,7 @@ function useDocsResolveLink(sourceId, resolveLinkEndpoint) {
|
|
|
214
214
|
return _react.useCallback.call(void 0,
|
|
215
215
|
async (href, currentPath) => {
|
|
216
216
|
try {
|
|
217
|
-
const response = await
|
|
217
|
+
const response = await _chunkXCQ5I27Zcjs.contentFetch.call(void 0, resolvedResolveLinkEndpoint, {
|
|
218
218
|
method: "POST",
|
|
219
219
|
headers: { "Content-Type": "application/json" },
|
|
220
220
|
body: JSON.stringify({ link: href, currentPath, source: sourceId })
|
|
@@ -240,9 +240,9 @@ function useDocsResolveLink(sourceId, resolveLinkEndpoint) {
|
|
|
240
240
|
function scrollToContent() {
|
|
241
241
|
const article = document.querySelector("article");
|
|
242
242
|
if (article) {
|
|
243
|
-
|
|
243
|
+
_chunk77GX573Icjs.scrollElementIntoView.call(void 0, article, { headerOffset: _chunk77GX573Icjs.HUB_HEADER_OFFSET_PX });
|
|
244
244
|
} else {
|
|
245
|
-
|
|
245
|
+
_chunk77GX573Icjs.scrollElementIntoView.call(void 0, document.documentElement);
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
function isRecord(value) {
|
|
@@ -328,13 +328,13 @@ function toDocContent(value, requestedPath) {
|
|
|
328
328
|
function toDataSync(value) {
|
|
329
329
|
if (!isRecord(value)) return void 0;
|
|
330
330
|
const source = readString(value, "source");
|
|
331
|
-
if (!
|
|
331
|
+
if (!_chunkSJZWVMBFcjs.isDataSyncSource.call(void 0, source)) return void 0;
|
|
332
332
|
return { source, syncedAt: _nullishCoalesce(readString(value, "syncedAt"), () => ( null)) };
|
|
333
333
|
}
|
|
334
334
|
function useDocumentTree(config, initialPath) {
|
|
335
335
|
const { structureEndpoint, contentEndpoint, baseRoute } = config;
|
|
336
|
-
const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => (
|
|
337
|
-
const cleanInitialPath =
|
|
336
|
+
const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => ( _chunkF33EAPD2cjs.DEFAULT_FOLDER_INDEX_FILE));
|
|
337
|
+
const cleanInitialPath = _chunkF33EAPD2cjs.stripFolderIndexFromPath.call(void 0, _optionalChain([initialPath, 'optionalAccess', _3 => _3.replace, 'call', _4 => _4(/\/$/, "")]) || "", folderIndexFile);
|
|
338
338
|
const [structure, setStructure] = _react.useState.call(void 0, []);
|
|
339
339
|
const structureRef = _react.useRef.call(void 0, structure);
|
|
340
340
|
_react.useEffect.call(void 0, () => {
|
|
@@ -364,12 +364,12 @@ function useDocumentTree(config, initialPath) {
|
|
|
364
364
|
} else if (pathname.startsWith(`${normalizedBaseRoute}/`)) {
|
|
365
365
|
pathFromUrl = pathname.substring(`${normalizedBaseRoute}/`.length);
|
|
366
366
|
}
|
|
367
|
-
pathFromUrl =
|
|
367
|
+
pathFromUrl = _chunkF33EAPD2cjs.stripFolderIndexFromPath.call(void 0, pathFromUrl, folderIndexFile);
|
|
368
368
|
if (pathFromUrl !== selectedPathRef.current) {
|
|
369
369
|
setSelectedPath(pathFromUrl);
|
|
370
370
|
if (pathFromUrl) {
|
|
371
371
|
const parentPath = pathFromUrl.includes("/") ? pathFromUrl.substring(0, pathFromUrl.lastIndexOf("/")) : pathFromUrl;
|
|
372
|
-
setExpandedNodes(new Set(
|
|
372
|
+
setExpandedNodes(new Set(_chunkF33EAPD2cjs.getDocAncestorNodeIds.call(void 0, parentPath)));
|
|
373
373
|
}
|
|
374
374
|
setTimeout(() => {
|
|
375
375
|
scrollToContent();
|
|
@@ -387,7 +387,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
387
387
|
setSelectedPath(cleanInitialPath);
|
|
388
388
|
if (cleanInitialPath) {
|
|
389
389
|
const parentPath = cleanInitialPath.includes("/") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
|
|
390
|
-
setExpandedNodes(new Set(
|
|
390
|
+
setExpandedNodes(new Set(_chunkF33EAPD2cjs.getDocAncestorNodeIds.call(void 0, parentPath)));
|
|
391
391
|
}
|
|
392
392
|
setExternalNavCount((n) => n + 1);
|
|
393
393
|
}
|
|
@@ -401,7 +401,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
401
401
|
try {
|
|
402
402
|
setIsLoadingStructure(true);
|
|
403
403
|
setError(null);
|
|
404
|
-
const response = await
|
|
404
|
+
const response = await _chunkXCQ5I27Zcjs.contentFetch.call(void 0, structureEndpoint);
|
|
405
405
|
if (!response.ok) {
|
|
406
406
|
throw new Error("Failed to load documentation structure");
|
|
407
407
|
}
|
|
@@ -412,7 +412,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
412
412
|
if (cleanInitialPath) {
|
|
413
413
|
const pathForExpansion = cleanInitialPath.includes(".") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
|
|
414
414
|
if (pathForExpansion) {
|
|
415
|
-
setExpandedNodes(new Set(
|
|
415
|
+
setExpandedNodes(new Set(_chunkF33EAPD2cjs.getDocAncestorNodeIds.call(void 0, pathForExpansion)));
|
|
416
416
|
}
|
|
417
417
|
} else if (nodes.length > 0) {
|
|
418
418
|
const hasRootReadme = nodes.some((node) => node.type === "file" && node.path === folderIndexFile);
|
|
@@ -428,7 +428,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
} else {
|
|
431
|
-
setError(
|
|
431
|
+
setError(_chunkXCQ5I27Zcjs.apiErrorMessage.call(void 0, payload, "Failed to load documentation structure"));
|
|
432
432
|
}
|
|
433
433
|
} catch (err) {
|
|
434
434
|
console.error("Error fetching documentation structure:", err);
|
|
@@ -440,7 +440,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
440
440
|
const fetchContent = async (path) => {
|
|
441
441
|
try {
|
|
442
442
|
setIsLoadingContent(true);
|
|
443
|
-
const response = await
|
|
443
|
+
const response = await _chunkXCQ5I27Zcjs.contentFetch.call(void 0, `${contentEndpoint}?path=${encodeURIComponent(path)}`);
|
|
444
444
|
if (path !== lastFetchedPath.current) return;
|
|
445
445
|
if (!response.ok) {
|
|
446
446
|
if (response.status === 404) {
|
|
@@ -453,7 +453,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
453
453
|
return;
|
|
454
454
|
}
|
|
455
455
|
const latestStructure = structureRef.current;
|
|
456
|
-
const probe =
|
|
456
|
+
const probe = _chunkF33EAPD2cjs.findDocNodeByPath.call(void 0, _chunkF33EAPD2cjs.stripFolderIndexFromPath.call(void 0, path, folderIndexFile), latestStructure);
|
|
457
457
|
const probeIsNoReadmeFolder = !!probe && probe.type === "folder" && !probe.hasReadme;
|
|
458
458
|
const preStructureFolderLike = latestStructure.length === 0 && !path.endsWith(".md");
|
|
459
459
|
if (probeIsNoReadmeFolder || preStructureFolderLike) {
|
|
@@ -462,7 +462,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
462
462
|
setContent(null);
|
|
463
463
|
return;
|
|
464
464
|
}
|
|
465
|
-
setError(
|
|
465
|
+
setError(_chunkXCQ5I27Zcjs.apiErrorMessage.call(void 0, errorPayload, "Documentation file not found"));
|
|
466
466
|
setContent(null);
|
|
467
467
|
return;
|
|
468
468
|
}
|
|
@@ -480,7 +480,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
480
480
|
}
|
|
481
481
|
setContent(doc);
|
|
482
482
|
} else {
|
|
483
|
-
setError(
|
|
483
|
+
setError(_chunkXCQ5I27Zcjs.apiErrorMessage.call(void 0, payload, "Failed to load content"));
|
|
484
484
|
setContent(null);
|
|
485
485
|
}
|
|
486
486
|
} catch (err) {
|
|
@@ -510,16 +510,16 @@ function useDocumentTree(config, initialPath) {
|
|
|
510
510
|
if (!structure || structure.length === 0) return;
|
|
511
511
|
let pathToFetch = null;
|
|
512
512
|
if (selectedPath === "") {
|
|
513
|
-
const rootPath =
|
|
513
|
+
const rootPath = _chunkF33EAPD2cjs.rootDocumentPath.call(void 0, structure, folderIndexFile);
|
|
514
514
|
if (!rootPath) {
|
|
515
515
|
lastFetchedPath.current = null;
|
|
516
516
|
return;
|
|
517
517
|
}
|
|
518
518
|
pathToFetch = rootPath;
|
|
519
519
|
} else {
|
|
520
|
-
const node =
|
|
520
|
+
const node = _chunkF33EAPD2cjs.findDocNodeByPath.call(void 0, selectedPath, structure);
|
|
521
521
|
if (node && node.type === "folder" && !node.hasReadme) {
|
|
522
|
-
const firstDocPath =
|
|
522
|
+
const firstDocPath = _chunkF33EAPD2cjs.findFirstDocPath.call(void 0, node);
|
|
523
523
|
if (!firstDocPath) {
|
|
524
524
|
lastFetchedPath.current = null;
|
|
525
525
|
return;
|
|
@@ -558,16 +558,16 @@ function useDocumentTree(config, initialPath) {
|
|
|
558
558
|
if (node.type === "folder") {
|
|
559
559
|
setExpandedNodes((prev) => {
|
|
560
560
|
if (prev.has(node.id)) {
|
|
561
|
-
const ancestorIds =
|
|
561
|
+
const ancestorIds = _chunkF33EAPD2cjs.getDocAncestorNodeIds.call(void 0, node.path);
|
|
562
562
|
ancestorIds.pop();
|
|
563
563
|
return new Set(ancestorIds);
|
|
564
564
|
}
|
|
565
|
-
return new Set(
|
|
565
|
+
return new Set(_chunkF33EAPD2cjs.getDocAncestorNodeIds.call(void 0, node.path));
|
|
566
566
|
});
|
|
567
567
|
} else {
|
|
568
568
|
const lastSlash = node.path.lastIndexOf("/");
|
|
569
569
|
if (lastSlash > 0) {
|
|
570
|
-
setExpandedNodes(new Set(
|
|
570
|
+
setExpandedNodes(new Set(_chunkF33EAPD2cjs.getDocAncestorNodeIds.call(void 0, node.path.substring(0, lastSlash))));
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
lastFetchedPath.current = null;
|
|
@@ -582,9 +582,9 @@ function useDocumentTree(config, initialPath) {
|
|
|
582
582
|
const hashIndex = path.indexOf("#");
|
|
583
583
|
const anchor = hashIndex !== -1 ? path.substring(hashIndex) : "";
|
|
584
584
|
const cleanPath = path.replace(/\/$/, "").split("#")[0];
|
|
585
|
-
const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _5 => _5.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current :
|
|
585
|
+
const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _5 => _5.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current : _chunkF33EAPD2cjs.stripFolderIndexFromPath.call(void 0, cleanPath, folderIndexFile);
|
|
586
586
|
if (anchor && _optionalChain([options, 'optionalAccess', _6 => _6.fromInternalLink]) && pathForSelection === selectedPathRef.current) {
|
|
587
|
-
|
|
587
|
+
_chunk77GX573Icjs.navigateSamePageHash.call(void 0, anchor, { headerOffset: _chunk77GX573Icjs.HUB_HEADER_OFFSET_PX });
|
|
588
588
|
return;
|
|
589
589
|
}
|
|
590
590
|
const scrollAfterNav = () => {
|
|
@@ -592,7 +592,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
592
592
|
setTimeout(() => {
|
|
593
593
|
const el = document.getElementById(anchor.substring(1));
|
|
594
594
|
if (el) {
|
|
595
|
-
|
|
595
|
+
_chunk77GX573Icjs.scrollElementIntoView.call(void 0, el, { headerOffset: _chunk77GX573Icjs.HUB_HEADER_OFFSET_PX });
|
|
596
596
|
} else {
|
|
597
597
|
scrollToContent();
|
|
598
598
|
}
|
|
@@ -646,17 +646,17 @@ function useDocumentTree(config, initialPath) {
|
|
|
646
646
|
return docNavigation.register({
|
|
647
647
|
baseRoute: normalizedBaseRoute,
|
|
648
648
|
findNodeByPath: (path) => {
|
|
649
|
-
const clean =
|
|
650
|
-
return _nullishCoalesce(
|
|
649
|
+
const clean = _chunkF33EAPD2cjs.stripFolderIndexFromPath.call(void 0, path.replace(/\/$/, "").split("#")[0], folderIndexFile);
|
|
650
|
+
return _nullishCoalesce(_chunkF33EAPD2cjs.findDocNodeByPath.call(void 0, clean, structure), () => ( null));
|
|
651
651
|
},
|
|
652
652
|
selectNode
|
|
653
653
|
});
|
|
654
654
|
}, [docNavigation, normalizedBaseRoute, structure, selectNode, folderIndexFile]);
|
|
655
655
|
const isEmptyFolder = _react.useMemo.call(void 0, () => {
|
|
656
656
|
if (structure.length === 0) return false;
|
|
657
|
-
if (!selectedPath) return !
|
|
658
|
-
const node =
|
|
659
|
-
return !!node && node.type === "folder" && !node.hasReadme && !
|
|
657
|
+
if (!selectedPath) return !_chunkF33EAPD2cjs.rootDocumentPath.call(void 0, structure, folderIndexFile);
|
|
658
|
+
const node = _chunkF33EAPD2cjs.findDocNodeByPath.call(void 0, selectedPath, structure);
|
|
659
|
+
return !!node && node.type === "folder" && !node.hasReadme && !_chunkF33EAPD2cjs.findFirstDocPath.call(void 0, node);
|
|
660
660
|
}, [selectedPath, structure, folderIndexFile]);
|
|
661
661
|
const isEmptySource = !isLoadingStructure && structure.length === 0;
|
|
662
662
|
const settled = isEmptyFolder || isEmptySource;
|
|
@@ -742,14 +742,14 @@ function DocViewerContent({
|
|
|
742
742
|
},
|
|
743
743
|
docPath
|
|
744
744
|
);
|
|
745
|
-
const { activeSection, handleSectionClick } =
|
|
745
|
+
const { activeSection, handleSectionClick } = _chunkJ3CFRGZ2cjs.useScrollSpy.call(void 0, _optionalChain([content, 'optionalAccess', _10 => _10.sections]));
|
|
746
746
|
const docNav = useDocNavigation();
|
|
747
747
|
const router = _chunk7DNL734Scjs.useRouter.call(void 0, );
|
|
748
748
|
const backCfg = backButton === false ? null : {
|
|
749
749
|
label: _nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _11 => _11.label]), () => ( "Back to home")),
|
|
750
750
|
onClick: () => router.push(_nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _12 => _12.href]), () => ( "/")))
|
|
751
751
|
};
|
|
752
|
-
const docSearch =
|
|
752
|
+
const docSearch = _chunkESGE7CUXcjs.useDocSearch.call(void 0, {
|
|
753
753
|
source: chatSource,
|
|
754
754
|
baseRoute,
|
|
755
755
|
searchEndpoint,
|
|
@@ -773,8 +773,8 @@ function DocViewerContent({
|
|
|
773
773
|
onResolveLink: resolveLink
|
|
774
774
|
});
|
|
775
775
|
}, [content, renderContent, navigateToDoc, sourceId, resolveLink]);
|
|
776
|
-
const selectedNodePath = structure.length > 0 && !selectedPath ?
|
|
777
|
-
const selectedNodeDocType = structure.length > 0 ? selectedNodePath ? _optionalChain([
|
|
776
|
+
const selectedNodePath = structure.length > 0 && !selectedPath ? _chunkF33EAPD2cjs.rootDocumentPath.call(void 0, structure, folderIndexFile) : selectedPath;
|
|
777
|
+
const selectedNodeDocType = structure.length > 0 ? selectedNodePath ? _optionalChain([_chunkF33EAPD2cjs.findDocNodeByPath.call(void 0, selectedNodePath, structure), 'optionalAccess', _13 => _13.documentType]) : void 0 : initialDocumentType;
|
|
778
778
|
const isLoadingDocument = isLoadingContent || isLoadingStructure;
|
|
779
779
|
const loadingContent = isLoadingDocument ? renderContent(
|
|
780
780
|
{ content: "", sections: [], path: _nullishCoalesce(selectedPath, () => ( "")), documentType: selectedNodeDocType },
|
|
@@ -789,10 +789,10 @@ function DocViewerContent({
|
|
|
789
789
|
const bgClass = !isColorValue ? colorPalette.background : "";
|
|
790
790
|
const containerBgStyle = colorPalette.containerBackground !== "transparent" ? { backgroundColor: colorPalette.containerBackground } : {};
|
|
791
791
|
const resolvedEmptyText = structure.length > 0 ? "Select a document from the sidebar to view" : emptyStateText || "No documents yet.";
|
|
792
|
-
const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
793
|
-
synced && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
792
|
+
const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXI3AMOW6cjs.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: [
|
|
793
|
+
synced && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSJZWVMBFcjs.DataSyncLine, { sync: _optionalChain([content, 'optionalAccess', _18 => _18.sync]), loading: !content && (isLoadingContent || isLoadingStructure) }),
|
|
794
794
|
showAIChat && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
795
|
-
|
|
795
|
+
_chunkESGE7CUXcjs.DocSearchBar,
|
|
796
796
|
{
|
|
797
797
|
placeholder: `Search ${_optionalChain([sidebarLabel, 'optionalAccess', _19 => _19.toLowerCase, 'call', _20 => _20()]) || "documents"}...`,
|
|
798
798
|
query: docSearch.query,
|
|
@@ -813,7 +813,7 @@ function DocViewerContent({
|
|
|
813
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: [
|
|
814
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: [
|
|
815
815
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PersistentMobileDropdown, { isLoading: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
816
|
-
|
|
816
|
+
_chunkJ3CFRGZ2cjs.MobileNavigationDropdown,
|
|
817
817
|
{
|
|
818
818
|
nodes: structure,
|
|
819
819
|
selectedPath,
|
|
@@ -827,7 +827,7 @@ function DocViewerContent({
|
|
|
827
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: [
|
|
828
828
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-ods-text-secondary text-h5", children: sidebarLabel }),
|
|
829
829
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
830
|
-
|
|
830
|
+
_chunkJ3CFRGZ2cjs.MultiLevelNavigation,
|
|
831
831
|
{
|
|
832
832
|
nodes: structure,
|
|
833
833
|
selectedPath,
|
|
@@ -859,7 +859,7 @@ function DocViewerContent({
|
|
|
859
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: [
|
|
860
860
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: ON_THIS_PAGE_HEADING_CLASS, children: ON_THIS_PAGE_LABEL }),
|
|
861
861
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk63A4GZMBcjs.LoadingScope, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
862
|
-
|
|
862
|
+
_chunkJ3CFRGZ2cjs.StickySectionNav,
|
|
863
863
|
{
|
|
864
864
|
sections: [],
|
|
865
865
|
activeSection: "",
|
|
@@ -872,7 +872,7 @@ function DocViewerContent({
|
|
|
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
|
-
|
|
875
|
+
_chunkJ3CFRGZ2cjs.StickySectionNav,
|
|
876
876
|
{
|
|
877
877
|
sections: stickyNavSections,
|
|
878
878
|
activeSection,
|
|
@@ -887,18 +887,18 @@ function DocViewerContent({
|
|
|
887
887
|
) })
|
|
888
888
|
] })
|
|
889
889
|
] }) }) });
|
|
890
|
-
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
890
|
+
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSJZWVMBFcjs.PageShell, { contentClassName: `${bgClass} ${className}`, children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `page-shell-content ${bgClass} ${className}`.trim(), children: inner });
|
|
891
891
|
}
|
|
892
892
|
|
|
893
893
|
// src/components/docs/docs-hub-page.tsx
|
|
894
894
|
|
|
895
895
|
var DEFAULT_TITLE = "Documents";
|
|
896
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" }) });
|
|
897
|
-
var defaultPdfRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
898
|
-
var defaultGoogleSheetRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
899
|
-
var defaultFigmaRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
897
|
+
var defaultPdfRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGTUQGVXHcjs.PdfViewer, { src: _nullishCoalesce(content.fileUrl, () => ( "")), fileName: content.fileName });
|
|
898
|
+
var defaultGoogleSheetRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGTUQGVXHcjs.GoogleSheetsViewer, { externalUrl: _nullishCoalesce(content.externalUrl, () => ( "")), fileName: content.fileName });
|
|
899
|
+
var defaultFigmaRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSJZWVMBFcjs.FigmaEmbed, { url: _nullishCoalesce(content.externalUrl, () => ( "")), title: content.fileName, iframeLoading: "eager" });
|
|
900
900
|
var defaultFileRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
901
|
-
|
|
901
|
+
_chunkGTUQGVXHcjs.FileDownloadCard,
|
|
902
902
|
{
|
|
903
903
|
fileName: content.fileName,
|
|
904
904
|
mimeType: content.mimeType,
|