microboard-temp 0.14.14 → 0.14.16
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 +4862 -3698
- package/dist/cjs/index.js +4862 -3698
- package/dist/cjs/node.js +4862 -3698
- package/dist/cjs/protocol.js +25 -0
- package/dist/esm/browser.js +4862 -3698
- package/dist/esm/index.js +4862 -3698
- package/dist/esm/node.js +4862 -3698
- package/dist/esm/protocol.js +25 -0
- package/dist/types/Background/drawBackground.d.ts +1 -1
- package/dist/types/Board.d.ts +4 -3
- package/dist/types/Camera/Camera.d.ts +3 -3
- package/dist/types/Events/EventsOperations.d.ts +1 -1
- package/dist/types/Events/MessageRouter/socketContract.d.ts +1249 -9
- package/dist/types/Events/Transform/transformTransformationOperation.d.ts +2 -0
- package/dist/types/{Items → Geometry}/Geometry.d.ts +1 -1
- package/dist/types/{Items → Geometry}/Mbr/Mbr.d.ts +2 -1
- package/dist/types/{Items → Geometry}/Path/Paths.d.ts +1 -1
- package/dist/types/{Items → Geometry}/Transformation/Matrix.d.ts +16 -0
- package/dist/types/{Items → Geometry}/Transformation/TransformationData.d.ts +5 -1
- package/dist/types/{Items → Geometry}/Transformation/TransformationOperations.d.ts +27 -1
- package/dist/types/{Items → Geometry}/Transformation/transformOps.d.ts +3 -1
- package/dist/types/Geometry/index.d.ts +12 -0
- package/dist/types/HTMLAdapter/BoardHTMLAdapter.d.ts +15 -0
- package/dist/types/{parserHTML.d.ts → HTMLAdapter/Parser.d.ts} +2 -2
- package/dist/types/{Items → HTMLAdapter}/Renderers/AINodeHTMLRenderer.d.ts +1 -1
- package/dist/types/{Items → HTMLAdapter}/Renderers/AudioHTMLRenderer.d.ts +1 -1
- package/dist/types/{Items → HTMLAdapter}/Renderers/CommentHTMLRenderer.d.ts +1 -1
- package/dist/types/{Items → HTMLAdapter}/Renderers/ConnectorHTMLRenderer.d.ts +1 -1
- package/dist/types/{Items → HTMLAdapter}/Renderers/DrawingHTMLRenderer.d.ts +1 -1
- package/dist/types/{Items → HTMLAdapter}/Renderers/FrameHTMLRenderer.d.ts +1 -1
- package/dist/types/{Items → HTMLAdapter}/Renderers/GroupHTMLRenderer.d.ts +1 -1
- package/dist/types/{Items → HTMLAdapter}/Renderers/HTMLItemRenderer.d.ts +1 -1
- package/dist/types/{Items → HTMLAdapter}/Renderers/ImageHTMLRenderer.d.ts +1 -1
- package/dist/types/{Items → HTMLAdapter}/Renderers/PlaceholderHTMLRenderer.d.ts +1 -1
- package/dist/types/{Items → HTMLAdapter}/Renderers/RichTextHTMLRenderer.d.ts +1 -1
- package/dist/types/{Items → HTMLAdapter}/Renderers/ShapeHTMLRenderer.d.ts +1 -1
- package/dist/types/{Items → HTMLAdapter}/Renderers/StickerHTMLRenderer.d.ts +1 -1
- package/dist/types/{Items → HTMLAdapter}/Renderers/VideoHTMLRenderer.d.ts +1 -1
- package/dist/types/{HTMLRender/HTMLRender.d.ts → HTMLAdapter/Utils.d.ts} +1 -1
- package/dist/types/Items/AINode/AINode.d.ts +5 -20
- package/dist/types/Items/AINode/AINodeData.d.ts +4 -4
- package/dist/types/Items/Audio/Audio.d.ts +8 -5
- package/dist/types/Items/Audio/AudioHelpers.d.ts +1 -1
- package/dist/types/Items/BaseItem/BaseItem.d.ts +50 -28
- package/dist/types/Items/BaseItem/TransformContext.d.ts +3 -3
- package/dist/types/Items/BaseItem/UpdateHint.d.ts +12 -0
- package/dist/types/Items/{Examples/CardGame/Card → Card}/Card.d.ts +11 -7
- package/dist/types/Items/Card/CardActions.d.ts +2 -0
- package/dist/types/Items/{Examples/CardGame/Card → Card}/CardOperation.d.ts +2 -2
- package/dist/types/Items/Card/CardOverlay.d.ts +2 -0
- package/dist/types/Items/Comment/Comment.d.ts +10 -7
- package/dist/types/{Tools/AddComment → Items/Comment/Tool}/AddComment.d.ts +3 -3
- package/dist/types/Items/Connector/Connector.d.ts +14 -10
- package/dist/types/Items/Connector/ConnectorOperations.d.ts +2 -2
- package/dist/types/Items/Connector/ConnectorOverlay.d.ts +3 -0
- package/dist/types/Items/Connector/ConnectorSnap.d.ts +4 -4
- package/dist/types/Items/Connector/ConnectorTypes.d.ts +1 -1
- package/dist/types/Items/Connector/ControlPoint.d.ts +1 -1
- package/dist/types/Items/Connector/Pointers/Pointers.d.ts +3 -3
- package/dist/types/{Tools/AddConnector → Items/Connector/Tool}/AddConnector.d.ts +9 -9
- package/dist/types/Items/Connector/getLine/findOrthogonalPath.d.ts +1 -1
- package/dist/types/Items/Connector/getLine/getCurvedLine.d.ts +1 -1
- package/dist/types/Items/Connector/getLine/getLine.d.ts +1 -1
- package/dist/types/Items/{Examples/CardGame/Deck → Deck}/Deck.d.ts +10 -7
- package/dist/types/Items/Deck/DeckActions.d.ts +2 -0
- package/dist/types/Items/{Examples/CardGame/Deck → Deck}/DeckOperation.d.ts +2 -2
- package/dist/types/Items/Deck/DeckOverlay.d.ts +3 -0
- package/dist/types/Items/Dice/AddDice.d.ts +5 -0
- package/dist/types/Items/{Examples/CardGame/Dice → Dice}/Dice.d.ts +12 -8
- package/dist/types/Items/Dice/DiceActions.d.ts +2 -0
- package/dist/types/Items/{Examples/CardGame/Dice → Dice}/DiceOperation.d.ts +1 -1
- package/dist/types/Items/Dice/DiceOverlay.d.ts +3 -0
- package/dist/types/Items/Drawing/Drawing.d.ts +13 -9
- package/dist/types/Items/Drawing/DrawingOperation.d.ts +1 -1
- package/dist/types/Items/Drawing/DrawingOverlay.d.ts +4 -0
- package/dist/types/{Tools/AddDrawing → Items/Drawing/Tool}/AddDrawing.d.ts +7 -7
- package/dist/types/{Tools/AddDrawing → Items/Drawing/Tool}/AddHighlighter.d.ts +4 -4
- package/dist/types/{Tools → Items/Drawing/Tool}/Eraser/Eraser.d.ts +5 -5
- package/dist/types/Items/Frame/Basic/1-1/index.d.ts +3 -3
- package/dist/types/Items/Frame/Basic/16-9/index.d.ts +3 -3
- package/dist/types/Items/Frame/Basic/3-2/index.d.ts +3 -3
- package/dist/types/Items/Frame/Basic/4-3/index.d.ts +3 -3
- package/dist/types/Items/Frame/Basic/9-18/index.d.ts +3 -3
- package/dist/types/Items/Frame/Basic/A4/index.d.ts +3 -3
- package/dist/types/Items/Frame/Basic/Custom/index.d.ts +3 -3
- package/dist/types/Items/Frame/Basic/Letter/index.d.ts +3 -3
- package/dist/types/Items/Frame/Frame.d.ts +13 -20
- package/dist/types/Items/Frame/FrameData.d.ts +2 -2
- package/dist/types/Items/Frame/FrameOverlay.d.ts +2 -0
- package/dist/types/{Tools/AddFrame → Items/Frame/Tool}/AddFrame.d.ts +6 -6
- package/dist/types/Items/Group/Group.d.ts +9 -8
- package/dist/types/Items/Image/Image.d.ts +11 -7
- package/dist/types/Items/Item.d.ts +1 -1
- package/dist/types/Items/ItemActions.d.ts +160 -0
- package/dist/types/Items/LinkTo/LinkTo.d.ts +1 -1
- package/dist/types/Items/Placeholder/Placeholder.d.ts +11 -32
- package/dist/types/Items/RegisterItem.d.ts +8 -4
- package/dist/types/Items/RichText/Editor/BlockNode.d.ts +1 -1
- package/dist/types/Items/RichText/Editor/TextNode.d.ts +1 -1
- package/dist/types/Items/RichText/EditorContainer.d.ts +1 -1
- package/dist/types/Items/RichText/RichText.d.ts +11 -6
- package/dist/types/Items/RichText/RichTextData.d.ts +2 -2
- package/dist/types/Items/RichText/RichTextOperations.d.ts +1 -1
- package/dist/types/Items/RichText/RichTextOverlay.d.ts +3 -0
- package/dist/types/{Tools/AddText → Items/RichText/Tool}/AddText.d.ts +4 -4
- package/dist/types/Items/RichText/editorHelpers/common/createParagraphNode.d.ts +1 -1
- package/dist/types/Items/RichText/editorHelpers/common/getParagraph.d.ts +1 -1
- package/dist/types/Items/RichText/editorHelpers/selectionOps/setSelectionHorisontalAlignment.d.ts +1 -1
- package/dist/types/Items/RichText/setNodeStyles.d.ts +1 -1
- package/dist/types/Items/{Examples/CardGame/Screen → Screen}/AddScreen.d.ts +2 -2
- package/dist/types/Items/{Examples/CardGame/Screen → Screen}/Screen.d.ts +10 -6
- package/dist/types/Items/Screen/ScreenActions.d.ts +12 -0
- package/dist/types/Items/{Examples/CardGame/Screen → Screen}/ScreenOperation.d.ts +1 -1
- package/dist/types/Items/Screen/ScreenOverlay.d.ts +4 -0
- package/dist/types/Items/Shape/BPMN/BPMN_Annotation/index.d.ts +2 -2
- package/dist/types/Items/Shape/BPMN/BPMN_DataObject/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_DataStore/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_EndEvent/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_EventSubprocess/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_Gateway/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_GatewayParallel/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_GatewayXOR/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_Group/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_IntermediateEvent/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_IntermediateEventNoneInterrupting/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_Participant/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_StartEvent/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_StartEventNoneInterrupting/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_Task/index.d.ts +3 -3
- package/dist/types/Items/Shape/BPMN/BPMN_Transaction/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/ArrowBlockLeft/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/ArrowBlockRigth/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/ArrowLeft/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/ArrowLeftRight/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/ArrowRight/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/BracesLeft/index.d.ts +2 -2
- package/dist/types/Items/Shape/Basic/BracesRight/index.d.ts +2 -2
- package/dist/types/Items/Shape/Basic/Circle/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/Cloud/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/Cross/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/Cylinder/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/Hexagon/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/Octagon/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/Parallelogram/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/Pentagon/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/PredefinedProcess/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/Rectangle/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/ReversedParallelogram/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/ReversedTriangle/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/Rhombus/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/RoundedRectangle/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/SpeachBubble/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/Star/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/Trapezoid/index.d.ts +3 -3
- package/dist/types/Items/Shape/Basic/Triangle/index.d.ts +3 -3
- package/dist/types/Items/Shape/Shape.d.ts +15 -11
- package/dist/types/Items/Shape/ShapeData.d.ts +2 -2
- package/dist/types/Items/Shape/ShapeOperation.d.ts +1 -1
- package/dist/types/Items/Shape/ShapeOverlay.d.ts +4 -0
- package/dist/types/{Tools/AddShape → Items/Shape/Tool}/AddShape.d.ts +6 -6
- package/dist/types/Items/Sticker/Sticker.d.ts +14 -10
- package/dist/types/Items/Sticker/StickerOperation.d.ts +1 -1
- package/dist/types/Items/Sticker/StickerOverlay.d.ts +2 -0
- package/dist/types/{Tools/AddSticker → Items/Sticker/Tool}/AddSticker.d.ts +8 -6
- package/dist/types/Items/Video/Video.d.ts +9 -6
- package/dist/types/Items/index.d.ts +13 -15
- package/dist/types/Items/itemActionsRegistry.d.ts +11 -0
- package/dist/types/Overlay/OverlayMetadata.d.ts +182 -0
- package/dist/types/Overlay/index.d.ts +2 -0
- package/dist/types/Overlay/overlayRegistry.d.ts +24 -0
- package/dist/types/Pointer/Pointer.d.ts +1 -1
- package/dist/types/Presence/Presence.d.ts +1 -1
- package/dist/types/RegistryMaps.d.ts +3 -1
- package/dist/types/Selection/ConnectorTransformer/ConnectorTransformer.d.ts +1 -1
- package/dist/types/Selection/QuickAddButtons/QuickAddButtons.d.ts +1 -1
- package/dist/types/Selection/Selection.d.ts +9 -8
- package/dist/types/Selection/SelectionTransformer.d.ts +1 -1
- package/dist/types/Selection/Transformer/Transformer.d.ts +2 -2
- package/dist/types/Selection/Transformer/TransformerHelpers/getResizeType.d.ts +2 -2
- package/dist/types/Selection/Transformer/TransformerHelpers/handleMultipleItemsResize.d.ts +31 -4
- package/dist/types/Selection/Transformer/TransformerHelpers/transformAINode.d.ts +12 -7
- package/dist/types/Selection/Transformer/TransformerHelpers/transformItems.d.ts +2 -2
- package/dist/types/Selection/Transformer/TransformerHelpers/transformRichText.d.ts +5 -3
- package/dist/types/Selection/Transformer/TransformerHelpers/transformShape.d.ts +4 -4
- package/dist/types/Selection/Transformer/TransformerHelpers/updateFrameChildren.d.ts +1 -1
- package/dist/types/SessionStorage.d.ts +1 -1
- package/dist/types/Settings.d.ts +2 -2
- package/dist/types/SpatialIndex/LayeredIndex/index.d.ts +2 -2
- package/dist/types/SpatialIndex/SimpleSpatialIndex.d.ts +3 -3
- package/dist/types/SpatialIndex/SpacialIndex.d.ts +4 -3
- package/dist/types/Tools/CustomTool.d.ts +3 -3
- package/dist/types/Tools/{ExportSnapshot/ExportSnapshot.d.ts → ExportScreenshot/ExportScreenshot.d.ts} +5 -6
- package/dist/types/Tools/{ExportSnapshot/exportBoardSnapshot.d.ts → ExportScreenshot/exportBoardScreenshot.d.ts} +2 -2
- package/dist/types/Tools/NestingHighlighter/NestingHighlighter.d.ts +1 -1
- package/dist/types/Tools/RelativeAlignment/RelativeAlignment.d.ts +1 -1
- package/dist/types/Tools/Select/Select.d.ts +32 -4
- package/dist/types/Tools/Tool.d.ts +1 -1
- package/dist/types/Tools/ToolContext.d.ts +1 -1
- package/dist/types/Tools/Tools.d.ts +14 -13
- package/dist/types/Tools/index.d.ts +2 -2
- package/dist/types/Tools/initTools.d.ts +13 -0
- package/dist/types/drawMbrOnCanvas.d.ts +3 -3
- package/dist/types/index.d.ts +4 -2
- package/dist/types/itemFactories.d.ts +4 -6
- package/package.json +1 -1
- package/dist/types/HTMLRender/index.d.ts +0 -1
- package/dist/types/Items/Examples/CardGame/Dice/AddDice.d.ts +0 -5
- package/dist/types/Items/Examples/Counter/AddCounter.d.ts +0 -7
- package/dist/types/Items/Examples/Counter/Counter.d.ts +0 -25
- package/dist/types/Items/Examples/Counter/CounterOperation.d.ts +0 -9
- package/dist/types/Items/Examples/Counter/index.d.ts +0 -1
- package/dist/types/Items/Examples/Star/AddStar.d.ts +0 -7
- package/dist/types/Items/Examples/Star/Star.d.ts +0 -38
- package/dist/types/Items/Examples/Star/StarOperation.d.ts +0 -9
- package/dist/types/Items/Examples/Star/index.d.ts +0 -1
- /package/dist/types/{Items → Geometry}/Alignment.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Anchor/Anchor.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Anchor/index.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Arc/Arc.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Arc/index.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Curve/Curve.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Curve/index.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/DrawingContext.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/GeometricNormal.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Line/Line.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Line/index.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Mbr/index.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Path/Path.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Path/index.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Point/Point.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Point/Point.schema.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Point/index.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Transformation/Transformation.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Transformation/Transformation.schema.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Transformation/TransformationCommand.d.ts +0 -0
- /package/dist/types/{Items → Geometry}/Transformation/index.d.ts +0 -0
- /package/dist/types/{Items → HTMLAdapter}/Renderers/index.d.ts +0 -0
- /package/dist/types/Items/{Examples/CardGame/Card → Card}/index.d.ts +0 -0
- /package/dist/types/{Tools/AddComment → Items/Comment/Tool}/index.d.ts +0 -0
- /package/dist/types/{Tools/AddConnector → Items/Connector/Tool}/index.d.ts +0 -0
- /package/dist/types/Items/{Examples/CardGame/Deck → Deck}/index.d.ts +0 -0
- /package/dist/types/Items/{Examples/CardGame/Dice → Dice}/index.d.ts +0 -0
- /package/dist/types/{Tools → Items/Drawing/Tool}/Eraser/index.d.ts +0 -0
- /package/dist/types/{Tools/AddDrawing → Items/Drawing/Tool}/index.d.ts +0 -0
- /package/dist/types/{Tools/AddFrame → Items/Frame/Tool}/index.d.ts +0 -0
- /package/dist/types/{Tools/AddText → Items/RichText/Tool}/index.d.ts +0 -0
- /package/dist/types/Items/{Examples/CardGame/Screen → Screen}/index.d.ts +0 -0
- /package/dist/types/{Tools/AddShape → Items/Shape/Tool}/index.d.ts +0 -0
- /package/dist/types/{Tools/AddSticker → Items/Sticker/Tool}/index.d.ts +0 -0
- /package/dist/types/Tools/{ExportSnapshot → ExportScreenshot}/getDecorationResizeType.d.ts +0 -0
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { Mbr } from "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Paths } from "../Path/Paths";
|
|
1
|
+
import { Mbr } from "../../Geometry/Mbr/Mbr";
|
|
2
|
+
import { Point } from "../../Geometry/Point/Point";
|
|
3
|
+
import { Path } from "../../Geometry/Path/Path";
|
|
4
|
+
import { Paths } from "../../Geometry/Path/Paths";
|
|
6
5
|
import { RichText } from "../RichText/RichText";
|
|
7
|
-
import { Matrix } from "
|
|
6
|
+
import { Matrix } from "../../Geometry/Transformation/Matrix";
|
|
8
7
|
import { BaseItem, SerializedItemData } from "../BaseItem/BaseItem";
|
|
8
|
+
import { UpdateHint } from "../BaseItem/UpdateHint";
|
|
9
9
|
import { TransformParams, TransformResult } from "../BaseItem/TransformContext";
|
|
10
10
|
import { Subject } from "../../Subject";
|
|
11
|
-
import { DrawingContext } from "
|
|
11
|
+
import { DrawingContext } from "../../Geometry/DrawingContext";
|
|
12
12
|
import { Operation } from "../../Events";
|
|
13
13
|
import { FrameOperation } from "./FrameOperation";
|
|
14
14
|
import { FrameType } from "./Basic";
|
|
15
|
-
import { GeometricNormal } from "../GeometricNormal";
|
|
16
15
|
import { Board } from "../../Board";
|
|
17
|
-
import {
|
|
16
|
+
import { ScreenshotInfo } from "../../Tools/ExportScreenshot/exportBoardScreenshot";
|
|
18
17
|
import { FrameData } from "./FrameData";
|
|
19
18
|
import { ResizeType } from "../../Selection/Transformer/TransformerHelpers/getResizeType";
|
|
20
19
|
import { ColorValue } from "../../..";
|
|
@@ -47,8 +46,6 @@ export declare class Frame extends BaseItem<Frame> {
|
|
|
47
46
|
getPaths(): Path | Paths;
|
|
48
47
|
getPath(): Path | Paths;
|
|
49
48
|
copyPaths(): Path | Paths;
|
|
50
|
-
isTextUnderPoint(point: Point): boolean;
|
|
51
|
-
getUnderPoint(point: Point): boolean;
|
|
52
49
|
isClosed(): boolean;
|
|
53
50
|
setId(id: string): this;
|
|
54
51
|
getId(): string;
|
|
@@ -68,14 +65,11 @@ export declare class Frame extends BaseItem<Frame> {
|
|
|
68
65
|
deserialize(data: SerializedItemData<FrameData> | FrameData): this;
|
|
69
66
|
getSavedProportionsMatrix(): Matrix;
|
|
70
67
|
private transformPath;
|
|
71
|
-
apply(
|
|
68
|
+
apply(opIn: Operation): void;
|
|
69
|
+
protected updateVisuals(_op: any, hint: UpdateHint): void;
|
|
70
|
+
protected getPropertyUpdateHint(property: string): UpdateHint;
|
|
72
71
|
emit(operation: FrameOperation): void;
|
|
73
|
-
|
|
74
|
-
getDistanceToPoint(point: Point): number;
|
|
75
|
-
isInView(rect: Mbr): boolean;
|
|
76
|
-
getSnapAnchorPoints(): Point[];
|
|
77
|
-
getNormal(point: Point): GeometricNormal;
|
|
78
|
-
getIntersectionPoints(segment: Line): Point[];
|
|
72
|
+
getIsScalingContainer(): boolean;
|
|
79
73
|
getFrameType(): FrameType;
|
|
80
74
|
private applyFrameType;
|
|
81
75
|
setFrameType(shapeType: FrameType): void;
|
|
@@ -89,13 +83,12 @@ export declare class Frame extends BaseItem<Frame> {
|
|
|
89
83
|
private applyBackgroundColor;
|
|
90
84
|
setBackgroundColor(backgroundColor: ColorValue): void;
|
|
91
85
|
getExportName(): string;
|
|
92
|
-
export(board: Board, name?: string): Promise<
|
|
86
|
+
export(board: Board, name?: string): Promise<ScreenshotInfo>;
|
|
93
87
|
render(context: DrawingContext): void;
|
|
94
88
|
renderName(context: DrawingContext): void;
|
|
95
89
|
renderBorders(context: DrawingContext): void;
|
|
96
90
|
renderPath(context: DrawingContext): void;
|
|
97
91
|
renderNewShape(context: DrawingContext): void;
|
|
98
92
|
getRichText(): RichText;
|
|
99
|
-
getIsScalingContainer(): boolean;
|
|
100
93
|
handleTransform(params: TransformParams): TransformResult;
|
|
101
94
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DefaultTransformationData, TransformationData } from '
|
|
1
|
+
import { DefaultTransformationData, TransformationData } from '../../Geometry/Transformation/TransformationData';
|
|
2
2
|
import { RichTextData } from '../RichText';
|
|
3
|
-
import { BorderStyle, BorderWidth } from '
|
|
3
|
+
import { BorderStyle, BorderWidth } from '../../Geometry/Path';
|
|
4
4
|
import { FrameType } from './Basic';
|
|
5
5
|
import { ColorValue } from '../../..';
|
|
6
6
|
export declare const FRAME_BORDER_COLOR: import("../../..").SemanticColor;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Board } from '
|
|
2
|
-
import { Line, Frame, Mbr, Item } from '
|
|
3
|
-
import { DrawingContext } from '
|
|
4
|
-
import { FrameType } from '../../
|
|
5
|
-
import { BoardTool } from '
|
|
6
|
-
import { NestingHighlighter } from '
|
|
1
|
+
import { Board } from '../../../Board';
|
|
2
|
+
import { Line, Frame, Mbr, Item } from '../../../Items';
|
|
3
|
+
import { DrawingContext } from '../../../Geometry/DrawingContext';
|
|
4
|
+
import { FrameType } from '../../Frame/Basic';
|
|
5
|
+
import { BoardTool } from '../../../Tools/BoardTool';
|
|
6
|
+
import { NestingHighlighter } from '../../../Tools/NestingHighlighter';
|
|
7
7
|
export declare class AddFrame extends BoardTool {
|
|
8
8
|
line: Line | undefined;
|
|
9
9
|
shape: FrameType;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Subject } from "../../Subject";
|
|
2
|
-
import { DrawingContext } from "
|
|
3
|
-
import { TransformationData } from "
|
|
2
|
+
import { DrawingContext } from "../../Geometry/DrawingContext";
|
|
3
|
+
import { TransformationData } from "../../Geometry/Transformation/TransformationData";
|
|
4
4
|
import { GroupOperation } from "./GroupOperation";
|
|
5
|
-
import type { Operation } from "../../Events";
|
|
6
|
-
import { Mbr } from "
|
|
7
|
-
import { Line } from "../Line/Line";
|
|
8
|
-
import { Point } from "../Point/Point";
|
|
5
|
+
import type { Operation, BaseOperation } from "../../Events";
|
|
6
|
+
import { Mbr } from "../../Geometry/Mbr/Mbr";
|
|
9
7
|
import type { Item } from "../Item";
|
|
10
8
|
import { Board } from "../../Board";
|
|
11
9
|
import { BaseItem, SerializedItemData } from "../BaseItem/BaseItem";
|
|
10
|
+
import { BaseItemOperation } from "../BaseItem/BaseItemOperation";
|
|
11
|
+
import { UpdateHint } from "../BaseItem/UpdateHint";
|
|
12
12
|
export interface GroupData {
|
|
13
13
|
readonly itemType: "Group";
|
|
14
14
|
childIds: string[];
|
|
@@ -31,7 +31,9 @@ export declare class Group extends BaseItem<Group> {
|
|
|
31
31
|
constructor(board: Board, id?: string);
|
|
32
32
|
isClosed(): boolean;
|
|
33
33
|
getRichText(): null;
|
|
34
|
-
apply(
|
|
34
|
+
apply(opIn: Operation | BaseItemOperation | BaseOperation): void;
|
|
35
|
+
protected updateVisuals(op: Operation, hint: UpdateHint): void;
|
|
36
|
+
protected getPropertyUpdateHint(property: string): UpdateHint;
|
|
35
37
|
emit(operation: GroupOperation): void;
|
|
36
38
|
setId(id: string): this;
|
|
37
39
|
getMbr(): Mbr;
|
|
@@ -42,7 +44,6 @@ export declare class Group extends BaseItem<Group> {
|
|
|
42
44
|
serialize(): SerializedItemData<GroupData>;
|
|
43
45
|
deserialize(data: SerializedItemData<GroupData> | GroupData): this;
|
|
44
46
|
getId(): string;
|
|
45
|
-
getIntersectionPoints(segment: Line): Point[];
|
|
46
47
|
render(context: DrawingContext): void;
|
|
47
48
|
}
|
|
48
49
|
export declare const DefaultGroupData: GroupData;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import type { Operation } from "../../Events";
|
|
1
|
+
import type { Operation, BaseOperation } from "../../Events";
|
|
2
2
|
import { Subject } from "../../Subject";
|
|
3
|
-
import { DrawingContext } from "
|
|
4
|
-
import { Path } from "
|
|
5
|
-
import { Paths } from "
|
|
6
|
-
import { Point } from "
|
|
7
|
-
import { TransformationData } from "
|
|
3
|
+
import { DrawingContext } from "../../Geometry/DrawingContext";
|
|
4
|
+
import { Path } from "../../Geometry/Path/Path";
|
|
5
|
+
import { Paths } from "../../Geometry/Path/Paths";
|
|
6
|
+
import { Point } from "../../Geometry/Point/Point";
|
|
7
|
+
import { TransformationData } from "../../Geometry/Transformation/TransformationData";
|
|
8
8
|
import { Board } from "../../Board";
|
|
9
9
|
import { ImageOperation } from "./ImageOperation";
|
|
10
10
|
import { BaseItem, SerializedItemData } from "../BaseItem/BaseItem";
|
|
11
|
+
import { BaseItemOperation } from "../BaseItem/BaseItemOperation";
|
|
12
|
+
import { UpdateHint } from "../BaseItem/UpdateHint";
|
|
11
13
|
export interface ImageItemData {
|
|
12
14
|
itemType: "Image";
|
|
13
15
|
storageLink: string;
|
|
@@ -55,7 +57,9 @@ export declare class ImageItem extends BaseItem<ImageItem> {
|
|
|
55
57
|
private shootLoadCallbacks;
|
|
56
58
|
deserialize(data: SerializedItemData<ImageItemData> | ImageItemData): this;
|
|
57
59
|
emit(operation: ImageOperation): void;
|
|
58
|
-
apply(
|
|
60
|
+
apply(opIn: Operation | BaseItemOperation | BaseOperation): void;
|
|
61
|
+
protected updateVisuals(op: Operation, hint: UpdateHint): void;
|
|
62
|
+
protected getPropertyUpdateHint(property: string): UpdateHint;
|
|
59
63
|
render(context: DrawingContext): void;
|
|
60
64
|
getPath(): Path | Paths;
|
|
61
65
|
getSnapAnchorPoints(): Point[];
|
|
@@ -14,7 +14,7 @@ import type { StickerData } from "./Sticker/StickerOperation";
|
|
|
14
14
|
import type { VideoItem, VideoItemData } from "./Video";
|
|
15
15
|
import type { BaseItem, SerializedItemData } from "./BaseItem/BaseItem";
|
|
16
16
|
export type Item = RichText | Shape | Connector | ImageItem | Drawing | Sticker | Frame | Placeholder | Comment | Group | AINode | VideoItem | AudioItem | BaseItem;
|
|
17
|
-
export type ItemType = "RichText" | "Shape" | "Connector" | "Image" | "ImageItem" | "Drawing" | "Sticker" | "Frame" | "Placeholder" | "Comment" | "Group" | "AINode" | "Video" | "VideoItem" | "Audio" | "AudioItem" | "BaseItem" | "Eraser" | "Card" | "Deck" | "Dice" | "
|
|
17
|
+
export type ItemType = "RichText" | "Shape" | "Connector" | "Image" | "ImageItem" | "Drawing" | "Sticker" | "Frame" | "Placeholder" | "Comment" | "Group" | "AINode" | "Video" | "VideoItem" | "Audio" | "AudioItem" | "BaseItem" | "Eraser" | "Card" | "Deck" | "Dice" | "Screen" | (string & {});
|
|
18
18
|
export type ItemData = ShapeData | RichTextData | ConnectorData | ImageItemData | DrawingData | StickerData | FrameData | PlaceholderData | CommentData | GroupData | AINodeData | VideoItemData | AudioItemData | SerializedItemData;
|
|
19
19
|
export type ItemDataWithId = ItemData & {
|
|
20
20
|
id: string;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ItemActions — declarative descriptor for item-specific UI actions.
|
|
3
|
+
*
|
|
4
|
+
* The UI repo reads these configs from the `itemActions` registry (keyed by
|
|
5
|
+
* `itemType`) and renders context panels, context menus, and tool panel buttons
|
|
6
|
+
* without any item-specific knowledge.
|
|
7
|
+
*
|
|
8
|
+
* Operation primitive hierarchy:
|
|
9
|
+
* 1. `setProperty` — the primary primitive for most property mutations.
|
|
10
|
+
* Emits `{ class: "Item", method: "setProperty", property, value }`.
|
|
11
|
+
* 2. `custom` — escape hatch for operations that cannot be expressed as
|
|
12
|
+
* setProperty (see docs on each `CustomAction` below).
|
|
13
|
+
*/
|
|
14
|
+
/** A plain SVG icon button. */
|
|
15
|
+
export interface IconButton {
|
|
16
|
+
kind: "icon";
|
|
17
|
+
/** Inline SVG markup (full `<svg>` element). */
|
|
18
|
+
svg: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A button whose icon displays the current value of a color property.
|
|
22
|
+
* The UI reads `item[property]` to fill the color swatch.
|
|
23
|
+
*/
|
|
24
|
+
export interface ColorButton {
|
|
25
|
+
kind: "color";
|
|
26
|
+
/** Property name on the item that holds the current color string. */
|
|
27
|
+
property: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A button whose label displays the current value of a property.
|
|
31
|
+
* Useful for numeric or text property indicators.
|
|
32
|
+
*/
|
|
33
|
+
export interface LabelButton {
|
|
34
|
+
kind: "label";
|
|
35
|
+
/** Property name on the item to read for display. */
|
|
36
|
+
property: string;
|
|
37
|
+
}
|
|
38
|
+
export type ButtonVariant = IconButton | ColorButton | LabelButton;
|
|
39
|
+
/**
|
|
40
|
+
* A single option inside a `MenuAction` dropdown.
|
|
41
|
+
* When selected, emits `setProperty(property, value)`.
|
|
42
|
+
*/
|
|
43
|
+
export interface MenuOption {
|
|
44
|
+
/** Display label for this option. */
|
|
45
|
+
label: string;
|
|
46
|
+
/** Property name on the item to set. */
|
|
47
|
+
property: string;
|
|
48
|
+
/** The value to assign to the property. */
|
|
49
|
+
value: unknown;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A button that opens a dropdown of fixed options.
|
|
53
|
+
* Each option emits a `setProperty` operation when chosen.
|
|
54
|
+
*/
|
|
55
|
+
export interface MenuAction {
|
|
56
|
+
kind: "menu";
|
|
57
|
+
tooltip: string;
|
|
58
|
+
button: ButtonVariant;
|
|
59
|
+
options: MenuOption[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A button that directly emits `setProperty(property, value)` when clicked.
|
|
63
|
+
*/
|
|
64
|
+
export interface SetPropertyAction {
|
|
65
|
+
kind: "setProperty";
|
|
66
|
+
tooltip: string;
|
|
67
|
+
button: ButtonVariant;
|
|
68
|
+
/** Property name on the item to set. */
|
|
69
|
+
property: string;
|
|
70
|
+
/** The value to assign to the property. */
|
|
71
|
+
value: unknown;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Escape hatch for operations that CANNOT be expressed as `setProperty`.
|
|
75
|
+
*
|
|
76
|
+
* These are complex operations, typically on container/group items, where:
|
|
77
|
+
* - The value must be computed at invocation time (e.g. random dice value), OR
|
|
78
|
+
* - The operation involves reading and mutating children, OR
|
|
79
|
+
* - The operation affects multiple items simultaneously with interdependent
|
|
80
|
+
* state (e.g. flip all cards in a deck).
|
|
81
|
+
*
|
|
82
|
+
* Known cases:
|
|
83
|
+
*
|
|
84
|
+
* **Dice**
|
|
85
|
+
* - `throwDice`: generates a random valueIndex at call time + triggers a
|
|
86
|
+
* timed rotation animation. The value is not known statically.
|
|
87
|
+
*
|
|
88
|
+
* **Card**
|
|
89
|
+
* - `toggleIsOpen(cards)`: operates on the entire selection of Card items
|
|
90
|
+
* simultaneously; must inspect each card's current `isOpen` state to decide
|
|
91
|
+
* which cards to open and which to close. Cannot be expressed as setProperty
|
|
92
|
+
* because the value to write depends on reading the current value first.
|
|
93
|
+
*
|
|
94
|
+
* **Deck** (group item — all operations involve child management)
|
|
95
|
+
* - `shuffleDeck`: randomly reorders children within the container and
|
|
96
|
+
* triggers a shuffle animation.
|
|
97
|
+
* - `flipDeck`: reverses child insertion order AND toggles face/back state
|
|
98
|
+
* on all contained cards.
|
|
99
|
+
* - `getTopCard`: removes the top child card from the Deck container and
|
|
100
|
+
* places it on the board at a computed position. Involves spatial math.
|
|
101
|
+
* - `getBottomCard`: same as getTopCard but for the bottom card.
|
|
102
|
+
* - `getRandomCard`: same but for a random card.
|
|
103
|
+
*
|
|
104
|
+
* The UI calls `(item as any)[methodName]()` for these actions. They are
|
|
105
|
+
* public methods on the item class. The UI repo's ActionRenderer component
|
|
106
|
+
* should handle this with a thin `custom` branch.
|
|
107
|
+
*/
|
|
108
|
+
export interface CustomAction {
|
|
109
|
+
kind: "custom";
|
|
110
|
+
tooltip: string;
|
|
111
|
+
button: ButtonVariant;
|
|
112
|
+
/**
|
|
113
|
+
* Name of the public method to call on the item instance.
|
|
114
|
+
* Must be a method on the item class.
|
|
115
|
+
*/
|
|
116
|
+
methodName: string;
|
|
117
|
+
}
|
|
118
|
+
export type ItemAction = MenuAction | SetPropertyAction | CustomAction;
|
|
119
|
+
/**
|
|
120
|
+
* Defines the toolbar entry for items that have a placement tool (e.g. "Add Dice").
|
|
121
|
+
* The UI panel renders a button for each registered item that has a `toolButton`.
|
|
122
|
+
*/
|
|
123
|
+
export interface ToolPanelButton {
|
|
124
|
+
/**
|
|
125
|
+
* Must match the `toolData.name` passed to `registerItem`.
|
|
126
|
+
* Used to activate the tool via `board.tools.activate(toolName)`.
|
|
127
|
+
*/
|
|
128
|
+
toolName: string;
|
|
129
|
+
/** Tooltip / accessible label for the tool panel button. */
|
|
130
|
+
tooltip: string;
|
|
131
|
+
/** Inline SVG markup for the button icon. */
|
|
132
|
+
svg: string;
|
|
133
|
+
/** Optional keyboard shortcut labels for display only. */
|
|
134
|
+
hotkey?: {
|
|
135
|
+
windows: string;
|
|
136
|
+
mac: string;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Complete action descriptor for an item type.
|
|
141
|
+
* Register via `registerItem({ actions: config })`.
|
|
142
|
+
* Read from `itemActions[itemType]` in the UI repo.
|
|
143
|
+
*/
|
|
144
|
+
export interface ItemActionConfig {
|
|
145
|
+
/**
|
|
146
|
+
* Actions shown in the floating context panel when this item type is selected.
|
|
147
|
+
* Rendered left-to-right as a row of buttons.
|
|
148
|
+
*/
|
|
149
|
+
contextPanel: ItemAction[];
|
|
150
|
+
/**
|
|
151
|
+
* Actions shown in the right-click context menu for this item type.
|
|
152
|
+
* A subset of contextPanel actions plus any menu-only actions.
|
|
153
|
+
*/
|
|
154
|
+
contextMenu: ItemAction[];
|
|
155
|
+
/**
|
|
156
|
+
* If this item has an "Add" placement tool, this defines its tool panel entry.
|
|
157
|
+
* Absent for items that cannot be placed by the user directly.
|
|
158
|
+
*/
|
|
159
|
+
toolButton?: ToolPanelButton;
|
|
160
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SubjectOperation } from "../../SubjectOperation";
|
|
2
2
|
import { LinkToOperation } from "./LinkToOperation";
|
|
3
3
|
import { Events } from "../../Events";
|
|
4
|
-
import { DrawingContext } from "
|
|
4
|
+
import { DrawingContext } from "../../Geometry/DrawingContext";
|
|
5
5
|
export declare class LinkTo {
|
|
6
6
|
private id;
|
|
7
7
|
private events?;
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import type { Operation } from "../../Events";
|
|
2
|
-
import { DrawingContext } from "
|
|
3
|
-
import { ShapeType } from "../Shape/index";
|
|
2
|
+
import { DrawingContext } from "../../Geometry/DrawingContext";
|
|
4
3
|
import { ResizeType } from "../../Selection/Transformer/TransformerHelpers/getResizeType";
|
|
5
4
|
import { Subject } from "../../Subject";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { Paths } from "../Path/Paths";
|
|
11
|
-
import { Point } from "../Point/Point";
|
|
12
|
-
import { Matrix } from "../Transformation/Matrix";
|
|
13
|
-
import type { TransformationData } from "../Transformation/TransformationData";
|
|
5
|
+
import { Mbr } from "../../Geometry/Mbr/Mbr";
|
|
6
|
+
import { Point } from "../../Geometry/Point/Point";
|
|
7
|
+
import { Matrix } from "../../Geometry/Transformation/Matrix";
|
|
8
|
+
import { TransformationData } from "../../Geometry/Transformation/TransformationData";
|
|
14
9
|
import { PlaceholderOperation } from "./PlaceholderOperation";
|
|
15
10
|
import { BaseItem } from "../BaseItem/BaseItem";
|
|
16
11
|
import type { SerializedItemData } from "../BaseItem/BaseItem";
|
|
12
|
+
import { UpdateHint } from "../BaseItem/UpdateHint";
|
|
17
13
|
import { Board } from "../../Board";
|
|
18
14
|
export interface PlaceholderData {
|
|
19
15
|
readonly itemType: "Placeholder";
|
|
@@ -25,9 +21,7 @@ export interface PlaceholderData {
|
|
|
25
21
|
}
|
|
26
22
|
export declare class Placeholder extends BaseItem<Placeholder> {
|
|
27
23
|
readonly itemType = "Placeholder";
|
|
28
|
-
shapeType: ShapeType;
|
|
29
24
|
parent: string;
|
|
30
|
-
private path;
|
|
31
25
|
readonly subject: Subject<Placeholder>;
|
|
32
26
|
transformationRenderBlock?: boolean;
|
|
33
27
|
iconImage?: HTMLImageElement;
|
|
@@ -40,7 +34,9 @@ export declare class Placeholder extends BaseItem<Placeholder> {
|
|
|
40
34
|
deserialize(data: SerializedItemData<PlaceholderData> | PlaceholderData): this;
|
|
41
35
|
setId(id: string): this;
|
|
42
36
|
getId(): string;
|
|
43
|
-
apply(
|
|
37
|
+
apply(opIn: Operation): void;
|
|
38
|
+
protected updateVisuals(_op: any, _hint: UpdateHint): void;
|
|
39
|
+
protected getPropertyUpdateHint(property: string): UpdateHint;
|
|
44
40
|
private applyPlaceholder;
|
|
45
41
|
getBackgroundColor(): string;
|
|
46
42
|
private applyBackgroundColor;
|
|
@@ -51,30 +47,13 @@ export declare class Placeholder extends BaseItem<Placeholder> {
|
|
|
51
47
|
getMiroData(): unknown;
|
|
52
48
|
private applyMiroData;
|
|
53
49
|
setMiroData(miroData: unknown): void;
|
|
54
|
-
|
|
55
|
-
updateMbr(): Mbr;
|
|
56
|
-
getNearestEdgePointTo(point: Point): Point;
|
|
57
|
-
getDistanceToPoint(point: Point): number;
|
|
58
|
-
isUnderPoint(point: Point): boolean;
|
|
59
|
-
isNearPoint(point: Point, distance: number): boolean;
|
|
60
|
-
isEnclosedOrCrossedBy(rect: Mbr): boolean;
|
|
61
|
-
isEnclosedBy(rect: Mbr): boolean;
|
|
62
|
-
isInView(rect: Mbr): boolean;
|
|
63
|
-
getNormal(point: Point): GeometricNormal;
|
|
64
|
-
getPaths(): Path | Paths;
|
|
65
|
-
getPath(): Path | Paths;
|
|
66
|
-
copyPaths(): Path | Paths;
|
|
67
|
-
isClosed(): boolean;
|
|
68
|
-
getSnapAnchorPoints(): Point[];
|
|
69
|
-
doResize(resizeType: ResizeType, pointer: Point, mbr: Mbr, opposite: Point, startMbr: Mbr, timeStamp: number): {
|
|
50
|
+
doResize(resizeType: ResizeType, pointer: Point, mbr: Mbr, opposite: Point, _startMbr: Mbr, timeStamp: number): {
|
|
70
51
|
matrix: Matrix;
|
|
71
52
|
mbr: Mbr;
|
|
72
53
|
};
|
|
73
|
-
private transformPath;
|
|
74
|
-
private initPath;
|
|
75
54
|
private loadIconImage;
|
|
76
55
|
private renderIcon;
|
|
77
|
-
private
|
|
56
|
+
private renderBody;
|
|
78
57
|
render(context: DrawingContext): void;
|
|
79
58
|
isReady(): boolean;
|
|
80
59
|
getLinkTo(): undefined;
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { Board } from "../Board";
|
|
3
|
-
import {
|
|
3
|
+
import { BoardToolConstructor } from "../RegistryMaps";
|
|
4
4
|
import { BaseItem, BaseItemData } from "./BaseItem/BaseItem";
|
|
5
|
+
import type { ItemOverlayDefinition, ToolOverlayDefinition } from "../Overlay";
|
|
5
6
|
type ItemConstructor = new (board: Board, id: string) => BaseItem;
|
|
6
7
|
type RegisterItemArgs = {
|
|
7
8
|
item: ItemConstructor;
|
|
8
9
|
defaultData: BaseItemData;
|
|
9
10
|
toolData?: {
|
|
10
11
|
name: string;
|
|
11
|
-
tool:
|
|
12
|
+
tool: BoardToolConstructor;
|
|
13
|
+
overlay?: ToolOverlayDefinition;
|
|
12
14
|
};
|
|
13
15
|
schema?: z.ZodType<any>;
|
|
16
|
+
overlay?: ItemOverlayDefinition;
|
|
14
17
|
};
|
|
15
|
-
export declare function registerItem({ item, defaultData, toolData, schema, }: RegisterItemArgs): void;
|
|
18
|
+
export declare function registerItem({ item, defaultData, toolData, schema, overlay, }: RegisterItemArgs): void;
|
|
16
19
|
export declare function registerTool(toolData: {
|
|
17
20
|
name: string;
|
|
18
|
-
tool:
|
|
21
|
+
tool: BoardToolConstructor;
|
|
22
|
+
overlay?: ToolOverlayDefinition;
|
|
19
23
|
}): void;
|
|
20
24
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HorisontalAlignment } from "
|
|
1
|
+
import { HorisontalAlignment } from "../../../Geometry/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];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HorisontalAlignment } from "
|
|
1
|
+
import { HorisontalAlignment } from "../../../Geometry/Alignment";
|
|
2
2
|
import type { ColorValue } from "../../../..";
|
|
3
3
|
export declare const TextStyles: string[];
|
|
4
4
|
export type TextStyle = (typeof TextStyles)[number];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DefaultTextStyles } from "../../Settings";
|
|
2
2
|
import { Subject } from "../../Subject";
|
|
3
3
|
import { BaseSelection, Descendant, Operation as SlateOp, Operation } from "slate";
|
|
4
|
-
import { HorisontalAlignment, VerticalAlignment } from "
|
|
4
|
+
import { HorisontalAlignment, VerticalAlignment } from "../../Geometry/Alignment";
|
|
5
5
|
import { BlockNode, ListType, ParagraphNode } from "./Editor/BlockNode";
|
|
6
6
|
import { TextNode, TextStyle } from "./Editor/TextNode";
|
|
7
7
|
import { ColorValue } from '../../..';
|
|
@@ -5,12 +5,12 @@ import type { SelectionContext } from "../../Selection";
|
|
|
5
5
|
import { Subject } from "../../Subject";
|
|
6
6
|
import { BaseRange, BaseSelection, Descendant, Operation as SlateOp } from "slate";
|
|
7
7
|
import { ItemType } from "../Item";
|
|
8
|
-
import { Matrix } from "
|
|
9
|
-
import { Mbr } from "
|
|
10
|
-
import { Point } from "
|
|
8
|
+
import { Matrix } from "../../Geometry/Transformation/Matrix";
|
|
9
|
+
import { Mbr } from "../../Geometry/Mbr/Mbr";
|
|
10
|
+
import { Point } from "../../Geometry/Point/Point";
|
|
11
11
|
import { RichTextData } from "./RichTextData";
|
|
12
|
-
import { HorisontalAlignment, VerticalAlignment } from "
|
|
13
|
-
import { DrawingContext } from "
|
|
12
|
+
import { HorisontalAlignment, VerticalAlignment } from "../../Geometry/Alignment";
|
|
13
|
+
import { DrawingContext } from "../../Geometry/DrawingContext";
|
|
14
14
|
import { TransformParams, TransformResult } from "../BaseItem/TransformContext";
|
|
15
15
|
import { ResizeType } from "../../Selection/Transformer/TransformerHelpers/getResizeType";
|
|
16
16
|
import { LayoutBlockNodes } from "./CanvasText/LayoutBlockNodes";
|
|
@@ -20,6 +20,9 @@ import { EditorContainer } from "./EditorContainer";
|
|
|
20
20
|
import { RichTextOperation } from "./RichTextOperations";
|
|
21
21
|
import { BaseItem } from "../BaseItem/BaseItem";
|
|
22
22
|
import type { SerializedItemData } from "../BaseItem/BaseItem";
|
|
23
|
+
import { BaseItemOperation } from "../BaseItem/BaseItemOperation";
|
|
24
|
+
import { UpdateHint } from "../BaseItem/UpdateHint";
|
|
25
|
+
import { BaseOperation } from "../../Events";
|
|
23
26
|
/**
|
|
24
27
|
* A geometric item to render a rich text on a DrawingContext.
|
|
25
28
|
*
|
|
@@ -99,7 +102,9 @@ export declare class RichText extends BaseItem<RichText> {
|
|
|
99
102
|
getTransformedContainer(): Mbr;
|
|
100
103
|
emitWithoutApplying: (op: RichTextOperation) => void;
|
|
101
104
|
emit: (op: RichTextOperation) => void;
|
|
102
|
-
apply(
|
|
105
|
+
apply(opIn: Operation | BaseItemOperation | BaseOperation): void;
|
|
106
|
+
protected updateVisuals(op: Operation, hint: UpdateHint): void;
|
|
107
|
+
protected getPropertyUpdateHint(property: string): UpdateHint;
|
|
103
108
|
applyCommand(op: Operation): void;
|
|
104
109
|
getId(): string;
|
|
105
110
|
setId(id: string): this;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Descendant } from 'slate';
|
|
2
|
-
import { VerticalAlignment } from '
|
|
3
|
-
import { TransformationData } from '
|
|
2
|
+
import { VerticalAlignment } from '../../Geometry/Alignment';
|
|
3
|
+
import { TransformationData } from '../../Geometry/Transformation/TransformationData';
|
|
4
4
|
import { ItemType } from '../Item';
|
|
5
5
|
export interface RichTextData {
|
|
6
6
|
readonly itemType: 'RichText';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSelection, Operation } from 'slate';
|
|
2
|
-
import { HorisontalAlignment, VerticalAlignment } from '
|
|
2
|
+
import { HorisontalAlignment, VerticalAlignment } from '../../Geometry/Alignment';
|
|
3
3
|
import { TextStyle } from './Editor/TextNode';
|
|
4
4
|
import type { SelectionContext } from '../../Selection/Selection';
|
|
5
5
|
import { ColorValue } from '../../..';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Board } from '
|
|
2
|
-
import { Line, Mbr } from '
|
|
3
|
-
import { DrawingContext } from '
|
|
4
|
-
import { BoardTool } from '
|
|
1
|
+
import { Board } from '../../../Board';
|
|
2
|
+
import { Line, Mbr } from '../../../Items';
|
|
3
|
+
import { DrawingContext } from '../../../Geometry/DrawingContext';
|
|
4
|
+
import { BoardTool } from '../../../Tools/BoardTool';
|
|
5
5
|
export declare class AddText extends BoardTool {
|
|
6
6
|
line: Line | undefined;
|
|
7
7
|
bounds: Mbr;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ParagraphNode } from '../../../RichText/Editor/BlockNode';
|
|
2
2
|
import { CustomEditor } from 'Items/RichText/Editor/Editor.d';
|
|
3
|
-
import { HorisontalAlignment } from '
|
|
3
|
+
import { HorisontalAlignment } from '../../../../Geometry/Alignment';
|
|
4
4
|
export declare function createParagraphNode(text: string, editor: CustomEditor, horisontalAlignment?: HorisontalAlignment): ParagraphNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ColorValue } from '../../../../Color/index.js';
|
|
2
|
-
import { HorisontalAlignment } from '
|
|
2
|
+
import { HorisontalAlignment } from '../../../../Geometry/Alignment.js';
|
|
3
3
|
import { BlockNode } from '../../Editor/BlockNode.js';
|
|
4
4
|
import { TextNode, TextStyle } from '../../Editor/TextNode.js';
|
|
5
5
|
export declare function getParagraph(fontStyles: TextStyle[], fontColor: string | ColorValue, fontSize: number, fontFamily: string, defaultHorizontalAlignment: HorisontalAlignment, text: string): BlockNode[];
|
package/dist/types/Items/RichText/editorHelpers/selectionOps/setSelectionHorisontalAlignment.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { HorisontalAlignment } from '
|
|
1
|
+
import { HorisontalAlignment } from '../../../../Geometry/Alignment';
|
|
2
2
|
import { Editor } from 'slate';
|
|
3
3
|
export declare function setSelectionHorisontalAlignment(editor: Editor, horisontalAlignment: HorisontalAlignment, selectionContext?: string): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BlockNode, NoneListBlockNode } from '../RichText/Editor/BlockNode';
|
|
2
|
-
import { HorisontalAlignment } from '
|
|
2
|
+
import { HorisontalAlignment } from '../../Geometry/Alignment';
|
|
3
3
|
export declare function setNodeChildrenStyles({ editor, horisontalAlignment, node, }: {
|
|
4
4
|
editor?: any;
|
|
5
5
|
horisontalAlignment?: HorisontalAlignment;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Board } from "
|
|
2
|
-
import { ShapeTool } from "
|
|
1
|
+
import { Board } from "../../Board";
|
|
2
|
+
import { ShapeTool } from "../../Tools/CustomTool";
|
|
3
3
|
export declare class AddScreen extends ShapeTool {
|
|
4
4
|
constructor(board: Board, name: string);
|
|
5
5
|
pointerUp(): boolean;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { BaseItem, BaseItemData, SerializedItemData } from "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { BaseItem, BaseItemData, SerializedItemData } from "../BaseItem/BaseItem";
|
|
2
|
+
import { UpdateHint } from "../BaseItem/UpdateHint";
|
|
3
|
+
import { Board } from "../../Board";
|
|
4
|
+
import { Subject } from "../../Subject";
|
|
5
|
+
import { DrawingContext } from "../../Geometry/DrawingContext";
|
|
6
|
+
import { BorderWidth, BorderStyle } from "../../Geometry/Path";
|
|
6
7
|
export interface ScreenData extends BaseItemData {
|
|
7
8
|
ownerId?: string;
|
|
8
9
|
backgroundUrl?: string;
|
|
@@ -19,7 +20,10 @@ export declare class Screen extends BaseItem<Screen> {
|
|
|
19
20
|
backgroundImage: HTMLImageElement | null;
|
|
20
21
|
ownerId: string;
|
|
21
22
|
constructor(board: Board, id?: string);
|
|
22
|
-
apply(
|
|
23
|
+
apply(opIn: any): void;
|
|
24
|
+
protected updateVisuals(_op: any, hint: UpdateHint): void;
|
|
25
|
+
protected getPropertyUpdateHint(property: string): UpdateHint;
|
|
26
|
+
protected onPropertyUpdated(property: string, value: any, prevValue: any): void;
|
|
23
27
|
getOwnerId(): string;
|
|
24
28
|
getBackgroundColor(): string;
|
|
25
29
|
getBorderStyle(): string;
|