@stainless-api/docs-ui 0.1.0-beta.71 → 0.1.0-beta.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/{breadcrumbs-Cvm5Ifm7.d.ts → breadcrumbs-Dei_5sHd.d.ts} +3 -3
  2. package/dist/{breadcrumbs-DA4WgDhR.js → breadcrumbs-oUp-6oJK.js} +3 -3
  3. package/dist/{cli-DhMMZoiU.js → cli-BX9ofVCR.js} +3 -3
  4. package/dist/{component-Drp93QK-.js → component-Dl5ZEHxB.js} +2 -2
  5. package/dist/{component-generics-t_S0Wc9i.d.ts → component-generics-C9ALAcZI.d.ts} +2 -2
  6. package/dist/components/MaskedInput.d.ts +3 -3
  7. package/dist/components/MaskedInput.js +1 -1
  8. package/dist/components/breadcrumbs.d.ts +1 -1
  9. package/dist/components/breadcrumbs.js +5 -5
  10. package/dist/components/icons.d.ts +12 -12
  11. package/dist/components/index.d.ts +14 -11
  12. package/dist/components/index.js +14 -14
  13. package/dist/components/method.d.ts +1 -1
  14. package/dist/components/method.js +5 -5
  15. package/dist/components/overview.d.ts +1 -1
  16. package/dist/components/overview.js +6 -6
  17. package/dist/components/primitives.d.ts +1 -1
  18. package/dist/components/primitives.js +4 -4
  19. package/dist/components/properties.d.ts +1 -1
  20. package/dist/components/properties.js +4 -4
  21. package/dist/components/sdk-sidebar.d.ts +1 -1
  22. package/dist/components/sdk-sidebar.js +5 -5
  23. package/dist/components/sdk.d.ts +1 -1
  24. package/dist/components/sdk.js +4 -4
  25. package/dist/components/snippets.d.ts +14 -3
  26. package/dist/components/snippets.js +5 -5
  27. package/dist/components/stl-sidebar.d.ts +1 -1
  28. package/dist/components/stl-sidebar.js +1 -1
  29. package/dist/{components-BbJAAdUU.js → components-DQPlXEwE.js} +10 -9
  30. package/dist/contexts/component-generics.d.ts +1 -1
  31. package/dist/contexts/component-types.d.ts +13 -11
  32. package/dist/contexts/component.d.ts +15 -14
  33. package/dist/contexts/component.js +24 -24
  34. package/dist/contexts/docs.d.ts +2 -2
  35. package/dist/contexts/docs.js +2 -2
  36. package/dist/contexts/index.d.ts +14 -23
  37. package/dist/contexts/index.js +4 -4
  38. package/dist/contexts/markdown.d.ts +1 -1
  39. package/dist/contexts/markdown.js +2 -2
  40. package/dist/contexts/navigation.d.ts +1 -1
  41. package/dist/contexts/use-components.d.ts +13 -10
  42. package/dist/{contexts-CVj20VV4.js → contexts-_NNW5yqC.js} +5 -2
  43. package/dist/{csharp-D6_jlynY.js → csharp-sn5CJu9t.js} +2 -2
  44. package/dist/docs-YgoQ3bzY.js +81 -0
  45. package/dist/{docs-CceV-0oK.d.ts → docs-x-kfjRMc.d.ts} +24 -6
  46. package/dist/{go-COaHV3Hc.js → go-BoaAVmP0.js} +2 -2
  47. package/dist/{http-DVyJ-D6t.js → http-Ccj1dOvE.js} +7 -7
  48. package/dist/{index-CwjGm9zX.d.ts → index-HDt5wRiR.d.ts} +47 -32
  49. package/dist/index-OCM-LZIo.d.ts +428 -0
  50. package/dist/index.d.ts +14 -17
  51. package/dist/index.js +26 -26
  52. package/dist/{java-CxGSJVvv.js → java-BiLRuLuD.js} +3 -3
  53. package/dist/languages/cli.d.ts +13 -11
  54. package/dist/languages/cli.js +15 -15
  55. package/dist/languages/csharp.d.ts +13 -11
  56. package/dist/languages/csharp.js +4 -4
  57. package/dist/languages/go.d.ts +13 -11
  58. package/dist/languages/go.js +4 -4
  59. package/dist/languages/http.d.ts +13 -11
  60. package/dist/languages/http.js +14 -14
  61. package/dist/languages/index.d.ts +13 -11
  62. package/dist/languages/index.js +23 -23
  63. package/dist/languages/java.d.ts +13 -11
  64. package/dist/languages/java.js +4 -4
  65. package/dist/languages/python.d.ts +13 -11
  66. package/dist/languages/python.js +4 -4
  67. package/dist/languages/ruby.d.ts +13 -11
  68. package/dist/languages/ruby.js +4 -4
  69. package/dist/languages/terraform.d.ts +13 -11
  70. package/dist/languages/terraform.js +4 -4
  71. package/dist/languages/typescript.d.ts +13 -11
  72. package/dist/languages/typescript.js +4 -4
  73. package/dist/languages-COjc0Nwx.js +30 -0
  74. package/dist/markdown/index.d.ts +2 -2
  75. package/dist/markdown/index.js +24 -24
  76. package/dist/markdown/printer.d.ts +2 -2
  77. package/dist/markdown/printer.js +25 -25
  78. package/dist/markdown/utils.d.ts +4 -4
  79. package/dist/markdown/utils.js +3 -3
  80. package/dist/{markdown-HJXGh2Yn.d.ts → markdown-BszOPZhh.d.ts} +2 -2
  81. package/dist/{markdown-CTKHMLVr.js → markdown-Cq3XEhrR.js} +1 -1
  82. package/dist/{method-iAV6cZjF.js → method-DjzVBzZe.js} +2 -2
  83. package/dist/{method-DPnfsySL.d.ts → method-KkWyhvKa.d.ts} +6 -6
  84. package/dist/{navigation-QXH2ufM3.d.ts → navigation-BZjwfN2P.d.ts} +3 -3
  85. package/dist/{overview-BR3WhCoz.d.ts → overview-BNmMeDUE.d.ts} +7 -7
  86. package/dist/{overview-DQIrvYJr.js → overview-Clq5psZe.js} +7 -7
  87. package/dist/{primitives-D0h4FgbU.d.ts → primitives-B8OnSXRP.d.ts} +11 -11
  88. package/dist/{primitives-DJEqe_r1.js → primitives-BBUs_flm.js} +4 -4
  89. package/dist/{properties-CjUi1Cjx.d.ts → properties-BhlRtWo4.d.ts} +5 -5
  90. package/dist/{properties-PNuJPLqP.js → properties-DQU0NBzb.js} +2 -2
  91. package/dist/{python-DsTuWCKE.js → python-nqOBH7GS.js} +2 -2
  92. package/dist/{routing-C64k4fmX.js → routing-GvhEMw6E.js} +1 -1
  93. package/dist/{routing-utiR5mY3.d.ts → routing-qJMPICGo.d.ts} +2 -2
  94. package/dist/routing.d.ts +1 -1
  95. package/dist/routing.js +1 -1
  96. package/dist/{ruby-BncKp6hd.js → ruby-BBc8HdIt.js} +3 -3
  97. package/dist/{sdk-D3U444dU.d.ts → sdk-C8C6IRQp.d.ts} +17 -17
  98. package/dist/{sdk-Bw99eXxA.js → sdk-DzCHhEoX.js} +14 -8
  99. package/dist/{sdk-sidebar-V_MTkVw8.js → sdk-sidebar-CkjSLggl.js} +2 -2
  100. package/dist/{sdk-sidebar-f7SS4xxq.d.ts → sdk-sidebar-lgNmf-ns.d.ts} +3 -3
  101. package/dist/snippets-CLpNVNlA.js +181 -0
  102. package/dist/spec.d.ts +4 -4
  103. package/dist/spec.js +3 -3
  104. package/dist/{stl-sidebar-CItXFC3n.d.ts → stl-sidebar-8jF9cdnn.d.ts} +2 -2
  105. package/dist/{stl-sidebar-WtimNrk1.js → stl-sidebar-DC5UOJiT.js} +1 -1
  106. package/dist/{style-HpXpcJ9v.js → style-DJIYkFhO.js} +6 -0
  107. package/dist/style.d.ts +6 -0
  108. package/dist/style.js +1 -1
  109. package/dist/styles/main.css +53 -14
  110. package/dist/styles.css +53 -14
  111. package/dist/{terraform-B95X4rNK.js → terraform-DVx2ea2h.js} +3 -3
  112. package/dist/{typescript-n46M9OtL.js → typescript-Cmk-jBBw.js} +3 -3
  113. package/dist/{utils-DPbkW1Tz.js → utils-D6zJxUZ9.js} +1 -1
  114. package/dist/utils.d.ts +1 -1
  115. package/dist/utils.js +1 -1
  116. package/package.json +2 -2
  117. package/dist/breadcrumbs-7G1MoVzo.d.ts +0 -25
  118. package/dist/component-generics-5cSjFCLn.d.ts +0 -30
  119. package/dist/docs---kdT2w-.d.ts +0 -48
  120. package/dist/docs-BmOB2f-I.js +0 -61
  121. package/dist/index-Bc1tYWPC.d.ts +0 -347
  122. package/dist/index-Cuw1pZs8.d.ts +0 -16
  123. package/dist/index-DIchpgQZ.d.ts +0 -16
  124. package/dist/index-DSeLOs29.d.ts +0 -347
  125. package/dist/languages-C8iNdbjN.js +0 -30
  126. package/dist/markdown-Cdh0TSHp.d.ts +0 -22
  127. package/dist/method-R97dH39J.d.ts +0 -59
  128. package/dist/navigation-dh0gX_lm.d.ts +0 -29
  129. package/dist/overview-Ddh84S6_.d.ts +0 -39
  130. package/dist/primitives-xbTKYFgQ.d.ts +0 -105
  131. package/dist/properties-q3XaAaRo.d.ts +0 -54
  132. package/dist/sdk-CSKStkB5.d.ts +0 -122
  133. package/dist/sdk-sidebar-Cf04O8rR.d.ts +0 -15
  134. package/dist/snippets-BehbU3rt.js +0 -164
  135. package/dist/snippets-CMtWGDSE.d.ts +0 -53
  136. package/dist/snippets-DZAozdda.d.ts +0 -53
  137. package/dist/stl-sidebar-DpnXVa_V.d.ts +0 -58
@@ -1,122 +0,0 @@
1
- import { c as ID, d as Method, f as Model, g as SnippetLanguage, o as HasStainlessPath, t as BaseDeclaration } from "./index-CwjGm9zX.js";
2
- import { t as DocsLanguage } from "./routing-utiR5mY3.js";
3
- import * as React$1 from "react";
4
- import * as react_jsx_runtime48 from "react/jsx-runtime";
5
-
6
- //#region src/components/sdk.d.ts
7
- type PropertyModelContextType = {
8
- modelPath?: string;
9
- propertyPath?: string;
10
- };
11
- declare const PropertyModelContext: React$1.Context<PropertyModelContextType>;
12
- declare function usePropertyModel(): PropertyModelContextType;
13
- type ReferenceNestingContextType = string[];
14
- declare const ReferenceNestingContext: React$1.Context<ReferenceNestingContextType>;
15
- declare function useReferenceNesting(): ReferenceNestingContextType;
16
- type SDKSnippetLanguagesType = Record<SnippetLanguage, {
17
- name: string;
18
- }>;
19
- declare const SDKSnippetLanguages: SDKSnippetLanguagesType;
20
- type TransformRequestSnippetFn = ({
21
- snippet,
22
- language
23
- }: {
24
- snippet: string;
25
- language: DocsLanguage;
26
- }) => string;
27
- type SDKChildrenProps = {
28
- paths: ID[];
29
- expand?: boolean;
30
- depth?: number;
31
- };
32
- declare function SDKChildren({
33
- paths,
34
- expand,
35
- depth
36
- }: SDKChildrenProps): react_jsx_runtime48.JSX.Element;
37
- type SDKDeclarationProps = {
38
- path: string;
39
- expand?: boolean;
40
- depth?: number;
41
- };
42
- declare function SDKDeclaration({
43
- path,
44
- expand,
45
- depth
46
- }: SDKDeclarationProps): react_jsx_runtime48.JSX.Element;
47
- type SDKConstraintsProps = {
48
- constraints?: Record<string, any>;
49
- };
50
- declare function SDKConstraints({
51
- constraints
52
- }: SDKConstraintsProps): react_jsx_runtime48.JSX.Element | undefined;
53
- type SDKIconProps = {
54
- language: SnippetLanguage;
55
- size?: number;
56
- };
57
- declare function SDKIcon({
58
- language
59
- }: SDKIconProps): react_jsx_runtime48.JSX.Element | null;
60
- type SDKRequestTitleProps = {
61
- snippetLanguage: SnippetLanguage;
62
- };
63
- declare function SDKRequestTitle({
64
- snippetLanguage
65
- }: SDKRequestTitleProps): react_jsx_runtime48.JSX.Element;
66
- type SDKExampleProps = {
67
- method: Partial<Method> & HasStainlessPath;
68
- transformRequestSnippet?: TransformRequestSnippetFn;
69
- };
70
- declare function SDKExample({
71
- method,
72
- transformRequestSnippet
73
- }: SDKExampleProps): react_jsx_runtime48.JSX.Element;
74
- type SDKMethodProps = {
75
- method: Method;
76
- transformRequestSnippet?: TransformRequestSnippetFn;
77
- };
78
- declare function SDKMethodHeader({
79
- method
80
- }: SDKMethodProps): react_jsx_runtime48.JSX.Element;
81
- declare function useStreamingResponse(method: BaseDeclaration): ID | undefined;
82
- declare function SDKMethodInfo({
83
- method
84
- }: SDKMethodProps): react_jsx_runtime48.JSX.Element;
85
- declare function SDKMethodNotImplemented({
86
- method
87
- }: SDKMethodProps): react_jsx_runtime48.JSX.Element;
88
- declare function SDKMethod({
89
- method,
90
- transformRequestSnippet
91
- }: SDKMethodProps): react_jsx_runtime48.JSX.Element;
92
- type SDKModelProps = {
93
- model: Model;
94
- };
95
- declare function SDKModel({
96
- model
97
- }: SDKModelProps): react_jsx_runtime48.JSX.Element | null;
98
- type SDKReferenceProps = {
99
- stainlessPath: string;
100
- children?: React$1.ReactNode;
101
- };
102
- declare function SDKReference({
103
- stainlessPath,
104
- children
105
- }: SDKReferenceProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime48.JSX.Element | null | undefined;
106
- type SDKLanguageBlockProps = {
107
- language: DocsLanguage;
108
- version: string;
109
- install: string;
110
- links: {
111
- repo: string;
112
- docs: string;
113
- };
114
- };
115
- declare function SDKLanguageBlock({
116
- language,
117
- version,
118
- install,
119
- links
120
- }: SDKLanguageBlockProps): react_jsx_runtime48.JSX.Element;
121
- //#endregion
122
- export { SDKSnippetLanguagesType as C, useStreamingResponse as D, useReferenceNesting as E, SDKSnippetLanguages as S, usePropertyModel as T, SDKModel as _, SDKChildren as a, SDKRequestTitle as b, SDKDeclaration as c, SDKLanguageBlock as d, SDKMethod as f, SDKMethodProps as g, SDKMethodNotImplemented as h, ReferenceNestingContextType as i, SDKExample as l, SDKMethodInfo as m, PropertyModelContextType as n, SDKConstraints as o, SDKMethodHeader as p, ReferenceNestingContext as r, SDKConstraintsProps as s, PropertyModelContext as t, SDKIcon as u, SDKModelProps as v, TransformRequestSnippetFn as w, SDKRequestTitleProps as x, SDKReference as y };
@@ -1,15 +0,0 @@
1
- import { m as Resource } from "./index-CwjGm9zX.js";
2
- import * as react_jsx_runtime58 from "react/jsx-runtime";
3
-
4
- //#region src/components/sdk-sidebar.d.ts
5
- type SDKSidebarProps = {
6
- resources: Resource[];
7
- };
8
- /**
9
- * Given some SDKJSON.Resources, calls into StlSidebar with the appropriate sidebar entries.
10
- */
11
- declare function SDKSidebar({
12
- resources
13
- }: SDKSidebarProps): react_jsx_runtime58.JSX.Element;
14
- //#endregion
15
- export { SDKSidebarProps as n, SDKSidebar as t };
@@ -1,164 +0,0 @@
1
- import { i as useDeclaration, s as useLanguage, u as useSnippet } from "./docs-BmOB2f-I.js";
2
- import { r as useHighlight } from "./markdown-CTKHMLVr.js";
3
- import { t as useComponents } from "./use-components-BUz3GbO4.js";
4
- import { t as style_default } from "./style-HpXpcJ9v.js";
5
- import * as React$1 from "react";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- import clsx from "clsx";
8
- import { CheckIcon, CircleAlertIcon, CopyIcon } from "lucide-react";
9
- import { Badge, Button, getHttpMethod } from "@stainless-api/ui-primitives";
10
-
11
- //#region src/components/snippets.tsx
12
- function SnippetCode({ content, language }) {
13
- const lang = useLanguage();
14
- const highlighted = useHighlight(content, language || lang);
15
- return /* @__PURE__ */ jsx("div", {
16
- className: style_default.SnippetCode,
17
- "data-stldocs-copy-content": true,
18
- dangerouslySetInnerHTML: { __html: highlighted }
19
- });
20
- }
21
- function SnippetContainer({ children }) {
22
- return /* @__PURE__ */ jsx("div", {
23
- className: clsx(style_default.Snippet),
24
- children
25
- });
26
- }
27
- function SnippetRequestContainer({ children }) {
28
- return /* @__PURE__ */ jsx("div", { children });
29
- }
30
- function Snippet({ requestTitle, method, transformRequestSnippet }) {
31
- const Docs = useComponents();
32
- const language = useLanguage();
33
- const originalSnippet = useSnippet(method.stainlessPath, void 0, language === "http" ? "curl" : "default");
34
- const decl = useDeclaration(method.stainlessPath, false);
35
- if (!originalSnippet) {
36
- console.warn(`Snippet not found for method '${method.stainlessPath}'`);
37
- return null;
38
- }
39
- const signature = decl && "qualified" in decl ? decl.qualified : void 0;
40
- const responses = method.exampleResponses;
41
- const snippet = transformRequestSnippet ? transformRequestSnippet({
42
- snippet: originalSnippet,
43
- language
44
- }) : originalSnippet;
45
- const httpMethod = getHttpMethod(method.httpMethod);
46
- return /* @__PURE__ */ jsxs(Docs.SnippetContainer, {
47
- signature,
48
- method,
49
- children: [snippet && /* @__PURE__ */ jsx(Docs.SnippetRequestContainer, {
50
- signature,
51
- children: /* @__PURE__ */ jsxs("div", {
52
- className: style_default.SnippetRequest,
53
- "data-stldocs-copy-parent": true,
54
- children: [
55
- /* @__PURE__ */ jsxs("div", {
56
- className: style_default.SnippetRequestTitle,
57
- children: [
58
- /* @__PURE__ */ jsxs("div", {
59
- className: style_default.SnippetRequestTitleMethod,
60
- children: [httpMethod && /* @__PURE__ */ jsx(Badge.HTTP, {
61
- method: httpMethod,
62
- iconOnly: true
63
- }), /* @__PURE__ */ jsx("h3", { children: method.summary || method.title })]
64
- }),
65
- /* @__PURE__ */ jsx("div", {
66
- className: style_default.SnippetRequestTitleContent,
67
- children: requestTitle
68
- }),
69
- /* @__PURE__ */ jsx(Docs.SnippetButtons, { content: snippet })
70
- ]
71
- }),
72
- /* @__PURE__ */ jsx(Docs.SnippetCode, {
73
- content: snippet,
74
- signature
75
- }),
76
- /* @__PURE__ */ jsx(Docs.SnippetFooter, {})
77
- ]
78
- })
79
- }), responses && /* @__PURE__ */ jsx(Docs.SnippetResponse, { responses })]
80
- });
81
- }
82
- function SnippetButtons({ content }) {
83
- const [CopyButtonIcon, setCopyIcon] = React$1.useState(CopyIcon);
84
- async function handleCopy() {
85
- try {
86
- await navigator.clipboard.writeText(content);
87
- setCopyIcon(CheckIcon);
88
- } catch {
89
- setCopyIcon(CircleAlertIcon);
90
- }
91
- setTimeout(() => setCopyIcon(CopyIcon), 1e3);
92
- }
93
- return /* @__PURE__ */ jsx(Button, {
94
- variant: "outline",
95
- "data-stldocs-snippet-copy": true,
96
- children: /* @__PURE__ */ jsx(CopyButtonIcon, {
97
- size: 16,
98
- className: style_default.Icon,
99
- onClick: handleCopy
100
- })
101
- });
102
- }
103
- function SnippetFooter() {
104
- return null;
105
- }
106
- function SnippetResponse({ responses }) {
107
- const { SnippetCode } = useComponents();
108
- if (!responses) return null;
109
- const mappedResponses = Object.keys(responses).map((key) => {
110
- const responseContent = responses[key];
111
- if (!responseContent) return null;
112
- const responseType = Object.keys(responseContent)[0];
113
- if (!responseType) return null;
114
- const response = responseContent[responseType];
115
- if (!response) return null;
116
- const examples = response?.examples;
117
- if (!examples) return null;
118
- const exampleType = Object.keys(examples)[0];
119
- if (!exampleType) return null;
120
- let value = examples[exampleType]?.value;
121
- if (!value) return null;
122
- let language = "none";
123
- if (responseType === "application/json" || typeof value === "object") {
124
- language = "json";
125
- value = JSON.stringify(value, null, 2);
126
- }
127
- return {
128
- language,
129
- responseCode: key,
130
- content: value
131
- };
132
- }).filter(Boolean);
133
- if (mappedResponses.length === 0) return null;
134
- return /* @__PURE__ */ jsx("div", {
135
- className: style_default.SnippetMultiResponse,
136
- children: /* @__PURE__ */ jsxs("div", {
137
- className: clsx(style_default.Snippet),
138
- children: [/* @__PURE__ */ jsx("div", {
139
- className: clsx(style_default.SnippetResponseTab, mappedResponses.length === 1 && style_default.SnippetResponseTabSingleReturn),
140
- children: mappedResponses.map(({ responseCode }, index) => /* @__PURE__ */ jsx("div", {
141
- "data-snippet-response-tab-id": `snippet-response-tab-${responseCode}-${index}`,
142
- className: clsx(style_default.SnippetResponseTabItem, index === 0 && style_default.SnippetResponseTabItemActive),
143
- children: /* @__PURE__ */ jsxs(Button, {
144
- disabled: mappedResponses.length === 1,
145
- variant: "ghost",
146
- children: [responseCode, " example"]
147
- })
148
- }, `snippet-response-tab-item-${responseCode}-${index}`))
149
- }), mappedResponses.map(({ responseCode, content, language }, index) => {
150
- return /* @__PURE__ */ jsx("div", {
151
- className: clsx(style_default.SnippetResponsePane, index === 0 && style_default.SnippetResponsePaneActive),
152
- "data-snippet-response-pane-id": `snippet-response-tab-${responseCode}-${index}`,
153
- children: /* @__PURE__ */ jsx(SnippetCode, {
154
- content,
155
- language
156
- })
157
- }, `snippet-response-${responseCode}-${index}`);
158
- })]
159
- })
160
- });
161
- }
162
-
163
- //#endregion
164
- export { SnippetFooter as a, SnippetContainer as i, SnippetButtons as n, SnippetRequestContainer as o, SnippetCode as r, SnippetResponse as s, Snippet as t };
@@ -1,53 +0,0 @@
1
- import { d as Method, o as HasStainlessPath } from "./index-CwjGm9zX.js";
2
- import { w as TransformRequestSnippetFn } from "./sdk-D3U444dU.js";
3
- import * as React$1 from "react";
4
- import * as react_jsx_runtime72 from "react/jsx-runtime";
5
-
6
- //#region src/components/snippets.d.ts
7
- type SnippetCodeProps = {
8
- content: string;
9
- signature?: string;
10
- language?: string;
11
- };
12
- declare function SnippetCode({
13
- content,
14
- language
15
- }: SnippetCodeProps): react_jsx_runtime72.JSX.Element;
16
- type SnippetProps = {
17
- method: Partial<Method> & HasStainlessPath;
18
- requestTitle?: React$1.ReactNode;
19
- transformRequestSnippet?: TransformRequestSnippetFn;
20
- };
21
- type SnippetContainerProps = {
22
- method: Partial<Method> & HasStainlessPath;
23
- children: React$1.ReactNode;
24
- signature?: string;
25
- };
26
- declare function SnippetContainer({
27
- children
28
- }: SnippetContainerProps): react_jsx_runtime72.JSX.Element;
29
- type SnippetRequestContainerProps = {
30
- children?: React$1.ReactNode;
31
- signature?: string;
32
- };
33
- declare function SnippetRequestContainer({
34
- children
35
- }: SnippetRequestContainerProps): react_jsx_runtime72.JSX.Element;
36
- declare function Snippet({
37
- requestTitle,
38
- method,
39
- transformRequestSnippet
40
- }: SnippetProps): react_jsx_runtime72.JSX.Element | null;
41
- declare function SnippetButtons({
42
- content
43
- }: {
44
- content: string;
45
- }): react_jsx_runtime72.JSX.Element;
46
- declare function SnippetFooter(): React$1.ReactNode;
47
- declare function SnippetResponse({
48
- responses
49
- }: {
50
- responses: Method['exampleResponses'];
51
- }): react_jsx_runtime72.JSX.Element | null;
52
- //#endregion
53
- export { SnippetContainer as a, SnippetProps as c, SnippetResponse as d, SnippetCodeProps as i, SnippetRequestContainer as l, SnippetButtons as n, SnippetContainerProps as o, SnippetCode as r, SnippetFooter as s, Snippet as t, SnippetRequestContainerProps as u };
@@ -1,53 +0,0 @@
1
- import { d as Method, o as HasStainlessPath } from "./index-CwjGm9zX.js";
2
- import { w as TransformRequestSnippetFn } from "./sdk-CSKStkB5.js";
3
- import * as React$1 from "react";
4
- import * as react_jsx_runtime61 from "react/jsx-runtime";
5
-
6
- //#region src/components/snippets.d.ts
7
- type SnippetCodeProps = {
8
- content: string;
9
- signature?: string;
10
- language?: string;
11
- };
12
- declare function SnippetCode({
13
- content,
14
- language
15
- }: SnippetCodeProps): react_jsx_runtime61.JSX.Element;
16
- type SnippetProps = {
17
- method: Partial<Method> & HasStainlessPath;
18
- requestTitle?: React$1.ReactNode;
19
- transformRequestSnippet?: TransformRequestSnippetFn;
20
- };
21
- type SnippetContainerProps = {
22
- method: Partial<Method> & HasStainlessPath;
23
- children: React$1.ReactNode;
24
- signature?: string;
25
- };
26
- declare function SnippetContainer({
27
- children
28
- }: SnippetContainerProps): react_jsx_runtime61.JSX.Element;
29
- type SnippetRequestContainerProps = {
30
- children?: React$1.ReactNode;
31
- signature?: string;
32
- };
33
- declare function SnippetRequestContainer({
34
- children
35
- }: SnippetRequestContainerProps): react_jsx_runtime61.JSX.Element;
36
- declare function Snippet({
37
- requestTitle,
38
- method,
39
- transformRequestSnippet
40
- }: SnippetProps): react_jsx_runtime61.JSX.Element | null;
41
- declare function SnippetButtons({
42
- content
43
- }: {
44
- content: string;
45
- }): react_jsx_runtime61.JSX.Element;
46
- declare function SnippetFooter(): React$1.ReactNode;
47
- declare function SnippetResponse({
48
- responses
49
- }: {
50
- responses: Method['exampleResponses'];
51
- }): react_jsx_runtime61.JSX.Element | null;
52
- //#endregion
53
- export { SnippetContainer as a, SnippetProps as c, SnippetResponse as d, SnippetCodeProps as i, SnippetRequestContainer as l, SnippetButtons as n, SnippetContainerProps as o, SnippetCode as r, SnippetFooter as s, Snippet as t, SnippetRequestContainerProps as u };
@@ -1,58 +0,0 @@
1
- import { ReactNode } from "react";
2
- import * as react_jsx_runtime67 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_runtime67.JSX.Element;
57
- //#endregion
58
- export { StlSidebarProps as a, StlSidebarLink as i, StlSidebarEntry as n, StlSidebarTarget as o, StlSidebarGroup as r, StlSidebar as t };