microboard-temp 0.4.8 → 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.
@@ -42485,12 +42485,10 @@ class AddSticker extends BoardTool {
42485
42485
  var height2 = 16;
42486
42486
 
42487
42487
  class AddText extends BoardTool {
42488
- board;
42489
42488
  line;
42490
42489
  bounds = new Mbr;
42491
42490
  constructor(board) {
42492
42491
  super(board);
42493
- this.board = board;
42494
42492
  this.setCursor();
42495
42493
  }
42496
42494
  setCursor() {
@@ -42517,7 +42515,7 @@ class AddText extends BoardTool {
42517
42515
  }
42518
42516
  return false;
42519
42517
  }
42520
- async leftButtonUp() {
42518
+ leftButtonUp() {
42521
42519
  if (this.line) {
42522
42520
  const board = this.board;
42523
42521
  const richText = new RichText(this.board, new Mbr);
@@ -42525,7 +42523,7 @@ class AddText extends BoardTool {
42525
42523
  richText.transformation.applyScaleBy(1, 1);
42526
42524
  richText.editor.maxWidth = 600;
42527
42525
  richText.insideOf = richText.itemType;
42528
- const text5 = await board.add(richText);
42526
+ const text5 = board.add(richText);
42529
42527
  this.board.selection.removeAll();
42530
42528
  this.board.selection.add(text5);
42531
42529
  this.board.selection.editText();
@@ -53643,7 +53641,7 @@ function mergeRichTextOperations(opA, opB) {
53643
53641
  return;
53644
53642
  }
53645
53643
  function mergeRichTextCreation(opA, opB) {
53646
- 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") {
53647
53645
  const op = {
53648
53646
  ...opA,
53649
53647
  data: {
package/dist/cjs/index.js CHANGED
@@ -42485,12 +42485,10 @@ class AddSticker extends BoardTool {
42485
42485
  var height2 = 16;
42486
42486
 
42487
42487
  class AddText extends BoardTool {
42488
- board;
42489
42488
  line;
42490
42489
  bounds = new Mbr;
42491
42490
  constructor(board) {
42492
42491
  super(board);
42493
- this.board = board;
42494
42492
  this.setCursor();
42495
42493
  }
42496
42494
  setCursor() {
@@ -42517,7 +42515,7 @@ class AddText extends BoardTool {
42517
42515
  }
42518
42516
  return false;
42519
42517
  }
42520
- async leftButtonUp() {
42518
+ leftButtonUp() {
42521
42519
  if (this.line) {
42522
42520
  const board = this.board;
42523
42521
  const richText = new RichText(this.board, new Mbr);
@@ -42525,7 +42523,7 @@ class AddText extends BoardTool {
42525
42523
  richText.transformation.applyScaleBy(1, 1);
42526
42524
  richText.editor.maxWidth = 600;
42527
42525
  richText.insideOf = richText.itemType;
42528
- const text5 = await board.add(richText);
42526
+ const text5 = board.add(richText);
42529
42527
  this.board.selection.removeAll();
42530
42528
  this.board.selection.add(text5);
42531
42529
  this.board.selection.editText();
@@ -53643,7 +53641,7 @@ function mergeRichTextOperations(opA, opB) {
53643
53641
  return;
53644
53642
  }
53645
53643
  function mergeRichTextCreation(opA, opB) {
53646
- 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") {
53647
53645
  const op = {
53648
53646
  ...opA,
53649
53647
  data: {
package/dist/cjs/node.js CHANGED
@@ -45025,12 +45025,10 @@ class AddSticker extends BoardTool {
45025
45025
  var height2 = 16;
45026
45026
 
45027
45027
  class AddText extends BoardTool {
45028
- board;
45029
45028
  line;
45030
45029
  bounds = new Mbr;
45031
45030
  constructor(board) {
45032
45031
  super(board);
45033
- this.board = board;
45034
45032
  this.setCursor();
45035
45033
  }
45036
45034
  setCursor() {
@@ -45057,7 +45055,7 @@ class AddText extends BoardTool {
45057
45055
  }
45058
45056
  return false;
45059
45057
  }
45060
- async leftButtonUp() {
45058
+ leftButtonUp() {
45061
45059
  if (this.line) {
45062
45060
  const board = this.board;
45063
45061
  const richText = new RichText(this.board, new Mbr);
@@ -45065,7 +45063,7 @@ class AddText extends BoardTool {
45065
45063
  richText.transformation.applyScaleBy(1, 1);
45066
45064
  richText.editor.maxWidth = 600;
45067
45065
  richText.insideOf = richText.itemType;
45068
- const text5 = await board.add(richText);
45066
+ const text5 = board.add(richText);
45069
45067
  this.board.selection.removeAll();
45070
45068
  this.board.selection.add(text5);
45071
45069
  this.board.selection.editText();
@@ -56116,7 +56114,7 @@ function mergeRichTextOperations(opA, opB) {
56116
56114
  return;
56117
56115
  }
56118
56116
  function mergeRichTextCreation(opA, opB) {
56119
- if (opA.method === "add" && opB.method === "edit" && opA.item === opB.item[0] && opB.ops[0].type === "insert_text") {
56117
+ if (opA.method === "add" && opA.data.itemType === "RichText" && opB.method === "edit" && opA.item === opB.item[0] && opB.ops[0].type === "insert_text") {
56120
56118
  const op = {
56121
56119
  ...opA,
56122
56120
  data: {
@@ -42338,12 +42338,10 @@ class AddSticker extends BoardTool {
42338
42338
  var height2 = 16;
42339
42339
 
42340
42340
  class AddText extends BoardTool {
42341
- board;
42342
42341
  line;
42343
42342
  bounds = new Mbr;
42344
42343
  constructor(board) {
42345
42344
  super(board);
42346
- this.board = board;
42347
42345
  this.setCursor();
42348
42346
  }
42349
42347
  setCursor() {
@@ -42370,7 +42368,7 @@ class AddText extends BoardTool {
42370
42368
  }
42371
42369
  return false;
42372
42370
  }
42373
- async leftButtonUp() {
42371
+ leftButtonUp() {
42374
42372
  if (this.line) {
42375
42373
  const board = this.board;
42376
42374
  const richText = new RichText(this.board, new Mbr);
@@ -42378,7 +42376,7 @@ class AddText extends BoardTool {
42378
42376
  richText.transformation.applyScaleBy(1, 1);
42379
42377
  richText.editor.maxWidth = 600;
42380
42378
  richText.insideOf = richText.itemType;
42381
- const text5 = await board.add(richText);
42379
+ const text5 = board.add(richText);
42382
42380
  this.board.selection.removeAll();
42383
42381
  this.board.selection.add(text5);
42384
42382
  this.board.selection.editText();
@@ -53496,7 +53494,7 @@ function mergeRichTextOperations(opA, opB) {
53496
53494
  return;
53497
53495
  }
53498
53496
  function mergeRichTextCreation(opA, opB) {
53499
- if (opA.method === "add" && opB.method === "edit" && opA.item === opB.item[0] && opB.ops[0].type === "insert_text") {
53497
+ if (opA.method === "add" && opA.data.itemType === "RichText" && opB.method === "edit" && opA.item === opB.item[0] && opB.ops[0].type === "insert_text") {
53500
53498
  const op = {
53501
53499
  ...opA,
53502
53500
  data: {
package/dist/esm/index.js CHANGED
@@ -42331,12 +42331,10 @@ class AddSticker extends BoardTool {
42331
42331
  var height2 = 16;
42332
42332
 
42333
42333
  class AddText extends BoardTool {
42334
- board;
42335
42334
  line;
42336
42335
  bounds = new Mbr;
42337
42336
  constructor(board) {
42338
42337
  super(board);
42339
- this.board = board;
42340
42338
  this.setCursor();
42341
42339
  }
42342
42340
  setCursor() {
@@ -42363,7 +42361,7 @@ class AddText extends BoardTool {
42363
42361
  }
42364
42362
  return false;
42365
42363
  }
42366
- async leftButtonUp() {
42364
+ leftButtonUp() {
42367
42365
  if (this.line) {
42368
42366
  const board = this.board;
42369
42367
  const richText = new RichText(this.board, new Mbr);
@@ -42371,7 +42369,7 @@ class AddText extends BoardTool {
42371
42369
  richText.transformation.applyScaleBy(1, 1);
42372
42370
  richText.editor.maxWidth = 600;
42373
42371
  richText.insideOf = richText.itemType;
42374
- const text5 = await board.add(richText);
42372
+ const text5 = board.add(richText);
42375
42373
  this.board.selection.removeAll();
42376
42374
  this.board.selection.add(text5);
42377
42375
  this.board.selection.editText();
@@ -53489,7 +53487,7 @@ function mergeRichTextOperations(opA, opB) {
53489
53487
  return;
53490
53488
  }
53491
53489
  function mergeRichTextCreation(opA, opB) {
53492
- if (opA.method === "add" && opB.method === "edit" && opA.item === opB.item[0] && opB.ops[0].type === "insert_text") {
53490
+ if (opA.method === "add" && opA.data.itemType === "RichText" && opB.method === "edit" && opA.item === opB.item[0] && opB.ops[0].type === "insert_text") {
53493
53491
  const op = {
53494
53492
  ...opA,
53495
53493
  data: {
package/dist/esm/node.js CHANGED
@@ -44866,12 +44866,10 @@ class AddSticker extends BoardTool {
44866
44866
  var height2 = 16;
44867
44867
 
44868
44868
  class AddText extends BoardTool {
44869
- board;
44870
44869
  line;
44871
44870
  bounds = new Mbr;
44872
44871
  constructor(board) {
44873
44872
  super(board);
44874
- this.board = board;
44875
44873
  this.setCursor();
44876
44874
  }
44877
44875
  setCursor() {
@@ -44898,7 +44896,7 @@ class AddText extends BoardTool {
44898
44896
  }
44899
44897
  return false;
44900
44898
  }
44901
- async leftButtonUp() {
44899
+ leftButtonUp() {
44902
44900
  if (this.line) {
44903
44901
  const board = this.board;
44904
44902
  const richText = new RichText(this.board, new Mbr);
@@ -44906,7 +44904,7 @@ class AddText extends BoardTool {
44906
44904
  richText.transformation.applyScaleBy(1, 1);
44907
44905
  richText.editor.maxWidth = 600;
44908
44906
  richText.insideOf = richText.itemType;
44909
- const text5 = await board.add(richText);
44907
+ const text5 = board.add(richText);
44910
44908
  this.board.selection.removeAll();
44911
44909
  this.board.selection.add(text5);
44912
44910
  this.board.selection.editText();
@@ -55957,7 +55955,7 @@ function mergeRichTextOperations(opA, opB) {
55957
55955
  return;
55958
55956
  }
55959
55957
  function mergeRichTextCreation(opA, opB) {
55960
- if (opA.method === "add" && opB.method === "edit" && opA.item === opB.item[0] && opB.ops[0].type === "insert_text") {
55958
+ if (opA.method === "add" && opA.data.itemType === "RichText" && opB.method === "edit" && opA.item === opB.item[0] && opB.ops[0].type === "insert_text") {
55961
55959
  const op = {
55962
55960
  ...opA,
55963
55961
  data: {
@@ -5,7 +5,7 @@ export interface LayoutBlockNodes {
5
5
  width: number;
6
6
  height: number;
7
7
  didBreakWords: boolean;
8
- render: (ctx: CanvasRenderingContext2D, scale?: number) => void;
8
+ render: (ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, scale?: number) => void;
9
9
  realign: (newMaxWidht: number) => void;
10
10
  recoordinate: (newMaxWidth?: number) => void;
11
11
  linkPositions: {
@@ -3,14 +3,13 @@ import { Line, Mbr } from 'Items';
3
3
  import { DrawingContext } from 'Items/DrawingContext';
4
4
  import { BoardTool } from 'Tools/BoardTool';
5
5
  export declare class AddText extends BoardTool {
6
- private board;
7
6
  line: Line | undefined;
8
7
  bounds: Mbr;
9
8
  constructor(board: Board);
10
9
  setCursor(): void;
11
10
  leftButtonDown(): boolean;
12
11
  pointerMoveBy(_x: number, _y: number): boolean;
13
- leftButtonUp(): Promise<boolean>;
12
+ leftButtonUp(): boolean;
14
13
  keyDown(key: string): boolean;
15
14
  middleButtonDown(): boolean;
16
15
  rightButtonDown(): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",