@stainless-api/docs 0.1.0-beta.5 → 0.1.0-beta.50

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