microboard-temp 0.5.70 → 0.5.71

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.
@@ -41436,7 +41436,16 @@ var resizeAndConvertToPng = async (inp) => {
41436
41436
  });
41437
41437
  };
41438
41438
  var prepareImage = (inp, accessToken, boardId) => resizeAndConvertToPng(inp).then(({ width: width2, height: height2, dataURL, hash }) => {
41439
- const { blob } = getBlobFromDataURL(dataURL);
41439
+ const { blob, mimeType } = getBlobFromDataURL(dataURL);
41440
+ if (mimeType === "image/svg+xml") {
41441
+ return uploadToTheStorage(hash, dataURL, accessToken, boardId).then((src) => {
41442
+ return {
41443
+ imageDimension: { width: width2, height: height2 },
41444
+ base64: dataURL,
41445
+ storageLink: src
41446
+ };
41447
+ });
41448
+ }
41440
41449
  return uploadMediaToStorage(hash, blob, accessToken, boardId, "image").then((src) => {
41441
41450
  return {
41442
41451
  imageDimension: { width: width2, height: height2 },
package/dist/cjs/index.js CHANGED
@@ -41436,7 +41436,16 @@ var resizeAndConvertToPng = async (inp) => {
41436
41436
  });
41437
41437
  };
41438
41438
  var prepareImage = (inp, accessToken, boardId) => resizeAndConvertToPng(inp).then(({ width: width2, height: height2, dataURL, hash }) => {
41439
- const { blob } = getBlobFromDataURL(dataURL);
41439
+ const { blob, mimeType } = getBlobFromDataURL(dataURL);
41440
+ if (mimeType === "image/svg+xml") {
41441
+ return uploadToTheStorage(hash, dataURL, accessToken, boardId).then((src) => {
41442
+ return {
41443
+ imageDimension: { width: width2, height: height2 },
41444
+ base64: dataURL,
41445
+ storageLink: src
41446
+ };
41447
+ });
41448
+ }
41440
41449
  return uploadMediaToStorage(hash, blob, accessToken, boardId, "image").then((src) => {
41441
41450
  return {
41442
41451
  imageDimension: { width: width2, height: height2 },
package/dist/cjs/node.js CHANGED
@@ -43909,7 +43909,16 @@ var resizeAndConvertToPng = async (inp) => {
43909
43909
  });
43910
43910
  };
43911
43911
  var prepareImage = (inp, accessToken, boardId) => resizeAndConvertToPng(inp).then(({ width: width2, height: height2, dataURL, hash }) => {
43912
- const { blob } = getBlobFromDataURL(dataURL);
43912
+ const { blob, mimeType } = getBlobFromDataURL(dataURL);
43913
+ if (mimeType === "image/svg+xml") {
43914
+ return uploadToTheStorage(hash, dataURL, accessToken, boardId).then((src) => {
43915
+ return {
43916
+ imageDimension: { width: width2, height: height2 },
43917
+ base64: dataURL,
43918
+ storageLink: src
43919
+ };
43920
+ });
43921
+ }
43913
43922
  return uploadMediaToStorage(hash, blob, accessToken, boardId, "image").then((src) => {
43914
43923
  return {
43915
43924
  imageDimension: { width: width2, height: height2 },
@@ -41281,7 +41281,16 @@ var resizeAndConvertToPng = async (inp) => {
41281
41281
  });
41282
41282
  };
41283
41283
  var prepareImage = (inp, accessToken, boardId) => resizeAndConvertToPng(inp).then(({ width: width2, height: height2, dataURL, hash }) => {
41284
- const { blob } = getBlobFromDataURL(dataURL);
41284
+ const { blob, mimeType } = getBlobFromDataURL(dataURL);
41285
+ if (mimeType === "image/svg+xml") {
41286
+ return uploadToTheStorage(hash, dataURL, accessToken, boardId).then((src) => {
41287
+ return {
41288
+ imageDimension: { width: width2, height: height2 },
41289
+ base64: dataURL,
41290
+ storageLink: src
41291
+ };
41292
+ });
41293
+ }
41285
41294
  return uploadMediaToStorage(hash, blob, accessToken, boardId, "image").then((src) => {
41286
41295
  return {
41287
41296
  imageDimension: { width: width2, height: height2 },
package/dist/esm/index.js CHANGED
@@ -41274,7 +41274,16 @@ var resizeAndConvertToPng = async (inp) => {
41274
41274
  });
41275
41275
  };
41276
41276
  var prepareImage = (inp, accessToken, boardId) => resizeAndConvertToPng(inp).then(({ width: width2, height: height2, dataURL, hash }) => {
41277
- const { blob } = getBlobFromDataURL(dataURL);
41277
+ const { blob, mimeType } = getBlobFromDataURL(dataURL);
41278
+ if (mimeType === "image/svg+xml") {
41279
+ return uploadToTheStorage(hash, dataURL, accessToken, boardId).then((src) => {
41280
+ return {
41281
+ imageDimension: { width: width2, height: height2 },
41282
+ base64: dataURL,
41283
+ storageLink: src
41284
+ };
41285
+ });
41286
+ }
41278
41287
  return uploadMediaToStorage(hash, blob, accessToken, boardId, "image").then((src) => {
41279
41288
  return {
41280
41289
  imageDimension: { width: width2, height: height2 },
package/dist/esm/node.js CHANGED
@@ -43742,7 +43742,16 @@ var resizeAndConvertToPng = async (inp) => {
43742
43742
  });
43743
43743
  };
43744
43744
  var prepareImage = (inp, accessToken, boardId) => resizeAndConvertToPng(inp).then(({ width: width2, height: height2, dataURL, hash }) => {
43745
- const { blob } = getBlobFromDataURL(dataURL);
43745
+ const { blob, mimeType } = getBlobFromDataURL(dataURL);
43746
+ if (mimeType === "image/svg+xml") {
43747
+ return uploadToTheStorage(hash, dataURL, accessToken, boardId).then((src) => {
43748
+ return {
43749
+ imageDimension: { width: width2, height: height2 },
43750
+ base64: dataURL,
43751
+ storageLink: src
43752
+ };
43753
+ });
43754
+ }
43746
43755
  return uploadMediaToStorage(hash, blob, accessToken, boardId, "image").then((src) => {
43747
43756
  return {
43748
43757
  imageDimension: { width: width2, height: height2 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.5.70",
3
+ "version": "0.5.71",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",