@stainless-api/docs-ui 0.1.0-beta.5 → 0.1.0-beta.51
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/breadcrumbs-BdYnaHA8.d.ts +20 -0
- package/dist/breadcrumbs-CA7GmW_8.d.ts +20 -0
- package/dist/breadcrumbs-nSFZO5Gf.js +63 -0
- package/dist/chunk-DRcLgZ1e.js +18 -0
- package/dist/component-DRO8kQSp.js +23 -0
- package/dist/component-generics-B6Fn47Mz.js +45 -0
- package/dist/component-generics-BHFUK06s.d.ts +30 -0
- package/dist/component-generics-BJSyydZ-.d.ts +30 -0
- package/dist/components/MaskedInput.d.ts +14 -0
- package/dist/components/MaskedInput.js +76 -0
- package/dist/components/breadcrumbs.d.ts +2 -0
- package/dist/components/breadcrumbs.js +9 -0
- package/dist/components/icons.d.ts +55 -0
- package/dist/components/icons.js +3 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.js +18 -0
- package/dist/components/method.d.ts +2 -0
- package/dist/components/method.js +10 -0
- package/dist/components/overview.d.ts +2 -0
- package/dist/components/overview.js +11 -0
- package/dist/components/primitives.d.ts +2 -0
- package/dist/components/primitives.js +8 -0
- package/dist/components/properties.d.ts +2 -0
- package/dist/components/properties.js +9 -0
- package/dist/components/sdk.d.ts +2 -0
- package/dist/components/sdk.js +10 -0
- package/dist/components/sidebar.d.ts +2 -0
- package/dist/components/sidebar.js +11 -0
- package/dist/components/snippets.d.ts +3 -0
- package/dist/components/snippets.js +9 -0
- package/dist/components-D7M-BwNI.js +71 -0
- package/dist/contexts/component-generics.d.ts +2 -0
- package/dist/contexts/component-generics.js +3 -0
- package/dist/contexts/component-types.d.ts +16 -0
- package/dist/contexts/component-types.js +0 -0
- package/dist/contexts/component.d.ts +29 -0
- package/dist/contexts/component.js +27 -0
- package/dist/contexts/docs.d.ts +2 -0
- package/dist/contexts/docs.js +3 -0
- package/dist/contexts/index.d.ts +16 -0
- package/dist/contexts/index.js +7 -0
- package/dist/contexts/markdown.d.ts +2 -0
- package/dist/contexts/markdown.js +4 -0
- package/dist/contexts/navigation.d.ts +2 -0
- package/dist/contexts/navigation.js +3 -0
- package/dist/contexts/use-components.d.ts +14 -0
- package/dist/contexts/use-components.js +4 -0
- package/dist/contexts-p3rRZDlM.js +39 -0
- package/dist/csharp-CDSxfCZE.js +283 -0
- package/dist/docs-BUS__I1m.d.ts +47 -0
- package/dist/docs-CXqi26jB.js +54 -0
- package/dist/docs-fKyo35eI.d.ts +47 -0
- package/dist/go-1c3S5ETL.js +303 -0
- package/dist/http-2QNWXH9t.js +330 -0
- package/dist/icons-Ckod9aod.js +869 -0
- package/dist/index-5Yl-BBg3.d.ts +15 -0
- package/dist/index-9LRO8R1a.d.ts +274 -0
- package/dist/index-CBIJwoyp.d.ts +13 -0
- package/dist/index-ClCZKGcw.d.ts +274 -0
- package/dist/index-pMKpm2Jk.d.ts +13 -0
- package/dist/index-q3bZhNWj.d.ts +15 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +29 -7542
- package/dist/java-BbjF_oUI.js +403 -0
- package/dist/languages/csharp.d.ts +11 -0
- package/dist/languages/csharp.js +9 -0
- package/dist/languages/go.d.ts +11 -0
- package/dist/languages/go.js +9 -0
- package/dist/languages/http.d.ts +11 -0
- package/dist/languages/http.js +19 -0
- package/dist/languages/index.d.ts +11 -0
- package/dist/languages/index.js +26 -0
- package/dist/languages/java.d.ts +11 -0
- package/dist/languages/java.js +9 -0
- package/dist/languages/python.d.ts +11 -0
- package/dist/languages/python.js +9 -0
- package/dist/languages/ruby.d.ts +11 -0
- package/dist/languages/ruby.js +9 -0
- package/dist/languages/typescript.d.ts +11 -0
- package/dist/languages/typescript.js +9 -0
- package/dist/languages-BCYZjzuS.js +26 -0
- package/dist/markdown/index.d.ts +12 -0
- package/dist/markdown/index.js +104 -0
- package/dist/markdown/md.d.ts +15 -0
- package/dist/markdown/md.js +3 -0
- package/dist/markdown/printer.d.ts +2 -0
- package/dist/markdown/printer.js +28 -0
- package/dist/markdown/utils.d.ts +3 -0
- package/dist/markdown/utils.js +3 -0
- package/dist/markdown-C8o8WrwG.d.ts +22 -0
- package/dist/markdown-CqJohZei.d.ts +22 -0
- package/dist/markdown-CxdeWgjV.js +48 -0
- package/dist/md-oM2tUaCA.js +41 -0
- package/dist/method-CE08mUME.js +115 -0
- package/dist/method-CMt6uyix.d.ts +71 -0
- package/dist/method-r5UAB40b.d.ts +71 -0
- package/dist/navigation-9_4wRkcT.d.ts +29 -0
- package/dist/navigation-C5TN0SgC.js +24 -0
- package/dist/navigation-zuoWsXzh.d.ts +29 -0
- package/dist/overview-DXmLmmr7.d.ts +39 -0
- package/dist/overview-S2hUqPXA.js +139 -0
- package/dist/overview-ixhAhHj8.d.ts +39 -0
- package/dist/primitives-BIWfwN5L.js +258 -0
- package/dist/primitives-BVXfSSiS.d.ts +97 -0
- package/dist/primitives-Bl0wzAGo.d.ts +97 -0
- package/dist/printer-DBw4S_Jn.d.ts +13 -0
- package/dist/printer-bNxiG6UB.js +74 -0
- package/dist/properties-C-NU_ghj.d.ts +54 -0
- package/dist/properties-GT9ixNTg.d.ts +54 -0
- package/dist/properties-jlGW3USi.js +131 -0
- package/dist/python-USOwFDv_.js +279 -0
- package/dist/routing-CMqh1cTZ.d.ts +54 -0
- package/dist/routing-Wbb7YECB.js +194 -0
- package/dist/routing.d.ts +2 -0
- package/dist/routing.js +3 -180
- package/dist/ruby-CSvGbSLe.js +387 -0
- package/dist/sdk-B5W3VipN.d.ts +118 -0
- package/dist/sdk-CS6A3HW3.d.ts +118 -0
- package/dist/sdk-CSCbbn3O.js +336 -0
- package/dist/sidebar-C3fZrgmP.d.ts +36 -0
- package/dist/sidebar-CWyvCrJ0.js +81 -0
- package/dist/sidebar-CbCLUteD.d.ts +36 -0
- package/dist/snippets-BQLXEIf6.js +161 -0
- package/dist/snippets-C72s2IwS.d.ts +51 -0
- package/dist/snippets-DcFph7ir.d.ts +51 -0
- package/dist/spec.d.ts +65 -0
- package/dist/spec.js +167 -0
- package/dist/style-D7RO5ymE.d.ts +168 -0
- package/dist/style-gnVEeXFj.js +169 -0
- package/dist/style.d.ts +2 -0
- package/dist/style.js +3 -0
- package/dist/styles/main.css +727 -754
- package/dist/styles/main.js +0 -0
- package/dist/styles/primitives.css +317 -461
- package/dist/styles/primitives.js +0 -0
- package/dist/styles/resets.css +32 -41
- package/dist/styles/resets.js +0 -0
- package/dist/styles/search.css +175 -274
- package/dist/styles/search.js +0 -0
- package/dist/styles/sidebar.css +59 -60
- package/dist/styles/sidebar.js +0 -0
- package/dist/styles/variables.css +26 -89
- package/dist/styles/variables.js +0 -0
- package/dist/styles.css +2910 -0
- package/dist/styles.mjs +1 -0
- package/dist/typescript-DXG9psK3.js +449 -0
- package/dist/use-components-RWQbviGq.js +7 -0
- package/dist/utils-CqnL9Fc3.js +31 -0
- package/dist/utils-DGnJ6mcU.d.ts +21 -0
- package/dist/utils-D_1AWSRX.js +32 -0
- package/dist/utils-d8paVwKN.d.ts +14 -0
- package/dist/utils-uQbtk0-_.d.ts +21 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +3 -0
- package/package.json +73 -21
- package/dist/mcp.js +0 -16003
- package/dist/styles/snippets.css +0 -132
- package/src/components/breadcrumbs.tsx +0 -94
- package/src/components/chat.tsx +0 -154
- package/src/components/dropdown.tsx +0 -91
- package/src/components/icons.tsx +0 -584
- package/src/components/index.ts +0 -9
- package/src/components/method.tsx +0 -144
- package/src/components/overview.tsx +0 -159
- package/src/components/primitives.tsx +0 -284
- package/src/components/properties.tsx +0 -130
- package/src/components/scripts/dropdown.ts +0 -78
- package/src/components/sdk.tsx +0 -402
- package/src/components/sidebar.tsx +0 -99
- package/src/components/snippets.tsx +0 -179
- package/src/contexts/component-generics.tsx +0 -48
- package/src/contexts/component-types.tsx +0 -5
- package/src/contexts/component.tsx +0 -32
- package/src/contexts/docs.tsx +0 -75
- package/src/contexts/index.tsx +0 -17
- package/src/contexts/markdown.tsx +0 -43
- package/src/contexts/navigation.tsx +0 -44
- package/src/contexts/search.tsx +0 -28
- package/src/contexts/use-components.tsx +0 -4
- package/src/index.ts +0 -6
- package/src/languages/go.tsx +0 -281
- package/src/languages/http.tsx +0 -321
- package/src/languages/index.ts +0 -26
- package/src/languages/java.tsx +0 -358
- package/src/languages/python.tsx +0 -255
- package/src/languages/ruby.tsx +0 -320
- package/src/languages/typescript.tsx +0 -393
- package/src/markdown/index.ts +0 -107
- package/src/markdown/md.ts +0 -45
- package/src/markdown/utils.ts +0 -49
- package/src/routing.ts +0 -238
- package/src/search/form.tsx +0 -127
- package/src/search/index.tsx +0 -1
- package/src/search/indexer.ts +0 -246
- package/src/search/mcp.ts +0 -61
- package/src/search/printer.tsx +0 -86
- package/src/search/providers/algolia.ts +0 -88
- package/src/search/providers/fuse.ts +0 -19
- package/src/search/providers/pagefind.ts +0 -17
- package/src/search/providers/walker.ts +0 -30
- package/src/search/results.tsx +0 -181
- package/src/search/state.ts +0 -64
- package/src/search/types.ts +0 -116
- package/src/style.ts +0 -197
- package/src/styles/main.css +0 -993
- package/src/styles/primitives.css +0 -573
- package/src/styles/resets.css +0 -47
- package/src/styles/search.css +0 -342
- package/src/styles/sidebar.css +0 -87
- package/src/styles/snippets.css +0 -132
- package/src/styles/variables.css +0 -90
- package/src/utils.ts +0 -41
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as react_jsx_runtime49 from "react/jsx-runtime";
|
|
2
|
+
import * as SDKJSON from "@stainless/sdk-json";
|
|
3
|
+
|
|
4
|
+
//#region src/components/overview.d.ts
|
|
5
|
+
type SDKResourceProps = {
|
|
6
|
+
resource: SDKJSON.Resource;
|
|
7
|
+
parents?: SDKJSON.Resource[];
|
|
8
|
+
};
|
|
9
|
+
declare function SDKResourceHeader({
|
|
10
|
+
resource,
|
|
11
|
+
parents
|
|
12
|
+
}: SDKResourceProps): react_jsx_runtime49.JSX.Element | null;
|
|
13
|
+
type SDKMethodSummaryProps = {
|
|
14
|
+
method: SDKJSON.Method;
|
|
15
|
+
};
|
|
16
|
+
declare function SDKMethodSummary({
|
|
17
|
+
method
|
|
18
|
+
}: SDKMethodSummaryProps): react_jsx_runtime49.JSX.Element;
|
|
19
|
+
declare function SDKResource({
|
|
20
|
+
resource,
|
|
21
|
+
parents,
|
|
22
|
+
showModels
|
|
23
|
+
}: SDKResourceProps & {
|
|
24
|
+
showModels?: boolean;
|
|
25
|
+
}): react_jsx_runtime49.JSX.Element;
|
|
26
|
+
type SDKOverviewProps = {
|
|
27
|
+
resource: SDKJSON.Resource;
|
|
28
|
+
};
|
|
29
|
+
declare function SDKOverview({
|
|
30
|
+
resource
|
|
31
|
+
}: SDKOverviewProps): react_jsx_runtime49.JSX.Element;
|
|
32
|
+
type SDKRootProps = {
|
|
33
|
+
stainlessPath: string;
|
|
34
|
+
};
|
|
35
|
+
declare function SDKRoot({
|
|
36
|
+
stainlessPath
|
|
37
|
+
}: SDKRootProps): react_jsx_runtime49.JSX.Element | null;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { SDKResource as a, SDKRoot as c, SDKOverviewProps as i, SDKRootProps as l, SDKMethodSummaryProps as n, SDKResourceHeader as o, SDKOverview as r, SDKResourceProps as s, SDKMethodSummary as t };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { a as useLanguage, l as useSpec, r as useDeclaration } from "./docs-CXqi26jB.js";
|
|
2
|
+
import { n as useLanguageComponents } from "./contexts-p3rRZDlM.js";
|
|
3
|
+
import { t as useComponents } from "./use-components-RWQbviGq.js";
|
|
4
|
+
import { t as style_default } from "./style-gnVEeXFj.js";
|
|
5
|
+
import { i as PropertyToggle } from "./properties-jlGW3USi.js";
|
|
6
|
+
import { f as parseStainlessPath } from "./routing-Wbb7YECB.js";
|
|
7
|
+
import { s as Markdown } from "./primitives-BIWfwN5L.js";
|
|
8
|
+
import { n as getResourceFromSpec, t as flatResources } from "./utils-D_1AWSRX.js";
|
|
9
|
+
import * as React$1 from "react";
|
|
10
|
+
import { createElement } from "react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { ChevronRight } from "lucide-react";
|
|
13
|
+
|
|
14
|
+
//#region src/components/overview.tsx
|
|
15
|
+
function SDKResourceHeader({ resource, parents }) {
|
|
16
|
+
const segments = parents?.map((parent, index) => /* @__PURE__ */ jsxs("span", {
|
|
17
|
+
className: style_default.ResourceTitleSegment,
|
|
18
|
+
children: [parent.title, index < parents.length && /* @__PURE__ */ jsx(ChevronRight, {
|
|
19
|
+
size: 16,
|
|
20
|
+
className: style_default.Icon
|
|
21
|
+
})]
|
|
22
|
+
}, parent.stainlessPath));
|
|
23
|
+
if (!segments && !resource.description) return null;
|
|
24
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: style_default.ResourceHeader,
|
|
26
|
+
children: [segments && /* @__PURE__ */ jsxs("h4", {
|
|
27
|
+
id: resource.stainlessPath,
|
|
28
|
+
className: style_default.ResourceTitle,
|
|
29
|
+
children: [segments, /* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: style_default.ResourceTitleSegment,
|
|
31
|
+
children: resource.title
|
|
32
|
+
})]
|
|
33
|
+
}), resource.description && /* @__PURE__ */ jsx("div", {
|
|
34
|
+
className: style_default.ResourceDescription,
|
|
35
|
+
children: /* @__PURE__ */ jsx(Markdown, { content: resource.description })
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function SDKMethodSummary({ method }) {
|
|
40
|
+
const Docs = useComponents();
|
|
41
|
+
const Lang = useLanguageComponents();
|
|
42
|
+
const decl = useDeclaration(method.stainlessPath, true);
|
|
43
|
+
return /* @__PURE__ */ jsx(Docs.MethodHeader, {
|
|
44
|
+
level: "h5",
|
|
45
|
+
title: /* @__PURE__ */ jsx(Docs.Link, {
|
|
46
|
+
stainlessPath: method.stainlessPath,
|
|
47
|
+
children: method.summary ?? method.title
|
|
48
|
+
}),
|
|
49
|
+
signature: /* @__PURE__ */ jsx(Lang.MethodSignature, { decl }),
|
|
50
|
+
badges: method.deprecated && /* @__PURE__ */ jsx(Docs.Badge, {
|
|
51
|
+
id: "deprecated",
|
|
52
|
+
children: "Deprecated"
|
|
53
|
+
}),
|
|
54
|
+
children: /* @__PURE__ */ jsx(Docs.MethodRoute, {
|
|
55
|
+
httpMethod: method.httpMethod,
|
|
56
|
+
endpoint: method.endpoint.split(" ", 2).at(-1)
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function SDKResource({ resource, parents, showModels }) {
|
|
61
|
+
const Docs = useComponents();
|
|
62
|
+
const language = useLanguage();
|
|
63
|
+
const spec = useSpec();
|
|
64
|
+
const methods = Object.values(resource.methods).filter((method) => spec?.decls?.[language]?.[method.stainlessPath]);
|
|
65
|
+
const models = Object.values(resource.models).filter((model) => spec?.decls?.[language]?.[`${model.stainlessPath} > (schema)`]);
|
|
66
|
+
return /* @__PURE__ */ jsx("div", {
|
|
67
|
+
className: style_default.Resource,
|
|
68
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
69
|
+
className: style_default.ResourceContent,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx(Docs.SDKResourceHeader, {
|
|
72
|
+
resource,
|
|
73
|
+
parents
|
|
74
|
+
}),
|
|
75
|
+
methods.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
76
|
+
className: style_default.ResourceContentGroup,
|
|
77
|
+
children: methods.map((method) => /* @__PURE__ */ jsx("div", {
|
|
78
|
+
className: style_default.MethodSummary,
|
|
79
|
+
children: /* @__PURE__ */ jsx(Docs.SDKMethodSummary, { method })
|
|
80
|
+
}, method.stainlessPath))
|
|
81
|
+
}),
|
|
82
|
+
showModels !== false && models.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
83
|
+
className: style_default.ResourceContentGroup,
|
|
84
|
+
"data-stldocs-property-group": "models",
|
|
85
|
+
children: [/* @__PURE__ */ jsxs("h5", {
|
|
86
|
+
className: style_default.ResourceContentGroupModelTitle,
|
|
87
|
+
children: ["Models", /* @__PURE__ */ jsx(PropertyToggle, { target: "models" })]
|
|
88
|
+
}), models.map((model) => /* @__PURE__ */ jsx(Docs.SDKModel, { model }, model.stainlessPath))]
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function SDKOverview({ resource }) {
|
|
95
|
+
const { SDKResource: SDKResource$1 } = useComponents();
|
|
96
|
+
const nested = React$1.useMemo(() => flatResources(resource.subresources, [resource]), [resource]);
|
|
97
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
98
|
+
className: style_default.Overview,
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ jsx("div", {
|
|
101
|
+
className: style_default.OverviewHeader,
|
|
102
|
+
children: /* @__PURE__ */ jsx("h1", { children: resource.title })
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ jsx(SDKResource$1, { resource }),
|
|
105
|
+
nested.map((props, index) => /* @__PURE__ */ createElement(SDKResource$1, {
|
|
106
|
+
...props,
|
|
107
|
+
key: index
|
|
108
|
+
}))
|
|
109
|
+
]
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function SDKRoot({ stainlessPath }) {
|
|
113
|
+
const spec = useSpec();
|
|
114
|
+
const Docs = useComponents();
|
|
115
|
+
const parsed = parseStainlessPath(stainlessPath);
|
|
116
|
+
const resource = spec && getResourceFromSpec(stainlessPath, spec);
|
|
117
|
+
if (!resource || !parsed) {
|
|
118
|
+
console.warn(`Could not find resource or parsed path for '${stainlessPath}'`);
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
if (parsed.method) {
|
|
122
|
+
const method = resource.methods[parsed.method];
|
|
123
|
+
if (!method) {
|
|
124
|
+
console.warn(`Method '${parsed.method}' not found in resource '${resource.stainlessPath}'`);
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
return /* @__PURE__ */ jsx("div", {
|
|
128
|
+
className: style_default.Root,
|
|
129
|
+
children: /* @__PURE__ */ jsx(Docs.SDKMethod, { method })
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return /* @__PURE__ */ jsx("div", {
|
|
133
|
+
className: style_default.Root,
|
|
134
|
+
children: /* @__PURE__ */ jsx(Docs.SDKOverview, { resource })
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//#endregion
|
|
139
|
+
export { SDKRoot as a, SDKResourceHeader as i, SDKOverview as n, SDKResource as r, SDKMethodSummary as t };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as react_jsx_runtime27 from "react/jsx-runtime";
|
|
2
|
+
import * as SDKJSON from "@stainless/sdk-json";
|
|
3
|
+
|
|
4
|
+
//#region src/components/overview.d.ts
|
|
5
|
+
type SDKResourceProps = {
|
|
6
|
+
resource: SDKJSON.Resource;
|
|
7
|
+
parents?: SDKJSON.Resource[];
|
|
8
|
+
};
|
|
9
|
+
declare function SDKResourceHeader({
|
|
10
|
+
resource,
|
|
11
|
+
parents
|
|
12
|
+
}: SDKResourceProps): react_jsx_runtime27.JSX.Element | null;
|
|
13
|
+
type SDKMethodSummaryProps = {
|
|
14
|
+
method: SDKJSON.Method;
|
|
15
|
+
};
|
|
16
|
+
declare function SDKMethodSummary({
|
|
17
|
+
method
|
|
18
|
+
}: SDKMethodSummaryProps): react_jsx_runtime27.JSX.Element;
|
|
19
|
+
declare function SDKResource({
|
|
20
|
+
resource,
|
|
21
|
+
parents,
|
|
22
|
+
showModels
|
|
23
|
+
}: SDKResourceProps & {
|
|
24
|
+
showModels?: boolean;
|
|
25
|
+
}): react_jsx_runtime27.JSX.Element;
|
|
26
|
+
type SDKOverviewProps = {
|
|
27
|
+
resource: SDKJSON.Resource;
|
|
28
|
+
};
|
|
29
|
+
declare function SDKOverview({
|
|
30
|
+
resource
|
|
31
|
+
}: SDKOverviewProps): react_jsx_runtime27.JSX.Element;
|
|
32
|
+
type SDKRootProps = {
|
|
33
|
+
stainlessPath: string;
|
|
34
|
+
};
|
|
35
|
+
declare function SDKRoot({
|
|
36
|
+
stainlessPath
|
|
37
|
+
}: SDKRootProps): react_jsx_runtime27.JSX.Element | null;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { SDKResource as a, SDKRoot as c, SDKOverviewProps as i, SDKRootProps as l, SDKMethodSummaryProps as n, SDKResourceHeader as o, SDKOverview as r, SDKResourceProps as s, SDKMethodSummary as t };
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { a as useLanguage, s as useSettings } from "./docs-CXqi26jB.js";
|
|
2
|
+
import { n as useNavigation } from "./navigation-C5TN0SgC.js";
|
|
3
|
+
import { a as useRenderMarkdown } from "./markdown-CxdeWgjV.js";
|
|
4
|
+
import { t as style_default } from "./style-gnVEeXFj.js";
|
|
5
|
+
import { o as generateRoute } from "./routing-Wbb7YECB.js";
|
|
6
|
+
import * as React$1 from "react";
|
|
7
|
+
import { Fragment, useState } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { MinusIcon, PlusIcon } from "lucide-react";
|
|
10
|
+
import clsx from "clsx";
|
|
11
|
+
|
|
12
|
+
//#region src/components/primitives.tsx
|
|
13
|
+
function Join({ items, limit, children }) {
|
|
14
|
+
return (limit && items.length > limit + 1 ? [...items.slice(0, limit), /* @__PURE__ */ jsxs("span", {
|
|
15
|
+
className: style_default.Truncation,
|
|
16
|
+
children: [items.length - limit, " more"]
|
|
17
|
+
}, "truncation")] : items).map((item, index) => /* @__PURE__ */ jsxs(Fragment, { children: [!!index && children, item] }, `iterator:${index}`));
|
|
18
|
+
}
|
|
19
|
+
function Expander({ id, open, summary, virtual, muted, children }) {
|
|
20
|
+
const virtualExpanders = useSettings()?.virtualExpanders;
|
|
21
|
+
if (virtual || virtualExpanders) return /* @__PURE__ */ jsx(VirtualExpander, {
|
|
22
|
+
summary,
|
|
23
|
+
open,
|
|
24
|
+
muted,
|
|
25
|
+
id,
|
|
26
|
+
children
|
|
27
|
+
});
|
|
28
|
+
return /* @__PURE__ */ jsxs("details", {
|
|
29
|
+
className: style_default.Expander,
|
|
30
|
+
open,
|
|
31
|
+
"data-stldocs-expander-muted": muted,
|
|
32
|
+
"data-stldocs-expander-initial-state": open,
|
|
33
|
+
children: [/* @__PURE__ */ jsxs("summary", {
|
|
34
|
+
className: style_default.ExpanderSummary,
|
|
35
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
36
|
+
className: style_default.ExpanderSummaryIcon,
|
|
37
|
+
children: [/* @__PURE__ */ jsx(PlusIcon, {
|
|
38
|
+
size: 16,
|
|
39
|
+
strokeWidth: 1,
|
|
40
|
+
className: style_default.Icon
|
|
41
|
+
}), /* @__PURE__ */ jsx(MinusIcon, {
|
|
42
|
+
size: 16,
|
|
43
|
+
strokeWidth: 1,
|
|
44
|
+
className: style_default.Icon
|
|
45
|
+
})]
|
|
46
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
47
|
+
className: style_default.ExpanderSummaryContent,
|
|
48
|
+
children: summary
|
|
49
|
+
})]
|
|
50
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
51
|
+
className: style_default.ExpanderContent,
|
|
52
|
+
id,
|
|
53
|
+
children
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function VirtualExpander({ id, open: isOpen, muted, summary, children }) {
|
|
58
|
+
const [open, setOpen] = useState(isOpen);
|
|
59
|
+
React$1.useEffect(() => {
|
|
60
|
+
if (isOpen) setOpen(true);
|
|
61
|
+
}, [isOpen]);
|
|
62
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
63
|
+
className: style_default.Expander,
|
|
64
|
+
"data-open": open,
|
|
65
|
+
"data-stldocs-expander-muted": muted,
|
|
66
|
+
"data-stldocs-expander-initial-state": open,
|
|
67
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
68
|
+
className: style_default.ExpanderSummary,
|
|
69
|
+
onClick: () => setOpen(!open),
|
|
70
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
71
|
+
className: style_default.ExpanderSummaryIcon,
|
|
72
|
+
children: [/* @__PURE__ */ jsx(PlusIcon, {
|
|
73
|
+
size: 16,
|
|
74
|
+
className: style_default.Icon
|
|
75
|
+
}), /* @__PURE__ */ jsx(MinusIcon, {
|
|
76
|
+
size: 16,
|
|
77
|
+
className: style_default.Icon
|
|
78
|
+
})]
|
|
79
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
80
|
+
className: style_default.ExpanderSummaryContent,
|
|
81
|
+
children: summary
|
|
82
|
+
})]
|
|
83
|
+
}), open && /* @__PURE__ */ jsx("div", {
|
|
84
|
+
className: style_default.ExpanderContent,
|
|
85
|
+
id,
|
|
86
|
+
children
|
|
87
|
+
})]
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function Markdown({ content }) {
|
|
91
|
+
const rendered = useRenderMarkdown(content);
|
|
92
|
+
return rendered && /* @__PURE__ */ jsx("div", {
|
|
93
|
+
className: clsx(style_default.Markdown, style_default.Content, "stl-ui-prose"),
|
|
94
|
+
dangerouslySetInnerHTML: { __html: rendered }
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function Badge({ id, children }) {
|
|
98
|
+
return /* @__PURE__ */ jsx("span", {
|
|
99
|
+
className: style_default.Badge,
|
|
100
|
+
"data-badge-id": id,
|
|
101
|
+
children: children ?? id
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
const TooltipNestingContext = React$1.createContext(false);
|
|
105
|
+
function Tooltip({ content, children }) {
|
|
106
|
+
if (React$1.useContext(TooltipNestingContext)) return children;
|
|
107
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
108
|
+
className: style_default.Tooltip,
|
|
109
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
110
|
+
className: style_default.TooltipContent,
|
|
111
|
+
children: /* @__PURE__ */ jsx(TooltipNestingContext.Provider, {
|
|
112
|
+
value: true,
|
|
113
|
+
children: content
|
|
114
|
+
})
|
|
115
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
116
|
+
className: style_default.TooltipHost,
|
|
117
|
+
children
|
|
118
|
+
})]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function Link({ stainlessPath, scroll = true, children, ...props }) {
|
|
122
|
+
const { basePath, onNavigate } = useNavigation();
|
|
123
|
+
const language = useLanguage();
|
|
124
|
+
const href = React$1.useMemo(() => {
|
|
125
|
+
if (props.href) return props.href;
|
|
126
|
+
if (stainlessPath && basePath) return generateRoute(basePath, language, stainlessPath);
|
|
127
|
+
}, [
|
|
128
|
+
basePath,
|
|
129
|
+
language,
|
|
130
|
+
stainlessPath,
|
|
131
|
+
props.href
|
|
132
|
+
]);
|
|
133
|
+
const handleClick = React$1.useCallback((e) => {
|
|
134
|
+
if (props.onClick) props.onClick(e);
|
|
135
|
+
if (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
|
136
|
+
if (href) onNavigate?.(e, {
|
|
137
|
+
href,
|
|
138
|
+
language,
|
|
139
|
+
stainlessPath,
|
|
140
|
+
scroll
|
|
141
|
+
});
|
|
142
|
+
}, [
|
|
143
|
+
href,
|
|
144
|
+
scroll,
|
|
145
|
+
onNavigate,
|
|
146
|
+
language,
|
|
147
|
+
props,
|
|
148
|
+
stainlessPath
|
|
149
|
+
]);
|
|
150
|
+
if (!href) return children;
|
|
151
|
+
return /* @__PURE__ */ jsx("a", {
|
|
152
|
+
href,
|
|
153
|
+
onClick: handleClick,
|
|
154
|
+
...props,
|
|
155
|
+
children
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
const Input = React$1.forwardRef(function Input$1({ left, right, ...props }, ref) {
|
|
159
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
160
|
+
className: style_default.Input,
|
|
161
|
+
children: [
|
|
162
|
+
left,
|
|
163
|
+
/* @__PURE__ */ jsx("input", {
|
|
164
|
+
...props,
|
|
165
|
+
ref,
|
|
166
|
+
className: style_default.InputTextField
|
|
167
|
+
}),
|
|
168
|
+
right
|
|
169
|
+
]
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
const ToggleButton = React$1.forwardRef(function ToggleButton$1({ children, selected, ...props }, ref) {
|
|
173
|
+
return /* @__PURE__ */ jsx("button", {
|
|
174
|
+
...props,
|
|
175
|
+
ref,
|
|
176
|
+
className: style_default.ToggleButton,
|
|
177
|
+
"data-stldocs-toggle-selected": selected,
|
|
178
|
+
children
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
function ListView({ items, itemDelegate, onSelectListItem, ...rest }) {
|
|
182
|
+
const [selectedIndex, setSelectedIndex] = React$1.useState(0);
|
|
183
|
+
const [keyboardIndex, setKeyboardIndex] = React$1.useState(0);
|
|
184
|
+
const listRef = React$1.useRef(null);
|
|
185
|
+
const itemRef = React$1.useRef(null);
|
|
186
|
+
React$1.useEffect(() => {
|
|
187
|
+
setSelectedIndex(0);
|
|
188
|
+
setKeyboardIndex(0);
|
|
189
|
+
}, [items]);
|
|
190
|
+
const handleSelect = React$1.useCallback(() => {
|
|
191
|
+
const item = items[selectedIndex];
|
|
192
|
+
if (item) onSelectListItem?.(item);
|
|
193
|
+
}, [
|
|
194
|
+
items,
|
|
195
|
+
selectedIndex,
|
|
196
|
+
onSelectListItem
|
|
197
|
+
]);
|
|
198
|
+
React$1.useEffect(() => {
|
|
199
|
+
function handleKeyPress(ev) {
|
|
200
|
+
switch (ev.key) {
|
|
201
|
+
case "ArrowUp": {
|
|
202
|
+
ev.preventDefault();
|
|
203
|
+
const value = Math.max(0, selectedIndex - 1);
|
|
204
|
+
setSelectedIndex(value);
|
|
205
|
+
setKeyboardIndex(value);
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
case "ArrowDown": {
|
|
209
|
+
ev.preventDefault();
|
|
210
|
+
const value = Math.min(items.length, selectedIndex + 1);
|
|
211
|
+
setSelectedIndex(value);
|
|
212
|
+
setKeyboardIndex(value);
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
case "Enter":
|
|
216
|
+
ev.preventDefault();
|
|
217
|
+
handleSelect();
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
addEventListener("keydown", handleKeyPress);
|
|
222
|
+
return () => removeEventListener("keydown", handleKeyPress);
|
|
223
|
+
}, [
|
|
224
|
+
items,
|
|
225
|
+
selectedIndex,
|
|
226
|
+
handleSelect
|
|
227
|
+
]);
|
|
228
|
+
React$1.useEffect(() => {
|
|
229
|
+
if (!keyboardIndex || !itemRef.current || !listRef.current) {
|
|
230
|
+
listRef?.current?.scroll(0, 0);
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
const selectedBounds = itemRef.current.getBoundingClientRect();
|
|
234
|
+
const listBounds = listRef.current.getBoundingClientRect();
|
|
235
|
+
if (selectedBounds.top < listBounds.top || selectedBounds.bottom > listBounds.bottom) itemRef.current.scrollIntoView({ block: "nearest" });
|
|
236
|
+
}, [
|
|
237
|
+
keyboardIndex,
|
|
238
|
+
items,
|
|
239
|
+
listRef
|
|
240
|
+
]);
|
|
241
|
+
return /* @__PURE__ */ jsx("div", {
|
|
242
|
+
ref: listRef,
|
|
243
|
+
className: style_default.ListView,
|
|
244
|
+
tabIndex: 0,
|
|
245
|
+
...rest,
|
|
246
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx("div", {
|
|
247
|
+
ref: index === selectedIndex ? itemRef : null,
|
|
248
|
+
className: style_default.ListViewItem,
|
|
249
|
+
"data-stldocs-listview-selected": index === selectedIndex,
|
|
250
|
+
onClick: handleSelect,
|
|
251
|
+
onMouseMove: () => setSelectedIndex(index),
|
|
252
|
+
children: itemDelegate(item, index === selectedIndex)
|
|
253
|
+
}, index))
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
//#endregion
|
|
258
|
+
export { Link as a, ToggleButton as c, Join as i, Tooltip as l, Expander as n, ListView as o, Input as r, Markdown as s, Badge as t, VirtualExpander as u };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime71 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/primitives.d.ts
|
|
6
|
+
type JoinProps = {
|
|
7
|
+
items: ReactNode[];
|
|
8
|
+
limit?: number;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
declare function Join({
|
|
12
|
+
items,
|
|
13
|
+
limit,
|
|
14
|
+
children
|
|
15
|
+
}: JoinProps): react_jsx_runtime71.JSX.Element[];
|
|
16
|
+
type ExpanderProps = {
|
|
17
|
+
id?: string;
|
|
18
|
+
open?: boolean;
|
|
19
|
+
summary: ReactNode;
|
|
20
|
+
virtual?: boolean;
|
|
21
|
+
muted?: boolean;
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
};
|
|
24
|
+
declare function Expander({
|
|
25
|
+
id,
|
|
26
|
+
open,
|
|
27
|
+
summary,
|
|
28
|
+
virtual,
|
|
29
|
+
muted,
|
|
30
|
+
children
|
|
31
|
+
}: ExpanderProps): react_jsx_runtime71.JSX.Element;
|
|
32
|
+
declare function VirtualExpander({
|
|
33
|
+
id,
|
|
34
|
+
open: isOpen,
|
|
35
|
+
muted,
|
|
36
|
+
summary,
|
|
37
|
+
children
|
|
38
|
+
}: Omit<ExpanderProps, 'virtual'>): react_jsx_runtime71.JSX.Element;
|
|
39
|
+
declare function Markdown({
|
|
40
|
+
content
|
|
41
|
+
}: {
|
|
42
|
+
content: string;
|
|
43
|
+
}): "" | react_jsx_runtime71.JSX.Element | undefined;
|
|
44
|
+
type BadgeProps = {
|
|
45
|
+
id: string;
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
};
|
|
48
|
+
declare function Badge({
|
|
49
|
+
id,
|
|
50
|
+
children
|
|
51
|
+
}: BadgeProps): react_jsx_runtime71.JSX.Element;
|
|
52
|
+
type TooltipProps = {
|
|
53
|
+
content: ReactNode;
|
|
54
|
+
children: ReactNode;
|
|
55
|
+
};
|
|
56
|
+
declare function Tooltip({
|
|
57
|
+
content,
|
|
58
|
+
children
|
|
59
|
+
}: TooltipProps): string | number | bigint | boolean | react_jsx_runtime71.JSX.Element | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | null | undefined;
|
|
60
|
+
type LinkProps = {
|
|
61
|
+
stainlessPath: string;
|
|
62
|
+
scroll?: boolean;
|
|
63
|
+
children?: ReactNode;
|
|
64
|
+
} & React$1.HTMLProps<HTMLAnchorElement>;
|
|
65
|
+
declare function Link({
|
|
66
|
+
stainlessPath,
|
|
67
|
+
scroll,
|
|
68
|
+
children,
|
|
69
|
+
...props
|
|
70
|
+
}: LinkProps): string | number | bigint | boolean | react_jsx_runtime71.JSX.Element | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | null | undefined;
|
|
71
|
+
type InputProps = {
|
|
72
|
+
left?: ReactNode;
|
|
73
|
+
right?: ReactNode;
|
|
74
|
+
ref?: React$1.Ref<HTMLInputElement>;
|
|
75
|
+
} & React$1.InputHTMLAttributes<HTMLInputElement>;
|
|
76
|
+
declare const Input: React$1.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
77
|
+
type ToggleButtonProps = {
|
|
78
|
+
children?: ReactNode;
|
|
79
|
+
selected?: boolean;
|
|
80
|
+
} & React$1.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
81
|
+
declare const ToggleButton: React$1.ForwardRefExoticComponent<{
|
|
82
|
+
children?: ReactNode;
|
|
83
|
+
selected?: boolean;
|
|
84
|
+
} & React$1.ButtonHTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
85
|
+
type ListViewProps<TItem> = {
|
|
86
|
+
items: Array<TItem>;
|
|
87
|
+
itemDelegate: (item: TItem, selected: boolean) => React$1.ReactNode;
|
|
88
|
+
onSelectListItem?: (item: TItem) => void;
|
|
89
|
+
} & React$1.HTMLAttributes<HTMLDivElement>;
|
|
90
|
+
declare function ListView<TItem>({
|
|
91
|
+
items,
|
|
92
|
+
itemDelegate,
|
|
93
|
+
onSelectListItem,
|
|
94
|
+
...rest
|
|
95
|
+
}: ListViewProps<TItem>): react_jsx_runtime71.JSX.Element;
|
|
96
|
+
//#endregion
|
|
97
|
+
export { Join as a, ListViewProps as c, ToggleButtonProps as d, Tooltip as f, InputProps as i, Markdown as l, Expander as n, Link as o, VirtualExpander as p, Input as r, ListView as s, Badge as t, ToggleButton as u };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime54 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/primitives.d.ts
|
|
6
|
+
type JoinProps = {
|
|
7
|
+
items: ReactNode[];
|
|
8
|
+
limit?: number;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
declare function Join({
|
|
12
|
+
items,
|
|
13
|
+
limit,
|
|
14
|
+
children
|
|
15
|
+
}: JoinProps): react_jsx_runtime54.JSX.Element[];
|
|
16
|
+
type ExpanderProps = {
|
|
17
|
+
id?: string;
|
|
18
|
+
open?: boolean;
|
|
19
|
+
summary: ReactNode;
|
|
20
|
+
virtual?: boolean;
|
|
21
|
+
muted?: boolean;
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
};
|
|
24
|
+
declare function Expander({
|
|
25
|
+
id,
|
|
26
|
+
open,
|
|
27
|
+
summary,
|
|
28
|
+
virtual,
|
|
29
|
+
muted,
|
|
30
|
+
children
|
|
31
|
+
}: ExpanderProps): react_jsx_runtime54.JSX.Element;
|
|
32
|
+
declare function VirtualExpander({
|
|
33
|
+
id,
|
|
34
|
+
open: isOpen,
|
|
35
|
+
muted,
|
|
36
|
+
summary,
|
|
37
|
+
children
|
|
38
|
+
}: Omit<ExpanderProps, 'virtual'>): react_jsx_runtime54.JSX.Element;
|
|
39
|
+
declare function Markdown({
|
|
40
|
+
content
|
|
41
|
+
}: {
|
|
42
|
+
content: string;
|
|
43
|
+
}): "" | react_jsx_runtime54.JSX.Element | undefined;
|
|
44
|
+
type BadgeProps = {
|
|
45
|
+
id: string;
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
};
|
|
48
|
+
declare function Badge({
|
|
49
|
+
id,
|
|
50
|
+
children
|
|
51
|
+
}: BadgeProps): react_jsx_runtime54.JSX.Element;
|
|
52
|
+
type TooltipProps = {
|
|
53
|
+
content: ReactNode;
|
|
54
|
+
children: ReactNode;
|
|
55
|
+
};
|
|
56
|
+
declare function Tooltip({
|
|
57
|
+
content,
|
|
58
|
+
children
|
|
59
|
+
}: TooltipProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime54.JSX.Element | null | undefined;
|
|
60
|
+
type LinkProps = {
|
|
61
|
+
stainlessPath: string;
|
|
62
|
+
scroll?: boolean;
|
|
63
|
+
children?: ReactNode;
|
|
64
|
+
} & React$1.HTMLProps<HTMLAnchorElement>;
|
|
65
|
+
declare function Link({
|
|
66
|
+
stainlessPath,
|
|
67
|
+
scroll,
|
|
68
|
+
children,
|
|
69
|
+
...props
|
|
70
|
+
}: LinkProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime54.JSX.Element | null | undefined;
|
|
71
|
+
type InputProps = {
|
|
72
|
+
left?: ReactNode;
|
|
73
|
+
right?: ReactNode;
|
|
74
|
+
ref?: React$1.Ref<HTMLInputElement>;
|
|
75
|
+
} & React$1.InputHTMLAttributes<HTMLInputElement>;
|
|
76
|
+
declare const Input: React$1.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
77
|
+
type ToggleButtonProps = {
|
|
78
|
+
children?: ReactNode;
|
|
79
|
+
selected?: boolean;
|
|
80
|
+
} & React$1.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
81
|
+
declare const ToggleButton: React$1.ForwardRefExoticComponent<{
|
|
82
|
+
children?: ReactNode;
|
|
83
|
+
selected?: boolean;
|
|
84
|
+
} & React$1.ButtonHTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
85
|
+
type ListViewProps<TItem> = {
|
|
86
|
+
items: Array<TItem>;
|
|
87
|
+
itemDelegate: (item: TItem, selected: boolean) => React$1.ReactNode;
|
|
88
|
+
onSelectListItem?: (item: TItem) => void;
|
|
89
|
+
} & React$1.HTMLAttributes<HTMLDivElement>;
|
|
90
|
+
declare function ListView<TItem>({
|
|
91
|
+
items,
|
|
92
|
+
itemDelegate,
|
|
93
|
+
onSelectListItem,
|
|
94
|
+
...rest
|
|
95
|
+
}: ListViewProps<TItem>): react_jsx_runtime54.JSX.Element;
|
|
96
|
+
//#endregion
|
|
97
|
+
export { Join as a, ListViewProps as c, ToggleButtonProps as d, Tooltip as f, InputProps as i, Markdown as l, Expander as n, Link as o, VirtualExpander as p, Input as r, ListView as s, Badge as t, ToggleButton as u };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { t as DocsLanguage } from "./routing-CMqh1cTZ.js";
|
|
2
|
+
import * as SDKJSON from "@stainless/sdk-json";
|
|
3
|
+
|
|
4
|
+
//#region src/markdown/printer.d.ts
|
|
5
|
+
declare namespace printer_d_exports {
|
|
6
|
+
export { declaration, methodSignature, type, typeName };
|
|
7
|
+
}
|
|
8
|
+
declare function typeName(language: DocsLanguage, type: SDKJSON.Type): string;
|
|
9
|
+
declare function type(language: DocsLanguage, type: SDKJSON.Type): string;
|
|
10
|
+
declare function declaration(language: DocsLanguage, decl: SDKJSON.DeclarationNode): string;
|
|
11
|
+
declare function methodSignature(language: DocsLanguage, decl: SDKJSON.DeclarationNode): string;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { typeName as a, type as i, methodSignature as n, printer_d_exports as r, declaration as t };
|