@stainless-api/docs-ui 0.1.0-beta.73 → 0.1.0-beta.75

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 (124) hide show
  1. package/dist/{chunk-BN_g-Awi.js → chunk-BYypO7fO.js} +3 -3
  2. package/dist/components/MaskedInput.d.ts +3 -3
  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 +18 -13
  7. package/dist/components/icons.js +940 -2
  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 +405 -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-HDt5wRiR.d.ts → index-Cl6Gny0o.d.ts} +37 -2
  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 +51 -14
  53. package/dist/languages/index.js +32 -28
  54. package/dist/languages/java.d.ts +43 -14
  55. package/dist/languages/java.js +403 -8
  56. package/dist/languages/php.d.ts +40 -0
  57. package/dist/languages/php.js +313 -0
  58. package/dist/languages/python.d.ts +40 -14
  59. package/dist/languages/python.js +269 -8
  60. package/dist/languages/ruby.d.ts +40 -14
  61. package/dist/languages/ruby.js +387 -8
  62. package/dist/languages/terraform.d.ts +48 -14
  63. package/dist/languages/terraform.js +243 -8
  64. package/dist/languages/typescript.d.ts +40 -14
  65. package/dist/languages/typescript.js +449 -8
  66. package/dist/markdown/index.d.ts +1 -2
  67. package/dist/markdown/index.js +1 -28
  68. package/dist/markdown/printer.d.ts +2 -2
  69. package/dist/markdown/printer.js +6 -30
  70. package/dist/markdown/utils.d.ts +3 -3
  71. package/dist/routing.d.ts +61 -2
  72. package/dist/routing.js +205 -2
  73. package/dist/spec.d.ts +2 -2
  74. package/dist/spec.js +2 -2
  75. package/dist/style.js +176 -1
  76. package/dist/use-strict-context-L0c8JKg4.js +16 -0
  77. package/dist/utils.d.ts +1 -1
  78. package/dist/utils.js +53 -2
  79. package/package.json +3 -3
  80. package/dist/breadcrumbs-Dei_5sHd.d.ts +0 -25
  81. package/dist/breadcrumbs-oUp-6oJK.js +0 -63
  82. package/dist/cli-BX9ofVCR.js +0 -166
  83. package/dist/component-Dl5ZEHxB.js +0 -23
  84. package/dist/component-generics-C9ALAcZI.d.ts +0 -30
  85. package/dist/component-generics-POFirVVb.js +0 -45
  86. package/dist/components-DQPlXEwE.js +0 -72
  87. package/dist/contexts-_NNW5yqC.js +0 -44
  88. package/dist/csharp-sn5CJu9t.js +0 -283
  89. package/dist/docs-YgoQ3bzY.js +0 -81
  90. package/dist/docs-x-kfjRMc.d.ts +0 -66
  91. package/dist/go-BoaAVmP0.js +0 -303
  92. package/dist/http-Ccj1dOvE.js +0 -389
  93. package/dist/icons-BYKn5X8E.js +0 -885
  94. package/dist/index-OCM-LZIo.d.ts +0 -428
  95. package/dist/java-BiLRuLuD.js +0 -403
  96. package/dist/languages-COjc0Nwx.js +0 -30
  97. package/dist/markdown-BszOPZhh.d.ts +0 -22
  98. package/dist/markdown-Cq3XEhrR.js +0 -49
  99. package/dist/method-DjzVBzZe.js +0 -96
  100. package/dist/method-KkWyhvKa.d.ts +0 -59
  101. package/dist/navigation-BZjwfN2P.d.ts +0 -29
  102. package/dist/navigation-aoYZ_tl4.js +0 -24
  103. package/dist/overview-BNmMeDUE.d.ts +0 -39
  104. package/dist/overview-Clq5psZe.js +0 -138
  105. package/dist/primitives-B8OnSXRP.d.ts +0 -105
  106. package/dist/primitives-BBUs_flm.js +0 -250
  107. package/dist/properties-BhlRtWo4.d.ts +0 -54
  108. package/dist/properties-DQU0NBzb.js +0 -138
  109. package/dist/python-nqOBH7GS.js +0 -269
  110. package/dist/routing-GvhEMw6E.js +0 -205
  111. package/dist/routing-qJMPICGo.d.ts +0 -61
  112. package/dist/ruby-BBc8HdIt.js +0 -387
  113. package/dist/sdk-C8C6IRQp.d.ts +0 -122
  114. package/dist/sdk-DzCHhEoX.js +0 -405
  115. package/dist/sdk-sidebar-CkjSLggl.js +0 -50
  116. package/dist/sdk-sidebar-lgNmf-ns.d.ts +0 -15
  117. package/dist/snippets-CLpNVNlA.js +0 -181
  118. package/dist/stl-sidebar-8jF9cdnn.d.ts +0 -58
  119. package/dist/stl-sidebar-DC5UOJiT.js +0 -106
  120. package/dist/style-DJIYkFhO.js +0 -178
  121. package/dist/terraform-DVx2ea2h.js +0 -243
  122. package/dist/typescript-Cmk-jBBw.js +0 -449
  123. package/dist/use-components-BUz3GbO4.js +0 -7
  124. package/dist/utils-D6zJxUZ9.js +0 -54
@@ -1,403 +0,0 @@
1
- import { t as __exportAll } from "./chunk-BN_g-Awi.js";
2
- import { s as useLanguage } from "./docs-YgoQ3bzY.js";
3
- import { n as useLanguageComponents } from "./contexts-_NNW5yqC.js";
4
- import { t as useComponents } from "./use-components-BUz3GbO4.js";
5
- import { t as style_default } from "./style-DJIYkFhO.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/java.tsx
10
- var java_exports = /* @__PURE__ */ __exportAll({
11
- Declaration: () => Declaration,
12
- MethodSignature: () => MethodSignature,
13
- Property: () => Property,
14
- Type: () => Type,
15
- TypeName: () => TypeName
16
- });
17
- function showFullType(type) {
18
- return type.kind === "JavaTypeReference" && (type.typeName === "List" || type.typeParameters && type.typeParameters.length > 0);
19
- }
20
- const constStyle = {
21
- string: style_default.LiteralString,
22
- number: style_default.LiteralNumeric,
23
- boolean: style_default.LiteralBoolean
24
- };
25
- function TypeName({ type, optional }) {
26
- const Lang = useLanguageComponents();
27
- if (type.kind === "JavaTypeReference" && type.typeName === "List") return "List";
28
- return /* @__PURE__ */ jsx(Lang.Type, {
29
- type,
30
- optional
31
- });
32
- }
33
- function Type({ type, optional }) {
34
- const language = useLanguage();
35
- const Lang = useLanguageComponents();
36
- const { Join, SDKReference } = useComponents();
37
- switch (type.kind) {
38
- case "JavaTypeReference": {
39
- const name = type.typeName.split(".").at(-1);
40
- const params = type.typeParameters?.map((param, key) => /* @__PURE__ */ jsx(Lang.Type, {
41
- type: param,
42
- optional
43
- }, key));
44
- return /* @__PURE__ */ jsxs("span", {
45
- className: style_default.Type,
46
- children: [/* @__PURE__ */ jsx(SDKReference, {
47
- stainlessPath: type.$ref,
48
- children: name
49
- }), params && params.length > 0 ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
50
- /* @__PURE__ */ jsx("span", {
51
- className: style_default.TypeBracket,
52
- children: "<"
53
- }),
54
- /* @__PURE__ */ jsx(Join, {
55
- items: params,
56
- limit: 3,
57
- children: /* @__PURE__ */ jsx("span", {
58
- className: style_default.TextOperator,
59
- children: ", "
60
- })
61
- }),
62
- /* @__PURE__ */ jsx("span", {
63
- className: style_default.TypeBracket,
64
- children: ">"
65
- })
66
- ] }) : null]
67
- });
68
- }
69
- case "JavaTypeClass":
70
- case "JavaTypeUnion": return /* @__PURE__ */ jsx("span", {
71
- className: style_default.Type,
72
- children: /* @__PURE__ */ jsx("span", {
73
- className: style_default.TypeKeyword,
74
- children: "class"
75
- })
76
- });
77
- case "JavaTypeEnum": return /* @__PURE__ */ jsx("span", {
78
- className: style_default.Type,
79
- children: /* @__PURE__ */ jsx("span", {
80
- className: style_default.TypeKeyword,
81
- children: language === "kotlin" ? "enum class" : "enum"
82
- })
83
- });
84
- case "JavaTypeVoid": return /* @__PURE__ */ jsx("span", {
85
- className: style_default.Type,
86
- children: /* @__PURE__ */ jsx("span", {
87
- className: style_default.TypeKeyword,
88
- children: language === "kotlin" ? "Nothing?" : "Void"
89
- })
90
- });
91
- case "JavaTypeBoolean": return /* @__PURE__ */ jsx("span", {
92
- className: style_default.Type,
93
- children: /* @__PURE__ */ jsx("span", {
94
- className: style_default.TypeKeyword,
95
- children: language === "kotlin" || optional ? "Boolean" : "boolean"
96
- })
97
- });
98
- case "JavaTypeDouble": return /* @__PURE__ */ jsx("span", {
99
- className: style_default.Type,
100
- children: /* @__PURE__ */ jsx("span", {
101
- className: style_default.TypeKeyword,
102
- children: language === "kotlin" || optional ? "Double" : "double"
103
- })
104
- });
105
- case "JavaTypeLong": return /* @__PURE__ */ jsx("span", {
106
- className: style_default.Type,
107
- children: /* @__PURE__ */ jsx("span", {
108
- className: style_default.TypeKeyword,
109
- children: language === "kotlin" || optional ? "Long" : "long"
110
- })
111
- });
112
- case "JavaTypeString": return /* @__PURE__ */ jsx("span", {
113
- className: style_default.Type,
114
- children: /* @__PURE__ */ jsx("span", {
115
- className: style_default.TypeString,
116
- children: "String"
117
- })
118
- });
119
- case "JavaTypeConstant": return /* @__PURE__ */ jsxs("span", {
120
- className: style_default.Type,
121
- children: [/* @__PURE__ */ jsx("span", {
122
- className: style_default.TypeKeyword,
123
- children: "JsonValue"
124
- }), ";"]
125
- });
126
- }
127
- }
128
- function MethodSignature({ decl }) {
129
- const Lang = useLanguageComponents();
130
- const language = useLanguage();
131
- const { Join, Tooltip } = useComponents();
132
- const params = decl.parameters.map((param, i) => /* @__PURE__ */ jsx(React$1.Fragment, { children: /* @__PURE__ */ jsxs(Tooltip, {
133
- content: /* @__PURE__ */ jsx(Lang.Type, { type: param.typeAnnotation }),
134
- children: [/* @__PURE__ */ jsx("span", {
135
- className: style_default.TextIdentifier,
136
- children: param.ident
137
- }), param.hasDefault && /* @__PURE__ */ jsxs(Fragment$1, { children: [
138
- " ",
139
- /* @__PURE__ */ jsx("span", {
140
- className: style_default.TextOperator,
141
- children: "="
142
- }),
143
- " ",
144
- /* @__PURE__ */ jsx(Lang.Type, { type: param.typeAnnotation }),
145
- /* @__PURE__ */ jsx("span", {
146
- className: style_default.TextOperator,
147
- children: "."
148
- }),
149
- /* @__PURE__ */ jsx("span", {
150
- className: style_default.TextIdentifier,
151
- children: "none"
152
- }),
153
- /* @__PURE__ */ jsx("span", {
154
- className: style_default.TextOperator,
155
- children: "()"
156
- })
157
- ] })]
158
- }) }, i));
159
- return /* @__PURE__ */ jsx("div", {
160
- className: style_default.MethodSignature,
161
- children: /* @__PURE__ */ jsxs("span", {
162
- className: style_default.SignatureTitle,
163
- children: [
164
- decl.returnType && language !== "kotlin" && /* @__PURE__ */ jsxs("span", {
165
- className: style_default.SignatureReturns,
166
- children: [/* @__PURE__ */ jsx(Lang.Type, { type: decl.returnType }), " "]
167
- }),
168
- decl.qualified && /* @__PURE__ */ jsx("span", {
169
- className: style_default.SignatureQualified,
170
- children: /* @__PURE__ */ jsx("span", {
171
- className: style_default.TextIdentifier,
172
- children: decl.qualified?.slice(0, -decl.ident.length)
173
- })
174
- }),
175
- /* @__PURE__ */ jsx("span", {
176
- className: style_default.SignatureName,
177
- children: /* @__PURE__ */ jsx("span", {
178
- className: style_default.TextIdentifier,
179
- children: decl.ident
180
- })
181
- }),
182
- /* @__PURE__ */ jsxs("span", {
183
- className: style_default.MethodSignature,
184
- children: [
185
- /* @__PURE__ */ jsx("span", {
186
- className: style_default.SignatureParen,
187
- children: "("
188
- }),
189
- /* @__PURE__ */ jsx("span", {
190
- className: style_default.SignatureParams,
191
- children: /* @__PURE__ */ jsx(Join, {
192
- items: params,
193
- children: /* @__PURE__ */ jsx("span", {
194
- className: style_default.TextOperator,
195
- children: ", "
196
- })
197
- })
198
- }),
199
- /* @__PURE__ */ jsxs("span", {
200
- className: style_default.SignatureParen,
201
- children: [")", " "]
202
- }),
203
- decl.returnType && language === "kotlin" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
204
- /* @__PURE__ */ jsx("span", {
205
- className: style_default.TextOperator,
206
- children: ":"
207
- }),
208
- " ",
209
- /* @__PURE__ */ jsx(Lang.Type, { type: decl.returnType })
210
- ] })
211
- ]
212
- })
213
- ]
214
- })
215
- });
216
- }
217
- function Property({ decl, children }) {
218
- const Docs = useComponents();
219
- const Lang = useLanguageComponents();
220
- const language = useLanguage();
221
- if (!decl) return null;
222
- switch (decl.kind) {
223
- case "JavaDeclProperty": {
224
- const typeRaw = /* @__PURE__ */ jsx(Lang.Type, {
225
- type: decl.type,
226
- optional: decl.optional
227
- });
228
- const typeWrapped = decl.optional ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
229
- /* @__PURE__ */ jsx("span", {
230
- className: style_default.TypeKeyword,
231
- children: "Optional"
232
- }),
233
- /* @__PURE__ */ jsx("span", {
234
- className: style_default.TypeBracket,
235
- children: "<"
236
- }),
237
- typeRaw,
238
- /* @__PURE__ */ jsx("span", {
239
- className: style_default.TypeBracket,
240
- children: ">"
241
- })
242
- ] }) : typeRaw;
243
- const badges = /* @__PURE__ */ jsx(Fragment$1, { children: decl.type.kind === "JavaTypeConstant" && /* @__PURE__ */ jsx(Docs.Tooltip, {
244
- content: /* @__PURE__ */ jsx("span", {
245
- className: style_default.TextIdentifier,
246
- children: decl.type.value
247
- }),
248
- children: /* @__PURE__ */ jsx("span", {
249
- className: style_default.TextIdentifier,
250
- children: "constant"
251
- })
252
- }) });
253
- return children({
254
- name: decl.ident,
255
- typeName: /* @__PURE__ */ jsx(Lang.TypeName, {
256
- type: decl.type,
257
- optional: decl.optional
258
- }),
259
- type: showFullType(decl.type) && typeWrapped,
260
- badges
261
- });
262
- }
263
- case "JavaDeclConst": return children({
264
- name: decl.ident,
265
- typeName: "const",
266
- type: /* @__PURE__ */ jsx("span", {
267
- className: constStyle[typeof decl.value],
268
- children: JSON.stringify(decl.value)
269
- })
270
- });
271
- case "JavaDeclType": {
272
- const typeName = decl.type.kind === "JavaTypeUnion" ? "union" : decl.type.kind === "JavaTypeEnum" ? language === "kotlin" ? "enum class" : "enum" : "class";
273
- return children({
274
- name: decl.ident,
275
- typeName
276
- });
277
- }
278
- case "JavaDeclReference": return children({ type: /* @__PURE__ */ jsx(Lang.Type, { type: decl.type }) });
279
- }
280
- }
281
- function Declaration({ decl }) {
282
- const Docs = useComponents();
283
- const Lang = useLanguageComponents();
284
- const language = useLanguage();
285
- if (!decl) return null;
286
- switch (decl.kind) {
287
- case "JavaDeclConst": return /* @__PURE__ */ jsxs(Fragment$1, { children: [
288
- /* @__PURE__ */ jsx("span", {
289
- className: style_default.TextIdentifier,
290
- children: decl.ident
291
- }),
292
- /* @__PURE__ */ jsx("span", {
293
- className: style_default.TextPunctuation,
294
- children: "("
295
- }),
296
- JSON.stringify(decl.value),
297
- /* @__PURE__ */ jsx("span", {
298
- className: style_default.TextPunctuation,
299
- children: ")"
300
- })
301
- ] });
302
- case "JavaDeclType": {
303
- const keyword = decl.type.kind === "JavaTypeEnum" ? language === "kotlin" ? "enum class" : "enum" : "class";
304
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
305
- /* @__PURE__ */ jsx("span", {
306
- className: style_default.TextKeyword,
307
- children: keyword
308
- }),
309
- " ",
310
- /* @__PURE__ */ jsx("span", {
311
- className: style_default.TextIdentifier,
312
- children: decl.ident
313
- }),
314
- /* @__PURE__ */ jsx("span", {
315
- className: style_default.TextPunctuation,
316
- children: ":"
317
- }),
318
- decl.type.kind === "JavaTypeUnion" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
319
- " ",
320
- /* @__PURE__ */ jsx(Docs.Tooltip, {
321
- content: "A class that can be one of several variants.",
322
- children: /* @__PURE__ */ jsx(Docs.Badge, {
323
- id: "java-union",
324
- children: "union"
325
- })
326
- }),
327
- " "
328
- ] })
329
- ] });
330
- }
331
- case "JavaDeclProperty": {
332
- const inlineType = /* @__PURE__ */ jsx(Lang.Type, {
333
- type: decl.type,
334
- optional: decl.optional
335
- });
336
- const ident = /* @__PURE__ */ jsx("span", {
337
- className: style_default.TypePropertyName,
338
- children: /* @__PURE__ */ jsx("span", {
339
- className: style_default.TextIdentifier,
340
- children: decl.ident
341
- })
342
- });
343
- const suffix = decl.type.kind === "JavaTypeConstant" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [" ", /* @__PURE__ */ jsx(Docs.Tooltip, {
344
- content: /* @__PURE__ */ jsx("span", {
345
- className: style_default.TextIdentifier,
346
- children: decl.type.value
347
- }),
348
- children: /* @__PURE__ */ jsx(Docs.Badge, {
349
- id: "java-constant",
350
- children: "constant"
351
- })
352
- })] }) : null;
353
- if (language === "kotlin") return /* @__PURE__ */ jsxs(Fragment$1, { children: [
354
- ident,
355
- /* @__PURE__ */ jsx("span", {
356
- className: style_default.TextPunctuation,
357
- children: ":"
358
- }),
359
- " ",
360
- decl.optional ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
361
- /* @__PURE__ */ jsx("span", {
362
- className: style_default.TypeReference,
363
- children: "Optional"
364
- }),
365
- /* @__PURE__ */ jsx("span", {
366
- className: style_default.TypeBracket,
367
- children: "<"
368
- }),
369
- inlineType,
370
- /* @__PURE__ */ jsx("span", {
371
- className: style_default.TypeBracket,
372
- children: ">"
373
- })
374
- ] }) : inlineType,
375
- suffix
376
- ] });
377
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
378
- decl.optional ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
379
- /* @__PURE__ */ jsx("span", {
380
- className: style_default.TypeReference,
381
- children: "Optional"
382
- }),
383
- /* @__PURE__ */ jsx("span", {
384
- className: style_default.TypeBracket,
385
- children: "<"
386
- }),
387
- inlineType,
388
- /* @__PURE__ */ jsx("span", {
389
- className: style_default.TypeBracket,
390
- children: ">"
391
- })
392
- ] }) : inlineType,
393
- " ",
394
- ident,
395
- suffix
396
- ] });
397
- }
398
- case "JavaDeclReference": return /* @__PURE__ */ jsx(Lang.Type, { type: decl.type });
399
- }
400
- }
401
-
402
- //#endregion
403
- export { TypeName as a, Type as i, MethodSignature as n, java_exports as o, Property as r, Declaration as t };
@@ -1,30 +0,0 @@
1
- import { t as __exportAll } from "./chunk-BN_g-Awi.js";
2
- import { o as typescript_exports } from "./typescript-Cmk-jBBw.js";
3
- import { o as java_exports } from "./java-BiLRuLuD.js";
4
- import { o as go_exports } from "./go-BoaAVmP0.js";
5
- import { o as python_exports } from "./python-nqOBH7GS.js";
6
- import { o as ruby_exports } from "./ruby-BBc8HdIt.js";
7
- import { s as http_exports } from "./http-Ccj1dOvE.js";
8
- import { o as csharp_exports } from "./csharp-sn5CJu9t.js";
9
- import { o as cli_exports } from "./cli-BX9ofVCR.js";
10
- import { c as terraform_exports } from "./terraform-DVx2ea2h.js";
11
-
12
- //#region src/languages/index.ts
13
- var languages_exports = /* @__PURE__ */ __exportAll({
14
- cli: () => cli_exports,
15
- csharp: () => csharp_exports,
16
- go: () => go_exports,
17
- http: () => http_exports,
18
- java: () => java_exports,
19
- kotlin: () => kotlin,
20
- node: () => node,
21
- python: () => python_exports,
22
- ruby: () => ruby_exports,
23
- terraform: () => terraform_exports,
24
- typescript: () => typescript_exports
25
- });
26
- const node = typescript_exports;
27
- const kotlin = java_exports;
28
-
29
- //#endregion
30
- export { languages_exports as n, node as r, kotlin as t };
@@ -1,22 +0,0 @@
1
- import * as React$1 from "react";
2
- import * as react_jsx_runtime99 from "react/jsx-runtime";
3
-
4
- //#region src/contexts/markdown.d.ts
5
- type MarkdownContext = {
6
- highlight: (content: string, language: string) => string | Promise<string>;
7
- render: (content: string) => string | Promise<string>;
8
- };
9
- declare const MarkdownContext: React$1.Context<MarkdownContext>;
10
- declare const useMarkdownContext: () => MarkdownContext;
11
- declare function useRenderMarkdown(content?: string): string | undefined;
12
- declare function useHighlight(content: string, language?: string): string;
13
- type MarkdownProviderProps = MarkdownContext & {
14
- children: React$1.ReactNode;
15
- };
16
- declare function MarkdownProvider({
17
- render,
18
- highlight,
19
- children
20
- }: MarkdownProviderProps): react_jsx_runtime99.JSX.Element;
21
- //#endregion
22
- export { useMarkdownContext as a, useHighlight as i, MarkdownProvider as n, useRenderMarkdown as o, MarkdownProviderProps as r, MarkdownContext as t };
@@ -1,49 +0,0 @@
1
- import { s as useLanguage } from "./docs-YgoQ3bzY.js";
2
- import * as React$1 from "react";
3
- import { jsx } from "react/jsx-runtime";
4
-
5
- //#region src/contexts/markdown.tsx
6
- const HighlightLanguageMappings = {
7
- node: "typescript",
8
- http: "bash",
9
- cli: "bash"
10
- };
11
- const MarkdownContext = React$1.createContext({
12
- highlight: (content) => content,
13
- render: (content) => content
14
- });
15
- const useMarkdownContext = () => React$1.useContext(MarkdownContext);
16
- function useRenderMarkdown(content) {
17
- const { render } = React$1.useContext(MarkdownContext);
18
- return React$1.useMemo(() => {
19
- if (!content) return void 0;
20
- const rendered = render(content);
21
- return typeof rendered === "string" ? rendered : React$1.use(rendered);
22
- }, [content, render]);
23
- }
24
- function useHighlight(content, language) {
25
- const { highlight } = React$1.useContext(MarkdownContext);
26
- const defaultLanguage = useLanguage();
27
- const lang = language ?? defaultLanguage;
28
- return React$1.useMemo(() => {
29
- if (lang === "none") return content;
30
- const rendered = highlight(content, HighlightLanguageMappings[lang] ?? lang);
31
- return typeof rendered === "string" ? rendered : React$1.use(rendered);
32
- }, [
33
- content,
34
- highlight,
35
- lang
36
- ]);
37
- }
38
- function MarkdownProvider({ render, highlight, children }) {
39
- return /* @__PURE__ */ jsx(MarkdownContext.Provider, {
40
- value: {
41
- render,
42
- highlight
43
- },
44
- children
45
- });
46
- }
47
-
48
- //#endregion
49
- export { useRenderMarkdown as a, useMarkdownContext as i, MarkdownProvider as n, useHighlight as r, MarkdownContext as t };
@@ -1,96 +0,0 @@
1
- import { t as useComponents } from "./use-components-BUz3GbO4.js";
2
- import { t as style_default } from "./style-DJIYkFhO.js";
3
- import { i as PropertyToggle } from "./properties-DQU0NBzb.js";
4
- import "react";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- import clsx from "clsx";
7
- import { Badge, getHttpMethod } from "@stainless-api/ui-primitives";
8
- import { FunctionIcon } from "@stainless-api/ui-primitives/icons";
9
-
10
- //#region src/components/method.tsx
11
- function MethodHeader({ title, badges, signature, children, level }) {
12
- const Heading = level ?? "h5";
13
- return /* @__PURE__ */ jsxs("div", {
14
- className: style_default.MethodHeader,
15
- children: [
16
- /* @__PURE__ */ jsx(Heading, {
17
- className: style_default.MethodTitle,
18
- children: title
19
- }),
20
- badges && /* @__PURE__ */ jsx("div", {
21
- className: style_default.MethodBadges,
22
- children: badges
23
- }),
24
- signature,
25
- children
26
- ]
27
- });
28
- }
29
- function MethodRoute({ httpMethod, endpoint, iconOnly }) {
30
- const httpMethodTyped = getHttpMethod(httpMethod);
31
- return /* @__PURE__ */ jsxs("div", {
32
- className: style_default.MethodRoute,
33
- children: [httpMethod ? httpMethodTyped && /* @__PURE__ */ jsx(Badge.HTTP, {
34
- method: httpMethodTyped,
35
- iconOnly,
36
- size: "sm"
37
- }) : /* @__PURE__ */ jsx(Badge, {
38
- size: "sm",
39
- icon: /* @__PURE__ */ jsx(FunctionIcon, {}),
40
- intent: "info",
41
- children: !iconOnly && "Function"
42
- }), endpoint && /* @__PURE__ */ jsx("span", {
43
- className: style_default.MethodRouteEndpoint,
44
- children: endpoint
45
- })]
46
- });
47
- }
48
- function MethodDescription({ description }) {
49
- const { Markdown } = useComponents();
50
- if (description) return /* @__PURE__ */ jsx("div", {
51
- className: style_default.MethodDescription,
52
- children: /* @__PURE__ */ jsx(Markdown, { content: description })
53
- });
54
- }
55
- function MethodInfo({ children, parameters, returns }) {
56
- return /* @__PURE__ */ jsxs("div", {
57
- className: style_default.MethodInfo,
58
- children: [
59
- children && /* @__PURE__ */ jsx("div", {
60
- className: style_default.MethodContent,
61
- children
62
- }),
63
- parameters && /* @__PURE__ */ jsxs("div", {
64
- className: style_default.MethodInfoSection,
65
- children: [/* @__PURE__ */ jsxs("h5", { children: ["Parameters", /* @__PURE__ */ jsx(PropertyToggle, { target: "parameters" })] }), /* @__PURE__ */ jsx("div", {
66
- className: style_default.MethodParameters,
67
- "data-stldocs-property-group": "parameters",
68
- children: parameters
69
- })]
70
- }),
71
- returns && /* @__PURE__ */ jsxs("div", {
72
- className: style_default.MethodInfoSection,
73
- children: [/* @__PURE__ */ jsxs("h5", { children: ["Returns", /* @__PURE__ */ jsx(PropertyToggle, { target: "returns" })] }), /* @__PURE__ */ jsx("div", {
74
- className: style_default.MethodReturns,
75
- "data-stldocs-property-group": "returns",
76
- children: returns
77
- })]
78
- })
79
- ]
80
- });
81
- }
82
- function Method({ id, header, children, className, ...props }) {
83
- return /* @__PURE__ */ jsxs("div", {
84
- id,
85
- className: clsx(style_default.Method, className),
86
- tabIndex: 0,
87
- ...props,
88
- children: [header, /* @__PURE__ */ jsx("div", {
89
- className: style_default.MethodBody,
90
- children
91
- })]
92
- });
93
- }
94
-
95
- //#endregion
96
- export { MethodRoute as a, MethodInfo as i, MethodDescription as n, MethodHeader as r, Method as t };
@@ -1,59 +0,0 @@
1
- import * as React$1 from "react";
2
- import { ReactNode } from "react";
3
- import * as react_jsx_runtime20 from "react/jsx-runtime";
4
-
5
- //#region src/components/method.d.ts
6
- type MethodHeaderProps = {
7
- title: ReactNode;
8
- level?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5';
9
- signature?: ReactNode;
10
- badges?: ReactNode;
11
- children?: ReactNode;
12
- };
13
- declare function MethodHeader({
14
- title,
15
- badges,
16
- signature,
17
- children,
18
- level
19
- }: MethodHeaderProps): react_jsx_runtime20.JSX.Element;
20
- type MethodRouteProps = {
21
- httpMethod?: string;
22
- endpoint?: string | ReactNode;
23
- iconOnly?: boolean;
24
- };
25
- declare function MethodRoute({
26
- httpMethod,
27
- endpoint,
28
- iconOnly
29
- }: MethodRouteProps): react_jsx_runtime20.JSX.Element;
30
- type MethodDescriptionProps = {
31
- description?: string;
32
- };
33
- declare function MethodDescription({
34
- description
35
- }: MethodDescriptionProps): react_jsx_runtime20.JSX.Element | undefined;
36
- type MethodInfoProps = {
37
- children?: ReactNode;
38
- parameters?: ReactNode;
39
- returns?: ReactNode;
40
- };
41
- declare function MethodInfo({
42
- children,
43
- parameters,
44
- returns
45
- }: MethodInfoProps): react_jsx_runtime20.JSX.Element;
46
- type MethodProps = {
47
- id?: string;
48
- header?: ReactNode;
49
- children?: ReactNode;
50
- } & React$1.HTMLProps<HTMLDivElement>;
51
- declare function Method({
52
- id,
53
- header,
54
- children,
55
- className,
56
- ...props
57
- }: MethodProps): react_jsx_runtime20.JSX.Element;
58
- //#endregion
59
- export { MethodHeaderProps as a, MethodProps as c, MethodHeader as i, MethodRoute as l, MethodDescription as n, MethodInfo as o, MethodDescriptionProps as r, MethodInfoProps as s, Method as t, MethodRouteProps as u };
@@ -1,29 +0,0 @@
1
- import { t as DocsLanguage } from "./routing-qJMPICGo.js";
2
- import * as React$1 from "react";
3
- import * as react_jsx_runtime94 from "react/jsx-runtime";
4
-
5
- //#region src/contexts/navigation.d.ts
6
- type NavigationHandler = (ev: React$1.MouseEvent | null, opts: {
7
- href: string;
8
- language: DocsLanguage;
9
- stainlessPath: string;
10
- scroll: boolean;
11
- }) => void;
12
- type NavigationContextType = {
13
- basePath?: string;
14
- selectedPath?: string;
15
- navigationPath?: string[];
16
- onNavigate?: NavigationHandler;
17
- };
18
- declare function useNavigation(): NavigationContextType;
19
- type NavigationProviderProps = NavigationContextType & {
20
- children: React$1.ReactNode;
21
- };
22
- declare function NavigationProvider({
23
- basePath,
24
- selectedPath,
25
- onNavigate,
26
- children
27
- }: NavigationProviderProps): react_jsx_runtime94.JSX.Element;
28
- //#endregion
29
- export { useNavigation as a, NavigationProviderProps as i, NavigationHandler as n, NavigationProvider as r, NavigationContextType as t };