telva 1.1.3 → 1.1.5

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.
Files changed (113) hide show
  1. package/dist/Telva.d.ts +3 -3
  2. package/dist/components/ContextMenu/ContextMenu.d.ts +1 -1
  3. package/dist/components/Primitives/DropdownMenu/DMCheckboxItem.d.ts +1 -1
  4. package/dist/components/Primitives/DropdownMenu/DMItem.d.ts +1 -1
  5. package/dist/components/Primitives/DropdownMenu/DMTriggerIcon.d.ts +1 -1
  6. package/dist/components/ToolsPanel/ShapesMenu.d.ts +1 -1
  7. package/dist/components/TopPanel/PageMenu/PageMenu.d.ts +1 -1
  8. package/dist/components/TopPanel/PageOptionsDialog/PageOptionsDialog.d.ts +1 -1
  9. package/dist/constants.d.ts +1 -1
  10. package/dist/hooks/useFileSystem.d.ts +1 -1
  11. package/dist/hooks/useTelvaApp.d.ts +1 -1
  12. package/dist/hooks/useTheme.d.ts +1 -1
  13. package/dist/hooks/useTranslation.d.ts +2 -2
  14. package/dist/index.js +2 -2
  15. package/dist/index.js.map +3 -3
  16. package/dist/index.mjs +18 -30283
  17. package/dist/index.mjs.map +3 -3
  18. package/dist/state/StateManager/StateManager.d.ts +1 -1
  19. package/dist/state/TVDR.d.ts +1 -1
  20. package/dist/state/TelvaApp.d.ts +7 -7
  21. package/dist/state/commands/alignShapes/alignShapes.d.ts +2 -2
  22. package/dist/state/commands/changePage/changePage.d.ts +2 -2
  23. package/dist/state/commands/createPage/createPage.d.ts +2 -2
  24. package/dist/state/commands/createShapes/createShapes.d.ts +2 -2
  25. package/dist/state/commands/deletePage/deletePage.d.ts +2 -2
  26. package/dist/state/commands/deleteShapes/deleteShapes.d.ts +2 -2
  27. package/dist/state/commands/distributeShapes/distributeShapes.d.ts +2 -2
  28. package/dist/state/commands/duplicatePage/duplicatePage.d.ts +2 -2
  29. package/dist/state/commands/duplicateShapes/duplicateShapes.d.ts +2 -2
  30. package/dist/state/commands/flipShapes/flipShapes.d.ts +3 -3
  31. package/dist/state/commands/groupShapes/groupShapes.d.ts +2 -2
  32. package/dist/state/commands/insertContent/insertContent.d.ts +2 -2
  33. package/dist/state/commands/movePage/movePage.d.ts +2 -2
  34. package/dist/state/commands/moveShapesToPage/moveShapesToPage.d.ts +2 -2
  35. package/dist/state/commands/renamePage/renamePage.d.ts +2 -2
  36. package/dist/state/commands/reorderShapes/reorderShapes.d.ts +2 -2
  37. package/dist/state/commands/resetBounds/resetBounds.d.ts +2 -2
  38. package/dist/state/commands/rotateShapes/rotateShapes.d.ts +2 -2
  39. package/dist/state/commands/setShapesProps/setShapesProps.d.ts +2 -2
  40. package/dist/state/commands/shared/removeShapesFromPage.d.ts +1 -1
  41. package/dist/state/commands/stretchShapes/stretchShapes.d.ts +3 -3
  42. package/dist/state/commands/styleShapes/styleShapes.d.ts +2 -2
  43. package/dist/state/commands/toggleShapesDecoration/toggleShapesDecoration.d.ts +2 -2
  44. package/dist/state/commands/toggleShapesProp/toggleShapesProp.d.ts +2 -2
  45. package/dist/state/commands/translateShapes/translateShapes.d.ts +2 -2
  46. package/dist/state/commands/ungroupShapes/ungroupShapes.d.ts +3 -3
  47. package/dist/state/commands/updateShapes/updateShapes.d.ts +2 -2
  48. package/dist/state/data/filesystem.d.ts +1 -1
  49. package/dist/state/data/migrate.d.ts +1 -1
  50. package/dist/state/sessions/ArrowSession/ArrowSession.d.ts +3 -3
  51. package/dist/state/sessions/BaseSession.d.ts +2 -2
  52. package/dist/state/sessions/BrushSession/BrushSession.d.ts +3 -3
  53. package/dist/state/sessions/DrawSession/DrawSession.d.ts +3 -3
  54. package/dist/state/sessions/EditSession/EditSession.d.ts +3 -3
  55. package/dist/state/sessions/EraseSession/EraseSession.d.ts +4 -4
  56. package/dist/state/sessions/GridSession/GridSession.d.ts +3 -3
  57. package/dist/state/sessions/HandleSession/HandleSession.d.ts +3 -3
  58. package/dist/state/sessions/RotateSession/RotateSession.d.ts +3 -3
  59. package/dist/state/sessions/TransformSession/TransformSession.d.ts +3 -3
  60. package/dist/state/sessions/TransformSingleSession/TransformSingleSession.d.ts +3 -3
  61. package/dist/state/sessions/TranslateLabelSession/TranslateLabelSession.d.ts +3 -3
  62. package/dist/state/sessions/TranslateSession/TranslateSession.d.ts +3 -3
  63. package/dist/state/sessions/index.d.ts +1 -1
  64. package/dist/state/shapes/ArrowUtil/ArrowUtil.d.ts +2 -2
  65. package/dist/state/shapes/ArrowUtil/arrowHelpers.d.ts +1 -1
  66. package/dist/state/shapes/ArrowUtil/components/CurvedArrow.tsx.d.ts +1 -1
  67. package/dist/state/shapes/ArrowUtil/components/StraightArrow.d.ts +1 -1
  68. package/dist/state/shapes/DrawUtil/DrawUtil.d.ts +2 -2
  69. package/dist/state/shapes/DrawUtil/drawHelpers.d.ts +1 -1
  70. package/dist/state/shapes/EllipseUtil/EllipseUtil.d.ts +2 -2
  71. package/dist/state/shapes/EllipseUtil/components/DashedEllipse.d.ts +1 -1
  72. package/dist/state/shapes/EllipseUtil/components/DrawEllipse.d.ts +1 -1
  73. package/dist/state/shapes/EllipseUtil/ellipseHelpers.d.ts +1 -1
  74. package/dist/state/shapes/GroupUtil/GroupUtil.d.ts +2 -2
  75. package/dist/state/shapes/ImageUtil/ImageUtil.d.ts +3 -3
  76. package/dist/state/shapes/PenUtil/PenUtil.d.ts +2 -2
  77. package/dist/state/shapes/PenUtil/penHelpers.d.ts +1 -1
  78. package/dist/state/shapes/ReactComponentUtil/ReactComponentUtil.d.ts +4 -4
  79. package/dist/state/shapes/ReactComponentUtil/ReactComponentUtil.d.ts.map +1 -1
  80. package/dist/state/shapes/RectangleUtil/RectangleUtil.d.ts +3 -3
  81. package/dist/state/shapes/RectangleUtil/components/DashedRectangle.d.ts +1 -1
  82. package/dist/state/shapes/RectangleUtil/components/DrawRectangle.d.ts +1 -1
  83. package/dist/state/shapes/RectangleUtil/rectangleHelpers.d.ts +1 -1
  84. package/dist/state/shapes/StickyUtil/StickyUtil.d.ts +2 -2
  85. package/dist/state/shapes/TVShapeUtil.d.ts +1 -1
  86. package/dist/state/shapes/TextUtil/TextUtil.d.ts +8 -8
  87. package/dist/state/shapes/TriangleUtil/TriangleUtil.d.ts +3 -3
  88. package/dist/state/shapes/TriangleUtil/components/DashedTriangle.d.ts +1 -1
  89. package/dist/state/shapes/TriangleUtil/components/DrawTriangle.d.ts +1 -1
  90. package/dist/state/shapes/TriangleUtil/triangleHelpers.d.ts +1 -1
  91. package/dist/state/shapes/VideoUtil/VideoUtil.d.ts +3 -3
  92. package/dist/state/shapes/index.d.ts +2 -2
  93. package/dist/state/shapes/shared/TextLabel.d.ts +1 -1
  94. package/dist/state/shapes/shared/getTextAlign.d.ts +1 -1
  95. package/dist/state/shapes/shared/getTextSvgElement.d.ts +1 -1
  96. package/dist/state/shapes/shared/gradient-fill.d.ts +1 -1
  97. package/dist/state/shapes/shared/shape-styles.d.ts +1 -1
  98. package/dist/state/tools/ArrowTool/ArrowTool.d.ts +2 -2
  99. package/dist/state/tools/BaseTool.d.ts +2 -2
  100. package/dist/state/tools/DrawTool/DrawTool.d.ts +2 -2
  101. package/dist/state/tools/EllipseTool/EllipseTool.d.ts +2 -2
  102. package/dist/state/tools/EraseTool/EraseTool.d.ts +1 -1
  103. package/dist/state/tools/LineTool/LineTool.d.ts +2 -2
  104. package/dist/state/tools/PenEditTool.d.ts +2 -2
  105. package/dist/state/tools/PenTool/PenTool.d.ts +2 -2
  106. package/dist/state/tools/RectangleTool/RectangleTool.d.ts +2 -2
  107. package/dist/state/tools/SelectTool/SelectTool.d.ts +44 -44
  108. package/dist/state/tools/StickyTool/StickyTool.d.ts +2 -2
  109. package/dist/state/tools/TextTool/TextTool.d.ts +2 -2
  110. package/dist/state/tools/TriangleTool/TriangleTool.d.ts +2 -2
  111. package/dist/state/tools/index.d.ts +1 -1
  112. package/dist/types.d.ts +1 -1
  113. 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 '~types';
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.
@@ -1,5 +1,5 @@
1
1
  import { TLBounds, TLPageState, TLTransformInfo } from 'telva-core';
2
- import { ArrowShape, ShapesWithProp, TVBinding, TVExportType, TVPage, TVShape, TVSnapshot, TelvaCommand } from '~types';
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>;
@@ -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 '~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';
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("~types").ArrowBinding>;
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("~types").TVDockPosition;
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("~types").ArrowBinding[];
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("~types").ExceptFirst<ConstructorParameters<import("./sessions").SessionOfType<T>>>) => this;
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("~types").ImageShape | import("~types").VideoShape;
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 '~state/TelvaApp';
2
- import { AlignType, TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TelvaCommand } from '~types';
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 '~state';
2
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TVBinding, TVShape, TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import { DistributeType, TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import { FlipType } from '~types';
3
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TVAsset, TVBinding, TVShape, TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
3
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import { MoveType, TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TelvaCommand } from '~types';
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 '~state';
2
- import type { TVShape, TelvaCommand } from '~types';
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,4 +1,4 @@
1
- import type { PagePartial, TVSnapshot } from '~types';
1
+ import type { PagePartial, TVSnapshot } from '../../../types';
2
2
  export declare function removeShapesFromPage(data: TVSnapshot, ids: string[], pageId: string): {
3
3
  before: PagePartial;
4
4
  after: PagePartial;
@@ -1,5 +1,5 @@
1
- import type { TelvaApp } from '~state/TelvaApp';
2
- import { StretchType } from '~types';
3
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import { ShapeStyles, TelvaCommand } from '~types';
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 '~state/internal';
2
- import type { TelvaCommand } from '~types';
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 '~state';
2
- import type { TVShape, TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { GroupShape } from '~types';
3
- import type { TelvaCommand } from '~types';
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 '~state/TelvaApp';
2
- import type { TVShape, TelvaCommand } from '~types';
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,4 +1,4 @@
1
- import type { TVDocument } from '~types';
1
+ import type { TVDocument } from '../../types';
2
2
  export declare function loadFileHandle(): Promise<any>;
3
3
  export declare function saveFileHandle(fileHandle: FileSystemFileHandle | null): Promise<void>;
4
4
  /**
@@ -1,3 +1,3 @@
1
- import { TVSnapshot } from '~types';
1
+ import { TVSnapshot } from '../../types';
2
2
  export declare function migrate(state: TVSnapshot, newVersion: number): TVSnapshot;
3
3
  //# sourceMappingURL=migrate.d.ts.map
@@ -1,6 +1,6 @@
1
- import type { TelvaApp } from '~state/TelvaApp';
2
- import { BaseSession } from '~state/sessions/BaseSession';
3
- import { ArrowShape, SessionType, TVBinding, TVStatus, TelvaCommand, TelvaPatch } from '~types';
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 '~state/TelvaApp';
3
- import type { SessionType, TelvaCommand, TelvaPatch } from '~types';
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 '~state/TelvaApp';
3
- import { BaseSession } from '~state/sessions/BaseSession';
4
- import { SessionType, TVStatus, TelvaCommand, TelvaPatch } from '~types';
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 '~state/TelvaApp';
2
- import { BaseSession } from '~state/sessions/BaseSession';
3
- import { DrawShape, SessionType, TVStatus, TelvaCommand, TelvaPatch } from '~types';
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 '~state/TelvaApp';
2
- import { BaseSession } from '~state/sessions/BaseSession';
3
- import { SessionType, TVShape, TelvaCommand, TelvaPatch } from '~types';
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 '~state/TelvaApp';
2
- import { BaseSession } from '~state/sessions/BaseSession';
3
- import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '~types';
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("~types").ArrowBinding>;
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 '~state/TelvaApp';
3
- import { BaseSession } from '~state/sessions/BaseSession';
4
- import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '~types';
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 '~state/TelvaApp';
2
- import { BaseSession } from '~state/sessions/BaseSession';
3
- import { SessionType, ShapesWithProp, TVStatus, TelvaCommand, TelvaPatch } from '~types';
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 '~state/TelvaApp';
2
- import { BaseSession } from '~state/sessions/BaseSession';
3
- import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '~types';
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 '~state/TelvaApp';
4
- import { BaseSession } from '~state/sessions/BaseSession';
5
- import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '~types';
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 '~state/TelvaApp';
3
- import { BaseSession } from '~state/sessions/BaseSession';
4
- import { SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '~types';
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 '~state/TelvaApp';
3
- import { BaseSession } from '~state/sessions/BaseSession';
4
- import { ArrowShape, EllipseShape, RectangleShape, SessionType, TVStatus, TelvaCommand, TelvaPatch, TriangleShape } from '~types';
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 '~state/TelvaApp';
3
- import { BaseSession } from '~state/sessions/BaseSession';
4
- import { ArrowBinding, SessionType, TVShape, TVStatus, TelvaCommand, TelvaPatch } from '~types';
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,4 +1,4 @@
1
- import { ExceptFirst, SessionType } from '~types';
1
+ import { ExceptFirst, SessionType } from '../../types';
2
2
  import { ArrowSession } from './ArrowSession';
3
3
  import { BrushSession } from './BrushSession';
4
4
  import { DrawSession } from './DrawSession';
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { TLBounds } from 'telva-core';
3
- import { TVShapeUtil } from '~state/shapes/TVShapeUtil';
4
- import { ArrowShape, TVShapeType, TransformInfo } from '~types';
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 '~types';
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,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { Decoration, ShapeStyles } from '~types';
2
+ import type { Decoration, ShapeStyles } from '../../../../types';
3
3
  interface ArrowSvgProps {
4
4
  id: string;
5
5
  style: ShapeStyles;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { Decoration, ShapeStyles } from '~types';
2
+ import type { Decoration, ShapeStyles } from '../../../../types';
3
3
  interface ArrowSvgProps {
4
4
  id: string;
5
5
  style: ShapeStyles;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { TLBounds } from 'telva-core';
3
- import { TVShapeUtil } from '~state/shapes/TVShapeUtil';
4
- import { DrawShape, TVShapeType, TransformInfo } from '~types';
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 '~types';
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 '~state/shapes/TVShapeUtil';
4
- import { EllipseShape, TVMeta, TVShape, TVShapeType, TransformInfo } from '~types';
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,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { ShapeStyles } from '~types';
2
+ import type { ShapeStyles } from '../../../../types';
3
3
  interface EllipseSvgProps {
4
4
  id: string;
5
5
  radius: number[];
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { ShapeStyles } from '~types';
2
+ import type { ShapeStyles } from '../../../../types';
3
3
  interface EllipseSvgProps {
4
4
  id: string;
5
5
  radius: number[];
@@ -1,4 +1,4 @@
1
- import type { ShapeStyles } from '~types';
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 '~state/shapes/TVShapeUtil';
3
- import { GroupShape, TVShapeType } from '~types';
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 '~state/shapes/TVShapeUtil';
3
- import { transformRectangle, transformSingleRectangle } from '~state/shapes/shared';
4
- import { ImageShape, TVShapeType } from '~types';
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> {