microboard-temp 0.4.29 → 0.4.31

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.
@@ -19469,7 +19469,7 @@ class BaseCommand {
19469
19469
  } else {
19470
19470
  Object.keys(op.newData).forEach((key) => {
19471
19471
  if (item[key]) {
19472
- op.newData[key] = item[key];
19472
+ newData[key] = item[key];
19473
19473
  }
19474
19474
  });
19475
19475
  }
@@ -46375,6 +46375,18 @@ class Dice extends BaseItem {
46375
46375
  }
46376
46376
  return { min: this.values[0], max: this.values[this.values.length - 1] };
46377
46377
  }
46378
+ getBackgroundColor() {
46379
+ return this.backgroundColor;
46380
+ }
46381
+ getBorderStyle() {
46382
+ return this.borderStyle;
46383
+ }
46384
+ getStrokeColor() {
46385
+ return this.borderColor;
46386
+ }
46387
+ getStrokeWidth() {
46388
+ return this.borderWidth;
46389
+ }
46378
46390
  applyBackgroundColor(backgroundColor) {
46379
46391
  this.backgroundColor = backgroundColor;
46380
46392
  this.path.setBackgroundColor(backgroundColor);
@@ -50315,28 +50327,20 @@ class BoardSelection {
50315
50327
  return color2;
50316
50328
  }
50317
50329
  getFillColor() {
50318
- const tmp = this.items.getItemsByItemTypes([
50319
- "Shape",
50320
- "Sticker",
50321
- "Frame"
50322
- ])[0];
50323
- return tmp?.getBackgroundColor() || defaultShapeData2.backgroundColor;
50330
+ const tmp = this.items.list()[0];
50331
+ return "getBackgroundColor" in tmp ? tmp.getBackgroundColor() : defaultShapeData2.backgroundColor;
50324
50332
  }
50325
50333
  getBorderStyle() {
50326
- const shape = this.items.getItemsByItemTypes([
50327
- "Shape",
50328
- "Drawing",
50329
- "Connector"
50330
- ])[0];
50331
- return shape?.getBorderStyle() || defaultShapeData2.borderStyle;
50334
+ const shape = this.items.list()[0];
50335
+ return "getBorderStyle" in shape ? shape.getBorderStyle() : defaultShapeData2.borderStyle;
50332
50336
  }
50333
50337
  getStrokeColor() {
50334
- const shape = this.items.getItemsByItemTypes(["Shape", "Drawing"])[0];
50335
- return shape?.getStrokeColor() || defaultShapeData2.borderColor;
50338
+ const shape = this.items.list()[0];
50339
+ return "getStrokeColor" in shape ? shape.getStrokeColor() : defaultShapeData2.borderColor;
50336
50340
  }
50337
50341
  getStrokeWidth() {
50338
- const shape = this.items.getItemsByItemTypes(["Shape", "Drawing"])[0];
50339
- return shape?.getStrokeWidth() || defaultShapeData2.borderWidth;
50342
+ const shape = this.items.list()[0];
50343
+ return "getStrokeWidth" in shape ? shape.getStrokeWidth() : defaultShapeData2.borderWidth;
50340
50344
  }
50341
50345
  getConnectorLineWidth() {
50342
50346
  const connector = this.items.getItemsByItemTypes(["Connector"])[0];
package/dist/cjs/index.js CHANGED
@@ -19469,7 +19469,7 @@ class BaseCommand {
19469
19469
  } else {
19470
19470
  Object.keys(op.newData).forEach((key) => {
19471
19471
  if (item[key]) {
19472
- op.newData[key] = item[key];
19472
+ newData[key] = item[key];
19473
19473
  }
19474
19474
  });
19475
19475
  }
@@ -46375,6 +46375,18 @@ class Dice extends BaseItem {
46375
46375
  }
46376
46376
  return { min: this.values[0], max: this.values[this.values.length - 1] };
46377
46377
  }
46378
+ getBackgroundColor() {
46379
+ return this.backgroundColor;
46380
+ }
46381
+ getBorderStyle() {
46382
+ return this.borderStyle;
46383
+ }
46384
+ getStrokeColor() {
46385
+ return this.borderColor;
46386
+ }
46387
+ getStrokeWidth() {
46388
+ return this.borderWidth;
46389
+ }
46378
46390
  applyBackgroundColor(backgroundColor) {
46379
46391
  this.backgroundColor = backgroundColor;
46380
46392
  this.path.setBackgroundColor(backgroundColor);
@@ -50315,28 +50327,20 @@ class BoardSelection {
50315
50327
  return color2;
50316
50328
  }
50317
50329
  getFillColor() {
50318
- const tmp = this.items.getItemsByItemTypes([
50319
- "Shape",
50320
- "Sticker",
50321
- "Frame"
50322
- ])[0];
50323
- return tmp?.getBackgroundColor() || defaultShapeData2.backgroundColor;
50330
+ const tmp = this.items.list()[0];
50331
+ return "getBackgroundColor" in tmp ? tmp.getBackgroundColor() : defaultShapeData2.backgroundColor;
50324
50332
  }
50325
50333
  getBorderStyle() {
50326
- const shape = this.items.getItemsByItemTypes([
50327
- "Shape",
50328
- "Drawing",
50329
- "Connector"
50330
- ])[0];
50331
- return shape?.getBorderStyle() || defaultShapeData2.borderStyle;
50334
+ const shape = this.items.list()[0];
50335
+ return "getBorderStyle" in shape ? shape.getBorderStyle() : defaultShapeData2.borderStyle;
50332
50336
  }
50333
50337
  getStrokeColor() {
50334
- const shape = this.items.getItemsByItemTypes(["Shape", "Drawing"])[0];
50335
- return shape?.getStrokeColor() || defaultShapeData2.borderColor;
50338
+ const shape = this.items.list()[0];
50339
+ return "getStrokeColor" in shape ? shape.getStrokeColor() : defaultShapeData2.borderColor;
50336
50340
  }
50337
50341
  getStrokeWidth() {
50338
- const shape = this.items.getItemsByItemTypes(["Shape", "Drawing"])[0];
50339
- return shape?.getStrokeWidth() || defaultShapeData2.borderWidth;
50342
+ const shape = this.items.list()[0];
50343
+ return "getStrokeWidth" in shape ? shape.getStrokeWidth() : defaultShapeData2.borderWidth;
50340
50344
  }
50341
50345
  getConnectorLineWidth() {
50342
50346
  const connector = this.items.getItemsByItemTypes(["Connector"])[0];
package/dist/cjs/node.js CHANGED
@@ -22008,7 +22008,7 @@ class BaseCommand {
22008
22008
  } else {
22009
22009
  Object.keys(op.newData).forEach((key) => {
22010
22010
  if (item[key]) {
22011
- op.newData[key] = item[key];
22011
+ newData[key] = item[key];
22012
22012
  }
22013
22013
  });
22014
22014
  }
@@ -48915,6 +48915,18 @@ class Dice extends BaseItem {
48915
48915
  }
48916
48916
  return { min: this.values[0], max: this.values[this.values.length - 1] };
48917
48917
  }
48918
+ getBackgroundColor() {
48919
+ return this.backgroundColor;
48920
+ }
48921
+ getBorderStyle() {
48922
+ return this.borderStyle;
48923
+ }
48924
+ getStrokeColor() {
48925
+ return this.borderColor;
48926
+ }
48927
+ getStrokeWidth() {
48928
+ return this.borderWidth;
48929
+ }
48918
48930
  applyBackgroundColor(backgroundColor) {
48919
48931
  this.backgroundColor = backgroundColor;
48920
48932
  this.path.setBackgroundColor(backgroundColor);
@@ -52855,28 +52867,20 @@ class BoardSelection {
52855
52867
  return color2;
52856
52868
  }
52857
52869
  getFillColor() {
52858
- const tmp = this.items.getItemsByItemTypes([
52859
- "Shape",
52860
- "Sticker",
52861
- "Frame"
52862
- ])[0];
52863
- return tmp?.getBackgroundColor() || defaultShapeData2.backgroundColor;
52870
+ const tmp = this.items.list()[0];
52871
+ return "getBackgroundColor" in tmp ? tmp.getBackgroundColor() : defaultShapeData2.backgroundColor;
52864
52872
  }
52865
52873
  getBorderStyle() {
52866
- const shape = this.items.getItemsByItemTypes([
52867
- "Shape",
52868
- "Drawing",
52869
- "Connector"
52870
- ])[0];
52871
- return shape?.getBorderStyle() || defaultShapeData2.borderStyle;
52874
+ const shape = this.items.list()[0];
52875
+ return "getBorderStyle" in shape ? shape.getBorderStyle() : defaultShapeData2.borderStyle;
52872
52876
  }
52873
52877
  getStrokeColor() {
52874
- const shape = this.items.getItemsByItemTypes(["Shape", "Drawing"])[0];
52875
- return shape?.getStrokeColor() || defaultShapeData2.borderColor;
52878
+ const shape = this.items.list()[0];
52879
+ return "getStrokeColor" in shape ? shape.getStrokeColor() : defaultShapeData2.borderColor;
52876
52880
  }
52877
52881
  getStrokeWidth() {
52878
- const shape = this.items.getItemsByItemTypes(["Shape", "Drawing"])[0];
52879
- return shape?.getStrokeWidth() || defaultShapeData2.borderWidth;
52882
+ const shape = this.items.list()[0];
52883
+ return "getStrokeWidth" in shape ? shape.getStrokeWidth() : defaultShapeData2.borderWidth;
52880
52884
  }
52881
52885
  getConnectorLineWidth() {
52882
52886
  const connector = this.items.getItemsByItemTypes(["Connector"])[0];
@@ -19319,7 +19319,7 @@ class BaseCommand {
19319
19319
  } else {
19320
19320
  Object.keys(op.newData).forEach((key) => {
19321
19321
  if (item[key]) {
19322
- op.newData[key] = item[key];
19322
+ newData[key] = item[key];
19323
19323
  }
19324
19324
  });
19325
19325
  }
@@ -46225,6 +46225,18 @@ class Dice extends BaseItem {
46225
46225
  }
46226
46226
  return { min: this.values[0], max: this.values[this.values.length - 1] };
46227
46227
  }
46228
+ getBackgroundColor() {
46229
+ return this.backgroundColor;
46230
+ }
46231
+ getBorderStyle() {
46232
+ return this.borderStyle;
46233
+ }
46234
+ getStrokeColor() {
46235
+ return this.borderColor;
46236
+ }
46237
+ getStrokeWidth() {
46238
+ return this.borderWidth;
46239
+ }
46228
46240
  applyBackgroundColor(backgroundColor) {
46229
46241
  this.backgroundColor = backgroundColor;
46230
46242
  this.path.setBackgroundColor(backgroundColor);
@@ -50165,28 +50177,20 @@ class BoardSelection {
50165
50177
  return color2;
50166
50178
  }
50167
50179
  getFillColor() {
50168
- const tmp = this.items.getItemsByItemTypes([
50169
- "Shape",
50170
- "Sticker",
50171
- "Frame"
50172
- ])[0];
50173
- return tmp?.getBackgroundColor() || defaultShapeData2.backgroundColor;
50180
+ const tmp = this.items.list()[0];
50181
+ return "getBackgroundColor" in tmp ? tmp.getBackgroundColor() : defaultShapeData2.backgroundColor;
50174
50182
  }
50175
50183
  getBorderStyle() {
50176
- const shape = this.items.getItemsByItemTypes([
50177
- "Shape",
50178
- "Drawing",
50179
- "Connector"
50180
- ])[0];
50181
- return shape?.getBorderStyle() || defaultShapeData2.borderStyle;
50184
+ const shape = this.items.list()[0];
50185
+ return "getBorderStyle" in shape ? shape.getBorderStyle() : defaultShapeData2.borderStyle;
50182
50186
  }
50183
50187
  getStrokeColor() {
50184
- const shape = this.items.getItemsByItemTypes(["Shape", "Drawing"])[0];
50185
- return shape?.getStrokeColor() || defaultShapeData2.borderColor;
50188
+ const shape = this.items.list()[0];
50189
+ return "getStrokeColor" in shape ? shape.getStrokeColor() : defaultShapeData2.borderColor;
50186
50190
  }
50187
50191
  getStrokeWidth() {
50188
- const shape = this.items.getItemsByItemTypes(["Shape", "Drawing"])[0];
50189
- return shape?.getStrokeWidth() || defaultShapeData2.borderWidth;
50192
+ const shape = this.items.list()[0];
50193
+ return "getStrokeWidth" in shape ? shape.getStrokeWidth() : defaultShapeData2.borderWidth;
50190
50194
  }
50191
50195
  getConnectorLineWidth() {
50192
50196
  const connector = this.items.getItemsByItemTypes(["Connector"])[0];
package/dist/esm/index.js CHANGED
@@ -19312,7 +19312,7 @@ class BaseCommand {
19312
19312
  } else {
19313
19313
  Object.keys(op.newData).forEach((key) => {
19314
19314
  if (item[key]) {
19315
- op.newData[key] = item[key];
19315
+ newData[key] = item[key];
19316
19316
  }
19317
19317
  });
19318
19318
  }
@@ -46218,6 +46218,18 @@ class Dice extends BaseItem {
46218
46218
  }
46219
46219
  return { min: this.values[0], max: this.values[this.values.length - 1] };
46220
46220
  }
46221
+ getBackgroundColor() {
46222
+ return this.backgroundColor;
46223
+ }
46224
+ getBorderStyle() {
46225
+ return this.borderStyle;
46226
+ }
46227
+ getStrokeColor() {
46228
+ return this.borderColor;
46229
+ }
46230
+ getStrokeWidth() {
46231
+ return this.borderWidth;
46232
+ }
46221
46233
  applyBackgroundColor(backgroundColor) {
46222
46234
  this.backgroundColor = backgroundColor;
46223
46235
  this.path.setBackgroundColor(backgroundColor);
@@ -50158,28 +50170,20 @@ class BoardSelection {
50158
50170
  return color2;
50159
50171
  }
50160
50172
  getFillColor() {
50161
- const tmp = this.items.getItemsByItemTypes([
50162
- "Shape",
50163
- "Sticker",
50164
- "Frame"
50165
- ])[0];
50166
- return tmp?.getBackgroundColor() || defaultShapeData2.backgroundColor;
50173
+ const tmp = this.items.list()[0];
50174
+ return "getBackgroundColor" in tmp ? tmp.getBackgroundColor() : defaultShapeData2.backgroundColor;
50167
50175
  }
50168
50176
  getBorderStyle() {
50169
- const shape = this.items.getItemsByItemTypes([
50170
- "Shape",
50171
- "Drawing",
50172
- "Connector"
50173
- ])[0];
50174
- return shape?.getBorderStyle() || defaultShapeData2.borderStyle;
50177
+ const shape = this.items.list()[0];
50178
+ return "getBorderStyle" in shape ? shape.getBorderStyle() : defaultShapeData2.borderStyle;
50175
50179
  }
50176
50180
  getStrokeColor() {
50177
- const shape = this.items.getItemsByItemTypes(["Shape", "Drawing"])[0];
50178
- return shape?.getStrokeColor() || defaultShapeData2.borderColor;
50181
+ const shape = this.items.list()[0];
50182
+ return "getStrokeColor" in shape ? shape.getStrokeColor() : defaultShapeData2.borderColor;
50179
50183
  }
50180
50184
  getStrokeWidth() {
50181
- const shape = this.items.getItemsByItemTypes(["Shape", "Drawing"])[0];
50182
- return shape?.getStrokeWidth() || defaultShapeData2.borderWidth;
50185
+ const shape = this.items.list()[0];
50186
+ return "getStrokeWidth" in shape ? shape.getStrokeWidth() : defaultShapeData2.borderWidth;
50183
50187
  }
50184
50188
  getConnectorLineWidth() {
50185
50189
  const connector = this.items.getItemsByItemTypes(["Connector"])[0];
package/dist/esm/node.js CHANGED
@@ -21846,7 +21846,7 @@ class BaseCommand {
21846
21846
  } else {
21847
21847
  Object.keys(op.newData).forEach((key) => {
21848
21848
  if (item[key]) {
21849
- op.newData[key] = item[key];
21849
+ newData[key] = item[key];
21850
21850
  }
21851
21851
  });
21852
21852
  }
@@ -48753,6 +48753,18 @@ class Dice extends BaseItem {
48753
48753
  }
48754
48754
  return { min: this.values[0], max: this.values[this.values.length - 1] };
48755
48755
  }
48756
+ getBackgroundColor() {
48757
+ return this.backgroundColor;
48758
+ }
48759
+ getBorderStyle() {
48760
+ return this.borderStyle;
48761
+ }
48762
+ getStrokeColor() {
48763
+ return this.borderColor;
48764
+ }
48765
+ getStrokeWidth() {
48766
+ return this.borderWidth;
48767
+ }
48756
48768
  applyBackgroundColor(backgroundColor) {
48757
48769
  this.backgroundColor = backgroundColor;
48758
48770
  this.path.setBackgroundColor(backgroundColor);
@@ -52693,28 +52705,20 @@ class BoardSelection {
52693
52705
  return color2;
52694
52706
  }
52695
52707
  getFillColor() {
52696
- const tmp = this.items.getItemsByItemTypes([
52697
- "Shape",
52698
- "Sticker",
52699
- "Frame"
52700
- ])[0];
52701
- return tmp?.getBackgroundColor() || defaultShapeData2.backgroundColor;
52708
+ const tmp = this.items.list()[0];
52709
+ return "getBackgroundColor" in tmp ? tmp.getBackgroundColor() : defaultShapeData2.backgroundColor;
52702
52710
  }
52703
52711
  getBorderStyle() {
52704
- const shape = this.items.getItemsByItemTypes([
52705
- "Shape",
52706
- "Drawing",
52707
- "Connector"
52708
- ])[0];
52709
- return shape?.getBorderStyle() || defaultShapeData2.borderStyle;
52712
+ const shape = this.items.list()[0];
52713
+ return "getBorderStyle" in shape ? shape.getBorderStyle() : defaultShapeData2.borderStyle;
52710
52714
  }
52711
52715
  getStrokeColor() {
52712
- const shape = this.items.getItemsByItemTypes(["Shape", "Drawing"])[0];
52713
- return shape?.getStrokeColor() || defaultShapeData2.borderColor;
52716
+ const shape = this.items.list()[0];
52717
+ return "getStrokeColor" in shape ? shape.getStrokeColor() : defaultShapeData2.borderColor;
52714
52718
  }
52715
52719
  getStrokeWidth() {
52716
- const shape = this.items.getItemsByItemTypes(["Shape", "Drawing"])[0];
52717
- return shape?.getStrokeWidth() || defaultShapeData2.borderWidth;
52720
+ const shape = this.items.list()[0];
52721
+ return "getStrokeWidth" in shape ? shape.getStrokeWidth() : defaultShapeData2.borderWidth;
52718
52722
  }
52719
52723
  getConnectorLineWidth() {
52720
52724
  const connector = this.items.getItemsByItemTypes(["Connector"])[0];
@@ -32,6 +32,10 @@ export declare class Dice extends BaseItem {
32
32
  min: number;
33
33
  max: number;
34
34
  };
35
+ getBackgroundColor(): string;
36
+ getBorderStyle(): string;
37
+ getStrokeColor(): string;
38
+ getStrokeWidth(): number;
35
39
  private applyBackgroundColor;
36
40
  setBackgroundColor(backgroundColor: string): void;
37
41
  private applyBorderWidth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.4.29",
3
+ "version": "0.4.31",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",