@plait/core 0.0.49 → 0.0.52

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.
@@ -1,5 +1,6 @@
1
1
  export declare type CursorStatus = BaseCursorStatus | string;
2
2
  export declare enum BaseCursorStatus {
3
3
  'move' = "move",
4
- 'select' = "select"
4
+ 'select' = "select",
5
+ 'drag' = "drag"
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/core",
3
- "version": "0.0.49",
3
+ "version": "0.0.52",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0"
@@ -12,6 +12,10 @@
12
12
  height: 100%;
13
13
  }
14
14
 
15
+ svg {
16
+ transform: matrix(1, 0, 0, 1, 0, 0);
17
+ }
18
+
15
19
  // https://stackoverflow.com/questions/51313873/svg-foreignobject-not-working-properly-on-safari
16
20
  .plait-richtext-container {
17
21
  position: initial;
package/utils/board.d.ts CHANGED
@@ -9,12 +9,6 @@ export declare type ViewBox = {
9
9
  };
10
10
  export declare function transformPoints(board: PlaitBoard, points: Point[]): Point[];
11
11
  export declare function transformPoint(board: PlaitBoard, point: Point): Point;
12
- export declare function getViewBox(board: PlaitBoard): ViewBox;
13
- export declare function getViewportClientBox(board: PlaitBoard): {
14
- width: number;
15
- height: number;
16
- };
17
- export declare function calculateBBox(board: PlaitBoard): any;
18
12
  export declare function calculateZoom(zoom: number, minZoom?: number, maxZoom?: number): number;
19
13
  export declare function isNoSelectionElement(e: Event): Element | null;
20
14
  export declare const updateCursorStatus: (board: PlaitBoard, cursor: BaseCursorStatus) => void;
package/utils/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
+ export * from './board';
1
2
  export * from './dom';
2
3
  export * from './environment';
3
4
  export * from './graph';
5
+ export * from './helper';
6
+ export * from './history';
4
7
  export * from './hotkeys';
5
8
  export * from './id-creator';
6
- export * from './weak-maps';
7
- export * from './helper';
8
9
  export * from './math';
9
- export * from './board';
10
- export * from './history';
10
+ export * from './matrix';
11
+ export * from './weak-maps';
@@ -0,0 +1,16 @@
1
+ import { PlaitBoard } from '../interfaces';
2
+ import { ViewBox } from './board';
3
+ export declare function invert(oldMatrix: number[], newMatrix: number[]): number[] | null;
4
+ export declare function transformMat3(e: number[], t: number[], n: number[]): number[];
5
+ export declare function getViewportClientBox(board: PlaitBoard): {
6
+ width: number;
7
+ height: number;
8
+ x: number;
9
+ y: number;
10
+ };
11
+ export declare function calculateBBox(board: PlaitBoard): any;
12
+ export declare function getViewBox(board: PlaitBoard): ViewBox;
13
+ export declare function isOutExtent(board: PlaitBoard, node: DOMRect, gap: number): {
14
+ x: number;
15
+ y: number;
16
+ };