This reverts commit 51f5334748.
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
"rollup-plugin-esbuild": "5.0.0",
|
||||
"rollup-plugin-node-externals": "^5.0.0",
|
||||
"sinon": "14.0.1",
|
||||
"typescript": "4.9.3"
|
||||
"typescript": "4.8.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.8.0 || ^17.0.0",
|
||||
|
||||
@@ -32,23 +32,19 @@ export function hexToRgb(color: string) {
|
||||
color = color.slice(1);
|
||||
|
||||
const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');
|
||||
const result = color.match(re);
|
||||
if (!result) {
|
||||
return '';
|
||||
}
|
||||
let colors = Array.from(result);
|
||||
let colors = color.match(re);
|
||||
|
||||
if (colors[0].length === 1) {
|
||||
if (colors && colors[0].length === 1) {
|
||||
colors = colors.map((n) => n + n);
|
||||
}
|
||||
|
||||
const segments = colors
|
||||
.map((n, index) => {
|
||||
return index < 3 ? parseInt(n, 16) : Math.round((parseInt(n, 16) / 255) * 1000) / 1000;
|
||||
})
|
||||
.join(', ');
|
||||
|
||||
return `rgb${colors.length === 4 ? 'a' : ''}(${segments})`;
|
||||
return colors
|
||||
? `rgb${colors.length === 4 ? 'a' : ''}(${colors
|
||||
.map((n, index) => {
|
||||
return index < 3 ? parseInt(n, 16) : Math.round((parseInt(n, 16) / 255) * 1000) / 1000;
|
||||
})
|
||||
.join(', ')})`
|
||||
: '';
|
||||
}
|
||||
|
||||
function intToHex(int: number) {
|
||||
|
||||
@@ -52,6 +52,6 @@
|
||||
"dependencies": {
|
||||
"@grafana/tsconfig": "^1.2.0-rc1",
|
||||
"tslib": "2.4.1",
|
||||
"typescript": "4.9.3"
|
||||
"typescript": "4.8.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
"tracelib": "1.0.1",
|
||||
"ts-loader": "8.4.0",
|
||||
"tslib": "2.4.1",
|
||||
"typescript": "4.9.3",
|
||||
"typescript": "4.8.4",
|
||||
"uuid": "9.0.0",
|
||||
"yaml": "^2.0.0"
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
"rollup-plugin-node-externals": "^5.0.0",
|
||||
"rollup-plugin-sourcemaps": "0.6.3",
|
||||
"rollup-plugin-terser": "7.0.2",
|
||||
"typescript": "4.9.3"
|
||||
"typescript": "4.8.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "17.0.2",
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
"rollup-plugin-dts": "^5.0.0",
|
||||
"rollup-plugin-esbuild": "5.0.0",
|
||||
"rollup-plugin-node-externals": "^5.0.0",
|
||||
"typescript": "4.9.3"
|
||||
"typescript": "4.8.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "2.4.1"
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
"ts-loader": "^9.3.1",
|
||||
"ts-node": "^9.1.0",
|
||||
"tslib": "2.4.0",
|
||||
"typescript": "4.9.3",
|
||||
"typescript": "4.8.2",
|
||||
"webpack": "^5.72.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ const checkoutBranch = async (branchName: string): Promise<Command> => {
|
||||
};
|
||||
|
||||
const gitUrlParse = (url: string): { owner: string; name: string } => {
|
||||
let matchResult: string[] | null = [];
|
||||
let matchResult: RegExpMatchArray | null = [];
|
||||
|
||||
if (url.match(/^git@github.com/)) {
|
||||
// We have an ssh style url.
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
"storybook-addon-turbo-build": "1.1.0",
|
||||
"storybook-dark-mode": "2.0.4",
|
||||
"style-loader": "3.3.1",
|
||||
"typescript": "4.9.3",
|
||||
"typescript": "4.8.4",
|
||||
"webpack": "5.74.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"@types/tinycolor2": "1.4.3",
|
||||
"enzyme": "3.11.0",
|
||||
"sinon": "14.0.1",
|
||||
"typescript": "4.9.3"
|
||||
"typescript": "4.8.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/css": "11.10.5",
|
||||
|
||||
Reference in New Issue
Block a user