microboard-temp 0.5.147 → 0.5.149
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/dist/types/Selection/Transformer/TransformerHelpers/transformShape.d.ts +2 -1
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -42239,6 +42239,13 @@ 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
|
+
this.setImage(getPlaceholderImage(this.board, this.imageDimension));
|
|
42244
|
+
this.updateMbr();
|
|
42245
|
+
this.subject.publish(this);
|
|
42246
|
+
this.shootLoadCallbacks();
|
|
42247
|
+
return;
|
|
42248
|
+
}
|
|
42242
42249
|
this.image.src = this.signedUrl;
|
|
42243
42250
|
}
|
|
42244
42251
|
getStorageId() {
|
|
@@ -51888,7 +51895,8 @@ function transformShape({
|
|
|
51888
51895
|
isHeight,
|
|
51889
51896
|
isWidth,
|
|
51890
51897
|
startMbr,
|
|
51891
|
-
followingComments
|
|
51898
|
+
followingComments,
|
|
51899
|
+
beginTimeStamp
|
|
51892
51900
|
}) {
|
|
51893
51901
|
let translation = null;
|
|
51894
51902
|
if (isShiftPressed && single.itemType !== "Sticker") {
|
|
@@ -51903,7 +51911,7 @@ function transformShape({
|
|
|
51903
51911
|
});
|
|
51904
51912
|
return { resizedMbr, translation };
|
|
51905
51913
|
} else {
|
|
51906
|
-
const resizedMbr = single.doResize(resizeType, board.pointer.point, mbr, oppositePoint, startMbr || new Mbr, Date.now()).mbr;
|
|
51914
|
+
const resizedMbr = single.doResize(resizeType, board.pointer.point, mbr, oppositePoint, startMbr || new Mbr, beginTimeStamp ?? Date.now()).mbr;
|
|
51907
51915
|
if (followingComments) {
|
|
51908
51916
|
const { matrix, mbr: resizedMbr2 } = single instanceof Sticker ? getProportionalResize(resizeType, board.pointer.point, mbr, oppositePoint) : getResize(resizeType, board.pointer.point, mbr, oppositePoint);
|
|
51909
51917
|
translation = handleMultipleItemsResize({
|
|
@@ -52423,7 +52431,8 @@ class Transformer extends Tool {
|
|
|
52423
52431
|
resizeType: this.resizeType,
|
|
52424
52432
|
oppositePoint: this.oppositePoint,
|
|
52425
52433
|
followingComments,
|
|
52426
|
-
startMbr: this.startMbr
|
|
52434
|
+
startMbr: this.startMbr,
|
|
52435
|
+
beginTimeStamp: this.beginTimeStamp
|
|
52427
52436
|
});
|
|
52428
52437
|
this.mbr = resizedMbr;
|
|
52429
52438
|
if (translation) {
|
package/dist/cjs/index.js
CHANGED
|
@@ -42239,6 +42239,13 @@ 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
|
+
this.setImage(getPlaceholderImage(this.board, this.imageDimension));
|
|
42244
|
+
this.updateMbr();
|
|
42245
|
+
this.subject.publish(this);
|
|
42246
|
+
this.shootLoadCallbacks();
|
|
42247
|
+
return;
|
|
42248
|
+
}
|
|
42242
42249
|
this.image.src = this.signedUrl;
|
|
42243
42250
|
}
|
|
42244
42251
|
getStorageId() {
|
|
@@ -51888,7 +51895,8 @@ function transformShape({
|
|
|
51888
51895
|
isHeight,
|
|
51889
51896
|
isWidth,
|
|
51890
51897
|
startMbr,
|
|
51891
|
-
followingComments
|
|
51898
|
+
followingComments,
|
|
51899
|
+
beginTimeStamp
|
|
51892
51900
|
}) {
|
|
51893
51901
|
let translation = null;
|
|
51894
51902
|
if (isShiftPressed && single.itemType !== "Sticker") {
|
|
@@ -51903,7 +51911,7 @@ function transformShape({
|
|
|
51903
51911
|
});
|
|
51904
51912
|
return { resizedMbr, translation };
|
|
51905
51913
|
} else {
|
|
51906
|
-
const resizedMbr = single.doResize(resizeType, board.pointer.point, mbr, oppositePoint, startMbr || new Mbr, Date.now()).mbr;
|
|
51914
|
+
const resizedMbr = single.doResize(resizeType, board.pointer.point, mbr, oppositePoint, startMbr || new Mbr, beginTimeStamp ?? Date.now()).mbr;
|
|
51907
51915
|
if (followingComments) {
|
|
51908
51916
|
const { matrix, mbr: resizedMbr2 } = single instanceof Sticker ? getProportionalResize(resizeType, board.pointer.point, mbr, oppositePoint) : getResize(resizeType, board.pointer.point, mbr, oppositePoint);
|
|
51909
51917
|
translation = handleMultipleItemsResize({
|
|
@@ -52423,7 +52431,8 @@ class Transformer extends Tool {
|
|
|
52423
52431
|
resizeType: this.resizeType,
|
|
52424
52432
|
oppositePoint: this.oppositePoint,
|
|
52425
52433
|
followingComments,
|
|
52426
|
-
startMbr: this.startMbr
|
|
52434
|
+
startMbr: this.startMbr,
|
|
52435
|
+
beginTimeStamp: this.beginTimeStamp
|
|
52427
52436
|
});
|
|
52428
52437
|
this.mbr = resizedMbr;
|
|
52429
52438
|
if (translation) {
|
package/dist/cjs/node.js
CHANGED
|
@@ -44712,6 +44712,13 @@ 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
|
+
this.setImage(getPlaceholderImage(this.board, this.imageDimension));
|
|
44717
|
+
this.updateMbr();
|
|
44718
|
+
this.subject.publish(this);
|
|
44719
|
+
this.shootLoadCallbacks();
|
|
44720
|
+
return;
|
|
44721
|
+
}
|
|
44715
44722
|
this.image.src = this.signedUrl;
|
|
44716
44723
|
}
|
|
44717
44724
|
getStorageId() {
|
|
@@ -54361,7 +54368,8 @@ function transformShape({
|
|
|
54361
54368
|
isHeight,
|
|
54362
54369
|
isWidth,
|
|
54363
54370
|
startMbr,
|
|
54364
|
-
followingComments
|
|
54371
|
+
followingComments,
|
|
54372
|
+
beginTimeStamp
|
|
54365
54373
|
}) {
|
|
54366
54374
|
let translation = null;
|
|
54367
54375
|
if (isShiftPressed && single.itemType !== "Sticker") {
|
|
@@ -54376,7 +54384,7 @@ function transformShape({
|
|
|
54376
54384
|
});
|
|
54377
54385
|
return { resizedMbr, translation };
|
|
54378
54386
|
} else {
|
|
54379
|
-
const resizedMbr = single.doResize(resizeType, board.pointer.point, mbr, oppositePoint, startMbr || new Mbr, Date.now()).mbr;
|
|
54387
|
+
const resizedMbr = single.doResize(resizeType, board.pointer.point, mbr, oppositePoint, startMbr || new Mbr, beginTimeStamp ?? Date.now()).mbr;
|
|
54380
54388
|
if (followingComments) {
|
|
54381
54389
|
const { matrix, mbr: resizedMbr2 } = single instanceof Sticker ? getProportionalResize(resizeType, board.pointer.point, mbr, oppositePoint) : getResize(resizeType, board.pointer.point, mbr, oppositePoint);
|
|
54382
54390
|
translation = handleMultipleItemsResize({
|
|
@@ -54896,7 +54904,8 @@ class Transformer extends Tool {
|
|
|
54896
54904
|
resizeType: this.resizeType,
|
|
54897
54905
|
oppositePoint: this.oppositePoint,
|
|
54898
54906
|
followingComments,
|
|
54899
|
-
startMbr: this.startMbr
|
|
54907
|
+
startMbr: this.startMbr,
|
|
54908
|
+
beginTimeStamp: this.beginTimeStamp
|
|
54900
54909
|
});
|
|
54901
54910
|
this.mbr = resizedMbr;
|
|
54902
54911
|
if (translation) {
|
package/dist/esm/browser.js
CHANGED
|
@@ -42082,6 +42082,13 @@ 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
|
+
this.setImage(getPlaceholderImage(this.board, this.imageDimension));
|
|
42087
|
+
this.updateMbr();
|
|
42088
|
+
this.subject.publish(this);
|
|
42089
|
+
this.shootLoadCallbacks();
|
|
42090
|
+
return;
|
|
42091
|
+
}
|
|
42085
42092
|
this.image.src = this.signedUrl;
|
|
42086
42093
|
}
|
|
42087
42094
|
getStorageId() {
|
|
@@ -51731,7 +51738,8 @@ function transformShape({
|
|
|
51731
51738
|
isHeight,
|
|
51732
51739
|
isWidth,
|
|
51733
51740
|
startMbr,
|
|
51734
|
-
followingComments
|
|
51741
|
+
followingComments,
|
|
51742
|
+
beginTimeStamp
|
|
51735
51743
|
}) {
|
|
51736
51744
|
let translation = null;
|
|
51737
51745
|
if (isShiftPressed && single.itemType !== "Sticker") {
|
|
@@ -51746,7 +51754,7 @@ function transformShape({
|
|
|
51746
51754
|
});
|
|
51747
51755
|
return { resizedMbr, translation };
|
|
51748
51756
|
} else {
|
|
51749
|
-
const resizedMbr = single.doResize(resizeType, board.pointer.point, mbr, oppositePoint, startMbr || new Mbr, Date.now()).mbr;
|
|
51757
|
+
const resizedMbr = single.doResize(resizeType, board.pointer.point, mbr, oppositePoint, startMbr || new Mbr, beginTimeStamp ?? Date.now()).mbr;
|
|
51750
51758
|
if (followingComments) {
|
|
51751
51759
|
const { matrix, mbr: resizedMbr2 } = single instanceof Sticker ? getProportionalResize(resizeType, board.pointer.point, mbr, oppositePoint) : getResize(resizeType, board.pointer.point, mbr, oppositePoint);
|
|
51752
51760
|
translation = handleMultipleItemsResize({
|
|
@@ -52266,7 +52274,8 @@ class Transformer extends Tool {
|
|
|
52266
52274
|
resizeType: this.resizeType,
|
|
52267
52275
|
oppositePoint: this.oppositePoint,
|
|
52268
52276
|
followingComments,
|
|
52269
|
-
startMbr: this.startMbr
|
|
52277
|
+
startMbr: this.startMbr,
|
|
52278
|
+
beginTimeStamp: this.beginTimeStamp
|
|
52270
52279
|
});
|
|
52271
52280
|
this.mbr = resizedMbr;
|
|
52272
52281
|
if (translation) {
|
package/dist/esm/index.js
CHANGED
|
@@ -42075,6 +42075,13 @@ 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
|
+
this.setImage(getPlaceholderImage(this.board, this.imageDimension));
|
|
42080
|
+
this.updateMbr();
|
|
42081
|
+
this.subject.publish(this);
|
|
42082
|
+
this.shootLoadCallbacks();
|
|
42083
|
+
return;
|
|
42084
|
+
}
|
|
42078
42085
|
this.image.src = this.signedUrl;
|
|
42079
42086
|
}
|
|
42080
42087
|
getStorageId() {
|
|
@@ -51724,7 +51731,8 @@ function transformShape({
|
|
|
51724
51731
|
isHeight,
|
|
51725
51732
|
isWidth,
|
|
51726
51733
|
startMbr,
|
|
51727
|
-
followingComments
|
|
51734
|
+
followingComments,
|
|
51735
|
+
beginTimeStamp
|
|
51728
51736
|
}) {
|
|
51729
51737
|
let translation = null;
|
|
51730
51738
|
if (isShiftPressed && single.itemType !== "Sticker") {
|
|
@@ -51739,7 +51747,7 @@ function transformShape({
|
|
|
51739
51747
|
});
|
|
51740
51748
|
return { resizedMbr, translation };
|
|
51741
51749
|
} else {
|
|
51742
|
-
const resizedMbr = single.doResize(resizeType, board.pointer.point, mbr, oppositePoint, startMbr || new Mbr, Date.now()).mbr;
|
|
51750
|
+
const resizedMbr = single.doResize(resizeType, board.pointer.point, mbr, oppositePoint, startMbr || new Mbr, beginTimeStamp ?? Date.now()).mbr;
|
|
51743
51751
|
if (followingComments) {
|
|
51744
51752
|
const { matrix, mbr: resizedMbr2 } = single instanceof Sticker ? getProportionalResize(resizeType, board.pointer.point, mbr, oppositePoint) : getResize(resizeType, board.pointer.point, mbr, oppositePoint);
|
|
51745
51753
|
translation = handleMultipleItemsResize({
|
|
@@ -52259,7 +52267,8 @@ class Transformer extends Tool {
|
|
|
52259
52267
|
resizeType: this.resizeType,
|
|
52260
52268
|
oppositePoint: this.oppositePoint,
|
|
52261
52269
|
followingComments,
|
|
52262
|
-
startMbr: this.startMbr
|
|
52270
|
+
startMbr: this.startMbr,
|
|
52271
|
+
beginTimeStamp: this.beginTimeStamp
|
|
52263
52272
|
});
|
|
52264
52273
|
this.mbr = resizedMbr;
|
|
52265
52274
|
if (translation) {
|
package/dist/esm/node.js
CHANGED
|
@@ -44543,6 +44543,13 @@ 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
|
+
this.setImage(getPlaceholderImage(this.board, this.imageDimension));
|
|
44548
|
+
this.updateMbr();
|
|
44549
|
+
this.subject.publish(this);
|
|
44550
|
+
this.shootLoadCallbacks();
|
|
44551
|
+
return;
|
|
44552
|
+
}
|
|
44546
44553
|
this.image.src = this.signedUrl;
|
|
44547
44554
|
}
|
|
44548
44555
|
getStorageId() {
|
|
@@ -54192,7 +54199,8 @@ function transformShape({
|
|
|
54192
54199
|
isHeight,
|
|
54193
54200
|
isWidth,
|
|
54194
54201
|
startMbr,
|
|
54195
|
-
followingComments
|
|
54202
|
+
followingComments,
|
|
54203
|
+
beginTimeStamp
|
|
54196
54204
|
}) {
|
|
54197
54205
|
let translation = null;
|
|
54198
54206
|
if (isShiftPressed && single.itemType !== "Sticker") {
|
|
@@ -54207,7 +54215,7 @@ function transformShape({
|
|
|
54207
54215
|
});
|
|
54208
54216
|
return { resizedMbr, translation };
|
|
54209
54217
|
} else {
|
|
54210
|
-
const resizedMbr = single.doResize(resizeType, board.pointer.point, mbr, oppositePoint, startMbr || new Mbr, Date.now()).mbr;
|
|
54218
|
+
const resizedMbr = single.doResize(resizeType, board.pointer.point, mbr, oppositePoint, startMbr || new Mbr, beginTimeStamp ?? Date.now()).mbr;
|
|
54211
54219
|
if (followingComments) {
|
|
54212
54220
|
const { matrix, mbr: resizedMbr2 } = single instanceof Sticker ? getProportionalResize(resizeType, board.pointer.point, mbr, oppositePoint) : getResize(resizeType, board.pointer.point, mbr, oppositePoint);
|
|
54213
54221
|
translation = handleMultipleItemsResize({
|
|
@@ -54727,7 +54735,8 @@ class Transformer extends Tool {
|
|
|
54727
54735
|
resizeType: this.resizeType,
|
|
54728
54736
|
oppositePoint: this.oppositePoint,
|
|
54729
54737
|
followingComments,
|
|
54730
|
-
startMbr: this.startMbr
|
|
54738
|
+
startMbr: this.startMbr,
|
|
54739
|
+
beginTimeStamp: this.beginTimeStamp
|
|
54731
54740
|
});
|
|
54732
54741
|
this.mbr = resizedMbr;
|
|
54733
54742
|
if (translation) {
|
|
@@ -7,7 +7,7 @@ import { Board } from "../../../Board";
|
|
|
7
7
|
import { ResizeType } from "../../Transformer/TransformerHelpers/getResizeType";
|
|
8
8
|
import { Point } from "../../../Items/Point/Point";
|
|
9
9
|
import { Comment } from "../../../Items/Comment/Comment";
|
|
10
|
-
export declare function transformShape({ mbr, board, single, oppositePoint, resizeType, isShiftPressed, isHeight, isWidth, startMbr, followingComments, }: {
|
|
10
|
+
export declare function transformShape({ mbr, board, single, oppositePoint, resizeType, isShiftPressed, isHeight, isWidth, startMbr, followingComments, beginTimeStamp, }: {
|
|
11
11
|
single: Sticker | Shape | Frame;
|
|
12
12
|
board: Board;
|
|
13
13
|
resizeType: ResizeType;
|
|
@@ -18,6 +18,7 @@ export declare function transformShape({ mbr, board, single, oppositePoint, resi
|
|
|
18
18
|
isHeight: boolean;
|
|
19
19
|
followingComments?: Comment[];
|
|
20
20
|
startMbr?: Mbr;
|
|
21
|
+
beginTimeStamp?: number;
|
|
21
22
|
}): {
|
|
22
23
|
resizedMbr: Mbr;
|
|
23
24
|
translation: ApplyMatrixItem[] | null;
|