@stoplight/elements-dev-portal 1.4.7 → 1.4.8
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 +7 -8
- package/index.js +5 -6
- package/index.mjs +7 -8
- package/package.json +2 -2
- package/version.d.ts +1 -1
- package/web-components.min.js +1 -1
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Menu, FieldButton,
|
|
1
|
+
import { Menu, FieldButton, Modal, Input, Box, Icon, ListBox, ListBoxItem, Flex, VStack, Heading } from '@stoplight/mosaic';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import { withQueryClientProvider, PersistenceContextProvider, MarkdownComponentsProvider, MockingProvider, Docs, withStyles, withPersistenceBoundary,
|
|
4
|
+
import { withQueryClientProvider, withMosaicProvider, PersistenceContextProvider, MarkdownComponentsProvider, MockingProvider, Docs, withStyles, withPersistenceBoundary, NodeTypeIconDefs, NodeTypeColors, TableOfContents as TableOfContents$1, PoweredByLink, useRouter, findFirstNode, ReactRouterMarkdownLink, SidebarLayout } from '@stoplight/elements-core';
|
|
5
5
|
import { resolve, dirname } from '@stoplight/path';
|
|
6
6
|
import { NodeType } from '@stoplight/types';
|
|
7
7
|
import { faSearch } from '@fortawesome/free-solid-svg-icons/faSearch';
|
|
@@ -36,10 +36,9 @@ const BranchSelector = ({ branchSlug, branches, onChange }) => {
|
|
|
36
36
|
|
|
37
37
|
const PlatformContext = React.createContext({ platformUrl: 'https://stoplight.io' });
|
|
38
38
|
const PlatformProvider = ({ platformUrl = 'https://stoplight.io', platformAuthToken, children, }) => {
|
|
39
|
-
return
|
|
40
|
-
React.createElement(Provider, null, children)));
|
|
39
|
+
return React.createElement(PlatformContext.Provider, { value: { platformUrl, platformAuthToken } }, children);
|
|
41
40
|
};
|
|
42
|
-
const DevPortalProvider = withQueryClientProvider(PlatformProvider);
|
|
41
|
+
const DevPortalProvider = withQueryClientProvider(withMosaicProvider(PlatformProvider));
|
|
43
42
|
|
|
44
43
|
const NodeContent = ({ node, Link, hideTryIt, hideTryItPanel, hideMocking, hideExport, tryItCredentialsPolicy, tryItCorsProxy, }) => {
|
|
45
44
|
return (React.createElement(PersistenceContextProvider, null,
|
|
@@ -76,7 +75,7 @@ const LinkComponent = ({ children, href }) => {
|
|
|
76
75
|
const decodedResolvedUriWithoutAnchor = decodeURIComponent(resolvedUriWithoutAnchor);
|
|
77
76
|
const edge = node.outbound_edges.find(edge => edge.uri === decodedUrl || edge.uri === decodedResolvedUriWithoutAnchor);
|
|
78
77
|
if (edge) {
|
|
79
|
-
return
|
|
78
|
+
return React.createElement(Link, { to: `${edge.slug}${hash && `#${hash}`}` }, children);
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
return React.createElement("a", { href: href }, children);
|
|
@@ -183,7 +182,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
183
182
|
React__default.createElement(Icon, { icon: faExclamationTriangle, size: "4x" }),
|
|
184
183
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
185
184
|
|
|
186
|
-
const appVersion = '1.4.
|
|
185
|
+
const appVersion = '1.4.8';
|
|
187
186
|
|
|
188
187
|
class ResponseError extends Error {
|
|
189
188
|
constructor(message, responseCode) {
|
|
@@ -297,7 +296,7 @@ const StoplightProjectImpl = ({ projectId, hideTryIt, hideMocking, hideExport, c
|
|
|
297
296
|
elem = React.createElement(NotFound, null);
|
|
298
297
|
}
|
|
299
298
|
else {
|
|
300
|
-
elem = (React.createElement(NodeContent, { node: node, Link:
|
|
299
|
+
elem = (React.createElement(NodeContent, { node: node, Link: ReactRouterMarkdownLink, hideTryIt: hideTryIt, hideMocking: hideMocking, hideExport: hideExport, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy }));
|
|
301
300
|
}
|
|
302
301
|
const handleTocClick = () => {
|
|
303
302
|
if (container.current) {
|
package/index.js
CHANGED
|
@@ -62,10 +62,9 @@ const BranchSelector = ({ branchSlug, branches, onChange }) => {
|
|
|
62
62
|
|
|
63
63
|
const PlatformContext = React__namespace.createContext({ platformUrl: 'https://stoplight.io' });
|
|
64
64
|
const PlatformProvider = ({ platformUrl = 'https://stoplight.io', platformAuthToken, children, }) => {
|
|
65
|
-
return
|
|
66
|
-
React__namespace.createElement(mosaic.Provider, null, children)));
|
|
65
|
+
return React__namespace.createElement(PlatformContext.Provider, { value: { platformUrl, platformAuthToken } }, children);
|
|
67
66
|
};
|
|
68
|
-
const DevPortalProvider = elementsCore.withQueryClientProvider(PlatformProvider);
|
|
67
|
+
const DevPortalProvider = elementsCore.withQueryClientProvider(elementsCore.withMosaicProvider(PlatformProvider));
|
|
69
68
|
|
|
70
69
|
const NodeContent = ({ node, Link, hideTryIt, hideTryItPanel, hideMocking, hideExport, tryItCredentialsPolicy, tryItCorsProxy, }) => {
|
|
71
70
|
return (React__namespace.createElement(elementsCore.PersistenceContextProvider, null,
|
|
@@ -102,7 +101,7 @@ const LinkComponent = ({ children, href }) => {
|
|
|
102
101
|
const decodedResolvedUriWithoutAnchor = decodeURIComponent(resolvedUriWithoutAnchor);
|
|
103
102
|
const edge = node.outbound_edges.find(edge => edge.uri === decodedUrl || edge.uri === decodedResolvedUriWithoutAnchor);
|
|
104
103
|
if (edge) {
|
|
105
|
-
return
|
|
104
|
+
return React__namespace.createElement(Link, { to: `${edge.slug}${hash && `#${hash}`}` }, children);
|
|
106
105
|
}
|
|
107
106
|
}
|
|
108
107
|
return React__namespace.createElement("a", { href: href }, children);
|
|
@@ -209,7 +208,7 @@ const UpgradeToStarter = () => (React__default["default"].createElement(mosaic.F
|
|
|
209
208
|
React__default["default"].createElement(mosaic.Icon, { icon: freeSolidSvgIcons.faExclamationTriangle, size: "4x" }),
|
|
210
209
|
React__default["default"].createElement(mosaic.Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
211
210
|
|
|
212
|
-
const appVersion = '1.4.
|
|
211
|
+
const appVersion = '1.4.8';
|
|
213
212
|
|
|
214
213
|
class ResponseError extends Error {
|
|
215
214
|
constructor(message, responseCode) {
|
|
@@ -323,7 +322,7 @@ const StoplightProjectImpl = ({ projectId, hideTryIt, hideMocking, hideExport, c
|
|
|
323
322
|
elem = React__namespace.createElement(NotFound, null);
|
|
324
323
|
}
|
|
325
324
|
else {
|
|
326
|
-
elem = (React__namespace.createElement(NodeContent, { node: node, Link:
|
|
325
|
+
elem = (React__namespace.createElement(NodeContent, { node: node, Link: elementsCore.ReactRouterMarkdownLink, hideTryIt: hideTryIt, hideMocking: hideMocking, hideExport: hideExport, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy }));
|
|
327
326
|
}
|
|
328
327
|
const handleTocClick = () => {
|
|
329
328
|
if (container.current) {
|
package/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Menu, FieldButton,
|
|
1
|
+
import { Menu, FieldButton, Modal, Input, Box, Icon, ListBox, ListBoxItem, Flex, VStack, Heading } from '@stoplight/mosaic';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import { withQueryClientProvider, PersistenceContextProvider, MarkdownComponentsProvider, MockingProvider, Docs, withStyles, withPersistenceBoundary,
|
|
4
|
+
import { withQueryClientProvider, withMosaicProvider, PersistenceContextProvider, MarkdownComponentsProvider, MockingProvider, Docs, withStyles, withPersistenceBoundary, NodeTypeIconDefs, NodeTypeColors, TableOfContents as TableOfContents$1, PoweredByLink, useRouter, findFirstNode, ReactRouterMarkdownLink, SidebarLayout } from '@stoplight/elements-core';
|
|
5
5
|
import { resolve, dirname } from '@stoplight/path';
|
|
6
6
|
import { NodeType } from '@stoplight/types';
|
|
7
7
|
import { faSearch } from '@fortawesome/free-solid-svg-icons/faSearch';
|
|
@@ -36,10 +36,9 @@ const BranchSelector = ({ branchSlug, branches, onChange }) => {
|
|
|
36
36
|
|
|
37
37
|
const PlatformContext = React.createContext({ platformUrl: 'https://stoplight.io' });
|
|
38
38
|
const PlatformProvider = ({ platformUrl = 'https://stoplight.io', platformAuthToken, children, }) => {
|
|
39
|
-
return
|
|
40
|
-
React.createElement(Provider, null, children)));
|
|
39
|
+
return React.createElement(PlatformContext.Provider, { value: { platformUrl, platformAuthToken } }, children);
|
|
41
40
|
};
|
|
42
|
-
const DevPortalProvider = withQueryClientProvider(PlatformProvider);
|
|
41
|
+
const DevPortalProvider = withQueryClientProvider(withMosaicProvider(PlatformProvider));
|
|
43
42
|
|
|
44
43
|
const NodeContent = ({ node, Link, hideTryIt, hideTryItPanel, hideMocking, hideExport, tryItCredentialsPolicy, tryItCorsProxy, }) => {
|
|
45
44
|
return (React.createElement(PersistenceContextProvider, null,
|
|
@@ -76,7 +75,7 @@ const LinkComponent = ({ children, href }) => {
|
|
|
76
75
|
const decodedResolvedUriWithoutAnchor = decodeURIComponent(resolvedUriWithoutAnchor);
|
|
77
76
|
const edge = node.outbound_edges.find(edge => edge.uri === decodedUrl || edge.uri === decodedResolvedUriWithoutAnchor);
|
|
78
77
|
if (edge) {
|
|
79
|
-
return
|
|
78
|
+
return React.createElement(Link, { to: `${edge.slug}${hash && `#${hash}`}` }, children);
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
return React.createElement("a", { href: href }, children);
|
|
@@ -183,7 +182,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
183
182
|
React__default.createElement(Icon, { icon: faExclamationTriangle, size: "4x" }),
|
|
184
183
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
185
184
|
|
|
186
|
-
const appVersion = '1.4.
|
|
185
|
+
const appVersion = '1.4.8';
|
|
187
186
|
|
|
188
187
|
class ResponseError extends Error {
|
|
189
188
|
constructor(message, responseCode) {
|
|
@@ -297,7 +296,7 @@ const StoplightProjectImpl = ({ projectId, hideTryIt, hideMocking, hideExport, c
|
|
|
297
296
|
elem = React.createElement(NotFound, null);
|
|
298
297
|
}
|
|
299
298
|
else {
|
|
300
|
-
elem = (React.createElement(NodeContent, { node: node, Link:
|
|
299
|
+
elem = (React.createElement(NodeContent, { node: node, Link: ReactRouterMarkdownLink, hideTryIt: hideTryIt, hideMocking: hideMocking, hideExport: hideExport, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy }));
|
|
301
300
|
}
|
|
302
301
|
const handleTocClick = () => {
|
|
303
302
|
if (container.current) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoplight/elements-dev-portal",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.8",
|
|
4
4
|
"description": "UI components for composing beautiful developer documentation.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "./index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@fortawesome/free-solid-svg-icons": "^5.10.2",
|
|
30
|
-
"@stoplight/elements-core": "~7.3.
|
|
30
|
+
"@stoplight/elements-core": "~7.3.11",
|
|
31
31
|
"@stoplight/markdown-viewer": "^5.3.2",
|
|
32
32
|
"@stoplight/mosaic": "^1.12.4",
|
|
33
33
|
"@stoplight/path": "^1.3.2",
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const appVersion = "1.4.
|
|
1
|
+
export declare const appVersion = "1.4.8";
|