microboard-temp 0.5.70 → 0.5.72
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/cjs/browser.js +12 -3
- package/dist/cjs/index.js +12 -3
- package/dist/cjs/node.js +12 -3
- package/dist/esm/browser.js +12 -3
- package/dist/esm/index.js +12 -3
- package/dist/esm/node.js +12 -3
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -8650,7 +8650,7 @@ class SessionStorage {
|
|
|
8650
8650
|
get(key) {
|
|
8651
8651
|
const boardId = this.getBoardId() || "";
|
|
8652
8652
|
const item = _sessionStorage.getItem(boardId + "_" + key);
|
|
8653
|
-
if (!item) {
|
|
8653
|
+
if (!item || item === "undefined") {
|
|
8654
8654
|
return;
|
|
8655
8655
|
}
|
|
8656
8656
|
return JSON.parse(item);
|
|
@@ -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 },
|
|
@@ -53505,7 +53514,7 @@ class BoardSelection {
|
|
|
53505
53514
|
if (!text5) {
|
|
53506
53515
|
return;
|
|
53507
53516
|
}
|
|
53508
|
-
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment);
|
|
53517
|
+
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment || "top");
|
|
53509
53518
|
if (item instanceof RichText) {
|
|
53510
53519
|
item.setEditorFocus(this.context);
|
|
53511
53520
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -8650,7 +8650,7 @@ class SessionStorage {
|
|
|
8650
8650
|
get(key) {
|
|
8651
8651
|
const boardId = this.getBoardId() || "";
|
|
8652
8652
|
const item = _sessionStorage.getItem(boardId + "_" + key);
|
|
8653
|
-
if (!item) {
|
|
8653
|
+
if (!item || item === "undefined") {
|
|
8654
8654
|
return;
|
|
8655
8655
|
}
|
|
8656
8656
|
return JSON.parse(item);
|
|
@@ -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 },
|
|
@@ -53505,7 +53514,7 @@ class BoardSelection {
|
|
|
53505
53514
|
if (!text5) {
|
|
53506
53515
|
return;
|
|
53507
53516
|
}
|
|
53508
|
-
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment);
|
|
53517
|
+
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment || "top");
|
|
53509
53518
|
if (item instanceof RichText) {
|
|
53510
53519
|
item.setEditorFocus(this.context);
|
|
53511
53520
|
}
|
package/dist/cjs/node.js
CHANGED
|
@@ -9687,7 +9687,7 @@ class SessionStorage {
|
|
|
9687
9687
|
get(key) {
|
|
9688
9688
|
const boardId = this.getBoardId() || "";
|
|
9689
9689
|
const item = _sessionStorage.getItem(boardId + "_" + key);
|
|
9690
|
-
if (!item) {
|
|
9690
|
+
if (!item || item === "undefined") {
|
|
9691
9691
|
return;
|
|
9692
9692
|
}
|
|
9693
9693
|
return JSON.parse(item);
|
|
@@ -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 },
|
|
@@ -55978,7 +55987,7 @@ class BoardSelection {
|
|
|
55978
55987
|
if (!text5) {
|
|
55979
55988
|
return;
|
|
55980
55989
|
}
|
|
55981
|
-
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment);
|
|
55990
|
+
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment || "top");
|
|
55982
55991
|
if (item instanceof RichText) {
|
|
55983
55992
|
item.setEditorFocus(this.context);
|
|
55984
55993
|
}
|
package/dist/esm/browser.js
CHANGED
|
@@ -8486,7 +8486,7 @@ class SessionStorage {
|
|
|
8486
8486
|
get(key) {
|
|
8487
8487
|
const boardId = this.getBoardId() || "";
|
|
8488
8488
|
const item = _sessionStorage.getItem(boardId + "_" + key);
|
|
8489
|
-
if (!item) {
|
|
8489
|
+
if (!item || item === "undefined") {
|
|
8490
8490
|
return;
|
|
8491
8491
|
}
|
|
8492
8492
|
return JSON.parse(item);
|
|
@@ -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 },
|
|
@@ -53350,7 +53359,7 @@ class BoardSelection {
|
|
|
53350
53359
|
if (!text5) {
|
|
53351
53360
|
return;
|
|
53352
53361
|
}
|
|
53353
|
-
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment);
|
|
53362
|
+
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment || "top");
|
|
53354
53363
|
if (item instanceof RichText) {
|
|
53355
53364
|
item.setEditorFocus(this.context);
|
|
53356
53365
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -8479,7 +8479,7 @@ class SessionStorage {
|
|
|
8479
8479
|
get(key) {
|
|
8480
8480
|
const boardId = this.getBoardId() || "";
|
|
8481
8481
|
const item = _sessionStorage.getItem(boardId + "_" + key);
|
|
8482
|
-
if (!item) {
|
|
8482
|
+
if (!item || item === "undefined") {
|
|
8483
8483
|
return;
|
|
8484
8484
|
}
|
|
8485
8485
|
return JSON.parse(item);
|
|
@@ -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 },
|
|
@@ -53343,7 +53352,7 @@ class BoardSelection {
|
|
|
53343
53352
|
if (!text5) {
|
|
53344
53353
|
return;
|
|
53345
53354
|
}
|
|
53346
|
-
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment);
|
|
53355
|
+
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment || "top");
|
|
53347
53356
|
if (item instanceof RichText) {
|
|
53348
53357
|
item.setEditorFocus(this.context);
|
|
53349
53358
|
}
|
package/dist/esm/node.js
CHANGED
|
@@ -9263,7 +9263,7 @@ class SessionStorage {
|
|
|
9263
9263
|
get(key) {
|
|
9264
9264
|
const boardId = this.getBoardId() || "";
|
|
9265
9265
|
const item = _sessionStorage.getItem(boardId + "_" + key);
|
|
9266
|
-
if (!item) {
|
|
9266
|
+
if (!item || item === "undefined") {
|
|
9267
9267
|
return;
|
|
9268
9268
|
}
|
|
9269
9269
|
return JSON.parse(item);
|
|
@@ -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 },
|
|
@@ -55811,7 +55820,7 @@ class BoardSelection {
|
|
|
55811
55820
|
if (!text5) {
|
|
55812
55821
|
return;
|
|
55813
55822
|
}
|
|
55814
|
-
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment);
|
|
55823
|
+
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment || "top");
|
|
55815
55824
|
if (item instanceof RichText) {
|
|
55816
55825
|
item.setEditorFocus(this.context);
|
|
55817
55826
|
}
|