deepspace 0.10.0 → 0.10.2

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{chunk-DQ4G6VL6.js → chunk-T7V4GUIN.js} +283 -180
  3. package/dist/chunk-T7V4GUIN.js.map +1 -0
  4. package/dist/cli.js +1010 -6123
  5. package/dist/cli.js.map +1 -1
  6. package/dist/documentation-client-core.d.ts +18 -0
  7. package/dist/{docs-client-core.js → documentation-client-core.js} +60 -51
  8. package/dist/documentation-client-core.js.map +1 -0
  9. package/dist/documentation-default-renderer.cjs +124 -0
  10. package/dist/documentation-react.d.ts +2 -0
  11. package/dist/{docs-react.js → documentation-react.js} +8 -8
  12. package/dist/documentation-runtime.js +71 -0
  13. package/dist/documentation-server-core.d.ts +11 -0
  14. package/dist/{docs-server-core.js → documentation-server-core.js} +13 -13
  15. package/dist/documentation-server-core.js.map +1 -0
  16. package/dist/documentation.d.ts +366 -0
  17. package/dist/documentation.js +3953 -0
  18. package/dist/documentation.js.map +1 -0
  19. package/dist/feature-installer.js +145 -0
  20. package/dist/feature-installer.js.map +1 -1
  21. package/dist/index.d.ts +6 -8
  22. package/dist/index.js +5 -15
  23. package/dist/index.js.map +1 -1
  24. package/dist/public-BGRX_Cjd.d.ts +234 -0
  25. package/dist/schema.d.ts +186 -0
  26. package/dist/schema.js +610 -0
  27. package/dist/schema.js.map +1 -0
  28. package/dist/server.d.ts +19 -167
  29. package/dist/server.js +76 -1069
  30. package/dist/server.js.map +1 -1
  31. package/dist/testing.d.ts +5 -8
  32. package/dist/testing.js +48 -14
  33. package/dist/testing.js.map +1 -1
  34. package/dist/worker.d.ts +52 -173
  35. package/dist/worker.js +563 -492
  36. package/dist/worker.js.map +1 -1
  37. package/features/admin-page/src/admin-schema.ts +1 -1
  38. package/features/ai-chat/feature.json +2 -2
  39. package/features/ai-chat/src/ChatPanel.tsx +0 -1
  40. package/features/ai-chat/src/ai-chat-schema.ts +1 -2
  41. package/features/canvas/src/canvas-schema.ts +1 -1
  42. package/features/documentation/content/index.mdx +14 -0
  43. package/features/documentation/content/quickstart.mdx +12 -0
  44. package/features/documentation/documentation.json +18 -0
  45. package/features/documentation/feature.json +68 -0
  46. package/features/{docs → documents}/feature.json +27 -27
  47. package/features/{docs/src/DocsEditorPage.tsx → documents/src/DocumentsEditorPage.tsx} +74 -74
  48. package/features/{docs/src/DocsListPage.tsx → documents/src/DocumentsListPage.tsx} +102 -102
  49. package/features/{docs/src/DocsOutlinePanel.tsx → documents/src/DocumentsOutlinePanel.tsx} +9 -9
  50. package/features/{docs/src/DocsPresence.tsx → documents/src/DocumentsPresence.tsx} +18 -18
  51. package/features/{docs → documents}/src/InviteDialog.tsx +21 -21
  52. package/features/{docs → documents}/src/LibrarySidebar.tsx +25 -25
  53. package/features/documents/src/__tests__/documents-presence-access.test.ts +71 -0
  54. package/features/{docs/src/docs-library-types.ts → documents/src/documents-library-types.ts} +3 -3
  55. package/features/{docs/src/docs-schema.ts → documents/src/documents-schema.ts} +6 -6
  56. package/features/{docs/src/docs-ui.css → documents/src/documents-ui.css} +89 -89
  57. package/features/{docs → documents}/src/editor/DocEditorSurface.tsx +11 -11
  58. package/features/{docs/src/editor/DocsTiptapToolbar.tsx → documents/src/editor/DocumentsTiptapToolbar.tsx} +21 -21
  59. package/features/{docs → documents}/src/editor/useDocEditor.ts +4 -4
  60. package/features/{docs/src/use-docs-presence-access.ts → documents/src/use-documents-presence-access.ts} +51 -51
  61. package/features/file-attachments/src/attachments-schema.ts +1 -1
  62. package/features/items/src/items-schema.ts +1 -1
  63. package/features/leaderboard/src/leaderboard-schema.ts +1 -1
  64. package/features/messaging/src/ChatMultiPage.tsx +1 -1
  65. package/features/messaging/src/ChatPage.tsx +1 -1
  66. package/features/messaging/src/messaging-schema.ts +2 -2
  67. package/features/tasks/src/tasks-schema.ts +1 -1
  68. package/features/testing/src/test-schema.ts +2 -2
  69. package/package.json +12 -7
  70. package/dist/chunk-DQ4G6VL6.js.map +0 -1
  71. package/dist/docs-client-core.d.ts +0 -18
  72. package/dist/docs-client-core.js.map +0 -1
  73. package/dist/docs-react.d.ts +0 -2
  74. package/dist/docs-runtime.js +0 -71
  75. package/dist/docs-server-core.d.ts +0 -11
  76. package/dist/docs-server-core.js.map +0 -1
  77. package/dist/docs.d.ts +0 -350
  78. package/dist/docs.js +0 -5139
  79. package/dist/docs.js.map +0 -1
  80. package/dist/public-Cp1X8ZQ3.d.ts +0 -230
  81. package/features/docs/src/__tests__/docs-presence-access.test.ts +0 -71
  82. /package/dist/{docs-react.js.map → documentation-react.js.map} +0 -0
@@ -0,0 +1,18 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { D as DocumentationRuntimeData, a as DocumentationPageComponent, b as DocumentationSiteComponent } from './public-BGRX_Cjd.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-BGRX_Cjd.js';
4
+ import 'react';
5
+
6
+ declare function DocumentationRuntimeRoot({ initialData, loadPage, pages, Site, }: {
7
+ initialData: DocumentationRuntimeData;
8
+ loadPage?: (route: string) => Promise<void>;
9
+ pages?: Record<string, DocumentationPageComponent>;
10
+ Site?: DocumentationSiteComponent;
11
+ }): react_jsx_runtime.JSX.Element;
12
+ declare function hydrateDocumentation({ loadPage, pages, Site, }?: {
13
+ loadPage?: (route: string) => Promise<void>;
14
+ pages?: Record<string, DocumentationPageComponent>;
15
+ Site?: DocumentationSiteComponent;
16
+ }): void;
17
+
18
+ export { DocumentationPageComponent, DocumentationRuntimeRoot, DocumentationSiteComponent, hydrateDocumentation };
@@ -3,9 +3,9 @@ import {
3
3
  AccordionGroup,
4
4
  Card,
5
5
  CodeGroup,
6
- DefaultDocs,
7
- DocsApp,
8
- DocsContent,
6
+ DefaultDocumentation,
7
+ DocumentationApp,
8
+ DocumentationContent,
9
9
  Info,
10
10
  Note,
11
11
  Step,
@@ -13,15 +13,17 @@ import {
13
13
  Tab,
14
14
  Tabs,
15
15
  Tip,
16
- Warning
17
- } from "./chunk-DQ4G6VL6.js";
16
+ Warning,
17
+ documentationLogicalPath,
18
+ documentationPublicPath
19
+ } from "./chunk-T7V4GUIN.js";
18
20
 
19
- // src/docs/runtime/client.tsx
21
+ // src/documentation/runtime/client.tsx
20
22
  import { useCallback, useEffect, useRef, useState } from "react";
21
23
  import { flushSync } from "react-dom";
22
24
  import { hydrateRoot } from "react-dom/client";
23
25
 
24
- // src/docs/runtime/client-document.ts
26
+ // src/documentation/runtime/client-document.ts
25
27
  function currentRuntimeDocument(data) {
26
28
  return {
27
29
  canonical: document.querySelector('link[rel="canonical"]')?.href ?? null,
@@ -79,9 +81,11 @@ function syncLink(rel, href) {
79
81
  function locationKey(url) {
80
82
  return `${url.pathname}${url.search}`;
81
83
  }
82
- function routeDataUrl(url) {
83
- const clean = url.pathname.replace(/^\/+|\/+$/g, "");
84
- return `/_docs/data/${clean || "index"}.json${url.search}`;
84
+ function routeDataUrl(url, basePath) {
85
+ const logical = documentationLogicalPath(basePath, url.pathname);
86
+ if (logical === null) throw new Error(`${url.pathname} is outside the documentation route`);
87
+ const clean = logical.replace(/^\/+|\/+$/g, "");
88
+ return `${documentationPublicPath(basePath, `/data/${clean || "index"}.json`)}${url.search}`;
85
89
  }
86
90
  function scrollToTarget(target, restoredScroll) {
87
91
  if (target.hash) {
@@ -96,20 +100,20 @@ function currentHistoryState() {
96
100
  }
97
101
  function replaceHistoryScroll(scrollY) {
98
102
  history.replaceState(
99
- { ...currentHistoryState(), deepspaceDocs: true, scrollY },
103
+ { ...currentHistoryState(), deepspaceDocumentation: true, scrollY },
100
104
  "",
101
105
  window.location.href
102
106
  );
103
107
  }
104
108
  function focusArticleHeading() {
105
- const heading = document.querySelector(".docs-article h1");
109
+ const heading = document.querySelector(".documentation-article h1");
106
110
  if (!heading) return;
107
111
  heading.tabIndex = -1;
108
112
  heading.focus({ preventScroll: true });
109
113
  }
110
114
 
111
- // src/shared/docs-routing.ts
112
- var DOCS_RESOURCE_EXTENSIONS = /* @__PURE__ */ new Set([
115
+ // src/documentation/resource-path.ts
116
+ var RESOURCE_EXTENSIONS = /* @__PURE__ */ new Set([
113
117
  "7z",
114
118
  "avif",
115
119
  "css",
@@ -141,32 +145,34 @@ var DOCS_RESOURCE_EXTENSIONS = /* @__PURE__ */ new Set([
141
145
  "yml",
142
146
  "zip"
143
147
  ]);
144
- function isDocsResourcePath(pathname) {
148
+ function isNativeDocumentationResourcePath(pathname) {
145
149
  const leaf = pathname.slice(pathname.lastIndexOf("/") + 1);
146
150
  const extension = leaf.includes(".") ? leaf.slice(leaf.lastIndexOf(".") + 1).toLowerCase() : "";
147
- return extension !== "" && DOCS_RESOURCE_EXTENSIONS.has(extension);
151
+ return extension !== "" && RESOURCE_EXTENSIONS.has(extension);
148
152
  }
149
153
 
150
- // src/docs/runtime/routing.ts
154
+ // src/documentation/runtime/routing.ts
151
155
  var RESOURCE_ROUTES = /* @__PURE__ */ new Set(["/mcp"]);
152
- var RESOURCE_PREFIXES = ["/api/", "/_docs/", "/.well-known/"];
153
- function shouldHandleDocsNavigation(href) {
156
+ var RESOURCE_PREFIXES = ["/api/", "/assets/", "/data/", "/media/", "/.well-known/"];
157
+ function shouldHandleDocumentationNavigation(href, basePath = "/docs") {
154
158
  if (!href.startsWith("/") || href.startsWith("//")) return false;
155
159
  const pathname = href.split(/[?#]/, 1)[0] ?? "";
156
- if (RESOURCE_ROUTES.has(pathname)) return false;
157
- if (RESOURCE_PREFIXES.some((prefix) => pathname.startsWith(prefix))) return false;
158
- return !isDocsResourcePath(pathname);
160
+ const logical = documentationLogicalPath(basePath, pathname);
161
+ if (!logical || RESOURCE_ROUTES.has(logical)) return false;
162
+ if (RESOURCE_PREFIXES.some((prefix) => logical.startsWith(prefix))) return false;
163
+ return !isNativeDocumentationResourcePath(logical);
159
164
  }
160
165
 
161
- // src/docs/runtime/client.tsx
166
+ // src/documentation/runtime/client.tsx
162
167
  import { jsx } from "react/jsx-runtime";
163
- function DocsRuntimeRoot({
168
+ function DocumentationRuntimeRoot({
164
169
  initialData,
165
170
  loadPage,
166
171
  pages = {},
167
- Site = DefaultDocs
172
+ Site = DefaultDocumentation
168
173
  }) {
169
174
  const [data, setData] = useState(initialData);
175
+ const basePath = initialData.basePath;
170
176
  const [navigating, setNavigating] = useState(false);
171
177
  const cacheRef = useRef(/* @__PURE__ */ new Map());
172
178
  const inFlightRef = useRef(/* @__PURE__ */ new Map());
@@ -176,6 +182,8 @@ function DocsRuntimeRoot({
176
182
  const scrollFrameRef = useRef(null);
177
183
  const renderedLocationRef = useRef(locationKey(new URL(window.location.href)));
178
184
  useEffect(() => {
185
+ const root = document.getElementById("deepspace-documentation-root");
186
+ root?.setAttribute("data-documentation-hydrated", "true");
179
187
  cacheRef.current.set(locationKey(new URL(window.location.href)), currentRuntimeDocument(initialData));
180
188
  const previous = history.scrollRestoration;
181
189
  history.scrollRestoration = "manual";
@@ -200,6 +208,7 @@ function DocsRuntimeRoot({
200
208
  window.removeEventListener("popstate", handlePopState);
201
209
  if (scrollFrameRef.current !== null) window.cancelAnimationFrame(scrollFrameRef.current);
202
210
  history.scrollRestoration = previous;
211
+ root?.removeAttribute("data-documentation-hydrated");
203
212
  };
204
213
  }, []);
205
214
  const load = useCallback(async (target) => {
@@ -209,13 +218,13 @@ function DocsRuntimeRoot({
209
218
  const pending = inFlightRef.current.get(key);
210
219
  if (pending) return pending;
211
220
  const request = (async () => {
212
- const response = await fetch(routeDataUrl(target), {
213
- headers: { Accept: "application/json", "x-deepspace-docs-navigation": "true" }
221
+ const response = await fetch(routeDataUrl(target, basePath), {
222
+ headers: { Accept: "application/json", "x-deepspace-documentation-navigation": "true" }
214
223
  });
215
224
  if (!response.ok) throw new Error(`Route data returned ${response.status}`);
216
225
  const routeDocument = await response.json();
217
226
  if (!routeDocument?.data?.page || typeof routeDocument.title !== "string") {
218
- throw new Error("Navigation response did not contain valid DeepSpace docs route data");
227
+ throw new Error("Navigation response did not contain valid DeepSpace documentation route data");
219
228
  }
220
229
  const runtime = {
221
230
  ...routeDocument,
@@ -230,7 +239,7 @@ function DocsRuntimeRoot({
230
239
  } finally {
231
240
  if (inFlightRef.current.get(key) === request) inFlightRef.current.delete(key);
232
241
  }
233
- }, []);
242
+ }, [basePath]);
234
243
  const navigate = useCallback(async (href, historyMode = "push", restoredScroll) => {
235
244
  const target = new URL(href, window.location.href);
236
245
  if (target.origin !== window.location.origin) {
@@ -242,7 +251,7 @@ function DocsRuntimeRoot({
242
251
  if (targetKey === renderedLocationRef.current) {
243
252
  if (historyMode === "push" && target.href !== currentUrl.href) {
244
253
  replaceHistoryScroll(window.scrollY);
245
- history.pushState({ deepspaceDocs: true, scrollY: 0 }, "", target.href);
254
+ history.pushState({ deepspaceDocumentation: true, scrollY: 0 }, "", target.href);
246
255
  }
247
256
  scrollToTarget(target, historyMode === "none" ? restoredScroll : void 0);
248
257
  restoringHistoryRef.current = false;
@@ -259,7 +268,7 @@ function DocsRuntimeRoot({
259
268
  if (navigationId !== navigationIdRef.current) return;
260
269
  if (historyMode === "push") {
261
270
  replaceHistoryScroll(window.scrollY);
262
- history.pushState({ deepspaceDocs: true, scrollY: 0 }, "", target.href);
271
+ history.pushState({ deepspaceDocumentation: true, scrollY: 0 }, "", target.href);
263
272
  }
264
273
  syncDocument(runtime, target);
265
274
  renderedLocationRef.current = targetKey;
@@ -281,7 +290,7 @@ function DocsRuntimeRoot({
281
290
  } catch (error) {
282
291
  if (navigationId !== navigationIdRef.current) return;
283
292
  restoringHistoryRef.current = false;
284
- console.error("[DeepSpace Docs] Client navigation failed; falling back to a document navigation", error);
293
+ console.error("[DeepSpace Documentation] Client navigation failed; falling back to a document navigation", error);
285
294
  window.location.assign(target.href);
286
295
  } finally {
287
296
  window.clearTimeout(progressTimer);
@@ -294,7 +303,7 @@ function DocsRuntimeRoot({
294
303
  });
295
304
  }, [load, loadPage]);
296
305
  useEffect(() => {
297
- const root = document.getElementById("deepspace-docs-root");
306
+ const root = document.getElementById("deepspace-documentation-root");
298
307
  if (!root) return;
299
308
  const anchorFor = (target) => target instanceof Element ? target.closest("a[href]") : null;
300
309
  const handleClick = (event) => {
@@ -303,7 +312,7 @@ function DocsRuntimeRoot({
303
312
  const anchor = anchorFor(event.target);
304
313
  if (!anchor || anchor.target || anchor.hasAttribute("download")) return;
305
314
  const href = anchor.getAttribute("href");
306
- if (!href || !shouldHandleDocsNavigation(href)) return;
315
+ if (!href || !shouldHandleDocumentationNavigation(href, basePath)) return;
307
316
  const url = new URL(href, window.location.href);
308
317
  if (url.origin !== window.location.origin) return;
309
318
  if (url.pathname === window.location.pathname && url.search === window.location.search && url.hash) return;
@@ -312,7 +321,7 @@ function DocsRuntimeRoot({
312
321
  };
313
322
  const handlePrefetch = (event) => {
314
323
  const href = anchorFor(event.target)?.getAttribute("href");
315
- if (href && shouldHandleDocsNavigation(href)) prefetch(href);
324
+ if (href && shouldHandleDocumentationNavigation(href, basePath)) prefetch(href);
316
325
  };
317
326
  root.addEventListener("click", handleClick);
318
327
  root.addEventListener("focusin", handlePrefetch);
@@ -324,15 +333,15 @@ function DocsRuntimeRoot({
324
333
  root.removeEventListener("mouseover", handlePrefetch);
325
334
  root.removeEventListener("pointerdown", handlePrefetch);
326
335
  };
327
- }, [navigate, prefetch]);
336
+ }, [basePath, navigate, prefetch]);
328
337
  useEffect(() => {
329
338
  const timer = window.setTimeout(() => {
330
- if (data.previous) prefetch(data.previous.route);
331
- if (data.next) prefetch(data.next.route);
339
+ if (data.previous) prefetch(documentationPublicPath(basePath, data.previous.route));
340
+ if (data.next) prefetch(documentationPublicPath(basePath, data.next.route));
332
341
  }, 350);
333
342
  return () => window.clearTimeout(timer);
334
- }, [data.next, data.page.route, data.previous, prefetch]);
335
- const content = /* @__PURE__ */ jsx(DocsContent, { Page: pages[data.page.route], data });
343
+ }, [basePath, data.next, data.page.route, data.previous, prefetch]);
344
+ const content = /* @__PURE__ */ jsx(DocumentationContent, { Page: pages[data.page.route], data });
336
345
  return /* @__PURE__ */ jsx(
337
346
  Site,
338
347
  {
@@ -347,21 +356,21 @@ function DocsRuntimeRoot({
347
356
  );
348
357
  }
349
358
  var hydrated = false;
350
- function hydrateDocs({
359
+ function hydrateDocumentation({
351
360
  loadPage,
352
361
  pages,
353
362
  Site
354
363
  } = {}) {
355
- const root = document.getElementById("deepspace-docs-root");
356
- const payload = document.getElementById("deepspace-docs-data");
364
+ const root = document.getElementById("deepspace-documentation-root");
365
+ const payload = document.getElementById("deepspace-documentation-data");
357
366
  if (hydrated || !root || !payload?.textContent) return;
358
367
  try {
359
368
  const initialData = JSON.parse(payload.textContent);
360
369
  hydrated = true;
361
- hydrateRoot(root, /* @__PURE__ */ jsx(DocsRuntimeRoot, { initialData, loadPage, pages, Site }));
370
+ hydrateRoot(root, /* @__PURE__ */ jsx(DocumentationRuntimeRoot, { initialData, loadPage, pages, Site }));
362
371
  } catch (error) {
363
372
  root.setAttribute("data-hydration-error", "true");
364
- console.error("[DeepSpace Docs] Unable to hydrate the documentation surface", error);
373
+ console.error("[DeepSpace Documentation] Unable to hydrate the documentation surface", error);
365
374
  }
366
375
  }
367
376
  export {
@@ -369,10 +378,10 @@ export {
369
378
  AccordionGroup,
370
379
  Card,
371
380
  CodeGroup,
372
- DefaultDocs,
373
- DocsApp,
374
- DocsContent,
375
- DocsRuntimeRoot,
381
+ DefaultDocumentation,
382
+ DocumentationApp,
383
+ DocumentationContent,
384
+ DocumentationRuntimeRoot,
376
385
  Info,
377
386
  Note,
378
387
  Step,
@@ -381,6 +390,6 @@ export {
381
390
  Tabs,
382
391
  Tip,
383
392
  Warning,
384
- hydrateDocs
393
+ hydrateDocumentation
385
394
  };
386
- //# sourceMappingURL=docs-client-core.js.map
395
+ //# sourceMappingURL=documentation-client-core.js.map
@@ -0,0 +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":";;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,aAAa,WAAW,QAAQ,gBAAgB;AACzD,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;;;ACWrB,SAAS,uBAAuB,MAAiD;AACtF,S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