@plait/draw 0.64.7 → 0.64.9

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.
@@ -12,10 +12,14 @@ export interface TextGeneratorOptions<T> {
12
12
  getRenderRectangle?: (element: T, text: PlaitDrawShapeText) => RectangleClient;
13
13
  getMaxWidth?: () => number;
14
14
  }
15
- export declare const KEY_TO_TEXT_MANAGE: Map<string, TextManage>;
16
- export declare const setTextManage: (key: string, textManage: TextManage) => Map<string, TextManage>;
17
- export declare const getTextManage: (key: string) => TextManage | undefined;
18
- export declare const deleteTextManage: (key: string) => boolean;
15
+ export declare const KEY_TO_TEXT_MANAGE: WeakMap<PlaitBoard, {
16
+ [key: string]: TextManage;
17
+ }>;
18
+ export declare const setTextManage: (board: PlaitBoard, key: string, textManage: TextManage) => WeakMap<PlaitBoard, {
19
+ [key: string]: TextManage;
20
+ }>;
21
+ export declare const getTextManage: (board: PlaitBoard, key: string) => TextManage;
22
+ export declare const deleteTextManage: (board: PlaitBoard, key: string) => void;
19
23
  export declare class TextGenerator<T extends PlaitElement = PlaitGeometry> {
20
24
  protected board: PlaitBoard;
21
25
  protected element: T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/draw",
3
- "version": "0.64.7",
3
+ "version": "0.64.9",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"
package/utils/hit.d.ts CHANGED
@@ -10,7 +10,7 @@ export declare const isHitElementText: (element: PlaitCommonGeometry, point: Poi
10
10
  export declare const isRectangleHitDrawElement: (board: PlaitBoard, element: PlaitElement, selection: Selection) => boolean | null;
11
11
  export declare const getDrawHitElement: (board: PlaitBoard, elements: PlaitDrawElement[]) => PlaitElement;
12
12
  export declare const getFirstFilledDrawElement: (board: PlaitBoard, elements: PlaitDrawElement[]) => PlaitGeometry | null;
13
- export declare const getFirstTextOrLineElement: (elements: PlaitDrawElement[]) => PlaitGeometry | import("../interfaces").PlaitBaseTable | import("../interfaces/image").PlaitImage | PlaitArrowLine | PlaitVectorLine | null;
13
+ export declare const getFirstTextOrLineElement: (elements: PlaitDrawElement[]) => PlaitGeometry | import("../interfaces").PlaitBaseTable | PlaitArrowLine | PlaitVectorLine | import("../interfaces/image").PlaitImage | null;
14
14
  export declare const isHitDrawElement: (board: PlaitBoard, element: PlaitElement, point: Point) => boolean | null;
15
15
  export declare const isHitEdgeOfShape: (board: PlaitBoard, element: PlaitShapeElement, point: Point, hitDistanceBuffer: number) => boolean;
16
16
  export declare const isInsideOfShape: (board: PlaitBoard, element: PlaitShapeElement, point: Point, hitDistanceBuffer: number) => boolean;
package/utils/table.d.ts CHANGED
@@ -4,8 +4,8 @@ import { BaseEditor } from 'slate';
4
4
  export declare function getCellsWithPoints(board: PlaitBoard, element: PlaitBaseTable): PlaitTableCellWithPoints[];
5
5
  export declare function getCellWithPoints(board: PlaitBoard, table: PlaitBaseTable, cellId: string): PlaitTableCellWithPoints;
6
6
  export declare function getHitCell(board: PlaitTableBoard, element: PlaitBaseTable, point: Point): PlaitTableCell | null | undefined;
7
- export declare function editCell(cell: PlaitTableCell): void;
8
- export declare function getTextManageByCell(cell: PlaitTableCell): import("@plait/common").TextManage | undefined;
7
+ export declare function editCell(board: PlaitBoard, cell: PlaitTableCell): void;
8
+ export declare function getTextManageByCell(board: PlaitBoard, cell: PlaitTableCell): import("@plait/common").TextManage;
9
9
  export declare const updateColumns: (table: PlaitBaseTable, columnId: string, width: number, offset: number) => {
10
10
  columns: {
11
11
  id: string;