@design-edito/tools 0.2.15 → 0.2.16
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/agnostic/arrays/index.js +10 -10
- package/agnostic/arrays/random-pick/index.js +6 -6
- package/agnostic/colors/channels/index.d.ts +5 -0
- package/agnostic/colors/channels/index.js +18 -0
- package/agnostic/colors/contrast/index.d.ts +2 -0
- package/agnostic/colors/contrast/index.js +13 -0
- package/agnostic/colors/convert/index.d.ts +20 -0
- package/agnostic/colors/convert/index.js +45 -0
- package/agnostic/colors/distance/index.d.ts +2 -0
- package/agnostic/colors/distance/index.js +12 -0
- package/agnostic/colors/grayscale/index.d.ts +2 -0
- package/agnostic/colors/grayscale/index.js +12 -0
- package/agnostic/colors/index.d.ts +14 -16
- package/agnostic/colors/index.js +95 -27
- package/agnostic/colors/invert/index.d.ts +2 -0
- package/agnostic/colors/invert/index.js +12 -0
- package/agnostic/colors/lerp/index.d.ts +2 -0
- package/agnostic/colors/lerp/index.js +12 -0
- package/agnostic/colors/luminance/index.d.ts +2 -0
- package/agnostic/colors/luminance/index.js +12 -0
- package/agnostic/colors/palette/index.d.ts +2 -0
- package/agnostic/colors/palette/index.js +14 -0
- package/agnostic/colors/rotate/index.d.ts +2 -0
- package/agnostic/colors/rotate/index.js +13 -0
- package/agnostic/colors/tidy/index.d.ts +2 -0
- package/agnostic/colors/tidy/index.js +11 -0
- package/agnostic/colors/typechecks/index.d.ts +11 -0
- package/agnostic/colors/typechecks/index.js +26 -0
- package/agnostic/colors/types.d.ts +82 -0
- package/agnostic/css/index.js +10 -10
- package/agnostic/css/styles-set/index.js +8 -8
- package/agnostic/errors/index.js +2 -2
- package/agnostic/html/hyper-json/cast/index.js +6 -6
- package/agnostic/html/hyper-json/index.js +7 -7
- package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +6 -6
- package/agnostic/html/hyper-json/tree/index.js +6 -6
- package/agnostic/html/hyper-json/utils/index.js +6 -6
- package/agnostic/html/index.js +22 -22
- package/agnostic/html/sanitize/index.js +6 -6
- package/agnostic/html/selector-to-element/index.js +6 -6
- package/agnostic/html/string-to-nodes/index.js +7 -7
- package/agnostic/index.d.ts +1 -1
- package/agnostic/misc/assert/index.js +3 -3
- package/agnostic/misc/crossenv/index.js +2 -2
- package/agnostic/misc/index.js +25 -25
- package/agnostic/misc/lorem-ipsum/index.js +13 -13
- package/agnostic/numbers/index.js +6 -6
- package/agnostic/objects/index.js +15 -15
- package/agnostic/random/index.js +2 -2
- package/agnostic/strings/index.js +11 -11
- package/agnostic/time/index.js +6 -6
- package/chunks/chunk-2EHYEUX4.js +21 -0
- package/chunks/chunk-5LK2YLTK.js +21 -0
- package/chunks/chunk-65NTXENV.js +157 -0
- package/chunks/{chunk-XDITZ5QN.js → chunk-AF2NAJS2.js} +2 -2
- package/chunks/chunk-ALMK24GK.js +0 -0
- package/chunks/chunk-BKIF2ELV.js +47 -0
- package/chunks/{chunk-B446JIN3.js → chunk-C7SRAQMW.js} +1 -1
- package/chunks/{chunk-36CTYZYA.js → chunk-CQEDNACN.js} +2 -2
- package/chunks/chunk-D7SXHHU3.js +47 -0
- package/chunks/{chunk-IWDIKDYR.js → chunk-E33DCHHS.js} +13 -13
- package/chunks/{chunk-WAMSK4A3.js → chunk-E4FJHD5R.js} +1 -1
- package/chunks/chunk-GUBFCOBT.js +98 -0
- package/chunks/{chunk-Q6DUKZU6.js → chunk-I2HTBYNO.js} +6 -6
- package/chunks/chunk-IDXUS2IO.js +296 -0
- package/chunks/chunk-JHUOMGOX.js +81 -0
- package/chunks/{chunk-EDJ3TVNV.js → chunk-KDOMQ4LM.js} +15 -6
- package/chunks/chunk-MN4FVOU2.js +28 -0
- package/chunks/{chunk-2M33FCDG.js → chunk-O7VFJHQX.js} +11 -5
- package/chunks/{chunk-2UAVBQI5.js → chunk-OD2XVVE2.js} +4 -4
- package/chunks/{chunk-CHUOCTRP.js → chunk-P2H6PV4O.js} +2 -2
- package/chunks/chunk-P4YT4RBG.js +51 -0
- package/chunks/{chunk-CYUEPBUN.js → chunk-PX4DPCZM.js} +2 -2
- package/chunks/{chunk-YIZODJC7.js → chunk-QRS3G3YD.js} +5 -5
- package/chunks/{chunk-FQ4UTWMP.js → chunk-QTA7ZEVX.js} +3 -1
- package/chunks/chunk-QW34TQCS.js +48 -0
- package/chunks/{chunk-HMAK6VAF.js → chunk-RBCZWVQH.js} +11 -5
- package/chunks/{chunk-JWF5EKM2.js → chunk-RDQJSWRC.js} +1 -1
- package/chunks/{chunk-AI6AGF4I.js → chunk-S7637BQZ.js} +8 -5
- package/chunks/{chunk-GVQVGFAA.js → chunk-TQXFC6OS.js} +4 -4
- package/chunks/chunk-UG5EMKGN.js +265 -0
- package/chunks/chunk-VA67YLZL.js +26 -0
- package/chunks/{chunk-TSZAQ3RQ.js → chunk-VKNQ7MVZ.js} +86 -87
- package/chunks/{chunk-SA2IY5LN.js → chunk-X5HMM3LD.js} +1 -1
- package/chunks/chunk-XAYMIITK.js +103 -0
- package/chunks/chunk-YZVZKBVJ.js +631 -0
- package/chunks/chunk-ZJ63OCMA.js +207 -0
- package/node/@aws-s3/index.js +8 -8
- package/node/@aws-s3/storage/directory/index.js +7 -7
- package/node/@aws-s3/storage/file/index.js +10 -10
- package/node/@aws-s3/storage/index.js +10 -10
- package/node/@google-cloud/index.js +11 -11
- package/node/@google-cloud/storage/bucket/index.js +4 -4
- package/node/@google-cloud/storage/directory/index.js +7 -7
- package/node/@google-cloud/storage/file/index.js +14 -14
- package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +2 -2
- package/node/@google-cloud/storage/index.js +13 -13
- package/node/cloud-storage/index.js +26 -26
- package/node/cloud-storage/operations/index.js +36 -36
- package/node/encryption/index.js +3 -3
- package/node/files/index.js +3 -3
- package/node/ftps/directory/index.js +7 -7
- package/node/ftps/file/index.js +10 -10
- package/node/ftps/index.js +9 -9
- package/node/images/create/index.d.ts +3 -0
- package/node/images/create/index.js +23 -0
- package/node/images/format/index.d.ts +17 -51
- package/node/images/format/index.js +30 -4
- package/node/images/index.d.ts +4 -2
- package/node/images/index.js +41 -21
- package/node/images/metadata/index.d.ts +3 -0
- package/node/images/metadata/index.js +23 -0
- package/node/images/transform/index.d.ts +2 -97
- package/node/images/transform/index.js +27 -16
- package/node/images/transform/operations/blur/index.d.ts +1 -3
- package/node/images/transform/operations/brighten/index.d.ts +1 -3
- package/node/images/transform/operations/extend/index.d.ts +1 -8
- package/node/images/transform/operations/extend/index.js +17 -2
- package/node/images/transform/operations/extract/index.d.ts +1 -6
- package/node/images/transform/operations/flatten/index.d.ts +1 -3
- package/node/images/transform/operations/flatten/index.js +17 -2
- package/node/images/transform/operations/hue/index.d.ts +1 -3
- package/node/images/transform/operations/level/index.d.ts +1 -4
- package/node/images/transform/operations/lighten/index.d.ts +1 -3
- package/node/images/transform/operations/normalize/index.d.ts +1 -4
- package/node/images/transform/operations/overlay/index.d.ts +5 -0
- package/node/images/transform/operations/overlay/index.js +27 -0
- package/node/images/transform/operations/resize/index.d.ts +1 -11
- package/node/images/transform/operations/resize/index.js +17 -2
- package/node/images/transform/operations/rotate/index.d.ts +1 -4
- package/node/images/transform/operations/rotate/index.js +17 -2
- package/node/images/transform/operations/saturate/index.d.ts +1 -3
- package/node/images/transform/operations/saturate/index.js +1 -1
- package/node/images/types.d.ts +252 -0
- package/node/images/utils/index.d.ts +7 -0
- package/node/images/utils/index.js +28 -0
- package/node/sftp/directory/index.js +7 -7
- package/node/sftp/file/index.js +10 -10
- package/node/sftp/index.js +9 -9
- package/package.json +1 -1
- package/agnostic/colors/complement-color/index.d.ts +0 -1
- package/agnostic/colors/complement-color/index.js +0 -7
- package/agnostic/colors/hex-to-rgb/index.d.ts +0 -1
- package/agnostic/colors/hex-to-rgb/index.js +0 -7
- package/agnostic/colors/hsl-to-rgb/index.d.ts +0 -1
- package/agnostic/colors/hsl-to-rgb/index.js +0 -7
- package/agnostic/colors/lighten-color/index.d.ts +0 -2
- package/agnostic/colors/lighten-color/index.js +0 -11
- package/agnostic/colors/rgb-to-hex/index.d.ts +0 -1
- package/agnostic/colors/rgb-to-hex/index.js +0 -7
- package/agnostic/colors/rgb-to-hsl/index.d.ts +0 -1
- package/agnostic/colors/rgb-to-hsl/index.js +0 -7
- package/agnostic/colors/saturate-color/index.d.ts +0 -2
- package/agnostic/colors/saturate-color/index.js +0 -11
- package/chunks/chunk-2POD3TAX.js +0 -11
- package/chunks/chunk-2TJCB6IM.js +0 -12
- package/chunks/chunk-7EDDWSWS.js +0 -123
- package/chunks/chunk-FAXNZG5C.js +0 -10
- package/chunks/chunk-IFQA5PWI.js +0 -112
- package/chunks/chunk-MB7HWF22.js +0 -23
- package/chunks/chunk-MFYNJMVM.js +0 -18
- package/chunks/chunk-NYVARFI7.js +0 -20
- package/chunks/chunk-QLC3A6PC.js +0 -17
- package/chunks/chunk-U57Q62IN.js +0 -23
- package/chunks/chunk-YVLJKJV2.js +0 -17
- package/node/images/get-metadata/index.d.ts +0 -4
- package/node/images/get-metadata/index.js +0 -7
- package/node/images/transform/operations/composite/index.d.ts +0 -7
- package/node/images/transform/operations/composite/index.js +0 -12
- package/node/images/transform/utils/index.d.ts +0 -2
- package/node/images/transform/utils/index.js +0 -8
- package/chunks/{chunk-WH6BPDAC.js → chunk-2KT7AKRW.js} +3 -3
- package/chunks/{chunk-JSW6R3ZH.js → chunk-6QFELK4E.js} +9 -9
- package/chunks/{chunk-LAVXHKKR.js → chunk-73FF7HWQ.js} +9 -9
- package/chunks/{chunk-74CFPDKM.js → chunk-A7K5DUP7.js} +6 -6
- package/chunks/{chunk-7KSMK42F.js → chunk-CNMP2GU4.js} +6 -6
- package/chunks/{chunk-DEQWCMAL.js → chunk-EXPVRDPR.js} +9 -9
- package/chunks/{chunk-UFKH5WD2.js → chunk-FR5H2OCV.js} +3 -3
- package/chunks/{chunk-G5RRNREY.js → chunk-LSZVKXDZ.js} +3 -3
- package/chunks/{chunk-QCMBG5LN.js → chunk-MLLP7YSK.js} +13 -13
- package/chunks/{chunk-IOJTC6CN.js → chunk-PJSPZGT2.js} +15 -15
- package/chunks/{chunk-OVG5RGI3.js → chunk-S32K7POB.js} +4 -4
- package/chunks/{chunk-UXEKCYL7.js → chunk-UEAMPAHK.js} +3 -3
- package/chunks/{chunk-AIC5YAJU.js → chunk-X5F6XGEP.js} +6 -6
- package/chunks/{chunk-4OK2UH4M.js → chunk-ZBAKY6DB.js} +6 -6
package/agnostic/arrays/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Arrays
|
|
3
|
-
} from "../../chunks/chunk-
|
|
4
|
-
import "../../chunks/chunk-
|
|
5
|
-
import "../../chunks/chunk-
|
|
6
|
-
import "../../chunks/chunk-B446JIN3.js";
|
|
3
|
+
} from "../../chunks/chunk-I2HTBYNO.js";
|
|
4
|
+
import "../../chunks/chunk-C7SRAQMW.js";
|
|
5
|
+
import "../../chunks/chunk-RLAZR3NL.js";
|
|
7
6
|
import "../../chunks/chunk-VJJIYJMY.js";
|
|
8
|
-
import "../../chunks/chunk-
|
|
9
|
-
import "../../chunks/chunk-
|
|
10
|
-
import "../../chunks/chunk-RLJOYG64.js";
|
|
7
|
+
import "../../chunks/chunk-P2H6PV4O.js";
|
|
8
|
+
import "../../chunks/chunk-FR5H2OCV.js";
|
|
11
9
|
import "../../chunks/chunk-S2NMAH7K.js";
|
|
12
10
|
import "../../chunks/chunk-LV2VMOWR.js";
|
|
13
|
-
import "../../chunks/chunk-
|
|
14
|
-
import "../../chunks/chunk-
|
|
11
|
+
import "../../chunks/chunk-RLJOYG64.js";
|
|
12
|
+
import "../../chunks/chunk-2KT7AKRW.js";
|
|
15
13
|
import "../../chunks/chunk-FENXVJYO.js";
|
|
14
|
+
import "../../chunks/chunk-QHLQVR3E.js";
|
|
16
15
|
import "../../chunks/chunk-YS6WMSWC.js";
|
|
17
|
-
import "../../chunks/chunk-
|
|
16
|
+
import "../../chunks/chunk-6RGDWX4A.js";
|
|
17
|
+
import "../../chunks/chunk-RCO57B6F.js";
|
|
18
18
|
import "../../chunks/chunk-WSFCRVEQ.js";
|
|
19
19
|
export {
|
|
20
20
|
Arrays
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
randomPick,
|
|
3
3
|
randomPickMany
|
|
4
|
-
} from "../../../chunks/chunk-
|
|
5
|
-
import "../../../chunks/chunk-
|
|
6
|
-
import "../../../chunks/chunk-
|
|
7
|
-
import "../../../chunks/chunk-RLJOYG64.js";
|
|
4
|
+
} from "../../../chunks/chunk-C7SRAQMW.js";
|
|
5
|
+
import "../../../chunks/chunk-P2H6PV4O.js";
|
|
6
|
+
import "../../../chunks/chunk-FR5H2OCV.js";
|
|
8
7
|
import "../../../chunks/chunk-S2NMAH7K.js";
|
|
9
8
|
import "../../../chunks/chunk-LV2VMOWR.js";
|
|
10
|
-
import "../../../chunks/chunk-
|
|
11
|
-
import "../../../chunks/chunk-
|
|
9
|
+
import "../../../chunks/chunk-RLJOYG64.js";
|
|
10
|
+
import "../../../chunks/chunk-2KT7AKRW.js";
|
|
12
11
|
import "../../../chunks/chunk-FENXVJYO.js";
|
|
12
|
+
import "../../../chunks/chunk-QHLQVR3E.js";
|
|
13
13
|
import "../../../chunks/chunk-WSFCRVEQ.js";
|
|
14
14
|
export {
|
|
15
15
|
randomPick,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Color, TransformedColor, Channel } from '../types.js';
|
|
2
|
+
export declare function setChannel<C extends Color>(color: C, channel: Channel, value: number): TransformedColor<C>;
|
|
3
|
+
export declare function getChannel(color: Color, channel: Channel): number;
|
|
4
|
+
export declare function addChannel<C extends Color>(color: C, channel: Channel, amount: number): TransformedColor<C>;
|
|
5
|
+
export declare function multChannel<C extends Color>(color: C, channel: Channel, factor: number): TransformedColor<C>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
addChannel,
|
|
3
|
+
getChannel,
|
|
4
|
+
multChannel,
|
|
5
|
+
setChannel
|
|
6
|
+
} from "../../../chunks/chunk-ZJ63OCMA.js";
|
|
7
|
+
import "../../../chunks/chunk-YZVZKBVJ.js";
|
|
8
|
+
import "../../../chunks/chunk-DNIOWD7K.js";
|
|
9
|
+
import "../../../chunks/chunk-OSAXBA7G.js";
|
|
10
|
+
import "../../../chunks/chunk-UG5EMKGN.js";
|
|
11
|
+
import "../../../chunks/chunk-HQLRJ7XW.js";
|
|
12
|
+
import "../../../chunks/chunk-WSFCRVEQ.js";
|
|
13
|
+
export {
|
|
14
|
+
addChannel,
|
|
15
|
+
getChannel,
|
|
16
|
+
multChannel,
|
|
17
|
+
setChannel
|
|
18
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
contrast
|
|
3
|
+
} from "../../../chunks/chunk-MN4FVOU2.js";
|
|
4
|
+
import "../../../chunks/chunk-VA67YLZL.js";
|
|
5
|
+
import "../../../chunks/chunk-YZVZKBVJ.js";
|
|
6
|
+
import "../../../chunks/chunk-DNIOWD7K.js";
|
|
7
|
+
import "../../../chunks/chunk-OSAXBA7G.js";
|
|
8
|
+
import "../../../chunks/chunk-UG5EMKGN.js";
|
|
9
|
+
import "../../../chunks/chunk-HQLRJ7XW.js";
|
|
10
|
+
import "../../../chunks/chunk-WSFCRVEQ.js";
|
|
11
|
+
export {
|
|
12
|
+
contrast
|
|
13
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Color, Hex, Rgba, Hsla, Hsba, Laba, Lcha, Cmyka, Xyza, CssColor, TransformedColor, Srgba } from '../types.js';
|
|
2
|
+
export declare function toRgb(color: Color): Rgba;
|
|
3
|
+
export declare function toXyz(color: Color): Xyza;
|
|
4
|
+
export declare function toLab(color: Color): Laba;
|
|
5
|
+
export declare function toLch(color: Color): Lcha;
|
|
6
|
+
export declare function toHsl(color: Color): Hsla;
|
|
7
|
+
export declare function toHsb(color: Color): Hsba;
|
|
8
|
+
export declare function toCmyk(color: Color): Cmyka;
|
|
9
|
+
export declare function toCss(color: CssColor): CssColor;
|
|
10
|
+
export declare function toCss(color: Color): CssColor | undefined;
|
|
11
|
+
export declare function toHex(color: Color): Hex;
|
|
12
|
+
export declare function viaRgb<C extends Color>(color: C, transformer: (rgb: Rgba) => Rgba): TransformedColor<C>;
|
|
13
|
+
export declare function viaHsl<C extends Color>(color: C, transformer: (hsl: Hsla) => Hsla): TransformedColor<C>;
|
|
14
|
+
export declare function viaHsb<C extends Color>(color: C, transformer: (hsb: Hsba) => Hsba): TransformedColor<C>;
|
|
15
|
+
export declare function viaCmyk<C extends Color>(color: C, transformer: (cmyk: Cmyka) => Cmyka): TransformedColor<C>;
|
|
16
|
+
export declare function viaXyz<C extends Color>(color: C, transformer: (xyz: Xyza) => Xyza): TransformedColor<C>;
|
|
17
|
+
export declare function viaLab<C extends Color>(color: C, transformer: (lab: Laba) => Laba): TransformedColor<C>;
|
|
18
|
+
export declare function viaLch<C extends Color>(color: C, transformer: (lch: Lcha) => Lcha): TransformedColor<C>;
|
|
19
|
+
export declare function linearizeToSRgb(rgb: Rgba): Srgba;
|
|
20
|
+
export declare function delinearizeToRgb(srgb: Srgba): Rgba;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
delinearizeToRgb,
|
|
3
|
+
linearizeToSRgb,
|
|
4
|
+
toCmyk,
|
|
5
|
+
toCss,
|
|
6
|
+
toHex,
|
|
7
|
+
toHsb,
|
|
8
|
+
toHsl,
|
|
9
|
+
toLab,
|
|
10
|
+
toLch,
|
|
11
|
+
toRgb,
|
|
12
|
+
toXyz,
|
|
13
|
+
viaCmyk,
|
|
14
|
+
viaHsb,
|
|
15
|
+
viaHsl,
|
|
16
|
+
viaLab,
|
|
17
|
+
viaLch,
|
|
18
|
+
viaRgb,
|
|
19
|
+
viaXyz
|
|
20
|
+
} from "../../../chunks/chunk-YZVZKBVJ.js";
|
|
21
|
+
import "../../../chunks/chunk-DNIOWD7K.js";
|
|
22
|
+
import "../../../chunks/chunk-OSAXBA7G.js";
|
|
23
|
+
import "../../../chunks/chunk-UG5EMKGN.js";
|
|
24
|
+
import "../../../chunks/chunk-HQLRJ7XW.js";
|
|
25
|
+
import "../../../chunks/chunk-WSFCRVEQ.js";
|
|
26
|
+
export {
|
|
27
|
+
delinearizeToRgb,
|
|
28
|
+
linearizeToSRgb,
|
|
29
|
+
toCmyk,
|
|
30
|
+
toCss,
|
|
31
|
+
toHex,
|
|
32
|
+
toHsb,
|
|
33
|
+
toHsl,
|
|
34
|
+
toLab,
|
|
35
|
+
toLch,
|
|
36
|
+
toRgb,
|
|
37
|
+
toXyz,
|
|
38
|
+
viaCmyk,
|
|
39
|
+
viaHsb,
|
|
40
|
+
viaHsl,
|
|
41
|
+
viaLab,
|
|
42
|
+
viaLch,
|
|
43
|
+
viaRgb,
|
|
44
|
+
viaXyz
|
|
45
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
distance
|
|
3
|
+
} from "../../../chunks/chunk-P4YT4RBG.js";
|
|
4
|
+
import "../../../chunks/chunk-YZVZKBVJ.js";
|
|
5
|
+
import "../../../chunks/chunk-DNIOWD7K.js";
|
|
6
|
+
import "../../../chunks/chunk-OSAXBA7G.js";
|
|
7
|
+
import "../../../chunks/chunk-UG5EMKGN.js";
|
|
8
|
+
import "../../../chunks/chunk-HQLRJ7XW.js";
|
|
9
|
+
import "../../../chunks/chunk-WSFCRVEQ.js";
|
|
10
|
+
export {
|
|
11
|
+
distance
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
grayscale
|
|
3
|
+
} from "../../../chunks/chunk-65NTXENV.js";
|
|
4
|
+
import "../../../chunks/chunk-YZVZKBVJ.js";
|
|
5
|
+
import "../../../chunks/chunk-DNIOWD7K.js";
|
|
6
|
+
import "../../../chunks/chunk-OSAXBA7G.js";
|
|
7
|
+
import "../../../chunks/chunk-UG5EMKGN.js";
|
|
8
|
+
import "../../../chunks/chunk-HQLRJ7XW.js";
|
|
9
|
+
import "../../../chunks/chunk-WSFCRVEQ.js";
|
|
10
|
+
export {
|
|
11
|
+
grayscale
|
|
12
|
+
};
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const saturateColor: typeof saturateColorFunc;
|
|
16
|
-
}
|
|
1
|
+
import * as Types from './types.js';
|
|
2
|
+
import { setChannel, getChannel, addChannel, multChannel } from './channels/index.js';
|
|
3
|
+
import { contrast } from './contrast/index.js';
|
|
4
|
+
import { toRgb, toHsl, toHsb, toCmyk, toXyz, toLab, toLch, viaRgb, viaHsl, viaHsb, viaCmyk, viaXyz, viaLab, viaLch } from './convert/index.js';
|
|
5
|
+
import { distance } from './distance/index.js';
|
|
6
|
+
import { grayscale } from './grayscale/index.js';
|
|
7
|
+
import { invert } from './invert/index.js';
|
|
8
|
+
import { lerp } from './lerp/index.js';
|
|
9
|
+
import { luminance } from './luminance/index.js';
|
|
10
|
+
import { palette } from './palette/index.js';
|
|
11
|
+
import { rotate } from './rotate/index.js';
|
|
12
|
+
import { tidy } from './tidy/index.js';
|
|
13
|
+
import { isHex, isRgb, isHsl, isHsb, isCmyk, isXyz, isLab, isLch, isCssColor, isColor } from './typechecks/index.js';
|
|
14
|
+
export { Types, setChannel, getChannel, addChannel, multChannel, contrast, toRgb, toHsl, toHsb, toCmyk, toXyz, toLab, toLch, viaRgb, viaHsl, viaHsb, viaCmyk, viaXyz, viaLab, viaLch, distance, grayscale, invert, lerp, luminance, palette, rotate, tidy, isHex, isRgb, isHsl, isHsb, isCmyk, isXyz, isLab, isLch, isCssColor, isColor };
|
package/agnostic/colors/index.js
CHANGED
|
@@ -1,37 +1,105 @@
|
|
|
1
|
+
import "../../chunks/chunk-ALMK24GK.js";
|
|
1
2
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
grayscale
|
|
4
|
+
} from "../../chunks/chunk-65NTXENV.js";
|
|
4
5
|
import {
|
|
5
|
-
|
|
6
|
-
} from "../../chunks/chunk-
|
|
6
|
+
invert
|
|
7
|
+
} from "../../chunks/chunk-D7SXHHU3.js";
|
|
7
8
|
import {
|
|
8
|
-
|
|
9
|
-
} from "../../chunks/chunk-
|
|
9
|
+
lerp
|
|
10
|
+
} from "../../chunks/chunk-GUBFCOBT.js";
|
|
10
11
|
import {
|
|
11
|
-
|
|
12
|
-
} from "../../chunks/chunk-
|
|
12
|
+
palette
|
|
13
|
+
} from "../../chunks/chunk-XAYMIITK.js";
|
|
13
14
|
import {
|
|
14
|
-
|
|
15
|
-
} from "../../chunks/chunk-
|
|
15
|
+
rotate
|
|
16
|
+
} from "../../chunks/chunk-QW34TQCS.js";
|
|
16
17
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
addChannel,
|
|
19
|
+
getChannel,
|
|
20
|
+
multChannel,
|
|
21
|
+
setChannel
|
|
22
|
+
} from "../../chunks/chunk-ZJ63OCMA.js";
|
|
19
23
|
import {
|
|
20
|
-
|
|
21
|
-
} from "../../chunks/chunk-
|
|
24
|
+
contrast
|
|
25
|
+
} from "../../chunks/chunk-MN4FVOU2.js";
|
|
26
|
+
import {
|
|
27
|
+
luminance
|
|
28
|
+
} from "../../chunks/chunk-VA67YLZL.js";
|
|
29
|
+
import {
|
|
30
|
+
distance
|
|
31
|
+
} from "../../chunks/chunk-P4YT4RBG.js";
|
|
32
|
+
import {
|
|
33
|
+
tidy,
|
|
34
|
+
toCmyk,
|
|
35
|
+
toHsb,
|
|
36
|
+
toHsl,
|
|
37
|
+
toLab,
|
|
38
|
+
toLch,
|
|
39
|
+
toRgb,
|
|
40
|
+
toXyz,
|
|
41
|
+
viaCmyk,
|
|
42
|
+
viaHsb,
|
|
43
|
+
viaHsl,
|
|
44
|
+
viaLab,
|
|
45
|
+
viaLch,
|
|
46
|
+
viaRgb,
|
|
47
|
+
viaXyz
|
|
48
|
+
} from "../../chunks/chunk-YZVZKBVJ.js";
|
|
49
|
+
import "../../chunks/chunk-DNIOWD7K.js";
|
|
50
|
+
import "../../chunks/chunk-OSAXBA7G.js";
|
|
51
|
+
import {
|
|
52
|
+
isCmyk,
|
|
53
|
+
isColor,
|
|
54
|
+
isCssColor,
|
|
55
|
+
isHex,
|
|
56
|
+
isHsb,
|
|
57
|
+
isHsl,
|
|
58
|
+
isLab,
|
|
59
|
+
isLch,
|
|
60
|
+
isRgb,
|
|
61
|
+
isXyz,
|
|
62
|
+
types_exports
|
|
63
|
+
} from "../../chunks/chunk-UG5EMKGN.js";
|
|
64
|
+
import "../../chunks/chunk-HQLRJ7XW.js";
|
|
22
65
|
import "../../chunks/chunk-WSFCRVEQ.js";
|
|
23
|
-
|
|
24
|
-
// src/agnostic/colors/index.ts
|
|
25
|
-
var Colors;
|
|
26
|
-
((Colors2) => {
|
|
27
|
-
Colors2.complementColor = complementColor;
|
|
28
|
-
Colors2.HEXToRGB = HEXToRGB;
|
|
29
|
-
Colors2.RGBToHEX = RGBToHEX;
|
|
30
|
-
Colors2.RGBToHSL = RGBToHSL;
|
|
31
|
-
Colors2.HSLToRGB = HSLToRGB;
|
|
32
|
-
Colors2.lightenColor = lightenColor;
|
|
33
|
-
Colors2.saturateColor = saturateColor;
|
|
34
|
-
})(Colors || (Colors = {}));
|
|
35
66
|
export {
|
|
36
|
-
|
|
67
|
+
types_exports as Types,
|
|
68
|
+
addChannel,
|
|
69
|
+
contrast,
|
|
70
|
+
distance,
|
|
71
|
+
getChannel,
|
|
72
|
+
grayscale,
|
|
73
|
+
invert,
|
|
74
|
+
isCmyk,
|
|
75
|
+
isColor,
|
|
76
|
+
isCssColor,
|
|
77
|
+
isHex,
|
|
78
|
+
isHsb,
|
|
79
|
+
isHsl,
|
|
80
|
+
isLab,
|
|
81
|
+
isLch,
|
|
82
|
+
isRgb,
|
|
83
|
+
isXyz,
|
|
84
|
+
lerp,
|
|
85
|
+
luminance,
|
|
86
|
+
multChannel,
|
|
87
|
+
palette,
|
|
88
|
+
rotate,
|
|
89
|
+
setChannel,
|
|
90
|
+
tidy,
|
|
91
|
+
toCmyk,
|
|
92
|
+
toHsb,
|
|
93
|
+
toHsl,
|
|
94
|
+
toLab,
|
|
95
|
+
toLch,
|
|
96
|
+
toRgb,
|
|
97
|
+
toXyz,
|
|
98
|
+
viaCmyk,
|
|
99
|
+
viaHsb,
|
|
100
|
+
viaHsl,
|
|
101
|
+
viaLab,
|
|
102
|
+
viaLch,
|
|
103
|
+
viaRgb,
|
|
104
|
+
viaXyz
|
|
37
105
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
invert
|
|
3
|
+
} from "../../../chunks/chunk-D7SXHHU3.js";
|
|
4
|
+
import "../../../chunks/chunk-YZVZKBVJ.js";
|
|
5
|
+
import "../../../chunks/chunk-DNIOWD7K.js";
|
|
6
|
+
import "../../../chunks/chunk-OSAXBA7G.js";
|
|
7
|
+
import "../../../chunks/chunk-UG5EMKGN.js";
|
|
8
|
+
import "../../../chunks/chunk-HQLRJ7XW.js";
|
|
9
|
+
import "../../../chunks/chunk-WSFCRVEQ.js";
|
|
10
|
+
export {
|
|
11
|
+
invert
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
lerp
|
|
3
|
+
} from "../../../chunks/chunk-GUBFCOBT.js";
|
|
4
|
+
import "../../../chunks/chunk-YZVZKBVJ.js";
|
|
5
|
+
import "../../../chunks/chunk-DNIOWD7K.js";
|
|
6
|
+
import "../../../chunks/chunk-OSAXBA7G.js";
|
|
7
|
+
import "../../../chunks/chunk-UG5EMKGN.js";
|
|
8
|
+
import "../../../chunks/chunk-HQLRJ7XW.js";
|
|
9
|
+
import "../../../chunks/chunk-WSFCRVEQ.js";
|
|
10
|
+
export {
|
|
11
|
+
lerp
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
luminance
|
|
3
|
+
} from "../../../chunks/chunk-VA67YLZL.js";
|
|
4
|
+
import "../../../chunks/chunk-YZVZKBVJ.js";
|
|
5
|
+
import "../../../chunks/chunk-DNIOWD7K.js";
|
|
6
|
+
import "../../../chunks/chunk-OSAXBA7G.js";
|
|
7
|
+
import "../../../chunks/chunk-UG5EMKGN.js";
|
|
8
|
+
import "../../../chunks/chunk-HQLRJ7XW.js";
|
|
9
|
+
import "../../../chunks/chunk-WSFCRVEQ.js";
|
|
10
|
+
export {
|
|
11
|
+
luminance
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
palette
|
|
3
|
+
} from "../../../chunks/chunk-XAYMIITK.js";
|
|
4
|
+
import "../../../chunks/chunk-QW34TQCS.js";
|
|
5
|
+
import "../../../chunks/chunk-ZJ63OCMA.js";
|
|
6
|
+
import "../../../chunks/chunk-YZVZKBVJ.js";
|
|
7
|
+
import "../../../chunks/chunk-DNIOWD7K.js";
|
|
8
|
+
import "../../../chunks/chunk-OSAXBA7G.js";
|
|
9
|
+
import "../../../chunks/chunk-UG5EMKGN.js";
|
|
10
|
+
import "../../../chunks/chunk-HQLRJ7XW.js";
|
|
11
|
+
import "../../../chunks/chunk-WSFCRVEQ.js";
|
|
12
|
+
export {
|
|
13
|
+
palette
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
rotate
|
|
3
|
+
} from "../../../chunks/chunk-QW34TQCS.js";
|
|
4
|
+
import "../../../chunks/chunk-ZJ63OCMA.js";
|
|
5
|
+
import "../../../chunks/chunk-YZVZKBVJ.js";
|
|
6
|
+
import "../../../chunks/chunk-DNIOWD7K.js";
|
|
7
|
+
import "../../../chunks/chunk-OSAXBA7G.js";
|
|
8
|
+
import "../../../chunks/chunk-UG5EMKGN.js";
|
|
9
|
+
import "../../../chunks/chunk-HQLRJ7XW.js";
|
|
10
|
+
import "../../../chunks/chunk-WSFCRVEQ.js";
|
|
11
|
+
export {
|
|
12
|
+
rotate
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
tidy
|
|
3
|
+
} from "../../../chunks/chunk-YZVZKBVJ.js";
|
|
4
|
+
import "../../../chunks/chunk-DNIOWD7K.js";
|
|
5
|
+
import "../../../chunks/chunk-OSAXBA7G.js";
|
|
6
|
+
import "../../../chunks/chunk-UG5EMKGN.js";
|
|
7
|
+
import "../../../chunks/chunk-HQLRJ7XW.js";
|
|
8
|
+
import "../../../chunks/chunk-WSFCRVEQ.js";
|
|
9
|
+
export {
|
|
10
|
+
tidy
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Hex, Rgba, Hsla, Hsba, Laba, Lcha, Cmyka, Xyza, CssColor, Color } from '../types.js';
|
|
2
|
+
export declare const isHex: (color: unknown) => color is Hex;
|
|
3
|
+
export declare const isRgb: (color: unknown) => color is Rgba;
|
|
4
|
+
export declare const isHsl: (color: unknown) => color is Hsla;
|
|
5
|
+
export declare const isHsb: (color: unknown) => color is Hsba;
|
|
6
|
+
export declare const isLab: (color: unknown) => color is Laba;
|
|
7
|
+
export declare const isLch: (color: unknown) => color is Lcha;
|
|
8
|
+
export declare const isCmyk: (color: unknown) => color is Cmyka;
|
|
9
|
+
export declare const isXyz: (color: unknown) => color is Xyza;
|
|
10
|
+
export declare const isCssColor: (color: unknown) => color is CssColor;
|
|
11
|
+
export declare const isColor: (color: unknown) => color is Color;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isCmyk,
|
|
3
|
+
isColor,
|
|
4
|
+
isCssColor,
|
|
5
|
+
isHex,
|
|
6
|
+
isHsb,
|
|
7
|
+
isHsl,
|
|
8
|
+
isLab,
|
|
9
|
+
isLch,
|
|
10
|
+
isRgb,
|
|
11
|
+
isXyz
|
|
12
|
+
} from "../../../chunks/chunk-UG5EMKGN.js";
|
|
13
|
+
import "../../../chunks/chunk-HQLRJ7XW.js";
|
|
14
|
+
import "../../../chunks/chunk-WSFCRVEQ.js";
|
|
15
|
+
export {
|
|
16
|
+
isCmyk,
|
|
17
|
+
isColor,
|
|
18
|
+
isCssColor,
|
|
19
|
+
isHex,
|
|
20
|
+
isHsb,
|
|
21
|
+
isHsl,
|
|
22
|
+
isLab,
|
|
23
|
+
isLch,
|
|
24
|
+
isRgb,
|
|
25
|
+
isXyz
|
|
26
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export type Hex = `#${string}`;
|
|
2
|
+
export type Rgba = {
|
|
3
|
+
r: number;
|
|
4
|
+
g: number;
|
|
5
|
+
b: number;
|
|
6
|
+
a?: number;
|
|
7
|
+
};
|
|
8
|
+
export type Hsla = {
|
|
9
|
+
h: number;
|
|
10
|
+
s: number;
|
|
11
|
+
l: number;
|
|
12
|
+
a?: number;
|
|
13
|
+
};
|
|
14
|
+
export type Hsba = {
|
|
15
|
+
h: number;
|
|
16
|
+
s: number;
|
|
17
|
+
b: number;
|
|
18
|
+
a?: number;
|
|
19
|
+
};
|
|
20
|
+
export type Laba = {
|
|
21
|
+
l: number;
|
|
22
|
+
a: number;
|
|
23
|
+
b: number;
|
|
24
|
+
al?: number;
|
|
25
|
+
};
|
|
26
|
+
export type Lcha = {
|
|
27
|
+
l: number;
|
|
28
|
+
c: number;
|
|
29
|
+
h: number;
|
|
30
|
+
a?: number;
|
|
31
|
+
};
|
|
32
|
+
export type Cmyka = {
|
|
33
|
+
c: number;
|
|
34
|
+
m: number;
|
|
35
|
+
y: number;
|
|
36
|
+
k: number;
|
|
37
|
+
a?: number;
|
|
38
|
+
};
|
|
39
|
+
export type Xyza = {
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
z: number;
|
|
43
|
+
a?: number;
|
|
44
|
+
};
|
|
45
|
+
export type CssColor = 'aliceblue' | 'antiquewhite' | 'aqua' | 'aquamarine' | 'azure' | 'beige' | 'bisque' | 'black' | 'blanchedalmond' | 'blue' | 'blueviolet' | 'brown' | 'burlywood' | 'cadetblue' | 'chartreuse' | 'chocolate' | 'coral' | 'cornflowerblue' | 'cornsilk' | 'crimson' | 'cyan' | 'darkblue' | 'darkcyan' | 'darkgoldenrod' | 'darkgray' | 'darkgreen' | 'darkgrey' | 'darkkhaki' | 'darkmagenta' | 'darkolivegreen' | 'darkorange' | 'darkorchid' | 'darkred' | 'darksalmon' | 'darkseagreen' | 'darkslateblue' | 'darkslategray' | 'darkslategrey' | 'darkturquoise' | 'darkviolet' | 'deeppink' | 'deepskyblue' | 'dimgray' | 'dimgrey' | 'dodgerblue' | 'firebrick' | 'floralwhite' | 'forestgreen' | 'fuchsia' | 'gainsboro' | 'ghostwhite' | 'gold' | 'goldenrod' | 'gray' | 'green' | 'greenyellow' | 'grey' | 'honeydew' | 'hotpink' | 'indianred' | 'indigo' | 'ivory' | 'khaki' | 'lavender' | 'lavenderblush' | 'lawngreen' | 'lemonchiffon' | 'lightblue' | 'lightcoral' | 'lightcyan' | 'lightgoldenrodyellow' | 'lightgray' | 'lightgreen' | 'lightgrey' | 'lightpink' | 'lightsalmon' | 'lightseagreen' | 'lightskyblue' | 'lightslategray' | 'lightslategrey' | 'lightsteelblue' | 'lightyellow' | 'lime' | 'limegreen' | 'linen' | 'magenta' | 'maroon' | 'mediumaquamarine' | 'mediumblue' | 'mediumorchid' | 'mediumpurple' | 'mediumseagreen' | 'mediumslateblue' | 'mediumspringgreen' | 'mediumturquoise' | 'mediumvioletred' | 'midnightblue' | 'mintcream' | 'mistyrose' | 'moccasin' | 'navajowhite' | 'navy' | 'oldlace' | 'olive' | 'olivedrab' | 'orange' | 'orangered' | 'orchid' | 'palegoldenrod' | 'palegreen' | 'paleturquoise' | 'palevioletred' | 'papayawhip' | 'peachpuff' | 'peru' | 'pink' | 'plum' | 'powderblue' | 'purple' | 'rebeccapurple' | 'red' | 'rosybrown' | 'royalblue' | 'saddlebrown' | 'salmon' | 'sandybrown' | 'seagreen' | 'seashell' | 'sienna' | 'silver' | 'skyblue' | 'slateblue' | 'slategray' | 'slategrey' | 'snow' | 'springgreen' | 'steelblue' | 'tan' | 'teal' | 'thistle' | 'tomato' | 'turquoise' | 'violet' | 'wheat' | 'white' | 'whitesmoke' | 'yellow' | 'yellowgreen';
|
|
46
|
+
type CssColorMap = {
|
|
47
|
+
[K in CssColor]: Rgba;
|
|
48
|
+
};
|
|
49
|
+
export declare const cssColors: CssColorMap;
|
|
50
|
+
export type Color = Hex | Rgba | Hsla | Hsba | Laba | Lcha | Cmyka | Xyza | CssColor;
|
|
51
|
+
export type TransformedColor<C extends Color> = C extends CssColor ? Rgba : C extends Hex ? Hex : C extends Rgba ? Rgba : C extends Hsla ? Hsla : C extends Hsba ? Hsba : C extends Cmyka ? Cmyka : C extends Xyza ? Xyza : C extends Laba ? Laba : C extends Lcha ? Lcha : never;
|
|
52
|
+
export type Channel = 'red' | 'green' | 'blue' | 'alpha' | 'hue' | 'saturation' | 'lightness' | 'brightness' | 'cyan' | 'magenta' | 'yellow' | 'black' | 'x' | 'y' | 'z' | 'lightnessLab' | 'aLab' | 'bLab' | 'chroma' | 'hueLch';
|
|
53
|
+
export type InvertMethod = 'rgb' | 'lab' | 'lch';
|
|
54
|
+
export type RotateMethod = 'hsl' | 'lab' | 'lch';
|
|
55
|
+
type PaletteMap<C extends Color> = {
|
|
56
|
+
'complementary': readonly [TransformedColor<C>];
|
|
57
|
+
'complementary-lab': readonly [TransformedColor<C>];
|
|
58
|
+
'complementary-lch': readonly [TransformedColor<C>];
|
|
59
|
+
'split-complementary': readonly [TransformedColor<C>, TransformedColor<C>];
|
|
60
|
+
'split-complementary-lab': readonly [TransformedColor<C>, TransformedColor<C>];
|
|
61
|
+
'split-complementary-lch': readonly [TransformedColor<C>, TransformedColor<C>];
|
|
62
|
+
'triadic': readonly [TransformedColor<C>, TransformedColor<C>];
|
|
63
|
+
'triadic-lab': readonly [TransformedColor<C>, TransformedColor<C>];
|
|
64
|
+
'triadic-lch': readonly [TransformedColor<C>, TransformedColor<C>];
|
|
65
|
+
'tetradic': readonly [TransformedColor<C>, TransformedColor<C>, TransformedColor<C>];
|
|
66
|
+
'tetradic-lab': readonly [TransformedColor<C>, TransformedColor<C>, TransformedColor<C>];
|
|
67
|
+
'tetradic-lch': readonly [TransformedColor<C>, TransformedColor<C>, TransformedColor<C>];
|
|
68
|
+
};
|
|
69
|
+
export type PaletteType = keyof PaletteMap<Color>;
|
|
70
|
+
export type Palette<C extends Color, T extends PaletteType> = PaletteMap<C>[T];
|
|
71
|
+
export type GrayscaleMethod = 'rgb-avg' | 'rgb-weighted-avg' | 'rgb-min-channel' | 'rgb-max-channel' | 'rgb-via-red' | 'rgb-via-green' | 'rgb-via-blue' | 'cmyk-avg' | 'cmyk-no-black-avg' | 'cmyk-min-channel' | 'cmyk-min-no-black-channel' | 'cmyk-max-channel' | 'cmyk-max-no-black-channel' | 'cmyk-via-cyan' | 'cmyk-via-magenta' | 'cmyk-via-yellow' | 'cmyk-via-black' | 'cmyk-perceptual' | 'hsl' | 'hsb' | 'xyz' | 'lab' | 'lch';
|
|
72
|
+
export type Srgba = {
|
|
73
|
+
linearR: number;
|
|
74
|
+
linearG: number;
|
|
75
|
+
linearB: number;
|
|
76
|
+
a?: number;
|
|
77
|
+
};
|
|
78
|
+
export type LuminanceMethod = 'rgb' | 'xyz' | 'lab';
|
|
79
|
+
export type DistanceMethod = 'ciede2000';
|
|
80
|
+
export type ContrastMethod = 'wcag';
|
|
81
|
+
export type LerpMethod = 'rgb' | 'lab' | 'lch' | 'hsl' | 'hsb' | 'rgb-linear' | 'xyz';
|
|
82
|
+
export {};
|
package/agnostic/css/index.js
CHANGED
|
@@ -12,21 +12,21 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
StylesSet,
|
|
14
14
|
StylesSetComp
|
|
15
|
-
} from "../../chunks/chunk-
|
|
16
|
-
import "../../chunks/chunk-
|
|
15
|
+
} from "../../chunks/chunk-PX4DPCZM.js";
|
|
16
|
+
import "../../chunks/chunk-S32K7POB.js";
|
|
17
|
+
import "../../chunks/chunk-D3ERTRDW.js";
|
|
17
18
|
import "../../chunks/chunk-75BICI4L.js";
|
|
18
19
|
import "../../chunks/chunk-OGBUSUE6.js";
|
|
19
|
-
import "../../chunks/chunk-
|
|
20
|
-
import "../../chunks/chunk-
|
|
21
|
-
import "../../chunks/chunk-
|
|
22
|
-
import "../../chunks/chunk-
|
|
20
|
+
import "../../chunks/chunk-QXAJXTXV.js";
|
|
21
|
+
import "../../chunks/chunk-HC6ZOHCS.js";
|
|
22
|
+
import "../../chunks/chunk-P2H6PV4O.js";
|
|
23
|
+
import "../../chunks/chunk-FR5H2OCV.js";
|
|
23
24
|
import "../../chunks/chunk-S2NMAH7K.js";
|
|
24
25
|
import "../../chunks/chunk-LV2VMOWR.js";
|
|
25
|
-
import "../../chunks/chunk-
|
|
26
|
-
import "../../chunks/chunk-
|
|
26
|
+
import "../../chunks/chunk-RLJOYG64.js";
|
|
27
|
+
import "../../chunks/chunk-2KT7AKRW.js";
|
|
27
28
|
import "../../chunks/chunk-FENXVJYO.js";
|
|
28
|
-
import "../../chunks/chunk-
|
|
29
|
-
import "../../chunks/chunk-HC6ZOHCS.js";
|
|
29
|
+
import "../../chunks/chunk-QHLQVR3E.js";
|
|
30
30
|
import "../../chunks/chunk-WSFCRVEQ.js";
|
|
31
31
|
|
|
32
32
|
// src/agnostic/css/index.ts
|