microboard-temp 0.13.40 → 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 +55017 -51755
- package/dist/cjs/index.js +55012 -51755
- package/dist/cjs/node.js +56725 -53463
- package/dist/esm/browser.js +55493 -52294
- package/dist/esm/index.js +55462 -52268
- package/dist/esm/node.js +57248 -54055
- package/dist/types/Board.d.ts +14 -8
- package/dist/types/BoardCommand.d.ts +2 -2
- package/dist/types/Camera/Camera.d.ts +4 -1
- package/dist/types/Events/BaseCommand.d.ts +17 -0
- package/dist/types/Events/Command.d.ts +11 -20
- 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/Log/getSnapshotFromList.d.ts +5 -2
- package/dist/types/Events/index.d.ts +2 -1
- package/dist/types/Items/AINode/AINode.d.ts +4 -5
- package/dist/types/Items/AINode/AINodeData.d.ts +1 -0
- 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 +6 -5
- package/dist/types/Items/BaseItem/BaseItem.d.ts +16 -12
- package/dist/types/Items/BaseItem/index.d.ts +1 -0
- package/dist/types/Items/Comment/Comment.d.ts +11 -15
- package/dist/types/Items/Connector/Connector.d.ts +14 -19
- package/dist/types/Items/Connector/ConnectorCommand.d.ts +2 -2
- package/dist/types/Items/Connector/ConnectorOperations.d.ts +3 -3
- package/dist/types/Items/Connector/ConnectorTypes.d.ts +10 -0
- package/dist/types/Items/Connector/Pointers/Pointers.d.ts +21 -4
- 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 +9 -10
- package/dist/types/Items/Drawing/Drawing.d.ts +10 -8
- 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 +16 -8
- package/dist/types/Items/Examples/CardGame/Screen/Screen.d.ts +10 -4
- package/dist/types/Items/Frame/Frame.d.ts +12 -4
- package/dist/types/Items/Frame/FrameData.d.ts +5 -3
- package/dist/types/Items/Frame/FrameOperation.d.ts +13 -1
- package/dist/types/Items/Geometry.d.ts +1 -1
- package/dist/types/Items/Group/Group.d.ts +11 -6
- package/dist/types/Items/Image/Image.d.ts +8 -6
- 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/Mbr/updateRects.d.ts +1 -2
- package/dist/types/Items/Path/Path.d.ts +1 -0
- package/dist/types/Items/Path/Paths.d.ts +2 -0
- package/dist/types/Items/Placeholder/Placeholder.d.ts +16 -10
- package/dist/types/Items/Point/Point.d.ts +1 -1
- package/dist/types/Items/RegisterItem.d.ts +4 -2
- package/dist/types/Items/RichText/CanvasText/Render.d.ts +1 -1
- package/dist/types/Items/RichText/Editor/BlockNode.d.ts +10 -3
- package/dist/types/Items/RichText/EditorContainer.d.ts +5 -6
- package/dist/types/Items/RichText/RichText.d.ts +13 -7
- package/dist/types/Items/RichText/RichTextCommand.d.ts +2 -2
- package/dist/types/Items/RichText/RichTextData.d.ts +2 -0
- package/dist/types/Items/RichText/RichTextOperations.d.ts +4 -3
- 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/RichText/setNodeStyles.d.ts +2 -5
- 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 +9 -3
- package/dist/types/Items/Shape/ShapeCommand.d.ts +2 -2
- package/dist/types/Items/Shape/ShapeData.d.ts +2 -0
- 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 +8 -6
- package/dist/types/Items/Sticker/StickerOperation.d.ts +3 -3
- 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 +8 -7
- package/dist/types/Items/index.d.ts +2 -1
- package/dist/types/Keyboard/types.d.ts +2 -1
- package/dist/types/Selection/Selection.d.ts +15 -12
- package/dist/types/Selection/Transformer/TextTransformer/getTextResizeType.d.ts +1 -1
- package/dist/types/Selection/Transformer/TransformerHelpers/AnchorType.d.ts +1 -1
- package/dist/types/Selection/Transformer/TransformerHelpers/getOppositePoint.d.ts +1 -1
- package/dist/types/Selection/Transformer/TransformerHelpers/getResizeMatrix.d.ts +1 -1
- package/dist/types/Selection/Transformer/TransformerHelpers/getResizedMbr.d.ts +1 -1
- package/dist/types/SessionStorage.d.ts +1 -1
- package/dist/types/Settings.d.ts +15 -10
- 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/AddDrawing/AddDrawing.d.ts +1 -1
- package/dist/types/Tools/AddDrawing/AddHighlighter.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 +10 -3
- package/dist/types/sha256.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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 } from "../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 {
|
|
@@ -18,6 +23,7 @@ export interface PlaceholderData {
|
|
|
18
23
|
icon: string;
|
|
19
24
|
transformation: TransformationData;
|
|
20
25
|
miroData?: unknown;
|
|
26
|
+
[key: string]: unknown;
|
|
21
27
|
}
|
|
22
28
|
export declare class Placeholder extends BaseItem {
|
|
23
29
|
private events?;
|
|
@@ -25,18 +31,18 @@ export declare class Placeholder extends BaseItem {
|
|
|
25
31
|
backgroundColor: string;
|
|
26
32
|
private icon;
|
|
27
33
|
readonly itemType = "Placeholder";
|
|
28
|
-
shapeType:
|
|
34
|
+
shapeType: ShapeType;
|
|
29
35
|
parent: string;
|
|
30
36
|
readonly transformation: Transformation;
|
|
31
37
|
private path;
|
|
32
38
|
private mbr;
|
|
33
39
|
readonly subject: Subject<Placeholder>;
|
|
34
40
|
transformationRenderBlock?: boolean;
|
|
35
|
-
iconImage
|
|
41
|
+
iconImage?: HTMLImageElement;
|
|
36
42
|
constructor(board: Board, events?: Events | undefined, miroData?: unknown | undefined, id?: string, backgroundColor?: string, icon?: string);
|
|
37
43
|
emit(operation: PlaceholderOperation): void;
|
|
38
|
-
serialize(): PlaceholderData
|
|
39
|
-
deserialize(data:
|
|
44
|
+
serialize(): SerializedItemData<PlaceholderData>;
|
|
45
|
+
deserialize(data: SerializedItemData<PlaceholderData> | PlaceholderData): this;
|
|
40
46
|
setId(id: string): this;
|
|
41
47
|
getId(): string;
|
|
42
48
|
apply(op: Operation): void;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { Board } from "../Board";
|
|
1
2
|
import { CustomTool } from "../Tools/CustomTool";
|
|
2
|
-
import { BaseItemData } from "./BaseItem/BaseItem";
|
|
3
|
+
import { BaseItem, BaseItemData } from "./BaseItem/BaseItem";
|
|
4
|
+
type ItemConstructor = new (board: Board, id: string, defaultData: BaseItemData) => BaseItem;
|
|
3
5
|
type RegisterItemArgs = {
|
|
4
|
-
item:
|
|
6
|
+
item: ItemConstructor;
|
|
5
7
|
defaultData: BaseItemData;
|
|
6
8
|
toolData?: {
|
|
7
9
|
name: string;
|
|
@@ -2,7 +2,7 @@ import { BlockNode } from '../Editor/BlockNode';
|
|
|
2
2
|
import { LayoutBlockNodes } from './LayoutBlockNodes';
|
|
3
3
|
export declare function getBlockNodes(data: BlockNode[], maxWidth?: number, shrink?: boolean, isFrame?: boolean): LayoutBlockNodes;
|
|
4
4
|
export interface LayoutBlockNode {
|
|
5
|
-
type: 'paragraph' | 'heading_one' | 'heading_two' | 'heading_three' | 'heading_four' | 'heading_five' | 'code_block' | 'ul_list' | 'ol_list' | 'list_item' | 'text';
|
|
5
|
+
type: 'paragraph' | 'heading_one' | 'heading_two' | 'heading_three' | 'heading_four' | 'heading_five' | 'code_block' | 'ul_list' | 'ol_list' | 'list_item' | 'block-quote' | 'text';
|
|
6
6
|
lineHeight: number;
|
|
7
7
|
children: LayoutTextNode[];
|
|
8
8
|
lines: LayoutTextBlock[][];
|
|
@@ -2,7 +2,7 @@ import { HorisontalAlignment } from "../../Alignment";
|
|
|
2
2
|
import { TextNode } from "./TextNode";
|
|
3
3
|
export declare const ListTypes: readonly ["ol_list", "ul_list"];
|
|
4
4
|
export type ListType = (typeof ListTypes)[number];
|
|
5
|
-
export declare const BlockTypes: readonly ["paragraph", "ul_list", "ol_list", "list_item", "code_block", "heading_one", "heading_two", "heading_three", "heading_four", "heading_five"];
|
|
5
|
+
export declare const BlockTypes: readonly ["paragraph", "ul_list", "ol_list", "list_item", "code_block", "heading_one", "heading_two", "heading_three", "heading_four", "heading_five", "block-quote"];
|
|
6
6
|
export type BlockType = (typeof BlockTypes)[number];
|
|
7
7
|
export type ParagraphNode = {
|
|
8
8
|
type: "paragraph";
|
|
@@ -55,6 +55,13 @@ export type HeadingFiveNode = {
|
|
|
55
55
|
paddingTop?: number;
|
|
56
56
|
paddingBottom?: number;
|
|
57
57
|
};
|
|
58
|
+
export type BlockQuoteNode = {
|
|
59
|
+
type: "block-quote";
|
|
60
|
+
children: TextNode[];
|
|
61
|
+
horisontalAlignment?: HorisontalAlignment;
|
|
62
|
+
paddingTop?: number;
|
|
63
|
+
paddingBottom?: number;
|
|
64
|
+
};
|
|
58
65
|
export type BulletedListNode = {
|
|
59
66
|
type: "ul_list";
|
|
60
67
|
children: ListItemNode[];
|
|
@@ -80,5 +87,5 @@ export type ListItemNode = {
|
|
|
80
87
|
paddingTop?: number;
|
|
81
88
|
paddingBottom?: number;
|
|
82
89
|
};
|
|
83
|
-
export type BlockNode = ParagraphNode | CodeBlockNode | HeadingOneNode | HeadingTwoNode | HeadingThreeNode | HeadingFourNode | HeadingFiveNode | BulletedListNode | NumberedListNode | ListItemNode;
|
|
84
|
-
export type NoneListBlockNode = ParagraphNode | CodeBlockNode | HeadingOneNode | HeadingTwoNode | HeadingThreeNode | HeadingFourNode | HeadingFiveNode;
|
|
90
|
+
export type BlockNode = ParagraphNode | CodeBlockNode | HeadingOneNode | HeadingTwoNode | HeadingThreeNode | HeadingFourNode | HeadingFiveNode | BulletedListNode | NumberedListNode | ListItemNode | BlockQuoteNode;
|
|
91
|
+
export type NoneListBlockNode = ParagraphNode | CodeBlockNode | HeadingOneNode | HeadingTwoNode | HeadingThreeNode | HeadingFourNode | HeadingFiveNode | BlockQuoteNode;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { DefaultTextStyles } from "../../Settings";
|
|
2
2
|
import { Subject } from "../../Subject";
|
|
3
|
-
import {
|
|
4
|
-
import { HistoryEditor } from "slate-history";
|
|
5
|
-
import { ReactEditor } from "slate-react";
|
|
3
|
+
import { BaseSelection, Descendant, Editor, Operation as SlateOp, Operation } from "slate";
|
|
6
4
|
import { HorisontalAlignment, VerticalAlignment } from "../Alignment";
|
|
7
5
|
import { BlockNode, ListType, ParagraphNode } from "./Editor/BlockNode";
|
|
8
6
|
import { TextNode, TextStyle } from "./Editor/TextNode";
|
|
7
|
+
import { ColorValue } from '../../..';
|
|
9
8
|
import { RichTextOperation } from "./RichTextOperations";
|
|
10
9
|
import { MarkdownProcessor } from "../RichText/editorHelpers/markdown/markdownProcessor";
|
|
11
10
|
export declare class EditorContainer {
|
|
@@ -24,7 +23,7 @@ export declare class EditorContainer {
|
|
|
24
23
|
private calcAutoSize;
|
|
25
24
|
private applyAutoSizeScale;
|
|
26
25
|
private updateElement;
|
|
27
|
-
readonly editor:
|
|
26
|
+
readonly editor: Editor & any;
|
|
28
27
|
maxWidth: number | undefined;
|
|
29
28
|
textScale: number;
|
|
30
29
|
verticalAlignment: VerticalAlignment;
|
|
@@ -50,11 +49,11 @@ export declare class EditorContainer {
|
|
|
50
49
|
private applyWholeTextOp;
|
|
51
50
|
applyMaxWidth(maxWidth: number): void;
|
|
52
51
|
setMaxWidth(maxWidth: number): void;
|
|
53
|
-
setSelectionFontColor(format: string, selectionContext?: string): SlateOp[];
|
|
52
|
+
setSelectionFontColor(format: string | ColorValue, selectionContext?: string): SlateOp[];
|
|
54
53
|
setSelectionLink(link: string | undefined, selection: BaseSelection): Operation[];
|
|
55
54
|
setSelectionFontStyle(style: TextStyle | TextStyle[]): SlateOp[];
|
|
56
55
|
setSelectionFontSize(fontSize: number | "auto", selectionContext?: string): SlateOp[];
|
|
57
|
-
setSelectionFontHighlight(format: string, selectionContext?: string): SlateOp[];
|
|
56
|
+
setSelectionFontHighlight(format: string | ColorValue, selectionContext?: string): SlateOp[];
|
|
58
57
|
setSelectionHorisontalAlignment(horisontalAlignment: HorisontalAlignment, selectionContext?: string): SlateOp[];
|
|
59
58
|
getSelectionMarks(): Omit<TextNode, "text"> | null;
|
|
60
59
|
handleListMerge(): boolean;
|
|
@@ -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,7 +20,8 @@ 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 } from "../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
|
/**
|
|
@@ -134,10 +140,10 @@ export declare class RichText extends BaseItem {
|
|
|
134
140
|
setCursorUnderLastClick(ref: HTMLDivElement | null): void;
|
|
135
141
|
disableRender(): void;
|
|
136
142
|
enableRender(): void;
|
|
137
|
-
serialize(): RichTextData
|
|
143
|
+
serialize(): SerializedItemData<RichTextData>;
|
|
138
144
|
getCurrentSelection(): BaseSelection | undefined;
|
|
139
145
|
restoreSelection(selection?: BaseSelection): void;
|
|
140
|
-
deserialize(data:
|
|
146
|
+
deserialize(data: SerializedItemData<RichTextData> | RichTextData): this;
|
|
141
147
|
render(context: DrawingContext): void;
|
|
142
148
|
renderHTML(documentFactory: DocumentFactory, enablePlaceholder?: boolean): HTMLElement;
|
|
143
149
|
getClipMbr(): Mbr;
|
|
@@ -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,6 +14,7 @@ export interface RichTextData {
|
|
|
14
14
|
placeholderText: string;
|
|
15
15
|
realSize: 'auto' | number;
|
|
16
16
|
linkTo?: string;
|
|
17
|
+
[key: string]: any;
|
|
17
18
|
}
|
|
18
19
|
export declare class DefaultRichTextData implements RichTextData {
|
|
19
20
|
children: Descendant[];
|
|
@@ -27,5 +28,6 @@ export declare class DefaultRichTextData implements RichTextData {
|
|
|
27
28
|
placeholderText: string;
|
|
28
29
|
realSize: 'auto' | number;
|
|
29
30
|
readonly itemType = "RichText";
|
|
31
|
+
[key: string]: unknown;
|
|
30
32
|
constructor(children?: Descendant[], verticalAlignment?: VerticalAlignment, maxWidth?: number | undefined, transformation?: TransformationData | undefined, linkTo?: string | undefined, containerMaxWidth?: number | undefined, insideOf?: ItemType | undefined, color?: string | undefined, placeholderText?: string, realSize?: 'auto' | number);
|
|
31
33
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
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
|
+
import { ColorValue } from '../../..';
|
|
5
6
|
interface RichTextBaseOp {
|
|
6
7
|
class: 'RichText';
|
|
7
8
|
item: string[];
|
|
8
9
|
}
|
|
9
10
|
interface SetFontColor extends RichTextBaseOp {
|
|
10
11
|
method: 'setFontColor';
|
|
11
|
-
fontColor: string;
|
|
12
|
+
fontColor: string | ColorValue;
|
|
12
13
|
}
|
|
13
14
|
interface SetFontStyle extends RichTextBaseOp {
|
|
14
15
|
method: 'setFontStyle';
|
|
@@ -25,7 +26,7 @@ interface SetFontSize extends RichTextBaseOp {
|
|
|
25
26
|
}
|
|
26
27
|
interface SetFontHighlight extends RichTextBaseOp {
|
|
27
28
|
method: 'setFontHighlight';
|
|
28
|
-
fontHighlight: string;
|
|
29
|
+
fontHighlight: string | ColorValue;
|
|
29
30
|
}
|
|
30
31
|
interface SetHorisontalAligment extends RichTextBaseOp {
|
|
31
32
|
method: 'setHorisontalAlignment';
|
|
@@ -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,10 +1,7 @@
|
|
|
1
|
-
import { BaseEditor } from 'slate';
|
|
2
1
|
import { BlockNode, NoneListBlockNode } from '../RichText/Editor/BlockNode';
|
|
3
|
-
import { ReactEditor } from 'slate-react';
|
|
4
|
-
import { HistoryEditor } from 'slate-history';
|
|
5
2
|
import { HorisontalAlignment } from '../Alignment';
|
|
6
3
|
export declare function setNodeChildrenStyles({ editor, horisontalAlignment, node, }: {
|
|
7
|
-
editor?:
|
|
4
|
+
editor?: any;
|
|
8
5
|
horisontalAlignment?: HorisontalAlignment;
|
|
9
6
|
node: NoneListBlockNode;
|
|
10
7
|
}): void;
|
|
@@ -12,6 +9,6 @@ export declare function setNodeStyles({ node, isPaddingTopNeeded, listLevel, edi
|
|
|
12
9
|
node: BlockNode;
|
|
13
10
|
isPaddingTopNeeded: boolean;
|
|
14
11
|
listLevel?: number;
|
|
15
|
-
editor?:
|
|
12
|
+
editor?: any;
|
|
16
13
|
horisontalAlignment?: HorisontalAlignment;
|
|
17
14
|
}): void;
|
|
@@ -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;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Mbr
|
|
1
|
+
import { Mbr } from '../../../Mbr/Mbr';
|
|
2
|
+
import { Paths } from '../../../Path/Paths';
|
|
3
|
+
import { Point } from '../../../Point/Point';
|
|
2
4
|
export declare const BPMN_GatewayParallel: {
|
|
3
5
|
name: string;
|
|
4
6
|
textBounds: Mbr;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Mbr
|
|
1
|
+
import { Mbr } from '../../../Mbr/Mbr';
|
|
2
|
+
import { Paths } from '../../../Path/Paths';
|
|
3
|
+
import { Point } from '../../../Point/Point';
|
|
2
4
|
export declare const BPMN_GatewayXOR: {
|
|
3
5
|
name: string;
|
|
4
6
|
textBounds: Mbr;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Mbr
|
|
1
|
+
import { Mbr } from '../../../Mbr/Mbr';
|
|
2
|
+
import { Paths } from '../../../Path/Paths';
|
|
3
|
+
import { Point } from '../../../Point/Point';
|
|
2
4
|
export declare const BPMN_IntermediateEvent: {
|
|
3
5
|
name: string;
|
|
4
6
|
textBounds: Mbr;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Mbr
|
|
1
|
+
import { Mbr } from '../../../Mbr/Mbr';
|
|
2
|
+
import { Paths } from '../../../Path/Paths';
|
|
3
|
+
import { Point } from '../../../Point/Point';
|
|
2
4
|
export declare const BPMN_IntermediateEventNoneInterrupting: {
|
|
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_Participant: {
|
|
3
5
|
name: string;
|
|
4
6
|
textBounds: Mbr;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Mbr
|
|
1
|
+
import { Mbr } from '../../../Mbr/Mbr';
|
|
2
|
+
import { Path } from '../../../Path/Path';
|
|
3
|
+
import { Point } from '../../../Point/Point';
|
|
2
4
|
export declare const BPMN_StartEventNoneInterrupting: {
|
|
3
5
|
name: string;
|
|
4
6
|
textBounds: Mbr;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Mbr
|
|
1
|
+
import { Mbr } from '../../../Mbr/Mbr';
|
|
2
|
+
import { Paths } from '../../../Path/Paths';
|
|
3
|
+
import { Point } from '../../../Point/Point';
|
|
2
4
|
export declare const BPMN_Transaction: {
|
|
3
5
|
name: string;
|
|
4
6
|
textBounds: Mbr;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Mbr
|
|
1
|
+
import { Mbr } from '../../../Mbr/Mbr';
|
|
2
|
+
import { Paths } from '../../../Path/Paths';
|
|
3
|
+
import { Point } from '../../../Point/Point';
|
|
2
4
|
export declare const PredefinedProcess: {
|
|
3
5
|
name: string;
|
|
4
6
|
textBounds: Mbr;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Mbr
|
|
1
|
+
import { Mbr } from '../../../Mbr/Mbr';
|
|
2
|
+
import { Path } from '../../../Path/Path';
|
|
3
|
+
import { Point } from '../../../Point/Point';
|
|
2
4
|
export declare const ReversedParallelogram: {
|
|
3
5
|
name: string;
|
|
4
6
|
textBounds: Mbr;
|