@plait/common 0.62.0-next.0 → 0.62.0-next.2
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/esm2022/image/image-base.component.mjs +3 -1
- package/esm2022/image/image.generator.mjs +4 -1
- package/esm2022/utils/text.mjs +1 -1
- package/fesm2022/plait-common.mjs +5 -1
- package/fesm2022/plait-common.mjs.map +1 -1
- package/image/image.generator.d.ts +2 -0
- package/package.json +1 -1
- package/utils/text.d.ts +13 -6
|
@@ -3,6 +3,8 @@ import { Generator, GeneratorExtraData, GeneratorOptions } from '../generators/g
|
|
|
3
3
|
import { CommonImageItem } from '../utils';
|
|
4
4
|
import { ActiveGenerator } from '../generators/active.generator';
|
|
5
5
|
import { ImageComponentRef } from './with-image';
|
|
6
|
+
export declare const FOREIGN_OBJECT_IMAGE_CLASS_NAME = "foreign-object-image";
|
|
7
|
+
export declare const IMAGE_CONTAINER_CLASS_NAME = "plait-image-container";
|
|
6
8
|
export interface ImageGeneratorOptions<T> {
|
|
7
9
|
getRectangle: (element: T) => RectangleClient;
|
|
8
10
|
getImageItem: (element: T) => CommonImageItem;
|
package/package.json
CHANGED
package/utils/text.d.ts
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { PlaitBoard, PlaitElement } from '@plait/core';
|
|
2
|
-
import { Element } from 'slate';
|
|
2
|
+
import { Editor, Element } from 'slate';
|
|
3
3
|
import { TextManage } from '../text/text-manage';
|
|
4
4
|
import { Alignment, CustomText } from '../text/types';
|
|
5
|
+
export interface TextInterface {
|
|
6
|
+
getTextEditors: (board: PlaitBoard, elements?: PlaitElement[]) => Editor[] | undefined;
|
|
7
|
+
findFirstTextEditor: (board: PlaitBoard) => null;
|
|
8
|
+
getFirstTextEditor: (element: PlaitElement) => Editor;
|
|
9
|
+
getTextEditorsByElement: (element: PlaitElement) => Editor[];
|
|
10
|
+
getEditingTextEditor: (board: PlaitBoard, elements?: PlaitElement[]) => Editor | undefined;
|
|
11
|
+
}
|
|
5
12
|
export declare const getTextManages: (element: PlaitElement) => TextManage[];
|
|
6
13
|
export declare const getFirstTextManage: (element: PlaitElement) => TextManage;
|
|
7
|
-
export declare const getTextEditorsByElement:
|
|
8
|
-
export declare const getFirstTextEditor:
|
|
9
|
-
export declare const findFirstTextEditor:
|
|
14
|
+
export declare const getTextEditorsByElement: TextInterface['getTextEditorsByElement'];
|
|
15
|
+
export declare const getFirstTextEditor: TextInterface['getFirstTextEditor'];
|
|
16
|
+
export declare const findFirstTextEditor: TextInterface['findFirstTextEditor'];
|
|
10
17
|
export declare const getElementsText: (elements: PlaitElement[]) => string;
|
|
11
|
-
export declare const getTextEditors:
|
|
12
|
-
export declare const getEditingTextEditor:
|
|
18
|
+
export declare const getTextEditors: TextInterface['getTextEditors'];
|
|
19
|
+
export declare const getEditingTextEditor: TextInterface['getEditingTextEditor'];
|
|
13
20
|
export declare const buildText: (text: string | Element, align?: Alignment, properties?: Partial<CustomText>) => import("slate").BaseElement;
|
|
14
21
|
export declare const getLineHeightByFontSize: (fontSize: number) => number;
|
|
15
22
|
export declare const ELEMENT_TO_TEXT_MANAGES: WeakMap<PlaitElement, TextManage[]>;
|