@plait/common 0.55.1 → 0.56.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.
@@ -13,6 +13,7 @@ export interface ImageGeneratorOptions<T> {
13
13
  export declare class ImageGenerator<T extends PlaitElement = PlaitElement> extends Generator<T, ViewContainerRef, ImageGeneratorOptions<T> & GeneratorOptions> {
14
14
  board: PlaitBoard;
15
15
  options: ImageGeneratorOptions<T>;
16
+ static key: string;
16
17
  foreignObject: SVGForeignObjectElement;
17
18
  componentRef: ComponentRef<ImageBaseComponent>;
18
19
  constructor(board: PlaitBoard, options: ImageGeneratorOptions<T>);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/common",
3
- "version": "0.55.1",
3
+ "version": "0.56.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.4",
6
6
  "@angular/core": "^17.2.4",
package/public-api.d.ts CHANGED
@@ -6,5 +6,6 @@ export * from './plugins';
6
6
  export * from './utils';
7
7
  export * from './core/plugin-element';
8
8
  export * from './core/image-base.component';
9
+ export * from './core/element-ref';
9
10
  export * from './algorithms';
10
11
  export * from './types';
package/utils/resize.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { PlaitBoard, Point, RectangleClient, ResizeCursorClass } from '@plait/core';
1
+ import { PlaitBoard, Point, RectangleClient, ResizeCursorClass, PlaitElement } from '@plait/core';
2
2
  import { ResizeHandle } from '../constants/resize';
3
3
  import { PlaitElementOrArray, ResizeRef } from '../types/resize';
4
4
  export declare const getResizeHandleByIndex: (index: number) => ResizeHandle;
@@ -24,3 +24,4 @@ export declare const removeResizing: (board: PlaitBoard, key: string) => void;
24
24
  export declare const isEdgeHandle: (board: PlaitBoard, handle: ResizeHandle) => boolean;
25
25
  export declare const isCornerHandle: (board: PlaitBoard, handle: ResizeHandle) => boolean;
26
26
  export declare const resetPointsAfterResize: (originRectangle: RectangleClient, currentRectangle: RectangleClient, originSelectionCenterPoint: Point, currentSelectionCenterPoint: Point, angle: number) => [Point, Point];
27
+ export declare const canResize: (board: PlaitBoard, element: PlaitElement) => boolean;
package/utils/text.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { PlaitElement } from '@plait/core';
2
- import { CustomText } from '@plait/text';
3
- export declare const getTextManages: (element: PlaitElement) => import("@plait/text").TextManage[];
4
- export declare const getFirstTextManage: (element: PlaitElement) => import("@plait/text").TextManage;
2
+ import { CustomText, TextManage } from '@plait/text';
3
+ export declare const getTextManages: (element: PlaitElement) => TextManage[];
4
+ export declare const getFirstTextManage: (element: PlaitElement) => TextManage;
5
5
  export declare const getTextEditors: (element: PlaitElement) => (import("slate").BaseEditor & import("slate-angular").AngularEditor & import("slate-history").HistoryEditor)[];
6
6
  export declare const getFirstTextEditor: (element: PlaitElement) => import("slate").BaseEditor & import("slate-angular").AngularEditor & import("slate-history").HistoryEditor;
7
7
  export declare const getTextMarksByElement: (element: PlaitElement) => Omit<CustomText, "text">;
8
8
  export declare const getElementsText: (elements: PlaitElement[]) => string;
9
+ export declare const ELEMENT_TO_TEXT_MANAGES: WeakMap<PlaitElement, TextManage[]>;