@flamingo-stack/openframe-frontend-core 0.0.406 → 0.0.407-snapshot.20260711133234
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-3KEBI6TP.cjs → chunk-2B6773QM.cjs} +1 -1
- package/dist/chunk-2B6773QM.cjs.map +1 -0
- package/dist/{chunk-TFDNJTBX.js → chunk-5HOII3WB.js} +4 -4
- package/dist/{chunk-E6YHDT3D.js → chunk-7Q52HP45.js} +2 -2
- package/dist/chunk-7Q52HP45.js.map +1 -0
- package/dist/{chunk-VZGU4BV6.cjs → chunk-A3RW7M6B.cjs} +29 -29
- package/dist/{chunk-VZGU4BV6.cjs.map → chunk-A3RW7M6B.cjs.map} +1 -1
- package/dist/{chunk-QAFRLO5N.cjs → chunk-CUN4CJUN.cjs} +10 -11
- package/dist/chunk-CUN4CJUN.cjs.map +1 -0
- package/dist/{chunk-6WMVBCNA.js → chunk-E4J5KKHH.js} +3 -3
- package/dist/{chunk-P43ZHPM6.cjs → chunk-F4KE5AZO.cjs} +40 -40
- package/dist/{chunk-P43ZHPM6.cjs.map → chunk-F4KE5AZO.cjs.map} +1 -1
- package/dist/{chunk-PQN5R5II.js → chunk-IK5AR6QG.js} +7 -7
- package/dist/{chunk-SOK32D6C.js → chunk-IVM47EGI.js} +346 -297
- package/dist/chunk-IVM47EGI.js.map +1 -0
- package/dist/{chunk-AYFWYOL6.js → chunk-J6M2G6TD.js} +7 -7
- package/dist/{chunk-NA7XJRWB.js → chunk-KFQXO7QB.js} +1 -1
- package/dist/chunk-KFQXO7QB.js.map +1 -0
- package/dist/{chunk-ISYVNPRT.cjs → chunk-KPGKNUJF.cjs} +42 -42
- package/dist/{chunk-ISYVNPRT.cjs.map → chunk-KPGKNUJF.cjs.map} +1 -1
- package/dist/{chunk-GNS65HNC.cjs → chunk-KRLBVBYU.cjs} +18 -18
- package/dist/{chunk-GNS65HNC.cjs.map → chunk-KRLBVBYU.cjs.map} +1 -1
- package/dist/{chunk-ZVUR3A33.js → chunk-KZPVN7AZ.js} +2 -2
- package/dist/{chunk-7RVSGGO6.js → chunk-L6OPVKVR.js} +6 -6
- package/dist/{chunk-OATWTTCI.js → chunk-LQWYXIKB.js} +6 -6
- package/dist/{chunk-COERBDG4.cjs → chunk-NEMUCNCG.cjs} +75 -75
- package/dist/{chunk-COERBDG4.cjs.map → chunk-NEMUCNCG.cjs.map} +1 -1
- package/dist/{chunk-PNJ5LMVK.js → chunk-NO2KT42M.js} +9 -10
- package/dist/{chunk-PNJ5LMVK.js.map → chunk-NO2KT42M.js.map} +1 -1
- package/dist/{chunk-LSPBPUQM.js → chunk-O5W26SCL.js} +2 -2
- package/dist/{chunk-VANFD4FX.cjs → chunk-RL344I7V.cjs} +7 -7
- package/dist/{chunk-VANFD4FX.cjs.map → chunk-RL344I7V.cjs.map} +1 -1
- package/dist/{chunk-CF3LBCNI.cjs → chunk-RPGFIUN3.cjs} +35 -35
- package/dist/{chunk-CF3LBCNI.cjs.map → chunk-RPGFIUN3.cjs.map} +1 -1
- package/dist/{chunk-LL4QQSAD.cjs → chunk-SOALFYU6.cjs} +479 -430
- package/dist/chunk-SOALFYU6.cjs.map +1 -0
- package/dist/{chunk-CCIBZ7TO.cjs → chunk-STGWQFYT.cjs} +5 -5
- package/dist/chunk-STGWQFYT.cjs.map +1 -0
- package/dist/{chunk-VIB4SGCD.cjs → chunk-T6ZUBXPA.cjs} +14 -14
- package/dist/{chunk-VIB4SGCD.cjs.map → chunk-T6ZUBXPA.cjs.map} +1 -1
- package/dist/{chunk-HJJXNMM7.cjs → chunk-V3EZQWHQ.cjs} +7 -7
- package/dist/{chunk-HJJXNMM7.cjs.map → chunk-V3EZQWHQ.cjs.map} +1 -1
- package/dist/{chunk-3KZXOLFK.js → chunk-VUW4G6SU.js} +4 -4
- package/dist/{chunk-JAPP2F4M.cjs → chunk-WGOATV3P.cjs} +77 -77
- package/dist/{chunk-JAPP2F4M.cjs.map → chunk-WGOATV3P.cjs.map} +1 -1
- package/dist/{chunk-SF4G7M6U.cjs → chunk-YRKPMYI3.cjs} +15 -15
- package/dist/{chunk-SF4G7M6U.cjs.map → chunk-YRKPMYI3.cjs.map} +1 -1
- package/dist/{chunk-XXG2Z2JT.js → chunk-ZF5O3KUQ.js} +3 -3
- package/dist/{chunk-C3NPMZBI.js → chunk-ZMFQWMM7.js} +3 -3
- package/dist/components/announcement-bar.d.ts.map +1 -1
- package/dist/components/case-studies/index.cjs +11 -10
- package/dist/components/case-studies/index.cjs.map +1 -1
- package/dist/components/case-studies/index.js +5 -4
- package/dist/components/case-studies/index.js.map +1 -1
- package/dist/components/chat/index.cjs +5 -4
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +4 -3
- package/dist/components/chat/quick-action-chip.d.ts +11 -2
- package/dist/components/chat/quick-action-chip.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +6 -5
- package/dist/components/contact/index.cjs.map +1 -1
- package/dist/components/contact/index.js +5 -4
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/docs/index.js +7 -7
- package/dist/components/embeds/index.cjs +6 -5
- package/dist/components/embeds/index.cjs.map +1 -1
- package/dist/components/embeds/index.js +5 -4
- package/dist/components/embeds/reddit-embed-client.d.ts.map +1 -1
- package/dist/components/faq/index.cjs +7 -6
- package/dist/components/faq/index.cjs.map +1 -1
- package/dist/components/faq/index.js +6 -5
- package/dist/components/features/index.cjs +5 -4
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +4 -3
- package/dist/components/help-center-pages/index.cjs +24 -24
- package/dist/components/help-center-pages/index.js +15 -15
- package/dist/components/index.cjs +186 -180
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +39 -33
- package/dist/components/index.js.map +1 -1
- package/dist/components/media-carousel.d.ts +28 -4
- package/dist/components/media-carousel.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +5 -4
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.js +4 -3
- package/dist/components/onboarding-guides/index.cjs +9 -9
- package/dist/components/onboarding-guides/index.js +8 -8
- package/dist/components/related-content/index.cjs +7 -6
- package/dist/components/related-content/index.cjs.map +1 -1
- package/dist/components/related-content/index.js +6 -5
- package/dist/components/tickets/index.cjs +8 -8
- package/dist/components/tickets/index.js +7 -7
- package/dist/components/ui/index.cjs +5 -4
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +4 -3
- package/dist/components/ui/tag.d.ts +3 -2
- package/dist/components/ui/tag.d.ts.map +1 -1
- package/dist/contexts/endpoints-runtime-context.d.ts +1 -1
- package/dist/contexts/endpoints-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/hooks/index.cjs +3 -3
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/use-self-fetch.d.ts.map +1 -1
- package/dist/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -5
- package/dist/types/announcement.cjs.map +1 -1
- package/dist/types/announcement.d.ts +0 -6
- package/dist/types/announcement.d.ts.map +1 -1
- package/dist/types/announcement.js.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/announcement-storage.d.ts +3 -0
- package/dist/utils/announcement-storage.d.ts.map +1 -1
- package/dist/utils/app-config.d.ts.map +1 -1
- package/dist/utils/color-analysis.d.ts +0 -4
- package/dist/utils/color-analysis.d.ts.map +1 -1
- package/dist/utils/index.cjs +186 -177
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +185 -176
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/media-carousel-utils-stub.d.ts +3 -1
- package/dist/utils/media-carousel-utils-stub.d.ts.map +1 -1
- package/dist/utils/ods-color-utils.d.ts +2 -1
- package/dist/utils/ods-color-utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/announcement-bar.tsx +38 -21
- package/src/components/chat/quick-action-chip.tsx +18 -4
- package/src/components/embeds/reddit-embed-client.tsx +0 -3
- package/src/components/index.ts +5 -0
- package/src/components/media-carousel.tsx +195 -149
- package/src/components/ui/tag.tsx +21 -3
- package/src/contexts/endpoints-runtime-context.tsx +1 -1
- package/src/hooks/use-self-fetch.ts +10 -9
- package/src/stories/AnnouncementBar.stories.tsx +8 -14
- package/src/styles/ods-design-tokens.css +2 -0
- package/src/types/announcement.ts +0 -8
- package/src/utils/announcement-storage.ts +17 -0
- package/src/utils/app-config.ts +3 -2
- package/src/utils/color-analysis.ts +5 -2
- package/src/utils/media-carousel-utils-stub.ts +3 -1
- package/src/utils/ods-color-utils.ts +4 -7
- package/dist/chunk-3KEBI6TP.cjs.map +0 -1
- package/dist/chunk-CCIBZ7TO.cjs.map +0 -1
- package/dist/chunk-E6YHDT3D.js.map +0 -1
- package/dist/chunk-LL4QQSAD.cjs.map +0 -1
- package/dist/chunk-NA7XJRWB.js.map +0 -1
- package/dist/chunk-QAFRLO5N.cjs.map +0 -1
- package/dist/chunk-SOK32D6C.js.map +0 -1
- package/dist/utils/media-carousel-utils.d.ts +0 -10
- package/dist/utils/media-carousel-utils.d.ts.map +0 -1
- package/src/utils/.media-carousel-utils.md +0 -31
- package/src/utils/media-carousel-utils.ts +0 -22
- /package/dist/{chunk-TFDNJTBX.js.map → chunk-5HOII3WB.js.map} +0 -0
- /package/dist/{chunk-6WMVBCNA.js.map → chunk-E4J5KKHH.js.map} +0 -0
- /package/dist/{chunk-PQN5R5II.js.map → chunk-IK5AR6QG.js.map} +0 -0
- /package/dist/{chunk-AYFWYOL6.js.map → chunk-J6M2G6TD.js.map} +0 -0
- /package/dist/{chunk-ZVUR3A33.js.map → chunk-KZPVN7AZ.js.map} +0 -0
- /package/dist/{chunk-7RVSGGO6.js.map → chunk-L6OPVKVR.js.map} +0 -0
- /package/dist/{chunk-OATWTTCI.js.map → chunk-LQWYXIKB.js.map} +0 -0
- /package/dist/{chunk-LSPBPUQM.js.map → chunk-O5W26SCL.js.map} +0 -0
- /package/dist/{chunk-3KZXOLFK.js.map → chunk-VUW4G6SU.js.map} +0 -0
- /package/dist/{chunk-XXG2Z2JT.js.map → chunk-ZF5O3KUQ.js.map} +0 -0
- /package/dist/{chunk-C3NPMZBI.js.map → chunk-ZMFQWMM7.js.map} +0 -0
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
EmptyState,
|
|
5
5
|
init_unified_pagination,
|
|
6
6
|
unified_pagination_exports
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KZPVN7AZ.js";
|
|
8
8
|
import {
|
|
9
9
|
DetailPageSkeleton
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZMFQWMM7.js";
|
|
11
11
|
import {
|
|
12
12
|
useSelfFetch
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NO2KT42M.js";
|
|
14
14
|
import {
|
|
15
15
|
Accordion,
|
|
16
16
|
AccordionContent,
|
|
@@ -42,15 +42,15 @@ import {
|
|
|
42
42
|
resolveContentHref,
|
|
43
43
|
toStripProfile,
|
|
44
44
|
useEntityCardLink
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-IVM47EGI.js";
|
|
46
46
|
import {
|
|
47
47
|
STICKY_HEADER_OFFSET_PX,
|
|
48
48
|
contentFetch,
|
|
49
49
|
useScrollToHash
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-7Q52HP45.js";
|
|
51
51
|
import {
|
|
52
52
|
useChatRuntime
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-KFQXO7QB.js";
|
|
54
54
|
import {
|
|
55
55
|
init_next_navigation,
|
|
56
56
|
usePathname,
|
|
@@ -1462,4 +1462,4 @@ export {
|
|
|
1462
1462
|
useLegalDocs,
|
|
1463
1463
|
LegalDocumentPage
|
|
1464
1464
|
};
|
|
1465
|
-
//# sourceMappingURL=chunk-
|
|
1465
|
+
//# sourceMappingURL=chunk-J6M2G6TD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/contexts/endpoints-runtime-context.tsx","../src/contexts/chat-runtime-context.tsx"],"sourcesContent":["'use client'\n\n/**\n * Endpoints runtime — sibling of ChatRuntime. Carries the API path\n * literals consumed by oss-lib components/hooks/utils so a host\n * application can override them (e.g. when running behind a reverse\n * proxy as `user1.openframe.ai` → `/api/mingo-guide/*`).\n *\n * The hub mounts `<HubRuntimeProvider>` at root with the\n * canonical hub paths; an embedded app mounts its own provider with\n * remapped paths. The pattern mirrors ChatRuntimeContext exactly:\n *\n * - `useEndpointsRuntime()` returns null when no provider is mounted.\n * For optional consumers that should gracefully no-op without one.\n * - `useRequiredEndpointsRuntime()` throws on missing provider — for\n * hooks/components that cannot function without endpoints.\n *\n * IMPORTANT for embedders: memoize the value passed to\n * `<EndpointsRuntimeContext.Provider value={...}>` (e.g. React.useMemo).\n * Reference changes invalidate downstream effect dependency arrays and\n * trigger unnecessary re-fetches.\n */\n\nimport { createContext, useContext } from 'react'\n\nexport interface EndpointsRuntime {\n /** GET active announcement (used by `<AnnouncementBar>` mount fetch + refocus revalidation). */\n announcementsUrl: string\n accessCode: {\n /** POST validate access code. */\n validateUrl: string\n /** POST consume / redeem access code after registration. */\n consumeUrl: string\n }\n /** POST contact-form submission. */\n contactUrl: string\n}\n\nexport const EndpointsRuntimeContext = createContext<EndpointsRuntime | null>(null)\n\n/**\n * Optional read — returns null when no provider is mounted. Use for\n * surfaces that should silently skip the fetch (e.g. announcement\n * polling on a page rendered outside the provider tree).\n */\nexport function useEndpointsRuntime(): EndpointsRuntime | null {\n return useContext(EndpointsRuntimeContext)\n}\n\n/**\n * Strict variant — throws on missing provider. Use for consumers that\n * cannot function without an endpoint (form submission, code\n * validation). In tests/Storybook, wrap with the hub's\n * `<HubRuntimeProvider>` or a stub\n * `<EndpointsRuntimeContext.Provider value={mockedEndpoints}>`.\n */\nexport function useRequiredEndpointsRuntime(): EndpointsRuntime {\n const v = useContext(EndpointsRuntimeContext)\n if (!v) {\n throw new Error(\n '[endpoints-runtime] hook called outside an <EndpointsRuntimeContext.Provider>. ' +\n 'Hub: mount <HubRuntimeProvider> in your providers tree. ' +\n 'Embedded app: mount your own provider with proxied URLs at the tree root. ' +\n 'Tests/Storybook: wrap render() in <EndpointsRuntimeContext.Provider value={mocked}>.',\n )\n }\n return v\n}\n","'use client'\n\n/**\n * Chat runtime context — single seam for embedding the chat panel in a\n * different host (e.g. user1.openframe.ai reverse-proxying API calls\n * under /api/mingo-guide/* to hub.openframe.ai/api/*).\n *\n * Three concerns, one context:\n * 1. API endpoints: chatStreamUrl / approvalToolUrl / commandsUrl /\n * buildListUrl + attachment endpoints + chat-identity. The chat\n * reads them from runtime; hub vs embedded app supply different\n * strings via different providers.\n * 2. Navigation mode + callbacks: 'host' or 'embed' mode. Host wires\n * its own router/docNav via the optional `navigate` callback\n * (plain function, NOT a hook); embed forces new-tab via\n * `defaultContentOrigin` + lib's `resolveExternalNavigation`.\n * 3. Identity context: only `source` (required for localStorage\n * namespacing). The display identity (greeting first-name etc.)\n * comes from the server via `useChatIdentity()` — never injected\n * client-side, so it always matches the server-resolved auth.\n *\n * Sibling of EndpointsRuntimeContext (announcement bar, contact form,\n * access codes). Each runtime stays an independent React context so\n * embedders can opt into either feature without forcing the other.\n *\n * IMPORTANT for embedders: memoize the value passed to\n * `<ChatRuntimeContext.Provider value={...}>` (e.g. via React.useMemo).\n * Every change to its reference identity invalidates downstream\n * `useMemo` consumers (the chat input's slash-commands binding,\n * useNavLink's embed-resolution memo, useDocChat's streamFn factory).\n * The hub's `<HubRuntimeProvider>` already memoizes correctly with\n * stable deps. Embedded apps that build the value inline on each render\n * will pay an avoidable re-render cost across the entire chat tree.\n */\n\nimport { createContext, useContext, type ReactNode } from 'react'\n\nimport type { ComposeContentUrl } from '../utils/content-href'\n\n/**\n * Runtime config consumed by the chat panel.\n */\nexport interface ChatRuntime {\n endpoints: {\n /** POST streaming chat. Hub: '/api/docs/chat'. */\n chatStreamUrl: string\n /** POST agent approve/reject. Hub: '/api/chat/agent/confirm-tool'. */\n approvalToolUrl: string\n /** Customer-ticket agent endpoints (Help Center). OPTIONAL — when unset,\n * the ticket hooks fall back to the bare hub paths\n * (`/api/chat/agent/{find-ticket,ticket-action,list-engagements}`).\n * Embedders behind a reverse proxy set these to their proxied paths\n * (e.g. `/content/api/chat/agent/...`) so tickets route through the SAME\n * endpoint config + proxy as every other endpoint. */\n findTicketUrl?: string\n ticketActionUrl?: string\n listEngagementsUrl?: string\n /** GET slash-command catalog. Hub: '/api/docs/commands'. */\n commandsUrl: string\n /** GET RAG-search endpoint behind `<DocSearchBar>` (the in-source search\n * bar mounted by `<DocViewer>` / `<DocsHubPage>` when `showAIChat` is on).\n * Hub: '/api/docs/search'. OPTIONAL — falls back to the hub path so\n * same-origin Next.js hosts don't need to set it. Cross-origin embedders\n * set their proxied path so the search bar routes through the same\n * reverse proxy as everything else. Same pattern as `findTicketUrl`. */\n docsSearchUrl?: string\n /** POST internal-link resolver. The in-source markdown renderer (lib or\n * custom) calls `<DocViewer>`'s `handlers.onResolveLink(href, currentPath)`\n * for relative hrefs like `./getting-started/intro.md` — that callback\n * posts to this URL with `{ link, currentPath, source }` and expects a\n * `ResolveLinkResult` back. Hub: '/api/docs/resolve-link'. OPTIONAL — same\n * fall-back chain as `docsSearchUrl`: prop override → runtime → default. */\n docsResolveLinkUrl?: string\n /** GET per-platform empty-state config (admin-edited in\n * `/admin/chat-config`): `{ greeting, enabledRagTableIds, suggestedQueries }`.\n * Hub: '/api/docs/empty-state'. OPTIONAL — the in-app (host-mode) chat\n * injects these values as SSR props instead, so it leaves this unset.\n * Cross-origin EMBEDDERS (no server hop) set it to their proxied path\n * (e.g. '/content/api/docs/empty-state') so `<EmbeddableChat>` can fetch\n * the greeting / quick-action chips / RAG-source filter at runtime. When\n * unset, the chat falls back to the explicit `emptyStateGreeting` /\n * `suggestedQueries` / `enabledRagTableIds` props (or in-code defaults). */\n emptyStateUrl?: string\n /** Build the per-agent display-config URL for an OpenFrame AI agent\n * (Fae/Mingo). OPTIONAL. The returned endpoint MUST be byte-compatible\n * with the empty-state wire shape ({ greeting, suggestedQueries,\n * enabledRagTableIds }). When set AND `EmbeddableChat` receives an\n * `activeAgentSlug` in embed mode, the chat fetches THIS url instead of\n * `emptyStateUrl` to render the selected agent's greeting + suggested\n * prompts (the \"agent mode\" URL override). Hub: `(slug) =>\n * '/api/ai-agents/' + encodeURIComponent(slug)`. */\n aiAgentConfigUrl?: (slug: string) => string\n /** Build entity-card list URL for a content type + ids. Hub delegates\n * to the rag-table-config registry; embedded app provides its own\n * per-type URL builder against the reverse proxy. Returns null when\n * the type has no list endpoint (caller skips rendering). */\n buildListUrl: (type: string, ids: string[]) => string | null\n /** Chat-attachment endpoints — added for the v2 attachment feature.\n *\n * Three concerns:\n * - `attachmentUploadUrl` — POSTed by the chat-attachment hook\n * to mint a Supabase signed-upload-URL + HMAC view token.\n * - `attachmentViewUrlPrefix` — embedded in markdown URLs the\n * chat hosts in user message bubbles (`![]()` / `[Attached]`).\n * Stored in chat history; chosen at SEND time. In host mode the\n * relative `/api/storage/view/chat-attachments/` is sufficient\n * (same-origin); embedders supply an absolute hub URL so the\n * browser can fetch cross-origin.\n * - `identityUrl` — GET endpoint the `useChatIdentity` hook\n * hits to learn the `{authTier, source, attachmentsEnabled}`\n * capability bag for the current session. Used beyond chat\n * (tickets / contact form / any embedded surface that needs\n * to identify the proxied customer), so the name has no\n * \"chat\" prefix even though the consuming hook still does. */\n attachmentUploadUrl: string\n attachmentViewUrlPrefix: string\n identityUrl: string\n /** Optional URL prefix for the image proxy (`<prefix>?url=<external>`).\n * When unset, lib's `getProxiedImageUrl` returns the original URL\n * unchanged. Hub default: '/api/image-proxy'. Embedders that don't\n * host an image-proxy route leave this undefined → images load\n * directly cross-origin (CORS-permitting). */\n imageProxyUrlPrefix?: string\n /** Optional list of hostnames that should bypass the image proxy\n * (rendered direct). Hub uses ['openmsp.ai']; embedders typically\n * leave it unset. Matches the `skipDomains` parameter of\n * `getProxiedImageUrl`. */\n imageProxySkipDomains?: string[]\n /** Optional base URL for the branded og-placeholder image route — the\n * DEFAULT cover-image fallback for entity cards with no image. The lib\n * appends `?title=…` (+ `w`/`h` for square slots) itself, so this is\n * the base, NOT a full URL: relative (`/api/og-placeholder`) for same-\n * origin hosts, or the proxied path (`/content/api/og-placeholder`) for\n * cross-origin embedders. May carry baked-in query params (preserved when\n * the lib layers `title`/dimensions on top) — but per-platform brand\n * colors are NO LONGER baked here; the `/api/og-placeholder` route\n * resolves them server-side from the platform. Most hosts leave this unset\n * and let the lib derive the base from `imageProxyUrlPrefix`.\n *\n * OPTIONAL — when unset the lib derives the base from the sibling\n * `imageProxyUrlPrefix` (same API base, route name swapped), then falls\n * back to the relative `/api/og-placeholder`. So an embedder that already\n * proxies images needs NO og-placeholder wiring. See\n * `resolveOgPlaceholderBase` / `buildOgPlaceholderUrl` in `../utils`. */\n ogPlaceholderUrl?: string\n /** Supabase storage origin (e.g. `https://xyz.supabase.co`) — used\n * by `useVideoWarmup` to scope the `<link rel=\"preload\" as=\"video\">`\n * hint to MP4s the deployment actually hosts. Hub wires it via\n * `getSupabaseStorageOrigin()`; embedders without a Supabase\n * storage origin leave it unset (preload is then skipped; Mux/\n * YouTube preconnect still fires). */\n supabaseStorageOrigin?: string\n }\n navigation: {\n /** ONE knob, two behaviors:\n * - 'host' = use the host page's existing click-routing untouched.\n * The chat panel calls `navigate?.()` for in-app routing.\n * - 'embed' = guest inside another app: short-circuit at the top\n * of click handlers to force new-tab + absolutize via\n * resolveExternalNavigation. */\n mode: 'host' | 'embed'\n /** Embed-only fallback origin for relative URLs whose target platform\n * can't be inferred. Used by resolveExternalNavigation when\n * `targetPlatform` is null — without this, a relative `/foo` href would\n * window.open against the embedder's origin, which is WRONG.\n * Set to your content host (e.g. 'https://hub.openframe.ai').\n * Required by the embedded app whenever mode='embed'. */\n defaultContentOrigin?: string\n /** Override for opening external URLs. MUST BE SYNCHRONOUS —\n * Safari/Firefox block popups opened outside a direct user gesture.\n * Default: window.open(href, '_blank', 'noopener,noreferrer'). */\n openExternal?: (href: string) => void\n /** Optional in-app navigation callback (host-mode only).\n * Returns `true` if the host handled the click in-app\n * (router.push + docNav.navigate); returns `false`, `undefined`,\n * or `void` → lib falls back to window.location.assign(href).\n * Hub wires this via HubRuntimeProvider's HubNavigationWiring;\n * embedders not in Next.js leave it undefined. */\n navigate?: (input: { href: string; path?: string | null; targetPlatform?: string | null }) => boolean | void\n /** Optional new-tab decision callback. Returns true → lib opens in\n * new tab; false → same tab via `navigate`. Hub wires the existing\n * `decideNewTab` logic from use-nav-link.tsx (re-imports the pure\n * helper from lib). Embedders may omit; lib defaults to:\n * same-origin/same-platform → same tab, else new tab. */\n decideNewTab?: (args: { href: string; targetPlatform?: string | null }) => boolean\n }\n /** Optional content-URL composer. Returns the platform-aware href +\n * target-platform tuple for a content entity. Hub wires this to its\n * `buildContentURL(type, slug, extractPrimaryPlatform(platforms))`\n * pipeline so the lib catalog/detail views can derive cross-\n * platform hrefs without knowing the hub's platform topology\n * (openmsp.ai / openframe.app / flamingo.run / tmcg).\n *\n * THE single content-href authority for every embeddable surface — page\n * views (onboarding catalog/detail, releases) AND chat cards / chips /\n * search results all resolve content links through this one seam, so a\n * given type lands in the SAME place regardless of where it's rendered.\n * Embedders wire `makeComposeContentUrl({ hostedTypes, contentOrigin })`;\n * omit it and lib views fall back to a same-origin relative path\n * (`buildDefaultHref`).\n *\n * Takes a single `ComposeContentUrlInput`: `type` + `identifier` (page\n * views pass the slug; chat rows pass the id + `externalUrl`, whose path\n * yields the slug for in-app routing) + optional `platforms` /\n * `externalUrl` / `targetPlatform`. */\n composeContentUrl?: ComposeContentUrl\n /** Per-`documentType` doc-viewer targets — the UNIFIED, DYNAMIC replacement for\n * the single `chipBasePlatform` prop. Maps a doc-table documentType\n * (`'markdown'`, `'data_room_doc'`, …) → `{ platform, basePath }` for the PUBLIC\n * doc viewer that hosts it. Doc chips with no `externalUrl` resolve PER ROW to\n * `getBaseUrl(platform)/<basePath>/<path>`, so a chat mixing several doc sources\n * sends EACH to its own home (markdown→flamingo/knowledge-base,\n * data_room_doc→company-hub/data-room) instead of one static fallback. The hub\n * may keep using `chipBasePlatform` (one doc source per platform); embedders that\n * surface multiple doc sources wire this. Threaded into `resolveSourceRowCTA`. */\n docPlatformTargets?: Record<string, { platform: string; basePath: string }>\n /** Chat source / platform identifier — OPTIONAL. The hub sets it from\n * `currentPlatform()`; EMBEDDERS leave it unset and stay platform-agnostic.\n *\n * It is NOT required for chat to work. The wire resolves source server-side\n * (`/docs/chat|search|commands` reject any client `source`); the\n * same-tab-vs-new-tab link decision falls back to an origin comparison when\n * it's absent (`decideNewTab` → `isCrossOriginUrl`); and the localStorage\n * history namespace falls back to a stable constant. Set it only where the\n * client legitimately needs to know its platform a priori — i.e. the hub,\n * where several platforms share related origins so \"same platform\" can't be\n * inferred from a URL alone. */\n source?: string\n // NOTE: No `user` field. The chat's display identity (greeting\n // first-name, etc.) comes from the SERVER-resolved auth via\n // `useChatIdentity()` — the same identity the server uses to\n // authorize requests. Letting embedders pass a client-side `user`\n // would let it desync from the actual auth tier, causing greetings\n // like \"Hey Bob\" while the server treats the session as\n // alice@example.com. Single source of truth: the server.\n}\n\nexport const ChatRuntimeContext = createContext<ChatRuntime | null>(null)\n\n/**\n * Returns the active runtime, or null when no provider is mounted.\n * NULL is a first-class value — it signals \"no chat runtime configured.\"\n * Optional consumers fall back to no-op behavior; strict consumers\n * use `useRequiredChatRuntime` (below).\n */\nexport function useChatRuntime(): ChatRuntime | null {\n return useContext(ChatRuntimeContext)\n}\n\n/**\n * Strict variant used INSIDE the chat panel. Throws if no provider.\n * The hub guarantees one exists by mounting `<HubRuntimeProvider>` at\n * root; the embedded app mounts its own `<ChatRuntimeContext.Provider>`\n * at the tree root. In Jest / Storybook tests that render chat\n * internals directly, wrap with `<HubRuntimeProvider>` (hub defaults)\n * or supply `<ChatRuntimeContext.Provider value={mockedRuntime}>`.\n */\nexport function useRequiredChatRuntime(): ChatRuntime {\n const v = useContext(ChatRuntimeContext)\n if (!v) {\n throw new Error(\n '[chat-runtime] hook called outside a <ChatRuntimeContext.Provider>. ' +\n 'The hub mounts <HubRuntimeProvider> at root — this only fires when ' +\n 'chat internals are rendered above the provider tree. ' +\n 'Fix: ensure the rendering subtree descends from the runtime provider. ' +\n 'In tests/Storybook: wrap with <HubRuntimeProvider> or supply ' +\n 'a <ChatRuntimeContext.Provider value={mockedRuntime}>.',\n )\n }\n return v\n}\n"],"mappings":";;;AAuBA,SAAS,eAAe,kBAAkB;AAenC,IAAM,0BAA0B,cAAuC,IAAI;AAO3E,SAAS,sBAA+C;AAC7D,SAAO,WAAW,uBAAuB;AAC3C;AASO,SAAS,8BAAgD;AAC9D,QAAM,IAAI,WAAW,uBAAuB;AAC5C,MAAI,CAAC,GAAG;AACN,UAAM,IAAI;AAAA,MACR;AAAA,IAIF;AAAA,EACF;AACA,SAAO;AACT;;;AChCA,SAAS,iBAAAA,gBAAe,cAAAC,mBAAkC;AA0MnD,IAAM,qBAAqBD,eAAkC,IAAI;AAQjE,SAAS,iBAAqC;AACnD,SAAOC,YAAW,kBAAkB;AACtC;AAUO,SAAS,yBAAsC;AACpD,QAAM,IAAIA,YAAW,kBAAkB;AACvC,MAAI,CAAC,GAAG;AACN,UAAM,IAAI;AAAA,MACR;AAAA,IAMF;AAAA,EACF;AACA,SAAO;AACT;","names":["createContext","useContext"]}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkRL344I7Vcjs = require('./chunk-RL344I7V.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkT6ZUBXPAcjs = require('./chunk-T6ZUBXPA.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -19,16 +19,16 @@ var _chunkVIB4SGCDcjs = require('./chunk-VIB4SGCD.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkSOALFYU6cjs = require('./chunk-SOALFYU6.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkSTGWQFYTcjs = require('./chunk-STGWQFYT.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunk2B6773QMcjs = require('./chunk-2B6773QM.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
@@ -1043,9 +1043,9 @@ function useDocNavigation() {
|
|
|
1043
1043
|
function scrollToContent() {
|
|
1044
1044
|
const article = document.querySelector("article");
|
|
1045
1045
|
if (article) {
|
|
1046
|
-
|
|
1046
|
+
_chunkSTGWQFYTcjs.scrollElementIntoView.call(void 0, article, { headerOffset: _chunkSTGWQFYTcjs.HUB_HEADER_OFFSET_PX });
|
|
1047
1047
|
} else {
|
|
1048
|
-
|
|
1048
|
+
_chunkSTGWQFYTcjs.scrollElementIntoView.call(void 0, document.documentElement);
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
1051
|
function findFirstDocPath(folder) {
|
|
@@ -1065,8 +1065,8 @@ function findFirstDocPath(folder) {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
function useDocumentTree(config, initialPath) {
|
|
1067
1067
|
const { structureEndpoint, contentEndpoint, baseRoute } = config;
|
|
1068
|
-
const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => (
|
|
1069
|
-
const cleanInitialPath =
|
|
1068
|
+
const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => ( _chunkSOALFYU6cjs.DEFAULT_FOLDER_INDEX_FILE));
|
|
1069
|
+
const cleanInitialPath = _chunkSOALFYU6cjs.stripFolderIndexFromPath.call(void 0,
|
|
1070
1070
|
_optionalChain([initialPath, 'optionalAccess', _2 => _2.replace, 'call', _3 => _3(/\/$/, "")]) || "",
|
|
1071
1071
|
folderIndexFile
|
|
1072
1072
|
);
|
|
@@ -1092,12 +1092,12 @@ function useDocumentTree(config, initialPath) {
|
|
|
1092
1092
|
} else if (pathname.startsWith(`${normalizedBaseRoute}/`)) {
|
|
1093
1093
|
pathFromUrl = pathname.substring(`${normalizedBaseRoute}/`.length);
|
|
1094
1094
|
}
|
|
1095
|
-
pathFromUrl =
|
|
1095
|
+
pathFromUrl = _chunkSOALFYU6cjs.stripFolderIndexFromPath.call(void 0, pathFromUrl, folderIndexFile);
|
|
1096
1096
|
if (pathFromUrl !== selectedPathRef.current) {
|
|
1097
1097
|
setSelectedPath(pathFromUrl);
|
|
1098
1098
|
if (pathFromUrl) {
|
|
1099
1099
|
const parentPath = pathFromUrl.includes("/") ? pathFromUrl.substring(0, pathFromUrl.lastIndexOf("/")) : pathFromUrl;
|
|
1100
|
-
setExpandedNodes(new Set(
|
|
1100
|
+
setExpandedNodes(new Set(_chunkSOALFYU6cjs.getDocAncestorNodeIds.call(void 0, parentPath)));
|
|
1101
1101
|
}
|
|
1102
1102
|
setTimeout(() => {
|
|
1103
1103
|
scrollToContent();
|
|
@@ -1112,7 +1112,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
1112
1112
|
setSelectedPath(cleanInitialPath);
|
|
1113
1113
|
if (cleanInitialPath) {
|
|
1114
1114
|
const parentPath = cleanInitialPath.includes("/") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
|
|
1115
|
-
setExpandedNodes(new Set(
|
|
1115
|
+
setExpandedNodes(new Set(_chunkSOALFYU6cjs.getDocAncestorNodeIds.call(void 0, parentPath)));
|
|
1116
1116
|
}
|
|
1117
1117
|
setTimeout(scrollToContent, 150);
|
|
1118
1118
|
}, [cleanInitialPath]);
|
|
@@ -1132,7 +1132,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
1132
1132
|
if (selectedPath === "") {
|
|
1133
1133
|
pathToFetch = folderIndexFile;
|
|
1134
1134
|
} else {
|
|
1135
|
-
const node =
|
|
1135
|
+
const node = _chunkSOALFYU6cjs.findDocNodeByPath.call(void 0, selectedPath, structure);
|
|
1136
1136
|
if (node && node.type === "folder" && !node.hasReadme) {
|
|
1137
1137
|
const firstDocPath = findFirstDocPath(node);
|
|
1138
1138
|
if (!firstDocPath) {
|
|
@@ -1164,7 +1164,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
1164
1164
|
try {
|
|
1165
1165
|
setIsLoadingStructure(true);
|
|
1166
1166
|
setError(null);
|
|
1167
|
-
const response = await
|
|
1167
|
+
const response = await _chunkSTGWQFYTcjs.contentFetch.call(void 0, structureEndpoint);
|
|
1168
1168
|
if (!response.ok) {
|
|
1169
1169
|
throw new Error("Failed to load documentation structure");
|
|
1170
1170
|
}
|
|
@@ -1174,7 +1174,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
1174
1174
|
if (cleanInitialPath) {
|
|
1175
1175
|
const pathForExpansion = cleanInitialPath.includes(".") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
|
|
1176
1176
|
if (pathForExpansion) {
|
|
1177
|
-
setExpandedNodes(new Set(
|
|
1177
|
+
setExpandedNodes(new Set(_chunkSOALFYU6cjs.getDocAncestorNodeIds.call(void 0, pathForExpansion)));
|
|
1178
1178
|
}
|
|
1179
1179
|
} else if (result.data.length > 0) {
|
|
1180
1180
|
const hasRootReadme = result.data.some(
|
|
@@ -1204,7 +1204,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
1204
1204
|
const fetchContent = async (path) => {
|
|
1205
1205
|
try {
|
|
1206
1206
|
setIsLoadingContent(true);
|
|
1207
|
-
const response = await
|
|
1207
|
+
const response = await _chunkSTGWQFYTcjs.contentFetch.call(void 0, `${contentEndpoint}?path=${encodeURIComponent(path)}`);
|
|
1208
1208
|
if (path !== lastFetchedPath.current) return;
|
|
1209
1209
|
if (!response.ok) {
|
|
1210
1210
|
if (response.status === 404) {
|
|
@@ -1216,8 +1216,8 @@ function useDocumentTree(config, initialPath) {
|
|
|
1216
1216
|
setContent(null);
|
|
1217
1217
|
return;
|
|
1218
1218
|
}
|
|
1219
|
-
const probe =
|
|
1220
|
-
|
|
1219
|
+
const probe = _chunkSOALFYU6cjs.findDocNodeByPath.call(void 0,
|
|
1220
|
+
_chunkSOALFYU6cjs.stripFolderIndexFromPath.call(void 0, path, folderIndexFile),
|
|
1221
1221
|
structure
|
|
1222
1222
|
);
|
|
1223
1223
|
const probeIsNoReadmeFolder = !!probe && probe.type === "folder" && !probe.hasReadme;
|
|
@@ -1274,16 +1274,16 @@ function useDocumentTree(config, initialPath) {
|
|
|
1274
1274
|
if (node.type === "folder") {
|
|
1275
1275
|
setExpandedNodes((prev) => {
|
|
1276
1276
|
if (prev.has(node.id)) {
|
|
1277
|
-
const ancestorIds =
|
|
1277
|
+
const ancestorIds = _chunkSOALFYU6cjs.getDocAncestorNodeIds.call(void 0, node.path);
|
|
1278
1278
|
ancestorIds.pop();
|
|
1279
1279
|
return new Set(ancestorIds);
|
|
1280
1280
|
}
|
|
1281
|
-
return new Set(
|
|
1281
|
+
return new Set(_chunkSOALFYU6cjs.getDocAncestorNodeIds.call(void 0, node.path));
|
|
1282
1282
|
});
|
|
1283
1283
|
} else {
|
|
1284
1284
|
const lastSlash = node.path.lastIndexOf("/");
|
|
1285
1285
|
if (lastSlash > 0) {
|
|
1286
|
-
setExpandedNodes(new Set(
|
|
1286
|
+
setExpandedNodes(new Set(_chunkSOALFYU6cjs.getDocAncestorNodeIds.call(void 0, node.path.substring(0, lastSlash))));
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
1289
1289
|
lastFetchedPath.current = null;
|
|
@@ -1295,9 +1295,9 @@ function useDocumentTree(config, initialPath) {
|
|
|
1295
1295
|
const hashIndex = path.indexOf("#");
|
|
1296
1296
|
const anchor = hashIndex !== -1 ? path.substring(hashIndex) : "";
|
|
1297
1297
|
const cleanPath = path.replace(/\/$/, "").split("#")[0];
|
|
1298
|
-
const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _4 => _4.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current :
|
|
1298
|
+
const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _4 => _4.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current : _chunkSOALFYU6cjs.stripFolderIndexFromPath.call(void 0, cleanPath, folderIndexFile);
|
|
1299
1299
|
if (anchor && _optionalChain([options, 'optionalAccess', _5 => _5.fromInternalLink]) && pathForSelection === selectedPathRef.current) {
|
|
1300
|
-
|
|
1300
|
+
_chunkSTGWQFYTcjs.navigateSamePageHash.call(void 0, anchor, { headerOffset: _chunkSTGWQFYTcjs.HUB_HEADER_OFFSET_PX });
|
|
1301
1301
|
return;
|
|
1302
1302
|
}
|
|
1303
1303
|
const scrollAfterNav = () => {
|
|
@@ -1305,7 +1305,7 @@ function useDocumentTree(config, initialPath) {
|
|
|
1305
1305
|
setTimeout(() => {
|
|
1306
1306
|
const el = document.getElementById(anchor.substring(1));
|
|
1307
1307
|
if (el) {
|
|
1308
|
-
|
|
1308
|
+
_chunkSTGWQFYTcjs.scrollElementIntoView.call(void 0, el, { headerOffset: _chunkSTGWQFYTcjs.HUB_HEADER_OFFSET_PX });
|
|
1309
1309
|
} else {
|
|
1310
1310
|
scrollToContent();
|
|
1311
1311
|
}
|
|
@@ -1357,8 +1357,8 @@ function useDocumentTree(config, initialPath) {
|
|
|
1357
1357
|
return docNavigation.register({
|
|
1358
1358
|
baseRoute: normalizedBaseRoute,
|
|
1359
1359
|
findNodeByPath: (path) => {
|
|
1360
|
-
const clean =
|
|
1361
|
-
return _nullishCoalesce(
|
|
1360
|
+
const clean = _chunkSOALFYU6cjs.stripFolderIndexFromPath.call(void 0, path.replace(/\/$/, "").split("#")[0], folderIndexFile);
|
|
1361
|
+
return _nullishCoalesce(_chunkSOALFYU6cjs.findDocNodeByPath.call(void 0, clean, structure), () => ( null));
|
|
1362
1362
|
},
|
|
1363
1363
|
selectNode
|
|
1364
1364
|
});
|
|
@@ -1399,7 +1399,7 @@ function useScrollSpy(sections) {
|
|
|
1399
1399
|
if (!targetElement) return;
|
|
1400
1400
|
isScrollingFromClick.current = true;
|
|
1401
1401
|
setActiveSection(sectionId);
|
|
1402
|
-
|
|
1402
|
+
_chunkSTGWQFYTcjs.scrollElementIntoView.call(void 0, targetElement, { headerOffset: SCROLL_OFFSET });
|
|
1403
1403
|
setTimeout(() => {
|
|
1404
1404
|
isScrollingFromClick.current = false;
|
|
1405
1405
|
}, 800);
|
|
@@ -1438,12 +1438,12 @@ function useScrollSpy(sections) {
|
|
|
1438
1438
|
// src/components/docs/use-docs-resolve-link.ts
|
|
1439
1439
|
|
|
1440
1440
|
function useDocsResolveLink(sourceId, resolveLinkEndpoint) {
|
|
1441
|
-
const chatRuntime =
|
|
1441
|
+
const chatRuntime = _chunk2B6773QMcjs.useChatRuntime.call(void 0, );
|
|
1442
1442
|
const resolvedResolveLinkEndpoint = _nullishCoalesce(_nullishCoalesce(resolveLinkEndpoint, () => ( _optionalChain([chatRuntime, 'optionalAccess', _20 => _20.endpoints, 'access', _21 => _21.docsResolveLinkUrl]))), () => ( "/api/docs/resolve-link"));
|
|
1443
1443
|
return _react.useCallback.call(void 0,
|
|
1444
1444
|
async (href, currentPath) => {
|
|
1445
1445
|
try {
|
|
1446
|
-
const response = await
|
|
1446
|
+
const response = await _chunkSTGWQFYTcjs.contentFetch.call(void 0, resolvedResolveLinkEndpoint, {
|
|
1447
1447
|
method: "POST",
|
|
1448
1448
|
headers: { "Content-Type": "application/json" },
|
|
1449
1449
|
body: JSON.stringify({ link: href, currentPath, source: sourceId })
|
|
@@ -1531,7 +1531,7 @@ function DocViewerContent({
|
|
|
1531
1531
|
label: _nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _23 => _23.label]), () => ( "Back to home")),
|
|
1532
1532
|
onClick: () => router.push(_nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _24 => _24.href]), () => ( "/")))
|
|
1533
1533
|
};
|
|
1534
|
-
const docSearch =
|
|
1534
|
+
const docSearch = _chunkT6ZUBXPAcjs.useDocSearch.call(void 0, {
|
|
1535
1535
|
source: chatSource,
|
|
1536
1536
|
baseRoute,
|
|
1537
1537
|
searchEndpoint,
|
|
@@ -1555,7 +1555,7 @@ function DocViewerContent({
|
|
|
1555
1555
|
onResolveLink: resolveLink
|
|
1556
1556
|
});
|
|
1557
1557
|
}, [content, renderContent, navigateToDoc, sourceId, resolveLink]);
|
|
1558
|
-
const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([
|
|
1558
|
+
const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([_chunkSOALFYU6cjs.findDocNodeByPath.call(void 0, selectedPath, structure), 'optionalAccess', _25 => _25.documentType]) : void 0;
|
|
1559
1559
|
const activeDocType = _nullishCoalesce(_optionalChain([content, 'optionalAccess', _26 => _26.documentType]), () => ( selectedNodeDocType));
|
|
1560
1560
|
const isMarkdownContent = !activeDocType || activeDocType === "markdown";
|
|
1561
1561
|
const showStickyNav = isMarkdownContent;
|
|
@@ -1566,9 +1566,9 @@ function DocViewerContent({
|
|
|
1566
1566
|
const containerBgStyle = colorPalette.containerBackground !== "transparent" ? { backgroundColor: colorPalette.containerBackground } : {};
|
|
1567
1567
|
const defaultEmptyText = structure.length > 0 ? "Select a document from the sidebar to view" : "No documents yet. Add content from the admin panel.";
|
|
1568
1568
|
const resolvedEmptyText = emptyStateText || defaultEmptyText;
|
|
1569
|
-
const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1569
|
+
const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSOALFYU6cjs.PageLayout, { title, subtitle, titleSize: "h1", titleWrap: true, backButton: _nullishCoalesce(backCfg, () => ( void 0)), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-full flex flex-col gap-10", children: [
|
|
1570
1570
|
showAIChat && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1571
|
-
|
|
1571
|
+
_chunkT6ZUBXPAcjs.DocSearchBar,
|
|
1572
1572
|
{
|
|
1573
1573
|
placeholder: `Search ${_optionalChain([sidebarLabel, 'optionalAccess', _30 => _30.toLowerCase, 'call', _31 => _31()]) || "documents"}...`,
|
|
1574
1574
|
query: docSearch.query,
|
|
@@ -1589,7 +1589,7 @@ function DocViewerContent({
|
|
|
1589
1589
|
!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: [
|
|
1590
1590
|
/* @__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: [
|
|
1591
1591
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PersistentMobileDropdown, { isLoading: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1592
|
-
|
|
1592
|
+
_chunkSOALFYU6cjs.MobileNavigationDropdown,
|
|
1593
1593
|
{
|
|
1594
1594
|
nodes: structure,
|
|
1595
1595
|
selectedPath,
|
|
@@ -1603,7 +1603,7 @@ function DocViewerContent({
|
|
|
1603
1603
|
/* @__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: [
|
|
1604
1604
|
/* @__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 }),
|
|
1605
1605
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1606
|
-
|
|
1606
|
+
_chunkSOALFYU6cjs.MultiLevelNavigation,
|
|
1607
1607
|
{
|
|
1608
1608
|
nodes: structure,
|
|
1609
1609
|
selectedPath,
|
|
@@ -1648,7 +1648,7 @@ function DocViewerContent({
|
|
|
1648
1648
|
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: [
|
|
1649
1649
|
/* @__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" }),
|
|
1650
1650
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1651
|
-
|
|
1651
|
+
_chunkSOALFYU6cjs.StickySectionNav,
|
|
1652
1652
|
{
|
|
1653
1653
|
sections: stickyNavSections,
|
|
1654
1654
|
activeSection,
|
|
@@ -1663,7 +1663,7 @@ function DocViewerContent({
|
|
|
1663
1663
|
) })
|
|
1664
1664
|
] })
|
|
1665
1665
|
] }) }) });
|
|
1666
|
-
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1666
|
+
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSOALFYU6cjs.PageShell, { contentClassName: `${bgClass} ${className}`, children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `page-shell-content ${bgClass} ${className}`.trim(), children: inner });
|
|
1667
1667
|
}
|
|
1668
1668
|
|
|
1669
1669
|
// src/components/docs/skeletons.tsx
|
|
@@ -1759,11 +1759,11 @@ function EmbedSkeleton({ documentType } = {}) {
|
|
|
1759
1759
|
|
|
1760
1760
|
var DEFAULT_TITLE = "Documents";
|
|
1761
1761
|
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" }) });
|
|
1762
|
-
var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1763
|
-
var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1764
|
-
var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1762
|
+
var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRL344I7Vcjs.PdfViewer, { src: content.fileUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
|
|
1763
|
+
var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRL344I7Vcjs.GoogleSheetsViewer, { externalUrl: content.externalUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
|
|
1764
|
+
var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSOALFYU6cjs.FigmaEmbed, { url: content.externalUrl, title: content.fileName, loading: "eager" }) : defaultFallbackRenderer(content, handlers);
|
|
1765
1765
|
var defaultFileRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1766
|
-
|
|
1766
|
+
_chunkRL344I7Vcjs.FileDownloadCard,
|
|
1767
1767
|
{
|
|
1768
1768
|
fileName: content.fileName,
|
|
1769
1769
|
mimeType: content.mimeType,
|
|
@@ -1845,4 +1845,4 @@ function DocsHubPage({
|
|
|
1845
1845
|
|
|
1846
1846
|
|
|
1847
1847
|
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;
|
|
1848
|
-
//# sourceMappingURL=chunk-
|
|
1848
|
+
//# sourceMappingURL=chunk-KPGKNUJF.cjs.map
|