deepspace 0.19.3 → 0.19.5
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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/{chunk-233GQU2H.js → chunk-A7UFIOWO.js} +103 -29
- package/dist/chunk-A7UFIOWO.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/documentation-client-core.d.ts +2 -2
- package/dist/documentation-client-core.js +15 -14
- package/dist/documentation-client-core.js.map +1 -1
- package/dist/documentation-default-renderer.cjs +33 -33
- package/dist/documentation-react.d.ts +1 -1
- package/dist/documentation-react.js +1 -1
- package/dist/documentation-runtime.js +9 -9
- package/dist/documentation-server-core.d.ts +2 -2
- package/dist/documentation-server-core.js +1 -1
- package/dist/documentation.d.ts +1 -1
- package/dist/documentation.js +106 -63
- package/dist/documentation.js.map +1 -1
- package/dist/{public-BtArwbVM.d.ts → public-CFAj1hL2.d.ts} +1 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.js.map +1 -1
- package/dist/worker.d.ts +1 -1
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-233GQU2H.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { D as DocumentationRuntimeData, a as DocumentationPageComponent, b as DocumentationSiteComponent } from './public-
|
|
3
|
-
export { A as Accordion, c as AccordionGroup, C as Card, d as CodeGroup, e as DefaultDocumentation, f as DocumentationApp, g as DocumentationAppProps, h as DocumentationContent, i as DocumentationSiteProps, I as Info, N as Note, S as Step, j as Steps, T as Tab, k as Tabs, l as Tip, W as Warning } from './public-
|
|
2
|
+
import { D as DocumentationRuntimeData, a as DocumentationPageComponent, b as DocumentationSiteComponent } from './public-CFAj1hL2.js';
|
|
3
|
+
export { A as Accordion, c as AccordionGroup, C as Card, d as CodeGroup, e as DefaultDocumentation, f as DocumentationApp, g as DocumentationAppProps, h as DocumentationContent, i as DocumentationSiteProps, I as Info, N as Note, S as Step, j as Steps, T as Tab, k as Tabs, l as Tip, W as Warning } from './public-CFAj1hL2.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
declare function DocumentationRuntimeRoot({ initialData, loadPage, pages, Site, }: {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
Warning,
|
|
17
17
|
documentationLogicalPath,
|
|
18
18
|
documentationPublicPath
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-A7UFIOWO.js";
|
|
20
20
|
|
|
21
21
|
// src/documentation/runtime/client.tsx
|
|
22
22
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
@@ -90,7 +90,7 @@ function routeDataUrl(url, basePath) {
|
|
|
90
90
|
function scrollToTarget(target, restoredScroll) {
|
|
91
91
|
if (target.hash) {
|
|
92
92
|
const id = decodeURIComponent(target.hash.slice(1));
|
|
93
|
-
document.getElementById(id)?.scrollIntoView();
|
|
93
|
+
document.getElementById(id)?.scrollIntoView({ behavior: "instant", block: "start" });
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
window.scrollTo({ top: restoredScroll ?? 0, behavior: "instant" });
|
|
@@ -272,26 +272,20 @@ function DocumentationRuntimeRoot({
|
|
|
272
272
|
}
|
|
273
273
|
syncDocument(runtime, target);
|
|
274
274
|
renderedLocationRef.current = targetKey;
|
|
275
|
-
|
|
276
|
-
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
277
|
-
if (startViewTransition && !prefersReducedMotion) {
|
|
278
|
-
const transition = startViewTransition(() => {
|
|
279
|
-
flushSync(() => setData(runtime.data));
|
|
280
|
-
});
|
|
281
|
-
await transition.updateCallbackDone;
|
|
282
|
-
} else {
|
|
283
|
-
flushSync(() => setData(runtime.data));
|
|
284
|
-
}
|
|
275
|
+
flushSync(() => setData(runtime.data));
|
|
285
276
|
scrollToTarget(target, historyMode === "none" ? restoredScroll : void 0);
|
|
286
277
|
restoringHistoryRef.current = false;
|
|
287
278
|
replaceHistoryScroll(window.scrollY);
|
|
288
|
-
|
|
279
|
+
const activeElement = document.activeElement;
|
|
280
|
+
const focusInOverlay = activeElement instanceof Element && activeElement.closest(".documentation-assistant, .documentation-assistant-launcher, .documentation-search-dialog");
|
|
281
|
+
if (!focusInOverlay) focusArticleHeading();
|
|
289
282
|
if (navigationId === navigationIdRef.current) setNavigating(false);
|
|
290
283
|
} catch (error) {
|
|
291
284
|
if (navigationId !== navigationIdRef.current) return;
|
|
292
285
|
restoringHistoryRef.current = false;
|
|
293
286
|
console.error("[DeepSpace Documentation] Client navigation failed; falling back to a document navigation", error);
|
|
294
|
-
window.location.
|
|
287
|
+
if (historyMode === "none") window.location.reload();
|
|
288
|
+
else window.location.assign(target.href);
|
|
295
289
|
} finally {
|
|
296
290
|
window.clearTimeout(progressTimer);
|
|
297
291
|
}
|
|
@@ -323,15 +317,22 @@ function DocumentationRuntimeRoot({
|
|
|
323
317
|
const href = anchorFor(event.target)?.getAttribute("href");
|
|
324
318
|
if (href && shouldHandleDocumentationNavigation(href, basePath)) prefetch(href);
|
|
325
319
|
};
|
|
320
|
+
const handleDragStart = (event) => {
|
|
321
|
+
const target = event.target instanceof Element ? event.target : null;
|
|
322
|
+
if (!target || target.closest("[data-prose], .documentation-assistant-messages, input, textarea")) return;
|
|
323
|
+
event.preventDefault();
|
|
324
|
+
};
|
|
326
325
|
root.addEventListener("click", handleClick);
|
|
327
326
|
root.addEventListener("focusin", handlePrefetch);
|
|
328
327
|
root.addEventListener("mouseover", handlePrefetch);
|
|
329
328
|
root.addEventListener("pointerdown", handlePrefetch);
|
|
329
|
+
root.addEventListener("dragstart", handleDragStart);
|
|
330
330
|
return () => {
|
|
331
331
|
root.removeEventListener("click", handleClick);
|
|
332
332
|
root.removeEventListener("focusin", handlePrefetch);
|
|
333
333
|
root.removeEventListener("mouseover", handlePrefetch);
|
|
334
334
|
root.removeEventListener("pointerdown", handlePrefetch);
|
|
335
|
+
root.removeEventListener("dragstart", handleDragStart);
|
|
335
336
|
};
|
|
336
337
|
}, [basePath, navigate, prefetch]);
|
|
337
338
|
useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/documentation/runtime/client.tsx","../src/documentation/runtime/client-document.ts","../src/documentation/resource-path.ts","../src/documentation/runtime/routing.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\nimport { flushSync } from 'react-dom'\nimport { hydrateRoot } from 'react-dom/client'\nimport type { DocumentationRuntimeData, DocumentationRuntimeRouteDocument } from '../types'\nimport { documentationPublicPath } from '../routing'\nimport {\n currentHistoryState,\n currentRuntimeDocument,\n focusArticleHeading,\n locationKey,\n replaceHistoryScroll,\n routeDataUrl,\n scrollToTarget,\n syncDocument,\n type RuntimeDocument,\n} from './client-document'\nimport {\n DefaultDocumentation,\n DocumentationContent,\n type DocumentationPageComponent,\n type DocumentationSiteComponent,\n} from './public'\nimport { shouldHandleDocumentationNavigation } from './routing'\nexport * from './public'\n\n\ntype HistoryMode = 'none' | 'push'\n\nexport function DocumentationRuntimeRoot({\n initialData,\n loadPage,\n pages = {},\n Site = DefaultDocumentation as DocumentationSiteComponent,\n}: {\n initialData: DocumentationRuntimeData\n loadPage?: (route: string) => Promise<void>\n pages?: Record<string, DocumentationPageComponent>\n Site?: DocumentationSiteComponent\n}) {\n const [data, setData] = useState(initialData)\n const basePath = initialData.basePath\n const [navigating, setNavigating] = useState(false)\n const cacheRef = useRef(new Map<string, RuntimeDocument>())\n const inFlightRef = useRef(new Map<string, Promise<RuntimeDocument>>())\n const siteDataRef = useRef({ config: initialData.config, navigation: initialData.navigation })\n const navigationIdRef = useRef(0)\n const restoringHistoryRef = useRef(false)\n const scrollFrameRef = useRef<number | null>(null)\n const renderedLocationRef = useRef(locationKey(new URL(window.location.href)))\n\n useEffect(() => {\n const root = document.getElementById('deepspace-documentation-root')\n root?.setAttribute('data-documentation-hydrated', 'true')\n cacheRef.current.set(locationKey(new URL(window.location.href)), currentRuntimeDocument(initialData))\n const previous = history.scrollRestoration\n history.scrollRestoration = 'manual'\n replaceHistoryScroll(window.scrollY)\n const handleScroll = (): void => {\n if (restoringHistoryRef.current) return\n if (scrollFrameRef.current !== null) return\n scrollFrameRef.current = window.requestAnimationFrame(() => {\n scrollFrameRef.current = null\n replaceHistoryScroll(window.scrollY)\n })\n }\n const handlePopState = (): void => {\n const restoredScroll = currentHistoryState().scrollY\n restoringHistoryRef.current = true\n void navigate(window.location.href, 'none', restoredScroll)\n }\n window.addEventListener('scroll', handleScroll, { passive: true })\n window.addEventListener('popstate', handlePopState)\n return () => {\n window.removeEventListener('scroll', handleScroll)\n window.removeEventListener('popstate', handlePopState)\n if (scrollFrameRef.current !== null) window.cancelAnimationFrame(scrollFrameRef.current)\n history.scrollRestoration = previous\n root?.removeAttribute('data-documentation-hydrated')\n }\n // The initial payload is immutable for the lifetime of this hydrated root.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const load = useCallback(async (target: URL): Promise<RuntimeDocument> => {\n const key = locationKey(target)\n const cached = cacheRef.current.get(key)\n if (cached) return cached\n const pending = inFlightRef.current.get(key)\n if (pending) return pending\n const request = (async (): Promise<RuntimeDocument> => {\n const response = await fetch(routeDataUrl(target, basePath), {\n headers: { Accept: 'application/json', 'x-deepspace-documentation-navigation': 'true' },\n })\n if (!response.ok) throw new Error(`Route data returned ${response.status}`)\n const routeDocument = await response.json() as DocumentationRuntimeRouteDocument\n if (!routeDocument?.data?.page || typeof routeDocument.title !== 'string') {\n throw new Error('Navigation response did not contain valid DeepSpace documentation route data')\n }\n const runtime: RuntimeDocument = {\n ...routeDocument,\n data: { ...siteDataRef.current, ...routeDocument.data },\n }\n cacheRef.current.set(key, runtime)\n return runtime\n })()\n inFlightRef.current.set(key, request)\n try {\n return await request\n } finally {\n if (inFlightRef.current.get(key) === request) inFlightRef.current.delete(key)\n }\n }, [basePath])\n\n const navigate = useCallback(async (\n href: string,\n historyMode: HistoryMode = 'push',\n restoredScroll?: number,\n ): Promise<void> => {\n const target = new URL(href, window.location.href)\n if (target.origin !== window.location.origin) {\n window.location.assign(target.href)\n return\n }\n const currentUrl = new URL(window.location.href)\n const targetKey = locationKey(target)\n if (targetKey === renderedLocationRef.current) {\n if (historyMode === 'push' && target.href !== currentUrl.href) {\n replaceHistoryScroll(window.scrollY)\n history.pushState({ deepspaceDocumentation: true, scrollY: 0 }, '', target.href)\n }\n scrollToTarget(target, historyMode === 'none' ? restoredScroll : undefined)\n restoringHistoryRef.current = false\n replaceHistoryScroll(window.scrollY)\n return\n }\n\n const navigationId = ++navigationIdRef.current\n const progressTimer = window.setTimeout(() => {\n if (navigationId === navigationIdRef.current) setNavigating(true)\n }, 120)\n try {\n const runtime = await load(target)\n await loadPage?.(runtime.data.page.route)\n if (navigationId !== navigationIdRef.current) return\n if (historyMode === 'push') {\n replaceHistoryScroll(window.scrollY)\n history.pushState({ deepspaceDocumentation: true, scrollY: 0 }, '', target.href)\n }\n syncDocument(runtime, target)\n renderedLocationRef.current = targetKey\n const startViewTransition = typeof document.startViewTransition === 'function'\n ? document.startViewTransition.bind(document)\n : undefined\n const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches\n if (startViewTransition && !prefersReducedMotion) {\n const transition = startViewTransition(() => {\n flushSync(() => setData(runtime.data))\n })\n await transition.updateCallbackDone\n } else {\n flushSync(() => setData(runtime.data))\n }\n scrollToTarget(target, historyMode === 'none' ? restoredScroll : undefined)\n restoringHistoryRef.current = false\n replaceHistoryScroll(window.scrollY)\n focusArticleHeading()\n if (navigationId === navigationIdRef.current) setNavigating(false)\n } catch (error) {\n if (navigationId !== navigationIdRef.current) return\n restoringHistoryRef.current = false\n console.error('[DeepSpace Documentation] Client navigation failed; falling back to a document navigation', error)\n window.location.assign(target.href)\n } finally {\n window.clearTimeout(progressTimer)\n }\n }, [load, loadPage])\n\n const prefetch = useCallback((href: string): void => {\n const target = new URL(href, window.location.href)\n if (target.origin !== window.location.origin || cacheRef.current.has(locationKey(target))) return\n void load(target).then((runtime) => loadPage?.(runtime.data.page.route)).catch(() => {\n // Prefetch is opportunistic; an explicit navigation still retries.\n })\n }, [load, loadPage])\n\n useEffect(() => {\n const root = document.getElementById('deepspace-documentation-root')\n if (!root) return\n const anchorFor = (target: EventTarget | null): HTMLAnchorElement | null =>\n target instanceof Element ? target.closest<HTMLAnchorElement>('a[href]') : null\n const handleClick = (event: MouseEvent): void => {\n if (event.defaultPrevented || event.button !== 0) return\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return\n const anchor = anchorFor(event.target)\n if (!anchor || anchor.target || anchor.hasAttribute('download')) return\n const href = anchor.getAttribute('href')\n if (!href || !shouldHandleDocumentationNavigation(href, basePath)) return\n const url = new URL(href, window.location.href)\n if (url.origin !== window.location.origin) return\n if (url.pathname === window.location.pathname && url.search === window.location.search && url.hash) return\n event.preventDefault()\n void navigate(`${url.pathname}${url.search}${url.hash}`)\n }\n const handlePrefetch = (event: Event): void => {\n const href = anchorFor(event.target)?.getAttribute('href')\n if (href && shouldHandleDocumentationNavigation(href, basePath)) prefetch(href)\n }\n root.addEventListener('click', handleClick)\n root.addEventListener('focusin', handlePrefetch)\n root.addEventListener('mouseover', handlePrefetch)\n root.addEventListener('pointerdown', handlePrefetch)\n return () => {\n root.removeEventListener('click', handleClick)\n root.removeEventListener('focusin', handlePrefetch)\n root.removeEventListener('mouseover', handlePrefetch)\n root.removeEventListener('pointerdown', handlePrefetch)\n }\n }, [basePath, navigate, prefetch])\n\n useEffect(() => {\n const timer = window.setTimeout(() => {\n if (data.previous) prefetch(documentationPublicPath(basePath, data.previous.route))\n if (data.next) prefetch(documentationPublicPath(basePath, data.next.route))\n }, 350)\n return () => window.clearTimeout(timer)\n }, [basePath, data.next, data.page.route, data.previous, prefetch])\n\n const content = <DocumentationContent Page={pages[data.page.route]} data={data} />\n return (\n <Site\n data={data}\n navigating={navigating}\n onNavigate={(href) => { void navigate(href) }}\n onPrefetch={prefetch}\n >\n {content}\n </Site>\n )\n}\n\n\nlet hydrated = false\n\nexport function hydrateDocumentation({\n loadPage,\n pages,\n Site,\n}: {\n loadPage?: (route: string) => Promise<void>\n pages?: Record<string, DocumentationPageComponent>\n Site?: DocumentationSiteComponent\n} = {}): void {\n const root = document.getElementById('deepspace-documentation-root')\n const payload = document.getElementById('deepspace-documentation-data')\n if (hydrated || !root || !payload?.textContent) return\n try {\n const initialData = JSON.parse(payload.textContent) as DocumentationRuntimeData\n hydrated = true\n hydrateRoot(root, <DocumentationRuntimeRoot initialData={initialData} loadPage={loadPage} pages={pages} Site={Site} />)\n } catch (error) {\n root.setAttribute('data-hydration-error', 'true')\n console.error('[DeepSpace Documentation] Unable to hydrate the documentation surface', error)\n }\n}\n","import type { DocumentationRuntimeData, DocumentationRuntimeRouteDocument } from '../types'\nimport { documentationLogicalPath, documentationPublicPath } from '../routing'\n\nexport interface RuntimeDocument extends Omit<DocumentationRuntimeRouteDocument, 'data'> {\n data: DocumentationRuntimeData\n}\n\nexport interface DocumentationHistoryState {\n deepspaceDocumentation?: boolean\n scrollY?: number\n [key: string]: unknown\n}\n\nexport function currentRuntimeDocument(data: DocumentationRuntimeData): RuntimeDocument {\n return {\n canonical: document.querySelector<HTMLLinkElement>('link[rel=\"canonical\"]')?.href ?? null,\n data,\n description: document.querySelector<HTMLMetaElement>('meta[name=\"description\"]')?.content ?? null,\n openGraph: readOpenGraph(document),\n robots: document.querySelector<HTMLMetaElement>('meta[name=\"robots\"]')?.content ?? null,\n title: document.title,\n }\n}\n\nexport function syncDocument(runtime: RuntimeDocument, target: URL): void {\n document.title = runtime.title\n syncMeta('description', runtime.description)\n syncMeta('robots', runtime.robots)\n syncLink('canonical', runtime.canonical)\n for (const property of ['og:title', 'og:description', 'og:url'] as const) {\n syncMeta(property, runtime.openGraph[property], 'property')\n }\n document.body.dataset.route = runtime.data.page.route === '/404'\n ? target.pathname\n : runtime.data.page.route\n}\n\nfunction readOpenGraph(source: Document): DocumentationRuntimeRouteDocument['openGraph'] {\n return Object.fromEntries(\n ['og:title', 'og:description', 'og:url'].map((property) => [\n property,\n source.querySelector<HTMLMetaElement>(`meta[property=\"${property}\"]`)?.content ?? null,\n ]),\n ) as DocumentationRuntimeRouteDocument['openGraph']\n}\n\nfunction syncMeta(name: string, content: string | null, attribute: 'name' | 'property' = 'name'): void {\n let element = document.head.querySelector<HTMLMetaElement>(`meta[${attribute}=\"${name}\"]`)\n if (!content) {\n element?.remove()\n return\n }\n if (!element) {\n element = document.createElement('meta')\n element.setAttribute(attribute, name)\n document.head.appendChild(element)\n }\n element.content = content\n}\n\nfunction syncLink(rel: string, href: string | null): void {\n let element = document.head.querySelector<HTMLLinkElement>(`link[rel=\"${rel}\"]`)\n if (!href) {\n element?.remove()\n return\n }\n if (!element) {\n element = document.createElement('link')\n element.rel = rel\n document.head.appendChild(element)\n }\n element.href = href\n}\n\nexport function locationKey(url: URL): string {\n return `${url.pathname}${url.search}`\n}\n\nexport function routeDataUrl(url: URL, basePath: string): string {\n const logical = documentationLogicalPath(basePath, url.pathname)\n if (logical === null) throw new Error(`${url.pathname} is outside the documentation route`)\n const clean = logical.replace(/^\\/+|\\/+$/g, '')\n return `${documentationPublicPath(basePath, `/data/${clean || 'index'}.json`)}${url.search}`\n}\n\nexport function scrollToTarget(target: URL, restoredScroll?: number): void {\n if (target.hash) {\n const id = decodeURIComponent(target.hash.slice(1))\n document.getElementById(id)?.scrollIntoView()\n return\n }\n window.scrollTo({ top: restoredScroll ?? 0, behavior: 'instant' })\n}\n\nexport function currentHistoryState(): DocumentationHistoryState {\n return history.state && typeof history.state === 'object'\n ? history.state as DocumentationHistoryState\n : {}\n}\n\nexport function replaceHistoryScroll(scrollY: number): void {\n history.replaceState(\n { ...currentHistoryState(), deepspaceDocumentation: true, scrollY },\n '',\n window.location.href,\n )\n}\n\nexport function focusArticleHeading(): void {\n const heading = document.querySelector<HTMLElement>('.documentation-article h1')\n if (!heading) return\n heading.tabIndex = -1\n heading.focus({ preventScroll: true })\n}\n","const RESOURCE_EXTENSIONS = new Set([\n '7z', 'avif', 'css', 'csv', 'gif', 'gz', 'ico', 'jpeg', 'jpg', 'js', 'json', 'map',\n 'md', 'mjs', 'mp3', 'mp4', 'pdf', 'png', 'svg', 'tar', 'txt', 'wasm', 'webm',\n 'webp', 'woff', 'woff2', 'xml', 'yaml', 'yml', 'zip',\n])\n\n/** Distinguish generated documentation resources from authored page routes. */\nexport function isNativeDocumentationResourcePath(pathname: string): boolean {\n const leaf = pathname.slice(pathname.lastIndexOf('/') + 1)\n const extension = leaf.includes('.') ? leaf.slice(leaf.lastIndexOf('.') + 1).toLowerCase() : ''\n return extension !== '' && RESOURCE_EXTENSIONS.has(extension)\n}\n\n/** Encode a compiler-owned logical path without collapsing its segment boundaries. */\nexport function encodeNativeDocumentationPath(pathname: string): string {\n return pathname.split('/').map((segment) => encodeURIComponent(segment)).join('/')\n}\n\n/** Normalize one URL pathname while preserving encoded slashes as data, not separators. */\nexport function canonicalNativeDocumentationRequestPath(pathname: string): string | null {\n try {\n return pathname\n .split('/')\n .map((segment) => encodeURIComponent(decodeURIComponent(segment)))\n .join('/')\n } catch {\n return null\n }\n}\n","import { documentationLogicalPath } from '../routing'\nimport { isNativeDocumentationResourcePath } from '../resource-path'\n\nconst RESOURCE_ROUTES = new Set(['/mcp'])\nconst RESOURCE_PREFIXES = ['/api/', '/assets/', '/data/', '/media/', '/.well-known/'] as const\n\n/** Return true only for pages compiled into the client-side documentation graph. */\nexport function shouldHandleDocumentationNavigation(href: string, basePath = '/docs'): boolean {\n if (!href.startsWith('/') || href.startsWith('//')) return false\n const pathname = href.split(/[?#]/, 1)[0] ?? ''\n const logical = documentationLogicalPath(basePath, pathname)\n if (!logical || RESOURCE_ROUTES.has(logical)) return false\n if (RESOURCE_PREFIXES.some((prefix) => logical.startsWith(prefix))) return false\n return !isNativeDocumentationResourcePath(logical)\n}\n"],"mappings":";;;;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OAAO,aAAa,KAAK;AAAA,EACxC,GAAG,CAAC,UAAU,KAAK,MAAM,KAAK,KAAK,OAAO,KAAK,UAAU,QAAQ,CAAC;AAElE,QAAM,UAAU,oBAAC,wBAAqB,MAAM,MAAM,KAAK,KAAK,KAAK,GAAG,MAAY;AAChF,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,YAAY,CAAC,SAAS;AAAE,aAAK,SAAS,IAAI;AAAA,MAAE;AAAA,MAC5C,YAAY;AAAA,MAEX;AAAA;AAAA,EACH;AAEJ;AAGA,IAAI,WAAW;AAER,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AACF,IAII,CAAC,GAAS;AACZ,QAAM,OAAO,SAAS,eAAe,8BAA8B;AACnE,QAAM,UAAU,SAAS,eAAe,8BAA8B;AACtE,MAAI,YAAY,CAAC,QAAQ,CAAC,SAAS,YAAa;AAChD,MAAI;AACF,UAAM,cAAc,KAAK,MAAM,QAAQ,WAAW;AAClD,eAAW;AACX,gBAAY,MAAM,oBAAC,4BAAyB,aAA0B,UAAoB,OAAc,MAAY,CAAE;AAAA,EACxH,SAAS,OAAO;AACd,SAAK,aAAa,wBAAwB,MAAM;AAChD,YAAQ,MAAM,yEAAyE,KAAK;AAAA,EAC9F;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/documentation/runtime/client.tsx","../src/documentation/runtime/client-document.ts","../src/documentation/resource-path.ts","../src/documentation/runtime/routing.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\nimport { flushSync } from 'react-dom'\nimport { hydrateRoot } from 'react-dom/client'\nimport type { DocumentationRuntimeData, DocumentationRuntimeRouteDocument } from '../types'\nimport { documentationPublicPath } from '../routing'\nimport {\n currentHistoryState,\n currentRuntimeDocument,\n focusArticleHeading,\n locationKey,\n replaceHistoryScroll,\n routeDataUrl,\n scrollToTarget,\n syncDocument,\n type RuntimeDocument,\n} from './client-document'\nimport {\n DefaultDocumentation,\n DocumentationContent,\n type DocumentationPageComponent,\n type DocumentationSiteComponent,\n} from './public'\nimport { shouldHandleDocumentationNavigation } from './routing'\nexport * from './public'\n\n\ntype HistoryMode = 'none' | 'push'\n\nexport function DocumentationRuntimeRoot({\n initialData,\n loadPage,\n pages = {},\n Site = DefaultDocumentation as DocumentationSiteComponent,\n}: {\n initialData: DocumentationRuntimeData\n loadPage?: (route: string) => Promise<void>\n pages?: Record<string, DocumentationPageComponent>\n Site?: DocumentationSiteComponent\n}) {\n const [data, setData] = useState(initialData)\n const basePath = initialData.basePath\n const [navigating, setNavigating] = useState(false)\n const cacheRef = useRef(new Map<string, RuntimeDocument>())\n const inFlightRef = useRef(new Map<string, Promise<RuntimeDocument>>())\n const siteDataRef = useRef({ config: initialData.config, navigation: initialData.navigation })\n const navigationIdRef = useRef(0)\n const restoringHistoryRef = useRef(false)\n const scrollFrameRef = useRef<number | null>(null)\n const renderedLocationRef = useRef(locationKey(new URL(window.location.href)))\n\n useEffect(() => {\n const root = document.getElementById('deepspace-documentation-root')\n root?.setAttribute('data-documentation-hydrated', 'true')\n cacheRef.current.set(locationKey(new URL(window.location.href)), currentRuntimeDocument(initialData))\n const previous = history.scrollRestoration\n history.scrollRestoration = 'manual'\n replaceHistoryScroll(window.scrollY)\n const handleScroll = (): void => {\n if (restoringHistoryRef.current) return\n if (scrollFrameRef.current !== null) return\n scrollFrameRef.current = window.requestAnimationFrame(() => {\n scrollFrameRef.current = null\n replaceHistoryScroll(window.scrollY)\n })\n }\n const handlePopState = (): void => {\n const restoredScroll = currentHistoryState().scrollY\n restoringHistoryRef.current = true\n void navigate(window.location.href, 'none', restoredScroll)\n }\n window.addEventListener('scroll', handleScroll, { passive: true })\n window.addEventListener('popstate', handlePopState)\n return () => {\n window.removeEventListener('scroll', handleScroll)\n window.removeEventListener('popstate', handlePopState)\n if (scrollFrameRef.current !== null) window.cancelAnimationFrame(scrollFrameRef.current)\n history.scrollRestoration = previous\n root?.removeAttribute('data-documentation-hydrated')\n }\n // The initial payload is immutable for the lifetime of this hydrated root.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const load = useCallback(async (target: URL): Promise<RuntimeDocument> => {\n const key = locationKey(target)\n const cached = cacheRef.current.get(key)\n if (cached) return cached\n const pending = inFlightRef.current.get(key)\n if (pending) return pending\n const request = (async (): Promise<RuntimeDocument> => {\n const response = await fetch(routeDataUrl(target, basePath), {\n headers: { Accept: 'application/json', 'x-deepspace-documentation-navigation': 'true' },\n })\n if (!response.ok) throw new Error(`Route data returned ${response.status}`)\n const routeDocument = await response.json() as DocumentationRuntimeRouteDocument\n if (!routeDocument?.data?.page || typeof routeDocument.title !== 'string') {\n throw new Error('Navigation response did not contain valid DeepSpace documentation route data')\n }\n const runtime: RuntimeDocument = {\n ...routeDocument,\n data: { ...siteDataRef.current, ...routeDocument.data },\n }\n cacheRef.current.set(key, runtime)\n return runtime\n })()\n inFlightRef.current.set(key, request)\n try {\n return await request\n } finally {\n if (inFlightRef.current.get(key) === request) inFlightRef.current.delete(key)\n }\n }, [basePath])\n\n const navigate = useCallback(async (\n href: string,\n historyMode: HistoryMode = 'push',\n restoredScroll?: number,\n ): Promise<void> => {\n const target = new URL(href, window.location.href)\n if (target.origin !== window.location.origin) {\n window.location.assign(target.href)\n return\n }\n const currentUrl = new URL(window.location.href)\n const targetKey = locationKey(target)\n if (targetKey === renderedLocationRef.current) {\n if (historyMode === 'push' && target.href !== currentUrl.href) {\n replaceHistoryScroll(window.scrollY)\n history.pushState({ deepspaceDocumentation: true, scrollY: 0 }, '', target.href)\n }\n scrollToTarget(target, historyMode === 'none' ? restoredScroll : undefined)\n restoringHistoryRef.current = false\n replaceHistoryScroll(window.scrollY)\n return\n }\n\n const navigationId = ++navigationIdRef.current\n const progressTimer = window.setTimeout(() => {\n if (navigationId === navigationIdRef.current) setNavigating(true)\n }, 120)\n try {\n const runtime = await load(target)\n await loadPage?.(runtime.data.page.route)\n if (navigationId !== navigationIdRef.current) return\n if (historyMode === 'push') {\n replaceHistoryScroll(window.scrollY)\n history.pushState({ deepspaceDocumentation: true, scrollY: 0 }, '', target.href)\n }\n syncDocument(runtime, target)\n renderedLocationRef.current = targetKey\n // The swap is a cut: one synchronous commit with the scroll applied in\n // the same frame, so from a settled scroll exactly [oldY, 0] is ever\n // observable and the new page never composites at the old offset.\n // Anything softer — fades, slides, view transitions — draws two bodies\n // of text at once and reads as ghosting. Navigation feedback belongs to\n // the chrome progress bar, never the prose.\n flushSync(() => setData(runtime.data))\n scrollToTarget(target, historyMode === 'none' ? restoredScroll : undefined)\n restoringHistoryRef.current = false\n replaceHistoryScroll(window.scrollY)\n // Moving focus is for the reading flow; never steal it from someone\n // mid-thought in the assistant, launcher, or search input.\n const activeElement = document.activeElement\n const focusInOverlay = activeElement instanceof Element\n && activeElement.closest('.documentation-assistant, .documentation-assistant-launcher, .documentation-search-dialog')\n if (!focusInOverlay) focusArticleHeading()\n if (navigationId === navigationIdRef.current) setNavigating(false)\n } catch (error) {\n if (navigationId !== navigationIdRef.current) return\n restoringHistoryRef.current = false\n console.error('[DeepSpace Documentation] Client navigation failed; falling back to a document navigation', error)\n // On popstate the URL already matches, so assign() to a hash URL would\n // be a same-document no-op that leaves stale content in place.\n if (historyMode === 'none') window.location.reload()\n else window.location.assign(target.href)\n } finally {\n window.clearTimeout(progressTimer)\n }\n }, [load, loadPage])\n\n const prefetch = useCallback((href: string): void => {\n const target = new URL(href, window.location.href)\n if (target.origin !== window.location.origin || cacheRef.current.has(locationKey(target))) return\n void load(target).then((runtime) => loadPage?.(runtime.data.page.route)).catch(() => {\n // Prefetch is opportunistic; an explicit navigation still retries.\n })\n }, [load, loadPage])\n\n useEffect(() => {\n const root = document.getElementById('deepspace-documentation-root')\n if (!root) return\n const anchorFor = (target: EventTarget | null): HTMLAnchorElement | null =>\n target instanceof Element ? target.closest<HTMLAnchorElement>('a[href]') : null\n const handleClick = (event: MouseEvent): void => {\n if (event.defaultPrevented || event.button !== 0) return\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return\n const anchor = anchorFor(event.target)\n if (!anchor || anchor.target || anchor.hasAttribute('download')) return\n const href = anchor.getAttribute('href')\n if (!href || !shouldHandleDocumentationNavigation(href, basePath)) return\n const url = new URL(href, window.location.href)\n if (url.origin !== window.location.origin) return\n if (url.pathname === window.location.pathname && url.search === window.location.search && url.hash) return\n event.preventDefault()\n void navigate(`${url.pathname}${url.search}${url.hash}`)\n }\n const handlePrefetch = (event: Event): void => {\n const href = anchorFor(event.target)?.getAttribute('href')\n if (href && shouldHandleDocumentationNavigation(href, basePath)) prefetch(href)\n }\n const handleDragStart = (event: DragEvent): void => {\n const target = event.target instanceof Element ? event.target : null\n // Dragging stays a content feature (prose links and images, assistant\n // answers); a press-and-drag on chrome — sidebar, outline, pagination,\n // header — must never spawn the native floating link ghost.\n if (!target || target.closest('[data-prose], .documentation-assistant-messages, input, textarea')) return\n event.preventDefault()\n }\n root.addEventListener('click', handleClick)\n root.addEventListener('focusin', handlePrefetch)\n root.addEventListener('mouseover', handlePrefetch)\n root.addEventListener('pointerdown', handlePrefetch)\n root.addEventListener('dragstart', handleDragStart)\n return () => {\n root.removeEventListener('click', handleClick)\n root.removeEventListener('focusin', handlePrefetch)\n root.removeEventListener('mouseover', handlePrefetch)\n root.removeEventListener('pointerdown', handlePrefetch)\n root.removeEventListener('dragstart', handleDragStart)\n }\n }, [basePath, navigate, prefetch])\n\n useEffect(() => {\n const timer = window.setTimeout(() => {\n if (data.previous) prefetch(documentationPublicPath(basePath, data.previous.route))\n if (data.next) prefetch(documentationPublicPath(basePath, data.next.route))\n }, 350)\n return () => window.clearTimeout(timer)\n }, [basePath, data.next, data.page.route, data.previous, prefetch])\n\n const content = <DocumentationContent Page={pages[data.page.route]} data={data} />\n return (\n <Site\n data={data}\n navigating={navigating}\n onNavigate={(href) => { void navigate(href) }}\n onPrefetch={prefetch}\n >\n {content}\n </Site>\n )\n}\n\n\nlet hydrated = false\n\nexport function hydrateDocumentation({\n loadPage,\n pages,\n Site,\n}: {\n loadPage?: (route: string) => Promise<void>\n pages?: Record<string, DocumentationPageComponent>\n Site?: DocumentationSiteComponent\n} = {}): void {\n const root = document.getElementById('deepspace-documentation-root')\n const payload = document.getElementById('deepspace-documentation-data')\n if (hydrated || !root || !payload?.textContent) return\n try {\n const initialData = JSON.parse(payload.textContent) as DocumentationRuntimeData\n hydrated = true\n hydrateRoot(root, <DocumentationRuntimeRoot initialData={initialData} loadPage={loadPage} pages={pages} Site={Site} />)\n } catch (error) {\n root.setAttribute('data-hydration-error', 'true')\n console.error('[DeepSpace Documentation] Unable to hydrate the documentation surface', error)\n }\n}\n","import type { DocumentationRuntimeData, DocumentationRuntimeRouteDocument } from '../types'\nimport { documentationLogicalPath, documentationPublicPath } from '../routing'\n\nexport interface RuntimeDocument extends Omit<DocumentationRuntimeRouteDocument, 'data'> {\n data: DocumentationRuntimeData\n}\n\nexport interface DocumentationHistoryState {\n deepspaceDocumentation?: boolean\n scrollY?: number\n [key: string]: unknown\n}\n\nexport function currentRuntimeDocument(data: DocumentationRuntimeData): RuntimeDocument {\n return {\n canonical: document.querySelector<HTMLLinkElement>('link[rel=\"canonical\"]')?.href ?? null,\n data,\n description: document.querySelector<HTMLMetaElement>('meta[name=\"description\"]')?.content ?? null,\n openGraph: readOpenGraph(document),\n robots: document.querySelector<HTMLMetaElement>('meta[name=\"robots\"]')?.content ?? null,\n title: document.title,\n }\n}\n\nexport function syncDocument(runtime: RuntimeDocument, target: URL): void {\n document.title = runtime.title\n syncMeta('description', runtime.description)\n syncMeta('robots', runtime.robots)\n syncLink('canonical', runtime.canonical)\n for (const property of ['og:title', 'og:description', 'og:url'] as const) {\n syncMeta(property, runtime.openGraph[property], 'property')\n }\n document.body.dataset.route = runtime.data.page.route === '/404'\n ? target.pathname\n : runtime.data.page.route\n}\n\nfunction readOpenGraph(source: Document): DocumentationRuntimeRouteDocument['openGraph'] {\n return Object.fromEntries(\n ['og:title', 'og:description', 'og:url'].map((property) => [\n property,\n source.querySelector<HTMLMetaElement>(`meta[property=\"${property}\"]`)?.content ?? null,\n ]),\n ) as DocumentationRuntimeRouteDocument['openGraph']\n}\n\nfunction syncMeta(name: string, content: string | null, attribute: 'name' | 'property' = 'name'): void {\n let element = document.head.querySelector<HTMLMetaElement>(`meta[${attribute}=\"${name}\"]`)\n if (!content) {\n element?.remove()\n return\n }\n if (!element) {\n element = document.createElement('meta')\n element.setAttribute(attribute, name)\n document.head.appendChild(element)\n }\n element.content = content\n}\n\nfunction syncLink(rel: string, href: string | null): void {\n let element = document.head.querySelector<HTMLLinkElement>(`link[rel=\"${rel}\"]`)\n if (!href) {\n element?.remove()\n return\n }\n if (!element) {\n element = document.createElement('link')\n element.rel = rel\n document.head.appendChild(element)\n }\n element.href = href\n}\n\nexport function locationKey(url: URL): string {\n return `${url.pathname}${url.search}`\n}\n\nexport function routeDataUrl(url: URL, basePath: string): string {\n const logical = documentationLogicalPath(basePath, url.pathname)\n if (logical === null) throw new Error(`${url.pathname} is outside the documentation route`)\n const clean = logical.replace(/^\\/+|\\/+$/g, '')\n return `${documentationPublicPath(basePath, `/data/${clean || 'index'}.json`)}${url.search}`\n}\n\nexport function scrollToTarget(target: URL, restoredScroll?: number): void {\n if (target.hash) {\n const id = decodeURIComponent(target.hash.slice(1))\n // Instant: this path runs only on cross-page/popstate arrivals, where the\n // page just swapped — inheriting the CSS smooth behavior glides across a\n // brand-new document. Same-page anchor clicks never reach here.\n document.getElementById(id)?.scrollIntoView({ behavior: 'instant', block: 'start' })\n return\n }\n window.scrollTo({ top: restoredScroll ?? 0, behavior: 'instant' })\n}\n\nexport function currentHistoryState(): DocumentationHistoryState {\n return history.state && typeof history.state === 'object'\n ? history.state as DocumentationHistoryState\n : {}\n}\n\nexport function replaceHistoryScroll(scrollY: number): void {\n history.replaceState(\n { ...currentHistoryState(), deepspaceDocumentation: true, scrollY },\n '',\n window.location.href,\n )\n}\n\nexport function focusArticleHeading(): void {\n const heading = document.querySelector<HTMLElement>('.documentation-article h1')\n if (!heading) return\n heading.tabIndex = -1\n heading.focus({ preventScroll: true })\n}\n","const RESOURCE_EXTENSIONS = new Set([\n '7z', 'avif', 'css', 'csv', 'gif', 'gz', 'ico', 'jpeg', 'jpg', 'js', 'json', 'map',\n 'md', 'mjs', 'mp3', 'mp4', 'pdf', 'png', 'svg', 'tar', 'txt', 'wasm', 'webm',\n 'webp', 'woff', 'woff2', 'xml', 'yaml', 'yml', 'zip',\n])\n\n/** Distinguish generated documentation resources from authored page routes. */\nexport function isNativeDocumentationResourcePath(pathname: string): boolean {\n const leaf = pathname.slice(pathname.lastIndexOf('/') + 1)\n const extension = leaf.includes('.') ? leaf.slice(leaf.lastIndexOf('.') + 1).toLowerCase() : ''\n return extension !== '' && RESOURCE_EXTENSIONS.has(extension)\n}\n\n/** Encode a compiler-owned logical path without collapsing its segment boundaries. */\nexport function encodeNativeDocumentationPath(pathname: string): string {\n return pathname.split('/').map((segment) => encodeURIComponent(segment)).join('/')\n}\n\n/** Normalize one URL pathname while preserving encoded slashes as data, not separators. */\nexport function canonicalNativeDocumentationRequestPath(pathname: string): string | null {\n try {\n return pathname\n .split('/')\n .map((segment) => encodeURIComponent(decodeURIComponent(segment)))\n .join('/')\n } catch {\n return null\n }\n}\n","import { documentationLogicalPath } from '../routing'\nimport { isNativeDocumentationResourcePath } from '../resource-path'\n\nconst RESOURCE_ROUTES = new Set(['/mcp'])\nconst RESOURCE_PREFIXES = ['/api/', '/assets/', '/data/', '/media/', '/.well-known/'] as const\n\n/** Return true only for pages compiled into the client-side documentation graph. */\nexport function shouldHandleDocumentationNavigation(href: string, basePath = '/docs'): boolean {\n if (!href.startsWith('/') || href.startsWith('//')) return false\n const pathname = href.split(/[?#]/, 1)[0] ?? ''\n const logical = documentationLogicalPath(basePath, pathname)\n if (!logical || RESOURCE_ROUTES.has(logical)) return false\n if (RESOURCE_PREFIXES.some((prefix) => logical.startsWith(prefix))) return false\n return !isNativeDocumentationResourcePath(logical)\n}\n"],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