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
package/dist/types/Board.d.ts
CHANGED
|
@@ -2,11 +2,13 @@ import { BoardOps, ItemsIndexRecord } from "./BoardOperations";
|
|
|
2
2
|
import { Camera } from "./Camera";
|
|
3
3
|
import { Events, Operation } from "./Events";
|
|
4
4
|
import { SyncBoardEvent } from "./Events/Events";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Matrix } from "./Items/Transformation/Matrix";
|
|
6
|
+
import { Mbr } from "./Items/Mbr/Mbr";
|
|
7
|
+
import type { Item, ItemData } from "./Items/Item";
|
|
8
|
+
import type { AINode } from "./Items/AINode";
|
|
7
9
|
import { DrawingContext } from "./Items/DrawingContext";
|
|
8
|
-
import { Group } from "./Items/Group";
|
|
9
|
-
import { ImageItem } from "./Items/Image";
|
|
10
|
+
import type { Group } from "./Items/Group";
|
|
11
|
+
import type { ImageItem } from "./Items/Image";
|
|
10
12
|
import { Keyboard } from "./Keyboard";
|
|
11
13
|
import { Pointer } from "./Pointer";
|
|
12
14
|
import { Presence } from "./Presence/Presence";
|
|
@@ -16,8 +18,8 @@ import { SpatialIndex } from "./SpatialIndex";
|
|
|
16
18
|
import { Subject } from "./Subject";
|
|
17
19
|
import { Tools } from "./Tools";
|
|
18
20
|
import { ItemsMap } from "./Validators";
|
|
19
|
-
import { BaseItem } from "./Items/BaseItem";
|
|
20
|
-
import { BaseItemData } from "./Items/BaseItem/BaseItem";
|
|
21
|
+
import type { BaseItem } from "./Items/BaseItem";
|
|
22
|
+
import type { BaseItemData } from "./Items/BaseItem/BaseItem";
|
|
21
23
|
import { ItemDataWithId } from "./Items/Item";
|
|
22
24
|
import { Account } from "./types/Account";
|
|
23
25
|
export type InterfaceType = "edit" | "view" | "loading";
|
|
@@ -27,7 +29,7 @@ export declare class Board {
|
|
|
27
29
|
saveEditingFile?: (() => Promise<void>) | undefined;
|
|
28
30
|
private account?;
|
|
29
31
|
events: Events;
|
|
30
|
-
|
|
32
|
+
isBoardMenuOpen: boolean;
|
|
31
33
|
readonly selection: BoardSelection;
|
|
32
34
|
readonly tools: Tools;
|
|
33
35
|
readonly pointer: Pointer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Command } from './Events';
|
|
1
|
+
import { Command, Operation } from './Events';
|
|
2
2
|
import { BoardOps } from './BoardOperations';
|
|
3
3
|
import { Board } from './Board';
|
|
4
4
|
export declare class BoardCommand implements Command {
|
|
@@ -9,5 +9,5 @@ export declare class BoardCommand implements Command {
|
|
|
9
9
|
apply(): void;
|
|
10
10
|
revert(): void;
|
|
11
11
|
getReverse(): BoardOps | BoardOps[];
|
|
12
|
-
merge(op:
|
|
12
|
+
merge(op: Operation): this;
|
|
13
13
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { Matrix
|
|
1
|
+
import { Matrix } from '../Items/Transformation/Matrix';
|
|
2
|
+
import { Point } from '../Items/Point/Point';
|
|
3
|
+
import { Mbr } from '../Items/Mbr/Mbr';
|
|
4
|
+
import type { Item } from '../Items/Item';
|
|
2
5
|
import { Keyboard } from '../Keyboard';
|
|
3
6
|
import { Pointer } from '../Pointer';
|
|
4
7
|
import { Subject } from '../Subject';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { Board } from "../Board";
|
|
2
|
-
import { BaseOperation } from "./EventsOperations";
|
|
3
|
-
|
|
1
|
+
import type { Board } from "../Board";
|
|
2
|
+
import { BaseOperation, Operation } from "./EventsOperations";
|
|
3
|
+
import { Command } from "./Command";
|
|
4
|
+
export declare class BaseCommand implements Command {
|
|
4
5
|
private board;
|
|
5
6
|
itemIds: string[];
|
|
6
7
|
operation: BaseOperation;
|
|
7
8
|
private reverse;
|
|
8
9
|
constructor(board: Board, itemIds: string[], operation: BaseOperation);
|
|
9
|
-
merge(op:
|
|
10
|
+
merge(op: Operation): this;
|
|
10
11
|
apply(): void;
|
|
11
12
|
revert(): void;
|
|
12
13
|
getReverse(): {
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { Board } from '../Board';
|
|
2
|
-
import {
|
|
3
|
-
import { Item, TransformationOperation } from '../Items';
|
|
1
|
+
import type { Board } from '../Board';
|
|
2
|
+
import { Operation } from './EventsOperations';
|
|
4
3
|
export interface Command {
|
|
5
4
|
apply(): void;
|
|
6
5
|
revert(): void;
|
|
7
|
-
merge?: (op:
|
|
6
|
+
merge?: (op: Operation) => Command;
|
|
8
7
|
}
|
|
9
8
|
export { BaseCommand } from "./BaseCommand";
|
|
10
9
|
export interface ItemCommandFactory {
|
|
11
|
-
(items:
|
|
10
|
+
(items: any[], operation: any, board?: Board): Command;
|
|
11
|
+
}
|
|
12
|
+
export declare class NoOpCommand {
|
|
13
|
+
reason: string;
|
|
14
|
+
constructor(reason: string);
|
|
15
|
+
merge(_op: unknown): this;
|
|
16
|
+
apply(): void;
|
|
17
|
+
revert(): void;
|
|
12
18
|
}
|
|
13
|
-
export declare const itemCommandFactories: Record<string, ItemCommandFactory>;
|
|
14
|
-
export declare function createCommand(board: Board, operation: Operation): Command;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Board } from '../Board';
|
|
2
|
+
import { Operation } from './EventsOperations';
|
|
3
|
+
import { Command, ItemCommandFactory } from './Command';
|
|
4
|
+
export declare const itemCommandFactories: Record<string, ItemCommandFactory>;
|
|
5
|
+
export declare function createCommand(board: Board, operation: Operation): Command;
|
|
@@ -29,7 +29,7 @@ export interface BoardEventPackBody {
|
|
|
29
29
|
}
|
|
30
30
|
export interface SyncBoardEvent extends BoardEvent {
|
|
31
31
|
lastKnownOrder: number;
|
|
32
|
-
userId:
|
|
32
|
+
userId: number;
|
|
33
33
|
}
|
|
34
34
|
interface SyncBoardEventPackBody extends BoardEventPackBody {
|
|
35
35
|
lastKnownOrder: number;
|
|
@@ -39,6 +39,7 @@ export interface SyncBoardEventPack extends BoardEventPack {
|
|
|
39
39
|
}
|
|
40
40
|
export type SyncEvent = SyncBoardEvent | SyncBoardEventPack;
|
|
41
41
|
export declare class Events {
|
|
42
|
+
static createCommand: (board: Board, operation: Operation) => Command;
|
|
42
43
|
subject: Subject<BoardEvent>;
|
|
43
44
|
log: EventsLog;
|
|
44
45
|
board: Board;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { TransformationOperation } from "../Items";
|
|
2
|
-
import { ShapeOperation } from "../Items/Shape";
|
|
3
|
-
import { RichTextOperation } from "../Items";
|
|
4
|
-
import { BoardOps } from "../BoardOperations";
|
|
5
|
-
import { ConnectorOperation } from "../Items/Connector";
|
|
6
|
-
import { DrawingOperation } from "../Items/Drawing/DrawingOperation";
|
|
7
|
-
import { StickerOperation } from "../Items/Sticker/StickerOperation";
|
|
8
|
-
import { FrameOperation } from "../Items/Frame";
|
|
9
|
-
import { LinkToOperation } from "../Items/LinkTo/LinkToOperation";
|
|
10
|
-
import { PlaceholderOperation } from "../Items/Placeholder/PlaceholderOperation";
|
|
11
|
-
import { GroupOperation } from "../Items/Group/GroupOperation";
|
|
12
|
-
import { CommentOperation } from "../Items/Comment";
|
|
13
|
-
import { ImageOperation } from "../Items/Image";
|
|
14
|
-
import { VideoOperation } from "../Items/Video/VideoOperation";
|
|
15
|
-
import { AudioOperation } from "../Items/Audio/AudioOperation";
|
|
1
|
+
import type { TransformationOperation } from "../Items/Transformation/TransformationOperations";
|
|
2
|
+
import type { ShapeOperation } from "../Items/Shape/ShapeOperation";
|
|
3
|
+
import type { RichTextOperation } from "../Items/RichText/RichTextOperations";
|
|
4
|
+
import type { BoardOps } from "../BoardOperations";
|
|
5
|
+
import type { ConnectorOperation } from "../Items/Connector/ConnectorOperations";
|
|
6
|
+
import type { DrawingOperation } from "../Items/Drawing/DrawingOperation";
|
|
7
|
+
import type { StickerOperation } from "../Items/Sticker/StickerOperation";
|
|
8
|
+
import type { FrameOperation } from "../Items/Frame/FrameOperation";
|
|
9
|
+
import type { LinkToOperation } from "../Items/LinkTo/LinkToOperation";
|
|
10
|
+
import type { PlaceholderOperation } from "../Items/Placeholder/PlaceholderOperation";
|
|
11
|
+
import type { GroupOperation } from "../Items/Group/GroupOperation";
|
|
12
|
+
import type { CommentOperation } from "../Items/Comment/CommentOperation";
|
|
13
|
+
import type { ImageOperation } from "../Items/Image/ImageOperation";
|
|
14
|
+
import type { VideoOperation } from "../Items/Video/VideoOperation";
|
|
15
|
+
import type { AudioOperation } from "../Items/Audio/AudioOperation";
|
|
16
16
|
interface Undo {
|
|
17
17
|
class: "Events";
|
|
18
18
|
method: "undo";
|
|
@@ -35,4 +35,12 @@ export type ItemOperation = LinkToOperation | TransformationOperation | ShapeOpe
|
|
|
35
35
|
export type UndoableOperation = BoardOps | ItemOperation;
|
|
36
36
|
export type Operation = UndoableOperation | EventsOperation;
|
|
37
37
|
export type MethodType = Operation["method"];
|
|
38
|
+
export declare function isTransformation(op: Operation): op is TransformationOperation;
|
|
39
|
+
export declare function isBoardOp(op: Operation): op is BoardOps;
|
|
40
|
+
export declare function isRichTextOp(op: Operation): op is RichTextOperation;
|
|
41
|
+
export declare function isShapeOp(op: Operation): op is ShapeOperation;
|
|
42
|
+
export declare function isConnectorOp(op: Operation): op is ConnectorOperation;
|
|
43
|
+
export declare function isDrawingOp(op: Operation): op is DrawingOperation;
|
|
44
|
+
export declare function isItemOp(op: Operation): op is ItemOperation;
|
|
45
|
+
export declare function isEventsOp(op: Operation): op is EventsOperation;
|
|
38
46
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Board, BoardSnapshot } from '../../Board';
|
|
2
|
-
import { BoardEvent, BoardEventPack, SyncBoardEvent, SyncEvent } from '../Events';
|
|
2
|
+
import { BoardEvent, BoardEventPack, SyncBoardEvent, SyncBoardEventPack, SyncEvent } from '../Events';
|
|
3
|
+
import { Operation } from '../EventsOperations';
|
|
3
4
|
import { EventsList } from './createEventsList';
|
|
4
5
|
import { Command } from '../Command';
|
|
5
6
|
export interface HistoryRecord {
|
|
@@ -19,7 +20,7 @@ export declare class EventsLog {
|
|
|
19
20
|
private board;
|
|
20
21
|
currentSequenceNumber: number;
|
|
21
22
|
pendingEvent: {
|
|
22
|
-
event:
|
|
23
|
+
event: SyncBoardEventPack;
|
|
23
24
|
sequenceNumber: number;
|
|
24
25
|
lastSentTime: number;
|
|
25
26
|
} | null;
|
|
@@ -27,7 +28,7 @@ export declare class EventsLog {
|
|
|
27
28
|
publishIntervalTimer: NodeJS.Timeout | null;
|
|
28
29
|
resendIntervalTimer: NodeJS.Timeout | null;
|
|
29
30
|
saveFileTimeout: NodeJS.Timeout | null;
|
|
30
|
-
constructor(board: Board);
|
|
31
|
+
constructor(board: Board, commandFactory: (ops: Operation) => Command);
|
|
31
32
|
/**
|
|
32
33
|
* Inserts new events into the events log, handling transformations and merging
|
|
33
34
|
*/
|
|
@@ -40,7 +41,7 @@ export declare class EventsLog {
|
|
|
40
41
|
* Confirms events that have been sent, updating their status in the log
|
|
41
42
|
* Note: Implementation treats the parameter as BoardEventPack
|
|
42
43
|
*/
|
|
43
|
-
confirmSentLocalEvent(event:
|
|
44
|
+
confirmSentLocalEvent(event: SyncEvent): void;
|
|
44
45
|
/**
|
|
45
46
|
* Retrieves unordered records (records to send and new records)
|
|
46
47
|
*/
|
|
@@ -84,4 +85,4 @@ export declare class EventsLog {
|
|
|
84
85
|
*/
|
|
85
86
|
getLastConfirmed(): BoardEvent | null;
|
|
86
87
|
}
|
|
87
|
-
export declare function createEventsLog(board: Board): EventsLog;
|
|
88
|
+
export declare function createEventsLog(board: Board, commandFactory: (ops: Operation) => Command): EventsLog;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { BoardEvent } from "../Events";
|
|
2
2
|
import { SyncLog, SyncLogSubject } from "../SyncLog";
|
|
3
3
|
import { HistoryRecord } from "./EventsLog";
|
|
4
|
+
import { Operation } from "../EventsOperations";
|
|
4
5
|
import { Command } from "../Command";
|
|
5
6
|
export type FilterPredicate = (value: HistoryRecord, index: number, array: HistoryRecord[]) => boolean;
|
|
6
7
|
export interface EventsList {
|
|
8
|
+
commandFactory: (ops: Operation) => Command;
|
|
7
9
|
addConfirmedRecords(records: HistoryRecord[]): void;
|
|
8
10
|
addNewRecords(records: HistoryRecord[]): void;
|
|
9
11
|
confirmSentRecords(records: BoardEvent[]): void;
|
|
@@ -33,4 +35,4 @@ export interface EventsList {
|
|
|
33
35
|
setSnapshotLastIndex(index: number): void;
|
|
34
36
|
getSnapshotLastIndex(): number;
|
|
35
37
|
}
|
|
36
|
-
export declare function createEventsList(
|
|
38
|
+
export declare function createEventsList(commandFactory: (ops: Operation) => Command): EventsList;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Board } from "../../Board";
|
|
2
|
-
import {
|
|
2
|
+
import { SyncEvent } from "../Events";
|
|
3
3
|
import { EventsList } from "./createEventsList";
|
|
4
|
-
export declare function deserializeAndApplyToList(events:
|
|
4
|
+
export declare function deserializeAndApplyToList(events: SyncEvent[], list: EventsList, board: Board): void;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SyncBoardEventPack } from "../Events";
|
|
1
|
+
import { BoardSnapshot } from "../../Board";
|
|
2
|
+
import { SyncBoardEventPack, SyncEvent } from "../Events";
|
|
3
|
+
import { PresenceEventType, PresenceUser } from "../../Presence/Events";
|
|
4
|
+
import { AiChatEventType } from "./handleAiChatMassage";
|
|
3
5
|
export interface AuthMsg {
|
|
4
6
|
type: "Auth";
|
|
5
7
|
jwt: string;
|
|
@@ -57,5 +59,57 @@ export interface BoardSubscriptionCompletedMsg {
|
|
|
57
59
|
eventsSinceLastSnapshot: SyncBoardEventPack[];
|
|
58
60
|
initialSequenceNumber: number;
|
|
59
61
|
}
|
|
60
|
-
export
|
|
62
|
+
export interface BoardSnapshotMsg {
|
|
63
|
+
type: "BoardSnapshot";
|
|
64
|
+
boardId: string;
|
|
65
|
+
snapshot: string;
|
|
66
|
+
lastEventOrder: number;
|
|
67
|
+
}
|
|
68
|
+
export interface AiChatMsg<T = AiChatEventType> {
|
|
69
|
+
type: 'AiChat';
|
|
70
|
+
boardId: string;
|
|
71
|
+
event: T;
|
|
72
|
+
}
|
|
73
|
+
export interface BoardEventMsg {
|
|
74
|
+
type: "BoardEvent";
|
|
75
|
+
boardId: string;
|
|
76
|
+
event: SyncEvent;
|
|
77
|
+
sequenceNumber: number;
|
|
78
|
+
userId: string;
|
|
79
|
+
}
|
|
80
|
+
export interface ConfirmationMsg {
|
|
81
|
+
type: 'Confirmation';
|
|
82
|
+
boardId: string;
|
|
83
|
+
sequenceNumber: number;
|
|
84
|
+
order: number;
|
|
85
|
+
}
|
|
86
|
+
export interface ModeMsg {
|
|
87
|
+
type: 'Mode';
|
|
88
|
+
boardId: string;
|
|
89
|
+
mode: 'view' | 'edit';
|
|
90
|
+
}
|
|
91
|
+
export interface SnapshotRequestMsg {
|
|
92
|
+
type: 'CreateSnapshotRequest';
|
|
93
|
+
boardId: string;
|
|
94
|
+
}
|
|
95
|
+
export interface UserJoinMsg {
|
|
96
|
+
type: "UserJoin";
|
|
97
|
+
timestamp: number;
|
|
98
|
+
userId: number;
|
|
99
|
+
boardId: string;
|
|
100
|
+
snapshots: Record<string, PresenceUser>;
|
|
101
|
+
}
|
|
102
|
+
export interface PresenceEventMsg<T = PresenceEventType> {
|
|
103
|
+
type: "PresenceEvent";
|
|
104
|
+
boardId: string;
|
|
105
|
+
event: T;
|
|
106
|
+
userId: string;
|
|
107
|
+
softId: string | null;
|
|
108
|
+
hardId: string | null;
|
|
109
|
+
messageId: string;
|
|
110
|
+
nickname: string;
|
|
111
|
+
color: string | null;
|
|
112
|
+
avatar: string | null;
|
|
113
|
+
}
|
|
114
|
+
export type EventsMsg = ModeMsg | BoardEventMsg | SnapshotRequestMsg | ConfirmationMsg | BoardSubscriptionCompletedMsg | UserJoinMsg | PresenceEventMsg | AiChatMsg | BoardSnapshotMsg;
|
|
61
115
|
export type SocketMsg = EventsMsg | AuthMsg | AuthConfirmationMsg | LogoutMsg | GetModeMsg | InvalidateRightsMsg | UserJoinMsg | SubscribeMsg | UnsubscribeMsg | VersionCheckMsg | ErrorMsg | ModeMsg | PingMsg | AiChatMsg | BoardAccessDeniedMsg;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Board } from '../../Board';
|
|
2
|
-
|
|
3
|
-
type: 'AiChat';
|
|
4
|
-
boardId: string;
|
|
5
|
-
event: T;
|
|
6
|
-
}
|
|
2
|
+
import { AiChatMsg } from './boardMessageInterface';
|
|
7
3
|
export type AiChatEventType = UserRequest | ChatChunk | StopGeneration | GenerateImageRequest | GenerateImageResponse | GenerateAudioRequest;
|
|
8
4
|
export type OpenAIModels = 'gpt-3.5-turbo' | 'gpt-4' | 'gpt-4o' | 'GPT-4o' | 'gpt-4o-mini' | 'GPT-4o mini' | 'gpt-4-32k' | 'gpt-3.5-turbo-0613' | 'gpt-4-0613' | 'gpt-3.5-turbo-16k' | 'gpt-4-16k' | 'o1-mini' | 'o1' | ImageModels | CustomModels | TextToSpeechModels;
|
|
9
5
|
type ImageModels = 'dall-e-2' | 'dall-e-3' | 'midjourney' | 'flux-schnell' | 'flux-pro' | 'recraft';
|
|
@@ -1,10 +1,3 @@
|
|
|
1
1
|
import { Board } from "../../Board";
|
|
2
|
-
import {
|
|
3
|
-
export interface BoardEventMsg {
|
|
4
|
-
type: "BoardEvent";
|
|
5
|
-
boardId: string;
|
|
6
|
-
event: SyncEvent;
|
|
7
|
-
sequenceNumber: number;
|
|
8
|
-
userId: string;
|
|
9
|
-
}
|
|
2
|
+
import { BoardEventMsg } from './boardMessageInterface';
|
|
10
3
|
export declare function handleBoardEventMessage(message: BoardEventMsg, board: Board): void;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
import { Board } from '../../Board';
|
|
2
|
-
|
|
3
|
-
type: 'Confirmation';
|
|
4
|
-
boardId: string;
|
|
5
|
-
sequenceNumber: number;
|
|
6
|
-
order: number;
|
|
7
|
-
}
|
|
2
|
+
import { ConfirmationMsg } from './boardMessageInterface';
|
|
8
3
|
export declare function handleConfirmation(msg: ConfirmationMsg, board: Board): void;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { Board } from '../../Board';
|
|
2
|
-
|
|
3
|
-
type: 'CreateSnapshotRequest';
|
|
4
|
-
boardId: string;
|
|
5
|
-
}
|
|
2
|
+
import { SnapshotRequestMsg } from './boardMessageInterface';
|
|
6
3
|
export type SnapshotToPublish = {
|
|
7
4
|
boardId: string;
|
|
8
5
|
snapshot: string;
|
|
9
6
|
lastOrder: number;
|
|
10
7
|
};
|
|
11
|
-
export declare function handleCreateSnapshotRequestMessage(msg:
|
|
8
|
+
export declare function handleCreateSnapshotRequestMessage(msg: SnapshotRequestMsg, board: Board): void;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { Board } from "../../Board";
|
|
2
|
+
import { ModeMsg } from './boardMessageInterface';
|
|
2
3
|
export type ViewMode = "view" | "edit" | "loading";
|
|
3
|
-
export interface ModeMsg {
|
|
4
|
-
type: "Mode";
|
|
5
|
-
boardId: string;
|
|
6
|
-
mode: ViewMode;
|
|
7
|
-
}
|
|
8
4
|
export declare function handleModeMessage(message: ModeMsg, board: Board): void;
|
|
9
5
|
type PanelType = "titlePanel" | "userPanel";
|
|
10
6
|
/** Tries to find panel in search param, returns default value if not found */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Board } from '../../Board';
|
|
2
|
-
import { PresenceEventMsg, UserJoinMsg } from '
|
|
2
|
+
import { PresenceEventMsg, UserJoinMsg } from './boardMessageInterface';
|
|
3
3
|
export declare function handlePresenceEventMessage(message: PresenceEventMsg, board: Board): void;
|
|
4
4
|
export declare function handleUserJoinMessage(message: UserJoinMsg, board: Board): void;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
export { messageRouter } from "./messageRouter";
|
|
2
|
-
export type { AiChatMsg } from "./handleAiChatMassage";
|
|
3
|
-
export type { BoardEventMsg } from "./handleBoardEventMessage";
|
|
4
|
-
export type { ConfirmationMsg } from "./handleConfirmation";
|
|
5
|
-
export type { SnapshotRequestMsg } from "./handleCreateSnapshotRequestMessage";
|
|
6
|
-
export type { ModeMsg } from "./handleModeMessage";
|
|
7
2
|
export * from "./boardMessageInterface";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { Events, createEvents } from "./Events";
|
|
2
2
|
export type { BoardEventBody, BoardEvent, SyncBoardEvent, SyncEvent, } from "./Events";
|
|
3
|
-
export type { ItemOperation, EventsOperation, Operation, } from "./EventsOperations";
|
|
3
|
+
export type { ItemOperation, EventsOperation, Operation, BaseOperation, } from "./EventsOperations";
|
|
4
|
+
export { isTransformation, isBoardOp, isRichTextOp, isShapeOp, isConnectorOp, isDrawingOp, isEventsOp, isItemOp } from "./EventsOperations";
|
|
4
5
|
export type { Command } from "./Command";
|
|
5
6
|
export type { SyncLog } from "./SyncLog";
|
|
6
7
|
export * from "./MessageRouter";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Board } from "../../Board";
|
|
2
2
|
import { DocumentFactory } from "../../api/DocumentFactory";
|
|
3
3
|
import { Operation } from "../../Events/EventsOperations";
|
|
4
|
-
import { AINodeData } from "
|
|
4
|
+
import { AINodeData } from "./AINodeData";
|
|
5
5
|
import { DrawingContext } from "../DrawingContext";
|
|
6
6
|
import { GeometricNormal } from "../GeometricNormal";
|
|
7
7
|
import { Line } from "../Line/Line";
|
|
@@ -17,7 +17,7 @@ import { BaseItem, SerializedItemData } from "../BaseItem/BaseItem";
|
|
|
17
17
|
export declare const CONTEXT_NODE_HIGHLIGHT_COLOR = "rgba(183, 138, 240, 1)";
|
|
18
18
|
export declare const threadDirections: readonly [0, 1, 2, 3];
|
|
19
19
|
export type ThreadDirection = typeof threadDirections[number];
|
|
20
|
-
export declare class AINode extends BaseItem {
|
|
20
|
+
export declare class AINode extends BaseItem<AINode> {
|
|
21
21
|
readonly itemType = "AINode";
|
|
22
22
|
parent: string;
|
|
23
23
|
readonly transformation: Transformation;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DrawingContext } from '../DrawingContext';
|
|
2
|
-
import { Mbr
|
|
2
|
+
import { Mbr } from '../Mbr/Mbr';
|
|
3
|
+
import { Point } from '../Point/Point';
|
|
3
4
|
export declare const ANCHOR_BORDER_COLOR = "rgb(147, 175, 246)";
|
|
4
5
|
export declare const ANCHOR_BACKGROUND_COLOR = "rgb(255, 255, 255)";
|
|
5
6
|
export declare const ANCHOR_STROKE_WIDTH = 1;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { Point
|
|
1
|
+
import { Point } from "../Point/Point";
|
|
2
|
+
import { Line } from "../Line/Line";
|
|
3
|
+
import { Mbr } from "../Mbr/Mbr";
|
|
4
|
+
import { Matrix } from "../Transformation/Matrix";
|
|
2
5
|
import { GeometricNormal } from "../GeometricNormal";
|
|
3
6
|
export declare class ArcData {
|
|
4
7
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Events, Operation } from "../../Events";
|
|
2
2
|
import { Subject } from "../../Subject";
|
|
3
3
|
import { DrawingContext } from "../DrawingContext";
|
|
4
|
-
import { Transformation } from "../Transformation";
|
|
4
|
+
import { Transformation } from "../Transformation/Transformation";
|
|
5
5
|
import { TransformationData } from "../Transformation/TransformationData";
|
|
6
6
|
import { Board } from "../../Board";
|
|
7
7
|
import { LinkTo } from "../LinkTo/LinkTo";
|
|
8
8
|
import { DocumentFactory } from "../../api/DocumentFactory";
|
|
9
|
-
import { Path } from "../Path";
|
|
9
|
+
import { Path } from "../Path/Path";
|
|
10
10
|
import { Point } from "../Point/Point";
|
|
11
11
|
import { BaseItem, SerializedItemData } from "../BaseItem/BaseItem";
|
|
12
12
|
export interface AudioItemData {
|
|
@@ -16,7 +16,7 @@ export interface AudioItemData {
|
|
|
16
16
|
extension?: string;
|
|
17
17
|
[key: string]: unknown;
|
|
18
18
|
}
|
|
19
|
-
export declare class AudioItem extends BaseItem {
|
|
19
|
+
export declare class AudioItem extends BaseItem<AudioItem> {
|
|
20
20
|
private events?;
|
|
21
21
|
private extension?;
|
|
22
22
|
readonly itemType = "Audio";
|
|
@@ -6,11 +6,12 @@ import { Transformation } from "../Transformation/Transformation";
|
|
|
6
6
|
import { Board } from "../../Board";
|
|
7
7
|
import { DrawingContext } from "../DrawingContext";
|
|
8
8
|
import { DocumentFactory } from "../../api/DocumentFactory";
|
|
9
|
-
import { Operation } from "../../Events";
|
|
9
|
+
import type { Operation } from "../../Events/EventsOperations";
|
|
10
|
+
import type { Command } from "../../Events/Command";
|
|
10
11
|
import { TransformationData } from "../Transformation/TransformationData";
|
|
11
12
|
import { BaseOperation } from "../../Events/EventsOperations";
|
|
12
13
|
import { Subject } from "../../Subject";
|
|
13
|
-
import { Path, Paths } from "../Path";
|
|
14
|
+
import { Path, Paths } from "../Path/index";
|
|
14
15
|
import { BaseItemOperation } from "./BaseItemOperation";
|
|
15
16
|
import { SimpleSpatialIndex } from "../../SpatialIndex/SimpleSpatialIndex";
|
|
16
17
|
import { Point } from "../Point";
|
|
@@ -19,16 +20,16 @@ export interface BaseItemData {
|
|
|
19
20
|
itemType: string;
|
|
20
21
|
transformation?: TransformationData;
|
|
21
22
|
linkTo?: string;
|
|
22
|
-
|
|
23
|
+
childIds?: string[];
|
|
24
|
+
[key: string]: unknown;
|
|
23
25
|
}
|
|
24
26
|
export type SerializedItemData<T extends BaseItemData = BaseItemData> = T & {
|
|
25
27
|
id: string;
|
|
26
28
|
transformation: TransformationData;
|
|
27
29
|
};
|
|
28
|
-
export declare class BaseItem extends Mbr implements Geometry {
|
|
30
|
+
export declare class BaseItem<T extends BaseItem<any> = any> extends Mbr implements Geometry {
|
|
29
31
|
private defaultItemData?;
|
|
30
|
-
|
|
31
|
-
static createCommand?: (board: Board, operation: Operation) => any;
|
|
32
|
+
static createCommand?: (board: Board, operation: Operation) => Command;
|
|
32
33
|
readonly transformation: Transformation;
|
|
33
34
|
readonly linkTo: LinkTo;
|
|
34
35
|
parent: string;
|
|
@@ -37,7 +38,7 @@ export declare class BaseItem extends Mbr implements Geometry {
|
|
|
37
38
|
readonly index: SimpleSpatialIndex | null;
|
|
38
39
|
board: Board;
|
|
39
40
|
id: string;
|
|
40
|
-
subject: Subject<
|
|
41
|
+
subject: Subject<T>;
|
|
41
42
|
onRemoveCallbacks: (() => void)[];
|
|
42
43
|
shouldUseCustomRender: boolean;
|
|
43
44
|
shouldRenderOutsideViewRect: boolean;
|
|
@@ -45,7 +46,7 @@ export declare class BaseItem extends Mbr implements Geometry {
|
|
|
45
46
|
resizeEnabled: boolean;
|
|
46
47
|
onlyProportionalResize: boolean;
|
|
47
48
|
itemType: string;
|
|
48
|
-
|
|
49
|
+
childIds: string[];
|
|
49
50
|
isHoverHighlighted: boolean;
|
|
50
51
|
static readonly HOVER_HIGHLIGHT_COLOR = "rgba(71, 120, 245, 0.7)";
|
|
51
52
|
constructor(board: Board, id?: string, defaultItemData?: BaseItemData | undefined, isGroupItem?: boolean);
|
|
@@ -97,7 +98,7 @@ export declare class BaseItem extends Mbr implements Geometry {
|
|
|
97
98
|
updateMbr(): void;
|
|
98
99
|
getLinkTo(): string | undefined;
|
|
99
100
|
getRichText(): RichText | null;
|
|
100
|
-
deserialize(data: SerializedItemData
|
|
101
|
+
deserialize(data: SerializedItemData | BaseItemData): this;
|
|
101
102
|
serialize(): SerializedItemData<BaseItemData>;
|
|
102
103
|
isClosed(): boolean;
|
|
103
104
|
emit(operation: Operation | BaseOperation): void;
|
|
@@ -1,37 +1,33 @@
|
|
|
1
|
-
import { RichText } from '
|
|
1
|
+
import { RichText } from '../RichText/RichText';
|
|
2
2
|
import { Subject } from '../../Subject';
|
|
3
3
|
import { Board } from '../../Board';
|
|
4
4
|
import { Operation } from '../../Events';
|
|
5
5
|
import { DrawingContext } from '../DrawingContext';
|
|
6
6
|
import { GeometricNormal } from '../GeometricNormal';
|
|
7
|
-
import { Item } from '../Item';
|
|
8
|
-
import { Line } from '../Line';
|
|
9
|
-
import { Mbr } from '../Mbr';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
7
|
+
import type { Item } from '../Item';
|
|
8
|
+
import { Line } from '../Line/Line';
|
|
9
|
+
import { Mbr } from '../Mbr/Mbr';
|
|
10
|
+
import { Path } from '../Path/Path';
|
|
11
|
+
import { Paths } from '../Path/Paths';
|
|
12
|
+
import type { BorderStyle } from '../Path/Path';
|
|
13
|
+
import { Point } from '../Point/Point';
|
|
14
|
+
import { Transformation } from '../Transformation/Transformation';
|
|
13
15
|
import { ConnectorData, ConnectorOperation } from './ConnectorOperations';
|
|
14
16
|
import { BoardPoint, ControlPoint, ControlPointData, FindItemFn } from './ControlPoint';
|
|
15
17
|
import { ConnectorPointerStyle, Pointer } from './Pointers/Pointers';
|
|
16
18
|
import { LinkTo } from '../LinkTo/LinkTo';
|
|
17
19
|
import { DocumentFactory } from '../../api/DocumentFactory';
|
|
18
20
|
import { ConnectorAnchorColors } from './types';
|
|
19
|
-
import { BaseItem
|
|
21
|
+
import { BaseItem } from "../BaseItem/BaseItem";
|
|
22
|
+
import type { SerializedItemData } from "../BaseItem/BaseItem";
|
|
20
23
|
import { ColorValue } from '../../..';
|
|
21
|
-
|
|
22
|
-
export type ConnectorLineStyle = (typeof ConnectorLineStyles)[number];
|
|
23
|
-
export declare const ConnectionLineWidths: readonly [1, 2, 3, 4, 5, 6, 7, 8, 12];
|
|
24
|
-
export type ConnectionLineWidth = (typeof ConnectionLineWidths)[number];
|
|
25
|
-
export declare const CONNECTOR_COLOR = "rgb(20, 21, 26)";
|
|
26
|
-
export declare const CONNECTOR_LINE_WIDTH = 1;
|
|
27
|
-
export declare const CONNECTOR_BORDER_STYLE: BorderStyle;
|
|
28
|
-
export declare const DEFAULT_END_POINTER = "TriangleFilled";
|
|
24
|
+
import { ConnectionLineWidth, ConnectorLineStyle } from './ConnectorTypes';
|
|
29
25
|
export declare const DRAW_TEXT_BORDER = false;
|
|
30
26
|
export declare const TEXT_BORDER_PADDING = 0;
|
|
31
27
|
export declare const CONNECTOR_ANCHOR_COLOR: ConnectorAnchorColors;
|
|
32
28
|
export declare const CONNECTOR_ANCHOR_TYPE = "rect";
|
|
33
29
|
export declare const CONNECTOR_LINE_CAP = "round";
|
|
34
|
-
export declare class Connector extends BaseItem {
|
|
30
|
+
export declare class Connector extends BaseItem<Connector> {
|
|
35
31
|
private startPoint;
|
|
36
32
|
private endPoint;
|
|
37
33
|
private lineStyle;
|
|
@@ -147,4 +143,3 @@ export declare class Connector extends BaseItem {
|
|
|
147
143
|
getRichText(): RichText;
|
|
148
144
|
getLinkTo(): string | undefined;
|
|
149
145
|
}
|
|
150
|
-
export declare const CONNECTOR_POINTER_TYPES: readonly ["None", "ArrowBroad", "ArrowThin", "TriangleFilled", "CircleFilled", "Angle", "TriangleEmpty", "DiamondFilled", "DiamondEmpty", "Zero", "One", "Many", "ManyMandatory", "OneMandatory", "ManyOptional", "OneOptional"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Connector } from ".";
|
|
2
|
-
import { Command } from "../../Events";
|
|
2
|
+
import { Command, Operation } from "../../Events";
|
|
3
3
|
import { ConnectorOperation } from "./ConnectorOperations";
|
|
4
4
|
type ReverseOperation = {
|
|
5
5
|
item: Connector;
|
|
@@ -10,7 +10,7 @@ export declare class ConnectorCommand implements Command {
|
|
|
10
10
|
private operation;
|
|
11
11
|
reverse: ReverseOperation;
|
|
12
12
|
constructor(connector: Connector[], operation: ConnectorOperation);
|
|
13
|
-
merge(op:
|
|
13
|
+
merge(op: Operation): this;
|
|
14
14
|
apply(): void;
|
|
15
15
|
revert(): void;
|
|
16
16
|
getReverse(): ReverseOperation;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ControlPointData, FindItemFn } from "./ControlPoint";
|
|
2
|
-
import { ConnectionLineWidth, ConnectorLineStyle } from "./
|
|
2
|
+
import { ConnectionLineWidth, ConnectorLineStyle } from "./ConnectorTypes";
|
|
3
3
|
import { ConnectorPointerStyle } from "./Pointers/Pointers";
|
|
4
4
|
import { DefaultRichTextData } from "../RichText/RichTextData";
|
|
5
5
|
import { DefaultTransformationData } from "../Transformation/TransformationData";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BorderStyle } from "../Path";
|
|
2
|
+
export declare const ConnectorLineStyles: readonly ["straight", "curved", "orthogonal"];
|
|
3
|
+
export type ConnectorLineStyle = (typeof ConnectorLineStyles)[number];
|
|
4
|
+
export declare const ConnectionLineWidths: readonly [1, 2, 3, 4, 5, 6, 7, 8, 12];
|
|
5
|
+
export type ConnectionLineWidth = (typeof ConnectionLineWidths)[number];
|
|
6
|
+
export declare const CONNECTOR_COLOR = "rgb(20, 21, 26)";
|
|
7
|
+
export declare const CONNECTOR_LINE_WIDTH = 1;
|
|
8
|
+
export declare const CONNECTOR_BORDER_STYLE: BorderStyle;
|
|
9
|
+
export declare const DEFAULT_END_POINTER = "TriangleFilled";
|
|
10
|
+
export declare const CONNECTOR_POINTER_TYPES: readonly ["None", "ArrowThin", "ArrowHeavy", "TriangleFilled", "TriangleOutline", "CircleFilled", "CircleOutline", "DiamondFilled", "DiamondOutline"];
|