microboard-temp 0.5.148 → 0.5.150
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 +38 -0
- package/dist/cjs/index.js +38 -0
- package/dist/cjs/node.js +38 -0
- package/dist/esm/browser.js +38 -0
- package/dist/esm/index.js +38 -0
- package/dist/esm/node.js +38 -0
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -42239,6 +42239,44 @@ class ImageItem extends BaseItem {
|
|
|
42239
42239
|
async setStorageLink(link2) {
|
|
42240
42240
|
this.storageLink = link2;
|
|
42241
42241
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
42242
|
+
if (!this.signedUrl) {
|
|
42243
|
+
const canvas = conf.documentFactory.createElement("canvas");
|
|
42244
|
+
canvas.width = 100;
|
|
42245
|
+
canvas.height = 100;
|
|
42246
|
+
const ctx = canvas.getContext("2d");
|
|
42247
|
+
if (ctx) {
|
|
42248
|
+
ctx.fillStyle = "#f0f0f0";
|
|
42249
|
+
ctx.fillRect(0, 0, 100, 100);
|
|
42250
|
+
ctx.strokeStyle = "#bdbdbd";
|
|
42251
|
+
ctx.lineWidth = 2;
|
|
42252
|
+
ctx.strokeRect(1, 1, 98, 98);
|
|
42253
|
+
const x = 30, y = 34;
|
|
42254
|
+
ctx.strokeStyle = "#9e9e9e";
|
|
42255
|
+
ctx.lineWidth = 2.5;
|
|
42256
|
+
ctx.lineJoin = "round";
|
|
42257
|
+
ctx.strokeRect(x, y, 40, 32);
|
|
42258
|
+
ctx.beginPath();
|
|
42259
|
+
ctx.moveTo(x, y + 32);
|
|
42260
|
+
ctx.lineTo(x + 14, y + 14);
|
|
42261
|
+
ctx.lineTo(x + 24, y + 24);
|
|
42262
|
+
ctx.stroke();
|
|
42263
|
+
ctx.beginPath();
|
|
42264
|
+
ctx.moveTo(x + 24, y + 24);
|
|
42265
|
+
ctx.lineTo(x + 32, y + 16);
|
|
42266
|
+
ctx.lineTo(x + 40, y + 32);
|
|
42267
|
+
ctx.stroke();
|
|
42268
|
+
ctx.beginPath();
|
|
42269
|
+
ctx.arc(x + 31, y + 10, 5, 0, Math.PI * 2);
|
|
42270
|
+
ctx.stroke();
|
|
42271
|
+
}
|
|
42272
|
+
const placeholderImg = new Image;
|
|
42273
|
+
placeholderImg.src = canvas.toDataURL();
|
|
42274
|
+
this.setImage(placeholderImg);
|
|
42275
|
+
this.updateMbr();
|
|
42276
|
+
this.subject.publish(this);
|
|
42277
|
+
this.shootLoadCallbacks();
|
|
42278
|
+
return;
|
|
42279
|
+
}
|
|
42242
42280
|
this.image.src = this.signedUrl;
|
|
42243
42281
|
}
|
|
42244
42282
|
getStorageId() {
|
package/dist/cjs/index.js
CHANGED
|
@@ -42239,6 +42239,44 @@ class ImageItem extends BaseItem {
|
|
|
42239
42239
|
async setStorageLink(link2) {
|
|
42240
42240
|
this.storageLink = link2;
|
|
42241
42241
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
42242
|
+
if (!this.signedUrl) {
|
|
42243
|
+
const canvas = conf.documentFactory.createElement("canvas");
|
|
42244
|
+
canvas.width = 100;
|
|
42245
|
+
canvas.height = 100;
|
|
42246
|
+
const ctx = canvas.getContext("2d");
|
|
42247
|
+
if (ctx) {
|
|
42248
|
+
ctx.fillStyle = "#f0f0f0";
|
|
42249
|
+
ctx.fillRect(0, 0, 100, 100);
|
|
42250
|
+
ctx.strokeStyle = "#bdbdbd";
|
|
42251
|
+
ctx.lineWidth = 2;
|
|
42252
|
+
ctx.strokeRect(1, 1, 98, 98);
|
|
42253
|
+
const x = 30, y = 34;
|
|
42254
|
+
ctx.strokeStyle = "#9e9e9e";
|
|
42255
|
+
ctx.lineWidth = 2.5;
|
|
42256
|
+
ctx.lineJoin = "round";
|
|
42257
|
+
ctx.strokeRect(x, y, 40, 32);
|
|
42258
|
+
ctx.beginPath();
|
|
42259
|
+
ctx.moveTo(x, y + 32);
|
|
42260
|
+
ctx.lineTo(x + 14, y + 14);
|
|
42261
|
+
ctx.lineTo(x + 24, y + 24);
|
|
42262
|
+
ctx.stroke();
|
|
42263
|
+
ctx.beginPath();
|
|
42264
|
+
ctx.moveTo(x + 24, y + 24);
|
|
42265
|
+
ctx.lineTo(x + 32, y + 16);
|
|
42266
|
+
ctx.lineTo(x + 40, y + 32);
|
|
42267
|
+
ctx.stroke();
|
|
42268
|
+
ctx.beginPath();
|
|
42269
|
+
ctx.arc(x + 31, y + 10, 5, 0, Math.PI * 2);
|
|
42270
|
+
ctx.stroke();
|
|
42271
|
+
}
|
|
42272
|
+
const placeholderImg = new Image;
|
|
42273
|
+
placeholderImg.src = canvas.toDataURL();
|
|
42274
|
+
this.setImage(placeholderImg);
|
|
42275
|
+
this.updateMbr();
|
|
42276
|
+
this.subject.publish(this);
|
|
42277
|
+
this.shootLoadCallbacks();
|
|
42278
|
+
return;
|
|
42279
|
+
}
|
|
42242
42280
|
this.image.src = this.signedUrl;
|
|
42243
42281
|
}
|
|
42244
42282
|
getStorageId() {
|
package/dist/cjs/node.js
CHANGED
|
@@ -44712,6 +44712,44 @@ class ImageItem extends BaseItem {
|
|
|
44712
44712
|
async setStorageLink(link2) {
|
|
44713
44713
|
this.storageLink = link2;
|
|
44714
44714
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
44715
|
+
if (!this.signedUrl) {
|
|
44716
|
+
const canvas = conf.documentFactory.createElement("canvas");
|
|
44717
|
+
canvas.width = 100;
|
|
44718
|
+
canvas.height = 100;
|
|
44719
|
+
const ctx = canvas.getContext("2d");
|
|
44720
|
+
if (ctx) {
|
|
44721
|
+
ctx.fillStyle = "#f0f0f0";
|
|
44722
|
+
ctx.fillRect(0, 0, 100, 100);
|
|
44723
|
+
ctx.strokeStyle = "#bdbdbd";
|
|
44724
|
+
ctx.lineWidth = 2;
|
|
44725
|
+
ctx.strokeRect(1, 1, 98, 98);
|
|
44726
|
+
const x = 30, y = 34;
|
|
44727
|
+
ctx.strokeStyle = "#9e9e9e";
|
|
44728
|
+
ctx.lineWidth = 2.5;
|
|
44729
|
+
ctx.lineJoin = "round";
|
|
44730
|
+
ctx.strokeRect(x, y, 40, 32);
|
|
44731
|
+
ctx.beginPath();
|
|
44732
|
+
ctx.moveTo(x, y + 32);
|
|
44733
|
+
ctx.lineTo(x + 14, y + 14);
|
|
44734
|
+
ctx.lineTo(x + 24, y + 24);
|
|
44735
|
+
ctx.stroke();
|
|
44736
|
+
ctx.beginPath();
|
|
44737
|
+
ctx.moveTo(x + 24, y + 24);
|
|
44738
|
+
ctx.lineTo(x + 32, y + 16);
|
|
44739
|
+
ctx.lineTo(x + 40, y + 32);
|
|
44740
|
+
ctx.stroke();
|
|
44741
|
+
ctx.beginPath();
|
|
44742
|
+
ctx.arc(x + 31, y + 10, 5, 0, Math.PI * 2);
|
|
44743
|
+
ctx.stroke();
|
|
44744
|
+
}
|
|
44745
|
+
const placeholderImg = new Image;
|
|
44746
|
+
placeholderImg.src = canvas.toDataURL();
|
|
44747
|
+
this.setImage(placeholderImg);
|
|
44748
|
+
this.updateMbr();
|
|
44749
|
+
this.subject.publish(this);
|
|
44750
|
+
this.shootLoadCallbacks();
|
|
44751
|
+
return;
|
|
44752
|
+
}
|
|
44715
44753
|
this.image.src = this.signedUrl;
|
|
44716
44754
|
}
|
|
44717
44755
|
getStorageId() {
|
package/dist/esm/browser.js
CHANGED
|
@@ -42082,6 +42082,44 @@ class ImageItem extends BaseItem {
|
|
|
42082
42082
|
async setStorageLink(link2) {
|
|
42083
42083
|
this.storageLink = link2;
|
|
42084
42084
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
42085
|
+
if (!this.signedUrl) {
|
|
42086
|
+
const canvas = conf.documentFactory.createElement("canvas");
|
|
42087
|
+
canvas.width = 100;
|
|
42088
|
+
canvas.height = 100;
|
|
42089
|
+
const ctx = canvas.getContext("2d");
|
|
42090
|
+
if (ctx) {
|
|
42091
|
+
ctx.fillStyle = "#f0f0f0";
|
|
42092
|
+
ctx.fillRect(0, 0, 100, 100);
|
|
42093
|
+
ctx.strokeStyle = "#bdbdbd";
|
|
42094
|
+
ctx.lineWidth = 2;
|
|
42095
|
+
ctx.strokeRect(1, 1, 98, 98);
|
|
42096
|
+
const x = 30, y = 34;
|
|
42097
|
+
ctx.strokeStyle = "#9e9e9e";
|
|
42098
|
+
ctx.lineWidth = 2.5;
|
|
42099
|
+
ctx.lineJoin = "round";
|
|
42100
|
+
ctx.strokeRect(x, y, 40, 32);
|
|
42101
|
+
ctx.beginPath();
|
|
42102
|
+
ctx.moveTo(x, y + 32);
|
|
42103
|
+
ctx.lineTo(x + 14, y + 14);
|
|
42104
|
+
ctx.lineTo(x + 24, y + 24);
|
|
42105
|
+
ctx.stroke();
|
|
42106
|
+
ctx.beginPath();
|
|
42107
|
+
ctx.moveTo(x + 24, y + 24);
|
|
42108
|
+
ctx.lineTo(x + 32, y + 16);
|
|
42109
|
+
ctx.lineTo(x + 40, y + 32);
|
|
42110
|
+
ctx.stroke();
|
|
42111
|
+
ctx.beginPath();
|
|
42112
|
+
ctx.arc(x + 31, y + 10, 5, 0, Math.PI * 2);
|
|
42113
|
+
ctx.stroke();
|
|
42114
|
+
}
|
|
42115
|
+
const placeholderImg = new Image;
|
|
42116
|
+
placeholderImg.src = canvas.toDataURL();
|
|
42117
|
+
this.setImage(placeholderImg);
|
|
42118
|
+
this.updateMbr();
|
|
42119
|
+
this.subject.publish(this);
|
|
42120
|
+
this.shootLoadCallbacks();
|
|
42121
|
+
return;
|
|
42122
|
+
}
|
|
42085
42123
|
this.image.src = this.signedUrl;
|
|
42086
42124
|
}
|
|
42087
42125
|
getStorageId() {
|
package/dist/esm/index.js
CHANGED
|
@@ -42075,6 +42075,44 @@ class ImageItem extends BaseItem {
|
|
|
42075
42075
|
async setStorageLink(link2) {
|
|
42076
42076
|
this.storageLink = link2;
|
|
42077
42077
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
42078
|
+
if (!this.signedUrl) {
|
|
42079
|
+
const canvas = conf.documentFactory.createElement("canvas");
|
|
42080
|
+
canvas.width = 100;
|
|
42081
|
+
canvas.height = 100;
|
|
42082
|
+
const ctx = canvas.getContext("2d");
|
|
42083
|
+
if (ctx) {
|
|
42084
|
+
ctx.fillStyle = "#f0f0f0";
|
|
42085
|
+
ctx.fillRect(0, 0, 100, 100);
|
|
42086
|
+
ctx.strokeStyle = "#bdbdbd";
|
|
42087
|
+
ctx.lineWidth = 2;
|
|
42088
|
+
ctx.strokeRect(1, 1, 98, 98);
|
|
42089
|
+
const x = 30, y = 34;
|
|
42090
|
+
ctx.strokeStyle = "#9e9e9e";
|
|
42091
|
+
ctx.lineWidth = 2.5;
|
|
42092
|
+
ctx.lineJoin = "round";
|
|
42093
|
+
ctx.strokeRect(x, y, 40, 32);
|
|
42094
|
+
ctx.beginPath();
|
|
42095
|
+
ctx.moveTo(x, y + 32);
|
|
42096
|
+
ctx.lineTo(x + 14, y + 14);
|
|
42097
|
+
ctx.lineTo(x + 24, y + 24);
|
|
42098
|
+
ctx.stroke();
|
|
42099
|
+
ctx.beginPath();
|
|
42100
|
+
ctx.moveTo(x + 24, y + 24);
|
|
42101
|
+
ctx.lineTo(x + 32, y + 16);
|
|
42102
|
+
ctx.lineTo(x + 40, y + 32);
|
|
42103
|
+
ctx.stroke();
|
|
42104
|
+
ctx.beginPath();
|
|
42105
|
+
ctx.arc(x + 31, y + 10, 5, 0, Math.PI * 2);
|
|
42106
|
+
ctx.stroke();
|
|
42107
|
+
}
|
|
42108
|
+
const placeholderImg = new Image;
|
|
42109
|
+
placeholderImg.src = canvas.toDataURL();
|
|
42110
|
+
this.setImage(placeholderImg);
|
|
42111
|
+
this.updateMbr();
|
|
42112
|
+
this.subject.publish(this);
|
|
42113
|
+
this.shootLoadCallbacks();
|
|
42114
|
+
return;
|
|
42115
|
+
}
|
|
42078
42116
|
this.image.src = this.signedUrl;
|
|
42079
42117
|
}
|
|
42080
42118
|
getStorageId() {
|
package/dist/esm/node.js
CHANGED
|
@@ -44543,6 +44543,44 @@ class ImageItem extends BaseItem {
|
|
|
44543
44543
|
async setStorageLink(link2) {
|
|
44544
44544
|
this.storageLink = link2;
|
|
44545
44545
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
44546
|
+
if (!this.signedUrl) {
|
|
44547
|
+
const canvas = conf.documentFactory.createElement("canvas");
|
|
44548
|
+
canvas.width = 100;
|
|
44549
|
+
canvas.height = 100;
|
|
44550
|
+
const ctx = canvas.getContext("2d");
|
|
44551
|
+
if (ctx) {
|
|
44552
|
+
ctx.fillStyle = "#f0f0f0";
|
|
44553
|
+
ctx.fillRect(0, 0, 100, 100);
|
|
44554
|
+
ctx.strokeStyle = "#bdbdbd";
|
|
44555
|
+
ctx.lineWidth = 2;
|
|
44556
|
+
ctx.strokeRect(1, 1, 98, 98);
|
|
44557
|
+
const x = 30, y = 34;
|
|
44558
|
+
ctx.strokeStyle = "#9e9e9e";
|
|
44559
|
+
ctx.lineWidth = 2.5;
|
|
44560
|
+
ctx.lineJoin = "round";
|
|
44561
|
+
ctx.strokeRect(x, y, 40, 32);
|
|
44562
|
+
ctx.beginPath();
|
|
44563
|
+
ctx.moveTo(x, y + 32);
|
|
44564
|
+
ctx.lineTo(x + 14, y + 14);
|
|
44565
|
+
ctx.lineTo(x + 24, y + 24);
|
|
44566
|
+
ctx.stroke();
|
|
44567
|
+
ctx.beginPath();
|
|
44568
|
+
ctx.moveTo(x + 24, y + 24);
|
|
44569
|
+
ctx.lineTo(x + 32, y + 16);
|
|
44570
|
+
ctx.lineTo(x + 40, y + 32);
|
|
44571
|
+
ctx.stroke();
|
|
44572
|
+
ctx.beginPath();
|
|
44573
|
+
ctx.arc(x + 31, y + 10, 5, 0, Math.PI * 2);
|
|
44574
|
+
ctx.stroke();
|
|
44575
|
+
}
|
|
44576
|
+
const placeholderImg = new Image;
|
|
44577
|
+
placeholderImg.src = canvas.toDataURL();
|
|
44578
|
+
this.setImage(placeholderImg);
|
|
44579
|
+
this.updateMbr();
|
|
44580
|
+
this.subject.publish(this);
|
|
44581
|
+
this.shootLoadCallbacks();
|
|
44582
|
+
return;
|
|
44583
|
+
}
|
|
44546
44584
|
this.image.src = this.signedUrl;
|
|
44547
44585
|
}
|
|
44548
44586
|
getStorageId() {
|