@stainless-api/docs-ui 0.1.0-beta.6 → 0.1.0-beta.60

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 (206) hide show
  1. package/dist/breadcrumbs-85Y-pybq.js +63 -0
  2. package/dist/breadcrumbs-BagP1oN2.d.ts +25 -0
  3. package/dist/breadcrumbs-seA1JsK4.d.ts +25 -0
  4. package/dist/chunk-Du3t87LU.js +18 -0
  5. package/dist/cli-CoLvH9jq.js +157 -0
  6. package/dist/component-CF9lLzZX.js +23 -0
  7. package/dist/component-generics-BblkOh-y.d.ts +30 -0
  8. package/dist/component-generics-CmIGbBLq.js +45 -0
  9. package/dist/component-generics-DS5pysMb.d.ts +30 -0
  10. package/dist/components/MaskedInput.d.ts +14 -0
  11. package/dist/components/MaskedInput.js +76 -0
  12. package/dist/components/breadcrumbs.d.ts +2 -0
  13. package/dist/components/breadcrumbs.js +9 -0
  14. package/dist/components/icons.d.ts +60 -0
  15. package/dist/components/icons.js +3 -0
  16. package/dist/components/index.d.ts +10 -0
  17. package/dist/components/index.js +18 -0
  18. package/dist/components/method.d.ts +2 -0
  19. package/dist/components/method.js +10 -0
  20. package/dist/components/overview.d.ts +2 -0
  21. package/dist/components/overview.js +11 -0
  22. package/dist/components/primitives.d.ts +2 -0
  23. package/dist/components/primitives.js +8 -0
  24. package/dist/components/properties.d.ts +2 -0
  25. package/dist/components/properties.js +9 -0
  26. package/dist/components/sdk.d.ts +2 -0
  27. package/dist/components/sdk.js +10 -0
  28. package/dist/components/sidebar.d.ts +2 -0
  29. package/dist/components/sidebar.js +9 -0
  30. package/dist/components/snippets.d.ts +3 -0
  31. package/dist/components/snippets.js +9 -0
  32. package/dist/components-Bz5h0Y4x.js +70 -0
  33. package/dist/contexts/component-generics.d.ts +2 -0
  34. package/dist/contexts/component-generics.js +3 -0
  35. package/dist/contexts/component-types.d.ts +16 -0
  36. package/dist/contexts/component-types.js +0 -0
  37. package/dist/contexts/component.d.ts +29 -0
  38. package/dist/contexts/component.js +28 -0
  39. package/dist/contexts/docs.d.ts +2 -0
  40. package/dist/contexts/docs.js +3 -0
  41. package/dist/contexts/index.d.ts +22 -0
  42. package/dist/contexts/index.js +7 -0
  43. package/dist/contexts/markdown.d.ts +2 -0
  44. package/dist/contexts/markdown.js +4 -0
  45. package/dist/contexts/navigation.d.ts +2 -0
  46. package/dist/contexts/navigation.js +3 -0
  47. package/dist/contexts/use-components.d.ts +14 -0
  48. package/dist/contexts/use-components.js +4 -0
  49. package/dist/contexts-DZfPd182.js +39 -0
  50. package/dist/csharp-BbNnLZWW.js +283 -0
  51. package/dist/docs-Bw-eLYjA.js +54 -0
  52. package/dist/docs-DFS6wkGm.d.ts +46 -0
  53. package/dist/docs-DdWB4Wsv.d.ts +46 -0
  54. package/dist/go-OFa_5xje.js +303 -0
  55. package/dist/http-olFAYLFq.js +331 -0
  56. package/dist/icons-DMkAA03z.js +885 -0
  57. package/dist/index-BdrPd64A.d.ts +302 -0
  58. package/dist/index-CLMudlDX.d.ts +302 -0
  59. package/dist/index-Ct7H30x1.d.ts +1691 -0
  60. package/dist/index-DTl8aUkb.d.ts +15 -0
  61. package/dist/index-Dp5biTf5.d.ts +15 -0
  62. package/dist/index.d.ts +19 -0
  63. package/dist/index.js +30 -7542
  64. package/dist/java-Bw0o13Wk.js +403 -0
  65. package/dist/languages/cli.d.ts +11 -0
  66. package/dist/languages/cli.js +20 -0
  67. package/dist/languages/csharp.d.ts +11 -0
  68. package/dist/languages/csharp.js +9 -0
  69. package/dist/languages/go.d.ts +11 -0
  70. package/dist/languages/go.js +9 -0
  71. package/dist/languages/http.d.ts +11 -0
  72. package/dist/languages/http.js +19 -0
  73. package/dist/languages/index.d.ts +11 -0
  74. package/dist/languages/index.js +27 -0
  75. package/dist/languages/java.d.ts +11 -0
  76. package/dist/languages/java.js +9 -0
  77. package/dist/languages/python.d.ts +11 -0
  78. package/dist/languages/python.js +9 -0
  79. package/dist/languages/ruby.d.ts +11 -0
  80. package/dist/languages/ruby.js +9 -0
  81. package/dist/languages/typescript.d.ts +11 -0
  82. package/dist/languages/typescript.js +9 -0
  83. package/dist/languages-DW_T-Th6.js +28 -0
  84. package/dist/markdown/index.d.ts +12 -0
  85. package/dist/markdown/index.js +105 -0
  86. package/dist/markdown/md.d.ts +15 -0
  87. package/dist/markdown/md.js +41 -0
  88. package/dist/markdown/printer.d.ts +13 -0
  89. package/dist/markdown/printer.js +98 -0
  90. package/dist/markdown/utils.d.ts +21 -0
  91. package/dist/markdown/utils.js +31 -0
  92. package/dist/markdown-DtbgEdDt.d.ts +22 -0
  93. package/dist/markdown-Dyn0NA2f.d.ts +22 -0
  94. package/dist/markdown-ZzVcn4kq.js +49 -0
  95. package/dist/method-C850sHPB.d.ts +59 -0
  96. package/dist/method-CxjUvijp.d.ts +59 -0
  97. package/dist/method-Dktsfckf.js +90 -0
  98. package/dist/navigation-By1sQl6M.js +24 -0
  99. package/dist/navigation-DLQvobDt.d.ts +29 -0
  100. package/dist/navigation-Dk55c7au.d.ts +29 -0
  101. package/dist/overview-DVu-9kpm.d.ts +39 -0
  102. package/dist/overview-EkRigi6e.js +139 -0
  103. package/dist/overview-rRsC-Yi_.d.ts +39 -0
  104. package/dist/primitives-BVaiiY63.js +250 -0
  105. package/dist/primitives-DP-cTr1W.d.ts +105 -0
  106. package/dist/primitives-DR4XbZ2t.d.ts +105 -0
  107. package/dist/properties-BHvUHbcf.js +131 -0
  108. package/dist/properties-Ll927UYJ.d.ts +54 -0
  109. package/dist/properties-lx53LZPl.d.ts +54 -0
  110. package/dist/python-D8NWX7Cb.js +269 -0
  111. package/dist/routing-Fzn1XfX_.js +197 -0
  112. package/dist/routing-sjrF8U7O.d.ts +54 -0
  113. package/dist/routing.d.ts +2 -0
  114. package/dist/routing.js +3 -180
  115. package/dist/ruby-DOUaLhKJ.js +387 -0
  116. package/dist/sdk-DdW_-RBy.d.ts +118 -0
  117. package/dist/sdk-Dhu_gfzq.d.ts +118 -0
  118. package/dist/sdk-DrK2bq-v.js +338 -0
  119. package/dist/sidebar-BLGIKgRI.js +85 -0
  120. package/dist/sidebar-CUaX1IBW.d.ts +36 -0
  121. package/dist/sidebar-DukWbBrE.d.ts +36 -0
  122. package/dist/snippets-Bi0ZADmt.d.ts +53 -0
  123. package/dist/snippets-CocIZMn0.d.ts +53 -0
  124. package/dist/snippets-D4VhtZIC.js +164 -0
  125. package/dist/spec.d.ts +65 -0
  126. package/dist/spec.js +167 -0
  127. package/dist/style-TeAZuiHh.js +170 -0
  128. package/dist/style.d.ts +169 -0
  129. package/dist/style.js +3 -0
  130. package/dist/styles/main.css +722 -755
  131. package/dist/styles/main.js +0 -0
  132. package/dist/styles/primitives.css +322 -459
  133. package/dist/styles/primitives.js +0 -0
  134. package/dist/styles/resets.css +32 -41
  135. package/dist/styles/resets.js +0 -0
  136. package/dist/styles/search.css +192 -270
  137. package/dist/styles/search.js +0 -0
  138. package/dist/styles/sidebar.css +56 -61
  139. package/dist/styles/sidebar.js +0 -0
  140. package/dist/styles/variables.css +26 -89
  141. package/dist/styles/variables.js +0 -0
  142. package/dist/styles.css +3140 -0
  143. package/dist/styles.mjs +1 -0
  144. package/dist/typescript-DDa446mB.js +449 -0
  145. package/dist/use-components-Dbin0y07.js +7 -0
  146. package/dist/utils-BoRmEFRn.js +32 -0
  147. package/dist/utils.d.ts +14 -0
  148. package/dist/utils.js +3 -0
  149. package/package.json +73 -21
  150. package/dist/mcp.js +0 -16003
  151. package/dist/styles/snippets.css +0 -132
  152. package/src/components/breadcrumbs.tsx +0 -94
  153. package/src/components/chat.tsx +0 -154
  154. package/src/components/dropdown.tsx +0 -91
  155. package/src/components/icons.tsx +0 -584
  156. package/src/components/index.ts +0 -9
  157. package/src/components/method.tsx +0 -144
  158. package/src/components/overview.tsx +0 -159
  159. package/src/components/primitives.tsx +0 -284
  160. package/src/components/properties.tsx +0 -130
  161. package/src/components/scripts/dropdown.ts +0 -78
  162. package/src/components/sdk.tsx +0 -402
  163. package/src/components/sidebar.tsx +0 -99
  164. package/src/components/snippets.tsx +0 -179
  165. package/src/contexts/component-generics.tsx +0 -48
  166. package/src/contexts/component-types.tsx +0 -5
  167. package/src/contexts/component.tsx +0 -32
  168. package/src/contexts/docs.tsx +0 -75
  169. package/src/contexts/index.tsx +0 -17
  170. package/src/contexts/markdown.tsx +0 -43
  171. package/src/contexts/navigation.tsx +0 -44
  172. package/src/contexts/search.tsx +0 -28
  173. package/src/contexts/use-components.tsx +0 -4
  174. package/src/index.ts +0 -6
  175. package/src/languages/go.tsx +0 -281
  176. package/src/languages/http.tsx +0 -321
  177. package/src/languages/index.ts +0 -26
  178. package/src/languages/java.tsx +0 -358
  179. package/src/languages/python.tsx +0 -255
  180. package/src/languages/ruby.tsx +0 -320
  181. package/src/languages/typescript.tsx +0 -393
  182. package/src/markdown/index.ts +0 -107
  183. package/src/markdown/md.ts +0 -45
  184. package/src/markdown/utils.ts +0 -49
  185. package/src/routing.ts +0 -238
  186. package/src/search/form.tsx +0 -127
  187. package/src/search/index.tsx +0 -1
  188. package/src/search/indexer.ts +0 -246
  189. package/src/search/mcp.ts +0 -61
  190. package/src/search/printer.tsx +0 -86
  191. package/src/search/providers/algolia.ts +0 -88
  192. package/src/search/providers/fuse.ts +0 -19
  193. package/src/search/providers/pagefind.ts +0 -17
  194. package/src/search/providers/walker.ts +0 -30
  195. package/src/search/results.tsx +0 -181
  196. package/src/search/state.ts +0 -64
  197. package/src/search/types.ts +0 -116
  198. package/src/style.ts +0 -197
  199. package/src/styles/main.css +0 -993
  200. package/src/styles/primitives.css +0 -573
  201. package/src/styles/resets.css +0 -47
  202. package/src/styles/search.css +0 -342
  203. package/src/styles/sidebar.css +0 -87
  204. package/src/styles/snippets.css +0 -132
  205. package/src/styles/variables.css +0 -90
  206. package/src/utils.ts +0 -41
@@ -0,0 +1,387 @@
1
+ import { t as __exportAll } from "./chunk-Du3t87LU.js";
2
+ import { a as useLanguage, l as useSpec, r as useDeclaration } from "./docs-Bw-eLYjA.js";
3
+ import { n as useLanguageComponents } from "./contexts-DZfPd182.js";
4
+ import { t as useComponents } from "./use-components-Dbin0y07.js";
5
+ import { t as style_default } from "./style-TeAZuiHh.js";
6
+ import * as React$1 from "react";
7
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
+
9
+ //#region src/languages/ruby.tsx
10
+ var ruby_exports = /* @__PURE__ */ __exportAll({
11
+ Declaration: () => Declaration,
12
+ MethodSignature: () => MethodSignature,
13
+ Property: () => Property,
14
+ Type: () => Type,
15
+ TypeName: () => TypeName
16
+ });
17
+ const ComplexTypes = {
18
+ RubyTypeObject: "object",
19
+ RubyTypeUnion: "union",
20
+ RubyTypeIntersection: "intersection",
21
+ RubyTypeArray: "array",
22
+ RubyTypeMap: "hash"
23
+ };
24
+ const Keywords = {
25
+ RubyTypeBinary: "StringIO",
26
+ RubyTypeUnknown: "untyped",
27
+ RubyTypeNull: "nil",
28
+ RubyTypeInteger: "Integer",
29
+ RubyTypeFloat: "Float",
30
+ RubyTypeBoolean: "bool"
31
+ };
32
+ function TypeName({ type }) {
33
+ const Lang = useLanguageComponents();
34
+ return ComplexTypes[type.kind] ?? /* @__PURE__ */ jsx(Lang.Type, { type });
35
+ }
36
+ const VALID_IDENTIFIER = /^[_A-Za-z][_A-Za-z0-9]*$/;
37
+ function TypePreview({ path }) {
38
+ const spec = useSpec();
39
+ const language = useLanguage();
40
+ const decl = useDeclaration(path, false);
41
+ const { Join } = useComponents();
42
+ if (!(decl && "children" in decl && decl.children && decl.children.length > 0) || "type" in decl && decl["type"] && "kind" in decl["type"] && decl["type"]?.["kind"] === "RubyTypeUnion") return;
43
+ const items = decl.children.map((prop, key) => {
44
+ const p = spec?.decls?.[language]?.[prop];
45
+ return /* @__PURE__ */ jsx("span", {
46
+ className: style_default.TypePropertyName,
47
+ children: /* @__PURE__ */ jsx("span", {
48
+ className: style_default.TextIdentifier,
49
+ children: p && "ident" in p ? p["ident"] : null
50
+ })
51
+ }, key);
52
+ });
53
+ return /* @__PURE__ */ jsxs("span", {
54
+ className: style_default.TypePreview,
55
+ "data-stldocs-type-preview": "properties",
56
+ children: [
57
+ /* @__PURE__ */ jsx("span", {
58
+ className: style_default.TypeBrace,
59
+ children: " {"
60
+ }),
61
+ /* @__PURE__ */ jsxs("span", {
62
+ className: style_default.TypePreviewContent,
63
+ children: [
64
+ " ",
65
+ /* @__PURE__ */ jsx(Join, {
66
+ items,
67
+ limit: 3,
68
+ children: /* @__PURE__ */ jsx("span", {
69
+ className: style_default.TextOperator,
70
+ children: ", "
71
+ })
72
+ }),
73
+ " "
74
+ ]
75
+ }),
76
+ /* @__PURE__ */ jsx("span", {
77
+ className: style_default.TypeBrace,
78
+ children: "} "
79
+ })
80
+ ]
81
+ });
82
+ }
83
+ function Type({ type }) {
84
+ const Lang = useLanguageComponents();
85
+ const { SDKReference, Join } = useComponents();
86
+ switch (type.kind) {
87
+ case "RubyTypeBinary":
88
+ case "RubyTypeUnknown":
89
+ case "RubyTypeNull":
90
+ case "RubyTypeInteger":
91
+ case "RubyTypeFloat":
92
+ case "RubyTypeBoolean": return /* @__PURE__ */ jsx("span", {
93
+ className: style_default.Type,
94
+ children: /* @__PURE__ */ jsx("span", {
95
+ className: style_default.TypeKeyword,
96
+ children: Keywords[type.kind]
97
+ })
98
+ });
99
+ case "RubyTypeString": return /* @__PURE__ */ jsx("span", {
100
+ className: style_default.Type,
101
+ children: /* @__PURE__ */ jsx("span", {
102
+ className: style_default.TypeString,
103
+ children: "String"
104
+ })
105
+ });
106
+ case "RubyTypeLiteral":
107
+ switch (typeof type.literal) {
108
+ case "string": return /* @__PURE__ */ jsx("span", {
109
+ className: style_default.Type,
110
+ children: /* @__PURE__ */ jsxs("span", {
111
+ className: style_default.LiteralString,
112
+ children: [":", type.literal.match(VALID_IDENTIFIER) ? type.literal : JSON.stringify(type.literal)]
113
+ })
114
+ });
115
+ case "number": return /* @__PURE__ */ jsx("span", {
116
+ className: style_default.Type,
117
+ children: /* @__PURE__ */ jsx("span", {
118
+ className: style_default.LiteralNumeric,
119
+ children: JSON.stringify(type.literal)
120
+ })
121
+ });
122
+ case "boolean": return /* @__PURE__ */ jsx("span", {
123
+ className: style_default.Type,
124
+ children: /* @__PURE__ */ jsx("span", {
125
+ className: style_default.LiteralBoolean,
126
+ children: JSON.stringify(type.literal)
127
+ })
128
+ });
129
+ }
130
+ break;
131
+ case "RubyTypeArray": return /* @__PURE__ */ jsxs("span", {
132
+ className: style_default.Type,
133
+ children: [
134
+ /* @__PURE__ */ jsx("span", {
135
+ className: style_default.TypeArray,
136
+ children: "Array["
137
+ }),
138
+ /* @__PURE__ */ jsx(Lang.Type, { type: type.elementType }),
139
+ /* @__PURE__ */ jsx("span", {
140
+ className: style_default.TypeArray,
141
+ children: "]"
142
+ })
143
+ ]
144
+ });
145
+ case "RubyTypeMap": return /* @__PURE__ */ jsxs("span", {
146
+ className: style_default.Type,
147
+ children: [
148
+ /* @__PURE__ */ jsx("span", {
149
+ className: style_default.TypeArray,
150
+ children: "Hash["
151
+ }),
152
+ type.indexType.kind === "RubyTypeString" ? /* @__PURE__ */ jsx("span", {
153
+ className: style_default.TypeString,
154
+ children: "Symbol"
155
+ }) : /* @__PURE__ */ jsx(Lang.Type, { type: type.indexType }),
156
+ ", ",
157
+ /* @__PURE__ */ jsx(Lang.Type, { type: type.itemType }),
158
+ /* @__PURE__ */ jsx("span", {
159
+ className: style_default.TypeArray,
160
+ children: "]"
161
+ })
162
+ ]
163
+ });
164
+ case "RubyTypeReference": {
165
+ const name = type.ident.split(".").at(-1);
166
+ if (!type.typeParameters || type.typeParameters.length === 0) return /* @__PURE__ */ jsxs("span", {
167
+ className: style_default.Type,
168
+ children: [/* @__PURE__ */ jsx(SDKReference, {
169
+ stainlessPath: type.$ref,
170
+ children: name
171
+ }), /* @__PURE__ */ jsx(TypePreview, { path: type.$ref })]
172
+ });
173
+ const typeParameters = type.typeParameters.map((t, i) => /* @__PURE__ */ jsx(Lang.Type, { type: t }, i));
174
+ return /* @__PURE__ */ jsxs("span", {
175
+ className: style_default.Type,
176
+ children: [
177
+ /* @__PURE__ */ jsx(SDKReference, {
178
+ stainlessPath: type.$ref,
179
+ children: name
180
+ }),
181
+ /* @__PURE__ */ jsx("span", {
182
+ className: style_default.TypeBracket,
183
+ children: "<"
184
+ }),
185
+ /* @__PURE__ */ jsx(Join, {
186
+ items: typeParameters,
187
+ children: /* @__PURE__ */ jsx("span", {
188
+ className: style_default.TextOperator,
189
+ children: ", "
190
+ })
191
+ }),
192
+ /* @__PURE__ */ jsx("span", {
193
+ className: style_default.TypeBracket,
194
+ children: ">"
195
+ }),
196
+ /* @__PURE__ */ jsx(TypePreview, { path: type.$ref })
197
+ ]
198
+ });
199
+ }
200
+ case "RubyTypeIntersection":
201
+ case "RubyTypeUnion": {
202
+ const items = type.types.map((t, key) => /* @__PURE__ */ jsx(Lang.Type, { type: t }, key));
203
+ const delimiter = type.kind === "RubyTypeUnion" ? "|" : "&";
204
+ return /* @__PURE__ */ jsx("span", {
205
+ className: style_default.Type,
206
+ children: /* @__PURE__ */ jsx("span", {
207
+ className: style_default.TypePreview,
208
+ "data-stldocs-type-preview": "union",
209
+ children: /* @__PURE__ */ jsx("span", {
210
+ className: style_default.TypePreviewContent,
211
+ children: /* @__PURE__ */ jsx(Join, {
212
+ items,
213
+ limit: 3,
214
+ children: /* @__PURE__ */ jsxs("span", {
215
+ className: style_default.TextOperator,
216
+ children: [
217
+ " ",
218
+ delimiter,
219
+ " "
220
+ ]
221
+ })
222
+ })
223
+ })
224
+ })
225
+ });
226
+ }
227
+ case "RubyTypeBuiltinClass": return /* @__PURE__ */ jsx("span", {
228
+ className: style_default.TypeReference,
229
+ children: type.className
230
+ });
231
+ case "RubyTypeObject": {
232
+ const items = type.members.map((prop, key) => /* @__PURE__ */ jsx("span", {
233
+ className: style_default.TextIdentifier,
234
+ children: prop.ident
235
+ }, key));
236
+ return /* @__PURE__ */ jsx("span", {
237
+ className: style_default.Type,
238
+ children: /* @__PURE__ */ jsx("span", {
239
+ className: style_default.TypePreview,
240
+ "data-stldocs-type-preview": "properties",
241
+ children: /* @__PURE__ */ jsxs("span", {
242
+ className: style_default.TypePreviewContent,
243
+ children: [
244
+ /* @__PURE__ */ jsx("span", {
245
+ className: style_default.TypeBrace,
246
+ children: "{ "
247
+ }),
248
+ /* @__PURE__ */ jsx(Join, {
249
+ items,
250
+ limit: 3,
251
+ children: /* @__PURE__ */ jsx("span", {
252
+ className: style_default.TextOperator,
253
+ children: ", "
254
+ })
255
+ }),
256
+ /* @__PURE__ */ jsx("span", {
257
+ className: style_default.TypeBrace,
258
+ children: "}"
259
+ })
260
+ ]
261
+ })
262
+ })
263
+ });
264
+ }
265
+ }
266
+ }
267
+ function MethodSignature({ decl }) {
268
+ const Lang = useLanguageComponents();
269
+ const { Join } = useComponents();
270
+ const params = decl.args.map((param, i) => /* @__PURE__ */ jsx(React$1.Fragment, { children: /* @__PURE__ */ jsx("span", {
271
+ className: style_default.TextIdentifier,
272
+ children: param.ident
273
+ }) }, i));
274
+ return /* @__PURE__ */ jsx("div", {
275
+ className: style_default.MethodSignature,
276
+ children: /* @__PURE__ */ jsxs("span", {
277
+ className: style_default.SignatureTitle,
278
+ children: [
279
+ /* @__PURE__ */ jsx("span", {
280
+ className: style_default.SignatureQualified,
281
+ children: /* @__PURE__ */ jsx("span", {
282
+ className: style_default.TextIdentifier,
283
+ children: decl.qualified?.slice(0, -decl.ident.length)
284
+ })
285
+ }),
286
+ /* @__PURE__ */ jsx("span", {
287
+ className: style_default.SignatureName,
288
+ children: /* @__PURE__ */ jsx("span", {
289
+ className: style_default.TextIdentifier,
290
+ children: decl.ident
291
+ })
292
+ }),
293
+ /* @__PURE__ */ jsxs("span", {
294
+ className: style_default.MethodSignature,
295
+ children: [
296
+ /* @__PURE__ */ jsx("span", {
297
+ className: style_default.SignatureParen,
298
+ children: "("
299
+ }),
300
+ /* @__PURE__ */ jsx("span", {
301
+ className: style_default.SignatureParams,
302
+ children: /* @__PURE__ */ jsx(Join, {
303
+ items: params,
304
+ children: /* @__PURE__ */ jsx("span", {
305
+ className: style_default.TextOperator,
306
+ children: ", "
307
+ })
308
+ })
309
+ }),
310
+ /* @__PURE__ */ jsx("span", {
311
+ className: style_default.SignatureParen,
312
+ children: ")"
313
+ }),
314
+ " -> ",
315
+ decl.returns ? /* @__PURE__ */ jsx(Lang.Type, { type: decl.returns }) : "void"
316
+ ]
317
+ })
318
+ ]
319
+ })
320
+ });
321
+ }
322
+ function Property({ decl, children }) {
323
+ const Lang = useLanguageComponents();
324
+ switch (decl.kind) {
325
+ case "RubyDeclProperty": return children({
326
+ name: decl.ident,
327
+ typeName: /* @__PURE__ */ jsx(Lang.TypeName, { type: decl.type }),
328
+ type: decl.type.kind in ComplexTypes && /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
329
+ });
330
+ case "RubyDeclTypeAlias": return children({
331
+ name: decl.ident,
332
+ typeName: "alias",
333
+ type: /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
334
+ });
335
+ case "RubyDeclReference": return children({ type: /* @__PURE__ */ jsx(Lang.Type, { type: decl.type }) });
336
+ case "RubyDeclClass": return children({
337
+ name: decl.ident,
338
+ typeName: "class"
339
+ });
340
+ }
341
+ }
342
+ function Declaration({ decl }) {
343
+ const Lang = useLanguageComponents();
344
+ if (!decl) return;
345
+ switch (decl.kind) {
346
+ case "RubyDeclProperty": return /* @__PURE__ */ jsxs(Fragment$1, { children: [
347
+ /* @__PURE__ */ jsx("span", {
348
+ className: style_default.TypePropertyName,
349
+ children: /* @__PURE__ */ jsx("span", {
350
+ className: style_default.TextIdentifier,
351
+ children: decl.ident
352
+ })
353
+ }),
354
+ /* @__PURE__ */ jsx("span", {
355
+ className: style_default.TextPunctuation,
356
+ children: ": "
357
+ }),
358
+ /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
359
+ ] });
360
+ case "RubyDeclTypeAlias": return /* @__PURE__ */ jsxs(Fragment$1, { children: [
361
+ /* @__PURE__ */ jsx("span", {
362
+ className: style_default.TextIdentifier,
363
+ children: decl.ident
364
+ }),
365
+ /* @__PURE__ */ jsx("span", {
366
+ className: style_default.TextOperator,
367
+ children: " = "
368
+ }),
369
+ /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
370
+ ] });
371
+ case "RubyDeclClass": return /* @__PURE__ */ jsxs(Fragment$1, { children: [
372
+ /* @__PURE__ */ jsx("span", {
373
+ className: style_default.TextKeyword,
374
+ children: "class "
375
+ }),
376
+ /* @__PURE__ */ jsx("span", {
377
+ className: style_default.TextIdentifier,
378
+ children: decl.ident
379
+ }),
380
+ /* @__PURE__ */ jsx(TypePreview, { path: decl.stainlessPath })
381
+ ] });
382
+ case "RubyDeclReference": return /* @__PURE__ */ jsx(Lang.Type, { type: decl.type });
383
+ }
384
+ }
385
+
386
+ //#endregion
387
+ export { TypeName as a, Type as i, MethodSignature as n, ruby_exports as o, Property as r, Declaration as t };
@@ -0,0 +1,118 @@
1
+ import { l as Method, m as SnippetLanguage, o as ID, u as Model } from "./index-Ct7H30x1.js";
2
+ import { t as DocsLanguage } from "./routing-sjrF8U7O.js";
3
+ import * as React$1 from "react";
4
+ import * as react_jsx_runtime59 from "react/jsx-runtime";
5
+
6
+ //#region src/components/sdk.d.ts
7
+ type PropertyModelContextType = {
8
+ modelPath?: string;
9
+ propertyPath?: string;
10
+ };
11
+ declare const PropertyModelContext: React$1.Context<PropertyModelContextType>;
12
+ declare function usePropertyModel(): PropertyModelContextType;
13
+ type ReferenceNestingContextType = string[];
14
+ declare const ReferenceNestingContext: React$1.Context<ReferenceNestingContextType>;
15
+ declare function useReferenceNesting(): ReferenceNestingContextType;
16
+ type SDKSnippetLanguagesType = Record<SnippetLanguage, {
17
+ name: string;
18
+ }>;
19
+ declare const SDKSnippetLanguages: SDKSnippetLanguagesType;
20
+ type TransformRequestSnippetFn = ({
21
+ snippet,
22
+ language
23
+ }: {
24
+ snippet: string;
25
+ language: DocsLanguage;
26
+ }) => string;
27
+ type SDKChildrenProps = {
28
+ paths: ID[];
29
+ expand?: boolean;
30
+ depth?: number;
31
+ };
32
+ declare function SDKChildren({
33
+ paths,
34
+ expand,
35
+ depth
36
+ }: SDKChildrenProps): react_jsx_runtime59.JSX.Element;
37
+ type SDKDeclarationProps = {
38
+ path: string;
39
+ expand?: boolean;
40
+ depth?: number;
41
+ };
42
+ declare function SDKDeclaration({
43
+ path,
44
+ expand,
45
+ depth
46
+ }: SDKDeclarationProps): react_jsx_runtime59.JSX.Element;
47
+ type SDKConstraintsProps = {
48
+ constraints?: Record<string, any>;
49
+ };
50
+ declare function SDKConstraints({
51
+ constraints
52
+ }: SDKConstraintsProps): react_jsx_runtime59.JSX.Element | undefined;
53
+ type SDKIconProps = {
54
+ language: SnippetLanguage;
55
+ size?: number;
56
+ };
57
+ declare function SDKIcon({
58
+ language
59
+ }: SDKIconProps): react_jsx_runtime59.JSX.Element | null;
60
+ type SDKRequestTitleProps = {
61
+ snippetLanguage: SnippetLanguage;
62
+ };
63
+ declare function SDKRequestTitle({
64
+ snippetLanguage
65
+ }: SDKRequestTitleProps): react_jsx_runtime59.JSX.Element;
66
+ type SDKExampleProps = {
67
+ method: Method;
68
+ transformRequestSnippet?: TransformRequestSnippetFn;
69
+ };
70
+ declare function SDKExample({
71
+ method,
72
+ transformRequestSnippet
73
+ }: SDKExampleProps): react_jsx_runtime59.JSX.Element;
74
+ type SDKMethodProps = {
75
+ method: Method;
76
+ transformRequestSnippet?: TransformRequestSnippetFn;
77
+ };
78
+ declare function SDKMethodHeader({
79
+ method
80
+ }: SDKMethodProps): react_jsx_runtime59.JSX.Element;
81
+ declare function SDKMethodInfo({
82
+ method
83
+ }: SDKMethodProps): react_jsx_runtime59.JSX.Element;
84
+ declare function SDKMethod({
85
+ method,
86
+ transformRequestSnippet
87
+ }: SDKMethodProps): react_jsx_runtime59.JSX.Element;
88
+ type SDKModelProps = {
89
+ model: Model;
90
+ };
91
+ declare function SDKModel({
92
+ model
93
+ }: SDKModelProps): react_jsx_runtime59.JSX.Element | null;
94
+ type SDKReferenceProps = {
95
+ stainlessPath: string;
96
+ children?: React$1.ReactNode;
97
+ };
98
+ declare function SDKReference({
99
+ stainlessPath,
100
+ children
101
+ }: SDKReferenceProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime59.JSX.Element | null | undefined;
102
+ type SDKLanguageBlockProps = {
103
+ language: DocsLanguage;
104
+ version: string;
105
+ install: string;
106
+ links: {
107
+ repo: string;
108
+ docs: string;
109
+ };
110
+ };
111
+ declare function SDKLanguageBlock({
112
+ language,
113
+ version,
114
+ install,
115
+ links
116
+ }: SDKLanguageBlockProps): react_jsx_runtime59.JSX.Element;
117
+ //#endregion
118
+ export { TransformRequestSnippetFn as C, SDKSnippetLanguagesType as S, useReferenceNesting as T, SDKModelProps as _, SDKChildren as a, SDKRequestTitleProps as b, SDKDeclaration as c, SDKLanguageBlock as d, SDKMethod as f, SDKModel as g, SDKMethodProps as h, ReferenceNestingContextType as i, SDKExample as l, SDKMethodInfo as m, PropertyModelContextType as n, SDKConstraints as o, SDKMethodHeader as p, ReferenceNestingContext as r, SDKConstraintsProps as s, PropertyModelContext as t, SDKIcon as u, SDKReference as v, usePropertyModel as w, SDKSnippetLanguages as x, SDKRequestTitle as y };
@@ -0,0 +1,118 @@
1
+ import { l as Method, m as SnippetLanguage, o as ID, u as Model } from "./index-Ct7H30x1.js";
2
+ import { t as DocsLanguage } from "./routing-sjrF8U7O.js";
3
+ import * as React$1 from "react";
4
+ import * as react_jsx_runtime36 from "react/jsx-runtime";
5
+
6
+ //#region src/components/sdk.d.ts
7
+ type PropertyModelContextType = {
8
+ modelPath?: string;
9
+ propertyPath?: string;
10
+ };
11
+ declare const PropertyModelContext: React$1.Context<PropertyModelContextType>;
12
+ declare function usePropertyModel(): PropertyModelContextType;
13
+ type ReferenceNestingContextType = string[];
14
+ declare const ReferenceNestingContext: React$1.Context<ReferenceNestingContextType>;
15
+ declare function useReferenceNesting(): ReferenceNestingContextType;
16
+ type SDKSnippetLanguagesType = Record<SnippetLanguage, {
17
+ name: string;
18
+ }>;
19
+ declare const SDKSnippetLanguages: SDKSnippetLanguagesType;
20
+ type TransformRequestSnippetFn = ({
21
+ snippet,
22
+ language
23
+ }: {
24
+ snippet: string;
25
+ language: DocsLanguage;
26
+ }) => string;
27
+ type SDKChildrenProps = {
28
+ paths: ID[];
29
+ expand?: boolean;
30
+ depth?: number;
31
+ };
32
+ declare function SDKChildren({
33
+ paths,
34
+ expand,
35
+ depth
36
+ }: SDKChildrenProps): react_jsx_runtime36.JSX.Element;
37
+ type SDKDeclarationProps = {
38
+ path: string;
39
+ expand?: boolean;
40
+ depth?: number;
41
+ };
42
+ declare function SDKDeclaration({
43
+ path,
44
+ expand,
45
+ depth
46
+ }: SDKDeclarationProps): react_jsx_runtime36.JSX.Element;
47
+ type SDKConstraintsProps = {
48
+ constraints?: Record<string, any>;
49
+ };
50
+ declare function SDKConstraints({
51
+ constraints
52
+ }: SDKConstraintsProps): react_jsx_runtime36.JSX.Element | undefined;
53
+ type SDKIconProps = {
54
+ language: SnippetLanguage;
55
+ size?: number;
56
+ };
57
+ declare function SDKIcon({
58
+ language
59
+ }: SDKIconProps): react_jsx_runtime36.JSX.Element | null;
60
+ type SDKRequestTitleProps = {
61
+ snippetLanguage: SnippetLanguage;
62
+ };
63
+ declare function SDKRequestTitle({
64
+ snippetLanguage
65
+ }: SDKRequestTitleProps): react_jsx_runtime36.JSX.Element;
66
+ type SDKExampleProps = {
67
+ method: Method;
68
+ transformRequestSnippet?: TransformRequestSnippetFn;
69
+ };
70
+ declare function SDKExample({
71
+ method,
72
+ transformRequestSnippet
73
+ }: SDKExampleProps): react_jsx_runtime36.JSX.Element;
74
+ type SDKMethodProps = {
75
+ method: Method;
76
+ transformRequestSnippet?: TransformRequestSnippetFn;
77
+ };
78
+ declare function SDKMethodHeader({
79
+ method
80
+ }: SDKMethodProps): react_jsx_runtime36.JSX.Element;
81
+ declare function SDKMethodInfo({
82
+ method
83
+ }: SDKMethodProps): react_jsx_runtime36.JSX.Element;
84
+ declare function SDKMethod({
85
+ method,
86
+ transformRequestSnippet
87
+ }: SDKMethodProps): react_jsx_runtime36.JSX.Element;
88
+ type SDKModelProps = {
89
+ model: Model;
90
+ };
91
+ declare function SDKModel({
92
+ model
93
+ }: SDKModelProps): react_jsx_runtime36.JSX.Element | null;
94
+ type SDKReferenceProps = {
95
+ stainlessPath: string;
96
+ children?: React$1.ReactNode;
97
+ };
98
+ declare function SDKReference({
99
+ stainlessPath,
100
+ children
101
+ }: SDKReferenceProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime36.JSX.Element | null | undefined;
102
+ type SDKLanguageBlockProps = {
103
+ language: DocsLanguage;
104
+ version: string;
105
+ install: string;
106
+ links: {
107
+ repo: string;
108
+ docs: string;
109
+ };
110
+ };
111
+ declare function SDKLanguageBlock({
112
+ language,
113
+ version,
114
+ install,
115
+ links
116
+ }: SDKLanguageBlockProps): react_jsx_runtime36.JSX.Element;
117
+ //#endregion
118
+ export { TransformRequestSnippetFn as C, SDKSnippetLanguagesType as S, useReferenceNesting as T, SDKModelProps as _, SDKChildren as a, SDKRequestTitleProps as b, SDKDeclaration as c, SDKLanguageBlock as d, SDKMethod as f, SDKModel as g, SDKMethodProps as h, ReferenceNestingContextType as i, SDKExample as l, SDKMethodInfo as m, PropertyModelContextType as n, SDKConstraints as o, SDKMethodHeader as p, ReferenceNestingContext as r, SDKConstraintsProps as s, PropertyModelContext as t, SDKIcon as u, SDKReference as v, usePropertyModel as w, SDKSnippetLanguages as x, SDKRequestTitle as y };