@stainless-api/docs-ui 0.1.0-beta.8 → 0.1.0-beta.80

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 (155) hide show
  1. package/dist/chunk-BYypO7fO.js +18 -0
  2. package/dist/components/MaskedInput.d.ts +14 -0
  3. package/dist/components/MaskedInput.js +76 -0
  4. package/dist/components/breadcrumbs.d.ts +25 -0
  5. package/dist/components/breadcrumbs.js +64 -0
  6. package/dist/components/icons.d.ts +65 -0
  7. package/dist/components/icons.js +941 -0
  8. package/dist/components/index.d.ts +16 -0
  9. package/dist/components/index.js +75 -0
  10. package/dist/components/method.d.ts +59 -0
  11. package/dist/components/method.js +97 -0
  12. package/dist/components/overview.d.ts +39 -0
  13. package/dist/components/overview.js +139 -0
  14. package/dist/components/primitives.d.ts +107 -0
  15. package/dist/components/primitives.js +253 -0
  16. package/dist/components/properties.d.ts +54 -0
  17. package/dist/components/properties.js +140 -0
  18. package/dist/components/sdk-sidebar.d.ts +15 -0
  19. package/dist/components/sdk-sidebar.js +52 -0
  20. package/dist/components/sdk.d.ts +128 -0
  21. package/dist/components/sdk.js +490 -0
  22. package/dist/components/snippets.d.ts +71 -0
  23. package/dist/components/snippets.js +184 -0
  24. package/dist/components/stl-sidebar.d.ts +58 -0
  25. package/dist/components/stl-sidebar.js +114 -0
  26. package/dist/contexts/component-generics.d.ts +30 -0
  27. package/dist/contexts/component-generics.js +33 -0
  28. package/dist/contexts/component-types.d.ts +8 -0
  29. package/dist/contexts/component-types.js +0 -0
  30. package/dist/contexts/component.d.ts +21 -0
  31. package/dist/contexts/component.js +24 -0
  32. package/dist/contexts/docs.d.ts +62 -0
  33. package/dist/contexts/docs.js +91 -0
  34. package/dist/contexts/index.d.ts +13 -0
  35. package/dist/contexts/index.js +45 -0
  36. package/dist/contexts/markdown.d.ts +22 -0
  37. package/dist/contexts/markdown.js +49 -0
  38. package/dist/contexts/navigation.d.ts +29 -0
  39. package/dist/contexts/navigation.js +24 -0
  40. package/dist/contexts/use-components.d.ts +6 -0
  41. package/dist/contexts/use-components.js +8 -0
  42. package/dist/index-pvh-w1xa.d.ts +1776 -0
  43. package/dist/index.d.ts +7 -0
  44. package/dist/index.js +9 -7542
  45. package/dist/languages/cli.d.ts +38 -0
  46. package/dist/languages/cli.js +167 -0
  47. package/dist/languages/csharp.d.ts +42 -0
  48. package/dist/languages/csharp.js +284 -0
  49. package/dist/languages/go.d.ts +40 -0
  50. package/dist/languages/go.js +304 -0
  51. package/dist/languages/http.d.ts +46 -0
  52. package/dist/languages/http.js +391 -0
  53. package/dist/languages/index.d.ts +51 -0
  54. package/dist/languages/index.js +33 -0
  55. package/dist/languages/java.d.ts +43 -0
  56. package/dist/languages/java.js +404 -0
  57. package/dist/languages/php.d.ts +40 -0
  58. package/dist/languages/php.js +313 -0
  59. package/dist/languages/python.d.ts +40 -0
  60. package/dist/languages/python.js +270 -0
  61. package/dist/languages/ruby.d.ts +40 -0
  62. package/dist/languages/ruby.js +388 -0
  63. package/dist/languages/terraform.d.ts +48 -0
  64. package/dist/languages/terraform.js +244 -0
  65. package/dist/languages/typescript.d.ts +40 -0
  66. package/dist/languages/typescript.js +450 -0
  67. package/dist/markdown/index.d.ts +11 -0
  68. package/dist/markdown/index.js +80 -0
  69. package/dist/markdown/md.d.ts +15 -0
  70. package/dist/markdown/md.js +41 -0
  71. package/dist/markdown/printer.d.ts +13 -0
  72. package/dist/markdown/printer.js +76 -0
  73. package/dist/markdown/utils.d.ts +21 -0
  74. package/dist/markdown/utils.js +31 -0
  75. package/dist/routing.d.ts +61 -0
  76. package/dist/routing.js +176 -150
  77. package/dist/spec.d.ts +65 -0
  78. package/dist/spec.js +167 -0
  79. package/dist/style.d.ts +177 -0
  80. package/dist/style.js +178 -0
  81. package/dist/styles/main.css +788 -752
  82. package/dist/styles/main.js +0 -0
  83. package/dist/styles/primitives.css +326 -458
  84. package/dist/styles/primitives.js +0 -0
  85. package/dist/styles/resets.css +32 -41
  86. package/dist/styles/resets.js +0 -0
  87. package/dist/styles/search.css +192 -270
  88. package/dist/styles/search.js +0 -0
  89. package/dist/styles/sidebar.css +182 -69
  90. package/dist/styles/sidebar.js +0 -0
  91. package/dist/styles/variables.css +28 -89
  92. package/dist/styles/variables.js +0 -0
  93. package/dist/styles.css +3333 -0
  94. package/dist/styles.mjs +1 -0
  95. package/dist/use-strict-context-L0c8JKg4.js +16 -0
  96. package/dist/utils.d.ts +20 -0
  97. package/dist/utils.js +54 -0
  98. package/package.json +74 -22
  99. package/dist/mcp.js +0 -16003
  100. package/dist/styles/snippets.css +0 -132
  101. package/src/components/breadcrumbs.tsx +0 -94
  102. package/src/components/chat.tsx +0 -154
  103. package/src/components/dropdown.tsx +0 -91
  104. package/src/components/icons.tsx +0 -584
  105. package/src/components/index.ts +0 -9
  106. package/src/components/method.tsx +0 -146
  107. package/src/components/overview.tsx +0 -160
  108. package/src/components/primitives.tsx +0 -284
  109. package/src/components/properties.tsx +0 -130
  110. package/src/components/scripts/dropdown.ts +0 -78
  111. package/src/components/sdk.tsx +0 -403
  112. package/src/components/sidebar.tsx +0 -99
  113. package/src/components/snippets.tsx +0 -180
  114. package/src/contexts/component-generics.tsx +0 -48
  115. package/src/contexts/component-types.tsx +0 -5
  116. package/src/contexts/component.tsx +0 -32
  117. package/src/contexts/docs.tsx +0 -75
  118. package/src/contexts/index.tsx +0 -17
  119. package/src/contexts/markdown.tsx +0 -43
  120. package/src/contexts/navigation.tsx +0 -44
  121. package/src/contexts/search.tsx +0 -28
  122. package/src/contexts/use-components.tsx +0 -4
  123. package/src/index.ts +0 -6
  124. package/src/languages/go.tsx +0 -281
  125. package/src/languages/http.tsx +0 -321
  126. package/src/languages/index.ts +0 -26
  127. package/src/languages/java.tsx +0 -358
  128. package/src/languages/python.tsx +0 -255
  129. package/src/languages/ruby.tsx +0 -320
  130. package/src/languages/typescript.tsx +0 -393
  131. package/src/markdown/index.ts +0 -107
  132. package/src/markdown/md.ts +0 -45
  133. package/src/markdown/utils.ts +0 -49
  134. package/src/routing.ts +0 -238
  135. package/src/search/form.tsx +0 -127
  136. package/src/search/index.tsx +0 -1
  137. package/src/search/indexer.ts +0 -246
  138. package/src/search/mcp.ts +0 -61
  139. package/src/search/printer.tsx +0 -86
  140. package/src/search/providers/algolia.ts +0 -88
  141. package/src/search/providers/fuse.ts +0 -19
  142. package/src/search/providers/pagefind.ts +0 -17
  143. package/src/search/providers/walker.ts +0 -30
  144. package/src/search/results.tsx +0 -182
  145. package/src/search/state.ts +0 -64
  146. package/src/search/types.ts +0 -116
  147. package/src/style.ts +0 -196
  148. package/src/styles/main.css +0 -986
  149. package/src/styles/primitives.css +0 -580
  150. package/src/styles/resets.css +0 -39
  151. package/src/styles/search.css +0 -341
  152. package/src/styles/sidebar.css +0 -85
  153. package/src/styles/snippets.css +0 -130
  154. package/src/styles/variables.css +0 -86
  155. package/src/utils.ts +0 -41
@@ -0,0 +1,391 @@
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";
18
+
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 };
@@ -0,0 +1,51 @@
1
+ import { S as Type, h as Resource, i as DeclarationNode } from "../index-pvh-w1xa.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 php_d_exports } from "./php.js";
11
+ import { t as cli_d_exports } from "./cli.js";
12
+ import { t as terraform_d_exports } from "./terraform.js";
13
+ import "../components/index.js";
14
+ import { ReactNode } from "react";
15
+
16
+ //#region src/languages/index.d.ts
17
+ declare namespace index_d_exports {
18
+ 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, php_d_exports as php, python_d_exports as python, ruby_d_exports as ruby, terraform_d_exports as terraform, typescript_d_exports as typescript };
19
+ }
20
+ declare const node: typeof typescript_d_exports;
21
+ declare const kotlin: typeof java_d_exports;
22
+ type PropertyFn = (params: PropertyProps) => ReactNode;
23
+ interface LanguageComponentDefinition {
24
+ Declaration(props: {
25
+ decl: DeclarationNode;
26
+ }): ReactNode;
27
+ Property(props: {
28
+ decl: DeclarationNode;
29
+ children: PropertyFn;
30
+ }): ReactNode;
31
+ TypeName(props: {
32
+ type: Type;
33
+ optional?: boolean;
34
+ }): ReactNode;
35
+ Type(props: {
36
+ type: Type;
37
+ optional?: boolean;
38
+ }): ReactNode;
39
+ MethodSignature(props: {
40
+ decl: DeclarationNode;
41
+ }): ReactNode;
42
+ MethodInfo?(props: {
43
+ decl: DeclarationNode;
44
+ children?: ReactNode;
45
+ }): ReactNode;
46
+ Resource?(props: {
47
+ resource: Resource;
48
+ }): ReactNode;
49
+ }
50
+ //#endregion
51
+ 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, php_d_exports as php, 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 };
@@ -0,0 +1,33 @@
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 php_exports } from "./php.js";
11
+ import { t as cli_exports } from "./cli.js";
12
+ import { t as terraform_exports } from "./terraform.js";
13
+
14
+ //#region src/languages/index.ts
15
+ var languages_exports = /* @__PURE__ */ __exportAll({
16
+ cli: () => cli_exports,
17
+ csharp: () => csharp_exports,
18
+ go: () => go_exports,
19
+ http: () => http_exports,
20
+ java: () => java_exports,
21
+ kotlin: () => kotlin,
22
+ node: () => node,
23
+ php: () => php_exports,
24
+ python: () => python_exports,
25
+ ruby: () => ruby_exports,
26
+ terraform: () => terraform_exports,
27
+ typescript: () => typescript_exports
28
+ });
29
+ const node = typescript_exports;
30
+ const kotlin = java_exports;
31
+
32
+ //#endregion
33
+ export { cli_exports as cli, csharp_exports as csharp, go_exports as go, http_exports as http, java_exports as java, kotlin, node, php_exports as php, python_exports as python, ruby_exports as ruby, languages_exports as t, terraform_exports as terraform, typescript_exports as typescript };
@@ -0,0 +1,43 @@
1
+ import { l as JavaAST } from "../index-pvh-w1xa.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 };