@stainless-api/docs-ui 0.1.0-beta.73 → 0.1.0-beta.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-BN_g-Awi.js → chunk-BYypO7fO.js} +3 -3
- package/dist/components/MaskedInput.d.ts +3 -3
- package/dist/components/MaskedInput.js +1 -1
- package/dist/components/breadcrumbs.d.ts +24 -1
- package/dist/components/breadcrumbs.js +62 -7
- package/dist/components/icons.d.ts +18 -13
- package/dist/components/icons.js +940 -2
- package/dist/components/index.d.ts +16 -14
- package/dist/components/index.js +72 -18
- package/dist/components/method.d.ts +58 -1
- package/dist/components/method.js +95 -8
- package/dist/components/overview.d.ts +38 -1
- package/dist/components/overview.js +137 -9
- package/dist/components/primitives.d.ts +104 -1
- package/dist/components/primitives.js +250 -6
- package/dist/components/properties.d.ts +53 -1
- package/dist/components/properties.js +138 -7
- package/dist/components/sdk-sidebar.d.ts +14 -1
- package/dist/components/sdk-sidebar.js +50 -8
- package/dist/components/sdk.d.ts +121 -1
- package/dist/components/sdk.js +405 -8
- package/dist/components/snippets.d.ts +70 -13
- package/dist/components/snippets.js +182 -7
- package/dist/components/stl-sidebar.d.ts +57 -1
- package/dist/components/stl-sidebar.js +105 -3
- package/dist/contexts/component-generics.d.ts +29 -1
- package/dist/contexts/component-generics.js +31 -1
- package/dist/contexts/component-types.d.ts +4 -15
- package/dist/contexts/component.d.ts +7 -17
- package/dist/contexts/component.js +22 -28
- package/dist/contexts/docs.d.ts +61 -1
- package/dist/contexts/docs.js +89 -1
- package/dist/contexts/index.d.ts +13 -14
- package/dist/contexts/index.js +44 -6
- package/dist/contexts/markdown.d.ts +21 -1
- package/dist/contexts/markdown.js +47 -2
- package/dist/contexts/navigation.d.ts +28 -1
- package/dist/contexts/navigation.js +22 -1
- package/dist/contexts/use-components.d.ts +1 -13
- package/dist/contexts/use-components.js +6 -2
- package/dist/{index-HDt5wRiR.d.ts → index-Cl6Gny0o.d.ts} +37 -2
- package/dist/index.d.ts +4 -14
- package/dist/index.js +7 -30
- package/dist/languages/cli.d.ts +38 -14
- package/dist/languages/cli.js +166 -20
- package/dist/languages/csharp.d.ts +42 -14
- package/dist/languages/csharp.js +283 -8
- package/dist/languages/go.d.ts +40 -14
- package/dist/languages/go.js +303 -8
- package/dist/languages/http.d.ts +46 -14
- package/dist/languages/http.js +390 -19
- package/dist/languages/index.d.ts +51 -14
- package/dist/languages/index.js +32 -28
- package/dist/languages/java.d.ts +43 -14
- package/dist/languages/java.js +403 -8
- package/dist/languages/php.d.ts +40 -0
- package/dist/languages/php.js +313 -0
- package/dist/languages/python.d.ts +40 -14
- package/dist/languages/python.js +269 -8
- package/dist/languages/ruby.d.ts +40 -14
- package/dist/languages/ruby.js +387 -8
- package/dist/languages/terraform.d.ts +48 -14
- package/dist/languages/terraform.js +243 -8
- package/dist/languages/typescript.d.ts +40 -14
- package/dist/languages/typescript.js +449 -8
- package/dist/markdown/index.d.ts +1 -2
- package/dist/markdown/index.js +1 -28
- package/dist/markdown/printer.d.ts +2 -2
- package/dist/markdown/printer.js +6 -30
- package/dist/markdown/utils.d.ts +3 -3
- package/dist/routing.d.ts +61 -2
- package/dist/routing.js +205 -2
- package/dist/spec.d.ts +2 -2
- package/dist/spec.js +2 -2
- package/dist/style.js +176 -1
- package/dist/use-strict-context-L0c8JKg4.js +16 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +53 -2
- package/package.json +3 -3
- package/dist/breadcrumbs-Dei_5sHd.d.ts +0 -25
- package/dist/breadcrumbs-oUp-6oJK.js +0 -63
- package/dist/cli-BX9ofVCR.js +0 -166
- package/dist/component-Dl5ZEHxB.js +0 -23
- package/dist/component-generics-C9ALAcZI.d.ts +0 -30
- package/dist/component-generics-POFirVVb.js +0 -45
- package/dist/components-DQPlXEwE.js +0 -72
- package/dist/contexts-_NNW5yqC.js +0 -44
- package/dist/csharp-sn5CJu9t.js +0 -283
- package/dist/docs-YgoQ3bzY.js +0 -81
- package/dist/docs-x-kfjRMc.d.ts +0 -66
- package/dist/go-BoaAVmP0.js +0 -303
- package/dist/http-Ccj1dOvE.js +0 -389
- package/dist/icons-BYKn5X8E.js +0 -885
- package/dist/index-OCM-LZIo.d.ts +0 -428
- package/dist/java-BiLRuLuD.js +0 -403
- package/dist/languages-COjc0Nwx.js +0 -30
- package/dist/markdown-BszOPZhh.d.ts +0 -22
- package/dist/markdown-Cq3XEhrR.js +0 -49
- package/dist/method-DjzVBzZe.js +0 -96
- package/dist/method-KkWyhvKa.d.ts +0 -59
- package/dist/navigation-BZjwfN2P.d.ts +0 -29
- package/dist/navigation-aoYZ_tl4.js +0 -24
- package/dist/overview-BNmMeDUE.d.ts +0 -39
- package/dist/overview-Clq5psZe.js +0 -138
- package/dist/primitives-B8OnSXRP.d.ts +0 -105
- package/dist/primitives-BBUs_flm.js +0 -250
- package/dist/properties-BhlRtWo4.d.ts +0 -54
- package/dist/properties-DQU0NBzb.js +0 -138
- package/dist/python-nqOBH7GS.js +0 -269
- package/dist/routing-GvhEMw6E.js +0 -205
- package/dist/routing-qJMPICGo.d.ts +0 -61
- package/dist/ruby-BBc8HdIt.js +0 -387
- package/dist/sdk-C8C6IRQp.d.ts +0 -122
- package/dist/sdk-DzCHhEoX.js +0 -405
- package/dist/sdk-sidebar-CkjSLggl.js +0 -50
- package/dist/sdk-sidebar-lgNmf-ns.d.ts +0 -15
- package/dist/snippets-CLpNVNlA.js +0 -181
- package/dist/stl-sidebar-8jF9cdnn.d.ts +0 -58
- package/dist/stl-sidebar-DC5UOJiT.js +0 -106
- package/dist/style-DJIYkFhO.js +0 -178
- package/dist/terraform-DVx2ea2h.js +0 -243
- package/dist/typescript-Cmk-jBBw.js +0 -449
- package/dist/use-components-BUz3GbO4.js +0 -7
- package/dist/utils-D6zJxUZ9.js +0 -54
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/components/stl-sidebar.d.ts
|
|
5
|
-
declare module 'react' {
|
|
6
|
-
namespace JSX {
|
|
7
|
-
interface IntrinsicElements {
|
|
8
|
-
/**
|
|
9
|
-
* Custom element defined by Starlight's <SidebarPersister>.
|
|
10
|
-
*/
|
|
11
|
-
'sl-sidebar-restore': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
type StlSidebarTarget = {
|
|
16
|
-
type: 'href';
|
|
17
|
-
href: string;
|
|
18
|
-
} | {
|
|
19
|
-
type: 'stainlessPath';
|
|
20
|
-
stainlessPath: string;
|
|
21
|
-
};
|
|
22
|
-
interface StlSidebarLink {
|
|
23
|
-
type: 'link';
|
|
24
|
-
icon?: ReactNode;
|
|
25
|
-
label: string;
|
|
26
|
-
/** Current sidebar item is highlighted. */
|
|
27
|
-
isCurrent?: boolean;
|
|
28
|
-
target: StlSidebarTarget;
|
|
29
|
-
/** Additional HTML attributes that will be attached to the anchor element. */
|
|
30
|
-
attrs?: Record<string, unknown>;
|
|
31
|
-
}
|
|
32
|
-
interface StlSidebarGroup {
|
|
33
|
-
type: 'group';
|
|
34
|
-
icon?: ReactNode;
|
|
35
|
-
label: string;
|
|
36
|
-
entries: Array<StlSidebarLink | StlSidebarGroup>;
|
|
37
|
-
/** Defaults to true. */
|
|
38
|
-
collapsible?: boolean;
|
|
39
|
-
collapsed?: boolean;
|
|
40
|
-
/** Current sidebar item is highlighted. */
|
|
41
|
-
isCurrent?: boolean;
|
|
42
|
-
target?: StlSidebarTarget;
|
|
43
|
-
}
|
|
44
|
-
type StlSidebarEntry = StlSidebarLink | StlSidebarGroup;
|
|
45
|
-
type StlSidebarProps = {
|
|
46
|
-
entries: StlSidebarEntry[];
|
|
47
|
-
/**
|
|
48
|
-
* If set, add <sl-sidebar-restore> custom elements (as defined by Starlight's SidebarPersister)
|
|
49
|
-
* which are used to save/restore sidebar state.
|
|
50
|
-
*/
|
|
51
|
-
withStarlightRestoration?: boolean;
|
|
52
|
-
};
|
|
53
|
-
declare function StlSidebar({
|
|
54
|
-
entries,
|
|
55
|
-
withStarlightRestoration
|
|
56
|
-
}: StlSidebarProps): react_jsx_runtime0.JSX.Element;
|
|
57
|
-
//#endregion
|
|
58
|
-
export { StlSidebarProps as a, StlSidebarLink as i, StlSidebarEntry as n, StlSidebarTarget as o, StlSidebarGroup as r, StlSidebar as t };
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { t as useComponents } from "./use-components-BUz3GbO4.js";
|
|
2
|
-
import { t as style_default } from "./style-DJIYkFhO.js";
|
|
3
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import clsx from "clsx";
|
|
5
|
-
import { ChevronRight } from "lucide-react";
|
|
6
|
-
|
|
7
|
-
//#region src/components/stl-sidebar.tsx
|
|
8
|
-
function targetToAttributes(target) {
|
|
9
|
-
return {
|
|
10
|
-
href: target.type === "href" ? target.href : void 0,
|
|
11
|
-
stainlessPath: target.type === "stainlessPath" ? target.stainlessPath : void 0
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
function StlSidebarSublist({ entries, entryToIndex }) {
|
|
15
|
-
return /* @__PURE__ */ jsx("ul", {
|
|
16
|
-
className: style_default.SidebarList,
|
|
17
|
-
children: entries.map((entry, index) => entry.type === "link" ? /* @__PURE__ */ jsx(LinkEntry, { entry }, index) : /* @__PURE__ */ jsx(GroupEntry, {
|
|
18
|
-
entry,
|
|
19
|
-
entryToIndex
|
|
20
|
-
}, index))
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
function EntryItem({ className, children }) {
|
|
24
|
-
return /* @__PURE__ */ jsx("li", {
|
|
25
|
-
className: clsx(style_default.SidebarEntry, className),
|
|
26
|
-
children
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
function LinkEntry({ entry }) {
|
|
30
|
-
const Docs = useComponents();
|
|
31
|
-
return /* @__PURE__ */ jsx(EntryItem, {
|
|
32
|
-
className: style_default.SidebarEntryLink,
|
|
33
|
-
children: /* @__PURE__ */ jsxs(Docs.Link, {
|
|
34
|
-
...targetToAttributes(entry.target),
|
|
35
|
-
"aria-current": entry.isCurrent ? "page" : void 0,
|
|
36
|
-
...entry.attrs,
|
|
37
|
-
children: [entry.icon, entry.label]
|
|
38
|
-
})
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function GroupEntry({ entry, entryToIndex }) {
|
|
42
|
-
const Docs = useComponents();
|
|
43
|
-
const restorePointIndex = entryToIndex?.get(entry);
|
|
44
|
-
const { collapsible = true } = entry;
|
|
45
|
-
const labelWithIcon = /* @__PURE__ */ jsxs(Fragment, { children: [entry.label, entry.icon] });
|
|
46
|
-
const GroupElement = collapsible ? "details" : "div";
|
|
47
|
-
const GroupLabelElement = collapsible ? "summary" : "div";
|
|
48
|
-
return /* @__PURE__ */ jsxs(EntryItem, {
|
|
49
|
-
className: style_default.SidebarEntryGroup,
|
|
50
|
-
children: [entry.target && /* @__PURE__ */ jsx(Docs.Link, {
|
|
51
|
-
...targetToAttributes(entry.target),
|
|
52
|
-
"aria-current": entry.isCurrent ? "page" : void 0,
|
|
53
|
-
children: labelWithIcon
|
|
54
|
-
}), /* @__PURE__ */ jsxs(GroupElement, {
|
|
55
|
-
className: style_default.SidebarExpander,
|
|
56
|
-
...collapsible ? { open: flattenStlSidebar(entry.entries).some((i) => i.isCurrent) || !entry.collapsed } : {},
|
|
57
|
-
children: [
|
|
58
|
-
/* @__PURE__ */ jsxs(GroupLabelElement, {
|
|
59
|
-
className: style_default.ExpanderSummary,
|
|
60
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
61
|
-
"aria-hidden": entry.target ? "true" : void 0,
|
|
62
|
-
children: labelWithIcon
|
|
63
|
-
}), entry.entries.length > 0 && collapsible && /* @__PURE__ */ jsx(ChevronRight, {
|
|
64
|
-
size: 16,
|
|
65
|
-
strokeWidth: 1,
|
|
66
|
-
className: `${style_default.Icon} ${style_default.ExpanderSummaryIcon}`
|
|
67
|
-
})]
|
|
68
|
-
}),
|
|
69
|
-
restorePointIndex !== void 0 && /* @__PURE__ */ jsx("sl-sidebar-restore", { "data-index": restorePointIndex }),
|
|
70
|
-
entry.entries.length > 0 && /* @__PURE__ */ jsx(StlSidebarSublist, {
|
|
71
|
-
entries: entry.entries,
|
|
72
|
-
entryToIndex
|
|
73
|
-
})
|
|
74
|
-
]
|
|
75
|
-
})]
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
function StlSidebar({ entries, withStarlightRestoration }) {
|
|
79
|
-
const entryToIndex = withStarlightRestoration ? computeEntryToIndex(entries) : void 0;
|
|
80
|
-
return /* @__PURE__ */ jsx("div", {
|
|
81
|
-
className: `${style_default.Root} ${style_default.Sidebar}`,
|
|
82
|
-
children: /* @__PURE__ */ jsx(StlSidebarSublist, {
|
|
83
|
-
entries,
|
|
84
|
-
entryToIndex
|
|
85
|
-
})
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
function computeEntryToIndex(allEntries) {
|
|
89
|
-
const entryToIndex = /* @__PURE__ */ new Map();
|
|
90
|
-
let currentIndex = 0;
|
|
91
|
-
function addEntries(entries) {
|
|
92
|
-
for (const entry of entries) if (entry.type === "group") {
|
|
93
|
-
entryToIndex.set(entry, currentIndex);
|
|
94
|
-
currentIndex++;
|
|
95
|
-
addEntries(entry.entries);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
addEntries(allEntries);
|
|
99
|
-
return entryToIndex;
|
|
100
|
-
}
|
|
101
|
-
function flattenStlSidebar(sidebar) {
|
|
102
|
-
return sidebar.flatMap((entry) => entry.type === "group" ? flattenStlSidebar(entry.entries) : entry);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
//#endregion
|
|
106
|
-
export { StlSidebar as t };
|
package/dist/style-DJIYkFhO.js
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
//#region src/style.ts
|
|
2
|
-
var style_default = {
|
|
3
|
-
TextIdentifier: "stldocs-text-identifier",
|
|
4
|
-
TextOperator: "stldocs-text-operator",
|
|
5
|
-
TextPunctuation: "stldocs-text-punctuation",
|
|
6
|
-
TextKeyword: "stldocs-text-keyword",
|
|
7
|
-
ContentArea: "stldocs-content-area",
|
|
8
|
-
Markdown: "stldocs-markdown",
|
|
9
|
-
Content: "stldocs-content",
|
|
10
|
-
Truncation: "stldocs-truncation",
|
|
11
|
-
Expander: "stldocs-expander",
|
|
12
|
-
ExpanderContent: "stldocs-expander-content",
|
|
13
|
-
ExpanderSummary: "stldocs-expander-summary",
|
|
14
|
-
ExpanderSummaryIcon: "stldocs-expander-summary-icon",
|
|
15
|
-
ExpanderSummaryContent: "stldocs-expander-summary-content",
|
|
16
|
-
ExpanderIndent: "stldocs-expander-indent",
|
|
17
|
-
Badge: "stldocs-badge",
|
|
18
|
-
Icon: "stldocs-icon",
|
|
19
|
-
Tooltip: "stldocs-tooltip",
|
|
20
|
-
TooltipHost: "stldocs-tooltip-host",
|
|
21
|
-
TooltipContent: "stldocs-tooltip-content",
|
|
22
|
-
Input: "stldocs-input",
|
|
23
|
-
InputDisabled: "stldocs-input-disabled",
|
|
24
|
-
InputTextField: "stldocs-input-textfield",
|
|
25
|
-
MaskedInputWrapper: "stldocs-masked-input-wrapper",
|
|
26
|
-
MaskedInputDisplay: "stldocs-masked-input-display",
|
|
27
|
-
MaskedInputObscured: "stldocs-masked-input-obscured",
|
|
28
|
-
ToggleButton: "stldocs-togglebutton",
|
|
29
|
-
ListView: "stldocs-listview",
|
|
30
|
-
ListViewItem: "stldocs-listview-item",
|
|
31
|
-
ExpandToggle: "stldocs-expand-toggle",
|
|
32
|
-
ExpandToggleContent: "stldocs-expand-toggle-content",
|
|
33
|
-
LoadingSpinner: "stldocs-loading-spinner",
|
|
34
|
-
Type: "stldocs-type",
|
|
35
|
-
TypeName: "stldocs-typename",
|
|
36
|
-
TypeKeyword: "stldocs-type-keyword",
|
|
37
|
-
TypeString: "stldocs-type-string",
|
|
38
|
-
TypeArray: "stldocs-type-array",
|
|
39
|
-
TypeReference: "stldocs-type-reference",
|
|
40
|
-
TypeBracket: "stldocs-type-bracket",
|
|
41
|
-
TypeBrace: "stldocs-type-brace",
|
|
42
|
-
TypePropertyName: "stldocs-type-propertyname",
|
|
43
|
-
TypePlain: "stldocs-type-plain",
|
|
44
|
-
TypePreview: "stldocs-type-preview",
|
|
45
|
-
TypePreviewContent: "stldocs-type-preview-content",
|
|
46
|
-
LiteralString: "stldocs-literal-string",
|
|
47
|
-
LiteralNumeric: "stldocs-literal-numeric",
|
|
48
|
-
LiteralBoolean: "stldocs-literal-boolean",
|
|
49
|
-
Snippet: "stldocs-snippet",
|
|
50
|
-
SnippetCode: "stldocs-snippet-code",
|
|
51
|
-
SnippetFooter: "stldocs-snippet-footer",
|
|
52
|
-
SnippetRequest: "stldocs-snippet-request",
|
|
53
|
-
SnippetRequestTitle: "stldocs-snippet-request-title",
|
|
54
|
-
SnippetRequestTitleContent: "stldocs-snippet-request-title-content",
|
|
55
|
-
SnippetRequestTitleLabel: "stldocs-snippet-request-title-label",
|
|
56
|
-
SnippetRequestTitleLanguage: "stldocs-snippet-request-title-language",
|
|
57
|
-
SnippetRequestTitleMethod: "stldocs-snippet-request-title-method",
|
|
58
|
-
SnippetResponse: "stldocs-snippet-response",
|
|
59
|
-
SnippetMultiResponse: "stldocs-snippet-multi-response",
|
|
60
|
-
SnippetResponseOpen: "stldocs-snippet-response-opened",
|
|
61
|
-
SnippetResponseTab: "stldocs-snippet-response-tab",
|
|
62
|
-
SnippetResponseTabItem: "stldocs-snippet-response-tab-item",
|
|
63
|
-
SnippetResponseTabItemActive: "stldocs-snippet-response-tab-item-active",
|
|
64
|
-
SnippetResponseTabSingleReturn: "stldocs-snippet-response-tab-single-return",
|
|
65
|
-
SnippetResponsePane: "stldocs-snippet-response-pane",
|
|
66
|
-
SnippetResponsePaneActive: "stldocs-snippet-response-pane-active",
|
|
67
|
-
SnippetMulti: "stldocs-snippet-multi",
|
|
68
|
-
SnippetMultiTabs: "stldocs-snippet-multi-tabs",
|
|
69
|
-
SnippetMultiTab: "stldocs-snippet-multi-tab",
|
|
70
|
-
SnippetMultiContent: "stldocs-snippet-multi-content",
|
|
71
|
-
SnippetMultiPane: "stldocs-snippet-multi-pane",
|
|
72
|
-
SnippetMultiPaneActive: "stldocs-snippet-multi-pane-active",
|
|
73
|
-
Method: "stldocs-method",
|
|
74
|
-
MethodHeader: "stldocs-method-header",
|
|
75
|
-
MethodBody: "stldocs-method-body",
|
|
76
|
-
MethodInfo: "stldocs-method-info",
|
|
77
|
-
MethodInfoSection: "stldocs-method-info-section",
|
|
78
|
-
MethodExample: "stldocs-method-example",
|
|
79
|
-
MethodResponseColumn: "stldocs-method-response-column",
|
|
80
|
-
MethodTitle: "stldocs-method-title",
|
|
81
|
-
MethodBadges: "stldocs-method-badges",
|
|
82
|
-
MethodSignature: "stldocs-method-signature",
|
|
83
|
-
MethodDescription: "stldocs-method-description",
|
|
84
|
-
MethodParameters: "stldocs-method-parameters",
|
|
85
|
-
MethodReturns: "stldocs-method-returns",
|
|
86
|
-
MethodContent: "stldocs-method-content",
|
|
87
|
-
MethodContentColumn: "stldocs-method-content-column",
|
|
88
|
-
MethodRouteEndpoint: "stldocs-method-route-endpoint",
|
|
89
|
-
MethodRoute: "stldocs-method-route",
|
|
90
|
-
MethodSummary: "stldocs-method-summary",
|
|
91
|
-
MethodSinglePane: "stldocs-method-single-pane",
|
|
92
|
-
MethodDoublePane: "stldocs-method-double-pane",
|
|
93
|
-
MethodAvailableLanguages: "stldocs-method-available-languages",
|
|
94
|
-
SignatureTitle: "stldocs-signature-title",
|
|
95
|
-
SignatureName: "stldocs-signature-name",
|
|
96
|
-
SignatureQualified: "stldocs-signature-qualified",
|
|
97
|
-
SignatureParams: "stldoc-signature-params",
|
|
98
|
-
SignatureParen: "stldocs-signature-paren",
|
|
99
|
-
SignatureReturns: "stldocs-signature-returns",
|
|
100
|
-
TerraformResourceTitle: "stldocs-terraform-resource-title",
|
|
101
|
-
Property: "stldocs-property",
|
|
102
|
-
Properties: "stldocs-properties",
|
|
103
|
-
PropertyHeader: "stldocs-property-header",
|
|
104
|
-
PropertyInfo: "stldocs-property-info",
|
|
105
|
-
PropertyDeclaration: "stldocs-property-declaration",
|
|
106
|
-
PropertyDeprecated: "stldocs-property-deprecated",
|
|
107
|
-
PropertyDeprecatedMessage: "stldocs-property-deprecated-message",
|
|
108
|
-
PropertyContent: "stldocs-property-content",
|
|
109
|
-
PropertyChildren: "stldocs-property-children",
|
|
110
|
-
PropertyConstraints: "stldocs-property-constraints",
|
|
111
|
-
PropertyConstraint: "stldocs-property-constraint",
|
|
112
|
-
PropertyConstraintName: "stldocs-property-constraint-name",
|
|
113
|
-
PropertyConstraintValue: "stldocs-property-constraint-value",
|
|
114
|
-
PropertyDefault: "stldocs-property-default",
|
|
115
|
-
PropertyDescription: "stldocs-property-description",
|
|
116
|
-
PropertyTitle: "stldocs-property-title",
|
|
117
|
-
PropertyAnnotation: "stldocs-property-annotation",
|
|
118
|
-
PropertyName: "stldocs-property-name",
|
|
119
|
-
PropertyBadges: "stldocs-property-badges",
|
|
120
|
-
PropertyTypeName: "stldocs-property-typename",
|
|
121
|
-
PropertyType: "stldocs-property-type",
|
|
122
|
-
Overview: "stldocs-overview",
|
|
123
|
-
OverviewHeader: "stldocs-overview-header",
|
|
124
|
-
OverviewHeaderInfo: "stldocs-overview-header-info",
|
|
125
|
-
OverviewHeaderInfoTimestamp: "stldocs-overview-header-info-timestamp",
|
|
126
|
-
Resource: "stldocs-resource",
|
|
127
|
-
ResourceContent: "stldocs-resource-content",
|
|
128
|
-
ResourceContentProperties: "stldocs-resource-content-properties",
|
|
129
|
-
ResourceContentGroup: "stldocs-resource-content-group",
|
|
130
|
-
ResourceContentGroupName: "stldocs-resource-content-group-name",
|
|
131
|
-
ResourceContentGroupModelTitle: "stldocs-resource-content-group-model-title",
|
|
132
|
-
ResourceHeader: "stldocs-resource-header",
|
|
133
|
-
ResourceTitle: "stldocs-resource-title",
|
|
134
|
-
ResourceTitleSegment: "stldocs-resource-title-segment",
|
|
135
|
-
ResourceDescription: "stldocs-resource-description",
|
|
136
|
-
ResourceName: "stldocs-resource-name",
|
|
137
|
-
Model: "stldocs-model",
|
|
138
|
-
Root: "stldocs-root",
|
|
139
|
-
Sidebar: "stldocs-sidebar",
|
|
140
|
-
SidebarList: "stldocs-sidebar-list",
|
|
141
|
-
SidebarExpander: "stldocs-sidebar-expander",
|
|
142
|
-
SidebarExpanderSummary: "stldocs-sidebar-expander-summary",
|
|
143
|
-
SidebarExpanderContent: "stldocs-sidebar-expander-content",
|
|
144
|
-
SidebarEntry: "stldocs-sidebar-entry",
|
|
145
|
-
SidebarEntryLink: "stldocs-sidebar-entry-link",
|
|
146
|
-
SidebarEntryGroup: "stldocs-sidebar-entry-group",
|
|
147
|
-
SearchForm: "stldocs-search-form",
|
|
148
|
-
SearchModal: "stldocs-search-modal",
|
|
149
|
-
SearchFilter: "stldocs-search-filter",
|
|
150
|
-
SearchFilterLabel: "stldocs-search-filter-label",
|
|
151
|
-
SearchFilterCount: "stldocs-search-filter-count",
|
|
152
|
-
SearchBreadcrumb: "stldocs-search-breadcrumb",
|
|
153
|
-
SearchBreadcrumbItem: "stldocs-search-breadcrumb-item",
|
|
154
|
-
SearchBreadcrumbDivider: "stldocs-search-breadcrumb-divider",
|
|
155
|
-
SearchResult: "stldocs-search-result",
|
|
156
|
-
SearchResultResourceInfo: "stldocs-search-result-resource-info",
|
|
157
|
-
SearchResultResourceTitle: "stldocs-search-result-resource-title",
|
|
158
|
-
SearchResultResourcePath: "stldocs-search-result-resource-path",
|
|
159
|
-
SearchResultGuideTitle: "stldocs-search-result-guide-title",
|
|
160
|
-
SearchResultGuideExcerpt: "stldocs-search-result-guide-excerpt",
|
|
161
|
-
SearchDisabledStateContainer: "stldocs-search-disabled-state-container",
|
|
162
|
-
SearchModalCloseButton: "stldocs-search-modal-close-button",
|
|
163
|
-
LanguageBlock: "stldocs-language-block",
|
|
164
|
-
LanguageBlockContent: "stldocs-language-block-content",
|
|
165
|
-
LanguageBlockContentIcon: "stldocs-language-block-content-icon",
|
|
166
|
-
LanguageBlockContentInfo: "stldocs-language-block-content-info",
|
|
167
|
-
LanguageBlockContentInfoLanguage: "stldocs-language-block-content-info-language",
|
|
168
|
-
LanguageBlockContentInfoVersion: "stldocs-language-block-content-info-version",
|
|
169
|
-
LanguageBlockLinks: "stldocs-language-block-links",
|
|
170
|
-
LanguageBlockInstall: "stldocs-language-block-install",
|
|
171
|
-
Breadcrumbs: "stldocs-breadcrumbs",
|
|
172
|
-
BreadcrumbsItem: "stldocs-breadcrumbs-item",
|
|
173
|
-
BreadcrumbsLink: "stldocs-breadcrumbs-link",
|
|
174
|
-
BreadcrumbsNonLink: "stldocs-breadcrumbs-non-link"
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
//#endregion
|
|
178
|
-
export { style_default as t };
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { t as __exportAll } from "./chunk-BN_g-Awi.js";
|
|
2
|
-
import { i as useDeclaration } from "./docs-YgoQ3bzY.js";
|
|
3
|
-
import { n as useLanguageComponents } from "./contexts-_NNW5yqC.js";
|
|
4
|
-
import { t as useComponents } from "./use-components-BUz3GbO4.js";
|
|
5
|
-
import { t as style_default } from "./style-DJIYkFhO.js";
|
|
6
|
-
import "react";
|
|
7
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import clsx from "clsx";
|
|
9
|
-
import { Badge, Callout } from "@stainless-api/ui-primitives";
|
|
10
|
-
|
|
11
|
-
//#region src/languages/terraform.tsx
|
|
12
|
-
var terraform_exports = /* @__PURE__ */ __exportAll({
|
|
13
|
-
Declaration: () => Declaration,
|
|
14
|
-
MethodSignature: () => MethodSignature,
|
|
15
|
-
Property: () => Property,
|
|
16
|
-
Resource: () => Resource,
|
|
17
|
-
TerraformSource: () => TerraformSource,
|
|
18
|
-
Type: () => Type,
|
|
19
|
-
TypeName: () => TypeName
|
|
20
|
-
});
|
|
21
|
-
function TypeName({ type }) {
|
|
22
|
-
return /* @__PURE__ */ jsx(useLanguageComponents().Type, { type });
|
|
23
|
-
}
|
|
24
|
-
function Type({ type }) {
|
|
25
|
-
const Lang = useLanguageComponents();
|
|
26
|
-
const { Join } = useComponents();
|
|
27
|
-
switch (type.category) {
|
|
28
|
-
case "nested": switch (type.type) {
|
|
29
|
-
case "ListNested":
|
|
30
|
-
case "MapNested":
|
|
31
|
-
case "SetNested": return /* @__PURE__ */ jsxs("span", {
|
|
32
|
-
className: style_default.Type,
|
|
33
|
-
children: [
|
|
34
|
-
/* @__PURE__ */ jsx("span", {
|
|
35
|
-
className: style_default.TypeArray,
|
|
36
|
-
children: type.type.replace("Nested", "")
|
|
37
|
-
}),
|
|
38
|
-
/* @__PURE__ */ jsx("span", {
|
|
39
|
-
className: style_default.TypeBracket,
|
|
40
|
-
children: "["
|
|
41
|
-
}),
|
|
42
|
-
/* @__PURE__ */ jsx("span", {
|
|
43
|
-
className: style_default.TypeReference,
|
|
44
|
-
children: "Attributes"
|
|
45
|
-
}),
|
|
46
|
-
/* @__PURE__ */ jsx("span", {
|
|
47
|
-
className: style_default.TypeBracket,
|
|
48
|
-
children: "]"
|
|
49
|
-
})
|
|
50
|
-
]
|
|
51
|
-
});
|
|
52
|
-
case "SingleNested": return /* @__PURE__ */ jsx("span", {
|
|
53
|
-
className: style_default.Type,
|
|
54
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
55
|
-
className: style_default.TypeReference,
|
|
56
|
-
children: "Attributes"
|
|
57
|
-
})
|
|
58
|
-
});
|
|
59
|
-
default: return;
|
|
60
|
-
}
|
|
61
|
-
case "collection": return /* @__PURE__ */ jsxs("span", {
|
|
62
|
-
className: style_default.Type,
|
|
63
|
-
children: [
|
|
64
|
-
/* @__PURE__ */ jsx("span", {
|
|
65
|
-
className: style_default.TypeArray,
|
|
66
|
-
children: type.type
|
|
67
|
-
}),
|
|
68
|
-
/* @__PURE__ */ jsx("span", {
|
|
69
|
-
className: style_default.TypeBracket,
|
|
70
|
-
children: "["
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ jsx(Lang.Type, { type: type.elementType }),
|
|
73
|
-
/* @__PURE__ */ jsx("span", {
|
|
74
|
-
className: style_default.TypeBracket,
|
|
75
|
-
children: "]"
|
|
76
|
-
})
|
|
77
|
-
]
|
|
78
|
-
});
|
|
79
|
-
case "dynamic": {
|
|
80
|
-
const subtypes = type.allowedSubtypes.length > 0 ? /* @__PURE__ */ jsx(Join, {
|
|
81
|
-
items: type.allowedSubtypes,
|
|
82
|
-
children: " | "
|
|
83
|
-
}) : null;
|
|
84
|
-
return /* @__PURE__ */ jsx("span", {
|
|
85
|
-
className: style_default.Type,
|
|
86
|
-
children: /* @__PURE__ */ jsxs("span", {
|
|
87
|
-
className: style_default.TypeKeyword,
|
|
88
|
-
children: ["Dynamic ", subtypes]
|
|
89
|
-
})
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
case "primitive":
|
|
93
|
-
if (type.type === "String") return /* @__PURE__ */ jsx("span", {
|
|
94
|
-
className: style_default.Type,
|
|
95
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
96
|
-
className: style_default.TypeString,
|
|
97
|
-
children: "String"
|
|
98
|
-
})
|
|
99
|
-
});
|
|
100
|
-
return /* @__PURE__ */ jsx("span", {
|
|
101
|
-
className: style_default.Type,
|
|
102
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
103
|
-
className: style_default.TypeKeyword,
|
|
104
|
-
children: type.type
|
|
105
|
-
})
|
|
106
|
-
});
|
|
107
|
-
case "unknown": return /* @__PURE__ */ jsx("span", {
|
|
108
|
-
className: style_default.Type,
|
|
109
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
110
|
-
className: style_default.TypeKeyword,
|
|
111
|
-
children: "JSON"
|
|
112
|
-
})
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
function MethodSignature() {
|
|
117
|
-
return null;
|
|
118
|
-
}
|
|
119
|
-
const PropGroups = [
|
|
120
|
-
"required",
|
|
121
|
-
"optional",
|
|
122
|
-
"computed"
|
|
123
|
-
];
|
|
124
|
-
function Property({ decl, children }) {
|
|
125
|
-
if (!decl) return null;
|
|
126
|
-
switch (decl.kind) {
|
|
127
|
-
case "TerraformDeclAttribute": return children({ name: decl.name });
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
function TerraformSource({ path, group }) {
|
|
131
|
-
const Docs = useComponents();
|
|
132
|
-
const decl = useDeclaration(path, true);
|
|
133
|
-
if (decl.kind !== "TerraformDeclSource") return;
|
|
134
|
-
const type = decl.type === "resource" ? "resource" : "data";
|
|
135
|
-
const badge = type === "resource" ? `success` : `note`;
|
|
136
|
-
const children = PropGroups.filter((section) => decl[section].length > 0).map((section) => {
|
|
137
|
-
const propGroupId = `${decl.name}-${section}-${group}`;
|
|
138
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
139
|
-
className: style_default.ResourceContentGroup,
|
|
140
|
-
children: [/* @__PURE__ */ jsxs("h5", {
|
|
141
|
-
className: style_default.ResourceContentGroupModelTitle,
|
|
142
|
-
children: [
|
|
143
|
-
section,
|
|
144
|
-
" ",
|
|
145
|
-
/* @__PURE__ */ jsx(Docs.PropertyToggle, { target: propGroupId })
|
|
146
|
-
]
|
|
147
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
148
|
-
className: style_default.ResourceContentProperties,
|
|
149
|
-
"data-stldocs-property-group": propGroupId,
|
|
150
|
-
children: /* @__PURE__ */ jsx(Docs.SDKChildren, { paths: decl[section] })
|
|
151
|
-
})]
|
|
152
|
-
}, section);
|
|
153
|
-
});
|
|
154
|
-
return /* @__PURE__ */ jsx("div", {
|
|
155
|
-
className: clsx(style_default.Method, style_default.MethodDoublePane),
|
|
156
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
157
|
-
className: style_default.MethodBody,
|
|
158
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
159
|
-
className: style_default.MethodContentColumn,
|
|
160
|
-
children: [/* @__PURE__ */ jsxs("h4", {
|
|
161
|
-
className: style_default.TerraformResourceTitle,
|
|
162
|
-
children: [
|
|
163
|
-
/* @__PURE__ */ jsx(Badge, {
|
|
164
|
-
intent: badge,
|
|
165
|
-
children: type
|
|
166
|
-
}),
|
|
167
|
-
" ",
|
|
168
|
-
decl.name
|
|
169
|
-
]
|
|
170
|
-
}), children]
|
|
171
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
172
|
-
className: clsx(style_default.MethodExample, "not-content", "stl-ui-not-prose"),
|
|
173
|
-
children: /* @__PURE__ */ jsx(Docs.SDKExample, { method: {
|
|
174
|
-
title: decl.name,
|
|
175
|
-
stainlessPath: path
|
|
176
|
-
} })
|
|
177
|
-
})]
|
|
178
|
-
})
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
function Declaration({ decl }) {
|
|
182
|
-
const Lang = useLanguageComponents();
|
|
183
|
-
if (!decl) return;
|
|
184
|
-
switch (decl.kind) {
|
|
185
|
-
case "TerraformDeclAttribute": {
|
|
186
|
-
const isOptional = decl.configurability === "optional" || decl.configurability === "computed_optional";
|
|
187
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
188
|
-
/* @__PURE__ */ jsx("span", {
|
|
189
|
-
className: style_default.TextIdentifier,
|
|
190
|
-
children: decl.name
|
|
191
|
-
}),
|
|
192
|
-
isOptional && /* @__PURE__ */ jsx("span", {
|
|
193
|
-
className: style_default.TextPunctuation,
|
|
194
|
-
children: "?"
|
|
195
|
-
}),
|
|
196
|
-
/* @__PURE__ */ jsx("span", {
|
|
197
|
-
className: style_default.TextPunctuation,
|
|
198
|
-
children: ": "
|
|
199
|
-
}),
|
|
200
|
-
/* @__PURE__ */ jsx("span", {
|
|
201
|
-
className: style_default.TextKeyword,
|
|
202
|
-
children: /* @__PURE__ */ jsx(Lang.Type, { type: decl.type })
|
|
203
|
-
})
|
|
204
|
-
] });
|
|
205
|
-
}
|
|
206
|
-
case "TerraformDeclServiceNode": {
|
|
207
|
-
const { resource, dataSource, listDataSource } = decl;
|
|
208
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
209
|
-
className: style_default.Method,
|
|
210
|
-
children: [
|
|
211
|
-
resource && /* @__PURE__ */ jsx(TerraformSource, {
|
|
212
|
-
path: resource,
|
|
213
|
-
group: "resource"
|
|
214
|
-
}),
|
|
215
|
-
dataSource && /* @__PURE__ */ jsx(TerraformSource, {
|
|
216
|
-
path: dataSource,
|
|
217
|
-
group: "dataSource"
|
|
218
|
-
}),
|
|
219
|
-
listDataSource && /* @__PURE__ */ jsx(TerraformSource, {
|
|
220
|
-
path: listDataSource,
|
|
221
|
-
group: "listDataSource"
|
|
222
|
-
})
|
|
223
|
-
]
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
function Resource({ resource }) {
|
|
229
|
-
const Lang = useLanguageComponents();
|
|
230
|
-
const decl = useDeclaration(resource.stainlessPath, false);
|
|
231
|
-
if (decl) return /* @__PURE__ */ jsx(Lang.Declaration, { decl });
|
|
232
|
-
return /* @__PURE__ */ jsxs(Callout, {
|
|
233
|
-
variant: "warning",
|
|
234
|
-
children: [
|
|
235
|
-
"The resource ",
|
|
236
|
-
/* @__PURE__ */ jsx("code", { children: resource.name }),
|
|
237
|
-
" is not supported in Terraform."
|
|
238
|
-
]
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
//#endregion
|
|
243
|
-
export { TerraformSource as a, terraform_exports as c, Resource as i, MethodSignature as n, Type as o, Property as r, TypeName as s, Declaration as t };
|