telva 1.1.3 → 1.1.4
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/Telva.d.ts +3 -3
- package/dist/components/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/components/Primitives/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/Primitives/DropdownMenu/DMCheckboxItem.d.ts +1 -1
- package/dist/components/Primitives/DropdownMenu/DMItem.d.ts +1 -1
- package/dist/components/Primitives/DropdownMenu/DMTriggerIcon.d.ts +1 -1
- package/dist/components/ToolsPanel/ShapesMenu.d.ts +1 -1
- package/dist/components/TopPanel/PageMenu/PageMenu.d.ts +1 -1
- package/dist/components/TopPanel/PageOptionsDialog/PageOptionsDialog.d.ts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/hooks/useFileSystem.d.ts +1 -1
- package/dist/hooks/useTelvaApp.d.ts +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/hooks/useTranslation.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +18 -30283
- package/dist/index.mjs.map +3 -3
- package/dist/state/StateManager/StateManager.d.ts +1 -1
- package/dist/state/TVDR.d.ts +1 -1
- package/dist/state/TelvaApp.d.ts +7 -7
- package/dist/state/commands/alignShapes/alignShapes.d.ts +2 -2
- package/dist/state/commands/changePage/changePage.d.ts +2 -2
- package/dist/state/commands/createPage/createPage.d.ts +2 -2
- package/dist/state/commands/createShapes/createShapes.d.ts +2 -2
- package/dist/state/commands/deletePage/deletePage.d.ts +2 -2
- package/dist/state/commands/deleteShapes/deleteShapes.d.ts +2 -2
- package/dist/state/commands/distributeShapes/distributeShapes.d.ts +2 -2
- package/dist/state/commands/duplicatePage/duplicatePage.d.ts +2 -2
- package/dist/state/commands/duplicateShapes/duplicateShapes.d.ts +2 -2
- package/dist/state/commands/flipShapes/flipShapes.d.ts +3 -3
- package/dist/state/commands/groupShapes/groupShapes.d.ts +2 -2
- package/dist/state/commands/insertContent/insertContent.d.ts +2 -2
- package/dist/state/commands/movePage/movePage.d.ts +2 -2
- package/dist/state/commands/moveShapesToPage/moveShapesToPage.d.ts +2 -2
- package/dist/state/commands/renamePage/renamePage.d.ts +2 -2
- package/dist/state/commands/reorderShapes/reorderShapes.d.ts +2 -2
- package/dist/state/commands/resetBounds/resetBounds.d.ts +2 -2
- package/dist/state/commands/rotateShapes/rotateShapes.d.ts +2 -2
- package/dist/state/commands/setShapesProps/setShapesProps.d.ts +2 -2
- package/dist/state/commands/shared/removeShapesFromPage.d.ts +1 -1
- package/dist/state/commands/stretchShapes/stretchShapes.d.ts +3 -3
- package/dist/state/commands/styleShapes/styleShapes.d.ts +2 -2
- package/dist/state/commands/toggleShapesDecoration/toggleShapesDecoration.d.ts +2 -2
- package/dist/state/commands/toggleShapesProp/toggleShapesProp.d.ts +2 -2
- package/dist/state/commands/translateShapes/translateShapes.d.ts +2 -2
- package/dist/state/commands/ungroupShapes/ungroupShapes.d.ts +3 -3
- package/dist/state/commands/updateShapes/updateShapes.d.ts +2 -2
- package/dist/state/data/filesystem.d.ts +1 -1
- package/dist/state/data/migrate.d.ts +1 -1
- package/dist/state/sessions/ArrowSession/ArrowSession.d.ts +3 -3
- package/dist/state/sessions/BaseSession.d.ts +2 -2
- package/dist/state/sessions/BrushSession/BrushSession.d.ts +3 -3
- package/dist/state/sessions/DrawSession/DrawSession.d.ts +3 -3
- package/dist/state/sessions/EditSession/EditSession.d.ts +3 -3
- package/dist/state/sessions/EraseSession/EraseSession.d.ts +4 -4
- package/dist/state/sessions/GridSession/GridSession.d.ts +3 -3
- package/dist/state/sessions/HandleSession/HandleSession.d.ts +3 -3
- package/dist/state/sessions/RotateSession/RotateSession.d.ts +3 -3
- package/dist/state/sessions/TransformSession/TransformSession.d.ts +3 -3
- package/dist/state/sessions/TransformSingleSession/TransformSingleSession.d.ts +3 -3
- package/dist/state/sessions/TranslateLabelSession/TranslateLabelSession.d.ts +3 -3
- package/dist/state/sessions/TranslateSession/TranslateSession.d.ts +3 -3
- package/dist/state/sessions/index.d.ts +1 -1
- package/dist/state/shapes/ArrowUtil/ArrowUtil.d.ts +2 -2
- package/dist/state/shapes/ArrowUtil/arrowHelpers.d.ts +1 -1
- package/dist/state/shapes/ArrowUtil/components/CurvedArrow.tsx.d.ts +1 -1
- package/dist/state/shapes/ArrowUtil/components/StraightArrow.d.ts +1 -1
- package/dist/state/shapes/DrawUtil/DrawUtil.d.ts +2 -2
- package/dist/state/shapes/DrawUtil/drawHelpers.d.ts +1 -1
- package/dist/state/shapes/EllipseUtil/EllipseUtil.d.ts +2 -2
- package/dist/state/shapes/EllipseUtil/components/DashedEllipse.d.ts +1 -1
- package/dist/state/shapes/EllipseUtil/components/DrawEllipse.d.ts +1 -1
- package/dist/state/shapes/EllipseUtil/ellipseHelpers.d.ts +1 -1
- package/dist/state/shapes/GroupUtil/GroupUtil.d.ts +2 -2
- package/dist/state/shapes/ImageUtil/ImageUtil.d.ts +3 -3
- package/dist/state/shapes/PenUtil/PenUtil.d.ts +2 -2
- package/dist/state/shapes/PenUtil/penHelpers.d.ts +1 -1
- package/dist/state/shapes/ReactComponentUtil/ReactComponentUtil.d.ts +4 -4
- package/dist/state/shapes/ReactComponentUtil/ReactComponentUtil.d.ts.map +1 -1
- package/dist/state/shapes/RectangleUtil/RectangleUtil.d.ts +3 -3
- package/dist/state/shapes/RectangleUtil/components/DashedRectangle.d.ts +1 -1
- package/dist/state/shapes/RectangleUtil/components/DrawRectangle.d.ts +1 -1
- package/dist/state/shapes/RectangleUtil/rectangleHelpers.d.ts +1 -1
- package/dist/state/shapes/StickyUtil/StickyUtil.d.ts +2 -2
- package/dist/state/shapes/TVShapeUtil.d.ts +1 -1
- package/dist/state/shapes/TextUtil/TextUtil.d.ts +8 -8
- package/dist/state/shapes/TriangleUtil/TriangleUtil.d.ts +3 -3
- package/dist/state/shapes/TriangleUtil/components/DashedTriangle.d.ts +1 -1
- package/dist/state/shapes/TriangleUtil/components/DrawTriangle.d.ts +1 -1
- package/dist/state/shapes/TriangleUtil/triangleHelpers.d.ts +1 -1
- package/dist/state/shapes/VideoUtil/VideoUtil.d.ts +3 -3
- package/dist/state/shapes/index.d.ts +2 -2
- package/dist/state/shapes/shared/TextLabel.d.ts +1 -1
- package/dist/state/shapes/shared/getTextAlign.d.ts +1 -1
- package/dist/state/shapes/shared/getTextSvgElement.d.ts +1 -1
- package/dist/state/shapes/shared/gradient-fill.d.ts +1 -1
- package/dist/state/shapes/shared/shape-styles.d.ts +1 -1
- package/dist/state/tools/ArrowTool/ArrowTool.d.ts +2 -2
- package/dist/state/tools/BaseTool.d.ts +2 -2
- package/dist/state/tools/DrawTool/DrawTool.d.ts +2 -2
- package/dist/state/tools/EllipseTool/EllipseTool.d.ts +2 -2
- package/dist/state/tools/EraseTool/EraseTool.d.ts +1 -1
- package/dist/state/tools/LineTool/LineTool.d.ts +2 -2
- package/dist/state/tools/PenEditTool.d.ts +2 -2
- package/dist/state/tools/PenTool/PenTool.d.ts +2 -2
- package/dist/state/tools/RectangleTool/RectangleTool.d.ts +2 -2
- package/dist/state/tools/SelectTool/SelectTool.d.ts +44 -44
- package/dist/state/tools/StickyTool/StickyTool.d.ts +2 -2
- package/dist/state/tools/TextTool/TextTool.d.ts +2 -2
- package/dist/state/tools/TriangleTool/TriangleTool.d.ts +2 -2
- package/dist/state/tools/index.d.ts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UseBoundStore } from 'zustand';
|
|
2
2
|
import { StoreApi } from 'zustand/vanilla';
|
|
3
|
-
import type { Command, Patch } from '
|
|
3
|
+
import type { Command, Patch } from '../../types';
|
|
4
4
|
export declare class StateManager<T extends Record<string, any>> {
|
|
5
5
|
/**
|
|
6
6
|
* An ID used to persist state in indexdb.
|
package/dist/state/TVDR.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TLBounds, TLPageState, TLTransformInfo } from 'telva-core';
|
|
2
|
-
import { ArrowShape, ShapesWithProp, TVBinding, TVExportType, TVPage, TVShape, TVSnapshot, TelvaCommand } from '
|
|
2
|
+
import { ArrowShape, ShapesWithProp, TVBinding, TVExportType, TVPage, TVShape, TVSnapshot, TelvaCommand } from '../types';
|
|
3
3
|
import type { TVShapeUtil } from './shapes/TVShapeUtil';
|
|
4
4
|
export declare class TVDR {
|
|
5
5
|
static getShapeUtil<T extends TVShape>(type: T['type']): TVShapeUtil<T>;
|
package/dist/state/TelvaApp.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLBounds, TLBoundsEventHandler, TLBoundsHandleEventHandler, TLCanvasEventHandler, TLDropEventHandler, TLKeyboardEventHandler, TLPageState, TLPinchEventHandler, TLPointerEventHandler, TLShape, TLShapeCloneHandler, TLWheelEventHandler } from 'telva-core';
|
|
2
|
-
import { DialogState } from '
|
|
3
|
-
import { AlignType, DistributeType, SessionType, ShapeStyles, StretchType, TVAsset, TVAssets, TVBinding, TVDocument, TVExport, TVExportBackground, TVExportType, TVPage, TVShape, TVShapeType, TVSnapshot, TVToolType, TVUser, TelvaCommand, TelvaPatch } from '
|
|
2
|
+
import { DialogState } from '../hooks';
|
|
3
|
+
import { AlignType, DistributeType, SessionType, ShapeStyles, StretchType, TVAsset, TVAssets, TVBinding, TVDocument, TVExport, TVExportBackground, TVExportType, TVPage, TVShape, TVShapeType, TVSnapshot, TVToolType, TVUser, TelvaCommand, TelvaPatch } from '../types';
|
|
4
4
|
import { StateManager } from './StateManager';
|
|
5
5
|
import { TVDR } from './TVDR';
|
|
6
6
|
import { SessionArgsOfType, TelvaSession } from './sessions';
|
|
@@ -176,7 +176,7 @@ export declare class TelvaApp extends StateManager<TVSnapshot> {
|
|
|
176
176
|
private justSent;
|
|
177
177
|
getReservedContent: (coreReservedIds: string[], pageId?: string) => {
|
|
178
178
|
reservedShapes: Record<string, TVShape>;
|
|
179
|
-
reservedBindings: Record<string, import("
|
|
179
|
+
reservedBindings: Record<string, import("../types").ArrowBinding>;
|
|
180
180
|
strongReservedShapeIds: Set<string>;
|
|
181
181
|
};
|
|
182
182
|
/**
|
|
@@ -231,7 +231,7 @@ export declare class TelvaApp extends StateManager<TVSnapshot> {
|
|
|
231
231
|
showCloneHandles: boolean;
|
|
232
232
|
showGrid: boolean;
|
|
233
233
|
language: string;
|
|
234
|
-
dockPosition: import("
|
|
234
|
+
dockPosition: import("../types").TVDockPosition;
|
|
235
235
|
exportBackground: TVExportBackground;
|
|
236
236
|
canvasMode: "freehand" | "straight";
|
|
237
237
|
}[T]>(name: T, value: V | ((value: V) => V)) => this;
|
|
@@ -515,7 +515,7 @@ export declare class TelvaApp extends StateManager<TVSnapshot> {
|
|
|
515
515
|
*/
|
|
516
516
|
getContent: (ids?: string[]) => {
|
|
517
517
|
shapes: TVShape[];
|
|
518
|
-
bindings: import("
|
|
518
|
+
bindings: import("../types").ArrowBinding[];
|
|
519
519
|
assets: TVAsset[];
|
|
520
520
|
} | undefined;
|
|
521
521
|
/**
|
|
@@ -691,7 +691,7 @@ export declare class TelvaApp extends StateManager<TVSnapshot> {
|
|
|
691
691
|
* @param type The session type
|
|
692
692
|
* @param args arguments of the session's start method.
|
|
693
693
|
*/
|
|
694
|
-
startSession: <T extends SessionType>(type: T, ...args: import("
|
|
694
|
+
startSession: <T extends SessionType>(type: T, ...args: import("../types").ExceptFirst<ConstructorParameters<import("./sessions").SessionOfType<T>>>) => this;
|
|
695
695
|
/**
|
|
696
696
|
* updateSession.
|
|
697
697
|
* @param args The arguments of the current session's update method.
|
|
@@ -725,7 +725,7 @@ export declare class TelvaApp extends StateManager<TVSnapshot> {
|
|
|
725
725
|
id: string;
|
|
726
726
|
} & Partial<TVShape>)[]) => this;
|
|
727
727
|
createTextShapeAtPoint(point: number[], id?: string, patch?: boolean): this;
|
|
728
|
-
getImageOrVideoShapeAtPoint(id: string, type: TVShapeType.Image | TVShapeType.Video, point: number[], size: number[], assetId: string): import("
|
|
728
|
+
getImageOrVideoShapeAtPoint(id: string, type: TVShapeType.Image | TVShapeType.Video, point: number[], size: number[], assetId: string): import("../types").ImageShape | import("../types").VideoShape;
|
|
729
729
|
/**
|
|
730
730
|
* Create one or more shapes.
|
|
731
731
|
* @param shapes An array of shapes.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import { AlignType, TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import { AlignType, TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function alignShapes(app: TelvaApp, ids: string[], type: AlignType): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=alignShapes.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function changePage(app: TelvaApp, pageId: string): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=changePage.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../..';
|
|
2
|
+
import type { TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function createPage(app: TelvaApp, center: number[], pageId?: string, pageName?: string): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=createPage.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TVBinding, TVShape, TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TVBinding, TVShape, TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function createShapes(app: TelvaApp, shapes: TVShape[], bindings?: TVBinding[]): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=createShapes.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function deletePage(app: TelvaApp, pageId: string): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=deletePage.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function deleteShapes(app: TelvaApp, ids: string[], pageId?: string): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=deleteShapes.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import { DistributeType, TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import { DistributeType, TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function distributeShapes(app: TelvaApp, ids: string[], type: DistributeType): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=distributeShapes.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function duplicatePage(app: TelvaApp, pageId: string): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=duplicatePage.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function duplicateShapes(app: TelvaApp, ids: string[], point?: number[]): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=duplicateShapes.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import { FlipType } from '
|
|
3
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import { FlipType } from '../../../types';
|
|
3
|
+
import type { TelvaCommand } from '../../../types';
|
|
4
4
|
export declare function flipShapes(app: TelvaApp, ids: string[], type: FlipType): TelvaCommand;
|
|
5
5
|
//# sourceMappingURL=flipShapes.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function groupShapes(app: TelvaApp, ids: string[], groupId: string, pageId: string): TelvaCommand | undefined;
|
|
4
4
|
//# sourceMappingURL=groupShapes.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TVAsset, TVBinding, TVShape, TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TVAsset, TVBinding, TVShape, TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function insertContent(app: TelvaApp, content: {
|
|
4
4
|
shapes: TVShape[];
|
|
5
5
|
bindings?: TVBinding[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function movePage(app: TelvaApp, pageId: string, index: number): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=movePage.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TLBounds } from 'telva-core';
|
|
2
|
-
import type { TelvaApp } from '
|
|
3
|
-
import type { TelvaCommand } from '
|
|
2
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
3
|
+
import type { TelvaCommand } from '../../../types';
|
|
4
4
|
export declare function moveShapesToPage(app: TelvaApp, ids: string[], viewportBounds: TLBounds, fromPageId: string, toPageId: string): TelvaCommand;
|
|
5
5
|
//# sourceMappingURL=moveShapesToPage.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function renamePage(app: TelvaApp, pageId: string, name: string): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=renamePage.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import { MoveType, TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import { MoveType, TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function reorderShapes(app: TelvaApp, ids: string[], type: MoveType): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=reorderShapes.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function resetBounds(app: TelvaApp, ids: string[], pageId: string): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=resetBounds.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function rotateShapes(app: TelvaApp, ids: string[], delta?: number): TelvaCommand | void;
|
|
4
4
|
//# sourceMappingURL=rotateShapes.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TVShape, TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../..';
|
|
2
|
+
import type { TVShape, TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function setShapesProps<T extends TVShape>(app: TelvaApp, ids: string[], partial: Partial<T>): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=setShapesProps.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import { StretchType } from '
|
|
3
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import { StretchType } from '../../../types';
|
|
3
|
+
import type { TelvaCommand } from '../../../types';
|
|
4
4
|
export declare function stretchShapes(app: TelvaApp, ids: string[], type: StretchType): TelvaCommand;
|
|
5
5
|
//# sourceMappingURL=stretchShapes.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import { ShapeStyles, TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import { ShapeStyles, TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function styleShapes(app: TelvaApp, ids: string[], changes: Partial<ShapeStyles>): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=styleShapes.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../internal';
|
|
2
|
+
import type { TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function toggleShapesDecoration(app: TelvaApp, ids: string[], decorationId: 'start' | 'end'): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=toggleShapesDecoration.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TVShape, TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../..';
|
|
2
|
+
import type { TVShape, TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function toggleShapeProp(app: TelvaApp, ids: string[], prop: keyof TVShape): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=toggleShapesProp.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function translateShapes(app: TelvaApp, ids: string[], delta: number[]): TelvaCommand;
|
|
4
4
|
//# sourceMappingURL=translateShapes.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { GroupShape } from '
|
|
3
|
-
import type { TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { GroupShape } from '../../../types';
|
|
3
|
+
import type { TelvaCommand } from '../../../types';
|
|
4
4
|
export declare function ungroupShapes(app: TelvaApp, selectedIds: string[], groupShapes: GroupShape[], pageId: string): TelvaCommand | undefined;
|
|
5
5
|
//# sourceMappingURL=ungroupShapes.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import type { TVShape, TelvaCommand } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import type { TVShape, TelvaCommand } from '../../../types';
|
|
3
3
|
export declare function updateShapes(app: TelvaApp, updates: ({
|
|
4
4
|
id: string;
|
|
5
5
|
} & Partial<TVShape>)[], pageId: string): TelvaCommand;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import { BaseSession } from '
|
|
3
|
-
import { ArrowShape, SessionType, TVBinding, TVStatus, TelvaCommand, TelvaPatch } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import { BaseSession } from '../BaseSession';
|
|
3
|
+
import { ArrowShape, SessionType, TVBinding, TVStatus, TelvaCommand, TelvaPatch } from '../../../types';
|
|
4
4
|
export declare class ArrowSession extends BaseSession {
|
|
5
5
|
type: SessionType;
|
|
6
6
|
performanceMode: undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TLPerformanceMode } from 'telva-core';
|
|
2
|
-
import type { TelvaApp } from '
|
|
3
|
-
import type { SessionType, TelvaCommand, TelvaPatch } from '
|
|
2
|
+
import type { TelvaApp } from '../TelvaApp';
|
|
3
|
+
import type { SessionType, TelvaCommand, TelvaPatch } from '../../types';
|
|
4
4
|
export declare abstract class BaseSession {
|
|
5
5
|
app: TelvaApp;
|
|
6
6
|
abstract type: SessionType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TLBounds } from 'telva-core';
|
|
2
|
-
import type { TelvaApp } from '
|
|
3
|
-
import { BaseSession } from '
|
|
4
|
-
import { SessionType, TVStatus, TelvaCommand, TelvaPatch } from '
|
|
2
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
3
|
+
import { BaseSession } from '../BaseSession';
|
|
4
|
+
import { SessionType, TVStatus, TelvaCommand, TelvaPatch } from '../../../types';
|
|
5
5
|
export declare class BrushSession extends BaseSession {
|
|
6
6
|
type: SessionType;
|
|
7
7
|
performanceMode: undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import { BaseSession } from '
|
|
3
|
-
import { DrawShape, SessionType, TVStatus, TelvaCommand, TelvaPatch } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import { BaseSession } from '../BaseSession';
|
|
3
|
+
import { DrawShape, SessionType, TVStatus, TelvaCommand, TelvaPatch } from '../../../types';
|
|
4
4
|
export declare class DrawSession extends BaseSession {
|
|
5
5
|
type: SessionType;
|
|
6
6
|
performanceMode: undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import { BaseSession } from '
|
|
3
|
-
import { SessionType, TVShape, TelvaCommand, TelvaPatch } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import { BaseSession } from '../BaseSession';
|
|
3
|
+
import { SessionType, TVShape, TelvaCommand, TelvaPatch } from '../../../types';
|
|
4
4
|
export declare class EditSession extends BaseSession {
|
|
5
5
|
type: SessionType;
|
|
6
6
|
performanceMode: undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import { BaseSession } from '
|
|
3
|
-
import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import { BaseSession } from '../BaseSession';
|
|
3
|
+
import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '../../../types';
|
|
4
4
|
export declare class EraseSession extends BaseSession {
|
|
5
5
|
type: SessionType;
|
|
6
6
|
performanceMode: undefined;
|
|
@@ -8,7 +8,7 @@ export declare class EraseSession extends BaseSession {
|
|
|
8
8
|
isLocked?: boolean;
|
|
9
9
|
lockedDirection?: 'horizontal' | 'vertical';
|
|
10
10
|
erasedShapes: Set<TVShape>;
|
|
11
|
-
erasedBindings: Set<import("
|
|
11
|
+
erasedBindings: Set<import("../../../types").ArrowBinding>;
|
|
12
12
|
initialSelectedShapes: TVShape[];
|
|
13
13
|
erasableShapes: Set<TVShape>;
|
|
14
14
|
prevPoint: number[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TLBounds } from 'telva-core';
|
|
2
|
-
import type { TelvaApp } from '
|
|
3
|
-
import { BaseSession } from '
|
|
4
|
-
import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '
|
|
2
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
3
|
+
import { BaseSession } from '../BaseSession';
|
|
4
|
+
import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '../../../types';
|
|
5
5
|
export declare class GridSession extends BaseSession {
|
|
6
6
|
type: SessionType;
|
|
7
7
|
performanceMode: undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import { BaseSession } from '
|
|
3
|
-
import { SessionType, ShapesWithProp, TVStatus, TelvaCommand, TelvaPatch } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import { BaseSession } from '../BaseSession';
|
|
3
|
+
import { SessionType, ShapesWithProp, TVStatus, TelvaCommand, TelvaPatch } from '../../../types';
|
|
4
4
|
export declare class HandleSession extends BaseSession {
|
|
5
5
|
type: SessionType;
|
|
6
6
|
performanceMode: undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TelvaApp } from '
|
|
2
|
-
import { BaseSession } from '
|
|
3
|
-
import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '
|
|
1
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
2
|
+
import { BaseSession } from '../BaseSession';
|
|
3
|
+
import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '../../../types';
|
|
4
4
|
export declare class RotateSession extends BaseSession {
|
|
5
5
|
type: SessionType;
|
|
6
6
|
status: TVStatus;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TLBounds, TLBoundsCorner, TLBoundsEdge } from 'telva-core';
|
|
2
2
|
import type { TLBoundsWithCenter } from 'telva-core';
|
|
3
|
-
import type { TelvaApp } from '
|
|
4
|
-
import { BaseSession } from '
|
|
5
|
-
import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '
|
|
3
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
4
|
+
import { BaseSession } from '../BaseSession';
|
|
5
|
+
import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '../../../types';
|
|
6
6
|
declare type SnapInfo = {
|
|
7
7
|
state: 'empty';
|
|
8
8
|
} | {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TLBounds, TLBoundsCorner, TLBoundsEdge, TLBoundsWithCenter } from 'telva-core';
|
|
2
|
-
import type { TelvaApp } from '
|
|
3
|
-
import { BaseSession } from '
|
|
4
|
-
import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '
|
|
2
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
3
|
+
import { BaseSession } from '../BaseSession';
|
|
4
|
+
import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '../../../types';
|
|
5
5
|
declare type SnapInfo = {
|
|
6
6
|
state: 'empty';
|
|
7
7
|
} | {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TLBounds } from 'telva-core';
|
|
2
|
-
import type { TelvaApp } from '
|
|
3
|
-
import { BaseSession } from '
|
|
4
|
-
import { ArrowShape, EllipseShape, RectangleShape, SessionType, TVStatus, TelvaCommand, TelvaPatch, TriangleShape } from '
|
|
2
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
3
|
+
import { BaseSession } from '../BaseSession';
|
|
4
|
+
import { ArrowShape, EllipseShape, RectangleShape, SessionType, TVStatus, TelvaCommand, TelvaPatch, TriangleShape } from '../../../types';
|
|
5
5
|
export declare class TranslateLabelSession extends BaseSession {
|
|
6
6
|
type: SessionType;
|
|
7
7
|
performanceMode: undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TLBounds, TLBoundsWithCenter, TLSnapLine } from 'telva-core';
|
|
2
|
-
import type { TelvaApp } from '
|
|
3
|
-
import { BaseSession } from '
|
|
4
|
-
import { ArrowBinding, SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '
|
|
2
|
+
import type { TelvaApp } from '../../TelvaApp';
|
|
3
|
+
import { BaseSession } from '../BaseSession';
|
|
4
|
+
import { ArrowBinding, SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '../../../types';
|
|
5
5
|
declare type CloneInfo = {
|
|
6
6
|
state: 'empty';
|
|
7
7
|
} | {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TLBounds } from 'telva-core';
|
|
3
|
-
import { TVShapeUtil } from '
|
|
4
|
-
import { ArrowShape, TVShapeType, TransformInfo } from '
|
|
3
|
+
import { TVShapeUtil } from '../TVShapeUtil';
|
|
4
|
+
import { ArrowShape, TVShapeType, TransformInfo } from '../../../types';
|
|
5
5
|
declare type T = ArrowShape;
|
|
6
6
|
declare type E = HTMLDivElement;
|
|
7
7
|
export declare class ArrowUtil extends TVShapeUtil<T, E> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ArrowShape, Decoration, ShapeStyles } from '
|
|
1
|
+
import type { ArrowShape, Decoration, ShapeStyles } from '../../../types';
|
|
2
2
|
export declare function getArrowArcPath(start: number[], end: number[], circle: number[], bend: number): string;
|
|
3
3
|
export declare function getBendPoint(handles: ArrowShape['handles'], bend: number): number[];
|
|
4
4
|
export declare function renderFreehandArrowShaft(id: string, style: ShapeStyles, start: number[], end: number[], decorationStart: Decoration | undefined, decorationEnd: Decoration | undefined): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TLBounds } from 'telva-core';
|
|
3
|
-
import { TVShapeUtil } from '
|
|
4
|
-
import { DrawShape, TVShapeType, TransformInfo } from '
|
|
3
|
+
import { TVShapeUtil } from '../TVShapeUtil';
|
|
4
|
+
import { DrawShape, TVShapeType, TransformInfo } from '../../../types';
|
|
5
5
|
declare type T = DrawShape;
|
|
6
6
|
declare type E = SVGSVGElement;
|
|
7
7
|
export declare class DrawUtil extends TVShapeUtil<T, E> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StrokeOptions, StrokePoint } from 'perfect-freehand';
|
|
2
|
-
import type { DrawShape } from '
|
|
2
|
+
import type { DrawShape } from '../../../types';
|
|
3
3
|
export declare function getFreehandOptions(shape: DrawShape): StrokeOptions;
|
|
4
4
|
export declare function getFillPath(shape: DrawShape): string;
|
|
5
5
|
export declare function getDrawStrokePoints(shape: DrawShape, options: StrokeOptions): StrokePoint[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TLBounds } from 'telva-core';
|
|
3
|
-
import { TVShapeUtil } from '
|
|
4
|
-
import { EllipseShape, TVMeta, TVShape, TVShapeType, TransformInfo } from '
|
|
3
|
+
import { TVShapeUtil } from '../TVShapeUtil';
|
|
4
|
+
import { EllipseShape, TVMeta, TVShape, TVShapeType, TransformInfo } from '../../../types';
|
|
5
5
|
declare type T = EllipseShape;
|
|
6
6
|
declare type E = HTMLDivElement;
|
|
7
7
|
export declare class EllipseUtil extends TVShapeUtil<T, E> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ShapeStyles } from '
|
|
1
|
+
import type { ShapeStyles } from '../../../types';
|
|
2
2
|
export declare function getEllipseStrokePoints(id: string, radius: number[], style: ShapeStyles): import("perfect-freehand").StrokePoint[];
|
|
3
3
|
export declare function getEllipsePath(id: string, radius: number[], style: ShapeStyles): string;
|
|
4
4
|
export declare function getEllipseIndicatorPath(id: string, radius: number[], style: ShapeStyles): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TVShapeUtil } from '
|
|
3
|
-
import { GroupShape, TVShapeType } from '
|
|
2
|
+
import { TVShapeUtil } from '../TVShapeUtil';
|
|
3
|
+
import { GroupShape, TVShapeType } from '../../../types';
|
|
4
4
|
declare type T = GroupShape;
|
|
5
5
|
declare type E = SVGSVGElement;
|
|
6
6
|
export declare class GroupUtil extends TVShapeUtil<T, E> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TVShapeUtil } from '
|
|
3
|
-
import { transformRectangle, transformSingleRectangle } from '
|
|
4
|
-
import { ImageShape, TVShapeType } from '
|
|
2
|
+
import { TVShapeUtil } from '../TVShapeUtil';
|
|
3
|
+
import { transformRectangle, transformSingleRectangle } from '../shared';
|
|
4
|
+
import { ImageShape, TVShapeType } from '../../../types';
|
|
5
5
|
declare type T = ImageShape;
|
|
6
6
|
declare type E = HTMLDivElement;
|
|
7
7
|
export declare class ImageUtil extends TVShapeUtil<T, E> {
|