Updated node modules
This commit is contained in:
188
node_modules/colord/CHANGELOG.md
generated
vendored
Normal file
188
node_modules/colord/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
### 2.9.3
|
||||
|
||||
- Fix types export for TypeScript 4.7 ❤️ [@pkishorez](https://github.com/pkishorez)
|
||||
|
||||
### 2.9.2
|
||||
|
||||
- Fix: Add "package.json" to exports map
|
||||
|
||||
### 2.9.1
|
||||
|
||||
- Fix: Make minification lossless
|
||||
- Fix: Minify to name only if color is opaque
|
||||
|
||||
### 2.9.0
|
||||
|
||||
- New plugin: Color string minification 🗜
|
||||
|
||||
### 2.8.0
|
||||
|
||||
- New `delta` method to calculate the perceived color difference between two colors ❤️ [@EricRovell](https://github.com/EricRovell)
|
||||
|
||||
### 2.7.0
|
||||
|
||||
- Improve `mix` plugin by adding new `tints`, `tones` and `shades` methods ❤️ [@EricRovell](https://github.com/EricRovell)
|
||||
|
||||
### 2.6.0
|
||||
|
||||
- Support "double split complementary" color harmony generation ❤️ [@EricRovell](https://github.com/EricRovell) & [@lbragile](https://github.com/lbragile)
|
||||
|
||||
### 2.5.0
|
||||
|
||||
- New `closest` option of `toName` method allows you to find the closest color if there is no exact match
|
||||
|
||||
### 2.4.0
|
||||
|
||||
- New plugin: Color harmonies generator ❤️ [@EricRovell](https://github.com/EricRovell)
|
||||
|
||||
### 2.3.0
|
||||
|
||||
- Add new `isEqual` method ❤️ [@EricRovell](https://github.com/EricRovell)
|
||||
|
||||
### 2.2.0
|
||||
|
||||
- New plugin: CMYK color space ❤️ [@EricRovell](https://github.com/EricRovell)
|
||||
|
||||
### 2.1.0
|
||||
|
||||
- Add new `hue` and `rotate` methods
|
||||
|
||||
### 2.0.1
|
||||
|
||||
- Improve the precision of alpha values
|
||||
|
||||
### 2.0.0
|
||||
|
||||
- Strict string color parsing conforming to the CSS Color Level specifications
|
||||
|
||||
### 1.7.2
|
||||
|
||||
- Simplify package "exports" field to improve different environments support
|
||||
|
||||
### 1.7.1
|
||||
|
||||
- Parse a color name disregarding the case
|
||||
|
||||
### 1.7.0
|
||||
|
||||
- New `getFormat` utility
|
||||
- Support HWB color strings (CSS functional notation)
|
||||
- Clamp LAB values as defined in CSS Color Level 4 specs
|
||||
|
||||
### 1.6.0
|
||||
|
||||
- Improvement: You can now use every angle unit supported by CSS (`deg`, `rad`, `grad`, `turn`)
|
||||
|
||||
### 1.5.0
|
||||
|
||||
- New utility: Random color generation
|
||||
|
||||
### 1.4.1
|
||||
|
||||
- Mix colors through CIE LAB color space
|
||||
|
||||
### 1.4.0
|
||||
|
||||
- New plugin: Color mixing
|
||||
- Adjust XYZ, LAB and LCH conversions to the D50 white point ([according to the latest CSS specs](https://drafts.csswg.org/css-color-5/#color-spaces)).
|
||||
|
||||
### 1.3.1
|
||||
|
||||
- Support modern CSS notations of RGB, HSL and LCH color functions
|
||||
|
||||
### 1.3.0
|
||||
|
||||
- New plugin: CIE LCH color space
|
||||
|
||||
### 1.2.1
|
||||
|
||||
- Fix: Do not treat 7-digit hex as a valid color ❤️ [@subzey](https://github.com/subzey)
|
||||
- Parser update: Turn NaN input values into valid numbers ❤️ [@subzey](https://github.com/subzey)
|
||||
|
||||
### 1.2.0
|
||||
|
||||
- New plugin: CIE LAB color space
|
||||
|
||||
### 1.1.1
|
||||
|
||||
- Make bundle 1% lighter
|
||||
|
||||
### 1.1.0
|
||||
|
||||
- Add `isValid` method
|
||||
|
||||
### 1.0
|
||||
|
||||
- An official production-ready release
|
||||
|
||||
### 0.10.2
|
||||
|
||||
- Sort named colors dictionary for better compression ❤️ [@subzey](https://github.com/subzey)
|
||||
|
||||
### 0.10.1
|
||||
|
||||
- Ignore `null` input in the parsers
|
||||
|
||||
### 0.10
|
||||
|
||||
- Shorten conversion method names (`toRgba` to `toRgb`, etc)
|
||||
|
||||
### 0.9.3
|
||||
|
||||
- New plugin: HWB color model
|
||||
- More accurate HSL and HSV conversions
|
||||
|
||||
### 0.9.2
|
||||
|
||||
- Names plugin: Support "transparent" keyword
|
||||
|
||||
### 0.9.1
|
||||
|
||||
- Improve package exports
|
||||
|
||||
### 0.9
|
||||
|
||||
- Add CommonJS exports
|
||||
|
||||
### 0.8
|
||||
|
||||
- New plugin: a11y (Accessibility)
|
||||
|
||||
### 0.7
|
||||
|
||||
- New plugin: CIE XYZ color space
|
||||
|
||||
### 0.6.2
|
||||
|
||||
- 20% speed improvement ❤️ [@jeetiss](https://github.com/jeetiss)
|
||||
|
||||
### 0.6.1
|
||||
|
||||
- 100% code coverage
|
||||
|
||||
### 0.6
|
||||
|
||||
- Make plugin available in Parcel which doesn't support exports map yet
|
||||
- Fix names plugin TS declarations export
|
||||
- Documentation
|
||||
|
||||
### 0.5
|
||||
|
||||
- New plugin: CSS color names
|
||||
|
||||
### 0.4
|
||||
|
||||
- Make the library ESM-first
|
||||
- Add code coverage reports
|
||||
|
||||
### 0.3
|
||||
|
||||
- Implement Plugin API
|
||||
|
||||
### 0.2
|
||||
|
||||
- Support 4 and 8 digit Hex
|
||||
|
||||
### 0.1
|
||||
|
||||
- Basic API
|
21
node_modules/colord/LICENSE.md
generated
vendored
Normal file
21
node_modules/colord/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Vlad Shilov omgovich@ya.ru
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
1053
node_modules/colord/README.md
generated
vendored
Normal file
1053
node_modules/colord/README.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
103
node_modules/colord/colord.d.ts
generated
vendored
Normal file
103
node_modules/colord/colord.d.ts
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
import { AnyColor, RgbaColor, HslaColor, HsvaColor } from "./types";
|
||||
export declare class Colord {
|
||||
private readonly parsed;
|
||||
readonly rgba: RgbaColor;
|
||||
constructor(input: AnyColor);
|
||||
/**
|
||||
* Returns a boolean indicating whether or not an input has been parsed successfully.
|
||||
* Note: If parsing is unsuccessful, Colord defaults to black (does not throws an error).
|
||||
*/
|
||||
isValid(): boolean;
|
||||
/**
|
||||
* Returns the brightness of a color (from 0 to 1).
|
||||
* The calculation logic is modified from WCAG.
|
||||
* https://www.w3.org/TR/AERT/#color-contrast
|
||||
*/
|
||||
brightness(): number;
|
||||
/**
|
||||
* Same as calling `brightness() < 0.5`.
|
||||
*/
|
||||
isDark(): boolean;
|
||||
/**
|
||||
* Same as calling `brightness() >= 0.5`.
|
||||
* */
|
||||
isLight(): boolean;
|
||||
/**
|
||||
* Returns the hexadecimal representation of a color.
|
||||
* When the alpha channel value of the color is less than 1,
|
||||
* it outputs #rrggbbaa format instead of #rrggbb.
|
||||
*/
|
||||
toHex(): string;
|
||||
/**
|
||||
* Converts a color to RGB color space and returns an object.
|
||||
* Always includes an alpha value from 0 to 1.
|
||||
*/
|
||||
toRgb(): RgbaColor;
|
||||
/**
|
||||
* Converts a color to RGB color space and returns a string representation.
|
||||
* Outputs an alpha value only if it is less than 1.
|
||||
*/
|
||||
toRgbString(): string;
|
||||
/**
|
||||
* Converts a color to HSL color space and returns an object.
|
||||
* Always includes an alpha value from 0 to 1.
|
||||
*/
|
||||
toHsl(): HslaColor;
|
||||
/**
|
||||
* Converts a color to HSL color space and returns a string representation.
|
||||
* Always includes an alpha value from 0 to 1.
|
||||
*/
|
||||
toHslString(): string;
|
||||
/**
|
||||
* Converts a color to HSV color space and returns an object.
|
||||
* Always includes an alpha value from 0 to 1.
|
||||
*/
|
||||
toHsv(): HsvaColor;
|
||||
/**
|
||||
* Creates a new instance containing an inverted (opposite) version of the color.
|
||||
*/
|
||||
invert(): Colord;
|
||||
/**
|
||||
* Increases the HSL saturation of a color by the given amount.
|
||||
*/
|
||||
saturate(amount?: number): Colord;
|
||||
/**
|
||||
* Decreases the HSL saturation of a color by the given amount.
|
||||
*/
|
||||
desaturate(amount?: number): Colord;
|
||||
/**
|
||||
* Makes a gray color with the same lightness as a source color.
|
||||
*/
|
||||
grayscale(): Colord;
|
||||
/**
|
||||
* Increases the HSL lightness of a color by the given amount.
|
||||
*/
|
||||
lighten(amount?: number): Colord;
|
||||
/**
|
||||
* Increases the HSL lightness of a color by the given amount.
|
||||
*/
|
||||
darken(amount?: number): Colord;
|
||||
/**
|
||||
* Changes the HSL hue of a color by the given amount.
|
||||
*/
|
||||
rotate(amount?: number): Colord;
|
||||
/**
|
||||
* Allows to get or change an alpha channel value.
|
||||
*/
|
||||
alpha(): number;
|
||||
alpha(value: number): Colord;
|
||||
/**
|
||||
* Allows to get or change a hue value.
|
||||
*/
|
||||
hue(): number;
|
||||
hue(value: number): Colord;
|
||||
/**
|
||||
* Determines whether two values are the same color.
|
||||
*/
|
||||
isEqual(color: AnyColor | Colord): boolean;
|
||||
}
|
||||
/**
|
||||
* Parses the given input color and creates a new `Colord` instance.
|
||||
* See accepted input formats: https://github.com/omgovich/colord#color-parsing
|
||||
*/
|
||||
export declare const colord: (input: AnyColor | Colord) => Colord;
|
10
node_modules/colord/constants.d.ts
generated
vendored
Normal file
10
node_modules/colord/constants.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* We used to work with 2 digits after the decimal point, but it wasn't accurate enough,
|
||||
* so the library produced colors that were perceived differently.
|
||||
*/
|
||||
export declare const ALPHA_PRECISION = 3;
|
||||
/**
|
||||
* Valid CSS <angle> units.
|
||||
* https://developer.mozilla.org/en-US/docs/Web/CSS/angle
|
||||
*/
|
||||
export declare const ANGLE_UNITS: Record<string, number>;
|
4
node_modules/colord/extend.d.ts
generated
vendored
Normal file
4
node_modules/colord/extend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { Colord } from "./colord";
|
||||
import { Parsers } from "./types";
|
||||
export declare type Plugin = (ColordClass: typeof Colord, parsers: Parsers) => void;
|
||||
export declare const extend: (plugins: Plugin[]) => void;
|
20
node_modules/colord/helpers.d.ts
generated
vendored
Normal file
20
node_modules/colord/helpers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
export declare const isPresent: (value: unknown) => boolean;
|
||||
export declare const round: (number: number, digits?: number, base?: number) => number;
|
||||
export declare const floor: (number: number, digits?: number, base?: number) => number;
|
||||
/**
|
||||
* Clamps a value between an upper and lower bound.
|
||||
* We use ternary operators because it makes the minified code
|
||||
* is 2 times shorter then `Math.min(Math.max(a,b),c)`
|
||||
* NaN is clamped to the lower bound
|
||||
*/
|
||||
export declare const clamp: (number: number, min?: number, max?: number) => number;
|
||||
/**
|
||||
* Processes and clamps a degree (angle) value properly.
|
||||
* Any `NaN` or `Infinity` will be converted to `0`.
|
||||
* Examples: -1 => 359, 361 => 1
|
||||
*/
|
||||
export declare const clampHue: (degrees: number) => number;
|
||||
/**
|
||||
* Converts a hue value to degrees from 0 to 360 inclusive.
|
||||
*/
|
||||
export declare const parseHue: (value: string, unit?: string) => number;
|
5
node_modules/colord/index.d.ts
generated
vendored
Normal file
5
node_modules/colord/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { colord, Colord } from "./colord";
|
||||
export { extend, Plugin } from "./extend";
|
||||
export { getFormat } from "./parse";
|
||||
export { random } from "./random";
|
||||
export { HslColor, HslaColor, HsvColor, HsvaColor, HwbColor, HwbaColor, LabColor, LabaColor, LchColor, LchaColor, RgbColor, RgbaColor, XyzColor, XyzaColor, AnyColor, } from "./types";
|
1
node_modules/colord/index.js
generated
vendored
Normal file
1
node_modules/colord/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/colord/index.mjs
generated
vendored
Normal file
1
node_modules/colord/index.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
210
node_modules/colord/package.json
generated
vendored
Normal file
210
node_modules/colord/package.json
generated
vendored
Normal file
@@ -0,0 +1,210 @@
|
||||
{
|
||||
"name": "colord",
|
||||
"version": "2.9.3",
|
||||
"description": "👑 A tiny yet powerful tool for high-performance color manipulations and conversions",
|
||||
"keywords": [
|
||||
"color",
|
||||
"parser",
|
||||
"convert",
|
||||
"tiny",
|
||||
"hex",
|
||||
"rgb",
|
||||
"hsl",
|
||||
"hsv",
|
||||
"hwb",
|
||||
"lab",
|
||||
"lch",
|
||||
"xyz",
|
||||
"css",
|
||||
"color-names",
|
||||
"a11y",
|
||||
"cmyk",
|
||||
"mix",
|
||||
"minify",
|
||||
"harmonies"
|
||||
],
|
||||
"repository": "omgovich/colord",
|
||||
"author": "Vlad Shilov <omgovich@ya.ru>",
|
||||
"license": "MIT",
|
||||
"sideEffects": false,
|
||||
"main": "./index.js",
|
||||
"module": "./index.mjs",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./index.d.ts",
|
||||
"import": "./index.mjs",
|
||||
"require": "./index.js",
|
||||
"default": "./index.mjs"
|
||||
},
|
||||
"./plugins/a11y": {
|
||||
"types": "./plugins/a11y.d.ts",
|
||||
"import": "./plugins/a11y.mjs",
|
||||
"require": "./plugins/a11y.js",
|
||||
"default": "./plugins/a11y.mjs"
|
||||
},
|
||||
"./plugins/cmyk": {
|
||||
"types": "./plugins/cmyk.d.ts",
|
||||
"import": "./plugins/cmyk.mjs",
|
||||
"require": "./plugins/cmyk.js",
|
||||
"default": "./plugins/cmyk.mjs"
|
||||
},
|
||||
"./plugins/harmonies": {
|
||||
"types": "./plugins/harmonies.d.ts",
|
||||
"import": "./plugins/harmonies.mjs",
|
||||
"require": "./plugins/harmonies.js",
|
||||
"default": "./plugins/harmonies.mjs"
|
||||
},
|
||||
"./plugins/hwb": {
|
||||
"types": "./plugins/hwb.d.ts",
|
||||
"import": "./plugins/hwb.mjs",
|
||||
"require": "./plugins/hwb.js",
|
||||
"default": "./plugins/hwb.mjs"
|
||||
},
|
||||
"./plugins/lab": {
|
||||
"types": "./plugins/lab.d.ts",
|
||||
"import": "./plugins/lab.mjs",
|
||||
"require": "./plugins/lab.js",
|
||||
"default": "./plugins/lab.mjs"
|
||||
},
|
||||
"./plugins/lch": {
|
||||
"types": "./plugins/lch.d.ts",
|
||||
"import": "./plugins/lch.mjs",
|
||||
"require": "./plugins/lch.js",
|
||||
"default": "./plugins/lch.mjs"
|
||||
},
|
||||
"./plugins/minify": {
|
||||
"types": "./plugins/minify.d.ts",
|
||||
"import": "./plugins/minify.mjs",
|
||||
"require": "./plugins/minify.js",
|
||||
"default": "./plugins/minify.mjs"
|
||||
},
|
||||
"./plugins/mix": {
|
||||
"types": "./plugins/mix.d.ts",
|
||||
"import": "./plugins/mix.mjs",
|
||||
"require": "./plugins/mix.js",
|
||||
"default": "./plugins/mix.mjs"
|
||||
},
|
||||
"./plugins/names": {
|
||||
"types": "./plugins/names.d.ts",
|
||||
"import": "./plugins/names.mjs",
|
||||
"require": "./plugins/names.js",
|
||||
"default": "./plugins/names.mjs"
|
||||
},
|
||||
"./plugins/xyz": {
|
||||
"types": "./plugins/xyz.d.ts",
|
||||
"import": "./plugins/xyz.mjs",
|
||||
"require": "./plugins/xyz.js",
|
||||
"default": "./plugins/xyz.mjs"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"files": [
|
||||
"*.{js,mjs,ts,map}",
|
||||
"plugins/*.{js,mjs,ts,map}"
|
||||
],
|
||||
"types": "index.d.ts",
|
||||
"scripts": {
|
||||
"lint": "eslint src/**/*.ts",
|
||||
"size": "npm run build && size-limit",
|
||||
"check-types": "tsc --noEmit true",
|
||||
"test": "jest tests --coverage",
|
||||
"benchmark": "tsc --outDir bench --skipLibCheck --esModuleInterop ./tests/benchmark.ts && node ./bench/tests/benchmark.js && rm -rf ./bench",
|
||||
"build": "rm -rf ./dist/* && rollup --config",
|
||||
"release": "npm run build && cp *.json dist && cp *.md dist && npm publish dist",
|
||||
"check-release": "npm run release -- --dry-run"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@size-limit/preset-small-lib": "^4.10.1",
|
||||
"@types/jest": "^26.0.22",
|
||||
"@typescript-eslint/eslint-plugin": "^4.19.0",
|
||||
"@typescript-eslint/parser": "^4.19.0",
|
||||
"ac-colors": "^1.4.2",
|
||||
"benny": "^3.6.15",
|
||||
"chroma-js": "^2.1.1",
|
||||
"color": "^3.1.3",
|
||||
"eslint": "^7.14.0",
|
||||
"eslint-config-prettier": "^6.15.0",
|
||||
"eslint-plugin-prettier": "^3.1.4",
|
||||
"glob": "^7.1.6",
|
||||
"jest": "^26.6.3",
|
||||
"prettier": "^2.2.0",
|
||||
"rollup": "^2.43.1",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"rollup-plugin-typescript2": "^0.30.0",
|
||||
"size-limit": "^4.10.1",
|
||||
"tinycolor2": "^1.4.2",
|
||||
"ts-jest": "^26.5.4",
|
||||
"ts-node": "^9.1.1",
|
||||
"tslib": "^2.1.0",
|
||||
"typescript": "^4.2.3"
|
||||
},
|
||||
"jest": {
|
||||
"verbose": true,
|
||||
"transform": {
|
||||
"^.+\\.ts$": "ts-jest"
|
||||
}
|
||||
},
|
||||
"eslintConfig": {
|
||||
"plugins": [
|
||||
"prettier"
|
||||
],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:prettier/recommended",
|
||||
"prettier/@typescript-eslint"
|
||||
]
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 100
|
||||
},
|
||||
"size-limit": [
|
||||
{
|
||||
"path": "dist/index.mjs",
|
||||
"import": "{ colord }",
|
||||
"limit": "2 KB"
|
||||
},
|
||||
{
|
||||
"path": "dist/plugins/a11y.mjs",
|
||||
"limit": "0.5 KB"
|
||||
},
|
||||
{
|
||||
"path": "dist/plugins/cmyk.mjs",
|
||||
"limit": "1 KB"
|
||||
},
|
||||
{
|
||||
"path": "dist/plugins/harmonies.mjs",
|
||||
"limit": "0.5 KB"
|
||||
},
|
||||
{
|
||||
"path": "dist/plugins/hwb.mjs",
|
||||
"limit": "1 KB"
|
||||
},
|
||||
{
|
||||
"path": "dist/plugins/lab.mjs",
|
||||
"limit": "1.5 KB"
|
||||
},
|
||||
{
|
||||
"path": "dist/plugins/lch.mjs",
|
||||
"limit": "1.5 KB"
|
||||
},
|
||||
{
|
||||
"path": "dist/plugins/minify.mjs",
|
||||
"limit": "0.6 KB"
|
||||
},
|
||||
{
|
||||
"path": "dist/plugins/mix.mjs",
|
||||
"limit": "1 KB"
|
||||
},
|
||||
{
|
||||
"path": "dist/plugins/names.mjs",
|
||||
"limit": "1.5 KB"
|
||||
},
|
||||
{
|
||||
"path": "dist/plugins/xyz.mjs",
|
||||
"limit": "1 KB"
|
||||
}
|
||||
]
|
||||
}
|
8
node_modules/colord/parse.d.ts
generated
vendored
Normal file
8
node_modules/colord/parse.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Parsers, ParseResult, Input, Format } from "./types";
|
||||
export declare const parsers: Parsers;
|
||||
/** Tries to convert an incoming value into RGBA color by going through all color model parsers */
|
||||
export declare const parse: (input: Input) => ParseResult | [null, undefined];
|
||||
/**
|
||||
* Returns a color model name for the input passed to the function.
|
||||
*/
|
||||
export declare const getFormat: (input: Input) => Format | undefined;
|
38
node_modules/colord/plugins/a11y.d.ts
generated
vendored
Normal file
38
node_modules/colord/plugins/a11y.d.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import { AnyColor } from "../types";
|
||||
import { Plugin } from "../extend";
|
||||
interface ReadabilityOptions {
|
||||
level?: "AA" | "AAA";
|
||||
size?: "normal" | "large";
|
||||
}
|
||||
declare module "../colord" {
|
||||
interface Colord {
|
||||
/**
|
||||
* Returns the relative luminance of a color,
|
||||
* normalized to 0 for darkest black and 1 for lightest white.
|
||||
* https://www.w3.org/TR/WCAG20/#relativeluminancedef
|
||||
* https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_Colors_and_Luminance
|
||||
*/
|
||||
luminance(): number;
|
||||
/**
|
||||
* Calculates a contrast ratio for a color pair.
|
||||
* This luminance difference is expressed as a ratio ranging
|
||||
* from 1 (e.g. white on white) to 21 (e.g., black on a white).
|
||||
* WCAG requires a ratio of at least 4.5 for normal text and 3 for large text.
|
||||
* https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html
|
||||
* https://webaim.org/articles/contrast/
|
||||
*/
|
||||
contrast(color2?: AnyColor | Colord): number;
|
||||
/**
|
||||
* Checks that a background and text color pair conforms to WCAG 2.0 requirements.
|
||||
* https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html
|
||||
*/
|
||||
isReadable(color2?: AnyColor | Colord, options?: ReadabilityOptions): boolean;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A plugin adding accessibility and color contrast utilities.
|
||||
* Follows Web Content Accessibility Guidelines 2.0.
|
||||
* https://www.w3.org/TR/WCAG20/
|
||||
*/
|
||||
declare const a11yPlugin: Plugin;
|
||||
export default a11yPlugin;
|
1
node_modules/colord/plugins/a11y.js
generated
vendored
Normal file
1
node_modules/colord/plugins/a11y.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var o=function(o){var t=o/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},t=function(t){return.2126*o(t.r)+.7152*o(t.g)+.0722*o(t.b)};module.exports=function(o){o.prototype.luminance=function(){return o=t(this.rgba),void 0===(r=2)&&(r=0),void 0===n&&(n=Math.pow(10,r)),Math.round(n*o)/n+0;var o,r,n},o.prototype.contrast=function(r){void 0===r&&(r="#FFF");var n,i,a,e,v,u,d,c=r instanceof o?r:new o(r);return e=this.rgba,v=c.toRgb(),u=t(e),d=t(v),n=u>d?(u+.05)/(d+.05):(d+.05)/(u+.05),void 0===(i=2)&&(i=0),void 0===a&&(a=Math.pow(10,i)),Math.floor(a*n)/a+0},o.prototype.isReadable=function(o,t){return void 0===o&&(o="#FFF"),void 0===t&&(t={}),this.contrast(o)>=(e=void 0===(a=(r=t).size)?"normal":a,"AAA"===(i=void 0===(n=r.level)?"AA":n)&&"normal"===e?7:"AA"===i&&"large"===e?3:4.5);var r,n,i,a,e}};
|
1
node_modules/colord/plugins/a11y.mjs
generated
vendored
Normal file
1
node_modules/colord/plugins/a11y.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var o=function(o){var t=o/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},t=function(t){return.2126*o(t.r)+.7152*o(t.g)+.0722*o(t.b)};export default function(o){o.prototype.luminance=function(){return o=t(this.rgba),void 0===(r=2)&&(r=0),void 0===n&&(n=Math.pow(10,r)),Math.round(n*o)/n+0;var o,r,n},o.prototype.contrast=function(r){void 0===r&&(r="#FFF");var n,a,i,e,v,u,d,c=r instanceof o?r:new o(r);return e=this.rgba,v=c.toRgb(),u=t(e),d=t(v),n=u>d?(u+.05)/(d+.05):(d+.05)/(u+.05),void 0===(a=2)&&(a=0),void 0===i&&(i=Math.pow(10,a)),Math.floor(i*n)/i+0},o.prototype.isReadable=function(o,t){return void 0===o&&(o="#FFF"),void 0===t&&(t={}),this.contrast(o)>=(e=void 0===(i=(r=t).size)?"normal":i,"AAA"===(a=void 0===(n=r.level)?"AA":n)&&"normal"===e?7:"AA"===a&&"large"===e?3:4.5);var r,n,a,i,e}}
|
24
node_modules/colord/plugins/cmyk.d.ts
generated
vendored
Normal file
24
node_modules/colord/plugins/cmyk.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import { CmykaColor } from "../types";
|
||||
import { Plugin } from "../extend";
|
||||
declare module "../colord" {
|
||||
interface Colord {
|
||||
/**
|
||||
* Converts a color to CMYK color space and returns an object.
|
||||
* https://drafts.csswg.org/css-color/#cmyk-colors
|
||||
* https://lea.verou.me/2009/03/cmyk-colors-in-css-useful-or-useless/
|
||||
*/
|
||||
toCmyk(): CmykaColor;
|
||||
/**
|
||||
* Converts a color to CMYK color space and returns a string.
|
||||
* https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/device-cmyk()
|
||||
*/
|
||||
toCmykString(): string;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A plugin adding support for CMYK color space.
|
||||
* https://lea.verou.me/2009/03/cmyk-colors-in-css-useful-or-useless/
|
||||
* https://en.wikipedia.org/wiki/CMYK_color_model
|
||||
*/
|
||||
declare const cmykPlugin: Plugin;
|
||||
export default cmykPlugin;
|
1
node_modules/colord/plugins/cmyk.js
generated
vendored
Normal file
1
node_modules/colord/plugins/cmyk.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var r=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=Math.pow(10,n)),Math.round(t*r)/t+0},t=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=1),r>t?t:r>n?r:n},u=function(r){return{c:t(r.c,0,100),m:t(r.m,0,100),y:t(r.y,0,100),k:t(r.k,0,100),a:t(r.a)}},e=function(r){return{c:n(r.c,2),m:n(r.m,2),y:n(r.y,2),k:n(r.k,2),a:n(r.a,3)}};function c(r){return{r:n(255*(1-r.c/100)*(1-r.k/100)),g:n(255*(1-r.m/100)*(1-r.k/100)),b:n(255*(1-r.y/100)*(1-r.k/100)),a:r.a}}function o(r){var t=1-Math.max(r.r/255,r.g/255,r.b/255),u=(1-r.r/255-t)/(1-t),e=(1-r.g/255-t)/(1-t),c=(1-r.b/255-t)/(1-t);return{c:isNaN(u)?0:n(100*u),m:isNaN(e)?0:n(100*e),y:isNaN(c)?0:n(100*c),k:n(100*t),a:r.a}}function i(n){var t=n.c,e=n.m,o=n.y,i=n.k,m=n.a,a=void 0===m?1:m;return r(t)&&r(e)&&r(o)&&r(i)?c(u({c:Number(t),m:Number(e),y:Number(o),k:Number(i),a:Number(a)})):null}var m=/^device-cmyk\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,a=function(r){var n=m.exec(r);return n?c(u({c:Number(n[1])*(n[2]?1:100),m:Number(n[3])*(n[4]?1:100),y:Number(n[5])*(n[6]?1:100),k:Number(n[7])*(n[8]?1:100),a:void 0===n[9]?1:Number(n[9])/(n[10]?100:1)})):null};module.exports=function(r,n){r.prototype.toCmyk=function(){return e(o(this.rgba))},r.prototype.toCmykString=function(){return r=e(o(this.rgba)),n=r.c,t=r.m,u=r.y,c=r.k,(i=r.a)<1?"device-cmyk("+n+"% "+t+"% "+u+"% "+c+"% / "+i+")":"device-cmyk("+n+"% "+t+"% "+u+"% "+c+"%)";var r,n,t,u,c,i},n.object.push([i,"cmyk"]),n.string.push([a,"cmyk"])};
|
1
node_modules/colord/plugins/cmyk.mjs
generated
vendored
Normal file
1
node_modules/colord/plugins/cmyk.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var r=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=Math.pow(10,n)),Math.round(t*r)/t+0},t=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=1),r>t?t:r>n?r:n},u=function(r){return{c:t(r.c,0,100),m:t(r.m,0,100),y:t(r.y,0,100),k:t(r.k,0,100),a:t(r.a)}},e=function(r){return{c:n(r.c,2),m:n(r.m,2),y:n(r.y,2),k:n(r.k,2),a:n(r.a,3)}};function c(r){return{r:n(255*(1-r.c/100)*(1-r.k/100)),g:n(255*(1-r.m/100)*(1-r.k/100)),b:n(255*(1-r.y/100)*(1-r.k/100)),a:r.a}}function i(r){var t=1-Math.max(r.r/255,r.g/255,r.b/255),u=(1-r.r/255-t)/(1-t),e=(1-r.g/255-t)/(1-t),c=(1-r.b/255-t)/(1-t);return{c:isNaN(u)?0:n(100*u),m:isNaN(e)?0:n(100*e),y:isNaN(c)?0:n(100*c),k:n(100*t),a:r.a}}function o(n){var t=n.c,e=n.m,i=n.y,o=n.k,m=n.a,a=void 0===m?1:m;return r(t)&&r(e)&&r(i)&&r(o)?c(u({c:Number(t),m:Number(e),y:Number(i),k:Number(o),a:Number(a)})):null}var m=/^device-cmyk\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,a=function(r){var n=m.exec(r);return n?c(u({c:Number(n[1])*(n[2]?1:100),m:Number(n[3])*(n[4]?1:100),y:Number(n[5])*(n[6]?1:100),k:Number(n[7])*(n[8]?1:100),a:void 0===n[9]?1:Number(n[9])/(n[10]?100:1)})):null};export default function(r,n){r.prototype.toCmyk=function(){return e(i(this.rgba))},r.prototype.toCmykString=function(){return r=e(i(this.rgba)),n=r.c,t=r.m,u=r.y,c=r.k,(o=r.a)<1?"device-cmyk("+n+"% "+t+"% "+u+"% "+c+"% / "+o+")":"device-cmyk("+n+"% "+t+"% "+u+"% "+c+"%)";var r,n,t,u,c,o},n.object.push([o,"cmyk"]),n.string.push([a,"cmyk"])}
|
16
node_modules/colord/plugins/harmonies.d.ts
generated
vendored
Normal file
16
node_modules/colord/plugins/harmonies.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Plugin } from "../extend";
|
||||
export declare type HarmonyType = "analogous" | "complementary" | "double-split-complementary" | "rectangle" | "split-complementary" | "tetradic" | "triadic";
|
||||
declare module "../colord" {
|
||||
interface Colord {
|
||||
/**
|
||||
* Returns an array of harmony colors as `Colord` instances.
|
||||
*/
|
||||
harmonies(type?: HarmonyType): Colord[];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A plugin adding functionality to generate harmony colors.
|
||||
* https://en.wikipedia.org/wiki/Harmony_(color)
|
||||
*/
|
||||
declare const harmoniesPlugin: Plugin;
|
||||
export default harmoniesPlugin;
|
1
node_modules/colord/plugins/harmonies.js
generated
vendored
Normal file
1
node_modules/colord/plugins/harmonies.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports=function(t){var e={analogous:[-30,0,30],complementary:[0,180],"double-split-complementary":[-30,0,30,150,210],rectangle:[0,60,180,240],tetradic:[0,90,180,270],triadic:[0,120,240],"split-complementary":[0,150,210]};t.prototype.harmonies=function(t){var o=this;return void 0===t&&(t="complementary"),e[t].map(function(t){return o.rotate(t)})}};
|
1
node_modules/colord/plugins/harmonies.mjs
generated
vendored
Normal file
1
node_modules/colord/plugins/harmonies.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function(t){var e={analogous:[-30,0,30],complementary:[0,180],"double-split-complementary":[-30,0,30,150,210],rectangle:[0,60,180,240],tetradic:[0,90,180,270],triadic:[0,120,240],"split-complementary":[0,150,210]};t.prototype.harmonies=function(t){var r=this;return void 0===t&&(t="complementary"),e[t].map(function(t){return r.rotate(t)})}}
|
23
node_modules/colord/plugins/hwb.d.ts
generated
vendored
Normal file
23
node_modules/colord/plugins/hwb.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { HwbaColor } from "../types";
|
||||
import { Plugin } from "../extend";
|
||||
declare module "../colord" {
|
||||
interface Colord {
|
||||
/**
|
||||
* Converts a color to HWB (Hue-Whiteness-Blackness) color space and returns an object.
|
||||
* https://en.wikipedia.org/wiki/HWB_color_model
|
||||
*/
|
||||
toHwb(): HwbaColor;
|
||||
/**
|
||||
* Converts a color to HWB (Hue-Whiteness-Blackness) color space and returns a string.
|
||||
* https://www.w3.org/TR/css-color-4/#the-hwb-notation
|
||||
*/
|
||||
toHwbString(): string;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A plugin adding support for HWB (Hue-Whiteness-Blackness) color model.
|
||||
* https://en.wikipedia.org/wiki/HWB_color_model
|
||||
* https://www.w3.org/TR/css-color-4/#the-hwb-notation
|
||||
*/
|
||||
declare const hwbPlugin: Plugin;
|
||||
export default hwbPlugin;
|
1
node_modules/colord/plugins/hwb.js
generated
vendored
Normal file
1
node_modules/colord/plugins/hwb.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var r={grad:.9,turn:360,rad:360/(2*Math.PI)},n=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},t=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=Math.pow(10,n)),Math.round(t*r)/t+0},u=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=1),r>t?t:r>n?r:n},a=function(r){return{h:(n=r.h,(n=isFinite(n)?n%360:0)>0?n:n+360),w:u(r.w,0,100),b:u(r.b,0,100),a:u(r.a)};var n},e=function(r){return{h:t(r.h),w:t(r.w),b:t(r.b),a:t(r.a,3)}},o=function(r){return{h:function(r){var n=r.r,t=r.g,u=r.b,a=r.a,e=Math.max(n,t,u),o=e-Math.min(n,t,u),b=o?e===n?(t-u)/o:e===t?2+(u-n)/o:4+(n-t)/o:0;return{h:60*(b<0?b+6:b),s:e?o/e*100:0,v:e/255*100,a:a}}(r).h,w:Math.min(r.r,r.g,r.b)/255*100,b:100-Math.max(r.r,r.g,r.b)/255*100,a:r.a}},b=function(r){return function(r){var n=r.h,t=r.s,u=r.v,a=r.a;n=n/360*6,t/=100,u/=100;var e=Math.floor(n),o=u*(1-t),b=u*(1-(n-e)*t),i=u*(1-(1-n+e)*t),h=e%6;return{r:255*[u,b,o,o,i,u][h],g:255*[i,u,u,b,o,o][h],b:255*[o,o,i,u,u,b][h],a:a}}({h:r.h,s:100===r.b?0:100-r.w/(100-r.b)*100,v:100-r.b,a:r.a})},i=function(r){var t=r.h,u=r.w,e=r.b,o=r.a,i=void 0===o?1:o;if(!n(t)||!n(u)||!n(e))return null;var h=a({h:Number(t),w:Number(u),b:Number(e),a:Number(i)});return b(h)},h=/^hwb\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,d=function(n){var t=h.exec(n);if(!t)return null;var u,e,o=a({h:(u=t[1],e=t[2],void 0===e&&(e="deg"),Number(u)*(r[e]||1)),w:Number(t[3]),b:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return b(o)};module.exports=function(r,n){r.prototype.toHwb=function(){return e(o(this.rgba))},r.prototype.toHwbString=function(){return r=e(o(this.rgba)),n=r.h,t=r.w,u=r.b,(a=r.a)<1?"hwb("+n+" "+t+"% "+u+"% / "+a+")":"hwb("+n+" "+t+"% "+u+"%)";var r,n,t,u,a},n.string.push([d,"hwb"]),n.object.push([i,"hwb"])};
|
1
node_modules/colord/plugins/hwb.mjs
generated
vendored
Normal file
1
node_modules/colord/plugins/hwb.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},u=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},a=function(r){return{h:(t=r.h,(t=isFinite(t)?t%360:0)>0?t:t+360),w:u(r.w,0,100),b:u(r.b,0,100),a:u(r.a)};var t},e=function(r){return{h:n(r.h),w:n(r.w),b:n(r.b),a:n(r.a,3)}},b=function(r){return{h:function(r){var t=r.r,n=r.g,u=r.b,a=r.a,e=Math.max(t,n,u),b=e-Math.min(t,n,u),o=b?e===t?(n-u)/b:e===n?2+(u-t)/b:4+(t-n)/b:0;return{h:60*(o<0?o+6:o),s:e?b/e*100:0,v:e/255*100,a:a}}(r).h,w:Math.min(r.r,r.g,r.b)/255*100,b:100-Math.max(r.r,r.g,r.b)/255*100,a:r.a}},o=function(r){return function(r){var t=r.h,n=r.s,u=r.v,a=r.a;t=t/360*6,n/=100,u/=100;var e=Math.floor(t),b=u*(1-n),o=u*(1-(t-e)*n),i=u*(1-(1-t+e)*n),h=e%6;return{r:255*[u,o,b,b,i,u][h],g:255*[i,u,u,o,b,b][h],b:255*[b,b,i,u,u,o][h],a:a}}({h:r.h,s:100===r.b?0:100-r.w/(100-r.b)*100,v:100-r.b,a:r.a})},i=function(r){var n=r.h,u=r.w,e=r.b,b=r.a,i=void 0===b?1:b;if(!t(n)||!t(u)||!t(e))return null;var h=a({h:Number(n),w:Number(u),b:Number(e),a:Number(i)});return o(h)},h=/^hwb\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,d=function(t){var n=h.exec(t);if(!n)return null;var u,e,b=a({h:(u=n[1],e=n[2],void 0===e&&(e="deg"),Number(u)*(r[e]||1)),w:Number(n[3]),b:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return o(b)};export default function(r,t){r.prototype.toHwb=function(){return e(b(this.rgba))},r.prototype.toHwbString=function(){return r=e(b(this.rgba)),t=r.h,n=r.w,u=r.b,(a=r.a)<1?"hwb("+t+" "+n+"% "+u+"% / "+a+")":"hwb("+t+" "+n+"% "+u+"%)";var r,t,n,u,a},t.string.push([d,"hwb"]),t.object.push([i,"hwb"])}
|
23
node_modules/colord/plugins/lab.d.ts
generated
vendored
Normal file
23
node_modules/colord/plugins/lab.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { LabaColor, AnyColor } from "../types";
|
||||
import { Plugin } from "../extend";
|
||||
declare module "../colord" {
|
||||
interface Colord {
|
||||
/**
|
||||
* Converts a color to CIELAB color space and returns an object.
|
||||
* The object always includes `alpha` value [0, 1].
|
||||
*/
|
||||
toLab(): LabaColor;
|
||||
/**
|
||||
* Calculates the perceived color difference for two colors according to
|
||||
* [Delta E2000](https://en.wikipedia.org/wiki/Color_difference#CIEDE2000).
|
||||
* Returns a value in [0, 1] range.
|
||||
*/
|
||||
delta(color?: AnyColor | Colord): number;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A plugin adding support for CIELAB color space.
|
||||
* https://en.wikipedia.org/wiki/CIELAB_color_space
|
||||
*/
|
||||
declare const labPlugin: Plugin;
|
||||
export default labPlugin;
|
1
node_modules/colord/plugins/lab.js
generated
vendored
Normal file
1
node_modules/colord/plugins/lab.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var a=function(a){return"string"==typeof a?a.length>0:"number"==typeof a},t=function(a,t,o){return void 0===t&&(t=0),void 0===o&&(o=Math.pow(10,t)),Math.round(o*a)/o+0},o=function(a,t,o){return void 0===t&&(t=0),void 0===o&&(o=1),a>o?o:a>t?a:t},r=function(a){var t=a/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},h=function(a){return 255*(a>.0031308?1.055*Math.pow(a,1/2.4)-.055:12.92*a)},n=96.422,p=100,M=82.521,u=function(a){var t,r,n={x:.9555766*(t=a).x+-.0230393*t.y+.0631636*t.z,y:-.0282895*t.x+1.0099416*t.y+.0210077*t.z,z:.0122982*t.x+-.020483*t.y+1.3299098*t.z};return r={r:h(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:h(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:h(556434e-9*n.x-.002040259*n.y+.010572252*n.z),a:a.a},{r:o(r.r,0,255),g:o(r.g,0,255),b:o(r.b,0,255),a:o(r.a)}},e=function(a){var t=r(a.r),h=r(a.g),u=r(a.b);return function(a){return{x:o(a.x,0,n),y:o(a.y,0,p),z:o(a.z,0,M),a:o(a.a)}}(function(a){return{x:1.0478112*a.x+.0228866*a.y+-.050127*a.z,y:.0295424*a.x+.9904844*a.y+-.0170491*a.z,z:-.0092345*a.x+.0150436*a.y+.7521316*a.z,a:a.a}}({x:100*(.4124564*t+.3575761*h+.1804375*u),y:100*(.2126729*t+.7151522*h+.072175*u),z:100*(.0193339*t+.119192*h+.9503041*u),a:a.a}))},w=216/24389,b=24389/27,i=function(t){var r=t.l,h=t.a,n=t.b,p=t.alpha,M=void 0===p?1:p;if(!a(r)||!a(h)||!a(n))return null;var u=function(a){return{l:o(a.l,0,400),a:a.a,b:a.b,alpha:o(a.alpha)}}({l:Number(r),a:Number(h),b:Number(n),alpha:Number(M)});return l(u)},l=function(a){var t=(a.l+16)/116,o=a.a/500+t,r=t-a.b/200;return u({x:(Math.pow(o,3)>w?Math.pow(o,3):(116*o-16)/b)*n,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/b)*p,z:(Math.pow(r,3)>w?Math.pow(r,3):(116*r-16)/b)*M,a:a.alpha})};module.exports=function(a,r){a.prototype.toLab=function(){return o=e(this.rgba),h=o.y/p,u=o.z/M,r=(r=o.x/n)>w?Math.cbrt(r):(b*r+16)/116,a={l:116*(h=h>w?Math.cbrt(h):(b*h+16)/116)-16,a:500*(r-h),b:200*(h-(u=u>w?Math.cbrt(u):(b*u+16)/116)),alpha:o.a},{l:t(a.l,2),a:t(a.a,2),b:t(a.b,2),alpha:t(a.alpha,3)};var a,o,r,h,u},a.prototype.delta=function(r){void 0===r&&(r="#FFF");var h=r instanceof a?r:new a(r),n=function(a,t){var o=a.l,r=a.a,h=a.b,n=t.l,p=t.a,M=t.b,u=180/Math.PI,e=Math.PI/180,w=Math.pow(Math.pow(r,2)+Math.pow(h,2),.5),b=Math.pow(Math.pow(p,2)+Math.pow(M,2),.5),i=(o+n)/2,l=Math.pow((w+b)/2,7),c=.5*(1-Math.pow(l/(l+Math.pow(25,7)),.5)),f=r*(1+c),y=p*(1+c),v=Math.pow(Math.pow(f,2)+Math.pow(h,2),.5),x=Math.pow(Math.pow(y,2)+Math.pow(M,2),.5),z=(v+x)/2,s=0===f&&0===h?0:Math.atan2(h,f)*u,d=0===y&&0===M?0:Math.atan2(M,y)*u;s<0&&(s+=360),d<0&&(d+=360);var g=d-s,m=Math.abs(d-s);m>180&&d<=s?g+=360:m>180&&d>s&&(g-=360);var N=s+d;m<=180?N/=2:N=(s+d<360?N+360:N-360)/2;var F=1-.17*Math.cos(e*(N-30))+.24*Math.cos(2*e*N)+.32*Math.cos(e*(3*N+6))-.2*Math.cos(e*(4*N-63)),L=n-o,I=x-v,P=2*Math.sin(e*g/2)*Math.pow(v*x,.5),j=1+.015*Math.pow(i-50,2)/Math.pow(20+Math.pow(i-50,2),.5),k=1+.045*z,q=1+.015*z*F,A=30*Math.exp(-1*Math.pow((N-275)/25,2)),B=-2*Math.pow(l/(l+Math.pow(25,7)),.5)*Math.sin(2*e*A);return Math.pow(Math.pow(L/1/j,2)+Math.pow(I/1/k,2)+Math.pow(P/1/q,2)+B*I*P/(1*k*1*q),.5)}(this.toLab(),h.toLab())/100;return o(t(n,3))},r.object.push([i,"lab"])};
|
1
node_modules/colord/plugins/lab.mjs
generated
vendored
Normal file
1
node_modules/colord/plugins/lab.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var a=function(a){return"string"==typeof a?a.length>0:"number"==typeof a},t=function(a,t,o){return void 0===t&&(t=0),void 0===o&&(o=Math.pow(10,t)),Math.round(o*a)/o+0},o=function(a,t,o){return void 0===t&&(t=0),void 0===o&&(o=1),a>o?o:a>t?a:t},r=function(a){var t=a/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},h=function(a){return 255*(a>.0031308?1.055*Math.pow(a,1/2.4)-.055:12.92*a)},n=96.422,p=100,M=82.521,u=function(a){var t,r,n={x:.9555766*(t=a).x+-.0230393*t.y+.0631636*t.z,y:-.0282895*t.x+1.0099416*t.y+.0210077*t.z,z:.0122982*t.x+-.020483*t.y+1.3299098*t.z};return r={r:h(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:h(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:h(556434e-9*n.x-.002040259*n.y+.010572252*n.z),a:a.a},{r:o(r.r,0,255),g:o(r.g,0,255),b:o(r.b,0,255),a:o(r.a)}},e=function(a){var t=r(a.r),h=r(a.g),u=r(a.b);return function(a){return{x:o(a.x,0,n),y:o(a.y,0,p),z:o(a.z,0,M),a:o(a.a)}}(function(a){return{x:1.0478112*a.x+.0228866*a.y+-.050127*a.z,y:.0295424*a.x+.9904844*a.y+-.0170491*a.z,z:-.0092345*a.x+.0150436*a.y+.7521316*a.z,a:a.a}}({x:100*(.4124564*t+.3575761*h+.1804375*u),y:100*(.2126729*t+.7151522*h+.072175*u),z:100*(.0193339*t+.119192*h+.9503041*u),a:a.a}))},w=216/24389,b=24389/27,i=function(t){var r=t.l,h=t.a,n=t.b,p=t.alpha,M=void 0===p?1:p;if(!a(r)||!a(h)||!a(n))return null;var u=function(a){return{l:o(a.l,0,400),a:a.a,b:a.b,alpha:o(a.alpha)}}({l:Number(r),a:Number(h),b:Number(n),alpha:Number(M)});return l(u)},l=function(a){var t=(a.l+16)/116,o=a.a/500+t,r=t-a.b/200;return u({x:(Math.pow(o,3)>w?Math.pow(o,3):(116*o-16)/b)*n,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/b)*p,z:(Math.pow(r,3)>w?Math.pow(r,3):(116*r-16)/b)*M,a:a.alpha})};export default function(a,r){a.prototype.toLab=function(){return o=e(this.rgba),h=o.y/p,u=o.z/M,r=(r=o.x/n)>w?Math.cbrt(r):(b*r+16)/116,a={l:116*(h=h>w?Math.cbrt(h):(b*h+16)/116)-16,a:500*(r-h),b:200*(h-(u=u>w?Math.cbrt(u):(b*u+16)/116)),alpha:o.a},{l:t(a.l,2),a:t(a.a,2),b:t(a.b,2),alpha:t(a.alpha,3)};var a,o,r,h,u},a.prototype.delta=function(r){void 0===r&&(r="#FFF");var h=r instanceof a?r:new a(r),n=function(a,t){var o=a.l,r=a.a,h=a.b,n=t.l,p=t.a,M=t.b,u=180/Math.PI,e=Math.PI/180,w=Math.pow(Math.pow(r,2)+Math.pow(h,2),.5),b=Math.pow(Math.pow(p,2)+Math.pow(M,2),.5),i=(o+n)/2,l=Math.pow((w+b)/2,7),c=.5*(1-Math.pow(l/(l+Math.pow(25,7)),.5)),f=r*(1+c),y=p*(1+c),v=Math.pow(Math.pow(f,2)+Math.pow(h,2),.5),x=Math.pow(Math.pow(y,2)+Math.pow(M,2),.5),z=(v+x)/2,s=0===f&&0===h?0:Math.atan2(h,f)*u,d=0===y&&0===M?0:Math.atan2(M,y)*u;s<0&&(s+=360),d<0&&(d+=360);var g=d-s,m=Math.abs(d-s);m>180&&d<=s?g+=360:m>180&&d>s&&(g-=360);var N=s+d;m<=180?N/=2:N=(s+d<360?N+360:N-360)/2;var F=1-.17*Math.cos(e*(N-30))+.24*Math.cos(2*e*N)+.32*Math.cos(e*(3*N+6))-.2*Math.cos(e*(4*N-63)),L=n-o,I=x-v,P=2*Math.sin(e*g/2)*Math.pow(v*x,.5),j=1+.015*Math.pow(i-50,2)/Math.pow(20+Math.pow(i-50,2),.5),k=1+.045*z,q=1+.015*z*F,A=30*Math.exp(-1*Math.pow((N-275)/25,2)),B=-2*Math.pow(l/(l+Math.pow(25,7)),.5)*Math.sin(2*e*A);return Math.pow(Math.pow(L/1/j,2)+Math.pow(I/1/k,2)+Math.pow(P/1/q,2)+B*I*P/(1*k*1*q),.5)}(this.toLab(),h.toLab())/100;return o(t(n,3))},r.object.push([i,"lab"])}
|
24
node_modules/colord/plugins/lch.d.ts
generated
vendored
Normal file
24
node_modules/colord/plugins/lch.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import { LchaColor } from "../types";
|
||||
import { Plugin } from "../extend";
|
||||
declare module "../colord" {
|
||||
interface Colord {
|
||||
/**
|
||||
* Converts a color to CIELCH (Lightness-Chroma-Hue) color space and returns an object.
|
||||
* https://lea.verou.me/2020/04/lch-colors-in-css-what-why-and-how/
|
||||
* https://en.wikipedia.org/wiki/CIELAB_color_space#Cylindrical_model
|
||||
*/
|
||||
toLch(): LchaColor;
|
||||
/**
|
||||
* Converts a color to CIELCH (Lightness-Chroma-Hue) color space and returns a string.
|
||||
* https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/lch()
|
||||
*/
|
||||
toLchString(): string;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A plugin adding support for CIELCH color space.
|
||||
* https://lea.verou.me/2020/04/lch-colors-in-css-what-why-and-how/
|
||||
* https://en.wikipedia.org/wiki/CIELAB_color_space#Cylindrical_model
|
||||
*/
|
||||
declare const lchPlugin: Plugin;
|
||||
export default lchPlugin;
|
1
node_modules/colord/plugins/lch.js
generated
vendored
Normal file
1
node_modules/colord/plugins/lch.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},a=function(r,t,a){return void 0===t&&(t=0),void 0===a&&(a=Math.pow(10,t)),Math.round(a*r)/a+0},n=function(r,t,a){return void 0===t&&(t=0),void 0===a&&(a=1),r>a?a:r>t?r:t},u=function(r){var t=r/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},h=function(r){return 255*(r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r)},o=96.422,e=100,c=82.521,i=function(r){var t,a,u={x:.9555766*(t=r).x+-.0230393*t.y+.0631636*t.z,y:-.0282895*t.x+1.0099416*t.y+.0210077*t.z,z:.0122982*t.x+-.020483*t.y+1.3299098*t.z};return a={r:h(.032404542*u.x-.015371385*u.y-.004985314*u.z),g:h(-.00969266*u.x+.018760108*u.y+41556e-8*u.z),b:h(556434e-9*u.x-.002040259*u.y+.010572252*u.z),a:r.a},{r:n(a.r,0,255),g:n(a.g,0,255),b:n(a.b,0,255),a:n(a.a)}},l=function(r){var t=u(r.r),a=u(r.g),h=u(r.b);return function(r){return{x:n(r.x,0,o),y:n(r.y,0,e),z:n(r.z,0,c),a:n(r.a)}}(function(r){return{x:1.0478112*r.x+.0228866*r.y+-.050127*r.z,y:.0295424*r.x+.9904844*r.y+-.0170491*r.z,z:-.0092345*r.x+.0150436*r.y+.7521316*r.z,a:r.a}}({x:100*(.4124564*t+.3575761*a+.1804375*h),y:100*(.2126729*t+.7151522*a+.072175*h),z:100*(.0193339*t+.119192*a+.9503041*h),a:r.a}))},b=216/24389,d=24389/27,f=function(r){return{l:n(r.l,0,100),c:r.c,h:(t=r.h,(t=isFinite(t)?t%360:0)>0?t:t+360),a:r.a};var t},p=function(r){return{l:a(r.l,2),c:a(r.c,2),h:a(r.h,2),a:a(r.a,3)}},v=function(r){var a=r.l,n=r.c,u=r.h,h=r.a,o=void 0===h?1:h;if(!t(a)||!t(n)||!t(u))return null;var e=f({l:Number(a),c:Number(n),h:Number(u),a:Number(o)});return M(e)},y=function(r){var t=function(r){var t=l(r),a=t.x/o,n=t.y/e,u=t.z/c;return a=a>b?Math.cbrt(a):(d*a+16)/116,{l:116*(n=n>b?Math.cbrt(n):(d*n+16)/116)-16,a:500*(a-n),b:200*(n-(u=u>b?Math.cbrt(u):(d*u+16)/116)),alpha:t.a}}(r),n=a(t.a,3),u=a(t.b,3),h=Math.atan2(u,n)/Math.PI*180;return{l:t.l,c:Math.sqrt(n*n+u*u),h:h<0?h+360:h,a:t.alpha}},M=function(r){return t={l:r.l,a:r.c*Math.cos(r.h*Math.PI/180),b:r.c*Math.sin(r.h*Math.PI/180),alpha:r.a},n=t.a/500+(a=(t.l+16)/116),u=a-t.b/200,i({x:(Math.pow(n,3)>b?Math.pow(n,3):(116*n-16)/d)*o,y:(t.l>8?Math.pow((t.l+16)/116,3):t.l/d)*e,z:(Math.pow(u,3)>b?Math.pow(u,3):(116*u-16)/d)*c,a:t.alpha});var t,a,n,u},x=/^lch\(\s*([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)\s+([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,s=function(t){var a=x.exec(t);if(!a)return null;var n,u,h=f({l:Number(a[1]),c:Number(a[2]),h:(n=a[3],u=a[4],void 0===u&&(u="deg"),Number(n)*(r[u]||1)),a:void 0===a[5]?1:Number(a[5])/(a[6]?100:1)});return M(h)};module.exports=function(r,t){r.prototype.toLch=function(){return p(y(this.rgba))},r.prototype.toLchString=function(){return r=p(y(this.rgba)),t=r.l,a=r.c,n=r.h,(u=r.a)<1?"lch("+t+"% "+a+" "+n+" / "+u+")":"lch("+t+"% "+a+" "+n+")";var r,t,a,n,u},t.string.push([s,"lch"]),t.object.push([v,"lch"])};
|
1
node_modules/colord/plugins/lch.mjs
generated
vendored
Normal file
1
node_modules/colord/plugins/lch.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},a=function(r,t,a){return void 0===t&&(t=0),void 0===a&&(a=Math.pow(10,t)),Math.round(a*r)/a+0},n=function(r,t,a){return void 0===t&&(t=0),void 0===a&&(a=1),r>a?a:r>t?r:t},u=function(r){var t=r/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},h=function(r){return 255*(r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r)},o=96.422,e=100,c=82.521,i=function(r){var t,a,u={x:.9555766*(t=r).x+-.0230393*t.y+.0631636*t.z,y:-.0282895*t.x+1.0099416*t.y+.0210077*t.z,z:.0122982*t.x+-.020483*t.y+1.3299098*t.z};return a={r:h(.032404542*u.x-.015371385*u.y-.004985314*u.z),g:h(-.00969266*u.x+.018760108*u.y+41556e-8*u.z),b:h(556434e-9*u.x-.002040259*u.y+.010572252*u.z),a:r.a},{r:n(a.r,0,255),g:n(a.g,0,255),b:n(a.b,0,255),a:n(a.a)}},l=function(r){var t=u(r.r),a=u(r.g),h=u(r.b);return function(r){return{x:n(r.x,0,o),y:n(r.y,0,e),z:n(r.z,0,c),a:n(r.a)}}(function(r){return{x:1.0478112*r.x+.0228866*r.y+-.050127*r.z,y:.0295424*r.x+.9904844*r.y+-.0170491*r.z,z:-.0092345*r.x+.0150436*r.y+.7521316*r.z,a:r.a}}({x:100*(.4124564*t+.3575761*a+.1804375*h),y:100*(.2126729*t+.7151522*a+.072175*h),z:100*(.0193339*t+.119192*a+.9503041*h),a:r.a}))},f=216/24389,b=24389/27,d=function(r){return{l:n(r.l,0,100),c:r.c,h:(t=r.h,(t=isFinite(t)?t%360:0)>0?t:t+360),a:r.a};var t},p=function(r){return{l:a(r.l,2),c:a(r.c,2),h:a(r.h,2),a:a(r.a,3)}},v=function(r){var a=r.l,n=r.c,u=r.h,h=r.a,o=void 0===h?1:h;if(!t(a)||!t(n)||!t(u))return null;var e=d({l:Number(a),c:Number(n),h:Number(u),a:Number(o)});return M(e)},y=function(r){var t=function(r){var t=l(r),a=t.x/o,n=t.y/e,u=t.z/c;return a=a>f?Math.cbrt(a):(b*a+16)/116,{l:116*(n=n>f?Math.cbrt(n):(b*n+16)/116)-16,a:500*(a-n),b:200*(n-(u=u>f?Math.cbrt(u):(b*u+16)/116)),alpha:t.a}}(r),n=a(t.a,3),u=a(t.b,3),h=Math.atan2(u,n)/Math.PI*180;return{l:t.l,c:Math.sqrt(n*n+u*u),h:h<0?h+360:h,a:t.alpha}},M=function(r){return t={l:r.l,a:r.c*Math.cos(r.h*Math.PI/180),b:r.c*Math.sin(r.h*Math.PI/180),alpha:r.a},n=t.a/500+(a=(t.l+16)/116),u=a-t.b/200,i({x:(Math.pow(n,3)>f?Math.pow(n,3):(116*n-16)/b)*o,y:(t.l>8?Math.pow((t.l+16)/116,3):t.l/b)*e,z:(Math.pow(u,3)>f?Math.pow(u,3):(116*u-16)/b)*c,a:t.alpha});var t,a,n,u},x=/^lch\(\s*([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)\s+([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,s=function(t){var a=x.exec(t);if(!a)return null;var n,u,h=d({l:Number(a[1]),c:Number(a[2]),h:(n=a[3],u=a[4],void 0===u&&(u="deg"),Number(n)*(r[u]||1)),a:void 0===a[5]?1:Number(a[5])/(a[6]?100:1)});return M(h)};export default function(r,t){r.prototype.toLch=function(){return p(y(this.rgba))},r.prototype.toLchString=function(){return r=p(y(this.rgba)),t=r.l,a=r.c,n=r.h,(u=r.a)<1?"lch("+t+"% "+a+" "+n+" / "+u+")":"lch("+t+"% "+a+" "+n+")";var r,t,a,n,u},t.string.push([s,"lch"]),t.object.push([v,"lch"])}
|
20
node_modules/colord/plugins/minify.d.ts
generated
vendored
Normal file
20
node_modules/colord/plugins/minify.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Plugin } from "../extend";
|
||||
interface MinificationOptions {
|
||||
hex?: boolean;
|
||||
alphaHex?: boolean;
|
||||
rgb?: boolean;
|
||||
hsl?: boolean;
|
||||
name?: boolean;
|
||||
transparent?: boolean;
|
||||
}
|
||||
declare module "../colord" {
|
||||
interface Colord {
|
||||
/** Returns the shortest string representation of the color */
|
||||
minify(options?: MinificationOptions): string;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A plugin adding a color minification utilities.
|
||||
*/
|
||||
declare const minifyPlugin: Plugin;
|
||||
export default minifyPlugin;
|
1
node_modules/colord/plugins/minify.js
generated
vendored
Normal file
1
node_modules/colord/plugins/minify.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports=function(t){var r=function(t){var r,n,e,i=t.toHex(),a=t.alpha(),h=i.split(""),s=h[1],o=h[2],u=h[3],l=h[4],p=h[5],f=h[6],g=h[7],v=h[8];if(a>0&&a<1&&(r=parseInt(g+v,16)/255,void 0===(n=2)&&(n=0),void 0===e&&(e=Math.pow(10,n)),Math.round(e*r)/e+0!==a))return null;if(s===o&&u===l&&p===f){if(1===a)return"#"+s+u+p;if(g===v)return"#"+s+u+p+g}return i},n=function(t){return t>0&&t<1?t.toString().replace("0.","."):t};t.prototype.minify=function(t){void 0===t&&(t={});var e=this.toRgb(),i=n(e.r),a=n(e.g),h=n(e.b),s=this.toHsl(),o=n(s.h),u=n(s.s),l=n(s.l),p=n(this.alpha()),f=Object.assign({hex:!0,rgb:!0,hsl:!0},t),g=[];if(f.hex&&(1===p||f.alphaHex)){var v=r(this);v&&g.push(v)}if(f.rgb&&g.push(1===p?"rgb("+i+","+a+","+h+")":"rgba("+i+","+a+","+h+","+p+")"),f.hsl&&g.push(1===p?"hsl("+o+","+u+"%,"+l+"%)":"hsla("+o+","+u+"%,"+l+"%,"+p+")"),f.transparent&&0===i&&0===a&&0===h&&0===p)g.push("transparent");else if(1===p&&f.name&&"function"==typeof this.toName){var c=this.toName();c&&g.push(c)}return function(t){for(var r=t[0],n=1;n<t.length;n++)t[n].length<r.length&&(r=t[n]);return r}(g)}};
|
1
node_modules/colord/plugins/minify.mjs
generated
vendored
Normal file
1
node_modules/colord/plugins/minify.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function(t){var r=function(t){var r,n,e,a=t.toHex(),i=t.alpha(),h=a.split(""),s=h[1],o=h[2],u=h[3],l=h[4],p=h[5],f=h[6],g=h[7],v=h[8];if(i>0&&i<1&&(r=parseInt(g+v,16)/255,void 0===(n=2)&&(n=0),void 0===e&&(e=Math.pow(10,n)),Math.round(e*r)/e+0!==i))return null;if(s===o&&u===l&&p===f){if(1===i)return"#"+s+u+p;if(g===v)return"#"+s+u+p+g}return a},n=function(t){return t>0&&t<1?t.toString().replace("0.","."):t};t.prototype.minify=function(t){void 0===t&&(t={});var e=this.toRgb(),a=n(e.r),i=n(e.g),h=n(e.b),s=this.toHsl(),o=n(s.h),u=n(s.s),l=n(s.l),p=n(this.alpha()),f=Object.assign({hex:!0,rgb:!0,hsl:!0},t),g=[];if(f.hex&&(1===p||f.alphaHex)){var v=r(this);v&&g.push(v)}if(f.rgb&&g.push(1===p?"rgb("+a+","+i+","+h+")":"rgba("+a+","+i+","+h+","+p+")"),f.hsl&&g.push(1===p?"hsl("+o+","+u+"%,"+l+"%)":"hsla("+o+","+u+"%,"+l+"%,"+p+")"),f.transparent&&0===a&&0===i&&0===h&&0===p)g.push("transparent");else if(1===p&&f.name&&"function"==typeof this.toName){var c=this.toName();c&&g.push(c)}return function(t){for(var r=t[0],n=1;n<t.length;n++)t[n].length<r.length&&(r=t[n]);return r}(g)}}
|
27
node_modules/colord/plugins/mix.d.ts
generated
vendored
Normal file
27
node_modules/colord/plugins/mix.d.ts
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import { AnyColor } from "../types";
|
||||
import { Plugin } from "../extend";
|
||||
declare module "../colord" {
|
||||
interface Colord {
|
||||
/**
|
||||
* Produces a mixture of two colors through CIE LAB color space and returns a new Colord instance.
|
||||
*/
|
||||
mix(color2: AnyColor | Colord, ratio?: number): Colord;
|
||||
/**
|
||||
* Generates a tints palette based on original color.
|
||||
*/
|
||||
tints(count?: number): Colord[];
|
||||
/**
|
||||
* Generates a shades palette based on original color.
|
||||
*/
|
||||
shades(count?: number): Colord[];
|
||||
/**
|
||||
* Generates a tones palette based on original color.
|
||||
*/
|
||||
tones(count?: number): Colord[];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A plugin adding a color mixing utilities.
|
||||
*/
|
||||
declare const mixPlugin: Plugin;
|
||||
export default mixPlugin;
|
1
node_modules/colord/plugins/mix.js
generated
vendored
Normal file
1
node_modules/colord/plugins/mix.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var t=function(t,a,n){return void 0===a&&(a=0),void 0===n&&(n=1),t>n?n:t>a?t:a},a=function(t){var a=t/255;return a<.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)},n=function(t){return 255*(t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t)},r=96.422,o=100,u=82.521,e=function(a){var r,o,u={x:.9555766*(r=a).x+-.0230393*r.y+.0631636*r.z,y:-.0282895*r.x+1.0099416*r.y+.0210077*r.z,z:.0122982*r.x+-.020483*r.y+1.3299098*r.z};return o={r:n(.032404542*u.x-.015371385*u.y-.004985314*u.z),g:n(-.00969266*u.x+.018760108*u.y+41556e-8*u.z),b:n(556434e-9*u.x-.002040259*u.y+.010572252*u.z),a:a.a},{r:t(o.r,0,255),g:t(o.g,0,255),b:t(o.b,0,255),a:t(o.a)}},i=function(n){var e=a(n.r),i=a(n.g),p=a(n.b);return function(a){return{x:t(a.x,0,r),y:t(a.y,0,o),z:t(a.z,0,u),a:t(a.a)}}(function(t){return{x:1.0478112*t.x+.0228866*t.y+-.050127*t.z,y:.0295424*t.x+.9904844*t.y+-.0170491*t.z,z:-.0092345*t.x+.0150436*t.y+.7521316*t.z,a:t.a}}({x:100*(.4124564*e+.3575761*i+.1804375*p),y:100*(.2126729*e+.7151522*i+.072175*p),z:100*(.0193339*e+.119192*i+.9503041*p),a:n.a}))},p=216/24389,h=24389/27,f=function(t){var a=i(t),n=a.x/r,e=a.y/o,f=a.z/u;return n=n>p?Math.cbrt(n):(h*n+16)/116,{l:116*(e=e>p?Math.cbrt(e):(h*e+16)/116)-16,a:500*(n-e),b:200*(e-(f=f>p?Math.cbrt(f):(h*f+16)/116)),alpha:a.a}},c=function(a,n,i){var c,y=f(a),x=f(n);return function(t){var a=(t.l+16)/116,n=t.a/500+a,i=a-t.b/200;return e({x:(Math.pow(n,3)>p?Math.pow(n,3):(116*n-16)/h)*r,y:(t.l>8?Math.pow((t.l+16)/116,3):t.l/h)*o,z:(Math.pow(i,3)>p?Math.pow(i,3):(116*i-16)/h)*u,a:t.alpha})}({l:t((c={l:y.l*(1-i)+x.l*i,a:y.a*(1-i)+x.a*i,b:y.b*(1-i)+x.b*i,alpha:y.alpha*(1-i)+x.alpha*i}).l,0,400),a:c.a,b:c.b,alpha:t(c.alpha)})};module.exports=function(t){function a(t,a,n){void 0===n&&(n=5);for(var r=[],o=1/(n-1),u=0;u<=n-1;u++)r.push(t.mix(a,o*u));return r}t.prototype.mix=function(a,n){void 0===n&&(n=.5);var r=a instanceof t?a:new t(a),o=c(this.toRgb(),r.toRgb(),n);return new t(o)},t.prototype.tints=function(t){return a(this,"#fff",t)},t.prototype.shades=function(t){return a(this,"#000",t)},t.prototype.tones=function(t){return a(this,"#808080",t)}};
|
1
node_modules/colord/plugins/mix.mjs
generated
vendored
Normal file
1
node_modules/colord/plugins/mix.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var t=function(t,a,n){return void 0===a&&(a=0),void 0===n&&(n=1),t>n?n:t>a?t:a},a=function(t){var a=t/255;return a<.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)},n=function(t){return 255*(t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t)},r=96.422,o=100,u=82.521,e=function(a){var r,o,u={x:.9555766*(r=a).x+-.0230393*r.y+.0631636*r.z,y:-.0282895*r.x+1.0099416*r.y+.0210077*r.z,z:.0122982*r.x+-.020483*r.y+1.3299098*r.z};return o={r:n(.032404542*u.x-.015371385*u.y-.004985314*u.z),g:n(-.00969266*u.x+.018760108*u.y+41556e-8*u.z),b:n(556434e-9*u.x-.002040259*u.y+.010572252*u.z),a:a.a},{r:t(o.r,0,255),g:t(o.g,0,255),b:t(o.b,0,255),a:t(o.a)}},i=function(n){var e=a(n.r),i=a(n.g),p=a(n.b);return function(a){return{x:t(a.x,0,r),y:t(a.y,0,o),z:t(a.z,0,u),a:t(a.a)}}(function(t){return{x:1.0478112*t.x+.0228866*t.y+-.050127*t.z,y:.0295424*t.x+.9904844*t.y+-.0170491*t.z,z:-.0092345*t.x+.0150436*t.y+.7521316*t.z,a:t.a}}({x:100*(.4124564*e+.3575761*i+.1804375*p),y:100*(.2126729*e+.7151522*i+.072175*p),z:100*(.0193339*e+.119192*i+.9503041*p),a:n.a}))},p=216/24389,h=24389/27,f=function(t){var a=i(t),n=a.x/r,e=a.y/o,f=a.z/u;return n=n>p?Math.cbrt(n):(h*n+16)/116,{l:116*(e=e>p?Math.cbrt(e):(h*e+16)/116)-16,a:500*(n-e),b:200*(e-(f=f>p?Math.cbrt(f):(h*f+16)/116)),alpha:a.a}},c=function(a,n,i){var c,y=f(a),x=f(n);return function(t){var a=(t.l+16)/116,n=t.a/500+a,i=a-t.b/200;return e({x:(Math.pow(n,3)>p?Math.pow(n,3):(116*n-16)/h)*r,y:(t.l>8?Math.pow((t.l+16)/116,3):t.l/h)*o,z:(Math.pow(i,3)>p?Math.pow(i,3):(116*i-16)/h)*u,a:t.alpha})}({l:t((c={l:y.l*(1-i)+x.l*i,a:y.a*(1-i)+x.a*i,b:y.b*(1-i)+x.b*i,alpha:y.alpha*(1-i)+x.alpha*i}).l,0,400),a:c.a,b:c.b,alpha:t(c.alpha)})};export default function(t){function a(t,a,n){void 0===n&&(n=5);for(var r=[],o=1/(n-1),u=0;u<=n-1;u++)r.push(t.mix(a,o*u));return r}t.prototype.mix=function(a,n){void 0===n&&(n=.5);var r=a instanceof t?a:new t(a),o=c(this.toRgb(),r.toRgb(),n);return new t(o)},t.prototype.tints=function(t){return a(this,"#fff",t)},t.prototype.shades=function(t){return a(this,"#000",t)},t.prototype.tones=function(t){return a(this,"#808080",t)}}
|
19
node_modules/colord/plugins/names.d.ts
generated
vendored
Normal file
19
node_modules/colord/plugins/names.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Plugin } from "../extend";
|
||||
interface ConvertOptions {
|
||||
closest?: boolean;
|
||||
}
|
||||
declare module "../colord" {
|
||||
interface Colord {
|
||||
/** Finds CSS color keyword that matches with the color value */
|
||||
toName(options?: ConvertOptions): string | undefined;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Plugin to work with named colors.
|
||||
* Adds a parser to read CSS color names and `toName` method.
|
||||
* See https://www.w3.org/TR/css-color-4/#named-colors
|
||||
* Supports 'transparent' string as defined in
|
||||
* https://drafts.csswg.org/css-color/#transparent-color
|
||||
*/
|
||||
declare const namesPlugin: Plugin;
|
||||
export default namesPlugin;
|
1
node_modules/colord/plugins/names.js
generated
vendored
Normal file
1
node_modules/colord/plugins/names.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports=function(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var d,i,o=r[this.toHex()];if(o)return o;if(null==f?void 0:f.closest){var n=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=n,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g)}return b}};f.string.push([function(f){var r=f.toLowerCase(),d="transparent"===r?"#0000":a[r];return d?new e(d).toRgb():null},"name"])};
|
1
node_modules/colord/plugins/names.mjs
generated
vendored
Normal file
1
node_modules/colord/plugins/names.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g)}return b}};f.string.push([function(f){var r=f.toLowerCase(),d="transparent"===r?"#0000":a[r];return d?new e(d).toRgb():null},"name"])}
|
14
node_modules/colord/plugins/xyz.d.ts
generated
vendored
Normal file
14
node_modules/colord/plugins/xyz.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { XyzaColor } from "../types";
|
||||
import { Plugin } from "../extend";
|
||||
declare module "../colord" {
|
||||
interface Colord {
|
||||
toXyz(): XyzaColor;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A plugin adding support for CIE XYZ colorspace.
|
||||
* Wikipedia: https://en.wikipedia.org/wiki/CIE_1931_color_space
|
||||
* Helpful article: https://www.sttmedia.com/colormodel-xyz
|
||||
*/
|
||||
declare const xyzPlugin: Plugin;
|
||||
export default xyzPlugin;
|
1
node_modules/colord/plugins/xyz.js
generated
vendored
Normal file
1
node_modules/colord/plugins/xyz.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var r=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=Math.pow(10,n)),Math.round(t*r)/t+0},t=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=1),r>t?t:r>n?r:n},u=function(r){var n=r/255;return n<.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)},o=function(r){return 255*(r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r)},a=96.422,e=100,y=82.521,x=function(r){return{x:t(r.x,0,a),y:t(r.y,0,e),z:t(r.z,0,y),a:t(r.a)}},z=function(n){var t=n.x,u=n.y,o=n.z,a=n.a,e=void 0===a?1:a;if(!r(t)||!r(u)||!r(o))return null;var y=x({x:Number(t),y:Number(u),z:Number(o),a:Number(e)});return i(y)},i=function(r){var n,u,a={x:.9555766*(n=r).x+-.0230393*n.y+.0631636*n.z,y:-.0282895*n.x+1.0099416*n.y+.0210077*n.z,z:.0122982*n.x+-.020483*n.y+1.3299098*n.z};return u={r:o(.032404542*a.x-.015371385*a.y-.004985314*a.z),g:o(-.00969266*a.x+.018760108*a.y+41556e-8*a.z),b:o(556434e-9*a.x-.002040259*a.y+.010572252*a.z),a:r.a},{r:t(u.r,0,255),g:t(u.g,0,255),b:t(u.b,0,255),a:t(u.a)}};module.exports=function(r,t){r.prototype.toXyz=function(){return function(r){return{x:n(r.x,2),y:n(r.y,2),z:n(r.z,2),a:n(r.a,3)}}((t=u((r=this.rgba).r),o=u(r.g),a=u(r.b),x({x:1.0478112*(e={x:100*(.4124564*t+.3575761*o+.1804375*a),y:100*(.2126729*t+.7151522*o+.072175*a),z:100*(.0193339*t+.119192*o+.9503041*a),a:r.a}).x+.0228866*e.y+-.050127*e.z,y:.0295424*e.x+.9904844*e.y+-.0170491*e.z,z:-.0092345*e.x+.0150436*e.y+.7521316*e.z,a:e.a})));var r,t,o,a,e},t.object.push([z,"xyz"])};
|
1
node_modules/colord/plugins/xyz.mjs
generated
vendored
Normal file
1
node_modules/colord/plugins/xyz.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var r=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=Math.pow(10,n)),Math.round(t*r)/t+0},t=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=1),r>t?t:r>n?r:n},u=function(r){var n=r/255;return n<.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)},o=function(r){return 255*(r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r)},a=96.422,e=100,y=82.521,x=function(r){return{x:t(r.x,0,a),y:t(r.y,0,e),z:t(r.z,0,y),a:t(r.a)}},z=function(n){var t=n.x,u=n.y,o=n.z,a=n.a,e=void 0===a?1:a;if(!r(t)||!r(u)||!r(o))return null;var y=x({x:Number(t),y:Number(u),z:Number(o),a:Number(e)});return i(y)},i=function(r){var n,u,a={x:.9555766*(n=r).x+-.0230393*n.y+.0631636*n.z,y:-.0282895*n.x+1.0099416*n.y+.0210077*n.z,z:.0122982*n.x+-.020483*n.y+1.3299098*n.z};return u={r:o(.032404542*a.x-.015371385*a.y-.004985314*a.z),g:o(-.00969266*a.x+.018760108*a.y+41556e-8*a.z),b:o(556434e-9*a.x-.002040259*a.y+.010572252*a.z),a:r.a},{r:t(u.r,0,255),g:t(u.g,0,255),b:t(u.b,0,255),a:t(u.a)}};export default function(r,t){r.prototype.toXyz=function(){return function(r){return{x:n(r.x,2),y:n(r.y,2),z:n(r.z,2),a:n(r.a,3)}}((t=u((r=this.rgba).r),o=u(r.g),a=u(r.b),x({x:1.0478112*(e={x:100*(.4124564*t+.3575761*o+.1804375*a),y:100*(.2126729*t+.7151522*o+.072175*a),z:100*(.0193339*t+.119192*o+.9503041*a),a:r.a}).x+.0228866*e.y+-.050127*e.z,y:.0295424*e.x+.9904844*e.y+-.0170491*e.z,z:-.0092345*e.x+.0150436*e.y+.7521316*e.z,a:e.a})));var r,t,o,a,e},t.object.push([z,"xyz"])}
|
2
node_modules/colord/random.d.ts
generated
vendored
Normal file
2
node_modules/colord/random.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { Colord } from "./colord";
|
||||
export declare const random: () => Colord;
|
67
node_modules/colord/types.d.ts
generated
vendored
Normal file
67
node_modules/colord/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
export declare type RgbColor = {
|
||||
r: number;
|
||||
g: number;
|
||||
b: number;
|
||||
};
|
||||
export declare type HslColor = {
|
||||
h: number;
|
||||
s: number;
|
||||
l: number;
|
||||
};
|
||||
export declare type HsvColor = {
|
||||
h: number;
|
||||
s: number;
|
||||
v: number;
|
||||
};
|
||||
export declare type HwbColor = {
|
||||
h: number;
|
||||
w: number;
|
||||
b: number;
|
||||
};
|
||||
export interface XyzColor {
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
}
|
||||
export interface LabColor {
|
||||
l: number;
|
||||
a: number;
|
||||
b: number;
|
||||
}
|
||||
export interface LchColor {
|
||||
l: number;
|
||||
c: number;
|
||||
h: number;
|
||||
}
|
||||
export interface CmykColor {
|
||||
c: number;
|
||||
m: number;
|
||||
y: number;
|
||||
k: number;
|
||||
}
|
||||
declare type WithAlpha<O> = O & {
|
||||
a: number;
|
||||
};
|
||||
export declare type RgbaColor = WithAlpha<RgbColor>;
|
||||
export declare type HslaColor = WithAlpha<HslColor>;
|
||||
export declare type HsvaColor = WithAlpha<HsvColor>;
|
||||
export declare type HwbaColor = WithAlpha<HwbColor>;
|
||||
export declare type XyzaColor = WithAlpha<XyzColor>;
|
||||
export declare type LabaColor = LabColor & {
|
||||
alpha: number;
|
||||
};
|
||||
export declare type LchaColor = WithAlpha<LchColor>;
|
||||
export declare type CmykaColor = WithAlpha<CmykColor>;
|
||||
export declare type ObjectColor = RgbColor | RgbaColor | HslColor | HslaColor | HsvColor | HsvaColor | HwbColor | HwbaColor | XyzColor | XyzaColor | LabColor | LabaColor | LchColor | LchaColor | CmykColor | CmykaColor;
|
||||
export declare type AnyColor = string | ObjectColor;
|
||||
export declare type InputObject = Record<string, unknown>;
|
||||
export declare type Format = "name" | "hex" | "rgb" | "hsl" | "hsv" | "hwb" | "xyz" | "lab" | "lch" | "cmyk";
|
||||
export declare type Input = string | InputObject;
|
||||
export declare type ParseResult = [RgbaColor, Format];
|
||||
export declare type ParseFunction<I extends Input> = (input: I) => RgbaColor | null;
|
||||
export declare type Parser<I extends Input> = [ParseFunction<I>, Format];
|
||||
export declare type Parsers = {
|
||||
string: Array<Parser<string>>;
|
||||
object: Array<Parser<InputObject>>;
|
||||
};
|
||||
export {};
|
Reference in New Issue
Block a user