@flamingo-stack/openframe-frontend-core 0.0.716 → 0.0.717
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/index.cjs +23 -14
- package/dist/chat-protocol/index.js +23 -14
- package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
- package/dist/chat-protocol/source-metadata.d.ts +11 -2
- package/dist/chat-protocol/source-metadata.d.ts.map +1 -1
- package/dist/{chunk-DLEO53NX.cjs → chunk-2AI2E3O2.cjs} +65 -65
- package/dist/{chunk-V36WGIYR.js → chunk-2EK7PA73.js} +3 -3
- package/dist/{chunk-3AJIQPFG.js → chunk-2X2P3VHF.js} +5 -5
- package/dist/{chunk-DPX6244M.js → chunk-3MJPCKB6.js} +2 -2
- package/dist/{chunk-2V7D5GJX.cjs → chunk-3QAMMWV2.cjs} +8 -8
- package/dist/{chunk-BVZ7W4HW.js → chunk-47FISYO5.js} +3 -3
- package/dist/{chunk-S2VWQX6T.cjs → chunk-5MF3NMYC.cjs} +261 -261
- package/dist/{chunk-YTMV4OBY.js → chunk-6MZI5SQ4.js} +2 -2
- package/dist/{chunk-C5AGSZBT.js → chunk-B5XU6KOA.js} +1 -1
- package/dist/{chunk-P7IL4CX3.js → chunk-E6FLX4TX.js} +3 -3
- package/dist/{chunk-ZX7SCPLO.cjs → chunk-E7YCPY7K.cjs} +3 -3
- package/dist/{chunk-MXPQMQI3.js → chunk-FGKSAQR3.js} +5 -5
- package/dist/{chunk-EOKSKJSS.cjs → chunk-FROXS52D.cjs} +11 -11
- package/dist/{chunk-I5F2OTFE.cjs → chunk-J3Q53TWW.cjs} +26 -26
- package/dist/{chunk-ROBQ5TR7.js → chunk-JH2SIWPQ.js} +28 -17
- package/dist/{chunk-DDWFCWOE.js → chunk-JPD4NXH6.js} +1 -1
- package/dist/{chunk-STCJYO2Z.cjs → chunk-LANNTTKP.cjs} +9 -9
- package/dist/{chunk-JVCAK4W3.cjs → chunk-LE5WKGJV.cjs} +3 -3
- package/dist/{chunk-KNOZVVCU.cjs → chunk-M2A5SC6H.cjs} +9 -9
- package/dist/{chunk-YO5JB3WE.cjs → chunk-NB6EWUDE.cjs} +33 -33
- package/dist/{chunk-H5R7U2D2.js → chunk-NZ5BHDFZ.js} +1 -1
- package/dist/{chunk-X2MNNV5H.cjs → chunk-OHLBO4LM.cjs} +3 -3
- package/dist/{chunk-64F6OEEV.js → chunk-PD4W2VMH.js} +1 -1
- package/dist/{chunk-KYFNFRSV.js → chunk-TYVS64YN.js} +2 -2
- package/dist/{chunk-5IJXM3RU.cjs → chunk-U3TP4UGA.cjs} +6 -6
- package/dist/{chunk-HETQETPV.cjs → chunk-UWQWMGJ7.cjs} +28 -17
- package/dist/{chunk-NKILEG3Y.cjs → chunk-VYKFM2NB.cjs} +35 -35
- package/dist/{chunk-YBS5QGON.js → chunk-VZI5BA4L.js} +1 -1
- package/dist/{chunk-JCA5MBVY.js → chunk-WH5GJSID.js} +2 -2
- package/dist/{chunk-DHMO5GI4.cjs → chunk-X3RVDBXU.cjs} +16 -16
- package/dist/{cloud-tenants-2J7CPTKT.cjs → cloud-tenants-KDWTVHSI.cjs} +3 -3
- package/dist/{cloud-tenants-YOY2WLGC.js → cloud-tenants-LNC26WY2.js} +2 -2
- package/dist/components/case-studies/index.cjs +14 -14
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/types/message.types.d.ts +20 -16
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/types/unified-chat-state.types.d.ts +1 -1
- 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 +62 -62
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +33 -33
- package/dist/components/index.js +12 -12
- package/dist/components/meeting-scheduler/index.cjs +19 -19
- 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 +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/product-demo/index.cjs +6 -6
- package/dist/components/product-demo/index.js +6 -6
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/{devices-5NADSKDZ.cjs → devices-ATHYJUVQ.cjs} +4 -4
- package/dist/{devices-EQXXILXW.js → devices-NYCRQ3PG.js} +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/dist/{knowledge-YCQITBJB.js → knowledge-DEKYJXBS.js} +2 -2
- package/dist/{knowledge-LHQYZJE7.cjs → knowledge-EHNRYT7U.cjs} +4 -4
- package/dist/{logs-DUVKSQU3.cjs → logs-3V765P7O.cjs} +11 -11
- package/dist/{logs-LZNXGOSW.js → logs-Q7YFIVYI.js} +2 -2
- package/dist/{policies-VYWOJ7IF.js → policies-BTIENK5A.js} +2 -2
- package/dist/{policies-5H74FS4S.cjs → policies-TXU5AIXS.cjs} +7 -7
- package/dist/{software-update-VRRX5U4W.cjs → software-update-MINTICZY.cjs} +7 -7
- package/dist/{software-update-MSDY3OLX.js → software-update-SW2HOBHW.js} +2 -2
- package/package.json +1 -1
- package/src/chat-protocol/nats-decoder.ts +10 -8
- package/src/chat-protocol/source-metadata.ts +25 -2
- package/src/components/chat/types/message.types.ts +21 -15
- package/src/components/chat/types/unified-chat-state.types.ts +1 -1
- package/src/components/chat/utils/process-historical-messages.ts +12 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk5MF3NMYCcjs = require('./chunk-5MF3NMYC.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkAUMKE74Mcjs = require('./chunk-AUMKE74M.cjs');
|
|
@@ -12,7 +12,7 @@ var _chunkAUMKE74Mcjs = require('./chunk-AUMKE74M.cjs');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkUWQWMGJ7cjs = require('./chunk-UWQWMGJ7.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkGQ7JJUITcjs = require('./chunk-GQ7JJUIT.cjs');
|
|
@@ -39,7 +39,7 @@ var _jsxruntime = require('react/jsx-runtime');
|
|
|
39
39
|
function DocSearchResultRow({ result, isHighlighted }) {
|
|
40
40
|
const docType = _optionalChain([result, 'access', _ => _.metadata, 'optionalAccess', _2 => _2.documentType]) || void 0;
|
|
41
41
|
const sourceRepo = _optionalChain([result, 'access', _3 => _3.metadata, 'optionalAccess', _4 => _4.sourceRepo]) || void 0;
|
|
42
|
-
const { Icon: SourceIcon, label: iconLabel } =
|
|
42
|
+
const { Icon: SourceIcon, label: iconLabel } = _chunkUWQWMGJ7cjs.resolveSourceIcon.call(void 0, {
|
|
43
43
|
sourceRepo,
|
|
44
44
|
documentType: docType
|
|
45
45
|
});
|
|
@@ -69,7 +69,7 @@ function DocSearchBar({
|
|
|
69
69
|
renderResult
|
|
70
70
|
}) {
|
|
71
71
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
72
|
-
|
|
72
|
+
_chunk5MF3NMYCcjs.SearchInput,
|
|
73
73
|
{
|
|
74
74
|
placeholder,
|
|
75
75
|
value: query,
|
|
@@ -119,7 +119,7 @@ function mapDocSearchResults(docs) {
|
|
|
119
119
|
results.push({
|
|
120
120
|
id: `group-${entry.repo}`,
|
|
121
121
|
// Same table label and count as the chat's grouped chip: one owner each.
|
|
122
|
-
title: `${
|
|
122
|
+
title: `${_chunkUWQWMGJ7cjs.getSourceLabel.call(void 0, entry.repo)} ${_chunkUWQWMGJ7cjs.recordCountLabel.call(void 0, rows.length)}`,
|
|
123
123
|
path: rows[0].path,
|
|
124
124
|
type: "file",
|
|
125
125
|
metadata: {
|
|
@@ -311,27 +311,27 @@ function useDocSearch(config) {
|
|
|
311
311
|
case "navigate-same-tab": {
|
|
312
312
|
if (wantsNewTab) {
|
|
313
313
|
setKeepOpen(true);
|
|
314
|
-
window.open(action.href, "_blank",
|
|
314
|
+
window.open(action.href, "_blank", _chunkUWQWMGJ7cjs.NEW_TAB_FEATURES);
|
|
315
315
|
return;
|
|
316
316
|
}
|
|
317
317
|
setKeepOpen(false);
|
|
318
318
|
const path = baseRoute && action.href.startsWith(`${baseRoute}/`) ? action.href.slice(baseRoute.length + 1) : null;
|
|
319
319
|
if (path && _optionalChain([onInPageSwap, 'optionalCall', _16 => _16(path)])) return;
|
|
320
|
-
router.push(
|
|
320
|
+
router.push(_chunkUWQWMGJ7cjs.stripSameOriginToPath.call(void 0, action.href));
|
|
321
321
|
return;
|
|
322
322
|
}
|
|
323
323
|
case "navigate-new-tab":
|
|
324
324
|
setKeepOpen(true);
|
|
325
325
|
if (_optionalChain([runtime, 'optionalAccess', _17 => _17.navigation, 'access', _18 => _18.mode]) === "embed") {
|
|
326
326
|
const targetPlatform = _nullishCoalesce(_optionalChain([result, 'access', _19 => _19.metadata, 'optionalAccess', _20 => _20.targetPlatform]), () => ( null));
|
|
327
|
-
|
|
327
|
+
_chunkUWQWMGJ7cjs.resolveExternalNavigation.call(void 0, {
|
|
328
328
|
href: action.href,
|
|
329
329
|
targetPlatform,
|
|
330
330
|
runtime
|
|
331
331
|
}).open();
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
|
-
window.open(action.href, "_blank",
|
|
334
|
+
window.open(action.href, "_blank", _chunkUWQWMGJ7cjs.NEW_TAB_FEATURES);
|
|
335
335
|
return;
|
|
336
336
|
case "ask-ai":
|
|
337
337
|
setKeepOpen(false);
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkOHLBO4LMcjs = require('./chunk-OHLBO4LM.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkLE5WKGJVcjs = require('./chunk-LE5WKGJV.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkM2A5SC6Hcjs = require('./chunk-M2A5SC6H.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunk5MF3NMYCcjs = require('./chunk-5MF3NMYC.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
var _chunkPPXR22YCcjs = require('./chunk-PPXR22YC.cjs');
|
|
@@ -30,7 +30,7 @@ var _chunkAUMKE74Mcjs = require('./chunk-AUMKE74M.cjs');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkUWQWMGJ7cjs = require('./chunk-UWQWMGJ7.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
@@ -339,8 +339,8 @@ function toDocContent(value, requestedPath) {
|
|
|
339
339
|
}
|
|
340
340
|
function useDocumentTree(config, initialPath) {
|
|
341
341
|
const { structureEndpoint, contentEndpoint, baseRoute } = config;
|
|
342
|
-
const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => (
|
|
343
|
-
const cleanInitialPath =
|
|
342
|
+
const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => ( _chunkUWQWMGJ7cjs.DEFAULT_FOLDER_INDEX_FILE));
|
|
343
|
+
const cleanInitialPath = _chunkUWQWMGJ7cjs.stripFolderIndexFromPath.call(void 0, _optionalChain([initialPath, 'optionalAccess', _4 => _4.replace, 'call', _5 => _5(/\/$/, "")]) || "", folderIndexFile);
|
|
344
344
|
const [structure, setStructure] = _react.useState.call(void 0, []);
|
|
345
345
|
const [selectedPath, setSelectedPath] = _react.useState.call(void 0, cleanInitialPath);
|
|
346
346
|
const [content, setContent] = _react.useState.call(void 0, null);
|
|
@@ -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 = _chunkUWQWMGJ7cjs.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(_chunkUWQWMGJ7cjs.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(_chunkUWQWMGJ7cjs.getDocAncestorNodeIds.call(void 0, parentPath)));
|
|
391
391
|
}
|
|
392
392
|
setExternalNavCount((n) => n + 1);
|
|
393
393
|
}
|
|
@@ -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(_chunkUWQWMGJ7cjs.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);
|
|
@@ -452,7 +452,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
452
452
|
setContent(null);
|
|
453
453
|
return;
|
|
454
454
|
}
|
|
455
|
-
const probe =
|
|
455
|
+
const probe = _chunkUWQWMGJ7cjs.findDocNodeByPath.call(void 0, _chunkUWQWMGJ7cjs.stripFolderIndexFromPath.call(void 0, path, folderIndexFile), structure);
|
|
456
456
|
const probeIsNoReadmeFolder = !!probe && probe.type === "folder" && !probe.hasReadme;
|
|
457
457
|
const preStructureFolderLike = structure.length === 0 && !path.endsWith(".md");
|
|
458
458
|
if (probeIsNoReadmeFolder || preStructureFolderLike) {
|
|
@@ -509,7 +509,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
509
509
|
if (selectedPath === "") {
|
|
510
510
|
pathToFetch = folderIndexFile;
|
|
511
511
|
} else {
|
|
512
|
-
const node =
|
|
512
|
+
const node = _chunkUWQWMGJ7cjs.findDocNodeByPath.call(void 0, selectedPath, structure);
|
|
513
513
|
if (node && node.type === "folder" && !node.hasReadme) {
|
|
514
514
|
const firstDocPath = findFirstDocPath(node);
|
|
515
515
|
if (!firstDocPath) {
|
|
@@ -550,16 +550,16 @@ function useDocumentTree(config, initialPath) {
|
|
|
550
550
|
if (node.type === "folder") {
|
|
551
551
|
setExpandedNodes((prev) => {
|
|
552
552
|
if (prev.has(node.id)) {
|
|
553
|
-
const ancestorIds =
|
|
553
|
+
const ancestorIds = _chunkUWQWMGJ7cjs.getDocAncestorNodeIds.call(void 0, node.path);
|
|
554
554
|
ancestorIds.pop();
|
|
555
555
|
return new Set(ancestorIds);
|
|
556
556
|
}
|
|
557
|
-
return new Set(
|
|
557
|
+
return new Set(_chunkUWQWMGJ7cjs.getDocAncestorNodeIds.call(void 0, node.path));
|
|
558
558
|
});
|
|
559
559
|
} else {
|
|
560
560
|
const lastSlash = node.path.lastIndexOf("/");
|
|
561
561
|
if (lastSlash > 0) {
|
|
562
|
-
setExpandedNodes(new Set(
|
|
562
|
+
setExpandedNodes(new Set(_chunkUWQWMGJ7cjs.getDocAncestorNodeIds.call(void 0, node.path.substring(0, lastSlash))));
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
565
|
lastFetchedPath.current = null;
|
|
@@ -574,7 +574,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
574
574
|
const hashIndex = path.indexOf("#");
|
|
575
575
|
const anchor = hashIndex !== -1 ? path.substring(hashIndex) : "";
|
|
576
576
|
const cleanPath = path.replace(/\/$/, "").split("#")[0];
|
|
577
|
-
const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _6 => _6.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current :
|
|
577
|
+
const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _6 => _6.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current : _chunkUWQWMGJ7cjs.stripFolderIndexFromPath.call(void 0, cleanPath, folderIndexFile);
|
|
578
578
|
if (anchor && _optionalChain([options, 'optionalAccess', _7 => _7.fromInternalLink]) && pathForSelection === selectedPathRef.current) {
|
|
579
579
|
_chunkGQ7JJUITcjs.navigateSamePageHash.call(void 0, anchor, { headerOffset: _chunkGQ7JJUITcjs.HUB_HEADER_OFFSET_PX });
|
|
580
580
|
return;
|
|
@@ -638,15 +638,15 @@ function useDocumentTree(config, initialPath) {
|
|
|
638
638
|
return docNavigation.register({
|
|
639
639
|
baseRoute: normalizedBaseRoute,
|
|
640
640
|
findNodeByPath: (path) => {
|
|
641
|
-
const clean =
|
|
642
|
-
return _nullishCoalesce(
|
|
641
|
+
const clean = _chunkUWQWMGJ7cjs.stripFolderIndexFromPath.call(void 0, path.replace(/\/$/, "").split("#")[0], folderIndexFile);
|
|
642
|
+
return _nullishCoalesce(_chunkUWQWMGJ7cjs.findDocNodeByPath.call(void 0, clean, structure), () => ( null));
|
|
643
643
|
},
|
|
644
644
|
selectNode
|
|
645
645
|
});
|
|
646
646
|
}, [docNavigation, normalizedBaseRoute, structure, selectNode, folderIndexFile]);
|
|
647
647
|
const isEmptyFolder = _react.useMemo.call(void 0, () => {
|
|
648
648
|
if (!selectedPath || structure.length === 0) return false;
|
|
649
|
-
const node =
|
|
649
|
+
const node = _chunkUWQWMGJ7cjs.findDocNodeByPath.call(void 0, selectedPath, structure);
|
|
650
650
|
return !!node && node.type === "folder" && !node.hasReadme && !findFirstDocPath(node);
|
|
651
651
|
}, [selectedPath, structure]);
|
|
652
652
|
return {
|
|
@@ -726,14 +726,14 @@ function DocViewerContent({
|
|
|
726
726
|
},
|
|
727
727
|
docPath
|
|
728
728
|
);
|
|
729
|
-
const { activeSection, handleSectionClick } =
|
|
729
|
+
const { activeSection, handleSectionClick } = _chunkLE5WKGJVcjs.useScrollSpy.call(void 0, _optionalChain([content, 'optionalAccess', _11 => _11.sections]));
|
|
730
730
|
const docNav = useDocNavigation();
|
|
731
731
|
const router = _chunk7DNL734Scjs.useRouter.call(void 0, );
|
|
732
732
|
const backCfg = backButton === false ? null : {
|
|
733
733
|
label: _nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _12 => _12.label]), () => ( "Back to home")),
|
|
734
734
|
onClick: () => router.push(_nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _13 => _13.href]), () => ( "/")))
|
|
735
735
|
};
|
|
736
|
-
const docSearch =
|
|
736
|
+
const docSearch = _chunkM2A5SC6Hcjs.useDocSearch.call(void 0, {
|
|
737
737
|
source: chatSource,
|
|
738
738
|
baseRoute,
|
|
739
739
|
searchEndpoint,
|
|
@@ -757,7 +757,7 @@ function DocViewerContent({
|
|
|
757
757
|
onResolveLink: resolveLink
|
|
758
758
|
});
|
|
759
759
|
}, [content, renderContent, navigateToDoc, sourceId, resolveLink]);
|
|
760
|
-
const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([
|
|
760
|
+
const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([_chunkUWQWMGJ7cjs.findDocNodeByPath.call(void 0, selectedPath, structure), 'optionalAccess', _14 => _14.documentType]) : void 0;
|
|
761
761
|
const activeDocType = _nullishCoalesce(_optionalChain([content, 'optionalAccess', _15 => _15.documentType]), () => ( selectedNodeDocType));
|
|
762
762
|
const isMarkdownContent = !activeDocType || activeDocType === "markdown";
|
|
763
763
|
const showStickyNav = isMarkdownContent;
|
|
@@ -770,7 +770,7 @@ function DocViewerContent({
|
|
|
770
770
|
const resolvedEmptyText = emptyStateText || defaultEmptyText;
|
|
771
771
|
const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPXR22YCcjs.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: [
|
|
772
772
|
showAIChat && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
773
|
-
|
|
773
|
+
_chunkM2A5SC6Hcjs.DocSearchBar,
|
|
774
774
|
{
|
|
775
775
|
placeholder: `Search ${_optionalChain([sidebarLabel, 'optionalAccess', _19 => _19.toLowerCase, 'call', _20 => _20()]) || "documents"}...`,
|
|
776
776
|
query: docSearch.query,
|
|
@@ -789,9 +789,9 @@ function DocViewerContent({
|
|
|
789
789
|
] })
|
|
790
790
|
] }) }),
|
|
791
791
|
!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: [
|
|
792
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full content-lg:w-[320px] content-lg:shrink-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "content-lg:sticky content-lg:top-20", children: isLoadingStructure ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
792
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full content-lg:w-[320px] content-lg:shrink-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "content-lg:sticky content-lg:top-20", children: isLoadingStructure ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5MF3NMYCcjs.CategorySidebarSkeleton, {}) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
793
793
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PersistentMobileDropdown, { isLoading: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
794
|
-
|
|
794
|
+
_chunkLE5WKGJVcjs.MobileNavigationDropdown,
|
|
795
795
|
{
|
|
796
796
|
nodes: structure,
|
|
797
797
|
selectedPath,
|
|
@@ -805,7 +805,7 @@ function DocViewerContent({
|
|
|
805
805
|
/* @__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: [
|
|
806
806
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-ods-text-secondary text-h5", children: sidebarLabel }),
|
|
807
807
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
808
|
-
|
|
808
|
+
_chunkLE5WKGJVcjs.MultiLevelNavigation,
|
|
809
809
|
{
|
|
810
810
|
nodes: structure,
|
|
811
811
|
selectedPath,
|
|
@@ -844,7 +844,7 @@ function DocViewerContent({
|
|
|
844
844
|
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: [
|
|
845
845
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-4 font-semibold text-ods-text-secondary text-h5", children: "ON THIS PAGE" }),
|
|
846
846
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
847
|
-
|
|
847
|
+
_chunkLE5WKGJVcjs.StickySectionNav,
|
|
848
848
|
{
|
|
849
849
|
sections: stickyNavSections,
|
|
850
850
|
activeSection,
|
|
@@ -859,7 +859,7 @@ function DocViewerContent({
|
|
|
859
859
|
) })
|
|
860
860
|
] })
|
|
861
861
|
] }) }) });
|
|
862
|
-
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
862
|
+
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5MF3NMYCcjs.PageShell, { contentClassName: `${bgClass} ${className}`, children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `page-shell-content ${bgClass} ${className}`.trim(), children: inner });
|
|
863
863
|
}
|
|
864
864
|
|
|
865
865
|
// src/components/docs/skeletons.tsx
|
|
@@ -955,11 +955,11 @@ function EmbedSkeleton({ documentType } = {}) {
|
|
|
955
955
|
|
|
956
956
|
var DEFAULT_TITLE = "Documents";
|
|
957
957
|
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" }) });
|
|
958
|
-
var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
959
|
-
var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
960
|
-
var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
958
|
+
var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOHLBO4LMcjs.PdfViewer, { src: content.fileUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
|
|
959
|
+
var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOHLBO4LMcjs.GoogleSheetsViewer, { externalUrl: content.externalUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
|
|
960
|
+
var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5MF3NMYCcjs.FigmaEmbed, { url: content.externalUrl, title: content.fileName, loading: "eager" }) : defaultFallbackRenderer(content, handlers);
|
|
961
961
|
var defaultFileRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
962
|
-
|
|
962
|
+
_chunkOHLBO4LMcjs.FileDownloadCard,
|
|
963
963
|
{
|
|
964
964
|
fileName: content.fileName,
|
|
965
965
|
mimeType: content.mimeType,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk5MF3NMYCcjs = require('./chunk-5MF3NMYC.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -46,7 +46,7 @@ function GoogleSheetsViewer({ externalUrl, fileName, height }) {
|
|
|
46
46
|
] });
|
|
47
47
|
}
|
|
48
48
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
49
|
-
|
|
49
|
+
_chunk5MF3NMYCcjs.EmbedViewerFrame,
|
|
50
50
|
{
|
|
51
51
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.GoogleSheetsIcon, { className: "h-5 w-5 shrink-0" }),
|
|
52
52
|
title: displayName,
|
|
@@ -81,7 +81,7 @@ function PdfViewer({ src, fileName, onPreview, onDownload, height }) {
|
|
|
81
81
|
] });
|
|
82
82
|
}
|
|
83
83
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
84
|
-
|
|
84
|
+
_chunk5MF3NMYCcjs.EmbedViewerFrame,
|
|
85
85
|
{
|
|
86
86
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVX4E6YSBcjs.AdobePdfIcon, { className: "h-5 w-5 shrink-0" }),
|
|
87
87
|
title: displayName,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
SearchInput
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-B5XU6KOA.js";
|
|
5
5
|
import {
|
|
6
6
|
contentFetch
|
|
7
7
|
} from "./chunk-G3GRYDMS.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
resolveExternalNavigation,
|
|
13
13
|
resolveSourceIcon,
|
|
14
14
|
stripSameOriginToPath
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JH2SIWPQ.js";
|
|
16
16
|
import {
|
|
17
17
|
useDebounce
|
|
18
18
|
} from "./chunk-CMZ3QTFQ.js";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkGEDY7HQIcjs = require('./chunk-GEDY7HQI.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk5MF3NMYCcjs = require('./chunk-5MF3NMYC.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkPPXR22YCcjs = require('./chunk-PPXR22YC.cjs');
|
|
@@ -15,7 +15,7 @@ var _chunkJO5TLJPMcjs = require('./chunk-JO5TLJPM.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkUWQWMGJ7cjs = require('./chunk-UWQWMGJ7.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -61,7 +61,7 @@ function FaqAccordion({ items, defaultOpenIds = [] }) {
|
|
|
61
61
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
62
62
|
"div",
|
|
63
63
|
{
|
|
64
|
-
id:
|
|
64
|
+
id: _chunkUWQWMGJ7cjs.faqItemAnchor.call(void 0, item.id),
|
|
65
65
|
className: "scroll-mt-24 transition-colors hover:bg-ods-bg-hover",
|
|
66
66
|
children: [
|
|
67
67
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -154,7 +154,7 @@ function groupFaqsBySection(faqs) {
|
|
|
154
154
|
}
|
|
155
155
|
let group = byName.get(name);
|
|
156
156
|
if (!group) {
|
|
157
|
-
group = { section: name, slug:
|
|
157
|
+
group = { section: name, slug: _chunkUWQWMGJ7cjs.faqSectionSlug.call(void 0, name), items: [] };
|
|
158
158
|
byName.set(name, group);
|
|
159
159
|
}
|
|
160
160
|
group.items.push(item);
|
|
@@ -209,7 +209,7 @@ function GroupedFaqList({
|
|
|
209
209
|
}, [slugKey]);
|
|
210
210
|
const [hashTarget, setHashTarget] = _react.useState.call(void 0, null);
|
|
211
211
|
_react.useEffect.call(void 0, () => {
|
|
212
|
-
const refresh = () => setHashTarget(
|
|
212
|
+
const refresh = () => setHashTarget(_chunkUWQWMGJ7cjs.parseFaqHash.call(void 0, window.location.hash));
|
|
213
213
|
refresh();
|
|
214
214
|
window.addEventListener("hashchange", refresh);
|
|
215
215
|
return () => window.removeEventListener("hashchange", refresh);
|
|
@@ -377,7 +377,7 @@ function FaqDocumentPage({
|
|
|
377
377
|
minResults
|
|
378
378
|
}
|
|
379
379
|
) });
|
|
380
|
-
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
380
|
+
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5MF3NMYCcjs.PageShell, { children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: inner });
|
|
381
381
|
}
|
|
382
382
|
|
|
383
383
|
|
|
@@ -537,15 +537,13 @@ var MESSAGE_TYPE = {
|
|
|
537
537
|
TEXT: "TEXT",
|
|
538
538
|
THINKING: "THINKING",
|
|
539
539
|
ASK: "ASK",
|
|
540
|
-
/** Per-answer
|
|
540
|
+
/** Per-answer attachments (cited documents, videos, entity cards).
|
|
541
541
|
*
|
|
542
|
-
*
|
|
543
|
-
*
|
|
544
|
-
*
|
|
545
|
-
|
|
546
|
-
* deletion here and nothing else. */
|
|
542
|
+
* `ATTACHMENTS` carries `sources` / `videos` / `cards` on the record itself.
|
|
543
|
+
* `GUIDE` is the envelope it replaced — the same arrays under `payload` —
|
|
544
|
+
* and stays only until every backend ships `ATTACHMENTS`. */
|
|
545
|
+
ATTACHMENTS: "ATTACHMENTS",
|
|
547
546
|
GUIDE: "GUIDE",
|
|
548
|
-
SOURCES: "SOURCES",
|
|
549
547
|
EXECUTING_TOOL: "EXECUTING_TOOL",
|
|
550
548
|
EXECUTED_TOOL: "EXECUTED_TOOL",
|
|
551
549
|
APPROVAL_REQUEST: "APPROVAL_REQUEST",
|
|
@@ -18243,6 +18241,16 @@ function sourceMetadataEvent(payload) {
|
|
|
18243
18241
|
...refs.length > 0 ? { refs } : {}
|
|
18244
18242
|
};
|
|
18245
18243
|
}
|
|
18244
|
+
function withoutNulls(value) {
|
|
18245
|
+
if (Array.isArray(value)) return value.map(withoutNulls);
|
|
18246
|
+
if (!isRecord(value)) return value;
|
|
18247
|
+
return Object.fromEntries(
|
|
18248
|
+
Object.entries(value).filter(([, field]) => field !== null).map(([key, field]) => [key, withoutNulls(field)])
|
|
18249
|
+
);
|
|
18250
|
+
}
|
|
18251
|
+
function attachmentsEvent(record) {
|
|
18252
|
+
return sourceMetadataEvent(withoutNulls(record));
|
|
18253
|
+
}
|
|
18246
18254
|
function mergeSourceMetadata(previous, event) {
|
|
18247
18255
|
const byIndex = /* @__PURE__ */ new Map();
|
|
18248
18256
|
for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _568 => _568.sources]), () => ( [])), ..._nullishCoalesce(event.sources, () => ( []))]) {
|
|
@@ -21380,13 +21388,14 @@ function decodeNatsChunk(chunk) {
|
|
|
21380
21388
|
return { type: "thinking-delta", text: data.text, ...seq };
|
|
21381
21389
|
}
|
|
21382
21390
|
return null;
|
|
21383
|
-
//
|
|
21384
|
-
//
|
|
21385
|
-
|
|
21386
|
-
|
|
21387
|
-
|
|
21388
|
-
|
|
21389
|
-
|
|
21391
|
+
// The chunk arrives BEFORE or between the answer's text deltas, so the
|
|
21392
|
+
// reducer — not this decoder — owns attaching it to the right turn.
|
|
21393
|
+
case MESSAGE_TYPE.ATTACHMENTS: {
|
|
21394
|
+
const event = attachmentsEvent(data);
|
|
21395
|
+
return event ? { ...event, ...seq } : null;
|
|
21396
|
+
}
|
|
21397
|
+
// The envelope `ATTACHMENTS` replaced (see `MESSAGE_TYPE.GUIDE`).
|
|
21398
|
+
case MESSAGE_TYPE.GUIDE: {
|
|
21390
21399
|
const event = sourceMetadataEvent(data.payload);
|
|
21391
21400
|
return event ? { ...event, ...seq } : null;
|
|
21392
21401
|
}
|
|
@@ -21741,11 +21750,13 @@ function decodeHistoricalMessageData(data) {
|
|
|
21741
21750
|
return { type: "thinking-delta", text: data.text };
|
|
21742
21751
|
}
|
|
21743
21752
|
return null;
|
|
21744
|
-
// Persisted
|
|
21745
|
-
// (`
|
|
21753
|
+
// Persisted attachments, through the SAME decoder the live chunk uses
|
|
21754
|
+
// (`attachmentsEvent`). That shared parse is the whole reason a reloaded
|
|
21746
21755
|
// answer renders identically to the one the reader watched arrive.
|
|
21756
|
+
case MESSAGE_TYPE.ATTACHMENTS:
|
|
21757
|
+
return attachmentsEvent(data);
|
|
21758
|
+
// The envelope `ATTACHMENTS` replaced (see `MESSAGE_TYPE.GUIDE`).
|
|
21747
21759
|
case MESSAGE_TYPE.GUIDE:
|
|
21748
|
-
case MESSAGE_TYPE.SOURCES:
|
|
21749
21760
|
return "payload" in data ? sourceMetadataEvent(data.payload) : null;
|
|
21750
21761
|
// Same completeness gate as the live decoder (`decodeNatsChunk`): a
|
|
21751
21762
|
// persisted row without a question or without options is not a card the
|