@stainless-api/docs-ui 0.1.0-beta.26 → 0.1.0-beta.28
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/index.js +653 -683
- package/dist/mcp.cjs +326 -351
- package/dist/styles/primitives.css +0 -198
- package/package.json +4 -4
- package/src/components/index.ts +0 -1
- package/src/style.ts +0 -12
- package/src/styles/primitives.css +0 -198
- package/src/components/dropdown.tsx +0 -91
- package/src/components/scripts/dropdown.ts +0 -78
package/dist/index.js
CHANGED
|
@@ -3439,17 +3439,7 @@ var style_default = {
|
|
|
3439
3439
|
Breadcrumbs: "stldocs-breadcrumbs",
|
|
3440
3440
|
BreadcrumbsItem: "stldocs-breadcrumbs-item",
|
|
3441
3441
|
BreadcrumbsLink: "stldocs-breadcrumbs-link",
|
|
3442
|
-
BreadcrumbsNonLink: "stldocs-breadcrumbs-non-link"
|
|
3443
|
-
Dropdown: "stldocs-dropdown",
|
|
3444
|
-
DropdownTrigger: "stldocs-dropdown-trigger",
|
|
3445
|
-
DropdownTriggerContent: "stldocs-dropdown-trigger-content",
|
|
3446
|
-
DropdownChevron: "stldocs-dropdown-chevron",
|
|
3447
|
-
DropdownMenu: "stldocs-dropdown-menu",
|
|
3448
|
-
DropdownItem: "stldocs-dropdown-item",
|
|
3449
|
-
DropdownItemLink: "stldocs-dropdown-item-link",
|
|
3450
|
-
Button: "stldocs-button",
|
|
3451
|
-
ButtonSecondary: "stldocs-button-secondary",
|
|
3452
|
-
ButtonIcon: "stldocs-button-icon"
|
|
3442
|
+
BreadcrumbsNonLink: "stldocs-breadcrumbs-non-link"
|
|
3453
3443
|
};
|
|
3454
3444
|
|
|
3455
3445
|
// src/contexts/component.tsx
|
|
@@ -3459,10 +3449,6 @@ import React17 from "react";
|
|
|
3459
3449
|
var components_exports = {};
|
|
3460
3450
|
__export(components_exports, {
|
|
3461
3451
|
Badge: () => Badge,
|
|
3462
|
-
Dropdown: () => Dropdown,
|
|
3463
|
-
DropdownItem: () => DropdownItem,
|
|
3464
|
-
DropdownMenu: () => DropdownMenu,
|
|
3465
|
-
DropdownTrigger: () => DropdownTrigger,
|
|
3466
3452
|
Expander: () => Expander,
|
|
3467
3453
|
HttpMethodIcons: () => HttpMethodIcons,
|
|
3468
3454
|
HttpMethods: () => HttpMethods,
|
|
@@ -4909,139 +4895,193 @@ function Button(props) {
|
|
|
4909
4895
|
Button.Label = function ButtonLabel({ className, ...rest }) {
|
|
4910
4896
|
return /* @__PURE__ */ jsx9("span", { className: clsx_default("stl-ui-button-label leading-none", className), ...rest });
|
|
4911
4897
|
};
|
|
4912
|
-
Button.Icon = function ButtonIcon({ className, icon:
|
|
4913
|
-
return /* @__PURE__ */ jsx9("span", { className: clsx_default("stl-ui-button__icon", className), children: /* @__PURE__ */ jsx9(
|
|
4898
|
+
Button.Icon = function ButtonIcon({ className, icon: Icon4, size = 18 }) {
|
|
4899
|
+
return /* @__PURE__ */ jsx9("span", { className: clsx_default("stl-ui-button__icon", className), children: /* @__PURE__ */ jsx9(Icon4, { size }) });
|
|
4914
4900
|
};
|
|
4915
4901
|
|
|
4916
|
-
// ../ui-primitives/src/components/
|
|
4917
|
-
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
4918
|
-
function
|
|
4919
|
-
return /* @__PURE__ */ jsx10(
|
|
4902
|
+
// ../ui-primitives/src/components/dropdown/DropdownMenu.tsx
|
|
4903
|
+
import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
4904
|
+
function Menu({ className, ...props }) {
|
|
4905
|
+
return /* @__PURE__ */ jsx10(
|
|
4906
|
+
"div",
|
|
4907
|
+
{
|
|
4908
|
+
...props,
|
|
4909
|
+
role: "listbox",
|
|
4910
|
+
"data-state": "closed",
|
|
4911
|
+
"data-part": "menu",
|
|
4912
|
+
className: clsx_default("stl-ui-dropdown-menu", className)
|
|
4913
|
+
}
|
|
4914
|
+
);
|
|
4920
4915
|
}
|
|
4921
|
-
function
|
|
4916
|
+
function MenuItemText({ className, subtle, ...props }) {
|
|
4922
4917
|
return /* @__PURE__ */ jsx10(
|
|
4923
|
-
"
|
|
4918
|
+
"span",
|
|
4924
4919
|
{
|
|
4925
|
-
"data-part": "primary-action",
|
|
4926
4920
|
...props,
|
|
4927
|
-
|
|
4921
|
+
"data-part": "item-text",
|
|
4922
|
+
className: clsx_default(
|
|
4923
|
+
`stl-ui-dropdown-menu__item-text`,
|
|
4924
|
+
{
|
|
4925
|
+
"stl-ui-dropdown-menu__item-text--subtle": subtle
|
|
4926
|
+
},
|
|
4927
|
+
className
|
|
4928
|
+
)
|
|
4928
4929
|
}
|
|
4929
4930
|
);
|
|
4930
4931
|
}
|
|
4931
|
-
function
|
|
4932
|
+
function MenuItem({ children, value, href, isExternalLink, isSelected, ...props }) {
|
|
4933
|
+
const inner = /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
4934
|
+
/* @__PURE__ */ jsx10("div", { className: "stl-ui-dropdown-menu__item-content", children }),
|
|
4935
|
+
isSelected && /* @__PURE__ */ jsx10("div", { className: "stl-ui-dropdown-menu__item-icon", "data-part": "item-selected-icon", children: /* @__PURE__ */ jsx10(Check, { size: 16 }) }),
|
|
4936
|
+
isExternalLink && /* @__PURE__ */ jsx10("div", { className: "stl-ui-dropdown-menu__item-subtle-icon", "data-part": "item-external-link-icon", children: /* @__PURE__ */ jsx10(ExternalLink, { size: 16 }) })
|
|
4937
|
+
] });
|
|
4938
|
+
if (href) {
|
|
4939
|
+
return /* @__PURE__ */ jsx10(
|
|
4940
|
+
"a",
|
|
4941
|
+
{
|
|
4942
|
+
role: "option",
|
|
4943
|
+
"data-part": "item",
|
|
4944
|
+
"data-value": value,
|
|
4945
|
+
"aria-selected": isSelected,
|
|
4946
|
+
href,
|
|
4947
|
+
...props,
|
|
4948
|
+
className: clsx_default("stl-ui-dropdown-menu__item", "stl-ui-dropdown-menu__item-link", props.className),
|
|
4949
|
+
children: inner
|
|
4950
|
+
}
|
|
4951
|
+
);
|
|
4952
|
+
}
|
|
4932
4953
|
return /* @__PURE__ */ jsx10(
|
|
4933
4954
|
"button",
|
|
4934
4955
|
{
|
|
4935
|
-
"aria-haspopup": "listbox",
|
|
4936
|
-
"aria-expanded": "false",
|
|
4937
|
-
"data-part": "trigger",
|
|
4938
4956
|
...props,
|
|
4939
|
-
|
|
4940
|
-
|
|
4957
|
+
role: "option",
|
|
4958
|
+
"data-part": "item",
|
|
4959
|
+
"data-value": value,
|
|
4960
|
+
"aria-selected": isSelected,
|
|
4961
|
+
className: clsx_default("stl-ui-dropdown-menu__item", props.className),
|
|
4962
|
+
children: inner
|
|
4941
4963
|
}
|
|
4942
4964
|
);
|
|
4943
4965
|
}
|
|
4944
|
-
function
|
|
4945
|
-
return /* @__PURE__ */ jsx10(
|
|
4966
|
+
function MenuItemTemplate({ ...props }) {
|
|
4967
|
+
return /* @__PURE__ */ jsx10("template", { "data-part": "selected-template", ...props });
|
|
4968
|
+
}
|
|
4969
|
+
Menu.Item = MenuItem;
|
|
4970
|
+
Menu.ItemText = MenuItemText;
|
|
4971
|
+
Menu.ItemTemplate = MenuItemTemplate;
|
|
4972
|
+
|
|
4973
|
+
// ../ui-primitives/src/components/dropdown/Dropdown.tsx
|
|
4974
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
4975
|
+
function Trigger({ className, ...props }) {
|
|
4976
|
+
return /* @__PURE__ */ jsx11("button", { ...props, "data-part": "trigger", className: clsx_default("stl-ui-dropdown__button", className), children: props.children });
|
|
4977
|
+
}
|
|
4978
|
+
function TriggerSelectedItem({ className, ...props }) {
|
|
4979
|
+
return /* @__PURE__ */ jsx11(
|
|
4946
4980
|
"div",
|
|
4947
4981
|
{
|
|
4948
|
-
"data-state": "closed",
|
|
4949
|
-
"data-part": "menu",
|
|
4950
4982
|
...props,
|
|
4951
|
-
|
|
4983
|
+
"data-part": "trigger-selected",
|
|
4984
|
+
className: clsx_default("stl-ui-dropdown__trigger-selected", className)
|
|
4952
4985
|
}
|
|
4953
4986
|
);
|
|
4954
4987
|
}
|
|
4955
|
-
function
|
|
4956
|
-
return /* @__PURE__ */
|
|
4988
|
+
function TriggerIcon({ className, ...props }) {
|
|
4989
|
+
return /* @__PURE__ */ jsx11("span", { ...props, "data-part": "trigger-icon", className: clsx_default("stl-ui-dropdown__trigger-icon", className) });
|
|
4990
|
+
}
|
|
4991
|
+
function Icon2({ className, ...props }) {
|
|
4992
|
+
return /* @__PURE__ */ jsx11("div", { ...props, "data-part": "item-icon", className: clsx_default("stl-ui-dropdown__icon", className) });
|
|
4993
|
+
}
|
|
4994
|
+
function Dropdown({ className, ...props }) {
|
|
4995
|
+
return /* @__PURE__ */ jsx11(
|
|
4957
4996
|
"div",
|
|
4958
4997
|
{
|
|
4959
|
-
"data-part": "item-icon",
|
|
4960
4998
|
...props,
|
|
4961
|
-
|
|
4999
|
+
"aria-haspopup": "listbox",
|
|
5000
|
+
"aria-expanded": "false",
|
|
5001
|
+
className: clsx_default("stl-ui-dropdown stl-ui-not-prose not-content", className)
|
|
4962
5002
|
}
|
|
4963
5003
|
);
|
|
4964
5004
|
}
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
5005
|
+
Dropdown.Menu = Menu;
|
|
5006
|
+
Dropdown.MenuItem = Menu.Item;
|
|
5007
|
+
Dropdown.MenuItemText = Menu.ItemText;
|
|
5008
|
+
Dropdown.MenuItemTemplate = Menu.ItemTemplate;
|
|
5009
|
+
Dropdown.Trigger = Trigger;
|
|
5010
|
+
Dropdown.TriggerSelectedItem = TriggerSelectedItem;
|
|
5011
|
+
Dropdown.TriggerIcon = TriggerIcon;
|
|
5012
|
+
Dropdown.Icon = Icon2;
|
|
5013
|
+
|
|
5014
|
+
// ../ui-primitives/src/components/dropdown/DropdownButton.tsx
|
|
5015
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
5016
|
+
function PrimaryActionText({ children }) {
|
|
5017
|
+
return /* @__PURE__ */ jsx12("span", { "data-part": "primary-action-text", children });
|
|
5018
|
+
}
|
|
5019
|
+
function PrimaryAction({ className, ...props }) {
|
|
5020
|
+
return /* @__PURE__ */ jsx12(
|
|
5021
|
+
"button",
|
|
4972
5022
|
{
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
{
|
|
4977
|
-
"stl-ui-dropdown-button__menu-item-text--subtle": subtle
|
|
4978
|
-
},
|
|
4979
|
-
className
|
|
4980
|
-
),
|
|
4981
|
-
...props
|
|
5023
|
+
...props,
|
|
5024
|
+
"data-part": "primary-action",
|
|
5025
|
+
className: clsx_default("stl-ui-dropdown__button stl-ui-dropdown-button--action", className)
|
|
4982
5026
|
}
|
|
4983
5027
|
);
|
|
4984
5028
|
}
|
|
4985
|
-
function
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
isExternalLink,
|
|
4989
|
-
...props
|
|
4990
|
-
}) {
|
|
4991
|
-
return /* @__PURE__ */ jsxs5(
|
|
4992
|
-
"div",
|
|
5029
|
+
function Trigger2({ className, ...props }) {
|
|
5030
|
+
return /* @__PURE__ */ jsx12(
|
|
5031
|
+
"button",
|
|
4993
5032
|
{
|
|
4994
|
-
"data-part": "item",
|
|
4995
|
-
"data-value": value,
|
|
4996
5033
|
...props,
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
"div",
|
|
5002
|
-
{
|
|
5003
|
-
className: "stl-ui-dropdown-button__menu-item-external-link-icon",
|
|
5004
|
-
"data-part": "item-external-link-icon",
|
|
5005
|
-
children: /* @__PURE__ */ jsx10(ExternalLink, { size: 16 })
|
|
5006
|
-
}
|
|
5007
|
-
)
|
|
5008
|
-
]
|
|
5034
|
+
type: "button",
|
|
5035
|
+
"data-part": "trigger",
|
|
5036
|
+
className: clsx_default("stl-ui-dropdown__button stl-ui-dropdown-button__trigger", className),
|
|
5037
|
+
children: /* @__PURE__ */ jsx12(ChevronsUpDown, { size: 16 })
|
|
5009
5038
|
}
|
|
5010
5039
|
);
|
|
5011
5040
|
}
|
|
5041
|
+
function Icon3({ className, ...props }) {
|
|
5042
|
+
return /* @__PURE__ */ jsx12("div", { "data-part": "item-icon", ...props, className: clsx_default("stl-ui-dropdown__icon", className) });
|
|
5043
|
+
}
|
|
5012
5044
|
function DropdownButton({ className, ...props }) {
|
|
5013
|
-
return /* @__PURE__ */
|
|
5045
|
+
return /* @__PURE__ */ jsx12(
|
|
5046
|
+
"div",
|
|
5047
|
+
{
|
|
5048
|
+
...props,
|
|
5049
|
+
"aria-haspopup": "listbox",
|
|
5050
|
+
"aria-expanded": "false",
|
|
5051
|
+
className: clsx_default("stl-ui-dropdown stl-ui-not-prose not-content", className)
|
|
5052
|
+
}
|
|
5053
|
+
);
|
|
5014
5054
|
}
|
|
5015
5055
|
DropdownButton.Menu = Menu;
|
|
5016
|
-
DropdownButton.MenuItem =
|
|
5017
|
-
DropdownButton.
|
|
5018
|
-
DropdownButton.MenuItemText = MenuItemText;
|
|
5056
|
+
DropdownButton.MenuItem = Menu.Item;
|
|
5057
|
+
DropdownButton.MenuItemText = Menu.ItemText;
|
|
5019
5058
|
DropdownButton.PrimaryAction = PrimaryAction;
|
|
5020
5059
|
DropdownButton.PrimaryActionText = PrimaryActionText;
|
|
5021
|
-
DropdownButton.Trigger =
|
|
5060
|
+
DropdownButton.Trigger = Trigger2;
|
|
5061
|
+
DropdownButton.Icon = Icon3;
|
|
5022
5062
|
|
|
5023
5063
|
// ../ui-primitives/src/components/Callout.tsx
|
|
5024
|
-
import { jsx as
|
|
5064
|
+
import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
5025
5065
|
|
|
5026
5066
|
// ../ui-primitives/src/components/Accordion.tsx
|
|
5027
|
-
import { jsx as
|
|
5067
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
5028
5068
|
function Accordion({ className, children, ...props }) {
|
|
5029
5069
|
const classes = clsx_default("stl-ui-accordion", className);
|
|
5030
|
-
return /* @__PURE__ */
|
|
5070
|
+
return /* @__PURE__ */ jsx14("details", { className: classes, ...props, children });
|
|
5031
5071
|
}
|
|
5032
5072
|
function AccordionSummary({ children, className, ...props }) {
|
|
5033
5073
|
const classes = clsx_default("stl-ui-accordion__summary", className);
|
|
5034
|
-
return /* @__PURE__ */
|
|
5074
|
+
return /* @__PURE__ */ jsx14("summary", { className: classes, ...props, children });
|
|
5035
5075
|
}
|
|
5036
5076
|
Accordion.Summary = AccordionSummary;
|
|
5037
5077
|
function AccordionGroup({ className, children, ...props }) {
|
|
5038
5078
|
const classes = clsx_default("stl-ui-accordion-group", className);
|
|
5039
|
-
return /* @__PURE__ */
|
|
5079
|
+
return /* @__PURE__ */ jsx14("div", { className: classes, ...props, children });
|
|
5040
5080
|
}
|
|
5041
5081
|
Accordion.Group = AccordionGroup;
|
|
5042
5082
|
|
|
5043
5083
|
// src/components/sdk.tsx
|
|
5044
|
-
import { Fragment as
|
|
5084
|
+
import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
5045
5085
|
var PropertyModelContext = React8.createContext({});
|
|
5046
5086
|
function usePropertyModel() {
|
|
5047
5087
|
return React8.useContext(PropertyModelContext);
|
|
@@ -5064,7 +5104,7 @@ var SDKSnippetLanguages = {
|
|
|
5064
5104
|
};
|
|
5065
5105
|
function SDKChildren({ paths, expand, depth }) {
|
|
5066
5106
|
const Docs = useComponents2();
|
|
5067
|
-
return /* @__PURE__ */
|
|
5107
|
+
return /* @__PURE__ */ jsx15("div", { className: style_default.Properties, children: paths.map((path, i) => /* @__PURE__ */ jsx15(Docs.SDKDeclaration, { path, expand, depth }, i)) });
|
|
5068
5108
|
}
|
|
5069
5109
|
function SDKDeclaration({ path, expand, depth = 0 }) {
|
|
5070
5110
|
const Lang = useLanguageComponents();
|
|
@@ -5077,39 +5117,39 @@ function SDKDeclaration({ path, expand, depth = 0 }) {
|
|
|
5077
5117
|
if (decl.kind.endsWith("Reference")) {
|
|
5078
5118
|
const refId = "type" in decl && typeof decl.type !== "string" && "$ref" in decl.type ? decl.type["$ref"] : void 0;
|
|
5079
5119
|
if (refId && refId !== path && !nesting.includes(refId)) {
|
|
5080
|
-
return /* @__PURE__ */
|
|
5120
|
+
return /* @__PURE__ */ jsx15(ReferenceNestingContext.Provider, { value: [...nesting, refId], children: /* @__PURE__ */ jsx15(SDKDeclaration, { path: refId, expand, depth }) });
|
|
5081
5121
|
}
|
|
5082
5122
|
}
|
|
5083
5123
|
const isUnion = "childrenParentSchema" in decl && decl.childrenParentSchema && ["enum", "union"].includes(decl.childrenParentSchema);
|
|
5084
5124
|
const id = model?.propertyPath ? `${model.propertyPath} + ${path}` : path;
|
|
5085
5125
|
const shouldExpand = selectedPath?.startsWith(path) && nesting.length < 1 || settings?.properties?.expandDepth && depth <= settings?.properties?.expandDepth && !isUnion || expand;
|
|
5086
|
-
const content = /* @__PURE__ */
|
|
5126
|
+
const content = /* @__PURE__ */ jsx15(Lang.Property, { decl, children: ({ ...props }) => /* @__PURE__ */ jsx15(
|
|
5087
5127
|
Docs.Property,
|
|
5088
5128
|
{
|
|
5089
5129
|
id,
|
|
5090
5130
|
expand: shouldExpand,
|
|
5091
|
-
constraints: "constraints" in decl && /* @__PURE__ */
|
|
5092
|
-
declaration: /* @__PURE__ */
|
|
5131
|
+
constraints: "constraints" in decl && /* @__PURE__ */ jsx15(Docs.SDKConstraints, { constraints: decl["constraints"] }),
|
|
5132
|
+
declaration: /* @__PURE__ */ jsx15(Lang.Declaration, { decl }),
|
|
5093
5133
|
description: "docstring" in decl ? decl["docstring"] : void 0,
|
|
5094
5134
|
deprecated: decl.deprecated,
|
|
5095
5135
|
...props,
|
|
5096
|
-
children: "children" in decl && (decl.children?.length ?? 0) > 0 && (settings?.properties?.includeModelProperties !== false || !("modelPath" in decl)) && /* @__PURE__ */ jsxs7(
|
|
5097
|
-
isUnion && /* @__PURE__ */
|
|
5098
|
-
/* @__PURE__ */
|
|
5136
|
+
children: "children" in decl && (decl.children?.length ?? 0) > 0 && (settings?.properties?.includeModelProperties !== false || !("modelPath" in decl)) && /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
5137
|
+
isUnion && /* @__PURE__ */ jsx15("div", { className: style_default.PropertyAnnotation, children: "Accepts one of the following:" }),
|
|
5138
|
+
/* @__PURE__ */ jsx15(Docs.SDKChildren, { paths: decl.children ?? [], depth: depth + 1 })
|
|
5099
5139
|
] })
|
|
5100
5140
|
}
|
|
5101
5141
|
) });
|
|
5102
5142
|
if ("modelPath" in decl) {
|
|
5103
5143
|
const value = { modelPath: decl.modelPath, propertyPath: decl.stainlessPath };
|
|
5104
|
-
return /* @__PURE__ */
|
|
5144
|
+
return /* @__PURE__ */ jsx15(PropertyModelContext.Provider, { value, children: content });
|
|
5105
5145
|
}
|
|
5106
5146
|
return content;
|
|
5107
5147
|
}
|
|
5108
5148
|
function SDKConstraints({ constraints }) {
|
|
5109
5149
|
if (constraints)
|
|
5110
|
-
return /* @__PURE__ */
|
|
5111
|
-
/* @__PURE__ */
|
|
5112
|
-
/* @__PURE__ */
|
|
5150
|
+
return /* @__PURE__ */ jsx15("div", { className: style_default.PropertyConstraints, children: Object.entries(constraints).map(([name, value]) => /* @__PURE__ */ jsxs7("div", { className: style_default.PropertyConstraint, children: [
|
|
5151
|
+
/* @__PURE__ */ jsx15("span", { className: style_default.PropertyConstraintName, children: name }),
|
|
5152
|
+
/* @__PURE__ */ jsx15("span", { className: style_default.PropertyConstraintValue, children: value })
|
|
5113
5153
|
] }, name)) });
|
|
5114
5154
|
}
|
|
5115
5155
|
var snippetIcons = {
|
|
@@ -5127,12 +5167,12 @@ var snippetIcons = {
|
|
|
5127
5167
|
function SDKIcon({ language }) {
|
|
5128
5168
|
const LangIcon = snippetIcons[language];
|
|
5129
5169
|
if (!LangIcon) return null;
|
|
5130
|
-
return /* @__PURE__ */
|
|
5170
|
+
return /* @__PURE__ */ jsx15(LangIcon, { className: clsx_default(style_default.Icon, language.split(".").shift()) });
|
|
5131
5171
|
}
|
|
5132
5172
|
function SDKRequestTitle({ snippetLanguage }) {
|
|
5133
5173
|
const languageName = SDKSnippetLanguages[snippetLanguage]?.name;
|
|
5134
5174
|
return /* @__PURE__ */ jsxs7("span", { className: style_default.SnippetRequestTitleLanguage, children: [
|
|
5135
|
-
/* @__PURE__ */
|
|
5175
|
+
/* @__PURE__ */ jsx15(SDKIcon, { language: snippetLanguage }),
|
|
5136
5176
|
" ",
|
|
5137
5177
|
languageName
|
|
5138
5178
|
] });
|
|
@@ -5141,10 +5181,10 @@ function SDKExample({ method, transformRequestSnippet }) {
|
|
|
5141
5181
|
const Docs = useComponents2();
|
|
5142
5182
|
const language = useLanguage();
|
|
5143
5183
|
const snippetLanguage = getLanguageSnippet(language);
|
|
5144
|
-
return /* @__PURE__ */
|
|
5184
|
+
return /* @__PURE__ */ jsx15(
|
|
5145
5185
|
Docs.Snippet,
|
|
5146
5186
|
{
|
|
5147
|
-
requestTitle: /* @__PURE__ */
|
|
5187
|
+
requestTitle: /* @__PURE__ */ jsx15(Docs.SDKRequestTitle, { snippetLanguage }),
|
|
5148
5188
|
method,
|
|
5149
5189
|
transformRequestSnippet
|
|
5150
5190
|
}
|
|
@@ -5154,14 +5194,14 @@ function SDKMethodHeader({ method }) {
|
|
|
5154
5194
|
const Docs = useComponents2();
|
|
5155
5195
|
const Lang = useLanguageComponents();
|
|
5156
5196
|
const decl = useDeclaration(method.stainlessPath, true);
|
|
5157
|
-
return /* @__PURE__ */
|
|
5197
|
+
return /* @__PURE__ */ jsx15(
|
|
5158
5198
|
Docs.MethodHeader,
|
|
5159
5199
|
{
|
|
5160
5200
|
level: "h1",
|
|
5161
5201
|
title: method.summary ?? method.title,
|
|
5162
|
-
signature: /* @__PURE__ */
|
|
5163
|
-
badges: method.deprecated && /* @__PURE__ */
|
|
5164
|
-
children: /* @__PURE__ */
|
|
5202
|
+
signature: /* @__PURE__ */ jsx15(Lang.MethodSignature, { decl }),
|
|
5203
|
+
badges: method.deprecated && /* @__PURE__ */ jsx15(Docs.Badge, { id: "deprecated", children: "Deprecated" }),
|
|
5204
|
+
children: /* @__PURE__ */ jsx15(Docs.MethodRoute, { httpMethod: method.httpMethod, endpoint: method.endpoint.split(" ", 2).at(-1) })
|
|
5165
5205
|
}
|
|
5166
5206
|
);
|
|
5167
5207
|
}
|
|
@@ -5171,7 +5211,7 @@ function SDKMethodInfo({ method }) {
|
|
|
5171
5211
|
const decl = useDeclaration(method.stainlessPath, true);
|
|
5172
5212
|
const spec = useSpec();
|
|
5173
5213
|
const language = useLanguage();
|
|
5174
|
-
if (Lang.MethodInfo) return /* @__PURE__ */
|
|
5214
|
+
if (Lang.MethodInfo) return /* @__PURE__ */ jsx15(Lang.MethodInfo, { decl });
|
|
5175
5215
|
function shouldExpand(items) {
|
|
5176
5216
|
if (items.length > 1) return false;
|
|
5177
5217
|
const item2 = items[0];
|
|
@@ -5179,11 +5219,11 @@ function SDKMethodInfo({ method }) {
|
|
|
5179
5219
|
const decl2 = spec?.decls?.[language]?.[item2];
|
|
5180
5220
|
return decl2 && "children" in decl2 && decl2.children && decl2.children.length > 0;
|
|
5181
5221
|
}
|
|
5182
|
-
return /* @__PURE__ */
|
|
5222
|
+
return /* @__PURE__ */ jsx15(
|
|
5183
5223
|
Docs.MethodInfo,
|
|
5184
5224
|
{
|
|
5185
|
-
parameters: "paramsChildren" in decl && Array.isArray(decl.paramsChildren) && decl.paramsChildren.length > 0 && /* @__PURE__ */
|
|
5186
|
-
returns: "responseChildren" in decl && decl.responseChildren && decl.responseChildren.length > 0 && /* @__PURE__ */
|
|
5225
|
+
parameters: "paramsChildren" in decl && Array.isArray(decl.paramsChildren) && decl.paramsChildren.length > 0 && /* @__PURE__ */ jsx15(Docs.SDKChildren, { expand: shouldExpand(decl.paramsChildren), paths: decl.paramsChildren }),
|
|
5226
|
+
returns: "responseChildren" in decl && decl.responseChildren && decl.responseChildren.length > 0 && /* @__PURE__ */ jsx15(Docs.SDKChildren, { expand: shouldExpand(decl.responseChildren), paths: decl.responseChildren })
|
|
5187
5227
|
}
|
|
5188
5228
|
);
|
|
5189
5229
|
}
|
|
@@ -5196,20 +5236,20 @@ function SDKMethod({ method, transformRequestSnippet }) {
|
|
|
5196
5236
|
Docs.Method,
|
|
5197
5237
|
{
|
|
5198
5238
|
id: method.stainlessPath,
|
|
5199
|
-
header: /* @__PURE__ */
|
|
5239
|
+
header: /* @__PURE__ */ jsx15(Docs.SDKMethodHeader, { method }),
|
|
5200
5240
|
className: clsx_default({
|
|
5201
5241
|
[style_default.MethodSinglePane]: layout === "single-pane",
|
|
5202
5242
|
[style_default.MethodDoublePane]: layout === "double-pane"
|
|
5203
5243
|
}),
|
|
5204
5244
|
children: [
|
|
5205
5245
|
/* @__PURE__ */ jsxs7("div", { className: style_default.MethodContentColumn, children: [
|
|
5206
|
-
/* @__PURE__ */
|
|
5207
|
-
/* @__PURE__ */
|
|
5246
|
+
/* @__PURE__ */ jsx15(Docs.MethodDescription, { description: method.description }),
|
|
5247
|
+
/* @__PURE__ */ jsx15(Docs.SDKMethodInfo, { method })
|
|
5208
5248
|
] }),
|
|
5209
|
-
/* @__PURE__ */
|
|
5249
|
+
/* @__PURE__ */ jsx15("div", { className: style_default.MethodExample + " not-content", children: /* @__PURE__ */ jsx15(Docs.SDKExample, { method, transformRequestSnippet }) }),
|
|
5210
5250
|
/* @__PURE__ */ jsxs7("div", { className: style_default.MethodResponseColumn, children: [
|
|
5211
|
-
/* @__PURE__ */
|
|
5212
|
-
/* @__PURE__ */
|
|
5251
|
+
/* @__PURE__ */ jsx15("h5", { children: "Returns Examples" }),
|
|
5252
|
+
/* @__PURE__ */ jsx15(Docs.SnippetResponse, { responses: method.exampleResponses })
|
|
5213
5253
|
] })
|
|
5214
5254
|
]
|
|
5215
5255
|
}
|
|
@@ -5219,12 +5259,12 @@ function SDKModel({ model }) {
|
|
|
5219
5259
|
const Docs = useComponents2();
|
|
5220
5260
|
const decl = useDeclaration(`${model.stainlessPath} > (schema)`, true);
|
|
5221
5261
|
if (!decl) return null;
|
|
5222
|
-
return /* @__PURE__ */
|
|
5262
|
+
return /* @__PURE__ */ jsx15("div", { className: style_default.Model, tabIndex: 0, children: /* @__PURE__ */ jsx15("div", { className: style_default.ResourceContentProperties, children: /* @__PURE__ */ jsx15(Docs.SDKDeclaration, { path: `${model.stainlessPath} > (schema)` }) }) });
|
|
5223
5263
|
}
|
|
5224
5264
|
function SDKReference({ stainlessPath, children }) {
|
|
5225
5265
|
const Docs = useComponents2();
|
|
5226
5266
|
if (!stainlessPath || !stainlessPath.endsWith("(schema)")) return children;
|
|
5227
|
-
const link = /* @__PURE__ */
|
|
5267
|
+
const link = /* @__PURE__ */ jsx15("span", { className: style_default.TypeReference, children: /* @__PURE__ */ jsx15(Docs.Link, { stainlessPath, children }) });
|
|
5228
5268
|
return link;
|
|
5229
5269
|
}
|
|
5230
5270
|
function SDKLanguageBlock({ language, version, install, links }) {
|
|
@@ -5232,22 +5272,22 @@ function SDKLanguageBlock({ language, version, install, links }) {
|
|
|
5232
5272
|
const lang = `${language}.default`;
|
|
5233
5273
|
return /* @__PURE__ */ jsxs7("div", { className: style_default.LanguageBlock, children: [
|
|
5234
5274
|
/* @__PURE__ */ jsxs7("div", { className: style_default.LanguageBlockContent, children: [
|
|
5235
|
-
/* @__PURE__ */
|
|
5275
|
+
/* @__PURE__ */ jsx15("div", { className: style_default.LanguageBlockContentIcon, children: /* @__PURE__ */ jsx15(Docs.SDKIcon, { language: lang, size: 24 }) }),
|
|
5236
5276
|
/* @__PURE__ */ jsxs7("div", { className: style_default.LanguageBlockContentInfo, children: [
|
|
5237
|
-
/* @__PURE__ */
|
|
5238
|
-
/* @__PURE__ */
|
|
5277
|
+
/* @__PURE__ */ jsx15("div", { className: style_default.LanguageBlockContentInfoLanguage, children: Docs.SDKSnippetLanguages[lang].name }),
|
|
5278
|
+
/* @__PURE__ */ jsx15("div", { className: style_default.LanguageBlockContentInfoVersion, children: version })
|
|
5239
5279
|
] })
|
|
5240
5280
|
] }),
|
|
5241
5281
|
/* @__PURE__ */ jsxs7("div", { className: style_default.LanguageBlockInstall, "data-stldocs-copy-parent": true, children: [
|
|
5242
|
-
/* @__PURE__ */
|
|
5282
|
+
/* @__PURE__ */ jsx15("pre", { "data-stldocs-copy-content": true, children: install }),
|
|
5243
5283
|
" ",
|
|
5244
|
-
/* @__PURE__ */
|
|
5284
|
+
/* @__PURE__ */ jsx15(Button, { variant: "ghost", size: "sm", "data-stldocs-snippet-copy": true, children: /* @__PURE__ */ jsx15(Copy, { size: 16, className: style_default.Icon }) })
|
|
5245
5285
|
] }),
|
|
5246
5286
|
/* @__PURE__ */ jsxs7("div", { className: style_default.LanguageBlockLinks, children: [
|
|
5247
|
-
/* @__PURE__ */
|
|
5287
|
+
/* @__PURE__ */ jsx15(Button, { href: links.repo, variant: "outline", children: /* @__PURE__ */ jsx15(Button.Icon, { icon: Github }) }),
|
|
5248
5288
|
/* @__PURE__ */ jsxs7(Button, { href: links.docs, variant: "outline", children: [
|
|
5249
|
-
/* @__PURE__ */
|
|
5250
|
-
/* @__PURE__ */
|
|
5289
|
+
/* @__PURE__ */ jsx15(Button.Icon, { icon: BookOpen }),
|
|
5290
|
+
/* @__PURE__ */ jsx15(Button.Label, { children: "Read Docs" })
|
|
5251
5291
|
] })
|
|
5252
5292
|
] })
|
|
5253
5293
|
] });
|
|
@@ -5255,11 +5295,11 @@ function SDKLanguageBlock({ language, version, install, links }) {
|
|
|
5255
5295
|
|
|
5256
5296
|
// src/components/snippets.tsx
|
|
5257
5297
|
import * as React9 from "react";
|
|
5258
|
-
import { jsx as
|
|
5298
|
+
import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
5259
5299
|
function SnippetCode({ content, language }) {
|
|
5260
5300
|
const lang = useLanguage();
|
|
5261
5301
|
const highlighted = useHighlight(content, language || lang);
|
|
5262
|
-
return /* @__PURE__ */
|
|
5302
|
+
return /* @__PURE__ */ jsx16("div", { className: style_default.SnippetCode, children: /* @__PURE__ */ jsx16("pre", { className: style_default.SnippetCodeContent, "data-stldocs-copy-content": true, children: /* @__PURE__ */ jsx16(
|
|
5263
5303
|
"code",
|
|
5264
5304
|
{
|
|
5265
5305
|
className: language === "json" ? "snippet-json" : "snippet",
|
|
@@ -5268,10 +5308,10 @@ function SnippetCode({ content, language }) {
|
|
|
5268
5308
|
) }) });
|
|
5269
5309
|
}
|
|
5270
5310
|
function SnippetContainer({ children }) {
|
|
5271
|
-
return /* @__PURE__ */
|
|
5311
|
+
return /* @__PURE__ */ jsx16("div", { className: clsx_default(style_default.Snippet), children });
|
|
5272
5312
|
}
|
|
5273
5313
|
function SnippetRequestContainer({ children }) {
|
|
5274
|
-
return /* @__PURE__ */
|
|
5314
|
+
return /* @__PURE__ */ jsx16("div", { children });
|
|
5275
5315
|
}
|
|
5276
5316
|
function Snippet({ requestTitle, method, transformRequestSnippet }) {
|
|
5277
5317
|
const Docs = useComponents2();
|
|
@@ -5300,18 +5340,18 @@ function Snippet({ requestTitle, method, transformRequestSnippet }) {
|
|
|
5300
5340
|
setTimeout(() => setCopyIcon(Copy), 1e3);
|
|
5301
5341
|
}
|
|
5302
5342
|
return /* @__PURE__ */ jsxs8(Docs.SnippetContainer, { signature, children: [
|
|
5303
|
-
snippet && /* @__PURE__ */
|
|
5343
|
+
snippet && /* @__PURE__ */ jsx16(Docs.SnippetRequestContainer, { signature, children: /* @__PURE__ */ jsxs8("div", { className: style_default.SnippetRequest, "data-stldocs-copy-parent": true, children: [
|
|
5304
5344
|
/* @__PURE__ */ jsxs8("div", { className: style_default.SnippetRequestTitle, children: [
|
|
5305
5345
|
/* @__PURE__ */ jsxs8("div", { className: style_default.SnippetRequestTitleMethod, children: [
|
|
5306
|
-
/* @__PURE__ */
|
|
5307
|
-
/* @__PURE__ */
|
|
5346
|
+
/* @__PURE__ */ jsx16(Docs.MethodRoute, { httpMethod: method.httpMethod, iconOnly: true }),
|
|
5347
|
+
/* @__PURE__ */ jsx16("h5", { children: method.summary })
|
|
5308
5348
|
] }),
|
|
5309
|
-
/* @__PURE__ */
|
|
5310
|
-
/* @__PURE__ */
|
|
5349
|
+
/* @__PURE__ */ jsx16("div", { className: style_default.SnippetRequestTitleContent, children: requestTitle }),
|
|
5350
|
+
/* @__PURE__ */ jsx16(Button, { variant: "ghost", "data-stldocs-snippet-copy": true, children: /* @__PURE__ */ jsx16(CopyButtonIcon, { size: 16, className: style_default.Icon, onClick: handleCopy }) })
|
|
5311
5351
|
] }),
|
|
5312
|
-
/* @__PURE__ */
|
|
5352
|
+
/* @__PURE__ */ jsx16(Docs.SnippetCode, { content: snippet, signature })
|
|
5313
5353
|
] }) }),
|
|
5314
|
-
responses && /* @__PURE__ */
|
|
5354
|
+
responses && /* @__PURE__ */ jsx16(Docs.SnippetResponse, { responses })
|
|
5315
5355
|
] });
|
|
5316
5356
|
}
|
|
5317
5357
|
function SnippetResponse({ responses }) {
|
|
@@ -5341,8 +5381,8 @@ function SnippetResponse({ responses }) {
|
|
|
5341
5381
|
};
|
|
5342
5382
|
}).filter(Boolean);
|
|
5343
5383
|
if (mappedResponses.length === 0) return null;
|
|
5344
|
-
return /* @__PURE__ */
|
|
5345
|
-
/* @__PURE__ */
|
|
5384
|
+
return /* @__PURE__ */ jsx16("div", { className: style_default.SnippetMultiResponse, children: /* @__PURE__ */ jsxs8("div", { className: clsx_default(style_default.Snippet), children: [
|
|
5385
|
+
/* @__PURE__ */ jsx16(
|
|
5346
5386
|
"div",
|
|
5347
5387
|
{
|
|
5348
5388
|
className: clsx_default(
|
|
@@ -5368,12 +5408,12 @@ function SnippetResponse({ responses }) {
|
|
|
5368
5408
|
}
|
|
5369
5409
|
),
|
|
5370
5410
|
mappedResponses.map(({ responseCode, content }, index) => {
|
|
5371
|
-
return /* @__PURE__ */
|
|
5411
|
+
return /* @__PURE__ */ jsx16(
|
|
5372
5412
|
"div",
|
|
5373
5413
|
{
|
|
5374
5414
|
className: clsx_default(style_default.SnippetResponsePane, index === 0 && style_default.SnippetResponsePaneActive),
|
|
5375
5415
|
"data-snippet-response-pane-id": `snippet-response-tab-${responseCode}-${index}`,
|
|
5376
|
-
children: /* @__PURE__ */
|
|
5416
|
+
children: /* @__PURE__ */ jsx16(SnippetCode2, { content, language: "json" })
|
|
5377
5417
|
},
|
|
5378
5418
|
`snippet-response-${responseCode}-${index}`
|
|
5379
5419
|
);
|
|
@@ -5413,12 +5453,12 @@ function isResourceEmpty(resource) {
|
|
|
5413
5453
|
}
|
|
5414
5454
|
|
|
5415
5455
|
// src/components/overview.tsx
|
|
5416
|
-
import { jsx as
|
|
5456
|
+
import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
5417
5457
|
import { createElement as createElement4 } from "react";
|
|
5418
5458
|
function SDKResourceHeader({ resource, parents }) {
|
|
5419
5459
|
const segments = parents?.map((parent, index) => /* @__PURE__ */ jsxs9("span", { className: style_default.ResourceTitleSegment, children: [
|
|
5420
5460
|
parent.title,
|
|
5421
|
-
index < parents.length && /* @__PURE__ */
|
|
5461
|
+
index < parents.length && /* @__PURE__ */ jsx17(ChevronRight, { size: 16, className: style_default.Icon })
|
|
5422
5462
|
] }, parent.stainlessPath));
|
|
5423
5463
|
if (!segments && !resource.description) {
|
|
5424
5464
|
return null;
|
|
@@ -5426,23 +5466,23 @@ function SDKResourceHeader({ resource, parents }) {
|
|
|
5426
5466
|
return /* @__PURE__ */ jsxs9("div", { className: style_default.ResourceHeader, children: [
|
|
5427
5467
|
segments && /* @__PURE__ */ jsxs9("h4", { id: resource.stainlessPath, className: style_default.ResourceTitle, children: [
|
|
5428
5468
|
segments,
|
|
5429
|
-
/* @__PURE__ */
|
|
5469
|
+
/* @__PURE__ */ jsx17("span", { className: style_default.ResourceTitleSegment, children: resource.title })
|
|
5430
5470
|
] }),
|
|
5431
|
-
resource.description && /* @__PURE__ */
|
|
5471
|
+
resource.description && /* @__PURE__ */ jsx17("div", { className: style_default.ResourceDescription, children: /* @__PURE__ */ jsx17(Markdown, { content: resource.description }) })
|
|
5432
5472
|
] });
|
|
5433
5473
|
}
|
|
5434
5474
|
function SDKMethodSummary({ method }) {
|
|
5435
5475
|
const Docs = useComponents2();
|
|
5436
5476
|
const Lang = useLanguageComponents();
|
|
5437
5477
|
const decl = useDeclaration(method.stainlessPath, true);
|
|
5438
|
-
return /* @__PURE__ */
|
|
5478
|
+
return /* @__PURE__ */ jsx17(
|
|
5439
5479
|
Docs.MethodHeader,
|
|
5440
5480
|
{
|
|
5441
5481
|
level: "h5",
|
|
5442
|
-
title: /* @__PURE__ */
|
|
5443
|
-
signature: /* @__PURE__ */
|
|
5444
|
-
badges: method.deprecated && /* @__PURE__ */
|
|
5445
|
-
children: /* @__PURE__ */
|
|
5482
|
+
title: /* @__PURE__ */ jsx17(Docs.Link, { stainlessPath: method.stainlessPath, children: method.summary ?? method.title }),
|
|
5483
|
+
signature: /* @__PURE__ */ jsx17(Lang.MethodSignature, { decl }),
|
|
5484
|
+
badges: method.deprecated && /* @__PURE__ */ jsx17(Docs.Badge, { id: "deprecated", children: "Deprecated" }),
|
|
5485
|
+
children: /* @__PURE__ */ jsx17(Docs.MethodRoute, { httpMethod: method.httpMethod, endpoint: method.endpoint.split(" ", 2).at(-1) })
|
|
5446
5486
|
}
|
|
5447
5487
|
);
|
|
5448
5488
|
}
|
|
@@ -5456,15 +5496,15 @@ function SDKResource({ resource, parents, showModels }) {
|
|
|
5456
5496
|
const models = Object.values(resource.models).filter(
|
|
5457
5497
|
(model) => spec?.decls?.[language]?.[`${model.stainlessPath} > (schema)`]
|
|
5458
5498
|
);
|
|
5459
|
-
return /* @__PURE__ */
|
|
5460
|
-
/* @__PURE__ */
|
|
5461
|
-
methods.length > 0 && /* @__PURE__ */
|
|
5499
|
+
return /* @__PURE__ */ jsx17("div", { className: style_default.Resource, children: /* @__PURE__ */ jsxs9("div", { className: style_default.ResourceContent, children: [
|
|
5500
|
+
/* @__PURE__ */ jsx17(Docs.SDKResourceHeader, { resource, parents }),
|
|
5501
|
+
methods.length > 0 && /* @__PURE__ */ jsx17("div", { className: style_default.ResourceContentGroup, children: methods.map((method) => /* @__PURE__ */ jsx17("div", { className: style_default.MethodSummary, children: /* @__PURE__ */ jsx17(Docs.SDKMethodSummary, { method }) }, method.stainlessPath)) }),
|
|
5462
5502
|
showModels !== false && models.length > 0 && /* @__PURE__ */ jsxs9("div", { className: style_default.ResourceContentGroup, "data-stldocs-property-group": "models", children: [
|
|
5463
5503
|
/* @__PURE__ */ jsxs9("h5", { className: style_default.ResourceContentGroupModelTitle, children: [
|
|
5464
5504
|
"Models",
|
|
5465
|
-
/* @__PURE__ */
|
|
5505
|
+
/* @__PURE__ */ jsx17(PropertyToggle, { target: "models" })
|
|
5466
5506
|
] }),
|
|
5467
|
-
models.map((model) => /* @__PURE__ */
|
|
5507
|
+
models.map((model) => /* @__PURE__ */ jsx17(Docs.SDKModel, { model }, model.stainlessPath))
|
|
5468
5508
|
] })
|
|
5469
5509
|
] }) });
|
|
5470
5510
|
}
|
|
@@ -5472,8 +5512,8 @@ function SDKOverview({ resource }) {
|
|
|
5472
5512
|
const { SDKResource: SDKResource2 } = useComponents2();
|
|
5473
5513
|
const nested = React10.useMemo(() => flatResources(resource.subresources, [resource]), [resource]);
|
|
5474
5514
|
return /* @__PURE__ */ jsxs9("div", { className: style_default.Overview, children: [
|
|
5475
|
-
/* @__PURE__ */
|
|
5476
|
-
/* @__PURE__ */
|
|
5515
|
+
/* @__PURE__ */ jsx17("div", { className: style_default.OverviewHeader, children: /* @__PURE__ */ jsx17("h1", { children: resource.title }) }),
|
|
5516
|
+
/* @__PURE__ */ jsx17(SDKResource2, { resource }),
|
|
5477
5517
|
nested.map((props, index) => /* @__PURE__ */ createElement4(SDKResource2, { ...props, key: index }))
|
|
5478
5518
|
] });
|
|
5479
5519
|
}
|
|
@@ -5492,13 +5532,13 @@ function SDKRoot({ stainlessPath }) {
|
|
|
5492
5532
|
console.warn(`Method '${parsed.method}' not found in resource '${resource.stainlessPath}'`);
|
|
5493
5533
|
return null;
|
|
5494
5534
|
}
|
|
5495
|
-
return /* @__PURE__ */
|
|
5535
|
+
return /* @__PURE__ */ jsx17("div", { className: style_default.Root, children: /* @__PURE__ */ jsx17(Docs.SDKMethod, { method }) });
|
|
5496
5536
|
}
|
|
5497
|
-
return /* @__PURE__ */
|
|
5537
|
+
return /* @__PURE__ */ jsx17("div", { className: style_default.Root, children: /* @__PURE__ */ jsx17(Docs.SDKOverview, { resource }) });
|
|
5498
5538
|
}
|
|
5499
5539
|
|
|
5500
5540
|
// src/components/breadcrumbs.tsx
|
|
5501
|
-
import { jsx as
|
|
5541
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
5502
5542
|
function generateApiBreadcrumbs(fullPath, spec, basePath) {
|
|
5503
5543
|
const cleanBasePath = basePath.replace(/\/+$/, "");
|
|
5504
5544
|
const cleanPath = fullPath.replace(/\/+$/, "");
|
|
@@ -5539,116 +5579,46 @@ function SDKBreadcrumbs({
|
|
|
5539
5579
|
if (!config?.includeCurrentPage && breadcrumbs.length > 1) {
|
|
5540
5580
|
breadcrumbs.pop();
|
|
5541
5581
|
}
|
|
5542
|
-
const items = breadcrumbs.map((crumb, index) => /* @__PURE__ */
|
|
5543
|
-
return /* @__PURE__ */
|
|
5582
|
+
const items = breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsx18("div", { className: style_default.BreadcrumbsItem, children: /* @__PURE__ */ jsx18("a", { href: crumb.href, className: style_default.BreadcrumbsLink, children: crumb.title }) }, index));
|
|
5583
|
+
return /* @__PURE__ */ jsx18("div", { className: style_default.Breadcrumbs, children: /* @__PURE__ */ jsx18(Join, { limit: breadcrumbs.length, items, children: /* @__PURE__ */ jsx18(ChevronRight, {}) }) });
|
|
5544
5584
|
}
|
|
5545
5585
|
|
|
5546
|
-
// src/components/dropdown.tsx
|
|
5547
|
-
import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
5548
|
-
var Dropdown = ({ className, children, ...rest }) => {
|
|
5549
|
-
return /* @__PURE__ */ jsx17("div", { ...rest, className: `${style_default.Dropdown} ${className ?? ""}`, children });
|
|
5550
|
-
};
|
|
5551
|
-
var DropdownTrigger = ({
|
|
5552
|
-
children,
|
|
5553
|
-
withChevron,
|
|
5554
|
-
className,
|
|
5555
|
-
isIcon,
|
|
5556
|
-
...rest
|
|
5557
|
-
}) => {
|
|
5558
|
-
return /* @__PURE__ */ jsxs10(
|
|
5559
|
-
"button",
|
|
5560
|
-
{
|
|
5561
|
-
className: `${style_default.Button} ${style_default.ButtonSecondary} ${style_default.DropdownTrigger} ${isIcon ? style_default.ButtonIcon : ""} ${className ?? ""}`,
|
|
5562
|
-
"aria-haspopup": "listbox",
|
|
5563
|
-
...rest,
|
|
5564
|
-
children: [
|
|
5565
|
-
/* @__PURE__ */ jsx17("div", { className: style_default.DropdownTriggerContent, children }),
|
|
5566
|
-
withChevron && /* @__PURE__ */ jsx17("span", { className: style_default.DropdownChevron, children: /* @__PURE__ */ jsx17(ChevronsUpDown, { size: 16 }) })
|
|
5567
|
-
]
|
|
5568
|
-
}
|
|
5569
|
-
);
|
|
5570
|
-
};
|
|
5571
|
-
var DropdownMenu = ({
|
|
5572
|
-
position,
|
|
5573
|
-
className,
|
|
5574
|
-
children,
|
|
5575
|
-
...rest
|
|
5576
|
-
}) => {
|
|
5577
|
-
return /* @__PURE__ */ jsx17("ul", { className: `${style_default.DropdownMenu} ${position ?? ""} ${className ?? ""}`, ...rest, children });
|
|
5578
|
-
};
|
|
5579
|
-
var DropdownItem = ({
|
|
5580
|
-
children,
|
|
5581
|
-
className,
|
|
5582
|
-
value,
|
|
5583
|
-
selected,
|
|
5584
|
-
href
|
|
5585
|
-
}) => {
|
|
5586
|
-
const inner = /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
5587
|
-
children,
|
|
5588
|
-
/* @__PURE__ */ jsx17(
|
|
5589
|
-
"svg",
|
|
5590
|
-
{
|
|
5591
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5592
|
-
width: "24",
|
|
5593
|
-
height: "24",
|
|
5594
|
-
viewBox: "0 0 24 24",
|
|
5595
|
-
fill: "none",
|
|
5596
|
-
stroke: "currentColor",
|
|
5597
|
-
strokeWidth: "2",
|
|
5598
|
-
strokeLinecap: "round",
|
|
5599
|
-
strokeLinejoin: "round",
|
|
5600
|
-
className: "lucide lucide-check-icon lucide-check",
|
|
5601
|
-
children: /* @__PURE__ */ jsx17("path", { d: "M20 6 9 17l-5-5" })
|
|
5602
|
-
}
|
|
5603
|
-
)
|
|
5604
|
-
] });
|
|
5605
|
-
return /* @__PURE__ */ jsx17(
|
|
5606
|
-
"li",
|
|
5607
|
-
{
|
|
5608
|
-
className: clsx_default(style_default.DropdownItem, className, selected && "selected", href && style_default.DropdownItemLink),
|
|
5609
|
-
role: "option",
|
|
5610
|
-
"data-dropdown-value": value,
|
|
5611
|
-
children: href ? /* @__PURE__ */ jsx17("a", { href, children: inner }) : inner
|
|
5612
|
-
}
|
|
5613
|
-
);
|
|
5614
|
-
};
|
|
5615
|
-
|
|
5616
5586
|
// src/components/sidebar.tsx
|
|
5617
|
-
import { jsx as
|
|
5587
|
+
import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
5618
5588
|
function SidebarExpander({ open, summary, children }) {
|
|
5619
|
-
return /* @__PURE__ */
|
|
5620
|
-
/* @__PURE__ */
|
|
5621
|
-
/* @__PURE__ */
|
|
5622
|
-
/* @__PURE__ */
|
|
5623
|
-
/* @__PURE__ */
|
|
5624
|
-
/* @__PURE__ */
|
|
5589
|
+
return /* @__PURE__ */ jsxs10("details", { className: style_default.SidebarExpander, open, children: [
|
|
5590
|
+
/* @__PURE__ */ jsxs10("summary", { className: style_default.ExpanderSummary, children: [
|
|
5591
|
+
/* @__PURE__ */ jsx19("div", { className: style_default.ExpanderSummaryContent, children: summary }),
|
|
5592
|
+
/* @__PURE__ */ jsxs10("div", { className: style_default.ExpanderSummaryIcon, children: [
|
|
5593
|
+
/* @__PURE__ */ jsx19(ChevronRight, { size: 16, strokeWidth: 1, className: style_default.Icon }),
|
|
5594
|
+
/* @__PURE__ */ jsx19(ChevronDown, { size: 16, strokeWidth: 1, className: style_default.Icon })
|
|
5625
5595
|
] })
|
|
5626
5596
|
] }),
|
|
5627
|
-
/* @__PURE__ */
|
|
5597
|
+
/* @__PURE__ */ jsx19("div", { className: style_default.ExpanderContent, children })
|
|
5628
5598
|
] });
|
|
5629
5599
|
}
|
|
5630
5600
|
function SidebarMethod({ method }) {
|
|
5631
5601
|
const Docs = useComponents2();
|
|
5632
5602
|
const { selectedPath } = useNavigation();
|
|
5633
|
-
return /* @__PURE__ */
|
|
5634
|
-
/* @__PURE__ */
|
|
5635
|
-
/* @__PURE__ */
|
|
5603
|
+
return /* @__PURE__ */ jsxs10("div", { className: style_default.SidebarMethod, "data-selected": method.stainlessPath === selectedPath, children: [
|
|
5604
|
+
/* @__PURE__ */ jsx19(MethodIconBadge, { httpMethod: method.httpMethod }),
|
|
5605
|
+
/* @__PURE__ */ jsx19(Docs.Link, { stainlessPath: method.stainlessPath, children: method.summary })
|
|
5636
5606
|
] });
|
|
5637
5607
|
}
|
|
5638
5608
|
function SidebarResource({ resource }) {
|
|
5639
5609
|
const Docs = useComponents2();
|
|
5640
5610
|
const { selectedPath } = useNavigation();
|
|
5641
|
-
const subresources = Object.values(resource.subresources ?? {}).map((sub) => /* @__PURE__ */
|
|
5642
|
-
const methods = Object.values(resource.methods).map((method) => /* @__PURE__ */
|
|
5611
|
+
const subresources = Object.values(resource.subresources ?? {}).map((sub) => /* @__PURE__ */ jsx19(SidebarResource, { resource: sub }, sub.stainlessPath));
|
|
5612
|
+
const methods = Object.values(resource.methods).map((method) => /* @__PURE__ */ jsx19(SidebarMethod, { method }, method.stainlessPath));
|
|
5643
5613
|
const hasChildren2 = subresources.length > 0 || methods.length > 0;
|
|
5644
|
-
const title = /* @__PURE__ */
|
|
5645
|
-
return /* @__PURE__ */
|
|
5614
|
+
const title = /* @__PURE__ */ jsx19("div", { className: style_default.SidebarResourceTitle, children: /* @__PURE__ */ jsx19(Docs.Link, { stainlessPath: resource.stainlessPath, children: resource.title }) });
|
|
5615
|
+
return /* @__PURE__ */ jsx19("div", { className: style_default.SidebarResource, "data-selected": resource.stainlessPath === selectedPath, children: hasChildren2 ? /* @__PURE__ */ jsxs10(SidebarExpander, { summary: title, open: true, children: [
|
|
5646
5616
|
methods,
|
|
5647
5617
|
subresources
|
|
5648
5618
|
] }) : title });
|
|
5649
5619
|
}
|
|
5650
5620
|
function Sidebar({ resources }) {
|
|
5651
|
-
return /* @__PURE__ */
|
|
5621
|
+
return /* @__PURE__ */ jsx19("div", { className: `${style_default.Root} ${style_default.Sidebar}`, children: resources.filter((resource) => !isResourceEmpty(resource)).map((resource) => /* @__PURE__ */ jsx19(SidebarResource, { resource }, resource.stainlessPath)) });
|
|
5652
5622
|
}
|
|
5653
5623
|
|
|
5654
5624
|
// src/languages/index.ts
|
|
@@ -5674,7 +5644,7 @@ __export(typescript_exports, {
|
|
|
5674
5644
|
TypeName: () => TypeName
|
|
5675
5645
|
});
|
|
5676
5646
|
import * as React11 from "react";
|
|
5677
|
-
import { Fragment as Fragment6, jsx as
|
|
5647
|
+
import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
5678
5648
|
var ComplexTypes = {
|
|
5679
5649
|
TSTypeObject: "object",
|
|
5680
5650
|
TSTypeUnion: "union",
|
|
@@ -5688,9 +5658,9 @@ var constStyle = {
|
|
|
5688
5658
|
boolean: style_default.LiteralBoolean
|
|
5689
5659
|
};
|
|
5690
5660
|
function Identifier({ name, optional }) {
|
|
5691
|
-
return /* @__PURE__ */
|
|
5692
|
-
/* @__PURE__ */
|
|
5693
|
-
optional && /* @__PURE__ */
|
|
5661
|
+
return /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
5662
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextIdentifier, children: /^[_a-zA-Z][_a-zA-Z0-9]*$/.test(name) ? name : JSON.stringify(name) }),
|
|
5663
|
+
optional && /* @__PURE__ */ jsx20("span", { className: style_default.TextPunctuation, children: "?" })
|
|
5694
5664
|
] });
|
|
5695
5665
|
}
|
|
5696
5666
|
function TypeParams({ params }) {
|
|
@@ -5698,16 +5668,16 @@ function TypeParams({ params }) {
|
|
|
5698
5668
|
const { Join: Join2 } = useComponents2();
|
|
5699
5669
|
if (!params?.length) return null;
|
|
5700
5670
|
const typeParams = params?.map(
|
|
5701
|
-
(param, key) => param.constraint ? /* @__PURE__ */
|
|
5702
|
-
/* @__PURE__ */
|
|
5703
|
-
/* @__PURE__ */
|
|
5704
|
-
/* @__PURE__ */
|
|
5705
|
-
] }, key) : /* @__PURE__ */
|
|
5671
|
+
(param, key) => param.constraint ? /* @__PURE__ */ jsxs11(React11.Fragment, { children: [
|
|
5672
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypeReference, children: param.name }),
|
|
5673
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextKeyword, children: "extends " }),
|
|
5674
|
+
/* @__PURE__ */ jsx20(Lang.Type, { type: param.constraint })
|
|
5675
|
+
] }, key) : /* @__PURE__ */ jsx20(React11.Fragment, { children: "param.name" }, key)
|
|
5706
5676
|
);
|
|
5707
|
-
return /* @__PURE__ */
|
|
5708
|
-
/* @__PURE__ */
|
|
5709
|
-
/* @__PURE__ */
|
|
5710
|
-
/* @__PURE__ */
|
|
5677
|
+
return /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
5678
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypeBracket, children: "<" }),
|
|
5679
|
+
/* @__PURE__ */ jsx20(Join2, { items: typeParams, limit: 3, children: /* @__PURE__ */ jsx20("span", { className: style_default.TextOperator, children: ", " }) }),
|
|
5680
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypeBracket, children: ">" })
|
|
5711
5681
|
] });
|
|
5712
5682
|
}
|
|
5713
5683
|
function TypePreview({ path }) {
|
|
@@ -5719,21 +5689,21 @@ function TypePreview({ path }) {
|
|
|
5719
5689
|
return;
|
|
5720
5690
|
const items = decl.children.map((prop, key) => {
|
|
5721
5691
|
const p = spec?.decls?.[language]?.[prop];
|
|
5722
|
-
return /* @__PURE__ */
|
|
5692
|
+
return /* @__PURE__ */ jsx20("span", { className: style_default.TypePropertyName, children: /* @__PURE__ */ jsx20("span", { className: style_default.TextIdentifier, children: p && "key" in p ? p["key"] : null }) }, key);
|
|
5723
5693
|
});
|
|
5724
|
-
return /* @__PURE__ */
|
|
5725
|
-
/* @__PURE__ */
|
|
5726
|
-
/* @__PURE__ */
|
|
5694
|
+
return /* @__PURE__ */ jsxs11("span", { className: style_default.TypePreview, "data-stldocs-type-preview": "properties", children: [
|
|
5695
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypeBrace, children: " {" }),
|
|
5696
|
+
/* @__PURE__ */ jsxs11("span", { className: style_default.TypePreviewContent, children: [
|
|
5727
5697
|
" ",
|
|
5728
|
-
/* @__PURE__ */
|
|
5698
|
+
/* @__PURE__ */ jsx20(Join2, { items, limit: 3, children: /* @__PURE__ */ jsx20("span", { className: style_default.TextOperator, children: ", " }) }),
|
|
5729
5699
|
" "
|
|
5730
5700
|
] }),
|
|
5731
|
-
/* @__PURE__ */
|
|
5701
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypeBrace, children: "} " })
|
|
5732
5702
|
] });
|
|
5733
5703
|
}
|
|
5734
5704
|
function TypeName({ type }) {
|
|
5735
5705
|
const Lang = useLanguageComponents();
|
|
5736
|
-
return ComplexTypes[type.kind] ?? /* @__PURE__ */
|
|
5706
|
+
return ComplexTypes[type.kind] ?? /* @__PURE__ */ jsx20(Lang.Type, { type });
|
|
5737
5707
|
}
|
|
5738
5708
|
function Type({ type }) {
|
|
5739
5709
|
const Lang = useLanguageComponents();
|
|
@@ -5747,36 +5717,36 @@ function Type({ type }) {
|
|
|
5747
5717
|
case "TSTypeAny":
|
|
5748
5718
|
case "TSTypeBoolean":
|
|
5749
5719
|
case "TSTypeNumber":
|
|
5750
|
-
return /* @__PURE__ */
|
|
5720
|
+
return /* @__PURE__ */ jsx20("span", { className: style_default.Type, children: /* @__PURE__ */ jsx20("span", { className: style_default.TypeKeyword, children: type.kind.slice(6).toLowerCase() }) });
|
|
5751
5721
|
case "TSTypeString":
|
|
5752
|
-
return /* @__PURE__ */
|
|
5722
|
+
return /* @__PURE__ */ jsx20("span", { className: style_default.Type, children: /* @__PURE__ */ jsx20("span", { className: style_default.TypeString, children: "string" }) });
|
|
5753
5723
|
case "TSTypeLiteral":
|
|
5754
|
-
return /* @__PURE__ */
|
|
5724
|
+
return /* @__PURE__ */ jsx20("span", { className: style_default.Type, children: /* @__PURE__ */ jsx20("span", { className: constStyle[typeof type.literal], children: JSON.stringify(type.literal) }) });
|
|
5755
5725
|
case "TSTypeArray": {
|
|
5756
|
-
return /* @__PURE__ */
|
|
5757
|
-
/* @__PURE__ */
|
|
5758
|
-
/* @__PURE__ */
|
|
5759
|
-
/* @__PURE__ */
|
|
5726
|
+
return /* @__PURE__ */ jsxs11("span", { className: style_default.Type, children: [
|
|
5727
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypeArray, children: "Array<" }),
|
|
5728
|
+
/* @__PURE__ */ jsx20(Lang.Type, { type: type.elementType }),
|
|
5729
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypeArray, children: ">" })
|
|
5760
5730
|
] });
|
|
5761
5731
|
}
|
|
5762
5732
|
case "TSTypeReference": {
|
|
5763
5733
|
const name = type.ident.split(".").at(-1);
|
|
5764
|
-
const params = type.typeParameters?.map((param, key) => /* @__PURE__ */
|
|
5765
|
-
return /* @__PURE__ */
|
|
5766
|
-
/* @__PURE__ */
|
|
5767
|
-
params && params.length > 0 && /* @__PURE__ */
|
|
5768
|
-
/* @__PURE__ */
|
|
5769
|
-
/* @__PURE__ */
|
|
5770
|
-
/* @__PURE__ */
|
|
5734
|
+
const params = type.typeParameters?.map((param, key) => /* @__PURE__ */ jsx20(Lang.Type, { type: param }, key));
|
|
5735
|
+
return /* @__PURE__ */ jsxs11("span", { className: style_default.Type, children: [
|
|
5736
|
+
/* @__PURE__ */ jsx20(SDKReference2, { stainlessPath: type.$ref, children: name }),
|
|
5737
|
+
params && params.length > 0 && /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
5738
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypeBracket, children: "<" }),
|
|
5739
|
+
/* @__PURE__ */ jsx20(Join2, { items: params, limit: 3, children: /* @__PURE__ */ jsx20("span", { className: style_default.TextOperator, children: ", " }) }),
|
|
5740
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypeBracket, children: ">" })
|
|
5771
5741
|
] }),
|
|
5772
|
-
/* @__PURE__ */
|
|
5742
|
+
/* @__PURE__ */ jsx20(TypePreview, { path: type.$ref })
|
|
5773
5743
|
] });
|
|
5774
5744
|
}
|
|
5775
5745
|
case "TSTypeIntersection":
|
|
5776
5746
|
case "TSTypeUnion": {
|
|
5777
|
-
const items = type.types.map((t, key) => /* @__PURE__ */
|
|
5747
|
+
const items = type.types.map((t, key) => /* @__PURE__ */ jsx20(Lang.Type, { type: t }, key));
|
|
5778
5748
|
const delimiter = type.kind === "TSTypeUnion" ? "|" : "&";
|
|
5779
|
-
return /* @__PURE__ */
|
|
5749
|
+
return /* @__PURE__ */ jsx20("span", { className: style_default.Type, children: /* @__PURE__ */ jsx20("span", { className: style_default.TypePreview, "data-stldocs-type-preview": "union", children: /* @__PURE__ */ jsx20("span", { className: style_default.TypePreviewContent, children: /* @__PURE__ */ jsx20(Join2, { items, limit: 3, children: /* @__PURE__ */ jsxs11("span", { className: style_default.TextOperator, children: [
|
|
5780
5750
|
" ",
|
|
5781
5751
|
delimiter,
|
|
5782
5752
|
" "
|
|
@@ -5784,21 +5754,21 @@ function Type({ type }) {
|
|
|
5784
5754
|
}
|
|
5785
5755
|
case "TSTypeObject":
|
|
5786
5756
|
case "TSTypeInterface": {
|
|
5787
|
-
const extend = type.kind === "TSTypeObject" ? null : type.extends?.map((ref, key) => /* @__PURE__ */
|
|
5788
|
-
const items = type.members.map((prop, key) => /* @__PURE__ */
|
|
5789
|
-
/* @__PURE__ */
|
|
5790
|
-
/* @__PURE__ */
|
|
5791
|
-
/* @__PURE__ */
|
|
5757
|
+
const extend = type.kind === "TSTypeObject" ? null : type.extends?.map((ref, key) => /* @__PURE__ */ jsx20(Lang.Type, { type: ref }, key));
|
|
5758
|
+
const items = type.members.map((prop, key) => /* @__PURE__ */ jsxs11(React11.Fragment, { children: [
|
|
5759
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypePropertyName, children: /* @__PURE__ */ jsx20(Identifier, { name: prop.ident, optional: prop.optional }) }),
|
|
5760
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextPunctuation, children: ": " }),
|
|
5761
|
+
/* @__PURE__ */ jsx20(Lang.Type, { type: prop.type })
|
|
5792
5762
|
] }, key));
|
|
5793
|
-
return /* @__PURE__ */
|
|
5794
|
-
extend?.length && /* @__PURE__ */
|
|
5795
|
-
/* @__PURE__ */
|
|
5796
|
-
/* @__PURE__ */
|
|
5763
|
+
return /* @__PURE__ */ jsxs11("span", { className: style_default.Type, children: [
|
|
5764
|
+
extend?.length && /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
5765
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypeKeyword, children: " extends " }),
|
|
5766
|
+
/* @__PURE__ */ jsx20(Join2, { items: extend, limit: 3, children: /* @__PURE__ */ jsx20("span", { className: style_default.TextOperator, children: ", " }) })
|
|
5797
5767
|
] }),
|
|
5798
|
-
/* @__PURE__ */
|
|
5799
|
-
/* @__PURE__ */
|
|
5800
|
-
/* @__PURE__ */
|
|
5801
|
-
/* @__PURE__ */
|
|
5768
|
+
/* @__PURE__ */ jsxs11("span", { className: style_default.TypePreview, "data-stldocs-type-preview": "properties", children: [
|
|
5769
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypeBrace, children: "{ " }),
|
|
5770
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypePreviewContent, children: /* @__PURE__ */ jsx20(Join2, { items, limit: 3, children: /* @__PURE__ */ jsx20("span", { className: style_default.TextOperator, children: ", " }) }) }),
|
|
5771
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypeBrace, children: "} " })
|
|
5802
5772
|
] })
|
|
5803
5773
|
] });
|
|
5804
5774
|
}
|
|
@@ -5807,22 +5777,22 @@ function Type({ type }) {
|
|
|
5807
5777
|
function MethodSignature({ decl }) {
|
|
5808
5778
|
const Lang = useLanguageComponents();
|
|
5809
5779
|
const { Join: Join2, Tooltip: Tooltip2 } = useComponents2();
|
|
5810
|
-
const params = decl.signature.parameters.map((param, i) => /* @__PURE__ */
|
|
5811
|
-
/* @__PURE__ */
|
|
5812
|
-
param.optional && /* @__PURE__ */
|
|
5780
|
+
const params = decl.signature.parameters.map((param, i) => /* @__PURE__ */ jsxs11(React11.Fragment, { children: [
|
|
5781
|
+
/* @__PURE__ */ jsx20(Tooltip2, { content: /* @__PURE__ */ jsx20(Lang.Type, { type: param.type }), children: /* @__PURE__ */ jsx20("span", { className: style_default.TextIdentifier, children: param.ident }) }),
|
|
5782
|
+
param.optional && /* @__PURE__ */ jsx20("span", { className: style_default.TextPunctuation, children: "?" })
|
|
5813
5783
|
] }, i));
|
|
5814
|
-
return /* @__PURE__ */
|
|
5815
|
-
decl.signature.async && /* @__PURE__ */
|
|
5816
|
-
/* @__PURE__ */
|
|
5817
|
-
/* @__PURE__ */
|
|
5818
|
-
/* @__PURE__ */
|
|
5819
|
-
decl.signature.typeParameters && /* @__PURE__ */
|
|
5820
|
-
/* @__PURE__ */
|
|
5821
|
-
/* @__PURE__ */
|
|
5822
|
-
/* @__PURE__ */
|
|
5823
|
-
decl.signature.returns && /* @__PURE__ */
|
|
5824
|
-
/* @__PURE__ */
|
|
5825
|
-
/* @__PURE__ */
|
|
5784
|
+
return /* @__PURE__ */ jsx20("div", { className: style_default.MethodSignature, children: /* @__PURE__ */ jsxs11("span", { className: style_default.SignatureTitle, children: [
|
|
5785
|
+
decl.signature.async && /* @__PURE__ */ jsx20("span", { className: style_default.TextKeyword, children: "async " }),
|
|
5786
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.SignatureQualified, children: /* @__PURE__ */ jsx20("span", { className: style_default.TextIdentifier, children: decl.qualified?.slice(0, -decl.ident.length) }) }),
|
|
5787
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.SignatureName, children: /* @__PURE__ */ jsx20("span", { className: style_default.TextIdentifier, children: decl.ident }) }),
|
|
5788
|
+
/* @__PURE__ */ jsxs11("span", { className: style_default.MethodSignature, children: [
|
|
5789
|
+
decl.signature.typeParameters && /* @__PURE__ */ jsx20(TypeParams, { params: decl.signature.typeParameters }),
|
|
5790
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.SignatureParen, children: "(" }),
|
|
5791
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.SignatureParams, children: /* @__PURE__ */ jsx20(Join2, { items: params, children: /* @__PURE__ */ jsx20("span", { className: style_default.TextOperator, children: ", " }) }) }),
|
|
5792
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.SignatureParen, children: ")" }),
|
|
5793
|
+
decl.signature.returns && /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
5794
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextPunctuation, children: ": " }),
|
|
5795
|
+
/* @__PURE__ */ jsx20(Lang.Type, { type: decl.signature.returns })
|
|
5826
5796
|
] })
|
|
5827
5797
|
] })
|
|
5828
5798
|
] }) });
|
|
@@ -5834,25 +5804,25 @@ function Property2({ decl, children }) {
|
|
|
5834
5804
|
case "TSDeclProperty":
|
|
5835
5805
|
return children({
|
|
5836
5806
|
name: decl.key,
|
|
5837
|
-
typeName: /* @__PURE__ */
|
|
5838
|
-
type: decl.type.kind in ComplexTypes && /* @__PURE__ */
|
|
5807
|
+
typeName: /* @__PURE__ */ jsx20(Lang.TypeName, { type: decl.type }),
|
|
5808
|
+
type: decl.type.kind in ComplexTypes && /* @__PURE__ */ jsx20(Lang.Type, { type: decl.type })
|
|
5839
5809
|
});
|
|
5840
5810
|
case "TSDeclTypeAlias":
|
|
5841
5811
|
return children({
|
|
5842
5812
|
name: decl.ident,
|
|
5843
5813
|
typeName: "alias",
|
|
5844
|
-
type: /* @__PURE__ */
|
|
5814
|
+
type: /* @__PURE__ */ jsx20(Lang.Type, { type: decl.type })
|
|
5845
5815
|
});
|
|
5846
5816
|
case "TSDeclReference":
|
|
5847
|
-
return children({ type: /* @__PURE__ */
|
|
5817
|
+
return children({ type: /* @__PURE__ */ jsx20(Lang.Type, { type: decl.type }) });
|
|
5848
5818
|
case "TSDeclInterface":
|
|
5849
5819
|
return children({
|
|
5850
|
-
type: /* @__PURE__ */
|
|
5851
|
-
/* @__PURE__ */
|
|
5852
|
-
decl.typeParameters && /* @__PURE__ */
|
|
5853
|
-
decl.extends?.flatMap((t, key) => /* @__PURE__ */
|
|
5854
|
-
/* @__PURE__ */
|
|
5855
|
-
/* @__PURE__ */
|
|
5820
|
+
type: /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
5821
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextIdentifier, children: decl.ident }),
|
|
5822
|
+
decl.typeParameters && /* @__PURE__ */ jsx20(TypeParams, { params: decl.typeParameters }),
|
|
5823
|
+
decl.extends?.flatMap((t, key) => /* @__PURE__ */ jsxs11(React11.Fragment, { children: [
|
|
5824
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextKeyword, children: " extends " }),
|
|
5825
|
+
/* @__PURE__ */ jsx20(Lang.Type, { type: t })
|
|
5856
5826
|
] }, `extends:${key}`))
|
|
5857
5827
|
] })
|
|
5858
5828
|
});
|
|
@@ -5863,45 +5833,45 @@ function Declaration({ decl }) {
|
|
|
5863
5833
|
if (!decl) return;
|
|
5864
5834
|
switch (decl.kind) {
|
|
5865
5835
|
case "TSDeclProperty":
|
|
5866
|
-
return /* @__PURE__ */
|
|
5867
|
-
decl.declare && /* @__PURE__ */
|
|
5868
|
-
/* @__PURE__ */
|
|
5869
|
-
/* @__PURE__ */
|
|
5870
|
-
/* @__PURE__ */
|
|
5836
|
+
return /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
5837
|
+
decl.declare && /* @__PURE__ */ jsx20("span", { className: style_default.TextKeyword, children: "declare " }),
|
|
5838
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TypePropertyName, children: /* @__PURE__ */ jsx20(Identifier, { name: decl.key, optional: decl.optional }) }),
|
|
5839
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextPunctuation, children: ": " }),
|
|
5840
|
+
/* @__PURE__ */ jsx20(Lang.Type, { type: decl.type })
|
|
5871
5841
|
] });
|
|
5872
5842
|
case "TSDeclFunction":
|
|
5873
|
-
return /* @__PURE__ */
|
|
5843
|
+
return /* @__PURE__ */ jsx20(Lang.MethodSignature, { decl });
|
|
5874
5844
|
case "TSDeclTypeAlias":
|
|
5875
|
-
return /* @__PURE__ */
|
|
5876
|
-
/* @__PURE__ */
|
|
5877
|
-
/* @__PURE__ */
|
|
5878
|
-
/* @__PURE__ */
|
|
5879
|
-
/* @__PURE__ */
|
|
5845
|
+
return /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
5846
|
+
/* @__PURE__ */ jsx20(Identifier, { name: decl.ident }),
|
|
5847
|
+
/* @__PURE__ */ jsx20(TypeParams, { params: decl.typeParameters }),
|
|
5848
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextOperator, children: " = " }),
|
|
5849
|
+
/* @__PURE__ */ jsx20(Lang.Type, { type: decl.type })
|
|
5880
5850
|
] });
|
|
5881
5851
|
case "TSDeclReference":
|
|
5882
|
-
return /* @__PURE__ */
|
|
5852
|
+
return /* @__PURE__ */ jsx20(Lang.Type, { type: decl.type });
|
|
5883
5853
|
case "TSDeclInterface":
|
|
5884
|
-
return /* @__PURE__ */
|
|
5885
|
-
/* @__PURE__ */
|
|
5886
|
-
/* @__PURE__ */
|
|
5887
|
-
decl.extends?.map((t, index) => /* @__PURE__ */
|
|
5888
|
-
/* @__PURE__ */
|
|
5889
|
-
/* @__PURE__ */
|
|
5854
|
+
return /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
5855
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextIdentifier, children: decl.ident }),
|
|
5856
|
+
/* @__PURE__ */ jsx20(TypeParams, { params: decl.typeParameters }),
|
|
5857
|
+
decl.extends?.map((t, index) => /* @__PURE__ */ jsxs11(React11.Fragment, { children: [
|
|
5858
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextKeyword, children: " extends " }),
|
|
5859
|
+
/* @__PURE__ */ jsx20(Lang.Type, { type: t })
|
|
5890
5860
|
] }, index)),
|
|
5891
|
-
/* @__PURE__ */
|
|
5861
|
+
/* @__PURE__ */ jsx20(TypePreview, { path: decl.stainlessPath })
|
|
5892
5862
|
] });
|
|
5893
5863
|
case "TSDeclClass":
|
|
5894
|
-
return /* @__PURE__ */
|
|
5895
|
-
/* @__PURE__ */
|
|
5896
|
-
/* @__PURE__ */
|
|
5897
|
-
/* @__PURE__ */
|
|
5898
|
-
decl.superClass ? /* @__PURE__ */
|
|
5899
|
-
/* @__PURE__ */
|
|
5900
|
-
/* @__PURE__ */
|
|
5864
|
+
return /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
5865
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextKeyword, children: "class " }),
|
|
5866
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextIdentifier, children: decl.ident }),
|
|
5867
|
+
/* @__PURE__ */ jsx20(TypeParams, { params: decl.typeParameters }),
|
|
5868
|
+
decl.superClass ? /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
5869
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextKeyword, children: " extends " }),
|
|
5870
|
+
/* @__PURE__ */ jsx20(Lang.Type, { type: decl.superClass })
|
|
5901
5871
|
] }) : null,
|
|
5902
|
-
decl.implements?.map((t, index) => /* @__PURE__ */
|
|
5903
|
-
/* @__PURE__ */
|
|
5904
|
-
/* @__PURE__ */
|
|
5872
|
+
decl.implements?.map((t, index) => /* @__PURE__ */ jsxs11(React11.Fragment, { children: [
|
|
5873
|
+
/* @__PURE__ */ jsx20("span", { className: style_default.TextKeyword, children: " implements " }),
|
|
5874
|
+
/* @__PURE__ */ jsx20(Lang.Type, { type: t })
|
|
5905
5875
|
] }, index))
|
|
5906
5876
|
] });
|
|
5907
5877
|
}
|
|
@@ -5917,7 +5887,7 @@ __export(java_exports, {
|
|
|
5917
5887
|
TypeName: () => TypeName2
|
|
5918
5888
|
});
|
|
5919
5889
|
import * as React12 from "react";
|
|
5920
|
-
import { Fragment as Fragment8, jsx as
|
|
5890
|
+
import { Fragment as Fragment8, jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
5921
5891
|
function showFullType(type) {
|
|
5922
5892
|
return type.kind === "JavaTypeReference" && (type.typeName === "List" || type.typeParameters && type.typeParameters.length > 0);
|
|
5923
5893
|
}
|
|
@@ -5929,7 +5899,7 @@ var constStyle2 = {
|
|
|
5929
5899
|
function TypeName2({ type, optional }) {
|
|
5930
5900
|
const Lang = useLanguageComponents();
|
|
5931
5901
|
if (type.kind === "JavaTypeReference" && type.typeName === "List") return "List";
|
|
5932
|
-
return /* @__PURE__ */
|
|
5902
|
+
return /* @__PURE__ */ jsx21(Lang.Type, { type, optional });
|
|
5933
5903
|
}
|
|
5934
5904
|
function Type2({ type, optional }) {
|
|
5935
5905
|
const language = useLanguage();
|
|
@@ -5938,34 +5908,34 @@ function Type2({ type, optional }) {
|
|
|
5938
5908
|
switch (type.kind) {
|
|
5939
5909
|
case "JavaTypeReference": {
|
|
5940
5910
|
const name = type.typeName.split(".").at(-1);
|
|
5941
|
-
const params = type.typeParameters?.map((param, key) => /* @__PURE__ */
|
|
5942
|
-
return /* @__PURE__ */
|
|
5943
|
-
/* @__PURE__ */
|
|
5944
|
-
params && params.length > 0 ? /* @__PURE__ */
|
|
5945
|
-
/* @__PURE__ */
|
|
5946
|
-
/* @__PURE__ */
|
|
5947
|
-
/* @__PURE__ */
|
|
5911
|
+
const params = type.typeParameters?.map((param, key) => /* @__PURE__ */ jsx21(Lang.Type, { type: param, optional }, key));
|
|
5912
|
+
return /* @__PURE__ */ jsxs12("span", { className: style_default.Type, children: [
|
|
5913
|
+
/* @__PURE__ */ jsx21(SDKReference2, { stainlessPath: type.$ref, children: name }),
|
|
5914
|
+
params && params.length > 0 ? /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
5915
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TypeBracket, children: "<" }),
|
|
5916
|
+
/* @__PURE__ */ jsx21(Join2, { items: params, limit: 3, children: /* @__PURE__ */ jsx21("span", { className: style_default.TextOperator, children: ", " }) }),
|
|
5917
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TypeBracket, children: ">" })
|
|
5948
5918
|
] }) : null
|
|
5949
5919
|
] });
|
|
5950
5920
|
}
|
|
5951
5921
|
case "JavaTypeClass":
|
|
5952
5922
|
case "JavaTypeUnion":
|
|
5953
|
-
return /* @__PURE__ */
|
|
5923
|
+
return /* @__PURE__ */ jsx21("span", { className: style_default.Type, children: /* @__PURE__ */ jsx21("span", { className: style_default.TypeKeyword, children: "class" }) });
|
|
5954
5924
|
case "JavaTypeEnum":
|
|
5955
|
-
return /* @__PURE__ */
|
|
5925
|
+
return /* @__PURE__ */ jsx21("span", { className: style_default.Type, children: /* @__PURE__ */ jsx21("span", { className: style_default.TypeKeyword, children: language === "kotlin" ? "enum class" : "enum" }) });
|
|
5956
5926
|
case "JavaTypeVoid":
|
|
5957
|
-
return /* @__PURE__ */
|
|
5927
|
+
return /* @__PURE__ */ jsx21("span", { className: style_default.Type, children: /* @__PURE__ */ jsx21("span", { className: style_default.TypeKeyword, children: language === "kotlin" ? "Nothing?" : "Void" }) });
|
|
5958
5928
|
case "JavaTypeBoolean":
|
|
5959
|
-
return /* @__PURE__ */
|
|
5929
|
+
return /* @__PURE__ */ jsx21("span", { className: style_default.Type, children: /* @__PURE__ */ jsx21("span", { className: style_default.TypeKeyword, children: language === "kotlin" || optional ? "Boolean" : "boolean" }) });
|
|
5960
5930
|
case "JavaTypeDouble":
|
|
5961
|
-
return /* @__PURE__ */
|
|
5931
|
+
return /* @__PURE__ */ jsx21("span", { className: style_default.Type, children: /* @__PURE__ */ jsx21("span", { className: style_default.TypeKeyword, children: language === "kotlin" || optional ? "Double" : "double" }) });
|
|
5962
5932
|
case "JavaTypeLong":
|
|
5963
|
-
return /* @__PURE__ */
|
|
5933
|
+
return /* @__PURE__ */ jsx21("span", { className: style_default.Type, children: /* @__PURE__ */ jsx21("span", { className: style_default.TypeKeyword, children: language === "kotlin" || optional ? "Long" : "long" }) });
|
|
5964
5934
|
case "JavaTypeString":
|
|
5965
|
-
return /* @__PURE__ */
|
|
5935
|
+
return /* @__PURE__ */ jsx21("span", { className: style_default.Type, children: /* @__PURE__ */ jsx21("span", { className: style_default.TypeString, children: "String" }) });
|
|
5966
5936
|
case "JavaTypeConstant":
|
|
5967
|
-
return /* @__PURE__ */
|
|
5968
|
-
/* @__PURE__ */
|
|
5937
|
+
return /* @__PURE__ */ jsxs12("span", { className: style_default.Type, children: [
|
|
5938
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TypeKeyword, children: "JsonValue" }),
|
|
5969
5939
|
";"
|
|
5970
5940
|
] });
|
|
5971
5941
|
}
|
|
@@ -5974,36 +5944,36 @@ function MethodSignature2({ decl }) {
|
|
|
5974
5944
|
const Lang = useLanguageComponents();
|
|
5975
5945
|
const language = useLanguage();
|
|
5976
5946
|
const { Join: Join2, Tooltip: Tooltip2 } = useComponents2();
|
|
5977
|
-
const params = decl.parameters.map((param, i) => /* @__PURE__ */
|
|
5978
|
-
/* @__PURE__ */
|
|
5979
|
-
param.hasDefault && /* @__PURE__ */
|
|
5947
|
+
const params = decl.parameters.map((param, i) => /* @__PURE__ */ jsx21(React12.Fragment, { children: /* @__PURE__ */ jsxs12(Tooltip2, { content: /* @__PURE__ */ jsx21(Lang.Type, { type: param.typeAnnotation }), children: [
|
|
5948
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TextIdentifier, children: param.ident }),
|
|
5949
|
+
param.hasDefault && /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
5980
5950
|
" ",
|
|
5981
|
-
/* @__PURE__ */
|
|
5951
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TextOperator, children: "=" }),
|
|
5982
5952
|
" ",
|
|
5983
|
-
/* @__PURE__ */
|
|
5984
|
-
/* @__PURE__ */
|
|
5985
|
-
/* @__PURE__ */
|
|
5986
|
-
/* @__PURE__ */
|
|
5953
|
+
/* @__PURE__ */ jsx21(Lang.Type, { type: param.typeAnnotation }),
|
|
5954
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TextOperator, children: "." }),
|
|
5955
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TextIdentifier, children: "none" }),
|
|
5956
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TextOperator, children: "()" })
|
|
5987
5957
|
] })
|
|
5988
5958
|
] }) }, i));
|
|
5989
|
-
return /* @__PURE__ */
|
|
5990
|
-
decl.returnType && language !== "kotlin" && /* @__PURE__ */
|
|
5991
|
-
/* @__PURE__ */
|
|
5959
|
+
return /* @__PURE__ */ jsx21("div", { className: style_default.MethodSignature, children: /* @__PURE__ */ jsxs12("span", { className: style_default.SignatureTitle, children: [
|
|
5960
|
+
decl.returnType && language !== "kotlin" && /* @__PURE__ */ jsxs12("span", { className: style_default.SignatureReturns, children: [
|
|
5961
|
+
/* @__PURE__ */ jsx21(Lang.Type, { type: decl.returnType }),
|
|
5992
5962
|
" "
|
|
5993
5963
|
] }),
|
|
5994
|
-
decl.qualified && /* @__PURE__ */
|
|
5995
|
-
/* @__PURE__ */
|
|
5996
|
-
/* @__PURE__ */
|
|
5997
|
-
/* @__PURE__ */
|
|
5998
|
-
/* @__PURE__ */
|
|
5999
|
-
/* @__PURE__ */
|
|
5964
|
+
decl.qualified && /* @__PURE__ */ jsx21("span", { className: style_default.SignatureQualified, children: /* @__PURE__ */ jsx21("span", { className: style_default.TextIdentifier, children: decl.qualified?.slice(0, -decl.ident.length) }) }),
|
|
5965
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.SignatureName, children: /* @__PURE__ */ jsx21("span", { className: style_default.TextIdentifier, children: decl.ident }) }),
|
|
5966
|
+
/* @__PURE__ */ jsxs12("span", { className: style_default.MethodSignature, children: [
|
|
5967
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.SignatureParen, children: "(" }),
|
|
5968
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.SignatureParams, children: /* @__PURE__ */ jsx21(Join2, { items: params, children: /* @__PURE__ */ jsx21("span", { className: style_default.TextOperator, children: ", " }) }) }),
|
|
5969
|
+
/* @__PURE__ */ jsxs12("span", { className: style_default.SignatureParen, children: [
|
|
6000
5970
|
")",
|
|
6001
5971
|
" "
|
|
6002
5972
|
] }),
|
|
6003
|
-
decl.returnType && language === "kotlin" && /* @__PURE__ */
|
|
6004
|
-
/* @__PURE__ */
|
|
5973
|
+
decl.returnType && language === "kotlin" && /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
5974
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TextOperator, children: ":" }),
|
|
6005
5975
|
" ",
|
|
6006
|
-
/* @__PURE__ */
|
|
5976
|
+
/* @__PURE__ */ jsx21(Lang.Type, { type: decl.returnType })
|
|
6007
5977
|
] })
|
|
6008
5978
|
] })
|
|
6009
5979
|
] }) });
|
|
@@ -6015,17 +5985,17 @@ function Property3({ decl, children }) {
|
|
|
6015
5985
|
if (!decl) return null;
|
|
6016
5986
|
switch (decl.kind) {
|
|
6017
5987
|
case "JavaDeclProperty": {
|
|
6018
|
-
const typeRaw = /* @__PURE__ */
|
|
6019
|
-
const typeWrapped = decl.optional ? /* @__PURE__ */
|
|
6020
|
-
/* @__PURE__ */
|
|
6021
|
-
/* @__PURE__ */
|
|
5988
|
+
const typeRaw = /* @__PURE__ */ jsx21(Lang.Type, { type: decl.type, optional: decl.optional });
|
|
5989
|
+
const typeWrapped = decl.optional ? /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
5990
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TypeKeyword, children: "Optional" }),
|
|
5991
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TypeBracket, children: "<" }),
|
|
6022
5992
|
typeRaw,
|
|
6023
|
-
/* @__PURE__ */
|
|
5993
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TypeBracket, children: ">" })
|
|
6024
5994
|
] }) : typeRaw;
|
|
6025
|
-
const badges = /* @__PURE__ */
|
|
5995
|
+
const badges = /* @__PURE__ */ jsx21(Fragment8, { children: decl.type.kind === "JavaTypeConstant" && /* @__PURE__ */ jsx21(Docs.Tooltip, { content: /* @__PURE__ */ jsx21("span", { className: style_default.TextIdentifier, children: decl.type.value }), children: /* @__PURE__ */ jsx21("span", { className: style_default.TextIdentifier, children: "constant" }) }) });
|
|
6026
5996
|
return children({
|
|
6027
5997
|
name: decl.ident,
|
|
6028
|
-
typeName: /* @__PURE__ */
|
|
5998
|
+
typeName: /* @__PURE__ */ jsx21(Lang.TypeName, { type: decl.type, optional: decl.optional }),
|
|
6029
5999
|
type: showFullType(decl.type) && typeWrapped,
|
|
6030
6000
|
badges
|
|
6031
6001
|
});
|
|
@@ -6034,14 +6004,14 @@ function Property3({ decl, children }) {
|
|
|
6034
6004
|
return children({
|
|
6035
6005
|
name: decl.ident,
|
|
6036
6006
|
typeName: "const",
|
|
6037
|
-
type: /* @__PURE__ */
|
|
6007
|
+
type: /* @__PURE__ */ jsx21("span", { className: constStyle2[typeof decl.value], children: JSON.stringify(decl.value) })
|
|
6038
6008
|
});
|
|
6039
6009
|
case "JavaDeclType": {
|
|
6040
6010
|
const typeName2 = decl.type.kind === "JavaTypeUnion" ? "union" : decl.type.kind === "JavaTypeEnum" ? language === "kotlin" ? "enum class" : "enum" : "class";
|
|
6041
6011
|
return children({ name: decl.ident, typeName: typeName2 });
|
|
6042
6012
|
}
|
|
6043
6013
|
case "JavaDeclReference":
|
|
6044
|
-
return children({ type: /* @__PURE__ */
|
|
6014
|
+
return children({ type: /* @__PURE__ */ jsx21(Lang.Type, { type: decl.type }) });
|
|
6045
6015
|
}
|
|
6046
6016
|
}
|
|
6047
6017
|
function Declaration2({ decl }) {
|
|
@@ -6051,52 +6021,52 @@ function Declaration2({ decl }) {
|
|
|
6051
6021
|
if (!decl) return null;
|
|
6052
6022
|
switch (decl.kind) {
|
|
6053
6023
|
case "JavaDeclConst":
|
|
6054
|
-
return /* @__PURE__ */
|
|
6055
|
-
/* @__PURE__ */
|
|
6056
|
-
/* @__PURE__ */
|
|
6024
|
+
return /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
6025
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TextIdentifier, children: decl.ident }),
|
|
6026
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TextPunctuation, children: "(" }),
|
|
6057
6027
|
JSON.stringify(decl.value),
|
|
6058
|
-
/* @__PURE__ */
|
|
6028
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TextPunctuation, children: ")" })
|
|
6059
6029
|
] });
|
|
6060
6030
|
case "JavaDeclType": {
|
|
6061
6031
|
const keyword = decl.type.kind === "JavaTypeEnum" ? language === "kotlin" ? "enum class" : "enum" : "class";
|
|
6062
|
-
return /* @__PURE__ */
|
|
6063
|
-
/* @__PURE__ */
|
|
6032
|
+
return /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
6033
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TextKeyword, children: keyword }),
|
|
6064
6034
|
" ",
|
|
6065
|
-
/* @__PURE__ */
|
|
6066
|
-
/* @__PURE__ */
|
|
6067
|
-
decl.type.kind === "JavaTypeUnion" && /* @__PURE__ */
|
|
6035
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TextIdentifier, children: decl.ident }),
|
|
6036
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TextPunctuation, children: ":" }),
|
|
6037
|
+
decl.type.kind === "JavaTypeUnion" && /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
6068
6038
|
" ",
|
|
6069
|
-
/* @__PURE__ */
|
|
6039
|
+
/* @__PURE__ */ jsx21(Docs.Tooltip, { content: "A class that can be one of several variants.", children: /* @__PURE__ */ jsx21(Docs.Badge, { id: "java-union", children: "union" }) }),
|
|
6070
6040
|
" "
|
|
6071
6041
|
] })
|
|
6072
6042
|
] });
|
|
6073
6043
|
}
|
|
6074
6044
|
case "JavaDeclProperty": {
|
|
6075
|
-
const inlineType = /* @__PURE__ */
|
|
6076
|
-
const ident = /* @__PURE__ */
|
|
6077
|
-
const suffix = decl.type.kind === "JavaTypeConstant" ? /* @__PURE__ */
|
|
6045
|
+
const inlineType = /* @__PURE__ */ jsx21(Lang.Type, { type: decl.type, optional: decl.optional });
|
|
6046
|
+
const ident = /* @__PURE__ */ jsx21("span", { className: style_default.TypePropertyName, children: /* @__PURE__ */ jsx21("span", { className: style_default.TextIdentifier, children: decl.ident }) });
|
|
6047
|
+
const suffix = decl.type.kind === "JavaTypeConstant" ? /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
6078
6048
|
" ",
|
|
6079
|
-
/* @__PURE__ */
|
|
6049
|
+
/* @__PURE__ */ jsx21(Docs.Tooltip, { content: /* @__PURE__ */ jsx21("span", { className: style_default.TextIdentifier, children: decl.type.value }), children: /* @__PURE__ */ jsx21(Docs.Badge, { id: "java-constant", children: "constant" }) })
|
|
6080
6050
|
] }) : null;
|
|
6081
6051
|
if (language === "kotlin")
|
|
6082
|
-
return /* @__PURE__ */
|
|
6052
|
+
return /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
6083
6053
|
ident,
|
|
6084
|
-
/* @__PURE__ */
|
|
6054
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TextPunctuation, children: ":" }),
|
|
6085
6055
|
" ",
|
|
6086
|
-
decl.optional ? /* @__PURE__ */
|
|
6087
|
-
/* @__PURE__ */
|
|
6088
|
-
/* @__PURE__ */
|
|
6056
|
+
decl.optional ? /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
6057
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TypeReference, children: "Optional" }),
|
|
6058
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TypeBracket, children: "<" }),
|
|
6089
6059
|
inlineType,
|
|
6090
|
-
/* @__PURE__ */
|
|
6060
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TypeBracket, children: ">" })
|
|
6091
6061
|
] }) : inlineType,
|
|
6092
6062
|
suffix
|
|
6093
6063
|
] });
|
|
6094
|
-
return /* @__PURE__ */
|
|
6095
|
-
decl.optional ? /* @__PURE__ */
|
|
6096
|
-
/* @__PURE__ */
|
|
6097
|
-
/* @__PURE__ */
|
|
6064
|
+
return /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
6065
|
+
decl.optional ? /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
6066
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TypeReference, children: "Optional" }),
|
|
6067
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TypeBracket, children: "<" }),
|
|
6098
6068
|
inlineType,
|
|
6099
|
-
/* @__PURE__ */
|
|
6069
|
+
/* @__PURE__ */ jsx21("span", { className: style_default.TypeBracket, children: ">" })
|
|
6100
6070
|
] }) : inlineType,
|
|
6101
6071
|
" ",
|
|
6102
6072
|
ident,
|
|
@@ -6104,7 +6074,7 @@ function Declaration2({ decl }) {
|
|
|
6104
6074
|
] });
|
|
6105
6075
|
}
|
|
6106
6076
|
case "JavaDeclReference":
|
|
6107
|
-
return /* @__PURE__ */
|
|
6077
|
+
return /* @__PURE__ */ jsx21(Lang.Type, { type: decl.type });
|
|
6108
6078
|
}
|
|
6109
6079
|
}
|
|
6110
6080
|
|
|
@@ -6118,7 +6088,7 @@ __export(go_exports, {
|
|
|
6118
6088
|
TypeName: () => TypeName3
|
|
6119
6089
|
});
|
|
6120
6090
|
import * as React13 from "react";
|
|
6121
|
-
import { Fragment as Fragment10, jsx as
|
|
6091
|
+
import { Fragment as Fragment10, jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
6122
6092
|
var ComplexTypes2 = {
|
|
6123
6093
|
GoTypeMap: "map",
|
|
6124
6094
|
GoTypeArray: "array"
|
|
@@ -6136,20 +6106,20 @@ function isField(type) {
|
|
|
6136
6106
|
}
|
|
6137
6107
|
function TypeName3({ type }) {
|
|
6138
6108
|
const Lang = useLanguageComponents();
|
|
6139
|
-
return isField(type) ? "field" : ComplexTypes2[type.kind] ?? /* @__PURE__ */
|
|
6109
|
+
return isField(type) ? "field" : ComplexTypes2[type.kind] ?? /* @__PURE__ */ jsx22(Lang.Type, { type });
|
|
6140
6110
|
}
|
|
6141
6111
|
function Type3({ type }) {
|
|
6142
6112
|
const Lang = useLanguageComponents();
|
|
6143
6113
|
const { Join: Join2, SDKReference: SDKReference2 } = useComponents2();
|
|
6144
6114
|
switch (type.kind) {
|
|
6145
6115
|
case "GoTypeReference": {
|
|
6146
|
-
const params = type.typeParameters?.map((param, key) => /* @__PURE__ */
|
|
6147
|
-
return /* @__PURE__ */
|
|
6148
|
-
type.$ref ? /* @__PURE__ */
|
|
6149
|
-
params && params.length > 0 ? /* @__PURE__ */
|
|
6150
|
-
/* @__PURE__ */
|
|
6151
|
-
/* @__PURE__ */
|
|
6152
|
-
/* @__PURE__ */
|
|
6116
|
+
const params = type.typeParameters?.map((param, key) => /* @__PURE__ */ jsx22(Lang.Type, { type: param }, key));
|
|
6117
|
+
return /* @__PURE__ */ jsxs13("span", { className: style_default.Type, children: [
|
|
6118
|
+
type.$ref ? /* @__PURE__ */ jsx22(SDKReference2, { stainlessPath: type.$ref, children: type.typeName }) : type.typeName,
|
|
6119
|
+
params && params.length > 0 ? /* @__PURE__ */ jsxs13(Fragment10, { children: [
|
|
6120
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TypeBracket, children: "[" }),
|
|
6121
|
+
/* @__PURE__ */ jsx22(Join2, { items: params, limit: 3, children: /* @__PURE__ */ jsx22("span", { className: style_default.TextOperator, children: ", " }) }),
|
|
6122
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TypeBracket, children: "]" })
|
|
6153
6123
|
] }) : null
|
|
6154
6124
|
] });
|
|
6155
6125
|
}
|
|
@@ -6159,58 +6129,58 @@ function Type3({ type }) {
|
|
|
6159
6129
|
case "GoTypeFloat":
|
|
6160
6130
|
case "GoTypeBool":
|
|
6161
6131
|
case "GoTypeError":
|
|
6162
|
-
return /* @__PURE__ */
|
|
6132
|
+
return /* @__PURE__ */ jsx22("span", { className: style_default.Type, children: /* @__PURE__ */ jsx22("span", { className: style_default.TypeKeyword, children: Keywords[type.kind] }) });
|
|
6163
6133
|
case "GoTypeString":
|
|
6164
|
-
return /* @__PURE__ */
|
|
6134
|
+
return /* @__PURE__ */ jsx22("span", { className: style_default.Type, children: /* @__PURE__ */ jsx22("span", { className: style_default.TypeString, children: "string" }) });
|
|
6165
6135
|
case "GoTypeArray":
|
|
6166
|
-
return /* @__PURE__ */
|
|
6167
|
-
/* @__PURE__ */
|
|
6168
|
-
/* @__PURE__ */
|
|
6136
|
+
return /* @__PURE__ */ jsxs13("span", { className: style_default.Type, children: [
|
|
6137
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TextOperator, children: "[]" }),
|
|
6138
|
+
/* @__PURE__ */ jsx22(Lang.Type, { type: type.elementType })
|
|
6169
6139
|
] });
|
|
6170
6140
|
case "GoTypeStruct":
|
|
6171
|
-
return /* @__PURE__ */
|
|
6141
|
+
return /* @__PURE__ */ jsx22("span", { className: style_default.Type, children: /* @__PURE__ */ jsx22("span", { className: style_default.TypeKeyword, children: "struct{\u2026}" }) });
|
|
6172
6142
|
case "GoTypeInterface":
|
|
6173
|
-
return /* @__PURE__ */
|
|
6143
|
+
return /* @__PURE__ */ jsx22("span", { className: style_default.Type, children: /* @__PURE__ */ jsx22("span", { className: style_default.TypeKeyword, children: "interface{\u2026}" }) });
|
|
6174
6144
|
case "GoTypeMap":
|
|
6175
|
-
return /* @__PURE__ */
|
|
6176
|
-
/* @__PURE__ */
|
|
6177
|
-
/* @__PURE__ */
|
|
6178
|
-
/* @__PURE__ */
|
|
6179
|
-
/* @__PURE__ */
|
|
6145
|
+
return /* @__PURE__ */ jsxs13("span", { className: style_default.Type, children: [
|
|
6146
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TypeKeyword, children: "map" }),
|
|
6147
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TypeBracket, children: "[" }),
|
|
6148
|
+
/* @__PURE__ */ jsx22(Lang.Type, { type: type.indexType }),
|
|
6149
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TextPunctuation, children: "," }),
|
|
6180
6150
|
" ",
|
|
6181
|
-
/* @__PURE__ */
|
|
6182
|
-
/* @__PURE__ */
|
|
6151
|
+
/* @__PURE__ */ jsx22(Lang.Type, { type: type.itemType }),
|
|
6152
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TypeBracket, children: "]" })
|
|
6183
6153
|
] });
|
|
6184
6154
|
case "GoTypePointer":
|
|
6185
|
-
return /* @__PURE__ */
|
|
6186
|
-
/* @__PURE__ */
|
|
6187
|
-
/* @__PURE__ */
|
|
6155
|
+
return /* @__PURE__ */ jsxs13("span", { className: style_default.Type, children: [
|
|
6156
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TextOperator, children: "*" }),
|
|
6157
|
+
/* @__PURE__ */ jsx22(Lang.Type, { type: type.inner })
|
|
6188
6158
|
] });
|
|
6189
6159
|
}
|
|
6190
6160
|
}
|
|
6191
6161
|
function MethodSignature3({ decl }) {
|
|
6192
6162
|
const Lang = useLanguageComponents();
|
|
6193
6163
|
const { Join: Join2 } = useComponents2();
|
|
6194
|
-
const params = decl.parameters.map((param, i) => /* @__PURE__ */
|
|
6195
|
-
/* @__PURE__ */
|
|
6196
|
-
param.optional && /* @__PURE__ */
|
|
6164
|
+
const params = decl.parameters.map((param, i) => /* @__PURE__ */ jsxs13(React13.Fragment, { children: [
|
|
6165
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TextIdentifier, children: param.ident }),
|
|
6166
|
+
param.optional && /* @__PURE__ */ jsx22("span", { className: style_default.TextPunctuation, children: "?" })
|
|
6197
6167
|
] }, i));
|
|
6198
|
-
const returns = decl.returnType.map((t, key) => /* @__PURE__ */
|
|
6199
|
-
return /* @__PURE__ */
|
|
6200
|
-
decl.async && /* @__PURE__ */
|
|
6201
|
-
decl.qualified && /* @__PURE__ */
|
|
6202
|
-
decl.kind === "GoDeclFunction" && /* @__PURE__ */
|
|
6203
|
-
/* @__PURE__ */
|
|
6204
|
-
/* @__PURE__ */
|
|
6205
|
-
/* @__PURE__ */
|
|
6206
|
-
/* @__PURE__ */
|
|
6168
|
+
const returns = decl.returnType.map((t, key) => /* @__PURE__ */ jsx22(Lang.Type, { type: t }, key));
|
|
6169
|
+
return /* @__PURE__ */ jsx22("div", { className: style_default.MethodSignature, children: /* @__PURE__ */ jsxs13("span", { className: style_default.SignatureTitle, children: [
|
|
6170
|
+
decl.async && /* @__PURE__ */ jsx22("span", { className: style_default.TextKeyword, children: "async " }),
|
|
6171
|
+
decl.qualified && /* @__PURE__ */ jsx22("span", { className: style_default.SignatureQualified, children: /* @__PURE__ */ jsx22("span", { className: style_default.TextIdentifier, children: decl.qualified?.slice(0, -decl.ident.length) }) }),
|
|
6172
|
+
decl.kind === "GoDeclFunction" && /* @__PURE__ */ jsx22("span", { className: style_default.SignatureName, children: /* @__PURE__ */ jsx22("span", { className: style_default.TextIdentifier, children: decl.ident }) }),
|
|
6173
|
+
/* @__PURE__ */ jsxs13("span", { className: style_default.MethodSignature, children: [
|
|
6174
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.SignatureParen, children: "(" }),
|
|
6175
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.SignatureParams, children: /* @__PURE__ */ jsx22(Join2, { items: params, children: /* @__PURE__ */ jsx22("span", { className: style_default.TextOperator, children: ", " }) }) }),
|
|
6176
|
+
/* @__PURE__ */ jsxs13("span", { className: style_default.SignatureParen, children: [
|
|
6207
6177
|
")",
|
|
6208
6178
|
" "
|
|
6209
6179
|
] }),
|
|
6210
|
-
decl.returnType.length === 1 ? returns : /* @__PURE__ */
|
|
6211
|
-
/* @__PURE__ */
|
|
6212
|
-
/* @__PURE__ */
|
|
6213
|
-
/* @__PURE__ */
|
|
6180
|
+
decl.returnType.length === 1 ? returns : /* @__PURE__ */ jsxs13(Fragment10, { children: [
|
|
6181
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.SignatureParen, children: "(" }),
|
|
6182
|
+
/* @__PURE__ */ jsx22(Join2, { items: returns, children: /* @__PURE__ */ jsx22("span", { className: style_default.TextOperator, children: ", " }) }),
|
|
6183
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.SignatureParen, children: ")" })
|
|
6214
6184
|
] })
|
|
6215
6185
|
] })
|
|
6216
6186
|
] }) });
|
|
@@ -6223,25 +6193,25 @@ function Property4({ decl, children }) {
|
|
|
6223
6193
|
case "GoDeclProperty":
|
|
6224
6194
|
return children({
|
|
6225
6195
|
name: decl.ident,
|
|
6226
|
-
typeName: /* @__PURE__ */
|
|
6227
|
-
badges: decl.optional && /* @__PURE__ */
|
|
6228
|
-
type: (isField(decl.type) || decl.type.kind in ComplexTypes2) && /* @__PURE__ */
|
|
6196
|
+
typeName: /* @__PURE__ */ jsx22(Lang.TypeName, { type: decl.type }),
|
|
6197
|
+
badges: decl.optional && /* @__PURE__ */ jsx22(Docs.Badge, { id: "optional" }),
|
|
6198
|
+
type: (isField(decl.type) || decl.type.kind in ComplexTypes2) && /* @__PURE__ */ jsx22(Lang.Type, { type: decl.type })
|
|
6229
6199
|
});
|
|
6230
6200
|
case "GoDeclConst":
|
|
6231
6201
|
return children({
|
|
6232
6202
|
name: decl.ident,
|
|
6233
6203
|
typeName: "const",
|
|
6234
|
-
type: /* @__PURE__ */
|
|
6204
|
+
type: /* @__PURE__ */ jsx22(Lang.Type, { type: decl.type })
|
|
6235
6205
|
});
|
|
6236
6206
|
case "GoDeclReference":
|
|
6237
|
-
return children({ type: /* @__PURE__ */
|
|
6207
|
+
return children({ type: /* @__PURE__ */ jsx22(Lang.Type, { type: decl.type }) });
|
|
6238
6208
|
case "GoDeclType":
|
|
6239
6209
|
case "GoDeclTypeAlias": {
|
|
6240
6210
|
const typeName2 = decl.type.kind === "GoTypeStruct" ? "struct" : decl.type.kind === "GoTypeInterface" ? "interface" : decl.kind === "GoDeclTypeAlias" ? "alias" : "type";
|
|
6241
6211
|
return children({
|
|
6242
6212
|
name: decl.ident,
|
|
6243
6213
|
typeName: typeName2,
|
|
6244
|
-
type: ["GoTypeStruct", "GoTypeInterface"].includes(decl.type.kind) || /* @__PURE__ */
|
|
6214
|
+
type: ["GoTypeStruct", "GoTypeInterface"].includes(decl.type.kind) || /* @__PURE__ */ jsx22(Lang.Type, { type: decl.type })
|
|
6245
6215
|
});
|
|
6246
6216
|
}
|
|
6247
6217
|
}
|
|
@@ -6251,43 +6221,43 @@ function Declaration3({ decl }) {
|
|
|
6251
6221
|
if (!decl) return;
|
|
6252
6222
|
switch (decl.kind) {
|
|
6253
6223
|
case "GoDeclType":
|
|
6254
|
-
return /* @__PURE__ */
|
|
6255
|
-
/* @__PURE__ */
|
|
6256
|
-
/* @__PURE__ */
|
|
6224
|
+
return /* @__PURE__ */ jsxs13(Fragment10, { children: [
|
|
6225
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TextKeyword, children: "type " }),
|
|
6226
|
+
/* @__PURE__ */ jsxs13("span", { className: style_default.TextIdentifier, children: [
|
|
6257
6227
|
decl.ident,
|
|
6258
6228
|
" "
|
|
6259
6229
|
] }),
|
|
6260
|
-
/* @__PURE__ */
|
|
6230
|
+
/* @__PURE__ */ jsx22(Lang.Type, { type: decl.type })
|
|
6261
6231
|
] });
|
|
6262
6232
|
case "GoDeclTypeAlias":
|
|
6263
|
-
return /* @__PURE__ */
|
|
6264
|
-
/* @__PURE__ */
|
|
6265
|
-
/* @__PURE__ */
|
|
6233
|
+
return /* @__PURE__ */ jsxs13(Fragment10, { children: [
|
|
6234
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TextKeyword, children: "type " }),
|
|
6235
|
+
/* @__PURE__ */ jsxs13("span", { className: style_default.TextIdentifier, children: [
|
|
6266
6236
|
decl.ident,
|
|
6267
6237
|
" "
|
|
6268
6238
|
] }),
|
|
6269
|
-
/* @__PURE__ */
|
|
6270
|
-
/* @__PURE__ */
|
|
6239
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TextOperator, children: "= " }),
|
|
6240
|
+
/* @__PURE__ */ jsx22(Lang.Type, { type: decl.type })
|
|
6271
6241
|
] });
|
|
6272
6242
|
case "GoDeclProperty":
|
|
6273
|
-
return /* @__PURE__ */
|
|
6274
|
-
/* @__PURE__ */
|
|
6243
|
+
return /* @__PURE__ */ jsxs13(Fragment10, { children: [
|
|
6244
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TypePropertyName, children: /* @__PURE__ */ jsxs13("span", { className: style_default.TextIdentifier, children: [
|
|
6275
6245
|
decl.ident,
|
|
6276
6246
|
" "
|
|
6277
6247
|
] }) }),
|
|
6278
|
-
/* @__PURE__ */
|
|
6248
|
+
/* @__PURE__ */ jsx22(Lang.Type, { type: decl.type })
|
|
6279
6249
|
] });
|
|
6280
6250
|
case "GoDeclReference":
|
|
6281
|
-
return /* @__PURE__ */
|
|
6251
|
+
return /* @__PURE__ */ jsx22(Lang.Type, { type: decl.type });
|
|
6282
6252
|
case "GoDeclConst":
|
|
6283
|
-
return /* @__PURE__ */
|
|
6284
|
-
/* @__PURE__ */
|
|
6285
|
-
/* @__PURE__ */
|
|
6253
|
+
return /* @__PURE__ */ jsxs13(Fragment10, { children: [
|
|
6254
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TextKeyword, children: "const " }),
|
|
6255
|
+
/* @__PURE__ */ jsxs13("span", { className: style_default.TextIdentifier, children: [
|
|
6286
6256
|
decl.ident,
|
|
6287
6257
|
" "
|
|
6288
6258
|
] }),
|
|
6289
|
-
/* @__PURE__ */
|
|
6290
|
-
/* @__PURE__ */
|
|
6259
|
+
/* @__PURE__ */ jsx22(Lang.Type, { type: decl.type }),
|
|
6260
|
+
/* @__PURE__ */ jsx22("span", { className: style_default.TextOperator, children: " = " }),
|
|
6291
6261
|
JSON.stringify(decl.value)
|
|
6292
6262
|
] });
|
|
6293
6263
|
}
|
|
@@ -6303,7 +6273,7 @@ __export(python_exports, {
|
|
|
6303
6273
|
TypeName: () => TypeName4
|
|
6304
6274
|
});
|
|
6305
6275
|
import * as React14 from "react";
|
|
6306
|
-
import { Fragment as Fragment12, jsx as
|
|
6276
|
+
import { Fragment as Fragment12, jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
6307
6277
|
var constStyle3 = {
|
|
6308
6278
|
string: style_default.LiteralString,
|
|
6309
6279
|
number: style_default.LiteralNumeric,
|
|
@@ -6318,7 +6288,7 @@ function TypeName4({ type }) {
|
|
|
6318
6288
|
if (type.kind === "PythonTypeReference") {
|
|
6319
6289
|
switch (type.typeName) {
|
|
6320
6290
|
case "Optional":
|
|
6321
|
-
return /* @__PURE__ */
|
|
6291
|
+
return /* @__PURE__ */ jsx23(Lang.TypeName, { type: type.typeParameters[0] });
|
|
6322
6292
|
case "List":
|
|
6323
6293
|
case "Iterable":
|
|
6324
6294
|
case "Literal":
|
|
@@ -6326,7 +6296,7 @@ function TypeName4({ type }) {
|
|
|
6326
6296
|
return type.typeName.toLowerCase();
|
|
6327
6297
|
}
|
|
6328
6298
|
}
|
|
6329
|
-
return /* @__PURE__ */
|
|
6299
|
+
return /* @__PURE__ */ jsx23(Lang.Type, { type });
|
|
6330
6300
|
}
|
|
6331
6301
|
function Type4({ type }) {
|
|
6332
6302
|
const Lang = useLanguageComponents();
|
|
@@ -6337,29 +6307,29 @@ function Type4({ type }) {
|
|
|
6337
6307
|
case "PythonTypeInt":
|
|
6338
6308
|
case "PythonTypeFloat":
|
|
6339
6309
|
case "PythonTypeBool":
|
|
6340
|
-
return /* @__PURE__ */
|
|
6310
|
+
return /* @__PURE__ */ jsx23("span", { className: style_default.Type, children: /* @__PURE__ */ jsx23("span", { className: style_default.TypeKeyword, children: type.kind.slice(10).toLowerCase() }) });
|
|
6341
6311
|
case "PythonTypeString":
|
|
6342
|
-
return /* @__PURE__ */
|
|
6312
|
+
return /* @__PURE__ */ jsx23("span", { className: style_default.Type, children: /* @__PURE__ */ jsx23("span", { className: style_default.TypeString, children: "str" }) });
|
|
6343
6313
|
case "PythonTypeLiteral":
|
|
6344
|
-
return /* @__PURE__ */
|
|
6314
|
+
return /* @__PURE__ */ jsx23("span", { className: style_default.Type, children: /* @__PURE__ */ jsx23("span", { className: constStyle3[typeof type.literal.value], children: JSON.stringify(type.literal.value) }) });
|
|
6345
6315
|
case "PythonTypeArray":
|
|
6346
|
-
return /* @__PURE__ */
|
|
6347
|
-
/* @__PURE__ */
|
|
6348
|
-
/* @__PURE__ */
|
|
6349
|
-
/* @__PURE__ */
|
|
6316
|
+
return /* @__PURE__ */ jsxs14("span", { className: style_default.Type, children: [
|
|
6317
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TypeArray, children: "Array<" }),
|
|
6318
|
+
/* @__PURE__ */ jsx23(Lang.Type, { type: type.elementType }),
|
|
6319
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TypeArray, children: ">" })
|
|
6350
6320
|
] });
|
|
6351
6321
|
case "PythonTypeClass":
|
|
6352
|
-
return /* @__PURE__ */
|
|
6322
|
+
return /* @__PURE__ */ jsx23("span", { className: style_default.Type, children: /* @__PURE__ */ jsx23("span", { className: style_default.TypeKeyword, children: "class" }) });
|
|
6353
6323
|
case "PythonTypeMap":
|
|
6354
|
-
return /* @__PURE__ */
|
|
6324
|
+
return /* @__PURE__ */ jsx23("span", { className: style_default.Type, children: /* @__PURE__ */ jsx23("span", { className: style_default.TypeKeyword, children: "Dict" }) });
|
|
6355
6325
|
case "PythonTypeReference": {
|
|
6356
|
-
const params = type.typeParameters?.map((param, key) => /* @__PURE__ */
|
|
6357
|
-
return /* @__PURE__ */
|
|
6358
|
-
/* @__PURE__ */
|
|
6359
|
-
params && params.length > 0 && /* @__PURE__ */
|
|
6360
|
-
/* @__PURE__ */
|
|
6361
|
-
/* @__PURE__ */
|
|
6362
|
-
/* @__PURE__ */
|
|
6326
|
+
const params = type.typeParameters?.map((param, key) => /* @__PURE__ */ jsx23(Lang.Type, { type: param }, key));
|
|
6327
|
+
return /* @__PURE__ */ jsxs14("span", { className: style_default.Type, children: [
|
|
6328
|
+
/* @__PURE__ */ jsx23("span", { className: type.typeName === "Optional" ? style_default.TypeArray : "", children: /* @__PURE__ */ jsx23(SDKReference2, { stainlessPath: type.$ref, children: type.typeName }) }),
|
|
6329
|
+
params && params.length > 0 && /* @__PURE__ */ jsxs14(Fragment12, { children: [
|
|
6330
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TypeBracket, children: "[" }),
|
|
6331
|
+
/* @__PURE__ */ jsx23(Join2, { items: params, limit: 3, children: /* @__PURE__ */ jsx23("span", { className: style_default.TextOperator, children: ", " }) }),
|
|
6332
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TypeBracket, children: "]" })
|
|
6363
6333
|
] })
|
|
6364
6334
|
] });
|
|
6365
6335
|
}
|
|
@@ -6368,21 +6338,21 @@ function Type4({ type }) {
|
|
|
6368
6338
|
function MethodSignature4({ decl }) {
|
|
6369
6339
|
const Lang = useLanguageComponents();
|
|
6370
6340
|
const { Join: Join2, Tooltip: Tooltip2 } = useComponents2();
|
|
6371
|
-
const params = decl.parameters.map((param, i) => /* @__PURE__ */
|
|
6372
|
-
return /* @__PURE__ */
|
|
6373
|
-
decl.async && /* @__PURE__ */
|
|
6374
|
-
decl.qualified && /* @__PURE__ */
|
|
6375
|
-
/* @__PURE__ */
|
|
6376
|
-
/* @__PURE__ */
|
|
6377
|
-
/* @__PURE__ */
|
|
6378
|
-
/* @__PURE__ */
|
|
6379
|
-
/* @__PURE__ */
|
|
6341
|
+
const params = decl.parameters.map((param, i) => /* @__PURE__ */ jsx23(React14.Fragment, { children: /* @__PURE__ */ jsx23(Tooltip2, { content: /* @__PURE__ */ jsx23(Lang.Type, { type: param.type }), children: /* @__PURE__ */ jsx23("span", { className: style_default.TextIdentifier, children: param.ident }) }) }, i));
|
|
6342
|
+
return /* @__PURE__ */ jsx23("div", { className: style_default.MethodSignature, children: /* @__PURE__ */ jsxs14("span", { className: style_default.SignatureTitle, children: [
|
|
6343
|
+
decl.async && /* @__PURE__ */ jsx23("span", { className: style_default.TextKeyword, children: "async " }),
|
|
6344
|
+
decl.qualified && /* @__PURE__ */ jsx23("span", { className: style_default.SignatureQualified, children: /* @__PURE__ */ jsx23("span", { className: style_default.TextIdentifier, children: decl.qualified?.slice(0, -decl.ident.length) }) }),
|
|
6345
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.SignatureName, children: /* @__PURE__ */ jsx23("span", { className: style_default.TextIdentifier, children: decl.ident }) }),
|
|
6346
|
+
/* @__PURE__ */ jsxs14("span", { className: style_default.MethodSignature, children: [
|
|
6347
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.SignatureParen, children: "(" }),
|
|
6348
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.SignatureParams, children: /* @__PURE__ */ jsx23(Join2, { items: params, children: /* @__PURE__ */ jsx23("span", { className: style_default.TextOperator, children: ", " }) }) }),
|
|
6349
|
+
/* @__PURE__ */ jsxs14("span", { className: style_default.SignatureParen, children: [
|
|
6380
6350
|
")",
|
|
6381
6351
|
" "
|
|
6382
6352
|
] }),
|
|
6383
|
-
decl.returns && /* @__PURE__ */
|
|
6384
|
-
/* @__PURE__ */
|
|
6385
|
-
/* @__PURE__ */
|
|
6353
|
+
decl.returns && /* @__PURE__ */ jsxs14(Fragment12, { children: [
|
|
6354
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TextOperator, children: " -> " }),
|
|
6355
|
+
/* @__PURE__ */ jsx23(Lang.Type, { type: decl.returns })
|
|
6386
6356
|
] })
|
|
6387
6357
|
] })
|
|
6388
6358
|
] }) });
|
|
@@ -6394,8 +6364,8 @@ function Property5({ decl, children }) {
|
|
|
6394
6364
|
case "PythonDeclProperty":
|
|
6395
6365
|
return children({
|
|
6396
6366
|
name: decl.ident,
|
|
6397
|
-
typeName: /* @__PURE__ */
|
|
6398
|
-
type: showFullType2(decl.type) && /* @__PURE__ */
|
|
6367
|
+
typeName: /* @__PURE__ */ jsx23(Lang.TypeName, { type: decl.type }),
|
|
6368
|
+
type: showFullType2(decl.type) && /* @__PURE__ */ jsx23(Lang.Type, { type: decl.type })
|
|
6399
6369
|
});
|
|
6400
6370
|
case "PythonDeclClass":
|
|
6401
6371
|
return children({ name: decl.ident, typeName: "class" });
|
|
@@ -6403,10 +6373,10 @@ function Property5({ decl, children }) {
|
|
|
6403
6373
|
return children({
|
|
6404
6374
|
name: decl.ident,
|
|
6405
6375
|
typeName: "type",
|
|
6406
|
-
type: /* @__PURE__ */
|
|
6376
|
+
type: /* @__PURE__ */ jsx23(Lang.Type, { type: decl.type })
|
|
6407
6377
|
});
|
|
6408
6378
|
case "PythonDeclReference":
|
|
6409
|
-
return children({ type: /* @__PURE__ */
|
|
6379
|
+
return children({ type: /* @__PURE__ */ jsx23(Lang.Type, { type: decl.type }) });
|
|
6410
6380
|
}
|
|
6411
6381
|
}
|
|
6412
6382
|
function Declaration4({ decl }) {
|
|
@@ -6415,32 +6385,32 @@ function Declaration4({ decl }) {
|
|
|
6415
6385
|
switch (decl.kind) {
|
|
6416
6386
|
case "PythonDeclProperty": {
|
|
6417
6387
|
const nullable = decl.type.kind === "PythonTypeReference" && decl.type.typeName === "Optional" && (decl.type.typeParameters ?? []).length > 0;
|
|
6418
|
-
return /* @__PURE__ */
|
|
6419
|
-
/* @__PURE__ */
|
|
6420
|
-
/* @__PURE__ */
|
|
6421
|
-
decl.optional && !nullable ? /* @__PURE__ */
|
|
6422
|
-
/* @__PURE__ */
|
|
6423
|
-
/* @__PURE__ */
|
|
6424
|
-
/* @__PURE__ */
|
|
6425
|
-
/* @__PURE__ */
|
|
6426
|
-
] }) : /* @__PURE__ */
|
|
6388
|
+
return /* @__PURE__ */ jsxs14(Fragment12, { children: [
|
|
6389
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TypePropertyName, children: /* @__PURE__ */ jsx23("span", { className: style_default.TextIdentifier, children: decl.ident }) }),
|
|
6390
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TextPunctuation, children: ": " }),
|
|
6391
|
+
decl.optional && !nullable ? /* @__PURE__ */ jsxs14(Fragment12, { children: [
|
|
6392
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TypePlain, children: "Optional" }),
|
|
6393
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TypeBracket, children: "[" }),
|
|
6394
|
+
/* @__PURE__ */ jsx23(Lang.Type, { type: decl.type }),
|
|
6395
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TypeBrace, children: "]" })
|
|
6396
|
+
] }) : /* @__PURE__ */ jsx23(Lang.Type, { type: decl.type })
|
|
6427
6397
|
] });
|
|
6428
6398
|
}
|
|
6429
6399
|
case "PythonDeclClass":
|
|
6430
|
-
return /* @__PURE__ */
|
|
6431
|
-
/* @__PURE__ */
|
|
6432
|
-
/* @__PURE__ */
|
|
6433
|
-
/* @__PURE__ */
|
|
6434
|
-
/* @__PURE__ */
|
|
6400
|
+
return /* @__PURE__ */ jsxs14(Fragment12, { children: [
|
|
6401
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TextKeyword, children: "class " }),
|
|
6402
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TextIdentifier, children: decl.ident }),
|
|
6403
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TextPunctuation, children: ": " }),
|
|
6404
|
+
/* @__PURE__ */ jsx23("span", { className: `${style_default.TypePreviewContent} ${style_default.TextPunctuation}`, children: "\u2026" })
|
|
6435
6405
|
] });
|
|
6436
6406
|
case "PythonDeclType":
|
|
6437
|
-
return /* @__PURE__ */
|
|
6438
|
-
/* @__PURE__ */
|
|
6439
|
-
/* @__PURE__ */
|
|
6440
|
-
/* @__PURE__ */
|
|
6407
|
+
return /* @__PURE__ */ jsxs14(Fragment12, { children: [
|
|
6408
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TextIdentifier, children: decl.ident }),
|
|
6409
|
+
/* @__PURE__ */ jsx23("span", { className: style_default.TextOperator, children: " = " }),
|
|
6410
|
+
/* @__PURE__ */ jsx23(Lang.Type, { type: decl.type })
|
|
6441
6411
|
] });
|
|
6442
6412
|
case "PythonDeclReference":
|
|
6443
|
-
return /* @__PURE__ */
|
|
6413
|
+
return /* @__PURE__ */ jsx23(Lang.Type, { type: decl.type });
|
|
6444
6414
|
}
|
|
6445
6415
|
}
|
|
6446
6416
|
|
|
@@ -6454,7 +6424,7 @@ __export(ruby_exports, {
|
|
|
6454
6424
|
TypeName: () => TypeName5
|
|
6455
6425
|
});
|
|
6456
6426
|
import * as React15 from "react";
|
|
6457
|
-
import { Fragment as Fragment14, jsx as
|
|
6427
|
+
import { Fragment as Fragment14, jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
6458
6428
|
var ComplexTypes3 = {
|
|
6459
6429
|
RubyTypeObject: "object",
|
|
6460
6430
|
RubyTypeUnion: "union",
|
|
@@ -6472,7 +6442,7 @@ var Keywords2 = {
|
|
|
6472
6442
|
};
|
|
6473
6443
|
function TypeName5({ type }) {
|
|
6474
6444
|
const Lang = useLanguageComponents();
|
|
6475
|
-
return ComplexTypes3[type.kind] ?? /* @__PURE__ */
|
|
6445
|
+
return ComplexTypes3[type.kind] ?? /* @__PURE__ */ jsx24(Lang.Type, { type });
|
|
6476
6446
|
}
|
|
6477
6447
|
var VALID_IDENTIFIER = /^[_A-Za-z][_A-Za-z0-9]*$/;
|
|
6478
6448
|
function TypePreview2({ path }) {
|
|
@@ -6484,16 +6454,16 @@ function TypePreview2({ path }) {
|
|
|
6484
6454
|
return;
|
|
6485
6455
|
const items = decl.children.map((prop, key) => {
|
|
6486
6456
|
const p = spec?.decls?.[language]?.[prop];
|
|
6487
|
-
return /* @__PURE__ */
|
|
6457
|
+
return /* @__PURE__ */ jsx24("span", { className: style_default.TypePropertyName, children: /* @__PURE__ */ jsx24("span", { className: style_default.TextIdentifier, children: p && "ident" in p ? p["ident"] : null }) }, key);
|
|
6488
6458
|
});
|
|
6489
|
-
return /* @__PURE__ */
|
|
6490
|
-
/* @__PURE__ */
|
|
6491
|
-
/* @__PURE__ */
|
|
6459
|
+
return /* @__PURE__ */ jsxs15("span", { className: style_default.TypePreview, "data-stldocs-type-preview": "properties", children: [
|
|
6460
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TypeBrace, children: " {" }),
|
|
6461
|
+
/* @__PURE__ */ jsxs15("span", { className: style_default.TypePreviewContent, children: [
|
|
6492
6462
|
" ",
|
|
6493
|
-
/* @__PURE__ */
|
|
6463
|
+
/* @__PURE__ */ jsx24(Join2, { items, limit: 3, children: /* @__PURE__ */ jsx24("span", { className: style_default.TextOperator, children: ", " }) }),
|
|
6494
6464
|
" "
|
|
6495
6465
|
] }),
|
|
6496
|
-
/* @__PURE__ */
|
|
6466
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TypeBrace, children: "} " })
|
|
6497
6467
|
] });
|
|
6498
6468
|
}
|
|
6499
6469
|
function Type5({ type }) {
|
|
@@ -6506,70 +6476,70 @@ function Type5({ type }) {
|
|
|
6506
6476
|
case "RubyTypeInteger":
|
|
6507
6477
|
case "RubyTypeFloat":
|
|
6508
6478
|
case "RubyTypeBoolean":
|
|
6509
|
-
return /* @__PURE__ */
|
|
6479
|
+
return /* @__PURE__ */ jsx24("span", { className: style_default.Type, children: /* @__PURE__ */ jsx24("span", { className: style_default.TypeKeyword, children: Keywords2[type.kind] }) });
|
|
6510
6480
|
case "RubyTypeString":
|
|
6511
|
-
return /* @__PURE__ */
|
|
6481
|
+
return /* @__PURE__ */ jsx24("span", { className: style_default.Type, children: /* @__PURE__ */ jsx24("span", { className: style_default.TypeString, children: "String" }) });
|
|
6512
6482
|
case "RubyTypeLiteral":
|
|
6513
6483
|
switch (typeof type.literal) {
|
|
6514
6484
|
case "string":
|
|
6515
|
-
return /* @__PURE__ */
|
|
6485
|
+
return /* @__PURE__ */ jsx24("span", { className: style_default.Type, children: /* @__PURE__ */ jsxs15("span", { className: style_default.LiteralString, children: [
|
|
6516
6486
|
":",
|
|
6517
6487
|
type.literal.match(VALID_IDENTIFIER) ? type.literal : JSON.stringify(type.literal)
|
|
6518
6488
|
] }) });
|
|
6519
6489
|
case "number":
|
|
6520
|
-
return /* @__PURE__ */
|
|
6490
|
+
return /* @__PURE__ */ jsx24("span", { className: style_default.Type, children: /* @__PURE__ */ jsx24("span", { className: style_default.LiteralNumeric, children: JSON.stringify(type.literal) }) });
|
|
6521
6491
|
case "boolean":
|
|
6522
|
-
return /* @__PURE__ */
|
|
6492
|
+
return /* @__PURE__ */ jsx24("span", { className: style_default.Type, children: /* @__PURE__ */ jsx24("span", { className: style_default.LiteralBoolean, children: JSON.stringify(type.literal) }) });
|
|
6523
6493
|
}
|
|
6524
6494
|
break;
|
|
6525
6495
|
case "RubyTypeArray":
|
|
6526
|
-
return /* @__PURE__ */
|
|
6527
|
-
/* @__PURE__ */
|
|
6528
|
-
/* @__PURE__ */
|
|
6529
|
-
/* @__PURE__ */
|
|
6496
|
+
return /* @__PURE__ */ jsxs15("span", { className: style_default.Type, children: [
|
|
6497
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TypeArray, children: "Array[" }),
|
|
6498
|
+
/* @__PURE__ */ jsx24(Lang.Type, { type: type.elementType }),
|
|
6499
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TypeArray, children: "]" })
|
|
6530
6500
|
] });
|
|
6531
6501
|
case "RubyTypeMap":
|
|
6532
|
-
return /* @__PURE__ */
|
|
6533
|
-
/* @__PURE__ */
|
|
6534
|
-
type.indexType.kind === "RubyTypeString" ? /* @__PURE__ */
|
|
6502
|
+
return /* @__PURE__ */ jsxs15("span", { className: style_default.Type, children: [
|
|
6503
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TypeArray, children: "Hash[" }),
|
|
6504
|
+
type.indexType.kind === "RubyTypeString" ? /* @__PURE__ */ jsx24("span", { className: style_default.TypeString, children: "Symbol" }) : /* @__PURE__ */ jsx24(Lang.Type, { type: type.indexType }),
|
|
6535
6505
|
", ",
|
|
6536
|
-
/* @__PURE__ */
|
|
6537
|
-
/* @__PURE__ */
|
|
6506
|
+
/* @__PURE__ */ jsx24(Lang.Type, { type: type.itemType }),
|
|
6507
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TypeArray, children: "]" })
|
|
6538
6508
|
] });
|
|
6539
6509
|
case "RubyTypeReference": {
|
|
6540
6510
|
const name = type.ident.split(".").at(-1);
|
|
6541
6511
|
if (!type.typeParameters || type.typeParameters.length === 0)
|
|
6542
|
-
return /* @__PURE__ */
|
|
6543
|
-
/* @__PURE__ */
|
|
6544
|
-
/* @__PURE__ */
|
|
6512
|
+
return /* @__PURE__ */ jsxs15("span", { className: style_default.Type, children: [
|
|
6513
|
+
/* @__PURE__ */ jsx24(SDKReference2, { stainlessPath: type.$ref, children: name }),
|
|
6514
|
+
/* @__PURE__ */ jsx24(TypePreview2, { path: type.$ref })
|
|
6545
6515
|
] });
|
|
6546
|
-
const typeParameters = type.typeParameters.map((t, i) => /* @__PURE__ */
|
|
6547
|
-
return /* @__PURE__ */
|
|
6548
|
-
/* @__PURE__ */
|
|
6549
|
-
/* @__PURE__ */
|
|
6550
|
-
/* @__PURE__ */
|
|
6551
|
-
/* @__PURE__ */
|
|
6552
|
-
/* @__PURE__ */
|
|
6516
|
+
const typeParameters = type.typeParameters.map((t, i) => /* @__PURE__ */ jsx24(Lang.Type, { type: t }, i));
|
|
6517
|
+
return /* @__PURE__ */ jsxs15("span", { className: style_default.Type, children: [
|
|
6518
|
+
/* @__PURE__ */ jsx24(SDKReference2, { stainlessPath: type.$ref, children: name }),
|
|
6519
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TypeBracket, children: "<" }),
|
|
6520
|
+
/* @__PURE__ */ jsx24(Join2, { items: typeParameters, children: /* @__PURE__ */ jsx24("span", { className: style_default.TextOperator, children: ", " }) }),
|
|
6521
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TypeBracket, children: ">" }),
|
|
6522
|
+
/* @__PURE__ */ jsx24(TypePreview2, { path: type.$ref })
|
|
6553
6523
|
] });
|
|
6554
6524
|
}
|
|
6555
6525
|
case "RubyTypeIntersection":
|
|
6556
6526
|
case "RubyTypeUnion": {
|
|
6557
|
-
const items = type.types.map((t, key) => /* @__PURE__ */
|
|
6527
|
+
const items = type.types.map((t, key) => /* @__PURE__ */ jsx24(Lang.Type, { type: t }, key));
|
|
6558
6528
|
const delimiter = type.kind === "RubyTypeUnion" ? "|" : "&";
|
|
6559
|
-
return /* @__PURE__ */
|
|
6529
|
+
return /* @__PURE__ */ jsx24("span", { className: style_default.Type, children: /* @__PURE__ */ jsx24("span", { className: style_default.TypePreview, "data-stldocs-type-preview": "union", children: /* @__PURE__ */ jsx24("span", { className: style_default.TypePreviewContent, children: /* @__PURE__ */ jsx24(Join2, { items, limit: 3, children: /* @__PURE__ */ jsxs15("span", { className: style_default.TextOperator, children: [
|
|
6560
6530
|
" ",
|
|
6561
6531
|
delimiter,
|
|
6562
6532
|
" "
|
|
6563
6533
|
] }) }) }) }) });
|
|
6564
6534
|
}
|
|
6565
6535
|
case "RubyTypeBuiltinClass":
|
|
6566
|
-
return /* @__PURE__ */
|
|
6536
|
+
return /* @__PURE__ */ jsx24("span", { className: style_default.TypeReference, children: type.className });
|
|
6567
6537
|
case "RubyTypeObject": {
|
|
6568
|
-
const items = type.members.map((prop, key) => /* @__PURE__ */
|
|
6569
|
-
return /* @__PURE__ */
|
|
6570
|
-
/* @__PURE__ */
|
|
6571
|
-
/* @__PURE__ */
|
|
6572
|
-
/* @__PURE__ */
|
|
6538
|
+
const items = type.members.map((prop, key) => /* @__PURE__ */ jsx24("span", { className: style_default.TextIdentifier, children: prop.ident }, key));
|
|
6539
|
+
return /* @__PURE__ */ jsx24("span", { className: style_default.Type, children: /* @__PURE__ */ jsx24("span", { className: style_default.TypePreview, "data-stldocs-type-preview": "properties", children: /* @__PURE__ */ jsxs15("span", { className: style_default.TypePreviewContent, children: [
|
|
6540
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TypeBrace, children: "{ " }),
|
|
6541
|
+
/* @__PURE__ */ jsx24(Join2, { items, limit: 3, children: /* @__PURE__ */ jsx24("span", { className: style_default.TextOperator, children: ", " }) }),
|
|
6542
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TypeBrace, children: "}" })
|
|
6573
6543
|
] }) }) });
|
|
6574
6544
|
}
|
|
6575
6545
|
}
|
|
@@ -6577,16 +6547,16 @@ function Type5({ type }) {
|
|
|
6577
6547
|
function MethodSignature5({ decl }) {
|
|
6578
6548
|
const Lang = useLanguageComponents();
|
|
6579
6549
|
const { Join: Join2 } = useComponents2();
|
|
6580
|
-
const params = decl.args.map((param, i) => /* @__PURE__ */
|
|
6581
|
-
return /* @__PURE__ */
|
|
6582
|
-
/* @__PURE__ */
|
|
6583
|
-
/* @__PURE__ */
|
|
6584
|
-
/* @__PURE__ */
|
|
6585
|
-
/* @__PURE__ */
|
|
6586
|
-
/* @__PURE__ */
|
|
6587
|
-
/* @__PURE__ */
|
|
6550
|
+
const params = decl.args.map((param, i) => /* @__PURE__ */ jsx24(React15.Fragment, { children: /* @__PURE__ */ jsx24("span", { className: style_default.TextIdentifier, children: param.ident }) }, i));
|
|
6551
|
+
return /* @__PURE__ */ jsx24("div", { className: style_default.MethodSignature, children: /* @__PURE__ */ jsxs15("span", { className: style_default.SignatureTitle, children: [
|
|
6552
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.SignatureQualified, children: /* @__PURE__ */ jsx24("span", { className: style_default.TextIdentifier, children: decl.qualified?.slice(0, -decl.ident.length) }) }),
|
|
6553
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.SignatureName, children: /* @__PURE__ */ jsx24("span", { className: style_default.TextIdentifier, children: decl.ident }) }),
|
|
6554
|
+
/* @__PURE__ */ jsxs15("span", { className: style_default.MethodSignature, children: [
|
|
6555
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.SignatureParen, children: "(" }),
|
|
6556
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.SignatureParams, children: /* @__PURE__ */ jsx24(Join2, { items: params, children: /* @__PURE__ */ jsx24("span", { className: style_default.TextOperator, children: ", " }) }) }),
|
|
6557
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.SignatureParen, children: ")" }),
|
|
6588
6558
|
" -> ",
|
|
6589
|
-
decl.returns ? /* @__PURE__ */
|
|
6559
|
+
decl.returns ? /* @__PURE__ */ jsx24(Lang.Type, { type: decl.returns }) : "void"
|
|
6590
6560
|
] })
|
|
6591
6561
|
] }) });
|
|
6592
6562
|
}
|
|
@@ -6596,17 +6566,17 @@ function Property6({ decl, children }) {
|
|
|
6596
6566
|
case "RubyDeclProperty":
|
|
6597
6567
|
return children({
|
|
6598
6568
|
name: decl.ident,
|
|
6599
|
-
typeName: /* @__PURE__ */
|
|
6600
|
-
type: decl.type.kind in ComplexTypes3 && /* @__PURE__ */
|
|
6569
|
+
typeName: /* @__PURE__ */ jsx24(Lang.TypeName, { type: decl.type }),
|
|
6570
|
+
type: decl.type.kind in ComplexTypes3 && /* @__PURE__ */ jsx24(Lang.Type, { type: decl.type })
|
|
6601
6571
|
});
|
|
6602
6572
|
case "RubyDeclTypeAlias":
|
|
6603
6573
|
return children({
|
|
6604
6574
|
name: decl.ident,
|
|
6605
6575
|
typeName: "alias",
|
|
6606
|
-
type: /* @__PURE__ */
|
|
6576
|
+
type: /* @__PURE__ */ jsx24(Lang.Type, { type: decl.type })
|
|
6607
6577
|
});
|
|
6608
6578
|
case "RubyDeclReference":
|
|
6609
|
-
return children({ type: /* @__PURE__ */
|
|
6579
|
+
return children({ type: /* @__PURE__ */ jsx24(Lang.Type, { type: decl.type }) });
|
|
6610
6580
|
case "RubyDeclClass":
|
|
6611
6581
|
return children({ name: decl.ident, typeName: "class" });
|
|
6612
6582
|
}
|
|
@@ -6616,25 +6586,25 @@ function Declaration5({ decl }) {
|
|
|
6616
6586
|
if (!decl) return;
|
|
6617
6587
|
switch (decl.kind) {
|
|
6618
6588
|
case "RubyDeclProperty":
|
|
6619
|
-
return /* @__PURE__ */
|
|
6620
|
-
/* @__PURE__ */
|
|
6621
|
-
/* @__PURE__ */
|
|
6622
|
-
/* @__PURE__ */
|
|
6589
|
+
return /* @__PURE__ */ jsxs15(Fragment14, { children: [
|
|
6590
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TypePropertyName, children: /* @__PURE__ */ jsx24("span", { className: style_default.TextIdentifier, children: decl.ident }) }),
|
|
6591
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TextPunctuation, children: ": " }),
|
|
6592
|
+
/* @__PURE__ */ jsx24(Lang.Type, { type: decl.type })
|
|
6623
6593
|
] });
|
|
6624
6594
|
case "RubyDeclTypeAlias":
|
|
6625
|
-
return /* @__PURE__ */
|
|
6626
|
-
/* @__PURE__ */
|
|
6627
|
-
/* @__PURE__ */
|
|
6628
|
-
/* @__PURE__ */
|
|
6595
|
+
return /* @__PURE__ */ jsxs15(Fragment14, { children: [
|
|
6596
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TextIdentifier, children: decl.ident }),
|
|
6597
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TextOperator, children: " = " }),
|
|
6598
|
+
/* @__PURE__ */ jsx24(Lang.Type, { type: decl.type })
|
|
6629
6599
|
] });
|
|
6630
6600
|
case "RubyDeclClass":
|
|
6631
|
-
return /* @__PURE__ */
|
|
6632
|
-
/* @__PURE__ */
|
|
6633
|
-
/* @__PURE__ */
|
|
6634
|
-
/* @__PURE__ */
|
|
6601
|
+
return /* @__PURE__ */ jsxs15(Fragment14, { children: [
|
|
6602
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TextKeyword, children: "class " }),
|
|
6603
|
+
/* @__PURE__ */ jsx24("span", { className: style_default.TextIdentifier, children: decl.ident }),
|
|
6604
|
+
/* @__PURE__ */ jsx24(TypePreview2, { path: decl.stainlessPath })
|
|
6635
6605
|
] });
|
|
6636
6606
|
case "RubyDeclReference":
|
|
6637
|
-
return /* @__PURE__ */
|
|
6607
|
+
return /* @__PURE__ */ jsx24(Lang.Type, { type: decl.type });
|
|
6638
6608
|
}
|
|
6639
6609
|
}
|
|
6640
6610
|
|
|
@@ -6649,7 +6619,7 @@ __export(http_exports, {
|
|
|
6649
6619
|
TypeName: () => TypeName6
|
|
6650
6620
|
});
|
|
6651
6621
|
import React16 from "react";
|
|
6652
|
-
import { Fragment as Fragment15, jsx as
|
|
6622
|
+
import { Fragment as Fragment15, jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6653
6623
|
var ComplexTypes4 = {
|
|
6654
6624
|
HttpTypeUnion: "union",
|
|
6655
6625
|
HttpTypeIntersection: "intersection"
|
|
@@ -6660,7 +6630,7 @@ var constStyle4 = {
|
|
|
6660
6630
|
boolean: style_default.LiteralBoolean
|
|
6661
6631
|
};
|
|
6662
6632
|
function Identifier2({ name }) {
|
|
6663
|
-
return /* @__PURE__ */
|
|
6633
|
+
return /* @__PURE__ */ jsx25(Fragment15, { children: /* @__PURE__ */ jsx25("span", { className: style_default.TextIdentifier, children: /^[_a-zA-Z][_a-zA-Z0-9]*$/.test(name) ? name : JSON.stringify(name) }) });
|
|
6664
6634
|
}
|
|
6665
6635
|
function TypePreview3({ path }) {
|
|
6666
6636
|
const spec = useSpec();
|
|
@@ -6671,23 +6641,23 @@ function TypePreview3({ path }) {
|
|
|
6671
6641
|
return;
|
|
6672
6642
|
const items = decl.children.map((prop, key) => {
|
|
6673
6643
|
const decl2 = spec?.decls?.[language]?.[prop];
|
|
6674
|
-
return /* @__PURE__ */
|
|
6644
|
+
return /* @__PURE__ */ jsx25("span", { className: style_default.TypePropertyName, children: /* @__PURE__ */ jsx25("span", { className: style_default.TextIdentifier, children: decl2 && "key" in decl2 ? decl2?.["key"] : null }) }, key);
|
|
6675
6645
|
});
|
|
6676
|
-
return /* @__PURE__ */
|
|
6677
|
-
/* @__PURE__ */
|
|
6678
|
-
/* @__PURE__ */
|
|
6679
|
-
/* @__PURE__ */
|
|
6646
|
+
return /* @__PURE__ */ jsxs16("span", { className: style_default.TypePreview, "data-stldocs-type-preview": "properties", children: [
|
|
6647
|
+
/* @__PURE__ */ jsx25("span", { className: style_default.TypeBrace, children: " { " }),
|
|
6648
|
+
/* @__PURE__ */ jsx25("span", { className: style_default.TypePreviewContent, children: /* @__PURE__ */ jsx25(Join2, { items, limit: 3, children: /* @__PURE__ */ jsx25("span", { className: style_default.TextOperator, children: ", " }) }) }),
|
|
6649
|
+
/* @__PURE__ */ jsx25("span", { className: style_default.TypeBrace, children: " } " })
|
|
6680
6650
|
] });
|
|
6681
6651
|
}
|
|
6682
6652
|
function TypeName6({ type }) {
|
|
6683
6653
|
const Lang = useLanguageComponents();
|
|
6684
|
-
if (type.kind === "HttpTypeArray") return /* @__PURE__ */
|
|
6654
|
+
if (type.kind === "HttpTypeArray") return /* @__PURE__ */ jsxs16(Fragment15, { children: [
|
|
6685
6655
|
"array of ",
|
|
6686
|
-
/* @__PURE__ */
|
|
6656
|
+
/* @__PURE__ */ jsx25(Lang.TypeName, { type: type.elementType })
|
|
6687
6657
|
] });
|
|
6688
6658
|
if (type.kind === "HttpTypeUnion" && type.types.every((t) => t.kind === "HttpTypeLiteral")) return "enum";
|
|
6689
6659
|
if (type.kind === "HttpTypeReference" && type.ident.split(".").at(-1) === "Record") return "map";
|
|
6690
|
-
return ComplexTypes4[type.kind] ?? /* @__PURE__ */
|
|
6660
|
+
return ComplexTypes4[type.kind] ?? /* @__PURE__ */ jsx25(Lang.Type, { type });
|
|
6691
6661
|
}
|
|
6692
6662
|
function Type6({ type }) {
|
|
6693
6663
|
const Lang = useLanguageComponents();
|
|
@@ -6698,22 +6668,22 @@ function Type6({ type }) {
|
|
|
6698
6668
|
case "HttpTypeNull":
|
|
6699
6669
|
case "HttpTypeBoolean":
|
|
6700
6670
|
case "HttpTypeNumber":
|
|
6701
|
-
return /* @__PURE__ */
|
|
6671
|
+
return /* @__PURE__ */ jsx25("span", { className: style_default.Type, children: /* @__PURE__ */ jsx25("span", { className: style_default.TypePlain, children: type.kind.slice(8).toLowerCase() }) });
|
|
6702
6672
|
case "HttpTypeString":
|
|
6703
|
-
return /* @__PURE__ */
|
|
6673
|
+
return /* @__PURE__ */ jsx25("span", { className: style_default.Type, children: /* @__PURE__ */ jsx25("span", { className: style_default.TypePlain, children: "string" }) });
|
|
6704
6674
|
case "HttpTypeLiteral":
|
|
6705
|
-
return /* @__PURE__ */
|
|
6675
|
+
return /* @__PURE__ */ jsx25("span", { className: style_default.Type, children: /* @__PURE__ */ jsx25("span", { className: constStyle4[typeof type.literal], children: JSON.stringify(type.literal) }) });
|
|
6706
6676
|
case "HttpTypeArray": {
|
|
6707
|
-
return /* @__PURE__ */
|
|
6708
|
-
/* @__PURE__ */
|
|
6709
|
-
/* @__PURE__ */
|
|
6677
|
+
return /* @__PURE__ */ jsxs16("span", { className: style_default.Type, children: [
|
|
6678
|
+
/* @__PURE__ */ jsx25("span", { className: style_default.TypeArray, children: "array of " }),
|
|
6679
|
+
/* @__PURE__ */ jsx25(Lang.Type, { type: type.elementType })
|
|
6710
6680
|
] });
|
|
6711
6681
|
}
|
|
6712
6682
|
case "HttpTypeIntersection":
|
|
6713
6683
|
case "HttpTypeUnion": {
|
|
6714
|
-
const items = type.types.map((t, key) => /* @__PURE__ */
|
|
6684
|
+
const items = type.types.map((t, key) => /* @__PURE__ */ jsx25(Lang.Type, { type: t }, key));
|
|
6715
6685
|
const delimiter = type.kind === "HttpTypeUnion" ? "or" : "and";
|
|
6716
|
-
return /* @__PURE__ */
|
|
6686
|
+
return /* @__PURE__ */ jsx25("span", { className: style_default.Type, children: /* @__PURE__ */ jsx25("span", { className: style_default.TypePreview, "data-stldocs-type-preview": "union", children: /* @__PURE__ */ jsx25("span", { className: style_default.TypePreviewContent, children: /* @__PURE__ */ jsx25(Join2, { items, limit: 3, children: /* @__PURE__ */ jsxs16("span", { className: style_default.TextOperator, children: [
|
|
6717
6687
|
" ",
|
|
6718
6688
|
delimiter,
|
|
6719
6689
|
" "
|
|
@@ -6721,36 +6691,36 @@ function Type6({ type }) {
|
|
|
6721
6691
|
}
|
|
6722
6692
|
case "HttpTypeReference": {
|
|
6723
6693
|
const name = type.ident.split(".").at(-1);
|
|
6724
|
-
const params = type.typeParameters?.map((param, key) => /* @__PURE__ */
|
|
6694
|
+
const params = type.typeParameters?.map((param, key) => /* @__PURE__ */ jsx25(Lang.Type, { type: param }, key));
|
|
6725
6695
|
if (name === "Record" && type.typeParameters?.length === 2 && type.typeParameters?.at(0).kind === "HttpTypeString")
|
|
6726
|
-
return /* @__PURE__ */
|
|
6727
|
-
/* @__PURE__ */
|
|
6696
|
+
return /* @__PURE__ */ jsxs16(Fragment15, { children: [
|
|
6697
|
+
/* @__PURE__ */ jsx25("span", { className: style_default.TypeArray, children: "map" }),
|
|
6728
6698
|
"[",
|
|
6729
6699
|
params?.[1],
|
|
6730
6700
|
"]"
|
|
6731
6701
|
] });
|
|
6732
|
-
return /* @__PURE__ */
|
|
6733
|
-
/* @__PURE__ */
|
|
6734
|
-
params && params.length > 0 && /* @__PURE__ */
|
|
6735
|
-
/* @__PURE__ */
|
|
6736
|
-
/* @__PURE__ */
|
|
6737
|
-
/* @__PURE__ */
|
|
6702
|
+
return /* @__PURE__ */ jsxs16("span", { className: style_default.Type, children: [
|
|
6703
|
+
/* @__PURE__ */ jsx25(SDKReference2, { stainlessPath: type.$ref, children: name }),
|
|
6704
|
+
params && params.length > 0 && /* @__PURE__ */ jsxs16(Fragment15, { children: [
|
|
6705
|
+
/* @__PURE__ */ jsx25("span", { className: style_default.TypeBracket, children: "<" }),
|
|
6706
|
+
/* @__PURE__ */ jsx25(Join2, { items: params, limit: 3, children: /* @__PURE__ */ jsx25("span", { className: style_default.TextOperator, children: ", " }) }),
|
|
6707
|
+
/* @__PURE__ */ jsx25("span", { className: style_default.TypeBracket, children: ">" })
|
|
6738
6708
|
] }),
|
|
6739
|
-
/* @__PURE__ */
|
|
6709
|
+
/* @__PURE__ */ jsx25(TypePreview3, { path: type.$ref })
|
|
6740
6710
|
] });
|
|
6741
6711
|
}
|
|
6742
6712
|
case "HttpTypeObject": {
|
|
6743
|
-
const items = type.members.map(({ ident }) => /* @__PURE__ */
|
|
6744
|
-
return /* @__PURE__ */
|
|
6745
|
-
/* @__PURE__ */
|
|
6746
|
-
/* @__PURE__ */
|
|
6747
|
-
/* @__PURE__ */
|
|
6748
|
-
/* @__PURE__ */
|
|
6713
|
+
const items = type.members.map(({ ident }) => /* @__PURE__ */ jsx25("span", { className: style_default.TypePropertyName, children: /* @__PURE__ */ jsx25(Identifier2, { name: ident }) }, ident));
|
|
6714
|
+
return /* @__PURE__ */ jsxs16("span", { className: style_default.Type, children: [
|
|
6715
|
+
/* @__PURE__ */ jsx25("span", { className: style_default.TypePlain, children: "object" }),
|
|
6716
|
+
/* @__PURE__ */ jsxs16("span", { className: style_default.TypePreview, "data-stldocs-type-preview": "properties", children: [
|
|
6717
|
+
/* @__PURE__ */ jsx25("span", { className: style_default.TypeBrace, children: " {" }),
|
|
6718
|
+
/* @__PURE__ */ jsxs16("span", { className: style_default.TypePreviewContent, children: [
|
|
6749
6719
|
" ",
|
|
6750
|
-
/* @__PURE__ */
|
|
6720
|
+
/* @__PURE__ */ jsx25(Join2, { items, limit: 3, children: /* @__PURE__ */ jsx25("span", { className: style_default.TextOperator, children: ", " }) }),
|
|
6751
6721
|
" "
|
|
6752
6722
|
] }),
|
|
6753
|
-
/* @__PURE__ */
|
|
6723
|
+
/* @__PURE__ */ jsx25("span", { className: style_default.TypeBrace, children: "} " })
|
|
6754
6724
|
] })
|
|
6755
6725
|
] });
|
|
6756
6726
|
}
|
|
@@ -6762,40 +6732,40 @@ function MethodSignature6({ decl }) {
|
|
|
6762
6732
|
}
|
|
6763
6733
|
function MethodInfo2({ decl, children }) {
|
|
6764
6734
|
const Docs = useComponents2();
|
|
6765
|
-
const params = Object.entries(decl.paramsChildren).filter(([, value]) => value.length).map(([location, value]) => /* @__PURE__ */
|
|
6766
|
-
/* @__PURE__ */
|
|
6735
|
+
const params = Object.entries(decl.paramsChildren).filter(([, value]) => value.length).map(([location, value]) => /* @__PURE__ */ jsx25(React16.Fragment, { children: /* @__PURE__ */ jsxs16("div", { className: style_default.MethodParameters, "data-stldocs-property-group": location.at(0), children: [
|
|
6736
|
+
/* @__PURE__ */ jsxs16("h5", { children: [
|
|
6767
6737
|
location.at(0).toUpperCase(),
|
|
6768
6738
|
location.slice(1),
|
|
6769
6739
|
" Parameters",
|
|
6770
|
-
/* @__PURE__ */
|
|
6740
|
+
/* @__PURE__ */ jsx25(PropertyToggle, { target: location.at(0) })
|
|
6771
6741
|
] }),
|
|
6772
|
-
/* @__PURE__ */
|
|
6742
|
+
/* @__PURE__ */ jsx25(Docs.SDKChildren, { paths: value })
|
|
6773
6743
|
] }) }, location));
|
|
6774
6744
|
if ((decl.bodyParamsChildren?.["application/json"]?.length ?? 0) > 0)
|
|
6775
6745
|
params.push(
|
|
6776
|
-
/* @__PURE__ */
|
|
6777
|
-
/* @__PURE__ */
|
|
6746
|
+
/* @__PURE__ */ jsxs16("div", { className: style_default.MethodInfoSection, children: [
|
|
6747
|
+
/* @__PURE__ */ jsxs16("h5", { children: [
|
|
6778
6748
|
"Body Parameters",
|
|
6779
|
-
/* @__PURE__ */
|
|
6749
|
+
/* @__PURE__ */ jsx25(PropertyToggle, { target: "body" })
|
|
6780
6750
|
] }),
|
|
6781
|
-
/* @__PURE__ */
|
|
6751
|
+
/* @__PURE__ */ jsx25("div", { className: style_default.MethodParameters, "data-stldocs-property-group": "body", children: /* @__PURE__ */ jsx25(Docs.SDKChildren, { paths: decl.bodyParamsChildren?.["application/json"] ?? [] }) })
|
|
6782
6752
|
] })
|
|
6783
6753
|
);
|
|
6784
|
-
return /* @__PURE__ */
|
|
6785
|
-
children && /* @__PURE__ */
|
|
6754
|
+
return /* @__PURE__ */ jsxs16("div", { className: style_default.MethodInfo, children: [
|
|
6755
|
+
children && /* @__PURE__ */ jsx25("div", { className: style_default.MethodContent, children }),
|
|
6786
6756
|
params.length > 0 && params,
|
|
6787
|
-
(decl.responseChildren?.length ?? 0) > 0 && /* @__PURE__ */
|
|
6788
|
-
/* @__PURE__ */
|
|
6757
|
+
(decl.responseChildren?.length ?? 0) > 0 && /* @__PURE__ */ jsxs16("div", { className: style_default.MethodInfoSection, children: [
|
|
6758
|
+
/* @__PURE__ */ jsxs16("h5", { children: [
|
|
6789
6759
|
"Returns",
|
|
6790
|
-
/* @__PURE__ */
|
|
6760
|
+
/* @__PURE__ */ jsx25(PropertyToggle, { target: "returns" })
|
|
6791
6761
|
] }),
|
|
6792
|
-
/* @__PURE__ */
|
|
6762
|
+
/* @__PURE__ */ jsx25("div", { className: style_default.MethodReturns, "data-stldocs-property-group": "returns", children: /* @__PURE__ */ jsx25(Docs.SDKChildren, { paths: decl.responseChildren ?? [] }) })
|
|
6793
6763
|
] })
|
|
6794
6764
|
] });
|
|
6795
6765
|
}
|
|
6796
6766
|
function renderVariantInfo(type) {
|
|
6797
6767
|
if (type.kind === "HttpTypeUnion" && type.types.every((t) => t.kind === "HttpTypeObject" || t.kind === "HttpTypeReference"))
|
|
6798
|
-
return /* @__PURE__ */
|
|
6768
|
+
return /* @__PURE__ */ jsxs16(Fragment15, { children: [
|
|
6799
6769
|
"One of the following ",
|
|
6800
6770
|
type.types.length,
|
|
6801
6771
|
" object variants:"
|
|
@@ -6809,17 +6779,17 @@ function Property7({ decl, children }) {
|
|
|
6809
6779
|
const variants = renderVariantInfo(decl.type);
|
|
6810
6780
|
return children({
|
|
6811
6781
|
name: decl.key,
|
|
6812
|
-
typeName: /* @__PURE__ */
|
|
6813
|
-
type: decl.type.kind in ComplexTypes4 && !variants && /* @__PURE__ */
|
|
6782
|
+
typeName: /* @__PURE__ */ jsx25(Lang.TypeName, { type: decl.type }),
|
|
6783
|
+
type: decl.type.kind in ComplexTypes4 && !variants && /* @__PURE__ */ jsx25(Lang.Type, { type: decl.type })
|
|
6814
6784
|
});
|
|
6815
6785
|
}
|
|
6816
6786
|
case "HttpDeclTypeAlias":
|
|
6817
6787
|
return children({
|
|
6818
6788
|
name: decl.ident,
|
|
6819
|
-
typeName: /* @__PURE__ */
|
|
6789
|
+
typeName: /* @__PURE__ */ jsx25(Lang.TypeName, { type: decl.type })
|
|
6820
6790
|
});
|
|
6821
6791
|
case "HttpDeclReference":
|
|
6822
|
-
return children({ type: /* @__PURE__ */
|
|
6792
|
+
return children({ type: /* @__PURE__ */ jsx25(Lang.Type, { type: decl.type }) });
|
|
6823
6793
|
}
|
|
6824
6794
|
}
|
|
6825
6795
|
function Declaration6({ decl }) {
|
|
@@ -6827,20 +6797,20 @@ function Declaration6({ decl }) {
|
|
|
6827
6797
|
if (!decl) return;
|
|
6828
6798
|
switch (decl.kind) {
|
|
6829
6799
|
case "HttpDeclProperty":
|
|
6830
|
-
return /* @__PURE__ */
|
|
6831
|
-
/* @__PURE__ */
|
|
6832
|
-
/* @__PURE__ */
|
|
6833
|
-
decl.optional && /* @__PURE__ */
|
|
6834
|
-
/* @__PURE__ */
|
|
6800
|
+
return /* @__PURE__ */ jsxs16(Fragment15, { children: [
|
|
6801
|
+
/* @__PURE__ */ jsx25("span", { className: style_default.TypePropertyName, children: /* @__PURE__ */ jsx25(Identifier2, { name: decl.key }) }),
|
|
6802
|
+
/* @__PURE__ */ jsx25("span", { className: style_default.TextPunctuation, children: ": " }),
|
|
6803
|
+
decl.optional && /* @__PURE__ */ jsx25("span", { className: style_default.TextPunctuation, children: "optional " }),
|
|
6804
|
+
/* @__PURE__ */ jsx25(Lang.Type, { type: decl.type })
|
|
6835
6805
|
] });
|
|
6836
6806
|
case "HttpDeclTypeAlias":
|
|
6837
|
-
return /* @__PURE__ */
|
|
6838
|
-
/* @__PURE__ */
|
|
6839
|
-
/* @__PURE__ */
|
|
6840
|
-
/* @__PURE__ */
|
|
6807
|
+
return /* @__PURE__ */ jsxs16(Fragment15, { children: [
|
|
6808
|
+
/* @__PURE__ */ jsx25(Identifier2, { name: decl.ident }),
|
|
6809
|
+
/* @__PURE__ */ jsx25("span", { className: style_default.TextOperator, children: " = " }),
|
|
6810
|
+
/* @__PURE__ */ jsx25(Lang.Type, { type: decl.type })
|
|
6841
6811
|
] });
|
|
6842
6812
|
case "HttpDeclReference":
|
|
6843
|
-
return /* @__PURE__ */
|
|
6813
|
+
return /* @__PURE__ */ jsx25(Lang.Type, { type: decl.type });
|
|
6844
6814
|
}
|
|
6845
6815
|
}
|
|
6846
6816
|
|
|
@@ -6849,10 +6819,10 @@ var node = typescript_exports;
|
|
|
6849
6819
|
var kotlin = java_exports;
|
|
6850
6820
|
|
|
6851
6821
|
// src/contexts/component.tsx
|
|
6852
|
-
import { jsx as
|
|
6822
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
6853
6823
|
|
|
6854
6824
|
// src/search/printer.tsx
|
|
6855
|
-
import { jsx as
|
|
6825
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
6856
6826
|
|
|
6857
6827
|
// ../../node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.js
|
|
6858
6828
|
var _a;
|
|
@@ -7670,14 +7640,14 @@ async function search({
|
|
|
7670
7640
|
}
|
|
7671
7641
|
|
|
7672
7642
|
// src/contexts/search.tsx
|
|
7673
|
-
import { jsx as
|
|
7643
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
7674
7644
|
var [Provider2, useSearchContext] = createStrictContext("SearchContext");
|
|
7675
7645
|
function useSearch() {
|
|
7676
7646
|
const { settings } = useSearchContext();
|
|
7677
7647
|
return (params) => search({ settings, params });
|
|
7678
7648
|
}
|
|
7679
7649
|
function SearchProvider({ children, ...props }) {
|
|
7680
|
-
return /* @__PURE__ */
|
|
7650
|
+
return /* @__PURE__ */ jsx28(Provider2, { value: props, children });
|
|
7681
7651
|
}
|
|
7682
7652
|
|
|
7683
7653
|
// src/contexts/index.tsx
|