@univerjs/slides-ui 0.2.7 → 0.2.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.
Files changed (45) hide show
  1. package/lib/cjs/index.js +3 -3
  2. package/lib/es/index.js +781 -395
  3. package/lib/types/commands/operations/activate.operation.d.ts +1 -1
  4. package/lib/types/commands/operations/append-slide.operation.d.ts +5 -3
  5. package/lib/types/commands/operations/delete-element.operation.d.ts +1 -1
  6. package/lib/types/commands/operations/insert-image.operation.d.ts +1 -1
  7. package/lib/types/commands/operations/insert-shape.operation.d.ts +2 -1
  8. package/lib/types/commands/operations/insert-text.operation.d.ts +2 -1
  9. package/lib/types/commands/operations/set-thumb.operation.d.ts +3 -1
  10. package/lib/types/commands/operations/text-edit.operation.d.ts +0 -1
  11. package/lib/types/commands/operations/update-element.operation.d.ts +1 -1
  12. package/lib/types/components/image-popup-menu/ImagePopupMenu.d.ts +0 -1
  13. package/lib/types/components/panels/ArrangePanel.d.ts +1 -1
  14. package/lib/types/components/panels/FillPanel.d.ts +1 -1
  15. package/lib/types/components/panels/TransformPanel.d.ts +1 -1
  16. package/lib/types/components/sidebar/Sidebar.d.ts +0 -1
  17. package/lib/types/components/slide-bar/SlideBar.d.ts +0 -1
  18. package/lib/types/components/upload-component/UploadFile.d.ts +0 -1
  19. package/lib/types/components/upload-component/component-name.d.ts +1 -1
  20. package/lib/types/const.d.ts +16 -0
  21. package/lib/types/controllers/canvas-view.d.ts +22 -0
  22. package/lib/types/controllers/image.menu.d.ts +0 -1
  23. package/lib/types/controllers/popup-menu.controller.d.ts +1 -2
  24. package/lib/types/controllers/shape.menu.d.ts +0 -1
  25. package/lib/types/controllers/shortcuts/editor.shortcuts.d.ts +0 -1
  26. package/lib/types/controllers/shortcuts/utils.d.ts +0 -1
  27. package/lib/types/controllers/slide-editing.render-controller.d.ts +5 -20
  28. package/lib/types/controllers/slide-editor-bridge.render-controller.d.ts +6 -14
  29. package/lib/types/controllers/slide-ui.controller.d.ts +0 -1
  30. package/lib/types/controllers/slide.render-controller.d.ts +53 -8
  31. package/lib/types/controllers/text.menu.d.ts +0 -1
  32. package/lib/types/index.d.ts +9 -2
  33. package/lib/types/locale/en-US.d.ts +0 -1
  34. package/lib/types/locale/ru-RU.d.ts +0 -1
  35. package/lib/types/locale/vi-VN.d.ts +0 -1
  36. package/lib/types/locale/zh-TW.d.ts +0 -1
  37. package/lib/types/services/slide-editor-bridge.service.d.ts +10 -5
  38. package/lib/types/services/slide-editor-manager.service.d.ts +0 -1
  39. package/lib/types/services/slide-popup-manager.service.d.ts +1 -2
  40. package/lib/types/services/slide-render.service.d.ts +16 -0
  41. package/lib/types/slides-ui-plugin.d.ts +0 -1
  42. package/lib/types/type.d.ts +6 -0
  43. package/lib/types/views/editor-container/EditorContainer.d.ts +1 -2
  44. package/lib/umd/index.js +3 -3
  45. package/package.json +18 -18
@@ -1,6 +1,6 @@
1
1
  import { IOperation } from '@univerjs/core';
2
-
3
2
  export interface IActiveSlidePageOperationParams {
3
+ unitId: string;
4
4
  id: string;
5
5
  }
6
6
  export declare const ActivateSlidePageOperation: IOperation<IActiveSlidePageOperationParams>;
@@ -1,3 +1,5 @@
1
- import { ICommand } from '@univerjs/core';
2
-
3
- export declare const AppendSlideOperation: ICommand;
1
+ import { IOperation } from '@univerjs/core';
2
+ export interface IAppendSlideOperationParams {
3
+ unitId: string;
4
+ }
5
+ export declare const AppendSlideOperation: IOperation<IAppendSlideOperationParams>;
@@ -1,6 +1,6 @@
1
1
  import { ICommand } from '@univerjs/core';
2
-
3
2
  export interface IDeleteElementOperationParams {
3
+ unitId: string;
4
4
  id: string;
5
5
  }
6
6
  export declare const DeleteSlideElementOperation: ICommand<IDeleteElementOperationParams>;
@@ -1,6 +1,6 @@
1
1
  import { ICommand, Nullable } from '@univerjs/core';
2
-
3
2
  export interface IInsertImageOperationParams {
4
3
  files: Nullable<File[]>;
4
+ unitId: string;
5
5
  }
6
6
  export declare const InsertSlideFloatImageOperation: ICommand<IInsertImageOperationParams>;
@@ -1,8 +1,9 @@
1
1
  import { ICommand } from '@univerjs/core';
2
2
  import { ObjectType } from '@univerjs/engine-render';
3
-
4
3
  export interface IInsertShapeOperationParams {
4
+ unitId: string;
5
5
  }
6
+ export declare const InsertSlideShapeRectangleCommand: ICommand;
6
7
  export declare const InsertSlideShapeRectangleOperation: ICommand<IInsertShapeOperationParams>;
7
8
  export interface IToggleSlideEditSidebarOperation {
8
9
  visible: string;
@@ -1,6 +1,7 @@
1
1
  import { ICommand } from '@univerjs/core';
2
-
3
2
  export interface ISlideAddTextParam {
4
3
  text: string;
4
+ unitId: string;
5
5
  }
6
+ export declare const SlideAddTextCommand: ICommand;
6
7
  export declare const SlideAddTextOperation: ICommand<ISlideAddTextParam>;
@@ -1,3 +1,5 @@
1
1
  import { IOperation } from '@univerjs/core';
2
-
2
+ export interface ISlideSetThumbParam {
3
+ unitId: string;
4
+ }
3
5
  export declare const SetSlidePageThumbOperation: IOperation;
@@ -1,3 +1,2 @@
1
1
  import { IOperation } from '@univerjs/core';
2
-
3
2
  export declare const SetTextEditArrowOperation: IOperation<any>;
@@ -1,6 +1,6 @@
1
1
  import { ICommand } from '@univerjs/core';
2
-
3
2
  export interface IUpdateElementOperationParams {
3
+ unitId: string;
4
4
  oKey: string;
5
5
  props: Record<string, any>;
6
6
  }
@@ -1,6 +1,5 @@
1
1
  import { IDrawingSearch } from '@univerjs/core';
2
2
  import { default as React } from 'react';
3
-
4
3
  export interface IImagePopupMenuItem {
5
4
  label: string;
6
5
  index: number;
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface IProps {
3
+ pageId: string;
4
4
  unitId: string;
5
5
  }
6
6
  export default function ArrangePanel(props: IProps): React.JSX.Element | null;
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface IProps {
3
+ pageId: string;
4
4
  unitId: string;
5
5
  }
6
6
  export default function ArrangePanel(props: IProps): React.JSX.Element | null;
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface IProps {
3
+ pageId: string;
4
4
  unitId: string;
5
5
  }
6
6
  export default function TransformPanel(props: IProps): React.JSX.Element | null;
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare const COMPONENT_SLIDE_SIDEBAR = "COMPONENT_SLIDE_SIDEBAR";
4
3
  export default function RectSidebar(): React.JSX.Element | null;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  /**
4
3
  * This components works as the root component of the left Sidebar of Slide.
5
4
  */
@@ -2,7 +2,6 @@ import { Nullable } from '@univerjs/core';
2
2
  import { default as React } from 'react';
3
3
  import { ICustomComponentProps } from '@univerjs/ui';
4
4
  import { UploadFileType } from './component-name';
5
-
6
5
  export interface IUploadFileProps extends ICustomComponentProps<Nullable<File>> {
7
6
  type: UploadFileType;
8
7
  }
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const COMPONENT_UPLOAD_FILE_MENU = "COMPONENT_UPLOAD_FILE_MENU";
16
+ export declare const COMPONENT_UPLOAD_FILE_MENU = "SLIDE_COMPONENT_UPLOAD_FILE_MENU";
17
17
  export declare enum UploadFileType {
18
18
  cellImage = 0,
19
19
  floatImage = 1
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export declare const SLIDE_EDITOR_ID: string;
@@ -0,0 +1,22 @@
1
+ import { IPageElement, Nullable, RxDisposable } from '@univerjs/core';
2
+ import { BaseObject, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
3
+ import { PageID } from '../type';
4
+ export declare class CanvasView extends RxDisposable implements IRenderModule {
5
+ private readonly _renderManagerService;
6
+ constructor(_renderManagerService: IRenderManagerService);
7
+ private _getSlideRenderControllerFromRenderUnit;
8
+ createThumbs(unitId: string): void;
9
+ activePage(pageId: string, unitId: string): void;
10
+ getRenderUnitByPageId(pageId: PageID, unitId: string): {
11
+ scene: import('@univerjs/engine-render').Scene;
12
+ engine: import('@univerjs/engine-render').Engine;
13
+ unit: import('@univerjs/core').UnitModel<object, number>;
14
+ };
15
+ createObjectToPage(element: IPageElement, pageID: PageID, unitId: string): Nullable<BaseObject>;
16
+ setObjectActiveByPage(obj: BaseObject, pageID: PageID, unitId: string): void;
17
+ removeObjectById(id: string, pageID: PageID, unitId: string): void;
18
+ /**
19
+ * append blank page
20
+ */
21
+ appendPage(unitId: string): void;
22
+ }
@@ -1,6 +1,5 @@
1
1
  import { IMenuItem } from '@univerjs/ui';
2
2
  import { IAccessor } from '@univerjs/core';
3
-
4
3
  export declare const IMAGE_UPLOAD_ICON = "addition-and-subtraction-single";
5
4
  export declare const IMAGE_MENU_ID = "slide.menu.image";
6
5
  export declare function SlideImageMenuFactory(accessor: IAccessor): IMenuItem;
@@ -1,9 +1,8 @@
1
1
  import { ICommandService, IContextService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
2
2
  import { IRenderManagerService } from '@univerjs/engine-render';
3
3
  import { ISidebarService } from '@univerjs/ui';
4
- import { CanvasView } from '@univerjs/slides';
5
4
  import { SlideCanvasPopMangerService } from '../services/slide-popup-manager.service';
6
-
5
+ import { CanvasView } from './canvas-view';
7
6
  export declare class SlidePopupMenuController extends RxDisposable {
8
7
  private readonly _canvasPopManagerService;
9
8
  private readonly _renderManagerService;
@@ -1,6 +1,5 @@
1
1
  import { IMenuButtonItem, IMenuItem } from '@univerjs/ui';
2
2
  import { IAccessor } from '@univerjs/core';
3
-
4
3
  export declare const GRAPH_SINGLE_ICON = "graph-single";
5
4
  export declare const SHAPE_MENU_ID = "slide.menu.shape";
6
5
  export declare function SlideShapeMenuFactory(accessor: IAccessor): IMenuItem;
@@ -1,5 +1,4 @@
1
1
  import { IShortcutItem, KeyCode } from '@univerjs/ui';
2
-
3
2
  export declare const ARROW_SELECTION_KEYCODE_LIST: KeyCode[];
4
3
  export declare const MOVE_SELECTION_KEYCODE_LIST: KeyCode[];
5
4
  export declare function generateArrowSelectionShortCutItem(): IShortcutItem<object>[];
@@ -1,5 +1,4 @@
1
1
  import { IContextService } from '@univerjs/core';
2
-
3
2
  export declare function whenSheetFocused(contextService: IContextService): boolean;
4
3
  /**
5
4
  * Requires the currently focused unit to be Workbook and the sheet editor is focused but not activated.
@@ -1,10 +1,9 @@
1
- import { Nullable, UnitModel, Disposable, ICommandService, IContextService, IResourceLoaderService, IUndoRedoService, IUniverInstanceService, LocaleService } from '@univerjs/core';
1
+ import { Nullable, UnitModel, Disposable, ICommandService, IContextService, IUndoRedoService, IUniverInstanceService, LocaleService } from '@univerjs/core';
2
2
  import { IDocObjectParam, TextSelectionManagerService } from '@univerjs/docs';
3
3
  import { IRenderContext, IRenderModule, IRenderManagerService, ITextSelectionRenderManager } from '@univerjs/engine-render';
4
4
  import { IEditorService, ILayoutService } from '@univerjs/ui';
5
5
  import { ISlideEditorBridgeService } from '../services/slide-editor-bridge.service';
6
6
  import { ISlideEditorManagerService } from '../services/slide-editor-manager.service';
7
-
8
7
  export declare class SlideEditingRenderController extends Disposable implements IRenderModule {
9
8
  private readonly _renderContext;
10
9
  private readonly _layoutService;
@@ -19,7 +18,6 @@ export declare class SlideEditingRenderController extends Disposable implements
19
18
  private readonly _commandService;
20
19
  protected readonly _localService: LocaleService;
21
20
  private readonly _editorService;
22
- private readonly _resourceLoaderService;
23
21
  /**
24
22
  * It is used to distinguish whether the user has actively moved the cursor in the editor, mainly through mouse clicks.
25
23
  */
@@ -27,7 +25,7 @@ export declare class SlideEditingRenderController extends Disposable implements
27
25
  /** If the corresponding unit is active and prepared for editing. */
28
26
  private _isUnitEditing;
29
27
  private _d;
30
- constructor(_renderContext: IRenderContext<UnitModel>, _layoutService: ILayoutService, _undoRedoService: IUndoRedoService, _contextService: IContextService, _instanceSrv: IUniverInstanceService, _renderManagerService: IRenderManagerService, _editorBridgeService: ISlideEditorBridgeService, _cellEditorManagerService: ISlideEditorManagerService, _textSelectionRenderManager: ITextSelectionRenderManager, _textSelectionManagerService: TextSelectionManagerService, _commandService: ICommandService, _localService: LocaleService, _editorService: IEditorService, _resourceLoaderService: IResourceLoaderService);
28
+ constructor(_renderContext: IRenderContext<UnitModel>, _layoutService: ILayoutService, _undoRedoService: IUndoRedoService, _contextService: IContextService, _instanceSrv: IUniverInstanceService, _renderManagerService: IRenderManagerService, _editorBridgeService: ISlideEditorBridgeService, _cellEditorManagerService: ISlideEditorManagerService, _textSelectionRenderManager: ITextSelectionRenderManager, _textSelectionManagerService: TextSelectionManagerService, _commandService: ICommandService, _localService: LocaleService, _editorService: IEditorService);
31
29
  dispose(): void;
32
30
  private _disposeCurrent;
33
31
  private _init;
@@ -42,16 +40,7 @@ export declare class SlideEditingRenderController extends Disposable implements
42
40
  */
43
41
  private _subscribeToCurrentCell;
44
42
  /**
45
- * set size and pos of editing area
46
- * invoked by _handleEditorVisible
47
- *
48
- * size & pos derives from slide-editor-bridge.service.ts@getEditRectState.position
49
- *
50
- * set pos of editing area
51
- * EditorContainer.tsx cellEditorManagerService.setFocus(true) -->
52
- * _focus$.next --> editingRenderController -->
53
- * _textSelectionRenderManager.sync() --> _updateInputPosition --> activate(left, top)
54
- *
43
+ * Set size and pos of editing area.
55
44
  * @param positionFromEditRectState
56
45
  * @param canvasOffset
57
46
  * @param documentSkeleton
@@ -74,12 +63,8 @@ export declare class SlideEditingRenderController extends Disposable implements
74
63
  */
75
64
  private _addBackground;
76
65
  /**
77
- * show input area, resize input area and then place input to right place.
78
- * invoked when this._editorBridgeService.visible$ param.visible = true
79
- *
80
- * handleVisible is the 2nd part of editing.
81
- * startEditing --> _updateEditor
82
- * startEditing --> changeVisible --> slide-editor-bridge.render-controller.ts@changeVisible --> _editorBridgeService.changeVisible
66
+ * Show input area, resize input area and then place input to right place.
67
+ * @TODO why do resize in show input area?
83
68
  * @param param
84
69
  */
85
70
  private _handleEditorVisible;
@@ -1,31 +1,23 @@
1
- import { UnitModel, ICommandService, IContextService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
2
- import { TextSelectionManagerService } from '@univerjs/docs';
3
- import { IRenderContext, IRenderModule, RichText, ITextSelectionRenderManager } from '@univerjs/engine-render';
4
- import { CanvasView } from '@univerjs/slides';
1
+ import { UnitModel, ICommandService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
2
+ import { IRenderContext, IRenderModule, RichText } from '@univerjs/engine-render';
5
3
  import { Subject } from 'rxjs';
6
4
  import { ISlideEditorBridgeService } from '../services/slide-editor-bridge.service';
7
5
  import { ISlideRichTextProps } from '../type';
8
-
9
6
  export declare class SlideEditorBridgeRenderController extends RxDisposable implements IRenderModule {
10
7
  private readonly _renderContext;
11
- private readonly _contextService;
12
8
  private readonly _instanceSrv;
13
9
  private readonly _commandService;
14
10
  private readonly _editorBridgeService;
15
- private readonly _textSelectionManagerService;
16
- private readonly _textSelectionRenderManager;
17
- private readonly _canvasView;
18
11
  /**
19
12
  * It is used to distinguish whether the user has actively moved the cursor in the editor, mainly through mouse clicks.
20
13
  */
21
- private _cursorChange;
22
14
  /** If the corresponding unit is active and prepared for editing. */
23
- private _isUnitEditing;
24
15
  setSlideTextEditor$: Subject<ISlideRichTextProps>;
25
16
  private _curRichText;
26
- constructor(_renderContext: IRenderContext<UnitModel>, _contextService: IContextService, _instanceSrv: IUniverInstanceService, _commandService: ICommandService, _editorBridgeService: ISlideEditorBridgeService, _textSelectionManagerService: TextSelectionManagerService, _textSelectionRenderManager: ITextSelectionRenderManager, _canvasView: CanvasView);
17
+ private _d;
18
+ constructor(_renderContext: IRenderContext<UnitModel>, _instanceSrv: IUniverInstanceService, _commandService: ICommandService, _editorBridgeService: ISlideEditorBridgeService);
27
19
  private _init;
28
- private _initSubjectListener;
20
+ private _disposeCurrent;
29
21
  private _setEditorRect;
30
22
  private _initEventListener;
31
23
  pickOtherObjects(): void;
@@ -42,6 +34,6 @@ export declare class SlideEditorBridgeRenderController extends RxDisposable impl
42
34
  * TODO @lumixraku need scale param
43
35
  * @param target
44
36
  */
45
- startEditing(target: RichText): void;
37
+ startEditing(pageId: string, target: RichText): void;
46
38
  setEditorVisible(visible: boolean): void;
47
39
  }
@@ -1,6 +1,5 @@
1
1
  import { DependencyOverride, Disposable, ICommandService, Injector } from '@univerjs/core';
2
2
  import { MenuConfig, ComponentManager, IMenuService, IShortcutService, IUIPartsService } from '@univerjs/ui';
3
-
4
3
  export interface IUniverSlidesDrawingConfig {
5
4
  menu?: MenuConfig;
6
5
  override?: DependencyOverride;
@@ -1,10 +1,55 @@
1
- import { UnitModel, RxDisposable } from '@univerjs/core';
2
- import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
- import { ISlideEditorBridgeService } from '../services/slide-editor-bridge.service';
4
-
1
+ import { IPageElement, ISlidePage, Nullable, UnitModel, Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
2
+ import { BaseObject, IRenderContext, IRenderModule, IRenderManagerService, Scene } from '@univerjs/engine-render';
3
+ import { PageID } from '../type';
5
4
  export declare class SlideRenderController extends RxDisposable implements IRenderModule {
6
- private readonly _context;
7
- private _editorBridgeService;
8
- constructor(_context: IRenderContext<UnitModel<object, number>>, _editorBridgeService: ISlideEditorBridgeService);
9
- dispose(): void;
5
+ private readonly _renderContext;
6
+ private readonly _injector;
7
+ private readonly _univerInstanceService;
8
+ private readonly _renderManagerService;
9
+ private _objectProvider;
10
+ constructor(_renderContext: IRenderContext<UnitModel>, _injector: Injector, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService);
11
+ private _addNewRender;
12
+ private _scrollToCenter;
13
+ private _currentRender;
14
+ private _refreshThumb;
15
+ /**
16
+ * @param mainScene
17
+ */
18
+ private _createSlide;
19
+ private _addBackgroundRect;
20
+ private _getCenterPositionViewPort;
21
+ private _thumbSceneRender;
22
+ /**
23
+ * CreateScene by pages, and activate first one.
24
+ * @param slideDataModel
25
+ * @param slide
26
+ */
27
+ private _createSlidePages;
28
+ private _createThumb;
29
+ /**
30
+ * SlideDataModel is UnitModel
31
+ */
32
+ private _getCurrUnitModel;
33
+ activePage(_pageId?: string): void;
34
+ createThumbs(): void;
35
+ /**
36
+ * Create scene by page and set to _sceneMap.
37
+ * @param pageId
38
+ * @param page
39
+ */
40
+ createPageScene(pageId: string, page: ISlidePage): Nullable<Scene>;
41
+ /**
42
+ * Get pageScene from Slide.
43
+ * @param pageId
44
+ * @returns {Scene, Engine, UnitModel} scene & engine & unit from renderContext
45
+ */
46
+ getPageRenderUnit(pageId: PageID): {
47
+ scene: Scene;
48
+ engine: import('@univerjs/engine-render').Engine;
49
+ unit: UnitModel<object, number>;
50
+ };
51
+ createObjectToPage(element: IPageElement, pageID: PageID): Nullable<BaseObject>;
52
+ setObjectActiveByPage(obj: BaseObject, pageID: PageID): void;
53
+ removeObjectById(id: string, pageID: PageID): void;
54
+ appendPage(): void;
10
55
  }
@@ -1,5 +1,4 @@
1
1
  import { IAccessor } from '@univerjs/core';
2
2
  import { IMenuButtonItem } from '@univerjs/ui';
3
-
4
3
  export declare const TEXT_ICON_ID = "text-single";
5
4
  export declare function SlideAddTextMenuItemFactory(_accessor: IAccessor): IMenuButtonItem;
@@ -16,12 +16,19 @@
16
16
  export { UniverSlidesUIPlugin } from './slides-ui-plugin';
17
17
  export { SlidesUIController } from './controllers/slide-ui.controller';
18
18
  export { SlideSideBar } from './components/slide-bar/SlideBar';
19
+ export { ISlideEditorBridgeService } from './services/slide-editor-bridge.service';
19
20
  export { SlideCanvasPopMangerService } from './services/slide-popup-manager.service';
20
21
  export type { IUniverSlidesDrawingConfig } from './controllers/slide-ui.controller';
21
22
  export { IMAGE_MENU_ID } from './controllers/image.menu';
22
23
  export { SHAPE_MENU_ID } from './controllers/shape.menu';
23
24
  export { ActivateSlidePageOperation } from './commands/operations/activate.operation';
25
+ export { DeleteSlideElementOperation } from './commands/operations/delete-element.operation';
26
+ export { InsertSlideFloatImageOperation } from './commands/operations/insert-image.operation';
27
+ export { InsertSlideShapeRectangleOperation, InsertSlideShapeRectangleCommand } from './commands/operations/insert-shape.operation';
24
28
  export { SetSlidePageThumbOperation } from './commands/operations/set-thumb.operation';
25
29
  export { AppendSlideOperation } from './commands/operations/append-slide.operation';
26
- export { SlideAddTextOperation } from './commands/operations/insert-text.operation';
27
- export { EditorContainer } from './views/editor-container/EditorContainer';
30
+ export { SlideAddTextOperation, SlideAddTextCommand } from './commands/operations/insert-text.operation';
31
+ export { UpdateSlideElementOperation } from './commands/operations/update-element.operation';
32
+ export { SlideEditorContainer } from './views/editor-container/EditorContainer';
33
+ export { SLIDE_EDITOR_ID } from './const';
34
+ export { CanvasView } from './controllers/canvas-view';
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,8 +1,7 @@
1
1
  import { IDisposable, IDocumentData, IPosition, Nullable, Disposable, IContextService } from '@univerjs/core';
2
2
  import { Engine, IDocumentLayoutObject, RichText, Scene, DeviceInputEventType, IRenderManagerService } from '@univerjs/engine-render';
3
3
  import { KeyCode, IEditorService } from '@univerjs/ui';
4
- import { Observable } from 'rxjs';
5
-
4
+ import { Observable, Subject } from 'rxjs';
6
5
  export declare enum SLIDE_VIEW_KEY {
7
6
  MAIN = "__SLIDERender__",
8
7
  SCENE_VIEWER = "__SLIDEViewer__",
@@ -41,6 +40,11 @@ export interface ISetEditorInfo {
41
40
  export interface ISlideEditorBridgeService {
42
41
  currentEditRectState$: Observable<Nullable<IEditorBridgeServiceParam>>;
43
42
  visible$: Observable<IEditorBridgeServiceVisibleParam>;
43
+ /**
44
+ * @deprecated This is a temp solution only for demo purposes. We should have mutations to directly write
45
+ * content to slides.
46
+ */
47
+ endEditing$: Subject<RichText>;
44
48
  dispose(): void;
45
49
  setEditorRect(param: ISetEditorInfo): void;
46
50
  getEditorRect(): ISetEditorInfo;
@@ -48,6 +52,7 @@ export interface ISlideEditorBridgeService {
48
52
  changeVisible(param: IEditorBridgeServiceVisibleParam): void;
49
53
  changeEditorDirty(dirtyStatus: boolean): void;
50
54
  getEditorDirty(): boolean;
55
+ isVisible(): boolean;
51
56
  getCurrentEditorId(): Nullable<string>;
52
57
  }
53
58
  export declare class SlideEditorBridgeService extends Disposable implements ISlideEditorBridgeService, IDisposable {
@@ -60,18 +65,18 @@ export declare class SlideEditorBridgeService extends Disposable implements ISli
60
65
  private _currentEditRectState;
61
66
  private readonly _currentEditRectState$;
62
67
  readonly currentEditRectState$: Observable<Nullable<IEditorBridgeServiceParam>>;
63
- private _visible;
68
+ private _visibleParam;
64
69
  private readonly _visible$;
65
70
  readonly visible$: Observable<IEditorBridgeServiceVisibleParam>;
66
71
  private readonly _afterVisible$;
67
72
  readonly afterVisible$: Observable<IEditorBridgeServiceVisibleParam>;
73
+ readonly endEditing$: Subject<RichText>;
68
74
  private _currentEditRectInfo;
69
75
  constructor(_editorService: IEditorService, _contextService: IContextService, _renderManagerService: IRenderManagerService);
70
76
  dispose(): void;
71
77
  getEditorRect(): ISetEditorInfo;
72
78
  /**
73
79
  * 1st part of startEditing.
74
- * editorBridgeRenderController@startEditing ---> editorBridgeRenderController@_updateEditor
75
80
  * @editorInfo editorInfo
76
81
  */
77
82
  setEditorRect(editorInfo: ISetEditorInfo): void;
@@ -84,7 +89,7 @@ export declare class SlideEditorBridgeService extends Disposable implements ISli
84
89
  */
85
90
  getEditRectState(): Readonly<Nullable<IEditorBridgeServiceParam>>;
86
91
  changeEditorDirty(dirtyStatus: boolean): void;
87
- isVisible(): IEditorBridgeServiceVisibleParam;
92
+ isVisible(): boolean;
88
93
  getEditorDirty(): boolean;
89
94
  getCurrentEditorId(): string;
90
95
  /**
@@ -1,6 +1,5 @@
1
1
  import { IDisposable, IPosition, Nullable } from '@univerjs/core';
2
2
  import { Observable } from 'rxjs';
3
-
4
3
  export interface ICellEditorManagerParam extends Partial<IPosition> {
5
4
  show: boolean;
6
5
  }
@@ -1,8 +1,7 @@
1
1
  import { IDisposable, Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
2
2
  import { IRenderManagerService, BaseObject, IBoundRectNoAngle, Scene } from '@univerjs/engine-render';
3
3
  import { IPopup, ICanvasPopupService } from '@univerjs/ui';
4
-
5
- export interface ISlideCanvasPopup extends Pick<IPopup, 'direction' | 'excludeOutside' | 'closeOnSelfTarget' | 'componentKey' | 'offset' | 'onClickOutside'> {
4
+ export interface ISlideCanvasPopup extends Pick<IPopup, 'direction' | 'excludeOutside' | 'closeOnSelfTarget' | 'componentKey' | 'offset' | 'onClickOutside' | 'hideOnInvisible'> {
6
5
  mask?: boolean;
7
6
  extraProps?: Record<string, any>;
8
7
  }
@@ -0,0 +1,16 @@
1
+ import { IContextService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
2
+ import { IRenderManagerService } from '@univerjs/engine-render';
3
+ /**
4
+ * This controller is responsible for managing units of a specific kind to be rendered on the canvas.
5
+ */
6
+ export declare class SlideRenderService extends RxDisposable {
7
+ private readonly _contextService;
8
+ private readonly _instanceSrv;
9
+ private readonly _renderManagerService;
10
+ constructor(_contextService: IContextService, _instanceSrv: IUniverInstanceService, _renderManagerService: IRenderManagerService);
11
+ private _init;
12
+ private _initSlideDataListener;
13
+ private _createRenderer;
14
+ private _disposeRenderer;
15
+ private _initContextListener;
16
+ }
@@ -1,7 +1,6 @@
1
1
  import { Injector, IUniverInstanceService, Plugin, UniverInstanceType } from '@univerjs/core';
2
2
  import { IRenderManagerService } from '@univerjs/engine-render';
3
3
  import { IUniverSlidesDrawingConfig } from './controllers/slide-ui.controller';
4
-
5
4
  export declare const SLIDE_UI_PLUGIN_NAME = "SLIDE_UI";
6
5
  export declare class UniverSlidesUIPlugin extends Plugin {
7
6
  private readonly _config;
@@ -29,3 +29,9 @@ export interface ISlideRichTextProps {
29
29
  text: string;
30
30
  fs: number;
31
31
  }
32
+ export declare enum CursorChange {
33
+ InitialState = 0,
34
+ StartEditor = 1,
35
+ CursorChange = 2
36
+ }
37
+ export type PageID = string;
@@ -1,10 +1,9 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface ICellIEditorProps {
4
3
  }
5
4
  /**
6
5
  * Floating editor's container.
7
6
  * @returns
8
7
  */
9
- export declare const EditorContainer: React.FC<ICellIEditorProps>;
8
+ export declare const SlideEditorContainer: React.FC<ICellIEditorProps>;
10
9
  export {};