@univerjs/engine-render 1.0.0-alpha.7 → 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 (112) hide show
  1. package/lib/af-DK_CjRn6.js +210 -0
  2. package/lib/as-BPtSu6VN.js +24 -0
  3. package/lib/be-CrQ0smca.js +24 -0
  4. package/lib/bg-CrQqGwni.js +24 -0
  5. package/lib/bn-NCLZcWHi.js +24 -0
  6. package/lib/ca-SUf6Y2Om.js +51 -0
  7. package/lib/cjs/index.js +1734 -1786
  8. package/lib/cop-C3sk0IUo.js +24 -0
  9. package/lib/cs-CmAteokq.js +30 -0
  10. package/lib/cu-CBUlrW6Y.js +45 -0
  11. package/lib/cy-BBPa6z2x.js +24 -0
  12. package/lib/da-CCDXfXtG.js +24 -0
  13. package/lib/de-1901-CWoAOigE.js +24 -0
  14. package/lib/de-1996-BL6awyxG.js +24 -0
  15. package/lib/de-ch-1901-hVThVHVb.js +24 -0
  16. package/lib/el-monoton-D3aKqTz2.js +24 -0
  17. package/lib/el-polyton-ogVWcTzh.js +24 -0
  18. package/lib/en-gb-B7Al27b_.js +34 -0
  19. package/lib/es/index.js +1729 -1786
  20. package/lib/es-DcaaHPU_.js +24 -0
  21. package/lib/et-B_spaleu.js +24 -0
  22. package/lib/eu-Ctv_kq9Z.js +24 -0
  23. package/lib/fi-RW5VB8Yp.js +24 -0
  24. package/lib/fr-BC2onEz9.js +24 -0
  25. package/lib/fur-AC12wySk.js +24 -0
  26. package/lib/ga-Cn6LkudM.js +71 -0
  27. package/lib/gl-DZGc-K_G.js +24 -0
  28. package/lib/grc-DOlGgO8T.js +24 -0
  29. package/lib/gu-Bjl0l-cf.js +24 -0
  30. package/lib/hi-DsAaTPCC.js +24 -0
  31. package/lib/hr-DT1SBBes.js +24 -0
  32. package/lib/hsb-DC_ITc1e.js +59 -0
  33. package/lib/hu-DVk7Y_ka.js +24 -0
  34. package/lib/hy-e995ysyO.js +24 -0
  35. package/lib/ia-Cr4TJH0c.js +35 -0
  36. package/lib/id-DifDyWg9.js +71 -0
  37. package/lib/index.js +32032 -0
  38. package/lib/is-BT8UVRze.js +24 -0
  39. package/lib/it-Bt_Meacx.js +24 -0
  40. package/lib/ka-jyoLzyDE.js +24 -0
  41. package/lib/kmr-Cfwhwuff.js +24 -0
  42. package/lib/kn-C6Lov-DP.js +24 -0
  43. package/lib/la-DuvHjUWw.js +24 -0
  44. package/lib/la-x-classic-yTyAOQEt.js +24 -0
  45. package/lib/la-x-liturgic-CXeQb4FY.js +24 -0
  46. package/lib/lt-BBe8DlDF.js +24 -0
  47. package/lib/lv-Q2BBHnzp.js +24 -0
  48. package/lib/ml-2xLVYkVY.js +24 -0
  49. package/lib/mn-cyrl-lHM4n0oC.js +24 -0
  50. package/lib/mn-cyrl-x-lmc-3aetruI8.js +24 -0
  51. package/lib/mr-CjWJPVmH.js +24 -0
  52. package/lib/mul-ethi-D_CMSMEq.js +24 -0
  53. package/lib/nb-DI8u59ch.js +135 -0
  54. package/lib/nl-BHQJ6Gvn.js +65 -0
  55. package/lib/nn-ntZvarUK.js +135 -0
  56. package/lib/no-B8ItS0F3.js +133 -0
  57. package/lib/oc-P_i3-xLA.js +24 -0
  58. package/lib/or-50rxpoq4.js +24 -0
  59. package/lib/pa-C54UG8eN.js +24 -0
  60. package/lib/pi-B9cgjyG1.js +24 -0
  61. package/lib/pl-9fg-ESVt.js +45 -0
  62. package/lib/pms-BRGfm5gS.js +24 -0
  63. package/lib/pt-Cum2_NUC.js +24 -0
  64. package/lib/rm-C0MIK9N4.js +24 -0
  65. package/lib/ro-0fmdH0HA.js +24 -0
  66. package/lib/ru-v4l-ayaq.js +209 -0
  67. package/lib/sa-CKY9c_Vq.js +24 -0
  68. package/lib/sh-cyrl-BpCRFOmq.js +141 -0
  69. package/lib/sh-latn-sRy4Tuaj.js +141 -0
  70. package/lib/sk-_iOeDNrQ.js +30 -0
  71. package/lib/sl-DpiklF-D.js +24 -0
  72. package/lib/sr-cyrl-Dpzrbd0W.js +155 -0
  73. package/lib/sv-CFm5y56M.js +24 -0
  74. package/lib/ta-BcghgTbD.js +24 -0
  75. package/lib/te-B5Spl2Jk.js +24 -0
  76. package/lib/th-DWX5iPSo.js +24 -0
  77. package/lib/tk-BMbKB10q.js +24 -0
  78. package/lib/tr-CIHIuzqc.js +24 -0
  79. package/lib/types/basics/document-node-tools.d.ts +1 -0
  80. package/lib/types/basics/drawing-effect.d.ts +34 -0
  81. package/lib/types/basics/i-events.d.ts +0 -6
  82. package/lib/types/basics/tools.d.ts +1 -22
  83. package/lib/types/components/docs/document.d.ts +4 -1
  84. package/lib/types/components/docs/layout/block/paragraph/shaping.d.ts +1 -1
  85. package/lib/types/components/docs/layout/doc-skeleton.d.ts +8 -0
  86. package/lib/types/components/docs/layout/line-breaker/enhancers/hyphen-enhancer.d.ts +2 -2
  87. package/lib/types/components/docs/layout/line-breaker/enhancers/link-enhancer.d.ts +2 -2
  88. package/lib/types/components/docs/layout/line-breaker/enhancers/whole-entity-enhancer.d.ts +33 -0
  89. package/lib/types/components/docs/layout/line-breaker/line-breaker.d.ts +1 -0
  90. package/lib/types/components/docs/layout/model/glyph.d.ts +15 -3
  91. package/lib/types/components/docs/layout/shaping-engine/font-cache.d.ts +0 -13
  92. package/lib/types/components/docs/layout/tools.d.ts +33 -1
  93. package/lib/types/components/docs/table-render-viewport.d.ts +2 -0
  94. package/lib/types/components/sheets/sheet.render-skeleton.d.ts +1 -94
  95. package/lib/types/drawing-group.d.ts +3 -1
  96. package/lib/types/engine.d.ts +0 -7
  97. package/lib/types/index.d.ts +4 -2
  98. package/lib/types/plugin.d.ts +0 -7
  99. package/lib/types/render-manager/render-manager.service.d.ts +0 -21
  100. package/lib/types/scene.d.ts +1 -30
  101. package/lib/types/scene.input-manager.d.ts +1 -3
  102. package/lib/types/shape/index.d.ts +1 -0
  103. package/lib/types/shape/line.d.ts +50 -0
  104. package/lib/types/shape/shape.d.ts +7 -1
  105. package/lib/types/viewport.d.ts +1 -5
  106. package/lib/uk-Dir3oxLs.js +24 -0
  107. package/lib/umd/index.js +2 -3
  108. package/lib/zh-latn-pinyin-BdYb-Ey_.js +24 -0
  109. package/package.json +7 -9
  110. package/lib/types/components/docs/layout/shaping-engine/font-library.d.ts +0 -60
  111. package/lib/types/components/docs/layout/shaping-engine/text-shaping.d.ts +0 -34
  112. package/lib/types/services/render-config.service.d.ts +0 -28
@@ -0,0 +1,34 @@
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 { IBoundRectNoAngle } from './vector2';
17
+ import { type IGlowEffect, type IShadowEffect } from '@univerjs/core';
18
+ export interface IResolvedDrawingShadow {
19
+ color: string;
20
+ blurRadius: number;
21
+ offsetX: number;
22
+ offsetY: number;
23
+ }
24
+ export declare function resolveOuterShadowEffect(effect: IShadowEffect | undefined): IResolvedDrawingShadow | undefined;
25
+ export declare function resolveGlowEffect(effect: IGlowEffect | undefined): IResolvedDrawingShadow | undefined;
26
+ /**
27
+ * Resolves effects painted from an off-screen alpha mask.
28
+ *
29
+ * A glow uses two centered mask passes to match PowerPoint's DrawingML glow density without repainting source content.
30
+ */
31
+ export declare function resolveDrawingEffectMasks(glow: IGlowEffect | undefined, outerShadow: IShadowEffect | undefined): IResolvedDrawingShadow[];
32
+ export declare function expandDrawingEffectBounds(bounds: IBoundRectNoAngle, glow: IGlowEffect | undefined, outerShadow: IShadowEffect | undefined): IBoundRectNoAngle;
33
+ export declare function createDrawingEffectFilter(glow: IGlowEffect | undefined, outerShadow: IShadowEffect | undefined): string;
34
+ export declare function combineDrawingEffectFilter(currentFilter: string, effectFilter: string): string;
@@ -104,11 +104,6 @@ export interface IKeyboardEvent extends IUIEvent {
104
104
  * Status of Alt key being pressed
105
105
  */
106
106
  altKey: boolean;
107
- /**
108
- * Unicode value of character pressed
109
- * @deprecated
110
- */
111
- charCode?: number;
112
107
  /**
113
108
  * Code for key based on layout
114
109
  */
@@ -121,7 +116,6 @@ export interface IKeyboardEvent extends IUIEvent {
121
116
  * String representation of key
122
117
  */
123
118
  key: string;
124
- keyCode: number;
125
119
  /**
126
120
  * Status of Meta key (eg. Windows key) being pressed
127
121
  */
@@ -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 { ICellInfo, ICellWithCoord, IPosition, IRange, IRangeWithCoord, IScale, IStyleBase, Nullable } from '@univerjs/core';
16
+ import type { IPosition, IRange, IRangeWithCoord, IScale, IStyleBase, Nullable } from '@univerjs/core';
17
17
  import type { IDocumentSkeletonFontStyle } from './i-document-skeleton-cached';
18
18
  import type { IBoundRectNoAngle } from './vector2';
19
19
  export declare const getColor: (RgbArray: number[], opacity?: number) => string;
@@ -80,27 +80,6 @@ export declare function ptToMM(px: number): number;
80
80
  export declare function pxToInch(px: number): number;
81
81
  export declare function getScale(parentScale: IScale): number;
82
82
  export declare function getCellPositionByIndex(row: number, column: number, rowHeightAccumulation: number[], columnWidthAccumulation: number[]): IPosition;
83
- /**
84
- * @deprecated use same function in @univerjs/core
85
- * @description Get the cell position information of the specified row and column, including the position information of the cell and the merge information of the cell
86
- * @param {number} row The row index of the cell
87
- * @param {number} column The column index of the cell
88
- * @param {number[]} rowHeightAccumulation The accumulated height of each row
89
- * @param {number[]} columnWidthAccumulation The accumulated width of each column
90
- * @param {ICellInfo} mergeDataInfo The merge information of the cell
91
- * @returns {ICellWithCoord} The cell position information of the specified row and column, including the position information of the cell and the merge information of the cell
92
- */
93
- declare function getCellWithCoordByIndexCore(row: number, column: number, rowHeightAccumulation: number[], columnWidthAccumulation: number[], mergeDataInfo: ICellInfo): ICellWithCoord;
94
- /**
95
- * @deprecated please use getCellWithCoordByIndexCore in @univerjs/core instead
96
- */
97
- declare const getCellByIndexWithMergeInfo: typeof getCellWithCoordByIndexCore;
98
- export { getCellByIndexWithMergeInfo };
99
- /**
100
- * Determine whether there are any cells in a row that are not in the merged cells, mainly used for the calculation of auto height
101
- * @deprecated please use SpreadsheetSkeleton@_hasUnMergedCellInRow
102
- */
103
- export declare function hasUnMergedCellInRow(row: number, startColumn: number, endColumn: number, mergeData: IRange[]): boolean;
104
83
  export declare function mergeInfoOffset(mergeInfo: IRangeWithCoord, offsetX: number, offsetY: number): {
105
84
  startY: number;
106
85
  endY: number;
@@ -14,12 +14,13 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { Nullable } from '@univerjs/core';
17
- import type { IDocumentSkeletonPage } from '../../basics/i-document-skeleton-cached';
17
+ import type { IDocumentSkeletonPage, IDocumentSkeletonSection } from '../../basics/i-document-skeleton-cached';
18
18
  import type { Transform } from '../../basics/transform';
19
19
  import type { IViewportInfo } from '../../basics/vector2';
20
20
  import type { UniverRenderingContext } from '../../context';
21
21
  import type { IDocumentsConfig, IPageMarginLayout } from './doc-component';
22
22
  import type { DocumentSkeleton } from './layout/doc-skeleton';
23
+ import { Vector2 } from '../../basics/vector2';
23
24
  import { DocComponent } from './doc-component';
24
25
  import './extensions';
25
26
  export interface IPageRenderConfig {
@@ -33,6 +34,7 @@ export interface IDocumentOffsetConfig extends IPageMarginLayout {
33
34
  docsTop: number;
34
35
  documentTransform: Transform;
35
36
  }
37
+ export declare function drawSectionColumnSeparators(ctx: UniverRenderingContext, section: IDocumentSkeletonSection, height: number, offsetX?: number, offsetY?: number): void;
36
38
  export declare class Documents extends DocComponent {
37
39
  private readonly _pageRender$;
38
40
  readonly pageRender$: import("rxjs").Observable<IPageRenderConfig>;
@@ -42,6 +44,7 @@ export declare class Documents extends DocComponent {
42
44
  dispose(): void;
43
45
  getOffsetConfig(): IDocumentOffsetConfig;
44
46
  getEngine(): Nullable<import("../..").Engine>;
47
+ isHit(coord: Vector2): boolean;
45
48
  changeSkeleton(newSkeleton: DocumentSkeleton): this;
46
49
  protected _draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
47
50
  draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
@@ -24,4 +24,4 @@ export interface IShapedText {
24
24
  glyphs: IDocumentSkeletonGlyph[];
25
25
  breakPointType: BreakPointType;
26
26
  }
27
- export declare function shaping(ctx: ILayoutContext, content: string, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, useOpenType?: boolean): IShapedText[];
27
+ export declare function shaping(ctx: ILayoutContext, content: string, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig): IShapedText[];
@@ -18,6 +18,7 @@ import type { IDocumentSkeletonCached, IDocumentSkeletonGlyph, IDocumentSkeleton
18
18
  import type { INodeInfo, INodePosition, INodeSearch } from '../../../basics/interfaces';
19
19
  import type { IViewportInfo, Vector2 } from '../../../basics/vector2';
20
20
  import type { DocumentViewModel } from '../view-model/document-view-model';
21
+ import type { IDocumentPaginationMetrics } from './tools';
21
22
  import { Skeleton } from '@univerjs/core';
22
23
  import { PageLayoutType } from '../../../basics/i-document-skeleton-cached';
23
24
  import { DocumentEditArea } from '../view-model/document-view-model';
@@ -42,6 +43,7 @@ export declare class DocumentSkeleton extends Skeleton {
42
43
  private _languageDetector;
43
44
  private _iteratorCount;
44
45
  private _initialWidth;
46
+ private _paginationMetrics;
45
47
  constructor(_docViewModel: DocumentViewModel, localeService: LocaleService);
46
48
  static create(docViewModel: DocumentViewModel, localeService: LocaleService): DocumentSkeleton;
47
49
  dispose(): void;
@@ -52,6 +54,11 @@ export declare class DocumentSkeleton extends Skeleton {
52
54
  */
53
55
  calculate(bounds?: IViewportInfo): void;
54
56
  getSkeletonData(): Nullable<IDocumentSkeletonCached>;
57
+ /**
58
+ * Returns a cloned snapshot of the most recent layout's bounded pagination counters.
59
+ * These diagnostics describe renderer work and are not part of the document model.
60
+ */
61
+ getPaginationMetrics(): Nullable<IDocumentPaginationMetrics>;
55
62
  resetInitialWidth(): void;
56
63
  getActualSize(): {
57
64
  actualWidth: number;
@@ -104,6 +111,7 @@ export declare class DocumentSkeleton extends Skeleton {
104
111
  */
105
112
  private _createSkeleton;
106
113
  private _addNewSectionByContinuous;
114
+ private _addNewSectionByNextColumn;
107
115
  private _restoreContinuousSection;
108
116
  private _findNodeByIndex;
109
117
  }
@@ -16,7 +16,7 @@
16
16
  import type { Nullable } from '@univerjs/core';
17
17
  import type { Hyphen } from '../../hyphenation/hyphen';
18
18
  import type { Lang } from '../../hyphenation/lang';
19
- import type { IBreakPoints, LineBreaker } from '../line-breaker';
19
+ import type { IBreakPoints } from '../line-breaker';
20
20
  import { Break } from '../break';
21
21
  export declare class LineBreakerHyphenEnhancer implements IBreakPoints {
22
22
  private _lineBreaker;
@@ -30,6 +30,6 @@ export declare class LineBreakerHyphenEnhancer implements IBreakPoints {
30
30
  private _hyphenIndex;
31
31
  private _hyphenSlice;
32
32
  content: string;
33
- constructor(_lineBreaker: LineBreaker, _hyphen: Hyphen, _lang: Lang, _doNotHyphenateCaps?: boolean);
33
+ constructor(_lineBreaker: IBreakPoints, _hyphen: Hyphen, _lang: Lang, _doNotHyphenateCaps?: boolean);
34
34
  nextBreakPoint(): Nullable<Break>;
35
35
  }
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { Nullable } from '@univerjs/core';
17
- import type { IBreakPoints, LineBreaker } from '../line-breaker';
17
+ import type { IBreakPoints } from '../line-breaker';
18
18
  import { Break } from '../break';
19
19
  export declare class LineBreakerLinkEnhancer implements IBreakPoints {
20
20
  private _lineBreaker;
@@ -25,6 +25,6 @@ export declare class LineBreakerLinkEnhancer implements IBreakPoints {
25
25
  private _index;
26
26
  private _linkSlice;
27
27
  content: string;
28
- constructor(_lineBreaker: LineBreaker);
28
+ constructor(_lineBreaker: IBreakPoints);
29
29
  nextBreakPoint(): Nullable<Break>;
30
30
  }
@@ -0,0 +1,33 @@
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 { ICustomRange, Nullable } from '@univerjs/core';
17
+ import type { Break } from '../break';
18
+ import type { IBreakPoints } from '../line-breaker';
19
+ /**
20
+ * Removes line-break opportunities from the interior of measured whole
21
+ * entities. The model keeps the entity's complete source text, while shaping
22
+ * treats the inclusive custom range as one unbreakable inline object.
23
+ */
24
+ export declare class LineBreakerWholeEntityEnhancer implements IBreakPoints {
25
+ private readonly _lineBreaker;
26
+ private readonly _contentStartIndex;
27
+ readonly content: string;
28
+ private readonly _ranges;
29
+ private _rangeIndex;
30
+ constructor(_lineBreaker: IBreakPoints, ranges: readonly ICustomRange[], _contentStartIndex: number);
31
+ nextBreakPoint(): Nullable<Break>;
32
+ private _isInsideWholeEntity;
33
+ }
@@ -20,6 +20,7 @@ interface ILineBreakExtension {
20
20
  (breaker: LineBreaker): void;
21
21
  }
22
22
  export interface IBreakPoints {
23
+ readonly content: string;
23
24
  nextBreakPoint(): Nullable<Break>;
24
25
  }
25
26
  export declare class LineBreaker implements IBreakPoints {
@@ -15,7 +15,6 @@
15
15
  */
16
16
  import type { IAdjustability, IDocumentSkeletonBullet, IDocumentSkeletonDivide, IDocumentSkeletonGlyph } from '../../../../basics/i-document-skeleton-cached';
17
17
  import type { IFontCreateConfig } from '../../../../basics/interfaces';
18
- import type { IOpenTypeGlyphInfo } from '../shaping-engine/text-shaping';
19
18
  import { GlyphType } from '../../../../basics/i-document-skeleton-cached';
20
19
  export declare function isSpace(char: string): boolean;
21
20
  export declare function isJustifiable(content: string): boolean;
@@ -25,11 +24,24 @@ export declare function createSkeletonLetterGlyph(content: string, config: IFont
25
24
  ascent?: number;
26
25
  descent?: number;
27
26
  width?: number;
28
- }, glyphInfo?: IOpenTypeGlyphInfo): IDocumentSkeletonGlyph;
27
+ }): IDocumentSkeletonGlyph;
28
+ /**
29
+ * Creates one non-text skeleton glyph for a whole entity whose source spans
30
+ * multiple model characters. `raw` and `count` retain the source mapping.
31
+ *
32
+ * The zero-width marker keeps the glyph in the document paint loop so a
33
+ * component extension can render the entity, without painting its model
34
+ * source as ordinary text.
35
+ */
36
+ export declare function createSkeletonWholeEntityGlyph(raw: string, config: IFontCreateConfig, glyphMetrics: {
37
+ ascent?: number;
38
+ descent?: number;
39
+ width?: number;
40
+ }): IDocumentSkeletonGlyph;
29
41
  export declare function createSkeletonTabGlyph(config: IFontCreateConfig, glyphWidth?: number): IDocumentSkeletonGlyph;
30
42
  export declare function createHyphenDashGlyph(config: IFontCreateConfig): IDocumentSkeletonGlyph;
31
43
  export declare function createSkeletonCustomBlockGlyph(config: IFontCreateConfig, glyphWidth?: number, glyphHeight?: number, drawingId?: string): IDocumentSkeletonGlyph;
32
- export declare function _createSkeletonWordOrLetter(glyphType: GlyphType, content: string, config: IFontCreateConfig, glyphWidth?: number, glyphInfo?: IOpenTypeGlyphInfo): IDocumentSkeletonGlyph;
44
+ export declare function _createSkeletonWordOrLetter(glyphType: GlyphType, content: string, config: IFontCreateConfig, glyphWidth?: number): IDocumentSkeletonGlyph;
33
45
  export declare function createSkeletonBulletGlyph(glyph: IDocumentSkeletonGlyph, bulletSkeleton: IDocumentSkeletonBullet, charSpaceApply: number): IDocumentSkeletonGlyph;
34
46
  export declare function setGlyphGroupLeft(glyphGroup: IDocumentSkeletonGlyph[], left?: number): void;
35
47
  export declare function setGlyphLeft(glyph: IDocumentSkeletonGlyph, left?: number): void;
@@ -15,7 +15,6 @@
15
15
  */
16
16
  import type { Nullable } from '@univerjs/core';
17
17
  import type { IDocumentSkeletonBoundingBox, IDocumentSkeletonFontStyle } from '../../../../basics/i-document-skeleton-cached';
18
- import type { IOpenTypeGlyphInfo } from './text-shaping';
19
18
  export declare const DEFAULT_MEASURE_TEXT = "0";
20
19
  export interface IMeasureTextCache {
21
20
  fontBoundingBoxAscent: number;
@@ -45,18 +44,6 @@ export declare class FontCache {
45
44
  height: number;
46
45
  };
47
46
  static getTextSize(content: string, fontStyle: IDocumentSkeletonFontStyle): IDocumentSkeletonBoundingBox;
48
- static getBBoxFromGlyphInfo(glyphInfo: IOpenTypeGlyphInfo, fontStyle: IDocumentSkeletonFontStyle): {
49
- width: number;
50
- ba: number;
51
- bd: number;
52
- aba: number;
53
- abd: number;
54
- sp: number;
55
- sbr: number;
56
- spr: number;
57
- sbo: number;
58
- spo: number;
59
- };
60
47
  /**
61
48
  * Measure text on another canvas.
62
49
  * @param content
@@ -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, PositionedObjectLayoutType } from '@univerjs/core';
16
+ import type { DocumentDataModel, ICustomRangeForInterceptor, INumberUnit, IObjectPositionH, IObjectPositionV, IParagraph, IParagraphStyle, ITextStyle, Nullable, PositionedObjectLayoutType } from '@univerjs/core';
17
17
  import type { IDocumentSkeletonCached, IDocumentSkeletonColumn, IDocumentSkeletonDivide, IDocumentSkeletonFontStyle, IDocumentSkeletonGlyph, IDocumentSkeletonLine, IDocumentSkeletonPage, IDocumentSkeletonRow, IDocumentSkeletonSection, IDocumentSkeletonTable, ISkeletonResourceReference } from '../../../basics/i-document-skeleton-cached';
18
18
  import type { IDocsConfig, IParagraphConfig, ISectionBreakConfig } from '../../../basics/interfaces';
19
19
  import type { IBoundRectNoAngle } from '../../../basics/vector2';
@@ -120,6 +120,7 @@ export interface IDocumentSkeletonTableContext {
120
120
  tableRect: IBoundRectNoAngle;
121
121
  }
122
122
  export interface IDocumentSkeletonTableIteratorOptions {
123
+ includeCells?: boolean;
123
124
  docsLeft?: number;
124
125
  docsTop?: number;
125
126
  pageMarginTop?: number;
@@ -171,11 +172,25 @@ export declare function getFontConfigFromLastGlyph(glyph: IDocumentSkeletonGlyph
171
172
  };
172
173
  export declare function getFontCreateConfig(index: number, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, paragraph: IParagraph): IFontCreateConfig;
173
174
  export declare function getCustomRangeGlyphWidth(index: number, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, config: IFontCreateConfig): number | undefined;
175
+ /**
176
+ * Returns whether a custom range should occupy one measured glyph in the
177
+ * document skeleton while preserving its complete source text in the model.
178
+ *
179
+ * Visible whole-entity ranges such as mentions keep their existing shaping.
180
+ * The atomic behavior is reserved for hidden ranges whose renderer provides
181
+ * explicit glyph metrics, such as an inline formula.
182
+ */
183
+ export declare function isMeasuredWholeEntityRange(customRange: Nullable<ICustomRangeForInterceptor>): customRange is ICustomRangeForInterceptor;
174
184
  export declare function getCustomRangeGlyphMetrics(index: number, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, config: IFontCreateConfig): {
175
185
  ascent?: number;
176
186
  descent?: number;
177
187
  width?: number;
178
188
  } | undefined;
189
+ export declare function getCustomRangeGlyphMetricsFromRange(customRange: ICustomRangeForInterceptor, config: IFontCreateConfig): {
190
+ ascent?: number;
191
+ descent?: number;
192
+ width?: number;
193
+ } | undefined;
179
194
  export declare function getNullSkeleton(): IDocumentSkeletonCached;
180
195
  export declare function setPageParent(pages: IDocumentSkeletonPage[], parent: IDocumentSkeletonCached): void;
181
196
  export declare enum FloatObjectType {
@@ -194,6 +209,22 @@ export interface IFloatObject {
194
209
  type: FloatObjectType;
195
210
  positionV: IObjectPositionV;
196
211
  }
212
+ export interface IDocumentPaginationMetrics {
213
+ /** Paragraphs that entered the Word-compatible pagination decision path. */
214
+ constrainedParagraphs: number;
215
+ /** Paragraphs that stayed on the no-constraint fast path. */
216
+ noConstraintParagraphs: number;
217
+ /** Already-shaped lines inspected by pagination checkpoints. */
218
+ measuredLineCount: number;
219
+ /** Bounded local pagination adjustments; at most one per paragraph or keep chain. */
220
+ retryCount: number;
221
+ /** Already-shaped lines moved by a pagination adjustment. */
222
+ movedLineCount: number;
223
+ /** Paragraphs inspected while walking backward through keep-next chains. */
224
+ keepNextScanCount: number;
225
+ /** Largest number of line references retained by one local checkpoint. */
226
+ peakCheckpointLineCount: number;
227
+ }
197
228
  export interface ILayoutContext {
198
229
  viewModel: DocumentViewModel;
199
230
  dataModel: DocumentDataModel;
@@ -210,6 +241,7 @@ export interface ILayoutContext {
210
241
  paragraphConfigCache: Map<string, Map<number, IParagraphConfig>>;
211
242
  sectionBreakConfigCache: Map<number, ISectionBreakConfig>;
212
243
  paragraphsOpenNewPage: Set<number>;
244
+ paginationMetrics?: IDocumentPaginationMetrics;
213
245
  hyphen: Hyphen;
214
246
  languageDetector: LanguageDetector;
215
247
  }
@@ -18,10 +18,12 @@ export interface IDocsTableRenderViewport {
18
18
  leadingInsetLeft?: number;
19
19
  scrollLeft: number;
20
20
  trailingInsetRight?: number;
21
+ viewportLeft?: number;
21
22
  viewportWidth: number;
22
23
  }
23
24
  export type DocsTableRenderViewportProvider = (unitId: string, tableId: string) => IDocsTableRenderViewport | null | undefined;
24
25
  export declare function setDocsTableRenderViewportProvider(provider: DocsTableRenderViewportProvider | null): void;
25
26
  export declare function getDocsTableRenderViewport(unitId: string, tableId: string): IDocsTableRenderViewport | null;
26
27
  export declare function getDocsTableVirtualContentWidth(viewport: IDocsTableRenderViewport): number;
28
+ export declare function getDocsTableViewportLeft(viewport: IDocsTableRenderViewport | null | undefined, fallbackLeft: number, docsLeft?: number): number;
27
29
  export declare function hasDocsTableHorizontalViewport(viewport: IDocsTableRenderViewport | null | undefined): viewport is IDocsTableRenderViewport;
@@ -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 { ICellData, ICellDataForSheetInterceptor, ICellInfo, ICellWithCoord, IColAutoWidthInfo, IColumnRange, IDocumentData, IGetRowColByPosOptions, IPaddingData, IRange, IRowAutoHeightInfo, IRowRange, ISize, IStyleData, ITextRotation, Nullable, Styles, Worksheet } from '@univerjs/core';
16
+ import type { ICellDataForSheetInterceptor, ICellInfo, IColAutoWidthInfo, IColumnRange, IDocumentData, IPaddingData, IRange, IRowAutoHeightInfo, IRowRange, ISize, IStyleData, ITextRotation, Nullable, Styles, Worksheet } from '@univerjs/core';
17
17
  import type { IBoundRectNoAngle, IPoint, IViewportInfo } from '../../basics/vector2';
18
18
  import type { Scene } from '../../scene';
19
19
  import type { IFontCacheItem, IStylesCache } from './interfaces';
@@ -98,10 +98,6 @@ export declare class SpreadsheetSkeleton extends SheetSkeleton {
98
98
  get showGridlines(): BooleanNumber;
99
99
  get gridlinesColor(): string | undefined;
100
100
  dispose(): void;
101
- /**
102
- * @deprecated should never expose a property that is provided by another module!
103
- */
104
- getStyles(): Styles;
105
101
  setOverflowCache(value: ObjectMatrix<IRange>): void;
106
102
  getFont(rowIndex: number, columnIndex: number): Nullable<IFontCacheItem>;
107
103
  /**
@@ -145,11 +141,6 @@ export declare class SpreadsheetSkeleton extends SheetSkeleton {
145
141
  * @returns {number} currColWidth
146
142
  */
147
143
  _getMeasuredWidthByCell(cell: ICellDataForSheetInterceptor, row: number, column: number, currColWidth: number): number;
148
- /**
149
- * @deprecated use `getRangeByViewport` instead.
150
- * @param bounds
151
- */
152
- getRangeByBounding(bounds?: IViewportInfo): IRange;
153
144
  getRangeByViewport(vpInfo?: IViewportInfo): IRange;
154
145
  getCacheRangeByViewport(vpInfo?: IViewportInfo, isPrinting?: boolean): IRange;
155
146
  getRangeByViewBound(bound?: IBoundRectNoAngle): IRange;
@@ -157,77 +148,7 @@ export declare class SpreadsheetSkeleton extends SheetSkeleton {
157
148
  getOverflowPosition(contentSize: Required<ISize>, horizontalAlign: HorizontalAlign, row: number, column: number, columnCount: number): IColumnRange;
158
149
  private _isOverflowBlockedByAdjacentCell;
159
150
  private _isOverflowSideBlocked;
160
- /**
161
- * Get cell by pos(offsetX, offsetY).
162
- * @deprecated Please use `getCellWithCoordByOffset` instead.
163
- */
164
- calculateCellIndexByPosition(offsetX: number, offsetY: number, scaleX: number, scaleY: number, scrollXY: {
165
- x: number;
166
- y: number;
167
- }): Nullable<ICellWithCoord>;
168
- /**
169
- * This method has the same implementation as `getCellIndexByOffset`,
170
- * but uses a different name to maintain backward compatibility with previous calls.
171
- *
172
- * @deprecated Please use `getCellIndexByOffset` method instead.
173
- */
174
- getCellPositionByOffset(offsetX: number, offsetY: number, scaleX: number, scaleY: number, scrollXY: {
175
- x: number;
176
- y: number;
177
- }, options?: IGetRowColByPosOptions): {
178
- row: number;
179
- column: number;
180
- };
181
151
  getCellWithMergeInfoByIndex(row: number, column: number): Nullable<ICellInfo>;
182
- /**
183
- * Same as getColumnIndexByOffsetX
184
- * @deprecated Please use `getColumnIndexByOffsetX` method instead.
185
- */
186
- getColumnPositionByOffsetX(offsetX: number, scaleX: number, scrollXY: {
187
- x: number;
188
- y: number;
189
- }, options?: IGetRowColByPosOptions): number;
190
- /**
191
- * Same as getRowIndexByOffsetY
192
- * @deprecated Please use `getRowIndexByOffsetY` method instead.
193
- */
194
- getRowPositionByOffsetY(offsetY: number, scaleY: number, scrollXY: {
195
- x: number;
196
- y: number;
197
- }, options?: IGetRowColByPosOptions): number;
198
- /**
199
- * Same as getCellWithCoordByIndex, but uses a different name to maintain backward compatibility with previous calls.
200
- * @deprecated Please use `getCellWithCoordByIndex` instead.
201
- */
202
- getCellByIndex(row: number, column: number): ICellWithCoord;
203
- /**
204
- * @deprecated Please use `getCellWithCoordByIndex(row, col, false)` instead.
205
- * @param row
206
- * @param column
207
- */
208
- getCellByIndexWithNoHeader(row: number, column: number): ICellWithCoord;
209
- /**
210
- * Only used for cell edit, and no need to rotate text when edit cell content!
211
- * @deprecated use same method in worksheet.
212
- * @param cell
213
- */
214
- getBlankCellDocumentModel(cell: Nullable<ICellData>): IDocumentLayoutObject;
215
- /**
216
- * Only used for cell edit, and no need to rotate text when edit cell content!
217
- * @deprecated use same method in worksheet.
218
- * @param cell
219
- */
220
- getCellDocumentModelWithFormula(cell: ICellData): Nullable<IDocumentLayoutObject>;
221
- /**
222
- * This method generates a document model based on the cell's properties and handles the associated styles and configurations.
223
- * If the cell does not exist, it will return null.
224
- *
225
- * @deprecated use same method in worksheet.
226
- * PS: This method has significant impact on performance.
227
- * @param cell
228
- * @param options
229
- */
230
- private _getCellDocumentModel;
231
152
  /**
232
153
  * Calculate the overflow of cell text. If there is no value on either side of the cell,
233
154
  * the text content of this cell can be drawn to both sides, not limited by the cell's width.
@@ -275,20 +196,6 @@ export declare class SpreadsheetSkeleton extends SheetSkeleton {
275
196
  rowStartY(row: number): number;
276
197
  getHiddenRowsInRange(range: IRowRange): number[];
277
198
  getHiddenColumnsInRange(range: IColumnRange): number[];
278
- /**
279
- * @deprecated use function `convertTransformToOffsetX` in same package.
280
- */
281
- convertTransformToOffsetX(offsetX: number, scaleX: number, scrollXY: {
282
- x: number;
283
- y: number;
284
- }): number;
285
- /**
286
- * @deprecated use function `convertTransformToOffsetY` in same package.
287
- */
288
- convertTransformToOffsetY(offsetY: number, scaleY: number, scrollXY: {
289
- x: number;
290
- y: number;
291
- }): number;
292
199
  }
293
200
  /**
294
201
  * convert canvas content position to physical position in screen
@@ -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 { IGroupBaseBound } from '@univerjs/core';
16
+ import type { IGlowEffect, IGroupBaseBound } from '@univerjs/core';
17
17
  import type { BaseObject } from './base-object';
18
18
  import type { IViewportInfo, Vector2 } from './basics';
19
19
  import type { UniverRenderingContext } from './context';
@@ -35,7 +35,9 @@ export declare class DrawingGroupObject extends Group {
35
35
  */
36
36
  private _baseBound;
37
37
  private _outerShadow?;
38
+ private _glow?;
38
39
  setOuterShadow(shadow?: IDrawingGroupShadow): void;
40
+ setGlow(glow?: IGlowEffect): void;
39
41
  /**
40
42
  * Set the baseBound (chOff/chExt in OOXML) for this group.
41
43
  * This defines the coordinate space of children within the group.
@@ -126,13 +126,6 @@ export declare class Engine extends Disposable {
126
126
  * Unmount the canvas without disposing it so it can be mounted again.
127
127
  */
128
128
  unmount(): void;
129
- /**
130
- * Mount the canvas to the element so it would be rendered on UI.
131
- * @deprecated Please use `mount` instead.
132
- * @param {HTMLElement} element - The element the canvas will mount on.
133
- * @param {true} [resize] If should perform resize when mounted and observe resize event.
134
- */
135
- setContainer(element: HTMLElement, resize?: boolean): void;
136
129
  private _clearResizeListener;
137
130
  resize(): void;
138
131
  dprChange(): void;
@@ -15,6 +15,8 @@
15
15
  */
16
16
  export * from './base-object';
17
17
  export * from './basics';
18
+ export { combineDrawingEffectFilter, createDrawingEffectFilter, expandDrawingEffectBounds, resolveDrawingEffectMasks, resolveGlowEffect, resolveOuterShadowEffect, } from './basics/drawing-effect';
19
+ export type { IResolvedDrawingShadow } from './basics/drawing-effect';
18
20
  export { getOffsetRectForDom } from './basics/position';
19
21
  export * from './canvas';
20
22
  export * from './components';
@@ -34,7 +36,7 @@ export type { IDocumentSkeletonColumnPagePathInfo, IDocumentSkeletonLineContext,
34
36
  export { getLastColumn } from './components/docs/layout/tools';
35
37
  export { Liquid } from './components/docs/liquid';
36
38
  export type { DocsTableRenderViewportProvider, IDocsTableRenderViewport, } from './components/docs/table-render-viewport';
37
- export { getDocsTableRenderViewport, setDocsTableRenderViewportProvider, } from './components/docs/table-render-viewport';
39
+ export { getDocsTableRenderViewport, getDocsTableViewportLeft, setDocsTableRenderViewportProvider, } from './components/docs/table-render-viewport';
38
40
  export { DataStreamTreeNode } from './components/docs/view-model/data-stream-tree-node';
39
41
  export { DocumentViewModel } from './components/docs/view-model/document-view-model';
40
42
  export { DocumentEditArea } from './components/docs/view-model/document-view-model';
@@ -48,7 +50,7 @@ export type { IDrawingGroupShadow } from './drawing-group';
48
50
  export * from './engine';
49
51
  export * from './group';
50
52
  export * from './layer';
51
- export { IRenderingEngine, UniverRenderEnginePlugin } from './plugin';
53
+ export { UniverRenderEnginePlugin } from './plugin';
52
54
  export { getCurrentTypeOfRenderer, IRenderManagerService, RenderManagerService, withCurrentTypeOfRenderer, } from './render-manager/render-manager.service';
53
55
  export { type RenderComponentType } from './render-manager/render-manager.service';
54
56
  export { RenderUnit } from './render-manager/render-unit';
@@ -15,13 +15,6 @@
15
15
  */
16
16
  import type { IUniverEngineRenderConfig } from './config/config';
17
17
  import { IConfigService, Injector, Plugin } from '@univerjs/core';
18
- import { Engine } from './engine';
19
- /**
20
- * The global rendering engine.
21
- *
22
- * @deprecated There will be no more default global render engine in the future.
23
- */
24
- export declare const IRenderingEngine: import("@wendellhu/redi").IdentifierDecorator<Engine>;
25
18
  export declare class UniverRenderEnginePlugin extends Plugin {
26
19
  private readonly _config;
27
20
  readonly _injector: Injector;