@stainless-api/docs 0.1.0-beta.109 → 0.1.0-beta.110
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 +14 -0
- package/package.json +4 -4
- package/plugin/index.ts +5 -2
- package/plugin/middlewareBuilder/stainlessMiddleware.d.ts +2 -0
- package/plugin/react/Routing.tsx +2 -0
- package/plugin/vendor/preview.worker.docs.js +4600 -4399
- package/styles/page.css +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @stainless-api/docs
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.110
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c1723f0: Updates preview worker
|
|
8
|
+
- 05cd046: Adds support for overriding components
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- f38f92f: fix scroll-padding-top
|
|
13
|
+
- Updated dependencies [05cd046]
|
|
14
|
+
- @stainless-api/docs-ui@0.1.0-beta.80
|
|
15
|
+
- @stainless-api/docs-search@0.1.0-beta.33
|
|
16
|
+
|
|
3
17
|
## 0.1.0-beta.109
|
|
4
18
|
|
|
5
19
|
### 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.110",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"vite-plugin-prebundle-workers": "^0.2.0",
|
|
57
57
|
"web-worker": "^1.5.0",
|
|
58
58
|
"yaml": "^2.8.2",
|
|
59
|
-
"@stainless-api/docs-search": "0.1.0-beta.
|
|
60
|
-
"@stainless-api/docs-ui": "0.1.0-beta.
|
|
59
|
+
"@stainless-api/docs-search": "0.1.0-beta.33",
|
|
60
|
+
"@stainless-api/docs-ui": "0.1.0-beta.80",
|
|
61
61
|
"@stainless-api/ui-primitives": "0.1.0-beta.49"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"vite": "^6.4.1",
|
|
74
74
|
"zod": "^4.3.6",
|
|
75
75
|
"@stainless/eslint-config": "0.1.0-beta.1",
|
|
76
|
-
"@stainless/sdk-json": "^0.1.0-beta.
|
|
76
|
+
"@stainless/sdk-json": "^0.1.0-beta.9"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"vendor-deps": "tsx scripts/vendor_deps.ts",
|
package/plugin/index.ts
CHANGED
|
@@ -162,10 +162,13 @@ async function stlStarlightAstroIntegration(
|
|
|
162
162
|
playgroundsBase = pluginConfig.experimentalPlaygrounds.playgroundsBase;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
const
|
|
165
|
+
const middlewareFileBase = path.join(projectDir, 'middleware.stainless');
|
|
166
|
+
const middlewareFile = ['.tsx', '.ts']
|
|
167
|
+
.map((ext) => middlewareFileBase + ext)
|
|
168
|
+
.find((f) => fs.existsSync(f));
|
|
166
169
|
|
|
167
170
|
let vmMiddlewareExport = 'export const MIDDLEWARE = {};';
|
|
168
|
-
if (
|
|
171
|
+
if (middlewareFile) {
|
|
169
172
|
logger.debug(`Loading middleware from ${middlewareFile}`);
|
|
170
173
|
vmMiddlewareExport = `export { default as MIDDLEWARE } from '${middlewareFile}';`;
|
|
171
174
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { TransformRequestSnippetFn } from '@stainless-api/docs-ui/components/sdk';
|
|
2
|
+
import type { AppComponents } from '@stainless-api/docs-ui/contexts/component';
|
|
2
3
|
|
|
3
4
|
export type StlStarlightMiddleware = {
|
|
4
5
|
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
6
|
+
componentOverrides?: Partial<AppComponents>;
|
|
5
7
|
};
|
package/plugin/react/Routing.tsx
CHANGED
|
@@ -51,6 +51,7 @@ import {
|
|
|
51
51
|
PROPERTY_SETTINGS,
|
|
52
52
|
ENABLE_CONTEXT_MENU,
|
|
53
53
|
EXPERIMENTAL_COLLAPSIBLE_METHOD_DESCRIPTIONS,
|
|
54
|
+
MIDDLEWARE,
|
|
54
55
|
} from 'virtual:stl-starlight-virtual-module';
|
|
55
56
|
import style from '@stainless-api/docs-ui/style';
|
|
56
57
|
import { BundledTheme, createHighlighter, HighlighterGeneric, type BundledLanguage } from 'shiki';
|
|
@@ -268,6 +269,7 @@ const componentOverrides = {
|
|
|
268
269
|
SnippetFooter,
|
|
269
270
|
SnippetResponse,
|
|
270
271
|
...(EXPERIMENTAL_COLLAPSIBLE_METHOD_DESCRIPTIONS ? { MethodDescription } : {}),
|
|
272
|
+
...MIDDLEWARE.componentOverrides,
|
|
271
273
|
} satisfies React.ComponentProps<typeof ComponentProvider>['components'];
|
|
272
274
|
|
|
273
275
|
export function RenderLibraries({ metadata }: { metadata: SpecMetadata }) {
|