@stainless-api/docs 0.1.0-beta.126 → 0.1.0-beta.128
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,22 @@
|
|
|
1
1
|
# @stainless-api/docs
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.128
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e8a95f4: Revert “Fix getProsePages treating all pages as prose when API reference basePath is empty”
|
|
8
|
+
|
|
9
|
+
## 0.1.0-beta.127
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- e0d595f: Fix snippet copy button click handler
|
|
14
|
+
- 8752b4e: Fix getProsePages treating all pages as prose when API reference basePath is ""
|
|
15
|
+
- Updated dependencies [871f3c0]
|
|
16
|
+
- Updated dependencies [871f3c0]
|
|
17
|
+
- @stainless-api/docs-ui@0.1.0-beta.91
|
|
18
|
+
- @stainless-api/docs-search@0.1.0-beta.44
|
|
19
|
+
|
|
3
20
|
## 0.1.0-beta.126
|
|
4
21
|
|
|
5
22
|
### Patch 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.128",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@astrojs/markdown-remark": "^7.1.0",
|
|
45
45
|
"@astrojs/react": "^5.0.2",
|
|
46
|
-
"@markdoc/markdoc": "^0.5.
|
|
46
|
+
"@markdoc/markdoc": "^0.5.7",
|
|
47
47
|
"@stainless-api/sdk": "0.5.0",
|
|
48
48
|
"astro-expressive-code": "^0.41.7",
|
|
49
49
|
"cheerio": "^1.2.0",
|
|
50
50
|
"clsx": "^2.1.1",
|
|
51
|
-
"dotenv": "17.
|
|
51
|
+
"dotenv": "17.4.0",
|
|
52
52
|
"lucide-react": "^0.577.0",
|
|
53
53
|
"node-html-parser": "^7.1.0",
|
|
54
54
|
"rehype-parse": "^9.0.1",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"vite-plugin-prebundle-workers": "^0.2.0",
|
|
62
62
|
"web-worker": "^1.5.0",
|
|
63
63
|
"yaml": "^2.8.3",
|
|
64
|
-
"@stainless-api/docs-search": "0.1.0-beta.
|
|
65
|
-
"@stainless-api/docs-ui": "0.1.0-beta.
|
|
64
|
+
"@stainless-api/docs-search": "0.1.0-beta.44",
|
|
65
|
+
"@stainless-api/docs-ui": "0.1.0-beta.91",
|
|
66
66
|
"@stainless-api/ui-primitives": "0.1.0-beta.51"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"react": "^19.2.4",
|
|
74
74
|
"react-dom": "^19.2.4",
|
|
75
75
|
"tsx": "^4.21.0",
|
|
76
|
-
"typescript": "
|
|
76
|
+
"typescript": "6.0.2",
|
|
77
77
|
"vite": "^7.3.1",
|
|
78
78
|
"vitest": "^4.1.2",
|
|
79
79
|
"zod": "^4.3.6",
|
|
@@ -22,7 +22,7 @@ export function RequestBuilder({
|
|
|
22
22
|
if (!spec) throw new Error('Spec is required for RequestBuilder');
|
|
23
23
|
params = spec && extractParams(spec, method);
|
|
24
24
|
} catch (e) {
|
|
25
|
-
console.warn(e);
|
|
25
|
+
console.warn(e);
|
|
26
26
|
return <div className={className}>{children}</div>;
|
|
27
27
|
}
|
|
28
28
|
/* eslint-enable */
|
package/plugin/globalJs/copy.ts
CHANGED
|
@@ -33,7 +33,7 @@ const preloadPlayground = (event: Event) => {
|
|
|
33
33
|
};
|
|
34
34
|
addEventListener('mouseover', preloadPlayground);
|
|
35
35
|
addEventListener('click', (event) => {
|
|
36
|
-
if (!(event.target instanceof
|
|
36
|
+
if (!(event.target instanceof Element)) return;
|
|
37
37
|
const copyButton = event.target.closest('[data-stldocs-snippet-copy]');
|
|
38
38
|
if (!(copyButton instanceof HTMLElement)) return;
|
|
39
39
|
|
|
@@ -39,24 +39,22 @@ document.addEventListener(getPageLoadEvent(), () => {
|
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
document.addEventListener('click', (event) => {
|
|
42
|
-
const toggle =
|
|
43
|
-
'[data-stldocs-property-toggle-expanded]
|
|
44
|
-
)
|
|
42
|
+
const toggle =
|
|
43
|
+
event.target instanceof HTMLElement && event.target.closest('[data-stldocs-property-toggle-expanded]');
|
|
44
|
+
if (!toggle || !(toggle instanceof HTMLElement)) return;
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
toggle.dataset.stldocsPropertyToggleExpanded = state ? 'false' : 'true';
|
|
46
|
+
// Toggle the “expanded” state of the toggle
|
|
47
|
+
const toggleIsExpanded = toggle.dataset.stldocsPropertyToggleExpanded === 'true';
|
|
48
|
+
toggle.dataset.stldocsPropertyToggleExpanded = (!toggleIsExpanded).toString();
|
|
50
49
|
|
|
50
|
+
// Find the described “property group”
|
|
51
51
|
const targetGroup = toggle.dataset.stldocsPropertyToggleTarget;
|
|
52
52
|
if (!targetGroup) return;
|
|
53
|
-
|
|
54
53
|
const target = document.querySelector(`[data-stldocs-property-group=${targetGroup}]`);
|
|
55
54
|
if (!target) return;
|
|
56
55
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
el.open = initial === 'true' ? true : !state;
|
|
56
|
+
// Expand or collapse all <details> elements within the target group
|
|
57
|
+
[...target.getElementsByTagName('details')].forEach((el) => {
|
|
58
|
+
el.open = el.dataset.stldocsExpanderInitialState === 'true' ? true : !toggleIsExpanded;
|
|
61
59
|
});
|
|
62
60
|
});
|
package/plugin/react/Routing.tsx
CHANGED
|
@@ -277,7 +277,7 @@ export function RenderSpec({
|
|
|
277
277
|
const resource = getResourceFromSpec(path, spec);
|
|
278
278
|
|
|
279
279
|
if (!resource || !parsed) {
|
|
280
|
-
console.warn(`Could not find resource or parsed path for '${path}'`);
|
|
280
|
+
console.warn(`Could not find resource or parsed path for '${path}'`);
|
|
281
281
|
return null;
|
|
282
282
|
}
|
|
283
283
|
|
|
@@ -329,7 +329,7 @@ export function RenderMethod({ path }: { path: string }) {
|
|
|
329
329
|
const resource = getResourceFromSpec(path, spec);
|
|
330
330
|
|
|
331
331
|
if (!resource || !parsed) {
|
|
332
|
-
console.warn(`Could not find resource or parsed path for '${path}'`);
|
|
332
|
+
console.warn(`Could not find resource or parsed path for '${path}'`);
|
|
333
333
|
return null;
|
|
334
334
|
}
|
|
335
335
|
|