@stoplight/elements-dev-portal 3.0.5 → 3.0.7
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 +6 -7
- package/index.js +6 -7
- package/index.mjs +6 -7
- package/package.json +2 -2
- package/version.d.ts +1 -1
- package/web-components.min.js +1 -1
package/index.esm.js
CHANGED
|
@@ -292,7 +292,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
292
292
|
React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
293
293
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
294
294
|
|
|
295
|
-
const appVersion = '3.0.
|
|
295
|
+
const appVersion = '3.0.7';
|
|
296
296
|
|
|
297
297
|
class ResponseError extends Error {
|
|
298
298
|
constructor(message, responseCode) {
|
|
@@ -368,13 +368,13 @@ function useGetTableOfContents({ projectId, branchSlug }) {
|
|
|
368
368
|
}
|
|
369
369
|
|
|
370
370
|
const StoplightProjectImpl = ({ projectId, collapseTableOfContents = false }) => {
|
|
371
|
-
const { branchSlug: encodedBranchSlug = '', nodeSlug = '' } = useParams();
|
|
371
|
+
const { branchSlug: encodedBranchSlug = '', '*': nodeSlug = '' } = useParams();
|
|
372
372
|
const branchSlug = decodeURIComponent(encodedBranchSlug);
|
|
373
373
|
const navigate = useNavigate();
|
|
374
374
|
const { data: tableOfContents, isFetched: isTocFetched } = useGetTableOfContents({ projectId, branchSlug });
|
|
375
375
|
const { data: branches } = useGetBranches({ projectId });
|
|
376
376
|
const { data: node, isLoading: isLoadingNode, isError, error: nodeError, } = useGetNodeContent({
|
|
377
|
-
nodeSlug,
|
|
377
|
+
nodeSlug: nodeSlug !== null && nodeSlug !== void 0 ? nodeSlug : '',
|
|
378
378
|
projectId,
|
|
379
379
|
branchSlug,
|
|
380
380
|
});
|
|
@@ -399,7 +399,7 @@ const StoplightProjectImpl = ({ projectId, collapseTableOfContents = false }) =>
|
|
|
399
399
|
React.createElement(Outlet, { context: [isLoadingNode, isTocFetched, isError, nodeError, node] })));
|
|
400
400
|
};
|
|
401
401
|
const ProjectNode = ({ hideTryIt, hideSecurityInfo, hideServerInfo, hideMocking, hideExport, tryItCredentialsPolicy, tryItCorsProxy, }) => {
|
|
402
|
-
const { branchSlug: encodedBranchSlug = '', nodeSlug = '' } = useParams();
|
|
402
|
+
const { branchSlug: encodedBranchSlug = '', '*': nodeSlug = '' } = useParams();
|
|
403
403
|
const branchSlug = decodeURIComponent(encodedBranchSlug);
|
|
404
404
|
const [isLoadingNode, isTocFetched, isError, nodeError, node] = useOutletContext();
|
|
405
405
|
if (isLoadingNode || !isTocFetched) {
|
|
@@ -437,9 +437,8 @@ const StoplightProjectRouter = (_a) => {
|
|
|
437
437
|
const outerRouter = useInRouterContext();
|
|
438
438
|
const InternalRoutes = () => (React.createElement(Routes, null,
|
|
439
439
|
React.createElement(Route, { path: "/", element: React.createElement(StoplightProjectImpl, Object.assign({}, props)) },
|
|
440
|
-
React.createElement(Route, { path: "/branches/:branchSlug
|
|
441
|
-
React.createElement(Route, { path: "
|
|
442
|
-
React.createElement(Route, { element: React.createElement(ProjectNode, Object.assign({}, props)) }))));
|
|
440
|
+
React.createElement(Route, { path: "/branches/:branchSlug/*", element: React.createElement(ProjectNode, Object.assign({}, props)) }),
|
|
441
|
+
React.createElement(Route, { path: "/*", element: React.createElement(ProjectNode, Object.assign({}, props)) }))));
|
|
443
442
|
if (!outerRouter) {
|
|
444
443
|
return (React.createElement(DevPortalProvider, { platformUrl: platformUrl },
|
|
445
444
|
React.createElement(RouterTypeContext.Provider, { value: router },
|
package/index.js
CHANGED
|
@@ -312,7 +312,7 @@ const UpgradeToStarter = () => (React.createElement(mosaic.Flex, { as: "a", href
|
|
|
312
312
|
React.createElement(mosaic.Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
313
313
|
React.createElement(mosaic.Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
314
314
|
|
|
315
|
-
const appVersion = '3.0.
|
|
315
|
+
const appVersion = '3.0.7';
|
|
316
316
|
|
|
317
317
|
class ResponseError extends Error {
|
|
318
318
|
constructor(message, responseCode) {
|
|
@@ -388,13 +388,13 @@ function useGetTableOfContents({ projectId, branchSlug }) {
|
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
const StoplightProjectImpl = ({ projectId, collapseTableOfContents = false }) => {
|
|
391
|
-
const { branchSlug: encodedBranchSlug = '', nodeSlug = '' } = reactRouterDom.useParams();
|
|
391
|
+
const { branchSlug: encodedBranchSlug = '', '*': nodeSlug = '' } = reactRouterDom.useParams();
|
|
392
392
|
const branchSlug = decodeURIComponent(encodedBranchSlug);
|
|
393
393
|
const navigate = reactRouterDom.useNavigate();
|
|
394
394
|
const { data: tableOfContents, isFetched: isTocFetched } = useGetTableOfContents({ projectId, branchSlug });
|
|
395
395
|
const { data: branches } = useGetBranches({ projectId });
|
|
396
396
|
const { data: node, isLoading: isLoadingNode, isError, error: nodeError, } = useGetNodeContent({
|
|
397
|
-
nodeSlug,
|
|
397
|
+
nodeSlug: nodeSlug !== null && nodeSlug !== void 0 ? nodeSlug : '',
|
|
398
398
|
projectId,
|
|
399
399
|
branchSlug,
|
|
400
400
|
});
|
|
@@ -419,7 +419,7 @@ const StoplightProjectImpl = ({ projectId, collapseTableOfContents = false }) =>
|
|
|
419
419
|
React__namespace.createElement(reactRouterDom.Outlet, { context: [isLoadingNode, isTocFetched, isError, nodeError, node] })));
|
|
420
420
|
};
|
|
421
421
|
const ProjectNode = ({ hideTryIt, hideSecurityInfo, hideServerInfo, hideMocking, hideExport, tryItCredentialsPolicy, tryItCorsProxy, }) => {
|
|
422
|
-
const { branchSlug: encodedBranchSlug = '', nodeSlug = '' } = reactRouterDom.useParams();
|
|
422
|
+
const { branchSlug: encodedBranchSlug = '', '*': nodeSlug = '' } = reactRouterDom.useParams();
|
|
423
423
|
const branchSlug = decodeURIComponent(encodedBranchSlug);
|
|
424
424
|
const [isLoadingNode, isTocFetched, isError, nodeError, node] = reactRouterDom.useOutletContext();
|
|
425
425
|
if (isLoadingNode || !isTocFetched) {
|
|
@@ -457,9 +457,8 @@ const StoplightProjectRouter = (_a) => {
|
|
|
457
457
|
const outerRouter = reactRouterDom.useInRouterContext();
|
|
458
458
|
const InternalRoutes = () => (React__namespace.createElement(reactRouterDom.Routes, null,
|
|
459
459
|
React__namespace.createElement(reactRouterDom.Route, { path: "/", element: React__namespace.createElement(StoplightProjectImpl, Object.assign({}, props)) },
|
|
460
|
-
React__namespace.createElement(reactRouterDom.Route, { path: "/branches/:branchSlug
|
|
461
|
-
React__namespace.createElement(reactRouterDom.Route, { path: "
|
|
462
|
-
React__namespace.createElement(reactRouterDom.Route, { element: React__namespace.createElement(ProjectNode, Object.assign({}, props)) }))));
|
|
460
|
+
React__namespace.createElement(reactRouterDom.Route, { path: "/branches/:branchSlug/*", element: React__namespace.createElement(ProjectNode, Object.assign({}, props)) }),
|
|
461
|
+
React__namespace.createElement(reactRouterDom.Route, { path: "/*", element: React__namespace.createElement(ProjectNode, Object.assign({}, props)) }))));
|
|
463
462
|
if (!outerRouter) {
|
|
464
463
|
return (React__namespace.createElement(DevPortalProvider, { platformUrl: platformUrl },
|
|
465
464
|
React__namespace.createElement(elementsCore.RouterTypeContext.Provider, { value: router },
|
package/index.mjs
CHANGED
|
@@ -292,7 +292,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
292
292
|
React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
293
293
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
294
294
|
|
|
295
|
-
const appVersion = '3.0.
|
|
295
|
+
const appVersion = '3.0.7';
|
|
296
296
|
|
|
297
297
|
class ResponseError extends Error {
|
|
298
298
|
constructor(message, responseCode) {
|
|
@@ -368,13 +368,13 @@ function useGetTableOfContents({ projectId, branchSlug }) {
|
|
|
368
368
|
}
|
|
369
369
|
|
|
370
370
|
const StoplightProjectImpl = ({ projectId, collapseTableOfContents = false }) => {
|
|
371
|
-
const { branchSlug: encodedBranchSlug = '', nodeSlug = '' } = useParams();
|
|
371
|
+
const { branchSlug: encodedBranchSlug = '', '*': nodeSlug = '' } = useParams();
|
|
372
372
|
const branchSlug = decodeURIComponent(encodedBranchSlug);
|
|
373
373
|
const navigate = useNavigate();
|
|
374
374
|
const { data: tableOfContents, isFetched: isTocFetched } = useGetTableOfContents({ projectId, branchSlug });
|
|
375
375
|
const { data: branches } = useGetBranches({ projectId });
|
|
376
376
|
const { data: node, isLoading: isLoadingNode, isError, error: nodeError, } = useGetNodeContent({
|
|
377
|
-
nodeSlug,
|
|
377
|
+
nodeSlug: nodeSlug !== null && nodeSlug !== void 0 ? nodeSlug : '',
|
|
378
378
|
projectId,
|
|
379
379
|
branchSlug,
|
|
380
380
|
});
|
|
@@ -399,7 +399,7 @@ const StoplightProjectImpl = ({ projectId, collapseTableOfContents = false }) =>
|
|
|
399
399
|
React.createElement(Outlet, { context: [isLoadingNode, isTocFetched, isError, nodeError, node] })));
|
|
400
400
|
};
|
|
401
401
|
const ProjectNode = ({ hideTryIt, hideSecurityInfo, hideServerInfo, hideMocking, hideExport, tryItCredentialsPolicy, tryItCorsProxy, }) => {
|
|
402
|
-
const { branchSlug: encodedBranchSlug = '', nodeSlug = '' } = useParams();
|
|
402
|
+
const { branchSlug: encodedBranchSlug = '', '*': nodeSlug = '' } = useParams();
|
|
403
403
|
const branchSlug = decodeURIComponent(encodedBranchSlug);
|
|
404
404
|
const [isLoadingNode, isTocFetched, isError, nodeError, node] = useOutletContext();
|
|
405
405
|
if (isLoadingNode || !isTocFetched) {
|
|
@@ -437,9 +437,8 @@ const StoplightProjectRouter = (_a) => {
|
|
|
437
437
|
const outerRouter = useInRouterContext();
|
|
438
438
|
const InternalRoutes = () => (React.createElement(Routes, null,
|
|
439
439
|
React.createElement(Route, { path: "/", element: React.createElement(StoplightProjectImpl, Object.assign({}, props)) },
|
|
440
|
-
React.createElement(Route, { path: "/branches/:branchSlug
|
|
441
|
-
React.createElement(Route, { path: "
|
|
442
|
-
React.createElement(Route, { element: React.createElement(ProjectNode, Object.assign({}, props)) }))));
|
|
440
|
+
React.createElement(Route, { path: "/branches/:branchSlug/*", element: React.createElement(ProjectNode, Object.assign({}, props)) }),
|
|
441
|
+
React.createElement(Route, { path: "/*", element: React.createElement(ProjectNode, Object.assign({}, props)) }))));
|
|
443
442
|
if (!outerRouter) {
|
|
444
443
|
return (React.createElement(DevPortalProvider, { platformUrl: platformUrl },
|
|
445
444
|
React.createElement(RouterTypeContext.Provider, { value: router },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoplight/elements-dev-portal",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
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": "~9.0.
|
|
29
|
+
"@stoplight/elements-core": "~9.0.6",
|
|
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 = "3.0.
|
|
1
|
+
export declare const appVersion = "3.0.7";
|