@teambit/component.ui.component-compare.context 0.0.129 → 0.0.131
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/.npmignore
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.InlineCompareEmpty = InlineCompareEmpty;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const ACCENT = 'var(--bit-accent-color, #6c5ce7)';
|
|
9
6
|
const MUTED = 'var(--on-background-medium-color, #a0aec0)';
|
|
10
7
|
const SECONDARY = 'var(--on-surface-medium-color, #707279)';
|
|
@@ -13,7 +10,7 @@ const BORDER = 'var(--border-medium-color, #e8ecf0)';
|
|
|
13
10
|
const SURFACE = 'var(--surface-color, #fff)';
|
|
14
11
|
function VersionPill({ version, tone }) {
|
|
15
12
|
const accent = tone === 'compare';
|
|
16
|
-
return (
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("span", { style: {
|
|
17
14
|
fontFamily: 'var(--font-family-monospace, ui-monospace, SFMono-Regular, Menlo, monospace)',
|
|
18
15
|
fontSize: 13,
|
|
19
16
|
fontWeight: 600,
|
|
@@ -23,7 +20,7 @@ function VersionPill({ version, tone }) {
|
|
|
23
20
|
background: accent ? 'rgba(108, 92, 231, 0.06)' : SURFACE,
|
|
24
21
|
color: accent ? ACCENT : PRIMARY,
|
|
25
22
|
whiteSpace: 'nowrap',
|
|
26
|
-
}
|
|
23
|
+
}, children: version }));
|
|
27
24
|
}
|
|
28
25
|
/**
|
|
29
26
|
* Shared blank state for the compare surfaces (inline tabs, the single-component compare page,
|
|
@@ -33,7 +30,7 @@ function VersionPill({ version, tone }) {
|
|
|
33
30
|
function InlineCompareEmpty({ message, hint, baseVersion, compareVersion }) {
|
|
34
31
|
const hasPills = !!baseVersion && !!compareVersion;
|
|
35
32
|
const identical = hasPills && baseVersion === compareVersion;
|
|
36
|
-
return (
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
37
34
|
display: 'flex',
|
|
38
35
|
flexDirection: 'column',
|
|
39
36
|
alignItems: 'center',
|
|
@@ -41,17 +38,6 @@ function InlineCompareEmpty({ message, hint, baseVersion, compareVersion }) {
|
|
|
41
38
|
gap: 12,
|
|
42
39
|
padding: '48px 16px',
|
|
43
40
|
textAlign: 'center',
|
|
44
|
-
} },
|
|
45
|
-
react_1.default.createElement("span", { style: { fontSize: 15, fontWeight: 600, color: PRIMARY } }, message),
|
|
46
|
-
hasPills && (react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 4 } },
|
|
47
|
-
react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: 12 } },
|
|
48
|
-
react_1.default.createElement(VersionPill, { version: baseVersion, tone: identical ? 'neutral' : 'base' }),
|
|
49
|
-
react_1.default.createElement("span", { style: { color: MUTED, fontSize: 16 } }, "\u2192"),
|
|
50
|
-
react_1.default.createElement(VersionPill, { version: compareVersion, tone: identical ? 'neutral' : 'compare' })),
|
|
51
|
-
react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: 12, fontSize: 11, color: MUTED } },
|
|
52
|
-
react_1.default.createElement("span", { style: { minWidth: 64 } }, "base"),
|
|
53
|
-
react_1.default.createElement("span", { style: { width: 16 } }),
|
|
54
|
-
react_1.default.createElement("span", { style: { minWidth: 64 } }, "compare")))),
|
|
55
|
-
hint && react_1.default.createElement("span", { style: { fontSize: 13, color: SECONDARY, maxWidth: 440, lineHeight: 1.5 } }, hint)));
|
|
41
|
+
}, children: [(0, jsx_runtime_1.jsx)("span", { style: { fontSize: 15, fontWeight: 600, color: PRIMARY }, children: message }), hasPills && ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 4 }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: 12 }, children: [(0, jsx_runtime_1.jsx)(VersionPill, { version: baseVersion, tone: identical ? 'neutral' : 'base' }), (0, jsx_runtime_1.jsx)("span", { style: { color: MUTED, fontSize: 16 }, children: "\u2192" }), (0, jsx_runtime_1.jsx)(VersionPill, { version: compareVersion, tone: identical ? 'neutral' : 'compare' })] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: 12, fontSize: 11, color: MUTED }, children: [(0, jsx_runtime_1.jsx)("span", { style: { minWidth: 64 }, children: "base" }), (0, jsx_runtime_1.jsx)("span", { style: { width: 16 } }), (0, jsx_runtime_1.jsx)("span", { style: { minWidth: 64 }, children: "compare" })] })] })), hint && (0, jsx_runtime_1.jsx)("span", { style: { fontSize: 13, color: SECONDARY, maxWidth: 440, lineHeight: 1.5 }, children: hint })] }));
|
|
56
42
|
}
|
|
57
43
|
//# sourceMappingURL=inline-compare-empty.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-compare-empty.js","sourceRoot":"","sources":["../inline-compare-empty.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inline-compare-empty.js","sourceRoot":"","sources":["../inline-compare-empty.tsx"],"names":[],"mappings":";;AAgDA,gDAoCC;;AArED,MAAM,MAAM,GAAG,kCAAkC,CAAC;AAClD,MAAM,KAAK,GAAG,4CAA4C,CAAC;AAC3D,MAAM,SAAS,GAAG,yCAAyC,CAAC;AAC5D,MAAM,OAAO,GAAG,kCAAkC,CAAC;AACnD,MAAM,MAAM,GAAG,qCAAqC,CAAC;AACrD,MAAM,OAAO,GAAG,4BAA4B,CAAC;AAE7C,SAAS,WAAW,CAAC,EAAE,OAAO,EAAE,IAAI,EAA6D;IAC/F,MAAM,MAAM,GAAG,IAAI,KAAK,SAAS,CAAC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AAU,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,aAC5D,uBAAC,WAAW,IAAC,OAAO,EAAE,WAAqB,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,GAAI,EACrF,iCAAM,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,uBAAU,EACrD,uBAAC,WAAW,IAAC,OAAO,EAAE,cAAwB,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,GAAI,IACvF,EACN,iCAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,aACxF,iCAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,qBAAa,EAC1C,iCAAM,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,GAAI,EAC9B,iCAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,wBAAgB,IACzC,IACF,CACP,EAEA,IAAI,IAAI,iCAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,YAAG,IAAI,GAAQ,IACnG,CACP,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,32 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component.ui.component-compare.context",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.131",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/ui/component-compare/context",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "ui/component-compare/context",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.131"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"core-js": "^3.0.0",
|
|
13
|
-
"@teambit/component.ui.component-compare.models.component-compare-hooks": "0.0.11",
|
|
14
12
|
"@teambit/component.ui.component-compare.models.component-compare-model": "0.0.112",
|
|
15
13
|
"@teambit/component.ui.component-compare.models.component-compare-state": "0.0.7",
|
|
16
|
-
"@teambit/
|
|
14
|
+
"@teambit/component.ui.component-compare.models.component-compare-hooks": "0.0.11",
|
|
15
|
+
"@teambit/semantics.ui.api-diff-view": "0.0.6"
|
|
17
16
|
},
|
|
18
17
|
"devDependencies": {
|
|
19
|
-
"@types/react": "^19.0.0",
|
|
20
18
|
"@types/mocha": "9.1.0",
|
|
21
|
-
"@
|
|
22
|
-
"@types/react-dom": "^19.0.0",
|
|
23
|
-
"@types/jest": "^26.0.0",
|
|
24
|
-
"@babel/runtime": "7.20.0",
|
|
25
|
-
"@types/testing-library__jest-dom": "5.9.5"
|
|
19
|
+
"@teambit/harmony.envs.core-react-env": "0.0.1"
|
|
26
20
|
},
|
|
27
21
|
"peerDependencies": {
|
|
28
|
-
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
29
|
-
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
22
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
30
23
|
},
|
|
31
24
|
"license": "Apache-2.0",
|
|
32
25
|
"optionalDependencies": {},
|
package/types/asset.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ declare module '*.png' {
|
|
|
5
5
|
declare module '*.svg' {
|
|
6
6
|
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
7
|
|
|
8
|
-
export const ReactComponent: FunctionComponent<
|
|
8
|
+
export const ReactComponent: FunctionComponent<
|
|
9
|
+
SVGProps<SVGSVGElement> & { title?: string }
|
|
10
|
+
>;
|
|
9
11
|
const src: string;
|
|
10
12
|
export default src;
|
|
11
13
|
}
|
|
@@ -27,3 +29,15 @@ declare module '*.bmp' {
|
|
|
27
29
|
const value: any;
|
|
28
30
|
export = value;
|
|
29
31
|
}
|
|
32
|
+
declare module '*.otf' {
|
|
33
|
+
const value: any;
|
|
34
|
+
export = value;
|
|
35
|
+
}
|
|
36
|
+
declare module '*.woff' {
|
|
37
|
+
const value: any;
|
|
38
|
+
export = value;
|
|
39
|
+
}
|
|
40
|
+
declare module '*.woff2' {
|
|
41
|
+
const value: any;
|
|
42
|
+
export = value;
|
|
43
|
+
}
|
|
File without changes
|