@stainless-api/docs 0.1.0-beta.99 → 1.0.0-beta.141

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 (136) hide show
  1. package/CHANGELOG.md +401 -0
  2. package/ambient.d.ts +6 -0
  3. package/eslint-suppressions.json +22 -6
  4. package/{eslint.config.js → eslint.config.ts} +1 -7
  5. package/package.json +62 -40
  6. package/plugin/buildAlgoliaIndex.ts +6 -12
  7. package/plugin/components/SDKSelect.astro +0 -6
  8. package/plugin/components/SnippetCode.tsx +6 -37
  9. package/plugin/components/search/SearchAlgolia.astro +1 -1
  10. package/plugin/components/search/SearchIsland.tsx +19 -13
  11. package/plugin/generateAPIReferenceLink.ts +0 -40
  12. package/plugin/globalJs/ai-dropdown-options.ts +22 -9
  13. package/plugin/globalJs/code-snippets.ts +5 -5
  14. package/plugin/globalJs/copy.ts +20 -91
  15. package/plugin/globalJs/navigation.ts +13 -13
  16. package/plugin/globalJs/summary-selection-tweak.ts +29 -0
  17. package/plugin/index.ts +107 -163
  18. package/plugin/loadPluginConfig.ts +49 -151
  19. package/plugin/markdown/highlighter.ts +100 -0
  20. package/plugin/markdown/index.ts +39 -0
  21. package/plugin/middlewareBuilder/stainlessMiddleware.d.ts +2 -0
  22. package/plugin/react/Routing.tsx +10 -244
  23. package/plugin/referencePlaceholderUtils.ts +1 -1
  24. package/plugin/replaceSidebarPlaceholderMiddleware.ts +1 -1
  25. package/plugin/routes/Docs.astro +3 -1
  26. package/plugin/routes/Overview.astro +14 -7
  27. package/plugin/routes/llms.ts +186 -0
  28. package/plugin/routes/markdown.ts +62 -13
  29. package/plugin/sidebar-utils/sidebar-builder.ts +38 -12
  30. package/plugin/specs/defaultSpecLoader.ts +192 -0
  31. package/plugin/specs/fetchSpecSSR.ts +1 -1
  32. package/plugin/specs/utils.ts +86 -0
  33. package/shared/conditionalIntegration.ts +28 -0
  34. package/shared/getProsePages.ts +6 -7
  35. package/shared/virtualModule.ts +1 -26
  36. package/stl-docs/aiChatExamples.ts +31 -0
  37. package/stl-docs/chat/docs-chat-handler.ts +17 -0
  38. package/stl-docs/chat/hook.ts +225 -0
  39. package/stl-docs/chat/schemas.ts +27 -0
  40. package/stl-docs/chat/ui/AiChat.module.css +591 -0
  41. package/stl-docs/chat/ui/AiChat.tsx +175 -0
  42. package/stl-docs/chat/ui/Trigger.tsx +154 -0
  43. package/stl-docs/chat/ui/components/ChatControls.tsx +51 -0
  44. package/stl-docs/chat/ui/components/ChatEmpty.tsx +42 -0
  45. package/stl-docs/chat/ui/components/ChatLog.tsx +93 -0
  46. package/stl-docs/chat/ui/components/ChatMessage.tsx +47 -0
  47. package/stl-docs/chat/ui/components/CodeBlock.tsx +33 -0
  48. package/stl-docs/chat/ui/components/MessageFeedback.tsx +106 -0
  49. package/stl-docs/chat/ui/components/Table.tsx +15 -0
  50. package/stl-docs/chat/ui/components/ToolCall.tsx +34 -0
  51. package/stl-docs/chat/ui/components/hljs-github.css +81 -0
  52. package/stl-docs/chat/ui/scroll-manager.ts +86 -0
  53. package/stl-docs/chat/ui/types.ts +45 -0
  54. package/stl-docs/components/AiChatIsland.tsx +10 -12
  55. package/stl-docs/components/ContentPanel.astro +9 -0
  56. package/stl-docs/components/Footer.astro +89 -0
  57. package/stl-docs/components/Header.astro +0 -5
  58. package/stl-docs/components/PageFrame.astro +23 -8
  59. package/stl-docs/components/PageSidebar.astro +11 -0
  60. package/stl-docs/components/StainlessLogo.svg +4 -0
  61. package/stl-docs/components/TwoColumnContent.astro +2 -0
  62. package/stl-docs/components/headers/DefaultHeader.astro +6 -8
  63. package/stl-docs/components/headers/StackedHeader.astro +5 -53
  64. package/stl-docs/components/mintlify-compat/Accordion.astro +2 -2
  65. package/stl-docs/components/mintlify-compat/AccordionGroup.astro +0 -4
  66. package/stl-docs/components/mintlify-compat/Columns.astro +2 -2
  67. package/stl-docs/components/mintlify-compat/Frame.astro +2 -2
  68. package/stl-docs/components/mintlify-compat/Tab.astro +2 -2
  69. package/stl-docs/components/mintlify-compat/callouts/Callout.astro +2 -2
  70. package/stl-docs/components/mintlify-compat/callouts/Check.astro +0 -4
  71. package/stl-docs/components/mintlify-compat/callouts/Danger.astro +0 -4
  72. package/stl-docs/components/mintlify-compat/callouts/Info.astro +0 -4
  73. package/stl-docs/components/mintlify-compat/callouts/Note.astro +0 -4
  74. package/stl-docs/components/mintlify-compat/callouts/Tip.astro +0 -4
  75. package/stl-docs/components/mintlify-compat/callouts/Warning.astro +0 -4
  76. package/stl-docs/components/nav-tabs/NavDropdown.astro +12 -7
  77. package/stl-docs/components/nav-tabs/NavTabs.astro +5 -3
  78. package/stl-docs/components/nav-tabs/buildNavLinks.ts +2 -0
  79. package/stl-docs/components/pagination/Pagination.astro +4 -2
  80. package/stl-docs/components/pagination/PaginationLinkEmphasized.astro +2 -2
  81. package/stl-docs/components/pagination/PaginationLinkQuiet.astro +2 -2
  82. package/stl-docs/components/pagination/util.ts +3 -3
  83. package/stl-docs/components/sidebars/BaseSidebar.astro +72 -1
  84. package/stl-docs/disableCalloutSyntax.ts +1 -1
  85. package/stl-docs/fonts.ts +5 -5
  86. package/stl-docs/index.ts +76 -53
  87. package/stl-docs/loadStlDocsConfig.ts +38 -8
  88. package/stl-docs/og-image/components/OpenGraphFunctionSignature.tsx +64 -0
  89. package/stl-docs/og-image/components/OpenGraphImage.tsx +126 -0
  90. package/stl-docs/og-image/config.ts +56 -0
  91. package/stl-docs/og-image/image-gen/generate-api-reference-og-image.tsx +188 -0
  92. package/stl-docs/og-image/image-gen/generate-og-image.tsx +119 -0
  93. package/stl-docs/og-image/image-gen/get-logo-url.ts +47 -0
  94. package/stl-docs/og-image/index.ts +135 -0
  95. package/stl-docs/og-image/routes/add-og-image.ts +45 -0
  96. package/stl-docs/og-image/routes/get-api-reference-og-image.ts +36 -0
  97. package/stl-docs/og-image/routes/get-og-image.ts +28 -0
  98. package/stl-docs/og-image/theme.ts +43 -0
  99. package/stl-docs/og-image/utils.ts +14 -0
  100. package/stl-docs/proseDocSync.test.ts +74 -0
  101. package/stl-docs/proseDocSync.ts +344 -0
  102. package/stl-docs/proseMarkdown/proseMarkdownIntegration.ts +4 -12
  103. package/stl-docs/schema-extension.ts +12 -0
  104. package/stl-docs/tabsMiddleware.ts +1 -1
  105. package/styles/overrides.css +2 -14
  106. package/styles/page.css +210 -71
  107. package/styles/sidebar.css +30 -17
  108. package/styles/sl-variables.css +3 -8
  109. package/styles/stldocs-variables.css +2 -2
  110. package/styles/toc.css +8 -0
  111. package/tsconfig.json +1 -1
  112. package/virtual-module.d.ts +35 -11
  113. package/playground-virtual-modules.d.ts +0 -96
  114. package/plugin/globalJs/create-playground.shim.ts +0 -3
  115. package/plugin/globalJs/playground-data.shim.ts +0 -1
  116. package/plugin/globalJs/playground-data.ts +0 -14
  117. package/plugin/specs/FileCache.ts +0 -99
  118. package/plugin/specs/generateSpec.ts +0 -112
  119. package/plugin/specs/index.ts +0 -132
  120. package/plugin/specs/inputResolver.ts +0 -146
  121. package/plugin/specs/worker.ts +0 -199
  122. package/plugin/vendor/preview.worker.docs.js +0 -26108
  123. package/plugin/vendor/templates/cli.md +0 -1
  124. package/plugin/vendor/templates/go.md +0 -316
  125. package/plugin/vendor/templates/java.md +0 -89
  126. package/plugin/vendor/templates/kotlin.md +0 -89
  127. package/plugin/vendor/templates/node.md +0 -235
  128. package/plugin/vendor/templates/python.md +0 -251
  129. package/plugin/vendor/templates/ruby.md +0 -147
  130. package/plugin/vendor/templates/terraform.md +0 -60
  131. package/plugin/vendor/templates/typescript.md +0 -319
  132. package/scripts/vendor_deps.ts +0 -50
  133. package/stl-docs/components/ClientRouterHead.astro +0 -41
  134. package/stl-docs/components/content-panel/ContentPanel.astro +0 -42
  135. package/stl-docs/components/headers/SplashMobileMenuToggle.astro +0 -65
  136. package/stl-docs/proseSearchIndexing.ts +0 -606
package/CHANGELOG.md CHANGED
@@ -1,5 +1,406 @@
1
1
  # @stainless-api/docs
2
2
 
3
+ ## 1.0.0-beta.141
4
+
5
+ ### Patch Changes
6
+
7
+ - 7342172: Link to github on NPM packages
8
+ - af05941: Bump pnpm to 11
9
+ - Updated dependencies [7342172]
10
+ - @stainless-api/ui-primitives@1.0.0-beta.55
11
+ - @stainless-api/docs-search@1.0.0-beta.51
12
+ - @stainless-api/docs-ui@1.0.0-beta.97
13
+
14
+ ## 1.0.0-beta.140
15
+
16
+ ### Major Changes
17
+
18
+ - 2c62934: License
19
+
20
+ ### Patch Changes
21
+
22
+ - 1e86f14: update internal og-image breadcrumb resolver for compatibility with `@astrojs/starlight` 0.39, where autogenerated sidebar entries are nested inside a parent group's `items` array instead of carrying their own label.
23
+ - Updated dependencies [2c62934]
24
+ - @stainless-api/ui-primitives@1.0.0-beta.54
25
+ - @stainless-api/docs-search@1.0.0-beta.50
26
+ - @stainless-api/docs-ui@1.0.0-beta.96
27
+
28
+ ## 0.1.0-beta.139
29
+
30
+ ### Minor Changes
31
+
32
+ - d068123: bring-your-own spec loader
33
+ - e5367b0: Move preview worker to @stainless/sdk-json package
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies [e5367b0]
38
+ - @stainless/sdk-json@0.1.0-beta.11
39
+
40
+ ## 0.1.0-beta.138
41
+
42
+ ### Patch Changes
43
+
44
+ - bb5f952: Stop loading AI chat examples from obsolete Stainless endpoint
45
+ - 25d7a11: Stop creating Algolia prose indexes during docs site builds. Vector-based prose indexing is unaffected and remains controlled by the `experimental.disableStainlessProseIndexing` flag.
46
+ - Updated dependencies [25d7a11]
47
+ - @stainless-api/docs-search@0.1.0-beta.49
48
+
49
+ ## 0.1.0-beta.137
50
+
51
+ ### Minor Changes
52
+
53
+ - ce2dd81: Add interface for customizing ai-chat behaviour
54
+
55
+ ### Patch Changes
56
+
57
+ - 5f0fdda: Vendor dependencies for Stainless Config change
58
+ - 680889d: feat: support disabling third-party context menu options
59
+
60
+ ## 0.1.0-beta.136
61
+
62
+ ### Minor Changes
63
+
64
+ - 5a6e598: [og image] migrate Takumi to v1
65
+
66
+ ### Patch Changes
67
+
68
+ - 8b7aaff: Adds markdown representation for overview
69
+ - 23bd8f7: Update preview worker
70
+
71
+ ## 0.1.0-beta.135
72
+
73
+ ### Patch Changes
74
+
75
+ - dea0395: fix backwards llmsTxt.disabled parsing
76
+
77
+ ## 0.1.0-beta.134
78
+
79
+ ### Minor Changes
80
+
81
+ - eb35b5c: Integrate @stainless-api/docs-og-image package into core
82
+
83
+ ## 0.1.0-beta.133
84
+
85
+ ### Patch Changes
86
+
87
+ - db5d00d: Fix for go version in install string
88
+
89
+ ## 0.1.0-beta.132
90
+
91
+ ### Patch Changes
92
+
93
+ - 53772cd: Improve handling of invalid refs
94
+ - 6091b54: Allow local files for builds
95
+ - Updated dependencies [53772cd]
96
+ - @stainless-api/docs-ui@0.1.0-beta.95
97
+ - @stainless-api/docs-search@0.1.0-beta.48
98
+
99
+ ## 0.1.0-beta.131
100
+
101
+ ### Patch Changes
102
+
103
+ - Updated dependencies [be32bea]
104
+ - @stainless-api/docs-ui@0.1.0-beta.94
105
+ - @stainless-api/docs-search@0.1.0-beta.47
106
+
107
+ ## 0.1.0-beta.130
108
+
109
+ ### Minor Changes
110
+
111
+ - da5debb: Move ai chat packages into stl-starlight, and extract to a generic interface
112
+
113
+ ### Patch Changes
114
+
115
+ - 3019a8b: Adds support for generating an llms.txt
116
+ - 4d3b938: Remove dead code flagged by knip
117
+ - b887dbb: Fix off-axis rotation of loading spinner in safari
118
+ - cfd8ea1: Minor fixes for Python and Ruby
119
+ - Updated dependencies [3019a8b]
120
+ - Updated dependencies [4d3b938]
121
+ - Updated dependencies [0791fb6]
122
+ - Updated dependencies [01b77d0]
123
+ - Updated dependencies [15e07d8]
124
+ - Updated dependencies [ebc039a]
125
+ - Updated dependencies [cfd8ea1]
126
+ - Updated dependencies [68a7bf8]
127
+ - @stainless-api/docs-ui@0.1.0-beta.93
128
+ - @stainless-api/ui-primitives@0.1.0-beta.53
129
+ - @stainless-api/docs-search@0.1.0-beta.46
130
+
131
+ ## 0.1.0-beta.129
132
+
133
+ ### Minor Changes
134
+
135
+ - 966ec34: Fixes nav dropdown logic
136
+
137
+ ### Patch Changes
138
+
139
+ - Updated dependencies [966ec34]
140
+ - @stainless-api/ui-primitives@0.1.0-beta.52
141
+ - @stainless-api/docs-search@0.1.0-beta.45
142
+ - @stainless-api/docs-ui@0.1.0-beta.92
143
+
144
+ ## 0.1.0-beta.128
145
+
146
+ ### Patch Changes
147
+
148
+ - e8a95f4: Revert “Fix getProsePages treating all pages as prose when API reference basePath is empty”
149
+
150
+ ## 0.1.0-beta.127
151
+
152
+ ### Patch Changes
153
+
154
+ - e0d595f: Fix snippet copy button click handler
155
+ - 8752b4e: Fix getProsePages treating all pages as prose when API reference basePath is ""
156
+ - Updated dependencies [871f3c0]
157
+ - Updated dependencies [871f3c0]
158
+ - @stainless-api/docs-ui@0.1.0-beta.91
159
+ - @stainless-api/docs-search@0.1.0-beta.44
160
+
161
+ ## 0.1.0-beta.126
162
+
163
+ ### Patch Changes
164
+
165
+ - 992a07a: Update vendored preview worker
166
+ - 1d1fa35: Use astro remark instead of `marked` to process api reference markdown
167
+ - Updated dependencies [374c0e4]
168
+ - @stainless-api/ui-primitives@0.1.0-beta.51
169
+ - @stainless-api/docs-ui@0.1.0-beta.90
170
+ - @stainless-api/docs-search@0.1.0-beta.43
171
+
172
+ ## 0.1.0-beta.125
173
+
174
+ ### Patch Changes
175
+
176
+ - 975ba51: cap prose indexing batches to 30MB
177
+ - Updated dependencies [005419c]
178
+ - @stainless-api/docs-ui@0.1.0-beta.89
179
+ - @stainless-api/docs-search@0.1.0-beta.42
180
+
181
+ ## 0.1.0-beta.124
182
+
183
+ ### Patch Changes
184
+
185
+ - 152c864: don’t try to load github themes unconditionally
186
+ - Updated dependencies [af5a5d7]
187
+ - @stainless-api/docs-ui@0.1.0-beta.88
188
+ - @stainless-api/docs-search@0.1.0-beta.41
189
+
190
+ ## 0.1.0-beta.123
191
+
192
+ ### Patch Changes
193
+
194
+ - 813b223: Fix base path appending to header links like mailto:
195
+
196
+ ## 0.1.0-beta.122
197
+
198
+ ### Minor Changes
199
+
200
+ - f22893c: Add interactive examples to ai chat
201
+
202
+ ### Patch Changes
203
+
204
+ - 3fbf5d8: Updates preview worker
205
+
206
+ ## 0.1.0-beta.121
207
+
208
+ ### Minor Changes
209
+
210
+ - 9cb2166: Join base path with HEADER_LINKS and TABS
211
+
212
+ ### Patch Changes
213
+
214
+ - 7701d8f: Clean up console warnings loading DocsSearch markdown renderer
215
+ - Updated dependencies [7701d8f]
216
+ - Updated dependencies [5460e81]
217
+ - @stainless-api/docs-ui@0.1.0-beta.87
218
+ - @stainless-api/docs-search@0.1.0-beta.40
219
+
220
+ ## 0.1.0-beta.120
221
+
222
+ ### Patch Changes
223
+
224
+ - fe6cd04: Improves sidebar item rendering in Terraform
225
+
226
+ ## 0.1.0-beta.119
227
+
228
+ ### Patch Changes
229
+
230
+ - 403c097: Export additional components
231
+ - Updated dependencies [848cff4]
232
+ - Updated dependencies [ea2b90c]
233
+ - @stainless-api/ui-primitives@0.1.0-beta.50
234
+ - @stainless-api/docs-ui@0.1.0-beta.86
235
+ - @stainless-api/docs-search@0.1.0-beta.39
236
+
237
+ ## 0.1.0-beta.118
238
+
239
+ ### Minor Changes
240
+
241
+ - 9599de4: Updates preview worker to improve response snippets
242
+
243
+ ### Patch Changes
244
+
245
+ - 7901fd4: fix astro scoping for language-block style?
246
+ - Updated dependencies [93a3767]
247
+ - @stainless-api/docs-ui@0.1.0-beta.85
248
+ - @stainless-api/docs-search@0.1.0-beta.38
249
+
250
+ ## 0.1.0-beta.117
251
+
252
+ ### Patch Changes
253
+
254
+ - af60696: ensure splash pages aren't uncentered from ghost sidebar
255
+
256
+ ## 0.1.0-beta.116
257
+
258
+ ### Patch Changes
259
+
260
+ - ad9552c: don’t let toc shrink to its intrinisc size
261
+
262
+ ## 0.1.0-beta.115
263
+
264
+ ### Minor Changes
265
+
266
+ - 2a9da30: Update to Astro 6
267
+
268
+ ## 0.1.0-beta.114
269
+
270
+ ### Patch Changes
271
+
272
+ - Updated dependencies [eab438f]
273
+ - Updated dependencies [438a593]
274
+ - @stainless-api/docs-search@0.1.0-beta.37
275
+ - @stainless-api/docs-ui@0.1.0-beta.84
276
+
277
+ ## 0.1.0-beta.113
278
+
279
+ ### Patch Changes
280
+
281
+ - aeda757: Handles cases where pagefind does not exist
282
+ - Updated dependencies [1c38511]
283
+ - Updated dependencies [aeda757]
284
+ - @stainless-api/docs-ui@0.1.0-beta.83
285
+ - @stainless-api/docs-search@0.1.0-beta.36
286
+
287
+ ## 0.1.0-beta.112
288
+
289
+ ### Patch Changes
290
+
291
+ - Updated dependencies [37cc2ac]
292
+ - @stainless-api/docs-ui@0.1.0-beta.82
293
+ - @stainless-api/docs-search@0.1.0-beta.35
294
+
295
+ ## 0.1.0-beta.111
296
+
297
+ ### Patch Changes
298
+
299
+ - 6cab196: prevent summary elements from toggling when users are selecting text
300
+ - Updated dependencies [134885b]
301
+ - Updated dependencies [5ba9135]
302
+ - Updated dependencies [df0c958]
303
+ - Updated dependencies [e641d33]
304
+ - @stainless-api/docs-ui@0.1.0-beta.81
305
+ - @stainless-api/docs-search@0.1.0-beta.34
306
+
307
+ ## 0.1.0-beta.110
308
+
309
+ ### Minor Changes
310
+
311
+ - c1723f0: Updates preview worker
312
+ - 05cd046: Adds support for overriding components
313
+
314
+ ### Patch Changes
315
+
316
+ - f38f92f: fix scroll-padding-top
317
+ - Updated dependencies [05cd046]
318
+ - @stainless-api/docs-ui@0.1.0-beta.80
319
+ - @stainless-api/docs-search@0.1.0-beta.33
320
+
321
+ ## 0.1.0-beta.109
322
+
323
+ ### Patch Changes
324
+
325
+ - b45d8e2: clean up empty state on Overview when there are no “Libraries”
326
+
327
+ ## 0.1.0-beta.108
328
+
329
+ ### Patch Changes
330
+
331
+ - 27d2130: add powered by stainless to footer
332
+
333
+ ## 0.1.0-beta.107
334
+
335
+ ### Minor Changes
336
+
337
+ - 971a12f: Adds an experimental flag to disable indexing
338
+
339
+ ## 0.1.0-beta.106
340
+
341
+ ### Patch Changes
342
+
343
+ - a8ed299: Adds the ability for AI chat to move into a sidebar “panel” position.
344
+
345
+ ## 0.1.0-beta.105
346
+
347
+ ### Patch Changes
348
+
349
+ - 46956c1: update preview worker
350
+ - 04d04c1: update preview worker
351
+
352
+ ## 0.1.0-beta.104
353
+
354
+ ### Minor Changes
355
+
356
+ - 6d9933d: Replace starlight page frame with top-level CSS grid layout
357
+ - 1a150ee: Updates preview worker
358
+
359
+ ### Patch Changes
360
+
361
+ - Updated dependencies [6d9933d]
362
+ - @stainless-api/ui-primitives@0.1.0-beta.49
363
+ - @stainless-api/docs-ui@0.1.0-beta.79
364
+ - @stainless-api/docs-search@0.1.0-beta.32
365
+
366
+ ## 0.1.0-beta.103
367
+
368
+ ### Patch Changes
369
+
370
+ - Updated dependencies [54add64]
371
+ - @stainless-api/docs-ui@0.1.0-beta.78
372
+ - @stainless-api/docs-search@0.1.0-beta.31
373
+
374
+ ## 0.1.0-beta.102
375
+
376
+ ### Minor Changes
377
+
378
+ - a1b8e83: adds starlight passthrough option for configuring pagefind
379
+
380
+ ## 0.1.0-beta.101
381
+
382
+ ### Patch Changes
383
+
384
+ - f81fade: Fix false negatives detecting prose pages to convert to markdown
385
+ - Updated dependencies [21e50d3]
386
+ - @stainless-api/docs-ui@0.1.0-beta.77
387
+ - @stainless-api/docs-search@0.1.0-beta.30
388
+
389
+ ## 0.1.0-beta.100
390
+
391
+ ### Minor Changes
392
+
393
+ - 5701494: Improves sidebar perf + new experimental option to link group titles to overview pages for the group
394
+
395
+ ### Patch Changes
396
+
397
+ - Updated dependencies [7ea23ef]
398
+ - Updated dependencies [95fe66c]
399
+ - Updated dependencies [5701494]
400
+ - @stainless-api/ui-primitives@0.1.0-beta.48
401
+ - @stainless-api/docs-ui@0.1.0-beta.76
402
+ - @stainless-api/docs-search@0.1.0-beta.29
403
+
3
404
  ## 0.1.0-beta.99
4
405
 
5
406
  ### Minor Changes
package/ambient.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import 'react';
2
+ declare module 'react' {
3
+ interface CSSProperties {
4
+ [key: `--${string}`]: string | number;
5
+ }
6
+ }
@@ -4,9 +4,12 @@
4
4
  "count": 1
5
5
  }
6
6
  },
7
- "plugin/globalJs/copy.ts": {
8
- "@typescript-eslint/no-explicit-any": {
9
- "count": 3
7
+ "plugin/components/StainlessIslands.tsx": {
8
+ "@typescript-eslint/no-unsafe-assignment": {
9
+ "count": 1
10
+ },
11
+ "@typescript-eslint/no-unsafe-member-access": {
12
+ "count": 2
10
13
  }
11
14
  },
12
15
  "plugin/index.ts": {
@@ -19,9 +22,22 @@
19
22
  "count": 1
20
23
  }
21
24
  },
22
- "plugin/specs/worker.ts": {
23
- "@typescript-eslint/no-explicit-any": {
24
- "count": 3
25
+ "plugin/referencePlaceholderUtils.ts": {
26
+ "@typescript-eslint/no-unsafe-assignment": {
27
+ "count": 1
28
+ }
29
+ },
30
+ "stl-docs/components/sidebars/convertAstroSidebarToStl.tsx": {
31
+ "@typescript-eslint/no-unsafe-argument": {
32
+ "count": 1
33
+ },
34
+ "@typescript-eslint/no-unsafe-assignment": {
35
+ "count": 1
36
+ }
37
+ },
38
+ "stl-docs/proseDocSync.ts": {
39
+ "@typescript-eslint/restrict-template-expressions": {
40
+ "count": 4
25
41
  }
26
42
  }
27
43
  }
@@ -1,10 +1,4 @@
1
- // @ts-check
2
-
3
1
  import { defineConfig } from 'eslint/config';
4
2
  import { config } from '@stainless/eslint-config/astro';
5
3
 
6
- export default defineConfig(
7
- config,
8
-
9
- { ignores: ['plugin/vendor/**'] },
10
- );
4
+ export default defineConfig(config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stainless-api/docs",
3
- "version": "0.1.0-beta.99",
3
+ "version": "1.0.0-beta.141",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -14,71 +14,93 @@
14
14
  "./plugin/languages": "./plugin/languages.ts",
15
15
  "./stainless-docs/mintlify-compat": "./stl-docs/components/mintlify-compat/index.ts",
16
16
  "./mintlify-compat.css": "./styles/mintlify-compat.css",
17
- "./components": "./stl-docs/components/index.ts",
18
- "./components/scripts": "./stl-docs/components/scripts.ts",
19
17
  "./docs-config": "./stl-docs/loadStlDocsConfig.ts",
20
18
  "./specs/fetchSpecSSR": "./plugin/specs/fetchSpecSSR.ts",
21
19
  "./generate-docs-routes": "./plugin/helpers/generateDocsRoutes.ts",
20
+ "./components": "./stl-docs/components/index.ts",
21
+ "./components/scripts": "./stl-docs/components/scripts.ts",
22
22
  "./components/Head": "./stl-docs/components/Head.astro",
23
- "./components/ContentBreadcrumbs": "./stl-docs/components/ContentBreadcrumbs.tsx"
23
+ "./components/PageFrame": "./stl-docs/components/PageFrame.astro",
24
+ "./components/PageTitle": "./stl-docs/components/PageTitle.astro",
25
+ "./components/ContentBreadcrumbs": "./stl-docs/components/ContentBreadcrumbs.tsx",
26
+ "./components/AIDropdown": "./stl-docs/components/AIDropdown.tsx",
27
+ "./components/Footer": "./stl-docs/components/Footer.astro",
28
+ "./components/Pagination": "./stl-docs/components/pagination/Pagination.astro",
29
+ "./og-image/components/OpenGraphImage": "./stl-docs/og-image/components/OpenGraphImage.tsx",
30
+ "./og-image/components/OpenGraphFunctionSignature": "./stl-docs/og-image/components/OpenGraphFunctionSignature.tsx",
31
+ "./schema-extension": "./stl-docs/schema-extension.ts",
32
+ "./chat": "./stl-docs/chat/docs-chat-handler.ts"
24
33
  },
25
34
  "keywords": [],
26
35
  "author": "",
27
- "license": "ISC",
36
+ "license": "MIT",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/stainless/docs-platform.git",
40
+ "directory": "packages/stl-starlight"
41
+ },
28
42
  "engines": {
29
- "node": ">=18.17.1"
43
+ "node": ">=22.12.0"
30
44
  },
31
45
  "peerDependencies": {
32
- "@astrojs/starlight": ">=0.37.5",
33
- "astro": ">=5.15.3",
46
+ "@astrojs/starlight": ">=0.38.0",
47
+ "takumi-js": ">=1.0.5",
48
+ "astro": ">=6.0.0",
34
49
  "react": ">=19.0.0",
35
50
  "react-dom": ">=19.0.0",
36
- "vite": ">=6.2.1"
51
+ "vite": ">=7.3.1"
52
+ },
53
+ "peerDependenciesMeta": {
54
+ "takumi-js": {
55
+ "optional": true
56
+ }
37
57
  },
38
58
  "dependencies": {
39
- "@astrojs/markdown-remark": "^6.3.10",
40
- "@astrojs/react": "^4.4.2",
41
- "@stainless-api/sdk": "0.1.0-alpha.19",
42
- "astro-expressive-code": "^0.41.6",
43
- "cheerio": "^1.1.2",
59
+ "@astrojs/markdown-remark": "^7.1.1",
60
+ "@astrojs/react": "^5.0.4",
61
+ "@markdoc/markdoc": "^0.5.7",
62
+ "@stainless-api/sdk": "0.5.0",
63
+ "cheerio": "^1.2.0",
44
64
  "clsx": "^2.1.1",
45
- "dotenv": "17.2.3",
46
- "lucide-react": "^0.562.0",
47
- "marked": "^17.0.1",
48
- "node-html-parser": "^7.0.1",
65
+ "dotenv": "17.4.2",
66
+ "lucide-react": "^1.14.0",
67
+ "motion": "^12.38.0",
68
+ "node-html-parser": "^7.1.0",
49
69
  "rehype-parse": "^9.0.1",
50
70
  "rehype-remark": "^10.0.1",
71
+ "react-markdown": "^10.1.0",
72
+ "react-syntax-highlighter": "^16.1.1",
51
73
  "remark-gfm": "^4.0.1",
52
74
  "remark-github-alerts": "^0.1.1",
53
75
  "remark-stringify": "^11.0.0",
54
- "shiki": "^3.22.0",
76
+ "remend": "^1.3.0",
77
+ "shiki": "^4.0.2",
55
78
  "unified": "^11.0.5",
56
- "vite-plugin-prebundle-workers": "^0.2.0",
57
- "web-worker": "^1.5.0",
58
- "yaml": "^2.8.2",
59
- "@stainless-api/docs-search": "0.1.0-beta.28",
60
- "@stainless-api/docs-ui": "0.1.0-beta.75",
61
- "@stainless-api/ui-primitives": "0.1.0-beta.47"
79
+ "@stainless-api/docs-search": "1.0.0-beta.51",
80
+ "@stainless-api/docs-ui": "1.0.0-beta.97",
81
+ "@stainless-api/ui-primitives": "1.0.0-beta.55",
82
+ "@stainless/sdk-json": "^0.1.0-beta.11"
62
83
  },
63
84
  "devDependencies": {
64
- "@astrojs/check": "^0.9.6",
65
- "@markdoc/markdoc": "^0.5.4",
66
- "@types/node": "24.10.9",
67
- "@types/react": "19.2.10",
85
+ "@astrojs/check": "^0.9.9",
86
+ "takumi-js": "^1.1.2",
87
+ "@types/node": "24.12.2",
88
+ "@types/react": "19.2.14",
68
89
  "@types/react-dom": "^19.2.3",
69
- "react": "^19.2.4",
70
- "react-dom": "^19.2.4",
71
- "tsx": "^4.21.0",
72
- "typescript": "5.9.3",
73
- "vite": "^6.4.1",
74
- "zod": "^4.3.5",
75
- "@stainless/eslint-config": "0.1.0-beta.1",
76
- "@stainless/sdk-json": "^0.1.0-beta.7"
90
+ "@types/react-syntax-highlighter": "^15.5.13",
91
+ "astro": "^6.3.1",
92
+ "react": "^19.2.6",
93
+ "react-dom": "^19.2.6",
94
+ "typescript": "6.0.3",
95
+ "vite": "^7.3.2",
96
+ "vitest": "^4.1.5",
97
+ "zod": "^4.4.3",
98
+ "@stainless/eslint-config": "0.1.0-beta.2"
77
99
  },
78
100
  "scripts": {
79
- "vendor-deps": "tsx scripts/vendor_deps.ts",
80
- "lint": "eslint . --max-warnings 0",
101
+ "lint": "eslint --flag unstable_native_nodejs_ts_config . --max-warnings 0",
81
102
  "sync": "astro sync",
82
- "check:types": "astro check"
103
+ "check:types": "astro check",
104
+ "test": "vitest run"
83
105
  }
84
106
  }
@@ -2,7 +2,8 @@ import Markdoc from '@markdoc/markdoc';
2
2
  import { buildIndex } from '@stainless-api/docs-search/providers/algolia';
3
3
  import type { AstroIntegrationLogger } from 'astro';
4
4
  import { generateIndex } from '@stainless-api/docs-search/indexer';
5
- import { SpecComposite } from './specs';
5
+ import type { LoadedSpecs } from './specs/utils';
6
+ import { isSupportedLanguage } from '@stainless-api/docs-ui/routing';
6
7
 
7
8
  const markdocConfig = {
8
9
  nodes: {
@@ -19,10 +20,10 @@ function renderMarkdown(content?: string) {
19
20
  }
20
21
 
21
22
  export async function buildAlgoliaIndex({
22
- specComposite,
23
+ loadedSpecs,
23
24
  logger,
24
25
  }: {
25
- specComposite: SpecComposite;
26
+ loadedSpecs: LoadedSpecs;
26
27
  logger?: AstroIntegrationLogger;
27
28
  }) {
28
29
  function warnLog(message: string) {
@@ -57,15 +58,8 @@ export async function buildAlgoliaIndex({
57
58
  return;
58
59
  }
59
60
 
60
- const indexEntries = specComposite.listUniqueSpecs().flatMap((spec) =>
61
- Array.from(
62
- generateIndex(
63
- spec.data.sdkJson,
64
- renderMarkdown,
65
- true,
66
- spec.data.languages.filter((l) => l !== 'sql' && l !== 'openapi'),
67
- ),
68
- ),
61
+ const indexEntries = loadedSpecs.flatMap((spec) =>
62
+ Array.from(generateIndex(spec.sdkJson, renderMarkdown, true, spec.languages.filter(isSupportedLanguage))),
69
63
  );
70
64
 
71
65
  await buildIndex(appId, indexName, algoliaWriteKey, indexEntries, renderMarkdown);
@@ -28,12 +28,6 @@ const options = getDocsLanguages().map((value) => ({
28
28
  const readmeSlug = language === 'http' ? API_REFERENCE_BASE_PATH : `${API_REFERENCE_BASE_PATH}/${language}`;
29
29
  ---
30
30
 
31
- <span
32
- hidden
33
- id="stldocs-data"
34
- data-stldocs-basepath={data.basePath}
35
- data-stldocs-defaultLanguage={data.defaultLanguage}></span>
36
-
37
31
  {
38
32
  (data.stainlessPath || slug === readmeSlug) && (
39
33
  <div class="stldocs-root stl-sdk-select">