@design-edito/tools 0.2.14 → 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.d.ts +5 -5
- package/agnostic/arrays/index.js +7 -7
- package/agnostic/arrays/is-array-of/index.d.ts +1 -1
- package/agnostic/arrays/random-pick/index.js +4 -4
- package/agnostic/booleans/index.d.ts +1 -1
- package/agnostic/booleans/is-falsy/index.d.ts +1 -1
- 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/bem/index.d.ts +2 -2
- package/agnostic/css/index.d.ts +3 -3
- package/agnostic/css/index.js +6 -6
- package/agnostic/css/styles-set/index.js +6 -6
- package/agnostic/errors/index.d.ts +2 -2
- package/agnostic/errors/index.js +2 -2
- package/agnostic/html/hyper-json/cast/index.d.ts +1 -1
- package/agnostic/html/hyper-json/cast/index.js +4 -4
- package/agnostic/html/hyper-json/index.d.ts +8 -8
- package/agnostic/html/hyper-json/index.js +5 -5
- package/agnostic/html/hyper-json/method/index.d.ts +2 -2
- package/agnostic/html/hyper-json/serialize/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/any/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/array/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/element/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/get/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/global/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/null/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/number/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/record/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/string/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +4 -4
- package/agnostic/html/hyper-json/smart-tags/isolated/text/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +4 -4
- package/agnostic/html/hyper-json/transformer/index.d.ts +4 -4
- package/agnostic/html/hyper-json/tree/index.d.ts +1 -1
- package/agnostic/html/hyper-json/tree/index.js +4 -4
- package/agnostic/html/hyper-json/types/index.d.ts +5 -5
- package/agnostic/html/hyper-json/utils/index.d.ts +2 -2
- package/agnostic/html/hyper-json/utils/index.js +4 -4
- package/agnostic/html/index.d.ts +8 -8
- package/agnostic/html/index.js +18 -18
- package/agnostic/html/sanitize/index.js +4 -4
- package/agnostic/html/selector-to-element/index.js +4 -4
- package/agnostic/html/string-to-nodes/index.d.ts +1 -1
- package/agnostic/html/string-to-nodes/index.js +5 -5
- package/agnostic/index.d.ts +12 -12
- package/agnostic/misc/assert/index.d.ts +1 -1
- package/agnostic/misc/assert/index.js +3 -3
- package/agnostic/misc/crossenv/detect-runtime/index.d.ts +1 -1
- package/agnostic/misc/crossenv/index.d.ts +3 -3
- package/agnostic/misc/crossenv/window/index.d.ts +1 -1
- package/agnostic/misc/index.d.ts +11 -11
- package/agnostic/misc/index.js +19 -19
- package/agnostic/misc/logs/index.d.ts +2 -2
- package/agnostic/misc/lorem-ipsum/index.js +10 -10
- package/agnostic/numbers/index.d.ts +5 -5
- package/agnostic/numbers/index.js +6 -6
- package/agnostic/objects/enums/index.d.ts +1 -1
- package/agnostic/objects/index.d.ts +8 -8
- package/agnostic/objects/index.js +4 -4
- package/agnostic/optim/index.d.ts +2 -2
- package/agnostic/random/index.d.ts +3 -3
- package/agnostic/random/index.js +2 -2
- package/agnostic/strings/index.d.ts +7 -7
- package/agnostic/strings/index.js +13 -13
- package/agnostic/strings/parse-table/index.d.ts +1 -1
- package/agnostic/time/dates/index.d.ts +1 -1
- package/agnostic/time/index.d.ts +5 -5
- 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-6EJIBLPQ.js → chunk-73FF7HWQ.js} +9 -9
- package/chunks/{chunk-HMZMKLMR.js → chunk-AF2NAJS2.js} +2 -2
- package/chunks/chunk-ALMK24GK.js +0 -0
- package/chunks/chunk-BKIF2ELV.js +47 -0
- package/chunks/{chunk-AQBJ6HNB.js → chunk-C7SRAQMW.js} +1 -1
- package/chunks/{chunk-ZBBU2P4D.js → chunk-CQEDNACN.js} +2 -2
- package/chunks/chunk-D7SXHHU3.js +47 -0
- package/chunks/{chunk-GU34O65H.js → chunk-E33DCHHS.js} +15 -15
- package/chunks/{chunk-WAMSK4A3.js → chunk-E4FJHD5R.js} +1 -1
- package/chunks/chunk-GUBFCOBT.js +98 -0
- package/chunks/{chunk-5TRAENM3.js → chunk-I2HTBYNO.js} +1 -1
- 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-KRDVV6K3.js → chunk-OD2XVVE2.js} +3 -3
- package/chunks/{chunk-TIER4TF4.js → chunk-P2H6PV4O.js} +1 -1
- package/chunks/chunk-P4YT4RBG.js +51 -0
- package/chunks/{chunk-C5BQQUAG.js → chunk-PJSPZGT2.js} +12 -12
- package/chunks/{chunk-PLIJVLAB.js → chunk-PX4DPCZM.js} +5 -3
- package/chunks/{chunk-DWCRT664.js → chunk-QRS3G3YD.js} +3 -3
- 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-XB3EGDBI.js → chunk-RDQJSWRC.js} +1 -1
- package/chunks/{chunk-AI6AGF4I.js → chunk-S7637BQZ.js} +8 -5
- package/chunks/{chunk-3TA4CDWX.js → chunk-TQXFC6OS.js} +4 -4
- package/chunks/chunk-UG5EMKGN.js +265 -0
- package/chunks/chunk-VA67YLZL.js +26 -0
- package/chunks/{chunk-DEW6LPOS.js → chunk-VKNQ7MVZ.js} +90 -91
- package/chunks/{chunk-3TKBCG7Y.js → chunk-WV5N7ESL.js} +4 -1
- package/chunks/{chunk-SKBOSWM2.js → chunk-X5HMM3LD.js} +1 -1
- package/chunks/chunk-XAYMIITK.js +103 -0
- package/chunks/{chunk-H4LW6FP3.js → chunk-Y4THX4AN.js} +1 -1
- package/chunks/chunk-YZVZKBVJ.js +631 -0
- package/chunks/chunk-ZJ63OCMA.js +207 -0
- package/components/index.d.ts +1 -1
- package/node/@aws-s3/index.d.ts +1 -1
- package/node/@aws-s3/index.js +7 -7
- package/node/@aws-s3/storage/directory/copy-dir/index.d.ts +1 -1
- package/node/@aws-s3/storage/directory/index.d.ts +4 -4
- package/node/@aws-s3/storage/directory/list/index.d.ts +1 -1
- package/node/@aws-s3/storage/directory/move-dir/index.d.ts +1 -1
- package/node/@aws-s3/storage/directory/remove-dir/index.d.ts +1 -1
- package/node/@aws-s3/storage/file/copy/index.d.ts +1 -1
- package/node/@aws-s3/storage/file/download/index.d.ts +1 -1
- package/node/@aws-s3/storage/file/exists/index.d.ts +1 -1
- package/node/@aws-s3/storage/file/index.d.ts +7 -7
- package/node/@aws-s3/storage/file/index.js +10 -10
- package/node/@aws-s3/storage/file/move/index.d.ts +1 -1
- package/node/@aws-s3/storage/file/remove/index.d.ts +1 -1
- package/node/@aws-s3/storage/file/remove/index.js +1 -1
- package/node/@aws-s3/storage/file/stat/index.d.ts +1 -1
- package/node/@aws-s3/storage/file/upload/index.d.ts +1 -1
- package/node/@aws-s3/storage/index.d.ts +2 -2
- package/node/@aws-s3/storage/index.js +9 -9
- package/node/@design-edito/index.d.ts +1 -1
- package/node/@express/@multer/index.d.ts +1 -1
- package/node/@express/index.d.ts +1 -1
- package/node/@google-cloud/index.d.ts +1 -1
- package/node/@google-cloud/index.js +11 -11
- package/node/@google-cloud/storage/bucket/get-metadata/index.d.ts +1 -1
- package/node/@google-cloud/storage/bucket/index.d.ts +4 -4
- package/node/@google-cloud/storage/directory/copy-dir/index.d.ts +1 -1
- package/node/@google-cloud/storage/directory/index.d.ts +4 -4
- package/node/@google-cloud/storage/directory/list/index.d.ts +1 -1
- package/node/@google-cloud/storage/directory/move-dir/index.d.ts +1 -1
- package/node/@google-cloud/storage/directory/remove-dir/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/copy/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/download/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/exists/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/generate-signed-url/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/get-metadata/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/get-permissions/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/index.d.ts +12 -12
- package/node/@google-cloud/storage/file/index.js +16 -16
- package/node/@google-cloud/storage/file/move/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/remove/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/revoke-signed-urls/index.d.ts +4 -4
- package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +2 -2
- package/node/@google-cloud/storage/file/stat/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/update-metadata/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/upload/index.d.ts +1 -1
- package/node/@google-cloud/storage/index.d.ts +3 -3
- package/node/@google-cloud/storage/index.js +13 -13
- package/node/cloud-storage/index.d.ts +2 -2
- package/node/cloud-storage/index.js +23 -23
- package/node/cloud-storage/operations/copy-dir/index.d.ts +6 -6
- package/node/cloud-storage/operations/copy-file/index.d.ts +6 -6
- package/node/cloud-storage/operations/download-file/index.d.ts +6 -6
- package/node/cloud-storage/operations/exists-file/index.d.ts +4 -4
- package/node/cloud-storage/operations/index.d.ts +11 -11
- package/node/cloud-storage/operations/index.js +30 -30
- package/node/cloud-storage/operations/list-dir/index.d.ts +4 -4
- package/node/cloud-storage/operations/move-dir/index.d.ts +6 -6
- package/node/cloud-storage/operations/move-file/index.d.ts +6 -6
- package/node/cloud-storage/operations/remove-dir/index.d.ts +6 -6
- package/node/cloud-storage/operations/remove-file/index.d.ts +6 -6
- package/node/cloud-storage/operations/remove-file/index.js +2 -2
- package/node/cloud-storage/operations/stat-file/index.d.ts +6 -6
- package/node/cloud-storage/operations/upload-file/index.d.ts +6 -6
- package/node/encryption/@aes-256-gcm/buffer/index.d.ts +1 -1
- package/node/encryption/@aes-256-gcm/index.d.ts +2 -2
- package/node/encryption/@aes-256-gcm/uint8-array/index.d.ts +1 -1
- package/node/encryption/index.d.ts +2 -2
- package/node/encryption/index.js +3 -3
- package/node/files/index.d.ts +3 -3
- package/node/ftps/directory/copy-dir/index.d.ts +1 -1
- package/node/ftps/directory/index.d.ts +4 -4
- package/node/ftps/directory/list/index.d.ts +1 -1
- package/node/ftps/directory/move-dir/index.d.ts +1 -1
- package/node/ftps/directory/remove-dir/index.d.ts +1 -1
- package/node/ftps/file/copy/index.d.ts +1 -1
- package/node/ftps/file/download/index.d.ts +1 -1
- package/node/ftps/file/exists/index.d.ts +1 -1
- package/node/ftps/file/index.d.ts +7 -7
- package/node/ftps/file/index.js +9 -9
- package/node/ftps/file/move/index.d.ts +1 -1
- package/node/ftps/file/remove/index.d.ts +1 -1
- package/node/ftps/file/stat/index.d.ts +1 -1
- package/node/ftps/file/upload/index.d.ts +1 -1
- package/node/ftps/index.d.ts +2 -2
- package/node/ftps/index.js +7 -7
- package/node/images/create/index.d.ts +3 -0
- package/node/images/create/index.js +23 -0
- package/node/images/format/index.d.ts +18 -52
- package/node/images/format/index.js +30 -4
- package/node/images/index.d.ts +6 -4
- 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 +3 -98
- package/node/images/transform/index.js +27 -16
- package/node/images/transform/operations/blur/index.d.ts +2 -4
- package/node/images/transform/operations/brighten/index.d.ts +2 -4
- package/node/images/transform/operations/extend/index.d.ts +2 -9
- package/node/images/transform/operations/extend/index.js +17 -2
- package/node/images/transform/operations/extract/index.d.ts +2 -7
- package/node/images/transform/operations/flatten/index.d.ts +2 -4
- package/node/images/transform/operations/flatten/index.js +17 -2
- package/node/images/transform/operations/hue/index.d.ts +2 -4
- package/node/images/transform/operations/level/index.d.ts +2 -5
- package/node/images/transform/operations/lighten/index.d.ts +2 -4
- package/node/images/transform/operations/normalize/index.d.ts +2 -5
- 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 +2 -12
- package/node/images/transform/operations/resize/index.js +17 -2
- package/node/images/transform/operations/rotate/index.d.ts +2 -5
- package/node/images/transform/operations/rotate/index.js +17 -2
- package/node/images/transform/operations/saturate/index.d.ts +2 -4
- 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/index.d.ts +11 -11
- package/node/process/index.d.ts +1 -1
- package/node/sftp/directory/copy-dir/index.d.ts +1 -1
- package/node/sftp/directory/index.d.ts +4 -4
- package/node/sftp/directory/list/index.d.ts +1 -1
- package/node/sftp/directory/move-dir/index.d.ts +1 -1
- package/node/sftp/directory/remove-dir/index.d.ts +1 -1
- package/node/sftp/file/copy/index.d.ts +1 -1
- package/node/sftp/file/download/index.d.ts +1 -1
- package/node/sftp/file/exists/index.d.ts +1 -1
- package/node/sftp/file/index.d.ts +7 -7
- package/node/sftp/file/index.js +9 -9
- package/node/sftp/file/move/index.d.ts +1 -1
- package/node/sftp/file/remove/index.d.ts +1 -1
- package/node/sftp/file/stat/index.d.ts +1 -1
- package/node/sftp/file/upload/index.d.ts +1 -1
- package/node/sftp/index.d.ts +2 -2
- package/node/sftp/index.js +7 -7
- package/package.json +1 -1
- package/shared/errors/index.d.ts +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-S5MTHWQ7.js → chunk-6QFELK4E.js} +8 -8
- package/chunks/{chunk-LEYJ4I5W.js → chunk-EXPVRDPR.js} +8 -8
- package/chunks/{chunk-ZPDKBMUH.js → chunk-LSZVKXDZ.js} +3 -3
- package/chunks/{chunk-NRABY36Z.js → chunk-MLLP7YSK.js} +9 -9
- package/chunks/{chunk-OVG5RGI3.js → chunk-S32K7POB.js} +4 -4
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
addChannel
|
|
3
|
+
} from "./chunk-ZJ63OCMA.js";
|
|
4
|
+
import {
|
|
5
|
+
viaLab,
|
|
6
|
+
viaLch
|
|
7
|
+
} from "./chunk-YZVZKBVJ.js";
|
|
8
|
+
import {
|
|
9
|
+
absoluteModulo
|
|
10
|
+
} from "./chunk-DNIOWD7K.js";
|
|
11
|
+
|
|
12
|
+
// src/agnostic/colors/rotate/index.ts
|
|
13
|
+
function rotateHsl(color, degrees) {
|
|
14
|
+
return addChannel(color, "hue", degrees);
|
|
15
|
+
}
|
|
16
|
+
function rotateLab(color, degrees) {
|
|
17
|
+
return viaLab(color, (lab) => {
|
|
18
|
+
const hue = Math.atan2(lab.b, lab.a) * (180 / Math.PI);
|
|
19
|
+
const chroma = Math.sqrt(lab.a ** 2 + lab.b ** 2);
|
|
20
|
+
const newHue = absoluteModulo(hue + degrees, 360);
|
|
21
|
+
const rad = newHue * (Math.PI / 180);
|
|
22
|
+
return {
|
|
23
|
+
...lab,
|
|
24
|
+
a: chroma * Math.cos(rad),
|
|
25
|
+
b: chroma * Math.sin(rad)
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function rotateLch(color, degrees) {
|
|
30
|
+
return viaLch(color, (lch) => ({
|
|
31
|
+
...lch,
|
|
32
|
+
h: absoluteModulo(lch.h + degrees, 360)
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
function rotate(color, degrees, method = "hsl") {
|
|
36
|
+
switch (method) {
|
|
37
|
+
case "hsl":
|
|
38
|
+
return rotateHsl(color, degrees);
|
|
39
|
+
case "lab":
|
|
40
|
+
return rotateLab(color, degrees);
|
|
41
|
+
case "lch":
|
|
42
|
+
return rotateLch(color, degrees);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
rotate
|
|
48
|
+
};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isSharpColor
|
|
3
|
-
} from "./chunk-MFYNJMVM.js";
|
|
4
1
|
import {
|
|
5
2
|
zod_default
|
|
6
3
|
} from "./chunk-DZ2T5DTY.js";
|
|
4
|
+
import {
|
|
5
|
+
toSharpColor
|
|
6
|
+
} from "./chunk-BKIF2ELV.js";
|
|
7
7
|
import {
|
|
8
8
|
Outcome
|
|
9
9
|
} from "./chunk-JMU5PDBD.js";
|
|
10
|
+
import {
|
|
11
|
+
isColor
|
|
12
|
+
} from "./chunk-UG5EMKGN.js";
|
|
10
13
|
|
|
11
14
|
// src/node/images/transform/operations/extend/index.ts
|
|
12
15
|
function isExtendOperationParams(obj) {
|
|
@@ -16,14 +19,17 @@ function isExtendOperationParams(obj) {
|
|
|
16
19
|
top: zod_default.number().optional(),
|
|
17
20
|
bottom: zod_default.number().optional(),
|
|
18
21
|
extendWith: zod_default.optional(zod_default.enum(["background", "copy", "repeat", "mirror"])),
|
|
19
|
-
background: zod_default.custom(
|
|
22
|
+
background: zod_default.custom(isColor).optional()
|
|
20
23
|
});
|
|
21
24
|
const result = schema.safeParse(obj);
|
|
22
25
|
if (!result.success) return Outcome.makeFailure(result.error.message);
|
|
23
26
|
return Outcome.makeSuccess(result.data);
|
|
24
27
|
}
|
|
25
28
|
async function extend(sharpInstance, params) {
|
|
26
|
-
return sharpInstance.extend(
|
|
29
|
+
return sharpInstance.extend({
|
|
30
|
+
...params,
|
|
31
|
+
background: params.background !== void 0 ? toSharpColor(params.background) : void 0
|
|
32
|
+
});
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
export {
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isSharpColor
|
|
3
|
-
} from "./chunk-MFYNJMVM.js";
|
|
4
1
|
import {
|
|
5
2
|
zod_default
|
|
6
3
|
} from "./chunk-DZ2T5DTY.js";
|
|
4
|
+
import {
|
|
5
|
+
toSharpColor
|
|
6
|
+
} from "./chunk-BKIF2ELV.js";
|
|
7
7
|
import {
|
|
8
8
|
Outcome
|
|
9
9
|
} from "./chunk-JMU5PDBD.js";
|
|
10
|
+
import {
|
|
11
|
+
isColor
|
|
12
|
+
} from "./chunk-UG5EMKGN.js";
|
|
10
13
|
|
|
11
14
|
// src/node/images/transform/operations/rotate/index.ts
|
|
12
15
|
function isRotateOperationParams(obj) {
|
|
13
16
|
const schema = zod_default.object({
|
|
14
17
|
angleDeg: zod_default.number().optional(),
|
|
15
|
-
background: zod_default.custom(
|
|
18
|
+
background: zod_default.custom(isColor).optional()
|
|
16
19
|
});
|
|
17
20
|
const result = schema.safeParse(obj);
|
|
18
21
|
if (!result.success) return Outcome.makeFailure(result.error.message);
|
|
@@ -20,7 +23,7 @@ function isRotateOperationParams(obj) {
|
|
|
20
23
|
}
|
|
21
24
|
async function rotate(sharpInstance, params) {
|
|
22
25
|
return sharpInstance.rotate(params.angleDeg, {
|
|
23
|
-
background: params.background
|
|
26
|
+
background: params.background !== void 0 ? toSharpColor(params.background) : void 0
|
|
24
27
|
});
|
|
25
28
|
}
|
|
26
29
|
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
Cast,
|
|
3
3
|
Tree,
|
|
4
4
|
Utils
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MLLP7YSK.js";
|
|
6
6
|
import {
|
|
7
7
|
Types
|
|
8
8
|
} from "./chunk-XEQ2PBT2.js";
|
|
9
|
-
import {
|
|
10
|
-
Serialize
|
|
11
|
-
} from "./chunk-SXRWMH3U.js";
|
|
12
9
|
import {
|
|
13
10
|
SmartTags
|
|
14
11
|
} from "./chunk-UT2J62LH.js";
|
|
12
|
+
import {
|
|
13
|
+
Serialize
|
|
14
|
+
} from "./chunk-SXRWMH3U.js";
|
|
15
15
|
import {
|
|
16
16
|
Transformer
|
|
17
17
|
} from "./chunk-BKO7GLC2.js";
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isNonNullObject
|
|
3
|
+
} from "./chunk-HQLRJ7XW.js";
|
|
4
|
+
import {
|
|
5
|
+
__export
|
|
6
|
+
} from "./chunk-WSFCRVEQ.js";
|
|
7
|
+
|
|
8
|
+
// src/agnostic/colors/types.ts
|
|
9
|
+
var types_exports = {};
|
|
10
|
+
__export(types_exports, {
|
|
11
|
+
cssColors: () => cssColors
|
|
12
|
+
});
|
|
13
|
+
var cssColors = {
|
|
14
|
+
aliceblue: { r: 240, g: 248, b: 255 },
|
|
15
|
+
antiquewhite: { r: 250, g: 235, b: 215 },
|
|
16
|
+
aqua: { r: 0, g: 255, b: 255 },
|
|
17
|
+
aquamarine: { r: 127, g: 255, b: 212 },
|
|
18
|
+
azure: { r: 240, g: 255, b: 255 },
|
|
19
|
+
beige: { r: 245, g: 245, b: 220 },
|
|
20
|
+
bisque: { r: 255, g: 228, b: 196 },
|
|
21
|
+
black: { r: 0, g: 0, b: 0 },
|
|
22
|
+
blanchedalmond: { r: 255, g: 235, b: 205 },
|
|
23
|
+
blue: { r: 0, g: 0, b: 255 },
|
|
24
|
+
blueviolet: { r: 138, g: 43, b: 226 },
|
|
25
|
+
brown: { r: 165, g: 42, b: 42 },
|
|
26
|
+
burlywood: { r: 222, g: 184, b: 135 },
|
|
27
|
+
cadetblue: { r: 95, g: 158, b: 160 },
|
|
28
|
+
chartreuse: { r: 127, g: 255, b: 0 },
|
|
29
|
+
chocolate: { r: 210, g: 105, b: 30 },
|
|
30
|
+
coral: { r: 255, g: 127, b: 80 },
|
|
31
|
+
cornflowerblue: { r: 100, g: 149, b: 237 },
|
|
32
|
+
cornsilk: { r: 255, g: 248, b: 220 },
|
|
33
|
+
crimson: { r: 220, g: 20, b: 60 },
|
|
34
|
+
cyan: { r: 0, g: 255, b: 255 },
|
|
35
|
+
darkblue: { r: 0, g: 0, b: 139 },
|
|
36
|
+
darkcyan: { r: 0, g: 139, b: 139 },
|
|
37
|
+
darkgoldenrod: { r: 184, g: 134, b: 11 },
|
|
38
|
+
darkgray: { r: 169, g: 169, b: 169 },
|
|
39
|
+
darkgreen: { r: 0, g: 100, b: 0 },
|
|
40
|
+
darkgrey: { r: 169, g: 169, b: 169 },
|
|
41
|
+
darkkhaki: { r: 189, g: 183, b: 107 },
|
|
42
|
+
darkmagenta: { r: 139, g: 0, b: 139 },
|
|
43
|
+
darkolivegreen: { r: 85, g: 107, b: 47 },
|
|
44
|
+
darkorange: { r: 255, g: 140, b: 0 },
|
|
45
|
+
darkorchid: { r: 153, g: 50, b: 204 },
|
|
46
|
+
darkred: { r: 139, g: 0, b: 0 },
|
|
47
|
+
darksalmon: { r: 233, g: 150, b: 122 },
|
|
48
|
+
darkseagreen: { r: 143, g: 188, b: 143 },
|
|
49
|
+
darkslateblue: { r: 72, g: 61, b: 139 },
|
|
50
|
+
darkslategray: { r: 47, g: 79, b: 79 },
|
|
51
|
+
darkslategrey: { r: 47, g: 79, b: 79 },
|
|
52
|
+
darkturquoise: { r: 0, g: 206, b: 209 },
|
|
53
|
+
darkviolet: { r: 148, g: 0, b: 211 },
|
|
54
|
+
deeppink: { r: 255, g: 20, b: 147 },
|
|
55
|
+
deepskyblue: { r: 0, g: 191, b: 255 },
|
|
56
|
+
dimgray: { r: 105, g: 105, b: 105 },
|
|
57
|
+
dimgrey: { r: 105, g: 105, b: 105 },
|
|
58
|
+
dodgerblue: { r: 30, g: 144, b: 255 },
|
|
59
|
+
firebrick: { r: 178, g: 34, b: 34 },
|
|
60
|
+
floralwhite: { r: 255, g: 250, b: 240 },
|
|
61
|
+
forestgreen: { r: 34, g: 139, b: 34 },
|
|
62
|
+
fuchsia: { r: 255, g: 0, b: 255 },
|
|
63
|
+
gainsboro: { r: 220, g: 220, b: 220 },
|
|
64
|
+
ghostwhite: { r: 248, g: 248, b: 255 },
|
|
65
|
+
gold: { r: 255, g: 215, b: 0 },
|
|
66
|
+
goldenrod: { r: 218, g: 165, b: 32 },
|
|
67
|
+
gray: { r: 128, g: 128, b: 128 },
|
|
68
|
+
green: { r: 0, g: 128, b: 0 },
|
|
69
|
+
greenyellow: { r: 173, g: 255, b: 47 },
|
|
70
|
+
grey: { r: 128, g: 128, b: 128 },
|
|
71
|
+
honeydew: { r: 240, g: 255, b: 240 },
|
|
72
|
+
hotpink: { r: 255, g: 105, b: 180 },
|
|
73
|
+
indianred: { r: 205, g: 92, b: 92 },
|
|
74
|
+
indigo: { r: 75, g: 0, b: 130 },
|
|
75
|
+
ivory: { r: 255, g: 255, b: 240 },
|
|
76
|
+
khaki: { r: 240, g: 230, b: 140 },
|
|
77
|
+
lavender: { r: 230, g: 230, b: 250 },
|
|
78
|
+
lavenderblush: { r: 255, g: 240, b: 245 },
|
|
79
|
+
lawngreen: { r: 124, g: 252, b: 0 },
|
|
80
|
+
lemonchiffon: { r: 255, g: 250, b: 205 },
|
|
81
|
+
lightblue: { r: 173, g: 216, b: 230 },
|
|
82
|
+
lightcoral: { r: 240, g: 128, b: 128 },
|
|
83
|
+
lightcyan: { r: 224, g: 255, b: 255 },
|
|
84
|
+
lightgoldenrodyellow: { r: 250, g: 250, b: 210 },
|
|
85
|
+
lightgray: { r: 211, g: 211, b: 211 },
|
|
86
|
+
lightgreen: { r: 144, g: 238, b: 144 },
|
|
87
|
+
lightgrey: { r: 211, g: 211, b: 211 },
|
|
88
|
+
lightpink: { r: 255, g: 182, b: 193 },
|
|
89
|
+
lightsalmon: { r: 255, g: 160, b: 122 },
|
|
90
|
+
lightseagreen: { r: 32, g: 178, b: 170 },
|
|
91
|
+
lightskyblue: { r: 135, g: 206, b: 250 },
|
|
92
|
+
lightslategray: { r: 119, g: 136, b: 153 },
|
|
93
|
+
lightslategrey: { r: 119, g: 136, b: 153 },
|
|
94
|
+
lightsteelblue: { r: 176, g: 196, b: 222 },
|
|
95
|
+
lightyellow: { r: 255, g: 255, b: 224 },
|
|
96
|
+
lime: { r: 0, g: 255, b: 0 },
|
|
97
|
+
limegreen: { r: 50, g: 205, b: 50 },
|
|
98
|
+
linen: { r: 250, g: 240, b: 230 },
|
|
99
|
+
magenta: { r: 255, g: 0, b: 255 },
|
|
100
|
+
maroon: { r: 128, g: 0, b: 0 },
|
|
101
|
+
mediumaquamarine: { r: 102, g: 205, b: 170 },
|
|
102
|
+
mediumblue: { r: 0, g: 0, b: 205 },
|
|
103
|
+
mediumorchid: { r: 186, g: 85, b: 211 },
|
|
104
|
+
mediumpurple: { r: 147, g: 112, b: 219 },
|
|
105
|
+
mediumseagreen: { r: 60, g: 179, b: 113 },
|
|
106
|
+
mediumslateblue: { r: 123, g: 104, b: 238 },
|
|
107
|
+
mediumspringgreen: { r: 0, g: 250, b: 154 },
|
|
108
|
+
mediumturquoise: { r: 72, g: 209, b: 204 },
|
|
109
|
+
mediumvioletred: { r: 199, g: 21, b: 133 },
|
|
110
|
+
midnightblue: { r: 25, g: 25, b: 112 },
|
|
111
|
+
mintcream: { r: 245, g: 255, b: 250 },
|
|
112
|
+
mistyrose: { r: 255, g: 228, b: 225 },
|
|
113
|
+
moccasin: { r: 255, g: 228, b: 181 },
|
|
114
|
+
navajowhite: { r: 255, g: 222, b: 173 },
|
|
115
|
+
navy: { r: 0, g: 0, b: 128 },
|
|
116
|
+
oldlace: { r: 253, g: 245, b: 230 },
|
|
117
|
+
olive: { r: 128, g: 128, b: 0 },
|
|
118
|
+
olivedrab: { r: 107, g: 142, b: 35 },
|
|
119
|
+
orange: { r: 255, g: 165, b: 0 },
|
|
120
|
+
orangered: { r: 255, g: 69, b: 0 },
|
|
121
|
+
orchid: { r: 218, g: 112, b: 214 },
|
|
122
|
+
palegoldenrod: { r: 238, g: 232, b: 170 },
|
|
123
|
+
palegreen: { r: 152, g: 251, b: 152 },
|
|
124
|
+
paleturquoise: { r: 175, g: 238, b: 238 },
|
|
125
|
+
palevioletred: { r: 219, g: 112, b: 147 },
|
|
126
|
+
papayawhip: { r: 255, g: 239, b: 213 },
|
|
127
|
+
peachpuff: { r: 255, g: 218, b: 185 },
|
|
128
|
+
peru: { r: 205, g: 133, b: 63 },
|
|
129
|
+
pink: { r: 255, g: 192, b: 203 },
|
|
130
|
+
plum: { r: 221, g: 160, b: 221 },
|
|
131
|
+
powderblue: { r: 176, g: 224, b: 230 },
|
|
132
|
+
purple: { r: 128, g: 0, b: 128 },
|
|
133
|
+
rebeccapurple: { r: 102, g: 51, b: 153 },
|
|
134
|
+
red: { r: 255, g: 0, b: 0 },
|
|
135
|
+
rosybrown: { r: 188, g: 143, b: 143 },
|
|
136
|
+
royalblue: { r: 65, g: 105, b: 225 },
|
|
137
|
+
saddlebrown: { r: 139, g: 69, b: 19 },
|
|
138
|
+
salmon: { r: 250, g: 128, b: 114 },
|
|
139
|
+
sandybrown: { r: 244, g: 164, b: 96 },
|
|
140
|
+
seagreen: { r: 46, g: 139, b: 87 },
|
|
141
|
+
seashell: { r: 255, g: 245, b: 238 },
|
|
142
|
+
sienna: { r: 160, g: 82, b: 45 },
|
|
143
|
+
silver: { r: 192, g: 192, b: 192 },
|
|
144
|
+
skyblue: { r: 135, g: 206, b: 235 },
|
|
145
|
+
slateblue: { r: 106, g: 90, b: 205 },
|
|
146
|
+
slategray: { r: 112, g: 128, b: 144 },
|
|
147
|
+
slategrey: { r: 112, g: 128, b: 144 },
|
|
148
|
+
snow: { r: 255, g: 250, b: 250 },
|
|
149
|
+
springgreen: { r: 0, g: 255, b: 127 },
|
|
150
|
+
steelblue: { r: 70, g: 130, b: 180 },
|
|
151
|
+
tan: { r: 210, g: 180, b: 140 },
|
|
152
|
+
teal: { r: 0, g: 128, b: 128 },
|
|
153
|
+
thistle: { r: 216, g: 191, b: 216 },
|
|
154
|
+
tomato: { r: 255, g: 99, b: 71 },
|
|
155
|
+
turquoise: { r: 64, g: 224, b: 208 },
|
|
156
|
+
violet: { r: 238, g: 130, b: 238 },
|
|
157
|
+
wheat: { r: 245, g: 222, b: 179 },
|
|
158
|
+
white: { r: 255, g: 255, b: 255 },
|
|
159
|
+
whitesmoke: { r: 245, g: 245, b: 245 },
|
|
160
|
+
yellow: { r: 255, g: 255, b: 0 },
|
|
161
|
+
yellowgreen: { r: 154, g: 205, b: 50 }
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
// src/agnostic/colors/typechecks/index.ts
|
|
165
|
+
var isHex = (color) => {
|
|
166
|
+
if (typeof color !== "string") return false;
|
|
167
|
+
if (!color.startsWith("#")) return false;
|
|
168
|
+
const withoutHash = color.slice(1);
|
|
169
|
+
const withoutHashLength = withoutHash.length;
|
|
170
|
+
const allowedLengths = [3, 4, 6, 8];
|
|
171
|
+
if (!allowedLengths.includes(withoutHashLength)) return false;
|
|
172
|
+
return /^[0-9a-f]+$/igm.test(withoutHash);
|
|
173
|
+
};
|
|
174
|
+
var isRgb = (color) => {
|
|
175
|
+
if (!isNonNullObject(color)) return false;
|
|
176
|
+
const { r, g, b, a } = color;
|
|
177
|
+
if (typeof r !== "number") return false;
|
|
178
|
+
if (typeof g !== "number") return false;
|
|
179
|
+
if (typeof b !== "number") return false;
|
|
180
|
+
if (a !== void 0 && typeof a !== "number") return false;
|
|
181
|
+
return true;
|
|
182
|
+
};
|
|
183
|
+
var isHsl = (color) => {
|
|
184
|
+
if (!isNonNullObject(color)) return false;
|
|
185
|
+
const { h, s, l, a } = color;
|
|
186
|
+
if (typeof h !== "number") return false;
|
|
187
|
+
if (typeof s !== "number") return false;
|
|
188
|
+
if (typeof l !== "number") return false;
|
|
189
|
+
if (a !== void 0 && typeof a !== "number") return false;
|
|
190
|
+
return true;
|
|
191
|
+
};
|
|
192
|
+
var isHsb = (color) => {
|
|
193
|
+
if (!isNonNullObject(color)) return false;
|
|
194
|
+
const { h, s, b, a } = color;
|
|
195
|
+
if (typeof h !== "number") return false;
|
|
196
|
+
if (typeof s !== "number") return false;
|
|
197
|
+
if (typeof b !== "number") return false;
|
|
198
|
+
if (a !== void 0 && typeof a !== "number") return false;
|
|
199
|
+
return true;
|
|
200
|
+
};
|
|
201
|
+
var isLab = (color) => {
|
|
202
|
+
if (!isNonNullObject(color)) return false;
|
|
203
|
+
const { l, a, b, al } = color;
|
|
204
|
+
if (typeof l !== "number") return false;
|
|
205
|
+
if (typeof a !== "number") return false;
|
|
206
|
+
if (typeof b !== "number") return false;
|
|
207
|
+
if (al !== void 0 && typeof al !== "number") return false;
|
|
208
|
+
return true;
|
|
209
|
+
};
|
|
210
|
+
var isLch = (color) => {
|
|
211
|
+
if (!isNonNullObject(color)) return false;
|
|
212
|
+
const { l, c, h, a } = color;
|
|
213
|
+
if (typeof l !== "number") return false;
|
|
214
|
+
if (typeof c !== "number") return false;
|
|
215
|
+
if (typeof h !== "number") return false;
|
|
216
|
+
if (a !== void 0 && typeof a !== "number") return false;
|
|
217
|
+
return true;
|
|
218
|
+
};
|
|
219
|
+
var isCmyk = (color) => {
|
|
220
|
+
if (!isNonNullObject(color)) return false;
|
|
221
|
+
const { c, m, y, k, a } = color;
|
|
222
|
+
if (typeof c !== "number") return false;
|
|
223
|
+
if (typeof m !== "number") return false;
|
|
224
|
+
if (typeof y !== "number") return false;
|
|
225
|
+
if (typeof k !== "number") return false;
|
|
226
|
+
if (a !== void 0 && typeof a !== "number") return false;
|
|
227
|
+
return true;
|
|
228
|
+
};
|
|
229
|
+
var isXyz = (color) => {
|
|
230
|
+
if (!isNonNullObject(color)) return false;
|
|
231
|
+
const { x, y, z, a } = color;
|
|
232
|
+
if (typeof x !== "number") return false;
|
|
233
|
+
if (typeof y !== "number") return false;
|
|
234
|
+
if (typeof z !== "number") return false;
|
|
235
|
+
if (a !== void 0 && typeof a !== "number") return false;
|
|
236
|
+
return true;
|
|
237
|
+
};
|
|
238
|
+
var isCssColor = (color) => typeof color === "string" && cssColors[color] !== void 0;
|
|
239
|
+
var isColor = (color) => {
|
|
240
|
+
if (isHex(color)) return true;
|
|
241
|
+
if (isCssColor(color)) return true;
|
|
242
|
+
if (isRgb(color)) return true;
|
|
243
|
+
if (isHsl(color)) return true;
|
|
244
|
+
if (isHsb(color)) return true;
|
|
245
|
+
if (isCmyk(color)) return true;
|
|
246
|
+
if (isXyz(color)) return true;
|
|
247
|
+
if (isLab(color)) return true;
|
|
248
|
+
if (isLch(color)) return true;
|
|
249
|
+
return false;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
export {
|
|
253
|
+
cssColors,
|
|
254
|
+
types_exports,
|
|
255
|
+
isHex,
|
|
256
|
+
isRgb,
|
|
257
|
+
isHsl,
|
|
258
|
+
isHsb,
|
|
259
|
+
isLab,
|
|
260
|
+
isLch,
|
|
261
|
+
isCmyk,
|
|
262
|
+
isXyz,
|
|
263
|
+
isCssColor,
|
|
264
|
+
isColor
|
|
265
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
linearizeToSRgb,
|
|
3
|
+
toLab,
|
|
4
|
+
toRgb,
|
|
5
|
+
toXyz
|
|
6
|
+
} from "./chunk-YZVZKBVJ.js";
|
|
7
|
+
|
|
8
|
+
// src/agnostic/colors/luminance/index.ts
|
|
9
|
+
function luminanceRgb(rgb) {
|
|
10
|
+
const { linearR, linearG, linearB } = linearizeToSRgb(rgb);
|
|
11
|
+
return (0.2126 * linearR + 0.7152 * linearG + 0.0722 * linearB) / 255;
|
|
12
|
+
}
|
|
13
|
+
function luminance(color, method = "lab") {
|
|
14
|
+
switch (method) {
|
|
15
|
+
case "rgb":
|
|
16
|
+
return luminanceRgb(toRgb(color));
|
|
17
|
+
case "xyz":
|
|
18
|
+
return toXyz(color).y / 100;
|
|
19
|
+
case "lab":
|
|
20
|
+
return toLab(color).l / 100;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
luminance
|
|
26
|
+
};
|