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

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