@stoplight/elements-dev-portal 2.4.7 → 2.4.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 +5 -2
- package/index.js +5 -2
- package/index.mjs +5 -2
- package/package.json +2 -2
- package/version.d.ts +1 -1
- package/web-components.min.js +1 -1
- package/web-components.min.js.LICENSE.txt +0 -15
package/index.esm.js
CHANGED
|
@@ -152,7 +152,10 @@ const LinkComponent = ({ children, href, title }) => {
|
|
|
152
152
|
const [resolvedUriWithoutAnchor, hash] = resolvedUri.split('#');
|
|
153
153
|
const decodedUrl = decodeURIComponent(href);
|
|
154
154
|
const decodedResolvedUriWithoutAnchor = decodeURIComponent(resolvedUriWithoutAnchor);
|
|
155
|
-
const
|
|
155
|
+
const [pagePathWithoutHash] = window.location.pathname.split('#');
|
|
156
|
+
const edge = node.outbound_edges.find(edge => edge.uri === decodedUrl ||
|
|
157
|
+
edge.uri === decodedResolvedUriWithoutAnchor ||
|
|
158
|
+
pagePathWithoutHash === `/${edge.slug}`);
|
|
156
159
|
if (edge) {
|
|
157
160
|
return React.createElement(Link, { to: `${edge.slug}${hash ? `#${hash}` : ''}` }, children);
|
|
158
161
|
}
|
|
@@ -283,7 +286,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
283
286
|
React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
284
287
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
285
288
|
|
|
286
|
-
const appVersion = '2.4.
|
|
289
|
+
const appVersion = '2.4.9';
|
|
287
290
|
|
|
288
291
|
class ResponseError extends Error {
|
|
289
292
|
constructor(message, responseCode) {
|
package/index.js
CHANGED
|
@@ -172,7 +172,10 @@ const LinkComponent = ({ children, href, title }) => {
|
|
|
172
172
|
const [resolvedUriWithoutAnchor, hash] = resolvedUri.split('#');
|
|
173
173
|
const decodedUrl = decodeURIComponent(href);
|
|
174
174
|
const decodedResolvedUriWithoutAnchor = decodeURIComponent(resolvedUriWithoutAnchor);
|
|
175
|
-
const
|
|
175
|
+
const [pagePathWithoutHash] = window.location.pathname.split('#');
|
|
176
|
+
const edge = node.outbound_edges.find(edge => edge.uri === decodedUrl ||
|
|
177
|
+
edge.uri === decodedResolvedUriWithoutAnchor ||
|
|
178
|
+
pagePathWithoutHash === `/${edge.slug}`);
|
|
176
179
|
if (edge) {
|
|
177
180
|
return React__namespace.createElement(Link, { to: `${edge.slug}${hash ? `#${hash}` : ''}` }, children);
|
|
178
181
|
}
|
|
@@ -303,7 +306,7 @@ const UpgradeToStarter = () => (React.createElement(mosaic.Flex, { as: "a", href
|
|
|
303
306
|
React.createElement(mosaic.Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
304
307
|
React.createElement(mosaic.Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
305
308
|
|
|
306
|
-
const appVersion = '2.4.
|
|
309
|
+
const appVersion = '2.4.9';
|
|
307
310
|
|
|
308
311
|
class ResponseError extends Error {
|
|
309
312
|
constructor(message, responseCode) {
|
package/index.mjs
CHANGED
|
@@ -152,7 +152,10 @@ const LinkComponent = ({ children, href, title }) => {
|
|
|
152
152
|
const [resolvedUriWithoutAnchor, hash] = resolvedUri.split('#');
|
|
153
153
|
const decodedUrl = decodeURIComponent(href);
|
|
154
154
|
const decodedResolvedUriWithoutAnchor = decodeURIComponent(resolvedUriWithoutAnchor);
|
|
155
|
-
const
|
|
155
|
+
const [pagePathWithoutHash] = window.location.pathname.split('#');
|
|
156
|
+
const edge = node.outbound_edges.find(edge => edge.uri === decodedUrl ||
|
|
157
|
+
edge.uri === decodedResolvedUriWithoutAnchor ||
|
|
158
|
+
pagePathWithoutHash === `/${edge.slug}`);
|
|
156
159
|
if (edge) {
|
|
157
160
|
return React.createElement(Link, { to: `${edge.slug}${hash ? `#${hash}` : ''}` }, children);
|
|
158
161
|
}
|
|
@@ -283,7 +286,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
283
286
|
React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
284
287
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
285
288
|
|
|
286
|
-
const appVersion = '2.4.
|
|
289
|
+
const appVersion = '2.4.9';
|
|
287
290
|
|
|
288
291
|
class ResponseError extends Error {
|
|
289
292
|
constructor(message, responseCode) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoplight/elements-dev-portal",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.9",
|
|
4
4
|
"description": "UI components for composing beautiful developer documentation.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "./index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"react-dom": ">=16.8"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@stoplight/elements-core": "^8.4.
|
|
29
|
+
"@stoplight/elements-core": "^8.4.7",
|
|
30
30
|
"@stoplight/markdown-viewer": "^5.7.1",
|
|
31
31
|
"@stoplight/mosaic": "^1.53.4",
|
|
32
32
|
"@stoplight/path": "^1.3.2",
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const appVersion = "2.4.
|
|
1
|
+
export declare const appVersion = "2.4.9";
|