@univerjs-pro/slides-ui 1.0.0-alpha.6 → 1.0.0-alpha.8
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/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 +27 -56
- 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/commands/operations/insert.operation.d.ts +3 -0
- package/lib/types/commands/operations/shortcut.operation.d.ts +6 -0
- package/lib/types/components/canvas-view/CanvasView.d.ts +38 -2
- package/lib/types/components/insert-ribbon/SlideInsertRibbonComponents.d.ts +8 -0
- package/lib/types/components/presentation/SlidePresentationView.d.ts +3 -0
- package/lib/types/components/slide-footer/SlideFooter.d.ts +5 -0
- package/lib/types/controllers/group-hierarchy.util.d.ts +1 -0
- package/lib/types/controllers/page-size.util.d.ts +27 -0
- package/lib/types/controllers/slide-drawing-transformer-config.util.d.ts +3 -3
- package/lib/types/controllers/slide-render.controller.d.ts +2 -2
- package/lib/types/controllers/slide-shape-adjust.controller.d.ts +1 -1
- package/lib/types/embed-focus-owner.d.ts +1 -0
- package/lib/types/locale/en-US.d.ts +9 -0
- package/lib/types/menu/contextmenu.menu.d.ts +1 -1
- package/lib/types/menu/display.menu.d.ts +8 -0
- package/lib/types/menu/insert.menu.d.ts +4 -0
- package/lib/types/render-objects/slide-image-object.d.ts +5 -4
- package/lib/types/render-objects/slide-shape-object.d.ts +7 -0
- package/lib/types/render-objects/slide-table-object.d.ts +1 -1
- package/lib/types/services/slide-canvas-pop-manager.service.d.ts +1 -0
- package/lib/types/services/slide-embed-integration.service.d.ts +2 -0
- package/lib/types/services/slide-insert.service.d.ts +3 -2
- package/lib/types/slide-editor/controllers/slide-text-editing.render-controller.d.ts +3 -1
- package/lib/types/slide-editor/editor-ui/utils/render.d.ts +0 -1
- package/lib/types/slide-editor/utils/editable-text.d.ts +2 -1
- package/lib/types/slide-editor/views/shape-text-editor/index.d.ts +11 -0
- package/lib/types/views/render/adaptor.d.ts +1 -0
- package/lib/types/views/render/adaptors/shape-adaptor.d.ts +5 -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 +18 -17
- package/lib/types/components/embed-floating-preview/SlideEmbedFloatingPreview.spec.d.ts +0 -4
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { UnitModel } from '@univerjs/core';
|
|
2
|
-
import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
2
|
+
import type { IRenderContext, IRenderModule, IWheelEvent } from '@univerjs/engine-render';
|
|
3
3
|
import { ISlideDrawingService } from '@univerjs-pro/slides';
|
|
4
4
|
import { ICommandService, IConfigService, Injector, IUniverInstanceService, RxDisposable, ThemeService } from '@univerjs/core';
|
|
5
5
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
6
6
|
export declare const SLIDE_MAIN_VIEWPORT_KEY = "viewMain";
|
|
7
7
|
export declare const SLIDE_BG_RECT_KEY = "slide-bg-rect";
|
|
8
8
|
export declare const SLIDE_PAGE_RECT_KEY = "slide-page-rect";
|
|
9
|
+
export declare function resolveSlideWheelZoomRatio(currentRatio: number, event: Pick<IWheelEvent, 'ctrlKey' | 'metaKey' | 'deltaMode' | 'deltaX' | 'deltaY' | 'wheelDelta'>): number | null;
|
|
9
10
|
/**
|
|
10
11
|
* IRenderModule for the slide main canvas.
|
|
11
12
|
*
|
|
@@ -35,7 +36,6 @@ export declare class SlideRenderController extends RxDisposable implements IRend
|
|
|
35
36
|
private _pageHeight;
|
|
36
37
|
private _sceneType;
|
|
37
38
|
private _showPlaceholder;
|
|
38
|
-
private _coreRenderArea?;
|
|
39
39
|
private readonly _renderObjectMap;
|
|
40
40
|
private readonly _objectProvider;
|
|
41
41
|
/** True while a real-time transform-preview mutation is in flight. Suppresses full redraws from update$. */
|
|
@@ -10,7 +10,7 @@ import { ICommandService, Injector, IUniverInstanceService, RxDisposable } from
|
|
|
10
10
|
*
|
|
11
11
|
* 1. Reads the adjustment-handle positions from `ShapeModel.getDrawingPoints()`.
|
|
12
12
|
* 2. Creates a `SlideAdjustPointObject` for each handle in the scene.
|
|
13
|
-
* 3. On pointer-drag of a handle, recomputes
|
|
13
|
+
* 3. On pointer-drag of a handle, recomputes all bound values via `ShapeModel.calcAdjValues()`
|
|
14
14
|
* and updates the drawing data in `ISlideDrawingService`.
|
|
15
15
|
*
|
|
16
16
|
* The controller also handles Image elements — when an image has a `prstGeom` set (for
|
|
@@ -22,6 +22,7 @@ export declare function shouldKeepSlideHostContentMounted(params: {
|
|
|
22
22
|
focusedUnitId?: string | null;
|
|
23
23
|
embedFocusOwner?: Pick<IEmbeddedFocusOwner, 'hostUnitId' | 'childUnitId'> | null;
|
|
24
24
|
activeEmbedChildUnitIds?: readonly string[];
|
|
25
|
+
activeSlideEditorUnitId?: string | null;
|
|
25
26
|
hasHostPreservingChildFocusLease?: boolean;
|
|
26
27
|
}): boolean;
|
|
27
28
|
export declare function normalizeSlideFocusedUnitId(unitId: string | void | null | undefined): string | null;
|
|
@@ -13,6 +13,8 @@ declare const locale: {
|
|
|
13
13
|
table: string;
|
|
14
14
|
shape: string;
|
|
15
15
|
chart: string;
|
|
16
|
+
symbol: string;
|
|
17
|
+
emoji: string;
|
|
16
18
|
};
|
|
17
19
|
tableSizePicker: {
|
|
18
20
|
title: string;
|
|
@@ -33,6 +35,12 @@ declare const locale: {
|
|
|
33
35
|
caption: string;
|
|
34
36
|
tooltip: string;
|
|
35
37
|
};
|
|
38
|
+
display: {
|
|
39
|
+
slideSize: string;
|
|
40
|
+
widescreen: string;
|
|
41
|
+
standard: string;
|
|
42
|
+
fullscreen: string;
|
|
43
|
+
};
|
|
36
44
|
editorToolbar: {
|
|
37
45
|
fontFamily: string;
|
|
38
46
|
fontSize: string;
|
|
@@ -284,6 +292,7 @@ declare const locale: {
|
|
|
284
292
|
};
|
|
285
293
|
objectListPanel: {
|
|
286
294
|
title: string;
|
|
295
|
+
open: string;
|
|
287
296
|
showAll: string;
|
|
288
297
|
hideAll: string;
|
|
289
298
|
show: string;
|
|
@@ -2,7 +2,7 @@ import type { IAccessor } from '@univerjs/core';
|
|
|
2
2
|
import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui';
|
|
3
3
|
import type { LocaleKey } from '../locale/types';
|
|
4
4
|
export declare const SLIDE_CONTEXT_MENU_ARRANGE_ID = "slide.contextmenu.arrange";
|
|
5
|
-
export declare function SlideContextMenuArrangeFactory(): IMenuSelectorItem<LocaleKey>;
|
|
5
|
+
export declare function SlideContextMenuArrangeFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
|
|
6
6
|
export declare function SlideContextMenuArrangeForwardFactory(): IMenuButtonItem<LocaleKey>;
|
|
7
7
|
export declare function SlideContextMenuArrangeBackwardFactory(): IMenuButtonItem<LocaleKey>;
|
|
8
8
|
export declare function SlideContextMenuArrangeFrontFactory(): IMenuButtonItem<LocaleKey>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IAccessor } from '@univerjs/core';
|
|
2
|
+
import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui';
|
|
3
|
+
import type { LocaleKey } from '../locale/types';
|
|
4
|
+
import { SlidePageSizePresetEnum } from '@univerjs-pro/slides';
|
|
5
|
+
export declare const SLIDE_ZOOM_RATIO_MENU_ID = "slide.menu.zoom-ratio";
|
|
6
|
+
export declare function SlidePageSizeMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, SlidePageSizePresetEnum | undefined, SlidePageSizePresetEnum>;
|
|
7
|
+
export declare function SlideFullscreenMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
|
|
8
|
+
export declare function SlideZoomRatioMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey, number>;
|
|
@@ -5,9 +5,13 @@ export declare const SLIDE_INSERT_TEXT_MENU_ID = "slide.menu.insert.text";
|
|
|
5
5
|
export declare const SLIDE_INSERT_IMAGE_MENU_ID = "slide.menu.insert.image";
|
|
6
6
|
export declare const SLIDE_INSERT_TABLE_MENU_ID = "slide.menu.insert.table";
|
|
7
7
|
export declare const SLIDE_INSERT_SHAPE_MENU_ID = "slide.menu.insert.shape";
|
|
8
|
+
export declare const SLIDE_INSERT_SYMBOL_MENU_ID = "slide.menu.insert.symbol";
|
|
9
|
+
export declare const SLIDE_INSERT_EMOJI_MENU_ID = "slide.menu.insert.emoji";
|
|
8
10
|
export declare function SlideInsertSearchMenuFactory(): IMenuSelectorItem<LocaleKey>;
|
|
9
11
|
export declare function SlideInsertTextMenuFactory(): IMenuSelectorItem<LocaleKey, 'horizontal' | 'vertical', 'horizontal' | 'vertical'>;
|
|
10
12
|
export declare function SlideInsertImageMenuFactory(): IMenuButtonItem<LocaleKey>;
|
|
11
13
|
export declare function SlideInsertTableMenuFactory(): IMenuSelectorItem<LocaleKey>;
|
|
12
14
|
export declare function SlideInsertShapeMenuFactory(): IMenuSelectorItem<LocaleKey>;
|
|
13
15
|
export declare function SlideInsertChartMenuFactory(): IMenuButtonItem<LocaleKey>;
|
|
16
|
+
export declare function SlideInsertSymbolMenuFactory(): IMenuSelectorItem<LocaleKey, string, string>;
|
|
17
|
+
export declare function SlideInsertEmojiMenuFactory(): IMenuSelectorItem<LocaleKey, string, string>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { IShapeShadowEffect } from '@univerjs-pro/engine-shape';
|
|
2
1
|
import type { ISlideConnectionSite } from '@univerjs-pro/slides';
|
|
3
|
-
import type { IImageIoService } from '@univerjs/core';
|
|
2
|
+
import type { IGlowEffect, IImageIoService, IShadowEffect } from '@univerjs/core';
|
|
4
3
|
import type { IImageProps, IViewportInfo, UniverRenderingContext } from '@univerjs/engine-render';
|
|
5
4
|
import { SlidePresentationBackgroundGraphicFitEnum } from '@univerjs-pro/slides';
|
|
6
5
|
import { ImageSourceType } from '@univerjs/core';
|
|
7
6
|
import { Image } from '@univerjs/engine-render';
|
|
8
7
|
export interface ISlideImageObjectProps extends IImageProps {
|
|
9
8
|
backgroundImageFit?: SlidePresentationBackgroundGraphicFitEnum;
|
|
10
|
-
outerShadow?:
|
|
9
|
+
outerShadow?: IShadowEffect;
|
|
10
|
+
glow?: IGlowEffect;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Slide image runtime object.
|
|
@@ -19,6 +19,7 @@ export interface ISlideImageObjectProps extends IImageProps {
|
|
|
19
19
|
export declare class SlideImageObject extends Image {
|
|
20
20
|
private readonly _backgroundImageFit?;
|
|
21
21
|
private readonly _outerShadow?;
|
|
22
|
+
private readonly _glow?;
|
|
22
23
|
constructor(key: string, props: ISlideImageObjectProps);
|
|
23
24
|
/** Rectangle-like default connection sites: top/right/bottom/left. */
|
|
24
25
|
getConnectionSites(): ISlideConnectionSite[];
|
|
@@ -26,7 +27,7 @@ export declare class SlideImageObject extends Image {
|
|
|
26
27
|
setNativeImage(native: HTMLImageElement): void;
|
|
27
28
|
protected _draw(ctx: UniverRenderingContext, bounds?: IViewportInfo, renderWidth?: number, renderHeight?: number): void;
|
|
28
29
|
private _drawPictureStroke;
|
|
29
|
-
private
|
|
30
|
+
private _drawPictureEffects;
|
|
30
31
|
private _tracePicturePath;
|
|
31
32
|
private _applyResolvedSource;
|
|
32
33
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IShapeRect } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { IShapeFormulaPresentation } from '@univerjs-pro/shape-editor';
|
|
2
3
|
import type { ISlideShapeElement } from '@univerjs-pro/slides';
|
|
3
4
|
import type { LocaleService } from '@univerjs/core';
|
|
4
5
|
import type { IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
@@ -20,6 +21,8 @@ export interface ISlideShapeObjectProps {
|
|
|
20
21
|
shapeModel: ShapeModel;
|
|
21
22
|
element: ISlideShapeElement;
|
|
22
23
|
localeService?: LocaleService;
|
|
24
|
+
formulaPresentation?: IShapeFormulaPresentation;
|
|
25
|
+
animateFormulaPresentation?: boolean;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
28
|
* Canvas runtime object for slide shape drawing.
|
|
@@ -36,7 +39,9 @@ export declare class SlideShapeObject extends Shape<ISlideShapeObjectProps> {
|
|
|
36
39
|
private _element;
|
|
37
40
|
private _isEditing;
|
|
38
41
|
private readonly _documentTextRenderCache;
|
|
42
|
+
private readonly _formulaAnimation;
|
|
39
43
|
private _fillImage?;
|
|
44
|
+
private _formulaPresentation?;
|
|
40
45
|
isDrawingObject: boolean;
|
|
41
46
|
constructor(key: string, config: ISlideShapeObjectProps);
|
|
42
47
|
updateElement(element: ISlideShapeElement): void;
|
|
@@ -54,9 +59,11 @@ export declare class SlideShapeObject extends Shape<ISlideShapeObjectProps> {
|
|
|
54
59
|
getTextRect(width: number, height: number): IShapeRect;
|
|
55
60
|
setEditing(isEditing: boolean): void;
|
|
56
61
|
setFillImage(image?: HTMLImageElement): void;
|
|
62
|
+
setFormulaPresentation(presentation: IShapeFormulaPresentation | undefined, animate?: boolean): void;
|
|
57
63
|
private _applyNoWrapAutoFitSize;
|
|
58
64
|
_draw(ctx: UniverRenderingContext, _bounds?: IViewportInfo, renderWidth?: number, renderHeight?: number): void;
|
|
59
65
|
private _drawShapeText;
|
|
66
|
+
private _drawShapeTextLayer;
|
|
60
67
|
private _applyReadableTextFlip;
|
|
61
68
|
private _renderShapePath;
|
|
62
69
|
render(mainCtx: UniverRenderingContext, bounds: IViewportInfo): this;
|
|
@@ -84,7 +84,7 @@ export declare class SlideTableObject extends Rect<ISlideTableObjectProps> {
|
|
|
84
84
|
isHit(coord: Vector2): boolean;
|
|
85
85
|
getCellTextRect(row: number, column: number, width?: number, height?: number): ISlideTableCellTextRect | null;
|
|
86
86
|
_draw(ctx: UniverRenderingContext, _bounds?: IViewportInfo, renderWidth?: number, renderHeight?: number): void;
|
|
87
|
-
private
|
|
87
|
+
private _drawTableEffects;
|
|
88
88
|
private _drawRowFills;
|
|
89
89
|
private _drawGrid;
|
|
90
90
|
private _drawTableOutline;
|
|
@@ -5,6 +5,7 @@ import { Disposable } from '@univerjs/core';
|
|
|
5
5
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
6
6
|
import { ICanvasPopupService } from '@univerjs/ui';
|
|
7
7
|
export interface ISlideCanvasPopup extends Pick<IPopup, 'componentKey' | 'direction' | 'excludeOutside' | 'hideOnInvisible' | 'offset' | 'onClickOutside'> {
|
|
8
|
+
anchorBoundResolver?: (targetObject: BaseObject) => IBoundRectNoAngle;
|
|
8
9
|
extraProps?: Record<string, unknown>;
|
|
9
10
|
mask?: boolean;
|
|
10
11
|
}
|
|
@@ -43,6 +43,8 @@ export interface ISlideEmbedFloatDomRendererProps {
|
|
|
43
43
|
onRuntimeStageEnter?: (stage: 'inactive' | 'stage1' | 'stage2') => void;
|
|
44
44
|
floatingChromeZIndex?: number;
|
|
45
45
|
enableStage1BodyDrag?: boolean;
|
|
46
|
+
fullscreenButtonInBlock?: boolean;
|
|
47
|
+
deferInactiveFloatingChrome?: boolean;
|
|
46
48
|
isExternalHostInteraction?: (event: PointerEvent) => boolean;
|
|
47
49
|
}
|
|
48
50
|
export interface ISlideEmbedFloatDomRenderer {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ISlideInsertShapeOptions, ISlideInsertTextBoxOptions } from '@univerjs-pro/slides';
|
|
2
2
|
import type { ImageSourceType } from '@univerjs/core';
|
|
3
|
-
import { ICommandService, IImageIoService, IUniverInstanceService } from '@univerjs/core';
|
|
3
|
+
import { ICommandService, IImageIoService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
4
4
|
import { SlideTextEditingService } from '../slide-editor/services/slide-text-editing.service';
|
|
5
5
|
import { ISlideDrawingStateService } from './slide-drawing-state.service';
|
|
6
6
|
export interface ISlideInsertTableOptions {
|
|
@@ -15,7 +15,8 @@ export declare class SlideInsertService {
|
|
|
15
15
|
private readonly _textEditingService;
|
|
16
16
|
private readonly _imageIoService;
|
|
17
17
|
private readonly _drawingStateService;
|
|
18
|
-
|
|
18
|
+
private readonly _localeService;
|
|
19
|
+
constructor(_instanceService: IUniverInstanceService, _commandService: ICommandService, _textEditingService: SlideTextEditingService, _imageIoService: IImageIoService, _drawingStateService: ISlideDrawingStateService, _localeService: LocaleService);
|
|
19
20
|
insertShape(options: ISlideInsertShapeOptions): boolean;
|
|
20
21
|
private _insertShape;
|
|
21
22
|
insertTextBox(options?: ISlideInsertTextBoxOptions): boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UnitModel } from '@univerjs/core';
|
|
2
2
|
import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
+
import { ShapeFormulaService } from '@univerjs-pro/shape-editor';
|
|
3
4
|
import { ISlideDrawingService } from '@univerjs-pro/slides';
|
|
4
5
|
import { IContextService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
5
6
|
import { SlideHitTestService } from '../../services/slide-hit-test.service';
|
|
@@ -10,9 +11,10 @@ export declare class SlideTextEditingRenderController extends RxDisposable imple
|
|
|
10
11
|
private readonly _slideDrawingService;
|
|
11
12
|
private readonly _hitTestService;
|
|
12
13
|
private readonly _slideTextEditingService;
|
|
14
|
+
private readonly _shapeFormulaService;
|
|
13
15
|
private readonly _contextService;
|
|
14
16
|
private _ignoreFocusChangesUntil;
|
|
15
|
-
constructor(_renderContext: IRenderContext<UnitModel>, _instanceService: IUniverInstanceService, _slideDrawingService: ISlideDrawingService, _hitTestService: SlideHitTestService, _slideTextEditingService: SlideTextEditingService, _contextService: IContextService);
|
|
17
|
+
constructor(_renderContext: IRenderContext<UnitModel>, _instanceService: IUniverInstanceService, _slideDrawingService: ISlideDrawingService, _hitTestService: SlideHitTestService, _slideTextEditingService: SlideTextEditingService, _shapeFormulaService: ShapeFormulaService, _contextService: IContextService);
|
|
16
18
|
private _shouldIgnoreFocusChanges;
|
|
17
19
|
private _shouldIgnorePointerFocusChanges;
|
|
18
20
|
private _init;
|
|
@@ -2,7 +2,6 @@ import type { BooleanNumber, HorizontalAlign, IDocumentData, LocaleService, Wrap
|
|
|
2
2
|
import type { IEditorUIDocumentLayout, IEditorUILayoutMeasurement, IEditorUIRect } from '../types';
|
|
3
3
|
import { DocumentDataModel, VerticalAlign } from '@univerjs/core';
|
|
4
4
|
import { Documents, DocumentSkeleton, DocumentViewModel, UniverRenderingContext } from '@univerjs/engine-render';
|
|
5
|
-
export { getShapeTextOpticalVerticalOffset } from '@univerjs-pro/shape-editor-ui';
|
|
6
5
|
export interface IRenderEditorUIDocumentBaseOptions {
|
|
7
6
|
documentData: IDocumentData;
|
|
8
7
|
size: Pick<IEditorUIRect, 'width' | 'height'>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { ISlideDrawing, ISlidePageElement } from '@univerjs-pro/slides';
|
|
1
|
+
import type { ISlideDrawing, ISlidePageElement, ISlidePlaceholderElement } from '@univerjs-pro/slides';
|
|
2
2
|
import type { LocaleService } from '@univerjs/core';
|
|
3
3
|
import { PlaceholderTypeEnum } from '@univerjs-pro/slides';
|
|
4
4
|
export declare const TEXT_PLACEHOLDER_TYPES: Set<PlaceholderTypeEnum>;
|
|
5
|
+
export declare function hasPlaceholderUserText(element: ISlidePlaceholderElement): boolean;
|
|
5
6
|
export declare function resolveDrawingText(drawing: ISlideDrawing, localeService: LocaleService): string;
|
|
6
7
|
/**
|
|
7
8
|
* Resolve editor initial text for inline editing.
|
|
@@ -1 +1,12 @@
|
|
|
1
|
+
import type { IShapeTextEditingParams } from '@univerjs-pro/shape-editor-ui';
|
|
2
|
+
import type { Nullable } from '@univerjs/core';
|
|
3
|
+
import type { ISlideTextEditingParams } from '../../services/slide-text-editing.service';
|
|
4
|
+
import { SlideTextEditingService } from '../../services/slide-text-editing.service';
|
|
1
5
|
export declare const ShapeTextEditorContainer: import("react").MemoExoticComponent<() => import("react").JSX.Element>;
|
|
6
|
+
export declare function createSlideShapeTextEditingService(editingService: Pick<SlideTextEditingService, 'cancelEditing' | 'completeEditing' | 'editingParams$' | 'getEditing' | 'onSavingEditorData$' | 'setEditing'>, restoreCanvasFocus: (unitId: string) => void): {
|
|
7
|
+
editingParams$: import("rxjs").Observable<Nullable<ISlideTextEditingParams>>;
|
|
8
|
+
onSavingEditorData$: import("rxjs").Observable<Nullable<boolean>>;
|
|
9
|
+
setEditing: (params: Nullable<IShapeTextEditingParams>) => void;
|
|
10
|
+
completeEditing: (event?: PointerEvent) => void;
|
|
11
|
+
cancelEditing: () => void;
|
|
12
|
+
};
|
|
@@ -10,6 +10,7 @@ export interface IRenderConvertContext {
|
|
|
10
10
|
orderIndex: number;
|
|
11
11
|
sceneType?: SlideSceneTypeEnum;
|
|
12
12
|
showPlaceholder?: boolean;
|
|
13
|
+
animateFormulaPresentationOnCreate?: boolean;
|
|
13
14
|
requestRender?: () => void;
|
|
14
15
|
}
|
|
15
16
|
export declare abstract class ObjectAdaptor {
|
|
@@ -2,19 +2,23 @@ import type { ISlideDrawing } from '@univerjs-pro/slides';
|
|
|
2
2
|
import type { Nullable } from '@univerjs/core';
|
|
3
3
|
import type { BaseObject } from '@univerjs/engine-render';
|
|
4
4
|
import type { IRenderConvertContext } from '../adaptor';
|
|
5
|
+
import { ShapeFormulaService } from '@univerjs-pro/shape-editor';
|
|
5
6
|
import { IImageIoService, LocaleService } from '@univerjs/core';
|
|
6
7
|
import { SlideTextEditingService } from '../../../slide-editor/services/slide-text-editing.service';
|
|
7
8
|
import { ObjectAdaptor } from '../adaptor';
|
|
8
9
|
export declare class ShapeObjectAdaptor extends ObjectAdaptor {
|
|
9
10
|
private readonly _localeService;
|
|
10
11
|
private readonly _imageIoService;
|
|
12
|
+
private readonly _shapeFormulaService;
|
|
11
13
|
private readonly _slideTextEditingService?;
|
|
12
14
|
zIndex: number;
|
|
13
15
|
private static readonly _globalImageNativeCache;
|
|
14
16
|
private static readonly _globalImageLoadingCache;
|
|
15
|
-
|
|
17
|
+
private readonly _formulaPresentations;
|
|
18
|
+
constructor(_localeService: LocaleService, _imageIoService: IImageIoService, _shapeFormulaService: ShapeFormulaService, _slideTextEditingService?: SlideTextEditingService | undefined);
|
|
16
19
|
check(drawing: ISlideDrawing): boolean;
|
|
17
20
|
convert(drawing: ISlideDrawing, ctx: IRenderConvertContext): Nullable<BaseObject>;
|
|
21
|
+
private _shouldAnimateFormulaPresentation;
|
|
18
22
|
private _loadShapePictureFill;
|
|
19
23
|
private _getOrCreateImageLoadingPromise;
|
|
20
24
|
private _isEditingDrawing;
|