@stainless-api/docs-ui 0.1.0-beta.9 → 0.1.0-beta.91

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 (162) hide show
  1. package/dist/breadcrumbs-BaNU4WsC.d.ts +25 -0
  2. package/dist/chunk-pbuEa-1d.js +13 -0
  3. package/dist/component-generics-D9XaPlr8.d.ts +30 -0
  4. package/dist/component-generics-DYxBWv1v.js +42 -0
  5. package/dist/components/MaskedInput.d.ts +14 -0
  6. package/dist/components/MaskedInput.js +74 -0
  7. package/dist/components/breadcrumbs.d.ts +2 -0
  8. package/dist/components/breadcrumbs.js +61 -0
  9. package/dist/components/icons.d.ts +72 -0
  10. package/dist/components/icons.js +953 -0
  11. package/dist/components/index.d.ts +10 -0
  12. package/dist/components/index.js +72 -0
  13. package/dist/components/method.d.ts +2 -0
  14. package/dist/components/method.js +94 -0
  15. package/dist/components/overview.d.ts +2 -0
  16. package/dist/components/overview.js +139 -0
  17. package/dist/components/primitives.d.ts +2 -0
  18. package/dist/components/primitives.js +250 -0
  19. package/dist/components/properties.d.ts +2 -0
  20. package/dist/components/properties.js +143 -0
  21. package/dist/components/sdk-sidebar.d.ts +2 -0
  22. package/dist/components/sdk-sidebar.js +49 -0
  23. package/dist/components/sdk.d.ts +2 -0
  24. package/dist/components/sdk.js +487 -0
  25. package/dist/components/snippets.d.ts +2 -0
  26. package/dist/components/snippets.js +183 -0
  27. package/dist/components/stl-sidebar.d.ts +2 -0
  28. package/dist/components/stl-sidebar.js +111 -0
  29. package/dist/contexts/component-generics.d.ts +2 -0
  30. package/dist/contexts/component-generics.js +2 -0
  31. package/dist/contexts/component-types.d.ts +7 -0
  32. package/dist/contexts/component-types.js +0 -0
  33. package/dist/contexts/component.d.ts +20 -0
  34. package/dist/contexts/component.js +21 -0
  35. package/dist/contexts/docs.d.ts +2 -0
  36. package/dist/contexts/docs.js +89 -0
  37. package/dist/contexts/index.d.ts +6 -0
  38. package/dist/contexts/index.js +43 -0
  39. package/dist/contexts/markdown.d.ts +2 -0
  40. package/dist/contexts/markdown.js +62 -0
  41. package/dist/contexts/navigation.d.ts +2 -0
  42. package/dist/contexts/navigation.js +21 -0
  43. package/dist/contexts/use-components.d.ts +6 -0
  44. package/dist/contexts/use-components.js +5 -0
  45. package/dist/docs-D0qzNoXq.d.ts +62 -0
  46. package/dist/index-DFr9Mesr.d.ts +1776 -0
  47. package/dist/index-Dt9uPKZP.d.ts +464 -0
  48. package/dist/index.d.ts +5 -0
  49. package/dist/index.js +7 -7542
  50. package/dist/languages/cli.d.ts +2 -0
  51. package/dist/languages/cli.js +164 -0
  52. package/dist/languages/csharp.d.ts +2 -0
  53. package/dist/languages/csharp.js +281 -0
  54. package/dist/languages/go.d.ts +2 -0
  55. package/dist/languages/go.js +301 -0
  56. package/dist/languages/http.d.ts +2 -0
  57. package/dist/languages/http.js +381 -0
  58. package/dist/languages/index.d.ts +2 -0
  59. package/dist/languages/index.js +30 -0
  60. package/dist/languages/java.d.ts +2 -0
  61. package/dist/languages/java.js +401 -0
  62. package/dist/languages/php.d.ts +2 -0
  63. package/dist/languages/php.js +310 -0
  64. package/dist/languages/python.d.ts +2 -0
  65. package/dist/languages/python.js +267 -0
  66. package/dist/languages/ruby.d.ts +2 -0
  67. package/dist/languages/ruby.js +385 -0
  68. package/dist/languages/terraform.d.ts +2 -0
  69. package/dist/languages/terraform.js +258 -0
  70. package/dist/languages/typescript.d.ts +2 -0
  71. package/dist/languages/typescript.js +447 -0
  72. package/dist/markdown/index.d.ts +11 -0
  73. package/dist/markdown/index.js +86 -0
  74. package/dist/markdown/md.d.ts +15 -0
  75. package/dist/markdown/md.js +39 -0
  76. package/dist/markdown/printer.d.ts +13 -0
  77. package/dist/markdown/printer.js +73 -0
  78. package/dist/markdown/utils.d.ts +28 -0
  79. package/dist/markdown/utils.js +31 -0
  80. package/dist/markdown-B30HO-Vy.d.ts +33 -0
  81. package/dist/method-BKJnP-rW.d.ts +59 -0
  82. package/dist/navigation-DGl8lR6w.d.ts +29 -0
  83. package/dist/overview-iH1evPEF.d.ts +39 -0
  84. package/dist/primitives-BHt-BuLf.d.ts +107 -0
  85. package/dist/properties-CCbMRhSX.d.ts +54 -0
  86. package/dist/routing-yTSG7nWM.d.ts +61 -0
  87. package/dist/routing.d.ts +2 -0
  88. package/dist/routing.js +174 -150
  89. package/dist/sdk-BengV7mg.d.ts +128 -0
  90. package/dist/sdk-sidebar-CRqLm3YO.d.ts +15 -0
  91. package/dist/spec.d.ts +65 -0
  92. package/dist/spec.js +165 -0
  93. package/dist/stl-sidebar-Pra9uCYo.d.ts +58 -0
  94. package/dist/style.d.ts +178 -0
  95. package/dist/style.js +178 -0
  96. package/dist/styles/main.css +765 -755
  97. package/dist/styles/primitives.css +359 -442
  98. package/dist/styles/resets.css +25 -41
  99. package/dist/styles/search.css +187 -270
  100. package/dist/styles/sidebar.css +155 -69
  101. package/dist/styles/variables.css +23 -89
  102. package/dist/styles.css +3171 -0
  103. package/dist/utils.d.ts +20 -0
  104. package/dist/utils.js +52 -0
  105. package/package.json +75 -22
  106. package/dist/mcp.js +0 -16003
  107. package/dist/styles/snippets.css +0 -132
  108. package/src/components/breadcrumbs.tsx +0 -94
  109. package/src/components/chat.tsx +0 -154
  110. package/src/components/dropdown.tsx +0 -91
  111. package/src/components/icons.tsx +0 -584
  112. package/src/components/index.ts +0 -9
  113. package/src/components/method.tsx +0 -146
  114. package/src/components/overview.tsx +0 -160
  115. package/src/components/primitives.tsx +0 -284
  116. package/src/components/properties.tsx +0 -130
  117. package/src/components/scripts/dropdown.ts +0 -78
  118. package/src/components/sdk.tsx +0 -403
  119. package/src/components/sidebar.tsx +0 -99
  120. package/src/components/snippets.tsx +0 -180
  121. package/src/contexts/component-generics.tsx +0 -48
  122. package/src/contexts/component-types.tsx +0 -5
  123. package/src/contexts/component.tsx +0 -32
  124. package/src/contexts/docs.tsx +0 -75
  125. package/src/contexts/index.tsx +0 -17
  126. package/src/contexts/markdown.tsx +0 -43
  127. package/src/contexts/navigation.tsx +0 -44
  128. package/src/contexts/search.tsx +0 -28
  129. package/src/contexts/use-components.tsx +0 -4
  130. package/src/index.ts +0 -6
  131. package/src/languages/go.tsx +0 -281
  132. package/src/languages/http.tsx +0 -321
  133. package/src/languages/index.ts +0 -26
  134. package/src/languages/java.tsx +0 -358
  135. package/src/languages/python.tsx +0 -255
  136. package/src/languages/ruby.tsx +0 -320
  137. package/src/languages/typescript.tsx +0 -393
  138. package/src/markdown/index.ts +0 -107
  139. package/src/markdown/md.ts +0 -45
  140. package/src/markdown/utils.ts +0 -49
  141. package/src/routing.ts +0 -238
  142. package/src/search/form.tsx +0 -127
  143. package/src/search/index.tsx +0 -1
  144. package/src/search/indexer.ts +0 -246
  145. package/src/search/mcp.ts +0 -61
  146. package/src/search/printer.tsx +0 -86
  147. package/src/search/providers/algolia.ts +0 -88
  148. package/src/search/providers/fuse.ts +0 -19
  149. package/src/search/providers/pagefind.ts +0 -17
  150. package/src/search/providers/walker.ts +0 -30
  151. package/src/search/results.tsx +0 -182
  152. package/src/search/state.ts +0 -64
  153. package/src/search/types.ts +0 -116
  154. package/src/style.ts +0 -196
  155. package/src/styles/main.css +0 -986
  156. package/src/styles/primitives.css +0 -580
  157. package/src/styles/resets.css +0 -39
  158. package/src/styles/search.css +0 -341
  159. package/src/styles/sidebar.css +0 -85
  160. package/src/styles/snippets.css +0 -130
  161. package/src/styles/variables.css +0 -86
  162. package/src/utils.ts +0 -41
@@ -0,0 +1,2 @@
1
+ import { B as PropertyProps, F as Declaration, H as TypeName, I as DeclarationProps, L as MethodSignature, R as MethodSignatureProps, V as Type, z as Property } from "../index-Dt9uPKZP.js";
2
+ export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName };
@@ -0,0 +1,164 @@
1
+ import { t as __exportAll } from "../chunk-pbuEa-1d.js";
2
+ import { useLanguageComponents } from "../contexts/index.js";
3
+ import { useComponents } from "../contexts/use-components.js";
4
+ import style_default from "../style.js";
5
+ import { Type as Type$1, TypeName as TypeName$1 } from "./http.js";
6
+ import React from "react";
7
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
+ //#region src/languages/cli.tsx
9
+ var cli_exports = /* @__PURE__ */ __exportAll({
10
+ Declaration: () => Declaration,
11
+ MethodSignature: () => MethodSignature,
12
+ Property: () => Property,
13
+ Type: () => Type,
14
+ TypeName: () => TypeName
15
+ });
16
+ const ComplexTypes = {
17
+ HttpTypeUnion: "union",
18
+ HttpTypeIntersection: "intersection"
19
+ };
20
+ const constStyle = {
21
+ string: style_default.LiteralString,
22
+ number: style_default.LiteralNumeric,
23
+ boolean: style_default.LiteralBoolean
24
+ };
25
+ function TypeName(props) {
26
+ return TypeName$1(props);
27
+ }
28
+ function Type({ type }) {
29
+ switch (type.kind) {
30
+ case "HttpTypeBinary": return /* @__PURE__ */ jsx("span", {
31
+ className: style_default.Type,
32
+ children: /* @__PURE__ */ jsx("span", {
33
+ className: style_default.TypePlain,
34
+ children: "file path"
35
+ })
36
+ });
37
+ default: return Type$1({ type });
38
+ }
39
+ }
40
+ function MethodSignature({ decl }) {
41
+ const { Join } = useComponents();
42
+ const params = decl.arguments?.map((arg, i) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
43
+ /* @__PURE__ */ jsx("span", {
44
+ className: style_default.TextOperator,
45
+ children: "<"
46
+ }),
47
+ /* @__PURE__ */ jsx("span", {
48
+ className: style_default.TextIdentifier,
49
+ children: arg.value
50
+ }),
51
+ /* @__PURE__ */ jsx("span", {
52
+ className: style_default.TextOperator,
53
+ children: ">"
54
+ })
55
+ ] }, i));
56
+ return /* @__PURE__ */ jsxs("div", {
57
+ className: style_default.MethodSignature,
58
+ children: [
59
+ /* @__PURE__ */ jsx("span", {
60
+ className: style_default.TextOperator,
61
+ children: "$ "
62
+ }),
63
+ /* @__PURE__ */ jsx("span", {
64
+ className: style_default.SignatureName,
65
+ children: /* @__PURE__ */ jsx("span", {
66
+ className: style_default.TextIdentifier,
67
+ children: decl.invocation.join(" ")
68
+ })
69
+ }),
70
+ params && /* @__PURE__ */ jsxs("span", {
71
+ className: style_default.MethodSignature,
72
+ children: [" ", /* @__PURE__ */ jsx(Join, {
73
+ items: params,
74
+ children: " "
75
+ })]
76
+ }),
77
+ decl.options && decl.options.length > 0 ? /* @__PURE__ */ jsx("span", {
78
+ className: style_default.TextOperator,
79
+ children: " [options]"
80
+ }) : null
81
+ ]
82
+ });
83
+ }
84
+ function renderVariantInfo(type) {
85
+ if (type.kind === "HttpTypeUnion" && type.types.every((t) => t.kind === "HttpTypeObject" || t.kind === "HttpTypeReference")) return /* @__PURE__ */ jsxs(Fragment$1, { children: [
86
+ "One of the following ",
87
+ type.types.length,
88
+ " object variants:"
89
+ ] });
90
+ }
91
+ function Property({ decl, children }) {
92
+ const Lang = useLanguageComponents();
93
+ if (!decl) return;
94
+ switch (decl.kind) {
95
+ case "CLIFlag":
96
+ case "CLISchemaProperty": {
97
+ const variants = decl.type ? renderVariantInfo(decl.type) : void 0;
98
+ return children({
99
+ name: /* @__PURE__ */ jsxs(Fragment$1, { children: [decl.kind === "CLIFlag" && "--", flagName(decl)] }),
100
+ typeName: decl.type ? /* @__PURE__ */ jsx(Lang.TypeName, { type: decl.type }) : void 0,
101
+ type: decl.type && decl.type.kind in ComplexTypes && !variants && /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
102
+ });
103
+ }
104
+ case "CLIFunction": return children({
105
+ name: decl.name,
106
+ typeName: "function"
107
+ });
108
+ case "CLIStdin": return children({ name: "stdin" });
109
+ case "CLICommand": return children({
110
+ name: decl.invocation.join(" "),
111
+ typeName: "command"
112
+ });
113
+ }
114
+ }
115
+ function flagName(node) {
116
+ if (node.kind === "CLIFlag" && node.flag) return typeof node.flag === "string" ? node.flag : node.flag.name || "";
117
+ return node.name ?? node.ident ?? "unknown";
118
+ }
119
+ function Declaration({ decl }) {
120
+ const Lang = useLanguageComponents();
121
+ if (!decl) return;
122
+ switch (decl.kind) {
123
+ case "CLICommand": return /* @__PURE__ */ jsx("span", {
124
+ className: style_default.TextIdentifier,
125
+ children: `$ ${decl.invocation.join(" ")}`
126
+ });
127
+ case "CLISchemaProperty":
128
+ case "CLIFlag":
129
+ if ("value" in decl) return /* @__PURE__ */ jsx("span", {
130
+ className: constStyle[typeof decl.value],
131
+ children: JSON.stringify(decl.value)
132
+ });
133
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
134
+ className: style_default.PropertyName,
135
+ children: /* @__PURE__ */ jsxs("span", {
136
+ className: style_default.TextIdentifier,
137
+ children: [decl.kind === "CLIFlag" && "--", flagName(decl)]
138
+ })
139
+ }), decl.type && /* @__PURE__ */ jsxs(Fragment$1, { children: [
140
+ /* @__PURE__ */ jsx("span", {
141
+ className: style_default.TextPunctuation,
142
+ children: ": "
143
+ }),
144
+ decl.optional && /* @__PURE__ */ jsx("span", {
145
+ className: style_default.TextPunctuation,
146
+ children: "optional "
147
+ }),
148
+ typeof decl.type === "string" ? /* @__PURE__ */ jsx("span", {
149
+ className: style_default.TextKeyword,
150
+ children: decl.type
151
+ }) : /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
152
+ ] })] });
153
+ case "CLIFunction": return /* @__PURE__ */ jsxs("span", {
154
+ className: style_default.TextIdentifier,
155
+ children: [decl.name, "()"]
156
+ });
157
+ case "CLIStdin": return /* @__PURE__ */ jsx("span", {
158
+ className: style_default.TextIdentifier,
159
+ children: "stdin"
160
+ });
161
+ }
162
+ }
163
+ //#endregion
164
+ export { Declaration, MethodSignature, Property, Type, TypeName, cli_exports as t };
@@ -0,0 +1,2 @@
1
+ import { $ as Declaration, at as Type, et as DeclarationProps, it as PropertyProps, nt as MethodSignatureProps, ot as TypeName, rt as Property, tt as MethodSignature } from "../index-Dt9uPKZP.js";
2
+ export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName };
@@ -0,0 +1,281 @@
1
+ import { t as __exportAll } from "../chunk-pbuEa-1d.js";
2
+ import { useLanguageComponents } from "../contexts/index.js";
3
+ import { useComponents } from "../contexts/use-components.js";
4
+ import style_default from "../style.js";
5
+ import * as React$1 from "react";
6
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
+ //#region src/languages/csharp.tsx
8
+ var csharp_exports = /* @__PURE__ */ __exportAll({
9
+ Declaration: () => Declaration,
10
+ MethodSignature: () => MethodSignature,
11
+ Property: () => Property,
12
+ Type: () => Type,
13
+ TypeName: () => TypeName
14
+ });
15
+ const constStyle = {
16
+ string: style_default.LiteralString,
17
+ number: style_default.LiteralNumeric,
18
+ boolean: style_default.LiteralBoolean
19
+ };
20
+ function TypeName({ type, optional }) {
21
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(useLanguageComponents().Type, { type }), optional && /* @__PURE__ */ jsx("span", {
22
+ className: style_default.TextOperator,
23
+ children: "? "
24
+ })] });
25
+ }
26
+ function Type({ type }) {
27
+ const Lang = useLanguageComponents();
28
+ const { Join, SDKReference } = useComponents();
29
+ switch (type.kind) {
30
+ case "CSharpTypeReference": {
31
+ const params = type.typeParameters?.map((param, key) => /* @__PURE__ */ jsx(Lang.Type, { type: param }, key));
32
+ return /* @__PURE__ */ jsxs("span", {
33
+ className: style_default.Type,
34
+ children: [
35
+ /* @__PURE__ */ jsx(SDKReference, {
36
+ stainlessPath: type.$ref,
37
+ children: type.typeName
38
+ }),
39
+ params && params.length > 0 ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
40
+ /* @__PURE__ */ jsx("span", {
41
+ className: style_default.TypeBracket,
42
+ children: "<"
43
+ }),
44
+ /* @__PURE__ */ jsx(Join, {
45
+ items: params,
46
+ limit: 3,
47
+ children: /* @__PURE__ */ jsx("span", {
48
+ className: style_default.TextOperator,
49
+ children: ", "
50
+ })
51
+ }),
52
+ /* @__PURE__ */ jsx("span", {
53
+ className: style_default.TypeBracket,
54
+ children: ">"
55
+ })
56
+ ] }) : null,
57
+ type.nullable && /* @__PURE__ */ jsx("span", {
58
+ className: style_default.TextOperator,
59
+ children: "?"
60
+ })
61
+ ]
62
+ });
63
+ }
64
+ case "CSharpTypeClass":
65
+ case "CSharpTypeUnion": return /* @__PURE__ */ jsx("span", {
66
+ className: style_default.Type,
67
+ children: /* @__PURE__ */ jsx("span", {
68
+ className: style_default.TypeKeyword,
69
+ children: "class"
70
+ })
71
+ });
72
+ case "CSharpTypeEnum":
73
+ case "CSharpTypeBoolean":
74
+ case "CSharpTypeFloat":
75
+ case "CSharpTypeDouble":
76
+ case "CSharpTypeInt":
77
+ case "CSharpTypeLong": return /* @__PURE__ */ jsx("span", {
78
+ className: style_default.Type,
79
+ children: /* @__PURE__ */ jsx("span", {
80
+ className: style_default.TypeKeyword,
81
+ children: type.kind.slice(10)
82
+ })
83
+ });
84
+ case "CSharpTypeString": return /* @__PURE__ */ jsx("span", {
85
+ className: style_default.Type,
86
+ children: /* @__PURE__ */ jsx("span", {
87
+ className: style_default.TypeString,
88
+ children: "string"
89
+ })
90
+ });
91
+ case "CSharpTypeConstant": return /* @__PURE__ */ jsx("span", {
92
+ className: style_default.Type,
93
+ children: /* @__PURE__ */ jsx("span", {
94
+ className: style_default.TypeKeyword,
95
+ children: "JsonElement"
96
+ })
97
+ });
98
+ }
99
+ }
100
+ function MethodSignature({ decl }) {
101
+ const Lang = useLanguageComponents();
102
+ const { Join, Tooltip } = useComponents();
103
+ const params = decl.parameters.map((param, i) => /* @__PURE__ */ jsx(React$1.Fragment, { children: /* @__PURE__ */ jsxs(Tooltip, {
104
+ content: /* @__PURE__ */ jsx(Lang.Type, { type: param.typeAnnotation }),
105
+ children: [/* @__PURE__ */ jsx("span", {
106
+ className: style_default.TextIdentifier,
107
+ children: param.ident
108
+ }), param.hasDefault && /* @__PURE__ */ jsxs(Fragment$1, { children: [
109
+ " ",
110
+ /* @__PURE__ */ jsx("span", {
111
+ className: style_default.TextOperator,
112
+ children: "="
113
+ }),
114
+ " ",
115
+ /* @__PURE__ */ jsx("span", {
116
+ className: style_default.TextKeyword,
117
+ children: "default"
118
+ })
119
+ ] })]
120
+ }) }, i));
121
+ return /* @__PURE__ */ jsx("div", {
122
+ className: style_default.MethodSignature,
123
+ children: /* @__PURE__ */ jsxs("span", {
124
+ className: style_default.SignatureTitle,
125
+ children: [
126
+ decl.returnType && /* @__PURE__ */ jsxs("span", {
127
+ className: style_default.SignatureReturns,
128
+ children: [/* @__PURE__ */ jsx(Lang.Type, { type: decl.returnType }), " "]
129
+ }),
130
+ decl.qualified && /* @__PURE__ */ jsx("span", {
131
+ className: style_default.SignatureQualified,
132
+ children: /* @__PURE__ */ jsx("span", {
133
+ className: style_default.TextIdentifier,
134
+ children: decl.qualified?.slice(0, -decl.ident.length)
135
+ })
136
+ }),
137
+ /* @__PURE__ */ jsx("span", {
138
+ className: style_default.SignatureName,
139
+ children: /* @__PURE__ */ jsx("span", {
140
+ className: style_default.TextIdentifier,
141
+ children: decl.ident
142
+ })
143
+ }),
144
+ /* @__PURE__ */ jsxs("span", {
145
+ className: style_default.MethodSignature,
146
+ children: [
147
+ /* @__PURE__ */ jsx("span", {
148
+ className: style_default.SignatureParen,
149
+ children: "("
150
+ }),
151
+ /* @__PURE__ */ jsx("span", {
152
+ className: style_default.SignatureParams,
153
+ children: /* @__PURE__ */ jsx(Join, {
154
+ items: params,
155
+ children: /* @__PURE__ */ jsx("span", {
156
+ className: style_default.TextOperator,
157
+ children: ", "
158
+ })
159
+ })
160
+ }),
161
+ /* @__PURE__ */ jsxs("span", {
162
+ className: style_default.SignatureParen,
163
+ children: [")", " "]
164
+ })
165
+ ]
166
+ })
167
+ ]
168
+ })
169
+ });
170
+ }
171
+ function Property({ decl, children }) {
172
+ const Lang = useLanguageComponents();
173
+ if (!decl) return null;
174
+ switch (decl.kind) {
175
+ case "CSharpDeclProperty": {
176
+ const type = /* @__PURE__ */ jsx(Lang.Type, {
177
+ type: decl.type,
178
+ optional: decl.optional
179
+ });
180
+ return children({
181
+ name: decl.ident,
182
+ typeName: /* @__PURE__ */ jsx(Lang.TypeName, {
183
+ type: decl.type,
184
+ optional: decl.optional
185
+ }),
186
+ type
187
+ });
188
+ }
189
+ case "CSharpDeclConst": return children({
190
+ name: decl.ident,
191
+ typeName: "constant",
192
+ type: /* @__PURE__ */ jsx("span", {
193
+ className: constStyle[typeof decl.value],
194
+ children: JSON.stringify(decl.value)
195
+ })
196
+ });
197
+ case "CSharpDeclType": {
198
+ const typeName = decl.type.kind === "CSharpTypeUnion" ? "union" : decl.type.kind === "CSharpTypeEnum" ? "enum" : "class";
199
+ return children({
200
+ name: decl.ident,
201
+ typeName
202
+ });
203
+ }
204
+ case "CSharpDeclReference": return children({ type: /* @__PURE__ */ jsx(Lang.Type, { type: decl.type }) });
205
+ }
206
+ }
207
+ function Declaration({ decl }) {
208
+ const Docs = useComponents();
209
+ const Lang = useLanguageComponents();
210
+ if (!decl) return null;
211
+ switch (decl.kind) {
212
+ case "CSharpDeclConst": return /* @__PURE__ */ jsx(Docs.Tooltip, {
213
+ content: JSON.stringify(decl.value),
214
+ children: /* @__PURE__ */ jsx("span", {
215
+ className: style_default.TextIdentifier,
216
+ children: decl.ident
217
+ })
218
+ });
219
+ case "CSharpDeclType": {
220
+ const keyword = decl.type.kind === "CSharpTypeEnum" ? "enum" : "class";
221
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
222
+ /* @__PURE__ */ jsx("span", {
223
+ className: style_default.TextKeyword,
224
+ children: keyword
225
+ }),
226
+ " ",
227
+ /* @__PURE__ */ jsx("span", {
228
+ className: style_default.TextIdentifier,
229
+ children: decl.ident
230
+ }),
231
+ /* @__PURE__ */ jsx("span", {
232
+ className: style_default.TextPunctuation,
233
+ children: ":"
234
+ }),
235
+ decl.type.kind === "CSharpTypeUnion" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
236
+ " ",
237
+ /* @__PURE__ */ jsx(Docs.Tooltip, {
238
+ content: "A class that can be one of several variants.",
239
+ children: /* @__PURE__ */ jsx(Docs.Badge, {
240
+ id: "csharp-union",
241
+ children: "union"
242
+ })
243
+ }),
244
+ " "
245
+ ] })
246
+ ] });
247
+ }
248
+ case "CSharpDeclProperty": return /* @__PURE__ */ jsxs(Fragment$1, { children: [
249
+ decl.optional === false && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
250
+ className: style_default.TextKeyword,
251
+ children: "required"
252
+ }), " "] }),
253
+ /* @__PURE__ */ jsx(Lang.Type, {
254
+ type: decl.type,
255
+ optional: decl.optional
256
+ }),
257
+ decl.nullable && !("nullable" in decl.type && decl.type.nullable) && /* @__PURE__ */ jsx("span", {
258
+ className: style_default.TextOperator,
259
+ children: "?"
260
+ }),
261
+ " ",
262
+ /* @__PURE__ */ jsx("span", {
263
+ className: style_default.TextIdentifier,
264
+ children: decl.ident
265
+ }),
266
+ decl.type.kind === "CSharpTypeConstant" && /* @__PURE__ */ jsxs(Fragment$1, { children: [" ", /* @__PURE__ */ jsx(Docs.Tooltip, {
267
+ content: /* @__PURE__ */ jsx("span", {
268
+ className: style_default.TextIdentifier,
269
+ children: decl.type.value
270
+ }),
271
+ children: /* @__PURE__ */ jsx(Docs.Badge, {
272
+ id: "csharp-constant",
273
+ children: "constant"
274
+ })
275
+ })] })
276
+ ] });
277
+ case "CSharpDeclReference": return /* @__PURE__ */ jsx(Lang.Type, { type: decl.type });
278
+ }
279
+ }
280
+ //#endregion
281
+ export { Declaration, MethodSignature, Property, Type, TypeName, csharp_exports as t };
@@ -0,0 +1,2 @@
1
+ import { Bt as Property, Ht as Type, It as Declaration, Lt as DeclarationProps, Rt as MethodSignature, Ut as TypeName, Vt as PropertyProps, Wt as TypeProps, zt as MethodSignatureProps } from "../index-Dt9uPKZP.js";
2
+ export { Declaration, DeclarationProps, MethodSignature, MethodSignatureProps, Property, PropertyProps, Type, TypeName, TypeProps };