add image-utils, add color-utils (#766)
This commit is contained in:
parent
353590a811
commit
80938f4c6c
1 changed files with 22 additions and 0 deletions
|
|
@ -190,6 +190,28 @@ export const PinActions = findByPropsLazy("pinMessage", "unpinMessage");
|
|||
|
||||
export const IconUtils: t.IconUtils = findByPropsLazy("getGuildBannerURL", "getUserAvatarURL");
|
||||
|
||||
export const ColorUtils = mapMangledModuleLazy("Invalid hex color format", {
|
||||
rgbToHex: filters.byCode(".toString(16).slice(1)"),
|
||||
hexToRgba: filters.byCode("rgba(", "??"),
|
||||
hexToRgb: filters.byCode(".rgb();return"),
|
||||
rgbToHsl: filters.byCode("saturation:", "lightness:"),
|
||||
mixColors: filters.byCode(".substring(1,3),16)"),
|
||||
hexWithAlpha: filters.byCode("Invalid hex color format"),
|
||||
getDominantColor: filters.byCode("hex:", "hsv:"),
|
||||
generatePalette: filters.byCode("360/("),
|
||||
});
|
||||
|
||||
export const ImageUtils = mapMangledModuleLazy("Input data is not a valid image.", {
|
||||
extractColors: filters.byCode('"number"==typeof'),
|
||||
fileToDataURL: filters.byCode("Result must be a string"),
|
||||
dataURLToBlob: filters.byCode("new Uint8Array("),
|
||||
dataURLToFile: filters.byCode("new File(["),
|
||||
fitDimensions: filters.byCode("minWidth:", "minHeight:"),
|
||||
loadImage: filters.byCode('addEventListener("load"'),
|
||||
isAnimatedPNG: filters.byCode("File is not a PNG"),
|
||||
base64Size: filters.byCode("Input data is not a valid image."),
|
||||
});
|
||||
|
||||
export const ReadStateUtils = mapMangledModuleLazy('type:"ENABLE_AUTOMATIC_ACK",', {
|
||||
ackChannel: filters.byCode(".isForumLikeChannel(")
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue