@stainless-api/docs 0.1.0-beta.4 → 0.1.0-beta.40

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 (108) hide show
  1. package/CHANGELOG.md +289 -0
  2. package/components/variables.css +2 -32
  3. package/eslint-suppressions.json +47 -0
  4. package/locals.d.ts +14 -0
  5. package/package.json +34 -30
  6. package/plugin/buildAlgoliaIndex.ts +31 -6
  7. package/plugin/cms/server.ts +98 -55
  8. package/plugin/cms/sidebar-builder.ts +7 -26
  9. package/plugin/cms/worker.ts +3 -3
  10. package/plugin/components/SDKSelect.astro +7 -5
  11. package/plugin/components/SnippetCode.tsx +11 -7
  12. package/plugin/components/search/SearchAlgolia.astro +5 -11
  13. package/plugin/components/search/SearchIsland.tsx +35 -22
  14. package/plugin/generateAPIReferenceLink.ts +2 -2
  15. package/plugin/globalJs/ai-dropdown-options.ts +235 -0
  16. package/plugin/globalJs/navigation.ts +7 -27
  17. package/plugin/helpers/getPageLoadEvent.ts +1 -1
  18. package/plugin/index.ts +52 -24
  19. package/plugin/languages.ts +2 -2
  20. package/plugin/loadPluginConfig.ts +105 -18
  21. package/plugin/middlewareBuilder/stainlessMiddleware.d.ts +1 -1
  22. package/plugin/react/Routing.tsx +60 -57
  23. package/plugin/referencePlaceholderUtils.ts +1 -1
  24. package/plugin/replaceSidebarPlaceholderMiddleware.ts +5 -1
  25. package/plugin/routes/Docs.astro +59 -85
  26. package/plugin/routes/Overview.astro +10 -16
  27. package/plugin/routes/markdown.ts +7 -7
  28. package/plugin/vendor/preview.worker.docs.js +7566 -6784
  29. package/resolveSrcFile.ts +10 -0
  30. package/scripts/vendor_deps.ts +1 -1
  31. package/shared/getSharedLogger.ts +15 -0
  32. package/shared/terminalUtils.ts +3 -0
  33. package/src/content.config.ts +9 -0
  34. package/stl-docs/components/AIDropdown.tsx +63 -0
  35. package/stl-docs/components/{content-panel/ContentBreadcrumbs.tsx → ContentBreadcrumbs.tsx} +2 -2
  36. package/stl-docs/components/Head.astro +16 -0
  37. package/stl-docs/components/Header.astro +3 -2
  38. package/stl-docs/components/PageTitle.astro +82 -0
  39. package/stl-docs/components/TableOfContents.astro +34 -0
  40. package/stl-docs/components/ThemeSelect.astro +80 -112
  41. package/stl-docs/components/content-panel/ContentPanel.astro +9 -39
  42. package/stl-docs/components/headers/DefaultHeader.astro +1 -1
  43. package/stl-docs/components/headers/HeaderLinks.astro +1 -1
  44. package/stl-docs/components/headers/SplashMobileMenuToggle.astro +19 -0
  45. package/stl-docs/components/headers/StackedHeader.astro +29 -24
  46. package/stl-docs/components/icons/chat-gpt.tsx +17 -0
  47. package/stl-docs/components/icons/claude.tsx +10 -0
  48. package/stl-docs/components/icons/cursor.tsx +10 -0
  49. package/stl-docs/components/icons/gemini.tsx +19 -0
  50. package/stl-docs/components/icons/markdown.tsx +10 -0
  51. package/stl-docs/components/index.ts +1 -0
  52. package/stl-docs/components/mintlify-compat/Accordion.astro +7 -38
  53. package/stl-docs/components/mintlify-compat/AccordionGroup.astro +9 -23
  54. package/stl-docs/components/mintlify-compat/Columns.astro +40 -42
  55. package/stl-docs/components/mintlify-compat/Frame.astro +16 -18
  56. package/stl-docs/components/mintlify-compat/Step.astro +30 -32
  57. package/stl-docs/components/mintlify-compat/Steps.astro +8 -10
  58. package/stl-docs/components/mintlify-compat/callouts/Callout.astro +10 -3
  59. package/stl-docs/components/mintlify-compat/callouts/Check.astro +7 -3
  60. package/stl-docs/components/mintlify-compat/callouts/Danger.astro +7 -3
  61. package/stl-docs/components/mintlify-compat/callouts/Info.astro +7 -3
  62. package/stl-docs/components/mintlify-compat/callouts/Note.astro +7 -3
  63. package/stl-docs/components/mintlify-compat/callouts/Tip.astro +7 -3
  64. package/stl-docs/components/mintlify-compat/callouts/Warning.astro +7 -3
  65. package/stl-docs/components/mintlify-compat/card.css +33 -35
  66. package/stl-docs/components/nav-tabs/NavDropdown.astro +29 -63
  67. package/stl-docs/components/nav-tabs/NavTabs.astro +79 -65
  68. package/stl-docs/components/nav-tabs/SecondaryNavTabs.astro +15 -7
  69. package/stl-docs/components/nav-tabs/buildNavLinks.ts +4 -3
  70. package/stl-docs/components/pagination/HomeLink.astro +10 -0
  71. package/stl-docs/components/pagination/Pagination.astro +173 -0
  72. package/stl-docs/components/pagination/PaginationLinkEmphasized.astro +22 -0
  73. package/stl-docs/components/pagination/PaginationLinkQuiet.astro +13 -0
  74. package/stl-docs/components/pagination/util.ts +71 -0
  75. package/stl-docs/components/scripts.ts +1 -0
  76. package/stl-docs/components/{Sidebar.astro → sidebars/BaseSidebar.astro} +2 -3
  77. package/stl-docs/components/sidebars/SDKSelectSidebar.astro +8 -0
  78. package/stl-docs/disableCalloutSyntax.ts +36 -0
  79. package/stl-docs/index.ts +76 -27
  80. package/stl-docs/loadStlDocsConfig.ts +35 -5
  81. package/stl-docs/proseMarkdown/proseMarkdownIntegration.ts +64 -0
  82. package/stl-docs/proseMarkdown/proseMarkdownMiddleware.ts +34 -0
  83. package/stl-docs/proseMarkdown/toMarkdown.ts +158 -0
  84. package/stl-docs/tabsMiddleware.ts +12 -4
  85. package/styles/code.css +115 -127
  86. package/styles/fonts.css +32 -17
  87. package/styles/links.css +10 -49
  88. package/styles/overrides.css +53 -57
  89. package/styles/page.css +90 -59
  90. package/styles/sdk_select.css +9 -7
  91. package/styles/search.css +59 -69
  92. package/styles/sidebar.css +190 -127
  93. package/styles/toc.css +37 -33
  94. package/theme.css +9 -1
  95. package/tsconfig.json +2 -5
  96. package/virtual-module.d.ts +7 -2
  97. package/plugin/globalJs/ai-dropdown.ts +0 -57
  98. package/stl-docs/components/APIReferenceAIDropdown.tsx +0 -86
  99. package/stl-docs/components/content-panel/ProseAIDropdown.tsx +0 -64
  100. /package/{plugin/assets → assets}/fonts/geist/OFL.txt +0 -0
  101. /package/{plugin/assets → assets}/fonts/geist/geist-italic-latin-ext.woff2 +0 -0
  102. /package/{plugin/assets → assets}/fonts/geist/geist-italic-latin.woff2 +0 -0
  103. /package/{plugin/assets → assets}/fonts/geist/geist-latin-ext.woff2 +0 -0
  104. /package/{plugin/assets → assets}/fonts/geist/geist-latin.woff2 +0 -0
  105. /package/{plugin/assets → assets}/fonts/geist/geist-mono-italic-latin-ext.woff2 +0 -0
  106. /package/{plugin/assets → assets}/fonts/geist/geist-mono-italic-latin.woff2 +0 -0
  107. /package/{plugin/assets → assets}/fonts/geist/geist-mono-latin-ext.woff2 +0 -0
  108. /package/{plugin/assets → assets}/fonts/geist/geist-mono-latin.woff2 +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,294 @@
1
1
  # @stainless-api/docs
2
2
 
3
+ ## 0.1.0-beta.40
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [8670d73]
8
+ - @stainless-api/docs-ui@0.1.0-beta.33
9
+
10
+ ## 0.1.0-beta.39
11
+
12
+ ### Patch Changes
13
+
14
+ - 242deef: fix mobile menu on splash pages
15
+ - Updated dependencies [242deef]
16
+ - @stainless-api/ui-primitives@0.1.0-beta.25
17
+ - @stainless-api/docs-ui@0.1.0-beta.32
18
+
19
+ ## 0.1.0-beta.38
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [c28b0a6]
24
+ - Updated dependencies [f23c6bc]
25
+ - Updated dependencies [2cd1b33]
26
+ - @stainless-api/docs-ui@0.1.0-beta.31
27
+ - @stainless-api/ui-primitives@0.1.0-beta.24
28
+
29
+ ## 0.1.0-beta.37
30
+
31
+ ### Patch Changes
32
+
33
+ - 5f14e53: Render page descriptions as part of page header by default
34
+ - Updated dependencies [49e1b93]
35
+ - @stainless-api/docs-ui@0.1.0-beta.30
36
+ - @stainless-api/ui-primitives@0.1.0-beta.23
37
+
38
+ ## 0.1.0-beta.36
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies [7897575]
43
+ - @stainless-api/ui-primitives@0.1.0-beta.22
44
+ - @stainless-api/docs-ui@0.1.0-beta.29
45
+
46
+ ## 0.1.0-beta.35
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated dependencies [344761e]
51
+ - @stainless-api/ui-primitives@0.1.0-beta.21
52
+ - @stainless-api/docs-ui@0.1.0-beta.28
53
+
54
+ ## 0.1.0-beta.34
55
+
56
+ ### Patch Changes
57
+
58
+ - f5173e9: fix: theme flickering
59
+
60
+ ## 0.1.0-beta.33
61
+
62
+ ### Patch Changes
63
+
64
+ - 7ef572c: feat: updated dropdowns
65
+ - Updated dependencies [7ef572c]
66
+ - @stainless-api/docs-ui@0.1.0-beta.27
67
+ - @stainless-api/ui-primitives@0.1.0-beta.20
68
+
69
+ ## 0.1.0-beta.32
70
+
71
+ ### Patch Changes
72
+
73
+ - 58040d8: feat: ui primitives updates, cursor support
74
+ - Updated dependencies [58040d8]
75
+ - @stainless-api/docs-ui@0.1.0-beta.26
76
+ - @stainless-api/ui-primitives@0.1.0-beta.19
77
+
78
+ ## 0.1.0-beta.31
79
+
80
+ ### Patch Changes
81
+
82
+ - Updated dependencies [afd1f8e]
83
+ - Updated dependencies [279fa0e]
84
+ - @stainless-api/docs-ui@0.1.0-beta.25
85
+
86
+ ## 0.1.0-beta.30
87
+
88
+ ### Patch Changes
89
+
90
+ - Updated dependencies [ab570bc]
91
+ - @stainless-api/docs-ui@0.1.0-beta.24
92
+
93
+ ## 0.1.0-beta.29
94
+
95
+ ### Patch Changes
96
+
97
+ - Updated dependencies [279fa0e]
98
+ - @stainless-api/docs-ui@0.1.0-beta.23
99
+
100
+ ## 0.1.0-beta.28
101
+
102
+ ### Minor Changes
103
+
104
+ - c635741: Updated worker and fixed docs-ui jsx issue
105
+
106
+ ### Patch Changes
107
+
108
+ - Updated dependencies [c635741]
109
+ - @stainless-api/docs-ui@0.1.0-beta.22
110
+ - @stainless-api/ui-primitives@0.1.0-beta.18
111
+
112
+ ## 0.1.0-beta.27
113
+
114
+ ### Patch Changes
115
+
116
+ - de189ee: remove max width on site title
117
+
118
+ ## 0.1.0-beta.26
119
+
120
+ ### Patch Changes
121
+
122
+ - 1517484: fixing font loading, updating nav bar height
123
+ - Updated dependencies [1517484]
124
+ - @stainless-api/docs-ui@0.1.0-beta.21
125
+ - @stainless-api/ui-primitives@0.1.0-beta.17
126
+
127
+ ## 0.1.0-beta.25
128
+
129
+ ### Patch Changes
130
+
131
+ - Updated dependencies [b9ce1b6]
132
+ - @stainless-api/docs-ui@0.1.0-beta.20
133
+
134
+ ## 0.1.0-beta.24
135
+
136
+ ### Patch Changes
137
+
138
+ - Updated dependencies [402222a]
139
+ - @stainless-api/docs-ui@0.1.0-beta.19
140
+
141
+ ## 0.1.0-beta.23
142
+
143
+ ### Patch Changes
144
+
145
+ - Updated dependencies [2150eee]
146
+ - @stainless-api/docs-ui@0.1.0-beta.18
147
+
148
+ ## 0.1.0-beta.22
149
+
150
+ ### Patch Changes
151
+
152
+ - Updated dependencies [f7ba067]
153
+ - @stainless-api/docs-ui@0.1.0-beta.17
154
+
155
+ ## 0.1.0-beta.21
156
+
157
+ ### Patch Changes
158
+
159
+ - 41e87cb: fix virtual module imports
160
+
161
+ ## 0.1.0-beta.20
162
+
163
+ ### Patch Changes
164
+
165
+ - 9cdb24d: Update pagination components, fix search modal
166
+ - Updated dependencies [9cdb24d]
167
+ - @stainless-api/docs-ui@0.1.0-beta.16
168
+ - @stainless-api/ui-primitives@0.1.0-beta.16
169
+
170
+ ## 0.1.0-beta.19
171
+
172
+ ### Patch Changes
173
+
174
+ - 15c003d: fix react peer dependencies
175
+ - Updated dependencies [15c003d]
176
+ - @stainless-api/docs-ui@0.1.0-beta.15
177
+ - @stainless-api/ui-primitives@0.1.0-beta.15
178
+
179
+ ## 0.1.0-beta.18
180
+
181
+ ### Patch Changes
182
+
183
+ - Updated dependencies [0572f60]
184
+ - @stainless-api/docs-ui@0.1.0-beta.14
185
+
186
+ ## 0.1.0-beta.17
187
+
188
+ ### Patch Changes
189
+
190
+ - a925bb4: fix markdown icon color in dark mode
191
+
192
+ ## 0.1.0-beta.16
193
+
194
+ ### Patch Changes
195
+
196
+ - 0618d05: Markdown rendering of prose pages, ai context menu, auth via cli, minor fixes
197
+ - Updated dependencies [0618d05]
198
+ - @stainless-api/docs-ui@0.1.0-beta.13
199
+ - @stainless-api/ui-primitives@0.1.0-beta.14
200
+
201
+ ## 0.1.0-beta.15
202
+
203
+ ### Patch Changes
204
+
205
+ - e35360f: include ui-primitive packages
206
+ - Updated dependencies [e35360f]
207
+ - @stainless-api/docs-ui@0.1.0-beta.12
208
+ - @stainless-api/ui-primitives@0.1.0-beta.13
209
+
210
+ ## 0.1.0-beta.14
211
+
212
+ ### Patch Changes
213
+
214
+ - a529fd4: fix: site title height
215
+ - Updated dependencies [a529fd4]
216
+ - @stainless-api/docs-ui@0.1.0-beta.11
217
+ - @stainless-api/ui-primitives@0.1.0-beta.12
218
+
219
+ ## 0.1.0-beta.13
220
+
221
+ ### Patch Changes
222
+
223
+ - 26a4786: fix: include missing starlight config options
224
+ - Updated dependencies [26a4786]
225
+ - @stainless-api/docs-ui@0.1.0-beta.10
226
+ - @stainless-api/ui-primitives@0.1.0-beta.11
227
+
228
+ ## 0.1.0-beta.12
229
+
230
+ ### Patch Changes
231
+
232
+ - Updated dependencies [3e44a9c]
233
+ - @stainless-api/ui-primitives@0.1.0-beta.10
234
+ - @stainless-api/docs-ui@0.1.0-beta.9
235
+
236
+ ## 0.1.0-beta.11
237
+
238
+ ### Patch Changes
239
+
240
+ - c96f895: Remove css layers, update sidebar styles, add new prose elements
241
+ - Updated dependencies [c96f895]
242
+ - @stainless-api/docs-ui@0.1.0-beta.8
243
+ - @stainless-api/ui-primitives@0.1.0-beta.9
244
+
245
+ ## 0.1.0-beta.10
246
+
247
+ ### Patch Changes
248
+
249
+ - dc059d2: should include option in stl-docs virtual module
250
+
251
+ ## 0.1.0-beta.9
252
+
253
+ ### Patch Changes
254
+
255
+ - d15a520: fix initialization of dropdown buttons
256
+ - Updated dependencies [d15a520]
257
+ - @stainless-api/ui-primitives@0.1.0-beta.8
258
+ - @stainless-api/docs-ui@0.1.0-beta.7
259
+
260
+ ## 0.1.0-beta.8
261
+
262
+ ### Minor Changes
263
+
264
+ - 917493d: move stainlessDocs into default export
265
+
266
+ ## 0.1.0-beta.7
267
+
268
+ ### Patch Changes
269
+
270
+ - Updated dependencies [34e7c61]
271
+ - @stainless-api/ui-primitives@0.1.0-beta.7
272
+ - @stainless-api/docs-ui@0.1.0-beta.6
273
+
274
+ ## 0.1.0-beta.6
275
+
276
+ ### Patch Changes
277
+
278
+ - 34cbd12: verify publishing
279
+ - Updated dependencies [f664b4d]
280
+ - Updated dependencies [34cbd12]
281
+ - @stainless-api/ui-primitives@0.1.0-beta.6
282
+ - @stainless-api/docs-ui@0.1.0-beta.5
283
+
284
+ ## 0.1.0-beta.5
285
+
286
+ ### Patch Changes
287
+
288
+ - Updated dependencies [e7a2a96]
289
+ - @stainless-api/ui-primitives@0.1.0-beta.5
290
+ - @stainless-api/docs-ui@0.1.0-beta.4
291
+
3
292
  ## 0.1.0-beta.4
4
293
 
5
294
  ### Patch Changes
@@ -1,7 +1,4 @@
1
1
  :root {
2
- --sl-font: 'Geist', system-ui, sans-serif;
3
- --sl-font-mono: 'Geist Mono', ui-monospace, monospace;
4
-
5
2
  --stldocs-font: var(--sl-font, system-ui, sans-serif);
6
3
  --stldocs-font-mono: var(--sl-font-mono, ui-monospace, monospace);
7
4
 
@@ -14,6 +11,7 @@
14
11
  --stldocs-color-gray-6: var(--sl-color-gray-6);
15
12
  --stldocs-color-gray-7: var(--sl-color-gray-7);
16
13
  --stldocs-color-gray-8: var(--sl-color-gray-8);
14
+ --stldocs-color-gray-9: var(--sl-color-gray-9);
17
15
 
18
16
  --stldocs-color-accent-low: var(--sl-color-accent-low);
19
17
  --stldocs-color-accent-high: var(--sl-color-accent-high);
@@ -28,6 +26,7 @@
28
26
 
29
27
  --stldocs-color-bg: var(--sl-color-bg);
30
28
  --stldocs-color-bg-nav: var(--sl-color-bg-nav);
29
+ --stldocs-color-selected: var(--sl-color-gray-6);
31
30
  --stldocs-color-bg-ui: var(--sl-color-bg-ui);
32
31
 
33
32
  --stldocs-color-bg-inline-code: var(--sl-color-bg-inline-code);
@@ -74,30 +73,6 @@
74
73
  --stldocs-expander-right-margin: 8px;
75
74
  --stldocs-font-size-body: 14px;
76
75
  --stldocs-font-size-body-xs: 12px;
77
-
78
- /* UI Overrides */
79
- --stl-ui-button-border-radius: var(--sl-button-border-radius);
80
- --stl-ui-text-body: var(--sl-text-sm);
81
- --stl-ui-font-family: var(--sl-font);
82
- --stl-ui-button-size: var(--sl-button-size);
83
-
84
- --stl-ui-color-accent-low: var(--sl-color-accent-low);
85
- --stl-ui-color-accent: var(--sl-color-accent);
86
- --stl-ui-color-accent-high: var(--sl-color-accent-high);
87
-
88
- --stl-ui-color-text: var(--sl-color-text);
89
- --stl-ui-color-text-secondary: var(--sl-color-text-secondary);
90
- --stl-ui-color-text-tertiary: var(--sl-color-text-tertiary);
91
- --stl-ui-color-text-invert: var(--sl-color-text-invert);
92
- --stl-ui-color-text-accent: var(--sl-color-text-accent);
93
-
94
- --stl-ui-color-bg: var(--sl-color-bg);
95
- --stl-ui-color-bg-ui: var(--sl-color-bg-ui);
96
- --stl-ui-color-bg-inline-code: var(--sl-color-bg-inline-code);
97
-
98
- --stl-ui-color-hairline-light: var(--sl-color-hairline-light);
99
- --stl-ui-color-hairline: var(--sl-color-hairline);
100
- --stl-ui-color-hairline-shade: var(--sl-color-hairline-shade);
101
76
  }
102
77
 
103
78
  /* These are the theme overrides - we need to come up with a good way to do this in starlight */
@@ -117,11 +92,6 @@
117
92
  --stldocs-title-padding-y: 2.5rem;
118
93
 
119
94
  --stldocs-z-index-theme-select: 1000;
120
- --stldocs-button-border-radius: var(--sl-button-border-radius);
121
- --stldocs-button-size: var(--sl-button-size);
122
- --stldocs-button-padding-x: var(--sl-button-padding-x);
123
- --stldocs-button-padding-y: var(--sl-button-padding-y);
124
-
125
95
  --sl-content-pad-x: 1rem;
126
96
  }
127
97
 
@@ -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.4",
3
+ "version": "0.1.0-beta.40",
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
+ "vite": ">=6.2.1",
30
+ "react": ">=19.0.0",
31
+ "react-dom": ">=19.0.0"
39
32
  },
40
33
  "dependencies": {
41
34
  "@astrojs/markdown-remark": "^6.3.2",
42
- "@astrojs/react": "^4.3.1",
35
+ "@astrojs/react": "^4.4.2",
43
36
  "@stainless-api/sdk": "0.1.0-alpha.12",
44
37
  "cheerio": "^1.1.2",
45
38
  "clsx": "^2.1.1",
46
- "dotenv": "17.2.2",
39
+ "dotenv": "17.2.3",
47
40
  "get-port": "^7.1.0",
48
41
  "highlight.js": "^11.11.1",
49
- "lucide-react": "^0.544.0",
42
+ "lucide-react": "^0.553.0",
50
43
  "marked": "^16.0.0",
51
- "react": "^19.1.1",
52
- "react-dom": "^19.1.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",
49
+ "remark-stringify": "^11.0.0",
54
50
  "shiki": "^3.9.2",
51
+ "unified": "^11.0.5",
55
52
  "web-worker": "^1.5.0",
56
53
  "yaml": "^2.8.0",
57
- "@stainless-api/docs-ui": "0.1.0-beta.3",
58
- "@stainless-api/ui-primitives": "0.1.0-beta.4"
54
+ "@stainless-api/docs-ui": "0.1.0-beta.33",
55
+ "@stainless-api/ui-primitives": "0.1.0-beta.25"
59
56
  },
60
57
  "devDependencies": {
58
+ "@astrojs/check": "^0.9.5",
61
59
  "@markdoc/markdoc": "^0.5.2",
62
- "@types/node": "^24.4.0",
63
- "@types/react": "^19.1.13",
64
- "@types/react-dom": "^19.1.9",
60
+ "@types/node": "24.5.1",
61
+ "@types/react": "^19.2.4",
62
+ "@types/react-dom": "^19.2.3",
63
+ "react": "^19.2.0",
64
+ "react-dom": "^19.2.0",
65
65
  "tsx": "^4.20.3",
66
- "zod": "^4.0.0",
67
- "@stainless/eslint-config": "0.0.0"
66
+ "typescript": "5.9.3",
67
+ "vite": "^6.3.6",
68
+ "zod": "^4.1.12",
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
  }