microboard-temp 0.4.13 → 0.4.15

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.
@@ -45961,7 +45961,6 @@ class Card extends BaseItem {
45961
45961
  this.transformation.subject.subscribe(() => {
45962
45962
  this.throttledBringToFront();
45963
45963
  this.updateMbr();
45964
- this.updateImageToRender();
45965
45964
  this.subject.publish(this);
45966
45965
  });
45967
45966
  this.updateMbr();
@@ -45977,6 +45976,7 @@ class Card extends BaseItem {
45977
45976
  this.backside.onload = () => {
45978
45977
  this.subject.publish(this);
45979
45978
  };
45979
+ this.updateImageToRender();
45980
45980
  }
45981
45981
  setIsInDeck(isInDeck) {
45982
45982
  this.emit({
package/dist/cjs/index.js CHANGED
@@ -45961,7 +45961,6 @@ class Card extends BaseItem {
45961
45961
  this.transformation.subject.subscribe(() => {
45962
45962
  this.throttledBringToFront();
45963
45963
  this.updateMbr();
45964
- this.updateImageToRender();
45965
45964
  this.subject.publish(this);
45966
45965
  });
45967
45966
  this.updateMbr();
@@ -45977,6 +45976,7 @@ class Card extends BaseItem {
45977
45976
  this.backside.onload = () => {
45978
45977
  this.subject.publish(this);
45979
45978
  };
45979
+ this.updateImageToRender();
45980
45980
  }
45981
45981
  setIsInDeck(isInDeck) {
45982
45982
  this.emit({
package/dist/cjs/node.js CHANGED
@@ -48501,7 +48501,6 @@ class Card extends BaseItem {
48501
48501
  this.transformation.subject.subscribe(() => {
48502
48502
  this.throttledBringToFront();
48503
48503
  this.updateMbr();
48504
- this.updateImageToRender();
48505
48504
  this.subject.publish(this);
48506
48505
  });
48507
48506
  this.updateMbr();
@@ -48517,6 +48516,7 @@ class Card extends BaseItem {
48517
48516
  this.backside.onload = () => {
48518
48517
  this.subject.publish(this);
48519
48518
  };
48519
+ this.updateImageToRender();
48520
48520
  }
48521
48521
  setIsInDeck(isInDeck) {
48522
48522
  this.emit({
@@ -45812,7 +45812,6 @@ class Card extends BaseItem {
45812
45812
  this.transformation.subject.subscribe(() => {
45813
45813
  this.throttledBringToFront();
45814
45814
  this.updateMbr();
45815
- this.updateImageToRender();
45816
45815
  this.subject.publish(this);
45817
45816
  });
45818
45817
  this.updateMbr();
@@ -45828,6 +45827,7 @@ class Card extends BaseItem {
45828
45827
  this.backside.onload = () => {
45829
45828
  this.subject.publish(this);
45830
45829
  };
45830
+ this.updateImageToRender();
45831
45831
  }
45832
45832
  setIsInDeck(isInDeck) {
45833
45833
  this.emit({
package/dist/esm/index.js CHANGED
@@ -45805,7 +45805,6 @@ class Card extends BaseItem {
45805
45805
  this.transformation.subject.subscribe(() => {
45806
45806
  this.throttledBringToFront();
45807
45807
  this.updateMbr();
45808
- this.updateImageToRender();
45809
45808
  this.subject.publish(this);
45810
45809
  });
45811
45810
  this.updateMbr();
@@ -45821,6 +45820,7 @@ class Card extends BaseItem {
45821
45820
  this.backside.onload = () => {
45822
45821
  this.subject.publish(this);
45823
45822
  };
45823
+ this.updateImageToRender();
45824
45824
  }
45825
45825
  setIsInDeck(isInDeck) {
45826
45826
  this.emit({
package/dist/esm/node.js CHANGED
@@ -48340,7 +48340,6 @@ class Card extends BaseItem {
48340
48340
  this.transformation.subject.subscribe(() => {
48341
48341
  this.throttledBringToFront();
48342
48342
  this.updateMbr();
48343
- this.updateImageToRender();
48344
48343
  this.subject.publish(this);
48345
48344
  });
48346
48345
  this.updateMbr();
@@ -48356,6 +48355,7 @@ class Card extends BaseItem {
48356
48355
  this.backside.onload = () => {
48357
48356
  this.subject.publish(this);
48358
48357
  };
48358
+ this.updateImageToRender();
48359
48359
  }
48360
48360
  setIsInDeck(isInDeck) {
48361
48361
  this.emit({
@@ -0,0 +1,42 @@
1
+ import { BaseItem, BaseItemData, SerializedItemData } from "../../../BaseItem/BaseItem";
2
+ import { BorderWidth, Path } from "../../../Path";
3
+ import { Subject } from "../../../../Subject";
4
+ import { Board } from "../../../../Board";
5
+ import { DrawingContext } from "../../../DrawingContext";
6
+ import { DocumentFactory } from "../../../../api/DocumentFactory";
7
+ import { DiceOperation } from "./DiceOperation";
8
+ export declare const defaultDiceData: BaseItemData;
9
+ export declare class Dice extends BaseItem {
10
+ readonly itemType = "Dice";
11
+ private path;
12
+ readonly subject: Subject<Dice>;
13
+ private borderWidth;
14
+ isRotating: boolean;
15
+ value: number;
16
+ range: {
17
+ min: number;
18
+ max: number;
19
+ };
20
+ constructor(board: Board, id?: string);
21
+ private transformPath;
22
+ render(context: DrawingContext): void;
23
+ updateMbr(): void;
24
+ getPath(): Path;
25
+ renderHTML(documentFactory: DocumentFactory): HTMLElement;
26
+ deserialize(data: SerializedItemData): this;
27
+ isClosed(): boolean;
28
+ private applyBackgroundColor;
29
+ setBackgroundColor(backgroundColor: string): void;
30
+ private applyBorderWidth;
31
+ setBorderWidth(borderWidth: BorderWidth): void;
32
+ private applyBorderColor;
33
+ setBorderColor(borderColor: string): void;
34
+ setIsRotating(isRotating: boolean): void;
35
+ setValuesRange(range: {
36
+ min: number;
37
+ max: number;
38
+ }): void;
39
+ setValue(value: number): void;
40
+ throwDice(): void;
41
+ apply(op: DiceOperation): void;
42
+ }
@@ -0,0 +1,40 @@
1
+ import { BaseOperation } from "Events/EventsOperations";
2
+ export type DiceOperation = ChangeValue | ChangeValuesRange | SetIsRotating | SetBackgroundColor | SetBorderColor | SetBorderWidth;
3
+ interface ChangeValue extends BaseOperation<{
4
+ value: number;
5
+ }> {
6
+ class: "Dice";
7
+ method: "changeValue";
8
+ }
9
+ interface ChangeValuesRange extends BaseOperation<{
10
+ min: number;
11
+ max: number;
12
+ }> {
13
+ class: "Dice";
14
+ method: "changeValuesRange";
15
+ }
16
+ interface SetIsRotating extends BaseOperation<{
17
+ isRotating: boolean;
18
+ }> {
19
+ class: "Dice";
20
+ method: "setIsRotating";
21
+ }
22
+ interface SetBackgroundColor extends BaseOperation<{
23
+ backgroundColor: string;
24
+ }> {
25
+ class: "Dice";
26
+ method: "setBackgroundColor";
27
+ }
28
+ interface SetBorderColor extends BaseOperation<{
29
+ borderColor: string;
30
+ }> {
31
+ class: "Dice";
32
+ method: "setBorderColor";
33
+ }
34
+ export interface SetBorderWidth extends BaseOperation<{
35
+ borderWidth: number;
36
+ }> {
37
+ class: "Dice";
38
+ method: "setBorderWidth";
39
+ }
40
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.4.13",
3
+ "version": "0.4.15",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",