@stoplight/elements-dev-portal 1.4.0 → 1.4.4
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 +1 -2
- package/index.js +16 -19
- package/index.mjs +1 -2
- package/package.json +3 -3
- package/styles.min.css +1 -1
- package/version.d.ts +1 -1
- package/web-components.min.js +1 -1
package/index.esm.js
CHANGED
|
@@ -183,7 +183,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
183
183
|
React__default.createElement(Icon, { icon: faExclamationTriangle, size: "4x" }),
|
|
184
184
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
185
185
|
|
|
186
|
-
const appVersion = '1.4.
|
|
186
|
+
const appVersion = '1.4.4';
|
|
187
187
|
|
|
188
188
|
class ResponseError extends Error {
|
|
189
189
|
constructor(message, responseCode) {
|
|
@@ -240,7 +240,6 @@ function useGetNodeContent({ nodeSlug, projectId, branchSlug, }) {
|
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
const getTableOfContents = ({ projectId, branchSlug, platformUrl = 'https://stoplight.io', platformAuthToken, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
243
|
-
console.log('version: ', appVersion);
|
|
244
243
|
const branchQuery = branchSlug ? `?branch=${branchSlug}` : '';
|
|
245
244
|
const response = yield fetch(`${platformUrl}/api/v1/projects/${projectId}/table-of-contents${branchQuery}`, {
|
|
246
245
|
headers: Object.assign({ 'Stoplight-Elements-Version': appVersion }, (platformAuthToken && { Authorization: `Bearer ${platformAuthToken}` })),
|
package/index.js
CHANGED
|
@@ -25,14 +25,12 @@ function _interopNamespace(e) {
|
|
|
25
25
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
26
26
|
Object.defineProperty(n, k, d.get ? d : {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () {
|
|
29
|
-
return e[k];
|
|
30
|
-
}
|
|
28
|
+
get: function () { return e[k]; }
|
|
31
29
|
});
|
|
32
30
|
}
|
|
33
31
|
});
|
|
34
32
|
}
|
|
35
|
-
n[
|
|
33
|
+
n["default"] = e;
|
|
36
34
|
return Object.freeze(n);
|
|
37
35
|
}
|
|
38
36
|
|
|
@@ -194,24 +192,24 @@ const TableOfContents = (_a) => {
|
|
|
194
192
|
tableOfContents.hide_powered_by ? null : (React__namespace.createElement(elementsCore.PoweredByLink, { source: activeId, pathname: typeof window !== 'undefined' ? window.location.pathname : '', packageType: "elements-dev-portal" }))));
|
|
195
193
|
};
|
|
196
194
|
|
|
197
|
-
const Forbidden = () => (React__default[
|
|
198
|
-
React__default[
|
|
199
|
-
React__default[
|
|
200
|
-
React__default[
|
|
195
|
+
const Forbidden = () => (React__default["default"].createElement(mosaic.Flex, { align: "center", justify: "center", flexGrow: true },
|
|
196
|
+
React__default["default"].createElement(mosaic.VStack, { spacing: 4, align: "center" },
|
|
197
|
+
React__default["default"].createElement(mosaic.Heading, { size: 1 }, "Forbidden"),
|
|
198
|
+
React__default["default"].createElement(mosaic.Box, { as: "p" }, "You don't have permission to access this resource"))));
|
|
201
199
|
|
|
202
|
-
const Loading = () => (React__default[
|
|
203
|
-
React__default[
|
|
200
|
+
const Loading = () => (React__default["default"].createElement(mosaic.Flex, { justify: "center", alignItems: "center", w: "full", minH: "screen", color: "muted" },
|
|
201
|
+
React__default["default"].createElement(mosaic.Icon, { icon: freeSolidSvgIcons.faCircleNotch, size: "3x", spin: true })));
|
|
204
202
|
|
|
205
|
-
const NotFound = () => (React__default[
|
|
206
|
-
React__default[
|
|
207
|
-
React__default[
|
|
208
|
-
React__default[
|
|
203
|
+
const NotFound = () => (React__default["default"].createElement(mosaic.Flex, { align: "center", justify: "center", flexGrow: true },
|
|
204
|
+
React__default["default"].createElement(mosaic.VStack, { spacing: 4, align: "center" },
|
|
205
|
+
React__default["default"].createElement(mosaic.Heading, { size: 1 }, "Not Found"),
|
|
206
|
+
React__default["default"].createElement(mosaic.Box, { as: "p" }, "Could not find what you are looking for"))));
|
|
209
207
|
|
|
210
|
-
const UpgradeToStarter = () => (React__default[
|
|
211
|
-
React__default[
|
|
212
|
-
React__default[
|
|
208
|
+
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" },
|
|
209
|
+
React__default["default"].createElement(mosaic.Icon, { icon: freeSolidSvgIcons.faExclamationTriangle, size: "4x" }),
|
|
210
|
+
React__default["default"].createElement(mosaic.Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
213
211
|
|
|
214
|
-
const appVersion = '1.4.
|
|
212
|
+
const appVersion = '1.4.4';
|
|
215
213
|
|
|
216
214
|
class ResponseError extends Error {
|
|
217
215
|
constructor(message, responseCode) {
|
|
@@ -268,7 +266,6 @@ function useGetNodeContent({ nodeSlug, projectId, branchSlug, }) {
|
|
|
268
266
|
}
|
|
269
267
|
|
|
270
268
|
const getTableOfContents = ({ projectId, branchSlug, platformUrl = 'https://stoplight.io', platformAuthToken, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
271
|
-
console.log('version: ', appVersion);
|
|
272
269
|
const branchQuery = branchSlug ? `?branch=${branchSlug}` : '';
|
|
273
270
|
const response = yield fetch(`${platformUrl}/api/v1/projects/${projectId}/table-of-contents${branchQuery}`, {
|
|
274
271
|
headers: Object.assign({ 'Stoplight-Elements-Version': appVersion }, (platformAuthToken && { Authorization: `Bearer ${platformAuthToken}` })),
|
package/index.mjs
CHANGED
|
@@ -183,7 +183,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
183
183
|
React__default.createElement(Icon, { icon: faExclamationTriangle, size: "4x" }),
|
|
184
184
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
185
185
|
|
|
186
|
-
const appVersion = '1.4.
|
|
186
|
+
const appVersion = '1.4.4';
|
|
187
187
|
|
|
188
188
|
class ResponseError extends Error {
|
|
189
189
|
constructor(message, responseCode) {
|
|
@@ -240,7 +240,6 @@ function useGetNodeContent({ nodeSlug, projectId, branchSlug, }) {
|
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
const getTableOfContents = ({ projectId, branchSlug, platformUrl = 'https://stoplight.io', platformAuthToken, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
243
|
-
console.log('version: ', appVersion);
|
|
244
243
|
const branchQuery = branchSlug ? `?branch=${branchSlug}` : '';
|
|
245
244
|
const response = yield fetch(`${platformUrl}/api/v1/projects/${projectId}/table-of-contents${branchQuery}`, {
|
|
246
245
|
headers: Object.assign({ 'Stoplight-Elements-Version': appVersion }, (platformAuthToken && { Authorization: `Bearer ${platformAuthToken}` })),
|
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.4",
|
|
4
4
|
"description": "UI components for composing beautiful developer documentation.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "./index.js",
|
|
@@ -27,9 +27,9 @@
|
|
|
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.7",
|
|
31
31
|
"@stoplight/markdown-viewer": "^5.3.2",
|
|
32
|
-
"@stoplight/mosaic": "^1.2
|
|
32
|
+
"@stoplight/mosaic": "^1.8.2",
|
|
33
33
|
"@stoplight/path": "^1.3.2",
|
|
34
34
|
"@stoplight/types": "^12.0.0",
|
|
35
35
|
"classnames": "^2.2.6",
|