@medialane/sdk 0.189.0 → 0.191.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.cjs CHANGED
@@ -753,7 +753,6 @@ function buildAssetMetadata(input) {
753
753
  const traitType = t.traitType?.trim() ?? "";
754
754
  const traitValue = String(t.value ?? "").trim();
755
755
  if (!traitType || !traitValue || RESERVED_TRAITS_NORMALIZED.has(traitType.toLowerCase())) continue;
756
- if (traitType.length > 64 || traitValue.length > 512) continue;
757
756
  attributes.push({ trait_type: traitType, value: traitValue });
758
757
  }
759
758
  if (input.licenseType) {
@@ -823,13 +822,12 @@ var MAX_IPFS_GATEWAY_RESPONSE_BYTES = 25 * 1024 * 1024;
823
822
 
824
823
  // src/uploads.ts
825
824
  var MB = 1024 * 1024;
825
+ var MAX_UPLOAD_BYTES = 90 * MB;
826
826
  var UPLOAD_LIMITS = {
827
827
  image: {
828
- maxBytes: 50 * MB,
829
828
  mimeTypes: ["image/jpeg", "image/png", "image/gif", "image/svg+xml", "image/webp"]
830
829
  },
831
830
  document: {
832
- maxBytes: 20 * MB,
833
831
  mimeTypes: [
834
832
  "application/pdf",
835
833
  "application/msword",
@@ -842,7 +840,6 @@ var UPLOAD_LIMITS = {
842
840
  ]
843
841
  },
844
842
  media: {
845
- maxBytes: 100 * MB,
846
843
  mimeTypes: [
847
844
  "image/jpeg",
848
845
  "image/png",
@@ -867,10 +864,9 @@ function formatFileSize(bytes) {
867
864
  return `${Number.isInteger(mb) ? mb : mb.toFixed(1)} MB`;
868
865
  }
869
866
  function uploadSizeError(file, kind = "image") {
870
- const { maxBytes } = UPLOAD_LIMITS[kind];
871
- if (file.size <= maxBytes) return null;
867
+ if (file.size <= MAX_UPLOAD_BYTES) return null;
872
868
  const noun = kind === "image" ? "image" : "file";
873
- return `That ${noun} is ${formatFileSize(file.size)}. Please choose one under ${formatFileSize(maxBytes)}.`;
869
+ return `That ${noun} is ${formatFileSize(file.size)}. Please choose one under ${formatFileSize(MAX_UPLOAD_BYTES)}.`;
874
870
  }
875
871
 
876
872
  Object.defineProperty(exports, "ApiClient", {
@@ -1181,6 +1177,7 @@ exports.IPFS_SAFE_CONTENT_TYPE_PREFIXES = IPFS_SAFE_CONTENT_TYPE_PREFIXES;
1181
1177
  exports.MAX_IMAGE_PROXY_BYTES = MAX_IMAGE_PROXY_BYTES;
1182
1178
  exports.MAX_IMAGE_REDIRECTS = MAX_IMAGE_REDIRECTS;
1183
1179
  exports.MAX_IPFS_GATEWAY_RESPONSE_BYTES = MAX_IPFS_GATEWAY_RESPONSE_BYTES;
1180
+ exports.MAX_UPLOAD_BYTES = MAX_UPLOAD_BYTES;
1184
1181
  exports.OPEN_LICENSES = OPEN_LICENSES;
1185
1182
  exports.RESERVED_TRAITS = RESERVED_TRAITS;
1186
1183
  exports.RunRequestError = RunRequestError;