@stainless-api/docs 0.1.0-beta.115 → 0.1.0-beta.117

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.117
4
+
5
+ ### Patch Changes
6
+
7
+ - af60696: ensure splash pages aren't uncentered from ghost sidebar
8
+
9
+ ## 0.1.0-beta.116
10
+
11
+ ### Patch Changes
12
+
13
+ - ad9552c: don’t let toc shrink to its intrinisc size
14
+
3
15
  ## 0.1.0-beta.115
4
16
 
5
17
  ### Minor 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.115",
3
+ "version": "0.1.0-beta.117",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -77,7 +77,7 @@
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') {
@@ -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
 
@@ -46,3 +46,6 @@
46
46
  /* Note: on mobile, this will be overridden to display: contents; in order to show the mobile menu */
47
47
  display: none;
48
48
  }
49
+ :root:has(.page > .sidebar.hidden) {
50
+ --stl-sidebar-width: 0px;
51
+ }
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 {