@univerjs-pro/shape-editor-ui 1.3.1 → 1.5.0
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/README.md +7 -21
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/index.css +148 -92
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/utils/shape-transformer-config.d.ts +2 -2
- package/lib/types/views/mobile-shape-editor/MobileShapeActionPanel.d.ts +1 -0
- package/lib/types/views/shape-text-editor/ShapeTextPositionWrapper.d.ts +1 -1
- package/lib/types/views/shape-text-editor/types.d.ts +7 -2
- package/lib/types/views/smart-art/SmartArtLayoutGallery.d.ts +3 -3
- package/lib/types/views/smart-art/SmartArtQuickStyleGallery.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +25 -25
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
* Per-object transformer settings still take precedence for special cases such as connectors.
|
|
4
4
|
*/
|
|
5
5
|
export declare const SHAPE_EDITOR_TRANSFORMER_CONFIG: {
|
|
6
|
-
readonly keepRatio: false;
|
|
7
|
-
readonly moveBoundaryEnabled: false;
|
|
8
6
|
readonly moveEnabled: true;
|
|
9
7
|
readonly resizeEnabled: true;
|
|
10
8
|
readonly rotateEnabled: true;
|
|
@@ -29,4 +27,6 @@ export declare const SHAPE_EDITOR_TRANSFORMER_CONFIG: {
|
|
|
29
27
|
readonly anchorSize: number;
|
|
30
28
|
readonly anchorCornerRadius: number;
|
|
31
29
|
readonly anchorStyle: "canva";
|
|
30
|
+
readonly keepRatio: false;
|
|
31
|
+
readonly moveBoundaryEnabled: false;
|
|
32
32
|
};
|
|
@@ -8,6 +8,7 @@ export declare function MobileShapeTextEditor(props: {
|
|
|
8
8
|
backgroundColor?: string;
|
|
9
9
|
onCancel: () => void;
|
|
10
10
|
onConfirm: (documentData: IDocumentData) => void;
|
|
11
|
+
onDocumentChange?: (documentData: IDocumentData) => void;
|
|
11
12
|
}): import("react").JSX.Element;
|
|
12
13
|
export declare function MobileShapeStyleDrawer(props: {
|
|
13
14
|
shapeData: IShapeData;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Nullable } from '@univerjs/core';
|
|
2
2
|
import type { Scene } from '@univerjs/engine-render';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
|
-
import type { IShapeTextEditingParams, IShapeTextEditorPositionOffset, IShapeTextEditorPositionOptions } from './types';
|
|
5
4
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
5
|
+
import type { IShapeTextEditingParams, IShapeTextEditorPositionOffset, IShapeTextEditorPositionOptions } from './types';
|
|
6
6
|
export interface IShapePositionWrapperProps {
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
editingParams: Nullable<IShapeTextEditingParams>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ICustomShapeTextData, IShapeData, IShapeRect, IShapeTextBodyBehavior, IShapeTextData } from '@univerjs-pro/engine-shape';
|
|
2
|
-
import type { HorizontalAlign, IDocumentData, ITransformState, Nullable, VerticalAlign, WrapStrategy } from '@univerjs/core';
|
|
2
|
+
import type { HorizontalAlign, IDisposable, IDocumentData, ITransformState, Nullable, VerticalAlign, WrapStrategy } from '@univerjs/core';
|
|
3
3
|
import type { IRender } from '@univerjs/engine-render';
|
|
4
4
|
import type { CSSProperties } from 'react';
|
|
5
5
|
import type { Observable } from 'rxjs';
|
|
@@ -15,6 +15,7 @@ export interface IShapeTextEditingService {
|
|
|
15
15
|
editingParams$: Observable<Nullable<IShapeTextEditingParams>>;
|
|
16
16
|
onSavingEditorData$: Observable<Nullable<boolean>>;
|
|
17
17
|
setEditing(params: Nullable<IShapeTextEditingParams>): void;
|
|
18
|
+
registerEditorCommit?(params: IShapeTextEditingParams, commit: () => boolean): IDisposable | undefined;
|
|
18
19
|
completeEditing?(event?: PointerEvent): void;
|
|
19
20
|
cancelEditing?(): void;
|
|
20
21
|
}
|
|
@@ -42,6 +43,7 @@ export interface IShapeTextUpdateParams {
|
|
|
42
43
|
shapeId: string;
|
|
43
44
|
shapeText: ICustomShapeTextData;
|
|
44
45
|
oldShapeText: ICustomShapeTextData;
|
|
46
|
+
textReplacement?: boolean;
|
|
45
47
|
hostSize?: IShapeTextHostSizeUpdateParams;
|
|
46
48
|
}
|
|
47
49
|
export interface IShapeTextHostHeightUpdateParams {
|
|
@@ -58,10 +60,13 @@ export interface IShapeTextHostSizeUpdateParams {
|
|
|
58
60
|
height: number;
|
|
59
61
|
}
|
|
60
62
|
export interface IShapeTextEditorAdapter {
|
|
63
|
+
/** Defaults to onExit; incremental adapters own text persistence throughout the editing session. */
|
|
64
|
+
getCommitMode?(params: IShapeTextEditingParams): 'onExit' | 'incremental';
|
|
65
|
+
onTextEditorInitialized?(params: IShapeTextEditingParams): void;
|
|
61
66
|
getShapeModel(unitId: string, subUnitId: string, shapeId: string): Nullable<IShapeTextEditorModel>;
|
|
62
67
|
getShapeData?(unitId: string, subUnitId: string, shapeId: string): Nullable<IShapeData>;
|
|
63
68
|
getDrawingTransform(unitId: string, subUnitId: string, shapeId: string): Nullable<ITransformState>;
|
|
64
|
-
updateShapeText(params: IShapeTextUpdateParams): void;
|
|
69
|
+
updateShapeText(params: IShapeTextUpdateParams): boolean | void;
|
|
65
70
|
updateHostHeight?(params: IShapeTextHostHeightUpdateParams): void;
|
|
66
71
|
updateHostSize?(params: IShapeTextHostSizeUpdateParams): void;
|
|
67
72
|
previewHostSize?(params: IShapeTextHostSizeUpdateParams): void;
|
|
@@ -5,10 +5,10 @@ export interface ISmartArtLayoutGalleryProps {
|
|
|
5
5
|
selectedCategory?: ISmartArtData['layout']['category'];
|
|
6
6
|
onSelect: (layout: ISmartArtLayoutGalleryItem) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const CATEGORY_ORDER: readonly [
|
|
8
|
+
export declare const CATEGORY_ORDER: readonly ['all', 'list', 'process', 'cycle', 'hierarchy', 'relationship', 'matrix', 'pyramid', 'picture', 'timeline', 'team', 'textCard'];
|
|
9
9
|
export declare function SmartArtLayoutGallery(props: ISmartArtLayoutGalleryProps): import("react").JSX.Element;
|
|
10
10
|
export declare function useSmartArtLayoutGallery(props: ISmartArtLayoutGalleryProps): {
|
|
11
|
-
category: "all" | "
|
|
12
|
-
setCategory: import("react").Dispatch<import("react").SetStateAction<"all" | "
|
|
11
|
+
category: "all" | "cycle" | "hierarchy" | "list" | "matrix" | "picture" | "process" | "pyramid" | "relationship" | "team" | "textCard" | "timeline";
|
|
12
|
+
setCategory: import("react").Dispatch<import("react").SetStateAction<"all" | "cycle" | "hierarchy" | "list" | "matrix" | "picture" | "process" | "pyramid" | "relationship" | "team" | "textCard" | "timeline">>;
|
|
13
13
|
layouts: readonly ISmartArtLayoutGalleryItem[];
|
|
14
14
|
};
|
|
@@ -3,7 +3,7 @@ export interface ISmartArtQuickStyleGalleryProps {
|
|
|
3
3
|
selectedStyleId?: string;
|
|
4
4
|
onSelect: (style: ISmartArtQuickStyleCatalogItem) => void;
|
|
5
5
|
}
|
|
6
|
-
export declare const STYLE_SECTIONS: readonly [
|
|
6
|
+
export declare const STYLE_SECTIONS: readonly ['bestMatch', 'threeDimensional'];
|
|
7
7
|
export declare function SmartArtQuickStyleGallery(props: ISmartArtQuickStyleGalleryProps): import("react").JSX.Element;
|
|
8
8
|
export declare function SmartArtQuickStylePreview(props: {
|
|
9
9
|
style: ISmartArtQuickStyleCatalogItem;
|