@plait/common 0.54.0 → 0.55.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/common",
3
- "version": "0.54.0",
3
+ "version": "0.55.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.4",
6
6
  "@angular/core": "^17.2.4",
package/public-api.d.ts CHANGED
@@ -7,4 +7,4 @@ export * from './utils';
7
7
  export * from './core/plugin-element';
8
8
  export * from './core/image-base.component';
9
9
  export * from './algorithms';
10
- export * from './types/resize';
10
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from './resize';
2
+ export * from './rotate';
@@ -0,0 +1,6 @@
1
+ import { PlaitElement, Point } from '@plait/core';
2
+ export interface RotateRef<T extends PlaitElement = PlaitElement> {
3
+ elements: T[];
4
+ startPoint: Point;
5
+ angle?: number;
6
+ }
@@ -1 +1,2 @@
1
1
  export * from './resize-handle';
2
+ export * from './rotate-handle';
@@ -0,0 +1,2 @@
1
+ import { PlaitBoard, RectangleClient } from '@plait/core';
2
+ export declare const drawRotateHandle: (board: PlaitBoard, rectangle: RectangleClient) => SVGGElement;
package/utils/index.d.ts CHANGED
@@ -11,3 +11,4 @@ export * from './memorize';
11
11
  export * from './vector';
12
12
  export * from './math';
13
13
  export * from './drawing';
14
+ export * from './rotate';
@@ -0,0 +1,6 @@
1
+ import { PlaitBoard } from '@plait/core';
2
+ import { RotateRef } from '../types';
3
+ export declare const IS_ROTATING: WeakMap<PlaitBoard, RotateRef<import("@plait/core").PlaitElement>>;
4
+ export declare const isRotating: (board: PlaitBoard) => boolean;
5
+ export declare const addRotating: (board: PlaitBoard, rotateRef: RotateRef) => void;
6
+ export declare const removeRotating: (board: PlaitBoard) => void;