@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
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import {
|
|
2
|
+
rotate
|
|
3
|
+
} from "./chunk-QW34TQCS.js";
|
|
4
|
+
|
|
5
|
+
// src/agnostic/colors/palette/index.ts
|
|
6
|
+
function complementaryHsl(color) {
|
|
7
|
+
return rotate(color, 180, "hsl");
|
|
8
|
+
}
|
|
9
|
+
function complementaryLab(color) {
|
|
10
|
+
return rotate(color, 180, "lab");
|
|
11
|
+
}
|
|
12
|
+
function complementaryLch(color) {
|
|
13
|
+
return rotate(color, 180, "lch");
|
|
14
|
+
}
|
|
15
|
+
function splitComplementaryHsl(color) {
|
|
16
|
+
return [
|
|
17
|
+
rotate(color, 150, "hsl"),
|
|
18
|
+
rotate(color, 210, "hsl")
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
function splitComplementaryLab(color) {
|
|
22
|
+
return [
|
|
23
|
+
rotate(color, 150, "lab"),
|
|
24
|
+
rotate(color, 210, "lab")
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
function splitComplementaryLch(color) {
|
|
28
|
+
return [
|
|
29
|
+
rotate(color, 150, "lch"),
|
|
30
|
+
rotate(color, 210, "lch")
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
function triadicHsl(color) {
|
|
34
|
+
return [
|
|
35
|
+
rotate(color, 120, "hsl"),
|
|
36
|
+
rotate(color, 240, "hsl")
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
function triadicLab(color) {
|
|
40
|
+
return [
|
|
41
|
+
rotate(color, 120, "lab"),
|
|
42
|
+
rotate(color, 240, "lab")
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
function triadicLch(color) {
|
|
46
|
+
return [
|
|
47
|
+
rotate(color, 120, "lch"),
|
|
48
|
+
rotate(color, 240, "lch")
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
function tetradicHsl(color) {
|
|
52
|
+
return [
|
|
53
|
+
rotate(color, 90, "hsl"),
|
|
54
|
+
rotate(color, 180, "hsl"),
|
|
55
|
+
rotate(color, 270, "hsl")
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
function tetradicLab(color) {
|
|
59
|
+
return [
|
|
60
|
+
rotate(color, 90, "lab"),
|
|
61
|
+
rotate(color, 180, "lab"),
|
|
62
|
+
rotate(color, 270, "lab")
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
function tetradicLch(color) {
|
|
66
|
+
return [
|
|
67
|
+
rotate(color, 90, "lch"),
|
|
68
|
+
rotate(color, 180, "lch"),
|
|
69
|
+
rotate(color, 270, "lch")
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
function palette(color, type) {
|
|
73
|
+
switch (type) {
|
|
74
|
+
case "complementary":
|
|
75
|
+
return [complementaryHsl(color)];
|
|
76
|
+
case "complementary-lab":
|
|
77
|
+
return [complementaryLab(color)];
|
|
78
|
+
case "complementary-lch":
|
|
79
|
+
return [complementaryLch(color)];
|
|
80
|
+
case "split-complementary":
|
|
81
|
+
return splitComplementaryHsl(color);
|
|
82
|
+
case "split-complementary-lab":
|
|
83
|
+
return splitComplementaryLab(color);
|
|
84
|
+
case "split-complementary-lch":
|
|
85
|
+
return splitComplementaryLch(color);
|
|
86
|
+
case "triadic":
|
|
87
|
+
return triadicHsl(color);
|
|
88
|
+
case "triadic-lab":
|
|
89
|
+
return triadicLab(color);
|
|
90
|
+
case "triadic-lch":
|
|
91
|
+
return triadicLch(color);
|
|
92
|
+
case "tetradic":
|
|
93
|
+
return tetradicHsl(color);
|
|
94
|
+
case "tetradic-lab":
|
|
95
|
+
return tetradicLab(color);
|
|
96
|
+
case "tetradic-lch":
|
|
97
|
+
return tetradicLch(color);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export {
|
|
102
|
+
palette
|
|
103
|
+
};
|