@stoplight/elements 7.3.8 → 7.3.9
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/index.esm.js +2 -1
- package/index.js +2 -1
- package/index.mjs +2 -1
- package/package.json +2 -2
- package/web-components.min.js +1 -1
package/index.esm.js
CHANGED
|
@@ -160,6 +160,7 @@ const APIWithSidebarLayout = ({ serviceNode, logo, hideTryIt, hideSchemas, hideI
|
|
|
160
160
|
const { pathname } = location;
|
|
161
161
|
const isRootPath = !pathname || pathname === '/';
|
|
162
162
|
const node = isRootPath ? serviceNode : serviceNode.children.find(child => child.uri === pathname);
|
|
163
|
+
const layoutOptions = React.useMemo(() => ({ hideTryIt: hideTryIt, hideExport: hideExport || (node === null || node === void 0 ? void 0 : node.type) !== NodeType.HttpService }), [hideTryIt, hideExport, node]);
|
|
163
164
|
if (!node) {
|
|
164
165
|
const firstSlug = findFirstNodeSlug(tree);
|
|
165
166
|
if (firstSlug) {
|
|
@@ -181,7 +182,7 @@ const APIWithSidebarLayout = ({ serviceNode, logo, hideTryIt, hideSchemas, hideI
|
|
|
181
182
|
React.createElement(Flex, { flexGrow: true, flexShrink: true, overflowY: "auto", direction: "col" },
|
|
182
183
|
React.createElement(TableOfContents, { tree: tree, activeId: pathname, Link: Link, onLinkClick: handleTocClick })),
|
|
183
184
|
React.createElement(PoweredByLink, { source: serviceNode.name, pathname: pathname, packageType: "elements" })));
|
|
184
|
-
return (React.createElement(SidebarLayout, { ref: container, sidebar: sidebar }, node && (React.createElement(ParsedDocs, { key: pathname, uri: pathname, node: node, nodeTitle: node.name, layoutOptions:
|
|
185
|
+
return (React.createElement(SidebarLayout, { ref: container, sidebar: sidebar }, node && (React.createElement(ParsedDocs, { key: pathname, uri: pathname, node: node, nodeTitle: node.name, layoutOptions: layoutOptions, location: location, allowRouting: true, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy }))));
|
|
185
186
|
};
|
|
186
187
|
|
|
187
188
|
const itemMatchesHash = (hash, item) => {
|
package/index.js
CHANGED
|
@@ -187,6 +187,7 @@ const APIWithSidebarLayout = ({ serviceNode, logo, hideTryIt, hideSchemas, hideI
|
|
|
187
187
|
const { pathname } = location;
|
|
188
188
|
const isRootPath = !pathname || pathname === '/';
|
|
189
189
|
const node = isRootPath ? serviceNode : serviceNode.children.find(child => child.uri === pathname);
|
|
190
|
+
const layoutOptions = React__namespace.useMemo(() => ({ hideTryIt: hideTryIt, hideExport: hideExport || (node === null || node === void 0 ? void 0 : node.type) !== types.NodeType.HttpService }), [hideTryIt, hideExport, node]);
|
|
190
191
|
if (!node) {
|
|
191
192
|
const firstSlug = findFirstNodeSlug(tree);
|
|
192
193
|
if (firstSlug) {
|
|
@@ -208,7 +209,7 @@ const APIWithSidebarLayout = ({ serviceNode, logo, hideTryIt, hideSchemas, hideI
|
|
|
208
209
|
React__namespace.createElement(mosaic.Flex, { flexGrow: true, flexShrink: true, overflowY: "auto", direction: "col" },
|
|
209
210
|
React__namespace.createElement(elementsCore.TableOfContents, { tree: tree, activeId: pathname, Link: reactRouterDom.Link, onLinkClick: handleTocClick })),
|
|
210
211
|
React__namespace.createElement(elementsCore.PoweredByLink, { source: serviceNode.name, pathname: pathname, packageType: "elements" })));
|
|
211
|
-
return (React__namespace.createElement(elementsCore.SidebarLayout, { ref: container, sidebar: sidebar }, node && (React__namespace.createElement(elementsCore.ParsedDocs, { key: pathname, uri: pathname, node: node, nodeTitle: node.name, layoutOptions:
|
|
212
|
+
return (React__namespace.createElement(elementsCore.SidebarLayout, { ref: container, sidebar: sidebar }, node && (React__namespace.createElement(elementsCore.ParsedDocs, { key: pathname, uri: pathname, node: node, nodeTitle: node.name, layoutOptions: layoutOptions, location: location, allowRouting: true, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy }))));
|
|
212
213
|
};
|
|
213
214
|
|
|
214
215
|
const itemMatchesHash = (hash, item) => {
|
package/index.mjs
CHANGED
|
@@ -160,6 +160,7 @@ const APIWithSidebarLayout = ({ serviceNode, logo, hideTryIt, hideSchemas, hideI
|
|
|
160
160
|
const { pathname } = location;
|
|
161
161
|
const isRootPath = !pathname || pathname === '/';
|
|
162
162
|
const node = isRootPath ? serviceNode : serviceNode.children.find(child => child.uri === pathname);
|
|
163
|
+
const layoutOptions = React.useMemo(() => ({ hideTryIt: hideTryIt, hideExport: hideExport || (node === null || node === void 0 ? void 0 : node.type) !== NodeType.HttpService }), [hideTryIt, hideExport, node]);
|
|
163
164
|
if (!node) {
|
|
164
165
|
const firstSlug = findFirstNodeSlug(tree);
|
|
165
166
|
if (firstSlug) {
|
|
@@ -181,7 +182,7 @@ const APIWithSidebarLayout = ({ serviceNode, logo, hideTryIt, hideSchemas, hideI
|
|
|
181
182
|
React.createElement(Flex, { flexGrow: true, flexShrink: true, overflowY: "auto", direction: "col" },
|
|
182
183
|
React.createElement(TableOfContents, { tree: tree, activeId: pathname, Link: Link, onLinkClick: handleTocClick })),
|
|
183
184
|
React.createElement(PoweredByLink, { source: serviceNode.name, pathname: pathname, packageType: "elements" })));
|
|
184
|
-
return (React.createElement(SidebarLayout, { ref: container, sidebar: sidebar }, node && (React.createElement(ParsedDocs, { key: pathname, uri: pathname, node: node, nodeTitle: node.name, layoutOptions:
|
|
185
|
+
return (React.createElement(SidebarLayout, { ref: container, sidebar: sidebar }, node && (React.createElement(ParsedDocs, { key: pathname, uri: pathname, node: node, nodeTitle: node.name, layoutOptions: layoutOptions, location: location, allowRouting: true, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy }))));
|
|
185
186
|
};
|
|
186
187
|
|
|
187
188
|
const itemMatchesHash = (hash, item) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoplight/elements",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.9",
|
|
4
4
|
"description": "UI components for composing beautiful developer documentation.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "./index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@fortawesome/fontawesome-svg-core": "^1.2.31",
|
|
30
30
|
"@fortawesome/free-solid-svg-icons": "^5.14.0",
|
|
31
31
|
"@fortawesome/react-fontawesome": "^0.1.11",
|
|
32
|
-
"@stoplight/elements-core": "~7.3.
|
|
32
|
+
"@stoplight/elements-core": "~7.3.8",
|
|
33
33
|
"@stoplight/http-spec": "^4.2.2",
|
|
34
34
|
"@stoplight/json": "^3.10.0",
|
|
35
35
|
"@stoplight/mosaic": "^1.8.2",
|