@stainless-api/docs 0.1.0-beta.114 → 0.1.0-beta.116

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
  # @stainless-api/docs
2
2
 
3
+ ## 0.1.0-beta.116
4
+
5
+ ### Patch Changes
6
+
7
+ - ad9552c: don’t let toc shrink to its intrinisc size
8
+
9
+ ## 0.1.0-beta.115
10
+
11
+ ### Minor Changes
12
+
13
+ - 2a9da30: Update to Astro 6
14
+
3
15
  ## 0.1.0-beta.114
4
16
 
5
17
  ### Patch Changes
@@ -1,5 +1,3 @@
1
- // @ts-check
2
-
3
1
  import { defineConfig } from 'eslint/config';
4
2
  import { config } from '@stainless/eslint-config/astro';
5
3
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stainless-api/docs",
3
- "version": "0.1.0-beta.114",
3
+ "version": "0.1.0-beta.116",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -26,18 +26,18 @@
26
26
  "author": "",
27
27
  "license": "ISC",
28
28
  "engines": {
29
- "node": ">=18.17.1"
29
+ "node": ">=22.12.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@astrojs/starlight": ">=0.37.5",
33
33
  "astro": ">=5.15.3",
34
34
  "react": ">=19.0.0",
35
35
  "react-dom": ">=19.0.0",
36
- "vite": ">=6.2.1"
36
+ "vite": ">=7.3.1"
37
37
  },
38
38
  "dependencies": {
39
- "@astrojs/markdown-remark": "^6.3.10",
40
- "@astrojs/react": "^4.4.2",
39
+ "@astrojs/markdown-remark": "^7.0.0",
40
+ "@astrojs/react": "^5.0.0",
41
41
  "@stainless-api/sdk": "0.1.0-alpha.19",
42
42
  "astro-expressive-code": "^0.41.6",
43
43
  "cheerio": "^1.2.0",
@@ -51,7 +51,7 @@
51
51
  "remark-gfm": "^4.0.1",
52
52
  "remark-github-alerts": "^0.1.1",
53
53
  "remark-stringify": "^11.0.0",
54
- "shiki": "^3.22.0",
54
+ "shiki": "^4.0.2",
55
55
  "unified": "^11.0.5",
56
56
  "vite-plugin-prebundle-workers": "^0.2.0",
57
57
  "web-worker": "^1.5.0",
@@ -61,7 +61,7 @@
61
61
  "@stainless-api/ui-primitives": "0.1.0-beta.49"
62
62
  },
63
63
  "devDependencies": {
64
- "@astrojs/check": "^0.9.6",
64
+ "@astrojs/check": "^0.9.7",
65
65
  "@markdoc/markdoc": "^0.5.4",
66
66
  "@types/node": "24.10.13",
67
67
  "@types/react": "19.2.14",
@@ -70,14 +70,14 @@
70
70
  "react-dom": "^19.2.4",
71
71
  "tsx": "^4.21.0",
72
72
  "typescript": "5.9.3",
73
- "vite": "^6.4.1",
73
+ "vite": "^7.3.1",
74
74
  "zod": "^4.3.6",
75
- "@stainless/eslint-config": "0.1.0-beta.1",
76
- "@stainless/sdk-json": "^0.1.0-beta.9"
75
+ "@stainless/sdk-json": "^0.1.0-beta.9",
76
+ "@stainless/eslint-config": "0.1.0-beta.1"
77
77
  },
78
78
  "scripts": {
79
79
  "vendor-deps": "tsx scripts/vendor_deps.ts",
80
- "lint": "eslint . --max-warnings 0",
80
+ "lint": "eslint --flag unstable_native_nodejs_ts_config . --max-warnings 0",
81
81
  "sync": "astro sync",
82
82
  "check:types": "astro check"
83
83
  }
@@ -16,13 +16,16 @@ export function RequestBuilder({
16
16
  }) {
17
17
  let params: Param[];
18
18
  const spec = useSpec();
19
+ // https://github.com/Rel1cx/eslint-react/issues/1617
20
+ /* eslint-disable @eslint-react/error-boundaries */
19
21
  try {
20
22
  if (!spec) throw new Error('Spec is required for RequestBuilder');
21
23
  params = spec && extractParams(spec, method);
22
24
  } catch (e) {
23
- console.warn(e);
25
+ console.warn(e); // eslint-disable-line @eslint-react/purity
24
26
  return <div className={className}>{children}</div>;
25
27
  }
28
+ /* eslint-enable */
26
29
  const [httpMethod, path] = method.endpoint.split(' ') as [string, string];
27
30
 
28
31
  return (
@@ -49,7 +49,7 @@ function getCollapsedRanges(content: string, language: string, signature?: strin
49
49
  const sigIdx = raw.findIndex((l) => l.includes(signature));
50
50
  if (sigIdx < 0) return [];
51
51
 
52
- let finalIndex = undefined;
52
+ let finalIndex;
53
53
  if (language === 'kotlin' || language === 'java') {
54
54
  finalIndex = raw.findIndex((l, i) => i > sigIdx && l.trim() === '}');
55
55
  } else if (language === 'python') {
package/plugin/index.ts CHANGED
@@ -1,9 +1,7 @@
1
1
  import react from '@astrojs/react';
2
2
  import type { StarlightPlugin } from '@astrojs/starlight/types';
3
3
  import type { AstroIntegration } from 'astro';
4
- import type { BundledTheme } from 'shiki';
5
4
  import { config } from 'dotenv';
6
- // import { buildAlgoliaIndex } from './buildAlgoliaIndex';
7
5
  import {
8
6
  getAPIReferencePlaceholderItemFromSidebarConfig,
9
7
  makePlaceholderItems,
@@ -464,8 +462,8 @@ export function stainlessStarlight(someUserConfig: SomeStainlessStarlightUserCon
464
462
  typeof starlightConfig.expressiveCode === 'object' ? starlightConfig.expressiveCode : {};
465
463
 
466
464
  const themes = expressiveCodeConfig.themes
467
- ? (expressiveCodeConfig.themes as BundledTheme[])
468
- : (['github-light', 'github-dark'] as BundledTheme[]);
465
+ ? expressiveCodeConfig.themes
466
+ : (['github-light', 'github-dark'] satisfies (typeof expressiveCodeConfig)['themes']);
469
467
 
470
468
  updateConfig({
471
469
  sidebar: starlightConfig.sidebar,
@@ -336,7 +336,7 @@ export function RenderSpec({
336
336
  const resource = getResourceFromSpec(path, spec);
337
337
 
338
338
  if (!resource || !parsed) {
339
- console.warn(`Could not find resource or parsed path for '${path}'`);
339
+ console.warn(`Could not find resource or parsed path for '${path}'`); // eslint-disable-line @eslint-react/purity
340
340
  return null;
341
341
  }
342
342
 
@@ -388,7 +388,7 @@ export function RenderMethod({ path }: { path: string }) {
388
388
  const resource = getResourceFromSpec(path, spec);
389
389
 
390
390
  if (!resource || !parsed) {
391
- console.warn(`Could not find resource or parsed path for '${path}'`);
391
+ console.warn(`Could not find resource or parsed path for '${path}'`); // eslint-disable-line @eslint-react/purity
392
392
  return null;
393
393
  }
394
394
 
package/stl-docs/fonts.ts CHANGED
@@ -3,7 +3,7 @@ import type { Defined } from './loadStlDocsConfig';
3
3
  import { fontProviders } from 'astro/config';
4
4
  import type { FontPreloadFilter } from 'astro:assets';
5
5
 
6
- type AstroFontConfigEntry = Defined<AstroConfig['experimental']['fonts']>[number];
6
+ type AstroFontConfigEntry = Defined<AstroConfig['fonts']>[number];
7
7
 
8
8
  // Apply Omit to each member of the union while preserving union structure
9
9
  type PreloadFilter = { preload?: FontPreloadFilter };
package/stl-docs/index.ts CHANGED
@@ -205,9 +205,7 @@ function stainlessDocsIntegration(
205
205
  );
206
206
 
207
207
  updateConfig({
208
- experimental: {
209
- fonts: [...flattenFonts(config.fonts), ...(astroConfig.experimental?.fonts ?? [])],
210
- },
208
+ fonts: [...flattenFonts(config.fonts), ...(astroConfig?.fonts ?? [])],
211
209
  vite: {
212
210
  plugins: [
213
211
  {
package/styles/toc.css CHANGED
@@ -3,8 +3,8 @@
3
3
  overflow-wrap: break-word;
4
4
 
5
5
  nav {
6
+ width: calc(16 * var(--vw));
6
7
  min-width: 14ch;
7
- max-width: calc(18 * var(--vw));
8
8
  }
9
9
 
10
10
  nav > ul {