@stainless-api/docs-ui 0.1.0-beta.75 → 0.1.0-beta.76
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.
|
@@ -2,7 +2,7 @@ import { Badge, Expander, Input, InputProps, Join, Link, ListView, ListViewProps
|
|
|
2
2
|
import { SDKBreadcrumbs, generateApiBreadcrumbs } from "./breadcrumbs.js";
|
|
3
3
|
import { Method, MethodDescription, MethodDescriptionProps, MethodHeader, MethodHeaderProps, MethodInfo, MethodInfoProps, MethodProps, MethodRoute, MethodRouteProps } from "./method.js";
|
|
4
4
|
import { Property, PropertyDescription, PropertyDescriptionProps, PropertyProps, PropertyTitle, PropertyTitleProps, PropertyToggle, PropertyToggleProps } from "./properties.js";
|
|
5
|
-
import { PropertyModelContext, PropertyModelContextType, ReferenceNestingContext, ReferenceNestingContextType, SDKChildren, SDKConstraints, SDKConstraintsProps, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodProps, SDKModel, SDKModelProps, SDKReference, SDKRequestTitle, SDKRequestTitleProps, SDKSnippetLanguages, SDKSnippetLanguagesType, TransformRequestSnippetFn, usePropertyModel, useReferenceNesting, useStreamingResponse } from "./sdk.js";
|
|
5
|
+
import { DeclarationParentsContextType, PropertyModelContext, PropertyModelContextType, ReferenceNestingContext, ReferenceNestingContextType, SDKChildren, SDKConstraints, SDKConstraintsProps, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodProps, SDKModel, SDKModelProps, SDKReference, SDKRequestTitle, SDKRequestTitleProps, SDKSnippetLanguages, SDKSnippetLanguagesType, TransformRequestSnippetFn, useDeclarationParents, usePropertyModel, useReferenceNesting, useStreamingResponse } from "./sdk.js";
|
|
6
6
|
import { MultiSnippets, MultiSnippetsProps, Snippet, SnippetButtons, SnippetCode, SnippetCodeProps, SnippetContainer, SnippetContainerProps, SnippetFooter, SnippetProps, SnippetRequestContainer, SnippetRequestContainerProps, SnippetResponse } from "./snippets.js";
|
|
7
7
|
import { SDKMethodSummary, SDKMethodSummaryProps, SDKOverview, SDKOverviewProps, SDKResource, SDKResourceHeader, SDKResourceProps, SDKRoot, SDKRootProps } from "./overview.js";
|
|
8
8
|
import { SDKSidebar, SDKSidebarProps } from "./sdk-sidebar.js";
|
|
@@ -10,7 +10,7 @@ import { StlSidebar, StlSidebarEntry, StlSidebarGroup, StlSidebarLink, StlSideba
|
|
|
10
10
|
|
|
11
11
|
//#region src/components/index.d.ts
|
|
12
12
|
declare namespace index_d_exports {
|
|
13
|
-
export { Badge, Expander, Input, InputProps, Join, Link, ListView, ListViewProps, Markdown, Method, MethodDescription, MethodDescriptionProps, MethodHeader, MethodHeaderProps, MethodInfo, MethodInfoProps, MethodProps, MethodRoute, MethodRouteProps, MultiSnippets, MultiSnippetsProps, Property, PropertyDescription, PropertyDescriptionProps, PropertyModelContext, PropertyModelContextType, PropertyProps, PropertyTitle, PropertyTitleProps, PropertyToggle, PropertyToggleProps, ReferenceNestingContext, ReferenceNestingContextType, SDKBreadcrumbs, SDKChildren, SDKConstraints, SDKConstraintsProps, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodProps, SDKMethodSummary, SDKMethodSummaryProps, SDKModel, SDKModelProps, SDKOverview, SDKOverviewProps, SDKReference, SDKRequestTitle, SDKRequestTitleProps, SDKResource, SDKResourceHeader, SDKResourceProps, SDKRoot, SDKRootProps, SDKSidebar, SDKSidebarProps, SDKSnippetLanguages, SDKSnippetLanguagesType, Snippet, SnippetButtons, SnippetCode, SnippetCodeProps, SnippetContainer, SnippetContainerProps, SnippetFooter, SnippetProps, SnippetRequestContainer, SnippetRequestContainerProps, SnippetResponse, StlSidebar, StlSidebarEntry, StlSidebarGroup, StlSidebarLink, StlSidebarProps, StlSidebarTarget, ToggleButton, ToggleButtonProps, Tooltip, TransformRequestSnippetFn, VirtualExpander, generateApiBreadcrumbs, usePropertyModel, useReferenceNesting, useStreamingResponse };
|
|
13
|
+
export { Badge, DeclarationParentsContextType, Expander, Input, InputProps, Join, Link, ListView, ListViewProps, Markdown, Method, MethodDescription, MethodDescriptionProps, MethodHeader, MethodHeaderProps, MethodInfo, MethodInfoProps, MethodProps, MethodRoute, MethodRouteProps, MultiSnippets, MultiSnippetsProps, Property, PropertyDescription, PropertyDescriptionProps, PropertyModelContext, PropertyModelContextType, PropertyProps, PropertyTitle, PropertyTitleProps, PropertyToggle, PropertyToggleProps, ReferenceNestingContext, ReferenceNestingContextType, SDKBreadcrumbs, SDKChildren, SDKConstraints, SDKConstraintsProps, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodProps, SDKMethodSummary, SDKMethodSummaryProps, SDKModel, SDKModelProps, SDKOverview, SDKOverviewProps, SDKReference, SDKRequestTitle, SDKRequestTitleProps, SDKResource, SDKResourceHeader, SDKResourceProps, SDKRoot, SDKRootProps, SDKSidebar, SDKSidebarProps, SDKSnippetLanguages, SDKSnippetLanguagesType, Snippet, SnippetButtons, SnippetCode, SnippetCodeProps, SnippetContainer, SnippetContainerProps, SnippetFooter, SnippetProps, SnippetRequestContainer, SnippetRequestContainerProps, SnippetResponse, StlSidebar, StlSidebarEntry, StlSidebarGroup, StlSidebarLink, StlSidebarProps, StlSidebarTarget, ToggleButton, ToggleButtonProps, Tooltip, TransformRequestSnippetFn, VirtualExpander, generateApiBreadcrumbs, useDeclarationParents, usePropertyModel, useReferenceNesting, useStreamingResponse };
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
export { Badge, Expander, Input, InputProps, Join, Link, ListView, ListViewProps, Markdown, Method, MethodDescription, MethodDescriptionProps, MethodHeader, MethodHeaderProps, MethodInfo, MethodInfoProps, MethodProps, MethodRoute, MethodRouteProps, MultiSnippets, MultiSnippetsProps, Property, PropertyDescription, PropertyDescriptionProps, PropertyModelContext, PropertyModelContextType, PropertyProps, PropertyTitle, PropertyTitleProps, PropertyToggle, PropertyToggleProps, ReferenceNestingContext, ReferenceNestingContextType, SDKBreadcrumbs, SDKChildren, SDKConstraints, SDKConstraintsProps, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodProps, SDKMethodSummary, SDKMethodSummaryProps, SDKModel, SDKModelProps, SDKOverview, SDKOverviewProps, SDKReference, SDKRequestTitle, SDKRequestTitleProps, SDKResource, SDKResourceHeader, SDKResourceProps, SDKRoot, SDKRootProps, SDKSidebar, SDKSidebarProps, SDKSnippetLanguages, SDKSnippetLanguagesType, Snippet, SnippetButtons, SnippetCode, SnippetCodeProps, SnippetContainer, SnippetContainerProps, SnippetFooter, SnippetProps, SnippetRequestContainer, SnippetRequestContainerProps, SnippetResponse, StlSidebar, StlSidebarEntry, StlSidebarGroup, StlSidebarLink, StlSidebarProps, StlSidebarTarget, ToggleButton, ToggleButtonProps, Tooltip, TransformRequestSnippetFn, VirtualExpander, generateApiBreadcrumbs, index_d_exports as t, usePropertyModel, useReferenceNesting, useStreamingResponse };
|
|
16
|
+
export { Badge, DeclarationParentsContextType, Expander, Input, InputProps, Join, Link, ListView, ListViewProps, Markdown, Method, MethodDescription, MethodDescriptionProps, MethodHeader, MethodHeaderProps, MethodInfo, MethodInfoProps, MethodProps, MethodRoute, MethodRouteProps, MultiSnippets, MultiSnippetsProps, Property, PropertyDescription, PropertyDescriptionProps, PropertyModelContext, PropertyModelContextType, PropertyProps, PropertyTitle, PropertyTitleProps, PropertyToggle, PropertyToggleProps, ReferenceNestingContext, ReferenceNestingContextType, SDKBreadcrumbs, SDKChildren, SDKConstraints, SDKConstraintsProps, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodProps, SDKMethodSummary, SDKMethodSummaryProps, SDKModel, SDKModelProps, SDKOverview, SDKOverviewProps, SDKReference, SDKRequestTitle, SDKRequestTitleProps, SDKResource, SDKResourceHeader, SDKResourceProps, SDKRoot, SDKRootProps, SDKSidebar, SDKSidebarProps, SDKSnippetLanguages, SDKSnippetLanguagesType, Snippet, SnippetButtons, SnippetCode, SnippetCodeProps, SnippetContainer, SnippetContainerProps, SnippetFooter, SnippetProps, SnippetRequestContainer, SnippetRequestContainerProps, SnippetResponse, StlSidebar, StlSidebarEntry, StlSidebarGroup, StlSidebarLink, StlSidebarProps, StlSidebarTarget, ToggleButton, ToggleButtonProps, Tooltip, TransformRequestSnippetFn, VirtualExpander, generateApiBreadcrumbs, index_d_exports as t, useDeclarationParents, usePropertyModel, useReferenceNesting, useStreamingResponse };
|
package/dist/components/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import "../use-strict-context-L0c8JKg4.js";
|
|
|
3
3
|
import { Property, PropertyDescription, PropertyTitle, PropertyToggle } from "./properties.js";
|
|
4
4
|
import { Method, MethodDescription, MethodHeader, MethodInfo, MethodRoute } from "./method.js";
|
|
5
5
|
import { Badge, Expander, Input, Join, Link, ListView, Markdown, ToggleButton, Tooltip, VirtualExpander } from "./primitives.js";
|
|
6
|
-
import { PropertyModelContext, ReferenceNestingContext, SDKChildren, SDKConstraints, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKModel, SDKReference, SDKRequestTitle, SDKSnippetLanguages, usePropertyModel, useReferenceNesting, useStreamingResponse } from "./sdk.js";
|
|
6
|
+
import { PropertyModelContext, ReferenceNestingContext, SDKChildren, SDKConstraints, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKModel, SDKReference, SDKRequestTitle, SDKSnippetLanguages, useDeclarationParents, usePropertyModel, useReferenceNesting, useStreamingResponse } from "./sdk.js";
|
|
7
7
|
import { MultiSnippets, Snippet, SnippetButtons, SnippetCode, SnippetContainer, SnippetFooter, SnippetRequestContainer, SnippetResponse } from "./snippets.js";
|
|
8
8
|
import { SDKMethodSummary, SDKOverview, SDKResource, SDKResourceHeader, SDKRoot } from "./overview.js";
|
|
9
9
|
import { SDKBreadcrumbs, generateApiBreadcrumbs } from "./breadcrumbs.js";
|
|
@@ -64,10 +64,11 @@ var components_exports = /* @__PURE__ */ __exportAll({
|
|
|
64
64
|
Tooltip: () => Tooltip,
|
|
65
65
|
VirtualExpander: () => VirtualExpander,
|
|
66
66
|
generateApiBreadcrumbs: () => generateApiBreadcrumbs,
|
|
67
|
+
useDeclarationParents: () => useDeclarationParents,
|
|
67
68
|
usePropertyModel: () => usePropertyModel,
|
|
68
69
|
useReferenceNesting: () => useReferenceNesting,
|
|
69
70
|
useStreamingResponse: () => useStreamingResponse
|
|
70
71
|
});
|
|
71
72
|
|
|
72
73
|
//#endregion
|
|
73
|
-
export { Badge, Expander, Input, Join, Link, ListView, Markdown, Method, MethodDescription, MethodHeader, MethodInfo, MethodRoute, MultiSnippets, Property, PropertyDescription, PropertyModelContext, PropertyTitle, PropertyToggle, ReferenceNestingContext, SDKBreadcrumbs, SDKChildren, SDKConstraints, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodSummary, SDKModel, SDKOverview, SDKReference, SDKRequestTitle, SDKResource, SDKResourceHeader, SDKRoot, SDKSidebar, SDKSnippetLanguages, Snippet, SnippetButtons, SnippetCode, SnippetContainer, SnippetFooter, SnippetRequestContainer, SnippetResponse, StlSidebar, ToggleButton, Tooltip, VirtualExpander, generateApiBreadcrumbs, components_exports as t, usePropertyModel, useReferenceNesting, useStreamingResponse };
|
|
74
|
+
export { Badge, Expander, Input, Join, Link, ListView, Markdown, Method, MethodDescription, MethodHeader, MethodInfo, MethodRoute, MultiSnippets, Property, PropertyDescription, PropertyModelContext, PropertyTitle, PropertyToggle, ReferenceNestingContext, SDKBreadcrumbs, SDKChildren, SDKConstraints, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodSummary, SDKModel, SDKOverview, SDKReference, SDKRequestTitle, SDKResource, SDKResourceHeader, SDKRoot, SDKSidebar, SDKSnippetLanguages, Snippet, SnippetButtons, SnippetCode, SnippetContainer, SnippetFooter, SnippetRequestContainer, SnippetResponse, StlSidebar, ToggleButton, Tooltip, VirtualExpander, generateApiBreadcrumbs, components_exports as t, useDeclarationParents, usePropertyModel, useReferenceNesting, useStreamingResponse };
|
package/dist/components/sdk.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ declare function usePropertyModel(): PropertyModelContextType;
|
|
|
13
13
|
type ReferenceNestingContextType = string[];
|
|
14
14
|
declare const ReferenceNestingContext: React$1.Context<ReferenceNestingContextType>;
|
|
15
15
|
declare function useReferenceNesting(): ReferenceNestingContextType;
|
|
16
|
+
type DeclarationParentsContextType = ReadonlySet<string>;
|
|
17
|
+
declare function useDeclarationParents(): DeclarationParentsContextType;
|
|
16
18
|
type SDKSnippetLanguagesType = Record<SnippetLanguage, {
|
|
17
19
|
name: string;
|
|
18
20
|
}>;
|
|
@@ -119,4 +121,4 @@ declare function SDKLanguageBlock({
|
|
|
119
121
|
links
|
|
120
122
|
}: SDKLanguageBlockProps): react_jsx_runtime0.JSX.Element;
|
|
121
123
|
//#endregion
|
|
122
|
-
export { PropertyModelContext, PropertyModelContextType, ReferenceNestingContext, ReferenceNestingContextType, SDKChildren, SDKConstraints, SDKConstraintsProps, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodProps, SDKModel, SDKModelProps, SDKReference, SDKRequestTitle, SDKRequestTitleProps, SDKSnippetLanguages, SDKSnippetLanguagesType, TransformRequestSnippetFn, usePropertyModel, useReferenceNesting, useStreamingResponse };
|
|
124
|
+
export { DeclarationParentsContextType, PropertyModelContext, PropertyModelContextType, ReferenceNestingContext, ReferenceNestingContextType, SDKChildren, SDKConstraints, SDKConstraintsProps, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodProps, SDKModel, SDKModelProps, SDKReference, SDKRequestTitle, SDKRequestTitleProps, SDKSnippetLanguages, SDKSnippetLanguagesType, TransformRequestSnippetFn, useDeclarationParents, usePropertyModel, useReferenceNesting, useStreamingResponse };
|
package/dist/components/sdk.js
CHANGED
|
@@ -21,6 +21,14 @@ const ReferenceNestingContext = React$1.createContext([]);
|
|
|
21
21
|
function useReferenceNesting() {
|
|
22
22
|
return React$1.useContext(ReferenceNestingContext);
|
|
23
23
|
}
|
|
24
|
+
const DeclarationParentsContext = React$1.createContext(/* @__PURE__ */ new Set());
|
|
25
|
+
const AddToDeclarationParents = ({ id, children }) => /* @__PURE__ */ jsx(DeclarationParentsContext, {
|
|
26
|
+
value: new Set([...useDeclarationParents(), id.replace(/(?<=> \(schema\))((?!> \(schema\) > ).)+$/, "")]),
|
|
27
|
+
children
|
|
28
|
+
});
|
|
29
|
+
function useDeclarationParents() {
|
|
30
|
+
return React$1.useContext(DeclarationParentsContext);
|
|
31
|
+
}
|
|
24
32
|
const SDKSnippetLanguages = {
|
|
25
33
|
"node.default": { name: "TypeScript" },
|
|
26
34
|
"typescript.default": { name: "TypeScript" },
|
|
@@ -78,19 +86,78 @@ function normalizeDeclaration(raw, http) {
|
|
|
78
86
|
function SDKDeclaration({ path, expand, depth = 0 }) {
|
|
79
87
|
const Lang = useLanguageComponents();
|
|
80
88
|
const Docs = useComponents();
|
|
81
|
-
|
|
89
|
+
let pendingDecl = normalizeDeclaration(useDeclaration(path, true), useDeclaration(path.replace(/ > \(schema\)$/, "") + " > (schema)", false, "http"));
|
|
82
90
|
const settings = useSettings();
|
|
83
91
|
const model = usePropertyModel();
|
|
84
92
|
const nesting = useReferenceNesting();
|
|
85
|
-
const { selectedPath } = useNavigation();
|
|
93
|
+
const { selectedPath, basePath } = useNavigation();
|
|
94
|
+
const parents = useDeclarationParents();
|
|
95
|
+
const language = useLanguage();
|
|
96
|
+
if (parents.has(path)) if (pendingDecl.kind === "GoDeclType") pendingDecl = {
|
|
97
|
+
...pendingDecl,
|
|
98
|
+
kind: "GoDeclType",
|
|
99
|
+
type: {
|
|
100
|
+
kind: "GoTypeReference",
|
|
101
|
+
typeName: pendingDecl.ident,
|
|
102
|
+
$ref: pendingDecl.stainlessPath
|
|
103
|
+
},
|
|
104
|
+
children: []
|
|
105
|
+
};
|
|
106
|
+
else if (pendingDecl.kind === "HttpDeclTypeAlias") pendingDecl = {
|
|
107
|
+
...pendingDecl,
|
|
108
|
+
kind: "HttpDeclTypeAlias",
|
|
109
|
+
children: []
|
|
110
|
+
};
|
|
111
|
+
else if (pendingDecl.kind === "PythonDeclClass") pendingDecl = {
|
|
112
|
+
kind: "PythonDeclType",
|
|
113
|
+
ident: pendingDecl.ident,
|
|
114
|
+
stainlessPath: pendingDecl.stainlessPath,
|
|
115
|
+
type: {
|
|
116
|
+
kind: "PythonTypeReference",
|
|
117
|
+
typeName: pendingDecl.ident,
|
|
118
|
+
$ref: pendingDecl.stainlessPath
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
else if (pendingDecl.kind === "TSDeclInterface") pendingDecl = {
|
|
122
|
+
kind: "TSDeclTypeAlias",
|
|
123
|
+
ident: pendingDecl.ident,
|
|
124
|
+
stainlessPath: pendingDecl.stainlessPath,
|
|
125
|
+
type: {
|
|
126
|
+
kind: "TSTypeReference",
|
|
127
|
+
ident: pendingDecl.ident,
|
|
128
|
+
$ref: pendingDecl.stainlessPath
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
else if ("ident" in pendingDecl) {
|
|
132
|
+
const ident = pendingDecl.ident;
|
|
133
|
+
const url = generateRoute(basePath ?? "/", language, pendingDecl.stainlessPath);
|
|
134
|
+
return /* @__PURE__ */ jsx("span", {
|
|
135
|
+
className: style_default.Type,
|
|
136
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
137
|
+
className: style_default.TypeReference,
|
|
138
|
+
children: url ? /* @__PURE__ */ jsx("a", {
|
|
139
|
+
href: url,
|
|
140
|
+
children: ident
|
|
141
|
+
}) : ident
|
|
142
|
+
})
|
|
143
|
+
});
|
|
144
|
+
} else throw new Error("Infinite recursion in SDKDeclaration: " + JSON.stringify({
|
|
145
|
+
parents: [...parents],
|
|
146
|
+
path,
|
|
147
|
+
pendingDecl
|
|
148
|
+
}));
|
|
149
|
+
const decl = pendingDecl;
|
|
86
150
|
if (decl.kind.endsWith("Reference")) {
|
|
87
151
|
const refId = "type" in decl && decl.type !== void 0 && typeof decl.type !== "string" && "$ref" in decl.type ? decl.type["$ref"] : void 0;
|
|
88
|
-
if (refId && refId !== path && !nesting.includes(refId)) return /* @__PURE__ */ jsx(
|
|
89
|
-
|
|
90
|
-
children: /* @__PURE__ */ jsx(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
152
|
+
if (refId && refId !== path && !nesting.includes(refId)) return /* @__PURE__ */ jsx(AddToDeclarationParents, {
|
|
153
|
+
id: path,
|
|
154
|
+
children: /* @__PURE__ */ jsx(ReferenceNestingContext.Provider, {
|
|
155
|
+
value: [...nesting, refId],
|
|
156
|
+
children: /* @__PURE__ */ jsx(SDKDeclaration, {
|
|
157
|
+
path: refId,
|
|
158
|
+
expand,
|
|
159
|
+
depth
|
|
160
|
+
})
|
|
94
161
|
})
|
|
95
162
|
});
|
|
96
163
|
}
|
|
@@ -126,12 +193,18 @@ function SDKDeclaration({ path, expand, depth = 0 }) {
|
|
|
126
193
|
modelPath: decl.modelPath,
|
|
127
194
|
propertyPath: decl.stainlessPath
|
|
128
195
|
};
|
|
129
|
-
return /* @__PURE__ */ jsx(
|
|
130
|
-
|
|
131
|
-
children:
|
|
196
|
+
return /* @__PURE__ */ jsx(AddToDeclarationParents, {
|
|
197
|
+
id: path,
|
|
198
|
+
children: /* @__PURE__ */ jsx(PropertyModelContext.Provider, {
|
|
199
|
+
value,
|
|
200
|
+
children: content
|
|
201
|
+
})
|
|
132
202
|
});
|
|
133
203
|
}
|
|
134
|
-
return
|
|
204
|
+
return /* @__PURE__ */ jsx(AddToDeclarationParents, {
|
|
205
|
+
id: path,
|
|
206
|
+
children: content
|
|
207
|
+
});
|
|
135
208
|
}
|
|
136
209
|
function SDKConstraints({ constraints }) {
|
|
137
210
|
if (constraints) return /* @__PURE__ */ jsx("div", {
|
|
@@ -404,4 +477,4 @@ function SDKLanguageBlock({ language, version, install, links }) {
|
|
|
404
477
|
}
|
|
405
478
|
|
|
406
479
|
//#endregion
|
|
407
|
-
export { PropertyModelContext, ReferenceNestingContext, SDKChildren, SDKConstraints, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKModel, SDKReference, SDKRequestTitle, SDKSnippetLanguages, usePropertyModel, useReferenceNesting, useStreamingResponse };
|
|
480
|
+
export { PropertyModelContext, ReferenceNestingContext, SDKChildren, SDKConstraints, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKModel, SDKReference, SDKRequestTitle, SDKSnippetLanguages, useDeclarationParents, usePropertyModel, useReferenceNesting, useStreamingResponse };
|
package/dist/styles/sidebar.css
CHANGED
|
@@ -59,6 +59,15 @@
|
|
|
59
59
|
transform: rotate(90deg);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
/* Explicitly prevent collapsed groups from painting.
|
|
63
|
+
Browsers should not be computing styles/layout on collapsed <details> non-summary children, but Safari still seems to.
|
|
64
|
+
Applying display: none lowers rendering cost for trees with many items (eg. the CF API which has ~2k+ items)
|
|
65
|
+
In Arena's testing using dev server, Safari paint time for a CF page went from 10-14 seconds to ~3 seconds.
|
|
66
|
+
*/
|
|
67
|
+
.stldocs-sidebar-expander:not([open]) > .stldocs-sidebar-list {
|
|
68
|
+
display: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
62
71
|
/* List items. */
|
|
63
72
|
.stldocs-sidebar-entry,
|
|
64
73
|
.stldocs-expander-summary {
|
package/dist/styles.css
CHANGED
|
@@ -2917,6 +2917,15 @@ a.stl-ui-button {
|
|
|
2917
2917
|
transform: rotate(90deg);
|
|
2918
2918
|
}
|
|
2919
2919
|
|
|
2920
|
+
/* Explicitly prevent collapsed groups from painting.
|
|
2921
|
+
Browsers should not be computing styles/layout on collapsed <details> non-summary children, but Safari still seems to.
|
|
2922
|
+
Applying display: none lowers rendering cost for trees with many items (eg. the CF API which has ~2k+ items)
|
|
2923
|
+
In Arena's testing using dev server, Safari paint time for a CF page went from 10-14 seconds to ~3 seconds.
|
|
2924
|
+
*/
|
|
2925
|
+
.stldocs-sidebar-expander:not([open]) > .stldocs-sidebar-list {
|
|
2926
|
+
display: none;
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2920
2929
|
/* List items. */
|
|
2921
2930
|
.stldocs-sidebar-entry,
|
|
2922
2931
|
.stldocs-expander-summary {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stainless-api/docs-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.0-beta.
|
|
4
|
+
"version": "0.1.0-beta.76",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"clsx": "^2.1.1",
|
|
19
19
|
"htmlparser2": "^10.1.0",
|
|
20
20
|
"lucide-react": "^0.562.0",
|
|
21
|
-
"@stainless-api/ui-primitives": "0.1.0-beta.
|
|
21
|
+
"@stainless-api/ui-primitives": "0.1.0-beta.48"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "24.10.9",
|