microboard-temp 0.13.41 → 0.13.43
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.
- package/dist/cjs/browser.js +55398 -52148
- package/dist/cjs/index.js +55392 -52147
- package/dist/cjs/node.js +58180 -54930
- package/dist/esm/browser.js +55385 -52198
- package/dist/esm/index.js +55381 -52199
- package/dist/esm/node.js +57588 -54407
- package/dist/types/Board.d.ts +9 -7
- package/dist/types/BoardCommand.d.ts +2 -2
- package/dist/types/Camera/Camera.d.ts +4 -1
- package/dist/types/Events/BaseCommand.d.ts +5 -4
- package/dist/types/Events/Command.d.ts +11 -7
- package/dist/types/Events/CreateCommand.d.ts +5 -0
- package/dist/types/Events/Events.d.ts +2 -1
- package/dist/types/Events/EventsOperations.d.ts +23 -15
- package/dist/types/Events/Log/EventsLog.d.ts +6 -5
- package/dist/types/Events/Log/createEventsList.d.ts +3 -1
- package/dist/types/Events/Log/deserializeAndApplyToList.d.ts +2 -2
- package/dist/types/Events/MessageRouter/boardMessageInterface.d.ts +57 -3
- package/dist/types/Events/MessageRouter/handleAiChatMassage.d.ts +1 -5
- package/dist/types/Events/MessageRouter/handleBoardEventMessage.d.ts +1 -8
- package/dist/types/Events/MessageRouter/handleConfirmation.d.ts +1 -6
- package/dist/types/Events/MessageRouter/handleCreateSnapshotRequestMessage.d.ts +2 -5
- package/dist/types/Events/MessageRouter/handleModeMessage.d.ts +1 -5
- package/dist/types/Events/MessageRouter/handlePresenceEventMessage.d.ts +1 -1
- package/dist/types/Events/MessageRouter/index.d.ts +0 -5
- package/dist/types/Events/index.d.ts +2 -1
- package/dist/types/Items/AINode/AINode.d.ts +2 -2
- package/dist/types/Items/Anchor/Anchor.d.ts +2 -1
- package/dist/types/Items/Arc/Arc.d.ts +4 -1
- package/dist/types/Items/Audio/Audio.d.ts +3 -3
- package/dist/types/Items/BaseItem/BaseItem.d.ts +10 -9
- package/dist/types/Items/Comment/Comment.d.ts +1 -1
- package/dist/types/Items/Connector/Connector.d.ts +13 -18
- package/dist/types/Items/Connector/ConnectorCommand.d.ts +2 -2
- package/dist/types/Items/Connector/ConnectorOperations.d.ts +1 -1
- package/dist/types/Items/Connector/ConnectorTypes.d.ts +10 -0
- package/dist/types/Items/Connector/Pointers/Pointers.d.ts +3 -2
- package/dist/types/Items/Connector/Pointers/index.d.ts +1 -1
- package/dist/types/Items/Connector/getLine/getLine.d.ts +1 -1
- package/dist/types/Items/Connector/index.d.ts +3 -2
- package/dist/types/Items/Curve/Curve.d.ts +4 -4
- package/dist/types/Items/Drawing/Drawing.d.ts +7 -6
- package/dist/types/Items/Drawing/DrawingCommand.d.ts +2 -2
- package/dist/types/Items/Examples/CardGame/Card/Card.d.ts +12 -9
- package/dist/types/Items/Examples/CardGame/Deck/Deck.d.ts +1 -1
- package/dist/types/Items/Examples/CardGame/Dice/Dice.d.ts +11 -2
- package/dist/types/Items/Examples/CardGame/Screen/Screen.d.ts +7 -2
- package/dist/types/Items/Examples/Counter/Counter.d.ts +1 -1
- package/dist/types/Items/Examples/Star/Star.d.ts +1 -1
- package/dist/types/Items/Frame/Frame.d.ts +12 -3
- package/dist/types/Items/Frame/FrameData.d.ts +3 -3
- package/dist/types/Items/Geometry.d.ts +1 -1
- package/dist/types/Items/Group/Group.d.ts +9 -5
- package/dist/types/Items/Image/Image.d.ts +5 -4
- package/dist/types/Items/Item.d.ts +15 -15
- package/dist/types/Items/Line/Line.d.ts +1 -1
- package/dist/types/Items/Mbr/Mbr.d.ts +5 -5
- package/dist/types/Items/Placeholder/Placeholder.d.ts +13 -8
- package/dist/types/Items/Point/Point.d.ts +1 -1
- package/dist/types/Items/RegisterItem.d.ts +3 -1
- package/dist/types/Items/RichText/EditorContainer.d.ts +2 -2
- package/dist/types/Items/RichText/RichText.d.ts +12 -6
- package/dist/types/Items/RichText/RichTextCommand.d.ts +2 -2
- package/dist/types/Items/RichText/RichTextData.d.ts +1 -1
- package/dist/types/Items/RichText/RichTextOperations.d.ts +1 -1
- package/dist/types/Items/RichText/editorHelpers/common/getAreAllChildrenEmpty.d.ts +1 -1
- package/dist/types/Items/RichText/editorHelpers/lists/getBlockParentList.d.ts +2 -2
- package/dist/types/Items/Shape/BPMN/BPMN_Annotation/index.d.ts +2 -1
- package/dist/types/Items/Shape/BPMN/BPMN_DataObject/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_DataStore/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_EndEvent/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_EventSubprocess/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_Gateway/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_GatewayParallel/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_GatewayXOR/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_Group/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_IntermediateEvent/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_IntermediateEventNoneInterrupting/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_Participant/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_StartEvent/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_StartEventNoneInterrupting/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_Task/index.d.ts +3 -1
- package/dist/types/Items/Shape/BPMN/BPMN_Transaction/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/ArrowBlockLeft/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/ArrowBlockRigth/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/ArrowLeft/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/ArrowLeftRight/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/ArrowRight/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/BracesLeft/index.d.ts +2 -1
- package/dist/types/Items/Shape/Basic/BracesRight/index.d.ts +2 -1
- package/dist/types/Items/Shape/Basic/Circle/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/Cloud/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/Cross/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/Cylinder/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/Hexagon/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/Octagon/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/Parallelogram/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/Pentagon/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/PredefinedProcess/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/Rectangle/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/ReversedParallelogram/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/ReversedTriangle/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/Rhombus/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/RoundedRectangle/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/SpeachBubble/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/Star/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/Trapezoid/index.d.ts +3 -1
- package/dist/types/Items/Shape/Basic/Triangle/index.d.ts +3 -1
- package/dist/types/Items/Shape/Shape.d.ts +8 -2
- package/dist/types/Items/Shape/ShapeCommand.d.ts +2 -2
- package/dist/types/Items/Shape/ShapeOperation.d.ts +1 -1
- package/dist/types/Items/Shape/ShapeType.d.ts +3 -0
- package/dist/types/Items/Shape/index.d.ts +1 -3
- package/dist/types/Items/Sticker/Sticker.d.ts +7 -5
- package/dist/types/Items/Transformation/Matrix.d.ts +1 -1
- package/dist/types/Items/Transformation/TransformationCommand.d.ts +1 -1
- package/dist/types/Items/Video/Video.d.ts +2 -2
- package/dist/types/Items/index.d.ts +2 -3
- package/dist/types/Presence/Events.d.ts +1 -20
- package/dist/types/Presence/Presence.d.ts +2 -1
- package/dist/types/Selection/Selection.d.ts +11 -8
- package/dist/types/Selection/SelectionItems.d.ts +1 -0
- package/dist/types/SessionStorage.d.ts +1 -1
- package/dist/types/Settings.d.ts +17 -12
- package/dist/types/SpatialIndex/LayeredIndex/index.d.ts +12 -8
- package/dist/types/SpatialIndex/RTreeIndex/index.d.ts +12 -7
- package/dist/types/SpatialIndex/SimpleSpatialIndex.d.ts +28 -10
- package/dist/types/SpatialIndex/SpacialIndex.d.ts +89 -10
- package/dist/types/Tools/AddConnector/AddConnector.d.ts +1 -1
- package/dist/types/Tools/CustomTool.d.ts +3 -3
- package/dist/types/Tools/Tools.d.ts +3 -2
- package/dist/types/Validators/Validators.d.ts +4 -3
- package/dist/types/api/MockPath2D.d.ts +3 -3
- package/dist/types/api/Path2DFactory.d.ts +1 -1
- package/dist/types/itemFactories.d.ts +27 -1
- package/dist/types/parserHTML.d.ts +1 -2
- package/dist/types/sha256.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Path
|
|
2
|
-
import {
|
|
1
|
+
import { Path } from '../../Path/Path';
|
|
2
|
+
import { Paths } from '../../Path/Paths';
|
|
3
|
+
import { Point } from '../../Point/Point';
|
|
3
4
|
export interface Pointer {
|
|
4
5
|
name: string;
|
|
5
6
|
path: Path | Paths;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Path } from '../../../Items';
|
|
2
|
-
import { ConnectorLineStyle } from '../
|
|
2
|
+
import { ConnectorLineStyle } from '../ConnectorTypes';
|
|
3
3
|
import { ControlPoint } from '../ControlPoint';
|
|
4
4
|
import { Pointer } from './Pointers';
|
|
5
5
|
export type ConnectedPointerDirection = 'top' | 'bottom' | 'right' | 'left';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Path } from "../../Path";
|
|
2
|
-
import { ConnectorLineStyle } from "../
|
|
2
|
+
import { ConnectorLineStyle } from "../ConnectorTypes";
|
|
3
3
|
import { ControlPoint } from "../ControlPoint";
|
|
4
4
|
export declare function getLine(lineStyle: ConnectorLineStyle, start: ControlPoint, end: ControlPoint, middle: ControlPoint | null): Path;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { Connector
|
|
1
|
+
export { Connector } from "./Connector";
|
|
2
|
+
export { ConnectionLineWidths, CONNECTOR_COLOR, CONNECTOR_POINTER_TYPES } from "./ConnectorTypes";
|
|
2
3
|
export { ConnectorData } from "./ConnectorOperations";
|
|
3
|
-
export type { ConnectorLineStyle, ConnectionLineWidth } from "./
|
|
4
|
+
export type { ConnectorLineStyle, ConnectionLineWidth } from "./ConnectorTypes";
|
|
4
5
|
export type { ConnectorOperation } from "./ConnectorOperations";
|
|
5
6
|
export { BoardPoint, FloatingPoint, FixedPoint, FixedConnectorPoint, toRelativePoint, } from "./ControlPoint";
|
|
6
7
|
export type { ControlPoint } from "./ControlPoint";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Mbr } from
|
|
2
|
-
import { Line } from
|
|
3
|
-
import { Point } from
|
|
4
|
-
import { Matrix } from
|
|
1
|
+
import { Mbr } from "../Mbr/Mbr";
|
|
2
|
+
import { Line } from "../Line/Line";
|
|
3
|
+
import { Point } from "../Point/Point";
|
|
4
|
+
import { Matrix } from "../Transformation/Matrix";
|
|
5
5
|
import { GeometricNormal } from '../GeometricNormal';
|
|
6
6
|
export declare class BaseCurve {
|
|
7
7
|
curve: any;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Events, Operation } from "../../Events";
|
|
2
2
|
import { Subject } from "../../Subject";
|
|
3
3
|
import { DrawingContext } from "../DrawingContext";
|
|
4
|
-
import { Line } from "../Line";
|
|
5
|
-
import { Mbr } from "../Mbr";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { Line } from "../Line/Line";
|
|
5
|
+
import { Mbr } from "../Mbr/Mbr";
|
|
6
|
+
import { Path } from "../Path/Path";
|
|
7
|
+
import type { BorderStyle, BorderWidth } from "../Path/Path";
|
|
8
|
+
import { Point } from "../Point/Point";
|
|
9
|
+
import { Transformation } from "../Transformation/Transformation";
|
|
9
10
|
import { DrawingOperation } from "./DrawingOperation";
|
|
10
11
|
import { TransformationData } from "../Transformation/TransformationData";
|
|
11
12
|
import { LinkTo } from "../LinkTo/LinkTo";
|
|
@@ -26,7 +27,7 @@ export interface DrawingData {
|
|
|
26
27
|
linkTo?: string;
|
|
27
28
|
[key: string]: unknown;
|
|
28
29
|
}
|
|
29
|
-
export declare class Drawing extends BaseItem {
|
|
30
|
+
export declare class Drawing extends BaseItem<Drawing> {
|
|
30
31
|
points: Point[];
|
|
31
32
|
private events?;
|
|
32
33
|
readonly itemType = "Drawing";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Command } from '../../Events';
|
|
1
|
+
import { Command, Operation } from '../../Events';
|
|
2
2
|
import { Drawing } from './Drawing';
|
|
3
3
|
import { DrawingOperation } from './DrawingOperation';
|
|
4
4
|
export declare class DrawingCommand implements Command {
|
|
@@ -6,7 +6,7 @@ export declare class DrawingCommand implements Command {
|
|
|
6
6
|
private operation;
|
|
7
7
|
private reverse;
|
|
8
8
|
constructor(item: Drawing[], operation: DrawingOperation);
|
|
9
|
-
merge(op:
|
|
9
|
+
merge(op: Operation): this;
|
|
10
10
|
apply(): void;
|
|
11
11
|
revert(): void;
|
|
12
12
|
getReverse(): {
|
|
@@ -6,8 +6,17 @@ import { Path } from "../../../Path/Path";
|
|
|
6
6
|
import { Subject } from "../../../../Subject";
|
|
7
7
|
import { Paths } from "../../../Path/Paths";
|
|
8
8
|
import { CardOperation } from "../../../Examples/CardGame/Card/CardOperation";
|
|
9
|
-
export
|
|
10
|
-
|
|
9
|
+
export interface CardData extends BaseItemData {
|
|
10
|
+
isOpen?: boolean;
|
|
11
|
+
faceUrl?: string;
|
|
12
|
+
backsideUrl?: string;
|
|
13
|
+
dimensions?: {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare const defaultCardData: CardData;
|
|
19
|
+
export declare class Card extends BaseItem<Card> {
|
|
11
20
|
readonly subject: Subject<Card>;
|
|
12
21
|
private faceUrl;
|
|
13
22
|
private backsideUrl;
|
|
@@ -22,13 +31,7 @@ export declare class Card extends BaseItem {
|
|
|
22
31
|
width: number;
|
|
23
32
|
height: number;
|
|
24
33
|
};
|
|
25
|
-
constructor(board: Board, id?: string,
|
|
26
|
-
faceUrl: string;
|
|
27
|
-
backsideUrl: string;
|
|
28
|
-
}, dimensions?: {
|
|
29
|
-
width: number;
|
|
30
|
-
height: number;
|
|
31
|
-
});
|
|
34
|
+
constructor(board: Board, id?: string, defaultData?: CardData);
|
|
32
35
|
getDimensions(): {
|
|
33
36
|
width: number;
|
|
34
37
|
height: number;
|
|
@@ -7,7 +7,7 @@ import { DeckOperation } from "../../../Examples/CardGame/Deck/DeckOperation";
|
|
|
7
7
|
import { Path } from "../../../Path";
|
|
8
8
|
import { DocumentFactory } from "../../../../api/DocumentFactory";
|
|
9
9
|
export declare const defaultDeckData: BaseItemData;
|
|
10
|
-
export declare class Deck extends BaseItem {
|
|
10
|
+
export declare class Deck extends BaseItem<Deck> {
|
|
11
11
|
readonly subject: Subject<Deck>;
|
|
12
12
|
shouldUseCustomRender: boolean;
|
|
13
13
|
private cachedCanvas;
|
|
@@ -6,8 +6,13 @@ import { DrawingContext } from "../../../../Items";
|
|
|
6
6
|
import { DocumentFactory } from "../../../../api/DocumentFactory";
|
|
7
7
|
import { DiceOperation } from "./DiceOperation";
|
|
8
8
|
export type DiceType = "common" | "custom";
|
|
9
|
-
export
|
|
10
|
-
|
|
9
|
+
export interface DiceData extends BaseItemData {
|
|
10
|
+
type?: DiceType;
|
|
11
|
+
valueIndex?: number;
|
|
12
|
+
values?: (number | string)[];
|
|
13
|
+
}
|
|
14
|
+
export declare const defaultDiceData: DiceData;
|
|
15
|
+
export declare class Dice extends BaseItem<Dice> {
|
|
11
16
|
readonly itemType = "Dice";
|
|
12
17
|
private type;
|
|
13
18
|
private path;
|
|
@@ -17,6 +22,10 @@ export declare class Dice extends BaseItem {
|
|
|
17
22
|
borderColor: string;
|
|
18
23
|
borderStyle: BorderStyle;
|
|
19
24
|
private borderWidth;
|
|
25
|
+
private values;
|
|
26
|
+
private valueIndex;
|
|
27
|
+
private renderValues;
|
|
28
|
+
private animationFrameId;
|
|
20
29
|
constructor(board: Board, id?: string, defaultItemData?: BaseItemData, isGroupItem?: boolean);
|
|
21
30
|
private transformPath;
|
|
22
31
|
updateRenderValues(): Promise<void>;
|
|
@@ -5,8 +5,12 @@ import { DrawingContext } from "../../../DrawingContext";
|
|
|
5
5
|
import { BorderWidth, BorderStyle } from "../../../Path";
|
|
6
6
|
import { ScreenOperation } from "./ScreenOperation";
|
|
7
7
|
import { DocumentFactory } from "../../../../api/DocumentFactory";
|
|
8
|
-
export
|
|
9
|
-
|
|
8
|
+
export interface ScreenData extends BaseItemData {
|
|
9
|
+
ownerId?: string;
|
|
10
|
+
backgroundUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const defaultScreenData: ScreenData;
|
|
13
|
+
export declare class Screen extends BaseItem<Screen> {
|
|
10
14
|
readonly subject: Subject<Screen>;
|
|
11
15
|
private path;
|
|
12
16
|
private borderWidth;
|
|
@@ -15,6 +19,7 @@ export declare class Screen extends BaseItem {
|
|
|
15
19
|
borderStyle: BorderStyle;
|
|
16
20
|
backgroundUrl: string;
|
|
17
21
|
backgroundImage: HTMLImageElement | null;
|
|
22
|
+
ownerId: string;
|
|
18
23
|
constructor(board: Board, id?: string, defaultItemData?: BaseItemData, isGroupItem?: boolean);
|
|
19
24
|
apply(op: ScreenOperation): void;
|
|
20
25
|
getOwnerId(): string;
|
|
@@ -11,7 +11,7 @@ export declare const COUNTER_DIMENSIONS: {
|
|
|
11
11
|
width: number;
|
|
12
12
|
height: number;
|
|
13
13
|
};
|
|
14
|
-
export declare class Counter extends BaseItem {
|
|
14
|
+
export declare class Counter extends BaseItem<Counter> {
|
|
15
15
|
private count;
|
|
16
16
|
readonly subject: Subject<Counter>;
|
|
17
17
|
shouldUseCustomRender: boolean;
|
|
@@ -19,7 +19,7 @@ export interface StarData {
|
|
|
19
19
|
linkTo?: string;
|
|
20
20
|
}
|
|
21
21
|
export declare const defaultStarData: BaseItemData;
|
|
22
|
-
export declare class Star extends BaseItem {
|
|
22
|
+
export declare class Star extends BaseItem<Star> {
|
|
23
23
|
readonly itemType = "Star";
|
|
24
24
|
private path;
|
|
25
25
|
readonly subject: Subject<Star>;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import { Mbr
|
|
1
|
+
import { Mbr } from "../Mbr/Mbr";
|
|
2
|
+
import { Line } from "../Line/Line";
|
|
3
|
+
import { Point } from "../Point/Point";
|
|
4
|
+
import { Transformation } from "../Transformation/Transformation";
|
|
5
|
+
import { Path } from "../Path/Path";
|
|
6
|
+
import { Paths } from "../Path/Paths";
|
|
7
|
+
import type { Item } from "../Item";
|
|
8
|
+
import { RichText } from "../RichText/RichText";
|
|
9
|
+
import { Matrix } from "../Transformation/Matrix";
|
|
10
|
+
import type { SerializedItemData } from "../BaseItem/BaseItem";
|
|
2
11
|
import { Subject } from "../../Subject";
|
|
3
12
|
import { DrawingContext } from "../DrawingContext";
|
|
4
13
|
import { Operation } from "../../Events";
|
|
@@ -13,7 +22,7 @@ import { DocumentFactory } from "../../api/DocumentFactory";
|
|
|
13
22
|
import { ResizeType } from "../../Selection/Transformer/TransformerHelpers/getResizeType";
|
|
14
23
|
import { BaseItem } from "../BaseItem";
|
|
15
24
|
import { ColorValue } from "../../..";
|
|
16
|
-
export declare class Frame extends BaseItem {
|
|
25
|
+
export declare class Frame extends BaseItem<Frame> {
|
|
17
26
|
private getItemById;
|
|
18
27
|
private name;
|
|
19
28
|
private shapeType;
|
|
@@ -74,7 +83,7 @@ export declare class Frame extends BaseItem {
|
|
|
74
83
|
scaleLikeLastFrame(): void;
|
|
75
84
|
setLastFrameScale(): void;
|
|
76
85
|
serialize(): SerializedItemData<FrameData>;
|
|
77
|
-
deserialize(data:
|
|
86
|
+
deserialize(data: SerializedItemData<FrameData> | FrameData): this;
|
|
78
87
|
getSavedProportionsMatrix(): Matrix;
|
|
79
88
|
private transformPath;
|
|
80
89
|
apply(op: Operation): void;
|
|
@@ -44,7 +44,7 @@ export interface FrameData {
|
|
|
44
44
|
borderOpacity: number;
|
|
45
45
|
borderStyle: BorderStyle;
|
|
46
46
|
borderWidth: BorderWidth;
|
|
47
|
-
|
|
47
|
+
childIds: string[];
|
|
48
48
|
transformation?: TransformationData;
|
|
49
49
|
text?: RichTextData;
|
|
50
50
|
canChangeRatio?: boolean;
|
|
@@ -60,11 +60,11 @@ export declare class DefaultFrameData implements FrameData {
|
|
|
60
60
|
borderStyle: BorderStyle;
|
|
61
61
|
borderWidth: BorderWidth;
|
|
62
62
|
transformation: DefaultTransformationData;
|
|
63
|
-
|
|
63
|
+
childIds: string[];
|
|
64
64
|
text: RichTextData;
|
|
65
65
|
canChangeRatio: boolean;
|
|
66
66
|
linkTo?: string | undefined;
|
|
67
67
|
readonly itemType = "Frame";
|
|
68
68
|
[key: string]: unknown;
|
|
69
|
-
constructor(shapeType?: FrameType, backgroundColor?: ColorValue, backgroundOpacity?: number, borderColor?: ColorValue, borderOpacity?: number, borderStyle?: BorderStyle, borderWidth?: BorderWidth, transformation?: DefaultTransformationData,
|
|
69
|
+
constructor(shapeType?: FrameType, backgroundColor?: ColorValue, backgroundOpacity?: number, borderColor?: ColorValue, borderOpacity?: number, borderStyle?: BorderStyle, borderWidth?: BorderWidth, transformation?: DefaultTransformationData, childIds?: string[], text?: RichTextData, canChangeRatio?: boolean, linkTo?: string | undefined);
|
|
70
70
|
}
|
|
@@ -3,7 +3,7 @@ import { Point } from "./Point";
|
|
|
3
3
|
import { Line } from "./Line";
|
|
4
4
|
import { DrawingContext } from "./DrawingContext";
|
|
5
5
|
import { GeometricNormal } from "./GeometricNormal";
|
|
6
|
-
import { RichText } from "./RichText";
|
|
6
|
+
import type { RichText } from "./RichText";
|
|
7
7
|
/**
|
|
8
8
|
* Methods that define the geometry of an item.
|
|
9
9
|
*/
|
|
@@ -3,19 +3,23 @@ import { DrawingContext } from "../DrawingContext";
|
|
|
3
3
|
import { TransformationData } from "../Transformation/TransformationData";
|
|
4
4
|
import { GroupOperation } from "./GroupOperation";
|
|
5
5
|
import { Events, Operation } from "../../Events";
|
|
6
|
-
import { Mbr
|
|
6
|
+
import { Mbr } from "../Mbr/Mbr";
|
|
7
|
+
import { Line } from "../Line/Line";
|
|
8
|
+
import { Point } from "../Point/Point";
|
|
9
|
+
import { Transformation } from "../Transformation/Transformation";
|
|
10
|
+
import type { Item } from "../Item";
|
|
7
11
|
import { Board } from "../../Board";
|
|
8
12
|
import { LinkTo } from "../LinkTo/LinkTo";
|
|
9
13
|
import { BaseItem, SerializedItemData } from "../BaseItem/BaseItem";
|
|
10
14
|
import { DocumentFactory } from "../../api/DocumentFactory";
|
|
11
15
|
export interface GroupData {
|
|
12
16
|
readonly itemType: "Group";
|
|
13
|
-
|
|
17
|
+
childIds: string[];
|
|
14
18
|
transformation: TransformationData;
|
|
15
19
|
isLockedGroup?: boolean;
|
|
16
|
-
[key: string]:
|
|
20
|
+
[key: string]: unknown;
|
|
17
21
|
}
|
|
18
|
-
export declare class Group extends BaseItem {
|
|
22
|
+
export declare class Group extends BaseItem<Group> {
|
|
19
23
|
private events?;
|
|
20
24
|
readonly linkTo: LinkTo;
|
|
21
25
|
readonly itemType = "Group";
|
|
@@ -24,7 +28,7 @@ export declare class Group extends BaseItem {
|
|
|
24
28
|
readonly subject: Subject<Group>;
|
|
25
29
|
transformationRenderBlock?: boolean;
|
|
26
30
|
isLockedGroup: boolean;
|
|
27
|
-
constructor(board: Board, events?: Events | undefined,
|
|
31
|
+
constructor(board: Board, events?: Events | undefined, childIds?: string[], id?: string);
|
|
28
32
|
isClosed(): boolean;
|
|
29
33
|
getRichText(): null;
|
|
30
34
|
apply(op: Operation): void;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Events, Operation } from "../../Events";
|
|
2
2
|
import { Subject } from "../../Subject";
|
|
3
3
|
import { DrawingContext } from "../DrawingContext";
|
|
4
|
-
import { Path
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { Path } from "../Path/Path";
|
|
5
|
+
import { Paths } from "../Path/Paths";
|
|
6
|
+
import { Point } from "../Point/Point";
|
|
7
|
+
import { Transformation } from "../Transformation/Transformation";
|
|
7
8
|
import { TransformationData } from "../Transformation/TransformationData";
|
|
8
9
|
import { Board } from "../../Board";
|
|
9
10
|
import { LinkTo } from "../LinkTo/LinkTo";
|
|
@@ -28,7 +29,7 @@ export interface ImageConstructorData {
|
|
|
28
29
|
storageLink: string;
|
|
29
30
|
imageDimension: Dimension;
|
|
30
31
|
}
|
|
31
|
-
export declare class ImageItem extends BaseItem {
|
|
32
|
+
export declare class ImageItem extends BaseItem<ImageItem> {
|
|
32
33
|
private events?;
|
|
33
34
|
readonly itemType = "Image";
|
|
34
35
|
parent: string;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { AINode, AINodeData } from "./AINode";
|
|
2
|
-
import { AudioItem, AudioItemData } from "./Audio";
|
|
3
|
-
import { Comment, CommentData } from "./Comment";
|
|
4
|
-
import { Connector, ConnectorData } from "./Connector";
|
|
5
|
-
import { Drawing, DrawingData } from "./Drawing";
|
|
6
|
-
import { Frame, FrameData } from "./Frame";
|
|
7
|
-
import { Group, GroupData } from "./Group";
|
|
8
|
-
import { ImageItem, ImageItemData } from "./Image";
|
|
9
|
-
import { Placeholder, PlaceholderData } from "./Placeholder";
|
|
10
|
-
import { RichText, RichTextData } from "./RichText";
|
|
11
|
-
import { Shape, ShapeData } from "./Shape";
|
|
12
|
-
import { Sticker } from "./Sticker";
|
|
13
|
-
import { StickerData } from "./Sticker/StickerOperation";
|
|
14
|
-
import { VideoItem, VideoItemData } from "./Video";
|
|
15
|
-
import { BaseItem, SerializedItemData } from "./BaseItem/BaseItem";
|
|
1
|
+
import type { AINode, AINodeData } from "./AINode";
|
|
2
|
+
import type { AudioItem, AudioItemData } from "./Audio";
|
|
3
|
+
import type { Comment, CommentData } from "./Comment";
|
|
4
|
+
import type { Connector, ConnectorData } from "./Connector";
|
|
5
|
+
import type { Drawing, DrawingData } from "./Drawing";
|
|
6
|
+
import type { Frame, FrameData } from "./Frame";
|
|
7
|
+
import type { Group, GroupData } from "./Group";
|
|
8
|
+
import type { ImageItem, ImageItemData } from "./Image";
|
|
9
|
+
import type { Placeholder, PlaceholderData } from "./Placeholder";
|
|
10
|
+
import type { RichText, RichTextData } from "./RichText";
|
|
11
|
+
import type { Shape, ShapeData } from "./Shape";
|
|
12
|
+
import type { Sticker } from "./Sticker";
|
|
13
|
+
import type { StickerData } from "./Sticker/StickerOperation";
|
|
14
|
+
import type { VideoItem, VideoItemData } from "./Video";
|
|
15
|
+
import type { BaseItem, SerializedItemData } from "./BaseItem/BaseItem";
|
|
16
16
|
export type Item = RichText | Shape | Connector | ImageItem | Drawing | Sticker | Frame | Placeholder | Comment | Group | AINode | VideoItem | AudioItem | BaseItem;
|
|
17
17
|
export type ItemType = Item["itemType"];
|
|
18
18
|
export type ItemData = ShapeData | RichTextData | ConnectorData | ImageItemData | DrawingData | StickerData | FrameData | PlaceholderData | CommentData | GroupData | AINodeData | VideoItemData | AudioItemData | SerializedItemData;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Point } from "../Point";
|
|
2
|
-
import { Line } from "../Line";
|
|
3
|
-
import { Matrix } from "../Transformation";
|
|
1
|
+
import { Point } from "../Point/Point";
|
|
2
|
+
import { Line } from "../Line/Line";
|
|
3
|
+
import { Matrix } from "../Transformation/Matrix";
|
|
4
4
|
import { VerticalAlignment } from "../Alignment";
|
|
5
5
|
import { DrawingContext } from "../DrawingContext";
|
|
6
6
|
import { Geometry } from "../Geometry";
|
|
7
7
|
import { GeometricNormal } from "../GeometricNormal";
|
|
8
|
-
import { BorderStyle } from "../Path";
|
|
9
|
-
import { RichText } from "
|
|
8
|
+
import type { BorderStyle } from "../Path/Path";
|
|
9
|
+
import type { RichText } from "../RichText/RichText";
|
|
10
10
|
/**
|
|
11
11
|
* The minimum bounding rectangle (MBR), also known as bounding box (BBOX) or envelope.
|
|
12
12
|
* https://en.wikipedia.org/wiki/Minimum_bounding_rectangle
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { Events, Operation } from "../../Events";
|
|
2
2
|
import { DrawingContext } from "../DrawingContext";
|
|
3
|
+
import { ShapeType } from "../Shape/index";
|
|
3
4
|
import { ResizeType } from "../../Selection/Transformer/TransformerHelpers/getResizeType";
|
|
4
5
|
import { Subject } from "../../Subject";
|
|
5
6
|
import { GeometricNormal } from "../GeometricNormal";
|
|
6
|
-
import { Line } from "../Line";
|
|
7
|
-
import { Mbr } from "../Mbr";
|
|
8
|
-
import { Path
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { Line } from "../Line/Line";
|
|
8
|
+
import { Mbr } from "../Mbr/Mbr";
|
|
9
|
+
import { Path } from "../Path/Path";
|
|
10
|
+
import { Paths } from "../Path/Paths";
|
|
11
|
+
import { Point } from "../Point/Point";
|
|
12
|
+
import { Transformation } from "../Transformation/Transformation";
|
|
13
|
+
import { Matrix } from "../Transformation/Matrix";
|
|
14
|
+
import type { TransformationData } from "../Transformation/TransformationData";
|
|
11
15
|
import { PlaceholderOperation } from "./PlaceholderOperation";
|
|
12
|
-
import { BaseItem
|
|
16
|
+
import { BaseItem } from "../BaseItem/BaseItem";
|
|
17
|
+
import type { SerializedItemData } from "../BaseItem/BaseItem";
|
|
13
18
|
import { Board } from "../../Board";
|
|
14
19
|
import { DocumentFactory } from "../../api/DocumentFactory";
|
|
15
20
|
export interface PlaceholderData {
|
|
@@ -20,13 +25,13 @@ export interface PlaceholderData {
|
|
|
20
25
|
miroData?: unknown;
|
|
21
26
|
[key: string]: unknown;
|
|
22
27
|
}
|
|
23
|
-
export declare class Placeholder extends BaseItem {
|
|
28
|
+
export declare class Placeholder extends BaseItem<Placeholder> {
|
|
24
29
|
private events?;
|
|
25
30
|
private miroData?;
|
|
26
31
|
backgroundColor: string;
|
|
27
32
|
private icon;
|
|
28
33
|
readonly itemType = "Placeholder";
|
|
29
|
-
shapeType:
|
|
34
|
+
shapeType: ShapeType;
|
|
30
35
|
parent: string;
|
|
31
36
|
readonly transformation: Transformation;
|
|
32
37
|
private path;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { Board } from "../Board";
|
|
1
2
|
import { CustomTool } from "../Tools/CustomTool";
|
|
2
3
|
import { BaseItemData } from "./BaseItem/BaseItem";
|
|
4
|
+
type ItemConstructor = new (board: Board, id: string, defaultData: BaseItemData) => any;
|
|
3
5
|
type RegisterItemArgs = {
|
|
4
|
-
item:
|
|
6
|
+
item: ItemConstructor;
|
|
5
7
|
defaultData: BaseItemData;
|
|
6
8
|
toolData?: {
|
|
7
9
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultTextStyles } from "../../Settings";
|
|
2
2
|
import { Subject } from "../../Subject";
|
|
3
|
-
import { BaseSelection, Descendant, Operation as SlateOp, Operation } from "slate";
|
|
3
|
+
import { BaseSelection, Descendant, Editor, Operation as SlateOp, Operation } from "slate";
|
|
4
4
|
import { HorisontalAlignment, VerticalAlignment } from "../Alignment";
|
|
5
5
|
import { BlockNode, ListType, ParagraphNode } from "./Editor/BlockNode";
|
|
6
6
|
import { TextNode, TextStyle } from "./Editor/TextNode";
|
|
@@ -23,7 +23,7 @@ export declare class EditorContainer {
|
|
|
23
23
|
private calcAutoSize;
|
|
24
24
|
private applyAutoSizeScale;
|
|
25
25
|
private updateElement;
|
|
26
|
-
readonly editor: any;
|
|
26
|
+
readonly editor: Editor & any;
|
|
27
27
|
maxWidth: number | undefined;
|
|
28
28
|
textScale: number;
|
|
29
29
|
verticalAlignment: VerticalAlignment;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { Board } from "../../Board";
|
|
1
|
+
import type { Board } from "../../Board";
|
|
2
2
|
import { DocumentFactory } from "../../api/DocumentFactory";
|
|
3
3
|
import { Camera } from "../../Camera";
|
|
4
|
-
import { Operation } from "../../Events";
|
|
5
|
-
import { SelectionContext } from "../../Selection";
|
|
4
|
+
import type { Operation } from "../../Events";
|
|
5
|
+
import type { SelectionContext } from "../../Selection";
|
|
6
6
|
import { DefaultTextStyles } from "../../Settings";
|
|
7
7
|
import { Subject } from "../../Subject";
|
|
8
8
|
import { BaseRange, BaseSelection, Descendant, Operation as SlateOp } from "slate";
|
|
9
|
-
import { ItemType
|
|
9
|
+
import { ItemType } from "../Item";
|
|
10
|
+
import { Matrix } from "../Transformation/Matrix";
|
|
11
|
+
import { Mbr } from "../Mbr/Mbr";
|
|
12
|
+
import { Point } from "../Point/Point";
|
|
13
|
+
import { RichTextData } from "./RichTextData";
|
|
14
|
+
import { Transformation } from "../Transformation/Transformation";
|
|
10
15
|
import { HorisontalAlignment, VerticalAlignment } from "../Alignment";
|
|
11
16
|
import { DrawingContext } from "../DrawingContext";
|
|
12
17
|
import { LinkTo } from "../LinkTo/LinkTo";
|
|
@@ -15,14 +20,15 @@ import { BlockNode, BlockType } from "./Editor/BlockNode";
|
|
|
15
20
|
import { TextStyle } from "./Editor/TextNode";
|
|
16
21
|
import { EditorContainer } from "./EditorContainer";
|
|
17
22
|
import { RichTextOperation } from "./RichTextOperations";
|
|
18
|
-
import { BaseItem
|
|
23
|
+
import { BaseItem } from "../BaseItem/BaseItem";
|
|
24
|
+
import type { SerializedItemData } from "../BaseItem/BaseItem";
|
|
19
25
|
export declare function isEditInProcess(): boolean;
|
|
20
26
|
export declare function toggleEdit(value: boolean): void;
|
|
21
27
|
/**
|
|
22
28
|
* A geometric item to render a rich text on a DrawingContext.
|
|
23
29
|
*
|
|
24
30
|
*/
|
|
25
|
-
export declare class RichText extends BaseItem {
|
|
31
|
+
export declare class RichText extends BaseItem<RichText> {
|
|
26
32
|
container: Mbr;
|
|
27
33
|
readonly transformation: Transformation;
|
|
28
34
|
placeholderText: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Board } from '../../Board';
|
|
2
2
|
import { RichText } from './RichText';
|
|
3
3
|
import { GroupEdit, RichTextOperation } from './RichTextOperations';
|
|
4
|
-
import { Command } from '../../Events';
|
|
4
|
+
import { Command, Operation } from '../../Events';
|
|
5
5
|
export declare class RichTextCommand implements Command {
|
|
6
6
|
private board;
|
|
7
7
|
private richText;
|
|
@@ -14,7 +14,7 @@ export declare class RichTextCommand implements Command {
|
|
|
14
14
|
item: string;
|
|
15
15
|
operation: RichTextOperation;
|
|
16
16
|
}[];
|
|
17
|
-
merge(op:
|
|
17
|
+
merge(op: Operation): this;
|
|
18
18
|
}
|
|
19
19
|
type TextEdits = {
|
|
20
20
|
item: RichText;
|
|
@@ -14,7 +14,7 @@ export interface RichTextData {
|
|
|
14
14
|
placeholderText: string;
|
|
15
15
|
realSize: 'auto' | number;
|
|
16
16
|
linkTo?: string;
|
|
17
|
-
[key: string]:
|
|
17
|
+
[key: string]: unknown;
|
|
18
18
|
}
|
|
19
19
|
export declare class DefaultRichTextData implements RichTextData {
|
|
20
20
|
children: Descendant[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseSelection, Operation } from 'slate';
|
|
2
2
|
import { HorisontalAlignment, VerticalAlignment } from '../Alignment';
|
|
3
3
|
import { TextStyle } from './Editor/TextNode';
|
|
4
|
-
import { SelectionContext } from '../../Selection/Selection';
|
|
4
|
+
import type { SelectionContext } from '../../Selection/Selection';
|
|
5
5
|
import { ColorValue } from '../../..';
|
|
6
6
|
interface RichTextBaseOp {
|
|
7
7
|
class: 'RichText';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BulletedListNode, NumberedListNode } from '../../../RichText/Editor/BlockNode';
|
|
2
2
|
import { CustomEditor } from 'Items/RichText/Editor/Editor.d';
|
|
3
|
-
export declare function getBlockParentList(editor: CustomEditor, blockPath: number[]): [node:
|
|
3
|
+
export declare function getBlockParentList(editor: CustomEditor, blockPath: number[]): [node: BulletedListNode | NumberedListNode, path: number[]] | null;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Mbr
|
|
1
|
+
import { Mbr } from '../../../Mbr/Mbr';
|
|
2
|
+
import { Point } from '../../../Point/Point';
|
|
3
|
+
import { Paths } from '../../../Path/Paths';
|
|
2
4
|
export declare const BPMN_DataObject: {
|
|
3
5
|
name: string;
|
|
4
6
|
textBounds: Mbr;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Mbr
|
|
1
|
+
import { Mbr } from '../../../Mbr/Mbr';
|
|
2
|
+
import { Point } from '../../../Point/Point';
|
|
3
|
+
import { Paths } from '../../../Path/Paths';
|
|
2
4
|
export declare const BPMN_EventSubprocess: {
|
|
3
5
|
name: string;
|
|
4
6
|
textBounds: Mbr;
|