@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.
- package/dist/{chunk-BN_g-Awi.js → chunk-BYypO7fO.js} +3 -3
- package/dist/components/MaskedInput.d.ts +3 -3
- package/dist/components/MaskedInput.js +1 -1
- package/dist/components/breadcrumbs.d.ts +24 -1
- package/dist/components/breadcrumbs.js +62 -7
- package/dist/components/icons.d.ts +18 -13
- package/dist/components/icons.js +940 -2
- package/dist/components/index.d.ts +16 -14
- package/dist/components/index.js +72 -18
- package/dist/components/method.d.ts +58 -1
- package/dist/components/method.js +95 -8
- package/dist/components/overview.d.ts +38 -1
- package/dist/components/overview.js +137 -9
- package/dist/components/primitives.d.ts +104 -1
- package/dist/components/primitives.js +250 -6
- package/dist/components/properties.d.ts +53 -1
- package/dist/components/properties.js +138 -7
- package/dist/components/sdk-sidebar.d.ts +14 -1
- package/dist/components/sdk-sidebar.js +50 -8
- package/dist/components/sdk.d.ts +121 -1
- package/dist/components/sdk.js +405 -8
- package/dist/components/snippets.d.ts +70 -13
- package/dist/components/snippets.js +182 -7
- package/dist/components/stl-sidebar.d.ts +57 -1
- package/dist/components/stl-sidebar.js +105 -3
- package/dist/contexts/component-generics.d.ts +29 -1
- package/dist/contexts/component-generics.js +31 -1
- package/dist/contexts/component-types.d.ts +4 -15
- package/dist/contexts/component.d.ts +7 -17
- package/dist/contexts/component.js +22 -28
- package/dist/contexts/docs.d.ts +61 -1
- package/dist/contexts/docs.js +89 -1
- package/dist/contexts/index.d.ts +13 -14
- package/dist/contexts/index.js +44 -6
- package/dist/contexts/markdown.d.ts +21 -1
- package/dist/contexts/markdown.js +47 -2
- package/dist/contexts/navigation.d.ts +28 -1
- package/dist/contexts/navigation.js +22 -1
- package/dist/contexts/use-components.d.ts +1 -13
- package/dist/contexts/use-components.js +6 -2
- package/dist/{index-HDt5wRiR.d.ts → index-Cl6Gny0o.d.ts} +37 -2
- package/dist/index.d.ts +4 -14
- package/dist/index.js +7 -30
- package/dist/languages/cli.d.ts +38 -14
- package/dist/languages/cli.js +166 -20
- package/dist/languages/csharp.d.ts +42 -14
- package/dist/languages/csharp.js +283 -8
- package/dist/languages/go.d.ts +40 -14
- package/dist/languages/go.js +303 -8
- package/dist/languages/http.d.ts +46 -14
- package/dist/languages/http.js +390 -19
- package/dist/languages/index.d.ts +51 -14
- package/dist/languages/index.js +32 -28
- package/dist/languages/java.d.ts +43 -14
- package/dist/languages/java.js +403 -8
- package/dist/languages/php.d.ts +40 -0
- package/dist/languages/php.js +313 -0
- package/dist/languages/python.d.ts +40 -14
- package/dist/languages/python.js +269 -8
- package/dist/languages/ruby.d.ts +40 -14
- package/dist/languages/ruby.js +387 -8
- package/dist/languages/terraform.d.ts +48 -14
- package/dist/languages/terraform.js +243 -8
- package/dist/languages/typescript.d.ts +40 -14
- package/dist/languages/typescript.js +449 -8
- package/dist/markdown/index.d.ts +1 -2
- package/dist/markdown/index.js +1 -28
- package/dist/markdown/printer.d.ts +2 -2
- package/dist/markdown/printer.js +6 -30
- package/dist/markdown/utils.d.ts +3 -3
- package/dist/routing.d.ts +61 -2
- package/dist/routing.js +205 -2
- package/dist/spec.d.ts +2 -2
- package/dist/spec.js +2 -2
- package/dist/style.js +176 -1
- package/dist/use-strict-context-L0c8JKg4.js +16 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +53 -2
- package/package.json +3 -3
- package/dist/breadcrumbs-Dei_5sHd.d.ts +0 -25
- package/dist/breadcrumbs-oUp-6oJK.js +0 -63
- package/dist/cli-BX9ofVCR.js +0 -166
- package/dist/component-Dl5ZEHxB.js +0 -23
- package/dist/component-generics-C9ALAcZI.d.ts +0 -30
- package/dist/component-generics-POFirVVb.js +0 -45
- package/dist/components-DQPlXEwE.js +0 -72
- package/dist/contexts-_NNW5yqC.js +0 -44
- package/dist/csharp-sn5CJu9t.js +0 -283
- package/dist/docs-YgoQ3bzY.js +0 -81
- package/dist/docs-x-kfjRMc.d.ts +0 -66
- package/dist/go-BoaAVmP0.js +0 -303
- package/dist/http-Ccj1dOvE.js +0 -389
- package/dist/icons-BYKn5X8E.js +0 -885
- package/dist/index-OCM-LZIo.d.ts +0 -428
- package/dist/java-BiLRuLuD.js +0 -403
- package/dist/languages-COjc0Nwx.js +0 -30
- package/dist/markdown-BszOPZhh.d.ts +0 -22
- package/dist/markdown-Cq3XEhrR.js +0 -49
- package/dist/method-DjzVBzZe.js +0 -96
- package/dist/method-KkWyhvKa.d.ts +0 -59
- package/dist/navigation-BZjwfN2P.d.ts +0 -29
- package/dist/navigation-aoYZ_tl4.js +0 -24
- package/dist/overview-BNmMeDUE.d.ts +0 -39
- package/dist/overview-Clq5psZe.js +0 -138
- package/dist/primitives-B8OnSXRP.d.ts +0 -105
- package/dist/primitives-BBUs_flm.js +0 -250
- package/dist/properties-BhlRtWo4.d.ts +0 -54
- package/dist/properties-DQU0NBzb.js +0 -138
- package/dist/python-nqOBH7GS.js +0 -269
- package/dist/routing-GvhEMw6E.js +0 -205
- package/dist/routing-qJMPICGo.d.ts +0 -61
- package/dist/ruby-BBc8HdIt.js +0 -387
- package/dist/sdk-C8C6IRQp.d.ts +0 -122
- package/dist/sdk-DzCHhEoX.js +0 -405
- package/dist/sdk-sidebar-CkjSLggl.js +0 -50
- package/dist/sdk-sidebar-lgNmf-ns.d.ts +0 -15
- package/dist/snippets-CLpNVNlA.js +0 -181
- package/dist/stl-sidebar-8jF9cdnn.d.ts +0 -58
- package/dist/stl-sidebar-DC5UOJiT.js +0 -106
- package/dist/style-DJIYkFhO.js +0 -178
- package/dist/terraform-DVx2ea2h.js +0 -243
- package/dist/typescript-Cmk-jBBw.js +0 -449
- package/dist/use-components-BUz3GbO4.js +0 -7
- package/dist/utils-D6zJxUZ9.js +0 -54
package/dist/cli-BX9ofVCR.js
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { t as __exportAll } from "./chunk-BN_g-Awi.js";
|
|
2
|
-
import { n as useLanguageComponents } from "./contexts-_NNW5yqC.js";
|
|
3
|
-
import { t as useComponents } from "./use-components-BUz3GbO4.js";
|
|
4
|
-
import { t as style_default } from "./style-DJIYkFhO.js";
|
|
5
|
-
import { a as Type$1, o as TypeName$1 } from "./http-Ccj1dOvE.js";
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
|
|
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__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsxs("span", {
|
|
155
|
-
className: style_default.TextIdentifier,
|
|
156
|
-
children: [decl.name, "()"]
|
|
157
|
-
}) });
|
|
158
|
-
case "CLIStdin": return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx("span", {
|
|
159
|
-
className: style_default.TextIdentifier,
|
|
160
|
-
children: "stdin"
|
|
161
|
-
}) });
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
//#endregion
|
|
166
|
-
export { TypeName as a, Type as i, MethodSignature as n, cli_exports as o, Property as r, Declaration as t };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { n as customizeComponents, t as ComponentProvider$1 } from "./component-generics-POFirVVb.js";
|
|
2
|
-
import { t as components_exports } from "./components-DQPlXEwE.js";
|
|
3
|
-
import { n as languages_exports } from "./languages-COjc0Nwx.js";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region src/contexts/component.tsx
|
|
8
|
-
const defaultContextValue = {
|
|
9
|
-
components: components_exports,
|
|
10
|
-
language: languages_exports
|
|
11
|
-
};
|
|
12
|
-
function ComponentProvider({ components, language, children }) {
|
|
13
|
-
return /* @__PURE__ */ jsx(ComponentProvider$1, {
|
|
14
|
-
value: React.useMemo(() => customizeComponents(defaultContextValue, {
|
|
15
|
-
components,
|
|
16
|
-
language
|
|
17
|
-
}), [components, language]),
|
|
18
|
-
children
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
//#endregion
|
|
23
|
-
export { defaultContextValue as n, ComponentProvider as t };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React$1 from "react";
|
|
2
|
-
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/contexts/component-generics.d.ts
|
|
5
|
-
type DeepPartialMap<L> = { [K in keyof L]?: Partial<L[K]> };
|
|
6
|
-
type ComponentsContextType<C, L> = {
|
|
7
|
-
components: C;
|
|
8
|
-
language: L;
|
|
9
|
-
};
|
|
10
|
-
declare const useComponentContext: () => ComponentsContextType<any, any>;
|
|
11
|
-
declare function useComponents<C = unknown>(): C;
|
|
12
|
-
declare function customizeComponents<C, L>(defaults: {
|
|
13
|
-
components: C;
|
|
14
|
-
language: L;
|
|
15
|
-
}, overrides?: {
|
|
16
|
-
components?: Partial<C>;
|
|
17
|
-
language?: DeepPartialMap<L>;
|
|
18
|
-
}): {
|
|
19
|
-
components: C;
|
|
20
|
-
language: L;
|
|
21
|
-
};
|
|
22
|
-
declare function ComponentProvider<C, L>({
|
|
23
|
-
value,
|
|
24
|
-
children
|
|
25
|
-
}: {
|
|
26
|
-
value: ComponentsContextType<C, L>;
|
|
27
|
-
children: React$1.ReactNode;
|
|
28
|
-
}): react_jsx_runtime1.JSX.Element;
|
|
29
|
-
//#endregion
|
|
30
|
-
export { useComponents as a, useComponentContext as i, ComponentsContextType as n, customizeComponents as r, ComponentProvider as t };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/hooks/use-strict-context.tsx
|
|
5
|
-
function createStrictContext(displayName) {
|
|
6
|
-
const Context = React.createContext(null);
|
|
7
|
-
Context.displayName = displayName;
|
|
8
|
-
function useStrictContext() {
|
|
9
|
-
const context = React.useContext(Context);
|
|
10
|
-
if (context === null) throw new Error(`use${displayName} must be used within a ${displayName}Provider`);
|
|
11
|
-
return context;
|
|
12
|
-
}
|
|
13
|
-
return [Context.Provider, useStrictContext];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/contexts/component-generics.tsx
|
|
18
|
-
const [Provider, useComponentContext] = createStrictContext("Component");
|
|
19
|
-
function useComponents() {
|
|
20
|
-
return useComponentContext().components;
|
|
21
|
-
}
|
|
22
|
-
function customizeComponents(defaults, overrides = {}) {
|
|
23
|
-
return {
|
|
24
|
-
components: {
|
|
25
|
-
...defaults.components,
|
|
26
|
-
...overrides.components ?? {}
|
|
27
|
-
},
|
|
28
|
-
language: Object.keys(defaults.language).reduce((acc, key) => {
|
|
29
|
-
acc[key] = {
|
|
30
|
-
...defaults.language[key],
|
|
31
|
-
...overrides.language?.[key] ?? {}
|
|
32
|
-
};
|
|
33
|
-
return acc;
|
|
34
|
-
}, {})
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function ComponentProvider({ value, children }) {
|
|
38
|
-
return /* @__PURE__ */ jsx(Provider, {
|
|
39
|
-
value,
|
|
40
|
-
children
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
//#endregion
|
|
45
|
-
export { useComponents as i, customizeComponents as n, useComponentContext as r, ComponentProvider as t };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { t as __exportAll } from "./chunk-BN_g-Awi.js";
|
|
2
|
-
import { i as PropertyToggle, n as PropertyDescription, r as PropertyTitle, t as Property } from "./properties-DQU0NBzb.js";
|
|
3
|
-
import { a as MethodRoute, i as MethodInfo, n as MethodDescription, r as MethodHeader, t as Method } from "./method-DjzVBzZe.js";
|
|
4
|
-
import { a as Link, c as ToggleButton, i as Join, l as Tooltip, n as Expander, o as ListView, r as Input, s as Markdown, t as Badge, u as VirtualExpander } from "./primitives-BBUs_flm.js";
|
|
5
|
-
import { _ as usePropertyModel, a as SDKDeclaration, c as SDKLanguageBlock, d as SDKMethodInfo, f as SDKMethodNotImplemented, g as SDKSnippetLanguages, h as SDKRequestTitle, i as SDKConstraints, l as SDKMethod, m as SDKReference, n as ReferenceNestingContext, o as SDKExample, p as SDKModel, r as SDKChildren, s as SDKIcon, t as PropertyModelContext, u as SDKMethodHeader, v as useReferenceNesting, y as useStreamingResponse } from "./sdk-DzCHhEoX.js";
|
|
6
|
-
import { a as SnippetContainer, c as SnippetResponse, i as SnippetCode, n as Snippet, o as SnippetFooter, r as SnippetButtons, s as SnippetRequestContainer, t as MultiSnippets } from "./snippets-CLpNVNlA.js";
|
|
7
|
-
import { a as SDKRoot, i as SDKResourceHeader, n as SDKOverview, r as SDKResource, t as SDKMethodSummary } from "./overview-Clq5psZe.js";
|
|
8
|
-
import { n as generateApiBreadcrumbs, t as SDKBreadcrumbs } from "./breadcrumbs-oUp-6oJK.js";
|
|
9
|
-
import { t as StlSidebar } from "./stl-sidebar-DC5UOJiT.js";
|
|
10
|
-
import { t as SDKSidebar } from "./sdk-sidebar-CkjSLggl.js";
|
|
11
|
-
|
|
12
|
-
//#region src/components/index.ts
|
|
13
|
-
var components_exports = /* @__PURE__ */ __exportAll({
|
|
14
|
-
Badge: () => Badge,
|
|
15
|
-
Expander: () => Expander,
|
|
16
|
-
Input: () => Input,
|
|
17
|
-
Join: () => Join,
|
|
18
|
-
Link: () => Link,
|
|
19
|
-
ListView: () => ListView,
|
|
20
|
-
Markdown: () => Markdown,
|
|
21
|
-
Method: () => Method,
|
|
22
|
-
MethodDescription: () => MethodDescription,
|
|
23
|
-
MethodHeader: () => MethodHeader,
|
|
24
|
-
MethodInfo: () => MethodInfo,
|
|
25
|
-
MethodRoute: () => MethodRoute,
|
|
26
|
-
MultiSnippets: () => MultiSnippets,
|
|
27
|
-
Property: () => Property,
|
|
28
|
-
PropertyDescription: () => PropertyDescription,
|
|
29
|
-
PropertyModelContext: () => PropertyModelContext,
|
|
30
|
-
PropertyTitle: () => PropertyTitle,
|
|
31
|
-
PropertyToggle: () => PropertyToggle,
|
|
32
|
-
ReferenceNestingContext: () => ReferenceNestingContext,
|
|
33
|
-
SDKBreadcrumbs: () => SDKBreadcrumbs,
|
|
34
|
-
SDKChildren: () => SDKChildren,
|
|
35
|
-
SDKConstraints: () => SDKConstraints,
|
|
36
|
-
SDKDeclaration: () => SDKDeclaration,
|
|
37
|
-
SDKExample: () => SDKExample,
|
|
38
|
-
SDKIcon: () => SDKIcon,
|
|
39
|
-
SDKLanguageBlock: () => SDKLanguageBlock,
|
|
40
|
-
SDKMethod: () => SDKMethod,
|
|
41
|
-
SDKMethodHeader: () => SDKMethodHeader,
|
|
42
|
-
SDKMethodInfo: () => SDKMethodInfo,
|
|
43
|
-
SDKMethodNotImplemented: () => SDKMethodNotImplemented,
|
|
44
|
-
SDKMethodSummary: () => SDKMethodSummary,
|
|
45
|
-
SDKModel: () => SDKModel,
|
|
46
|
-
SDKOverview: () => SDKOverview,
|
|
47
|
-
SDKReference: () => SDKReference,
|
|
48
|
-
SDKRequestTitle: () => SDKRequestTitle,
|
|
49
|
-
SDKResource: () => SDKResource,
|
|
50
|
-
SDKResourceHeader: () => SDKResourceHeader,
|
|
51
|
-
SDKRoot: () => SDKRoot,
|
|
52
|
-
SDKSidebar: () => SDKSidebar,
|
|
53
|
-
SDKSnippetLanguages: () => SDKSnippetLanguages,
|
|
54
|
-
Snippet: () => Snippet,
|
|
55
|
-
SnippetButtons: () => SnippetButtons,
|
|
56
|
-
SnippetCode: () => SnippetCode,
|
|
57
|
-
SnippetContainer: () => SnippetContainer,
|
|
58
|
-
SnippetFooter: () => SnippetFooter,
|
|
59
|
-
SnippetRequestContainer: () => SnippetRequestContainer,
|
|
60
|
-
SnippetResponse: () => SnippetResponse,
|
|
61
|
-
StlSidebar: () => StlSidebar,
|
|
62
|
-
ToggleButton: () => ToggleButton,
|
|
63
|
-
Tooltip: () => Tooltip,
|
|
64
|
-
VirtualExpander: () => VirtualExpander,
|
|
65
|
-
generateApiBreadcrumbs: () => generateApiBreadcrumbs,
|
|
66
|
-
usePropertyModel: () => usePropertyModel,
|
|
67
|
-
useReferenceNesting: () => useReferenceNesting,
|
|
68
|
-
useStreamingResponse: () => useStreamingResponse
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
//#endregion
|
|
72
|
-
export { components_exports as t };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { t as __exportAll } from "./chunk-BN_g-Awi.js";
|
|
2
|
-
import { a as useDocs, c as useResource, d as useSnippetIds, f as useSnippetResponse, i as useDeclaration, l as useSettings, m as useSpec, n as useAvailableLanguages, o as useIgnoredResources, p as useSnippets, r as useContentPanelLayout, s as useLanguage, t as DocsProvider, u as useSnippet } from "./docs-YgoQ3bzY.js";
|
|
3
|
-
import { i as useComponents, n as customizeComponents, r as useComponentContext, t as ComponentProvider } from "./component-generics-POFirVVb.js";
|
|
4
|
-
import { n as useNavigation, t as NavigationProvider } from "./navigation-aoYZ_tl4.js";
|
|
5
|
-
import { a as useRenderMarkdown, i as useMarkdownContext, n as MarkdownProvider, r as useHighlight, t as MarkdownContext } from "./markdown-Cq3XEhrR.js";
|
|
6
|
-
|
|
7
|
-
//#region src/contexts/index.tsx
|
|
8
|
-
var contexts_exports = /* @__PURE__ */ __exportAll({
|
|
9
|
-
ComponentProvider: () => ComponentProvider,
|
|
10
|
-
DocsProvider: () => DocsProvider,
|
|
11
|
-
MarkdownContext: () => MarkdownContext,
|
|
12
|
-
MarkdownProvider: () => MarkdownProvider,
|
|
13
|
-
NavigationProvider: () => NavigationProvider,
|
|
14
|
-
customizeComponents: () => customizeComponents,
|
|
15
|
-
useAvailableLanguages: () => useAvailableLanguages,
|
|
16
|
-
useComponentContext: () => useComponentContext,
|
|
17
|
-
useComponents: () => useComponents,
|
|
18
|
-
useContentPanelLayout: () => useContentPanelLayout,
|
|
19
|
-
useDeclaration: () => useDeclaration,
|
|
20
|
-
useDocs: () => useDocs,
|
|
21
|
-
useHighlight: () => useHighlight,
|
|
22
|
-
useIgnoredResources: () => useIgnoredResources,
|
|
23
|
-
useLanguage: () => useLanguage,
|
|
24
|
-
useLanguageComponents: () => useLanguageComponents,
|
|
25
|
-
useMarkdownContext: () => useMarkdownContext,
|
|
26
|
-
useNavigation: () => useNavigation,
|
|
27
|
-
useRenderMarkdown: () => useRenderMarkdown,
|
|
28
|
-
useResource: () => useResource,
|
|
29
|
-
useSettings: () => useSettings,
|
|
30
|
-
useSnippet: () => useSnippet,
|
|
31
|
-
useSnippetIds: () => useSnippetIds,
|
|
32
|
-
useSnippetResponse: () => useSnippetResponse,
|
|
33
|
-
useSnippets: () => useSnippets,
|
|
34
|
-
useSpec: () => useSpec
|
|
35
|
-
});
|
|
36
|
-
function useLanguageComponents() {
|
|
37
|
-
const language = useLanguage();
|
|
38
|
-
const definition = useComponentContext().language[language];
|
|
39
|
-
if (!definition) throw new Error(`Language component definition not found for language: ${language}`);
|
|
40
|
-
return definition;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
export { useLanguageComponents as n, contexts_exports as t };
|
package/dist/csharp-sn5CJu9t.js
DELETED
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
import { t as __exportAll } from "./chunk-BN_g-Awi.js";
|
|
2
|
-
import { n as useLanguageComponents } from "./contexts-_NNW5yqC.js";
|
|
3
|
-
import { t as useComponents } from "./use-components-BUz3GbO4.js";
|
|
4
|
-
import { t as style_default } from "./style-DJIYkFhO.js";
|
|
5
|
-
import * as React$1 from "react";
|
|
6
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
|
|
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(Fragment$1, { children: /* @__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
|
-
|
|
282
|
-
//#endregion
|
|
283
|
-
export { TypeName as a, Type as i, MethodSignature as n, csharp_exports as o, Property as r, Declaration as t };
|