@stainless-api/docs 0.1.0-beta.5 → 0.1.0-beta.51
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 +390 -0
- package/eslint-suppressions.json +47 -0
- package/locals.d.ts +14 -0
- package/package.json +43 -39
- package/plugin/buildAlgoliaIndex.ts +31 -6
- package/plugin/cms/server.ts +98 -56
- package/plugin/cms/sidebar-builder.ts +7 -26
- package/plugin/cms/worker.ts +3 -3
- package/plugin/components/MethodDescription.tsx +54 -0
- package/plugin/components/SDKSelect.astro +7 -87
- package/plugin/components/SnippetCode.tsx +11 -7
- package/plugin/components/search/SearchAlgolia.astro +5 -33
- package/plugin/components/search/SearchIsland.tsx +37 -23
- package/plugin/generateAPIReferenceLink.ts +2 -2
- package/plugin/globalJs/ai-dropdown-options.ts +235 -0
- package/plugin/globalJs/method-descriptions.ts +33 -0
- package/plugin/globalJs/navigation.ts +7 -27
- package/plugin/helpers/getPageLoadEvent.ts +1 -1
- package/plugin/index.ts +54 -34
- package/plugin/languages.ts +2 -2
- package/plugin/loadPluginConfig.ts +112 -32
- package/plugin/middlewareBuilder/stainlessMiddleware.d.ts +1 -1
- package/plugin/react/Routing.tsx +176 -80
- package/plugin/referencePlaceholderUtils.ts +1 -1
- package/plugin/replaceSidebarPlaceholderMiddleware.ts +5 -1
- package/plugin/routes/Docs.astro +60 -85
- package/plugin/routes/Overview.astro +10 -16
- package/plugin/routes/markdown.ts +7 -7
- package/plugin/vendor/preview.worker.docs.js +17973 -16561
- package/plugin/vendor/templates/go.md +1 -1
- package/plugin/vendor/templates/python.md +1 -1
- package/resolveSrcFile.ts +10 -0
- package/scripts/vendor_deps.ts +1 -1
- package/shared/getSharedLogger.ts +15 -0
- package/shared/terminalUtils.ts +3 -0
- package/src/content.config.ts +9 -0
- package/stl-docs/components/AIDropdown.tsx +63 -0
- package/stl-docs/components/{content-panel/ContentBreadcrumbs.tsx → ContentBreadcrumbs.tsx} +2 -2
- package/stl-docs/components/Head.astro +16 -0
- package/stl-docs/components/Header.astro +6 -8
- package/stl-docs/components/PageTitle.astro +82 -0
- package/stl-docs/components/TableOfContents.astro +34 -0
- package/stl-docs/components/ThemeSelect.astro +118 -141
- package/stl-docs/components/content-panel/ContentPanel.astro +16 -46
- package/stl-docs/components/headers/DefaultHeader.astro +1 -1
- package/stl-docs/components/headers/HeaderLinks.astro +1 -1
- package/stl-docs/components/headers/SplashMobileMenuToggle.astro +17 -1
- package/stl-docs/components/headers/StackedHeader.astro +29 -24
- package/stl-docs/components/icons/chat-gpt.tsx +17 -0
- package/stl-docs/components/icons/claude.tsx +10 -0
- package/stl-docs/components/icons/cursor.tsx +10 -0
- package/stl-docs/components/icons/gemini.tsx +19 -0
- package/stl-docs/components/icons/markdown.tsx +10 -0
- package/stl-docs/components/index.ts +1 -0
- package/stl-docs/components/mintlify-compat/Accordion.astro +7 -38
- package/stl-docs/components/mintlify-compat/AccordionGroup.astro +9 -23
- package/stl-docs/components/mintlify-compat/Columns.astro +40 -42
- package/stl-docs/components/mintlify-compat/Frame.astro +16 -18
- package/stl-docs/components/mintlify-compat/Step.astro +30 -32
- package/stl-docs/components/mintlify-compat/Steps.astro +8 -10
- package/stl-docs/components/mintlify-compat/callouts/Callout.astro +10 -3
- package/stl-docs/components/mintlify-compat/callouts/Check.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Danger.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Info.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Note.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Tip.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Warning.astro +7 -3
- package/stl-docs/components/mintlify-compat/card.css +33 -35
- package/stl-docs/components/nav-tabs/NavDropdown.astro +31 -75
- package/stl-docs/components/nav-tabs/NavTabs.astro +78 -80
- package/stl-docs/components/nav-tabs/SecondaryNavTabs.astro +15 -8
- package/stl-docs/components/nav-tabs/buildNavLinks.ts +4 -3
- package/stl-docs/components/pagination/HomeLink.astro +10 -0
- package/stl-docs/components/pagination/Pagination.astro +174 -0
- package/stl-docs/components/pagination/PaginationLinkEmphasized.astro +22 -0
- package/stl-docs/components/pagination/PaginationLinkQuiet.astro +13 -0
- package/stl-docs/components/pagination/util.ts +71 -0
- package/stl-docs/components/scripts.ts +1 -0
- package/stl-docs/components/{Sidebar.astro → sidebars/BaseSidebar.astro} +2 -3
- package/stl-docs/components/sidebars/SDKSelectSidebar.astro +8 -0
- package/stl-docs/disableCalloutSyntax.ts +36 -0
- package/stl-docs/index.ts +98 -26
- package/stl-docs/loadStlDocsConfig.ts +37 -5
- package/stl-docs/proseMarkdown/proseMarkdownIntegration.ts +64 -0
- package/stl-docs/proseMarkdown/proseMarkdownMiddleware.ts +34 -0
- package/stl-docs/proseMarkdown/toMarkdown.ts +158 -0
- package/stl-docs/tabsMiddleware.ts +12 -4
- package/styles/code.css +104 -141
- package/styles/fonts.css +32 -17
- package/styles/links.css +11 -48
- package/styles/method-descriptions.css +36 -0
- package/styles/overrides.css +49 -57
- package/styles/page.css +90 -59
- package/styles/sdk_select.css +9 -7
- package/styles/search.css +58 -69
- package/styles/sidebar.css +211 -131
- package/styles/{variables.css → sl-variables.css} +3 -2
- package/styles/stldocs-variables.css +6 -0
- package/styles/toc.css +41 -34
- package/theme.css +12 -2
- package/tsconfig.json +2 -5
- package/virtual-module.d.ts +8 -4
- package/components/variables.css +0 -139
- package/plugin/globalJs/ai-dropdown.ts +0 -57
- package/stl-docs/components/APIReferenceAIDropdown.tsx +0 -86
- package/stl-docs/components/content-panel/ProseAIDropdown.tsx +0 -64
- /package/{plugin/assets → assets}/fonts/geist/OFL.txt +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-italic-latin-ext.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-italic-latin.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-latin-ext.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-latin.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-mono-italic-latin-ext.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-mono-italic-latin.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-mono-latin-ext.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-mono-latin.woff2 +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,395 @@
|
|
|
1
1
|
# @stainless-api/docs
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.51
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4fc191c: standardize accent border colors
|
|
8
|
+
- Updated dependencies [3d2179f]
|
|
9
|
+
- @stainless-api/ui-primitives@0.1.0-beta.31
|
|
10
|
+
- @stainless-api/docs-ui@0.1.0-beta.42
|
|
11
|
+
|
|
12
|
+
## 0.1.0-beta.50
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 6de051d: update vendored preview worker
|
|
17
|
+
|
|
18
|
+
## 0.1.0-beta.49
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [b9e4b82]
|
|
23
|
+
- Updated dependencies [6d12e06]
|
|
24
|
+
- Updated dependencies [5051795]
|
|
25
|
+
- @stainless-api/ui-primitives@0.1.0-beta.30
|
|
26
|
+
- @stainless-api/docs-ui@0.1.0-beta.41
|
|
27
|
+
|
|
28
|
+
## 0.1.0-beta.48
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Updated dependencies [81b5b21]
|
|
33
|
+
- Updated dependencies [ba269f9]
|
|
34
|
+
- Updated dependencies [e2a7098]
|
|
35
|
+
- Updated dependencies [589b13d]
|
|
36
|
+
- @stainless-api/ui-primitives@0.1.0-beta.29
|
|
37
|
+
- @stainless-api/docs-ui@0.1.0-beta.40
|
|
38
|
+
|
|
39
|
+
## 0.1.0-beta.47
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- 466285c: Fixes for expressive code styles
|
|
44
|
+
- Ensure expressive code styles are applied to docs sites that do not include API reference
|
|
45
|
+
- Use correct red & green palettes for ins/del diff annotations
|
|
46
|
+
|
|
47
|
+
- Updated dependencies [d2d5d51]
|
|
48
|
+
- @stainless-api/ui-primitives@0.1.0-beta.28
|
|
49
|
+
- @stainless-api/docs-ui@0.1.0-beta.39
|
|
50
|
+
|
|
51
|
+
## 0.1.0-beta.46
|
|
52
|
+
|
|
53
|
+
### Minor Changes
|
|
54
|
+
|
|
55
|
+
- b61b7c1: New theming system
|
|
56
|
+
|
|
57
|
+
A whole new set of design system variables used throughout docs, docs-ui, and ui-primitives
|
|
58
|
+
|
|
59
|
+
Improves customizability & uniformness compared to the old set of variables.
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- Updated dependencies [b61b7c1]
|
|
64
|
+
- Updated dependencies [262f201]
|
|
65
|
+
- @stainless-api/docs-ui@0.1.0-beta.38
|
|
66
|
+
- @stainless-api/ui-primitives@0.1.0-beta.27
|
|
67
|
+
|
|
68
|
+
## 0.1.0-beta.45
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- 00b33d9: syntax highlighting for markdown renderer
|
|
73
|
+
- fa43cff: json brackets should use muted foreground color
|
|
74
|
+
- c06e5c3: update marked dependency
|
|
75
|
+
- 32d1735: experimental support for collapsible method descriptions
|
|
76
|
+
- Updated dependencies [00b33d9]
|
|
77
|
+
- Updated dependencies [32d1735]
|
|
78
|
+
- Updated dependencies [23254d1]
|
|
79
|
+
- @stainless-api/ui-primitives@0.1.0-beta.26
|
|
80
|
+
- @stainless-api/docs-ui@0.1.0-beta.37
|
|
81
|
+
|
|
82
|
+
## 0.1.0-beta.44
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [38b7030]
|
|
87
|
+
- @stainless-api/docs-ui@0.1.0-beta.36
|
|
88
|
+
|
|
89
|
+
## 0.1.0-beta.43
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- a44a012: Remove debug code
|
|
94
|
+
|
|
95
|
+
## 0.1.0-beta.42
|
|
96
|
+
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- Updated dependencies [3817ff5]
|
|
100
|
+
- Updated dependencies [391a7ce]
|
|
101
|
+
- Updated dependencies [945d4f3]
|
|
102
|
+
- @stainless-api/docs-ui@0.1.0-beta.35
|
|
103
|
+
|
|
104
|
+
## 0.1.0-beta.41
|
|
105
|
+
|
|
106
|
+
### Patch Changes
|
|
107
|
+
|
|
108
|
+
- 6557889: temporarily remove experimental AI search feature
|
|
109
|
+
- Updated dependencies [6557889]
|
|
110
|
+
- @stainless-api/docs-ui@0.1.0-beta.34
|
|
111
|
+
|
|
112
|
+
## 0.1.0-beta.40
|
|
113
|
+
|
|
114
|
+
### Patch Changes
|
|
115
|
+
|
|
116
|
+
- Updated dependencies [8670d73]
|
|
117
|
+
- @stainless-api/docs-ui@0.1.0-beta.33
|
|
118
|
+
|
|
119
|
+
## 0.1.0-beta.39
|
|
120
|
+
|
|
121
|
+
### Patch Changes
|
|
122
|
+
|
|
123
|
+
- 242deef: fix mobile menu on splash pages
|
|
124
|
+
- Updated dependencies [242deef]
|
|
125
|
+
- @stainless-api/ui-primitives@0.1.0-beta.25
|
|
126
|
+
- @stainless-api/docs-ui@0.1.0-beta.32
|
|
127
|
+
|
|
128
|
+
## 0.1.0-beta.38
|
|
129
|
+
|
|
130
|
+
### Patch Changes
|
|
131
|
+
|
|
132
|
+
- Updated dependencies [c28b0a6]
|
|
133
|
+
- Updated dependencies [f23c6bc]
|
|
134
|
+
- Updated dependencies [2cd1b33]
|
|
135
|
+
- @stainless-api/docs-ui@0.1.0-beta.31
|
|
136
|
+
- @stainless-api/ui-primitives@0.1.0-beta.24
|
|
137
|
+
|
|
138
|
+
## 0.1.0-beta.37
|
|
139
|
+
|
|
140
|
+
### Patch Changes
|
|
141
|
+
|
|
142
|
+
- 5f14e53: Render page descriptions as part of page header by default
|
|
143
|
+
- Updated dependencies [49e1b93]
|
|
144
|
+
- @stainless-api/docs-ui@0.1.0-beta.30
|
|
145
|
+
- @stainless-api/ui-primitives@0.1.0-beta.23
|
|
146
|
+
|
|
147
|
+
## 0.1.0-beta.36
|
|
148
|
+
|
|
149
|
+
### Patch Changes
|
|
150
|
+
|
|
151
|
+
- Updated dependencies [7897575]
|
|
152
|
+
- @stainless-api/ui-primitives@0.1.0-beta.22
|
|
153
|
+
- @stainless-api/docs-ui@0.1.0-beta.29
|
|
154
|
+
|
|
155
|
+
## 0.1.0-beta.35
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- Updated dependencies [344761e]
|
|
160
|
+
- @stainless-api/ui-primitives@0.1.0-beta.21
|
|
161
|
+
- @stainless-api/docs-ui@0.1.0-beta.28
|
|
162
|
+
|
|
163
|
+
## 0.1.0-beta.34
|
|
164
|
+
|
|
165
|
+
### Patch Changes
|
|
166
|
+
|
|
167
|
+
- f5173e9: fix: theme flickering
|
|
168
|
+
|
|
169
|
+
## 0.1.0-beta.33
|
|
170
|
+
|
|
171
|
+
### Patch Changes
|
|
172
|
+
|
|
173
|
+
- 7ef572c: feat: updated dropdowns
|
|
174
|
+
- Updated dependencies [7ef572c]
|
|
175
|
+
- @stainless-api/docs-ui@0.1.0-beta.27
|
|
176
|
+
- @stainless-api/ui-primitives@0.1.0-beta.20
|
|
177
|
+
|
|
178
|
+
## 0.1.0-beta.32
|
|
179
|
+
|
|
180
|
+
### Patch Changes
|
|
181
|
+
|
|
182
|
+
- 58040d8: feat: ui primitives updates, cursor support
|
|
183
|
+
- Updated dependencies [58040d8]
|
|
184
|
+
- @stainless-api/docs-ui@0.1.0-beta.26
|
|
185
|
+
- @stainless-api/ui-primitives@0.1.0-beta.19
|
|
186
|
+
|
|
187
|
+
## 0.1.0-beta.31
|
|
188
|
+
|
|
189
|
+
### Patch Changes
|
|
190
|
+
|
|
191
|
+
- Updated dependencies [afd1f8e]
|
|
192
|
+
- Updated dependencies [279fa0e]
|
|
193
|
+
- @stainless-api/docs-ui@0.1.0-beta.25
|
|
194
|
+
|
|
195
|
+
## 0.1.0-beta.30
|
|
196
|
+
|
|
197
|
+
### Patch Changes
|
|
198
|
+
|
|
199
|
+
- Updated dependencies [ab570bc]
|
|
200
|
+
- @stainless-api/docs-ui@0.1.0-beta.24
|
|
201
|
+
|
|
202
|
+
## 0.1.0-beta.29
|
|
203
|
+
|
|
204
|
+
### Patch Changes
|
|
205
|
+
|
|
206
|
+
- Updated dependencies [279fa0e]
|
|
207
|
+
- @stainless-api/docs-ui@0.1.0-beta.23
|
|
208
|
+
|
|
209
|
+
## 0.1.0-beta.28
|
|
210
|
+
|
|
211
|
+
### Minor Changes
|
|
212
|
+
|
|
213
|
+
- c635741: Updated worker and fixed docs-ui jsx issue
|
|
214
|
+
|
|
215
|
+
### Patch Changes
|
|
216
|
+
|
|
217
|
+
- Updated dependencies [c635741]
|
|
218
|
+
- @stainless-api/docs-ui@0.1.0-beta.22
|
|
219
|
+
- @stainless-api/ui-primitives@0.1.0-beta.18
|
|
220
|
+
|
|
221
|
+
## 0.1.0-beta.27
|
|
222
|
+
|
|
223
|
+
### Patch Changes
|
|
224
|
+
|
|
225
|
+
- de189ee: remove max width on site title
|
|
226
|
+
|
|
227
|
+
## 0.1.0-beta.26
|
|
228
|
+
|
|
229
|
+
### Patch Changes
|
|
230
|
+
|
|
231
|
+
- 1517484: fixing font loading, updating nav bar height
|
|
232
|
+
- Updated dependencies [1517484]
|
|
233
|
+
- @stainless-api/docs-ui@0.1.0-beta.21
|
|
234
|
+
- @stainless-api/ui-primitives@0.1.0-beta.17
|
|
235
|
+
|
|
236
|
+
## 0.1.0-beta.25
|
|
237
|
+
|
|
238
|
+
### Patch Changes
|
|
239
|
+
|
|
240
|
+
- Updated dependencies [b9ce1b6]
|
|
241
|
+
- @stainless-api/docs-ui@0.1.0-beta.20
|
|
242
|
+
|
|
243
|
+
## 0.1.0-beta.24
|
|
244
|
+
|
|
245
|
+
### Patch Changes
|
|
246
|
+
|
|
247
|
+
- Updated dependencies [402222a]
|
|
248
|
+
- @stainless-api/docs-ui@0.1.0-beta.19
|
|
249
|
+
|
|
250
|
+
## 0.1.0-beta.23
|
|
251
|
+
|
|
252
|
+
### Patch Changes
|
|
253
|
+
|
|
254
|
+
- Updated dependencies [2150eee]
|
|
255
|
+
- @stainless-api/docs-ui@0.1.0-beta.18
|
|
256
|
+
|
|
257
|
+
## 0.1.0-beta.22
|
|
258
|
+
|
|
259
|
+
### Patch Changes
|
|
260
|
+
|
|
261
|
+
- Updated dependencies [f7ba067]
|
|
262
|
+
- @stainless-api/docs-ui@0.1.0-beta.17
|
|
263
|
+
|
|
264
|
+
## 0.1.0-beta.21
|
|
265
|
+
|
|
266
|
+
### Patch Changes
|
|
267
|
+
|
|
268
|
+
- 41e87cb: fix virtual module imports
|
|
269
|
+
|
|
270
|
+
## 0.1.0-beta.20
|
|
271
|
+
|
|
272
|
+
### Patch Changes
|
|
273
|
+
|
|
274
|
+
- 9cdb24d: Update pagination components, fix search modal
|
|
275
|
+
- Updated dependencies [9cdb24d]
|
|
276
|
+
- @stainless-api/docs-ui@0.1.0-beta.16
|
|
277
|
+
- @stainless-api/ui-primitives@0.1.0-beta.16
|
|
278
|
+
|
|
279
|
+
## 0.1.0-beta.19
|
|
280
|
+
|
|
281
|
+
### Patch Changes
|
|
282
|
+
|
|
283
|
+
- 15c003d: fix react peer dependencies
|
|
284
|
+
- Updated dependencies [15c003d]
|
|
285
|
+
- @stainless-api/docs-ui@0.1.0-beta.15
|
|
286
|
+
- @stainless-api/ui-primitives@0.1.0-beta.15
|
|
287
|
+
|
|
288
|
+
## 0.1.0-beta.18
|
|
289
|
+
|
|
290
|
+
### Patch Changes
|
|
291
|
+
|
|
292
|
+
- Updated dependencies [0572f60]
|
|
293
|
+
- @stainless-api/docs-ui@0.1.0-beta.14
|
|
294
|
+
|
|
295
|
+
## 0.1.0-beta.17
|
|
296
|
+
|
|
297
|
+
### Patch Changes
|
|
298
|
+
|
|
299
|
+
- a925bb4: fix markdown icon color in dark mode
|
|
300
|
+
|
|
301
|
+
## 0.1.0-beta.16
|
|
302
|
+
|
|
303
|
+
### Patch Changes
|
|
304
|
+
|
|
305
|
+
- 0618d05: Markdown rendering of prose pages, ai context menu, auth via cli, minor fixes
|
|
306
|
+
- Updated dependencies [0618d05]
|
|
307
|
+
- @stainless-api/docs-ui@0.1.0-beta.13
|
|
308
|
+
- @stainless-api/ui-primitives@0.1.0-beta.14
|
|
309
|
+
|
|
310
|
+
## 0.1.0-beta.15
|
|
311
|
+
|
|
312
|
+
### Patch Changes
|
|
313
|
+
|
|
314
|
+
- e35360f: include ui-primitive packages
|
|
315
|
+
- Updated dependencies [e35360f]
|
|
316
|
+
- @stainless-api/docs-ui@0.1.0-beta.12
|
|
317
|
+
- @stainless-api/ui-primitives@0.1.0-beta.13
|
|
318
|
+
|
|
319
|
+
## 0.1.0-beta.14
|
|
320
|
+
|
|
321
|
+
### Patch Changes
|
|
322
|
+
|
|
323
|
+
- a529fd4: fix: site title height
|
|
324
|
+
- Updated dependencies [a529fd4]
|
|
325
|
+
- @stainless-api/docs-ui@0.1.0-beta.11
|
|
326
|
+
- @stainless-api/ui-primitives@0.1.0-beta.12
|
|
327
|
+
|
|
328
|
+
## 0.1.0-beta.13
|
|
329
|
+
|
|
330
|
+
### Patch Changes
|
|
331
|
+
|
|
332
|
+
- 26a4786: fix: include missing starlight config options
|
|
333
|
+
- Updated dependencies [26a4786]
|
|
334
|
+
- @stainless-api/docs-ui@0.1.0-beta.10
|
|
335
|
+
- @stainless-api/ui-primitives@0.1.0-beta.11
|
|
336
|
+
|
|
337
|
+
## 0.1.0-beta.12
|
|
338
|
+
|
|
339
|
+
### Patch Changes
|
|
340
|
+
|
|
341
|
+
- Updated dependencies [3e44a9c]
|
|
342
|
+
- @stainless-api/ui-primitives@0.1.0-beta.10
|
|
343
|
+
- @stainless-api/docs-ui@0.1.0-beta.9
|
|
344
|
+
|
|
345
|
+
## 0.1.0-beta.11
|
|
346
|
+
|
|
347
|
+
### Patch Changes
|
|
348
|
+
|
|
349
|
+
- c96f895: Remove css layers, update sidebar styles, add new prose elements
|
|
350
|
+
- Updated dependencies [c96f895]
|
|
351
|
+
- @stainless-api/docs-ui@0.1.0-beta.8
|
|
352
|
+
- @stainless-api/ui-primitives@0.1.0-beta.9
|
|
353
|
+
|
|
354
|
+
## 0.1.0-beta.10
|
|
355
|
+
|
|
356
|
+
### Patch Changes
|
|
357
|
+
|
|
358
|
+
- dc059d2: should include option in stl-docs virtual module
|
|
359
|
+
|
|
360
|
+
## 0.1.0-beta.9
|
|
361
|
+
|
|
362
|
+
### Patch Changes
|
|
363
|
+
|
|
364
|
+
- d15a520: fix initialization of dropdown buttons
|
|
365
|
+
- Updated dependencies [d15a520]
|
|
366
|
+
- @stainless-api/ui-primitives@0.1.0-beta.8
|
|
367
|
+
- @stainless-api/docs-ui@0.1.0-beta.7
|
|
368
|
+
|
|
369
|
+
## 0.1.0-beta.8
|
|
370
|
+
|
|
371
|
+
### Minor Changes
|
|
372
|
+
|
|
373
|
+
- 917493d: move stainlessDocs into default export
|
|
374
|
+
|
|
375
|
+
## 0.1.0-beta.7
|
|
376
|
+
|
|
377
|
+
### Patch Changes
|
|
378
|
+
|
|
379
|
+
- Updated dependencies [34e7c61]
|
|
380
|
+
- @stainless-api/ui-primitives@0.1.0-beta.7
|
|
381
|
+
- @stainless-api/docs-ui@0.1.0-beta.6
|
|
382
|
+
|
|
383
|
+
## 0.1.0-beta.6
|
|
384
|
+
|
|
385
|
+
### Patch Changes
|
|
386
|
+
|
|
387
|
+
- 34cbd12: verify publishing
|
|
388
|
+
- Updated dependencies [f664b4d]
|
|
389
|
+
- Updated dependencies [34cbd12]
|
|
390
|
+
- @stainless-api/ui-primitives@0.1.0-beta.6
|
|
391
|
+
- @stainless-api/docs-ui@0.1.0-beta.5
|
|
392
|
+
|
|
3
393
|
## 0.1.0-beta.5
|
|
4
394
|
|
|
5
395
|
### Patch Changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"plugin/buildAlgoliaIndex.ts": {
|
|
3
|
+
"@typescript-eslint/no-explicit-any": {
|
|
4
|
+
"count": 2
|
|
5
|
+
}
|
|
6
|
+
},
|
|
7
|
+
"plugin/cms/client.ts": {
|
|
8
|
+
"@typescript-eslint/no-explicit-any": {
|
|
9
|
+
"count": 1
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"plugin/cms/server.ts": {
|
|
13
|
+
"@typescript-eslint/no-explicit-any": {
|
|
14
|
+
"count": 4
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"plugin/cms/sidebar-builder.ts": {
|
|
18
|
+
"@typescript-eslint/no-explicit-any": {
|
|
19
|
+
"count": 1
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"plugin/cms/worker.ts": {
|
|
23
|
+
"@typescript-eslint/no-explicit-any": {
|
|
24
|
+
"count": 4
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"plugin/components/SnippetCode.tsx": {
|
|
28
|
+
"@typescript-eslint/no-explicit-any": {
|
|
29
|
+
"count": 1
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"plugin/index.ts": {
|
|
33
|
+
"@typescript-eslint/no-explicit-any": {
|
|
34
|
+
"count": 1
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"plugin/languages.ts": {
|
|
38
|
+
"@typescript-eslint/no-explicit-any": {
|
|
39
|
+
"count": 1
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"shared/virtualModule.ts": {
|
|
43
|
+
"@typescript-eslint/no-explicit-any": {
|
|
44
|
+
"count": 1
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
package/locals.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type SidebarEntry = App.Locals['starlightRoute']['sidebar'][number];
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Extending Astro’s `App.Locals` interface
|
|
5
|
+
*/
|
|
6
|
+
declare namespace App {
|
|
7
|
+
interface Locals {
|
|
8
|
+
_stlStarlightPage?: {
|
|
9
|
+
skipRenderingStarlightTitle?: boolean;
|
|
10
|
+
hasMarkdownRoute?: boolean;
|
|
11
|
+
fullSidebar?: SidebarEntry[];
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,31 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stainless-api/docs",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.51",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"description": "",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
10
|
+
".": "./stl-docs/index.ts",
|
|
10
11
|
"./plugin": "./plugin/index.ts",
|
|
11
|
-
"./OverviewRoute": "./plugin/routes/Overview.astro",
|
|
12
|
-
"./DocsRoute": "./plugin/routes/Docs.astro",
|
|
13
|
-
"./DocsStaticRoute": "./plugin/routes/DocsStatic.astro",
|
|
14
|
-
"./MarkdownRoute": "./plugin/routes/markdown.ts",
|
|
15
|
-
"./Search": "./plugin/components/search/Search.astro",
|
|
16
|
-
"./replaceSidebarPlaceholderMiddleware": "./plugin/replaceSidebarPlaceholderMiddleware.ts",
|
|
17
12
|
"./plugin/middleware": "./plugin/middlewareBuilder/stlStarlightMiddleware.ts",
|
|
18
13
|
"./plugin/MiddlewareTypes": "./plugin/middlewareBuilder/stainlessMiddleware.d.ts",
|
|
19
|
-
"./stainless-docs": "./stl-docs/index.ts",
|
|
20
|
-
"./Header": "./stl-docs/components/Header.astro",
|
|
21
|
-
"./ThemeSelect": "./stl-docs/components/ThemeSelect.astro",
|
|
22
|
-
"./Sidebar": "./stl-docs/components/Sidebar.astro",
|
|
23
|
-
"./ContentPanel": "./stl-docs/components/content-panel/ContentPanel.astro",
|
|
24
|
-
"./tabsMiddleware": "./stl-docs/tabsMiddleware.ts",
|
|
25
14
|
"./stainless-docs/mintlify-compat": "./stl-docs/components/mintlify-compat/index.ts",
|
|
26
|
-
"./theme": "./theme.css",
|
|
27
15
|
"./mintlify-compat.css": "./styles/mintlify-compat.css",
|
|
28
|
-
"./font-imports": "./styles/fonts.css"
|
|
16
|
+
"./font-imports": "./styles/fonts.css",
|
|
17
|
+
"./components": "./stl-docs/components/index.ts",
|
|
18
|
+
"./components/scripts": "./stl-docs/components/scripts.ts"
|
|
29
19
|
},
|
|
30
20
|
"keywords": [],
|
|
31
21
|
"author": "",
|
|
@@ -34,41 +24,55 @@
|
|
|
34
24
|
"node": ">=18.17.1"
|
|
35
25
|
},
|
|
36
26
|
"peerDependencies": {
|
|
37
|
-
"@astrojs/starlight": ">=0.
|
|
38
|
-
"astro": ">=5.
|
|
27
|
+
"@astrojs/starlight": ">=0.36.1",
|
|
28
|
+
"astro": ">=5.15.3",
|
|
29
|
+
"react": ">=19.0.0",
|
|
30
|
+
"react-dom": ">=19.0.0",
|
|
31
|
+
"vite": ">=6.2.1"
|
|
39
32
|
},
|
|
40
33
|
"dependencies": {
|
|
41
|
-
"@astrojs/markdown-remark": "^6.3.
|
|
42
|
-
"@astrojs/react": "^4.
|
|
43
|
-
"@stainless-api/sdk": "0.1.0-alpha.
|
|
34
|
+
"@astrojs/markdown-remark": "^6.3.9",
|
|
35
|
+
"@astrojs/react": "^4.4.2",
|
|
36
|
+
"@stainless-api/sdk": "0.1.0-alpha.16",
|
|
37
|
+
"astro-expressive-code": "^0.41.3",
|
|
44
38
|
"cheerio": "^1.1.2",
|
|
45
39
|
"clsx": "^2.1.1",
|
|
46
|
-
"dotenv": "17.2.
|
|
40
|
+
"dotenv": "17.2.3",
|
|
47
41
|
"get-port": "^7.1.0",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
42
|
+
"lucide-react": "^0.555.0",
|
|
43
|
+
"marked": "^17.0.1",
|
|
44
|
+
"node-html-parser": "^7.0.1",
|
|
45
|
+
"rehype-parse": "^9.0.1",
|
|
46
|
+
"rehype-remark": "^10.0.1",
|
|
47
|
+
"remark-gfm": "^4.0.1",
|
|
53
48
|
"remark-github-alerts": "^0.1.1",
|
|
54
|
-
"
|
|
49
|
+
"remark-stringify": "^11.0.0",
|
|
50
|
+
"shiki": "^3.18.0",
|
|
51
|
+
"unified": "^11.0.5",
|
|
55
52
|
"web-worker": "^1.5.0",
|
|
56
|
-
"yaml": "^2.8.
|
|
57
|
-
"@stainless-api/
|
|
58
|
-
"@stainless-api/ui
|
|
53
|
+
"yaml": "^2.8.2",
|
|
54
|
+
"@stainless-api/ui-primitives": "0.1.0-beta.31",
|
|
55
|
+
"@stainless-api/docs-ui": "0.1.0-beta.42"
|
|
59
56
|
},
|
|
60
57
|
"devDependencies": {
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@types/
|
|
64
|
-
"@types/react
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
58
|
+
"@astrojs/check": "^0.9.6",
|
|
59
|
+
"@markdoc/markdoc": "^0.5.4",
|
|
60
|
+
"@types/node": "24.10.1",
|
|
61
|
+
"@types/react": "^19.2.7",
|
|
62
|
+
"@types/react-dom": "^19.2.3",
|
|
63
|
+
"react": "^19.2.0",
|
|
64
|
+
"react-dom": "^19.2.0",
|
|
65
|
+
"tsx": "^4.21.0",
|
|
66
|
+
"typescript": "5.9.3",
|
|
67
|
+
"vite": "^6.4.1",
|
|
68
|
+
"zod": "^4.1.13",
|
|
69
|
+
"@stainless/eslint-config": "0.1.0-beta.0",
|
|
70
|
+
"@stainless/sdk-json": "^0.1.0-beta.0"
|
|
68
71
|
},
|
|
69
72
|
"scripts": {
|
|
70
|
-
"vendor-deps": "
|
|
73
|
+
"vendor-deps": "tsx scripts/vendor_deps.ts",
|
|
71
74
|
"lint": "eslint . --max-warnings 0",
|
|
72
|
-
"sync": "astro sync"
|
|
75
|
+
"sync": "astro sync",
|
|
76
|
+
"check:types": "astro check"
|
|
73
77
|
}
|
|
74
78
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import Markdoc from '@markdoc/markdoc';
|
|
2
2
|
import Stainless from '@stainless-api/sdk';
|
|
3
3
|
import { createSDKJSON, parseInputs, transformOAS } from './cms/worker';
|
|
4
|
-
import type * as SDKJSON from '
|
|
5
|
-
import { Languages } from '@stainless-api/docs-ui/
|
|
6
|
-
import { buildIndex } from '@stainless-api/docs-ui/
|
|
4
|
+
import type * as SDKJSON from '@stainless/sdk-json';
|
|
5
|
+
import { Languages } from '@stainless-api/docs-ui/routing';
|
|
6
|
+
import { buildIndex } from '@stainless-api/docs-ui/search/providers/algolia';
|
|
7
7
|
import type { VersionUserConfig } from './loadPluginConfig';
|
|
8
|
+
import type { AstroIntegrationLogger } from 'astro';
|
|
8
9
|
|
|
9
10
|
const markdocConfig = {
|
|
10
11
|
nodes: {
|
|
@@ -20,7 +21,31 @@ function renderMarkdown(content?: string) {
|
|
|
20
21
|
return Markdoc.renderers.html(transformed);
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
export async function buildAlgoliaIndex({
|
|
24
|
+
export async function buildAlgoliaIndex({
|
|
25
|
+
version,
|
|
26
|
+
apiKey,
|
|
27
|
+
logger,
|
|
28
|
+
}: {
|
|
29
|
+
version: VersionUserConfig;
|
|
30
|
+
apiKey: string;
|
|
31
|
+
logger?: AstroIntegrationLogger;
|
|
32
|
+
}) {
|
|
33
|
+
function warnLog(message: string) {
|
|
34
|
+
if (logger) {
|
|
35
|
+
logger.warn(message);
|
|
36
|
+
} else {
|
|
37
|
+
console.warn(message);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function infoLog(message: string) {
|
|
42
|
+
if (logger) {
|
|
43
|
+
logger.info(message);
|
|
44
|
+
} else {
|
|
45
|
+
console.log(message);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
24
49
|
const client = new Stainless({ apiKey });
|
|
25
50
|
const configs = await client.projects.configs.retrieve({
|
|
26
51
|
project: version.stainlessProject,
|
|
@@ -64,9 +89,9 @@ export async function buildAlgoliaIndex({ version, apiKey }: { version: VersionU
|
|
|
64
89
|
!indexName && 'PUBLIC_ALGOLIA_INDEX',
|
|
65
90
|
!algoliaWriteKey && 'PRIVATE_ALGOLIA_WRITE_KEY',
|
|
66
91
|
].filter(Boolean);
|
|
67
|
-
|
|
92
|
+
warnLog(`Skipping Algolia indexing due to missing environment variables: ${missing.join(', ')}`);
|
|
68
93
|
return;
|
|
69
94
|
}
|
|
70
95
|
await buildIndex(appId, indexName, algoliaWriteKey, sdkJson, renderMarkdown);
|
|
71
|
-
|
|
96
|
+
infoLog('Indexing complete.');
|
|
72
97
|
}
|