@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,244 @@
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 TerraformSource, i as Resource, n as MethodSignature, o as Type, r as Property, s as TypeName, t as Declaration } from "../terraform-DVx2ea2h.js";
1
+ import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
+ import { useDeclaration } from "../contexts/docs.js";
3
+ import "../use-strict-context-L0c8JKg4.js";
4
+ import { useLanguageComponents } from "../contexts/index.js";
5
+ import { useComponents } from "../contexts/use-components.js";
6
+ import style_default from "../style.js";
7
+ import "react";
8
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
+ import clsx from "clsx";
10
+ import { Badge, Callout } from "@stainless-api/ui-primitives";
8
11
 
9
- export { Declaration, MethodSignature, Property, Resource, TerraformSource, Type, TypeName };
12
+ //#region src/languages/terraform.tsx
13
+ var terraform_exports = /* @__PURE__ */ __exportAll({
14
+ Declaration: () => Declaration,
15
+ MethodSignature: () => MethodSignature,
16
+ Property: () => Property,
17
+ Resource: () => Resource,
18
+ TerraformSource: () => TerraformSource,
19
+ Type: () => Type,
20
+ TypeName: () => TypeName
21
+ });
22
+ function TypeName({ type }) {
23
+ return /* @__PURE__ */ jsx(useLanguageComponents().Type, { type });
24
+ }
25
+ function Type({ type }) {
26
+ const Lang = useLanguageComponents();
27
+ const { Join } = useComponents();
28
+ switch (type.category) {
29
+ case "nested": switch (type.type) {
30
+ case "ListNested":
31
+ case "MapNested":
32
+ case "SetNested": return /* @__PURE__ */ jsxs("span", {
33
+ className: style_default.Type,
34
+ children: [
35
+ /* @__PURE__ */ jsx("span", {
36
+ className: style_default.TypeArray,
37
+ children: type.type.replace("Nested", "")
38
+ }),
39
+ /* @__PURE__ */ jsx("span", {
40
+ className: style_default.TypeBracket,
41
+ children: "["
42
+ }),
43
+ /* @__PURE__ */ jsx("span", {
44
+ className: style_default.TypeReference,
45
+ children: "Attributes"
46
+ }),
47
+ /* @__PURE__ */ jsx("span", {
48
+ className: style_default.TypeBracket,
49
+ children: "]"
50
+ })
51
+ ]
52
+ });
53
+ case "SingleNested": return /* @__PURE__ */ jsx("span", {
54
+ className: style_default.Type,
55
+ children: /* @__PURE__ */ jsx("span", {
56
+ className: style_default.TypeReference,
57
+ children: "Attributes"
58
+ })
59
+ });
60
+ default: return;
61
+ }
62
+ case "collection": return /* @__PURE__ */ jsxs("span", {
63
+ className: style_default.Type,
64
+ children: [
65
+ /* @__PURE__ */ jsx("span", {
66
+ className: style_default.TypeArray,
67
+ children: type.type
68
+ }),
69
+ /* @__PURE__ */ jsx("span", {
70
+ className: style_default.TypeBracket,
71
+ children: "["
72
+ }),
73
+ /* @__PURE__ */ jsx(Lang.Type, { type: type.elementType }),
74
+ /* @__PURE__ */ jsx("span", {
75
+ className: style_default.TypeBracket,
76
+ children: "]"
77
+ })
78
+ ]
79
+ });
80
+ case "dynamic": {
81
+ const subtypes = type.allowedSubtypes.length > 0 ? /* @__PURE__ */ jsx(Join, {
82
+ items: type.allowedSubtypes,
83
+ children: " | "
84
+ }) : null;
85
+ return /* @__PURE__ */ jsx("span", {
86
+ className: style_default.Type,
87
+ children: /* @__PURE__ */ jsxs("span", {
88
+ className: style_default.TypeKeyword,
89
+ children: ["Dynamic ", subtypes]
90
+ })
91
+ });
92
+ }
93
+ case "primitive":
94
+ if (type.type === "String") return /* @__PURE__ */ jsx("span", {
95
+ className: style_default.Type,
96
+ children: /* @__PURE__ */ jsx("span", {
97
+ className: style_default.TypeString,
98
+ children: "String"
99
+ })
100
+ });
101
+ return /* @__PURE__ */ jsx("span", {
102
+ className: style_default.Type,
103
+ children: /* @__PURE__ */ jsx("span", {
104
+ className: style_default.TypeKeyword,
105
+ children: type.type
106
+ })
107
+ });
108
+ case "unknown": return /* @__PURE__ */ jsx("span", {
109
+ className: style_default.Type,
110
+ children: /* @__PURE__ */ jsx("span", {
111
+ className: style_default.TypeKeyword,
112
+ children: "JSON"
113
+ })
114
+ });
115
+ }
116
+ }
117
+ function MethodSignature() {
118
+ return null;
119
+ }
120
+ const PropGroups = [
121
+ "required",
122
+ "optional",
123
+ "computed"
124
+ ];
125
+ function Property({ decl, children }) {
126
+ if (!decl) return null;
127
+ switch (decl.kind) {
128
+ case "TerraformDeclAttribute": return children({ name: decl.name });
129
+ }
130
+ }
131
+ function TerraformSource({ path, group }) {
132
+ const Docs = useComponents();
133
+ const decl = useDeclaration(path, true);
134
+ if (decl.kind !== "TerraformDeclSource") return;
135
+ const type = decl.type === "resource" ? "resource" : "data";
136
+ const badge = type === "resource" ? `success` : `note`;
137
+ const children = PropGroups.filter((section) => decl[section].length > 0).map((section) => {
138
+ const propGroupId = `${decl.name}-${section}-${group}`;
139
+ return /* @__PURE__ */ jsxs("div", {
140
+ className: style_default.ResourceContentGroup,
141
+ children: [/* @__PURE__ */ jsxs("h5", {
142
+ className: style_default.ResourceContentGroupModelTitle,
143
+ children: [
144
+ section,
145
+ " ",
146
+ /* @__PURE__ */ jsx(Docs.PropertyToggle, { target: propGroupId })
147
+ ]
148
+ }), /* @__PURE__ */ jsx("div", {
149
+ className: style_default.ResourceContentProperties,
150
+ "data-stldocs-property-group": propGroupId,
151
+ children: /* @__PURE__ */ jsx(Docs.SDKChildren, { paths: decl[section] })
152
+ })]
153
+ }, section);
154
+ });
155
+ return /* @__PURE__ */ jsx("div", {
156
+ className: clsx(style_default.Method, style_default.MethodDoublePane),
157
+ children: /* @__PURE__ */ jsxs("div", {
158
+ className: style_default.MethodBody,
159
+ children: [/* @__PURE__ */ jsxs("div", {
160
+ className: style_default.MethodContentColumn,
161
+ children: [/* @__PURE__ */ jsxs("h4", {
162
+ className: style_default.TerraformResourceTitle,
163
+ children: [
164
+ /* @__PURE__ */ jsx(Badge, {
165
+ intent: badge,
166
+ children: type
167
+ }),
168
+ " ",
169
+ decl.name
170
+ ]
171
+ }), children]
172
+ }), /* @__PURE__ */ jsx("div", {
173
+ className: clsx(style_default.MethodExample, "not-content", "stl-ui-not-prose"),
174
+ children: /* @__PURE__ */ jsx(Docs.SDKExample, { method: {
175
+ title: decl.name,
176
+ stainlessPath: path
177
+ } })
178
+ })]
179
+ })
180
+ });
181
+ }
182
+ function Declaration({ decl }) {
183
+ const Lang = useLanguageComponents();
184
+ if (!decl) return;
185
+ switch (decl.kind) {
186
+ case "TerraformDeclAttribute": {
187
+ const isOptional = decl.configurability === "optional" || decl.configurability === "computed_optional";
188
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
189
+ /* @__PURE__ */ jsx("span", {
190
+ className: style_default.TextIdentifier,
191
+ children: decl.name
192
+ }),
193
+ isOptional && /* @__PURE__ */ jsx("span", {
194
+ className: style_default.TextPunctuation,
195
+ children: "?"
196
+ }),
197
+ /* @__PURE__ */ jsx("span", {
198
+ className: style_default.TextPunctuation,
199
+ children: ": "
200
+ }),
201
+ /* @__PURE__ */ jsx("span", {
202
+ className: style_default.TextKeyword,
203
+ children: /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
204
+ })
205
+ ] });
206
+ }
207
+ case "TerraformDeclServiceNode": {
208
+ const { resource, dataSource, listDataSource } = decl;
209
+ return /* @__PURE__ */ jsxs("div", {
210
+ className: style_default.Method,
211
+ children: [
212
+ resource && /* @__PURE__ */ jsx(TerraformSource, {
213
+ path: resource,
214
+ group: "resource"
215
+ }),
216
+ dataSource && /* @__PURE__ */ jsx(TerraformSource, {
217
+ path: dataSource,
218
+ group: "dataSource"
219
+ }),
220
+ listDataSource && /* @__PURE__ */ jsx(TerraformSource, {
221
+ path: listDataSource,
222
+ group: "listDataSource"
223
+ })
224
+ ]
225
+ });
226
+ }
227
+ }
228
+ }
229
+ function Resource({ resource }) {
230
+ const Lang = useLanguageComponents();
231
+ const decl = useDeclaration(resource.stainlessPath, false);
232
+ if (decl) return /* @__PURE__ */ jsx(Lang.Declaration, { decl });
233
+ return /* @__PURE__ */ jsxs(Callout, {
234
+ variant: "warning",
235
+ children: [
236
+ "The resource ",
237
+ /* @__PURE__ */ jsx("code", { children: resource.name }),
238
+ " is not supported in Terraform."
239
+ ]
240
+ });
241
+ }
242
+
243
+ //#endregion
244
+ export { Declaration, MethodSignature, Property, Resource, TerraformSource, Type, TypeName, terraform_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 { Gt as Declaration, Jt as MethodSignatureProps, Kt as DeclarationProps, Qt as TypeName, Xt as PropertyProps, Yt as Property, Zt as Type, qt 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 { y as TSAST } 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/typescript.d.ts
7
+ declare namespace typescript_d_exports {
8
+ export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName };
9
+ }
10
+ type TypeProps = {
11
+ type: TSAST.TSType;
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: TSAST.TSDeclFunction;
21
+ };
22
+ declare function MethodSignature({
23
+ decl
24
+ }: MethodSignatureProps): react_jsx_runtime0.JSX.Element;
25
+ type PropertyProps = {
26
+ decl: TSAST.TSDeclaration;
27
+ children: PropertyFn;
28
+ };
29
+ declare function Property({
30
+ decl,
31
+ children
32
+ }: PropertyProps): React$1.ReactNode;
33
+ type DeclarationProps = {
34
+ decl: TSAST.TSDeclaration;
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, typescript_d_exports as t };