telva 1.1.2 → 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 +5 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TLBounds } from 'telva-core';
|
|
3
|
-
import { TVShapeUtil } from '
|
|
4
|
-
import { PenSegment, PenShape, TVShapeType } from '
|
|
3
|
+
import { TVShapeUtil } from '../TVShapeUtil';
|
|
4
|
+
import { PenSegment, PenShape, TVShapeType } from '../../../types';
|
|
5
5
|
declare type T = PenShape;
|
|
6
6
|
declare type E = SVGSVGElement;
|
|
7
7
|
export declare class PenUtil 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 { ReactComponentShape, TVShapeType } from '
|
|
2
|
+
import { TVShapeUtil } from '../TVShapeUtil';
|
|
3
|
+
import { transformRectangle, transformSingleRectangle } from '../shared';
|
|
4
|
+
import { ReactComponentShape, TVShapeType } from '../../../types';
|
|
5
5
|
declare type T = ReactComponentShape;
|
|
6
6
|
declare type E = HTMLDivElement;
|
|
7
7
|
export declare class ReactComponentUtil extends TVShapeUtil<T, E> {
|
|
@@ -23,7 +23,7 @@ export declare class ReactComponentUtil extends TVShapeUtil<T, E> {
|
|
|
23
23
|
shouldRender: (prev: T, next: T) => boolean;
|
|
24
24
|
transform: typeof transformRectangle;
|
|
25
25
|
transformSingle: typeof transformSingleRectangle;
|
|
26
|
-
getSvgElement: (shape: T,
|
|
26
|
+
getSvgElement: (shape: T, _isDarkMode: boolean) => Promise<SVGElement | void>;
|
|
27
27
|
}
|
|
28
28
|
export {};
|
|
29
29
|
//# sourceMappingURL=ReactComponentUtil.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactComponentUtil.d.ts","sourceRoot":"","sources":["../../../../src/state/shapes/ReactComponentUtil/ReactComponentUtil.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAGL,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,mBAAmB,EAAU,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEjE,aAAK,CAAC,GAAG,mBAAmB,CAAA;AAC5B,aAAK,CAAC,GAAG,cAAc,CAAA;AAEvB,qBAAa,kBAAmB,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;IACvD,IAAI,6BAAsC;IAE1C,OAAO,UAAQ;IACf,QAAQ,UAAO;IACf,mBAAmB,UAAQ;IAC3B,gBAAgB,UAAQ;IAExB,QAAQ,UAAW,QAAQ,CAAC,CAAC,KAAG,CAAC,CAgBhC;IAED,SAAS,8RA+BP;IAEF,SAAS;;;;;;6EAgBP;IAEF,SAAS,UAAW,CAAC,cAEpB;IAED,YAAY,SAAU,CAAC,QAAQ,CAAC,aAI/B;IAED,SAAS,4BAAqB;IAC9B,eAAe,kCAA2B;IAE1C,aAAa,UAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"ReactComponentUtil.d.ts","sourceRoot":"","sources":["../../../../src/state/shapes/ReactComponentUtil/ReactComponentUtil.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAGL,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,mBAAmB,EAAU,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEjE,aAAK,CAAC,GAAG,mBAAmB,CAAA;AAC5B,aAAK,CAAC,GAAG,cAAc,CAAA;AAEvB,qBAAa,kBAAmB,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;IACvD,IAAI,6BAAsC;IAE1C,OAAO,UAAQ;IACf,QAAQ,UAAO;IACf,mBAAmB,UAAQ;IAC3B,gBAAgB,UAAQ;IAExB,QAAQ,UAAW,QAAQ,CAAC,CAAC,KAAG,CAAC,CAgBhC;IAED,SAAS,8RA+BP;IAEF,SAAS;;;;;;6EAgBP;IAEF,SAAS,UAAW,CAAC,cAEpB;IAED,YAAY,SAAU,CAAC,QAAQ,CAAC,aAI/B;IAED,SAAS,4BAAqB;IAC9B,eAAe,kCAA2B;IAE1C,aAAa,UAAiB,CAAC,eAAe,OAAO,KAAG,QAAQ,UAAU,GAAG,IAAI,CAAC,CAyCjF;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TVShapeUtil } from '
|
|
3
|
-
import { transformRectangle, transformSingleRectangle } from '
|
|
4
|
-
import { RectangleShape, TVShapeType } from '
|
|
2
|
+
import { TVShapeUtil } from '../TVShapeUtil';
|
|
3
|
+
import { transformRectangle, transformSingleRectangle } from '../shared';
|
|
4
|
+
import { RectangleShape, TVShapeType } from '../../../types';
|
|
5
5
|
declare type T = RectangleShape;
|
|
6
6
|
declare type E = HTMLDivElement;
|
|
7
7
|
export declare class RectangleUtil extends TVShapeUtil<T, E> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ShapeStyles } from '
|
|
1
|
+
import type { ShapeStyles } from '../../../types';
|
|
2
2
|
export declare function getRectanglePath(id: string, style: ShapeStyles, size: number[]): string;
|
|
3
3
|
export declare function getRectangleIndicatorPathTDSnapshot(id: string, style: ShapeStyles, size: number[]): string;
|
|
4
4
|
//# sourceMappingURL=rectangleHelpers.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TLBounds } from 'telva-core';
|
|
3
|
-
import { TVShapeUtil } from '
|
|
4
|
-
import { StickyShape, TVShapeType, TransformInfo } from '
|
|
3
|
+
import { TVShapeUtil } from '../TVShapeUtil';
|
|
4
|
+
import { StickyShape, TVShapeType, TransformInfo } from '../../../types';
|
|
5
5
|
declare type T = StickyShape;
|
|
6
6
|
declare type E = HTMLDivElement;
|
|
7
7
|
export declare class StickyUtil extends TVShapeUtil<T, E> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLShapeUtil } from 'telva-core';
|
|
2
2
|
import type { TLBounds, TLPointerInfo } from 'telva-core';
|
|
3
|
-
import { TVMeta, TVShape, TransformInfo } from '
|
|
3
|
+
import { TVMeta, TVShape, TransformInfo } from '../../types';
|
|
4
4
|
export declare abstract class TVShapeUtil<T extends TVShape, E extends Element = any> extends TLShapeUtil<T, E, TVMeta> {
|
|
5
5
|
abstract type: T['type'];
|
|
6
6
|
canBind: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TLBounds } from 'telva-core';
|
|
3
|
-
import { TVShapeUtil } from '
|
|
4
|
-
import { AlignStyle, TVShapeType, TextShape, TransformInfo } from '
|
|
3
|
+
import { TVShapeUtil } from '../TVShapeUtil';
|
|
4
|
+
import { AlignStyle, TVShapeType, TextShape, TransformInfo } from '../../../types';
|
|
5
5
|
declare type T = TextShape;
|
|
6
6
|
declare type E = HTMLDivElement;
|
|
7
7
|
export declare class TextUtil extends TVShapeUtil<T, E> {
|
|
@@ -28,10 +28,10 @@ export declare class TextUtil extends TVShapeUtil<T, E> {
|
|
|
28
28
|
onDoubleClickBoundsHandle: (shape: T) => {
|
|
29
29
|
style: {
|
|
30
30
|
scale: number;
|
|
31
|
-
color: import("
|
|
32
|
-
size: import("
|
|
33
|
-
dash: import("
|
|
34
|
-
font?: import("
|
|
31
|
+
color: import("../../../types").ColorStyle;
|
|
32
|
+
size: import("../../../types").SizeStyle;
|
|
33
|
+
dash: import("../../../types").DashStyle;
|
|
34
|
+
font?: import("../../../types").FontStyle | undefined;
|
|
35
35
|
textAlign?: AlignStyle | undefined;
|
|
36
36
|
isFilled?: boolean | undefined;
|
|
37
37
|
opacity?: number | undefined;
|
|
@@ -42,8 +42,8 @@ export declare class TextUtil extends TVShapeUtil<T, E> {
|
|
|
42
42
|
labelColor?: string | undefined;
|
|
43
43
|
labelBackground?: string | undefined;
|
|
44
44
|
fontFamily?: string | undefined;
|
|
45
|
-
gradient?: import("
|
|
46
|
-
textGradient?: import("
|
|
45
|
+
gradient?: import("../../../types").GradientData | undefined;
|
|
46
|
+
textGradient?: import("../../../types").GradientData | undefined;
|
|
47
47
|
};
|
|
48
48
|
point: number[];
|
|
49
49
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TLBounds } from 'telva-core';
|
|
3
|
-
import { TVShapeUtil } from '
|
|
4
|
-
import { transformRectangle, transformSingleRectangle } from '
|
|
5
|
-
import { TVShape, TVShapeType, TriangleShape } from '
|
|
3
|
+
import { TVShapeUtil } from '../TVShapeUtil';
|
|
4
|
+
import { transformRectangle, transformSingleRectangle } from '../shared';
|
|
5
|
+
import { TVShape, TVShapeType, TriangleShape } from '../../../types';
|
|
6
6
|
declare type T = TriangleShape;
|
|
7
7
|
declare type E = HTMLDivElement;
|
|
8
8
|
export declare class TriangleUtil extends TVShapeUtil<T, E> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ShapeStyles } from '
|
|
1
|
+
import type { ShapeStyles } from '../../../types';
|
|
2
2
|
export declare function getTrianglePoints(size: number[], offset?: number, rotation?: number): number[][];
|
|
3
3
|
export declare function getTriangleCentroid(size: number[]): number[];
|
|
4
4
|
export declare function getTrianglePath(id: string, size: number[], style: ShapeStyles): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TVShapeUtil } from '
|
|
3
|
-
import { transformRectangle, transformSingleRectangle } from '
|
|
4
|
-
import { TVShapeType, VideoShape } from '
|
|
2
|
+
import { TVShapeUtil } from '../TVShapeUtil';
|
|
3
|
+
import { transformRectangle, transformSingleRectangle } from '../shared';
|
|
4
|
+
import { TVShapeType, VideoShape } from '../../../types';
|
|
5
5
|
declare type T = VideoShape;
|
|
6
6
|
declare type E = HTMLDivElement;
|
|
7
7
|
export declare class VideoUtil extends TVShapeUtil<T, E> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TVShapeUtil } from '
|
|
2
|
-
import { TVShape } from '
|
|
1
|
+
import type { TVShapeUtil } from './TVShapeUtil';
|
|
2
|
+
import { TVShape } from '../../types';
|
|
3
3
|
import { ArrowUtil } from './ArrowUtil';
|
|
4
4
|
import { DrawUtil } from './DrawUtil';
|
|
5
5
|
import { EllipseUtil } from './EllipseUtil';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AlignStyle } from '
|
|
1
|
+
import { AlignStyle } from '../../../types';
|
|
2
2
|
export declare function getTextSvgElement(text: string, fontSize: number, fontFamily: string, textAlign: AlignStyle, width: number, wrap?: boolean): SVGTextElement;
|
|
3
3
|
//# sourceMappingURL=getTextSvgElement.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColorStyle, FontStyle, ShapeStyles, SizeStyle, Theme } from '
|
|
1
|
+
import { ColorStyle, FontStyle, ShapeStyles, SizeStyle, Theme } from '../../../types';
|
|
2
2
|
export declare const stickyFills: Record<Theme, Record<ColorStyle, string>>;
|
|
3
3
|
export declare const strokes: Record<Theme, Record<ColorStyle, string>>;
|
|
4
4
|
export declare const fills: Record<Theme, Record<ColorStyle, string>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLPointerEventHandler } from 'telva-core';
|
|
2
|
-
import { BaseTool } from '
|
|
3
|
-
import { TVShapeType } from '
|
|
2
|
+
import { BaseTool } from '../BaseTool';
|
|
3
|
+
import { TVShapeType } from '../../../types';
|
|
4
4
|
export declare class ArrowTool extends BaseTool {
|
|
5
5
|
type: TVShapeType.Arrow;
|
|
6
6
|
onPointerDown: TLPointerEventHandler;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLKeyboardEventHandler, TLPinchEventHandler, TLPointerEventHandler } from 'telva-core';
|
|
2
|
-
import type { TelvaApp } from '
|
|
3
|
-
import { TVEventHandler, TVToolType } from '
|
|
2
|
+
import type { TelvaApp } from '../TelvaApp';
|
|
3
|
+
import { TVEventHandler, TVToolType } from '../../types';
|
|
4
4
|
export declare enum Status {
|
|
5
5
|
Idle = "idle",
|
|
6
6
|
Creating = "creating",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLPointerEventHandler } from 'telva-core';
|
|
2
|
-
import { BaseTool } from '
|
|
3
|
-
import { TVShapeType } from '
|
|
2
|
+
import { BaseTool } from '../BaseTool';
|
|
3
|
+
import { TVShapeType } from '../../../types';
|
|
4
4
|
export declare class DrawTool extends BaseTool {
|
|
5
5
|
type: TVShapeType.Draw;
|
|
6
6
|
private lastShapeId?;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLPointerEventHandler } from 'telva-core';
|
|
2
|
-
import { BaseTool } from '
|
|
3
|
-
import { TVShapeType } from '
|
|
2
|
+
import { BaseTool } from '../BaseTool';
|
|
3
|
+
import { TVShapeType } from '../../../types';
|
|
4
4
|
export declare class EllipseTool extends BaseTool {
|
|
5
5
|
type: TVShapeType.Ellipse;
|
|
6
6
|
onPointerDown: TLPointerEventHandler;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLPointerEventHandler } from 'telva-core';
|
|
2
|
-
import { BaseTool } from '
|
|
3
|
-
import { TVShapeType } from '
|
|
2
|
+
import { BaseTool } from '../BaseTool';
|
|
3
|
+
import { TVShapeType } from '../../../types';
|
|
4
4
|
export declare class LineTool extends BaseTool {
|
|
5
5
|
type: TVShapeType.Line;
|
|
6
6
|
onPointerDown: TLPointerEventHandler;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLBoundsCorner, TLBoundsEdge, TLKeyboardEventHandler, TLPointerEventHandler } from 'telva-core';
|
|
2
|
-
import { BaseTool } from '
|
|
3
|
-
import { TVShapeType } from '
|
|
2
|
+
import { BaseTool } from './BaseTool';
|
|
3
|
+
import { TVShapeType } from '../../types';
|
|
4
4
|
declare enum Status {
|
|
5
5
|
Idle = "idle",
|
|
6
6
|
Creating = "creating",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLCanvasEventHandler, TLKeyboardEventHandler, TLPointerEventHandler } from 'telva-core';
|
|
2
|
-
import { BaseTool } from '
|
|
3
|
-
import { TVShapeType } from '
|
|
2
|
+
import { BaseTool } from '../BaseTool';
|
|
3
|
+
import { TVShapeType } from '../../../types';
|
|
4
4
|
declare enum Status {
|
|
5
5
|
Idle = "idle",
|
|
6
6
|
Drawing = "drawing",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLPointerEventHandler } from 'telva-core';
|
|
2
|
-
import { BaseTool } from '
|
|
3
|
-
import { TVShapeType } from '
|
|
2
|
+
import { BaseTool } from '../BaseTool';
|
|
3
|
+
import { TVShapeType } from '../../../types';
|
|
4
4
|
export declare class RectangleTool extends BaseTool {
|
|
5
5
|
type: TVShapeType.Rectangle;
|
|
6
6
|
onPointerDown: TLPointerEventHandler;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLBoundsCorner, TLBoundsEdge, TLBoundsEventHandler, TLBoundsHandleEventHandler, TLCanvasEventHandler, TLKeyboardEventHandler, TLPointerEventHandler, TLShapeCloneHandler } from 'telva-core';
|
|
2
|
-
import { BaseTool } from '
|
|
3
|
-
import { TVShapeType } from '
|
|
2
|
+
import { BaseTool } from '../BaseTool';
|
|
3
|
+
import { TVShapeType } from '../../../types';
|
|
4
4
|
declare enum Status {
|
|
5
5
|
Idle = "idle",
|
|
6
6
|
Creating = "creating",
|
|
@@ -40,9 +40,9 @@ export declare class SelectTool extends BaseTool<Status> {
|
|
|
40
40
|
size: number[];
|
|
41
41
|
label?: string | undefined;
|
|
42
42
|
labelPoint?: number[] | undefined;
|
|
43
|
-
style: import("
|
|
44
|
-
handles?: Record<string, import("
|
|
45
|
-
effects?: Record<string, any> | import("
|
|
43
|
+
style: import("../../../types").ShapeStyles;
|
|
44
|
+
handles?: Record<string, import("../../../types").TVHandle> | undefined;
|
|
45
|
+
effects?: Record<string, any> | import("../../../types").TVEffect[] | undefined;
|
|
46
46
|
parentId: string;
|
|
47
47
|
childIndex: number;
|
|
48
48
|
name: string;
|
|
@@ -61,9 +61,9 @@ export declare class SelectTool extends BaseTool<Status> {
|
|
|
61
61
|
radius: number[];
|
|
62
62
|
label?: string | undefined;
|
|
63
63
|
labelPoint?: number[] | undefined;
|
|
64
|
-
style: import("
|
|
65
|
-
handles?: Record<string, import("
|
|
66
|
-
effects?: Record<string, any> | import("
|
|
64
|
+
style: import("../../../types").ShapeStyles;
|
|
65
|
+
handles?: Record<string, import("../../../types").TVHandle> | undefined;
|
|
66
|
+
effects?: Record<string, any> | import("../../../types").TVEffect[] | undefined;
|
|
67
67
|
parentId: string;
|
|
68
68
|
childIndex: number;
|
|
69
69
|
name: string;
|
|
@@ -82,9 +82,9 @@ export declare class SelectTool extends BaseTool<Status> {
|
|
|
82
82
|
size: number[];
|
|
83
83
|
label?: string | undefined;
|
|
84
84
|
labelPoint?: number[] | undefined;
|
|
85
|
-
style: import("
|
|
86
|
-
handles?: Record<string, import("
|
|
87
|
-
effects?: Record<string, any> | import("
|
|
85
|
+
style: import("../../../types").ShapeStyles;
|
|
86
|
+
handles?: Record<string, import("../../../types").TVHandle> | undefined;
|
|
87
|
+
effects?: Record<string, any> | import("../../../types").TVEffect[] | undefined;
|
|
88
88
|
parentId: string;
|
|
89
89
|
childIndex: number;
|
|
90
90
|
name: string;
|
|
@@ -102,10 +102,10 @@ export declare class SelectTool extends BaseTool<Status> {
|
|
|
102
102
|
type: TVShapeType.Draw;
|
|
103
103
|
points: number[][];
|
|
104
104
|
isComplete: boolean;
|
|
105
|
-
style: import("
|
|
105
|
+
style: import("../../../types").ShapeStyles;
|
|
106
106
|
label?: string | undefined;
|
|
107
|
-
handles?: Record<string, import("
|
|
108
|
-
effects?: Record<string, any> | import("
|
|
107
|
+
handles?: Record<string, import("../../../types").TVHandle> | undefined;
|
|
108
|
+
effects?: Record<string, any> | import("../../../types").TVEffect[] | undefined;
|
|
109
109
|
parentId: string;
|
|
110
110
|
childIndex: number;
|
|
111
111
|
name: string;
|
|
@@ -123,19 +123,19 @@ export declare class SelectTool extends BaseTool<Status> {
|
|
|
123
123
|
type: TVShapeType.Arrow;
|
|
124
124
|
bend: number;
|
|
125
125
|
handles: {
|
|
126
|
-
start: import("
|
|
127
|
-
bend: import("
|
|
128
|
-
end: import("
|
|
126
|
+
start: import("../../../types").TVHandle;
|
|
127
|
+
bend: import("../../../types").TVHandle;
|
|
128
|
+
end: import("../../../types").TVHandle;
|
|
129
129
|
};
|
|
130
130
|
decorations?: {
|
|
131
|
-
start?: import("
|
|
132
|
-
end?: import("
|
|
133
|
-
middle?: import("
|
|
131
|
+
start?: import("../../../types").Decoration | undefined;
|
|
132
|
+
end?: import("../../../types").Decoration | undefined;
|
|
133
|
+
middle?: import("../../../types").Decoration | undefined;
|
|
134
134
|
} | undefined;
|
|
135
135
|
label?: string | undefined;
|
|
136
136
|
labelPoint?: number[] | undefined;
|
|
137
|
-
style: import("
|
|
138
|
-
effects?: Record<string, any> | import("
|
|
137
|
+
style: import("../../../types").ShapeStyles;
|
|
138
|
+
effects?: Record<string, any> | import("../../../types").TVEffect[] | undefined;
|
|
139
139
|
parentId: string;
|
|
140
140
|
childIndex: number;
|
|
141
141
|
name: string;
|
|
@@ -153,10 +153,10 @@ export declare class SelectTool extends BaseTool<Status> {
|
|
|
153
153
|
type: TVShapeType.Text;
|
|
154
154
|
text: string;
|
|
155
155
|
size?: number[] | undefined;
|
|
156
|
-
style: import("
|
|
156
|
+
style: import("../../../types").ShapeStyles;
|
|
157
157
|
label?: string | undefined;
|
|
158
|
-
handles?: Record<string, import("
|
|
159
|
-
effects?: Record<string, any> | import("
|
|
158
|
+
handles?: Record<string, import("../../../types").TVHandle> | undefined;
|
|
159
|
+
effects?: Record<string, any> | import("../../../types").TVEffect[] | undefined;
|
|
160
160
|
parentId: string;
|
|
161
161
|
childIndex: number;
|
|
162
162
|
name: string;
|
|
@@ -174,10 +174,10 @@ export declare class SelectTool extends BaseTool<Status> {
|
|
|
174
174
|
type: TVShapeType.Group;
|
|
175
175
|
size: number[];
|
|
176
176
|
children: string[];
|
|
177
|
-
style: import("
|
|
177
|
+
style: import("../../../types").ShapeStyles;
|
|
178
178
|
label?: string | undefined;
|
|
179
|
-
handles?: Record<string, import("
|
|
180
|
-
effects?: Record<string, any> | import("
|
|
179
|
+
handles?: Record<string, import("../../../types").TVHandle> | undefined;
|
|
180
|
+
effects?: Record<string, any> | import("../../../types").TVEffect[] | undefined;
|
|
181
181
|
parentId: string;
|
|
182
182
|
childIndex: number;
|
|
183
183
|
name: string;
|
|
@@ -194,10 +194,10 @@ export declare class SelectTool extends BaseTool<Status> {
|
|
|
194
194
|
type: TVShapeType.Sticky;
|
|
195
195
|
size: number[];
|
|
196
196
|
text: string;
|
|
197
|
-
style: import("
|
|
197
|
+
style: import("../../../types").ShapeStyles;
|
|
198
198
|
label?: string | undefined;
|
|
199
|
-
handles?: Record<string, import("
|
|
200
|
-
effects?: Record<string, any> | import("
|
|
199
|
+
handles?: Record<string, import("../../../types").TVHandle> | undefined;
|
|
200
|
+
effects?: Record<string, any> | import("../../../types").TVEffect[] | undefined;
|
|
201
201
|
parentId: string;
|
|
202
202
|
childIndex: number;
|
|
203
203
|
name: string;
|
|
@@ -215,10 +215,10 @@ export declare class SelectTool extends BaseTool<Status> {
|
|
|
215
215
|
type: TVShapeType.Image;
|
|
216
216
|
size: number[];
|
|
217
217
|
assetId: string;
|
|
218
|
-
style: import("
|
|
218
|
+
style: import("../../../types").ShapeStyles;
|
|
219
219
|
label?: string | undefined;
|
|
220
|
-
handles?: Record<string, import("
|
|
221
|
-
effects?: Record<string, any> | import("
|
|
220
|
+
handles?: Record<string, import("../../../types").TVHandle> | undefined;
|
|
221
|
+
effects?: Record<string, any> | import("../../../types").TVEffect[] | undefined;
|
|
222
222
|
parentId: string;
|
|
223
223
|
childIndex: number;
|
|
224
224
|
name: string;
|
|
@@ -237,10 +237,10 @@ export declare class SelectTool extends BaseTool<Status> {
|
|
|
237
237
|
assetId: string;
|
|
238
238
|
isPlaying: boolean;
|
|
239
239
|
currentTime: number;
|
|
240
|
-
style: import("
|
|
240
|
+
style: import("../../../types").ShapeStyles;
|
|
241
241
|
label?: string | undefined;
|
|
242
|
-
handles?: Record<string, import("
|
|
243
|
-
effects?: Record<string, any> | import("
|
|
242
|
+
handles?: Record<string, import("../../../types").TVHandle> | undefined;
|
|
243
|
+
effects?: Record<string, any> | import("../../../types").TVEffect[] | undefined;
|
|
244
244
|
parentId: string;
|
|
245
245
|
childIndex: number;
|
|
246
246
|
name: string;
|
|
@@ -257,10 +257,10 @@ export declare class SelectTool extends BaseTool<Status> {
|
|
|
257
257
|
type: TVShapeType.ReactComponent;
|
|
258
258
|
size: number[];
|
|
259
259
|
componentId: string;
|
|
260
|
-
style: import("
|
|
260
|
+
style: import("../../../types").ShapeStyles;
|
|
261
261
|
label?: string | undefined;
|
|
262
|
-
handles?: Record<string, import("
|
|
263
|
-
effects?: Record<string, any> | import("
|
|
262
|
+
handles?: Record<string, import("../../../types").TVHandle> | undefined;
|
|
263
|
+
effects?: Record<string, any> | import("../../../types").TVEffect[] | undefined;
|
|
264
264
|
parentId: string;
|
|
265
265
|
childIndex: number;
|
|
266
266
|
name: string;
|
|
@@ -276,15 +276,15 @@ export declare class SelectTool extends BaseTool<Status> {
|
|
|
276
276
|
id: string;
|
|
277
277
|
point: any[] | number[];
|
|
278
278
|
type: TVShapeType.Pen;
|
|
279
|
-
segments: import("
|
|
279
|
+
segments: import("../../../types").PenSegment[];
|
|
280
280
|
isClosed: boolean;
|
|
281
281
|
isComplete: boolean;
|
|
282
282
|
previewPoint?: number[] | undefined;
|
|
283
283
|
isPlacingHandle?: boolean | undefined;
|
|
284
|
-
style: import("
|
|
284
|
+
style: import("../../../types").ShapeStyles;
|
|
285
285
|
label?: string | undefined;
|
|
286
|
-
handles?: Record<string, import("
|
|
287
|
-
effects?: Record<string, any> | import("
|
|
286
|
+
handles?: Record<string, import("../../../types").TVHandle> | undefined;
|
|
287
|
+
effects?: Record<string, any> | import("../../../types").TVEffect[] | undefined;
|
|
288
288
|
parentId: string;
|
|
289
289
|
childIndex: number;
|
|
290
290
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TLPointerEventHandler } from 'telva-core';
|
|
2
|
-
import { BaseTool } from '
|
|
3
|
-
import { TVShapeType } from '
|
|
2
|
+
import { BaseTool } from '../BaseTool';
|
|
3
|
+
import { TVShapeType } from '../../../types';
|
|
4
4
|
export declare class StickyTool extends BaseTool {
|
|
5
5
|
type: TVShapeType.Sticky;
|
|
6
6
|
shapeId?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TLKeyboardEventHandler, TLPointerEventHandler } from 'telva-core';
|
|
2
|
-
import { BaseTool } from '
|
|
3
|
-
import { TVShapeType } from '
|
|
2
|
+
import { BaseTool } from '../BaseTool';
|
|
3
|
+
import { TVShapeType } from '../../../types';
|
|
4
4
|
export declare class TextTool extends BaseTool {
|
|
5
5
|
type: TVShapeType.Text;
|
|
6
6
|
stopEditingShape: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLPointerEventHandler } from 'telva-core';
|
|
2
|
-
import { BaseTool } from '
|
|
3
|
-
import { TVShapeType } from '
|
|
2
|
+
import { BaseTool } from '../BaseTool';
|
|
3
|
+
import { TVShapeType } from '../../../types';
|
|
4
4
|
export declare class TriangleTool extends BaseTool {
|
|
5
5
|
type: TVShapeType.Triangle;
|
|
6
6
|
onPointerDown: TLPointerEventHandler;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TLAsset, TLBinding, TLBoundsCorner, TLBoundsEdge, TLBoundsEventHandler, TLBoundsHandleEventHandler, TLCanvasEventHandler, TLHandle, TLKeyboardEventHandler, TLPage, TLPageState, TLPinchEventHandler, TLPointerEventHandler, TLShape, TLShapeBlurHandler, TLShapeCloneHandler, TLSnapLine, TLUser, TLWheelEventHandler } from 'telva-core';
|
|
2
|
-
import { TVLanguage } from '
|
|
2
|
+
import { TVLanguage } from './translations';
|
|
3
3
|
export declare class TVEventHandler {
|
|
4
4
|
onPinchStart?: TLPinchEventHandler;
|
|
5
5
|
onPinchEnd?: TLPinchEventHandler;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "telva",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "A little drawing app (editor)",
|
|
5
5
|
"author": "@vmaspad",
|
|
6
6
|
"repository": {
|
|
@@ -50,17 +50,18 @@
|
|
|
50
50
|
"@radix-ui/react-popover": "^1.0.0",
|
|
51
51
|
"@radix-ui/react-tooltip": "^1.0.0",
|
|
52
52
|
"@stitches/react": "^1.2.8",
|
|
53
|
-
"telva-core": "^1.1.0",
|
|
54
|
-
"telva-intersect": "^1.1.0",
|
|
55
|
-
"telva-vec": "^1.1.0",
|
|
56
53
|
"atlas-fonts": "^1.2.1",
|
|
57
54
|
"browser-fs-access": "^0.31.0",
|
|
58
55
|
"html2canvas": "^1.4.1",
|
|
56
|
+
"html2canvas-pro": "^2.0.2",
|
|
59
57
|
"idb-keyval": "^6.2.0",
|
|
60
58
|
"perfect-freehand": "^1.2.0",
|
|
61
59
|
"react-error-boundary": "^3.1.4",
|
|
62
60
|
"react-hotkeys-hook": "^3.4.7",
|
|
63
61
|
"react-intl": "^6.1.1",
|
|
62
|
+
"telva-core": "^1.1.0",
|
|
63
|
+
"telva-intersect": "^1.1.0",
|
|
64
|
+
"telva-vec": "^1.1.0",
|
|
64
65
|
"tslib": "^2.4.0",
|
|
65
66
|
"zustand": "^4.1.1"
|
|
66
67
|
},
|