@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 +12 -0
- package/{eslint.config.js → eslint.config.ts} +0 -2
- package/package.json +2 -2
- package/plugin/components/RequestBuilder/index.tsx +4 -1
- package/plugin/components/SnippetCode.tsx +1 -1
- package/plugin/react/Routing.tsx +2 -2
- package/styles/sidebar.css +3 -0
- package/styles/toc.css +1 -1
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stainless-api/docs",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
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
|
|
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/react/Routing.tsx
CHANGED
|
@@ -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/styles/sidebar.css
CHANGED