microboard-temp 0.4.7 → 0.4.9

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.
@@ -752,7 +752,7 @@ __export(exports_browser, {
752
752
  ConnectorData: () => ConnectorData2,
753
753
  Connector: () => Connector2,
754
754
  ConnectionLineWidths: () => ConnectionLineWidths,
755
- Comment: () => Comment2,
755
+ Comment: () => Comment,
756
756
  Camera: () => Camera,
757
757
  CURSORS_IDLE_CLEANUP_DELAY: () => CURSORS_IDLE_CLEANUP_DELAY,
758
758
  CURSORS_ANIMATION_DURATION: () => CURSORS_ANIMATION_DURATION,
@@ -18953,7 +18953,7 @@ var v4_default = v4;
18953
18953
  // src/Items/Comment/Comment.ts
18954
18954
  var ANONYMOUS_ID = 9999999999;
18955
18955
 
18956
- class Comment2 {
18956
+ class Comment {
18957
18957
  anchor;
18958
18958
  events;
18959
18959
  id;
@@ -19726,6 +19726,9 @@ class BaseItem extends Mbr {
19726
19726
  getPathMbr() {
19727
19727
  return this.getMbr().copy();
19728
19728
  }
19729
+ getPath() {
19730
+ return new Path(this.getMbr().getLines());
19731
+ }
19729
19732
  render(context) {}
19730
19733
  renderHTML(documentFactory) {
19731
19734
  return documentFactory.createElement("div");
@@ -38497,10 +38500,6 @@ class Frame extends BaseItem {
38497
38500
  return this.mbr.copy();
38498
38501
  }
38499
38502
  doResize(resizeType, pointer, mbr, opposite, startMbr, timeStamp) {
38500
- if (this.transformation.isLocked) {
38501
- this.board?.pointer.setCursor("default");
38502
- return false;
38503
- }
38504
38503
  const res = this.getCanChangeRatio() ? getResize(resizeType, pointer, mbr, opposite) : getProportionalResize(resizeType, pointer, mbr, opposite);
38505
38504
  if (!res) {
38506
38505
  return {
@@ -41078,7 +41077,7 @@ function createComment(id, data, board) {
41078
41077
  if (!isCommentData(data)) {
41079
41078
  throw new Error("Invalid data for Comment");
41080
41079
  }
41081
- const comment2 = new Comment2(new Point, board.events).setId(id).deserialize(data);
41080
+ const comment2 = new Comment(new Point, board.events).setId(id).deserialize(data);
41082
41081
  return comment2;
41083
41082
  }
41084
41083
  function createAINode(id, data, board) {
@@ -41282,7 +41281,7 @@ class AddComment extends BoardTool {
41282
41281
  leftButtonUp() {
41283
41282
  this.isDown = false;
41284
41283
  this.board.selection.removeAll();
41285
- this.comment = this.board.add(this.board, new Comment(this.board.pointer.point));
41284
+ this.comment = this.board.add(new Comment(this.board.pointer.point));
41286
41285
  this.board.tools.publish();
41287
41286
  return true;
41288
41287
  }
@@ -41602,7 +41601,6 @@ class ConnectorSnap {
41602
41601
 
41603
41602
  // src/Tools/AddConnector/AddConnector.ts
41604
41603
  class AddConnector extends BoardTool {
41605
- board;
41606
41604
  connector = null;
41607
41605
  lineStyle = "curved";
41608
41606
  startPointer;
@@ -41617,7 +41615,6 @@ class AddConnector extends BoardTool {
41617
41615
  isQuickAdd = false;
41618
41616
  constructor(board, itemToStart, position4) {
41619
41617
  super(board);
41620
- this.board = board;
41621
41618
  this.snap = new ConnectorSnap(this.board);
41622
41619
  this.setCursor();
41623
41620
  const storage = new SessionStorage;
@@ -41679,16 +41676,16 @@ class AddConnector extends BoardTool {
41679
41676
  this.board.tools.publish();
41680
41677
  return true;
41681
41678
  }
41682
- async leftButtonUp() {
41679
+ leftButtonUp() {
41683
41680
  this.isDown = false;
41684
41681
  if (!this.connector) {
41685
41682
  return true;
41686
41683
  }
41687
41684
  if (this.isDoneSecondPoint) {
41688
- await this.board.add(this.connector);
41685
+ this.board.add(this.connector);
41689
41686
  this.board.tools.select();
41690
41687
  } else if (this.isDraggingFromFirstToSecond) {
41691
- const addedConnector = await this.board.add(this.connector);
41688
+ const addedConnector = this.board.add(this.connector);
41692
41689
  const endPoint = this.connector.getEndPoint();
41693
41690
  this.board.tools.select();
41694
41691
  if (this.isQuickAdd && endPoint.pointType === "Board") {
@@ -42488,12 +42485,10 @@ class AddSticker extends BoardTool {
42488
42485
  var height2 = 16;
42489
42486
 
42490
42487
  class AddText extends BoardTool {
42491
- board;
42492
42488
  line;
42493
42489
  bounds = new Mbr;
42494
42490
  constructor(board) {
42495
42491
  super(board);
42496
- this.board = board;
42497
42492
  this.setCursor();
42498
42493
  }
42499
42494
  setCursor() {
@@ -42520,7 +42515,7 @@ class AddText extends BoardTool {
42520
42515
  }
42521
42516
  return false;
42522
42517
  }
42523
- async leftButtonUp() {
42518
+ leftButtonUp() {
42524
42519
  if (this.line) {
42525
42520
  const board = this.board;
42526
42521
  const richText = new RichText(this.board, new Mbr);
@@ -42528,7 +42523,7 @@ class AddText extends BoardTool {
42528
42523
  richText.transformation.applyScaleBy(1, 1);
42529
42524
  richText.editor.maxWidth = 600;
42530
42525
  richText.insideOf = richText.itemType;
42531
- const text5 = await board.add(richText);
42526
+ const text5 = board.add(richText);
42532
42527
  this.board.selection.removeAll();
42533
42528
  this.board.selection.add(text5);
42534
42529
  this.board.selection.editText();
@@ -43799,7 +43794,7 @@ class AlignmentHelper {
43799
43794
  if (i === 0) {
43800
43795
  return acc;
43801
43796
  }
43802
- const itemMbr = item.itemType === "Shape" ? item.getPath().getMbr() : item.getMbr();
43797
+ const itemMbr = item.getPathMbr();
43803
43798
  return acc.combine(itemMbr);
43804
43799
  }, items[0].getMbr());
43805
43800
  }
@@ -44118,9 +44113,11 @@ class AlignmentHelper {
44118
44113
  const translation = this.board.selection.getManyItemsTranslation(x, y);
44119
44114
  this.board.selection.transformMany(translation, timeStamp);
44120
44115
  } else {
44121
- const key = item.getId();
44116
+ const id = item.getId();
44122
44117
  const transformMap = {};
44123
- transformMap[key] = {
44118
+ transformMap[id] = {
44119
+ class: "Transformation",
44120
+ item: [id],
44124
44121
  method: "translateBy",
44125
44122
  x,
44126
44123
  y,
@@ -44425,7 +44422,7 @@ class Select extends Tool {
44425
44422
  const itemCenter = this.downOnItem.getMbr().getCenter();
44426
44423
  this.initialCursorPos = new Point(this.board.pointer.point.x - itemCenter.x, this.board.pointer.point.y - itemCenter.y);
44427
44424
  }
44428
- if (this.downOnItem.itemType === "Connector" && this.downOnItem.isConnectedOnePoint() && !this.board.keyboard.isCtrl) {
44425
+ if (this.downOnItem instanceof Connector2 && this.downOnItem.isConnectedOnePoint() && !this.board.keyboard.isCtrl) {
44429
44426
  this.board.selection.editUnderPointer();
44430
44427
  this.board.tools.publish();
44431
44428
  this.clear();
@@ -44474,7 +44471,7 @@ class Select extends Tool {
44474
44471
  const isDrawingSelectionMbr = this.isDrawingRectangle && this.line && this.rect;
44475
44472
  if (isDrawingSelectionMbr) {
44476
44473
  const point5 = this.board.pointer.point.copy();
44477
- this.line = new Line(this.line.start, point5);
44474
+ this.line = new Line(this.line?.start, point5);
44478
44475
  this.rect = this.line.getMbr();
44479
44476
  this.rect.borderColor = conf.SELECTION_COLOR;
44480
44477
  this.rect.backgroundColor = conf.SELECTION_BACKGROUND;
@@ -44715,7 +44712,7 @@ class Select extends Tool {
44715
44712
  const isNotInSelection = this.board.selection.items.findById(underPointer.getId()) === null;
44716
44713
  if (isNotInSelection) {
44717
44714
  this.board.selection.add(underPointer);
44718
- if (underPointer.itemType === "Frame") {
44715
+ if (underPointer instanceof Frame) {
44719
44716
  const { left, right, top, bottom } = underPointer.getMbr();
44720
44717
  const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => underPointer.getChildrenIds().includes(item.getId()));
44721
44718
  this.board.selection.add(itemsInFrame);
@@ -44843,13 +44840,13 @@ class Select extends Tool {
44843
44840
  }
44844
44841
  onConfirm() {
44845
44842
  const single = this.board.selection.items.getSingle();
44846
- if (this.board.selection.showQuickAddPanel && single && single.itemType === "Connector") {
44847
- quickAddItem(this.board, "copy", single);
44843
+ if (this.board.selection.showQuickAddPanel && single && single instanceof Connector2) {
44844
+ quickAddItem(this.board, "Rectangle", single);
44848
44845
  } else if (single && this.board.selection.getContext() !== "EditTextUnderPointer" && !this.board.selection.getIsLockedSelection()) {
44849
44846
  this.board.selection.editText(undefined, true);
44850
44847
  } else if (isSafari() && this.board.selection.getContext() === "EditTextUnderPointer" && !this.board.selection.getIsLockedSelection()) {
44851
- if (single && "text" in single || single?.itemType === "RichText") {
44852
- const text5 = single.itemType === "RichText" ? single : single.text;
44848
+ if (single && "text" in single || single instanceof RichText) {
44849
+ const text5 = single instanceof RichText ? single : single.text;
44853
44850
  text5.editor.splitNode();
44854
44851
  }
44855
44852
  }
@@ -49340,7 +49337,7 @@ class SpatialIndex {
49340
49337
  return this.itemsIndex.getRectsEnclosedOrCrossedBy(new Mbr(left, top, right, bottom));
49341
49338
  }
49342
49339
  getComments() {
49343
- return this.itemsArray.filter((item) => item instanceof Comment2);
49340
+ return this.itemsArray.filter((item) => item instanceof Comment);
49344
49341
  }
49345
49342
  getMbr() {
49346
49343
  return this.Mbr;
@@ -50042,7 +50039,7 @@ function getItemTranslation({
50042
50039
  scale: { x: 1, y: 1 }
50043
50040
  };
50044
50041
  } else {
50045
- if (item.itemType === "Frame" && item.getCanChangeRatio() && isShiftPressed && item.getFrameType() !== "Custom") {
50042
+ if (item instanceof Frame && item.getCanChangeRatio() && isShiftPressed && item.getFrameType() !== "Custom") {
50046
50043
  item.setFrameType("Custom");
50047
50044
  }
50048
50045
  return {
@@ -50055,7 +50052,7 @@ function getItemTranslation({
50055
50052
  }
50056
50053
  }
50057
50054
 
50058
- // src/Selection/Transformer/TransformerHelpers/ransformShape.ts
50055
+ // src/Selection/Transformer/TransformerHelpers/transformShape.ts
50059
50056
  function transformShape({
50060
50057
  mbr,
50061
50058
  board,
@@ -50325,7 +50322,7 @@ function transformItems({
50325
50322
  if (includesProportionalItem && (isWidth || isHeight)) {
50326
50323
  return null;
50327
50324
  }
50328
- const isIncludesFixedFrame = items.some((item) => item.itemType === "Frame" && !item.getCanChangeRatio());
50325
+ const isIncludesFixedFrame = items.some((item) => item instanceof Frame && !item.getCanChangeRatio());
50329
50326
  const shouldBeProportionalResize = isIncludesFixedFrame || includesProportionalItem || isShiftPressed || !isWidth && !isHeight;
50330
50327
  const resize = shouldBeProportionalResize ? getProportionalResize(resizeType, board.pointer.point, mbr, oppositePoint) : getResize(resizeType, board.pointer.point, mbr, oppositePoint);
50331
50328
  if (canvasDrawer.getLastCreatedCanvas() && !debounceUpd.shouldUpd()) {
@@ -50497,7 +50494,7 @@ class Transformer extends Tool {
50497
50494
  return resizeType;
50498
50495
  }
50499
50496
  updateAlignmentBySnapLines(single) {
50500
- if (single) {
50497
+ if (single && this.resizeType) {
50501
50498
  this.snapLines = this.alignmentHelper.checkAlignment(single);
50502
50499
  const snapped = this.alignmentHelper.snapToSide(single, this.snapLines, this.beginTimeStamp, this.resizeType);
50503
50500
  if (snapped) {
@@ -53178,7 +53175,7 @@ class Board {
53178
53175
  }
53179
53176
  removeVoidComments() {
53180
53177
  const voidComments = this.items.listAll().filter((item) => {
53181
- return item instanceof Comment2 && !item.getThread().length;
53178
+ return item instanceof Comment && !item.getThread().length;
53182
53179
  });
53183
53180
  if (voidComments) {
53184
53181
  for (const comment2 of voidComments) {
@@ -53644,7 +53641,7 @@ function mergeRichTextOperations(opA, opB) {
53644
53641
  return;
53645
53642
  }
53646
53643
  function mergeRichTextCreation(opA, opB) {
53647
- if (opA.method === "add" && opB.method === "edit" && opA.item === opB.item[0] && opB.ops[0].type === "insert_text") {
53644
+ if (opA.method === "add" && opA.data.itemType === "RichText" && opB.method === "edit" && opA.item === opB.item[0] && opB.ops[0].type === "insert_text") {
53648
53645
  const op = {
53649
53646
  ...opA,
53650
53647
  data: {
package/dist/cjs/index.js CHANGED
@@ -752,7 +752,7 @@ __export(exports_src, {
752
752
  ConnectorData: () => ConnectorData2,
753
753
  Connector: () => Connector2,
754
754
  ConnectionLineWidths: () => ConnectionLineWidths,
755
- Comment: () => Comment2,
755
+ Comment: () => Comment,
756
756
  Camera: () => Camera,
757
757
  CURSORS_IDLE_CLEANUP_DELAY: () => CURSORS_IDLE_CLEANUP_DELAY,
758
758
  CURSORS_ANIMATION_DURATION: () => CURSORS_ANIMATION_DURATION,
@@ -18953,7 +18953,7 @@ var v4_default = v4;
18953
18953
  // src/Items/Comment/Comment.ts
18954
18954
  var ANONYMOUS_ID = 9999999999;
18955
18955
 
18956
- class Comment2 {
18956
+ class Comment {
18957
18957
  anchor;
18958
18958
  events;
18959
18959
  id;
@@ -19726,6 +19726,9 @@ class BaseItem extends Mbr {
19726
19726
  getPathMbr() {
19727
19727
  return this.getMbr().copy();
19728
19728
  }
19729
+ getPath() {
19730
+ return new Path(this.getMbr().getLines());
19731
+ }
19729
19732
  render(context) {}
19730
19733
  renderHTML(documentFactory) {
19731
19734
  return documentFactory.createElement("div");
@@ -38497,10 +38500,6 @@ class Frame extends BaseItem {
38497
38500
  return this.mbr.copy();
38498
38501
  }
38499
38502
  doResize(resizeType, pointer, mbr, opposite, startMbr, timeStamp) {
38500
- if (this.transformation.isLocked) {
38501
- this.board?.pointer.setCursor("default");
38502
- return false;
38503
- }
38504
38503
  const res = this.getCanChangeRatio() ? getResize(resizeType, pointer, mbr, opposite) : getProportionalResize(resizeType, pointer, mbr, opposite);
38505
38504
  if (!res) {
38506
38505
  return {
@@ -41078,7 +41077,7 @@ function createComment(id, data, board) {
41078
41077
  if (!isCommentData(data)) {
41079
41078
  throw new Error("Invalid data for Comment");
41080
41079
  }
41081
- const comment2 = new Comment2(new Point, board.events).setId(id).deserialize(data);
41080
+ const comment2 = new Comment(new Point, board.events).setId(id).deserialize(data);
41082
41081
  return comment2;
41083
41082
  }
41084
41083
  function createAINode(id, data, board) {
@@ -41282,7 +41281,7 @@ class AddComment extends BoardTool {
41282
41281
  leftButtonUp() {
41283
41282
  this.isDown = false;
41284
41283
  this.board.selection.removeAll();
41285
- this.comment = this.board.add(this.board, new Comment(this.board.pointer.point));
41284
+ this.comment = this.board.add(new Comment(this.board.pointer.point));
41286
41285
  this.board.tools.publish();
41287
41286
  return true;
41288
41287
  }
@@ -41602,7 +41601,6 @@ class ConnectorSnap {
41602
41601
 
41603
41602
  // src/Tools/AddConnector/AddConnector.ts
41604
41603
  class AddConnector extends BoardTool {
41605
- board;
41606
41604
  connector = null;
41607
41605
  lineStyle = "curved";
41608
41606
  startPointer;
@@ -41617,7 +41615,6 @@ class AddConnector extends BoardTool {
41617
41615
  isQuickAdd = false;
41618
41616
  constructor(board, itemToStart, position4) {
41619
41617
  super(board);
41620
- this.board = board;
41621
41618
  this.snap = new ConnectorSnap(this.board);
41622
41619
  this.setCursor();
41623
41620
  const storage = new SessionStorage;
@@ -41679,16 +41676,16 @@ class AddConnector extends BoardTool {
41679
41676
  this.board.tools.publish();
41680
41677
  return true;
41681
41678
  }
41682
- async leftButtonUp() {
41679
+ leftButtonUp() {
41683
41680
  this.isDown = false;
41684
41681
  if (!this.connector) {
41685
41682
  return true;
41686
41683
  }
41687
41684
  if (this.isDoneSecondPoint) {
41688
- await this.board.add(this.connector);
41685
+ this.board.add(this.connector);
41689
41686
  this.board.tools.select();
41690
41687
  } else if (this.isDraggingFromFirstToSecond) {
41691
- const addedConnector = await this.board.add(this.connector);
41688
+ const addedConnector = this.board.add(this.connector);
41692
41689
  const endPoint = this.connector.getEndPoint();
41693
41690
  this.board.tools.select();
41694
41691
  if (this.isQuickAdd && endPoint.pointType === "Board") {
@@ -42488,12 +42485,10 @@ class AddSticker extends BoardTool {
42488
42485
  var height2 = 16;
42489
42486
 
42490
42487
  class AddText extends BoardTool {
42491
- board;
42492
42488
  line;
42493
42489
  bounds = new Mbr;
42494
42490
  constructor(board) {
42495
42491
  super(board);
42496
- this.board = board;
42497
42492
  this.setCursor();
42498
42493
  }
42499
42494
  setCursor() {
@@ -42520,7 +42515,7 @@ class AddText extends BoardTool {
42520
42515
  }
42521
42516
  return false;
42522
42517
  }
42523
- async leftButtonUp() {
42518
+ leftButtonUp() {
42524
42519
  if (this.line) {
42525
42520
  const board = this.board;
42526
42521
  const richText = new RichText(this.board, new Mbr);
@@ -42528,7 +42523,7 @@ class AddText extends BoardTool {
42528
42523
  richText.transformation.applyScaleBy(1, 1);
42529
42524
  richText.editor.maxWidth = 600;
42530
42525
  richText.insideOf = richText.itemType;
42531
- const text5 = await board.add(richText);
42526
+ const text5 = board.add(richText);
42532
42527
  this.board.selection.removeAll();
42533
42528
  this.board.selection.add(text5);
42534
42529
  this.board.selection.editText();
@@ -43799,7 +43794,7 @@ class AlignmentHelper {
43799
43794
  if (i === 0) {
43800
43795
  return acc;
43801
43796
  }
43802
- const itemMbr = item.itemType === "Shape" ? item.getPath().getMbr() : item.getMbr();
43797
+ const itemMbr = item.getPathMbr();
43803
43798
  return acc.combine(itemMbr);
43804
43799
  }, items[0].getMbr());
43805
43800
  }
@@ -44118,9 +44113,11 @@ class AlignmentHelper {
44118
44113
  const translation = this.board.selection.getManyItemsTranslation(x, y);
44119
44114
  this.board.selection.transformMany(translation, timeStamp);
44120
44115
  } else {
44121
- const key = item.getId();
44116
+ const id = item.getId();
44122
44117
  const transformMap = {};
44123
- transformMap[key] = {
44118
+ transformMap[id] = {
44119
+ class: "Transformation",
44120
+ item: [id],
44124
44121
  method: "translateBy",
44125
44122
  x,
44126
44123
  y,
@@ -44425,7 +44422,7 @@ class Select extends Tool {
44425
44422
  const itemCenter = this.downOnItem.getMbr().getCenter();
44426
44423
  this.initialCursorPos = new Point(this.board.pointer.point.x - itemCenter.x, this.board.pointer.point.y - itemCenter.y);
44427
44424
  }
44428
- if (this.downOnItem.itemType === "Connector" && this.downOnItem.isConnectedOnePoint() && !this.board.keyboard.isCtrl) {
44425
+ if (this.downOnItem instanceof Connector2 && this.downOnItem.isConnectedOnePoint() && !this.board.keyboard.isCtrl) {
44429
44426
  this.board.selection.editUnderPointer();
44430
44427
  this.board.tools.publish();
44431
44428
  this.clear();
@@ -44474,7 +44471,7 @@ class Select extends Tool {
44474
44471
  const isDrawingSelectionMbr = this.isDrawingRectangle && this.line && this.rect;
44475
44472
  if (isDrawingSelectionMbr) {
44476
44473
  const point5 = this.board.pointer.point.copy();
44477
- this.line = new Line(this.line.start, point5);
44474
+ this.line = new Line(this.line?.start, point5);
44478
44475
  this.rect = this.line.getMbr();
44479
44476
  this.rect.borderColor = conf.SELECTION_COLOR;
44480
44477
  this.rect.backgroundColor = conf.SELECTION_BACKGROUND;
@@ -44715,7 +44712,7 @@ class Select extends Tool {
44715
44712
  const isNotInSelection = this.board.selection.items.findById(underPointer.getId()) === null;
44716
44713
  if (isNotInSelection) {
44717
44714
  this.board.selection.add(underPointer);
44718
- if (underPointer.itemType === "Frame") {
44715
+ if (underPointer instanceof Frame) {
44719
44716
  const { left, right, top, bottom } = underPointer.getMbr();
44720
44717
  const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => underPointer.getChildrenIds().includes(item.getId()));
44721
44718
  this.board.selection.add(itemsInFrame);
@@ -44843,13 +44840,13 @@ class Select extends Tool {
44843
44840
  }
44844
44841
  onConfirm() {
44845
44842
  const single = this.board.selection.items.getSingle();
44846
- if (this.board.selection.showQuickAddPanel && single && single.itemType === "Connector") {
44847
- quickAddItem(this.board, "copy", single);
44843
+ if (this.board.selection.showQuickAddPanel && single && single instanceof Connector2) {
44844
+ quickAddItem(this.board, "Rectangle", single);
44848
44845
  } else if (single && this.board.selection.getContext() !== "EditTextUnderPointer" && !this.board.selection.getIsLockedSelection()) {
44849
44846
  this.board.selection.editText(undefined, true);
44850
44847
  } else if (isSafari() && this.board.selection.getContext() === "EditTextUnderPointer" && !this.board.selection.getIsLockedSelection()) {
44851
- if (single && "text" in single || single?.itemType === "RichText") {
44852
- const text5 = single.itemType === "RichText" ? single : single.text;
44848
+ if (single && "text" in single || single instanceof RichText) {
44849
+ const text5 = single instanceof RichText ? single : single.text;
44853
44850
  text5.editor.splitNode();
44854
44851
  }
44855
44852
  }
@@ -49340,7 +49337,7 @@ class SpatialIndex {
49340
49337
  return this.itemsIndex.getRectsEnclosedOrCrossedBy(new Mbr(left, top, right, bottom));
49341
49338
  }
49342
49339
  getComments() {
49343
- return this.itemsArray.filter((item) => item instanceof Comment2);
49340
+ return this.itemsArray.filter((item) => item instanceof Comment);
49344
49341
  }
49345
49342
  getMbr() {
49346
49343
  return this.Mbr;
@@ -50042,7 +50039,7 @@ function getItemTranslation({
50042
50039
  scale: { x: 1, y: 1 }
50043
50040
  };
50044
50041
  } else {
50045
- if (item.itemType === "Frame" && item.getCanChangeRatio() && isShiftPressed && item.getFrameType() !== "Custom") {
50042
+ if (item instanceof Frame && item.getCanChangeRatio() && isShiftPressed && item.getFrameType() !== "Custom") {
50046
50043
  item.setFrameType("Custom");
50047
50044
  }
50048
50045
  return {
@@ -50055,7 +50052,7 @@ function getItemTranslation({
50055
50052
  }
50056
50053
  }
50057
50054
 
50058
- // src/Selection/Transformer/TransformerHelpers/ransformShape.ts
50055
+ // src/Selection/Transformer/TransformerHelpers/transformShape.ts
50059
50056
  function transformShape({
50060
50057
  mbr,
50061
50058
  board,
@@ -50325,7 +50322,7 @@ function transformItems({
50325
50322
  if (includesProportionalItem && (isWidth || isHeight)) {
50326
50323
  return null;
50327
50324
  }
50328
- const isIncludesFixedFrame = items.some((item) => item.itemType === "Frame" && !item.getCanChangeRatio());
50325
+ const isIncludesFixedFrame = items.some((item) => item instanceof Frame && !item.getCanChangeRatio());
50329
50326
  const shouldBeProportionalResize = isIncludesFixedFrame || includesProportionalItem || isShiftPressed || !isWidth && !isHeight;
50330
50327
  const resize = shouldBeProportionalResize ? getProportionalResize(resizeType, board.pointer.point, mbr, oppositePoint) : getResize(resizeType, board.pointer.point, mbr, oppositePoint);
50331
50328
  if (canvasDrawer.getLastCreatedCanvas() && !debounceUpd.shouldUpd()) {
@@ -50497,7 +50494,7 @@ class Transformer extends Tool {
50497
50494
  return resizeType;
50498
50495
  }
50499
50496
  updateAlignmentBySnapLines(single) {
50500
- if (single) {
50497
+ if (single && this.resizeType) {
50501
50498
  this.snapLines = this.alignmentHelper.checkAlignment(single);
50502
50499
  const snapped = this.alignmentHelper.snapToSide(single, this.snapLines, this.beginTimeStamp, this.resizeType);
50503
50500
  if (snapped) {
@@ -53178,7 +53175,7 @@ class Board {
53178
53175
  }
53179
53176
  removeVoidComments() {
53180
53177
  const voidComments = this.items.listAll().filter((item) => {
53181
- return item instanceof Comment2 && !item.getThread().length;
53178
+ return item instanceof Comment && !item.getThread().length;
53182
53179
  });
53183
53180
  if (voidComments) {
53184
53181
  for (const comment2 of voidComments) {
@@ -53644,7 +53641,7 @@ function mergeRichTextOperations(opA, opB) {
53644
53641
  return;
53645
53642
  }
53646
53643
  function mergeRichTextCreation(opA, opB) {
53647
- if (opA.method === "add" && opB.method === "edit" && opA.item === opB.item[0] && opB.ops[0].type === "insert_text") {
53644
+ if (opA.method === "add" && opA.data.itemType === "RichText" && opB.method === "edit" && opA.item === opB.item[0] && opB.ops[0].type === "insert_text") {
53648
53645
  const op = {
53649
53646
  ...opA,
53650
53647
  data: {