@univerjs/sheets-drawing-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.
Files changed (75) hide show
  1. package/README.md +9 -5
  2. package/lib/cjs/facade.js +4 -9
  3. package/lib/cjs/index.js +780 -410
  4. package/lib/cjs/locale/ar-SA.js +1 -2
  5. package/lib/cjs/locale/ca-ES.js +1 -2
  6. package/lib/cjs/locale/de-DE.js +1 -2
  7. package/lib/cjs/locale/en-US.js +1 -2
  8. package/lib/cjs/locale/es-ES.js +1 -2
  9. package/lib/cjs/locale/fa-IR.js +1 -2
  10. package/lib/cjs/locale/fr-FR.js +1 -2
  11. package/lib/cjs/locale/id-ID.js +1 -2
  12. package/lib/cjs/locale/it-IT.js +1 -2
  13. package/lib/cjs/locale/ja-JP.js +1 -2
  14. package/lib/cjs/locale/ko-KR.js +1 -2
  15. package/lib/cjs/locale/pl-PL.js +1 -2
  16. package/lib/cjs/locale/pt-BR.js +1 -2
  17. package/lib/cjs/locale/ru-RU.js +1 -2
  18. package/lib/cjs/locale/sk-SK.js +1 -2
  19. package/lib/cjs/locale/vi-VN.js +1 -2
  20. package/lib/cjs/locale/zh-CN.js +1 -2
  21. package/lib/cjs/locale/zh-HK.js +1 -2
  22. package/lib/cjs/locale/zh-TW.js +1 -2
  23. package/lib/es/facade.js +4 -8
  24. package/lib/es/index.js +786 -416
  25. package/lib/es/locale/ar-SA.js +1 -2
  26. package/lib/es/locale/ca-ES.js +1 -2
  27. package/lib/es/locale/de-DE.js +1 -2
  28. package/lib/es/locale/en-US.js +1 -2
  29. package/lib/es/locale/es-ES.js +1 -2
  30. package/lib/es/locale/fa-IR.js +1 -2
  31. package/lib/es/locale/fr-FR.js +1 -2
  32. package/lib/es/locale/id-ID.js +1 -2
  33. package/lib/es/locale/it-IT.js +1 -2
  34. package/lib/es/locale/ja-JP.js +1 -2
  35. package/lib/es/locale/ko-KR.js +1 -2
  36. package/lib/es/locale/pl-PL.js +1 -2
  37. package/lib/es/locale/pt-BR.js +1 -2
  38. package/lib/es/locale/ru-RU.js +1 -2
  39. package/lib/es/locale/sk-SK.js +1 -2
  40. package/lib/es/locale/vi-VN.js +1 -2
  41. package/lib/es/locale/zh-CN.js +1 -2
  42. package/lib/es/locale/zh-HK.js +1 -2
  43. package/lib/es/locale/zh-TW.js +1 -2
  44. package/lib/facade.js +4 -8
  45. package/lib/index.js +786 -416
  46. package/lib/locale/ar-SA.js +1 -2
  47. package/lib/locale/ca-ES.js +1 -2
  48. package/lib/locale/de-DE.js +1 -2
  49. package/lib/locale/en-US.js +1 -2
  50. package/lib/locale/es-ES.js +1 -2
  51. package/lib/locale/fa-IR.js +1 -2
  52. package/lib/locale/fr-FR.js +1 -2
  53. package/lib/locale/id-ID.js +1 -2
  54. package/lib/locale/it-IT.js +1 -2
  55. package/lib/locale/ja-JP.js +1 -2
  56. package/lib/locale/ko-KR.js +1 -2
  57. package/lib/locale/pl-PL.js +1 -2
  58. package/lib/locale/pt-BR.js +1 -2
  59. package/lib/locale/ru-RU.js +1 -2
  60. package/lib/locale/sk-SK.js +1 -2
  61. package/lib/locale/vi-VN.js +1 -2
  62. package/lib/locale/zh-CN.js +1 -2
  63. package/lib/locale/zh-HK.js +1 -2
  64. package/lib/locale/zh-TW.js +1 -2
  65. package/lib/types/controllers/sheet-drawing-copy-paste.controller.d.ts +7 -3
  66. package/lib/types/controllers/sheet-drawing-permission.controller.d.ts +2 -0
  67. package/lib/types/controllers/sheet-drawing-update.controller.d.ts +7 -4
  68. package/lib/types/facade/f-worksheet.d.ts +5 -1
  69. package/lib/types/menu/drawing-popup-menu.controller.d.ts +5 -2
  70. package/lib/types/services/batch-save-images.service.d.ts +1 -1
  71. package/lib/types/services/canvas-float-dom-manager.service.d.ts +11 -4
  72. package/lib/types/services/drawing-context-menu.service.d.ts +1 -1
  73. package/lib/types/views/background/worksheet-background-image.extension.d.ts +1 -0
  74. package/lib/umd/index.js +2 -2
  75. package/package.json +19 -19
@@ -1,4 +1,4 @@
1
- //#region src/locale/ar-SA.ts
1
+ // src/locale/ar-SA.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "صورة",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ca-ES.ts
1
+ // src/locale/ca-ES.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Imatge",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/de-DE.ts
1
+ // src/locale/de-DE.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Bild",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/en-US.ts
1
+ // src/locale/en-US.ts
2
2
  /**
3
3
  * Copyright 2023-present DreamNum Co., Ltd.
4
4
  *
@@ -76,5 +76,4 @@ const locale = { "sheets-drawing-ui": {
76
76
  }
77
77
  } };
78
78
 
79
- //#endregion
80
79
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/es-ES.ts
1
+ // src/locale/es-ES.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Imagen",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/fa-IR.ts
1
+ // src/locale/fa-IR.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "تصویر",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/fr-FR.ts
1
+ // src/locale/fr-FR.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Image",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/id-ID.ts
1
+ // src/locale/id-ID.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Gambar",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/it-IT.ts
1
+ // src/locale/it-IT.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Immagine",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ja-JP.ts
1
+ // src/locale/ja-JP.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "画像",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ko-KR.ts
1
+ // src/locale/ko-KR.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "이미지",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/pl-PL.ts
1
+ // src/locale/pl-PL.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Obraz",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/pt-BR.ts
1
+ // src/locale/pt-BR.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Imagem",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ru-RU.ts
1
+ // src/locale/ru-RU.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Изображение",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/sk-SK.ts
1
+ // src/locale/sk-SK.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Obrázok",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/vi-VN.ts
1
+ // src/locale/vi-VN.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Hình ảnh",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-CN.ts
1
+ // src/locale/zh-CN.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "图片",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-HK.ts
1
+ // src/locale/zh-HK.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "圖片",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-TW.ts
1
+ // src/locale/zh-TW.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "圖片",
4
4
  backgroundImage: {
@@ -61,5 +61,4 @@ const locale = { "sheets-drawing-ui": {
61
61
  }
62
62
  } };
63
63
 
64
- //#endregion
65
64
  export { locale as default };
@@ -13,10 +13,10 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { ICommandService, RxDisposable } from '@univerjs/core';
16
+ import { ICommandService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
17
17
  import { IDrawingManagerService } from '@univerjs/drawing';
18
18
  import { IRenderManagerService } from '@univerjs/engine-render';
19
- import { SheetSkeletonService } from '@univerjs/sheets';
19
+ import { SheetPermissionCheckController, SheetSkeletonService } from '@univerjs/sheets';
20
20
  import { ISheetClipboardService } from '@univerjs/sheets-ui';
21
21
  import { IClipboardInterfaceService } from '@univerjs/ui';
22
22
  export declare class SheetsDrawingCopyPasteController extends RxDisposable {
@@ -26,12 +26,16 @@ export declare class SheetsDrawingCopyPasteController extends RxDisposable {
26
26
  private readonly _drawingService;
27
27
  private readonly _clipboardInterfaceService;
28
28
  private readonly _commandService;
29
+ private readonly _instanceService;
30
+ private readonly _permissions;
31
+ dispose(): void;
29
32
  private _copyInfo;
30
- constructor(_sheetClipboardService: ISheetClipboardService, _renderManagerService: IRenderManagerService, _sheetSkeletonService: SheetSkeletonService, _drawingService: IDrawingManagerService, _clipboardInterfaceService: IClipboardInterfaceService, _commandService: ICommandService);
33
+ constructor(_sheetClipboardService: ISheetClipboardService, _renderManagerService: IRenderManagerService, _sheetSkeletonService: SheetSkeletonService, _drawingService: IDrawingManagerService, _clipboardInterfaceService: IClipboardInterfaceService, _commandService: ICommandService, _instanceService: IUniverInstanceService, _permissions: SheetPermissionCheckController);
31
34
  private get _focusedDrawings();
32
35
  private _initCopyPaste;
33
36
  private _createDrawingsCopyInfoByRange;
34
37
  private _generateSingleDrawingPasteMutations;
38
+ private _generateChartSheetImagePasteMutations;
35
39
  private _generateMutations;
36
40
  private _generateRangeDrawingsPasteMutations;
37
41
  }
@@ -33,5 +33,7 @@ export declare class SheetDrawingPermissionController extends Disposable {
33
33
  private _handleDrawingEditableFalse;
34
34
  private _initViewPermissionChange;
35
35
  private _initEditPermissionChange;
36
+ private _initChartSheetCommandPermissionCheck;
37
+ private _checkChartSheetEditPermission;
36
38
  private _initCommandPermissionCheck;
37
39
  }
@@ -20,7 +20,6 @@ import { Disposable, ICommandService, IContextService, IImageIoService, Injector
20
20
  import { IDrawingManagerService } from '@univerjs/drawing';
21
21
  import { SheetInterceptorService, SheetSkeletonService, SheetsSelectionsService } from '@univerjs/sheets';
22
22
  import { ISheetDrawingService } from '@univerjs/sheets-drawing';
23
- import { ISheetSelectionRenderService } from '@univerjs/sheets-ui';
24
23
  import { ILocalFileService, IMessageService } from '@univerjs/ui';
25
24
  /**
26
25
  * Get the size of the drawing within the cell
@@ -39,7 +38,6 @@ export declare class SheetDrawingUpdateController extends Disposable implements
39
38
  private readonly _context;
40
39
  private readonly _commandService;
41
40
  private readonly _sheetInterceptorService;
42
- private readonly _selectionRenderService;
43
41
  private readonly _imageIoService;
44
42
  private readonly _fileOpenerService;
45
43
  private readonly _sheetDrawingService;
@@ -51,14 +49,19 @@ export declare class SheetDrawingUpdateController extends Disposable implements
51
49
  private readonly _injector;
52
50
  private readonly _urlImageService;
53
51
  private readonly _workbookSelections;
54
- constructor(_context: IRenderContext<Workbook>, _commandService: ICommandService, _sheetInterceptorService: SheetInterceptorService, _selectionRenderService: ISheetSelectionRenderService, _imageIoService: IImageIoService, _fileOpenerService: ILocalFileService, _sheetDrawingService: ISheetDrawingService, _drawingManagerService: IDrawingManagerService, _contextService: IContextService, _messageService: IMessageService, _localeService: LocaleService, selectionManagerService: SheetsSelectionsService, _sheetSkeletonService: SheetSkeletonService, _injector: Injector, _urlImageService: IURLImageService);
52
+ constructor(_context: IRenderContext<Workbook>, _commandService: ICommandService, _sheetInterceptorService: SheetInterceptorService, _imageIoService: IImageIoService, _fileOpenerService: ILocalFileService, _sheetDrawingService: ISheetDrawingService, _drawingManagerService: IDrawingManagerService, _contextService: IContextService, _messageService: IMessageService, _localeService: LocaleService, selectionManagerService: SheetsSelectionsService, _sheetSkeletonService: SheetSkeletonService, _injector: Injector, _urlImageService: IURLImageService);
55
53
  insertFloatImage(): Promise<boolean>;
56
54
  insertCellImage(): Promise<boolean>;
57
55
  setWorksheetBackgroundImage(files?: Nullable<File[]>): Promise<boolean>;
58
56
  insertCellImageByFile(file: File, location?: ISheetLocationBase): Promise<boolean>;
59
- insertFloatImageByFile(file: File): Promise<boolean | undefined>;
57
+ insertFloatImageByFile(file: File): Promise<boolean>;
58
+ private _insertFloatImage;
60
59
  private _insertCellImage;
61
60
  insertCellImageByUrl(url: string, location?: ISheetLocationBase): Promise<boolean>;
61
+ private _captureImageTarget;
62
+ private _captureCellImageTarget;
63
+ private _isImageTargetValid;
64
+ private _getChartImageBounds;
62
65
  private _getUnitInfo;
63
66
  private _getImagePosition;
64
67
  private _updateOrderListener;
@@ -17,8 +17,8 @@ import type { ITransformState, Nullable } from '@univerjs/core';
17
17
  import type { ICanvasFloatDom, ICanvasFloatDomInfo, IDOMAnchor } from '@univerjs/sheets-drawing-ui';
18
18
  import type { IFComponentKey } from '@univerjs/sheets-ui/facade';
19
19
  import type { FRange } from '@univerjs/sheets/facade';
20
- import type { ISaveCellImagesOptions } from './f-range';
21
20
  import { FWorksheet } from '@univerjs/sheets/facade';
21
+ import type { ISaveCellImagesOptions } from './f-range';
22
22
  export interface IFICanvasFloatDom extends Omit<ICanvasFloatDom, 'componentKey' | 'unitId' | 'subUnitId'>, IFComponentKey {
23
23
  }
24
24
  export interface IFCanvasFloatDomResult extends Omit<ICanvasFloatDom, 'componentKey' | 'unitId' | 'subUnitId' | 'initPosition'>, IFComponentKey, Pick<ICanvasFloatDomInfo, 'id'> {
@@ -63,6 +63,10 @@ export interface IFWorksheetDrawingUIMixin {
63
63
  getAllFloatDoms(): IFCanvasFloatDomResult[];
64
64
  /**
65
65
  * Update float dom position and properties
66
+ *
67
+ * For multiple floating DOM elements on this worksheet, prefer {@link FWorksheet.batchUpdateFloatDoms}
68
+ * with an array of `{ id, config }` updates instead of calling this method in a loop.
69
+ *
66
70
  * @param {string} id - float dom id
67
71
  * @param {Partial<IFCanvasFloatDomResult>} config - new float dom config
68
72
  * @returns {FWorksheet} The worksheet instance for chaining
@@ -14,8 +14,9 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { ImageIoService } from '@univerjs/drawing';
17
- import { ICommandService, IContextService, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
17
+ import { ICommandService, IContextService, IPermissionService, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
18
18
  import { IDrawingManagerService } from '@univerjs/drawing';
19
+ import { OleUIService } from '@univerjs/drawing-ui';
19
20
  import { IRenderManagerService } from '@univerjs/engine-render';
20
21
  import { SheetCanvasPopManagerService } from '@univerjs/sheets-ui';
21
22
  import { IMenuManagerService, IMessageService } from '@univerjs/ui';
@@ -30,8 +31,10 @@ export declare class DrawingPopupMenuController extends RxDisposable {
30
31
  protected readonly _contextService: IContextService;
31
32
  private readonly _ioService;
32
33
  protected readonly _commandService: ICommandService;
34
+ private readonly _oleUI;
35
+ private readonly _permissionService;
33
36
  private _initImagePopupMenu;
34
- constructor(_localeService: LocaleService, _drawingManagerService: IDrawingManagerService, _canvasPopManagerService: SheetCanvasPopManagerService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _messageService: IMessageService, _menuManagerService: IMenuManagerService, _contextService: IContextService, _ioService: ImageIoService, _commandService: ICommandService);
37
+ constructor(_localeService: LocaleService, _drawingManagerService: IDrawingManagerService, _canvasPopManagerService: SheetCanvasPopManagerService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _messageService: IMessageService, _menuManagerService: IMenuManagerService, _contextService: IContextService, _ioService: ImageIoService, _commandService: ICommandService, _oleUI: OleUIService, _permissionService: IPermissionService);
35
38
  private _init;
36
39
  private _setupLoadingStatus;
37
40
  private _dispose;
@@ -136,7 +136,7 @@ export interface IBatchSaveImagesService {
136
136
  */
137
137
  getSelectionColumnIndices(): Set<number>;
138
138
  }
139
- export declare const IBatchSaveImagesService: import("@wendellhu/redi").IdentifierDecorator<IBatchSaveImagesService>;
139
+ export declare const IBatchSaveImagesService: import("@univerjs/core").IdentifierDecorator<IBatchSaveImagesService>;
140
140
  export declare class BatchSaveImagesService extends Disposable implements IBatchSaveImagesService {
141
141
  private readonly _univerInstanceService;
142
142
  private readonly _selectionService;
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import type { IDisposable, IPosition, IRange, ITransformState, Nullable, Serializable, Worksheet } from '@univerjs/core';
17
17
  import type { BaseObject, IBoundRectNoAngle, IRectProps, Scene, SpreadsheetSkeleton } from '@univerjs/engine-render';
18
- import type { IFloatDomData } from '@univerjs/sheets-drawing';
18
+ import type { IFloatDomData, ISheetDrawing } from '@univerjs/sheets-drawing';
19
19
  import type { IFloatDom, IFloatDomLayout } from '@univerjs/ui';
20
20
  import { Disposable, DrawingTypeEnum, ICommandService, IUniverInstanceService, LifecycleService } from '@univerjs/core';
21
21
  import { IDrawingManagerService } from '@univerjs/drawing';
@@ -119,9 +119,6 @@ export interface IDOMAnchor {
119
119
  * Charts retain resize handles but do not expose a rotation control.
120
120
  */
121
121
  export declare const SHEET_CHART_TRANSFORMER_CONFIG: {
122
- readonly rotateEnabled: false;
123
- readonly keepRatio: false;
124
- readonly moveBoundaryEnabled: false;
125
122
  readonly moveEnabled: true;
126
123
  readonly resizeEnabled: true;
127
124
  readonly rotateAnchorOffset: number;
@@ -145,6 +142,9 @@ export declare const SHEET_CHART_TRANSFORMER_CONFIG: {
145
142
  readonly anchorSize: number;
146
143
  readonly anchorCornerRadius: number;
147
144
  readonly anchorStyle: "canva";
145
+ readonly rotateEnabled: false;
146
+ readonly keepRatio: false;
147
+ readonly moveBoundaryEnabled: false;
148
148
  };
149
149
  export declare const EMBED_FLOAT_DRAG_HANDLE_POINTER_DOWN_EVENT = "univer:embed-float-drag-handle:pointerdown";
150
150
  export interface IFloatDomHostClickIntent {
@@ -279,8 +279,12 @@ export declare class SheetCanvasFloatDomManagerService extends Disposable {
279
279
  subUnitId: string;
280
280
  id: string;
281
281
  }>;
282
+ private readonly _moveTransformConstraints;
283
+ registerMoveTransformConstraint(constraint: (drawing: ISheetDrawing, transform: ITransformState) => ITransformState): IDisposable;
284
+ private readonly _floatDomMoveDisposables;
282
285
  private readonly _renderObjectFactories;
283
286
  constructor(_renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _drawingManagerService: IDrawingManagerService, _canvasFloatDomService: CanvasFloatDomService, _sheetDrawingService: ISheetDrawingService, _lifecycleService: LifecycleService, _canvasFloatDomPreviewService?: CanvasFloatDomPreviewService | undefined);
287
+ dispose(): void;
284
288
  /**
285
289
  * Register a factory that creates the canvas-side render object for a sheet
286
290
  * float-dom drawing type. The latest registered factory wins; disposing the
@@ -289,8 +293,10 @@ export declare class SheetCanvasFloatDomManagerService extends Disposable {
289
293
  */
290
294
  registerRenderObjectFactory(drawingType: DrawingTypeEnum, factory: SheetFloatDomRenderObjectFactory): IDisposable;
291
295
  private _createRenderObject;
296
+ private _forwardWheelToCanvas;
292
297
  private _bindScrollEvent;
293
298
  getFloatDomInfo(id: string): ICanvasFloatDomInfo | undefined;
299
+ updateFloatDomEventOptions(id: string, eventOptions: IFloatDom['eventOptions']): void;
294
300
  getFloatDomsBySubUnitId(unitId: string, subUnitId: string): ICanvasFloatDomInfo[];
295
301
  private static _disposeExternalFloatDom;
296
302
  private _createFloatDomDisposable;
@@ -311,6 +317,7 @@ export declare class SheetCanvasFloatDomManagerService extends Disposable {
311
317
  private _drawingAddListener;
312
318
  private _scrollUpdateListener;
313
319
  private _bindFloatDomScroll;
320
+ private _calculateFloatDomPosition;
314
321
  updateFloatDomProps(unitId: string, subUnitId: string, id: string, props: Record<string, any>): void;
315
322
  private _getObjectIncludingGroup;
316
323
  private _getChildObjectFromGroup;
@@ -29,7 +29,7 @@ export interface IDrawingContextMenuService {
29
29
  registerProvider(drawingType: DrawingTypeEnum, provider: IDrawingContextMenuProvider): IDisposable;
30
30
  getContextMenuPosition(context: IDrawingContextMenuProviderContext): string | undefined;
31
31
  }
32
- export declare const IDrawingContextMenuService: import("@wendellhu/redi").IdentifierDecorator<IDrawingContextMenuService>;
32
+ export declare const IDrawingContextMenuService: import("@univerjs/core").IdentifierDecorator<IDrawingContextMenuService>;
33
33
  export declare class DrawingContextMenuService extends Disposable implements IDrawingContextMenuService {
34
34
  private readonly _providers;
35
35
  registerProvider(drawingType: DrawingTypeEnum, provider: IDrawingContextMenuProvider): IDisposable;
@@ -19,6 +19,7 @@ import { SHEET_EXTENSION_TYPE, SheetExtension } from '@univerjs/engine-render';
19
19
  export declare const WORKSHEET_BACKGROUND_IMAGE_EXTENSION_KEY = "WorksheetBackgroundImageExtension";
20
20
  export declare class WorksheetBackgroundImageExtension extends SheetExtension {
21
21
  private readonly _requestRender;
22
+ readonly viewportCacheReusable: boolean;
22
23
  uKey: string;
23
24
  type: SHEET_EXTENSION_TYPE;
24
25
  private readonly _imageCache;