@univerjs-pro/shape-editor-ui 1.0.0-rc.0 → 1.0.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/README.md +14 -0
- 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 +91 -55
- 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/controllers/mobile/components.controller.d.ts +2 -2
- package/lib/types/controllers/mobile/ui.controller.d.ts +5 -0
- package/lib/types/index.d.ts +12 -3
- package/lib/types/locale/en-US.d.ts +4 -0
- package/lib/types/mobile-plugin.d.ts +4 -2
- package/lib/types/plugin.d.ts +2 -0
- package/lib/types/services/mobile/shape-text-hyper-link-popup.service.d.ts +32 -0
- package/lib/types/services/mobile-shape-editor.service.d.ts +3 -1
- package/lib/types/services/shape-format-painter.d.ts +20 -0
- package/lib/types/services/shape-text-hyper-link-popup.service.d.ts +1 -0
- package/lib/types/views/FormulaBindingEditorDialog.d.ts +1 -0
- package/lib/types/views/FormulaBindingNumberFormat.d.ts +5 -2
- package/lib/types/views/mobile-shape-editor/MobileShapeActionPanel.d.ts +22 -0
- package/lib/types/views/mobile-shape-editor/MobileShapeMenu.d.ts +8 -0
- package/lib/types/views/shape-editor-panel/MobileShapeEditorControls.d.ts +4 -0
- package/lib/types/views/shape-editor-panel/ShapeEditorControls.d.ts +20 -0
- package/lib/types/views/shape-floating-toolbar/ShapeTextControls.d.ts +2 -0
- package/lib/types/views/shape-format-ribbon/ShapeEffectControls.d.ts +1 -1
- package/lib/types/views/shape-format-ribbon/ShapeFormatRibbonControls.d.ts +3 -3
- package/lib/types/views/shape-picker/MobileShapeChangePicker.d.ts +3 -0
- package/lib/types/views/shape-picker/MobileShapePickerPanel.d.ts +2 -0
- package/lib/types/views/shape-picker/ShapeChangePicker.d.ts +2 -0
- package/lib/types/views/shape-text-editor/MobileShapeTextHyperLinkPopup.d.ts +2 -0
- package/lib/types/views/shape-text-editor/ShapeTextHyperLinkPopup.d.ts +21 -1
- package/lib/types/views/shape-text-editor/ShapeTextPositionWrapper.d.ts +2 -5
- package/lib/types/views/shape-text-editor/shape-text-document.d.ts +4 -1
- package/lib/types/views/shape-text-editor/types.d.ts +3 -0
- package/lib/types/views/smart-art/MobileSmartArtColorGallery.d.ts +2 -0
- package/lib/types/views/smart-art/MobileSmartArtLayoutGallery.d.ts +2 -0
- package/lib/types/views/smart-art/MobileSmartArtQuickStyleGallery.d.ts +2 -0
- package/lib/types/views/smart-art/MobileSmartArtStylePanel.d.ts +2 -0
- package/lib/types/views/smart-art/MobileSmartArtTextPane.d.ts +2 -0
- package/lib/types/views/smart-art/SmartArtColorGallery.d.ts +2 -1
- package/lib/types/views/smart-art/SmartArtLayoutGallery.d.ts +6 -0
- package/lib/types/views/smart-art/SmartArtQuickStyleGallery.d.ts +1 -0
- package/lib/types/views/smart-art/SmartArtTextPane.d.ts +13 -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 +21 -21
package/lib/types/index.d.ts
CHANGED
|
@@ -11,9 +11,11 @@ export { applyFormulaBindingReferenceSelection, normalizeFormulaBindingFormula,
|
|
|
11
11
|
export type { IFormulaBindingReferenceEditResult, IFormulaBindingReferenceSelectionChange, } from './services/formula-binding-editor';
|
|
12
12
|
export { FormulaBindingService } from './services/formula-binding.service';
|
|
13
13
|
export type { IFormulaBinding, IFormulaBindingContext, IFormulaBindingOptions, } from './services/formula-binding.service';
|
|
14
|
+
export { buildMobileShapeTextUpdate } from './services/mobile-shape-editor-utils';
|
|
14
15
|
export { MobileShapeEditorService } from './services/mobile-shape-editor.service';
|
|
15
16
|
export type { IMobileShapeEditorState, MobileShapeEditorMode } from './services/mobile-shape-editor.service';
|
|
16
17
|
export { ShapeFloatingToolbarService } from './services/shape-floating-toolbar.service';
|
|
18
|
+
export { registerShapeFormatPainter } from './services/shape-format-painter';
|
|
17
19
|
export { ShapeTextHyperLinkPopupService } from './services/shape-text-hyper-link-popup.service';
|
|
18
20
|
export { activateDrawingObject, clearActiveDrawingObjects } from './utils/activate-drawing-object';
|
|
19
21
|
export { getDrawingTypeNameKey } from './utils/drawing-type-name';
|
|
@@ -29,11 +31,14 @@ export { drawFormulaShapeAnimationLayers, FormulaShapeAnimationController, } fro
|
|
|
29
31
|
export type { IFormulaShapeAnimationLayer } from './views/formula-shape/formula-shape-animation';
|
|
30
32
|
export { resolveFormulaShapeAutoFitSize } from './views/formula-shape/formula-shape-auto-fit';
|
|
31
33
|
export { useFormulaShapeToolbar } from './views/formula-shape/UseFormulaShapeToolbar';
|
|
32
|
-
export { FormulaBindingEditorDialog } from './views/FormulaBindingEditorDialog';
|
|
34
|
+
export { FormulaBindingEditorDialog, MobileFormulaBindingEditorDialog } from './views/FormulaBindingEditorDialog';
|
|
33
35
|
export type { IFormulaBindingEditorDialogProps } from './views/FormulaBindingEditorDialog';
|
|
34
|
-
export { createFormulaBindingNumberFormatMenuEntries, FormulaBindingNumberFormatDialog, FormulaBindingNumberFormatMenu, resolveFormulaBindingNumberFormatType, } from './views/FormulaBindingNumberFormat';
|
|
36
|
+
export { createFormulaBindingNumberFormatMenuEntries, FormulaBindingNumberFormatDialog, FormulaBindingNumberFormatMenu, MobileFormulaBindingNumberFormatDialog, resolveFormulaBindingNumberFormatType, } from './views/FormulaBindingNumberFormat';
|
|
35
37
|
export type { FormulaBindingNumberFormatMenuEntry, FormulaBindingNumberFormatType, } from './views/FormulaBindingNumberFormat';
|
|
36
|
-
export {
|
|
38
|
+
export { MobileShapeStyleDrawer, MobileShapeTextEditor } from './views/mobile-shape-editor/MobileShapeActionPanel';
|
|
39
|
+
export { MobileShapeMenu } from './views/mobile-shape-editor/MobileShapeMenu';
|
|
40
|
+
export { MobileShapeEditorControls } from './views/shape-editor-panel/MobileShapeEditorControls';
|
|
41
|
+
export { useShapeEditorControls } from './views/shape-editor-panel/ShapeEditorControls';
|
|
37
42
|
export { ShapeEditPanel } from './views/shape-editor-panel/ShapeEditorPanel';
|
|
38
43
|
export { getInitialShapeFillType, ShapeFillEditor, } from './views/shape-editor-panel/ShapeFillEditor';
|
|
39
44
|
export { ShapeImageFillEditor } from './views/shape-editor-panel/ShapeImageFillEditor';
|
|
@@ -51,6 +56,7 @@ export { buildShapeStrokeDataUpdate, ShapeStrokePanelButton, ShapeStrokePanelCon
|
|
|
51
56
|
export type { IShapeStrokePanelContentProps, ShapeStrokePanelMode, } from './views/shape-floating-toolbar/ShapeStrokeControls';
|
|
52
57
|
export { TextBackgroundColorButton, TextFillButton, TypographyPanelButton, } from './views/shape-floating-toolbar/ShapeTextControls';
|
|
53
58
|
export { ShapeEffectsRibbonControl, ShapeFormulaRibbonControl, ShapeStyleRibbonControl, ShapeTextEffectsRibbonControl, ShapeTextRibbonControl, } from './views/shape-format-ribbon/ShapeFormatRibbonControls';
|
|
59
|
+
export { MobileShapePickerPanel } from './views/shape-picker/MobileShapePickerPanel';
|
|
54
60
|
export { SHAPE_CHANGE_PICKER_COMPONENT } from './views/shape-picker/ShapeChangePicker';
|
|
55
61
|
export { ShapePickerDropdown, ShapePickerPanel } from './views/shape-picker/ShapePickerGrid';
|
|
56
62
|
export { ShapeGroupEnum, shapeTypeOptions } from './views/shape-picker/shapes';
|
|
@@ -76,6 +82,9 @@ export { ShapeTextFloatToolbar } from './views/shape-text-editor/ShapeTextFloatT
|
|
|
76
82
|
export { ShapeTextHyperLinkInfo } from './views/shape-text-editor/ShapeTextHyperLinkPopup';
|
|
77
83
|
export type { IShapeTextEditingParams, IShapeTextEditorAdapter, IShapeTextEditorModel, IShapeTextEditorPositionOptions, IShapeTextHostHeightUpdateParams, IShapeTextHostSizeUpdateParams, IShapeTextUpdateParams, } from './views/shape-text-editor/types';
|
|
78
84
|
export { stripShapeTextPlainMarker } from './views/shape-text-editor/types';
|
|
85
|
+
export { MobileSmartArtLayoutGallery } from './views/smart-art/MobileSmartArtLayoutGallery';
|
|
86
|
+
export { MobileSmartArtStylePanel } from './views/smart-art/MobileSmartArtStylePanel';
|
|
87
|
+
export { MobileSmartArtTextPane } from './views/smart-art/MobileSmartArtTextPane';
|
|
79
88
|
export { SMART_ART_LAYOUT_CATALOG } from './views/smart-art/smart-art-layout-catalog.generated';
|
|
80
89
|
export type { ISmartArtLayoutCatalogItem, SmartArtLayoutIconElement } from './views/smart-art/smart-art-layout-catalog.generated';
|
|
81
90
|
export { SMART_ART_LAYOUT_GALLERY_CATALOG } from './views/smart-art/smart-art-layout-gallery-catalog.generated';
|
|
@@ -252,6 +252,7 @@ declare const locale: {
|
|
|
252
252
|
};
|
|
253
253
|
};
|
|
254
254
|
colorStyle: {
|
|
255
|
+
name: string;
|
|
255
256
|
section: {
|
|
256
257
|
theme: string;
|
|
257
258
|
colorful: string;
|
|
@@ -735,6 +736,9 @@ declare const locale: {
|
|
|
735
736
|
columnSpacing: string;
|
|
736
737
|
};
|
|
737
738
|
mobile: {
|
|
739
|
+
text: string;
|
|
740
|
+
style: string;
|
|
741
|
+
delete: string;
|
|
738
742
|
editText: string;
|
|
739
743
|
expandEditor: string;
|
|
740
744
|
collapseEditor: string;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type { IUniverShapeEditorUIConfig } from './config/config';
|
|
2
|
-
import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
|
+
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
3
|
export declare class UniverShapeEditorMobileUIPlugin extends Plugin {
|
|
4
4
|
private readonly _config;
|
|
5
5
|
protected readonly _injector: Injector;
|
|
6
6
|
private readonly _configService;
|
|
7
|
+
private readonly _commandService;
|
|
7
8
|
static type: UniverInstanceType;
|
|
8
9
|
static pluginName: string;
|
|
9
10
|
static packageName: string;
|
|
10
11
|
static version: string;
|
|
11
|
-
constructor(_config: IUniverShapeEditorUIConfig | undefined, _injector: Injector, _configService: IConfigService);
|
|
12
|
+
constructor(_config: IUniverShapeEditorUIConfig | undefined, _injector: Injector, _configService: IConfigService, _commandService: ICommandService);
|
|
12
13
|
onStarting(): void;
|
|
14
|
+
onReady(): void;
|
|
13
15
|
}
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Dependency } from '@univerjs/core';
|
|
1
2
|
import type { IUniverShapeEditorUIConfig } from './config/config';
|
|
2
3
|
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
4
|
export declare class UniverShapeEditorUIPlugin extends Plugin {
|
|
@@ -10,5 +11,6 @@ export declare class UniverShapeEditorUIPlugin extends Plugin {
|
|
|
10
11
|
static packageName: string;
|
|
11
12
|
static version: string;
|
|
12
13
|
constructor(_config: IUniverShapeEditorUIConfig | undefined, _injector: Injector, _configService: IConfigService, _commandService: ICommandService);
|
|
14
|
+
protected _getDependencies(): Dependency[];
|
|
13
15
|
onStarting(): void;
|
|
14
16
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { IDisposable, Nullable } from '@univerjs/core';
|
|
2
|
+
import type { IShapeTextHyperLinkInfo } from '../../commands/shape-text-hyper-link.command';
|
|
3
|
+
import { Disposable, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
4
|
+
import { DocSelectionManagerService } from '@univerjs/docs';
|
|
5
|
+
import { DocCanvasPopManagerService } from '@univerjs/docs-ui';
|
|
6
|
+
import { IDialogService } from '@univerjs/ui';
|
|
7
|
+
export declare class MobileShapeTextHyperLinkPopupService extends Disposable {
|
|
8
|
+
private readonly _docCanvasPopupManagerService;
|
|
9
|
+
private readonly _docSelectionManagerService;
|
|
10
|
+
private readonly _univerInstanceService;
|
|
11
|
+
private readonly _dialogService;
|
|
12
|
+
private readonly _localeService;
|
|
13
|
+
private readonly _editingLink$;
|
|
14
|
+
private readonly _showingLink$;
|
|
15
|
+
readonly editingLink$: import("rxjs").Observable<Nullable<IShapeTextHyperLinkInfo>>;
|
|
16
|
+
readonly showingLink$: import("rxjs").Observable<Nullable<IShapeTextHyperLinkInfo>>;
|
|
17
|
+
private _editPopup;
|
|
18
|
+
private _editPopupUnitId;
|
|
19
|
+
private _infoPopup;
|
|
20
|
+
private _infoPopupSuppressed;
|
|
21
|
+
private _infoPopupSuppressionTimer;
|
|
22
|
+
constructor(_docCanvasPopupManagerService: DocCanvasPopManagerService, _docSelectionManagerService: DocSelectionManagerService, _univerInstanceService: IUniverInstanceService, _dialogService: IDialogService, _localeService: LocaleService);
|
|
23
|
+
dispose(): void;
|
|
24
|
+
get editing(): Nullable<IShapeTextHyperLinkInfo>;
|
|
25
|
+
get showing(): Nullable<IShapeTextHyperLinkInfo>;
|
|
26
|
+
showEditPopup(unitId: string, link: Nullable<IShapeTextHyperLinkInfo>): Nullable<IDisposable>;
|
|
27
|
+
private _createEditPopup;
|
|
28
|
+
hideEditPopup(unitId?: string): void;
|
|
29
|
+
showInfoPopup(info: IShapeTextHyperLinkInfo, attachPopup?: () => IDisposable): Nullable<IDisposable>;
|
|
30
|
+
hideInfoPopup(): void;
|
|
31
|
+
hideInfoPopupOnPointerDown(): void;
|
|
32
|
+
}
|
|
@@ -4,6 +4,8 @@ export type MobileShapeEditorMode = 'text' | 'style';
|
|
|
4
4
|
export interface IMobileShapeEditorState {
|
|
5
5
|
mode: MobileShapeEditorMode;
|
|
6
6
|
ref: IShapeRef;
|
|
7
|
+
/** Host-resolved display color; never persisted with Shape text. */
|
|
8
|
+
backgroundColor?: string;
|
|
7
9
|
}
|
|
8
10
|
export declare class MobileShapeEditorService extends Disposable {
|
|
9
11
|
private readonly _contextService;
|
|
@@ -12,7 +14,7 @@ export declare class MobileShapeEditorService extends Disposable {
|
|
|
12
14
|
constructor(_contextService: IContextService, _univerInstanceService: IUniverInstanceService);
|
|
13
15
|
readonly state$: import("rxjs").Observable<IMobileShapeEditorState | null>;
|
|
14
16
|
getState(): IMobileShapeEditorState | null;
|
|
15
|
-
open(mode: MobileShapeEditorMode, ref: IShapeRef): void;
|
|
17
|
+
open(mode: MobileShapeEditorMode, ref: IShapeRef, backgroundColor?: string): void;
|
|
16
18
|
close(): void;
|
|
17
19
|
dispose(): void;
|
|
18
20
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IShapeData } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { IDisposable } from '@univerjs/core';
|
|
3
|
+
import type { IRenderContext } from '@univerjs/engine-render';
|
|
4
|
+
import type { FormatPainterSessionService, IFormatPainterTarget } from '@univerjs/ui';
|
|
5
|
+
import type { Observable } from 'rxjs';
|
|
6
|
+
/** Copy only visual formatting; keep identity, geometry, text and formula bindings on the target. */
|
|
7
|
+
export declare function applyShapeFormat(source: IShapeData, target: IShapeData): IShapeData;
|
|
8
|
+
/** Restore insertion defaults without replacing the target object or its text. */
|
|
9
|
+
export declare function clearShapeFormat(target: IShapeData, defaults?: IShapeData): IShapeData;
|
|
10
|
+
export interface IShapeFormatPainterHost {
|
|
11
|
+
changes$: Observable<unknown>;
|
|
12
|
+
isActive(): boolean;
|
|
13
|
+
getSource(): IShapeData | null;
|
|
14
|
+
getSelectedTarget(): IFormatPainterTarget | null;
|
|
15
|
+
getDefaultFormat?(target: IFormatPainterTarget): IShapeData | undefined;
|
|
16
|
+
getTarget(event: PointerEvent): IFormatPainterTarget | null;
|
|
17
|
+
getShape(target: IFormatPainterTarget): IShapeData | null;
|
|
18
|
+
update(target: IFormatPainterTarget, before: IShapeData, after: IShapeData): boolean | Promise<boolean>;
|
|
19
|
+
}
|
|
20
|
+
export declare function registerShapeFormatPainter(context: IRenderContext, session: FormatPainterSessionService, host: IShapeFormatPainterHost): IDisposable;
|
|
@@ -21,6 +21,7 @@ export declare class ShapeTextHyperLinkPopupService extends Disposable {
|
|
|
21
21
|
get editing(): Nullable<IShapeTextHyperLinkInfo>;
|
|
22
22
|
get showing(): Nullable<IShapeTextHyperLinkInfo>;
|
|
23
23
|
showEditPopup(unitId: string, link: Nullable<IShapeTextHyperLinkInfo>): Nullable<IDisposable>;
|
|
24
|
+
private _createEditPopup;
|
|
24
25
|
hideEditPopup(unitId?: string): void;
|
|
25
26
|
showInfoPopup(info: IShapeTextHyperLinkInfo, attachPopup?: () => IDisposable): Nullable<IDisposable>;
|
|
26
27
|
hideInfoPopup(): void;
|
|
@@ -9,3 +9,4 @@ export interface IFormulaBindingEditorDialogProps {
|
|
|
9
9
|
onConfirm: (result: IFormulaBindingEditorResult) => void;
|
|
10
10
|
}
|
|
11
11
|
export declare function FormulaBindingEditorDialog(props: IFormulaBindingEditorDialogProps): import("react").JSX.Element | null;
|
|
12
|
+
export declare function MobileFormulaBindingEditorDialog(props: IFormulaBindingEditorDialogProps): import("react").JSX.Element | null;
|
|
@@ -15,9 +15,12 @@ export declare function FormulaBindingNumberFormatMenu(props: {
|
|
|
15
15
|
onSelect: (pattern: string) => void;
|
|
16
16
|
onMore: () => void;
|
|
17
17
|
}): import("react").JSX.Element;
|
|
18
|
-
|
|
18
|
+
interface IFormulaBindingNumberFormatDialogProps {
|
|
19
19
|
open: boolean;
|
|
20
20
|
pattern: string;
|
|
21
21
|
onClose: () => void;
|
|
22
22
|
onConfirm: (pattern: string) => void;
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
|
+
export declare function FormulaBindingNumberFormatDialog(props: IFormulaBindingNumberFormatDialogProps): import("react").JSX.Element;
|
|
25
|
+
export declare function MobileFormulaBindingNumberFormatDialog(props: IFormulaBindingNumberFormatDialogProps): import("react").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -1 +1,23 @@
|
|
|
1
|
+
import type { IShapeData } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { IDocumentData, ITextStyle } from '@univerjs/core';
|
|
3
|
+
import type { IShapeFloatingToolbarLayerActions } from '../shape-floating-toolbar/ShapeFloatingToolbar';
|
|
4
|
+
import { buildShapeTextDataUpdate } from '../shape-floating-toolbar/shape-floating-toolbar-utils';
|
|
1
5
|
export declare function MobileShapeActionPanel(): import("react").JSX.Element | null;
|
|
6
|
+
export declare function MobileShapeTextEditor(props: {
|
|
7
|
+
shapeData: IShapeData;
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
onCancel: () => void;
|
|
10
|
+
onConfirm: (documentData: IDocumentData) => void;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
export declare function MobileShapeStyleDrawer(props: {
|
|
13
|
+
shapeData: IShapeData;
|
|
14
|
+
textStyle?: ITextStyle;
|
|
15
|
+
verticalAlignment?: boolean;
|
|
16
|
+
onUpdateText?: (options: Parameters<typeof buildShapeTextDataUpdate>[1]) => unknown;
|
|
17
|
+
rotation?: number;
|
|
18
|
+
onRotate?: (rotation: number) => unknown;
|
|
19
|
+
layerActions?: Pick<IShapeFloatingToolbarLayerActions, 'onFront' | 'onForward' | 'onBackward' | 'onBack'>;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
onOpenText?: () => void;
|
|
22
|
+
onUpdate: (shapeData: IShapeData) => unknown;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IShapeRef, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
|
|
2
|
+
export declare function MobileShapeMenu(props: {
|
|
3
|
+
shapeRef: IShapeRef;
|
|
4
|
+
shapeType?: ShapeTypeEnum;
|
|
5
|
+
onText?: () => void;
|
|
6
|
+
onStyle?: () => void;
|
|
7
|
+
onDelete: () => unknown;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ComponentProps, ComponentType, ReactNode } from 'react';
|
|
2
|
+
import { Checkbox, ColorPicker, Dropdown, GradientColorPicker, Select } from '@univerjs/design';
|
|
3
|
+
declare const SHAPE_EDITOR_CONTROLS: {
|
|
4
|
+
Button: import("react").ForwardRefExoticComponent<import("@univerjs/design").IButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
Checkbox: typeof Checkbox;
|
|
6
|
+
ColorPicker: typeof ColorPicker;
|
|
7
|
+
Dropdown: typeof Dropdown;
|
|
8
|
+
GradientColorPicker: typeof GradientColorPicker;
|
|
9
|
+
InputNumber: import("react").ForwardRefExoticComponent<import("@univerjs/design").IInputNumberProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
|
+
Select: typeof Select;
|
|
11
|
+
};
|
|
12
|
+
type ShapeEditorControls = {
|
|
13
|
+
[K in keyof typeof SHAPE_EDITOR_CONTROLS]: ComponentType<ComponentProps<(typeof SHAPE_EDITOR_CONTROLS)[K]>>;
|
|
14
|
+
};
|
|
15
|
+
export declare function ShapeEditorControlsProvider({ controls, children }: {
|
|
16
|
+
controls: ShapeEditorControls;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
export declare function useShapeEditorControls(): ShapeEditorControls;
|
|
20
|
+
export {};
|
|
@@ -5,12 +5,14 @@ export declare function TextFillButton(props: {
|
|
|
5
5
|
title: string;
|
|
6
6
|
textStyle: ITextStyle;
|
|
7
7
|
fallbackColor: string;
|
|
8
|
+
iconClassName?: string;
|
|
8
9
|
dropdownSide?: 'top' | 'bottom';
|
|
9
10
|
onChange: (textStyle: ITextStyle) => void;
|
|
10
11
|
}): import("react").JSX.Element;
|
|
11
12
|
export declare function TextBackgroundColorButton(props: {
|
|
12
13
|
title: string;
|
|
13
14
|
color: string;
|
|
15
|
+
iconClassName?: string;
|
|
14
16
|
dropdownSide?: 'top' | 'bottom';
|
|
15
17
|
onApply: () => void;
|
|
16
18
|
onReset?: () => void;
|
|
@@ -15,5 +15,5 @@ export declare function ShapeEffectButton(props: {
|
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
dropdownSide?: 'top' | 'bottom';
|
|
17
17
|
titleKey?: string;
|
|
18
|
-
onUpdateShapeData: (patch: IShapeData) => void;
|
|
18
|
+
onUpdateShapeData: (patch: IShapeData, getPatch?: (current: IShapeData) => IShapeData) => void;
|
|
19
19
|
}): import("react").JSX.Element;
|
|
@@ -4,17 +4,17 @@ import type { IShapeFloatingToolbarExtensionAction } from '../shape-floating-too
|
|
|
4
4
|
export interface IShapeStyleRibbonControlProps {
|
|
5
5
|
shapeData: IShapeData;
|
|
6
6
|
shapeType?: ShapeTypeEnum;
|
|
7
|
-
onUpdateShapeData: (patch: IShapeData) => void;
|
|
7
|
+
onUpdateShapeData: (patch: IShapeData, getPatch?: (current: IShapeData) => IShapeData) => void;
|
|
8
8
|
}
|
|
9
9
|
export type IShapeEffectsRibbonControlProps = IShapeStyleRibbonControlProps;
|
|
10
10
|
export interface IShapeTextRibbonControlProps {
|
|
11
11
|
fontFamilyPopupDataComponent: string;
|
|
12
12
|
shapeData: IShapeData;
|
|
13
|
-
onUpdateShapeData: (patch: IShapeData) => void;
|
|
13
|
+
onUpdateShapeData: (patch: IShapeData, getPatch?: (current: IShapeData) => IShapeData) => void;
|
|
14
14
|
}
|
|
15
15
|
export interface IShapeTextEffectsRibbonControlProps {
|
|
16
16
|
shapeData: IShapeData;
|
|
17
|
-
onUpdateShapeData: (patch: IShapeData) => void;
|
|
17
|
+
onUpdateShapeData: (patch: IShapeData, getPatch?: (current: IShapeData) => IShapeData) => void;
|
|
18
18
|
}
|
|
19
19
|
export interface IShapeFormulaRibbonControlProps {
|
|
20
20
|
actions: IShapeFloatingToolbarExtensionAction[];
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ShapeTypeEnum } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import { ShapePickerPanel } from './ShapePickerGrid';
|
|
2
3
|
export declare const SHAPE_CHANGE_PICKER_COMPONENT = "shape-editor-ui.change-shape-picker";
|
|
3
4
|
interface IShapeChangePickerProps {
|
|
4
5
|
onChange?: (value: ShapeTypeEnum) => void;
|
|
6
|
+
PickerComponent?: typeof ShapePickerPanel;
|
|
5
7
|
}
|
|
6
8
|
export declare function ShapeChangePicker(props: IShapeChangePickerProps): import("react").JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -1,7 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Nullable } from '@univerjs/core';
|
|
2
|
+
import type { ComponentProps, ComponentType } from 'react';
|
|
3
|
+
import type { IShapeTextHyperLinkInfo } from '../../commands/shape-text-hyper-link.command';
|
|
4
|
+
import { ICommandService, LocaleService } from '@univerjs/core';
|
|
5
|
+
import { Button, Input } from '@univerjs/design';
|
|
6
|
+
import { IClipboardInterfaceService, IMessageService } from '@univerjs/ui';
|
|
7
|
+
import { ShapeTextHyperLinkPopupService } from '../../services/shape-text-hyper-link-popup.service';
|
|
8
|
+
export declare function ShapeTextHyperLinkEdit({ InputComponent, ButtonComponent, className, }?: {
|
|
9
|
+
InputComponent?: ComponentType<ComponentProps<typeof Input>>;
|
|
10
|
+
ButtonComponent?: ComponentType<ComponentProps<typeof Button>>;
|
|
11
|
+
className?: string;
|
|
12
|
+
}): import("react").JSX.Element | null;
|
|
2
13
|
export declare namespace ShapeTextHyperLinkEdit {
|
|
3
14
|
var componentKey: string;
|
|
4
15
|
}
|
|
16
|
+
export declare function useShapeTextHyperLinkInfo(): {
|
|
17
|
+
hyperLinkService: ShapeTextHyperLinkPopupService;
|
|
18
|
+
commandService: ICommandService;
|
|
19
|
+
clipboardService: IClipboardInterfaceService;
|
|
20
|
+
messageService: IMessageService;
|
|
21
|
+
localeService: LocaleService;
|
|
22
|
+
popup: Nullable<IShapeTextHyperLinkInfo>;
|
|
23
|
+
url: any;
|
|
24
|
+
};
|
|
5
25
|
export declare function ShapeTextHyperLinkInfo(): import("react").JSX.Element | null;
|
|
6
26
|
export declare namespace ShapeTextHyperLinkInfo {
|
|
7
27
|
var componentKey: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
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, IShapeTextEditorPositionOptions } from './types';
|
|
4
|
+
import type { IShapeTextEditingParams, IShapeTextEditorPositionOffset, IShapeTextEditorPositionOptions } from './types';
|
|
5
5
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
6
6
|
export interface IShapePositionWrapperProps {
|
|
7
7
|
children: ReactNode;
|
|
@@ -50,10 +50,7 @@ export declare function resolveShapeTextEditorPositionTransform(options: {
|
|
|
50
50
|
scene: Nullable<Scene>;
|
|
51
51
|
}): Nullable<IShapeObjectLike>;
|
|
52
52
|
export declare function resolveShapeTextEditorPositionRoot(editorElement: HTMLElement | null): Element | null;
|
|
53
|
-
export declare function resolveEmbeddedShapeTextEditorPositionOffset(canvasElement: Element | null | undefined, positionRoot: Element | null):
|
|
54
|
-
left: number;
|
|
55
|
-
top: number;
|
|
56
|
-
} | null;
|
|
53
|
+
export declare function resolveEmbeddedShapeTextEditorPositionOffset(canvasElement: Element | null | undefined, positionRoot: Element | null): IShapeTextEditorPositionOffset | null;
|
|
57
54
|
/**
|
|
58
55
|
* Position wrapper component that handles shape positioning in DOM.
|
|
59
56
|
* This is the first layer DOM that tracks shape position with scroll.
|
|
@@ -2,8 +2,9 @@ import type { ICustomShapeTextData, IShapeRect, IShapeText, IShapeTextBodyBehavi
|
|
|
2
2
|
import type { IDocumentData, Nullable } from '@univerjs/core';
|
|
3
3
|
import type { Editor } from '@univerjs/docs-ui';
|
|
4
4
|
import type { IShapeTextDataContext } from './types';
|
|
5
|
-
import { HorizontalAlign, VerticalAlign, WrapStrategy } from '@univerjs/core';
|
|
5
|
+
import { HorizontalAlign, UniverInstanceType, VerticalAlign, WrapStrategy } from '@univerjs/core';
|
|
6
6
|
interface IPrepareShapeTextDocumentOptions {
|
|
7
|
+
hostType?: UniverInstanceType;
|
|
7
8
|
bodyBehavior?: IShapeTextBodyBehavior;
|
|
8
9
|
isHorizontal: boolean;
|
|
9
10
|
textRect: IShapeRect;
|
|
@@ -12,6 +13,7 @@ interface IPrepareShapeTextDocumentOptions {
|
|
|
12
13
|
wrapStrategy?: WrapStrategy;
|
|
13
14
|
}
|
|
14
15
|
interface IShapeTextDocumentAlignmentOptions {
|
|
16
|
+
sourceDocument?: IDocumentData;
|
|
15
17
|
bodyBehavior?: IShapeTextBodyBehavior;
|
|
16
18
|
verticalAlign?: VerticalAlign;
|
|
17
19
|
horizontalAlign?: HorizontalAlign;
|
|
@@ -29,6 +31,7 @@ export declare function buildShapeTextEditorCommitShapeText(options: {
|
|
|
29
31
|
}): ICustomShapeTextData;
|
|
30
32
|
export declare function createEmptyShapeTextEditorDocument(editorUnitId: string, pageWidth: number): IDocumentData;
|
|
31
33
|
export declare function createShapeTextEditorInitialDocument(options: {
|
|
34
|
+
hostType?: UniverInstanceType;
|
|
32
35
|
editorUnitId: string;
|
|
33
36
|
pageWidth: number;
|
|
34
37
|
shapeData: Nullable<IShapeTextDataContext>;
|
|
@@ -81,6 +81,9 @@ export interface IShapeTextEditorViewportKeys {
|
|
|
81
81
|
export interface IShapeTextEditorPositionOffset {
|
|
82
82
|
left: number;
|
|
83
83
|
top: number;
|
|
84
|
+
/** CSS scale from the child canvas into the editor containing block, excluding scene zoom. */
|
|
85
|
+
scaleX?: number;
|
|
86
|
+
scaleY?: number;
|
|
84
87
|
}
|
|
85
88
|
export interface IShapeTextEditorPositionOptions {
|
|
86
89
|
viewportKeys: IShapeTextEditorViewportKeys;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { ISmartArtRibbonControlProps } from './SmartArtRibbonControl';
|
|
2
|
+
export declare function MobileSmartArtStylePanel(props: Pick<ISmartArtRibbonControlProps, 'data' | 'onSelectLayout' | 'onSelectColor' | 'onSelectStyle' | 'onToggleDirection' | 'onReset' | 'onConvertToShapes'>): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { ISmartArtColorStyleCatalogItem } from '@univerjs-pro/engine-shape';
|
|
1
|
+
import type { ISmartArtColorStyleCatalogItem, SmartArtColorStyleSection } from '@univerjs-pro/engine-shape';
|
|
2
2
|
export interface ISmartArtColorGalleryProps {
|
|
3
3
|
selectedColorStyleId?: string;
|
|
4
4
|
onSelect: (style: ISmartArtColorStyleCatalogItem) => void;
|
|
5
5
|
}
|
|
6
|
+
export declare const SECTIONS: readonly SmartArtColorStyleSection[];
|
|
6
7
|
export declare function SmartArtColorGallery(props: ISmartArtColorGalleryProps): import("react").JSX.Element;
|
|
@@ -5,4 +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 ["all", "list", "process", "cycle", "hierarchy", "relationship", "matrix", "pyramid", "picture", "timeline", "team", "textCard"];
|
|
8
9
|
export declare function SmartArtLayoutGallery(props: ISmartArtLayoutGalleryProps): import("react").JSX.Element;
|
|
10
|
+
export declare function useSmartArtLayoutGallery(props: ISmartArtLayoutGalleryProps): {
|
|
11
|
+
category: "all" | "picture" | "cycle" | "list" | "process" | "hierarchy" | "relationship" | "matrix" | "pyramid" | "timeline" | "team" | "textCard";
|
|
12
|
+
setCategory: import("react").Dispatch<import("react").SetStateAction<"all" | "picture" | "cycle" | "list" | "process" | "hierarchy" | "relationship" | "matrix" | "pyramid" | "timeline" | "team" | "textCard">>;
|
|
13
|
+
layouts: readonly ISmartArtLayoutGalleryItem[];
|
|
14
|
+
};
|
|
@@ -3,6 +3,7 @@ export interface ISmartArtQuickStyleGalleryProps {
|
|
|
3
3
|
selectedStyleId?: string;
|
|
4
4
|
onSelect: (style: ISmartArtQuickStyleCatalogItem) => void;
|
|
5
5
|
}
|
|
6
|
+
export declare const STYLE_SECTIONS: readonly ["bestMatch", "threeDimensional"];
|
|
6
7
|
export declare function SmartArtQuickStyleGallery(props: ISmartArtQuickStyleGalleryProps): import("react").JSX.Element;
|
|
7
8
|
export declare function SmartArtQuickStylePreview(props: {
|
|
8
9
|
style: ISmartArtQuickStyleCatalogItem;
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import type { ISmartArtData, ISmartArtDataNode, SmartArtOperation } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { ComponentProps, ComponentType, ReactNode } from 'react';
|
|
3
|
+
import { Input } from '@univerjs/design';
|
|
2
4
|
export interface ISmartArtTextPaneProps {
|
|
3
5
|
data: ISmartArtData;
|
|
4
6
|
onOperation: (operation: SmartArtOperation, focusedNodeId?: string) => void;
|
|
5
7
|
selectedNodeId?: string;
|
|
6
8
|
onSelectNode?: (nodeId: string | undefined) => void;
|
|
7
9
|
showToolbar?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
toolbarClassName?: string;
|
|
12
|
+
rowsClassName?: string;
|
|
13
|
+
InputComponent?: ComponentType<ComponentProps<typeof Input>>;
|
|
14
|
+
ActionComponent?: ComponentType<{
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
title: string;
|
|
18
|
+
onClick: () => void;
|
|
19
|
+
}>;
|
|
8
20
|
}
|
|
9
21
|
export interface ISmartArtTextPaneRow {
|
|
10
22
|
depth: number;
|
|
@@ -13,4 +25,4 @@ export interface ISmartArtTextPaneRow {
|
|
|
13
25
|
export declare function flattenSmartArtTextPaneRows(data: ISmartArtData): ISmartArtTextPaneRow[];
|
|
14
26
|
export declare function isSmartArtTextPaneNodeSupported(data: ISmartArtData, nodeId: string): boolean;
|
|
15
27
|
export declare function resolvePreviousSmartArtTextPaneNodeId(rows: readonly ISmartArtTextPaneRow[], nodeId: string): string | undefined;
|
|
16
|
-
export declare function SmartArtTextPane(props: ISmartArtTextPaneProps): import("react").JSX.Element;
|
|
28
|
+
export declare function SmartArtTextPane({ InputComponent, ActionComponent, ...props }: ISmartArtTextPaneProps): import("react").JSX.Element;
|