microboard-temp 0.5.149 → 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 +32 -1
- package/dist/cjs/index.js +32 -1
- package/dist/cjs/node.js +32 -1
- package/dist/esm/browser.js +32 -1
- package/dist/esm/index.js +32 -1
- package/dist/esm/node.js +32 -1
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -42240,7 +42240,38 @@ class ImageItem extends BaseItem {
|
|
|
42240
42240
|
this.storageLink = link2;
|
|
42241
42241
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
42242
42242
|
if (!this.signedUrl) {
|
|
42243
|
-
|
|
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);
|
|
42244
42275
|
this.updateMbr();
|
|
42245
42276
|
this.subject.publish(this);
|
|
42246
42277
|
this.shootLoadCallbacks();
|
package/dist/cjs/index.js
CHANGED
|
@@ -42240,7 +42240,38 @@ class ImageItem extends BaseItem {
|
|
|
42240
42240
|
this.storageLink = link2;
|
|
42241
42241
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
42242
42242
|
if (!this.signedUrl) {
|
|
42243
|
-
|
|
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);
|
|
42244
42275
|
this.updateMbr();
|
|
42245
42276
|
this.subject.publish(this);
|
|
42246
42277
|
this.shootLoadCallbacks();
|
package/dist/cjs/node.js
CHANGED
|
@@ -44713,7 +44713,38 @@ class ImageItem extends BaseItem {
|
|
|
44713
44713
|
this.storageLink = link2;
|
|
44714
44714
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
44715
44715
|
if (!this.signedUrl) {
|
|
44716
|
-
|
|
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);
|
|
44717
44748
|
this.updateMbr();
|
|
44718
44749
|
this.subject.publish(this);
|
|
44719
44750
|
this.shootLoadCallbacks();
|
package/dist/esm/browser.js
CHANGED
|
@@ -42083,7 +42083,38 @@ class ImageItem extends BaseItem {
|
|
|
42083
42083
|
this.storageLink = link2;
|
|
42084
42084
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
42085
42085
|
if (!this.signedUrl) {
|
|
42086
|
-
|
|
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);
|
|
42087
42118
|
this.updateMbr();
|
|
42088
42119
|
this.subject.publish(this);
|
|
42089
42120
|
this.shootLoadCallbacks();
|
package/dist/esm/index.js
CHANGED
|
@@ -42076,7 +42076,38 @@ class ImageItem extends BaseItem {
|
|
|
42076
42076
|
this.storageLink = link2;
|
|
42077
42077
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
42078
42078
|
if (!this.signedUrl) {
|
|
42079
|
-
|
|
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);
|
|
42080
42111
|
this.updateMbr();
|
|
42081
42112
|
this.subject.publish(this);
|
|
42082
42113
|
this.shootLoadCallbacks();
|
package/dist/esm/node.js
CHANGED
|
@@ -44544,7 +44544,38 @@ class ImageItem extends BaseItem {
|
|
|
44544
44544
|
this.storageLink = link2;
|
|
44545
44545
|
this.signedUrl = await getMediaSignedUrl(link2, this.board.getAccount()?.accessToken || null) || "";
|
|
44546
44546
|
if (!this.signedUrl) {
|
|
44547
|
-
|
|
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);
|
|
44548
44579
|
this.updateMbr();
|
|
44549
44580
|
this.subject.publish(this);
|
|
44550
44581
|
this.shootLoadCallbacks();
|