@stoplight/elements-dev-portal 3.0.16-beta-0.3 → 3.0.17
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/{dist/index.esm.js → index.esm.js} +6 -6
- package/{dist/index.js → index.js} +4 -4
- package/{dist/index.mjs → index.mjs} +6 -6
- package/package.json +17 -71
- package/version.d.ts +1 -0
- package/web-components.min.js +2 -0
- package/.storybook/main.js +0 -6
- package/.storybook/manager.js +0 -1
- package/.storybook/preview.jsx +0 -46
- package/dist/LICENSE +0 -190
- package/dist/README.md +0 -22
- package/dist/package.json +0 -51
- package/dist/version.d.ts +0 -1
- package/dist/web-components.min.js +0 -2
- package/jest.config.js +0 -10
- package/src/__fixtures__/branches.json +0 -28
- package/src/__fixtures__/node-content.json +0 -257
- package/src/__fixtures__/table-of-contents.json +0 -144
- package/src/components/BranchSelector/BranchSelector.spec.tsx +0 -61
- package/src/components/BranchSelector/BranchSelector.stories.tsx +0 -41
- package/src/components/BranchSelector/BranchSelector.tsx +0 -50
- package/src/components/BranchSelector/index.tsx +0 -1
- package/src/components/DevPortalProvider/index.tsx +0 -25
- package/src/components/Forbidden.tsx +0 -11
- package/src/components/Loading.tsx +0 -9
- package/src/components/NodeContent/NodeContent.spec.tsx +0 -128
- package/src/components/NodeContent/NodeContent.stories.tsx +0 -60
- package/src/components/NodeContent/NodeContent.tsx +0 -234
- package/src/components/NodeContent/index.tsx +0 -1
- package/src/components/NotFound.tsx +0 -11
- package/src/components/Search/Search.stories.tsx +0 -151
- package/src/components/Search/Search.tsx +0 -161
- package/src/components/Search/SearchOverlay.tsx +0 -88
- package/src/components/Search/index.tsx +0 -1
- package/src/components/TableOfContents/TableOfContents.stories.tsx +0 -68
- package/src/components/TableOfContents/TableOfContents.tsx +0 -54
- package/src/components/TableOfContents/index.tsx +0 -1
- package/src/components/UpgradeToStarter.tsx +0 -22
- package/src/consts.ts +0 -32
- package/src/containers/StoplightProject.spec.tsx +0 -78
- package/src/containers/StoplightProject.stories.tsx +0 -28
- package/src/containers/StoplightProject.tsx +0 -269
- package/src/handlers/__tests__/getBranches.test.ts +0 -30
- package/src/handlers/__tests__/getNodeContent.test.ts +0 -35
- package/src/handlers/__tests__/getNodes.test.ts +0 -38
- package/src/handlers/__tests__/getTableOfContents.test.ts +0 -34
- package/src/handlers/__tests__/getWorkspace.test.ts +0 -30
- package/src/handlers/getBranches.ts +0 -27
- package/src/handlers/getNodeContent.ts +0 -53
- package/src/handlers/getNodes.ts +0 -69
- package/src/handlers/getTableOfContents.ts +0 -30
- package/src/handlers/getWorkspace.ts +0 -27
- package/src/hooks/__tests__/dataFetching.spec.tsx +0 -42
- package/src/hooks/useGetBranches.ts +0 -17
- package/src/hooks/useGetNodeContent.ts +0 -24
- package/src/hooks/useGetNodes.ts +0 -34
- package/src/hooks/useGetTableOfContents.ts +0 -17
- package/src/hooks/useGetWorkspace.tsx +0 -13
- package/src/index.ts +0 -25
- package/src/styles.css +0 -1
- package/src/types.ts +0 -84
- package/src/version.ts +0 -2
- package/src/web-components/__stories__/StoplightProject.stories.tsx +0 -33
- package/src/web-components/components.ts +0 -19
- package/src/web-components/index.ts +0 -3
- package/tsconfig.build.json +0 -18
- package/tsconfig.json +0 -7
- package/web-components.config.js +0 -1
- /package/{dist/components → components}/BranchSelector/BranchSelector.d.ts +0 -0
- /package/{dist/components → components}/BranchSelector/BranchSelector.spec.d.ts +0 -0
- /package/{dist/components → components}/BranchSelector/BranchSelector.stories.d.ts +0 -0
- /package/{dist/components → components}/BranchSelector/index.d.ts +0 -0
- /package/{dist/components → components}/DevPortalProvider/index.d.ts +0 -0
- /package/{dist/components → components}/Forbidden.d.ts +0 -0
- /package/{dist/components → components}/Loading.d.ts +0 -0
- /package/{dist/components → components}/NodeContent/NodeContent.d.ts +0 -0
- /package/{dist/components → components}/NodeContent/NodeContent.spec.d.ts +0 -0
- /package/{dist/components → components}/NodeContent/NodeContent.stories.d.ts +0 -0
- /package/{dist/components → components}/NodeContent/index.d.ts +0 -0
- /package/{dist/components → components}/NotFound.d.ts +0 -0
- /package/{dist/components → components}/Search/Search.d.ts +0 -0
- /package/{dist/components → components}/Search/Search.stories.d.ts +0 -0
- /package/{dist/components → components}/Search/SearchOverlay.d.ts +0 -0
- /package/{dist/components → components}/Search/index.d.ts +0 -0
- /package/{dist/components → components}/TableOfContents/TableOfContents.d.ts +0 -0
- /package/{dist/components → components}/TableOfContents/TableOfContents.stories.d.ts +0 -0
- /package/{dist/components → components}/TableOfContents/index.d.ts +0 -0
- /package/{dist/components → components}/UpgradeToStarter.d.ts +0 -0
- /package/{dist/consts.d.ts → consts.d.ts} +0 -0
- /package/{dist/containers → containers}/StoplightProject.d.ts +0 -0
- /package/{dist/containers → containers}/StoplightProject.spec.d.ts +0 -0
- /package/{dist/containers → containers}/StoplightProject.stories.d.ts +0 -0
- /package/{dist/handlers → handlers}/getBranches.d.ts +0 -0
- /package/{dist/handlers → handlers}/getNodeContent.d.ts +0 -0
- /package/{dist/handlers → handlers}/getNodes.d.ts +0 -0
- /package/{dist/handlers → handlers}/getTableOfContents.d.ts +0 -0
- /package/{dist/handlers → handlers}/getWorkspace.d.ts +0 -0
- /package/{dist/hooks → hooks}/useGetBranches.d.ts +0 -0
- /package/{dist/hooks → hooks}/useGetNodeContent.d.ts +0 -0
- /package/{dist/hooks → hooks}/useGetNodes.d.ts +0 -0
- /package/{dist/hooks → hooks}/useGetTableOfContents.d.ts +0 -0
- /package/{dist/hooks → hooks}/useGetWorkspace.d.ts +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/styles.min.css → styles.min.css} +0 -0
- /package/{dist/types.d.ts → types.d.ts} +0 -0
- /package/{dist/web-components → web-components}/components.d.ts +0 -0
- /package/{dist/web-components → web-components}/index.d.ts +0 -0
- /package/{dist/web-components.min.js.LICENSE.txt → web-components.min.js.LICENSE.txt} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Menu, FieldButton,
|
|
1
|
+
import { Menu, FieldButton, ListBox, ListBoxItem, Box, Flex, Icon, Modal, Input, VStack, Heading } from '@stoplight/mosaic';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { useRef, useEffect, useMemo, useCallback, useState } from 'react';
|
|
4
|
-
import { withPersistenceBoundary, withQueryClientProvider, withMosaicProvider, MarkdownComponentsProvider, LinkHeading, MockingProvider, Docs, RouterTypeContext, withStyles,
|
|
4
|
+
import { withPersistenceBoundary, withQueryClientProvider, withMosaicProvider, MarkdownComponentsProvider, LinkHeading, MockingProvider, Docs, RouterTypeContext, withStyles, NodeTypeColors, NodeTypeIconDefs, TableOfContents as TableOfContents$1, PoweredByLink, useRouter, findFirstNode, SidebarLayout, ScrollToHashElement, ReactRouterMarkdownLink } from '@stoplight/elements-core';
|
|
5
5
|
import { resolve, dirname } from '@stoplight/path';
|
|
6
6
|
import { NodeType } from '@stoplight/types';
|
|
7
7
|
import { useLocation, useInRouterContext, Routes, Route, useParams, useNavigate, Navigate, Link, Outlet, useOutletContext } from 'react-router-dom';
|
|
@@ -87,15 +87,15 @@ const NodeContent = ({ node, Link, hideMocking, refResolver, maxRefDepth, tryItC
|
|
|
87
87
|
React.createElement(MarkdownComponentsProvider, { value: {
|
|
88
88
|
a: LinkComponent,
|
|
89
89
|
h2: (_a) => {
|
|
90
|
-
var props = __rest(_a, ["color"]);
|
|
90
|
+
var { color } = _a, props = __rest(_a, ["color"]);
|
|
91
91
|
return React.createElement(LinkHeading, Object.assign({ size: 2 }, props));
|
|
92
92
|
},
|
|
93
93
|
h3: (_a) => {
|
|
94
|
-
var props = __rest(_a, ["color"]);
|
|
94
|
+
var { color } = _a, props = __rest(_a, ["color"]);
|
|
95
95
|
return React.createElement(LinkHeading, Object.assign({ size: 3 }, props));
|
|
96
96
|
},
|
|
97
97
|
h4: (_a) => {
|
|
98
|
-
var props = __rest(_a, ["color"]);
|
|
98
|
+
var { color } = _a, props = __rest(_a, ["color"]);
|
|
99
99
|
return React.createElement(LinkHeading, Object.assign({ size: 4 }, props));
|
|
100
100
|
},
|
|
101
101
|
} },
|
|
@@ -300,7 +300,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
300
300
|
React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
301
301
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
302
302
|
|
|
303
|
-
const appVersion = '3.0.
|
|
303
|
+
const appVersion = '3.0.17';
|
|
304
304
|
|
|
305
305
|
class ResponseError extends Error {
|
|
306
306
|
constructor(message, responseCode) {
|
|
@@ -107,15 +107,15 @@ const NodeContent = ({ node, Link, hideMocking, refResolver, maxRefDepth, tryItC
|
|
|
107
107
|
React__namespace.createElement(elementsCore.MarkdownComponentsProvider, { value: {
|
|
108
108
|
a: LinkComponent,
|
|
109
109
|
h2: (_a) => {
|
|
110
|
-
var props = __rest(_a, ["color"]);
|
|
110
|
+
var { color } = _a, props = __rest(_a, ["color"]);
|
|
111
111
|
return React__namespace.createElement(elementsCore.LinkHeading, Object.assign({ size: 2 }, props));
|
|
112
112
|
},
|
|
113
113
|
h3: (_a) => {
|
|
114
|
-
var props = __rest(_a, ["color"]);
|
|
114
|
+
var { color } = _a, props = __rest(_a, ["color"]);
|
|
115
115
|
return React__namespace.createElement(elementsCore.LinkHeading, Object.assign({ size: 3 }, props));
|
|
116
116
|
},
|
|
117
117
|
h4: (_a) => {
|
|
118
|
-
var props = __rest(_a, ["color"]);
|
|
118
|
+
var { color } = _a, props = __rest(_a, ["color"]);
|
|
119
119
|
return React__namespace.createElement(elementsCore.LinkHeading, Object.assign({ size: 4 }, props));
|
|
120
120
|
},
|
|
121
121
|
} },
|
|
@@ -320,7 +320,7 @@ const UpgradeToStarter = () => (React.createElement(mosaic.Flex, { as: "a", href
|
|
|
320
320
|
React.createElement(mosaic.Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
321
321
|
React.createElement(mosaic.Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
322
322
|
|
|
323
|
-
const appVersion = '3.0.
|
|
323
|
+
const appVersion = '3.0.17';
|
|
324
324
|
|
|
325
325
|
class ResponseError extends Error {
|
|
326
326
|
constructor(message, responseCode) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Menu, FieldButton,
|
|
1
|
+
import { Menu, FieldButton, ListBox, ListBoxItem, Box, Flex, Icon, Modal, Input, VStack, Heading } from '@stoplight/mosaic';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { useRef, useEffect, useMemo, useCallback, useState } from 'react';
|
|
4
|
-
import { withPersistenceBoundary, withQueryClientProvider, withMosaicProvider, MarkdownComponentsProvider, LinkHeading, MockingProvider, Docs, RouterTypeContext, withStyles,
|
|
4
|
+
import { withPersistenceBoundary, withQueryClientProvider, withMosaicProvider, MarkdownComponentsProvider, LinkHeading, MockingProvider, Docs, RouterTypeContext, withStyles, NodeTypeColors, NodeTypeIconDefs, TableOfContents as TableOfContents$1, PoweredByLink, useRouter, findFirstNode, SidebarLayout, ScrollToHashElement, ReactRouterMarkdownLink } from '@stoplight/elements-core';
|
|
5
5
|
import { resolve, dirname } from '@stoplight/path';
|
|
6
6
|
import { NodeType } from '@stoplight/types';
|
|
7
7
|
import { useLocation, useInRouterContext, Routes, Route, useParams, useNavigate, Navigate, Link, Outlet, useOutletContext } from 'react-router-dom';
|
|
@@ -87,15 +87,15 @@ const NodeContent = ({ node, Link, hideMocking, refResolver, maxRefDepth, tryItC
|
|
|
87
87
|
React.createElement(MarkdownComponentsProvider, { value: {
|
|
88
88
|
a: LinkComponent,
|
|
89
89
|
h2: (_a) => {
|
|
90
|
-
var props = __rest(_a, ["color"]);
|
|
90
|
+
var { color } = _a, props = __rest(_a, ["color"]);
|
|
91
91
|
return React.createElement(LinkHeading, Object.assign({ size: 2 }, props));
|
|
92
92
|
},
|
|
93
93
|
h3: (_a) => {
|
|
94
|
-
var props = __rest(_a, ["color"]);
|
|
94
|
+
var { color } = _a, props = __rest(_a, ["color"]);
|
|
95
95
|
return React.createElement(LinkHeading, Object.assign({ size: 3 }, props));
|
|
96
96
|
},
|
|
97
97
|
h4: (_a) => {
|
|
98
|
-
var props = __rest(_a, ["color"]);
|
|
98
|
+
var { color } = _a, props = __rest(_a, ["color"]);
|
|
99
99
|
return React.createElement(LinkHeading, Object.assign({ size: 4 }, props));
|
|
100
100
|
},
|
|
101
101
|
} },
|
|
@@ -300,7 +300,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
300
300
|
React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
301
301
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
302
302
|
|
|
303
|
-
const appVersion = '3.0.
|
|
303
|
+
const appVersion = '3.0.17';
|
|
304
304
|
|
|
305
305
|
class ResponseError extends Error {
|
|
306
306
|
constructor(message, responseCode) {
|
package/package.json
CHANGED
|
@@ -1,72 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoplight/elements-dev-portal",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.17",
|
|
4
4
|
"description": "UI components for composing beautiful developer documentation.",
|
|
5
5
|
"keywords": [],
|
|
6
|
+
"main": "./index.js",
|
|
6
7
|
"sideEffects": [
|
|
7
8
|
"web-components.min.js",
|
|
8
9
|
"src/web-components/**",
|
|
9
10
|
"**/*.css"
|
|
10
11
|
],
|
|
11
|
-
"
|
|
12
|
-
|
|
12
|
+
"files": [
|
|
13
|
+
"**/*"
|
|
14
|
+
],
|
|
13
15
|
"author": "Stoplight <support@stoplight.io>",
|
|
14
16
|
"repository": {
|
|
15
17
|
"type": "git",
|
|
16
18
|
"url": "https://github.com/stoplightio/elements"
|
|
17
19
|
},
|
|
18
20
|
"license": "Apache-2.0",
|
|
19
|
-
"type": "commonjs",
|
|
20
|
-
"main": "./dist/index.js",
|
|
21
|
-
"module": "./dist/index.esm.js",
|
|
22
|
-
"exports": {
|
|
23
|
-
"./styles.min.css": "./styles.min.css",
|
|
24
|
-
"./web-components.min.js": "./web-components.min.js",
|
|
25
|
-
".": {
|
|
26
|
-
"require": "./dist/index.js",
|
|
27
|
-
"import": "./dist/index.mjs"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"files": [
|
|
31
|
-
"**/*"
|
|
32
|
-
],
|
|
33
21
|
"engines": {
|
|
34
22
|
"node": ">=16"
|
|
35
23
|
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"build": "yarn version.set && yarn build.react && yarn build.webcomponents",
|
|
38
|
-
"postbuild": "yarn build.styles",
|
|
39
|
-
"build.react": "sl-scripts bundle",
|
|
40
|
-
"build.webcomponents": "node --max-old-space-size=4096 ./../../node_modules/webpack/bin/webpack.js -c ./web-components.config.js",
|
|
41
|
-
"build.docs": "storybook build -c .storybook -o dist-storybook",
|
|
42
|
-
"build.styles": "postcss src/styles.css -o dist/styles.min.css",
|
|
43
|
-
"version.set": "replace \"appVersion = '.*'\" \"appVersion = '$npm_package_version'\" src/version.ts --silent",
|
|
44
|
-
"commit": "git-cz",
|
|
45
|
-
"release": "sl-scripts release",
|
|
46
|
-
"release.docs": "sl-scripts release:docs",
|
|
47
|
-
"release.dryRun": "sl-scripts release --dry-run --debug",
|
|
48
|
-
"storybook": "yarn version.set && storybook dev -p 9001",
|
|
49
|
-
"test": "jest",
|
|
50
|
-
"test.prod": "yarn test --coverage --maxWorkers=2",
|
|
51
|
-
"test.update": "yarn test --updateSnapshot",
|
|
52
|
-
"test.watch": "yarn test --watch",
|
|
53
|
-
"test.packaging": "node --input-type=commonjs -e \"require('./dist/index.js')\" && node --input-type=module -e \"import './dist/index.mjs'\"",
|
|
54
|
-
"type-check": "tsc --noEmit"
|
|
55
|
-
},
|
|
56
24
|
"peerDependencies": {
|
|
57
25
|
"react": ">=16.8",
|
|
58
26
|
"react-dom": ">=16.8"
|
|
59
27
|
},
|
|
60
|
-
"rollup": {
|
|
61
|
-
"bundleDeps": [
|
|
62
|
-
"@fortawesome/free-solid-svg-icons",
|
|
63
|
-
"use-debounce"
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
28
|
"dependencies": {
|
|
29
|
+
"@stoplight/elements-core": "~9.0.17",
|
|
67
30
|
"@stoplight/markdown-viewer": "^5.7.1",
|
|
68
31
|
"@stoplight/mosaic": "^1.53.5",
|
|
69
|
-
"@stoplight/elements-core": "9.0.16-beta-0.3",
|
|
70
32
|
"@stoplight/path": "^1.3.2",
|
|
71
33
|
"@stoplight/types": "^14.0.0",
|
|
72
34
|
"classnames": "^2.2.6",
|
|
@@ -75,31 +37,15 @@
|
|
|
75
37
|
"react-router-dom": "^6.28.0",
|
|
76
38
|
"use-debounce": "^6.0.1"
|
|
77
39
|
},
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"@types/lodash": "4.17.7",
|
|
87
|
-
"@types/react": "16.9.56",
|
|
88
|
-
"@types/react-dom": "16.9.12",
|
|
89
|
-
"@types/react-router-dom": "^5.3.3",
|
|
90
|
-
"react": "16.14.0",
|
|
91
|
-
"react-dom": "16.14.0",
|
|
92
|
-
"react-test-renderer": "^16.8.0",
|
|
93
|
-
"replace": "^1.2.2",
|
|
94
|
-
"resolve-url-loader": "^5.0.0",
|
|
95
|
-
"storybook": "next",
|
|
96
|
-
"style-loader": "^3.3.3",
|
|
97
|
-
"ts-loader": "^9.2.8"
|
|
98
|
-
},
|
|
99
|
-
"publishConfig": {
|
|
100
|
-
"directory": "dist"
|
|
40
|
+
"type": "commonjs",
|
|
41
|
+
"exports": {
|
|
42
|
+
"./styles.min.css": "./styles.min.css",
|
|
43
|
+
"./web-components.min.js": "./web-components.min.js",
|
|
44
|
+
".": {
|
|
45
|
+
"require": "./index.js",
|
|
46
|
+
"import": "./index.mjs"
|
|
47
|
+
}
|
|
101
48
|
},
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
49
|
+
"typings": "index.d.ts",
|
|
50
|
+
"module": "./index.esm.js"
|
|
51
|
+
}
|
package/version.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const appVersion = "3.0.17";
|