@nitida/sdk 0.36.3 → 0.37.0
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/dist/index.d.ts +18 -2
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +15 -1
- package/dist/server.js.map +1 -1
- package/dist/web.d.ts +1 -1
- package/dist/web.js +15 -1
- package/dist/web.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +26 -0
- package/src/server/index.ts +7 -0
- package/src/web/index.ts +7 -0
package/dist/web.js
CHANGED
|
@@ -75,6 +75,12 @@ import {
|
|
|
75
75
|
signAccessUrl,
|
|
76
76
|
signTransformUrl,
|
|
77
77
|
TRANSFORM_WIDTHS,
|
|
78
|
+
getRoleLadder,
|
|
79
|
+
getRolesLadder,
|
|
80
|
+
IMAGE_LADDER,
|
|
81
|
+
IMAGE_ROLE_LADDERS,
|
|
82
|
+
IMAGE_ROLES,
|
|
83
|
+
isImageRole,
|
|
78
84
|
toRequestablePresets as toRequestablePresets2,
|
|
79
85
|
transformMessage
|
|
80
86
|
} from "@nitida/asset-client";
|
|
@@ -395,6 +401,7 @@ var AssetsApi = class {
|
|
|
395
401
|
if (opts.clientOriginalBytes != null)
|
|
396
402
|
body.clientOriginalBytes = opts.clientOriginalBytes;
|
|
397
403
|
if (opts.video != null) body.video = opts.video;
|
|
404
|
+
if (opts.warm && opts.warm.length > 0) body.warm = opts.warm;
|
|
398
405
|
const r = await fetch(endpointHref(this.opts, "/assets/upload-url"), {
|
|
399
406
|
method: "POST",
|
|
400
407
|
headers: { ...this.headers(), "Content-Type": "application/json" },
|
|
@@ -821,7 +828,8 @@ var NitidaClient = class {
|
|
|
821
828
|
fileName,
|
|
822
829
|
presets: opts.presets && opts.presets.length > 0 ? opts.presets : DEFAULT_UPLOAD_PRESETS,
|
|
823
830
|
...clientOriginalBytes != null && { clientOriginalBytes },
|
|
824
|
-
...opts.video != null && { video: opts.video }
|
|
831
|
+
...opts.video != null && { video: opts.video },
|
|
832
|
+
...opts.warm && opts.warm.length > 0 && { warm: opts.warm }
|
|
825
833
|
});
|
|
826
834
|
if (presign.deduped) {
|
|
827
835
|
const short = sha.slice(0, 16);
|
|
@@ -1042,6 +1050,9 @@ async function compressImages(files, opts = {}) {
|
|
|
1042
1050
|
}
|
|
1043
1051
|
export {
|
|
1044
1052
|
DEFAULT_COMPRESSION_OPTIONS,
|
|
1053
|
+
IMAGE_LADDER,
|
|
1054
|
+
IMAGE_ROLES,
|
|
1055
|
+
IMAGE_ROLE_LADDERS,
|
|
1045
1056
|
MAX_SIGNED_TRANSFORM_TTL_SECONDS,
|
|
1046
1057
|
MAX_SIGNED_URL_TTL_SECONDS,
|
|
1047
1058
|
MIN_SIGNED_TRANSFORM_TTL_SECONDS,
|
|
@@ -1076,6 +1087,8 @@ export {
|
|
|
1076
1087
|
getPaletteCssVars,
|
|
1077
1088
|
getPrivateAssetUrl,
|
|
1078
1089
|
getPrivateTransformUrl,
|
|
1090
|
+
getRoleLadder,
|
|
1091
|
+
getRolesLadder,
|
|
1079
1092
|
getSignedTransformUrl2 as getSignedTransformUrl,
|
|
1080
1093
|
getTenantId,
|
|
1081
1094
|
getTextColorForBackground,
|
|
@@ -1086,6 +1099,7 @@ export {
|
|
|
1086
1099
|
hasSizeLadder,
|
|
1087
1100
|
hlsLadderAlignment,
|
|
1088
1101
|
invalidateSlotCache2 as invalidateSlotCache,
|
|
1102
|
+
isImageRole,
|
|
1089
1103
|
isRequestablePreset2 as isRequestablePreset,
|
|
1090
1104
|
isUniversallyPlayableAudio,
|
|
1091
1105
|
iteratePaletteSwatches,
|