Skip to content

Commit 1453f28

Browse files
marbemaclottamusP0lip
authored
feat: tree-ui and path crumbs (#179)
* feat: tree ui * feat: crumbs and tree lines * feat: shorten annotation names + improve validation layouts * refactor: traverse the tree * chore: re-organize stories * feat: "show more" description link Co-authored-by: lottamus <chrisnlott@gmail.com> Co-authored-by: Jakub Rożek <jakub@stoplight.io>
1 parent 9e58adf commit 1453f28

File tree

24 files changed

+3151
-1102
lines changed

24 files changed

+3151
-1102
lines changed

.storybook/preview-head.html

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1 @@
1-
<!--NEED TO SET BODY FONT SIZE TO UI-KIT BASE SINCE WE USE REMS -->
2-
<style>
3-
html,
4-
body {
5-
padding: 0;
6-
margin: 0;
7-
8-
font-size: 14px;
9-
}
10-
11-
#root {
12-
height: 100%;
13-
}
14-
</style>
1+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet" />

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,32 @@
3838
"size-limit": "size-limit"
3939
},
4040
"peerDependencies": {
41-
"@stoplight/markdown-viewer": "^5.0.0",
42-
"@stoplight/mosaic": "^1.0.0",
43-
"@stoplight/mosaic-code-viewer": "^1.0.0",
41+
"@stoplight/markdown-viewer": "^5",
42+
"@stoplight/mosaic": "^1",
43+
"@stoplight/mosaic-code-viewer": "^1",
4444
"react": ">=16.8",
4545
"react-dom": ">=16.8"
4646
},
4747
"dependencies": {
4848
"@fortawesome/free-solid-svg-icons": "^5.15.2",
4949
"@stoplight/json": "^3.17.1",
50-
"@stoplight/json-schema-tree": "^2.1.2",
50+
"@stoplight/json-schema-tree": "^2.1.3",
5151
"@stoplight/react-error-boundary": "^2.0.0",
5252
"@types/json-schema": "^7.0.7",
5353
"classnames": "^2.2.6",
54+
"jotai": "^1.4.5",
5455
"lodash": "^4.17.19"
5556
},
5657
"devDependencies": {
5758
"@sambego/storybook-state": "^1.3.6",
5859
"@size-limit/preset-big-lib": "^4.11.0",
5960
"@stoplight/eslint-config": "^1.2.0",
60-
"@stoplight/markdown-viewer": "^5.0.0",
61-
"@stoplight/mosaic": "^1.0.0",
62-
"@stoplight/mosaic-code-viewer": "^1.0.0",
63-
"@stoplight/scripts": "9.0.2",
61+
"@stoplight/markdown-viewer": "^5.3.3",
62+
"@stoplight/mosaic": "^1.12.6",
63+
"@stoplight/mosaic-code-viewer": "^1.12.6",
64+
"@stoplight/scripts": "9.2.0",
6465
"@stoplight/storybook-config": "^2.0.6",
65-
"@stoplight/types": "^11.9.0",
66+
"@stoplight/types": "^12.3.0",
6667
"@types/classnames": "^2.2.11",
6768
"@types/enzyme": "^3.10.8",
6869
"@types/jest": "^26.0.18",

setupTests.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,14 @@ const Adapter = require('enzyme-adapter-react-16');
44
Enzyme.configure({ adapter: new Adapter() });
55

66
jest.mock('react');
7+
8+
const observe = jest.fn();
9+
const unobserve = jest.fn();
10+
const disconnect = jest.fn();
11+
12+
// @ts-ignore
13+
window.IntersectionObserver = jest.fn(() => ({
14+
observe,
15+
unobserve,
16+
disconnect,
17+
}));

0 commit comments

Comments
 (0)