@stoplight/elements-dev-portal 1.7.4 → 1.8.0
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/components/NodeContent/NodeContent.d.ts +6 -8
- package/index.esm.js +26 -4
- package/index.js +28 -6
- package/index.mjs +26 -4
- package/package.json +4 -5
- package/styles.min.css +1 -1
- package/version.d.ts +1 -1
- package/web-components.min.js +1 -1
- package/web-components.min.js.LICENSE.txt +2 -1
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { CustomLinkComponent, ReferenceResolver } from '@stoplight/elements-core';
|
|
1
|
+
import { CustomLinkComponent, DocsProps, ReferenceResolver } from '@stoplight/elements-core';
|
|
2
2
|
import { Node } from '../../types';
|
|
3
|
+
declare type DocsBaseProps = Pick<DocsProps, 'tryItCorsProxy' | 'tryItCredentialsPolicy'>;
|
|
4
|
+
declare type DocsLayoutProps = Pick<Required<DocsProps>['layoutOptions'], 'compact' | 'hideTryIt' | 'hideTryItPanel' | 'hideExport'>;
|
|
3
5
|
export declare type NodeContentProps = {
|
|
4
6
|
node: Node;
|
|
5
7
|
Link: CustomLinkComponent;
|
|
6
|
-
hideTryIt?: boolean;
|
|
7
|
-
hideTryItPanel?: boolean;
|
|
8
8
|
hideMocking?: boolean;
|
|
9
|
-
hideExport?: boolean;
|
|
10
|
-
tryItCredentialsPolicy?: 'omit' | 'include' | 'same-origin';
|
|
11
|
-
tryItCorsProxy?: string;
|
|
12
9
|
refResolver?: ReferenceResolver;
|
|
13
|
-
};
|
|
14
|
-
export declare const NodeContent: ({ node, Link,
|
|
10
|
+
} & DocsBaseProps & DocsLayoutProps;
|
|
11
|
+
export declare const NodeContent: ({ node, Link, hideMocking, refResolver, tryItCorsProxy, tryItCredentialsPolicy, compact, hideTryIt, hideTryItPanel, hideExport, }: NodeContentProps) => JSX.Element;
|
|
15
12
|
export declare const getNodeUriParts: (uri: string) => {
|
|
16
13
|
fileUri: string;
|
|
17
14
|
pointer: string;
|
|
18
15
|
};
|
|
16
|
+
export {};
|
package/index.esm.js
CHANGED
|
@@ -4,7 +4,6 @@ import React__default, { useRef, useEffect, useMemo, useCallback, useState } fro
|
|
|
4
4
|
import { withPersistenceBoundary, withQueryClientProvider, withMosaicProvider, MarkdownComponentsProvider, MockingProvider, Docs, withStyles, 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
|
-
import { faSpinner, faSearch, faCircleNotch, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
|
|
8
7
|
import flow from 'lodash/flow.js';
|
|
9
8
|
import { Route, useParams, useHistory, Redirect, Link } from 'react-router-dom';
|
|
10
9
|
import { useQuery } from 'react-query';
|
|
@@ -38,11 +37,12 @@ const PlatformProvider = ({ platformUrl = 'https://stoplight.io', platformAuthTo
|
|
|
38
37
|
};
|
|
39
38
|
const DevPortalProvider = withPersistenceBoundary(withQueryClientProvider(withMosaicProvider(PlatformProvider)));
|
|
40
39
|
|
|
41
|
-
const NodeContent = ({ node, Link,
|
|
40
|
+
const NodeContent = ({ node, Link, hideMocking, refResolver, tryItCorsProxy, tryItCredentialsPolicy, compact, hideTryIt, hideTryItPanel, hideExport, }) => {
|
|
42
41
|
return (React.createElement(NodeLinkContext.Provider, { value: [node, Link] },
|
|
43
42
|
React.createElement(MarkdownComponentsProvider, { value: { a: LinkComponent } },
|
|
44
43
|
React.createElement(MockingProvider, { mockUrl: node.links.mock_url, hideMocking: hideMocking },
|
|
45
44
|
React.createElement(Docs, { nodeType: node.type, nodeData: node.data, nodeTitle: node.title, layoutOptions: {
|
|
45
|
+
compact,
|
|
46
46
|
hideTryIt: hideTryIt,
|
|
47
47
|
hideTryItPanel: hideTryItPanel,
|
|
48
48
|
hideExport: hideExport || node.links.export_url === undefined,
|
|
@@ -103,6 +103,28 @@ const getNodeUriParts = (uri) => {
|
|
|
103
103
|
return { fileUri, pointer: parts[2] || '' };
|
|
104
104
|
};
|
|
105
105
|
|
|
106
|
+
/*!
|
|
107
|
+
* Font Awesome Free 6.1.1 by @fontawesome - https://fontawesome.com
|
|
108
|
+
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
109
|
+
* Copyright 2022 Fonticons, Inc.
|
|
110
|
+
*/
|
|
111
|
+
var faCircleNotch = {
|
|
112
|
+
prefix: 'fas',
|
|
113
|
+
iconName: 'circle-notch',
|
|
114
|
+
icon: [512, 512, [], "f1ce", "M222.7 32.15C227.7 49.08 218.1 66.9 201.1 71.94C121.8 95.55 64 169.1 64 255.1C64 362 149.1 447.1 256 447.1C362 447.1 448 362 448 255.1C448 169.1 390.2 95.55 310.9 71.94C293.9 66.9 284.3 49.08 289.3 32.15C294.4 15.21 312.2 5.562 329.1 10.6C434.9 42.07 512 139.1 512 255.1C512 397.4 397.4 511.1 256 511.1C114.6 511.1 0 397.4 0 255.1C0 139.1 77.15 42.07 182.9 10.6C199.8 5.562 217.6 15.21 222.7 32.15V32.15z"]
|
|
115
|
+
};
|
|
116
|
+
var faMagnifyingGlass = {
|
|
117
|
+
prefix: 'fas',
|
|
118
|
+
iconName: 'magnifying-glass',
|
|
119
|
+
icon: [512, 512, [128269, "search"], "f002", "M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z"]
|
|
120
|
+
};
|
|
121
|
+
var faSearch = faMagnifyingGlass;
|
|
122
|
+
var faSpinner = {
|
|
123
|
+
prefix: 'fas',
|
|
124
|
+
iconName: 'spinner',
|
|
125
|
+
icon: [512, 512, [], "f110", "M304 48C304 74.51 282.5 96 256 96C229.5 96 208 74.51 208 48C208 21.49 229.5 0 256 0C282.5 0 304 21.49 304 48zM304 464C304 490.5 282.5 512 256 512C229.5 512 208 490.5 208 464C208 437.5 229.5 416 256 416C282.5 416 304 437.5 304 464zM0 256C0 229.5 21.49 208 48 208C74.51 208 96 229.5 96 256C96 282.5 74.51 304 48 304C21.49 304 0 282.5 0 256zM512 256C512 282.5 490.5 304 464 304C437.5 304 416 282.5 416 256C416 229.5 437.5 208 464 208C490.5 208 512 229.5 512 256zM74.98 437C56.23 418.3 56.23 387.9 74.98 369.1C93.73 350.4 124.1 350.4 142.9 369.1C161.6 387.9 161.6 418.3 142.9 437C124.1 455.8 93.73 455.8 74.98 437V437zM142.9 142.9C124.1 161.6 93.73 161.6 74.98 142.9C56.24 124.1 56.24 93.73 74.98 74.98C93.73 56.23 124.1 56.23 142.9 74.98C161.6 93.73 161.6 124.1 142.9 142.9zM369.1 369.1C387.9 350.4 418.3 350.4 437 369.1C455.8 387.9 455.8 418.3 437 437C418.3 455.8 387.9 455.8 369.1 437C350.4 418.3 350.4 387.9 369.1 369.1V369.1z"]
|
|
126
|
+
};
|
|
127
|
+
|
|
106
128
|
const SearchImpl = ({ isLoading, search, searchResults, isOpen, onClose, onClick, onSearch }) => {
|
|
107
129
|
const listBoxRef = React.useRef(null);
|
|
108
130
|
const onChange = React.useCallback(e => onSearch(e.currentTarget.value), [onSearch]);
|
|
@@ -215,10 +237,10 @@ const NotFound = () => (React__default.createElement(Flex, { align: "center", ju
|
|
|
215
237
|
React__default.createElement(Box, { as: "p" }, "Could not find what you are looking for"))));
|
|
216
238
|
|
|
217
239
|
const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", href: "https://stoplight.io/pricing/", target: "_blank", rel: "noreferrer noopener", justify: "center", alignItems: "center", w: "full", minH: "screen", color: "muted", flexDirection: "col" },
|
|
218
|
-
React__default.createElement(Icon, { icon:
|
|
240
|
+
React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
219
241
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
220
242
|
|
|
221
|
-
const appVersion = '1.
|
|
243
|
+
const appVersion = '1.8.0';
|
|
222
244
|
|
|
223
245
|
class ResponseError extends Error {
|
|
224
246
|
constructor(message, responseCode) {
|
package/index.js
CHANGED
|
@@ -7,7 +7,6 @@ var React = require('react');
|
|
|
7
7
|
var elementsCore = require('@stoplight/elements-core');
|
|
8
8
|
var path = require('@stoplight/path');
|
|
9
9
|
var types = require('@stoplight/types');
|
|
10
|
-
var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
|
|
11
10
|
var flow = require('lodash/flow.js');
|
|
12
11
|
var reactRouterDom = require('react-router-dom');
|
|
13
12
|
var reactQuery = require('react-query');
|
|
@@ -65,11 +64,12 @@ const PlatformProvider = ({ platformUrl = 'https://stoplight.io', platformAuthTo
|
|
|
65
64
|
};
|
|
66
65
|
const DevPortalProvider = elementsCore.withPersistenceBoundary(elementsCore.withQueryClientProvider(elementsCore.withMosaicProvider(PlatformProvider)));
|
|
67
66
|
|
|
68
|
-
const NodeContent = ({ node, Link,
|
|
67
|
+
const NodeContent = ({ node, Link, hideMocking, refResolver, tryItCorsProxy, tryItCredentialsPolicy, compact, hideTryIt, hideTryItPanel, hideExport, }) => {
|
|
69
68
|
return (React__namespace.createElement(NodeLinkContext.Provider, { value: [node, Link] },
|
|
70
69
|
React__namespace.createElement(elementsCore.MarkdownComponentsProvider, { value: { a: LinkComponent } },
|
|
71
70
|
React__namespace.createElement(elementsCore.MockingProvider, { mockUrl: node.links.mock_url, hideMocking: hideMocking },
|
|
72
71
|
React__namespace.createElement(elementsCore.Docs, { nodeType: node.type, nodeData: node.data, nodeTitle: node.title, layoutOptions: {
|
|
72
|
+
compact,
|
|
73
73
|
hideTryIt: hideTryIt,
|
|
74
74
|
hideTryItPanel: hideTryItPanel,
|
|
75
75
|
hideExport: hideExport || node.links.export_url === undefined,
|
|
@@ -130,6 +130,28 @@ const getNodeUriParts = (uri) => {
|
|
|
130
130
|
return { fileUri, pointer: parts[2] || '' };
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
+
/*!
|
|
134
|
+
* Font Awesome Free 6.1.1 by @fontawesome - https://fontawesome.com
|
|
135
|
+
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
136
|
+
* Copyright 2022 Fonticons, Inc.
|
|
137
|
+
*/
|
|
138
|
+
var faCircleNotch = {
|
|
139
|
+
prefix: 'fas',
|
|
140
|
+
iconName: 'circle-notch',
|
|
141
|
+
icon: [512, 512, [], "f1ce", "M222.7 32.15C227.7 49.08 218.1 66.9 201.1 71.94C121.8 95.55 64 169.1 64 255.1C64 362 149.1 447.1 256 447.1C362 447.1 448 362 448 255.1C448 169.1 390.2 95.55 310.9 71.94C293.9 66.9 284.3 49.08 289.3 32.15C294.4 15.21 312.2 5.562 329.1 10.6C434.9 42.07 512 139.1 512 255.1C512 397.4 397.4 511.1 256 511.1C114.6 511.1 0 397.4 0 255.1C0 139.1 77.15 42.07 182.9 10.6C199.8 5.562 217.6 15.21 222.7 32.15V32.15z"]
|
|
142
|
+
};
|
|
143
|
+
var faMagnifyingGlass = {
|
|
144
|
+
prefix: 'fas',
|
|
145
|
+
iconName: 'magnifying-glass',
|
|
146
|
+
icon: [512, 512, [128269, "search"], "f002", "M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z"]
|
|
147
|
+
};
|
|
148
|
+
var faSearch = faMagnifyingGlass;
|
|
149
|
+
var faSpinner = {
|
|
150
|
+
prefix: 'fas',
|
|
151
|
+
iconName: 'spinner',
|
|
152
|
+
icon: [512, 512, [], "f110", "M304 48C304 74.51 282.5 96 256 96C229.5 96 208 74.51 208 48C208 21.49 229.5 0 256 0C282.5 0 304 21.49 304 48zM304 464C304 490.5 282.5 512 256 512C229.5 512 208 490.5 208 464C208 437.5 229.5 416 256 416C282.5 416 304 437.5 304 464zM0 256C0 229.5 21.49 208 48 208C74.51 208 96 229.5 96 256C96 282.5 74.51 304 48 304C21.49 304 0 282.5 0 256zM512 256C512 282.5 490.5 304 464 304C437.5 304 416 282.5 416 256C416 229.5 437.5 208 464 208C490.5 208 512 229.5 512 256zM74.98 437C56.23 418.3 56.23 387.9 74.98 369.1C93.73 350.4 124.1 350.4 142.9 369.1C161.6 387.9 161.6 418.3 142.9 437C124.1 455.8 93.73 455.8 74.98 437V437zM142.9 142.9C124.1 161.6 93.73 161.6 74.98 142.9C56.24 124.1 56.24 93.73 74.98 74.98C93.73 56.23 124.1 56.23 142.9 74.98C161.6 93.73 161.6 124.1 142.9 142.9zM369.1 369.1C387.9 350.4 418.3 350.4 437 369.1C455.8 387.9 455.8 418.3 437 437C418.3 455.8 387.9 455.8 369.1 437C350.4 418.3 350.4 387.9 369.1 369.1V369.1z"]
|
|
153
|
+
};
|
|
154
|
+
|
|
133
155
|
const SearchImpl = ({ isLoading, search, searchResults, isOpen, onClose, onClick, onSearch }) => {
|
|
134
156
|
const listBoxRef = React__namespace.useRef(null);
|
|
135
157
|
const onChange = React__namespace.useCallback(e => onSearch(e.currentTarget.value), [onSearch]);
|
|
@@ -147,7 +169,7 @@ const SearchImpl = ({ isLoading, search, searchResults, isOpen, onClose, onClick
|
|
|
147
169
|
onClick(selectedResult);
|
|
148
170
|
}
|
|
149
171
|
}, [searchResults, onClick]);
|
|
150
|
-
return (React__namespace.createElement(mosaic.Modal, { renderHeader: () => (React__namespace.createElement(mosaic.Input, { appearance: "minimal", borderB: true, size: "lg", icon: React__namespace.createElement(mosaic.Box, { as: mosaic.Icon, ml: 1, icon: isLoading ?
|
|
172
|
+
return (React__namespace.createElement(mosaic.Modal, { renderHeader: () => (React__namespace.createElement(mosaic.Input, { appearance: "minimal", borderB: true, size: "lg", icon: React__namespace.createElement(mosaic.Box, { as: mosaic.Icon, ml: 1, icon: isLoading ? faSpinner : faSearch, spin: isLoading }), autoFocus: true, placeholder: "Search...", value: search, onChange: onChange, onKeyDown: onKeyDown })), isOpen: !!isOpen, onClose: onClose }, searchResults && searchResults.length > 0 ? (React__namespace.createElement(mosaic.ListBox, { ref: listBoxRef, "aria-label": "Search", overflowY: "auto", h: 80, m: -5, items: searchResults, selectionMode: "single", onSelectionChange: onSelectionChange }, (searchResult) => {
|
|
151
173
|
var _a, _b;
|
|
152
174
|
return (React__namespace.createElement(mosaic.ListBoxItem, { key: `${searchResult.id}-${searchResult.project_id}`, textValue: searchResult.title },
|
|
153
175
|
React__namespace.createElement(mosaic.Box, { p: 3, borderB: true },
|
|
@@ -234,7 +256,7 @@ const Forbidden = () => (React__default["default"].createElement(mosaic.Flex, {
|
|
|
234
256
|
React__default["default"].createElement(mosaic.Box, { as: "p" }, "You don't have permission to access this resource"))));
|
|
235
257
|
|
|
236
258
|
const Loading = () => (React__default["default"].createElement(mosaic.Flex, { justify: "center", alignItems: "center", w: "full", minH: "screen", color: "muted" },
|
|
237
|
-
React__default["default"].createElement(mosaic.Icon, { icon:
|
|
259
|
+
React__default["default"].createElement(mosaic.Icon, { icon: faCircleNotch, size: "3x", spin: true })));
|
|
238
260
|
|
|
239
261
|
const NotFound = () => (React__default["default"].createElement(mosaic.Flex, { align: "center", justify: "center", flexGrow: true },
|
|
240
262
|
React__default["default"].createElement(mosaic.VStack, { spacing: 4, align: "center" },
|
|
@@ -242,10 +264,10 @@ const NotFound = () => (React__default["default"].createElement(mosaic.Flex, { a
|
|
|
242
264
|
React__default["default"].createElement(mosaic.Box, { as: "p" }, "Could not find what you are looking for"))));
|
|
243
265
|
|
|
244
266
|
const UpgradeToStarter = () => (React__default["default"].createElement(mosaic.Flex, { as: "a", href: "https://stoplight.io/pricing/", target: "_blank", rel: "noreferrer noopener", justify: "center", alignItems: "center", w: "full", minH: "screen", color: "muted", flexDirection: "col" },
|
|
245
|
-
React__default["default"].createElement(mosaic.Icon, { icon:
|
|
267
|
+
React__default["default"].createElement(mosaic.Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
246
268
|
React__default["default"].createElement(mosaic.Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
247
269
|
|
|
248
|
-
const appVersion = '1.
|
|
270
|
+
const appVersion = '1.8.0';
|
|
249
271
|
|
|
250
272
|
class ResponseError extends Error {
|
|
251
273
|
constructor(message, responseCode) {
|
package/index.mjs
CHANGED
|
@@ -4,7 +4,6 @@ import React__default, { useRef, useEffect, useMemo, useCallback, useState } fro
|
|
|
4
4
|
import { withPersistenceBoundary, withQueryClientProvider, withMosaicProvider, MarkdownComponentsProvider, MockingProvider, Docs, withStyles, 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
|
-
import { faSpinner, faSearch, faCircleNotch, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
|
|
8
7
|
import flow from 'lodash/flow.js';
|
|
9
8
|
import { Route, useParams, useHistory, Redirect, Link } from 'react-router-dom';
|
|
10
9
|
import { useQuery } from 'react-query';
|
|
@@ -38,11 +37,12 @@ const PlatformProvider = ({ platformUrl = 'https://stoplight.io', platformAuthTo
|
|
|
38
37
|
};
|
|
39
38
|
const DevPortalProvider = withPersistenceBoundary(withQueryClientProvider(withMosaicProvider(PlatformProvider)));
|
|
40
39
|
|
|
41
|
-
const NodeContent = ({ node, Link,
|
|
40
|
+
const NodeContent = ({ node, Link, hideMocking, refResolver, tryItCorsProxy, tryItCredentialsPolicy, compact, hideTryIt, hideTryItPanel, hideExport, }) => {
|
|
42
41
|
return (React.createElement(NodeLinkContext.Provider, { value: [node, Link] },
|
|
43
42
|
React.createElement(MarkdownComponentsProvider, { value: { a: LinkComponent } },
|
|
44
43
|
React.createElement(MockingProvider, { mockUrl: node.links.mock_url, hideMocking: hideMocking },
|
|
45
44
|
React.createElement(Docs, { nodeType: node.type, nodeData: node.data, nodeTitle: node.title, layoutOptions: {
|
|
45
|
+
compact,
|
|
46
46
|
hideTryIt: hideTryIt,
|
|
47
47
|
hideTryItPanel: hideTryItPanel,
|
|
48
48
|
hideExport: hideExport || node.links.export_url === undefined,
|
|
@@ -103,6 +103,28 @@ const getNodeUriParts = (uri) => {
|
|
|
103
103
|
return { fileUri, pointer: parts[2] || '' };
|
|
104
104
|
};
|
|
105
105
|
|
|
106
|
+
/*!
|
|
107
|
+
* Font Awesome Free 6.1.1 by @fontawesome - https://fontawesome.com
|
|
108
|
+
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
109
|
+
* Copyright 2022 Fonticons, Inc.
|
|
110
|
+
*/
|
|
111
|
+
var faCircleNotch = {
|
|
112
|
+
prefix: 'fas',
|
|
113
|
+
iconName: 'circle-notch',
|
|
114
|
+
icon: [512, 512, [], "f1ce", "M222.7 32.15C227.7 49.08 218.1 66.9 201.1 71.94C121.8 95.55 64 169.1 64 255.1C64 362 149.1 447.1 256 447.1C362 447.1 448 362 448 255.1C448 169.1 390.2 95.55 310.9 71.94C293.9 66.9 284.3 49.08 289.3 32.15C294.4 15.21 312.2 5.562 329.1 10.6C434.9 42.07 512 139.1 512 255.1C512 397.4 397.4 511.1 256 511.1C114.6 511.1 0 397.4 0 255.1C0 139.1 77.15 42.07 182.9 10.6C199.8 5.562 217.6 15.21 222.7 32.15V32.15z"]
|
|
115
|
+
};
|
|
116
|
+
var faMagnifyingGlass = {
|
|
117
|
+
prefix: 'fas',
|
|
118
|
+
iconName: 'magnifying-glass',
|
|
119
|
+
icon: [512, 512, [128269, "search"], "f002", "M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z"]
|
|
120
|
+
};
|
|
121
|
+
var faSearch = faMagnifyingGlass;
|
|
122
|
+
var faSpinner = {
|
|
123
|
+
prefix: 'fas',
|
|
124
|
+
iconName: 'spinner',
|
|
125
|
+
icon: [512, 512, [], "f110", "M304 48C304 74.51 282.5 96 256 96C229.5 96 208 74.51 208 48C208 21.49 229.5 0 256 0C282.5 0 304 21.49 304 48zM304 464C304 490.5 282.5 512 256 512C229.5 512 208 490.5 208 464C208 437.5 229.5 416 256 416C282.5 416 304 437.5 304 464zM0 256C0 229.5 21.49 208 48 208C74.51 208 96 229.5 96 256C96 282.5 74.51 304 48 304C21.49 304 0 282.5 0 256zM512 256C512 282.5 490.5 304 464 304C437.5 304 416 282.5 416 256C416 229.5 437.5 208 464 208C490.5 208 512 229.5 512 256zM74.98 437C56.23 418.3 56.23 387.9 74.98 369.1C93.73 350.4 124.1 350.4 142.9 369.1C161.6 387.9 161.6 418.3 142.9 437C124.1 455.8 93.73 455.8 74.98 437V437zM142.9 142.9C124.1 161.6 93.73 161.6 74.98 142.9C56.24 124.1 56.24 93.73 74.98 74.98C93.73 56.23 124.1 56.23 142.9 74.98C161.6 93.73 161.6 124.1 142.9 142.9zM369.1 369.1C387.9 350.4 418.3 350.4 437 369.1C455.8 387.9 455.8 418.3 437 437C418.3 455.8 387.9 455.8 369.1 437C350.4 418.3 350.4 387.9 369.1 369.1V369.1z"]
|
|
126
|
+
};
|
|
127
|
+
|
|
106
128
|
const SearchImpl = ({ isLoading, search, searchResults, isOpen, onClose, onClick, onSearch }) => {
|
|
107
129
|
const listBoxRef = React.useRef(null);
|
|
108
130
|
const onChange = React.useCallback(e => onSearch(e.currentTarget.value), [onSearch]);
|
|
@@ -215,10 +237,10 @@ const NotFound = () => (React__default.createElement(Flex, { align: "center", ju
|
|
|
215
237
|
React__default.createElement(Box, { as: "p" }, "Could not find what you are looking for"))));
|
|
216
238
|
|
|
217
239
|
const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", href: "https://stoplight.io/pricing/", target: "_blank", rel: "noreferrer noopener", justify: "center", alignItems: "center", w: "full", minH: "screen", color: "muted", flexDirection: "col" },
|
|
218
|
-
React__default.createElement(Icon, { icon:
|
|
240
|
+
React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
219
241
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
220
242
|
|
|
221
|
-
const appVersion = '1.
|
|
243
|
+
const appVersion = '1.8.0';
|
|
222
244
|
|
|
223
245
|
class ResponseError extends Error {
|
|
224
246
|
constructor(message, responseCode) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoplight/elements-dev-portal",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "UI components for composing beautiful developer documentation.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "./index.js",
|
|
@@ -26,10 +26,9 @@
|
|
|
26
26
|
"react-dom": ">=16.8"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@
|
|
30
|
-
"@stoplight/
|
|
31
|
-
"@stoplight/
|
|
32
|
-
"@stoplight/mosaic": "^1.16.2",
|
|
29
|
+
"@stoplight/elements-core": "~7.6.0",
|
|
30
|
+
"@stoplight/markdown-viewer": "^5.5.0",
|
|
31
|
+
"@stoplight/mosaic": "^1.24.0",
|
|
33
32
|
"@stoplight/path": "^1.3.2",
|
|
34
33
|
"@stoplight/types": "^13.0.0",
|
|
35
34
|
"classnames": "^2.2.6",
|