@flamingo-stack/openframe-frontend-core 0.0.302 → 0.0.303-snapshot.20260622160827
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-YLD4WH67.js → chunk-2X4HTRQ4.js} +10 -22
- package/dist/chunk-2X4HTRQ4.js.map +1 -0
- package/dist/{chunk-LFXZJZKO.js → chunk-45DC5AJC.js} +2 -2
- package/dist/{chunk-ZDN6OEWV.cjs → chunk-7KTSRZI4.cjs} +483 -549
- package/dist/chunk-7KTSRZI4.cjs.map +1 -0
- package/dist/{chunk-3I7T732P.cjs → chunk-A25ZI7HO.cjs} +12 -12
- package/dist/{chunk-3I7T732P.cjs.map → chunk-A25ZI7HO.cjs.map} +1 -1
- package/dist/{chunk-K4ZENCQE.cjs → chunk-BMNGBMSN.cjs} +26 -26
- package/dist/{chunk-K4ZENCQE.cjs.map → chunk-BMNGBMSN.cjs.map} +1 -1
- package/dist/{chunk-5D76BUKB.js → chunk-DOYOOBP4.js} +2 -2
- package/dist/{chunk-TTHXHSVU.cjs → chunk-FVLEE7YZ.cjs} +23 -35
- package/dist/chunk-FVLEE7YZ.cjs.map +1 -0
- package/dist/{chunk-JHNAQUWK.js → chunk-INZOAK77.js} +2 -2
- package/dist/{chunk-N7XM5HTI.js → chunk-JO6EUJGU.js} +21 -27
- package/dist/chunk-JO6EUJGU.js.map +1 -0
- package/dist/{chunk-LWJYIEPP.cjs → chunk-MZRNARMO.cjs} +37 -37
- package/dist/{chunk-LWJYIEPP.cjs.map → chunk-MZRNARMO.cjs.map} +1 -1
- package/dist/{chunk-BD4YJSRZ.cjs → chunk-O4TIFKDG.cjs} +7 -7
- package/dist/{chunk-BD4YJSRZ.cjs.map → chunk-O4TIFKDG.cjs.map} +1 -1
- package/dist/{chunk-TMLDWPTS.cjs → chunk-RNF2E736.cjs} +11 -10
- package/dist/chunk-RNF2E736.cjs.map +1 -0
- package/dist/{chunk-HLJLLNOB.cjs → chunk-UAJAJFI6.cjs} +44 -50
- package/dist/chunk-UAJAJFI6.cjs.map +1 -0
- package/dist/{chunk-A22ZO5SB.js → chunk-X5N6ANEO.js} +4 -3
- package/dist/{chunk-A22ZO5SB.js.map → chunk-X5N6ANEO.js.map} +1 -1
- package/dist/{chunk-HRDN27UP.js → chunk-Y2D2RJQX.js} +2701 -2767
- package/dist/chunk-Y2D2RJQX.js.map +1 -0
- package/dist/{chunk-IXCQFNF7.js → chunk-YV73VRRY.js} +2 -2
- package/dist/{chunk-RBZCSKFW.cjs → chunk-Z7322A4A.cjs} +5 -5
- package/dist/{chunk-RBZCSKFW.cjs.map → chunk-Z7322A4A.cjs.map} +1 -1
- package/dist/{chunk-ZUALRZHW.js → chunk-ZXIM2DJM.js} +2 -2
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/hooks/use-chat-identity.d.ts +7 -1
- package/dist/components/chat/hooks/use-chat-identity.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-empty-state-config.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-slash-commands.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/doc-viewer.d.ts +3 -4
- package/dist/components/docs/doc-viewer.d.ts.map +1 -1
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/docs/use-docs-resolve-link.d.ts.map +1 -1
- package/dist/components/docs/use-document-tree.d.ts.map +1 -1
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/features/time-tracker/time-tracker-panel.d.ts.map +1 -1
- package/dist/components/index.cjs +172 -178
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +8 -14
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/page-layout.d.ts +1 -10
- package/dist/components/layout/page-layout.d.ts.map +1 -1
- package/dist/components/layout/title-block.d.ts +1 -17
- package/dist/components/layout/title-block.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +23 -23
- package/dist/components/onboarding-guides/index.js +3 -3
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/shared/dev-section/dev-section-page.d.ts +0 -9
- package/dist/components/shared/dev-section/dev-section-page.d.ts.map +1 -1
- package/dist/components/shared/dev-section/dev-section-view.d.ts.map +1 -1
- package/dist/components/shared/dev-section/index.d.ts +1 -1
- package/dist/components/shared/dev-section/index.d.ts.map +1 -1
- package/dist/components/shared/doc-search/use-doc-search.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +60 -60
- package/dist/components/tickets/index.js +3 -3
- package/dist/components/ui/index.cjs +2 -6
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +0 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +1 -5
- package/dist/index.cjs +2 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -5
- package/package.json +1 -1
- package/src/components/chat/embeddable-chat.tsx +25 -3
- package/src/components/chat/hooks/use-chat-identity.ts +13 -2
- package/src/components/chat/hooks/use-empty-state-config.ts +30 -16
- package/src/components/chat/hooks/use-slash-commands.ts +24 -8
- package/src/components/docs/doc-viewer.tsx +25 -22
- package/src/components/docs/use-docs-resolve-link.ts +2 -1
- package/src/components/docs/use-document-tree.ts +3 -2
- package/src/components/features/time-tracker/time-tracker-header-button.tsx +1 -1
- package/src/components/features/time-tracker/time-tracker-panel.tsx +9 -4
- package/src/components/layout/page-layout.tsx +28 -14
- package/src/components/layout/title-block.tsx +86 -40
- package/src/components/shared/dev-section/dev-section-page.tsx +1 -9
- package/src/components/shared/dev-section/dev-section-view.tsx +9 -14
- package/src/components/shared/dev-section/index.ts +1 -1
- package/src/components/shared/doc-search/use-doc-search.ts +2 -1
- package/src/components/ui/index.ts +0 -1
- package/dist/chunk-HLJLLNOB.cjs.map +0 -1
- package/dist/chunk-HRDN27UP.js.map +0 -1
- package/dist/chunk-N7XM5HTI.js.map +0 -1
- package/dist/chunk-TMLDWPTS.cjs.map +0 -1
- package/dist/chunk-TTHXHSVU.cjs.map +0 -1
- package/dist/chunk-YLD4WH67.js.map +0 -1
- package/dist/chunk-ZDN6OEWV.cjs.map +0 -1
- package/dist/components/layout/page-header.d.ts +0 -78
- package/dist/components/layout/page-header.d.ts.map +0 -1
- package/dist/components/layout/page-with-header.d.ts +0 -67
- package/dist/components/layout/page-with-header.d.ts.map +0 -1
- package/src/components/layout/page-header.tsx +0 -182
- package/src/components/layout/page-with-header.tsx +0 -110
- /package/dist/{chunk-LFXZJZKO.js.map → chunk-45DC5AJC.js.map} +0 -0
- /package/dist/{chunk-5D76BUKB.js.map → chunk-DOYOOBP4.js.map} +0 -0
- /package/dist/{chunk-JHNAQUWK.js.map → chunk-INZOAK77.js.map} +0 -0
- /package/dist/{chunk-IXCQFNF7.js.map → chunk-YV73VRRY.js.map} +0 -0
- /package/dist/{chunk-ZUALRZHW.js.map → chunk-ZXIM2DJM.js.map} +0 -0
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk7KTSRZI4cjs = require('./chunk-7KTSRZI4.cjs');
|
|
10
|
+
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
var _chunkG56GYN7Zcjs = require('./chunk-G56GYN7Z.cjs');
|
|
@@ -33,7 +34,7 @@ function DocSearchResultRow({
|
|
|
33
34
|
}) {
|
|
34
35
|
const docType = _optionalChain([result, 'access', _ => _.metadata, 'optionalAccess', _2 => _2.documentType]) || void 0;
|
|
35
36
|
const sourceRepo = _optionalChain([result, 'access', _3 => _3.metadata, 'optionalAccess', _4 => _4.sourceRepo]) || void 0;
|
|
36
|
-
const { Icon: SourceIcon, label: iconLabel } =
|
|
37
|
+
const { Icon: SourceIcon, label: iconLabel } = _chunk7KTSRZI4cjs.resolveSourceIcon.call(void 0, {
|
|
37
38
|
sourceRepo,
|
|
38
39
|
documentType: docType
|
|
39
40
|
});
|
|
@@ -76,7 +77,7 @@ function DocSearchBar({
|
|
|
76
77
|
renderResult
|
|
77
78
|
}) {
|
|
78
79
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
79
|
-
|
|
80
|
+
_chunk7KTSRZI4cjs.SearchInput,
|
|
80
81
|
{
|
|
81
82
|
placeholder,
|
|
82
83
|
value: query,
|
|
@@ -185,7 +186,7 @@ function resolveSearchResultAction(result, source, runtimeMode) {
|
|
|
185
186
|
const externalUrl = meta.externalUrl;
|
|
186
187
|
if (externalUrl) {
|
|
187
188
|
const targetPlatform = meta.targetPlatform;
|
|
188
|
-
const isNewTab =
|
|
189
|
+
const isNewTab = _chunk7KTSRZI4cjs.decideNewTab.call(void 0, {
|
|
189
190
|
href: externalUrl,
|
|
190
191
|
targetPlatform,
|
|
191
192
|
surface: "useUnifiedNav",
|
|
@@ -247,7 +248,7 @@ function useDocSearch(config) {
|
|
|
247
248
|
limit: "10"
|
|
248
249
|
});
|
|
249
250
|
if (tableIdsKey) params.set("tableIds", tableIdsKey);
|
|
250
|
-
const response = await
|
|
251
|
+
const response = await _chunkG56GYN7Zcjs.contentFetch.call(void 0, `${resolvedSearchEndpoint}?${params.toString()}`);
|
|
251
252
|
if (!response.ok) {
|
|
252
253
|
throw new Error(`Search request failed: ${response.status}`);
|
|
253
254
|
}
|
|
@@ -287,7 +288,7 @@ function useDocSearch(config) {
|
|
|
287
288
|
if (_optionalChain([runtime, 'optionalAccess', _14 => _14.navigation, 'access', _15 => _15.mode]) === "embed") {
|
|
288
289
|
setKeepOpen(true);
|
|
289
290
|
const targetPlatform = _nullishCoalesce(_optionalChain([result, 'access', _16 => _16.metadata, 'optionalAccess', _17 => _17.targetPlatform]), () => ( null));
|
|
290
|
-
|
|
291
|
+
_chunk7KTSRZI4cjs.resolveExternalNavigation.call(void 0, {
|
|
291
292
|
href: action.href,
|
|
292
293
|
targetPlatform,
|
|
293
294
|
runtime
|
|
@@ -296,18 +297,18 @@ function useDocSearch(config) {
|
|
|
296
297
|
}
|
|
297
298
|
if (wantsNewTab) {
|
|
298
299
|
setKeepOpen(true);
|
|
299
|
-
window.open(action.href, "_blank",
|
|
300
|
+
window.open(action.href, "_blank", _chunk7KTSRZI4cjs.NEW_TAB_FEATURES);
|
|
300
301
|
return;
|
|
301
302
|
}
|
|
302
303
|
setKeepOpen(false);
|
|
303
304
|
const path = baseRoute && action.href.startsWith(`${baseRoute}/`) ? action.href.slice(baseRoute.length + 1) : null;
|
|
304
305
|
if (path && _optionalChain([onInPageSwap, 'optionalCall', _18 => _18(path)])) return;
|
|
305
|
-
router.push(
|
|
306
|
+
router.push(_chunk7KTSRZI4cjs.stripSameOriginToPath.call(void 0, action.href));
|
|
306
307
|
return;
|
|
307
308
|
}
|
|
308
309
|
case "navigate-new-tab":
|
|
309
310
|
setKeepOpen(true);
|
|
310
|
-
window.open(action.href, "_blank",
|
|
311
|
+
window.open(action.href, "_blank", _chunk7KTSRZI4cjs.NEW_TAB_FEATURES);
|
|
311
312
|
return;
|
|
312
313
|
case "ask-ai":
|
|
313
314
|
setKeepOpen(false);
|
|
@@ -346,4 +347,4 @@ function useDocSearch(config) {
|
|
|
346
347
|
|
|
347
348
|
|
|
348
349
|
exports.formatRelativePath = formatRelativePath; exports.DocSearchResultRow = DocSearchResultRow; exports.DocSearchBar = DocSearchBar; exports.mapDocSearchResults = mapDocSearchResults; exports.resolveSearchResultAction = resolveSearchResultAction; exports.useDocSearch = useDocSearch;
|
|
349
|
-
//# sourceMappingURL=chunk-
|
|
350
|
+
//# sourceMappingURL=chunk-RNF2E736.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-RNF2E736.cjs","../src/components/shared/doc-search/format-relative-path.ts","../src/components/shared/doc-search/doc-search-result-row.tsx","../src/components/shared/doc-search/doc-search-bar.tsx","../src/components/shared/doc-search/map-doc-search-results.ts","../src/components/shared/doc-search/resolve-search-result-action.ts","../src/components/shared/doc-search/use-doc-search.ts"],"names":["jsx"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACZO,SAAS,kBAAA,CAAmB,QAAA,EAA0B;AAC3D,EAAA,GAAA,CAAI,CAAC,QAAA,EAAU,OAAO,EAAA;AACtB,EAAA,MAAM,SAAA,EAAW,QAAA,CAAS,OAAA,CAAQ,OAAA,EAAS,EAAE,CAAA,CAAE,KAAA,CAAM,GAAG,CAAA;AAExD,EAAA,MAAM,eAAA,EAAiB,QAAA,CAAS,OAAA,EAAS,EAAA,EAAI,QAAA,CAAS,KAAA,CAAM,CAAA,EAAG,CAAA,CAAE,EAAA,EAAI,QAAA;AACrE,EAAA,OAAO,cAAA,CACJ,GAAA,CAAI,CAAC,GAAA,EAAA,GAAQ,GAAA,CAAI,MAAA,CAAO,CAAC,CAAA,CAAE,WAAA,CAAY,EAAA,EAAI,GAAA,CAAI,KAAA,CAAM,CAAC,CAAA,CAAE,OAAA,CAAQ,IAAA,EAAM,GAAG,CAAC,CAAA,CAC1E,IAAA,CAAK,KAAK,CAAA;AACf;ADWA;AACA;AE0BQ,+CAAA;AAlBD,SAAS,kBAAA,CAAmB;AAAA,EACjC,MAAA;AAAA,EACA;AACF,CAAA,EAA4B;AAC1B,EAAA,MAAM,QAAA,kBAAW,MAAA,mBAAO,QAAA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Ia,UAAA;AACmC,UAAA;AACnD,UAAA;AACG,QAAA;AAMc,UAAA;AACV,UAAA;AAC4D,YAAA;AACnE,UAAA;AACA,UAAA;AACG,QAAA;AAGc,UAAA;AACK,UAAA;AACtB,UAAA;AACG,QAAA;AACH,UAAA;AACJ,MAAA;AACF,IAAA;AAC6D,IAAA;AAC/D,EAAA;AAGgB,EAAA;AACG,IAAA;AACT,EAAA;AAEH,EAAA;AACL,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACkB,IAAA;AACpB,EAAA;AACF;ANyE2H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-RNF2E736.cjs","sourcesContent":[null,"/**\n * Format a full document path as a breadcrumb trail.\n * Shows parent folders only (excludes the last segment / filename).\n *\n * @example\n * formatRelativePath('openframe-oss-tenant/architecture/api-controllers.md')\n * // → 'Openframe oss tenant / Architecture'\n */\nexport function formatRelativePath(fullPath: string): string {\n if (!fullPath) return ''\n const segments = fullPath.replace(/\\.md$/, '').split('/')\n // Show only parent path (exclude the filename itself since the title already shows it)\n const parentSegments = segments.length > 1 ? segments.slice(0, -1) : segments\n return parentSegments\n .map((seg) => seg.charAt(0).toUpperCase() + seg.slice(1).replace(/-/g, ' '))\n .join(' / ')\n}\n","'use client'\n\n/**\n * Single row in the `<SearchInput>` dropdown — the standard layout\n * used by every doc-search-backed surface (company-hub data-room\n * search bar, onboarding-guide catalog search, …). Single source of\n * truth for the row appearance so search dropdowns are visually\n * identical everywhere.\n *\n * Resolves the source icon via the same `resolveSourceIcon()`\n * registry the inline chat-card refs use, so a row pointing at e.g.\n * an onboarding-guide surfaces the SAME `<GraduationCap>` glyph the\n * chat card surfaces — no cross-surface drift.\n */\n\nimport { resolveSourceIcon } from '../../chat/utils/source-row-cta'\nimport { formatRelativePath } from './format-relative-path'\n\n/**\n * Minimal result shape this row renders. Compatible with any\n * doc-search hook whose result type exposes `{ title?, path?,\n * metadata? }`. The two hub consumers (onboarding-guide catalog,\n * data-room sidebar) both satisfy this shape via their\n * `useDocSearch` hook result.\n */\nexport interface DocSearchResultRowEntry {\n title?: string\n path?: string\n metadata?: Record<string, unknown>\n}\n\nexport interface DocSearchResultRowProps {\n result: DocSearchResultRowEntry\n isHighlighted: boolean\n}\n\nexport function DocSearchResultRow({\n result,\n isHighlighted,\n}: DocSearchResultRowProps) {\n const docType = (result.metadata?.documentType as string) || undefined\n const sourceRepo = (result.metadata?.sourceRepo as string) || undefined\n const { Icon: SourceIcon, label: iconLabel } = resolveSourceIcon({\n sourceRepo,\n documentType: docType,\n })\n const isGroup = result.metadata?.isGroup as boolean | undefined\n\n return (\n <div className=\"flex items-center gap-3 w-full min-w-0\">\n <span\n className=\"flex-shrink-0 text-ods-text-secondary\"\n title={iconLabel}\n >\n <SourceIcon className=\"size-4\" />\n </span>\n <div className=\"min-w-0 flex-1\">\n <div\n className={`text-sm font-medium leading-5 truncate ${\n isHighlighted ? 'text-ods-accent' : 'text-ods-text-primary'\n }`}\n >\n {result.title || result.path}\n </div>\n {!isGroup && result.path?.includes('/') && (\n <div className=\"text-xs leading-4 text-ods-text-secondary truncate mt-0.5\">\n {formatRelativePath(result.path)}\n </div>\n )}\n </div>\n </div>\n )\n}\n","'use client'\n\n/**\n * `<DocSearchBar>` — the canonical RAG-search dropdown surface.\n *\n * Mounted by every doc-search consumer (data-room sidebar, onboarding-\n * guide catalog, and any future surface that needs typeahead against\n * `/api/docs/search`). Wraps `<SearchInput>` with the lib's standard\n * `<DocSearchResultRow>` so the dropdown looks identical everywhere.\n *\n * ## Why a presentation component, not a \"search bar that owns its\n * own hook\"\n *\n * The data-fetching hook (`useDocSearch`) lives hub-side because it\n * depends on hub-only context (`useDocNavigation`, the rag-table-\n * config registry, the hub's `decideNewTab` helper). Moving the hook\n * would cascade ~5 more file migrations into the lib.\n *\n * Instead, the hook stays hub-side and callers pass its result into\n * this component as plain props. Both consumers shrink to ~5 lines.\n */\n\nimport type { ReactNode } from 'react'\nimport { SearchInput, type SearchResult } from '../../ui/search-input'\nimport { DocSearchResultRow } from './doc-search-result-row'\n\nexport interface DocSearchBarProps {\n placeholder: string\n query: string\n onQueryChange: (value: string) => void\n /** Hook-fetched results. Reuses the lib's `<SearchInput>` `SearchResult`\n * shape directly so callers don't translate. */\n results: SearchResult[]\n isLoading: boolean\n /** Result selection handler. Mirrors `<SearchInput>` — the second\n * `modifiers` argument is preserved so cmd-click / shift-click on\n * a result row still forces new-tab behavior. Hub `useDocSearch`\n * reads these to short-circuit to `window.open()`. */\n onResultSelect: (\n result: SearchResult,\n modifiers?: {\n metaKey?: boolean\n ctrlKey?: boolean\n shiftKey?: boolean\n altKey?: boolean\n button?: number\n },\n ) => void\n /** Lets the caller's hook force the dropdown open after a recent\n * internal action (e.g. result navigation). `undefined` falls back\n * to `<SearchInput>`'s built-in focus/hover heuristics. */\n showDropdown?: boolean\n /** Defaults to 2 — matches the existing data-room and onboarding-\n * guide consumers. Override only if a surface needs different\n * typeahead semantics. */\n minQueryLength?: number\n /** Defaults to 0 — both existing consumers debounce inside the\n * hook, not the input. */\n debounceMs?: number\n className?: string\n /** Optional row-renderer override. Defaults to the lib's standard\n * `<DocSearchResultRow>` (source icon + title + path breadcrumb).\n * Override only when a surface needs custom row chrome. */\n renderResult?: (result: SearchResult, isHighlighted: boolean) => ReactNode\n}\n\nexport function DocSearchBar({\n placeholder,\n query,\n onQueryChange,\n results,\n isLoading,\n onResultSelect,\n showDropdown,\n minQueryLength = 2,\n debounceMs = 0,\n className = 'w-full',\n renderResult,\n}: DocSearchBarProps) {\n return (\n <SearchInput\n placeholder={placeholder}\n value={query}\n onChange={onQueryChange}\n results={results}\n isLoading={isLoading}\n onResultSelect={onResultSelect}\n showDropdown={showDropdown || undefined}\n debounceMs={debounceMs}\n minQueryLength={minQueryLength}\n className={className}\n renderResult={\n renderResult ??\n ((result, isHighlighted) => (\n <DocSearchResultRow result={result} isHighlighted={isHighlighted} />\n ))\n }\n />\n )\n}\n","/**\n * Map RAG `/api/docs/search` wire results into the `<DocSearchBar>`\n * dropdown's row shape, collapsing entity-table rows into grouped\n * results so the dropdown lists ONE \"Cap Table (12 records)\" row\n * instead of 12 individual rows.\n *\n * Pure transform — no telemetry, no navigation, no React deps. Lifted\n * from the hub's `hooks/use-docs.ts:mapDocSearchResults` (the hub's\n * `traceCompose` call was hub-only telemetry and is intentionally\n * dropped — callers that want logging can wrap this helper).\n */\n\nimport type { SearchResult } from '../../ui/search-input'\nimport type { DocSearchResult } from './types'\n\n/** Source repos that should be collapsed into grouped results in the search bar.\n * Only financial tables (all rows link to the same admin page).\n * Content tables (blog, webinar, podcast, etc.) stay individual since each has a unique URL. */\nconst SEARCH_GROUP_REPOS = new Set([\n 'financial-cap-table',\n 'financial-kpis',\n 'financial-pnl',\n 'financial-balance-sheet',\n 'financial-cash-flow',\n])\n\nconst ENTITY_LABELS: Record<string, string> = {\n 'financial-cap-table': 'Cap Table',\n 'financial-kpis': 'Financial KPIs',\n 'financial-pnl': 'Profit & Loss',\n 'financial-balance-sheet': 'Balance Sheets',\n 'financial-cash-flow': 'Cash Flow',\n 'blog-posts': 'Blog Posts',\n 'product-releases': 'Product Releases',\n 'case-studies': 'Case Studies',\n webinars: 'Webinars',\n events: 'Events',\n podcasts: 'Podcasts',\n}\n\nexport function mapDocSearchResults(docs: DocSearchResult[]): SearchResult[] {\n const entityGroups = new Map<string, DocSearchResult[]>()\n // Track insertion order — groups appear where the FIRST row of that\n // repo appeared in the response.\n const order: Array<\n { type: 'entity'; repo: string } | { type: 'doc'; doc: DocSearchResult }\n > = []\n const seenRepos = new Set<string>()\n\n for (const doc of docs) {\n if (doc.sourceRepo && SEARCH_GROUP_REPOS.has(doc.sourceRepo)) {\n const group = entityGroups.get(doc.sourceRepo) || []\n group.push(doc)\n entityGroups.set(doc.sourceRepo, group)\n if (!seenRepos.has(doc.sourceRepo)) {\n seenRepos.add(doc.sourceRepo)\n order.push({ type: 'entity', repo: doc.sourceRepo })\n }\n } else {\n order.push({ type: 'doc', doc })\n }\n }\n\n const results: SearchResult[] = []\n for (const entry of order) {\n if (entry.type === 'entity') {\n const rows = entityGroups.get(entry.repo)!\n const label = ENTITY_LABELS[entry.repo] || entry.repo\n results.push({\n id: `group-${entry.repo}`,\n title: `${label} (${rows.length} ${rows.length === 1 ? 'record' : 'records'})`,\n path: rows[0].path,\n type: 'file',\n metadata: {\n documentType: rows[0].documentType,\n externalUrl: rows[0].externalUrl,\n sourceRepo: entry.repo,\n id: rows[0].entityId,\n isGroup: true,\n items: rows.map((r) => ({\n name: r.name,\n externalUrl: r.externalUrl,\n id: r.entityId,\n sourceRepo: r.sourceRepo,\n documentType: r.documentType,\n })),\n },\n })\n } else {\n const doc = entry.doc\n const isNonMarkdown = doc.documentType && doc.documentType !== 'markdown'\n results.push({\n id: doc.path,\n title: doc.name,\n description: isNonMarkdown ? doc.name : doc.snippet,\n path: doc.path,\n type: doc.type,\n metadata: {\n matchType: doc.matchType,\n ...(doc.documentType ? { documentType: doc.documentType } : {}),\n ...(doc.externalUrl ? { externalUrl: doc.externalUrl } : {}),\n ...(doc.targetPlatform != null\n ? { targetPlatform: doc.targetPlatform }\n : {}),\n ...(doc.sourceRepo ? { sourceRepo: doc.sourceRepo } : {}),\n ...(doc.entityId ? { id: doc.entityId } : {}),\n },\n })\n }\n }\n\n return results\n}\n","/**\n * Resolve what should happen when the user picks a search result.\n * Returns one of five typed actions so the caller is a single switch.\n *\n * Resolution order:\n * 1. `externalUrl` present → use `decideNewTab` to choose same-tab vs\n * new-tab against the row's `targetPlatform`.\n * 2. Row has `id` + `sourceRepo` + `documentType` → synth an Ask-AI\n * action (entity drill-in via primary key, no URL).\n * 3. Row has only `path` → legacy navigation fallback.\n * 4. Nothing actionable → noop.\n *\n * Lifted from the hub's `hooks/use-docs.ts:resolveSearchResultAction`.\n * Pure — no React, no telemetry.\n */\n\nimport type { SearchResult } from '../../ui/search-input'\nimport type { ChatRef } from '../../chat/chat-ref.types'\nimport { decideNewTab } from '../../chat/utils/decide-new-tab'\n\nexport type SearchResultAction =\n | { kind: 'navigate-same-tab'; href: string }\n | { kind: 'navigate-new-tab'; href: string }\n | { kind: 'ask-ai'; detail: { source: string; ref: ChatRef } }\n | { kind: 'route'; path: string }\n | { kind: 'noop' }\n\nexport function resolveSearchResultAction(\n result: SearchResult,\n source: string,\n runtimeMode?: 'host' | 'embed',\n): SearchResultAction {\n const meta = result.metadata ?? {}\n const externalUrl = meta.externalUrl as string | undefined\n if (externalUrl) {\n // Same pure helper `useNavLink` and `useUnifiedNav` call — single\n // decision rule across cards, chips, and autocomplete rows. Thread\n // the caller's `source` as `currentSource` so the platform-vs-\n // platform comparison matches the hub's pre-migration behavior.\n const targetPlatform = meta.targetPlatform as string | null | undefined\n const isNewTab = decideNewTab({\n href: externalUrl,\n targetPlatform,\n surface: 'useUnifiedNav',\n runtimeMode,\n currentSource: source,\n })\n return isNewTab\n ? { kind: 'navigate-new-tab', href: externalUrl }\n : { kind: 'navigate-same-tab', href: externalUrl }\n }\n const rowId = meta.id as string | undefined\n const sourceRepo = meta.sourceRepo as string | undefined\n const documentType = meta.documentType as string | undefined\n if (rowId && sourceRepo && documentType) {\n return {\n kind: 'ask-ai',\n detail: {\n source,\n ref: { type: documentType, id: rowId, title: result.title, url: null },\n },\n }\n }\n if (result.path) {\n return { kind: 'route', path: result.path }\n }\n return { kind: 'noop' }\n}\n","'use client'\n\n/**\n * `useDocSearch` — debounced RAG-search hook against `/api/docs/search`.\n *\n * Pure fetch + navigation glue. Embedders can mount this directly\n * (any host with a reverse-proxy that exposes `/api/docs/search` will\n * work). Hub callers wire it into the lib `<DocSearchBar>` for the\n * canonical typeahead dropdown.\n *\n * ## What moved from hub to lib\n *\n * Lifted from `multi-platform-hub/hooks/use-docs.ts:useDocSearch`. Two\n * hub-only concerns are now optional injection points instead of\n * direct imports:\n *\n * - `useDocNavigation()` (hub's in-page doc-tree swap) → optional\n * `onInPageSwap?: (path: string) => boolean` config callback. When\n * present and returns true, the hook treats a same-origin result\n * click as \"handled in-page\"; when absent or returns false, the\n * hook falls back to `onNavigate(path)` (`router.push` on hub,\n * `window.location.assign` on bare embedders).\n * - `traceCompose` (hub-only telemetry) → dropped. The lib has no\n * equivalent runtime-context yet; bring it back when there is one.\n *\n * Everything else (debounce, `useChatRuntime` for embed-mode short-\n * circuit, embed-shim router, the action-resolver + result-mapper) is\n * now lib-resident.\n */\n\nimport { useState, useEffect, useCallback } from 'react'\nimport { useRouter } from '../../../embed-shims'\nimport { useDebounce } from '../../../hooks/ui/use-debounce'\nimport { useChatRuntime } from '../../../contexts/chat-runtime-context'\nimport { contentFetch } from '../../../utils/embed-content-fetch'\nimport type { SearchResult } from '../../ui/search-input'\nimport {\n resolveExternalNavigation,\n stripSameOriginToPath,\n NEW_TAB_FEATURES,\n} from '../../chat/utils/chat-nav-resolution'\nimport type { DocSearchResult } from './types'\nimport { mapDocSearchResults } from './map-doc-search-results'\nimport { resolveSearchResultAction } from './resolve-search-result-action'\n\nexport interface UseDocSearchConfig {\n /** Discriminator passed to `/api/docs/search?source=` (e.g.\n * `'openframe'`). Embedders set it to whatever discriminator their\n * reverse-proxy expects. */\n source: string\n /** Base route prefix this search lives under (e.g. `'/onboarding-guides'`).\n * When a result's href starts with `${baseRoute}/`, the hook\n * attempts the optional in-page swap path before falling through\n * to a full nav. */\n baseRoute: string\n /** Imperative navigation fallback. Called when no override\n * (in-page swap, new-tab) applies. Hub callers pass\n * `(path) => router.push(path)`; embedders pass an equivalent. */\n onNavigate: (path: string) => void\n /** Optional `RagTableConfig.id` list to narrow the search to specific\n * tables (e.g. `['onboarding-guides']`). Forwarded to\n * `/api/docs/search?tableIds=…` which intersects with the source's\n * standing set. */\n tableIds?: string[]\n /** Optional in-page swap callback. When the result's href is under\n * `baseRoute` AND this callback returns true, the hook treats the\n * click as handled in-page (no router push). Hub's\n * `<DocumentationSection>` wires this to\n * `useDocNavigation().navigate(path)`. */\n onInPageSwap?: (path: string) => boolean\n /** Optional endpoint override. Defaults to `'/api/docs/search'`\n * (the hub's reverse-proxy route). Embedders with a different\n * path can override. */\n searchEndpoint?: string\n}\n\nexport function useDocSearch(config: UseDocSearchConfig) {\n const {\n source,\n baseRoute,\n onNavigate,\n tableIds,\n onInPageSwap,\n searchEndpoint,\n } = config\n const tableIdsKey = tableIds && tableIds.length > 0 ? tableIds.join(',') : ''\n\n const router = useRouter()\n // Optional chat-runtime read — when present and mode='embed' the\n // search-result row click short-circuits to a new-tab open against\n // the absolutized URL. Null/host preserves today's behavior.\n // Also used as the proxy-prefix fallback for `searchEndpoint`, matching\n // how tickets resolves `findTicketUrl`.\n const runtime = useChatRuntime()\n const resolvedSearchEndpoint =\n searchEndpoint ?? runtime?.endpoints.docsSearchUrl ?? '/api/docs/search'\n\n const [query, setQuery] = useState('')\n const [results, setResults] = useState<SearchResult[]>([])\n const [isFetching, setIsFetching] = useState(false)\n const debouncedQuery = useDebounce(query, 300)\n\n useEffect(() => {\n if (!debouncedQuery || debouncedQuery.trim().length < 2) {\n setResults([])\n setIsFetching(false)\n return\n }\n\n let cancelled = false\n\n async function fetchResults() {\n setIsFetching(true)\n try {\n const params = new URLSearchParams({\n q: debouncedQuery,\n source,\n limit: '10',\n })\n if (tableIdsKey) params.set('tableIds', tableIdsKey)\n\n const response = await contentFetch(`${resolvedSearchEndpoint}?${params.toString()}`)\n if (!response.ok) {\n throw new Error(`Search request failed: ${response.status}`)\n }\n\n const json = await response.json()\n\n if (!cancelled && json.success && Array.isArray(json.data)) {\n const mapped = mapDocSearchResults(json.data as DocSearchResult[])\n setResults(mapped)\n }\n } catch (error) {\n console.error('Doc search error:', error)\n if (!cancelled) {\n setResults([])\n }\n } finally {\n if (!cancelled) {\n setIsFetching(false)\n }\n }\n }\n\n fetchResults()\n\n return () => {\n cancelled = true\n }\n }, [debouncedQuery, source, tableIdsKey, resolvedSearchEndpoint])\n\n // Derived loading state — single source of truth for \"should the\n // dropdown show 'Loading...' instead of 'No results found'\":\n const isLoading =\n query.trim().length >= 2 && (query !== debouncedQuery || isFetching)\n\n // Track whether dropdown should stay open (external link opened in new tab).\n const [keepOpen, setKeepOpen] = useState(false)\n\n const handleResultSelect = useCallback(\n (\n result: SearchResult,\n modifiers?: {\n metaKey?: boolean\n ctrlKey?: boolean\n shiftKey?: boolean\n altKey?: boolean\n button?: number\n },\n ) => {\n const action = resolveSearchResultAction(\n result,\n source,\n runtime?.navigation.mode,\n )\n // Modifier / non-primary mouse click → force new tab regardless of\n // same-tab/new-tab decision. The dropdown row is a `<div>`, not an\n // `<a target=\"_blank\">`, so the browser doesn't background-tab\n // natively on cmd-click. Honor it explicitly here for parity with\n // the anchor-based surfaces (cards, chips, related-content). Plain\n // Enter from the keyboard passes `modifiers === undefined`.\n const wantsNewTab =\n modifiers &&\n (modifiers.metaKey ||\n modifiers.ctrlKey ||\n modifiers.shiftKey ||\n modifiers.altKey ||\n (typeof modifiers.button === 'number' && modifiers.button !== 0))\n switch (action.kind) {\n case 'navigate-same-tab': {\n // Embed-mode short-circuit — autocomplete row clicked while\n // the chat panel is hosted inside an embedding app.\n if (runtime?.navigation.mode === 'embed') {\n setKeepOpen(true)\n const targetPlatform =\n (result.metadata?.targetPlatform as string | null | undefined) ?? null\n resolveExternalNavigation({\n href: action.href,\n targetPlatform,\n runtime,\n }).open()\n return\n }\n if (wantsNewTab) {\n setKeepOpen(true)\n window.open(action.href, '_blank', NEW_TAB_FEATURES)\n return\n }\n // Same-origin click:\n // 1. If the href is under the current doc-tree's baseRoute AND\n // an `onInPageSwap` callback is wired AND returns true →\n // consider in-page swap handled.\n // 2. Otherwise → embed-shim `router.push()` (soft RSC nav on\n // Next.js hosts, window.location.assign on bare hosts).\n setKeepOpen(false)\n const path =\n baseRoute && action.href.startsWith(`${baseRoute}/`)\n ? action.href.slice(baseRoute.length + 1)\n : null\n if (path && onInPageSwap?.(path)) return\n router.push(stripSameOriginToPath(action.href))\n return\n }\n case 'navigate-new-tab':\n // Cross-origin (e.g. clicking a flamingo.run release from\n // product-hub) — open in a new tab. Keep dropdown open so the\n // user can pick another result without re-searching.\n setKeepOpen(true)\n window.open(action.href, '_blank', NEW_TAB_FEATURES)\n return\n case 'ask-ai':\n // Row is searchable-but-not-openable (cap_table positions,\n // financial-kpi snapshots, anything backed by\n // `resolveUrl: () => null`). Dispatch a CustomEvent that\n // GlobalAskAI listens for — opens chat + drills via\n // `entityIdFilter` (primary-key only, same as inline-card Ask).\n setKeepOpen(false)\n window.dispatchEvent(\n new CustomEvent('ask-ai:open-with-ref', { detail: action.detail }),\n )\n return\n case 'route':\n // Final fallback: legacy navigation by path. Hits when a row\n // has neither URL nor pk metadata — a mapper/API regression.\n setKeepOpen(false)\n onNavigate(action.path)\n return\n case 'noop':\n return\n }\n },\n [onNavigate, source, baseRoute, router, onInPageSwap, runtime],\n )\n\n // Reset keepOpen when query changes.\n useEffect(() => {\n setKeepOpen(false)\n }, [query])\n\n return {\n query,\n setQuery,\n results,\n isLoading,\n handleResultSelect,\n keepDropdownOpen: keepOpen,\n }\n}\n"]}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkO4TIFKDGcjs = require('./chunk-O4TIFKDG.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkRNF2E736cjs = require('./chunk-RNF2E736.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -19,8 +19,8 @@ var _chunkTMLDWPTScjs = require('./chunk-TMLDWPTS.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
+
var _chunk7KTSRZI4cjs = require('./chunk-7KTSRZI4.cjs');
|
|
22
23
|
|
|
23
|
-
var _chunkZDN6OEWVcjs = require('./chunk-ZDN6OEWV.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -1050,8 +1050,8 @@ function scrollToContent() {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
function useDocumentTree(config, initialPath) {
|
|
1052
1052
|
const { structureEndpoint, contentEndpoint, baseRoute } = config;
|
|
1053
|
-
const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => (
|
|
1054
|
-
const cleanInitialPath =
|
|
1053
|
+
const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => ( _chunk7KTSRZI4cjs.DEFAULT_FOLDER_INDEX_FILE));
|
|
1054
|
+
const cleanInitialPath = _chunk7KTSRZI4cjs.stripFolderIndexFromPath.call(void 0,
|
|
1055
1055
|
_optionalChain([initialPath, 'optionalAccess', _2 => _2.replace, 'call', _3 => _3(/\/$/, "")]) || "",
|
|
1056
1056
|
folderIndexFile
|
|
1057
1057
|
);
|
|
@@ -1077,12 +1077,12 @@ function useDocumentTree(config, initialPath) {
|
|
|
1077
1077
|
} else if (pathname.startsWith(`${normalizedBaseRoute}/`)) {
|
|
1078
1078
|
pathFromUrl = pathname.substring(`${normalizedBaseRoute}/`.length);
|
|
1079
1079
|
}
|
|
1080
|
-
pathFromUrl =
|
|
1080
|
+
pathFromUrl = _chunk7KTSRZI4cjs.stripFolderIndexFromPath.call(void 0, pathFromUrl, folderIndexFile);
|
|
1081
1081
|
if (pathFromUrl !== selectedPathRef.current) {
|
|
1082
1082
|
setSelectedPath(pathFromUrl);
|
|
1083
1083
|
if (pathFromUrl) {
|
|
1084
1084
|
const parentPath = pathFromUrl.includes("/") ? pathFromUrl.substring(0, pathFromUrl.lastIndexOf("/")) : pathFromUrl;
|
|
1085
|
-
setExpandedNodes(new Set(
|
|
1085
|
+
setExpandedNodes(new Set(_chunk7KTSRZI4cjs.getDocAncestorNodeIds.call(void 0, parentPath)));
|
|
1086
1086
|
}
|
|
1087
1087
|
setTimeout(() => {
|
|
1088
1088
|
scrollToContent();
|
|
@@ -1097,7 +1097,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
1097
1097
|
setSelectedPath(cleanInitialPath);
|
|
1098
1098
|
if (cleanInitialPath) {
|
|
1099
1099
|
const parentPath = cleanInitialPath.includes("/") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
|
|
1100
|
-
setExpandedNodes(new Set(
|
|
1100
|
+
setExpandedNodes(new Set(_chunk7KTSRZI4cjs.getDocAncestorNodeIds.call(void 0, parentPath)));
|
|
1101
1101
|
}
|
|
1102
1102
|
setTimeout(scrollToContent, 150);
|
|
1103
1103
|
}, [cleanInitialPath]);
|
|
@@ -1117,7 +1117,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
1117
1117
|
if (selectedPath === "") {
|
|
1118
1118
|
pathToFetch = folderIndexFile;
|
|
1119
1119
|
} else {
|
|
1120
|
-
const node =
|
|
1120
|
+
const node = _chunk7KTSRZI4cjs.findDocNodeByPath.call(void 0, selectedPath, structure);
|
|
1121
1121
|
if (node && node.type === "folder" && !node.hasReadme) {
|
|
1122
1122
|
return;
|
|
1123
1123
|
}
|
|
@@ -1138,7 +1138,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
1138
1138
|
try {
|
|
1139
1139
|
setIsLoadingStructure(true);
|
|
1140
1140
|
setError(null);
|
|
1141
|
-
const response = await
|
|
1141
|
+
const response = await _chunkG56GYN7Zcjs.contentFetch.call(void 0, structureEndpoint);
|
|
1142
1142
|
if (!response.ok) {
|
|
1143
1143
|
throw new Error("Failed to load documentation structure");
|
|
1144
1144
|
}
|
|
@@ -1148,7 +1148,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
1148
1148
|
if (cleanInitialPath) {
|
|
1149
1149
|
const pathForExpansion = cleanInitialPath.includes(".") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
|
|
1150
1150
|
if (pathForExpansion) {
|
|
1151
|
-
setExpandedNodes(new Set(
|
|
1151
|
+
setExpandedNodes(new Set(_chunk7KTSRZI4cjs.getDocAncestorNodeIds.call(void 0, pathForExpansion)));
|
|
1152
1152
|
}
|
|
1153
1153
|
} else if (result.data.length > 0) {
|
|
1154
1154
|
const hasRootReadme = result.data.some(
|
|
@@ -1178,7 +1178,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
1178
1178
|
const fetchContent = async (path) => {
|
|
1179
1179
|
try {
|
|
1180
1180
|
setIsLoadingContent(true);
|
|
1181
|
-
const response = await
|
|
1181
|
+
const response = await _chunkG56GYN7Zcjs.contentFetch.call(void 0, `${contentEndpoint}?path=${encodeURIComponent(path)}`);
|
|
1182
1182
|
if (path !== lastFetchedPath.current) return;
|
|
1183
1183
|
if (!response.ok) {
|
|
1184
1184
|
if (response.status === 404) {
|
|
@@ -1235,11 +1235,11 @@ function useDocumentTree(config, initialPath) {
|
|
|
1235
1235
|
if (node.type === "folder") {
|
|
1236
1236
|
setExpandedNodes((prev) => {
|
|
1237
1237
|
if (prev.has(node.id)) {
|
|
1238
|
-
const ancestorIds =
|
|
1238
|
+
const ancestorIds = _chunk7KTSRZI4cjs.getDocAncestorNodeIds.call(void 0, node.path);
|
|
1239
1239
|
ancestorIds.pop();
|
|
1240
1240
|
return new Set(ancestorIds);
|
|
1241
1241
|
} else {
|
|
1242
|
-
return new Set(
|
|
1242
|
+
return new Set(_chunk7KTSRZI4cjs.getDocAncestorNodeIds.call(void 0, node.path));
|
|
1243
1243
|
}
|
|
1244
1244
|
});
|
|
1245
1245
|
if (node.hasReadme) {
|
|
@@ -1256,7 +1256,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
1256
1256
|
const lastSlash = node.path.lastIndexOf("/");
|
|
1257
1257
|
if (lastSlash > 0) {
|
|
1258
1258
|
const parentPath = node.path.substring(0, lastSlash);
|
|
1259
|
-
setExpandedNodes(new Set(
|
|
1259
|
+
setExpandedNodes(new Set(_chunk7KTSRZI4cjs.getDocAncestorNodeIds.call(void 0, parentPath)));
|
|
1260
1260
|
}
|
|
1261
1261
|
lastFetchedPath.current = null;
|
|
1262
1262
|
setSelectedPath(node.path);
|
|
@@ -1270,7 +1270,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
1270
1270
|
const hashIndex = path.indexOf("#");
|
|
1271
1271
|
const anchor = hashIndex !== -1 ? path.substring(hashIndex) : "";
|
|
1272
1272
|
const cleanPath = path.replace(/\/$/, "").split("#")[0];
|
|
1273
|
-
const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _4 => _4.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current :
|
|
1273
|
+
const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _4 => _4.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current : _chunk7KTSRZI4cjs.stripFolderIndexFromPath.call(void 0, cleanPath, folderIndexFile);
|
|
1274
1274
|
if (anchor && _optionalChain([options, 'optionalAccess', _5 => _5.fromInternalLink]) && pathForSelection === selectedPathRef.current) {
|
|
1275
1275
|
_chunkG56GYN7Zcjs.navigateSamePageHash.call(void 0, anchor, { headerOffset: _chunkG56GYN7Zcjs.HUB_HEADER_OFFSET_PX });
|
|
1276
1276
|
return;
|
|
@@ -1332,8 +1332,8 @@ function useDocumentTree(config, initialPath) {
|
|
|
1332
1332
|
return docNavigation.register({
|
|
1333
1333
|
baseRoute: normalizedBaseRoute,
|
|
1334
1334
|
findNodeByPath: (path) => {
|
|
1335
|
-
const clean =
|
|
1336
|
-
return _nullishCoalesce(
|
|
1335
|
+
const clean = _chunk7KTSRZI4cjs.stripFolderIndexFromPath.call(void 0, path.replace(/\/$/, "").split("#")[0], folderIndexFile);
|
|
1336
|
+
return _nullishCoalesce(_chunk7KTSRZI4cjs.findDocNodeByPath.call(void 0, clean, structure), () => ( null));
|
|
1337
1337
|
},
|
|
1338
1338
|
selectNode
|
|
1339
1339
|
});
|
|
@@ -1418,7 +1418,7 @@ function useDocsResolveLink(sourceId, resolveLinkEndpoint) {
|
|
|
1418
1418
|
return _react.useCallback.call(void 0,
|
|
1419
1419
|
async (href, currentPath) => {
|
|
1420
1420
|
try {
|
|
1421
|
-
const response = await
|
|
1421
|
+
const response = await _chunkG56GYN7Zcjs.contentFetch.call(void 0, resolvedResolveLinkEndpoint, {
|
|
1422
1422
|
method: "POST",
|
|
1423
1423
|
headers: { "Content-Type": "application/json" },
|
|
1424
1424
|
body: JSON.stringify({ link: href, currentPath, source: sourceId })
|
|
@@ -1507,7 +1507,7 @@ function DocViewerContent({
|
|
|
1507
1507
|
label: _nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _23 => _23.label]), () => ( "Back to home")),
|
|
1508
1508
|
onClick: () => router.push(_nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _24 => _24.href]), () => ( "/")))
|
|
1509
1509
|
};
|
|
1510
|
-
const docSearch =
|
|
1510
|
+
const docSearch = _chunkRNF2E736cjs.useDocSearch.call(void 0, {
|
|
1511
1511
|
source: chatSource,
|
|
1512
1512
|
baseRoute,
|
|
1513
1513
|
searchEndpoint,
|
|
@@ -1523,7 +1523,7 @@ function DocViewerContent({
|
|
|
1523
1523
|
onResolveLink: resolveLink
|
|
1524
1524
|
});
|
|
1525
1525
|
}, [content, selectedPath, renderContent, navigateToDoc, sourceId, resolveLink]);
|
|
1526
|
-
const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([
|
|
1526
|
+
const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([_chunk7KTSRZI4cjs.findDocNodeByPath.call(void 0, selectedPath, structure), 'optionalAccess', _25 => _25.documentType]) : void 0;
|
|
1527
1527
|
const activeDocType = _nullishCoalesce(_optionalChain([content, 'optionalAccess', _26 => _26.documentType]), () => ( selectedNodeDocType));
|
|
1528
1528
|
const isMarkdownContent = !activeDocType || activeDocType === "markdown";
|
|
1529
1529
|
const showStickyNav = isMarkdownContent;
|
|
@@ -1535,34 +1535,28 @@ function DocViewerContent({
|
|
|
1535
1535
|
const defaultEmptyText = structure.length > 0 ? "Select a document from the sidebar to view" : "No documents yet. Add content from the admin panel.";
|
|
1536
1536
|
const resolvedEmptyText = emptyStateText || defaultEmptyText;
|
|
1537
1537
|
return (
|
|
1538
|
-
//
|
|
1539
|
-
//
|
|
1540
|
-
//
|
|
1541
|
-
//
|
|
1542
|
-
// `<PageHeader noTopPadding noBottomMargin>` renders the title section
|
|
1543
|
-
// the same way `<DevSectionView>`'s hero does. This is the only way to
|
|
1544
|
-
// guarantee /knowledge-base sits at pixel-identical vertical rhythm to
|
|
1545
|
-
// /roadmap / /releases / /onboarding-guides — same components, same DOM,
|
|
1546
|
-
// not "same CSS classes that look similar on paper."
|
|
1538
|
+
// Render through the shared wrapper chain (PageShell → PageLayout →
|
|
1539
|
+
// `gap-10 flex-col`). PageLayout owns the back-button row; the inner
|
|
1540
|
+
// `gap-10` div holds an inline title hero (same DOM `<DevSectionView>`'s
|
|
1541
|
+
// hero renders) followed by the search bar + content grid.
|
|
1547
1542
|
//
|
|
1548
1543
|
// `colorPalette` / `className` / `bgStyle` flow through PageShell's
|
|
1549
1544
|
// contentClassName + an inner style-passthrough wrapper so legacy
|
|
1550
1545
|
// palette overrides still apply (none in the codebase today; the API
|
|
1551
1546
|
// surface is preserved).
|
|
1552
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1553
|
-
/* @__PURE__ */ _jsxruntime.
|
|
1554
|
-
|
|
1555
|
-
{
|
|
1556
|
-
title,
|
|
1547
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7KTSRZI4cjs.PageShell, { contentClassName: `${bgClass} ${className}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7KTSRZI4cjs.PageLayout, { backButton: _nullishCoalesce(backCfg, () => ( void 0)), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-full flex flex-col gap-10", children: [
|
|
1548
|
+
(title || titleIcon || subtitle) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
|
|
1549
|
+
(title || titleIcon) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "h1", { className: "text-h1 tracking-[-1.12px] text-ods-text-primary flex items-center gap-3", children: [
|
|
1557
1550
|
titleIcon,
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1551
|
+
title && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1552
|
+
title,
|
|
1553
|
+
accentDot && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "." })
|
|
1554
|
+
] })
|
|
1555
|
+
] }),
|
|
1556
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-['DM_Sans'] font-medium text-[18px] leading-[28px] text-ods-text-secondary max-w-3xl line-clamp-2 min-h-[56px]", children: subtitle || " " })
|
|
1557
|
+
] }),
|
|
1564
1558
|
showAIChat && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1565
|
-
|
|
1559
|
+
_chunkRNF2E736cjs.DocSearchBar,
|
|
1566
1560
|
{
|
|
1567
1561
|
placeholder: `Search ${_optionalChain([sidebarLabel, 'optionalAccess', _30 => _30.toLowerCase, 'call', _31 => _31()]) || "documents"}...`,
|
|
1568
1562
|
query: docSearch.query,
|
|
@@ -1583,7 +1577,7 @@ function DocViewerContent({
|
|
|
1583
1577
|
!error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col lg:flex-row gap-6 lg:gap-10 items-start flex-1", children: [
|
|
1584
1578
|
/* @__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, CategorySidebarSkeleton, {}) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1585
1579
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PersistentMobileDropdown, { isLoading: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1586
|
-
|
|
1580
|
+
_chunk7KTSRZI4cjs.MobileNavigationDropdown,
|
|
1587
1581
|
{
|
|
1588
1582
|
nodes: structure,
|
|
1589
1583
|
selectedPath,
|
|
@@ -1597,7 +1591,7 @@ function DocViewerContent({
|
|
|
1597
1591
|
/* @__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: [
|
|
1598
1592
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-[14px] font-['Azeret_Mono'] font-semibold uppercase text-ods-text-secondary tracking-[-0.02em] leading-[1.43em]", children: sidebarLabel }),
|
|
1599
1593
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1600
|
-
|
|
1594
|
+
_chunk7KTSRZI4cjs.MultiLevelNavigation,
|
|
1601
1595
|
{
|
|
1602
1596
|
nodes: structure,
|
|
1603
1597
|
selectedPath,
|
|
@@ -1642,7 +1636,7 @@ function DocViewerContent({
|
|
|
1642
1636
|
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: [
|
|
1643
1637
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-[14px] font-['Azeret_Mono'] font-semibold uppercase text-ods-text-secondary tracking-[-0.02em] leading-[1.43em] mb-4", children: "ON THIS PAGE" }),
|
|
1644
1638
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1645
|
-
|
|
1639
|
+
_chunk7KTSRZI4cjs.StickySectionNav,
|
|
1646
1640
|
{
|
|
1647
1641
|
sections: stickyNavSections,
|
|
1648
1642
|
activeSection,
|
|
@@ -1753,11 +1747,11 @@ function EmbedSkeleton({ documentType } = {}) {
|
|
|
1753
1747
|
|
|
1754
1748
|
var DEFAULT_TITLE = "Documents";
|
|
1755
1749
|
var defaultFallbackRenderer = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-center py-16", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary", children: "Unsupported document type" }) });
|
|
1756
|
-
var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1757
|
-
var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1758
|
-
var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1750
|
+
var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO4TIFKDGcjs.PdfViewer, { src: content.fileUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
|
|
1751
|
+
var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO4TIFKDGcjs.GoogleSheetsViewer, { externalUrl: content.externalUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
|
|
1752
|
+
var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7KTSRZI4cjs.FigmaEmbed, { url: content.externalUrl, title: content.fileName, loading: "eager" }) : defaultFallbackRenderer(content, handlers);
|
|
1759
1753
|
var defaultFileRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1760
|
-
|
|
1754
|
+
_chunkO4TIFKDGcjs.FileDownloadCard,
|
|
1761
1755
|
{
|
|
1762
1756
|
fileName: content.fileName,
|
|
1763
1757
|
mimeType: content.mimeType,
|
|
@@ -1839,4 +1833,4 @@ function DocsHubPage({
|
|
|
1839
1833
|
|
|
1840
1834
|
|
|
1841
1835
|
exports.PersistentFilterControls = PersistentFilterControls; exports.PersistentSearchContainer = PersistentSearchContainer; exports.PersistentSidebar = PersistentSidebar; exports.PersistentMobileDropdown = PersistentMobileDropdown; exports.UnifiedSkeleton = UnifiedSkeleton; exports.TextSkeleton = TextSkeleton; exports.InteractiveSkeleton = InteractiveSkeleton; exports.MediaSkeleton = MediaSkeleton; exports.CardSkeleton = CardSkeleton; exports.CardSkeletonGrid = CardSkeletonGrid; exports.AnnouncementBarSkeleton = AnnouncementBarSkeleton; exports.HeroSkeleton = HeroSkeleton; exports.SearchContainerSkeleton = SearchContainerSkeleton; exports.CategorySidebarSkeleton = CategorySidebarSkeleton; exports.BreadcrumbSkeleton = BreadcrumbSkeleton; exports.ResultsHeaderSkeleton = ResultsHeaderSkeleton; exports.TwoColumnLayoutSkeleton = TwoColumnLayoutSkeleton; exports.ArticleLayoutSkeleton = ArticleLayoutSkeleton; exports.VendorDetailLayoutSkeleton = VendorDetailLayoutSkeleton; exports.StatsSectionSkeleton = StatsSectionSkeleton; exports.BlogCardGridSkeleton = BlogCardGridSkeleton; exports.VendorGridSkeleton = VendorGridSkeleton; exports.SlackCommunitySkeleton = SlackCommunitySkeleton; exports.DocNavigationProvider = DocNavigationProvider; exports.useDocNavigation = useDocNavigation; exports.useDocumentTree = useDocumentTree; exports.useScrollSpy = useScrollSpy; exports.DocViewer = DocViewer; exports.MarkdownSkeleton = MarkdownSkeleton; exports.EmbedSkeleton = EmbedSkeleton; exports.DocsHubPage = DocsHubPage;
|
|
1842
|
-
//# sourceMappingURL=chunk-
|
|
1836
|
+
//# sourceMappingURL=chunk-UAJAJFI6.cjs.map
|