@univerjs/engine-render 0.25.0 → 1.0.0-alpha.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.
@@ -23,6 +23,7 @@ export declare function getParagraphByGlyph(glyph: Nullable<IDocumentSkeletonGly
23
23
  paragraphStart: number;
24
24
  paragraphEnd: number;
25
25
  startIndex: number;
26
+ paragraphId: string;
26
27
  paragraphStyle?: import("@univerjs/core").IParagraphStyle;
27
28
  bullet?: import("@univerjs/core").IBullet;
28
29
  } | undefined;
@@ -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 { BulletAlignment, ColumnSeparatorType, DataStreamTreeTokenType, IDocDrawingBase, IDocumentRenderConfig, INestingLevel, IParagraph, IParagraphBorder, IParagraphProperties, ITable, ITableRow, ITextStyle, PageOrientType } from '@univerjs/core';
16
+ import type { BulletAlignment, ColumnSeparatorType, DataStreamTreeTokenType, IColorStyle, IDocDrawingBase, IDocumentRenderConfig, INestingLevel, IParagraph, IParagraphBorder, IParagraphProperties, ITable, ITableRow, ITextStyle, PageOrientType } from '@univerjs/core';
17
17
  import type { BreakPointType } from '../components/docs/layout/line-breaker/break';
18
18
  export interface IDocumentSkeletonCached extends ISkeletonResourceReference {
19
19
  pages: IDocumentSkeletonPage[];
@@ -143,6 +143,7 @@ export interface IDocumentSkeletonLine {
143
143
  isBehindTable: boolean;
144
144
  tableId: string;
145
145
  borderBottom?: IParagraphBorder;
146
+ backgroundColor?: IColorStyle;
146
147
  bullet?: IDocumentSkeletonBullet;
147
148
  width?: number;
148
149
  parent?: IDocumentSkeletonColumn;
@@ -15,6 +15,7 @@
15
15
  */
16
16
  import type { BooleanNumber, GridType, IDocStyleBase, IDocumentLayout, IOffset, IParagraphStyle, IReferenceSource, IScale, ISectionBreakBase, ISize, ITextStyle, ITransformState, LocaleService } from '@univerjs/core';
17
17
  import type { DataStreamTreeNode } from '../components/docs/view-model/data-stream-tree-node';
18
+ import type { IDocumentCompatibilityPolicy } from '../components/docs/document-compatibility';
18
19
  import type { DocumentViewModel } from '../components/docs/view-model/document-view-model';
19
20
  import type { DocumentSkeletonPageType, IDocumentSkeletonBullet, IDocumentSkeletonDrawing, IDocumentSkeletonDrawingAnchor, IDocumentSkeletonFontStyle, IDocumentSkeletonGlyph, IDocumentSkeletonHeaderFooter, IDocumentSkeletonTable } from './i-document-skeleton-cached';
20
21
  import type { ITransformerConfig } from './transformer-config';
@@ -61,6 +62,7 @@ export interface IFontLocale {
61
62
  export interface IDocsConfig extends IReferenceSource, IDocumentLayout {
62
63
  localeService: LocaleService;
63
64
  documentTextStyle?: ITextStyle;
65
+ documentCompatibilityPolicy?: IDocumentCompatibilityPolicy;
64
66
  headerTreeMap: Map<string, DocumentViewModel>;
65
67
  footerTreeMap: Map<string, DocumentViewModel>;
66
68
  }
@@ -89,6 +91,9 @@ export interface IParagraphTableCache {
89
91
  }
90
92
  export interface IParagraphConfig {
91
93
  paragraphIndex: number;
94
+ documentCompatibilityPolicy?: IDocumentCompatibilityPolicy;
95
+ useWordStyleLineHeight?: boolean;
96
+ docxFallbackAnchorLeft?: IParagraphStyle['indentStart'];
92
97
  paragraphNonInlineSkeDrawings?: Map<string, IDocumentSkeletonDrawing>;
93
98
  paragraphInlineSkeDrawings?: Map<string, IDocumentSkeletonDrawing>;
94
99
  skeTablesInParagraph?: IParagraphTableCache[];
@@ -103,6 +108,7 @@ export interface IFontCreateConfig {
103
108
  textStyle: ITextStyle;
104
109
  charSpace: number;
105
110
  snapToGrid: BooleanNumber;
111
+ documentCompatibilityPolicy?: IDocumentCompatibilityPolicy;
106
112
  gridType?: GridType;
107
113
  pageWidth?: number;
108
114
  }
@@ -25,8 +25,16 @@ export interface ITransformerConfig {
25
25
  rotationSnaps?: number[];
26
26
  rotationSnapTolerance?: number;
27
27
  rotateAnchorOffset?: number;
28
+ rotateAnchorPosition?: 'top' | 'bottom';
29
+ rotateLineEnabled?: boolean;
28
30
  rotateSize?: number;
29
31
  rotateCornerRadius?: number;
32
+ rotateFill?: string;
33
+ rotateStroke?: string;
34
+ rotateStrokeWidth?: number;
35
+ rotateIconEnabled?: boolean;
36
+ rotateIconStroke?: string;
37
+ rotateIconStrokeWidth?: number;
30
38
  borderEnabled?: boolean;
31
39
  borderStroke?: string;
32
40
  borderStrokeWidth?: number;
@@ -39,6 +47,14 @@ export interface ITransformerConfig {
39
47
  anchorStrokeWidth?: number;
40
48
  anchorSize?: number;
41
49
  anchorCornerRadius?: number;
50
+ anchorStyle?: 'default' | 'canva';
51
+ anchorSideLongSize?: number;
52
+ anchorSideShortSize?: number;
53
+ anchorSideCornerRadius?: number;
54
+ anchorShadowColor?: string;
55
+ anchorShadowBlur?: number;
56
+ anchorShadowOffsetX?: number;
57
+ anchorShadowOffsetY?: number;
42
58
  keepRatio?: boolean;
43
59
  centeredScaling?: boolean;
44
60
  flipEnabled?: boolean;
@@ -48,4 +64,5 @@ export interface ITransformerConfig {
48
64
  shouldOverdrawWholeArea?: boolean;
49
65
  zeroLeft?: number;
50
66
  zeroTop?: number;
67
+ moveBoundaryEnabled?: boolean;
51
68
  }
@@ -24,11 +24,15 @@ export declare class DocBackground extends DocComponent {
24
24
  private _pageFillColor?;
25
25
  private _pageStrokeColor?;
26
26
  private _marginStrokeColor?;
27
+ private _pageBackgroundSource?;
28
+ private _pageBackgroundImage?;
27
29
  constructor(oKey: string, documentSkeleton?: DocumentSkeleton, config?: IDocumentsConfig);
28
30
  static create(oKey: string, documentSkeleton?: DocumentSkeleton, config?: IDocumentsConfig): DocBackground;
29
31
  setFillColors(backgroundFillColor?: string, pageFillColor?: string, pageStrokeColor?: string, marginStrokeColor?: string): void;
30
32
  draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
31
33
  private _drawWorkspaceBackground;
34
+ private _drawPageBackgroundImage;
35
+ private _getPageBackgroundImage;
32
36
  changeSkeleton(newSkeleton: DocumentSkeleton): this;
33
37
  protected _draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
34
38
  }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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
+ import type { ITable } from '@univerjs/core';
17
+ import type { IDocumentSkeletonBoundingBox, IDocumentSkeletonFontStyle } from '../../basics/i-document-skeleton-cached';
18
+ import { DocumentFlavor } from '@univerjs/core';
19
+ interface IFontMetricScaleRule {
20
+ fontFamily: RegExp;
21
+ minFontSize?: number;
22
+ fontString?: RegExp;
23
+ content?: RegExp;
24
+ widthScale?: number;
25
+ }
26
+ export interface IDocumentCompatibilityPolicy {
27
+ mode: 'modern' | 'traditional' | 'unspecified';
28
+ applyDocumentDefaultParagraphStyle: boolean;
29
+ useWordStyleLineHeight: boolean;
30
+ font: {
31
+ metricScaleRules: IFontMetricScaleRule[];
32
+ };
33
+ table: {
34
+ currentPageOverflowTolerance: number;
35
+ rowOverflowTolerance: number;
36
+ allowImportedTableMarginOverflow: boolean;
37
+ };
38
+ }
39
+ export declare function getDocumentCompatibilityPolicy(documentFlavor?: DocumentFlavor): IDocumentCompatibilityPolicy;
40
+ export declare function applyFontMetricCompatibility(content: string, fontStyle: IDocumentSkeletonFontStyle, bBox: IDocumentSkeletonBoundingBox, policy: IDocumentCompatibilityPolicy): IDocumentSkeletonBoundingBox;
41
+ export declare function isTraditionalDocumentCompatibility(policy: IDocumentCompatibilityPolicy): boolean;
42
+ export declare function shouldAllowImportedTableMarginOverflow(policy: IDocumentCompatibilityPolicy, tableSource: ITable | unknown): boolean;
43
+ export {};
@@ -46,9 +46,13 @@ export declare class Documents extends DocComponent {
46
46
  protected _draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
47
47
  draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
48
48
  private _drawTable;
49
+ private _drawTableCellBackgrounds;
49
50
  private _getTableViewport;
50
51
  private _getRenderUnitId;
52
+ private _getDocumentCompatibilityPolicy;
53
+ private _drawLineBackground;
51
54
  private _drawBorderBottom;
55
+ private _drawGlyphGroupBackgrounds;
52
56
  private _drawTableCell;
53
57
  private _drawTableCellBordersAndBg;
54
58
  private _getTableCellSource;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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
+ import type { IDocumentSkeletonGlyph } from '../../../basics/i-document-skeleton-cached';
17
+ export interface IBackgroundGlyphRun {
18
+ glyph: IDocumentSkeletonGlyph;
19
+ left: number;
20
+ width: number;
21
+ }
22
+ export declare function collectBackgroundGlyphRuns(glyphGroup: IDocumentSkeletonGlyph[]): IBackgroundGlyphRun[];
@@ -32,8 +32,18 @@ export declare class FontAndBaseLine extends docExtension {
32
32
  * so we need a map to store actual value and set value
33
33
  */
34
34
  actualFontMap: Record<string, string>;
35
+ private _textFillImageCache;
35
36
  constructor();
36
37
  draw(ctx: UniverRenderingContext, _parentScale: IScale, glyph: IDocumentSkeletonGlyph, _?: IBoundRectNoAngle, _more?: IDrawInfo): void;
38
+ private _fillTextWithTextFill;
39
+ private _getGlyphPaintBounds;
40
+ private _createTextGradient;
41
+ private _createTextPicturePattern;
42
+ private _getTextFillImage;
43
+ private _normalizeGradientStops;
44
+ private _getLinearGradientLine;
45
+ private _colorWithOpacity;
46
+ private _clamp;
37
47
  private _fillText;
38
48
  clearCache(): void;
39
49
  }
@@ -13,9 +13,23 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { IDocumentSkeletonDrawing, IDocumentSkeletonGlyph, IDocumentSkeletonLine, IDocumentSkeletonPage } from '../../../../../basics/i-document-skeleton-cached';
16
+ import type { IDocumentSkeletonColumn, IDocumentSkeletonDrawing, IDocumentSkeletonGlyph, IDocumentSkeletonLine, IDocumentSkeletonPage, IDocumentSkeletonTable } from '../../../../../basics/i-document-skeleton-cached';
17
17
  import type { IParagraphConfig, ISectionBreakConfig } from '../../../../../basics/interfaces';
18
- import type { ILayoutContext } from '../../tools';
18
+ import type { IFloatObject, ILayoutContext } from '../../tools';
19
+ import { BooleanNumber, GridType, SpacingRule } from '@univerjs/core';
19
20
  import { BreakPointType } from '../../line-breaker/break';
20
21
  export declare function layoutParagraph(ctx: ILayoutContext, glyphGroup: IDocumentSkeletonGlyph[], pages: IDocumentSkeletonPage[], sectionBreakConfig: ISectionBreakConfig, paragraphConfig: IParagraphConfig, isParagraphFirstShapedText: boolean, breakPointType?: BreakPointType): IDocumentSkeletonPage[];
21
- export declare function updateInlineDrawingPosition(line: IDocumentSkeletonLine, paragraphInlineSkeDrawings?: Map<string, IDocumentSkeletonDrawing>, blockAnchorTop?: number): void;
22
+ declare function __avoidFlowAffectingDrawingsForTable(table: IDocumentSkeletonTable, page: IDocumentSkeletonPage, column: IDocumentSkeletonColumn): void;
23
+ declare function _reLayoutCheck(ctx: ILayoutContext, floatObjects: IFloatObject[], column: IDocumentSkeletonColumn, paragraphIndex: number): void;
24
+ export declare const __testing: {
25
+ reLayoutCheck: typeof _reLayoutCheck;
26
+ avoidFlowAffectingDrawingsForTable: typeof __avoidFlowAffectingDrawingsForTable;
27
+ };
28
+ export declare function getLineHeightMetrics(glyphLineHeight: number, paragraphLineGapDefault: number, linePitch: number, gridType: GridType, lineSpacing: number, spacingRule: SpacingRule, snapToGrid: BooleanNumber, useWordStyleLineHeight?: boolean, scaleAutoLineSpacingByGlyphHeight?: boolean): {
29
+ paddingTop: number;
30
+ paddingBottom: number;
31
+ contentHeight: number;
32
+ lineSpacingApply: number;
33
+ };
34
+ export declare function updateInlineDrawingPosition(line: IDocumentSkeletonLine, paragraphInlineSkeDrawings?: Map<string, IDocumentSkeletonDrawing>, blockAnchorTop?: number, paragraphNonInlineSkeDrawings?: Map<string, IDocumentSkeletonDrawing>): void;
35
+ export {};
@@ -29,7 +29,7 @@ interface ILineBoundingBox {
29
29
  spaceBelowApply?: number;
30
30
  }
31
31
  export declare function createSkeletonLine(paragraphIndex: number, lineType: LineType, lineBoundingBox: ILineBoundingBox, columnWidth: number, lineIndex: number | undefined, isParagraphStart: boolean | undefined, paragraphConfig: IParagraphConfig, page: IDocumentSkeletonPage, headerPage: Nullable<IDocumentSkeletonPage>, footerPage: Nullable<IDocumentSkeletonPage>): IDocumentSkeletonLine;
32
- export declare function calculateLineTopByDrawings(lineHeight: number | undefined, lineTop: number | undefined, page: IDocumentSkeletonPage, headerPage: Nullable<IDocumentSkeletonPage>, footerPage: Nullable<IDocumentSkeletonPage>): number;
32
+ export declare function calculateLineTopByDrawings(lineHeight: number | undefined, lineTop: number | undefined, page: IDocumentSkeletonPage, headerPage: Nullable<IDocumentSkeletonPage>, footerPage: Nullable<IDocumentSkeletonPage>, columnLeft?: number, columnWidth?: number): number;
33
33
  export declare function updateDivideInfo(divide: IDocumentSkeletonDivide, states: Partial<IDocumentSkeletonDivide>): void;
34
34
  export declare function setLineMarginBottom(line: IDocumentSkeletonLine, marginBottom: number): void;
35
35
  export declare function collisionDetection(floatObject: IFloatObject, lineHeight: number, lineTop: number, columnLeft: number, columnWidth: number): boolean;
@@ -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 { DocumentDataModel, INumberUnit, IObjectPositionH, IObjectPositionV, IParagraph, IParagraphStyle, ITextStyle, Nullable } from '@univerjs/core';
16
+ import type { DocumentDataModel, INumberUnit, IObjectPositionH, IObjectPositionV, IParagraph, IParagraphStyle, ITextStyle, Nullable, PositionedObjectLayoutType } from '@univerjs/core';
17
17
  import type { IDocumentSkeletonCached, IDocumentSkeletonColumn, IDocumentSkeletonDivide, IDocumentSkeletonFontStyle, IDocumentSkeletonGlyph, IDocumentSkeletonLine, IDocumentSkeletonPage, IDocumentSkeletonSection, ISkeletonResourceReference } from '../../../basics/i-document-skeleton-cached';
18
18
  import type { IDocsConfig, IParagraphConfig, ISectionBreakConfig } from '../../../basics/interfaces';
19
19
  import type { DataStreamTreeNode } from '../view-model/data-stream-tree-node';
@@ -55,6 +55,7 @@ export declare function getLineHeightConfig(sectionBreakConfig: ISectionBreakCon
55
55
  lineSpacing: number;
56
56
  spacingRule: SpacingRule;
57
57
  snapToGrid: BooleanNumber;
58
+ useWordStyleLineHeight: boolean;
58
59
  };
59
60
  export declare function getCharSpaceConfig(sectionBreakConfig: ISectionBreakConfig, paragraphConfig: IParagraphConfig): {
60
61
  charSpace: number;
@@ -102,6 +103,8 @@ export interface IFloatObject {
102
103
  width: number;
103
104
  height: number;
104
105
  angle: number;
106
+ behindDoc?: BooleanNumber;
107
+ layoutType?: PositionedObjectLayoutType;
105
108
  type: FloatObjectType;
106
109
  positionV: IObjectPositionV;
107
110
  }
@@ -15,9 +15,13 @@
15
15
  */
16
16
  export interface IDocsTableRenderViewport {
17
17
  contentWidth: number;
18
+ leadingInsetLeft?: number;
18
19
  scrollLeft: number;
20
+ trailingInsetRight?: number;
19
21
  viewportWidth: number;
20
22
  }
21
23
  export type DocsTableRenderViewportProvider = (unitId: string, tableId: string) => IDocsTableRenderViewport | null | undefined;
22
24
  export declare function setDocsTableRenderViewportProvider(provider: DocsTableRenderViewportProvider | null): void;
23
25
  export declare function getDocsTableRenderViewport(unitId: string, tableId: string): IDocsTableRenderViewport | null;
26
+ export declare function getDocsTableVirtualContentWidth(viewport: IDocsTableRenderViewport): number;
27
+ export declare function hasDocsTableHorizontalViewport(viewport: IDocsTableRenderViewport | null | undefined): viewport is IDocsTableRenderViewport;
@@ -16,7 +16,7 @@
16
16
  import type { IRange, IScale, ObjectMatrix } from '@univerjs/core';
17
17
  import type { UniverRenderingContext } from '../../../context';
18
18
  import type { IDrawInfo } from '../../extension';
19
- import type { BorderCache } from '../interfaces';
19
+ import type { IBorderCache } from '../interfaces';
20
20
  import type { SpreadsheetSkeleton } from '../sheet.render-skeleton';
21
21
  import { BorderStyleTypes } from '@univerjs/core';
22
22
  import { SheetExtension } from './sheet-extension';
@@ -34,7 +34,7 @@ export declare class Border extends SheetExtension {
34
34
  preStyle: BorderStyleTypes;
35
35
  preColor: string;
36
36
  draw(ctx: UniverRenderingContext, _parentScale: IScale, spreadsheetSkeleton: SpreadsheetSkeleton, diffRanges: IRange[], { viewRanges }: IDrawInfo): void;
37
- renderBorderByCell(renderBorderContext: IRenderBorderContext, row: number, col: number, borderCacheItem: BorderCache): true | undefined;
37
+ renderBorderByCell(renderBorderContext: IRenderBorderContext, row: number, col: number, borderCacheItem: IBorderCache): true | undefined;
38
38
  private _getOverflowExclusion;
39
39
  private _renderDoubleBorder;
40
40
  private _getSpecificCellBorder;
@@ -14,15 +14,15 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { BorderStyleTypes, HorizontalAlign, ICellDataForSheetInterceptor, ICellWithCoord, ImageCacheMap, IStyleData, Nullable, ObjectMatrix, VerticalAlign, WrapStrategy } from '@univerjs/core';
17
- import type { BORDER_TYPE as BORDER_LTRB } from '../../basics/const';
17
+ import type { BORDER_TYPE } from '../../basics/const';
18
18
  import type { Canvas } from '../../canvas';
19
19
  import type { UniverRenderingContext } from '../../context';
20
20
  import type { DocumentSkeleton } from '../docs/layout/doc-skeleton';
21
- export interface BorderCache {
22
- [key: string]: BorderCacheItem | {};
21
+ export interface IBorderCache {
22
+ [key: string]: IBorderCacheItem | {};
23
23
  }
24
- export interface BorderCacheItem {
25
- type: BORDER_LTRB;
24
+ export interface IBorderCacheItem {
25
+ type: BORDER_TYPE;
26
26
  style: BorderStyleTypes;
27
27
  color: string;
28
28
  }
@@ -46,7 +46,7 @@ export interface IStylesCache {
46
46
  * Get value from getCell in skeleton and this value is used in font extension
47
47
  */
48
48
  fontMatrix: ObjectMatrix<IFontCacheItem>;
49
- border?: ObjectMatrix<BorderCache>;
49
+ border?: ObjectMatrix<IBorderCache>;
50
50
  }
51
51
  export declare enum ShowGridlinesState {
52
52
  OFF = 0,
@@ -26,11 +26,11 @@ export { getTableIdAndSliceIndex } from './components/docs/layout/block/table';
26
26
  export * from './components/docs/layout/doc-simple-skeleton';
27
27
  export { DocumentSkeleton } from './components/docs/layout/doc-skeleton';
28
28
  export type { IFindNodeRestrictions } from './components/docs/layout/doc-skeleton';
29
- export { getCharSpaceApply, getLastLine, getNumberUnitValue, getPageFromPath, glyphIterator, lineIterator } from './components/docs/layout/tools';
29
+ export { getCharSpaceApply, getLastLine, getNumberUnitValue, getPageFromPath, glyphIterator, lineIterator, } from './components/docs/layout/tools';
30
30
  export { getLastColumn } from './components/docs/layout/tools';
31
31
  export { Liquid } from './components/docs/liquid';
32
- export type { DocsTableRenderViewportProvider, IDocsTableRenderViewport } from './components/docs/table-render-viewport';
33
- export { getDocsTableRenderViewport, setDocsTableRenderViewportProvider } from './components/docs/table-render-viewport';
32
+ export type { DocsTableRenderViewportProvider, IDocsTableRenderViewport, } from './components/docs/table-render-viewport';
33
+ export { getDocsTableRenderViewport, setDocsTableRenderViewportProvider, } from './components/docs/table-render-viewport';
34
34
  export { DataStreamTreeNode } from './components/docs/view-model/data-stream-tree-node';
35
35
  export { DocumentViewModel } from './components/docs/view-model/document-view-model';
36
36
  export { DocumentEditArea } from './components/docs/view-model/document-view-model';
@@ -44,9 +44,10 @@ export * from './engine';
44
44
  export * from './group';
45
45
  export * from './layer';
46
46
  export { IRenderingEngine, UniverRenderEnginePlugin } from './plugin';
47
- export { getCurrentTypeOfRenderer, IRenderManagerService, RenderManagerService, withCurrentTypeOfRenderer } from './render-manager/render-manager.service';
47
+ export { getCurrentTypeOfRenderer, IRenderManagerService, RenderManagerService, withCurrentTypeOfRenderer, } from './render-manager/render-manager.service';
48
48
  export { type RenderComponentType } from './render-manager/render-manager.service';
49
- export { type IRender, type IRenderContext, type IRenderModule, RenderUnit } from './render-manager/render-unit';
49
+ export { RenderUnit } from './render-manager/render-unit';
50
+ export type { IRender, IRenderContext, IRenderModule } from './render-manager/render-unit';
50
51
  export * from './scene';
51
52
  export * from './scene-viewer';
52
53
  export { type IChangeObserverConfig } from './scene.transformer';
@@ -34,6 +34,7 @@ export interface IRenderManagerService extends IDisposable {
34
34
  createRender(unitId: string, createUnitOptions?: ICreateUnitOptions): IRender;
35
35
  removeRender(unitId: string): void;
36
36
  /**
37
+ * @deprecated use getRenderUnitById instead
37
38
  * Get RenderUnit By Id, RenderUnit implements IRender
38
39
  * @param unitId
39
40
  */
@@ -51,8 +51,16 @@ export declare class Transformer extends Disposable implements ITransformerConfi
51
51
  rotationSnaps: number[];
52
52
  rotationSnapTolerance: number;
53
53
  rotateAnchorOffset: number;
54
+ rotateAnchorPosition: 'top' | 'bottom';
55
+ rotateLineEnabled: boolean;
54
56
  rotateSize: number;
55
57
  rotateCornerRadius: number;
58
+ rotateFill: string | undefined;
59
+ rotateStroke: string | undefined;
60
+ rotateStrokeWidth: number | undefined;
61
+ rotateIconEnabled: boolean;
62
+ rotateIconStroke: string | undefined;
63
+ rotateIconStrokeWidth: number;
56
64
  borderEnabled: boolean;
57
65
  borderStroke: string;
58
66
  borderStrokeWidth: number;
@@ -63,10 +71,19 @@ export declare class Transformer extends Disposable implements ITransformerConfi
63
71
  anchorStrokeWidth: number;
64
72
  anchorSize: number;
65
73
  anchorCornerRadius: number;
74
+ anchorStyle: 'default' | 'canva';
75
+ anchorSideLongSize: number;
76
+ anchorSideShortSize: number;
77
+ anchorSideCornerRadius: number;
78
+ anchorShadowColor: string | undefined;
79
+ anchorShadowBlur: number;
80
+ anchorShadowOffsetX: number;
81
+ anchorShadowOffsetY: number;
66
82
  keepRatio: boolean;
67
83
  centeredScaling: boolean;
68
84
  zeroLeft: number;
69
85
  zeroTop: number;
86
+ moveBoundaryEnabled: boolean;
70
87
  /**
71
88
  * leftTop centerTop rightTop
72
89
  * leftMiddle rightMiddle
@@ -152,8 +169,11 @@ export declare class Transformer extends Disposable implements ITransformerConfi
152
169
  private _rotateMoving;
153
170
  private _getOutlinePosition;
154
171
  private _getRotateAnchorCursor;
172
+ private _createRotateIcon;
155
173
  private _getCopperAnchorPosition;
156
174
  private _getRotateAnchorPosition;
175
+ private _isMiddleAnchor;
176
+ private _getResizeAnchorProps;
157
177
  private _createResizeAnchor;
158
178
  private _createCopperResizeAnchor;
159
179
  private _getNorthEastPoints;
@@ -36,5 +36,6 @@ export declare class CanvasColorService extends Disposable implements ICanvasCol
36
36
  constructor(_themeService: ThemeService);
37
37
  getRenderColor(color: string): string;
38
38
  }
39
+ export declare function getDarkRenderColorOverride(color: string): string | null;
39
40
  export declare function hexToRgb(_hex: string): RGBColorType;
40
41
  export declare function rgbToHex(rgbColor: RGBColorType): string;
@@ -55,6 +55,7 @@ export interface IImageProps extends IShapeProps {
55
55
  */
56
56
  adjustValues?: Nullable<Record<string, number>>;
57
57
  opacity?: number;
58
+ clipBounds?: Nullable<IShapeClipBounds>;
58
59
  }
59
60
  export declare class Image extends Shape<IImageProps> {
60
61
  protected _props: IImageProps;
@@ -68,7 +69,9 @@ export declare class Image extends Shape<IImageProps> {
68
69
  get srcRect(): Nullable<ISrcRect>;
69
70
  get prstGeom(): Nullable<string>;
70
71
  get opacity(): number;
72
+ get clipBounds(): Nullable<IShapeClipBounds>;
71
73
  setOpacity(opacity: number): void;
74
+ setClipBounds(clipBounds?: Nullable<IShapeClipBounds>): void;
72
75
  setClipService(clipService: Nullable<IImageShapeClipService>): void;
73
76
  getClipService(): Nullable<IImageShapeClipService>;
74
77
  get classType(): RENDER_CLASS_TYPE;