@univerjs-pro/sheets-shape-ui 1.0.0-alpha.3 → 1.0.0-alpha.5

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 (100) 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/command-util.d.ts +2 -19
  62. package/lib/types/const.d.ts +1 -0
  63. package/lib/types/controllers/shape-text-float-menu.render-controller.d.ts +1 -2
  64. package/lib/types/controllers/sheet-shape-render.controller.d.ts +1 -0
  65. package/lib/types/locale/en-US.d.ts +0 -33
  66. package/lib/types/{commands/menu → menu}/object-list.menu.d.ts +1 -1
  67. package/lib/types/views/ShapePicker.d.ts +0 -2
  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 +19 -19
  89. package/lib/types/commands/command/set-shape-text-align.command.d.ts +0 -5
  90. package/lib/types/commands/command/set-shape-text-style.command.d.ts +0 -7
  91. package/lib/types/commands/command/set-shape-text-vertical-align.command.d.ts +0 -5
  92. package/lib/types/commands/command/shape-doc-align.command.d.ts +0 -10
  93. package/lib/types/commands/menu/menu-dependencies.d.ts +0 -2
  94. package/lib/types/commands/menu/shape-doc-format.menu.d.ts +0 -19
  95. package/lib/types/commands/menu/shape-font-size.menu.d.ts +0 -6
  96. package/lib/types/commands/menu/shape-text-align.menu.d.ts +0 -10
  97. package/lib/types/commands/menu/shape-vertical-align.menu.d.ts +0 -10
  98. package/lib/types/view-model/shape-data-model.d.ts +0 -8
  99. package/lib/types/views/shape-editor-panel/index.d.ts +0 -1
  100. /package/lib/types/commands/operations/{actvie-drawing-operation.d.ts → active-drawing-operation.d.ts} +0 -0
@@ -1 +1 @@
1
- const _0x4e6d8c=_0x5cb8;function _0x5cb8(_0xa55d1a,_0x54bc2d){_0xa55d1a=_0xa55d1a-0x1f0;const _0xbdaeb5=_0xbdae();let _0x5cb8f7=_0xbdaeb5[_0xa55d1a];return _0x5cb8f7;}function _0xbdae(){const _0x3995b9=['3711272vvvOev','311755YdfgZU','21842316byWYat','文字背景色','文字顏色','51601plEJbu','刪除形狀','重置顏色','物件名稱','左對齊','開啟圖層面板','22dDdhgH','刪除線','兩端對齊','靠右對齊','填滿色彩','4569230LfrxXr','右對齊','下移一層','1827942eGKpLy','選取物件以編輯詳細資料','逆時針\x2090\x20度旋轉','上移一層','插入形狀','圖形樣式','暫無物件','垂直置中','詳細資料','7cMcYEg','該範圍已被保護,目前無編輯權限。如需編輯,請聯絡創建者。\x20','11DtFaUq','靠左對齊','順時針\x2090\x20度旋轉','新增描述','9cDmhMS','垂直對齊','隱藏形狀面板','放大字型','靠下對齊','靠上對齊','4XnjsFu','全部隱藏','打開形狀面板','切換水平翻轉','裁切為形狀','圖形位置','1712349TfVcxx','切換文本竖排','切換垂直翻轉'];_0xbdae=function(){return _0x3995b9;};return _0xbdae();}(function(_0x5a7e51,_0x3f319a){const _0x26e737=_0x5cb8,_0x51bb0e=_0x5a7e51();while(!![]){try{const _0x1da9e0=-parseInt(_0x26e737(0x214))/0x1*(parseInt(_0x26e737(0x21a))/0x2)+-parseInt(_0x26e737(0x20c))/0x3+-parseInt(_0x26e737(0x206))/0x4*(parseInt(_0x26e737(0x210))/0x5)+-parseInt(_0x26e737(0x1f1))/0x6*(parseInt(_0x26e737(0x1fa))/0x7)+parseInt(_0x26e737(0x20f))/0x8*(-parseInt(_0x26e737(0x200))/0x9)+-parseInt(_0x26e737(0x21f))/0xa*(-parseInt(_0x26e737(0x1fc))/0xb)+parseInt(_0x26e737(0x211))/0xc;if(_0x1da9e0===_0x3f319a)break;else _0x51bb0e['push'](_0x51bb0e['shift']());}catch(_0x57ccf1){_0x51bb0e['push'](_0x51bb0e['shift']());}}}(_0xbdae,0x4b25d));const e={'sheets-shape-ui':{'align':{'top':_0x4e6d8c(0x205),'middle':_0x4e6d8c(0x1f8),'bottom':_0x4e6d8c(0x204),'left':_0x4e6d8c(0x1fd),'center':'置中','right':_0x4e6d8c(0x21d)},'toolbar':{'verticalAlignMode':{'main':_0x4e6d8c(0x201)},'horizontalAlignMode':{'main':'水平對齊'},'fillColor':{'main':_0x4e6d8c(0x21e)},'fontSize':'字型大小','fontSizeIncrease':_0x4e6d8c(0x203),'fontSizeDecrease':'縮小字型','alignLeft':_0x4e6d8c(0x218),'alignCenter':'居中對齊','alignRight':_0x4e6d8c(0x220),'alignJustify':_0x4e6d8c(0x21c),'bold':'粗體','italic':'斜體','underline':'底線','strikethrough':_0x4e6d8c(0x21b),'textColor':_0x4e6d8c(0x213),'textBackgroundColor':_0x4e6d8c(0x212),'resetColor':_0x4e6d8c(0x216)},'imagePanel':{'crop':{'shape':_0x4e6d8c(0x20a)}},'permission':{'editErr':_0x4e6d8c(0x1fb)},'title':'形狀','insertShape':_0x4e6d8c(0x1f5),'openPanel':_0x4e6d8c(0x208),'deleteShape':_0x4e6d8c(0x215),'hidePanel':_0x4e6d8c(0x202),'formatShape':'格式化形狀','shapeStyle':_0x4e6d8c(0x1f6),'shapePosition':_0x4e6d8c(0x20b),'toggleFlipH':_0x4e6d8c(0x209),'toggleFlipV':_0x4e6d8c(0x20e),'rotateRight90':_0x4e6d8c(0x1fe),'rotateLeft90':_0x4e6d8c(0x1f3),'toggleTextVertical':_0x4e6d8c(0x20d),'objectListPanel':{'title':'圖層','open':_0x4e6d8c(0x219),'empty':_0x4e6d8c(0x1f7),'showAll':'全部顯示','hideAll':_0x4e6d8c(0x207),'show':'顯示','hide':'隱藏','moveForward':_0x4e6d8c(0x1f4),'moveBackward':_0x4e6d8c(0x1f0),'close':'關閉','name':'名稱','nameInput':_0x4e6d8c(0x217),'description':'描述','descriptionPlaceholder':_0x4e6d8c(0x1ff),'details':_0x4e6d8c(0x1f9),'noSelection':_0x4e6d8c(0x1f2)}}};export{e as default};
1
+ const _0x21e436=_0x18d4;function _0x18d4(_0x5c364c,_0x2281a8){_0x5c364c=_0x5c364c-0x106;const _0x421ef1=_0x421e();let _0x18d4ec=_0x421ef1[_0x5c364c];return _0x18d4ec;}(function(_0x345032,_0x2e1a5f){const _0x56aaca=_0x18d4,_0x202a3b=_0x345032();while(!![]){try{const _0xb8df07=-parseInt(_0x56aaca(0x10d))/0x1*(-parseInt(_0x56aaca(0x109))/0x2)+-parseInt(_0x56aaca(0x106))/0x3*(parseInt(_0x56aaca(0x114))/0x4)+-parseInt(_0x56aaca(0x120))/0x5+-parseInt(_0x56aaca(0x113))/0x6+parseInt(_0x56aaca(0x108))/0x7+parseInt(_0x56aaca(0x119))/0x8+parseInt(_0x56aaca(0x107))/0x9;if(_0xb8df07===_0x2e1a5f)break;else _0x202a3b['push'](_0x202a3b['shift']());}catch(_0x305afc){_0x202a3b['push'](_0x202a3b['shift']());}}}(_0x421e,0x29caf));function _0x421e(){const _0x417fe7=['70290lJMpzI','990644cNXptm','切換垂直翻轉','裁切為形狀','切換水平翻轉','下移一層','2308864jTAiAd','圖形樣式','暫無物件','物件名稱','切換文本竖排','圖形位置','上移一層','61350oMCjcD','格式化形狀','選取物件以編輯詳細資料','3HvBRxB','96444grLOlF','261814SNUHJw','212206HkYhaR','隱藏形狀面板','打開形狀面板','該範圍已被保護,目前無編輯權限。如需編輯,請聯絡創建者。\x20','1EKDmGi','新增描述','插入形狀','逆時針\x2090\x20度旋轉','詳細資料','全部顯示'];_0x421e=function(){return _0x417fe7;};return _0x421e();}const e={'sheets-shape-ui':{'imagePanel':{'crop':{'shape':_0x21e436(0x116)}},'permission':{'editErr':_0x21e436(0x10c)},'title':'形狀','insertShape':_0x21e436(0x10f),'openPanel':_0x21e436(0x10b),'deleteShape':'刪除形狀','hidePanel':_0x21e436(0x10a),'formatShape':_0x21e436(0x121),'shapeStyle':_0x21e436(0x11a),'shapePosition':_0x21e436(0x11e),'toggleFlipH':_0x21e436(0x117),'toggleFlipV':_0x21e436(0x115),'rotateRight90':'順時針\x2090\x20度旋轉','rotateLeft90':_0x21e436(0x110),'toggleTextVertical':_0x21e436(0x11d),'objectListPanel':{'title':'圖層','open':'開啟圖層面板','empty':_0x21e436(0x11b),'showAll':_0x21e436(0x112),'hideAll':'全部隱藏','show':'顯示','hide':'隱藏','moveForward':_0x21e436(0x11f),'moveBackward':_0x21e436(0x118),'close':'關閉','name':'名稱','nameInput':_0x21e436(0x11c),'description':'描述','descriptionPlaceholder':_0x21e436(0x10e),'details':_0x21e436(0x111),'noSelection':_0x21e436(0x122)}}};export{e as default};
@@ -1,26 +1,9 @@
1
- import type { ICxnShapeData, IShapeData, IShapeTextDataModel, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
2
- import type { HorizontalAlign, ICommandService, IDocumentData, VerticalAlign } from '@univerjs/core';
1
+ import type { ICxnShapeData, IShapeData, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
2
+ import type { ICommandService } from '@univerjs/core';
3
3
  interface IOldShapeData {
4
4
  oldShapeData?: IShapeData;
5
5
  oldShapeType?: ShapeTypeEnum;
6
6
  }
7
7
  export declare function updateShapeData(commandService: ICommandService, unitId: string, subUnitId: string, shapeId: string, oldShapeJSON: IOldShapeData, shapeData?: IShapeData): Promise<boolean>;
8
8
  export declare function updateLineShapeData(commandService: ICommandService, unitId: string, subUnitId: string, shapeId: string, oldShapeJSON: IOldShapeData, shapeData?: ICxnShapeData): Promise<boolean>;
9
- /**
10
- * set shape text data
11
- *
12
- * @deprecated Legacy helper kept for compatibility with older callers that only
13
- * wrote `dataModel`. New code should update canonical `shapeText` through
14
- * `updateShapeData` or the shared shape text editor adapter so text behavior
15
- * fields such as `autoFitType`, `textWrap`, and `textRectPadding` are preserved.
16
- *
17
- * @param commandService
18
- * @param unitId
19
- * @param subUnitId
20
- * @param shapeId
21
- * @param oldShapeJSON
22
- * @param textDataJson
23
- * @returns {boolean} whether the command executed successfully
24
- */
25
- export declare function updateShapeTextData(commandService: ICommandService, unitId: string, subUnitId: string, shapeId: string, oldShapeJSON: IOldShapeData, textDataJson: IShapeTextDataModel<IDocumentData, HorizontalAlign, VerticalAlign>): Promise<boolean>;
26
9
  export {};
@@ -2,4 +2,5 @@ export declare const SHEET_SHAPE_EDIT_PANEL_KEY = "sheet.shape.edit.panel";
2
2
  export declare const SHEET_SHAPE_OBJECT_LIST_PANEL_KEY = "sheet.shape.object-list.panel";
3
3
  export declare const SHEET_SHAPE_FLOATING_TOOLBAR_KEY = "sheet.shape.floating-toolbar";
4
4
  export declare const DOCS_SHAPE_EDITOR_UNIT_ID_KEY: string;
5
+ export declare const SHAPE_TEXT_FLOAT_MENU_COMPONENT_KEY = "sheet.shape.text.float-menu";
5
6
  export declare const ShapeTextEditorContainer = "SheetShapeTextEditorContainer";
@@ -3,7 +3,6 @@ import type { IRenderContext } from '@univerjs/engine-render';
3
3
  import { ShapeTextFloatMenuRenderControllerBase } from '@univerjs-pro/shape-editor-ui';
4
4
  import { DocSelectionManagerService } from '@univerjs/docs';
5
5
  import { DocCanvasPopManagerService, DocSelectionRenderService } from '@univerjs/docs-ui';
6
- import { ComponentManager } from '@univerjs/ui';
7
6
  export declare class ShapeTextFloatMenuRenderController extends ShapeTextFloatMenuRenderControllerBase {
8
- constructor(context: IRenderContext<DocumentDataModel>, docSelectionManagerService: DocSelectionManagerService, docCanvasPopManagerService: DocCanvasPopManagerService, componentManager: ComponentManager, docSelectionRenderService: DocSelectionRenderService);
7
+ constructor(context: IRenderContext<DocumentDataModel>, docSelectionManagerService: DocSelectionManagerService, docCanvasPopManagerService: DocCanvasPopManagerService, docSelectionRenderService: DocSelectionRenderService);
9
8
  }
@@ -17,6 +17,7 @@ export declare class SheetDrawingShapeRenderController extends Disposable {
17
17
  add: (resource: Promise<unknown>) => void;
18
18
  };
19
19
  }): DrawingShape[] | undefined;
20
+ refreshShapeFillImage(shape: DrawingShape): void;
20
21
  /**
21
22
  * If the shape has PictureFill, resolve the image (from cache or network) and
22
23
  * inject it into the DrawingShape so that _draw() can pass it to renderOption.
@@ -1,38 +1,5 @@
1
1
  declare const locale: {
2
2
  'sheets-shape-ui': {
3
- align: {
4
- top: string;
5
- middle: string;
6
- bottom: string;
7
- left: string;
8
- center: string;
9
- right: string;
10
- };
11
- toolbar: {
12
- verticalAlignMode: {
13
- main: string;
14
- };
15
- horizontalAlignMode: {
16
- main: string;
17
- };
18
- fillColor: {
19
- main: string;
20
- };
21
- fontSize: string;
22
- fontSizeIncrease: string;
23
- fontSizeDecrease: string;
24
- alignLeft: string;
25
- alignCenter: string;
26
- alignRight: string;
27
- alignJustify: string;
28
- bold: string;
29
- italic: string;
30
- underline: string;
31
- strikethrough: string;
32
- textColor: string;
33
- textBackgroundColor: string;
34
- resetColor: string;
35
- };
36
3
  imagePanel: {
37
4
  crop: {
38
5
  shape: string;
@@ -1,4 +1,4 @@
1
1
  import type { IAccessor } from '@univerjs/core';
2
2
  import type { IMenuButtonItem } from '@univerjs/ui';
3
- import type { LocaleKey } from '../../locale/types';
3
+ import type { LocaleKey } from '../locale/types';
4
4
  export declare function SheetShapeObjectListMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
@@ -1,7 +1,5 @@
1
- import { IMAGE_CLIP_SHAPE_PICKER_COMPONENT } from '@univerjs/drawing-ui';
2
1
  export declare const SHAPE_PICKER_COMPONENT = "sheet.shape.picker.component";
3
2
  export declare const SHEET_IMAGE_CLIP_SHAPE_PICKER_COMPONENT = "sheet.image-clip.shape-picker.component";
4
- export { IMAGE_CLIP_SHAPE_PICKER_COMPONENT };
5
3
  export declare function ImageClipShapePicker(): import("react").JSX.Element;
6
4
  export declare function ImageClipShapePickerBridge(): import("react").JSX.Element | null;
7
5
  export declare function ShapePicker(): import("react").JSX.Element;