@stainless-api/docs 0.1.0-beta.100 → 0.1.0-beta.102
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 +15 -0
- package/package.json +11 -11
- package/shared/getProsePages.ts +6 -7
- package/stl-docs/index.ts +1 -0
- package/stl-docs/loadStlDocsConfig.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @stainless-api/docs
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.102
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a1b8e83: adds starlight passthrough option for configuring pagefind
|
|
8
|
+
|
|
9
|
+
## 0.1.0-beta.101
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- f81fade: Fix false negatives detecting prose pages to convert to markdown
|
|
14
|
+
- Updated dependencies [21e50d3]
|
|
15
|
+
- @stainless-api/docs-ui@0.1.0-beta.77
|
|
16
|
+
- @stainless-api/docs-search@0.1.0-beta.30
|
|
17
|
+
|
|
3
18
|
## 0.1.0-beta.100
|
|
4
19
|
|
|
5
20
|
### 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.102",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"@astrojs/react": "^4.4.2",
|
|
41
41
|
"@stainless-api/sdk": "0.1.0-alpha.19",
|
|
42
42
|
"astro-expressive-code": "^0.41.6",
|
|
43
|
-
"cheerio": "^1.
|
|
43
|
+
"cheerio": "^1.2.0",
|
|
44
44
|
"clsx": "^2.1.1",
|
|
45
|
-
"dotenv": "17.
|
|
46
|
-
"lucide-react": "^0.
|
|
47
|
-
"marked": "^17.0.
|
|
48
|
-
"node-html-parser": "^7.0.
|
|
45
|
+
"dotenv": "17.3.1",
|
|
46
|
+
"lucide-react": "^0.574.0",
|
|
47
|
+
"marked": "^17.0.3",
|
|
48
|
+
"node-html-parser": "^7.0.2",
|
|
49
49
|
"rehype-parse": "^9.0.1",
|
|
50
50
|
"rehype-remark": "^10.0.1",
|
|
51
51
|
"remark-gfm": "^4.0.1",
|
|
@@ -56,22 +56,22 @@
|
|
|
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.30",
|
|
60
|
+
"@stainless-api/docs-ui": "0.1.0-beta.77",
|
|
61
61
|
"@stainless-api/ui-primitives": "0.1.0-beta.48"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@astrojs/check": "^0.9.6",
|
|
65
65
|
"@markdoc/markdoc": "^0.5.4",
|
|
66
|
-
"@types/node": "24.10.
|
|
67
|
-
"@types/react": "19.2.
|
|
66
|
+
"@types/node": "24.10.13",
|
|
67
|
+
"@types/react": "19.2.14",
|
|
68
68
|
"@types/react-dom": "^19.2.3",
|
|
69
69
|
"react": "^19.2.4",
|
|
70
70
|
"react-dom": "^19.2.4",
|
|
71
71
|
"tsx": "^4.21.0",
|
|
72
72
|
"typescript": "5.9.3",
|
|
73
73
|
"vite": "^6.4.1",
|
|
74
|
-
"zod": "^4.3.
|
|
74
|
+
"zod": "^4.3.6",
|
|
75
75
|
"@stainless/eslint-config": "0.1.0-beta.1",
|
|
76
76
|
"@stainless/sdk-json": "^0.1.0-beta.7"
|
|
77
77
|
},
|
package/shared/getProsePages.ts
CHANGED
|
@@ -27,15 +27,14 @@ export async function getProsePages({
|
|
|
27
27
|
.filter((file) => file.isFile() && file.name.endsWith('.html'))
|
|
28
28
|
.map((file) => join(file.parentPath, file.name));
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
if (!apiReferenceBasePath) return htmlFiles;
|
|
31
|
+
// Normalize by removing leading/trailing slashes from apiReferenceBasePath
|
|
32
|
+
const normalizedApiPath = apiReferenceBasePath.replace(/^\/+/g, '').replace(/\/+$/g, '');
|
|
31
33
|
const pagesToRender = htmlFiles.filter((absPath) => {
|
|
32
|
-
if (!apiReferenceBasePath) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
34
|
const relPath = relative(outputBasePath, absPath);
|
|
36
|
-
//
|
|
37
|
-
|
|
38
|
-
return
|
|
35
|
+
// Filter out API reference pages
|
|
36
|
+
if (relPath === normalizedApiPath || relPath.startsWith(`${normalizedApiPath}/`)) return false;
|
|
37
|
+
return true;
|
|
39
38
|
});
|
|
40
39
|
|
|
41
40
|
return pagesToRender;
|
package/stl-docs/index.ts
CHANGED
|
@@ -38,7 +38,7 @@ type PassThroughStarlightConfigOptions = Pick<
|
|
|
38
38
|
|
|
39
39
|
type ExperimentalStarlightCompatibilityConfig = Pick<
|
|
40
40
|
StarlightConfigDefined,
|
|
41
|
-
'components' | 'routeMiddleware' | 'plugins' | 'prerender'
|
|
41
|
+
'components' | 'routeMiddleware' | 'plugins' | 'prerender' | 'pagefind'
|
|
42
42
|
>;
|
|
43
43
|
|
|
44
44
|
export type Tabs = {
|
|
@@ -166,6 +166,7 @@ function normalizeConfig(userConfig: StainlessDocsUserConfig) {
|
|
|
166
166
|
starlightCompat: {
|
|
167
167
|
components: userConfig.experimental?.starlightCompat?.components ?? {},
|
|
168
168
|
plugins: userConfig.experimental?.starlightCompat?.plugins ?? [],
|
|
169
|
+
pagefind: userConfig.experimental?.starlightCompat?.pagefind ?? true,
|
|
169
170
|
routeMiddleware: normalizeRouteMiddleware(userConfig),
|
|
170
171
|
},
|
|
171
172
|
enableClientRouter: userConfig.experimental?.enableClientRouter ?? false,
|