@teambit/component.ui.component-compare.compare-aspects.compare-aspect-view 0.0.2
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/compare-aspect-view.module.scss +45 -0
- package/compare-aspect-view.tsx +85 -0
- package/dist/compare-aspect-view.d.ts +9 -0
- package/dist/compare-aspect-view.js +62 -0
- package/dist/compare-aspect-view.js.map +1 -0
- package/dist/compare-aspect-view.module.scss +45 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/preview-1670894303358.js +7 -0
- package/dist/tsconfig.json +32 -0
- package/index.ts +1 -0
- package/package-tar/teambit-component.ui.component-compare.compare-aspects.compare-aspect-view-0.0.2.tgz +0 -0
- package/package.json +53 -0
- package/tsconfig.json +32 -0
- package/types/asset.d.ts +29 -0
- package/types/style.d.ts +42 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monaco container is not flex so providing it a fixed calculated height
|
|
3
|
+
* so it can fill up the remaining space correctly instead of overflowing
|
|
4
|
+
* diff editor headers: h4 (24px) + padding (16px * 2) = 56px
|
|
5
|
+
*/
|
|
6
|
+
$editor-padding: 56px;
|
|
7
|
+
|
|
8
|
+
.componentCompareAspectViewContainer {
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
}
|
|
12
|
+
.componentCompareAspectDiffEditorContainer {
|
|
13
|
+
padding: 0px 8px;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
height: calc(100% - $editor-padding);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.name {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: baseline;
|
|
22
|
+
padding: 8px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.componentCompareAspectConfigDiff,
|
|
26
|
+
.componentCompareAspectCalculatedDiff {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex: 1;
|
|
29
|
+
padding: 8px;
|
|
30
|
+
height: 100%;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
|
|
33
|
+
> section {
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
border-radius: 8px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.loader {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-items: center;
|
|
43
|
+
height: 100%;
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React, { HTMLAttributes, useMemo } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { H4 } from '@teambit/documenter.ui.heading';
|
|
4
|
+
import { RoundLoader } from '@teambit/design.ui.round-loader';
|
|
5
|
+
import { DiffEditor } from '@monaco-editor/react';
|
|
6
|
+
import { darkMode } from '@teambit/base-ui.theme.dark-theme';
|
|
7
|
+
import { ComponentAspectData } from '@teambit/component.ui.component-compare.compare-aspects.models.component-compare-aspects-model';
|
|
8
|
+
|
|
9
|
+
import styles from './compare-aspect-view.module.scss';
|
|
10
|
+
|
|
11
|
+
export type CompareAspectViewProps = {
|
|
12
|
+
baseAspectData?: ComponentAspectData;
|
|
13
|
+
compareAspectData?: ComponentAspectData;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
name?: string;
|
|
16
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
17
|
+
|
|
18
|
+
export function CompareAspectView({ baseAspectData, compareAspectData, name, className }: CompareAspectViewProps) {
|
|
19
|
+
const title = useMemo(() => name?.split('/').pop(), [name]);
|
|
20
|
+
|
|
21
|
+
const configDiffEditor = (
|
|
22
|
+
<DiffEditor
|
|
23
|
+
key={`aspect-config-diff-editor-${title}`}
|
|
24
|
+
modified={JSON.stringify(compareAspectData?.config, null, 2)}
|
|
25
|
+
original={JSON.stringify(baseAspectData?.config, null, 2)}
|
|
26
|
+
language={'json'}
|
|
27
|
+
className={darkMode}
|
|
28
|
+
theme={'vs-dark'}
|
|
29
|
+
options={{
|
|
30
|
+
readOnly: true,
|
|
31
|
+
}}
|
|
32
|
+
loading={
|
|
33
|
+
<div className={styles.loader}>
|
|
34
|
+
<RoundLoader />
|
|
35
|
+
</div>
|
|
36
|
+
}
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
const calculatedDataDiffEditor = (
|
|
41
|
+
<DiffEditor
|
|
42
|
+
key={`aspect-data-diff-editor-${title}`}
|
|
43
|
+
modified={JSON.stringify(compareAspectData?.data, null, 2)}
|
|
44
|
+
original={JSON.stringify(baseAspectData?.data, null, 2)}
|
|
45
|
+
language={'json'}
|
|
46
|
+
className={styles.diffEditor}
|
|
47
|
+
theme={'vs-dark'}
|
|
48
|
+
options={{
|
|
49
|
+
readOnly: true,
|
|
50
|
+
}}
|
|
51
|
+
loading={
|
|
52
|
+
<div className={styles.loader}>
|
|
53
|
+
<RoundLoader />
|
|
54
|
+
</div>
|
|
55
|
+
}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<div
|
|
61
|
+
key={`aspect-diff-editor-${title}`}
|
|
62
|
+
className={classNames(styles.componentCompareAspectViewContainer, className)}
|
|
63
|
+
>
|
|
64
|
+
<div className={styles.name}>
|
|
65
|
+
<H4 size="xs" className={styles.name}>
|
|
66
|
+
<span>{title}</span>
|
|
67
|
+
</H4>
|
|
68
|
+
</div>
|
|
69
|
+
<div className={styles.componentCompareAspectDiffEditorContainer}>
|
|
70
|
+
<div className={styles.componentCompareAspectConfigDiff}>
|
|
71
|
+
<H4 size="xxs" className={styles.name}>
|
|
72
|
+
<span>Config</span>
|
|
73
|
+
</H4>
|
|
74
|
+
{configDiffEditor}
|
|
75
|
+
</div>
|
|
76
|
+
<div className={styles.componentCompareAspectCalculatedDiff}>
|
|
77
|
+
<H4 size="xxs" className={styles.name}>
|
|
78
|
+
<span>Calculated Data</span>
|
|
79
|
+
</H4>
|
|
80
|
+
{calculatedDataDiffEditor}
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { ComponentAspectData } from '@teambit/component.ui.component-compare.compare-aspects.models.component-compare-aspects-model';
|
|
3
|
+
export declare type CompareAspectViewProps = {
|
|
4
|
+
baseAspectData?: ComponentAspectData;
|
|
5
|
+
compareAspectData?: ComponentAspectData;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
name?: string;
|
|
8
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
9
|
+
export declare function CompareAspectView({ baseAspectData, compareAspectData, name, className }: CompareAspectViewProps): JSX.Element;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.CompareAspectView = void 0;
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
31
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
32
|
+
const documenter_ui_heading_1 = require("@teambit/documenter.ui.heading");
|
|
33
|
+
const design_ui_round_loader_1 = require("@teambit/design.ui.round-loader");
|
|
34
|
+
const react_2 = require("@monaco-editor/react");
|
|
35
|
+
const base_ui_theme_dark_theme_1 = require("@teambit/base-ui.theme.dark-theme");
|
|
36
|
+
const compare_aspect_view_module_scss_1 = __importDefault(require("./compare-aspect-view.module.scss"));
|
|
37
|
+
function CompareAspectView({ baseAspectData, compareAspectData, name, className }) {
|
|
38
|
+
const title = (0, react_1.useMemo)(() => name === null || name === void 0 ? void 0 : name.split('/').pop(), [name]);
|
|
39
|
+
const configDiffEditor = (react_1.default.createElement(react_2.DiffEditor, { key: `aspect-config-diff-editor-${title}`, modified: JSON.stringify(compareAspectData === null || compareAspectData === void 0 ? void 0 : compareAspectData.config, null, 2), original: JSON.stringify(baseAspectData === null || baseAspectData === void 0 ? void 0 : baseAspectData.config, null, 2), language: 'json', className: base_ui_theme_dark_theme_1.darkMode, theme: 'vs-dark', options: {
|
|
40
|
+
readOnly: true,
|
|
41
|
+
}, loading: react_1.default.createElement("div", { className: compare_aspect_view_module_scss_1.default.loader },
|
|
42
|
+
react_1.default.createElement(design_ui_round_loader_1.RoundLoader, null)) }));
|
|
43
|
+
const calculatedDataDiffEditor = (react_1.default.createElement(react_2.DiffEditor, { key: `aspect-data-diff-editor-${title}`, modified: JSON.stringify(compareAspectData === null || compareAspectData === void 0 ? void 0 : compareAspectData.data, null, 2), original: JSON.stringify(baseAspectData === null || baseAspectData === void 0 ? void 0 : baseAspectData.data, null, 2), language: 'json', className: compare_aspect_view_module_scss_1.default.diffEditor, theme: 'vs-dark', options: {
|
|
44
|
+
readOnly: true,
|
|
45
|
+
}, loading: react_1.default.createElement("div", { className: compare_aspect_view_module_scss_1.default.loader },
|
|
46
|
+
react_1.default.createElement(design_ui_round_loader_1.RoundLoader, null)) }));
|
|
47
|
+
return (react_1.default.createElement("div", { key: `aspect-diff-editor-${title}`, className: (0, classnames_1.default)(compare_aspect_view_module_scss_1.default.componentCompareAspectViewContainer, className) },
|
|
48
|
+
react_1.default.createElement("div", { className: compare_aspect_view_module_scss_1.default.name },
|
|
49
|
+
react_1.default.createElement(documenter_ui_heading_1.H4, { size: "xs", className: compare_aspect_view_module_scss_1.default.name },
|
|
50
|
+
react_1.default.createElement("span", null, title))),
|
|
51
|
+
react_1.default.createElement("div", { className: compare_aspect_view_module_scss_1.default.componentCompareAspectDiffEditorContainer },
|
|
52
|
+
react_1.default.createElement("div", { className: compare_aspect_view_module_scss_1.default.componentCompareAspectConfigDiff },
|
|
53
|
+
react_1.default.createElement(documenter_ui_heading_1.H4, { size: "xxs", className: compare_aspect_view_module_scss_1.default.name },
|
|
54
|
+
react_1.default.createElement("span", null, "Config")),
|
|
55
|
+
configDiffEditor),
|
|
56
|
+
react_1.default.createElement("div", { className: compare_aspect_view_module_scss_1.default.componentCompareAspectCalculatedDiff },
|
|
57
|
+
react_1.default.createElement(documenter_ui_heading_1.H4, { size: "xxs", className: compare_aspect_view_module_scss_1.default.name },
|
|
58
|
+
react_1.default.createElement("span", null, "Calculated Data")),
|
|
59
|
+
calculatedDataDiffEditor))));
|
|
60
|
+
}
|
|
61
|
+
exports.CompareAspectView = CompareAspectView;
|
|
62
|
+
//# sourceMappingURL=compare-aspect-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare-aspect-view.js","sourceRoot":"","sources":["../compare-aspect-view.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuD;AACvD,4DAAoC;AACpC,0EAAoD;AACpD,4EAA8D;AAC9D,gDAAkD;AAClD,gFAA6D;AAG7D,wGAAuD;AASvD,SAAgB,iBAAiB,CAAC,EAAE,cAAc,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,EAA0B;IAC9G,MAAM,KAAK,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAE5D,MAAM,gBAAgB,GAAG,CACvB,8BAAC,kBAAU,IACT,GAAG,EAAE,6BAA6B,KAAK,EAAE,EACzC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAC5D,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EACzD,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,mCAAQ,EACnB,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE;YACP,QAAQ,EAAE,IAAI;SACf,EACD,OAAO,EACL,uCAAK,SAAS,EAAE,yCAAM,CAAC,MAAM;YAC3B,8BAAC,oCAAW,OAAG,CACX,GAER,CACH,CAAC;IAEF,MAAM,wBAAwB,GAAG,CAC/B,8BAAC,kBAAU,IACT,GAAG,EAAE,2BAA2B,KAAK,EAAE,EACvC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAC1D,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EACvD,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,yCAAM,CAAC,UAAU,EAC5B,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE;YACP,QAAQ,EAAE,IAAI;SACf,EACD,OAAO,EACL,uCAAK,SAAS,EAAE,yCAAM,CAAC,MAAM;YAC3B,8BAAC,oCAAW,OAAG,CACX,GAER,CACH,CAAC;IAEF,OAAO,CACL,uCACE,GAAG,EAAE,sBAAsB,KAAK,EAAE,EAClC,SAAS,EAAE,IAAA,oBAAU,EAAC,yCAAM,CAAC,mCAAmC,EAAE,SAAS,CAAC;QAE5E,uCAAK,SAAS,EAAE,yCAAM,CAAC,IAAI;YACzB,8BAAC,0BAAE,IAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAE,yCAAM,CAAC,IAAI;gBAClC,4CAAO,KAAK,CAAQ,CACjB,CACD;QACN,uCAAK,SAAS,EAAE,yCAAM,CAAC,yCAAyC;YAC9D,uCAAK,SAAS,EAAE,yCAAM,CAAC,gCAAgC;gBACrD,8BAAC,0BAAE,IAAC,IAAI,EAAC,KAAK,EAAC,SAAS,EAAE,yCAAM,CAAC,IAAI;oBACnC,qDAAmB,CAChB;gBACJ,gBAAgB,CACb;YACN,uCAAK,SAAS,EAAE,yCAAM,CAAC,oCAAoC;gBACzD,8BAAC,0BAAE,IAAC,IAAI,EAAC,KAAK,EAAC,SAAS,EAAE,yCAAM,CAAC,IAAI;oBACnC,8DAA4B,CACzB;gBACJ,wBAAwB,CACrB,CACF,CACF,CACP,CAAC;AACJ,CAAC;AAnED,8CAmEC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monaco container is not flex so providing it a fixed calculated height
|
|
3
|
+
* so it can fill up the remaining space correctly instead of overflowing
|
|
4
|
+
* diff editor headers: h4 (24px) + padding (16px * 2) = 56px
|
|
5
|
+
*/
|
|
6
|
+
$editor-padding: 56px;
|
|
7
|
+
|
|
8
|
+
.componentCompareAspectViewContainer {
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
}
|
|
12
|
+
.componentCompareAspectDiffEditorContainer {
|
|
13
|
+
padding: 0px 8px;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
height: calc(100% - $editor-padding);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.name {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: baseline;
|
|
22
|
+
padding: 8px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.componentCompareAspectConfigDiff,
|
|
26
|
+
.componentCompareAspectCalculatedDiff {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex: 1;
|
|
29
|
+
padding: 8px;
|
|
30
|
+
height: 100%;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
|
|
33
|
+
> section {
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
border-radius: 8px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.loader {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-items: center;
|
|
43
|
+
height: 100%;
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CompareAspectView, CompareAspectViewProps } from './compare-aspect-view';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CompareAspectView = void 0;
|
|
4
|
+
var compare_aspect_view_1 = require("./compare-aspect-view");
|
|
5
|
+
Object.defineProperty(exports, "CompareAspectView", { enumerable: true, get: function () { return compare_aspect_view_1.CompareAspectView; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,6DAAkF;AAAzE,wHAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": [
|
|
4
|
+
"es2019",
|
|
5
|
+
"DOM",
|
|
6
|
+
"ES6",
|
|
7
|
+
"DOM.Iterable"
|
|
8
|
+
],
|
|
9
|
+
"target": "es2015",
|
|
10
|
+
"module": "CommonJS",
|
|
11
|
+
"jsx": "react",
|
|
12
|
+
"allowJs": true,
|
|
13
|
+
"composite": true,
|
|
14
|
+
"declaration": true,
|
|
15
|
+
"sourceMap": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"experimentalDecorators": true,
|
|
18
|
+
"outDir": "dist",
|
|
19
|
+
"moduleResolution": "node",
|
|
20
|
+
"esModuleInterop": true,
|
|
21
|
+
"rootDir": ".",
|
|
22
|
+
"resolveJsonModule": true
|
|
23
|
+
},
|
|
24
|
+
"exclude": [
|
|
25
|
+
"dist",
|
|
26
|
+
"package.json"
|
|
27
|
+
],
|
|
28
|
+
"include": [
|
|
29
|
+
"**/*",
|
|
30
|
+
"**/*.json"
|
|
31
|
+
]
|
|
32
|
+
}
|
package/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CompareAspectView, CompareAspectViewProps } from './compare-aspect-view';
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@teambit/component.ui.component-compare.compare-aspects.compare-aspect-view",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"homepage": "https://bit.dev/teambit/component/ui/component-compare/compare-aspects/compare-aspect-view",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"componentId": {
|
|
7
|
+
"scope": "teambit.component",
|
|
8
|
+
"name": "ui/component-compare/compare-aspects/compare-aspect-view",
|
|
9
|
+
"version": "0.0.2"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@monaco-editor/react": "4.4.6",
|
|
13
|
+
"classnames": "2.2.6",
|
|
14
|
+
"core-js": "^3.0.0",
|
|
15
|
+
"@teambit/base-ui.theme.dark-theme": "1.0.2",
|
|
16
|
+
"@teambit/documenter.ui.heading": "4.1.1",
|
|
17
|
+
"@teambit/component.ui.component-compare.compare-aspects.models.component-compare-aspects-model": "0.0.3",
|
|
18
|
+
"@teambit/design.ui.round-loader": "0.0.355"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/classnames": "2.2.11",
|
|
22
|
+
"@types/react": "^17.0.8",
|
|
23
|
+
"@types/mocha": "9.1.0",
|
|
24
|
+
"@types/testing-library__jest-dom": "5.9.5",
|
|
25
|
+
"@babel/runtime": "7.20.0",
|
|
26
|
+
"@types/jest": "^26.0.0",
|
|
27
|
+
"@types/react-dom": "^17.0.5",
|
|
28
|
+
"@types/node": "12.20.4"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"react-dom": "^16.8.0 || ^17.0.0",
|
|
32
|
+
"react": "^16.8.0 || ^17.0.0"
|
|
33
|
+
},
|
|
34
|
+
"license": "Apache-2.0",
|
|
35
|
+
"private": false,
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=12.22.0"
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "https://github.com/teambit/bit"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"bit",
|
|
45
|
+
"components",
|
|
46
|
+
"collaboration",
|
|
47
|
+
"web",
|
|
48
|
+
"react",
|
|
49
|
+
"react-components",
|
|
50
|
+
"angular",
|
|
51
|
+
"angular-components"
|
|
52
|
+
]
|
|
53
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": [
|
|
4
|
+
"es2019",
|
|
5
|
+
"DOM",
|
|
6
|
+
"ES6",
|
|
7
|
+
"DOM.Iterable"
|
|
8
|
+
],
|
|
9
|
+
"target": "es2015",
|
|
10
|
+
"module": "CommonJS",
|
|
11
|
+
"jsx": "react",
|
|
12
|
+
"allowJs": true,
|
|
13
|
+
"composite": true,
|
|
14
|
+
"declaration": true,
|
|
15
|
+
"sourceMap": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"experimentalDecorators": true,
|
|
18
|
+
"outDir": "dist",
|
|
19
|
+
"moduleResolution": "node",
|
|
20
|
+
"esModuleInterop": true,
|
|
21
|
+
"rootDir": ".",
|
|
22
|
+
"resolveJsonModule": true
|
|
23
|
+
},
|
|
24
|
+
"exclude": [
|
|
25
|
+
"dist",
|
|
26
|
+
"package.json"
|
|
27
|
+
],
|
|
28
|
+
"include": [
|
|
29
|
+
"**/*",
|
|
30
|
+
"**/*.json"
|
|
31
|
+
]
|
|
32
|
+
}
|
package/types/asset.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare module '*.png' {
|
|
2
|
+
const value: any;
|
|
3
|
+
export = value;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.svg' {
|
|
6
|
+
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
|
+
|
|
8
|
+
export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
|
|
9
|
+
const src: string;
|
|
10
|
+
export default src;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// @TODO Gilad
|
|
14
|
+
declare module '*.jpg' {
|
|
15
|
+
const value: any;
|
|
16
|
+
export = value;
|
|
17
|
+
}
|
|
18
|
+
declare module '*.jpeg' {
|
|
19
|
+
const value: any;
|
|
20
|
+
export = value;
|
|
21
|
+
}
|
|
22
|
+
declare module '*.gif' {
|
|
23
|
+
const value: any;
|
|
24
|
+
export = value;
|
|
25
|
+
}
|
|
26
|
+
declare module '*.bmp' {
|
|
27
|
+
const value: any;
|
|
28
|
+
export = value;
|
|
29
|
+
}
|
package/types/style.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare module '*.module.css' {
|
|
2
|
+
const classes: { readonly [key: string]: string };
|
|
3
|
+
export default classes;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.module.scss' {
|
|
6
|
+
const classes: { readonly [key: string]: string };
|
|
7
|
+
export default classes;
|
|
8
|
+
}
|
|
9
|
+
declare module '*.module.sass' {
|
|
10
|
+
const classes: { readonly [key: string]: string };
|
|
11
|
+
export default classes;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '*.module.less' {
|
|
15
|
+
const classes: { readonly [key: string]: string };
|
|
16
|
+
export default classes;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module '*.less' {
|
|
20
|
+
const classes: { readonly [key: string]: string };
|
|
21
|
+
export default classes;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.css' {
|
|
25
|
+
const classes: { readonly [key: string]: string };
|
|
26
|
+
export default classes;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare module '*.sass' {
|
|
30
|
+
const classes: { readonly [key: string]: string };
|
|
31
|
+
export default classes;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare module '*.scss' {
|
|
35
|
+
const classes: { readonly [key: string]: string };
|
|
36
|
+
export default classes;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare module '*.mdx' {
|
|
40
|
+
const component: any;
|
|
41
|
+
export default component;
|
|
42
|
+
}
|