@stainless-api/docs-ui 0.1.0-beta.84 → 0.1.0-beta.85

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.
@@ -10,7 +10,7 @@ const getMaskedParts = (text) => {
10
10
  };
11
11
  const percentLength = Math.min(Math.floor(text.length * .3), 8);
12
12
  const nonAlphaMatches = [...text.substring(0, percentLength).matchAll(/[^a-zA-Z0-9]/g)];
13
- let prefixEnd = 0;
13
+ let prefixEnd;
14
14
  if (nonAlphaMatches.length > 0) prefixEnd = nonAlphaMatches.at(-1).index + 1;
15
15
  else prefixEnd = percentLength;
16
16
  return {
@@ -1,4 +1,4 @@
1
- import "../use-strict-context-L0c8JKg4.js";
1
+ import "../use-strict-context-Clb6Yjly.js";
2
2
  import style_default from "../style.js";
3
3
  import { Languages } from "../routing.js";
4
4
  import { Join } from "./primitives.js";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
- import "../use-strict-context-L0c8JKg4.js";
2
+ import "../use-strict-context-Clb6Yjly.js";
3
3
  import { Property, PropertyDescription, PropertyTitle, PropertyToggle } from "./properties.js";
4
4
  import { Method, MethodDescription, MethodHeader, MethodInfo, MethodRoute } from "./method.js";
5
5
  import { Badge, Expander, Input, Join, Link, ListView, Markdown, ToggleButton, Tooltip, VirtualExpander } from "./primitives.js";
@@ -1,4 +1,4 @@
1
- import "../use-strict-context-L0c8JKg4.js";
1
+ import "../use-strict-context-Clb6Yjly.js";
2
2
  import { useComponents } from "../contexts/use-components.js";
3
3
  import style_default from "../style.js";
4
4
  import { PropertyToggle } from "./properties.js";
@@ -1,5 +1,5 @@
1
1
  import { useDeclaration, useLanguage, useSpec } from "../contexts/docs.js";
2
- import "../use-strict-context-L0c8JKg4.js";
2
+ import "../use-strict-context-Clb6Yjly.js";
3
3
  import { useLanguageComponents } from "../contexts/index.js";
4
4
  import { useComponents } from "../contexts/use-components.js";
5
5
  import style_default from "../style.js";
@@ -1,11 +1,11 @@
1
1
  import { useLanguage, useSettings } from "../contexts/docs.js";
2
- import "../use-strict-context-L0c8JKg4.js";
2
+ import "../use-strict-context-Clb6Yjly.js";
3
3
  import { useNavigation } from "../contexts/navigation.js";
4
4
  import { useRenderMarkdown } from "../contexts/markdown.js";
5
5
  import "../contexts/index.js";
6
6
  import style_default from "../style.js";
7
7
  import { generateRoute } from "../routing.js";
8
- import { Fragment, createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
8
+ import { Fragment, createContext, use, useCallback, useEffect, useMemo, useRef, useState } from "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import clsx from "clsx";
11
11
  import { MinusIcon, PlusIcon } from "lucide-react";
@@ -102,12 +102,12 @@ function Badge({ id, children }) {
102
102
  }
103
103
  const TooltipNestingContext = createContext(false);
104
104
  function Tooltip({ content, children }) {
105
- if (useContext(TooltipNestingContext)) return children;
105
+ if (use(TooltipNestingContext)) return children;
106
106
  return /* @__PURE__ */ jsxs("span", {
107
107
  className: style_default.Tooltip,
108
108
  children: [/* @__PURE__ */ jsx("span", {
109
109
  className: style_default.TooltipContent,
110
- children: /* @__PURE__ */ jsx(TooltipNestingContext.Provider, {
110
+ children: /* @__PURE__ */ jsx(TooltipNestingContext, {
111
111
  value: true,
112
112
  children: content
113
113
  })
@@ -1,5 +1,5 @@
1
1
  import { useIgnoredResources, useLanguage, useSettings } from "../contexts/docs.js";
2
- import "../use-strict-context-L0c8JKg4.js";
2
+ import "../use-strict-context-Clb6Yjly.js";
3
3
  import "../contexts/index.js";
4
4
  import { useComponents } from "../contexts/use-components.js";
5
5
  import style_default from "../style.js";
@@ -1,4 +1,4 @@
1
- import "../use-strict-context-L0c8JKg4.js";
1
+ import "../use-strict-context-Clb6Yjly.js";
2
2
  import { useNavigation } from "../contexts/navigation.js";
3
3
  import "../contexts/index.js";
4
4
  import { isResourceEmpty } from "../utils.js";
@@ -1,5 +1,5 @@
1
1
  import { useAvailableLanguages, useContentPanelLayout, useDeclaration, useLanguage, useSettings, useSnippetIds, useSnippetResponse, useSpec } from "../contexts/docs.js";
2
- import "../use-strict-context-L0c8JKg4.js";
2
+ import "../use-strict-context-Clb6Yjly.js";
3
3
  import { useNavigation } from "../contexts/navigation.js";
4
4
  import { useLanguageComponents } from "../contexts/index.js";
5
5
  import { useComponents } from "../contexts/use-components.js";
@@ -15,11 +15,11 @@ import { Button, Callout } from "@stainless-api/ui-primitives";
15
15
  //#region src/components/sdk.tsx
16
16
  const PropertyModelContext = React$1.createContext({});
17
17
  function usePropertyModel() {
18
- return React$1.useContext(PropertyModelContext);
18
+ return React$1.use(PropertyModelContext);
19
19
  }
20
20
  const ReferenceNestingContext = React$1.createContext([]);
21
21
  function useReferenceNesting() {
22
- return React$1.useContext(ReferenceNestingContext);
22
+ return React$1.use(ReferenceNestingContext);
23
23
  }
24
24
  const DeclarationParentsContext = React$1.createContext(/* @__PURE__ */ new Set());
25
25
  const AddToDeclarationParents = ({ id, children }) => /* @__PURE__ */ jsx(DeclarationParentsContext, {
@@ -27,7 +27,7 @@ const AddToDeclarationParents = ({ id, children }) => /* @__PURE__ */ jsx(Declar
27
27
  children
28
28
  });
29
29
  function useDeclarationParents() {
30
- return React$1.useContext(DeclarationParentsContext);
30
+ return React$1.use(DeclarationParentsContext);
31
31
  }
32
32
  const SDKSnippetLanguages = {
33
33
  "node.default": { name: "TypeScript" },
@@ -151,7 +151,7 @@ function SDKDeclaration({ path, expand, depth = 0 }) {
151
151
  const refId = "type" in decl && decl.type !== void 0 && typeof decl.type !== "string" && "$ref" in decl.type ? decl.type["$ref"] : void 0;
152
152
  if (refId && refId !== path && !nesting.includes(refId)) return /* @__PURE__ */ jsx(AddToDeclarationParents, {
153
153
  id: path,
154
- children: /* @__PURE__ */ jsx(ReferenceNestingContext.Provider, {
154
+ children: /* @__PURE__ */ jsx(ReferenceNestingContext, {
155
155
  value: [...nesting, refId],
156
156
  children: /* @__PURE__ */ jsx(SDKDeclaration, {
157
157
  path: refId,
@@ -188,19 +188,16 @@ function SDKDeclaration({ path, expand, depth = 0 }) {
188
188
  })] })
189
189
  })
190
190
  });
191
- if ("modelPath" in decl) {
192
- const value = {
193
- modelPath: decl.modelPath,
194
- propertyPath: decl.stainlessPath
195
- };
196
- return /* @__PURE__ */ jsx(AddToDeclarationParents, {
197
- id: path,
198
- children: /* @__PURE__ */ jsx(PropertyModelContext.Provider, {
199
- value,
200
- children: content
201
- })
202
- });
203
- }
191
+ if ("modelPath" in decl) return /* @__PURE__ */ jsx(AddToDeclarationParents, {
192
+ id: path,
193
+ children: /* @__PURE__ */ jsx(PropertyModelContext, {
194
+ value: {
195
+ modelPath: decl.modelPath,
196
+ propertyPath: decl.stainlessPath
197
+ },
198
+ children: content
199
+ })
200
+ });
204
201
  return /* @__PURE__ */ jsx(AddToDeclarationParents, {
205
202
  id: path,
206
203
  children: content
@@ -1,5 +1,5 @@
1
1
  import { useDeclaration, useLanguage, useSnippet, useSnippetIds, useSnippetResponse } from "../contexts/docs.js";
2
- import "../use-strict-context-L0c8JKg4.js";
2
+ import "../use-strict-context-Clb6Yjly.js";
3
3
  import { useHighlight } from "../contexts/markdown.js";
4
4
  import "../contexts/index.js";
5
5
  import { useComponents } from "../contexts/use-components.js";
@@ -1,4 +1,4 @@
1
- import "../use-strict-context-L0c8JKg4.js";
1
+ import "../use-strict-context-Clb6Yjly.js";
2
2
  import { useComponents } from "../contexts/use-components.js";
3
3
  import style_default from "../style.js";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { t as createStrictContext } from "../use-strict-context-L0c8JKg4.js";
1
+ import { t as createStrictContext } from "../use-strict-context-Clb6Yjly.js";
2
2
  import "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
 
@@ -1,4 +1,4 @@
1
- import "../use-strict-context-L0c8JKg4.js";
1
+ import "../use-strict-context-Clb6Yjly.js";
2
2
  import { ComponentProvider as ComponentProvider$1, customizeComponents } from "./component-generics.js";
3
3
  import { t as components_exports } from "../components/index.js";
4
4
  import { t as languages_exports } from "../languages/index.js";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
2
  import { DocsProvider, useAvailableLanguages, useContentPanelLayout, useDeclaration, useDocs, useIgnoredResources, useLanguage, useResource, useSettings, useSnippet, useSnippetIds, useSnippetResponse, useSnippets, useSpec } from "./docs.js";
3
- import "../use-strict-context-L0c8JKg4.js";
3
+ import "../use-strict-context-Clb6Yjly.js";
4
4
  import { ComponentProvider, customizeComponents, useComponentContext, useComponents } from "./component-generics.js";
5
5
  import { NavigationProvider, useNavigation } from "./navigation.js";
6
6
  import { MarkdownContext, MarkdownProvider, useHighlight, useMarkdownContext, useRenderMarkdown } from "./markdown.js";
@@ -12,9 +12,9 @@ const MarkdownContext = React$1.createContext({
12
12
  highlight: (content) => content,
13
13
  render: (content) => content
14
14
  });
15
- const useMarkdownContext = () => React$1.useContext(MarkdownContext);
15
+ const useMarkdownContext = () => React$1.use(MarkdownContext);
16
16
  function useRenderMarkdown(content) {
17
- const { render } = React$1.useContext(MarkdownContext);
17
+ const { render } = React$1.use(MarkdownContext);
18
18
  return React$1.useMemo(() => {
19
19
  if (!content) return void 0;
20
20
  const rendered = render(content);
@@ -22,7 +22,7 @@ function useRenderMarkdown(content) {
22
22
  }, [content, render]);
23
23
  }
24
24
  function useHighlight(content, language) {
25
- const { highlight } = React$1.useContext(MarkdownContext);
25
+ const { highlight } = React$1.use(MarkdownContext);
26
26
  const defaultLanguage = useLanguage();
27
27
  const lang = language ?? defaultLanguage;
28
28
  return React$1.useMemo(() => {
@@ -36,7 +36,7 @@ function useHighlight(content, language) {
36
36
  ]);
37
37
  }
38
38
  function MarkdownProvider({ render, highlight, children }) {
39
- return /* @__PURE__ */ jsx(MarkdownContext.Provider, {
39
+ return /* @__PURE__ */ jsx(MarkdownContext, {
40
40
  value: {
41
41
  render,
42
42
  highlight
@@ -5,17 +5,16 @@ import { jsx } from "react/jsx-runtime";
5
5
  const Defaults = { basePath: "/" };
6
6
  const NavigationContext = React$1.createContext(Defaults);
7
7
  function useNavigation() {
8
- return React$1.useContext(NavigationContext);
8
+ return React$1.use(NavigationContext);
9
9
  }
10
10
  function NavigationProvider({ basePath, selectedPath, onNavigate, children }) {
11
- const value = {
12
- ...Defaults,
13
- onNavigate,
14
- basePath,
15
- selectedPath
16
- };
17
- return /* @__PURE__ */ jsx(NavigationContext.Provider, {
18
- value,
11
+ return /* @__PURE__ */ jsx(NavigationContext, {
12
+ value: {
13
+ ...Defaults,
14
+ onNavigate,
15
+ basePath,
16
+ selectedPath
17
+ },
19
18
  children
20
19
  });
21
20
  }
@@ -1,4 +1,4 @@
1
- import "../use-strict-context-L0c8JKg4.js";
1
+ import "../use-strict-context-Clb6Yjly.js";
2
2
  import { useComponents as useComponents$1 } from "./component-generics.js";
3
3
 
4
4
  //#region src/contexts/use-components.tsx
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./use-strict-context-L0c8JKg4.js";
1
+ import "./use-strict-context-Clb6Yjly.js";
2
2
  import { t as contexts_exports } from "./contexts/index.js";
3
3
  import style_default from "./style.js";
4
4
  import { t as routing_exports } from "./routing.js";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
- import "../use-strict-context-L0c8JKg4.js";
2
+ import "../use-strict-context-Clb6Yjly.js";
3
3
  import { useLanguageComponents } from "../contexts/index.js";
4
4
  import { useComponents } from "../contexts/use-components.js";
5
5
  import style_default from "../style.js";
@@ -152,14 +152,14 @@ function Declaration({ decl }) {
152
152
  children: decl.type
153
153
  }) : /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
154
154
  ] })] });
155
- case "CLIFunction": return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsxs("span", {
155
+ case "CLIFunction": return /* @__PURE__ */ jsxs("span", {
156
156
  className: style_default.TextIdentifier,
157
157
  children: [decl.name, "()"]
158
- }) });
159
- case "CLIStdin": return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx("span", {
158
+ });
159
+ case "CLIStdin": return /* @__PURE__ */ jsx("span", {
160
160
  className: style_default.TextIdentifier,
161
161
  children: "stdin"
162
- }) });
162
+ });
163
163
  }
164
164
  }
165
165
 
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
- import "../use-strict-context-L0c8JKg4.js";
2
+ import "../use-strict-context-Clb6Yjly.js";
3
3
  import { useLanguageComponents } from "../contexts/index.js";
4
4
  import { useComponents } from "../contexts/use-components.js";
5
5
  import style_default from "../style.js";
@@ -211,13 +211,13 @@ function Declaration({ decl }) {
211
211
  const Lang = useLanguageComponents();
212
212
  if (!decl) return null;
213
213
  switch (decl.kind) {
214
- case "CSharpDeclConst": return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Docs.Tooltip, {
214
+ case "CSharpDeclConst": return /* @__PURE__ */ jsx(Docs.Tooltip, {
215
215
  content: JSON.stringify(decl.value),
216
216
  children: /* @__PURE__ */ jsx("span", {
217
217
  className: style_default.TextIdentifier,
218
218
  children: decl.ident
219
219
  })
220
- }) });
220
+ });
221
221
  case "CSharpDeclType": {
222
222
  const keyword = decl.type.kind === "CSharpTypeEnum" ? "enum" : "class";
223
223
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
- import "../use-strict-context-L0c8JKg4.js";
2
+ import "../use-strict-context-Clb6Yjly.js";
3
3
  import { useLanguageComponents } from "../contexts/index.js";
4
4
  import { useComponents } from "../contexts/use-components.js";
5
5
  import style_default from "../style.js";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
2
  import { useAvailableLanguages, useDeclaration, useLanguage, useSpec } from "../contexts/docs.js";
3
- import "../use-strict-context-L0c8JKg4.js";
3
+ import "../use-strict-context-Clb6Yjly.js";
4
4
  import { useNavigation } from "../contexts/navigation.js";
5
5
  import { useLanguageComponents } from "../contexts/index.js";
6
6
  import { useComponents } from "../contexts/use-components.js";
@@ -35,10 +35,10 @@ const constStyle = {
35
35
  boolean: style_default.LiteralBoolean
36
36
  };
37
37
  function Identifier({ name }) {
38
- return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx("span", {
38
+ return /* @__PURE__ */ jsx("span", {
39
39
  className: style_default.TextIdentifier,
40
40
  children: /^[_a-zA-Z][_a-zA-Z0-9]*$/.test(name) ? name : JSON.stringify(name)
41
- }) });
41
+ });
42
42
  }
43
43
  function TypePreview({ path }) {
44
44
  const spec = useSpec();
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
- import "../use-strict-context-L0c8JKg4.js";
2
+ import "../use-strict-context-Clb6Yjly.js";
3
3
  import { t as typescript_exports } from "./typescript.js";
4
4
  import { t as java_exports } from "./java.js";
5
5
  import { t as go_exports } from "./go.js";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
2
  import { useLanguage } from "../contexts/docs.js";
3
- import "../use-strict-context-L0c8JKg4.js";
3
+ import "../use-strict-context-Clb6Yjly.js";
4
4
  import { useLanguageComponents } from "../contexts/index.js";
5
5
  import { useComponents } from "../contexts/use-components.js";
6
6
  import style_default from "../style.js";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
- import "../use-strict-context-L0c8JKg4.js";
2
+ import "../use-strict-context-Clb6Yjly.js";
3
3
  import { useLanguageComponents } from "../contexts/index.js";
4
4
  import { useComponents } from "../contexts/use-components.js";
5
5
  import style_default from "../style.js";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
- import "../use-strict-context-L0c8JKg4.js";
2
+ import "../use-strict-context-Clb6Yjly.js";
3
3
  import { useLanguageComponents } from "../contexts/index.js";
4
4
  import { useComponents } from "../contexts/use-components.js";
5
5
  import style_default from "../style.js";
@@ -261,7 +261,7 @@ function Declaration({ decl }) {
261
261
  children: "…"
262
262
  })
263
263
  ] });
264
- case "PythonDeclType": return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Lang.Type, { type: decl.type }) });
264
+ case "PythonDeclType": return /* @__PURE__ */ jsx(Lang.Type, { type: decl.type });
265
265
  case "PythonDeclReference": return /* @__PURE__ */ jsx(Lang.Type, { type: decl.type });
266
266
  }
267
267
  }
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
2
  import { useDeclaration, useLanguage, useSpec } from "../contexts/docs.js";
3
- import "../use-strict-context-L0c8JKg4.js";
3
+ import "../use-strict-context-Clb6Yjly.js";
4
4
  import { useLanguageComponents } from "../contexts/index.js";
5
5
  import { useComponents } from "../contexts/use-components.js";
6
6
  import style_default from "../style.js";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
2
  import { useDeclaration } from "../contexts/docs.js";
3
- import "../use-strict-context-L0c8JKg4.js";
3
+ import "../use-strict-context-Clb6Yjly.js";
4
4
  import { useLanguageComponents } from "../contexts/index.js";
5
5
  import { useComponents } from "../contexts/use-components.js";
6
6
  import style_default from "../style.js";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
2
  import { useDeclaration, useLanguage, useSpec } from "../contexts/docs.js";
3
- import "../use-strict-context-L0c8JKg4.js";
3
+ import "../use-strict-context-Clb6Yjly.js";
4
4
  import { useLanguageComponents } from "../contexts/index.js";
5
5
  import { useComponents } from "../contexts/use-components.js";
6
6
  import style_default from "../style.js";
@@ -1,4 +1,4 @@
1
- import "../use-strict-context-L0c8JKg4.js";
1
+ import "../use-strict-context-Clb6Yjly.js";
2
2
  import { code, fence, heading, item, list, paragraph, parse, strong, text } from "./md.js";
3
3
  import { getCustomSnippetTitle, getDecl, getSnippets, stripMarkup } from "./utils.js";
4
4
  import { declaration as declaration$1, methodSignature, t as printer_exports } from "./printer.js";
@@ -9,16 +9,20 @@ function declaration(env, decl) {
9
9
  const content = declaration$1(env.language, decl);
10
10
  return paragraph(code(stripMarkup(content)));
11
11
  }
12
- function renderChildren(env, children, nesting = []) {
12
+ function renderChildren(env, children, nesting = /* @__PURE__ */ new Set()) {
13
13
  return list(...children.map((child) => renderDecl(env, child, nesting)));
14
14
  }
15
- function renderDecl(env, path, nesting = []) {
15
+ function renderDecl(env, path, nesting = /* @__PURE__ */ new Set()) {
16
16
  const decl = getDecl(env, path);
17
17
  const item$1 = item(declaration(env, decl));
18
+ const effectivePath = ("modelPath" in decl && decl["modelPath"] ? `${decl.modelPath} > (schema)` : null) ?? decl.stainlessPath;
18
19
  const hasChildren = "children" in decl && decl.children && decl.children.length > 0;
19
20
  const showModelProps = !("modelPath" in decl && decl["modelPath"]) || env.options.includeModelProperties;
20
21
  if ("docstring" in decl && decl.docstring) item$1.children.push(...parse(decl.docstring));
21
- if (hasChildren && showModelProps && !nesting.includes(path)) item$1.push(renderChildren(env, decl.children ?? [], [...nesting, path]));
22
+ if (hasChildren && showModelProps && !nesting.has(effectivePath)) {
23
+ nesting.add(effectivePath);
24
+ item$1.push(renderChildren(env, decl.children ?? [], nesting));
25
+ }
22
26
  return item$1;
23
27
  }
24
28
  function renderMethod(env, method) {
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
2
  import { DocsProvider } from "../contexts/docs.js";
3
- import "../use-strict-context-L0c8JKg4.js";
3
+ import "../use-strict-context-Clb6Yjly.js";
4
4
  import { useLanguageComponents } from "../contexts/index.js";
5
5
  import style_default from "../style.js";
6
6
  import { ComponentProvider } from "../contexts/component.js";
package/dist/routing.d.ts CHANGED
@@ -8,7 +8,7 @@ declare const Languages: readonly ["http", "node", "python", "go", "typescript",
8
8
  declare const SupportedLanguageSyntaxes: string[];
9
9
  type DocsLanguage = (typeof Languages)[number];
10
10
  declare const LanguageNames: Record<DocsLanguage, string>;
11
- declare function getLanguageSnippet(language: DocsLanguage): "http.curl" | "node.default" | "python.default" | "go.default" | "typescript.default" | "terraform.default" | "ruby.default" | "java.default" | "kotlin.default" | "csharp.default" | "php.default" | "cli.default";
11
+ declare function getLanguageSnippet(language: DocsLanguage): "cli.default" | "csharp.default" | "go.default" | "http.curl" | "java.default" | "kotlin.default" | "node.default" | "php.default" | "python.default" | "ruby.default" | "terraform.default" | "typescript.default";
12
12
  declare function isSupportedLanguage(language: string): language is DocsLanguage;
13
13
  type ParsedStainlessPath = ReturnType<typeof parseStainlessPath>;
14
14
  declare function parseStainlessPath(stainlessPath: string): {
@@ -5,7 +5,7 @@ function createStrictContext(displayName) {
5
5
  const Context = React.createContext(null);
6
6
  Context.displayName = displayName;
7
7
  function useStrictContext() {
8
- const context = React.useContext(Context);
8
+ const context = React.use(Context);
9
9
  if (context === null) throw new Error(`use${displayName} must be used within a ${displayName}Provider`);
10
10
  return context;
11
11
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stainless-api/docs-ui",
3
3
  "private": false,
4
- "version": "0.1.0-beta.84",
4
+ "version": "0.1.0-beta.85",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -85,7 +85,7 @@
85
85
  "scripts": {
86
86
  "build": "tsdown",
87
87
  "clean": "rm -rf dist",
88
- "lint": "eslint .",
88
+ "lint": "eslint --flag unstable_native_nodejs_ts_config .",
89
89
  "check:types": "tsc --noEmit"
90
90
  }
91
91
  }