@stainless-api/docs 0.1.0-beta.53 → 0.1.0-beta.55
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 +27 -3
- package/eslint-suppressions.json +6 -1
- package/package.json +8 -7
- package/plugin/assets/languages/csharp.svg +1 -0
- package/plugin/buildAlgoliaIndex.ts +1 -1
- package/plugin/cms/server.ts +34 -4
- package/plugin/cms/worker.ts +80 -2
- package/plugin/components/SnippetCode.tsx +42 -1
- package/plugin/create-playground.shim.tsx +3 -0
- package/plugin/globalJs/code-snippets.ts +15 -8
- package/plugin/globalJs/copy.ts +81 -16
- package/plugin/index.ts +112 -3
- package/plugin/languages.ts +3 -0
- package/plugin/loadPluginConfig.ts +9 -0
- package/plugin/react/Routing.tsx +21 -22
- package/plugin/vendor/preview.worker.docs.js +8222 -7568
- package/scripts/vendor_deps.ts +4 -4
- package/stl-docs/index.ts +1 -1
- package/virtual-module.d.ts +5 -0
- package/tsconfig.tsbuildinfo +0 -1
package/scripts/vendor_deps.ts
CHANGED
|
@@ -11,12 +11,12 @@ config();
|
|
|
11
11
|
|
|
12
12
|
const envSchema = z.object({
|
|
13
13
|
// absolute path to the Stainless monorepo root
|
|
14
|
-
|
|
14
|
+
STAINLESS_ROOT: z.string(),
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
const env = envSchema.parse(process.env);
|
|
18
18
|
|
|
19
|
-
console.log(`Using Stainless monorepo at ${env.
|
|
19
|
+
console.log(`Using Stainless monorepo at ${env.STAINLESS_ROOT}`);
|
|
20
20
|
|
|
21
21
|
if (fs.existsSync(DEPS_DIR)) {
|
|
22
22
|
fs.rmSync(DEPS_DIR, { recursive: true });
|
|
@@ -25,11 +25,11 @@ if (fs.existsSync(DEPS_DIR)) {
|
|
|
25
25
|
fs.mkdirSync(DEPS_DIR, { recursive: true });
|
|
26
26
|
|
|
27
27
|
const previewWorkerPath = path.join(
|
|
28
|
-
env.
|
|
28
|
+
env.STAINLESS_ROOT,
|
|
29
29
|
'/packages/preview-worker/dist/stainless/preview.worker.docs.js',
|
|
30
30
|
);
|
|
31
31
|
|
|
32
|
-
const readmeTemplatePath = path.join(env.
|
|
32
|
+
const readmeTemplatePath = path.join(env.STAINLESS_ROOT, '/legacy-dir-root/templates');
|
|
33
33
|
|
|
34
34
|
fs.copyFileSync(previewWorkerPath, path.join(DEPS_DIR, 'preview.worker.docs.js'));
|
|
35
35
|
|
package/stl-docs/index.ts
CHANGED
|
@@ -197,7 +197,7 @@ function stainlessDocsIntegration(
|
|
|
197
197
|
'astro:build:done': ({ dir }) => {
|
|
198
198
|
if (redirects !== null) {
|
|
199
199
|
const stainlessDir = join(dir.pathname, '_stainless');
|
|
200
|
-
mkdirSync(stainlessDir);
|
|
200
|
+
mkdirSync(stainlessDir, { recursive: true });
|
|
201
201
|
const outputPath = join(stainlessDir, 'redirects.json');
|
|
202
202
|
writeFileSync(outputPath, JSON.stringify(redirects, null, 2), {
|
|
203
203
|
encoding: 'utf-8',
|
package/virtual-module.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
declare module 'virtual:stl-playground/create' {
|
|
2
|
+
export const createPlayground: CreatePlayground;
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
declare module 'virtual:stl-starlight-virtual-module' {
|
|
2
6
|
import type { CreateShikiHighlighterOptions } from '@astrojs/markdown-remark';
|
|
3
7
|
import type { PropertySettingsType } from '@stainless-api/docs-ui/contexts';
|
|
@@ -15,6 +19,7 @@ declare module 'virtual:stl-starlight-virtual-module' {
|
|
|
15
19
|
export const CONTENT_PANEL_LAYOUT: 'double-pane' | 'single-pane';
|
|
16
20
|
export const EXPERIMENTAL_COLLAPSIBLE_SNIPPETS: boolean | undefined;
|
|
17
21
|
export const EXPERIMENTAL_COLLAPSIBLE_METHOD_DESCRIPTIONS: boolean | undefined;
|
|
22
|
+
export const EXPERIMENTAL_PLAYGROUNDS: boolean | undefined;
|
|
18
23
|
export const PROPERTY_SETTINGS: PropertySettingsType;
|
|
19
24
|
export const MIDDLEWARE: StlStarlightMiddleware;
|
|
20
25
|
export const ENABLE_CONTEXT_MENU: boolean;
|