Skip to content

Commit

Permalink
fix: remove ui-kit (#149)
Browse files Browse the repository at this point in the history
* fix: remove ui-kit

* chore: storybook styles

* fix: lodash default exports
  • Loading branch information
Jakub Jankowski authored Jun 4, 2021
1 parent 12a4601 commit 266fcf2
Show file tree
Hide file tree
Showing 12 changed files with 1,109 additions and 864 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
},
"scripts": {
"build": "sl-scripts bundle --sourcemap",
"postbuild": "yarn test.packaging",
"build.docs": "build-storybook -c .storybook -o docs-auto",
"commit": "git-cz",
"lint": "eslint 'src/**/*.{ts,tsx}'",
Expand All @@ -32,33 +33,32 @@
"test": "jest",
"test.prod": "yarn lint && yarn test --coverage --maxWorkers=2",
"test.update": "yarn test --updateSnapshot",
"test.watch": "yarn test --watch"
"test.watch": "yarn test --watch",
"test.packaging": "node -e \"require('./dist/index.js')\" && node --input-type=module -e \"import './dist/index.mjs'\""
},
"peerDependencies": {
"@stoplight/markdown-viewer": "^4",
"@stoplight/ui-kit": "^3",
"@stoplight/markdown-viewer": "^5",
"react": ">=16.8",
"react-dom": ">=16.8"
},
"dependencies": {
"@fortawesome/free-solid-svg-icons": "^5.15.2",
"@stoplight/json": "^3.10.0",
"@stoplight/json-schema-tree": "^2.0.1",
"@stoplight/mosaic": "1.0.0-beta.46",
"@stoplight/mosaic": "1.0.0-beta.58",
"@stoplight/mosaic-code-viewer": "1.0.0-beta.58",
"@stoplight/react-error-boundary": "^1.0.0",
"@types/json-schema": "^7.0.7",
"classnames": "^2.2.6",
"lodash": "^4.17.19"
},
"devDependencies": {
"@rollup/plugin-typescript": "^3.1.1",
"@sambego/storybook-state": "^1.3.6",
"@stoplight/eslint-config": "^1.2.0",
"@stoplight/markdown-viewer": "^4.3.4",
"@stoplight/scripts": "^8.2.0",
"@stoplight/markdown-viewer": "^5.0.0-beta.4",
"@stoplight/scripts": "9.0.1",
"@stoplight/storybook-config": "^2.0.6",
"@stoplight/types": "^11.9.0",
"@stoplight/ui-kit": "3.0.0-beta.39",
"@types/classnames": "^2.2.11",
"@types/enzyme": "^3.10.8",
"@types/jest": "^26.0.18",
Expand Down
30 changes: 0 additions & 30 deletions rollup.config.js

This file was deleted.

2 changes: 0 additions & 2 deletions setupTests.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const Enzyme = require('enzyme');
const Adapter = require('enzyme-adapter-react-16');

jest.mock('react-virtualized-auto-sizer', () => ({ children }: any) => children({ height: 600, width: 600 }));

Enzyme.configure({ adapter: new Adapter() });

jest.mock('react');
6 changes: 6 additions & 0 deletions src/__stories__/_styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
border: 1px dotted #bbb; // to visualize component boundaries
}

.JsonSchemaViewer {
p {
font-size: 14px;
}
}
66 changes: 33 additions & 33 deletions src/__tests__/__snapshots__/index.spec.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Expanded depth nested object static given initial level set to 0, should render top 2 levels 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -46,7 +46,7 @@ exports[`Expanded depth nested object static given initial level set to 0, shoul
`;
exports[`Expanded depth nested object static given initial level set to 1, should render top 3 levels 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -174,7 +174,7 @@ exports[`Expanded depth nested object static given initial level set to 1, shoul
`;
exports[`Expanded depth nested object static given initial level set to 2, should render top 4 levels 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -319,7 +319,7 @@ exports[`Expanded depth nested object static given initial level set to 2, shoul
`;
exports[`HTML Output given anyOf combiner placed next to allOf given allOf merging enabled, should merge contents of allOf combiners 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div>
Expand Down Expand Up @@ -459,7 +459,7 @@ exports[`HTML Output given anyOf combiner placed next to allOf given allOf mergi
`;
exports[`HTML Output given array with oneOf containing items, should merge it correctly 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div>
Expand Down Expand Up @@ -507,7 +507,7 @@ exports[`HTML Output given array with oneOf containing items, should merge it co
`;

exports[`HTML Output given complex type that includes array and complex array subtype, should not ignore subtype 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -550,7 +550,7 @@ exports[`HTML Output given complex type that includes array and complex array su
`;
exports[`HTML Output given multiple object and string type, should process properties 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div>
<div>
Expand Down Expand Up @@ -594,7 +594,7 @@ exports[`HTML Output given multiple object and string type, should process prope
`;
exports[`HTML Output given oneOf combiner placed next to allOf given allOf merging enabled, should merge contents of allOf combiners 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div>
Expand Down Expand Up @@ -734,7 +734,7 @@ exports[`HTML Output given oneOf combiner placed next to allOf given allOf mergi
`;
exports[`HTML Output given read mode, should populate proper nodes 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div>
<div>
Expand Down Expand Up @@ -778,7 +778,7 @@ exports[`HTML Output given read mode, should populate proper nodes 1`] = `
`;
exports[`HTML Output given standalone mode, should populate proper nodes 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div>
<div>
Expand Down Expand Up @@ -840,7 +840,7 @@ exports[`HTML Output given standalone mode, should populate proper nodes 1`] = `
`;
exports[`HTML Output given visible $ref node, should try to inject the title immediately 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -902,7 +902,7 @@ exports[`HTML Output given visible $ref node, should try to inject the title imm
`;
exports[`HTML Output given write mode, should populate proper nodes 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div>
<div>
Expand Down Expand Up @@ -946,7 +946,7 @@ exports[`HTML Output given write mode, should populate proper nodes 1`] = `
`;
exports[`HTML Output should match arrays/of-allofs.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -1007,7 +1007,7 @@ exports[`HTML Output should match arrays/of-allofs.json 1`] = `
`;
exports[`HTML Output should match arrays/of-arrays.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div>
Expand Down Expand Up @@ -1053,7 +1053,7 @@ exports[`HTML Output should match arrays/of-arrays.json 1`] = `
`;
exports[`HTML Output should match arrays/of-complex-objects.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div>
Expand Down Expand Up @@ -1424,7 +1424,7 @@ exports[`HTML Output should match arrays/of-complex-objects.json 1`] = `
`;
exports[`HTML Output should match arrays/of-objects.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -1469,7 +1469,7 @@ exports[`HTML Output should match arrays/of-objects.json 1`] = `
`;
exports[`HTML Output should match arrays/of-refs.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div>
<div>
Expand Down Expand Up @@ -1504,7 +1504,7 @@ exports[`HTML Output should match arrays/of-refs.json 1`] = `
`;
exports[`HTML Output should match arrays/with-multiple-arrayish-items.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div>
<div>
Expand Down Expand Up @@ -1604,7 +1604,7 @@ exports[`HTML Output should match arrays/with-multiple-arrayish-items.json 1`] =
`;
exports[`HTML Output should match arrays/with-ordered-items.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div>
<div>
Expand Down Expand Up @@ -1652,7 +1652,7 @@ exports[`HTML Output should match arrays/with-ordered-items.json 1`] = `
`;
exports[`HTML Output should match arrays/with-single-arrayish-items.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div>
Expand Down Expand Up @@ -1716,7 +1716,7 @@ exports[`HTML Output should match arrays/with-single-arrayish-items.json 1`] = `
`;
exports[`HTML Output should match combiners/allOfs/base.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -1939,7 +1939,7 @@ exports[`HTML Output should match combiners/allOfs/base.json 1`] = `
`;
exports[`HTML Output should match combiners/allOfs/complex.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -2210,7 +2210,7 @@ exports[`HTML Output should match combiners/allOfs/complex.json 1`] = `
`;
exports[`HTML Output should match combiners/allOfs/todo-full.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div>
Expand Down Expand Up @@ -2400,7 +2400,7 @@ exports[`HTML Output should match combiners/allOfs/todo-full.json 1`] = `
`;
exports[`HTML Output should match combiners/allOfs/todo-full-2.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -2503,7 +2503,7 @@ exports[`HTML Output should match combiners/allOfs/todo-full-2.json 1`] = `
`;
exports[`HTML Output should match combiners/allOfs/with-type.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div>
Expand Down Expand Up @@ -2662,7 +2662,7 @@ exports[`HTML Output should match combiners/allOfs/with-type.json 1`] = `
`;
exports[`HTML Output should match combiners/oneof-with-array-type.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div>
Expand Down Expand Up @@ -2747,7 +2747,7 @@ exports[`HTML Output should match combiners/oneof-with-array-type.json 1`] = `
`;
exports[`HTML Output should match combiners/oneof-within-array-item.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div>
Expand Down Expand Up @@ -2816,7 +2816,7 @@ exports[`HTML Output should match combiners/oneof-within-array-item.json 1`] = `
`;
exports[`HTML Output should match default-schema.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -3189,7 +3189,7 @@ exports[`HTML Output should match default-schema.json 1`] = `
`;
exports[`HTML Output should match formats-schema.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -3311,7 +3311,7 @@ exports[`HTML Output should match formats-schema.json 1`] = `
`;
exports[`HTML Output should match references/base.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -3408,7 +3408,7 @@ exports[`HTML Output should match references/base.json 1`] = `
`;
exports[`HTML Output should match references/nested.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down Expand Up @@ -3464,7 +3464,7 @@ exports[`HTML Output should match references/nested.json 1`] = `
`;
exports[`HTML Output should match references/nullish.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand All @@ -3491,7 +3491,7 @@ exports[`HTML Output should match references/nullish.json 1`] = `
`;
exports[`HTML Output should match tickets.schema.json 1`] = `
"<div class=\\"\\">
"<div data-overlay-container=\\"true\\" class=\\"\\">
<div style=\\"padding-left: 25px\\" class=\\"JsonSchemaViewer\\">
<div style=\\"margin-left: -25px\\">
<div style=\\"padding-left: 25px\\">
Expand Down
Loading

0 comments on commit 266fcf2

Please sign in to comment.