@univerjs/docs-drawing-ui 1.0.0-alpha.7 → 1.0.0-beta.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.
@@ -3,9 +3,9 @@ const locale = { "docs-drawing-ui": {
3
3
  title: "Изображение",
4
4
  upload: { float: "Вставить изображение" },
5
5
  shape: { insert: {
6
- title: "Insert Shape",
7
- rectangle: "Insert Rectangle",
8
- ellipse: "Insert Ellipse"
6
+ title: "Вставить фигуру",
7
+ rectangle: "Вставить прямоугольник",
8
+ ellipse: "Вставить эллипс"
9
9
  } },
10
10
  panel: { title: "Редактировать изображение" },
11
11
  "image-popup": {
@@ -16,39 +16,39 @@ const locale = { "docs-drawing-ui": {
16
16
  reset: "Сбросить размер"
17
17
  },
18
18
  "image-text-wrap": {
19
- title: "Text Wrapping",
20
- wrappingStyle: "Wrapping Style",
21
- square: "Square",
22
- topAndBottom: "Top and Bottom",
23
- inline: "In line with text",
24
- behindText: "Behind text",
25
- inFrontText: "In front of text",
26
- wrapText: "Wrap text",
27
- bothSide: "Both sides",
28
- leftOnly: "Left only",
29
- rightOnly: "Right only",
30
- distanceFromText: "Distance from text",
31
- top: "Top(px)",
32
- left: "Left(px)",
33
- bottom: "Bottom(px)",
34
- right: "Right(px)"
19
+ title: "Обтекание текстом",
20
+ wrappingStyle: "Стиль обтекания",
21
+ square: "Квадрат",
22
+ topAndBottom: "Сверху и снизу",
23
+ inline: "В тексте",
24
+ behindText: "За текстом",
25
+ inFrontText: "Перед текстом",
26
+ wrapText: "Обтекание текстом",
27
+ bothSide: "С обеих сторон",
28
+ leftOnly: "Только слева",
29
+ rightOnly: "Только справа",
30
+ distanceFromText: "Расстояние от текста",
31
+ top: "Сверху (px)",
32
+ left: "Слева (px)",
33
+ bottom: "Снизу (px)",
34
+ right: "Справа (px)"
35
35
  },
36
36
  "image-position": {
37
- title: "Position",
38
- horizontal: "Horizontal",
39
- vertical: "Vertical",
40
- absolutePosition: "Absolute Position(px)",
41
- relativePosition: "Relative Position",
42
- toTheRightOf: "to the right of",
43
- relativeTo: "relative to",
44
- bellow: "bellow",
45
- options: "Options",
46
- moveObjectWithText: "Move object with text",
47
- column: "Column",
48
- margin: "Margin",
49
- page: "Page",
50
- line: "Line",
51
- paragraph: "Paragraph"
37
+ title: "Положение",
38
+ horizontal: "По горизонтали",
39
+ vertical: "По вертикали",
40
+ absolutePosition: "Абсолютное положение (px)",
41
+ relativePosition: "Относительное положение",
42
+ toTheRightOf: "справа от",
43
+ relativeTo: "относительно",
44
+ bellow: "снизу",
45
+ options: "Параметры",
46
+ moveObjectWithText: "Перемещать объект с текстом",
47
+ column: "Колонка",
48
+ margin: "Поле",
49
+ page: "Страница",
50
+ line: "Строка",
51
+ paragraph: "Абзац"
52
52
  },
53
53
  "update-status": {
54
54
  exceedMaxSize: "Размер изображения превышает лимит, лимит составляет {0}М",
@@ -3,9 +3,9 @@ const locale = { "docs-drawing-ui": {
3
3
  title: "Hình ảnh",
4
4
  upload: { float: "Chèn hình ảnh" },
5
5
  shape: { insert: {
6
- title: "Insert Shape",
7
- rectangle: "Insert Rectangle",
8
- ellipse: "Insert Ellipse"
6
+ title: "Chèn hình",
7
+ rectangle: "Chèn hình chữ nhật",
8
+ ellipse: "Chèn hình elip"
9
9
  } },
10
10
  panel: { title: "Chỉnh sửa hình ảnh" },
11
11
  "image-popup": {
@@ -16,39 +16,39 @@ const locale = { "docs-drawing-ui": {
16
16
  reset: "Đặt lại kích thước"
17
17
  },
18
18
  "image-text-wrap": {
19
- title: "Text Wrapping",
20
- wrappingStyle: "Wrapping Style",
21
- square: "Square",
22
- topAndBottom: "Top and Bottom",
23
- inline: "In line with text",
24
- behindText: "Behind text",
25
- inFrontText: "In front of text",
26
- wrapText: "Wrap text",
27
- bothSide: "Both sides",
28
- leftOnly: "Left only",
29
- rightOnly: "Right only",
30
- distanceFromText: "Distance from text",
31
- top: "Top(px)",
32
- left: "Left(px)",
33
- bottom: "Bottom(px)",
34
- right: "Right(px)"
19
+ title: "Bọc văn bản",
20
+ wrappingStyle: "Kiểu bọc văn bản",
21
+ square: "Hình vuông",
22
+ topAndBottom: "Trên dưới",
23
+ inline: "Cùng dòng với văn bản",
24
+ behindText: "Phía sau văn bản",
25
+ inFrontText: "Phía trước văn bản",
26
+ wrapText: "Bọc văn bản",
27
+ bothSide: "Cả hai bên",
28
+ leftOnly: "Chỉ bên trái",
29
+ rightOnly: "Chỉ bên phải",
30
+ distanceFromText: "Khoảng cách với văn bản",
31
+ top: "Trên (px)",
32
+ left: "Trái (px)",
33
+ bottom: "Dưới (px)",
34
+ right: "Phải (px)"
35
35
  },
36
36
  "image-position": {
37
- title: "Position",
38
- horizontal: "Horizontal",
39
- vertical: "Vertical",
40
- absolutePosition: "Absolute Position(px)",
41
- relativePosition: "Relative Position",
42
- toTheRightOf: "to the right of",
43
- relativeTo: "relative to",
44
- bellow: "bellow",
45
- options: "Options",
46
- moveObjectWithText: "Move object with text",
47
- column: "Column",
48
- margin: "Margin",
49
- page: "Page",
50
- line: "Line",
51
- paragraph: "Paragraph"
37
+ title: "Vị trí",
38
+ horizontal: "Ngang",
39
+ vertical: "Dọc",
40
+ absolutePosition: "Vị trí tuyệt đối (px)",
41
+ relativePosition: "Vị trí tương đối",
42
+ toTheRightOf: " bên phải",
43
+ relativeTo: "tương đối với",
44
+ bellow: "bên dưới",
45
+ options: "Tùy chọn",
46
+ moveObjectWithText: "Di chuyển đối tượng cùng văn bản",
47
+ column: "Cột",
48
+ margin: "Lề",
49
+ page: "Trang",
50
+ line: "Dòng",
51
+ paragraph: "Đoạn văn"
52
52
  },
53
53
  "update-status": {
54
54
  exceedMaxSize: "Kích thước hình ảnh vượt quá giới hạn, giới hạn là {0}M",
@@ -58,11 +58,11 @@ const locale = { "docs-drawing-ui": {
58
58
  },
59
59
  shortcut: {
60
60
  "drawing-view": "Chế độ xem bản vẽ",
61
- "drawing-move-down": "Move Drawing down",
62
- "drawing-move-up": "Move Drawing up",
63
- "drawing-move-left": "Move Drawing left",
64
- "drawing-move-right": "Move Drawing right",
65
- "drawing-delete": "Delete Drawing"
61
+ "drawing-move-down": "Di chuyển bản vẽ xuống",
62
+ "drawing-move-up": "Di chuyển bản vẽ lên",
63
+ "drawing-move-left": "Di chuyển bản vẽ sang trái",
64
+ "drawing-move-right": "Di chuyển bản vẽ sang phải",
65
+ "drawing-delete": "Xóa bản vẽ"
66
66
  }
67
67
  } };
68
68
 
@@ -3,9 +3,9 @@ const locale = { "docs-drawing-ui": {
3
3
  title: "圖片",
4
4
  upload: { float: "插入圖片" },
5
5
  shape: { insert: {
6
- title: "Insert Shape",
7
- rectangle: "Insert Rectangle",
8
- ellipse: "Insert Ellipse"
6
+ title: "插入圖形",
7
+ rectangle: "插入矩形",
8
+ ellipse: "插入橢圓形"
9
9
  } },
10
10
  panel: { title: "編圖" },
11
11
  "image-popup": {
@@ -3,9 +3,9 @@ const locale = { "docs-drawing-ui": {
3
3
  title: "圖片",
4
4
  upload: { float: "插入圖片" },
5
5
  shape: { insert: {
6
- title: "Insert Shape",
7
- rectangle: "Insert Rectangle",
8
- ellipse: "Insert Ellipse"
6
+ title: "插入圖形",
7
+ rectangle: "插入矩形",
8
+ ellipse: "插入橢圓形"
9
9
  } },
10
10
  panel: { title: "編圖" },
11
11
  "image-popup": {
@@ -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
- import type { Nullable } from '@univerjs/core';
16
+ import type { IDocDrawingBase, Nullable } from '@univerjs/core';
17
17
  import type { IDocumentSkeletonPage, IDocumentSkeletonRow, IDocumentSkeletonTable } from '@univerjs/engine-render';
18
18
  import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
19
19
  import { IDrawingManagerService } from '@univerjs/drawing';
@@ -29,6 +29,13 @@ export interface IDocsTableCellAnchorContext {
29
29
  table: IDocumentSkeletonTable;
30
30
  }
31
31
  export declare function getDocsTableCellAnchorContext(unitId: string, cell: IDocumentSkeletonPage): Nullable<IDocsTableCellAnchorContext>;
32
+ export declare function shouldUseDocsDrawingOuterPageOrigin(config: {
33
+ drawing: Pick<IDocDrawingBase, 'behindDoc' | 'layoutType'>;
34
+ height: number;
35
+ hostPage?: IDocumentSkeletonPage;
36
+ page: IDocumentSkeletonPage;
37
+ width: number;
38
+ }): boolean;
32
39
  export declare class DocDrawingTransformerController extends Disposable {
33
40
  private readonly _commandService;
34
41
  private readonly _univerInstanceService;
@@ -54,6 +61,5 @@ export declare class DocDrawingTransformerController extends Disposable {
54
61
  private _getSceneAndTransformerByDrawingSearch;
55
62
  private _getTransformCoordForDocumentOffset;
56
63
  private _createOrUpdateInlineAnchor;
57
- private _getDocObject;
58
64
  private _getPageContentSize;
59
65
  }
@@ -26,7 +26,7 @@ import { CanvasFloatDomService } from '@univerjs/ui';
26
26
  export declare function calcDocFloatDomPositionByRect(rect: IBoundRectNoAngle, scene: Scene, opacity?: number, angle?: number): IFloatDomLayout;
27
27
  interface IDocFloatDomParams extends IDocFloatDomDataBase {
28
28
  }
29
- type IDocFloatDomRuntimeViewport = Partial<Pick<IDocsCustomBlockRenderViewport, 'bleedLeft' | 'bleedWidth' | 'contentHeight' | 'contentWidth' | 'height' | 'viewportHeight'>>;
29
+ type IDocFloatDomRuntimeViewport = Partial<Pick<IDocsCustomBlockRenderViewport, 'bleedLeft' | 'bleedWidth' | 'contentHeight' | 'contentWidth' | 'height' | 'pageContentWidth' | 'viewScale' | 'viewportHeight'>>;
30
30
  interface IDocFloatDomRuntimeParam extends IDocFloatDom {
31
31
  customBlockRenderViewport?: IDocFloatDomRuntimeViewport;
32
32
  transform?: Partial<ITransformState>;
@@ -28,7 +28,7 @@ interface IDrawingParamsWithBehindText {
28
28
  hidden?: boolean;
29
29
  transform: ITransformState;
30
30
  transforms: ITransformState[];
31
- customBlockRenderViewport?: Partial<Pick<IDocsCustomBlockRenderViewport, 'bleedLeft' | 'bleedWidth' | 'contentHeight' | 'contentWidth' | 'height' | 'viewportHeight'>>;
31
+ customBlockRenderViewport?: Partial<Pick<IDocsCustomBlockRenderViewport, 'bleedLeft' | 'bleedWidth' | 'contentHeight' | 'contentWidth' | 'height' | 'pageContentWidth' | 'viewportHeight'>>;
32
32
  isMultiTransform: BooleanNumber;
33
33
  }
34
34
  interface IDrawingClipBounds {
@@ -101,7 +101,7 @@ export declare class DocDrawingTransformUpdateController extends Disposable impl
101
101
  private _initialize;
102
102
  private _initialRenderRefresh;
103
103
  private _commandExecutedListener;
104
- private _initResize;
104
+ private _initTransformRefresh;
105
105
  private _refreshDrawing;
106
106
  private _getStaleNonMultiDrawings;
107
107
  private _handleMultiDrawingsTransform;