This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[popup] Popup fixes and TS conversion
- convert Popup to TypeScript - move imports directly to popup.ts - remove groupEnd arguments which are not allowed - add some typing fixes - allow ES module interop and synthetic imports in tsconfig - remove splitChunks which is breaking output currently - replace non-maintained pusher.color.js with tinycolor - remove unused code - do not display color name and hex3 when there is no exact match: Fixes #192
- Loading branch information
Showing
11 changed files
with
89 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,8 +42,8 @@ | |
"webpack-cli": "^4.9.2", | ||
"webpack-merge": "^5.8.0" | ||
}, | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"color": "^3.2.1" | ||
}, | ||
"packageManager": "[email protected]" | ||
"@ctrl/tinycolor": "^3.4.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TinyColor } from '@ctrl/tinycolor' | ||
|
||
export class EdColor extends TinyColor { | ||
toHex3String(): string | false { | ||
const hex = this.toHex(true) | ||
return hex.length === 3 ? '#' + hex : false | ||
} | ||
|
||
toHslString(): string { | ||
return super.toHslString().replace(/\s/g, "") | ||
} | ||
|
||
toRgbString(): string { | ||
return super.toRgbString().replace(/\s/g, "") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.