microboard-temp 0.13.41 → 0.13.42
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 +56773 -53598
- package/dist/cjs/index.js +56767 -53597
- package/dist/cjs/node.js +56335 -53160
- package/dist/esm/browser.js +54045 -50933
- package/dist/esm/index.js +54041 -50934
- package/dist/esm/node.js +57517 -54411
- 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 +4 -3
- package/dist/types/Events/Log/createEventsList.d.ts +3 -1
- package/dist/types/Events/index.d.ts +2 -1
- package/dist/types/Items/AINode/AINode.d.ts +1 -1
- 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 +2 -2
- package/dist/types/Items/BaseItem/BaseItem.d.ts +8 -7
- package/dist/types/Items/Connector/Connector.d.ts +12 -17
- 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 +6 -5
- package/dist/types/Items/Drawing/DrawingCommand.d.ts +2 -2
- package/dist/types/Items/Examples/CardGame/Card/Card.d.ts +11 -8
- package/dist/types/Items/Examples/CardGame/Dice/Dice.d.ts +10 -1
- package/dist/types/Items/Examples/CardGame/Screen/Screen.d.ts +6 -1
- package/dist/types/Items/Frame/Frame.d.ts +11 -2
- 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 +7 -3
- package/dist/types/Items/Image/Image.d.ts +4 -3
- 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 +12 -7
- package/dist/types/Items/Point/Point.d.ts +1 -1
- package/dist/types/Items/RegisterItem.d.ts +4 -2
- package/dist/types/Items/RichText/EditorContainer.d.ts +2 -2
- package/dist/types/Items/RichText/RichText.d.ts +11 -5
- package/dist/types/Items/RichText/RichTextCommand.d.ts +2 -2
- 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 +7 -1
- 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 +6 -4
- 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 +1 -1
- package/dist/types/Items/index.d.ts +2 -3
- package/dist/types/Selection/Selection.d.ts +10 -7
- package/dist/types/SessionStorage.d.ts +1 -1
- package/dist/types/Settings.d.ts +14 -9
- package/dist/types/SpatialIndex/SimpleSpatialIndex.d.ts +5 -3
- package/dist/types/SpatialIndex/SpacialIndex.d.ts +8 -1
- package/dist/types/Tools/AddConnector/AddConnector.d.ts +1 -1
- 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,4 +1,10 @@
|
|
|
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 { Matrix } from "../Transformation/Matrix";
|
|
2
8
|
import { ShapeType } from "./index";
|
|
3
9
|
import { BorderStyle, BorderWidth } from "../Path";
|
|
4
10
|
import { RichText } from "../RichText";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Shape } from "./Shape";
|
|
2
2
|
import { ShapeOperation } from "./ShapeOperation";
|
|
3
|
-
import { Command } from "../../Events";
|
|
3
|
+
import { Command, Operation } from "../../Events";
|
|
4
4
|
export declare class ShapeCommand implements Command {
|
|
5
5
|
private shape;
|
|
6
6
|
private operation;
|
|
7
7
|
private reverse;
|
|
8
8
|
constructor(shape: Shape[], operation: ShapeOperation);
|
|
9
|
-
merge(op:
|
|
9
|
+
merge(op: Operation): this;
|
|
10
10
|
apply(): void;
|
|
11
11
|
revert(): void;
|
|
12
12
|
getReverse(): {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BorderStyle } from "../Path";
|
|
2
|
-
import { ShapeType } from "./
|
|
2
|
+
import { ShapeType } from "./ShapeType";
|
|
3
3
|
import { ColorValue } from "../../..";
|
|
4
4
|
export type ShapeOperation = SetBackgroundColor | SetBackgroundOpacity | SetBorderColor | SetBorderOpacity | SetBorderStyle | SetBorderWidth | SetShapeType;
|
|
5
5
|
interface BaseShapeOperation {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type BasicShapeType = "Rectangle" | "Triangle" | "ReversedTriangle" | "Circle" | "ArrowLeft" | "ArrowLeftRight" | "ArrowRight" | "ArrowBlockLeft" | "ArrowBlockRight" | "BracesLeft" | "BracesRight" | "Cloud" | "Cross" | "Cylinder" | "Hexagon" | "Octagon" | "Parallelogram" | "ReversedParallelogram" | "Pentagon" | "PredefinedProcess" | "Rhombus" | "RoundedRectangle" | "SpeachBubble" | "Star" | "Trapezoid";
|
|
2
|
+
export type BPMN_ShapeType = "BPMN_Gateway" | "BPMN_DataStore" | "BPMN_GatewayParallel" | "BPMN_GatewayXOR" | "BPMN_EndEvent" | "BPMN_StartEvent" | "BPMN_StartEventNoneInterrupting" | "BPMN_IntermediateEvent" | "BPMN_IntermediateEventNoneInterrupting" | "BPMN_Group" | "BPMN_Participant" | "BPMN_Task" | "BPMN_Transaction" | "BPMN_EventSubprocess" | "BPMN_Annotation" | "BPMN_DataObject";
|
|
3
|
+
export type ShapeType = BasicShapeType | BPMN_ShapeType;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { BasicShapes } from "./Basic";
|
|
2
|
-
import { BPMN } from "./BPMN";
|
|
3
1
|
export { Shape, Shapes } from "./Shape";
|
|
4
2
|
export { ShapeCommand } from "./ShapeCommand";
|
|
5
3
|
export type { ShapeOperation } from "./ShapeOperation";
|
|
6
4
|
export * from "./ShapeData";
|
|
7
|
-
export type ShapeType
|
|
5
|
+
export type { ShapeType } from "./ShapeType";
|
|
8
6
|
export { DefaultShapeData } from "./ShapeData";
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { Operation } from "../../Events";
|
|
2
2
|
import { Subject } from "../../Subject";
|
|
3
|
-
import { Line } from "../Line";
|
|
3
|
+
import { Line } from "../Line/Line";
|
|
4
4
|
import { Matrix } from "../Transformation/Matrix";
|
|
5
5
|
import { Mbr } from "../Mbr/Mbr";
|
|
6
|
-
import { Path
|
|
6
|
+
import { Path } from "../Path/Path";
|
|
7
|
+
import { Paths } from "../Path/Paths";
|
|
7
8
|
import { Point } from "../Point/Point";
|
|
8
9
|
import { Transformation } from "../Transformation/Transformation";
|
|
9
10
|
import { ResizeType } from "../../Selection/Transformer/TransformerHelpers/getResizeType";
|
|
10
11
|
import { DrawingContext } from "../DrawingContext";
|
|
11
12
|
import { GeometricNormal } from "../GeometricNormal";
|
|
12
|
-
import { RichText } from "../RichText";
|
|
13
|
+
import { RichText } from "../RichText/RichText";
|
|
13
14
|
import { StickerData, StickerOperation } from "./StickerOperation";
|
|
14
15
|
import { LinkTo } from "../LinkTo/LinkTo";
|
|
15
16
|
import { Board } from "../../Board";
|
|
16
17
|
import { DocumentFactory } from "../../api/DocumentFactory";
|
|
17
|
-
import { BaseItem
|
|
18
|
+
import { BaseItem } from "../BaseItem/BaseItem";
|
|
19
|
+
import type { SerializedItemData } from "../BaseItem/BaseItem";
|
|
18
20
|
import { ColorValue } from "../../..";
|
|
19
21
|
export declare const stickerColors: {
|
|
20
22
|
[color: string]: string;
|
|
@@ -16,7 +16,7 @@ export declare class TransformationCommand implements Command {
|
|
|
16
16
|
/** Map from Transformation → Item, populated when items are passed to the constructor. */
|
|
17
17
|
private itemsMap;
|
|
18
18
|
constructor(transformation: Transformation[], operation: TransformationOperation, items?: TransformableItem[]);
|
|
19
|
-
merge(op:
|
|
19
|
+
merge(op: Operation): this;
|
|
20
20
|
apply(): void;
|
|
21
21
|
revert(): void;
|
|
22
22
|
getReverse(): {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DocumentFactory } from "../../api/DocumentFactory";
|
|
2
2
|
import { Board } from "../../Board";
|
|
3
3
|
import { Events, Operation } from "../../Events";
|
|
4
|
-
import { Point } from "
|
|
4
|
+
import { Point } from "../Point/Point";
|
|
5
5
|
import { DrawingContext } from "../DrawingContext";
|
|
6
6
|
import { LinkTo } from "../LinkTo/LinkTo";
|
|
7
7
|
import { Mbr } from "../Mbr";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { BaseItem } from "./BaseItem";
|
|
2
|
+
export type { BaseItemData, SerializedItemData } from "./BaseItem";
|
|
1
3
|
export { Point } from "./Point";
|
|
2
4
|
export { Line } from "./Line";
|
|
3
5
|
export { CubicBezier, QuadraticBezier } from "./Curve";
|
|
@@ -15,13 +17,10 @@ export * from "./Frame";
|
|
|
15
17
|
export * from "./Video";
|
|
16
18
|
export * from "./Audio";
|
|
17
19
|
export * from "./AINode";
|
|
18
|
-
export * from "./Point";
|
|
19
20
|
export * from "./Image";
|
|
20
21
|
export * from "./Drawing";
|
|
21
22
|
export * from "./Placeholder";
|
|
22
23
|
export * from "./Group";
|
|
23
|
-
export { BaseItem } from "./BaseItem";
|
|
24
|
-
export type { BaseItemData, SerializedItemData } from "./BaseItem";
|
|
25
24
|
export type { Item, ItemType, ItemData } from "./Item";
|
|
26
25
|
export { registerItem } from "./RegisterItem";
|
|
27
26
|
export { Star } from "./Examples/Star";
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { Board } from "../Board";
|
|
2
|
-
import { Item,
|
|
3
|
-
import {
|
|
2
|
+
import type { Item, ItemData } from "../Items/Item";
|
|
3
|
+
import type { BaseItem } from "../Items/BaseItem/BaseItem";
|
|
4
|
+
import type { RichText } from "../Items/RichText/RichText";
|
|
5
|
+
import { Mbr } from "../Items/Mbr/Mbr";
|
|
6
|
+
import { AINode } from "../Items/AINode/AINode";
|
|
4
7
|
import { HorisontalAlignment, VerticalAlignment } from "../Items/Alignment";
|
|
5
|
-
import { ColorValue } from "
|
|
6
|
-
import { ConnectorLineStyle } from "../Items/Connector";
|
|
8
|
+
import { ColorValue } from "../Color/ColorValue";
|
|
9
|
+
import { ConnectorLineStyle } from "../Items/Connector/ConnectorTypes";
|
|
7
10
|
import { ConnectorPointerStyle } from "../Items/Connector/Pointers/Pointers";
|
|
8
11
|
import { DrawingContext } from "../Items/DrawingContext";
|
|
9
12
|
import { FrameType } from "../Items/Frame/Basic";
|
|
10
|
-
import { BorderStyle } from "../Items/Path";
|
|
11
|
-
import { TextStyle } from "../Items/RichText";
|
|
12
|
-
import { ShapeType } from "../Items/Shape";
|
|
13
|
+
import { BorderStyle } from "../Items/Path/Path";
|
|
14
|
+
import { TextStyle } from "../Items/RichText/Editor/TextNode";
|
|
15
|
+
import { ShapeType } from "../Items/Shape/ShapeType";
|
|
13
16
|
import { ApplyMatrixItem } from "../Items/Transformation/TransformationOperations";
|
|
14
17
|
import { Subject } from "../Subject";
|
|
15
18
|
import { Tool } from "../Tools/Tool";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ShapeData } from './Items';
|
|
2
2
|
import { ConnectorLineStyle } from './Items/Connector';
|
|
3
|
-
import { ConnectionLineWidth } from './Items/Connector/
|
|
3
|
+
import { ConnectionLineWidth } from './Items/Connector/ConnectorTypes';
|
|
4
4
|
import { ConnectorEdge } from './Items/Connector/Pointers';
|
|
5
5
|
import { ConnectorPointerStyle } from './Items/Connector/Pointers/Pointers';
|
|
6
6
|
import { BorderStyle } from './Items/Path';
|
package/dist/types/Settings.d.ts
CHANGED
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
import { Path2DFactory } from "./api/Path2DFactory";
|
|
2
|
+
import type { Board } from "./Board";
|
|
2
3
|
import { BrowserDocumentFactory } from "./api/BrowserDocumentFactory";
|
|
3
4
|
import { BrowserPath2D } from "./api/BrowserPath2DFactory";
|
|
4
5
|
import { MockDocumentFactory } from "./api/MockDocumentFactory";
|
|
5
6
|
import { MockPath2D } from "./api/MockPath2D";
|
|
7
|
+
import { TFunction } from "i18next";
|
|
6
8
|
import type { BorderStyle } from "./Items/Path/Path";
|
|
7
9
|
import type { Theme, ColorValue } from "./Color/ColorValue";
|
|
8
10
|
export type { Theme, ColorValue };
|
|
11
|
+
import type { PresenceEventType } from "./Presence/Events";
|
|
12
|
+
import type { SocketMsg } from "./Events/MessageRouter/boardMessageInterface";
|
|
13
|
+
import type { Editor } from "slate";
|
|
9
14
|
export interface Connection {
|
|
10
15
|
connectionId: number;
|
|
11
16
|
getCurrentUser: () => string;
|
|
12
17
|
connect(): Promise<void>;
|
|
13
|
-
subscribe(board:
|
|
14
|
-
unsubscribe(board:
|
|
15
|
-
publishPresenceEvent(boardId: string, event:
|
|
18
|
+
subscribe(board: Board): void;
|
|
19
|
+
unsubscribe(board: Board): void;
|
|
20
|
+
publishPresenceEvent(boardId: string, event: PresenceEventType): void;
|
|
16
21
|
publishAuth(): Promise<void>;
|
|
17
22
|
publishLogout(): void;
|
|
18
|
-
onMessage?: (msg:
|
|
23
|
+
onMessage?: (msg: SocketMsg) => void;
|
|
19
24
|
onAccessDenied: (boardId: string, forceUpdate?: boolean) => void;
|
|
20
25
|
notifyAboutLostConnection: () => void;
|
|
21
26
|
dismissNotificationAboutLostConnection: () => void;
|
|
22
27
|
resetConnection: () => void;
|
|
23
|
-
send: (msg:
|
|
28
|
+
send: (msg: SocketMsg) => void;
|
|
24
29
|
}
|
|
25
30
|
export interface I18NextInterface {
|
|
26
|
-
t: (key: string, options?: any) => string;
|
|
27
|
-
changeLanguage: (lng: string, callback?: (err: any, t:
|
|
31
|
+
t: (key: string, options?: Record<string, any>) => string;
|
|
32
|
+
changeLanguage: (lng: string, callback?: (err: any, t: TFunction) => void) => Promise<TFunction>;
|
|
28
33
|
}
|
|
29
34
|
export interface NotifyFunction {
|
|
30
35
|
(options: {
|
|
@@ -110,8 +115,8 @@ type GetYouTubeIdFunction = (url?: string) => string | null;
|
|
|
110
115
|
type GetDOMParser = () => {
|
|
111
116
|
parseFromString: (str: string, type: DOMParserSupportedType) => Document;
|
|
112
117
|
};
|
|
113
|
-
type ReactEditorFocus = (editor:
|
|
114
|
-
type ReactEditorToSlatePoint = (editor:
|
|
118
|
+
type ReactEditorFocus = (editor: Editor) => void;
|
|
119
|
+
type ReactEditorToSlatePoint = (editor: Editor, domNode: Node, offset: number, options: any) => any;
|
|
115
120
|
/**
|
|
116
121
|
* Set properties before using the board.
|
|
117
122
|
* @property {Path2DFactory} - The factory for creating Path2D objects.
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Subject } from "../Subject";
|
|
2
|
-
import { DrawingContext
|
|
2
|
+
import { DrawingContext } from "../Items/DrawingContext";
|
|
3
|
+
import { Item, ItemDataWithId } from "../Items/Item";
|
|
4
|
+
import { Point } from "../Items/Point/Point";
|
|
5
|
+
import { Mbr } from "../Items/Mbr/Mbr";
|
|
3
6
|
import { Camera } from "../Camera";
|
|
4
7
|
import { Pointer } from "../Pointer";
|
|
5
|
-
import { BaseItem } from "../Items/BaseItem";
|
|
6
|
-
import { ItemDataWithId } from "../Items/Item";
|
|
8
|
+
import type { BaseItem } from "../Items/BaseItem/BaseItem";
|
|
7
9
|
import { ItemsIndexRecord } from "../BoardOperations";
|
|
8
10
|
import { Items } from "./SpacialIndex";
|
|
9
11
|
export declare class SimpleSpatialIndex {
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { DocumentFactory } from '../api/DocumentFactory';
|
|
2
2
|
import { ItemsIndexRecord } from '../BoardOperations';
|
|
3
3
|
import { Camera } from '../Camera';
|
|
4
|
-
import { Item
|
|
4
|
+
import type { Item } from "../Items/Item";
|
|
5
|
+
import { Mbr } from "../Items/Mbr/Mbr";
|
|
6
|
+
import { Point } from "../Items/Point/Point";
|
|
7
|
+
import type { Connector } from "../Items/Connector/Connector";
|
|
8
|
+
import type { Comment } from "../Items/Comment/Comment";
|
|
9
|
+
import type { FrameType } from "../Items/Frame/Basic";
|
|
5
10
|
import { DrawingContext } from '../Items/DrawingContext';
|
|
6
11
|
import { Pointer } from '../Pointer';
|
|
7
12
|
import { Subject } from '../Subject';
|
|
@@ -74,6 +79,8 @@ export declare class Items {
|
|
|
74
79
|
getLastZIndex(): number;
|
|
75
80
|
getLinkedConnectorsById(id: string): Connector[];
|
|
76
81
|
getConnectorsByItemIds(startPointerItemId?: string, endPointerItemId?: string): Connector[];
|
|
82
|
+
setFrameType(frameType: FrameType): void;
|
|
83
|
+
getFrameType(): FrameType;
|
|
77
84
|
render(context: DrawingContext): void;
|
|
78
85
|
renderHTML(documentFactory: DocumentFactory): string;
|
|
79
86
|
getWholeHTML(documentFactory: DocumentFactory): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Board } from '../../Board';
|
|
2
2
|
import { Connector, Item, Point } from '../../Items';
|
|
3
3
|
import { ConnectorLineStyle } from '../../Items/Connector';
|
|
4
|
-
import { ConnectionLineWidth } from '../../Items/Connector/
|
|
4
|
+
import { ConnectionLineWidth } from '../../Items/Connector/ConnectorTypes';
|
|
5
5
|
import { ConnectorSnap } from '../../Items/Connector/ConnectorSnap';
|
|
6
6
|
import { ConnectorPointerStyle } from '../../Items/Connector/Pointers/Pointers';
|
|
7
7
|
import { DrawingContext } from '../../Items/DrawingContext';
|
|
@@ -17,7 +17,8 @@ import { ToolContext } from "./ToolContext";
|
|
|
17
17
|
import { Subject } from "../Subject";
|
|
18
18
|
import { CustomTool } from "./CustomTool";
|
|
19
19
|
import { Tool } from "./Tool";
|
|
20
|
-
export
|
|
20
|
+
export type CustomToolConstructor = new (board: Board, name: string, ...args: any[]) => CustomTool;
|
|
21
|
+
export declare const registeredTools: Record<string, CustomToolConstructor>;
|
|
21
22
|
export declare class Tools extends ToolContext {
|
|
22
23
|
protected board: Board;
|
|
23
24
|
readonly subject: Subject<Tools>;
|
|
@@ -26,7 +27,7 @@ export declare class Tools extends ToolContext {
|
|
|
26
27
|
addRegisteredTool(toolName: string, clearSelection?: boolean): void;
|
|
27
28
|
getAddRegisteredTool(toolName: string): Tool | undefined;
|
|
28
29
|
setTool(tool: BoardTool): void;
|
|
29
|
-
switchMode(mode:
|
|
30
|
+
switchMode(mode: "navigate" | "select"): void;
|
|
30
31
|
navigate(): void;
|
|
31
32
|
getNavigate(): Navigate | undefined;
|
|
32
33
|
select(clearSelection?: boolean): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ItemData } from "../Items";
|
|
2
2
|
export type ItemsMap = Record<string, ItemData>;
|
|
3
|
-
export declare function validateItemsMap(parsedObject:
|
|
4
|
-
export
|
|
5
|
-
export declare
|
|
3
|
+
export declare function validateItemsMap(parsedObject: unknown): parsedObject is ItemsMap;
|
|
4
|
+
export type ItemValidator = (data: unknown) => boolean;
|
|
5
|
+
export declare const itemValidators: Record<string, ItemValidator>;
|
|
6
|
+
export declare function validateRichTextData(richTextData: unknown): boolean;
|
|
@@ -5,7 +5,7 @@ import { Path2DFactory } from "./Path2DFactory";
|
|
|
5
5
|
* All methods are stubbed and don't perform actual path operations.
|
|
6
6
|
*/
|
|
7
7
|
export declare class MockPath2D implements Path2DFactory {
|
|
8
|
-
nativePath:
|
|
8
|
+
nativePath: unknown;
|
|
9
9
|
private commands;
|
|
10
10
|
constructor(d?: string);
|
|
11
11
|
addPath(path: Path2DFactory, transform?: DOMMatrix2DInit): void;
|
|
@@ -25,7 +25,7 @@ export declare class MockPath2D implements Path2DFactory {
|
|
|
25
25
|
*/
|
|
26
26
|
getCommands(): {
|
|
27
27
|
method: string;
|
|
28
|
-
args:
|
|
28
|
+
args: unknown[];
|
|
29
29
|
}[];
|
|
30
30
|
/**
|
|
31
31
|
* Clear all recorded commands
|
|
@@ -37,7 +37,7 @@ export declare class MockPath2D implements Path2DFactory {
|
|
|
37
37
|
* @param method - The method name to check
|
|
38
38
|
* @param args - Optional arguments to verify
|
|
39
39
|
*/
|
|
40
|
-
wasCalledWith(method: string, args?:
|
|
40
|
+
wasCalledWith(method: string, args?: unknown[]): boolean;
|
|
41
41
|
/**
|
|
42
42
|
* Get the number of times a specific command was called
|
|
43
43
|
* @param method - The method name to count
|
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
import { Board } from "./Board";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichTextData } from "./Items/RichText/RichTextData";
|
|
3
|
+
import type { ItemData, Item } from "./Items/Item";
|
|
4
|
+
import type { ShapeData } from "./Items/Shape/ShapeData";
|
|
5
|
+
import type { ConnectorData } from "./Items/Connector/ConnectorOperations";
|
|
6
|
+
import type { FrameData } from "./Items/Frame/FrameData";
|
|
7
|
+
import { AINodeData } from "./Items/AINode";
|
|
8
|
+
import { AudioItemData } from "./Items/Audio";
|
|
9
|
+
import { DrawingData } from "./Items/Drawing";
|
|
10
|
+
import { GroupData } from "./Items/Group";
|
|
11
|
+
import { ImageItemData } from "./Items/Image";
|
|
12
|
+
import { PlaceholderData } from "./Items/Placeholder";
|
|
13
|
+
import { StickerData } from "./Items/Sticker/StickerOperation";
|
|
14
|
+
import { VideoItemData } from "./Items/Video";
|
|
15
|
+
import { CommentData } from "./Items/Comment";
|
|
3
16
|
interface ItemFactory {
|
|
4
17
|
(id: string, data: ItemData, board: Board): Item;
|
|
5
18
|
}
|
|
6
19
|
export type ItemFactories = Record<string, ItemFactory>;
|
|
7
20
|
export declare const itemFactories: ItemFactories;
|
|
21
|
+
export declare function isStickerData(data: ItemData): data is StickerData;
|
|
22
|
+
export declare function isCommentData(data: ItemData): data is CommentData;
|
|
23
|
+
export declare function isAINodeData(data: ItemData): data is AINodeData;
|
|
24
|
+
export declare function isShapeData(data: ItemData): data is ShapeData;
|
|
25
|
+
export declare function isRichTextData(data: ItemData): data is RichTextData;
|
|
26
|
+
export declare function isConnectorData(data: ItemData): data is ConnectorData;
|
|
27
|
+
export declare function isImageItemData(data: ItemData): data is ImageItemData;
|
|
28
|
+
export declare function isVideoItemData(data: ItemData): data is VideoItemData;
|
|
29
|
+
export declare function isAudioItemData(data: ItemData): data is AudioItemData;
|
|
30
|
+
export declare function isDrawingData(data: ItemData): data is DrawingData;
|
|
31
|
+
export declare function isFrameData(data: ItemData): data is FrameData;
|
|
32
|
+
export declare function isPlaceholderData(data: ItemData): data is PlaceholderData;
|
|
33
|
+
export declare function isGroupData(data: ItemData): data is GroupData;
|
|
8
34
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ItemType } from "./Items";
|
|
2
|
-
import { ItemDataWithId } from "./Items/Item";
|
|
1
|
+
import { ItemType, ItemDataWithId } from "./Items/Item";
|
|
3
2
|
import { BaseItemData } from "./Items/BaseItem/BaseItem";
|
|
4
3
|
type MapTagByType = Record<ItemType, string>;
|
|
5
4
|
export declare const tagByType: MapTagByType;
|
package/dist/types/sha256.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function sha256(message:
|
|
1
|
+
export declare function sha256(message: string): Promise<string>;
|
|
2
2
|
export declare function fileTosha256(file: File): Promise<string>;
|