microboard-temp 0.4.14 → 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.
@@ -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.14",
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",