@stainless-api/docs 0.1.0-beta.8 → 0.1.0-beta.9
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 +9 -0
- package/package.json +3 -3
- package/plugin/index.ts +1 -0
- package/plugin/loadPluginConfig.ts +1 -0
- package/plugin/react/Routing.tsx +3 -2
- package/stl-docs/components/content-panel/ContentPanel.astro +1 -2
- package/stl-docs/index.ts +0 -1
- package/stl-docs/loadStlDocsConfig.ts +0 -2
- package/virtual-module.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @stainless-api/docs
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d15a520: fix initialization of dropdown buttons
|
|
8
|
+
- Updated dependencies [d15a520]
|
|
9
|
+
- @stainless-api/ui-primitives@0.1.0-beta.8
|
|
10
|
+
- @stainless-api/docs-ui@0.1.0-beta.7
|
|
11
|
+
|
|
3
12
|
## 0.1.0-beta.8
|
|
4
13
|
|
|
5
14
|
### 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.9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"shiki": "^3.9.2",
|
|
56
56
|
"web-worker": "^1.5.0",
|
|
57
57
|
"yaml": "^2.8.0",
|
|
58
|
-
"@stainless-api/docs-ui": "0.1.0-beta.
|
|
59
|
-
"@stainless-api/ui-primitives": "0.1.0-beta.
|
|
58
|
+
"@stainless-api/docs-ui": "0.1.0-beta.7",
|
|
59
|
+
"@stainless-api/ui-primitives": "0.1.0-beta.8"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@markdoc/markdoc": "^0.5.2",
|
package/plugin/index.ts
CHANGED
|
@@ -213,6 +213,7 @@ async function stlStarlightAstroIntegration(
|
|
|
213
213
|
EXPERIMENTAL_COLLAPSIBLE_SNIPPETS: pluginConfig.experimentalCollapsibleSnippets,
|
|
214
214
|
PROPERTY_SETTINGS: pluginConfig.propertySettings,
|
|
215
215
|
SEARCH: pluginConfig.search,
|
|
216
|
+
INCLUDE_AI_DROPDOWN_OPTIONS: pluginConfig.includeAIDropdownOptions,
|
|
216
217
|
}),
|
|
217
218
|
vmMiddlewareExport,
|
|
218
219
|
].join('\n');
|
|
@@ -197,6 +197,7 @@ function normalizeConfig(partial: SomeStainlessStarlightUserConfig, command: Ast
|
|
|
197
197
|
search: {
|
|
198
198
|
enableAISearch: partial.search?.enableAISearch ?? false,
|
|
199
199
|
},
|
|
200
|
+
includeAIDropdownOptions: partial.includeAIDropdownOptions ?? false,
|
|
200
201
|
};
|
|
201
202
|
|
|
202
203
|
function getSpecRetrieverConfig(): SpecRetrieverConfig {
|
package/plugin/react/Routing.tsx
CHANGED
|
@@ -48,6 +48,7 @@ import {
|
|
|
48
48
|
HIGHLIGHT_THEMES,
|
|
49
49
|
BREADCRUMB_CONFIG,
|
|
50
50
|
PROPERTY_SETTINGS,
|
|
51
|
+
INCLUDE_AI_DROPDOWN_OPTIONS,
|
|
51
52
|
} from 'virtual:stl-starlight-virtual-module';
|
|
52
53
|
import style from '@stainless-api/docs-ui/src/style';
|
|
53
54
|
import { createHighlighter, type BundledLanguage, type BundledTheme, type HighlighterGeneric } from 'shiki';
|
|
@@ -332,7 +333,7 @@ export function RenderSpec({
|
|
|
332
333
|
basePath={BASE_PATH}
|
|
333
334
|
config={BREADCRUMB_CONFIG}
|
|
334
335
|
/>
|
|
335
|
-
<APIReferenceAIDropdown />
|
|
336
|
+
{INCLUDE_AI_DROPDOWN_OPTIONS && <APIReferenceAIDropdown />}
|
|
336
337
|
</div>
|
|
337
338
|
<SDKMethod
|
|
338
339
|
method={resource.methods[parsed.method]}
|
|
@@ -348,7 +349,7 @@ export function RenderSpec({
|
|
|
348
349
|
basePath={BASE_PATH}
|
|
349
350
|
config={BREADCRUMB_CONFIG}
|
|
350
351
|
/>
|
|
351
|
-
<APIReferenceAIDropdown />
|
|
352
|
+
{INCLUDE_AI_DROPDOWN_OPTIONS && <APIReferenceAIDropdown />}
|
|
352
353
|
</div>
|
|
353
354
|
<SDKOverview resource={resource} />
|
|
354
355
|
</div>
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { ContentBreadcrumbs } from './ContentBreadcrumbs';
|
|
3
3
|
import { ProseAIDropdown } from './ProseAIDropdown';
|
|
4
|
-
import { INCLUDE_AI_DROPDOWN_OPTIONS } from 'virtual:stl-
|
|
5
|
-
|
|
4
|
+
import { INCLUDE_AI_DROPDOWN_OPTIONS } from 'virtual:stl-starlight-virtual-module';
|
|
6
5
|
const currentPath = Astro.url.pathname;
|
|
7
6
|
---
|
|
8
7
|
|
package/stl-docs/index.ts
CHANGED
|
@@ -143,7 +143,6 @@ function stainlessDocsIntegration(config: NormalizedStainlessDocsConfig): AstroI
|
|
|
143
143
|
HEADER_LINKS: config.header.links,
|
|
144
144
|
HEADER_LAYOUT: config.header.layout,
|
|
145
145
|
ENABLE_CLIENT_ROUTER: config.enableClientRouter,
|
|
146
|
-
INCLUDE_AI_DROPDOWN_OPTIONS: config.includeAIDropdownOptions,
|
|
147
146
|
});
|
|
148
147
|
}
|
|
149
148
|
},
|
|
@@ -68,7 +68,6 @@ export type StainlessDocsUserConfig = {
|
|
|
68
68
|
starlightCompat?: ExperimentalStarlightCompatibilityConfig;
|
|
69
69
|
enableClientRouter?: boolean;
|
|
70
70
|
};
|
|
71
|
-
includeAIDropdownOptions?: boolean;
|
|
72
71
|
} & PassThroughStarlightConfigOptions;
|
|
73
72
|
|
|
74
73
|
type HeaderLayout = 'default' | 'stacked';
|
|
@@ -129,7 +128,6 @@ function normalizeConfig(userConfig: StainlessDocsUserConfig) {
|
|
|
129
128
|
enableClientRouter: userConfig.experimental?.enableClientRouter ?? false,
|
|
130
129
|
apiReference: userConfig.apiReference ?? null,
|
|
131
130
|
sidebar: userConfig.sidebar,
|
|
132
|
-
includeAIDropdownOptions: userConfig.includeAIDropdownOptions ?? false,
|
|
133
131
|
};
|
|
134
132
|
|
|
135
133
|
return configWithDefaults;
|
package/virtual-module.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ declare module 'virtual:stl-starlight-virtual-module' {
|
|
|
18
18
|
export const PROPERTY_SETTINGS: PropertySettingsType;
|
|
19
19
|
export const MIDDLEWARE: StlStarlightMiddleware;
|
|
20
20
|
export const SEARCH: StainlessStarlightUserConfig['search'];
|
|
21
|
+
export const INCLUDE_AI_DROPDOWN_OPTIONS: boolean;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
declare module 'virtual:stl-docs-virtual-module' {
|
|
@@ -40,5 +41,4 @@ declare module 'virtual:stl-docs-virtual-module' {
|
|
|
40
41
|
export const SPLIT_TABS_ENABLED: boolean;
|
|
41
42
|
export const HEADER_LAYOUT: 'default' | 'stacked';
|
|
42
43
|
export const ENABLE_CLIENT_ROUTER: boolean;
|
|
43
|
-
export const INCLUDE_AI_DROPDOWN_OPTIONS: boolean;
|
|
44
44
|
}
|