@stainless-api/docs-ui 0.1.0-beta.72 → 0.1.0-beta.74

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 (135) hide show
  1. package/dist/{chunk-BN_g-Awi.js → chunk-BYypO7fO.js} +3 -3
  2. package/dist/components/MaskedInput.d.ts +1 -1
  3. package/dist/components/MaskedInput.js +1 -1
  4. package/dist/components/breadcrumbs.d.ts +24 -1
  5. package/dist/components/breadcrumbs.js +62 -7
  6. package/dist/components/icons.d.ts +12 -12
  7. package/dist/components/icons.js +883 -1
  8. package/dist/components/index.d.ts +16 -14
  9. package/dist/components/index.js +72 -18
  10. package/dist/components/method.d.ts +58 -1
  11. package/dist/components/method.js +95 -8
  12. package/dist/components/overview.d.ts +38 -1
  13. package/dist/components/overview.js +137 -9
  14. package/dist/components/primitives.d.ts +104 -1
  15. package/dist/components/primitives.js +250 -6
  16. package/dist/components/properties.d.ts +53 -1
  17. package/dist/components/properties.js +138 -7
  18. package/dist/components/sdk-sidebar.d.ts +14 -1
  19. package/dist/components/sdk-sidebar.js +50 -8
  20. package/dist/components/sdk.d.ts +121 -1
  21. package/dist/components/sdk.js +404 -8
  22. package/dist/components/snippets.d.ts +70 -13
  23. package/dist/components/snippets.js +182 -7
  24. package/dist/components/stl-sidebar.d.ts +57 -1
  25. package/dist/components/stl-sidebar.js +105 -3
  26. package/dist/contexts/component-generics.d.ts +29 -1
  27. package/dist/contexts/component-generics.js +31 -1
  28. package/dist/contexts/component-types.d.ts +4 -15
  29. package/dist/contexts/component.d.ts +7 -17
  30. package/dist/contexts/component.js +22 -28
  31. package/dist/contexts/docs.d.ts +61 -1
  32. package/dist/contexts/docs.js +89 -1
  33. package/dist/contexts/index.d.ts +13 -14
  34. package/dist/contexts/index.js +44 -6
  35. package/dist/contexts/markdown.d.ts +21 -1
  36. package/dist/contexts/markdown.js +47 -2
  37. package/dist/contexts/navigation.d.ts +28 -1
  38. package/dist/contexts/navigation.js +22 -1
  39. package/dist/contexts/use-components.d.ts +1 -13
  40. package/dist/contexts/use-components.js +6 -2
  41. package/dist/{index-W4Td2Hl7.d.ts → index-PdnFhQF9.d.ts} +1 -1
  42. package/dist/index.d.ts +4 -14
  43. package/dist/index.js +7 -30
  44. package/dist/languages/cli.d.ts +38 -14
  45. package/dist/languages/cli.js +166 -20
  46. package/dist/languages/csharp.d.ts +42 -14
  47. package/dist/languages/csharp.js +283 -8
  48. package/dist/languages/go.d.ts +40 -14
  49. package/dist/languages/go.js +303 -8
  50. package/dist/languages/http.d.ts +46 -14
  51. package/dist/languages/http.js +390 -19
  52. package/dist/languages/index.d.ts +50 -14
  53. package/dist/languages/index.js +30 -28
  54. package/dist/languages/java.d.ts +43 -14
  55. package/dist/languages/java.js +403 -8
  56. package/dist/languages/python.d.ts +40 -14
  57. package/dist/languages/python.js +269 -8
  58. package/dist/languages/ruby.d.ts +40 -14
  59. package/dist/languages/ruby.js +387 -8
  60. package/dist/languages/terraform.d.ts +48 -14
  61. package/dist/languages/terraform.js +243 -8
  62. package/dist/languages/typescript.d.ts +40 -14
  63. package/dist/languages/typescript.js +449 -8
  64. package/dist/markdown/index.d.ts +1 -2
  65. package/dist/markdown/index.js +1 -28
  66. package/dist/markdown/printer.d.ts +2 -2
  67. package/dist/markdown/printer.js +6 -30
  68. package/dist/markdown/utils.d.ts +3 -3
  69. package/dist/routing.d.ts +61 -2
  70. package/dist/routing.js +204 -2
  71. package/dist/spec.d.ts +4 -4
  72. package/dist/spec.js +2 -2
  73. package/dist/style.js +176 -1
  74. package/dist/use-strict-context-L0c8JKg4.js +16 -0
  75. package/dist/utils.d.ts +1 -1
  76. package/dist/utils.js +53 -2
  77. package/package.json +3 -3
  78. package/dist/breadcrumbs-46Qjx1Pd.d.ts +0 -25
  79. package/dist/breadcrumbs-BZ4wBC9-.d.ts +0 -25
  80. package/dist/breadcrumbs-BiBfNqBI.js +0 -63
  81. package/dist/cli-hduQ5XS1.js +0 -166
  82. package/dist/component-BU8BTbqz.js +0 -23
  83. package/dist/component-generics-Bw4ZOyEG.d.ts +0 -30
  84. package/dist/component-generics-D-WarFUb.d.ts +0 -30
  85. package/dist/component-generics-POFirVVb.js +0 -45
  86. package/dist/components-9NMl1791.js +0 -72
  87. package/dist/contexts-_NNW5yqC.js +0 -44
  88. package/dist/csharp-sn5CJu9t.js +0 -283
  89. package/dist/docs-Cu9Yl6-y.d.ts +0 -66
  90. package/dist/docs-YgoQ3bzY.js +0 -81
  91. package/dist/docs-xb5wYGjM.d.ts +0 -66
  92. package/dist/go-BoaAVmP0.js +0 -303
  93. package/dist/http-B3qTyMc3.js +0 -389
  94. package/dist/icons-BYKn5X8E.js +0 -885
  95. package/dist/index-BOmn7DHa.d.ts +0 -428
  96. package/dist/index-BvcPmB0r.d.ts +0 -428
  97. package/dist/java-BiLRuLuD.js +0 -403
  98. package/dist/languages-vUhD5Hu_.js +0 -30
  99. package/dist/markdown-BszOPZhh.d.ts +0 -22
  100. package/dist/markdown-Cq3XEhrR.js +0 -49
  101. package/dist/markdown-plMAoN22.d.ts +0 -22
  102. package/dist/method-C4PgTWAu.d.ts +0 -59
  103. package/dist/method-D6R_farj.d.ts +0 -59
  104. package/dist/method-DjzVBzZe.js +0 -96
  105. package/dist/navigation-HiZWRl34.d.ts +0 -29
  106. package/dist/navigation-MrP4Ubbg.d.ts +0 -29
  107. package/dist/navigation-aoYZ_tl4.js +0 -24
  108. package/dist/overview-CTeKhpQq.d.ts +0 -39
  109. package/dist/overview-Yf1PTJNi.d.ts +0 -39
  110. package/dist/overview-ocTARt-j.js +0 -138
  111. package/dist/primitives-CNG-fEhQ.js +0 -250
  112. package/dist/primitives-K7NijV36.d.ts +0 -105
  113. package/dist/primitives-WGxdBJDS.d.ts +0 -105
  114. package/dist/properties-Bu4nW9JD.d.ts +0 -54
  115. package/dist/properties-Bynmj9_H.d.ts +0 -54
  116. package/dist/properties-DQU0NBzb.js +0 -138
  117. package/dist/python-nqOBH7GS.js +0 -269
  118. package/dist/routing-C64k4fmX.js +0 -205
  119. package/dist/routing-pAL4V4hv.d.ts +0 -61
  120. package/dist/ruby-BBc8HdIt.js +0 -387
  121. package/dist/sdk-BSdgEEJw.js +0 -405
  122. package/dist/sdk-BVCk1ox2.d.ts +0 -122
  123. package/dist/sdk-Dm0S-XQE.d.ts +0 -122
  124. package/dist/sdk-sidebar-B1ehT_xI.d.ts +0 -15
  125. package/dist/sdk-sidebar-BDn8S1xS.js +0 -50
  126. package/dist/sdk-sidebar-Dqeu7C1-.d.ts +0 -15
  127. package/dist/snippets-CLpNVNlA.js +0 -181
  128. package/dist/stl-sidebar-BTTErIJs.d.ts +0 -58
  129. package/dist/stl-sidebar-C7GNALtk.d.ts +0 -58
  130. package/dist/stl-sidebar-DC5UOJiT.js +0 -106
  131. package/dist/style-DJIYkFhO.js +0 -178
  132. package/dist/terraform-DVx2ea2h.js +0 -243
  133. package/dist/typescript-Cmk-jBBw.js +0 -449
  134. package/dist/use-components-BUz3GbO4.js +0 -7
  135. package/dist/utils-DPbkW1Tz.js +0 -54
@@ -1,20 +1,391 @@
1
- import "../docs-YgoQ3bzY.js";
2
- import "../component-generics-POFirVVb.js";
3
- import "../navigation-aoYZ_tl4.js";
4
- import "../markdown-Cq3XEhrR.js";
5
- import "../contexts-_NNW5yqC.js";
6
- import "../use-components-BUz3GbO4.js";
7
- import "../properties-DQU0NBzb.js";
8
- import "../method-DjzVBzZe.js";
9
- import "../primitives-CNG-fEhQ.js";
10
- import "../icons-BYKn5X8E.js";
11
- import "../sdk-BSdgEEJw.js";
12
- import "../snippets-CLpNVNlA.js";
13
- import "../overview-ocTARt-j.js";
14
- import "../breadcrumbs-BiBfNqBI.js";
15
- import "../stl-sidebar-DC5UOJiT.js";
16
- import "../sdk-sidebar-BDn8S1xS.js";
17
- import "../components-9NMl1791.js";
18
- import { a as Type, i as Property, n as MethodInfo, o as TypeName, r as MethodSignature, t as Declaration } from "../http-B3qTyMc3.js";
1
+ import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
+ import { useAvailableLanguages, useDeclaration, useLanguage, useSpec } from "../contexts/docs.js";
3
+ import "../use-strict-context-L0c8JKg4.js";
4
+ import { useNavigation } from "../contexts/navigation.js";
5
+ import { useLanguageComponents } from "../contexts/index.js";
6
+ import { useComponents } from "../contexts/use-components.js";
7
+ import style_default from "../style.js";
8
+ import { PropertyToggle } from "../components/properties.js";
9
+ import { LanguageNames, generateRoute } from "../routing.js";
10
+ import { useStreamingResponse } from "../components/sdk.js";
11
+ import { getBodyParams } from "../utils.js";
12
+ import "../components/index.js";
13
+ import React from "react";
14
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
15
+ import clsx from "clsx";
16
+ import { BracesIcon, FormIcon } from "lucide-react";
17
+ import { Badge } from "@stainless-api/ui-primitives";
19
18
 
20
- export { Declaration, MethodInfo, MethodSignature, Property, Type, TypeName };
19
+ //#region src/languages/http.tsx
20
+ var http_exports = /* @__PURE__ */ __exportAll({
21
+ Declaration: () => Declaration,
22
+ MethodInfo: () => MethodInfo,
23
+ MethodSignature: () => MethodSignature,
24
+ Property: () => Property,
25
+ Type: () => Type,
26
+ TypeName: () => TypeName
27
+ });
28
+ const ComplexTypes = {
29
+ HttpTypeUnion: "union",
30
+ HttpTypeIntersection: "intersection"
31
+ };
32
+ const constStyle = {
33
+ string: style_default.LiteralString,
34
+ number: style_default.LiteralNumeric,
35
+ boolean: style_default.LiteralBoolean
36
+ };
37
+ function Identifier({ name }) {
38
+ return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx("span", {
39
+ className: style_default.TextIdentifier,
40
+ children: /^[_a-zA-Z][_a-zA-Z0-9]*$/.test(name) ? name : JSON.stringify(name)
41
+ }) });
42
+ }
43
+ function TypePreview({ path }) {
44
+ const spec = useSpec();
45
+ const language = useLanguage();
46
+ const decl = useDeclaration(path, false);
47
+ const { Join } = useComponents();
48
+ if (!(decl && "children" in decl && decl.children && decl.children.length > 0) || "type" in decl && decl["type"] && "kind" in decl["type"] && decl["type"]["kind"] === "HttpTypeUnion") return;
49
+ const items = decl.children.map((prop, key) => {
50
+ const decl = spec?.decls?.[language]?.[prop];
51
+ const ident = decl && "key" in decl ? decl.key : decl && "ident" in decl ? decl.ident : null;
52
+ return /* @__PURE__ */ jsx("span", {
53
+ className: style_default.TypePropertyName,
54
+ children: /* @__PURE__ */ jsx("span", {
55
+ className: style_default.TextIdentifier,
56
+ children: ident
57
+ })
58
+ }, key);
59
+ });
60
+ return /* @__PURE__ */ jsxs("span", {
61
+ className: style_default.TypePreview,
62
+ "data-stldocs-type-preview": "properties",
63
+ children: [
64
+ /* @__PURE__ */ jsx("span", {
65
+ className: style_default.TypeBrace,
66
+ children: " { "
67
+ }),
68
+ /* @__PURE__ */ jsx("span", {
69
+ className: style_default.TypePreviewContent,
70
+ children: /* @__PURE__ */ jsx(Join, {
71
+ items,
72
+ limit: 3,
73
+ children: /* @__PURE__ */ jsx("span", {
74
+ className: style_default.TextOperator,
75
+ children: ", "
76
+ })
77
+ })
78
+ }),
79
+ /* @__PURE__ */ jsx("span", {
80
+ className: style_default.TypeBrace,
81
+ children: " } "
82
+ })
83
+ ]
84
+ });
85
+ }
86
+ function TypeName({ type }) {
87
+ const Lang = useLanguageComponents();
88
+ if (type.kind === "HttpTypeArray") return /* @__PURE__ */ jsxs(Fragment$1, { children: ["array of ", /* @__PURE__ */ jsx(Lang.TypeName, { type: type.elementType })] });
89
+ if (type.kind === "HttpTypeUnion" && type.types.every((t) => t.kind === "HttpTypeLiteral")) return "enum";
90
+ if (type.kind === "HttpTypeReference" && type.ident.split(".").at(-1) === "Record") return "map";
91
+ return ComplexTypes[type.kind] ?? /* @__PURE__ */ jsx(Lang.Type, { type });
92
+ }
93
+ function Type({ type }) {
94
+ const Lang = useLanguageComponents();
95
+ const { Join, SDKReference } = useComponents();
96
+ switch (type.kind) {
97
+ case "HttpTypeUnknown":
98
+ case "HttpTypeUndefined":
99
+ case "HttpTypeNull":
100
+ case "HttpTypeBoolean":
101
+ case "HttpTypeNumber":
102
+ case "HttpTypeString": return /* @__PURE__ */ jsx("span", {
103
+ className: style_default.Type,
104
+ children: /* @__PURE__ */ jsx("span", {
105
+ className: style_default.TypePlain,
106
+ children: type.kind.slice(8).toLowerCase()
107
+ })
108
+ });
109
+ case "HttpTypeBinary": return /* @__PURE__ */ jsx("span", {
110
+ className: style_default.Type,
111
+ children: /* @__PURE__ */ jsx("span", {
112
+ className: style_default.TypePlain,
113
+ children: "file"
114
+ })
115
+ });
116
+ case "HttpTypeLiteral": return /* @__PURE__ */ jsx("span", {
117
+ className: style_default.Type,
118
+ children: /* @__PURE__ */ jsx("span", {
119
+ className: constStyle[typeof type.literal],
120
+ children: JSON.stringify(type.literal)
121
+ })
122
+ });
123
+ case "HttpTypeArray": return /* @__PURE__ */ jsxs("span", {
124
+ className: style_default.Type,
125
+ children: [/* @__PURE__ */ jsx("span", {
126
+ className: style_default.TypeArray,
127
+ children: "array of "
128
+ }), /* @__PURE__ */ jsx(Lang.Type, { type: type.elementType })]
129
+ });
130
+ case "HttpTypeIntersection":
131
+ case "HttpTypeUnion": {
132
+ const items = type.types.map((t, key) => /* @__PURE__ */ jsx(Lang.Type, { type: t }, key));
133
+ const delimiter = type.kind === "HttpTypeUnion" ? "or" : "and";
134
+ return /* @__PURE__ */ jsx("span", {
135
+ className: style_default.Type,
136
+ children: /* @__PURE__ */ jsx("span", {
137
+ className: style_default.TypePreview,
138
+ "data-stldocs-type-preview": "union",
139
+ children: /* @__PURE__ */ jsx("span", {
140
+ className: style_default.TypePreviewContent,
141
+ children: /* @__PURE__ */ jsx(Join, {
142
+ items,
143
+ limit: 3,
144
+ children: /* @__PURE__ */ jsxs("span", {
145
+ className: style_default.TextOperator,
146
+ children: [
147
+ " ",
148
+ delimiter,
149
+ " "
150
+ ]
151
+ })
152
+ })
153
+ })
154
+ })
155
+ });
156
+ }
157
+ case "HttpTypeReference": {
158
+ const name = type.ident.split(".").at(-1);
159
+ const params = type.typeParameters?.map((param, key) => /* @__PURE__ */ jsx(Lang.Type, { type: param }, key));
160
+ if (name === "Record" && type.typeParameters?.length === 2 && type.typeParameters?.at(0).kind === "HttpTypeString") return /* @__PURE__ */ jsxs(Fragment$1, { children: [
161
+ /* @__PURE__ */ jsx("span", {
162
+ className: style_default.TypeArray,
163
+ children: "map"
164
+ }),
165
+ "[",
166
+ params?.[1],
167
+ "]"
168
+ ] });
169
+ return /* @__PURE__ */ jsxs("span", {
170
+ className: style_default.Type,
171
+ children: [
172
+ /* @__PURE__ */ jsx(SDKReference, {
173
+ stainlessPath: type.$ref,
174
+ children: name
175
+ }),
176
+ params && params.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [
177
+ /* @__PURE__ */ jsx("span", {
178
+ className: style_default.TypeBracket,
179
+ children: "<"
180
+ }),
181
+ /* @__PURE__ */ jsx(Join, {
182
+ items: params,
183
+ limit: 3,
184
+ children: /* @__PURE__ */ jsx("span", {
185
+ className: style_default.TextOperator,
186
+ children: ", "
187
+ })
188
+ }),
189
+ /* @__PURE__ */ jsx("span", {
190
+ className: style_default.TypeBracket,
191
+ children: ">"
192
+ })
193
+ ] }),
194
+ /* @__PURE__ */ jsx(TypePreview, { path: type.$ref })
195
+ ]
196
+ });
197
+ }
198
+ case "HttpTypeObject": {
199
+ const items = type.members.map(({ ident }) => /* @__PURE__ */ jsx("span", {
200
+ className: style_default.TypePropertyName,
201
+ children: /* @__PURE__ */ jsx(Identifier, { name: ident })
202
+ }, ident));
203
+ return /* @__PURE__ */ jsxs("span", {
204
+ className: style_default.Type,
205
+ children: [/* @__PURE__ */ jsx("span", {
206
+ className: style_default.TypePlain,
207
+ children: "object"
208
+ }), /* @__PURE__ */ jsxs("span", {
209
+ className: style_default.TypePreview,
210
+ "data-stldocs-type-preview": "properties",
211
+ children: [
212
+ /* @__PURE__ */ jsx("span", {
213
+ className: style_default.TypeBrace,
214
+ children: " {"
215
+ }),
216
+ /* @__PURE__ */ jsxs("span", {
217
+ className: style_default.TypePreviewContent,
218
+ children: [
219
+ " ",
220
+ /* @__PURE__ */ jsx(Join, {
221
+ items,
222
+ limit: 3,
223
+ children: /* @__PURE__ */ jsx("span", {
224
+ className: style_default.TextOperator,
225
+ children: ", "
226
+ })
227
+ }),
228
+ " "
229
+ ]
230
+ }),
231
+ /* @__PURE__ */ jsx("span", {
232
+ className: style_default.TypeBrace,
233
+ children: "} "
234
+ })
235
+ ]
236
+ })]
237
+ });
238
+ }
239
+ default: return /* @__PURE__ */ jsx("span", {
240
+ className: style_default.Type,
241
+ children: /* @__PURE__ */ jsx("span", {
242
+ className: style_default.TypePlain,
243
+ children: "unknown"
244
+ })
245
+ });
246
+ }
247
+ }
248
+ function MethodSignature({ decl }) {
249
+ return null;
250
+ }
251
+ const EncodingBadges = {
252
+ unknown: null,
253
+ json: /* @__PURE__ */ jsx(Badge, {
254
+ size: "sm",
255
+ icon: /* @__PURE__ */ jsx(BracesIcon, {}),
256
+ children: "JSON"
257
+ }),
258
+ "form-data": /* @__PURE__ */ jsx(Badge, {
259
+ size: "sm",
260
+ icon: /* @__PURE__ */ jsx(FormIcon, {}),
261
+ children: "Form Data"
262
+ })
263
+ };
264
+ function MethodInfo({ decl, children }) {
265
+ const Docs = useComponents();
266
+ const streamingResponse = useStreamingResponse(decl);
267
+ const implementedLanguages = useAvailableLanguages(decl.stainlessPath);
268
+ const { basePath } = useNavigation();
269
+ const params = Object.entries(decl.paramsChildren).filter(([, value]) => value.length).map(([location, value]) => /* @__PURE__ */ jsx(React.Fragment, { children: /* @__PURE__ */ jsxs("div", {
270
+ className: style_default.MethodParameters,
271
+ "data-stldocs-property-group": location.at(0),
272
+ children: [/* @__PURE__ */ jsxs("h5", { children: [
273
+ location.at(0).toUpperCase(),
274
+ location.slice(1),
275
+ " Parameters",
276
+ /* @__PURE__ */ jsx(PropertyToggle, { target: location.at(0) })
277
+ ] }), /* @__PURE__ */ jsx(Docs.SDKChildren, { paths: value })]
278
+ }) }, location));
279
+ const bodyParams = getBodyParams(decl);
280
+ if (bodyParams && bodyParams.params.length > 0) params.push(/* @__PURE__ */ jsxs("div", {
281
+ className: style_default.MethodInfoSection,
282
+ children: [/* @__PURE__ */ jsxs("h5", { children: [/* @__PURE__ */ jsxs("span", { children: ["Body Parameters", EncodingBadges[bodyParams.encoding]] }), /* @__PURE__ */ jsx(PropertyToggle, { target: "body" })] }), /* @__PURE__ */ jsx("div", {
283
+ className: style_default.MethodParameters,
284
+ "data-stldocs-property-group": "body",
285
+ children: /* @__PURE__ */ jsx(Docs.SDKChildren, { paths: bodyParams.params })
286
+ })]
287
+ }, "method-info-section"));
288
+ const responseChildren = "responseChildren" in decl && decl.responseChildren && decl.responseChildren.length > 0 ? [...decl.responseChildren] : [];
289
+ if (streamingResponse) responseChildren.push(streamingResponse);
290
+ if (params.length === 0 && responseChildren.length === 0) {
291
+ const availableLanguageLinks = implementedLanguages.filter((lang) => lang !== "http").flatMap((lang) => {
292
+ const url = generateRoute(basePath ?? "/", lang, decl.stainlessPath);
293
+ return url ? [{
294
+ url,
295
+ label: LanguageNames[lang] ?? lang
296
+ }] : [];
297
+ });
298
+ return /* @__PURE__ */ jsxs("div", {
299
+ className: style_default.MethodInfo,
300
+ children: [children, implementedLanguages.length > 0 && /* @__PURE__ */ jsxs("div", {
301
+ className: clsx("stl-ui-prose", style_default.MethodAvailableLanguages),
302
+ children: [/* @__PURE__ */ jsx("h5", { children: "Supported Languages" }), /* @__PURE__ */ jsxs("div", {
303
+ className: style_default.MethodAvailableLanguages,
304
+ children: ["This method is available in:", /* @__PURE__ */ jsx("ul", { children: availableLanguageLinks.map(({ url, label }) => {
305
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", {
306
+ href: url,
307
+ children: label
308
+ }) }, url);
309
+ }) })]
310
+ })]
311
+ })]
312
+ });
313
+ }
314
+ return /* @__PURE__ */ jsxs("div", {
315
+ className: style_default.MethodInfo,
316
+ children: [
317
+ children && /* @__PURE__ */ jsx("div", {
318
+ className: style_default.MethodContent,
319
+ children
320
+ }),
321
+ params.length > 0 && params,
322
+ responseChildren.length > 0 && /* @__PURE__ */ jsxs("div", {
323
+ className: style_default.MethodInfoSection,
324
+ children: [/* @__PURE__ */ jsxs("h5", { children: ["Returns", /* @__PURE__ */ jsx(PropertyToggle, { target: "returns" })] }), /* @__PURE__ */ jsx("div", {
325
+ className: style_default.MethodReturns,
326
+ "data-stldocs-property-group": "returns",
327
+ children: /* @__PURE__ */ jsx(Docs.SDKChildren, { paths: responseChildren })
328
+ })]
329
+ })
330
+ ]
331
+ });
332
+ }
333
+ function renderVariantInfo(type) {
334
+ if (type.kind === "HttpTypeUnion" && type.types.every((t) => t.kind === "HttpTypeObject" || t.kind === "HttpTypeReference")) return /* @__PURE__ */ jsxs(Fragment$1, { children: [
335
+ "One of the following ",
336
+ type.types.length,
337
+ " object variants:"
338
+ ] });
339
+ }
340
+ function Property({ decl, children }) {
341
+ const Lang = useLanguageComponents();
342
+ if (!decl) return;
343
+ switch (decl.kind) {
344
+ case "HttpDeclProperty": {
345
+ const variants = renderVariantInfo(decl.type);
346
+ return children({
347
+ name: decl.key,
348
+ typeName: /* @__PURE__ */ jsx(Lang.TypeName, { type: decl.type }),
349
+ type: decl.type.kind in ComplexTypes && !variants && /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
350
+ });
351
+ }
352
+ case "HttpDeclTypeAlias": return children({
353
+ name: decl.ident,
354
+ typeName: /* @__PURE__ */ jsx(Lang.TypeName, { type: decl.type })
355
+ });
356
+ case "HttpDeclReference": return children({ type: /* @__PURE__ */ jsx(Lang.Type, { type: decl.type }) });
357
+ }
358
+ }
359
+ function Declaration({ decl }) {
360
+ const Lang = useLanguageComponents();
361
+ if (!decl) return;
362
+ switch (decl.kind) {
363
+ case "HttpDeclProperty": return /* @__PURE__ */ jsxs(Fragment$1, { children: [
364
+ /* @__PURE__ */ jsx("span", {
365
+ className: style_default.TypePropertyName,
366
+ children: /* @__PURE__ */ jsx(Identifier, { name: decl.key })
367
+ }),
368
+ /* @__PURE__ */ jsx("span", {
369
+ className: style_default.TextPunctuation,
370
+ children: ": "
371
+ }),
372
+ decl.optional && /* @__PURE__ */ jsx("span", {
373
+ className: style_default.TextPunctuation,
374
+ children: "optional "
375
+ }),
376
+ /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
377
+ ] });
378
+ case "HttpDeclTypeAlias": return /* @__PURE__ */ jsxs(Fragment$1, { children: [
379
+ /* @__PURE__ */ jsx(Identifier, { name: decl.ident }),
380
+ /* @__PURE__ */ jsx("span", {
381
+ className: style_default.TextOperator,
382
+ children: " = "
383
+ }),
384
+ /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
385
+ ] });
386
+ case "HttpDeclReference": return /* @__PURE__ */ jsx(Lang.Type, { type: decl.type });
387
+ }
388
+ }
389
+
390
+ //#endregion
391
+ export { Declaration, MethodInfo, MethodSignature, Property, Type, TypeName, http_exports as t };
@@ -1,14 +1,50 @@
1
- import "../primitives-WGxdBJDS.js";
2
- import "../breadcrumbs-46Qjx1Pd.js";
3
- import "../method-D6R_farj.js";
4
- import "../properties-Bu4nW9JD.js";
5
- import "../sdk-Dm0S-XQE.js";
6
- import { $t as typescript_d_exports, Ft as go_d_exports, H as cli_d_exports, N as terraform_d_exports, Tt as python_d_exports, Wt as java_d_exports, Z as csharp_d_exports, _ as LanguageComponentDefinition, b as kotlin, gt as ruby_d_exports, st as http_d_exports, v as PropertyFn, x as node } from "../index-BOmn7DHa.js";
7
- import "../navigation-HiZWRl34.js";
8
- import "../markdown-plMAoN22.js";
9
- import "../component-generics-Bw4ZOyEG.js";
10
- import "../docs-xb5wYGjM.js";
11
- import "../overview-CTeKhpQq.js";
12
- import "../sdk-sidebar-Dqeu7C1-.js";
13
- import "../stl-sidebar-BTTErIJs.js";
14
- export { LanguageComponentDefinition, PropertyFn, cli_d_exports as cli, csharp_d_exports as csharp, go_d_exports as go, http_d_exports as http, java_d_exports as java, kotlin, node, python_d_exports as python, ruby_d_exports as ruby, terraform_d_exports as terraform, typescript_d_exports as typescript };
1
+ import { i as DeclarationNode, m as Resource, x as Type } from "../index-PdnFhQF9.js";
2
+ import { PropertyProps } from "../components/properties.js";
3
+ import { t as typescript_d_exports } from "./typescript.js";
4
+ import { t as java_d_exports } from "./java.js";
5
+ import { t as go_d_exports } from "./go.js";
6
+ import { t as python_d_exports } from "./python.js";
7
+ import { t as ruby_d_exports } from "./ruby.js";
8
+ import { t as http_d_exports } from "./http.js";
9
+ import { t as csharp_d_exports } from "./csharp.js";
10
+ import { t as cli_d_exports } from "./cli.js";
11
+ import { t as terraform_d_exports } from "./terraform.js";
12
+ import "../components/index.js";
13
+ import { ReactNode } from "react";
14
+
15
+ //#region src/languages/index.d.ts
16
+ declare namespace index_d_exports {
17
+ export { LanguageComponentDefinition, PropertyFn, cli_d_exports as cli, csharp_d_exports as csharp, go_d_exports as go, http_d_exports as http, java_d_exports as java, kotlin, node, python_d_exports as python, ruby_d_exports as ruby, terraform_d_exports as terraform, typescript_d_exports as typescript };
18
+ }
19
+ declare const node: typeof typescript_d_exports;
20
+ declare const kotlin: typeof java_d_exports;
21
+ type PropertyFn = (params: PropertyProps) => ReactNode;
22
+ interface LanguageComponentDefinition {
23
+ Declaration(props: {
24
+ decl: DeclarationNode;
25
+ }): ReactNode;
26
+ Property(props: {
27
+ decl: DeclarationNode;
28
+ children: PropertyFn;
29
+ }): ReactNode;
30
+ TypeName(props: {
31
+ type: Type;
32
+ optional?: boolean;
33
+ }): ReactNode;
34
+ Type(props: {
35
+ type: Type;
36
+ optional?: boolean;
37
+ }): ReactNode;
38
+ MethodSignature(props: {
39
+ decl: DeclarationNode;
40
+ }): ReactNode;
41
+ MethodInfo?(props: {
42
+ decl: DeclarationNode;
43
+ children?: ReactNode;
44
+ }): ReactNode;
45
+ Resource?(props: {
46
+ resource: Resource;
47
+ }): ReactNode;
48
+ }
49
+ //#endregion
50
+ export { LanguageComponentDefinition, PropertyFn, cli_d_exports as cli, csharp_d_exports as csharp, go_d_exports as go, http_d_exports as http, java_d_exports as java, kotlin, node, python_d_exports as python, ruby_d_exports as ruby, index_d_exports as t, terraform_d_exports as terraform, typescript_d_exports as typescript };
@@ -1,29 +1,31 @@
1
- import "../docs-YgoQ3bzY.js";
2
- import "../component-generics-POFirVVb.js";
3
- import "../navigation-aoYZ_tl4.js";
4
- import "../markdown-Cq3XEhrR.js";
5
- import "../contexts-_NNW5yqC.js";
6
- import "../use-components-BUz3GbO4.js";
7
- import "../properties-DQU0NBzb.js";
8
- import "../method-DjzVBzZe.js";
9
- import "../primitives-CNG-fEhQ.js";
10
- import "../icons-BYKn5X8E.js";
11
- import "../sdk-BSdgEEJw.js";
12
- import "../snippets-CLpNVNlA.js";
13
- import "../overview-ocTARt-j.js";
14
- import "../breadcrumbs-BiBfNqBI.js";
15
- import "../stl-sidebar-DC5UOJiT.js";
16
- import "../sdk-sidebar-BDn8S1xS.js";
17
- import "../components-9NMl1791.js";
18
- import { o as typescript_exports } from "../typescript-Cmk-jBBw.js";
19
- import { o as java_exports } from "../java-BiLRuLuD.js";
20
- import { o as go_exports } from "../go-BoaAVmP0.js";
21
- import { o as python_exports } from "../python-nqOBH7GS.js";
22
- import { o as ruby_exports } from "../ruby-BBc8HdIt.js";
23
- import { s as http_exports } from "../http-B3qTyMc3.js";
24
- import { o as csharp_exports } from "../csharp-sn5CJu9t.js";
25
- import { o as cli_exports } from "../cli-hduQ5XS1.js";
26
- import { c as terraform_exports } from "../terraform-DVx2ea2h.js";
27
- import { r as node, t as kotlin } from "../languages-vUhD5Hu_.js";
1
+ import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
+ import "../use-strict-context-L0c8JKg4.js";
3
+ import { t as typescript_exports } from "./typescript.js";
4
+ import { t as java_exports } from "./java.js";
5
+ import { t as go_exports } from "./go.js";
6
+ import { t as python_exports } from "./python.js";
7
+ import { t as ruby_exports } from "./ruby.js";
8
+ import { t as http_exports } from "./http.js";
9
+ import { t as csharp_exports } from "./csharp.js";
10
+ import { t as cli_exports } from "./cli.js";
11
+ import { t as terraform_exports } from "./terraform.js";
28
12
 
29
- export { cli_exports as cli, csharp_exports as csharp, go_exports as go, http_exports as http, java_exports as java, kotlin, node, python_exports as python, ruby_exports as ruby, terraform_exports as terraform, typescript_exports as typescript };
13
+ //#region src/languages/index.ts
14
+ var languages_exports = /* @__PURE__ */ __exportAll({
15
+ cli: () => cli_exports,
16
+ csharp: () => csharp_exports,
17
+ go: () => go_exports,
18
+ http: () => http_exports,
19
+ java: () => java_exports,
20
+ kotlin: () => kotlin,
21
+ node: () => node,
22
+ python: () => python_exports,
23
+ ruby: () => ruby_exports,
24
+ terraform: () => terraform_exports,
25
+ typescript: () => typescript_exports
26
+ });
27
+ const node = typescript_exports;
28
+ const kotlin = java_exports;
29
+
30
+ //#endregion
31
+ export { cli_exports as cli, csharp_exports as csharp, go_exports as go, http_exports as http, java_exports as java, kotlin, node, python_exports as python, ruby_exports as ruby, languages_exports as t, terraform_exports as terraform, typescript_exports as typescript };
@@ -1,14 +1,43 @@
1
- import "../primitives-WGxdBJDS.js";
2
- import "../breadcrumbs-46Qjx1Pd.js";
3
- import "../method-D6R_farj.js";
4
- import "../properties-Bu4nW9JD.js";
5
- import "../sdk-Dm0S-XQE.js";
6
- import { Bt as Property, Ht as Type, It as Declaration, Lt as DeclarationProps, Rt as MethodSignature, Ut as TypeName, Vt as PropertyProps, zt as MethodSignatureProps } from "../index-BOmn7DHa.js";
7
- import "../navigation-HiZWRl34.js";
8
- import "../markdown-plMAoN22.js";
9
- import "../component-generics-Bw4ZOyEG.js";
10
- import "../docs-xb5wYGjM.js";
11
- import "../overview-CTeKhpQq.js";
12
- import "../sdk-sidebar-Dqeu7C1-.js";
13
- import "../stl-sidebar-BTTErIJs.js";
14
- export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName };
1
+ import { l as JavaAST } from "../index-PdnFhQF9.js";
2
+ import { PropertyFn } from "./index.js";
3
+ import * as React$1 from "react";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
+
6
+ //#region src/languages/java.d.ts
7
+ declare namespace java_d_exports {
8
+ export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName };
9
+ }
10
+ type TypeProps = {
11
+ type: JavaAST.JavaType;
12
+ optional?: boolean;
13
+ };
14
+ declare function TypeName({
15
+ type,
16
+ optional
17
+ }: TypeProps): react_jsx_runtime0.JSX.Element | "List";
18
+ declare function Type({
19
+ type,
20
+ optional
21
+ }: TypeProps): react_jsx_runtime0.JSX.Element;
22
+ type MethodSignatureProps = {
23
+ decl: JavaAST.JavaDeclFunction;
24
+ };
25
+ declare function MethodSignature({
26
+ decl
27
+ }: MethodSignatureProps): react_jsx_runtime0.JSX.Element;
28
+ type PropertyProps = {
29
+ decl: JavaAST.JavaDeclaration;
30
+ children: PropertyFn;
31
+ };
32
+ declare function Property({
33
+ decl,
34
+ children
35
+ }: PropertyProps): React$1.ReactNode;
36
+ type DeclarationProps = {
37
+ decl: JavaAST.JavaDeclaration;
38
+ };
39
+ declare function Declaration({
40
+ decl
41
+ }: DeclarationProps): react_jsx_runtime0.JSX.Element | null | undefined;
42
+ //#endregion
43
+ export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName, java_d_exports as t };