@univerjs-pro/sheets-shape-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.
Files changed (88) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/cjs/locale/ar-SA.js +1 -1
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/de-DE.js +1 -1
  5. package/lib/cjs/locale/en-US.js +1 -1
  6. package/lib/cjs/locale/es-ES.js +1 -1
  7. package/lib/cjs/locale/fa-IR.js +1 -1
  8. package/lib/cjs/locale/fr-FR.js +1 -1
  9. package/lib/cjs/locale/id-ID.js +1 -1
  10. package/lib/cjs/locale/it-IT.js +1 -1
  11. package/lib/cjs/locale/ja-JP.js +1 -1
  12. package/lib/cjs/locale/ko-KR.js +1 -1
  13. package/lib/cjs/locale/pl-PL.js +1 -1
  14. package/lib/cjs/locale/pt-BR.js +1 -1
  15. package/lib/cjs/locale/ru-RU.js +1 -1
  16. package/lib/cjs/locale/sk-SK.js +1 -1
  17. package/lib/cjs/locale/vi-VN.js +1 -1
  18. package/lib/cjs/locale/zh-CN.js +1 -1
  19. package/lib/cjs/locale/zh-HK.js +1 -1
  20. package/lib/cjs/locale/zh-TW.js +1 -1
  21. package/lib/es/index.js +1 -1
  22. package/lib/es/locale/ar-SA.js +1 -1
  23. package/lib/es/locale/ca-ES.js +1 -1
  24. package/lib/es/locale/de-DE.js +1 -1
  25. package/lib/es/locale/en-US.js +1 -1
  26. package/lib/es/locale/es-ES.js +1 -1
  27. package/lib/es/locale/fa-IR.js +1 -1
  28. package/lib/es/locale/fr-FR.js +1 -1
  29. package/lib/es/locale/id-ID.js +1 -1
  30. package/lib/es/locale/it-IT.js +1 -1
  31. package/lib/es/locale/ja-JP.js +1 -1
  32. package/lib/es/locale/ko-KR.js +1 -1
  33. package/lib/es/locale/pl-PL.js +1 -1
  34. package/lib/es/locale/pt-BR.js +1 -1
  35. package/lib/es/locale/ru-RU.js +1 -1
  36. package/lib/es/locale/sk-SK.js +1 -1
  37. package/lib/es/locale/vi-VN.js +1 -1
  38. package/lib/es/locale/zh-CN.js +1 -1
  39. package/lib/es/locale/zh-HK.js +1 -1
  40. package/lib/es/locale/zh-TW.js +1 -1
  41. package/lib/index.js +1 -1
  42. package/lib/locale/ar-SA.js +1 -1
  43. package/lib/locale/ca-ES.js +1 -1
  44. package/lib/locale/de-DE.js +1 -1
  45. package/lib/locale/en-US.js +1 -1
  46. package/lib/locale/es-ES.js +1 -1
  47. package/lib/locale/fa-IR.js +1 -1
  48. package/lib/locale/fr-FR.js +1 -1
  49. package/lib/locale/id-ID.js +1 -1
  50. package/lib/locale/it-IT.js +1 -1
  51. package/lib/locale/ja-JP.js +1 -1
  52. package/lib/locale/ko-KR.js +1 -1
  53. package/lib/locale/pl-PL.js +1 -1
  54. package/lib/locale/pt-BR.js +1 -1
  55. package/lib/locale/ru-RU.js +1 -1
  56. package/lib/locale/sk-SK.js +1 -1
  57. package/lib/locale/vi-VN.js +1 -1
  58. package/lib/locale/zh-CN.js +1 -1
  59. package/lib/locale/zh-HK.js +1 -1
  60. package/lib/locale/zh-TW.js +1 -1
  61. package/lib/types/const.d.ts +1 -1
  62. package/lib/types/controllers/sheet-shape-render.controller.d.ts +7 -1
  63. package/lib/types/controllers/ui.controller.d.ts +1 -98
  64. package/lib/types/locale/en-US.d.ts +2 -10
  65. package/lib/types/menu/shape-context-menu.d.ts +7 -0
  66. package/lib/types/view-model/drawing-shape.d.ts +7 -0
  67. package/lib/types/views/shape-floating-toolbar/ShapeFloatingToolbar.d.ts +1 -1
  68. package/lib/umd/index.js +1 -1
  69. package/lib/umd/locale/ar-SA.js +1 -1
  70. package/lib/umd/locale/ca-ES.js +1 -1
  71. package/lib/umd/locale/de-DE.js +1 -1
  72. package/lib/umd/locale/en-US.js +1 -1
  73. package/lib/umd/locale/es-ES.js +1 -1
  74. package/lib/umd/locale/fa-IR.js +1 -1
  75. package/lib/umd/locale/fr-FR.js +1 -1
  76. package/lib/umd/locale/id-ID.js +1 -1
  77. package/lib/umd/locale/it-IT.js +1 -1
  78. package/lib/umd/locale/ja-JP.js +1 -1
  79. package/lib/umd/locale/ko-KR.js +1 -1
  80. package/lib/umd/locale/pl-PL.js +1 -1
  81. package/lib/umd/locale/pt-BR.js +1 -1
  82. package/lib/umd/locale/ru-RU.js +1 -1
  83. package/lib/umd/locale/sk-SK.js +1 -1
  84. package/lib/umd/locale/vi-VN.js +1 -1
  85. package/lib/umd/locale/zh-CN.js +1 -1
  86. package/lib/umd/locale/zh-HK.js +1 -1
  87. package/lib/umd/locale/zh-TW.js +1 -1
  88. package/package.json +20 -19
@@ -1,5 +1,5 @@
1
1
  import { SheetsShapeService } from '@univerjs-pro/sheets-shape';
2
- import { Disposable, DrawingTypeEnum, ICommandService, IContextService, IUniverInstanceService, LocaleService } from '@univerjs/core';
2
+ import { Disposable, ICommandService, IContextService, IUniverInstanceService, LocaleService } from '@univerjs/core';
3
3
  import { IDrawingManagerService } from '@univerjs/drawing';
4
4
  import { IRenderManagerService } from '@univerjs/engine-render';
5
5
  import { SheetCanvasPopManagerService } from '@univerjs/sheets-ui';
@@ -25,104 +25,7 @@ export declare class SheetsShapeUIController extends Disposable {
25
25
  private _disposePopups;
26
26
  constructor(_univerInstanceService: IUniverInstanceService, _sidebarService: ISidebarService, _menuManagerService: IMenuManagerService, _sheetsShapeService: SheetsShapeService, _localeService: LocaleService, _commandService: ICommandService, _drawingManagerService: IDrawingManagerService, _sheetCanvasPopManagerService: SheetCanvasPopManagerService, _contextService: IContextService, _renderManagerService: IRenderManagerService, _shapeTextEditingService: ShapeTextEditingService);
27
27
  private _initMenu;
28
- private _registerShapeMenu;
29
28
  initShapePopupMenu(): void;
30
- getShapePopupMenus(unitId: string, subUnitId: string, drawingId: string, drawingType: DrawingTypeEnum): ({
31
- label: string;
32
- index: number;
33
- commandId: string;
34
- commandParams: {
35
- unitId: string;
36
- subUnitId: string;
37
- drawingId: string;
38
- drawings?: undefined;
39
- shapeId?: undefined;
40
- flipH?: undefined;
41
- flipV?: undefined;
42
- rotate?: undefined;
43
- };
44
- disable: boolean;
45
- } | {
46
- label: string;
47
- index: number;
48
- commandId: string;
49
- commandParams: {
50
- unitId: string;
51
- drawings: {
52
- unitId: string;
53
- subUnitId: string;
54
- drawingId: string;
55
- drawingType: DrawingTypeEnum;
56
- }[];
57
- subUnitId?: undefined;
58
- drawingId?: undefined;
59
- shapeId?: undefined;
60
- flipH?: undefined;
61
- flipV?: undefined;
62
- rotate?: undefined;
63
- };
64
- disable: boolean;
65
- } | {
66
- label: string;
67
- index: number;
68
- commandId: string;
69
- commandParams: {
70
- unitId: string;
71
- subUnitId: string;
72
- shapeId: string;
73
- flipH: boolean;
74
- drawingId?: undefined;
75
- drawings?: undefined;
76
- flipV?: undefined;
77
- rotate?: undefined;
78
- };
79
- disable: boolean;
80
- } | {
81
- label: string;
82
- index: number;
83
- commandId: string;
84
- commandParams: {
85
- unitId: string;
86
- subUnitId: string;
87
- shapeId: string;
88
- flipV: boolean;
89
- drawingId?: undefined;
90
- drawings?: undefined;
91
- flipH?: undefined;
92
- rotate?: undefined;
93
- };
94
- disable: boolean;
95
- } | {
96
- label: string;
97
- index: number;
98
- commandId: string;
99
- commandParams: {
100
- unitId: string;
101
- subUnitId: string;
102
- shapeId: string;
103
- rotate: number;
104
- drawingId?: undefined;
105
- drawings?: undefined;
106
- flipH?: undefined;
107
- flipV?: undefined;
108
- };
109
- disable: boolean;
110
- } | {
111
- label: string;
112
- index: number;
113
- commandId: string;
114
- commandParams: {
115
- unitId: string;
116
- subUnitId: string;
117
- shapeId: string;
118
- drawingId?: undefined;
119
- drawings?: undefined;
120
- flipH?: undefined;
121
- flipV?: undefined;
122
- rotate?: undefined;
123
- };
124
- disable: boolean;
125
- })[];
126
29
  private _getShapeInfo;
127
30
  private _createShapePopupMenu;
128
31
  private _clearPopups;
@@ -10,17 +10,9 @@ declare const locale: {
10
10
  };
11
11
  title: string;
12
12
  insertShape: string;
13
- openPanel: string;
14
- deleteShape: string;
15
- hidePanel: string;
16
13
  formatShape: string;
17
- shapeStyle: string;
18
- shapePosition: string;
19
- toggleFlipH: string;
20
- toggleFlipV: string;
21
- rotateRight90: string;
22
- rotateLeft90: string;
23
- toggleTextVertical: string;
14
+ flipHorizontal: string;
15
+ flipVertical: string;
24
16
  objectListPanel: {
25
17
  title: string;
26
18
  open: string;
@@ -0,0 +1,7 @@
1
+ import type { IAccessor } from '@univerjs/core';
2
+ import type { IMenuButtonItem } from '@univerjs/ui';
3
+ import type { LocaleKey } from '../locale/types';
4
+ export declare const SHEET_SHAPE_FLIP_HORIZONTAL_MENU_ID = "sheet.menu.shape.flip-horizontal";
5
+ export declare const SHEET_SHAPE_FLIP_VERTICAL_MENU_ID = "sheet.menu.shape.flip-vertical";
6
+ export declare function SheetShapeFlipHorizontalMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
7
+ export declare function SheetShapeFlipVerticalMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
@@ -1,4 +1,5 @@
1
1
  import type { ICustomShapeTextData, IShapeData, ShapeModel } from '@univerjs-pro/engine-shape';
2
+ import type { IShapeFormulaPresentation } from '@univerjs-pro/shape-editor';
2
3
  import type { IDocumentData, IDrawingParam, ISrcRect, LocaleService, Nullable } from '@univerjs/core';
3
4
  import type { IShapeProps, IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
4
5
  import { DrawingTypeEnum } from '@univerjs/core';
@@ -36,6 +37,8 @@ export interface IDrawingShapeProps extends IShapeProps {
36
37
  * Populated asynchronously by the render controller after image loading.
37
38
  */
38
39
  image?: HTMLImageElement;
40
+ formulaPresentation?: IShapeFormulaPresentation;
41
+ animateFormulaPresentation?: boolean;
39
42
  }
40
43
  export interface IDrawingShapeData extends IDrawingParam {
41
44
  /**
@@ -53,6 +56,7 @@ export declare function resolveDrawingShapeTextRenderPolicy(shapeData: IShapeDat
53
56
  };
54
57
  export declare class DrawingShape extends Shape<IDrawingShapeProps> {
55
58
  protected _props: IDrawingShapeProps;
59
+ private readonly _formulaAnimation;
56
60
  private _transformCalculateSrcRect;
57
61
  private readonly _drawingType;
58
62
  isDrawingObject: boolean;
@@ -60,6 +64,8 @@ export declare class DrawingShape extends Shape<IDrawingShapeProps> {
60
64
  private _init;
61
65
  setPrstGeom(prstGeom?: Nullable<string>): void;
62
66
  setEditing(isEditing: boolean): void;
67
+ setFormulaPresentation(presentation: IShapeFormulaPresentation | undefined, animate?: boolean): void;
68
+ private _applyFormulaAutoFitSize;
63
69
  get unitId(): string;
64
70
  get subUnitId(): string;
65
71
  private _updateSrcRectByTransform;
@@ -75,6 +81,7 @@ export declare class DrawingShape extends Shape<IDrawingShapeProps> {
75
81
  private _drawShapeText;
76
82
  private _drawSimpleText;
77
83
  private _drawRichText;
84
+ private _drawRichTextLayer;
78
85
  render(mainCtx: UniverRenderingContext, bounds: IViewportInfo, _drawAdj?: boolean): this;
79
86
  getInverseCoord(coord: Vector2): Vector2;
80
87
  isHit(coord: Vector2): boolean;
@@ -13,5 +13,5 @@ interface IShapeFloatingToolbarProps {
13
13
  extraProps?: IShapeFloatingToolbarExtraProps;
14
14
  };
15
15
  }
16
- export declare function ShapeFloatingToolbar(props: IShapeFloatingToolbarProps): import("react").JSX.Element | null;
16
+ export declare function SheetsShapeFloatingToolbar(props: IShapeFloatingToolbarProps): import("react").JSX.Element | null;
17
17
  export {};