@design-edito/tools 0.1.64 → 0.1.65
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/find-duplicates/index.js +1 -1
- package/agnostic/arrays/index.js +5 -5
- package/agnostic/arrays/is-array-of/index.js +1 -1
- package/agnostic/arrays/make/index.js +1 -1
- package/agnostic/arrays/random-pick/index.js +1 -1
- package/agnostic/arrays/shuffle/index.js +1 -1
- package/agnostic/booleans/index.js +1 -1
- package/agnostic/booleans/is-falsy/index.js +1 -1
- package/agnostic/colors/complement-color/index.d.ts +1 -0
- package/agnostic/colors/complement-color/index.js +7 -0
- package/agnostic/colors/hex-to-rgb/index.d.ts +1 -0
- package/agnostic/colors/hex-to-rgb/index.js +7 -0
- package/agnostic/colors/hsl-to-rgb/index.d.ts +1 -0
- package/agnostic/colors/hsl-to-rgb/index.js +7 -0
- package/agnostic/colors/index.d.ts +16 -0
- package/agnostic/colors/index.js +37 -0
- package/agnostic/colors/lighten-color/index.d.ts +2 -0
- package/agnostic/colors/lighten-color/index.js +11 -0
- package/agnostic/colors/rgb-to-hex/index.d.ts +1 -0
- package/agnostic/colors/rgb-to-hex/index.js +7 -0
- package/agnostic/colors/rgb-to-hsl/index.d.ts +1 -0
- package/agnostic/colors/rgb-to-hsl/index.js +7 -0
- package/agnostic/colors/saturate-color/index.d.ts +2 -0
- package/agnostic/colors/saturate-color/index.js +11 -0
- package/agnostic/css/bem/index.js +1 -1
- package/agnostic/css/generate-nice-color/index.js +1 -1
- package/agnostic/css/index.js +4 -4
- package/agnostic/css/is-valid-css-class-name/index.js +1 -1
- package/agnostic/css/styles-set/index.js +1 -1
- package/agnostic/errors/index.js +1 -1
- package/agnostic/errors/register/index.js +1 -1
- package/agnostic/errors/unknown-to-string/index.js +1 -1
- package/agnostic/html/get-node-ancestors/index.js +1 -1
- package/agnostic/html/get-position-inside-parent/index.js +1 -1
- package/agnostic/html/hyper-json/cast/index.d.ts +1 -1
- package/agnostic/html/hyper-json/cast/index.js +5 -5
- package/agnostic/html/hyper-json/index.js +6 -6
- package/agnostic/html/hyper-json/method/index.js +1 -1
- package/agnostic/html/hyper-json/serialize/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.d.ts +3 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.d.ts +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.d.ts +3 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.d.ts +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.d.ts +3 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.d.ts +3 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/any/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/array/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/null/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +5 -5
- package/agnostic/html/hyper-json/transformer/index.js +1 -1
- package/agnostic/html/hyper-json/tree/index.js +5 -5
- package/agnostic/html/hyper-json/types/index.js +1 -1
- package/agnostic/html/hyper-json/utils/index.d.ts +5 -0
- package/agnostic/html/hyper-json/utils/index.js +5 -5
- package/agnostic/html/index.js +9 -9
- package/agnostic/html/insert-node/index.js +1 -1
- package/agnostic/html/placeholders/index.js +1 -1
- package/agnostic/html/replace-in-element/index.js +1 -1
- package/agnostic/html/sanitize/index.js +1 -1
- package/agnostic/html/selector-to-element/index.js +1 -1
- package/agnostic/html/string-to-nodes/index.js +1 -1
- package/agnostic/index.d.ts +2 -0
- package/agnostic/misc/assert/index.js +1 -1
- package/agnostic/misc/cast/index.js +1 -1
- package/agnostic/misc/crawler/index.js +1 -1
- package/agnostic/misc/crossenv/detect-runtime/index.js +1 -1
- package/agnostic/misc/crossenv/index.js +1 -1
- package/agnostic/misc/crossenv/types/index.js +1 -1
- package/agnostic/misc/crossenv/window/index.js +1 -1
- package/agnostic/misc/data-size/index.js +2 -2
- package/agnostic/misc/elo/index.js +1 -1
- package/agnostic/misc/get-current-downlink/index.js +1 -1
- package/agnostic/misc/index.js +18 -18
- package/agnostic/misc/is-constructor-function/index.js +1 -1
- package/agnostic/misc/is-nullish/index.js +1 -1
- package/agnostic/misc/logs/index.js +3 -3
- package/agnostic/misc/logs/logger/index.js +1 -1
- package/agnostic/misc/logs/make-text-block/index.js +1 -1
- package/agnostic/misc/logs/styles/index.js +1 -1
- package/agnostic/misc/lorem-ipsum/index.js +6 -6
- package/agnostic/misc/outcome/index.js +1 -1
- package/agnostic/numbers/absolute-modulo/index.js +1 -1
- package/agnostic/numbers/clamp/index.js +1 -1
- package/agnostic/numbers/index.js +1 -1
- package/agnostic/numbers/interpolate/index.js +1 -1
- package/agnostic/numbers/responsive-harmonics/index.js +1 -1
- package/agnostic/numbers/round/index.js +1 -1
- package/agnostic/objects/deep-get-property/index.js +1 -1
- package/agnostic/objects/enums/index.js +1 -1
- package/agnostic/objects/enums/is-in-enum/index.js +1 -1
- package/agnostic/objects/flatten-getters/index.js +1 -1
- package/agnostic/objects/index.js +7 -7
- package/agnostic/objects/is-object/index.js +1 -1
- package/agnostic/objects/is-record/index.js +1 -1
- package/agnostic/objects/record-format/index.js +1 -1
- package/agnostic/objects/record-map/index.js +1 -1
- package/agnostic/objects/validation/index.js +1 -1
- package/agnostic/optim/index.js +1 -1
- package/agnostic/optim/memoize/index.js +1 -1
- package/agnostic/optim/throttle-debounce/index.js +1 -1
- package/agnostic/random/hex-char/index.js +1 -1
- package/agnostic/random/index.js +1 -1
- package/agnostic/random/random/index.js +1 -1
- package/agnostic/random/uuid/index.js +1 -1
- package/agnostic/regexps/index.js +1 -1
- package/agnostic/sanitization/index.d.ts +3 -0
- package/agnostic/sanitization/index.js +1311 -0
- package/agnostic/strings/char-codes/index.js +1 -1
- package/agnostic/strings/index.js +4 -4
- package/agnostic/strings/matches/index.js +1 -1
- package/agnostic/strings/normalize-indent/index.js +1 -1
- package/agnostic/strings/replace-all/index.js +1 -1
- package/agnostic/strings/to-alphanum/index.js +1 -1
- package/agnostic/strings/trim/index.js +1 -1
- package/agnostic/time/dates/format-date/index.js +1 -1
- package/agnostic/time/dates/index.js +1 -1
- package/agnostic/time/duration/index.js +1 -1
- package/agnostic/time/index.js +5 -5
- package/agnostic/time/timeout/index.js +1 -1
- package/agnostic/time/transitions/index.js +1 -1
- package/agnostic/time/wait/index.js +1 -1
- package/chunks/chunk-26QQ56SS.js +36 -0
- package/chunks/chunk-2H5RIOJO.js +16 -0
- package/chunks/chunk-2POD3TAX.js +11 -0
- package/chunks/chunk-2TJCB6IM.js +12 -0
- package/chunks/chunk-334MFRHI.js +56 -0
- package/chunks/chunk-33YK4WOA.js +18 -0
- package/chunks/chunk-3KN4IIQU.js +23 -0
- package/chunks/chunk-3LAWRHHB.js +23 -0
- package/chunks/chunk-3XNFVOJF.js +20 -0
- package/chunks/chunk-45WKBXSF.js +39 -0
- package/chunks/chunk-4TGRV2AB.js +18 -0
- package/chunks/chunk-4WZEYD3R.js +56 -0
- package/chunks/chunk-5GBYBDYQ.js +36 -0
- package/chunks/chunk-5JNJVGDX.js +20 -0
- package/chunks/chunk-5SWBMXLR.js +98 -0
- package/chunks/chunk-5TRAENM3.js +31 -0
- package/chunks/chunk-6HPXM6ED.js +20 -0
- package/chunks/chunk-76QORXDC.js +19 -0
- package/chunks/chunk-7BCQCDGQ.js +31 -0
- package/chunks/chunk-7FJKDVBE.js +49 -0
- package/chunks/chunk-7KCMLH6B.js +22 -0
- package/chunks/chunk-ADTQQNIQ.js +47 -0
- package/chunks/chunk-AMXIZUFB.js +16 -0
- package/chunks/chunk-AWVQJNGX.js +101 -0
- package/chunks/chunk-AZOSX3LU.js +191 -0
- package/chunks/chunk-BANYGSW4.js +20 -0
- package/chunks/chunk-BWXVJB4I.js +20 -0
- package/chunks/chunk-CP454IJD.js +231 -0
- package/chunks/chunk-CSZFW4R5.js +69 -0
- package/chunks/chunk-CYIUZX2T.js +31 -0
- package/chunks/chunk-DEQ5N53D.js +21 -0
- package/chunks/chunk-E7J4E6OB.js +65 -0
- package/chunks/chunk-EA4L7AGZ.js +48 -0
- package/chunks/chunk-FAXNZG5C.js +10 -0
- package/chunks/chunk-FMRPJBUC.js +20 -0
- package/chunks/chunk-FTT6ZCCS.js +29 -0
- package/chunks/chunk-GCHQD7MH.js +63 -0
- package/chunks/chunk-GXICX4F6.js +31 -0
- package/chunks/chunk-H73SGDQI.js +20 -0
- package/chunks/chunk-H7LDIXVY.js +48 -0
- package/chunks/chunk-HDK7W7GS.js +20 -0
- package/chunks/chunk-HUC2IRGW.js +205 -0
- package/chunks/chunk-IARWH6LC.js +34 -0
- package/chunks/chunk-IJAFLBHD.js +16 -0
- package/chunks/chunk-JBSS64SA.js +6 -0
- package/chunks/chunk-JBZR6R5B.js +15 -0
- package/chunks/chunk-JRYI4VBX.js +22 -0
- package/chunks/chunk-KFMYB672.js +31 -0
- package/chunks/chunk-LOAOXFA2.js +2369 -0
- package/chunks/chunk-LOY7C5BP.js +151 -0
- package/chunks/chunk-MAE5XZGF.js +37 -0
- package/chunks/chunk-MB7HWF22.js +23 -0
- package/chunks/chunk-MFWKY3DT.js +32 -0
- package/chunks/chunk-MOBGB2PH.js +54 -0
- package/chunks/chunk-MOVLLUDL.js +25 -0
- package/chunks/chunk-MTGZYBK2.js +129 -0
- package/chunks/chunk-MV2LDBDF.js +164 -0
- package/chunks/chunk-MVNQWIVH.js +151 -0
- package/chunks/chunk-MZZOFFFT.js +21 -0
- package/chunks/chunk-NA3M6VUU.js +20 -0
- package/chunks/chunk-NZLE2WMY.js +35 -0
- package/chunks/chunk-O7UEQQ6H.js +49 -0
- package/chunks/chunk-OCM3RLO6.js +73 -0
- package/chunks/chunk-OPU4CANL.js +35 -0
- package/chunks/chunk-OSZ4BWDE.js +32 -0
- package/chunks/chunk-OUJTDMHK.js +16 -0
- package/chunks/chunk-OWCPJD6O.js +16 -0
- package/chunks/chunk-PEUWFUEZ.js +98 -0
- package/chunks/chunk-PXRLKO5Y.js +23 -0
- package/chunks/chunk-QAE3OWOI.js +79 -0
- package/chunks/chunk-QLC3A6PC.js +17 -0
- package/chunks/chunk-QUDIXNB2.js +18 -0
- package/chunks/chunk-RGGOIE34.js +20 -0
- package/chunks/chunk-RLTBF5FT.js +23 -0
- package/chunks/chunk-RPWYARS3.js +18 -0
- package/chunks/chunk-RVZ32GPI.js +55 -0
- package/chunks/chunk-S2PB2PLY.js +191 -0
- package/chunks/chunk-SC54OKBX.js +43 -0
- package/chunks/chunk-SJFY537W.js +84 -0
- package/chunks/chunk-SNRRHDIZ.js +31 -0
- package/chunks/chunk-SZQHLC4K.js +31 -0
- package/chunks/chunk-T55QIYYV.js +32 -0
- package/chunks/chunk-TXGV4KJD.js +31 -0
- package/chunks/chunk-U57Q62IN.js +23 -0
- package/chunks/chunk-U7CF7IDN.js +35 -0
- package/chunks/chunk-UUSZJMJB.js +37 -0
- package/chunks/chunk-V4S34MIM.js +32 -0
- package/chunks/chunk-VHAGPTVR.js +37 -0
- package/chunks/chunk-WLGIDY6A.js +2456 -0
- package/chunks/chunk-WMSE5GRO.js +63 -0
- package/chunks/chunk-WU3JQC7W.js +164 -0
- package/chunks/chunk-XEAHMN2T.js +4063 -0
- package/chunks/chunk-XF5QBETN.js +48 -0
- package/chunks/chunk-XN44EWRS.js +21 -0
- package/chunks/chunk-XSVBWVVC.js +20 -0
- package/chunks/chunk-XZ7II65Z.js +31 -0
- package/chunks/chunk-YLKBLE6G.js +30 -0
- package/chunks/chunk-YRQ7LODK.js +177 -0
- package/chunks/chunk-YVLJKJV2.js +17 -0
- package/chunks/chunk-YW5ASSIQ.js +31 -0
- package/chunks/chunk-YXJXNTCV.js +65 -0
- package/chunks/chunk-YYA5VRE4.js +177 -0
- package/chunks/chunk-ZRWVPWQC.js +36 -0
- package/chunks/chunk-ZZH6RUS3.js +48 -0
- package/components/Comp/index.js +1 -1
- package/node/@aws-s3/index.js +5 -5
- package/node/@aws-s3/storage/file/download/index.js +2 -2
- package/node/@aws-s3/storage/file/index.js +6 -6
- package/node/@aws-s3/storage/file/upload/index.js +2 -2
- package/node/@aws-s3/storage/index.js +5 -5
- package/node/@design-edito/index.js +2 -7
- package/node/@design-edito/thumbnails/index.d.ts +1 -5
- package/node/@design-edito/thumbnails/index.js +1 -20
- package/node/@express/@multer/index.js +2 -2
- package/node/@express/index.js +2 -2
- package/node/@google-cloud/index.js +17 -17
- package/node/@google-cloud/storage/bucket/get-metadata/index.js +2 -2
- package/node/@google-cloud/storage/bucket/index.js +6 -6
- package/node/@google-cloud/storage/bucket/list/index.js +2 -2
- package/node/@google-cloud/storage/file/copy/index.js +2 -2
- package/node/@google-cloud/storage/file/download/index.js +2 -2
- package/node/@google-cloud/storage/file/erase/index.js +2 -2
- package/node/@google-cloud/storage/file/exists/index.js +2 -2
- package/node/@google-cloud/storage/file/generate-signed-url/index.js +2 -2
- package/node/@google-cloud/storage/file/get-metadata/index.js +2 -2
- package/node/@google-cloud/storage/file/get-permissions/index.js +2 -2
- package/node/@google-cloud/storage/file/index.js +23 -23
- package/node/@google-cloud/storage/file/move/index.js +2 -2
- package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +5 -5
- package/node/@google-cloud/storage/file/update-metadata/index.js +2 -2
- package/node/@google-cloud/storage/file/upload/index.js +2 -2
- package/node/@google-cloud/storage/index.js +19 -19
- package/node/cloud-storage/client/index.js +3 -3
- package/node/cloud-storage/credentials/index.js +2 -2
- package/node/cloud-storage/endpoint/index.js +2 -2
- package/node/cloud-storage/index.js +15 -15
- package/node/cloud-storage/operations/download/index.js +7 -7
- package/node/cloud-storage/operations/index.js +15 -15
- package/node/cloud-storage/operations/upload/index.js +7 -7
- package/node/encryption/@aes-256-gcm/buffer/index.js +3 -3
- package/node/encryption/@aes-256-gcm/index.js +4 -4
- package/node/encryption/@aes-256-gcm/uint8-array/index.js +2 -2
- package/node/encryption/index.js +7 -7
- package/node/encryption/key/index.js +2 -2
- package/node/files/index.js +4 -4
- package/node/files/is-in-directory/index.js +1 -1
- package/node/files/read-write/index.js +1 -1
- package/node/files/subpaths/index.js +1 -1
- package/node/ftps/file/download/index.js +2 -2
- package/node/ftps/file/index.js +6 -6
- package/node/ftps/file/upload/index.js +2 -2
- package/node/ftps/index.js +4 -4
- package/node/images/format/index.d.ts +52 -0
- package/node/images/format/index.js +27 -0
- package/node/images/index.d.ts +1 -1
- package/node/images/index.js +50 -17
- package/node/images/prepare/index.d.ts +11 -4
- package/node/images/prepare/index.js +50 -15
- package/node/images/transform/_utils/color-schema/index.d.ts +3 -0
- package/node/images/transform/_utils/color-schema/index.js +8 -0
- package/node/images/transform/_utils/operation-names/index.d.ts +20 -0
- package/node/images/transform/_utils/operation-names/index.js +7 -0
- package/node/images/transform/_utils/positions/index.d.ts +33 -0
- package/node/images/transform/_utils/positions/index.js +10 -0
- package/node/images/transform/blur/index.d.ts +10 -0
- package/node/images/transform/blur/index.js +9 -0
- package/node/images/transform/brighten/index.d.ts +8 -0
- package/node/images/transform/brighten/index.js +9 -0
- package/node/images/transform/compose/index.d.ts +38 -0
- package/node/images/transform/compose/index.js +11 -0
- package/node/images/transform/extend/index.d.ts +16 -0
- package/node/images/transform/extend/index.js +10 -0
- package/node/images/transform/extract/index.d.ts +13 -0
- package/node/images/transform/extract/index.js +9 -0
- package/node/images/transform/flatten/index.d.ts +11 -0
- package/node/images/transform/flatten/index.js +10 -0
- package/node/images/transform/flip/index.d.ts +10 -0
- package/node/images/transform/flip/index.js +9 -0
- package/node/images/transform/flop/index.d.ts +10 -0
- package/node/images/transform/flop/index.js +9 -0
- package/node/images/transform/frame/backgrounds/create-line-background/index.d.ts +155 -0
- package/node/images/transform/frame/backgrounds/create-line-background/index.js +10 -0
- package/node/images/transform/frame/backgrounds/create-tile-background/index.d.ts +106 -0
- package/node/images/transform/frame/backgrounds/create-tile-background/index.js +10 -0
- package/node/images/transform/frame/index.d.ts +44 -0
- package/node/images/transform/frame/index.js +13 -0
- package/node/images/transform/hue-rotate/index.d.ts +8 -0
- package/node/images/transform/hue-rotate/index.js +9 -0
- package/node/images/transform/index.d.ts +24 -6
- package/node/images/transform/index.js +52 -15
- package/node/images/transform/lighten/index.d.ts +8 -0
- package/node/images/transform/lighten/index.js +9 -0
- package/node/images/transform/lineate-levels/index.d.ts +11 -0
- package/node/images/transform/lineate-levels/index.js +9 -0
- package/node/images/transform/modulate/index.d.ts +13 -0
- package/node/images/transform/modulate/index.js +9 -0
- package/node/images/transform/normalize/index.d.ts +11 -0
- package/node/images/transform/normalize/index.js +9 -0
- package/node/images/transform/operations/_utils/compose/index.d.ts +3 -0
- package/node/images/transform/operations/_utils/compose/index.js +8 -0
- package/node/images/transform/operations/_utils/frame/backgrounds/create-line-background/index.d.ts +6 -0
- package/node/images/transform/operations/_utils/frame/backgrounds/create-line-background/index.js +12 -0
- package/node/images/transform/operations/_utils/frame/backgrounds/create-tile-background/index.d.ts +14 -0
- package/node/images/transform/operations/_utils/frame/backgrounds/create-tile-background/index.js +14 -0
- package/node/images/transform/operations/_utils/frame/create-color-palette/index.d.ts +11 -0
- package/node/images/transform/operations/_utils/frame/create-color-palette/index.js +17 -0
- package/node/images/transform/operations/_utils/frame/extract-colors-from-image/index.d.ts +10 -0
- package/node/images/transform/operations/_utils/frame/extract-colors-from-image/index.js +11 -0
- package/node/images/transform/operations/_utils/frame/index.d.ts +7 -0
- package/node/images/transform/operations/_utils/frame/index.js +24 -0
- package/node/images/transform/operations/_utils/positions/index.d.ts +16 -0
- package/node/images/transform/operations/_utils/positions/index.js +11 -0
- package/node/images/transform/operations/_utils/scale/index.d.ts +3 -0
- package/node/images/transform/operations/_utils/scale/index.js +7 -0
- package/node/images/transform/operations/index.d.ts +0 -207
- package/node/images/transform/operations/index.js +0 -21
- package/node/images/transform/resize/index.d.ts +16 -0
- package/node/images/transform/resize/index.js +10 -0
- package/node/images/transform/rotate/index.d.ts +9 -0
- package/node/images/transform/rotate/index.js +9 -0
- package/node/images/transform/saturate/index.d.ts +8 -0
- package/node/images/transform/saturate/index.js +9 -0
- package/node/images/transform/scale/index.d.ts +13 -0
- package/node/images/transform/scale/index.js +10 -0
- package/node/process/index.js +1 -1
- package/node/process/on-exit/index.js +1 -1
- package/node/sftp/file/download/index.js +2 -2
- package/node/sftp/file/index.js +6 -6
- package/node/sftp/file/upload/index.js +2 -2
- package/node/sftp/index.js +4 -4
- package/package.json +3 -2
@@ -0,0 +1,231 @@
|
|
1
|
+
import {
|
2
|
+
Transitions
|
3
|
+
} from "./chunk-ENMBK6H7.js";
|
4
|
+
import {
|
5
|
+
clamp
|
6
|
+
} from "./chunk-OSAXBA7G.js";
|
7
|
+
import {
|
8
|
+
randomInt
|
9
|
+
} from "./chunk-D3ERTRDW.js";
|
10
|
+
import {
|
11
|
+
shuffle
|
12
|
+
} from "./chunk-VJJIYJMY.js";
|
13
|
+
|
14
|
+
// src/node/images/transform/operations/_utils/frame/backgrounds/create-tile-background/index.ts
|
15
|
+
var DEFAULT_CREATE_BACKGROUND_TILE_PARAMS = {
|
16
|
+
coverageRatio: 0.5,
|
17
|
+
densityA: { min: 0, max: 0 },
|
18
|
+
densityB: { min: 0, max: 0 },
|
19
|
+
format: "random",
|
20
|
+
xEasing: "linear",
|
21
|
+
yEasing: "linear"
|
22
|
+
};
|
23
|
+
async function createTileBackground(background, dimensions, imageCoordinates, colorPalette) {
|
24
|
+
background = {
|
25
|
+
...background,
|
26
|
+
params: {
|
27
|
+
...DEFAULT_CREATE_BACKGROUND_TILE_PARAMS,
|
28
|
+
...background.params
|
29
|
+
}
|
30
|
+
};
|
31
|
+
const tileCoordinatesList = getPackedTilesCoordinatesList(
|
32
|
+
{
|
33
|
+
x: imageCoordinates.x,
|
34
|
+
y: imageCoordinates.y,
|
35
|
+
w: imageCoordinates.w,
|
36
|
+
h: imageCoordinates.h
|
37
|
+
},
|
38
|
+
dimensions,
|
39
|
+
background.params.coverageRatio,
|
40
|
+
{
|
41
|
+
A: background.params.densityA,
|
42
|
+
B: background.params.densityB
|
43
|
+
},
|
44
|
+
{
|
45
|
+
X: background.params.xEasing,
|
46
|
+
Y: background.params.yEasing
|
47
|
+
},
|
48
|
+
background.params.format
|
49
|
+
);
|
50
|
+
return createSharpOverlaysFromCoordinatesList(
|
51
|
+
tileCoordinatesList,
|
52
|
+
colorPalette
|
53
|
+
);
|
54
|
+
}
|
55
|
+
function getPackedTilesCoordinatesList(coordinatesToAvoid, dimensions, tileCoverageRatio, tileDensity, tileEasing, tileFormat) {
|
56
|
+
const areaCoordinatesList = [];
|
57
|
+
const baseFormat = {
|
58
|
+
nbCells: 9,
|
59
|
+
cellAvoidIndex: 4,
|
60
|
+
nbRows: 3,
|
61
|
+
nbColumns: 3
|
62
|
+
};
|
63
|
+
const positionsToAvoid = {
|
64
|
+
top: Math.ceil(coordinatesToAvoid.y),
|
65
|
+
bottom: Math.ceil(coordinatesToAvoid.y + coordinatesToAvoid.h),
|
66
|
+
left: Math.ceil(coordinatesToAvoid.x),
|
67
|
+
right: Math.ceil(coordinatesToAvoid.x + coordinatesToAvoid.w)
|
68
|
+
};
|
69
|
+
for (let i = 0; i < baseFormat.nbCells; i++) {
|
70
|
+
if (i === baseFormat.cellAvoidIndex) {
|
71
|
+
continue;
|
72
|
+
}
|
73
|
+
const middleColumn = i % baseFormat.nbColumns === 1;
|
74
|
+
const rightColumn = i % baseFormat.nbColumns === 2;
|
75
|
+
const topRow = i < baseFormat.nbRows;
|
76
|
+
const middleRow = !topRow && i < baseFormat.nbRows * 2;
|
77
|
+
const bottomRow = !topRow && !middleRow;
|
78
|
+
areaCoordinatesList[i] = { x: 0, y: 0, w: positionsToAvoid.left, h: positionsToAvoid.top };
|
79
|
+
if (middleColumn) {
|
80
|
+
areaCoordinatesList[i].x = positionsToAvoid.left;
|
81
|
+
areaCoordinatesList[i].w = coordinatesToAvoid.w;
|
82
|
+
}
|
83
|
+
if (rightColumn) {
|
84
|
+
areaCoordinatesList[i].x = positionsToAvoid.right;
|
85
|
+
}
|
86
|
+
if (middleRow) {
|
87
|
+
areaCoordinatesList[i].y = positionsToAvoid.top;
|
88
|
+
areaCoordinatesList[i].h = coordinatesToAvoid.h;
|
89
|
+
}
|
90
|
+
if (bottomRow) {
|
91
|
+
areaCoordinatesList[i].y = positionsToAvoid.bottom;
|
92
|
+
areaCoordinatesList[i].h = dimensions.heightPx - positionsToAvoid.bottom;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
const filteredAreaCoordinatesList = shuffle(areaCoordinatesList.filter((areaCoordinate) => areaCoordinate.w !== 0 && areaCoordinate.h !== 0));
|
96
|
+
const subTiles = [];
|
97
|
+
const nbAreas = filteredAreaCoordinatesList.length;
|
98
|
+
const nbAreasToCover = Math.round(nbAreas * tileCoverageRatio);
|
99
|
+
if (tileDensity.A.min > 1 || tileDensity.A.max > 1 || tileDensity.B.min > 1 || tileDensity.B.max > 1) {
|
100
|
+
filteredAreaCoordinatesList.forEach((areaCoordinates, index) => {
|
101
|
+
if (index > nbAreasToCover) {
|
102
|
+
subTiles.push(areaCoordinates);
|
103
|
+
return;
|
104
|
+
}
|
105
|
+
const { nbRows, nbColumns } = getNbRowsAndColumnsForFormat(
|
106
|
+
randomInt(tileDensity.A.min, tileDensity.A.max) || 0,
|
107
|
+
randomInt(tileDensity.B.min, tileDensity.B.max) || 0,
|
108
|
+
{ widthPx: areaCoordinates.w, heightPx: areaCoordinates.h },
|
109
|
+
tileFormat
|
110
|
+
);
|
111
|
+
const XEasingFunc = (tileEasing.X && tileEasing.X in Transitions.easings ? Transitions.easings[tileEasing.X] : Transitions.easings.linear) || function(x) {
|
112
|
+
return x;
|
113
|
+
};
|
114
|
+
const YEasingFunc = (tileEasing.Y in Transitions.easings ? Transitions.easings[tileEasing.Y] : Transitions.easings.linear) || function(x) {
|
115
|
+
return x;
|
116
|
+
};
|
117
|
+
const tiles = [];
|
118
|
+
for (let i = 0; i < nbRows; i++) {
|
119
|
+
for (let j = 0; j < nbColumns; j++) {
|
120
|
+
const columnI = j;
|
121
|
+
const rowI = i;
|
122
|
+
const x = Math.ceil(areaCoordinates.w * XEasingFunc(columnI / nbColumns));
|
123
|
+
const y = Math.ceil(areaCoordinates.h * YEasingFunc(rowI / nbRows));
|
124
|
+
tiles.push({
|
125
|
+
x: areaCoordinates.x + x,
|
126
|
+
y: areaCoordinates.y + y
|
127
|
+
});
|
128
|
+
}
|
129
|
+
}
|
130
|
+
const nbTiles = tiles.length;
|
131
|
+
tiles.forEach((subTileCoord, i) => {
|
132
|
+
const tileNum = i + 1;
|
133
|
+
const nextTileX = tileNum % nbColumns > 0 ? tiles[i + 1] : null;
|
134
|
+
const nextTileY = i + nbColumns < nbTiles ? tiles[i + nbColumns] : null;
|
135
|
+
const subTileBounds = {
|
136
|
+
x: nextTileX ? nextTileX.x : areaCoordinates.x + areaCoordinates.w,
|
137
|
+
y: nextTileY ? nextTileY.y : areaCoordinates.y + areaCoordinates.h
|
138
|
+
};
|
139
|
+
subTiles.push({
|
140
|
+
x: subTileCoord.x,
|
141
|
+
y: subTileCoord.y,
|
142
|
+
w: subTileBounds.x - subTileCoord.x,
|
143
|
+
h: subTileBounds.y - subTileCoord.y
|
144
|
+
});
|
145
|
+
});
|
146
|
+
});
|
147
|
+
}
|
148
|
+
return (subTiles.length ? subTiles : filteredAreaCoordinatesList).map((tile) => ({
|
149
|
+
w: clamp(tile.w, 0, dimensions.widthPx),
|
150
|
+
h: clamp(tile.h, 0, dimensions.heightPx),
|
151
|
+
x: clamp(tile.x, 0, dimensions.widthPx),
|
152
|
+
y: clamp(tile.y, 0, dimensions.heightPx)
|
153
|
+
})).filter((tile) => tile.w > 0 && tile.h > 0);
|
154
|
+
}
|
155
|
+
function getNbRowsAndColumnsForFormat(tileDensityA, tileDensityB, tileDimensions, tileFormat) {
|
156
|
+
switch (tileFormat) {
|
157
|
+
case "random":
|
158
|
+
const random = Math.random() > Math.random();
|
159
|
+
return {
|
160
|
+
nbRows: random ? tileDensityA : tileDensityB,
|
161
|
+
nbColumns: random ? tileDensityB : tileDensityA
|
162
|
+
};
|
163
|
+
case "portrait":
|
164
|
+
return {
|
165
|
+
nbRows: tileDensityA,
|
166
|
+
nbColumns: tileDensityB
|
167
|
+
};
|
168
|
+
case "landscape":
|
169
|
+
return {
|
170
|
+
nbRows: tileDensityB,
|
171
|
+
nbColumns: tileDensityA
|
172
|
+
};
|
173
|
+
default:
|
174
|
+
return {
|
175
|
+
nbRows: tileDimensions.widthPx > tileDimensions.heightPx ? tileDensityA : tileDensityB,
|
176
|
+
nbColumns: tileDimensions.widthPx > tileDimensions.heightPx ? tileDensityB : tileDensityA
|
177
|
+
};
|
178
|
+
}
|
179
|
+
}
|
180
|
+
function createSharpOverlaysFromCoordinatesList(tileCoordinatesList, colorPalette) {
|
181
|
+
let usedColorsIndexes = [];
|
182
|
+
const colorPaletteLength = colorPalette.length;
|
183
|
+
const getRGBColor = () => {
|
184
|
+
const getUnusedColorIndex = () => {
|
185
|
+
const paletteIndex = randomInt(0, colorPaletteLength) || 0;
|
186
|
+
resetUnusedColorIndexesIfNeeded();
|
187
|
+
if (usedColorsIndexes.includes(paletteIndex)) {
|
188
|
+
return getUnusedColorIndex();
|
189
|
+
}
|
190
|
+
usedColorsIndexes.push(paletteIndex);
|
191
|
+
return paletteIndex;
|
192
|
+
};
|
193
|
+
const resetUnusedColorIndexesIfNeeded = () => {
|
194
|
+
if (usedColorsIndexes.length !== colorPaletteLength) {
|
195
|
+
return;
|
196
|
+
}
|
197
|
+
usedColorsIndexes = [];
|
198
|
+
};
|
199
|
+
const colorPaletteIndex = getUnusedColorIndex();
|
200
|
+
const RGBColor = colorPalette[colorPaletteIndex];
|
201
|
+
if (!RGBColor) {
|
202
|
+
return [0, 0, 0];
|
203
|
+
}
|
204
|
+
return RGBColor;
|
205
|
+
};
|
206
|
+
return tileCoordinatesList.map((tileCoordinates) => {
|
207
|
+
const RGBColor = getRGBColor();
|
208
|
+
return {
|
209
|
+
top: Math.floor(tileCoordinates.y),
|
210
|
+
left: Math.floor(tileCoordinates.x),
|
211
|
+
input: {
|
212
|
+
create: {
|
213
|
+
width: Math.round(tileCoordinates.w),
|
214
|
+
height: Math.round(tileCoordinates.h),
|
215
|
+
channels: 4,
|
216
|
+
background: {
|
217
|
+
r: RGBColor[0],
|
218
|
+
g: RGBColor[1],
|
219
|
+
b: RGBColor[2],
|
220
|
+
alpha: 1
|
221
|
+
}
|
222
|
+
}
|
223
|
+
}
|
224
|
+
};
|
225
|
+
});
|
226
|
+
}
|
227
|
+
|
228
|
+
export {
|
229
|
+
DEFAULT_CREATE_BACKGROUND_TILE_PARAMS,
|
230
|
+
createTileBackground
|
231
|
+
};
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import {
|
2
|
+
createLineBackgroundSchema
|
3
|
+
} from "./chunk-YLKBLE6G.js";
|
4
|
+
import {
|
5
|
+
createTileBackgroundSchema
|
6
|
+
} from "./chunk-YXJXNTCV.js";
|
7
|
+
import {
|
8
|
+
positionsSchema
|
9
|
+
} from "./chunk-7KCMLH6B.js";
|
10
|
+
import {
|
11
|
+
colorSchema
|
12
|
+
} from "./chunk-JBZR6R5B.js";
|
13
|
+
import {
|
14
|
+
z
|
15
|
+
} from "./chunk-XEAHMN2T.js";
|
16
|
+
import {
|
17
|
+
OperationNames
|
18
|
+
} from "./chunk-MOVLLUDL.js";
|
19
|
+
|
20
|
+
// src/node/images/transform/frame/index.tsx
|
21
|
+
var createBackgroundOptionsSchema = {
|
22
|
+
colorPalette: z.optional(z.object({
|
23
|
+
extract: z.optional(z.object({
|
24
|
+
nbColor: z.number()
|
25
|
+
})),
|
26
|
+
use: z.optional(z.object({
|
27
|
+
RGBColors: z.array(z.tuple([z.number(), z.number(), z.number()]))
|
28
|
+
})),
|
29
|
+
densify: z.optional(z.object({
|
30
|
+
types: z.array(z.enum([
|
31
|
+
"default",
|
32
|
+
"default-lighten",
|
33
|
+
"default-saturate",
|
34
|
+
"complementary",
|
35
|
+
"complementary-lighten",
|
36
|
+
"complementary-saturate"
|
37
|
+
])),
|
38
|
+
ligthenIntensity: z.optional(z.number()),
|
39
|
+
saturateIntensity: z.optional(z.number())
|
40
|
+
})),
|
41
|
+
compose: z.optional(z.object({
|
42
|
+
nbColor: z.optional(z.number()),
|
43
|
+
mix: z.optional(z.boolean())
|
44
|
+
}))
|
45
|
+
}))
|
46
|
+
};
|
47
|
+
var frameSchema = z.object({
|
48
|
+
name: z.literal(OperationNames.Frame),
|
49
|
+
params: z.object({
|
50
|
+
dimensions: z.object({
|
51
|
+
widthPx: z.number().min(0),
|
52
|
+
heightPx: z.number().min(0)
|
53
|
+
}),
|
54
|
+
imageScale: z.object({
|
55
|
+
xRatio: z.optional(z.number().min(0).max(1)),
|
56
|
+
yRatio: z.optional(z.number().min(0).max(1))
|
57
|
+
}).optional(),
|
58
|
+
positions: positionsSchema,
|
59
|
+
background: z.union([
|
60
|
+
colorSchema,
|
61
|
+
createLineBackgroundSchema.extend(createBackgroundOptionsSchema),
|
62
|
+
createTileBackgroundSchema.extend(createBackgroundOptionsSchema)
|
63
|
+
])
|
64
|
+
})
|
65
|
+
});
|
66
|
+
|
67
|
+
export {
|
68
|
+
frameSchema
|
69
|
+
};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import {
|
2
|
+
colorSchema
|
3
|
+
} from "./chunk-JBZR6R5B.js";
|
4
|
+
import {
|
5
|
+
z
|
6
|
+
} from "./chunk-XEAHMN2T.js";
|
7
|
+
import {
|
8
|
+
OperationNames
|
9
|
+
} from "./chunk-MOVLLUDL.js";
|
10
|
+
|
11
|
+
// src/node/images/transform/extend/index.ts
|
12
|
+
var extendSchema = z.object({
|
13
|
+
name: z.literal(OperationNames.Extend),
|
14
|
+
params: z.object({
|
15
|
+
top: z.number(),
|
16
|
+
left: z.number(),
|
17
|
+
right: z.number(),
|
18
|
+
bottom: z.number(),
|
19
|
+
background: colorSchema,
|
20
|
+
extendWith: z.optional(z.enum([
|
21
|
+
"background",
|
22
|
+
"copy",
|
23
|
+
"repeat",
|
24
|
+
"mirror"
|
25
|
+
]))
|
26
|
+
})
|
27
|
+
});
|
28
|
+
|
29
|
+
export {
|
30
|
+
extendSchema
|
31
|
+
};
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import {
|
2
|
+
z
|
3
|
+
} from "./chunk-XEAHMN2T.js";
|
4
|
+
import {
|
5
|
+
OperationNames
|
6
|
+
} from "./chunk-MOVLLUDL.js";
|
7
|
+
|
8
|
+
// src/node/images/transform/extract/index.ts
|
9
|
+
var extractSchema = z.object({
|
10
|
+
name: z.literal(OperationNames.Extract),
|
11
|
+
params: z.object({
|
12
|
+
width: z.number(),
|
13
|
+
height: z.number(),
|
14
|
+
left: z.number(),
|
15
|
+
top: z.number()
|
16
|
+
})
|
17
|
+
});
|
18
|
+
|
19
|
+
export {
|
20
|
+
extractSchema
|
21
|
+
};
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import {
|
2
|
+
isNonNullObject
|
3
|
+
} from "./chunk-HQLRJ7XW.js";
|
4
|
+
import {
|
5
|
+
__export
|
6
|
+
} from "./chunk-NZLE2WMY.js";
|
7
|
+
|
8
|
+
// src/node/cloud-storage/credentials/index.ts
|
9
|
+
var credentials_exports = {};
|
10
|
+
__export(credentials_exports, {
|
11
|
+
isCredentials: () => isCredentials,
|
12
|
+
isFtpCredentials: () => isFtpCredentials,
|
13
|
+
isFtpsCredentials: () => isFtpsCredentials,
|
14
|
+
isGcsBucketCredentials: () => isGcsBucketCredentials,
|
15
|
+
isS3BucketCredentials: () => isS3BucketCredentials,
|
16
|
+
isSftpCredentials: () => isSftpCredentials
|
17
|
+
});
|
18
|
+
function isGcsBucketCredentials(unknownObject) {
|
19
|
+
if (!isNonNullObject(unknownObject)) return false;
|
20
|
+
if ("client_email" in unknownObject && typeof unknownObject.client_email === "string" && "private_key" in unknownObject && typeof unknownObject.private_key === "string" && "project_id" in unknownObject && typeof unknownObject.project_id === "string") return true;
|
21
|
+
return false;
|
22
|
+
}
|
23
|
+
function isS3BucketCredentials(unknownObject) {
|
24
|
+
if (!isNonNullObject(unknownObject)) return false;
|
25
|
+
if ("accessKeyId" in unknownObject && typeof unknownObject.accessKeyId === "string" && "secretAccessKey" in unknownObject && typeof unknownObject.secretAccessKey === "string") {
|
26
|
+
if ("region" in unknownObject && typeof unknownObject.region === "string") return true;
|
27
|
+
if (!("region" in unknownObject)) return true;
|
28
|
+
return false;
|
29
|
+
}
|
30
|
+
return false;
|
31
|
+
}
|
32
|
+
function isFtpCredentials(unknownObject) {
|
33
|
+
if (!isNonNullObject(unknownObject)) return false;
|
34
|
+
if ("host" in unknownObject && typeof unknownObject.host === "string" && "port" in unknownObject && typeof unknownObject.port === "number" && "username" in unknownObject && typeof unknownObject.username === "string" && "password" in unknownObject && typeof unknownObject.password === "string") return true;
|
35
|
+
return false;
|
36
|
+
}
|
37
|
+
function isFtpsCredentials(unknownObject) {
|
38
|
+
if (!isNonNullObject(unknownObject)) return false;
|
39
|
+
if ("host" in unknownObject && typeof unknownObject.host === "string" && "port" in unknownObject && typeof unknownObject.port === "number" && "username" in unknownObject && typeof unknownObject.username === "string" && "password" in unknownObject && typeof unknownObject.password === "string") return true;
|
40
|
+
return false;
|
41
|
+
}
|
42
|
+
function isSftpCredentials(unknownObject) {
|
43
|
+
if (!isNonNullObject(unknownObject)) return false;
|
44
|
+
if ("host" in unknownObject && typeof unknownObject.host === "string" && "port" in unknownObject && typeof unknownObject.port === "number" && "username" in unknownObject && typeof unknownObject.username === "string") {
|
45
|
+
const { password, privateKey, passphrase } = unknownObject;
|
46
|
+
if (typeof password !== "string" && password !== void 0) return false;
|
47
|
+
if (typeof privateKey !== "string" && privateKey !== void 0) return false;
|
48
|
+
if (typeof passphrase !== "string" && passphrase !== void 0) return false;
|
49
|
+
return true;
|
50
|
+
}
|
51
|
+
return false;
|
52
|
+
}
|
53
|
+
function isCredentials(unknownObject) {
|
54
|
+
return isGcsBucketCredentials(unknownObject) || isS3BucketCredentials(unknownObject) || isFtpCredentials(unknownObject) || isFtpsCredentials(unknownObject) || isSftpCredentials(unknownObject);
|
55
|
+
}
|
56
|
+
|
57
|
+
export {
|
58
|
+
isGcsBucketCredentials,
|
59
|
+
isS3BucketCredentials,
|
60
|
+
isFtpCredentials,
|
61
|
+
isFtpsCredentials,
|
62
|
+
isSftpCredentials,
|
63
|
+
isCredentials,
|
64
|
+
credentials_exports
|
65
|
+
};
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import {
|
2
|
+
upload as upload2
|
3
|
+
} from "./chunk-7FJKDVBE.js";
|
4
|
+
import {
|
5
|
+
upload as upload3
|
6
|
+
} from "./chunk-O7UEQQ6H.js";
|
7
|
+
import {
|
8
|
+
s3IdentifierData
|
9
|
+
} from "./chunk-MOBGB2PH.js";
|
10
|
+
import {
|
11
|
+
upload as upload4
|
12
|
+
} from "./chunk-45WKBXSF.js";
|
13
|
+
import {
|
14
|
+
upload
|
15
|
+
} from "./chunk-ADTQQNIQ.js";
|
16
|
+
import {
|
17
|
+
Outcome
|
18
|
+
} from "./chunk-JMU5PDBD.js";
|
19
|
+
import {
|
20
|
+
__export
|
21
|
+
} from "./chunk-NZLE2WMY.js";
|
22
|
+
|
23
|
+
// src/node/cloud-storage/operations/upload/index.ts
|
24
|
+
var upload_exports = {};
|
25
|
+
__export(upload_exports, {
|
26
|
+
upload: () => upload5
|
27
|
+
});
|
28
|
+
import { Bucket } from "@google-cloud/storage";
|
29
|
+
import { S3 } from "aws-sdk";
|
30
|
+
import { Client as FtpClient } from "basic-ftp";
|
31
|
+
import SftpClient from "ssh2-sftp-client";
|
32
|
+
async function upload5(fileReadable, targetPath, endpointType, endpointIdentifier, client) {
|
33
|
+
if (endpointType === "gcs-bucket" /* GCS */ && client instanceof Bucket) return await upload2(fileReadable, targetPath, client);
|
34
|
+
if (endpointType === "s3-bucket" /* S3 */ && client instanceof S3) {
|
35
|
+
const { bucketName } = s3IdentifierData(endpointIdentifier);
|
36
|
+
if (bucketName === null) return Outcome.makeFailure("Invalid S3 bucket name");
|
37
|
+
return await upload3(fileReadable, targetPath, bucketName, client);
|
38
|
+
}
|
39
|
+
if (endpointType === "ftp" /* FTP */ && client instanceof FtpClient) return await upload(fileReadable, targetPath, client);
|
40
|
+
if (endpointType === "ftps" /* FTPS */ && client instanceof FtpClient) return await upload(fileReadable, targetPath, client);
|
41
|
+
if (endpointType === "sftp" /* SFTP */ && client instanceof SftpClient) return await upload4(fileReadable, targetPath, client);
|
42
|
+
return Outcome.makeFailure("Invalid endpoint or client type");
|
43
|
+
}
|
44
|
+
|
45
|
+
export {
|
46
|
+
upload5 as upload,
|
47
|
+
upload_exports
|
48
|
+
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
// src/agnostic/colors/hex-to-rgb/index.ts
|
2
|
+
function HEXToRGB(hexColor) {
|
3
|
+
hexColor = hexColor.replace("#", "");
|
4
|
+
const r = Math.max(0, Math.min(255, parseInt(hexColor.substring(0, 2), 16))), g = Math.max(0, Math.min(255, parseInt(hexColor.substring(2, 4), 16))), b = Math.max(0, Math.min(255, parseInt(hexColor.substring(4, 6), 16)));
|
5
|
+
return [r, g, b];
|
6
|
+
}
|
7
|
+
|
8
|
+
export {
|
9
|
+
HEXToRGB
|
10
|
+
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import {
|
2
|
+
download_exports
|
3
|
+
} from "./chunk-MFWKY3DT.js";
|
4
|
+
import {
|
5
|
+
upload_exports
|
6
|
+
} from "./chunk-ADTQQNIQ.js";
|
7
|
+
import {
|
8
|
+
__export
|
9
|
+
} from "./chunk-NZLE2WMY.js";
|
10
|
+
|
11
|
+
// src/node/ftps/file/index.ts
|
12
|
+
var file_exports = {};
|
13
|
+
__export(file_exports, {
|
14
|
+
Download: () => download_exports,
|
15
|
+
Upload: () => upload_exports
|
16
|
+
});
|
17
|
+
|
18
|
+
export {
|
19
|
+
file_exports
|
20
|
+
};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import {
|
2
|
+
Outcome
|
3
|
+
} from "./chunk-JMU5PDBD.js";
|
4
|
+
import {
|
5
|
+
unknownToString
|
6
|
+
} from "./chunk-FENXVJYO.js";
|
7
|
+
import {
|
8
|
+
__export
|
9
|
+
} from "./chunk-NZLE2WMY.js";
|
10
|
+
|
11
|
+
// src/node/@google-cloud/storage/bucket/get-metadata/index.ts
|
12
|
+
var get_metadata_exports = {};
|
13
|
+
__export(get_metadata_exports, {
|
14
|
+
getMetadata: () => getMetadata
|
15
|
+
});
|
16
|
+
async function getMetadata(bucket, options) {
|
17
|
+
try {
|
18
|
+
const [metadata] = await bucket.getMetadata(options);
|
19
|
+
return Outcome.makeSuccess(metadata);
|
20
|
+
} catch (err) {
|
21
|
+
const errStr = unknownToString(err);
|
22
|
+
return Outcome.makeFailure(errStr);
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
export {
|
27
|
+
getMetadata,
|
28
|
+
get_metadata_exports
|
29
|
+
};
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import {
|
2
|
+
saturateColor,
|
3
|
+
setColorSaturation
|
4
|
+
} from "./chunk-MB7HWF22.js";
|
5
|
+
import {
|
6
|
+
complementColor
|
7
|
+
} from "./chunk-2POD3TAX.js";
|
8
|
+
import {
|
9
|
+
lightenColor,
|
10
|
+
setColorLuminance
|
11
|
+
} from "./chunk-U57Q62IN.js";
|
12
|
+
|
13
|
+
// src/node/images/transform/operations/_utils/frame/backgrounds/create-line-background/index.ts
|
14
|
+
async function createLineBackground(background, dimensions, palette) {
|
15
|
+
const lineDimensions = {
|
16
|
+
widthPx: dimensions.widthPx,
|
17
|
+
heightPx: Math.round(dimensions.heightPx / background.params.nbLines)
|
18
|
+
};
|
19
|
+
const sharpOverlays = [];
|
20
|
+
const maxPaletteLength = palette.length;
|
21
|
+
const selectedColorIndex = background.params.colors.selectColorPaletteIndex === "first" ? 0 : background.params.colors.selectColorPaletteIndex === "last" ? palette.length - 1 : background.params.colors.selectColorPaletteIndex;
|
22
|
+
for (let i = 0; i < background.params.nbLines; i++) {
|
23
|
+
const indexPalette = Math.min(Math.max(0, selectedColorIndex), maxPaletteLength);
|
24
|
+
const RGBColor = palette[indexPalette] || [0, 0, 0];
|
25
|
+
const primaryRGBColor = applyColorTransformations(RGBColor, background.params.colors.primaryTransformations);
|
26
|
+
const secondaryRGBColor = applyColorTransformations(RGBColor, background.params.colors.secondaryTransformations);
|
27
|
+
const outputRGBColor = i % 2 === 0 ? primaryRGBColor : secondaryRGBColor;
|
28
|
+
const topPx = Math.min(lineDimensions.heightPx * i, dimensions.heightPx);
|
29
|
+
sharpOverlays.push({
|
30
|
+
input: {
|
31
|
+
create: {
|
32
|
+
width: lineDimensions.widthPx,
|
33
|
+
height: i === background.params.nbLines - 1 ? dimensions.heightPx - topPx : lineDimensions.heightPx,
|
34
|
+
channels: 4,
|
35
|
+
background: { r: outputRGBColor[0], g: outputRGBColor[1], b: outputRGBColor[2], alpha: 1 }
|
36
|
+
}
|
37
|
+
},
|
38
|
+
left: 0,
|
39
|
+
top: topPx
|
40
|
+
});
|
41
|
+
}
|
42
|
+
return sharpOverlays;
|
43
|
+
}
|
44
|
+
function applyColorTransformations(RGBColor, transformations) {
|
45
|
+
transformations.forEach((transformation) => {
|
46
|
+
RGBColor = transformColor(RGBColor, transformation);
|
47
|
+
});
|
48
|
+
return RGBColor;
|
49
|
+
}
|
50
|
+
function transformColor(RGBColor, transformation) {
|
51
|
+
switch (transformation.type) {
|
52
|
+
case "saturate":
|
53
|
+
return transformation.intensityMode === "add" ? saturateColor(RGBColor, transformation.intensity) : setColorSaturation(RGBColor, transformation.intensity);
|
54
|
+
case "lighten":
|
55
|
+
return transformation.intensityMode === "add" ? lightenColor(RGBColor, transformation.intensity) : setColorLuminance(RGBColor, transformation.intensity);
|
56
|
+
case "complement":
|
57
|
+
return complementColor(RGBColor);
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
export {
|
62
|
+
createLineBackground
|
63
|
+
};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import {
|
2
|
+
Outcome
|
3
|
+
} from "./chunk-JMU5PDBD.js";
|
4
|
+
import {
|
5
|
+
unknownToString
|
6
|
+
} from "./chunk-FENXVJYO.js";
|
7
|
+
import {
|
8
|
+
__export
|
9
|
+
} from "./chunk-NZLE2WMY.js";
|
10
|
+
|
11
|
+
// src/node/@google-cloud/storage/file/get-permissions/index.ts
|
12
|
+
var get_permissions_exports = {};
|
13
|
+
__export(get_permissions_exports, {
|
14
|
+
getPermissions: () => getPermissions
|
15
|
+
});
|
16
|
+
async function getPermissions(sourcePath, bucket, options) {
|
17
|
+
const { fileOptions, getAclOptions } = options ?? {};
|
18
|
+
try {
|
19
|
+
const file = bucket.file(sourcePath, fileOptions);
|
20
|
+
const [acl] = await file.acl.get(getAclOptions);
|
21
|
+
return Outcome.makeSuccess(acl);
|
22
|
+
} catch (err) {
|
23
|
+
const errStr = unknownToString(err);
|
24
|
+
return Outcome.makeFailure(errStr);
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
export {
|
29
|
+
getPermissions,
|
30
|
+
get_permissions_exports
|
31
|
+
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import {
|
2
|
+
list_exports
|
3
|
+
} from "./chunk-XZ7II65Z.js";
|
4
|
+
import {
|
5
|
+
get_metadata_exports
|
6
|
+
} from "./chunk-FTT6ZCCS.js";
|
7
|
+
import {
|
8
|
+
__export
|
9
|
+
} from "./chunk-NZLE2WMY.js";
|
10
|
+
|
11
|
+
// src/node/@google-cloud/storage/bucket/index.ts
|
12
|
+
var bucket_exports = {};
|
13
|
+
__export(bucket_exports, {
|
14
|
+
GetMetadata: () => get_metadata_exports,
|
15
|
+
List: () => list_exports
|
16
|
+
});
|
17
|
+
|
18
|
+
export {
|
19
|
+
bucket_exports
|
20
|
+
};
|