deepspace 0.19.2 → 0.19.4

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # deepspace
2
2
 
3
+ ## 0.19.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Documentation feature quality pass. Navigation is a hard cut: the view-transition machinery is deleted outright, a route swap commits in one synchronous frame with scroll applied in the same commit (from a settled scroll exactly [oldY, 0] is observable — cross-page hash arrivals included), and a failed popstate restore reloads instead of leaving stale content. The Ask AI launcher is a single glass input row (the "Ask AI" chip is gone), stays present through the end of the article, and no longer paints a gradient band over content; the composer auto-grows to a 160px cap with no visible scrollbar below it; send buttons share one circular spec with readable ink on the accent in both themes; assistant errors render as callouts. Dark mode gets a readable accent via the new theme.accentDark option (also mapped from Mintlify's colors.light) with an automatic lightened fallback. The outline highlight follows every click, including short last sections (reading-line scroll spy). Sidebar active state, callouts, and the navigation progress bar are flat — no gradients, no glow. Code blocks: the language label becomes a hover chip (reclaiming 38px per block), filename fences render a title bar on both content paths, and fence options like {1,3-4} or wrap no longer masquerade as titles. Anchors land at a single scroll-padding clearance. Chrome spawns no native drag ghosts, never selects its labels, and its inputs never invite autofill; og:image now pairs with twitter:image; the unused navigation.global config field is removed.
8
+
9
+ ## 0.19.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Publish the manual app-update migration guides in the public release mirror and link each updater result to its version-matched guide.
14
+
3
15
  ## 0.19.2
4
16
 
5
17
  ### Patch Changes
@@ -293,14 +293,27 @@ function childCodeClassName(children) {
293
293
  const code = children;
294
294
  return typeof code?.props?.className === "string" ? code.props.className : "";
295
295
  }
296
+ function childCodeTitle(children) {
297
+ const code = children;
298
+ const title = code?.props?.["data-code-title"];
299
+ return typeof title === "string" && title ? title : void 0;
300
+ }
301
+ var CodeGroupContext = createContext(false);
302
+ var CodeGroupProvider = CodeGroupContext.Provider;
296
303
  function CodeBlock({ children, ...props }) {
297
304
  const preRef = useRef(null);
305
+ const inCodeGroup = useContext(CodeGroupContext);
298
306
  const language = codeBlockLanguage(childCodeClassName(children));
307
+ const preTitle = props["data-code-title"];
308
+ const title = inCodeGroup ? void 0 : childCodeTitle(children) ?? (typeof preTitle === "string" && preTitle ? preTitle : void 0);
299
309
  const readCode = () => preRef.current?.querySelector("code")?.textContent ?? preRef.current?.textContent ?? "";
300
310
  return /* @__PURE__ */ jsxs2("div", { className: "documentation-code-block", children: [
311
+ title ? /* @__PURE__ */ jsx2("div", { className: "documentation-code-title", children: title }) : null,
301
312
  /* @__PURE__ */ jsx2("pre", { ...props, ref: preRef, children }),
302
- language ? /* @__PURE__ */ jsx2("span", { className: "documentation-code-language", children: language }) : null,
303
- /* @__PURE__ */ jsx2("div", { className: "documentation-code-actions", children: /* @__PURE__ */ jsx2(CodeBlockActions, { readCode }) })
313
+ /* @__PURE__ */ jsxs2("div", { className: "documentation-code-actions", children: [
314
+ language ? /* @__PURE__ */ jsx2("span", { className: "documentation-code-language", children: language }) : null,
315
+ /* @__PURE__ */ jsx2(CodeBlockActions, { readCode })
316
+ ] })
304
317
  ] });
305
318
  }
306
319
  var TAB_SELECTION_KEY = "deepspace-documentation-tab-selection";
@@ -552,7 +565,7 @@ ${code}`)
552
565
  ))
553
566
  ] }),
554
567
  data.page.openapi?.playground && /* @__PURE__ */ jsx4(ApiPlayground, { operation: data.page.openapi }),
555
- launcher,
568
+ launcher && /* @__PURE__ */ jsx4("div", { className: "documentation-launcher-dock", children: launcher }),
556
569
  /* @__PURE__ */ jsxs4("nav", { className: "documentation-pagination", "aria-label": "Page navigation", children: [
557
570
  data.previous ? /* @__PURE__ */ jsxs4("a", { rel: "prev", href: documentationPublicPath(data.basePath, data.previous.route), children: [
558
571
  /* @__PURE__ */ jsx4("small", { children: "Previous" }),
@@ -612,14 +625,51 @@ function ContextRail({
612
625
  const [active, setActive] = useState3(headings[0]?.id ?? "");
613
626
  useEffect3(() => setActive(headings[0]?.id ?? ""), [headings]);
614
627
  useEffect3(() => {
615
- if (typeof IntersectionObserver === "undefined") return;
616
- const elements = headings.map((heading) => document.getElementById(heading.id)).filter(Boolean);
617
- const observer = new IntersectionObserver((entries) => {
618
- const visible = entries.filter((entry) => entry.isIntersecting).sort((left, right) => left.boundingClientRect.top - right.boundingClientRect.top);
619
- if (visible[0]?.target.id) setActive(visible[0].target.id);
620
- }, { rootMargin: "-88px 0px -68% 0px", threshold: [0, 1] });
621
- elements.forEach((element) => observer.observe(element));
622
- return () => observer.disconnect();
628
+ let frame = null;
629
+ const measure = () => {
630
+ frame = null;
631
+ const root = document.documentElement;
632
+ const clearance = (Number.parseFloat(getComputedStyle(root).scrollPaddingTop) || 96) + 4;
633
+ const scrollable = root.scrollHeight > window.innerHeight + 4;
634
+ const atBottom = scrollable && window.innerHeight + window.scrollY >= root.scrollHeight - 2;
635
+ let next = headings[0]?.id ?? "";
636
+ for (const heading of headings) {
637
+ const element = document.getElementById(heading.id);
638
+ if (!element) continue;
639
+ if (element.getBoundingClientRect().top <= clearance) next = heading.id;
640
+ else break;
641
+ }
642
+ if (atBottom) {
643
+ const hashId = decodeURIComponent(window.location.hash.slice(1));
644
+ if (hashId && headings.some((heading) => heading.id === hashId)) {
645
+ const top = document.getElementById(hashId)?.getBoundingClientRect().top;
646
+ if (top !== void 0 && top > clearance && top < window.innerHeight) next = hashId;
647
+ }
648
+ }
649
+ setActive(next);
650
+ };
651
+ const schedule = () => {
652
+ if (frame === null) frame = window.requestAnimationFrame(measure);
653
+ };
654
+ const onOutlineClick = (event) => {
655
+ if (event.target instanceof Element && event.target.closest(".documentation-outline a")) {
656
+ window.setTimeout(schedule, 0);
657
+ }
658
+ };
659
+ measure();
660
+ window.addEventListener("scroll", schedule, { passive: true });
661
+ window.addEventListener("resize", schedule, { passive: true });
662
+ window.addEventListener("popstate", schedule);
663
+ window.addEventListener("hashchange", schedule);
664
+ document.addEventListener("click", onOutlineClick);
665
+ return () => {
666
+ window.removeEventListener("scroll", schedule);
667
+ window.removeEventListener("resize", schedule);
668
+ window.removeEventListener("popstate", schedule);
669
+ window.removeEventListener("hashchange", schedule);
670
+ document.removeEventListener("click", onOutlineClick);
671
+ if (frame !== null) window.cancelAnimationFrame(frame);
672
+ };
623
673
  }, [headings]);
624
674
  return /* @__PURE__ */ jsx4("aside", { className: "documentation-context-rail", "aria-label": "Page context", children: headings.length > 0 && /* @__PURE__ */ jsxs4("nav", { className: "documentation-outline", "aria-label": "On this page", children: [
625
675
  /* @__PURE__ */ jsx4("h2", { children: "On this page" }),
@@ -666,11 +716,11 @@ ${text}`);
666
716
  /* @__PURE__ */ jsx4("p", { children: "Requests run in your browser. Tokens stay in memory and never enter search or assistant context." }),
667
717
  /* @__PURE__ */ jsxs4("label", { children: [
668
718
  /* @__PURE__ */ jsx4("span", { children: "Bearer token" }),
669
- /* @__PURE__ */ jsx4("input", { type: "password", autoComplete: "off", value: token, onChange: (event) => setToken(event.target.value), placeholder: "Optional" })
719
+ /* @__PURE__ */ jsx4("input", { type: "password", autoCapitalize: "none", autoComplete: "off", autoCorrect: "off", spellCheck: false, value: token, onChange: (event) => setToken(event.target.value), placeholder: "Optional" })
670
720
  ] }),
671
721
  /* @__PURE__ */ jsxs4("label", { children: [
672
722
  /* @__PURE__ */ jsx4("span", { children: "JSON body" }),
673
- /* @__PURE__ */ jsx4("textarea", { rows: 7, spellCheck: "false", value: body, onChange: (event) => setBody(event.target.value), placeholder: "{}" })
723
+ /* @__PURE__ */ jsx4("textarea", { rows: 7, autoCapitalize: "none", autoComplete: "off", autoCorrect: "off", spellCheck: false, value: body, onChange: (event) => setBody(event.target.value), placeholder: "{}" })
674
724
  ] }),
675
725
  /* @__PURE__ */ jsx4("button", { type: "button", disabled: sending, onClick: send, children: sending ? "Sending\u2026" : `Send ${operation.method} request` }),
676
726
  /* @__PURE__ */ jsx4("pre", { "aria-live": "polite", children: responseText })
@@ -688,15 +738,22 @@ function useCodeBlockMounts(articleRef, route) {
688
738
  block.className = "documentation-code-block";
689
739
  pre.replaceWith(block);
690
740
  block.appendChild(pre);
741
+ const title = pre.getAttribute("data-code-title");
742
+ if (title && !block.closest("[data-tab-group]")) {
743
+ const bar = document.createElement("div");
744
+ bar.className = "documentation-code-title";
745
+ bar.textContent = title;
746
+ block.insertBefore(bar, pre);
747
+ }
748
+ const host = document.createElement("div");
749
+ host.className = "documentation-code-actions";
691
750
  const language = codeBlockLanguage(pre.querySelector("code")?.className ?? "");
692
751
  if (language) {
693
752
  const label = document.createElement("span");
694
753
  label.className = "documentation-code-language";
695
754
  label.textContent = language;
696
- block.appendChild(label);
755
+ host.appendChild(label);
697
756
  }
698
- const host = document.createElement("div");
699
- host.className = "documentation-code-actions";
700
757
  block.appendChild(host);
701
758
  created.push({ block, pre });
702
759
  next.push({ key: `${route}:${index}`, host, pre });
@@ -888,7 +945,6 @@ function AssistantLauncher({
888
945
  input,
889
946
  name,
890
947
  onInputChange,
891
- onOpen,
892
948
  onSubmit
893
949
  }) {
894
950
  const subject = documentationSubject(name);
@@ -905,18 +961,19 @@ function AssistantLauncher({
905
961
  id: "deepspace-documentation-assistant-launcher",
906
962
  onSubmit: submit,
907
963
  children: [
908
- /* @__PURE__ */ jsxs5("button", { className: "documentation-launcher-agent", type: "button", onClick: onOpen, "aria-label": `Open the ${subject} agent`, children: [
909
- "Ask ",
910
- /* @__PURE__ */ jsx5("span", { className: "documentation-launcher-agent-name", children: "AI" })
911
- ] }),
912
964
  /* @__PURE__ */ jsx5(
913
965
  "input",
914
966
  {
915
967
  "aria-label": `Ask the ${subject} agent`,
968
+ autoCapitalize: "sentences",
969
+ autoComplete: "off",
970
+ autoCorrect: "off",
971
+ enterKeyHint: "send",
916
972
  id: "deepspace-documentation-assistant-launcher-input",
917
973
  maxLength: 4e3,
918
974
  onChange: (event) => onInputChange(event.target.value),
919
975
  placeholder: "Ask anything\u2026",
976
+ spellCheck: false,
920
977
  value: input
921
978
  }
922
979
  ),
@@ -944,6 +1001,7 @@ function DocumentationAssistant({
944
1001
  const panelRef = useRef4(null);
945
1002
  const formRef = useRef4(null);
946
1003
  const messagesRef = useRef4(null);
1004
+ const composerRef = useRef4(null);
947
1005
  const abortRef = useRef4(null);
948
1006
  const queuedQuestionRef = useRef4(null);
949
1007
  const handledSeedRef = useRef4(0);
@@ -964,6 +1022,13 @@ function DocumentationAssistant({
964
1022
  const element = messagesRef.current;
965
1023
  if (element) element.scrollTop = element.scrollHeight;
966
1024
  }, [messages]);
1025
+ useEffect5(() => {
1026
+ const element = composerRef.current;
1027
+ if (!element) return;
1028
+ element.style.height = "auto";
1029
+ element.style.height = `${Math.min(element.scrollHeight, 160)}px`;
1030
+ element.style.overflowY = element.scrollHeight > 160 ? "auto" : "hidden";
1031
+ }, [input, open]);
967
1032
  useEffect5(() => () => abortRef.current?.abort(), []);
968
1033
  if (!open) return null;
969
1034
  const submit = async (event) => {
@@ -1085,7 +1150,11 @@ function DocumentationAssistant({
1085
1150
  "textarea",
1086
1151
  {
1087
1152
  "aria-label": "Ask a documentation question",
1153
+ autoCapitalize: "sentences",
1154
+ autoComplete: "off",
1155
+ autoCorrect: "off",
1088
1156
  "data-autofocus": true,
1157
+ enterKeyHint: "send",
1089
1158
  maxLength: 4e3,
1090
1159
  onChange: (event) => onInputChange(event.target.value),
1091
1160
  onKeyDown: (event) => {
@@ -1095,7 +1164,9 @@ function DocumentationAssistant({
1095
1164
  }
1096
1165
  },
1097
1166
  placeholder: "Ask a question about this documentation",
1098
- rows: 2,
1167
+ ref: composerRef,
1168
+ rows: 1,
1169
+ spellCheck: false,
1099
1170
  value: input
1100
1171
  }
1101
1172
  ),
@@ -1434,8 +1505,11 @@ function SearchCommand({
1434
1505
  "aria-controls": "documentation-search-results",
1435
1506
  "aria-expanded": "true",
1436
1507
  "aria-label": `Search ${documentationSubject(name)}`,
1508
+ autoCapitalize: "none",
1437
1509
  autoComplete: "off",
1510
+ autoCorrect: "off",
1438
1511
  "data-autofocus": true,
1512
+ enterKeyHint: "go",
1439
1513
  onChange: (event) => {
1440
1514
  setQuery(event.target.value);
1441
1515
  setActiveIndex(0);
@@ -1443,6 +1517,7 @@ function SearchCommand({
1443
1517
  onKeyDown: handleKeyDown,
1444
1518
  placeholder: `Search ${name}`,
1445
1519
  role: "combobox",
1520
+ spellCheck: false,
1446
1521
  value: query
1447
1522
  }
1448
1523
  ),
@@ -1451,7 +1526,7 @@ function SearchCommand({
1451
1526
  /* @__PURE__ */ jsxs7("div", { className: "documentation-search-results", id: "documentation-search-results", ref: resultsRef, role: "listbox", "aria-label": "Search results", children: [
1452
1527
  !query.trim() && /* @__PURE__ */ jsxs7("div", { className: "documentation-search-empty", children: [
1453
1528
  /* @__PURE__ */ jsx7(OrbitMark, {}),
1454
- /* @__PURE__ */ jsx7("strong", { children: "Find an answer in this commit" }),
1529
+ /* @__PURE__ */ jsx7("strong", { children: "Find an answer in these docs" }),
1455
1530
  /* @__PURE__ */ jsx7("span", { children: "Search pages, headings, APIs, and examples." })
1456
1531
  ] }),
1457
1532
  query.trim() && loading && /* @__PURE__ */ jsx7("div", { className: "documentation-search-state", children: "Searching this documentation\u2026" }),
@@ -1660,16 +1735,15 @@ function DocumentationApp({
1660
1735
  Article,
1661
1736
  {
1662
1737
  data,
1663
- launcher: assistantAccess && !assistantOpen ? /* @__PURE__ */ jsx8("div", { className: "documentation-launcher-dock", children: /* @__PURE__ */ jsx8(
1738
+ launcher: assistantAccess && !assistantOpen ? /* @__PURE__ */ jsx8(
1664
1739
  AssistantLauncher,
1665
1740
  {
1666
1741
  input: assistantDraft,
1667
1742
  name: data.config.name,
1668
- onOpen: () => openAssistant(),
1669
1743
  onInputChange: setAssistantDraft,
1670
1744
  onSubmit: (question) => openAssistant(question, true)
1671
1745
  }
1672
- ) }) : void 0,
1746
+ ) : void 0,
1673
1747
  onAssistantOpen: openAssistant,
1674
1748
  children
1675
1749
  }
@@ -1778,14 +1852,14 @@ function CodeGroup({ children, label, title }) {
1778
1852
  label: codeBlockTitle(child) ?? `Example ${index + 1}`,
1779
1853
  content: child
1780
1854
  }));
1781
- return /* @__PURE__ */ jsx9(
1855
+ return /* @__PURE__ */ jsx9(CodeGroupProvider, { value: true, children: /* @__PURE__ */ jsx9(
1782
1856
  TabGroup,
1783
1857
  {
1784
1858
  className: "documentation-code-group",
1785
1859
  panels,
1786
1860
  title: title ?? label ? /* @__PURE__ */ jsx9("div", { className: "documentation-code-group-title", children: title ?? label }) : void 0
1787
1861
  }
1788
- );
1862
+ ) });
1789
1863
  }
1790
1864
  function tabPanels(children) {
1791
1865
  return Children.toArray(children).map((child, index) => {
@@ -1875,4 +1949,4 @@ export {
1875
1949
  DefaultDocumentation,
1876
1950
  DocumentationContent
1877
1951
  };
1878
- //# sourceMappingURL=chunk-233GQU2H.js.map
1952
+ //# sourceMappingURL=chunk-A7UFIOWO.js.map