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

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 +390 -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 +57 -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,395 @@
1
1
  # @stainless-api/docs
2
2
 
3
+ ## 1.0.0-beta.140
4
+
5
+ ### Major Changes
6
+
7
+ - 2c62934: License
8
+
9
+ ### Patch Changes
10
+
11
+ - 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.
12
+ - Updated dependencies [2c62934]
13
+ - @stainless-api/ui-primitives@1.0.0-beta.54
14
+ - @stainless-api/docs-search@1.0.0-beta.50
15
+ - @stainless-api/docs-ui@1.0.0-beta.96
16
+
17
+ ## 0.1.0-beta.139
18
+
19
+ ### Minor Changes
20
+
21
+ - d068123: bring-your-own spec loader
22
+ - e5367b0: Move preview worker to @stainless/sdk-json package
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [e5367b0]
27
+ - @stainless/sdk-json@0.1.0-beta.11
28
+
29
+ ## 0.1.0-beta.138
30
+
31
+ ### Patch Changes
32
+
33
+ - bb5f952: Stop loading AI chat examples from obsolete Stainless endpoint
34
+ - 25d7a11: Stop creating Algolia prose indexes during docs site builds. Vector-based prose indexing is unaffected and remains controlled by the `experimental.disableStainlessProseIndexing` flag.
35
+ - Updated dependencies [25d7a11]
36
+ - @stainless-api/docs-search@0.1.0-beta.49
37
+
38
+ ## 0.1.0-beta.137
39
+
40
+ ### Minor Changes
41
+
42
+ - ce2dd81: Add interface for customizing ai-chat behaviour
43
+
44
+ ### Patch Changes
45
+
46
+ - 5f0fdda: Vendor dependencies for Stainless Config change
47
+ - 680889d: feat: support disabling third-party context menu options
48
+
49
+ ## 0.1.0-beta.136
50
+
51
+ ### Minor Changes
52
+
53
+ - 5a6e598: [og image] migrate Takumi to v1
54
+
55
+ ### Patch Changes
56
+
57
+ - 8b7aaff: Adds markdown representation for overview
58
+ - 23bd8f7: Update preview worker
59
+
60
+ ## 0.1.0-beta.135
61
+
62
+ ### Patch Changes
63
+
64
+ - dea0395: fix backwards llmsTxt.disabled parsing
65
+
66
+ ## 0.1.0-beta.134
67
+
68
+ ### Minor Changes
69
+
70
+ - eb35b5c: Integrate @stainless-api/docs-og-image package into core
71
+
72
+ ## 0.1.0-beta.133
73
+
74
+ ### Patch Changes
75
+
76
+ - db5d00d: Fix for go version in install string
77
+
78
+ ## 0.1.0-beta.132
79
+
80
+ ### Patch Changes
81
+
82
+ - 53772cd: Improve handling of invalid refs
83
+ - 6091b54: Allow local files for builds
84
+ - Updated dependencies [53772cd]
85
+ - @stainless-api/docs-ui@0.1.0-beta.95
86
+ - @stainless-api/docs-search@0.1.0-beta.48
87
+
88
+ ## 0.1.0-beta.131
89
+
90
+ ### Patch Changes
91
+
92
+ - Updated dependencies [be32bea]
93
+ - @stainless-api/docs-ui@0.1.0-beta.94
94
+ - @stainless-api/docs-search@0.1.0-beta.47
95
+
96
+ ## 0.1.0-beta.130
97
+
98
+ ### Minor Changes
99
+
100
+ - da5debb: Move ai chat packages into stl-starlight, and extract to a generic interface
101
+
102
+ ### Patch Changes
103
+
104
+ - 3019a8b: Adds support for generating an llms.txt
105
+ - 4d3b938: Remove dead code flagged by knip
106
+ - b887dbb: Fix off-axis rotation of loading spinner in safari
107
+ - cfd8ea1: Minor fixes for Python and Ruby
108
+ - Updated dependencies [3019a8b]
109
+ - Updated dependencies [4d3b938]
110
+ - Updated dependencies [0791fb6]
111
+ - Updated dependencies [01b77d0]
112
+ - Updated dependencies [15e07d8]
113
+ - Updated dependencies [ebc039a]
114
+ - Updated dependencies [cfd8ea1]
115
+ - Updated dependencies [68a7bf8]
116
+ - @stainless-api/docs-ui@0.1.0-beta.93
117
+ - @stainless-api/ui-primitives@0.1.0-beta.53
118
+ - @stainless-api/docs-search@0.1.0-beta.46
119
+
120
+ ## 0.1.0-beta.129
121
+
122
+ ### Minor Changes
123
+
124
+ - 966ec34: Fixes nav dropdown logic
125
+
126
+ ### Patch Changes
127
+
128
+ - Updated dependencies [966ec34]
129
+ - @stainless-api/ui-primitives@0.1.0-beta.52
130
+ - @stainless-api/docs-search@0.1.0-beta.45
131
+ - @stainless-api/docs-ui@0.1.0-beta.92
132
+
133
+ ## 0.1.0-beta.128
134
+
135
+ ### Patch Changes
136
+
137
+ - e8a95f4: Revert “Fix getProsePages treating all pages as prose when API reference basePath is empty”
138
+
139
+ ## 0.1.0-beta.127
140
+
141
+ ### Patch Changes
142
+
143
+ - e0d595f: Fix snippet copy button click handler
144
+ - 8752b4e: Fix getProsePages treating all pages as prose when API reference basePath is ""
145
+ - Updated dependencies [871f3c0]
146
+ - Updated dependencies [871f3c0]
147
+ - @stainless-api/docs-ui@0.1.0-beta.91
148
+ - @stainless-api/docs-search@0.1.0-beta.44
149
+
150
+ ## 0.1.0-beta.126
151
+
152
+ ### Patch Changes
153
+
154
+ - 992a07a: Update vendored preview worker
155
+ - 1d1fa35: Use astro remark instead of `marked` to process api reference markdown
156
+ - Updated dependencies [374c0e4]
157
+ - @stainless-api/ui-primitives@0.1.0-beta.51
158
+ - @stainless-api/docs-ui@0.1.0-beta.90
159
+ - @stainless-api/docs-search@0.1.0-beta.43
160
+
161
+ ## 0.1.0-beta.125
162
+
163
+ ### Patch Changes
164
+
165
+ - 975ba51: cap prose indexing batches to 30MB
166
+ - Updated dependencies [005419c]
167
+ - @stainless-api/docs-ui@0.1.0-beta.89
168
+ - @stainless-api/docs-search@0.1.0-beta.42
169
+
170
+ ## 0.1.0-beta.124
171
+
172
+ ### Patch Changes
173
+
174
+ - 152c864: don’t try to load github themes unconditionally
175
+ - Updated dependencies [af5a5d7]
176
+ - @stainless-api/docs-ui@0.1.0-beta.88
177
+ - @stainless-api/docs-search@0.1.0-beta.41
178
+
179
+ ## 0.1.0-beta.123
180
+
181
+ ### Patch Changes
182
+
183
+ - 813b223: Fix base path appending to header links like mailto:
184
+
185
+ ## 0.1.0-beta.122
186
+
187
+ ### Minor Changes
188
+
189
+ - f22893c: Add interactive examples to ai chat
190
+
191
+ ### Patch Changes
192
+
193
+ - 3fbf5d8: Updates preview worker
194
+
195
+ ## 0.1.0-beta.121
196
+
197
+ ### Minor Changes
198
+
199
+ - 9cb2166: Join base path with HEADER_LINKS and TABS
200
+
201
+ ### Patch Changes
202
+
203
+ - 7701d8f: Clean up console warnings loading DocsSearch markdown renderer
204
+ - Updated dependencies [7701d8f]
205
+ - Updated dependencies [5460e81]
206
+ - @stainless-api/docs-ui@0.1.0-beta.87
207
+ - @stainless-api/docs-search@0.1.0-beta.40
208
+
209
+ ## 0.1.0-beta.120
210
+
211
+ ### Patch Changes
212
+
213
+ - fe6cd04: Improves sidebar item rendering in Terraform
214
+
215
+ ## 0.1.0-beta.119
216
+
217
+ ### Patch Changes
218
+
219
+ - 403c097: Export additional components
220
+ - Updated dependencies [848cff4]
221
+ - Updated dependencies [ea2b90c]
222
+ - @stainless-api/ui-primitives@0.1.0-beta.50
223
+ - @stainless-api/docs-ui@0.1.0-beta.86
224
+ - @stainless-api/docs-search@0.1.0-beta.39
225
+
226
+ ## 0.1.0-beta.118
227
+
228
+ ### Minor Changes
229
+
230
+ - 9599de4: Updates preview worker to improve response snippets
231
+
232
+ ### Patch Changes
233
+
234
+ - 7901fd4: fix astro scoping for language-block style?
235
+ - Updated dependencies [93a3767]
236
+ - @stainless-api/docs-ui@0.1.0-beta.85
237
+ - @stainless-api/docs-search@0.1.0-beta.38
238
+
239
+ ## 0.1.0-beta.117
240
+
241
+ ### Patch Changes
242
+
243
+ - af60696: ensure splash pages aren't uncentered from ghost sidebar
244
+
245
+ ## 0.1.0-beta.116
246
+
247
+ ### Patch Changes
248
+
249
+ - ad9552c: don’t let toc shrink to its intrinisc size
250
+
251
+ ## 0.1.0-beta.115
252
+
253
+ ### Minor Changes
254
+
255
+ - 2a9da30: Update to Astro 6
256
+
257
+ ## 0.1.0-beta.114
258
+
259
+ ### Patch Changes
260
+
261
+ - Updated dependencies [eab438f]
262
+ - Updated dependencies [438a593]
263
+ - @stainless-api/docs-search@0.1.0-beta.37
264
+ - @stainless-api/docs-ui@0.1.0-beta.84
265
+
266
+ ## 0.1.0-beta.113
267
+
268
+ ### Patch Changes
269
+
270
+ - aeda757: Handles cases where pagefind does not exist
271
+ - Updated dependencies [1c38511]
272
+ - Updated dependencies [aeda757]
273
+ - @stainless-api/docs-ui@0.1.0-beta.83
274
+ - @stainless-api/docs-search@0.1.0-beta.36
275
+
276
+ ## 0.1.0-beta.112
277
+
278
+ ### Patch Changes
279
+
280
+ - Updated dependencies [37cc2ac]
281
+ - @stainless-api/docs-ui@0.1.0-beta.82
282
+ - @stainless-api/docs-search@0.1.0-beta.35
283
+
284
+ ## 0.1.0-beta.111
285
+
286
+ ### Patch Changes
287
+
288
+ - 6cab196: prevent summary elements from toggling when users are selecting text
289
+ - Updated dependencies [134885b]
290
+ - Updated dependencies [5ba9135]
291
+ - Updated dependencies [df0c958]
292
+ - Updated dependencies [e641d33]
293
+ - @stainless-api/docs-ui@0.1.0-beta.81
294
+ - @stainless-api/docs-search@0.1.0-beta.34
295
+
296
+ ## 0.1.0-beta.110
297
+
298
+ ### Minor Changes
299
+
300
+ - c1723f0: Updates preview worker
301
+ - 05cd046: Adds support for overriding components
302
+
303
+ ### Patch Changes
304
+
305
+ - f38f92f: fix scroll-padding-top
306
+ - Updated dependencies [05cd046]
307
+ - @stainless-api/docs-ui@0.1.0-beta.80
308
+ - @stainless-api/docs-search@0.1.0-beta.33
309
+
310
+ ## 0.1.0-beta.109
311
+
312
+ ### Patch Changes
313
+
314
+ - b45d8e2: clean up empty state on Overview when there are no “Libraries”
315
+
316
+ ## 0.1.0-beta.108
317
+
318
+ ### Patch Changes
319
+
320
+ - 27d2130: add powered by stainless to footer
321
+
322
+ ## 0.1.0-beta.107
323
+
324
+ ### Minor Changes
325
+
326
+ - 971a12f: Adds an experimental flag to disable indexing
327
+
328
+ ## 0.1.0-beta.106
329
+
330
+ ### Patch Changes
331
+
332
+ - a8ed299: Adds the ability for AI chat to move into a sidebar “panel” position.
333
+
334
+ ## 0.1.0-beta.105
335
+
336
+ ### Patch Changes
337
+
338
+ - 46956c1: update preview worker
339
+ - 04d04c1: update preview worker
340
+
341
+ ## 0.1.0-beta.104
342
+
343
+ ### Minor Changes
344
+
345
+ - 6d9933d: Replace starlight page frame with top-level CSS grid layout
346
+ - 1a150ee: Updates preview worker
347
+
348
+ ### Patch Changes
349
+
350
+ - Updated dependencies [6d9933d]
351
+ - @stainless-api/ui-primitives@0.1.0-beta.49
352
+ - @stainless-api/docs-ui@0.1.0-beta.79
353
+ - @stainless-api/docs-search@0.1.0-beta.32
354
+
355
+ ## 0.1.0-beta.103
356
+
357
+ ### Patch Changes
358
+
359
+ - Updated dependencies [54add64]
360
+ - @stainless-api/docs-ui@0.1.0-beta.78
361
+ - @stainless-api/docs-search@0.1.0-beta.31
362
+
363
+ ## 0.1.0-beta.102
364
+
365
+ ### Minor Changes
366
+
367
+ - a1b8e83: adds starlight passthrough option for configuring pagefind
368
+
369
+ ## 0.1.0-beta.101
370
+
371
+ ### Patch Changes
372
+
373
+ - f81fade: Fix false negatives detecting prose pages to convert to markdown
374
+ - Updated dependencies [21e50d3]
375
+ - @stainless-api/docs-ui@0.1.0-beta.77
376
+ - @stainless-api/docs-search@0.1.0-beta.30
377
+
378
+ ## 0.1.0-beta.100
379
+
380
+ ### Minor Changes
381
+
382
+ - 5701494: Improves sidebar perf + new experimental option to link group titles to overview pages for the group
383
+
384
+ ### Patch Changes
385
+
386
+ - Updated dependencies [7ea23ef]
387
+ - Updated dependencies [95fe66c]
388
+ - Updated dependencies [5701494]
389
+ - @stainless-api/ui-primitives@0.1.0-beta.48
390
+ - @stainless-api/docs-ui@0.1.0-beta.76
391
+ - @stainless-api/docs-search@0.1.0-beta.29
392
+
3
393
  ## 0.1.0-beta.99
4
394
 
5
395
  ### 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.140",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -14,71 +14,88 @@
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",
28
37
  "engines": {
29
- "node": ">=18.17.1"
38
+ "node": ">=22.12.0"
30
39
  },
31
40
  "peerDependencies": {
32
- "@astrojs/starlight": ">=0.37.5",
33
- "astro": ">=5.15.3",
41
+ "@astrojs/starlight": ">=0.38.0",
42
+ "takumi-js": ">=1.0.5",
43
+ "astro": ">=6.0.0",
34
44
  "react": ">=19.0.0",
35
45
  "react-dom": ">=19.0.0",
36
- "vite": ">=6.2.1"
46
+ "vite": ">=7.3.1"
47
+ },
48
+ "peerDependenciesMeta": {
49
+ "takumi-js": {
50
+ "optional": true
51
+ }
37
52
  },
38
53
  "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",
54
+ "@astrojs/markdown-remark": "^7.1.1",
55
+ "@astrojs/react": "^5.0.4",
56
+ "@markdoc/markdoc": "^0.5.7",
57
+ "@stainless-api/sdk": "0.5.0",
58
+ "cheerio": "^1.2.0",
44
59
  "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",
60
+ "dotenv": "17.4.2",
61
+ "lucide-react": "^1.14.0",
62
+ "motion": "^12.38.0",
63
+ "node-html-parser": "^7.1.0",
49
64
  "rehype-parse": "^9.0.1",
50
65
  "rehype-remark": "^10.0.1",
66
+ "react-markdown": "^10.1.0",
67
+ "react-syntax-highlighter": "^16.1.1",
51
68
  "remark-gfm": "^4.0.1",
52
69
  "remark-github-alerts": "^0.1.1",
53
70
  "remark-stringify": "^11.0.0",
54
- "shiki": "^3.22.0",
71
+ "remend": "^1.3.0",
72
+ "shiki": "^4.0.2",
55
73
  "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"
74
+ "@stainless-api/docs-search": "1.0.0-beta.50",
75
+ "@stainless-api/docs-ui": "1.0.0-beta.96",
76
+ "@stainless-api/ui-primitives": "1.0.0-beta.54",
77
+ "@stainless/sdk-json": "^0.1.0-beta.11"
62
78
  },
63
79
  "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",
80
+ "@astrojs/check": "^0.9.9",
81
+ "takumi-js": "^1.1.2",
82
+ "@types/node": "24.12.2",
83
+ "@types/react": "19.2.14",
68
84
  "@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"
85
+ "@types/react-syntax-highlighter": "^15.5.13",
86
+ "astro": "^6.3.1",
87
+ "react": "^19.2.6",
88
+ "react-dom": "^19.2.6",
89
+ "typescript": "6.0.3",
90
+ "vite": "^7.3.2",
91
+ "vitest": "^4.1.5",
92
+ "zod": "^4.4.3",
93
+ "@stainless/eslint-config": "0.1.0-beta.2"
77
94
  },
78
95
  "scripts": {
79
- "vendor-deps": "tsx scripts/vendor_deps.ts",
80
- "lint": "eslint . --max-warnings 0",
96
+ "lint": "eslint --flag unstable_native_nodejs_ts_config . --max-warnings 0",
81
97
  "sync": "astro sync",
82
- "check:types": "astro check"
98
+ "check:types": "astro check",
99
+ "test": "vitest run"
83
100
  }
84
101
  }
@@ -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">