@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,9 +1,270 @@
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 { a as TypeName, i as Type, n as MethodSignature, r as Property, t as Declaration } from "../python-nqOBH7GS.js";
1
+ import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
+ import "../use-strict-context-L0c8JKg4.js";
3
+ import { useLanguageComponents } from "../contexts/index.js";
4
+ import { useComponents } from "../contexts/use-components.js";
5
+ import style_default from "../style.js";
6
+ import * as React$1 from "react";
7
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
8
 
9
- export { Declaration, MethodSignature, Property, Type, TypeName };
9
+ //#region src/languages/python.tsx
10
+ var python_exports = /* @__PURE__ */ __exportAll({
11
+ Declaration: () => Declaration,
12
+ MethodSignature: () => MethodSignature,
13
+ Property: () => Property,
14
+ Type: () => Type,
15
+ TypeName: () => TypeName
16
+ });
17
+ const constStyle = {
18
+ string: style_default.LiteralString,
19
+ number: style_default.LiteralNumeric,
20
+ boolean: style_default.LiteralBoolean
21
+ };
22
+ function showFullType(type) {
23
+ if (type.kind !== "PythonTypeReference") return false;
24
+ return type.typeName === "Optional" ? showFullType(type.typeParameters[0]) : type.typeParameters.length > 0;
25
+ }
26
+ function TypeName({ type }) {
27
+ const Lang = useLanguageComponents();
28
+ if (type.kind === "PythonTypeReference") switch (type.typeName) {
29
+ case "Optional": return /* @__PURE__ */ jsx(Lang.TypeName, { type: type.typeParameters[0] });
30
+ case "List":
31
+ case "Iterable":
32
+ case "Literal":
33
+ case "Union": return type.typeName.toLowerCase();
34
+ }
35
+ return /* @__PURE__ */ jsx(Lang.Type, { type });
36
+ }
37
+ function Type({ type }) {
38
+ const Lang = useLanguageComponents();
39
+ const { Join, SDKReference } = useComponents();
40
+ switch (type.kind) {
41
+ case "PythonTypeAny":
42
+ case "PythonTypeUnknown":
43
+ case "PythonTypeInt":
44
+ case "PythonTypeFloat":
45
+ case "PythonTypeBool": return /* @__PURE__ */ jsx("span", {
46
+ className: style_default.Type,
47
+ children: /* @__PURE__ */ jsx("span", {
48
+ className: style_default.TypeKeyword,
49
+ children: type.kind.slice(10).toLowerCase()
50
+ })
51
+ });
52
+ case "PythonTypeString": return /* @__PURE__ */ jsx("span", {
53
+ className: style_default.Type,
54
+ children: /* @__PURE__ */ jsx("span", {
55
+ className: style_default.TypeString,
56
+ children: "str"
57
+ })
58
+ });
59
+ case "PythonTypeLiteral": return /* @__PURE__ */ jsx("span", {
60
+ className: style_default.Type,
61
+ children: /* @__PURE__ */ jsx("span", {
62
+ className: constStyle[typeof type.literal.value],
63
+ children: JSON.stringify(type.literal.value)
64
+ })
65
+ });
66
+ case "PythonTypeArray": return /* @__PURE__ */ jsxs("span", {
67
+ className: style_default.Type,
68
+ children: [
69
+ /* @__PURE__ */ jsx("span", {
70
+ className: style_default.TypeArray,
71
+ children: "Array<"
72
+ }),
73
+ /* @__PURE__ */ jsx(Lang.Type, { type: type.elementType }),
74
+ /* @__PURE__ */ jsx("span", {
75
+ className: style_default.TypeArray,
76
+ children: ">"
77
+ })
78
+ ]
79
+ });
80
+ case "PythonTypeClass": return /* @__PURE__ */ jsx("span", {
81
+ className: style_default.Type,
82
+ children: /* @__PURE__ */ jsx("span", {
83
+ className: style_default.TypeKeyword,
84
+ children: "class"
85
+ })
86
+ });
87
+ case "PythonTypeMap": return /* @__PURE__ */ jsx("span", {
88
+ className: style_default.Type,
89
+ children: /* @__PURE__ */ jsx("span", {
90
+ className: style_default.TypeKeyword,
91
+ children: "Dict"
92
+ })
93
+ });
94
+ case "PythonTypeReference": {
95
+ const params = type.typeParameters?.map((param, key) => /* @__PURE__ */ jsx(Lang.Type, { type: param }, key));
96
+ return /* @__PURE__ */ jsxs("span", {
97
+ className: style_default.Type,
98
+ children: [/* @__PURE__ */ jsx("span", {
99
+ className: type.typeName === "Optional" ? style_default.TypeArray : "",
100
+ children: /* @__PURE__ */ jsx(SDKReference, {
101
+ stainlessPath: type.$ref,
102
+ children: type.typeName
103
+ })
104
+ }), params && params.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [
105
+ /* @__PURE__ */ jsx("span", {
106
+ className: style_default.TypeBracket,
107
+ children: "["
108
+ }),
109
+ /* @__PURE__ */ jsx(Join, {
110
+ items: params,
111
+ limit: 3,
112
+ children: /* @__PURE__ */ jsx("span", {
113
+ className: style_default.TextOperator,
114
+ children: ", "
115
+ })
116
+ }),
117
+ /* @__PURE__ */ jsx("span", {
118
+ className: style_default.TypeBracket,
119
+ children: "]"
120
+ })
121
+ ] })]
122
+ });
123
+ }
124
+ }
125
+ }
126
+ function MethodSignature({ decl }) {
127
+ const Lang = useLanguageComponents();
128
+ const { Join, Tooltip } = useComponents();
129
+ const params = decl.parameters.map((param, i) => /* @__PURE__ */ jsx(React$1.Fragment, { children: /* @__PURE__ */ jsx(Tooltip, {
130
+ content: /* @__PURE__ */ jsx(Lang.Type, { type: param.type }),
131
+ children: /* @__PURE__ */ jsx("span", {
132
+ className: style_default.TextIdentifier,
133
+ children: param.ident
134
+ })
135
+ }) }, i));
136
+ return /* @__PURE__ */ jsx("div", {
137
+ className: style_default.MethodSignature,
138
+ children: /* @__PURE__ */ jsxs("span", {
139
+ className: style_default.SignatureTitle,
140
+ children: [
141
+ decl.async && /* @__PURE__ */ jsx("span", {
142
+ className: style_default.TextKeyword,
143
+ children: "async "
144
+ }),
145
+ decl.qualified && /* @__PURE__ */ jsx("span", {
146
+ className: style_default.SignatureQualified,
147
+ children: /* @__PURE__ */ jsx("span", {
148
+ className: style_default.TextIdentifier,
149
+ children: decl.qualified?.slice(0, -decl.ident.length)
150
+ })
151
+ }),
152
+ /* @__PURE__ */ jsx("span", {
153
+ className: style_default.SignatureName,
154
+ children: /* @__PURE__ */ jsx("span", {
155
+ className: style_default.TextIdentifier,
156
+ children: decl.ident
157
+ })
158
+ }),
159
+ /* @__PURE__ */ jsxs("span", {
160
+ className: style_default.MethodSignature,
161
+ children: [
162
+ /* @__PURE__ */ jsx("span", {
163
+ className: style_default.SignatureParen,
164
+ children: "("
165
+ }),
166
+ /* @__PURE__ */ jsx("span", {
167
+ className: style_default.SignatureParams,
168
+ children: /* @__PURE__ */ jsx(Join, {
169
+ items: params,
170
+ children: /* @__PURE__ */ jsx("span", {
171
+ className: style_default.TextOperator,
172
+ children: ", "
173
+ })
174
+ })
175
+ }),
176
+ /* @__PURE__ */ jsxs("span", {
177
+ className: style_default.SignatureParen,
178
+ children: [")", " "]
179
+ }),
180
+ decl.returns && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
181
+ className: style_default.TextOperator,
182
+ children: " -> "
183
+ }), /* @__PURE__ */ jsx(Lang.Type, { type: decl.returns })] })
184
+ ]
185
+ })
186
+ ]
187
+ })
188
+ });
189
+ }
190
+ function Property({ decl, children }) {
191
+ const Lang = useLanguageComponents();
192
+ if (!decl) return;
193
+ switch (decl.kind) {
194
+ case "PythonDeclProperty": return children({
195
+ name: decl.ident,
196
+ typeName: /* @__PURE__ */ jsx(Lang.TypeName, { type: decl.type }),
197
+ type: showFullType(decl.type) && /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
198
+ });
199
+ case "PythonDeclClass": return children({
200
+ name: decl.ident,
201
+ typeName: "class"
202
+ });
203
+ case "PythonDeclType": return children({
204
+ name: decl.ident,
205
+ typeName: "type",
206
+ type: /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
207
+ });
208
+ case "PythonDeclReference": return children({ type: /* @__PURE__ */ jsx(Lang.Type, { type: decl.type }) });
209
+ }
210
+ }
211
+ function Declaration({ decl }) {
212
+ const Lang = useLanguageComponents();
213
+ if (!decl) return;
214
+ switch (decl.kind) {
215
+ case "PythonDeclProperty": {
216
+ const nullable = decl.type.kind === "PythonTypeReference" && decl.type.typeName === "Optional" && (decl.type.typeParameters ?? []).length > 0;
217
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
218
+ /* @__PURE__ */ jsx("span", {
219
+ className: style_default.TypePropertyName,
220
+ children: /* @__PURE__ */ jsx("span", {
221
+ className: style_default.TextIdentifier,
222
+ children: decl.ident
223
+ })
224
+ }),
225
+ /* @__PURE__ */ jsx("span", {
226
+ className: style_default.TextPunctuation,
227
+ children: ": "
228
+ }),
229
+ decl.optional && !nullable ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
230
+ /* @__PURE__ */ jsx("span", {
231
+ className: style_default.TypePlain,
232
+ children: "Optional"
233
+ }),
234
+ /* @__PURE__ */ jsx("span", {
235
+ className: style_default.TypeBracket,
236
+ children: "["
237
+ }),
238
+ /* @__PURE__ */ jsx(Lang.Type, { type: decl.type }),
239
+ /* @__PURE__ */ jsx("span", {
240
+ className: style_default.TypeBrace,
241
+ children: "]"
242
+ })
243
+ ] }) : /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
244
+ ] });
245
+ }
246
+ case "PythonDeclClass": return /* @__PURE__ */ jsxs(Fragment$1, { children: [
247
+ /* @__PURE__ */ jsx("span", {
248
+ className: style_default.TextKeyword,
249
+ children: "class "
250
+ }),
251
+ /* @__PURE__ */ jsx("span", {
252
+ className: style_default.TextIdentifier,
253
+ children: decl.ident
254
+ }),
255
+ /* @__PURE__ */ jsx("span", {
256
+ className: style_default.TextPunctuation,
257
+ children: ": "
258
+ }),
259
+ /* @__PURE__ */ jsx("span", {
260
+ className: `${style_default.TypePreviewContent} ${style_default.TextPunctuation}`,
261
+ children: "…"
262
+ })
263
+ ] });
264
+ case "PythonDeclType": return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Lang.Type, { type: decl.type }) });
265
+ case "PythonDeclReference": return /* @__PURE__ */ jsx(Lang.Type, { type: decl.type });
266
+ }
267
+ }
268
+
269
+ //#endregion
270
+ export { Declaration, MethodSignature, Property, Type, TypeName, python_exports as t };
@@ -1,14 +1,40 @@
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 { ct as Declaration, dt as MethodSignatureProps, ft as Property, ht as TypeName, lt as DeclarationProps, mt as Type, pt as PropertyProps, ut as MethodSignature } 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 { h as RubyAST } 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/ruby.d.ts
7
+ declare namespace ruby_d_exports {
8
+ export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName };
9
+ }
10
+ type TypeProps = {
11
+ type: RubyAST.RubyType;
12
+ };
13
+ declare function TypeName({
14
+ type
15
+ }: TypeProps): string | react_jsx_runtime0.JSX.Element;
16
+ declare function Type({
17
+ type
18
+ }: TypeProps): react_jsx_runtime0.JSX.Element;
19
+ type MethodSignatureProps = {
20
+ decl: RubyAST.RubyDeclFunction;
21
+ };
22
+ declare function MethodSignature({
23
+ decl
24
+ }: MethodSignatureProps): react_jsx_runtime0.JSX.Element;
25
+ type PropertyProps = {
26
+ decl: RubyAST.RubyDeclaration;
27
+ children: PropertyFn;
28
+ };
29
+ declare function Property({
30
+ decl,
31
+ children
32
+ }: PropertyProps): React$1.ReactNode;
33
+ type DeclarationProps = {
34
+ decl: RubyAST.RubyDeclaration;
35
+ };
36
+ declare function Declaration({
37
+ decl
38
+ }: DeclarationProps): react_jsx_runtime0.JSX.Element | undefined;
39
+ //#endregion
40
+ export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName, ruby_d_exports as t };