@univerjs/engine-render 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.
- package/lib/af-DK_CjRn6.js +210 -0
- package/lib/as-BPtSu6VN.js +24 -0
- package/lib/be-CrQ0smca.js +24 -0
- package/lib/bg-CrQqGwni.js +24 -0
- package/lib/bn-NCLZcWHi.js +24 -0
- package/lib/ca-SUf6Y2Om.js +51 -0
- package/lib/cjs/index.js +2710 -2446
- package/lib/cop-C3sk0IUo.js +24 -0
- package/lib/cs-CmAteokq.js +30 -0
- package/lib/cu-CBUlrW6Y.js +45 -0
- package/lib/cy-BBPa6z2x.js +24 -0
- package/lib/da-CCDXfXtG.js +24 -0
- package/lib/de-1901-CWoAOigE.js +24 -0
- package/lib/de-1996-BL6awyxG.js +24 -0
- package/lib/de-ch-1901-hVThVHVb.js +24 -0
- package/lib/el-monoton-D3aKqTz2.js +24 -0
- package/lib/el-polyton-ogVWcTzh.js +24 -0
- package/lib/en-gb-B7Al27b_.js +34 -0
- package/lib/es/index.js +2696 -2446
- package/lib/es-DcaaHPU_.js +24 -0
- package/lib/et-B_spaleu.js +24 -0
- package/lib/eu-Ctv_kq9Z.js +24 -0
- package/lib/fi-RW5VB8Yp.js +24 -0
- package/lib/fr-BC2onEz9.js +24 -0
- package/lib/fur-AC12wySk.js +24 -0
- package/lib/ga-Cn6LkudM.js +71 -0
- package/lib/gl-DZGc-K_G.js +24 -0
- package/lib/grc-DOlGgO8T.js +24 -0
- package/lib/gu-Bjl0l-cf.js +24 -0
- package/lib/hi-DsAaTPCC.js +24 -0
- package/lib/hr-DT1SBBes.js +24 -0
- package/lib/hsb-DC_ITc1e.js +59 -0
- package/lib/hu-DVk7Y_ka.js +24 -0
- package/lib/hy-e995ysyO.js +24 -0
- package/lib/ia-Cr4TJH0c.js +35 -0
- package/lib/id-DifDyWg9.js +71 -0
- package/lib/index.js +32339 -0
- package/lib/is-BT8UVRze.js +24 -0
- package/lib/it-Bt_Meacx.js +24 -0
- package/lib/ka-jyoLzyDE.js +24 -0
- package/lib/kmr-Cfwhwuff.js +24 -0
- package/lib/kn-C6Lov-DP.js +24 -0
- package/lib/la-DuvHjUWw.js +24 -0
- package/lib/la-x-classic-yTyAOQEt.js +24 -0
- package/lib/la-x-liturgic-CXeQb4FY.js +24 -0
- package/lib/lt-BBe8DlDF.js +24 -0
- package/lib/lv-Q2BBHnzp.js +24 -0
- package/lib/ml-2xLVYkVY.js +24 -0
- package/lib/mn-cyrl-lHM4n0oC.js +24 -0
- package/lib/mn-cyrl-x-lmc-3aetruI8.js +24 -0
- package/lib/mr-CjWJPVmH.js +24 -0
- package/lib/mul-ethi-D_CMSMEq.js +24 -0
- package/lib/nb-DI8u59ch.js +135 -0
- package/lib/nl-BHQJ6Gvn.js +65 -0
- package/lib/nn-ntZvarUK.js +135 -0
- package/lib/no-B8ItS0F3.js +133 -0
- package/lib/oc-P_i3-xLA.js +24 -0
- package/lib/or-50rxpoq4.js +24 -0
- package/lib/pa-C54UG8eN.js +24 -0
- package/lib/pi-B9cgjyG1.js +24 -0
- package/lib/pl-9fg-ESVt.js +45 -0
- package/lib/pms-BRGfm5gS.js +24 -0
- package/lib/pt-Cum2_NUC.js +24 -0
- package/lib/rm-C0MIK9N4.js +24 -0
- package/lib/ro-0fmdH0HA.js +24 -0
- package/lib/ru-v4l-ayaq.js +209 -0
- package/lib/sa-CKY9c_Vq.js +24 -0
- package/lib/sh-cyrl-BpCRFOmq.js +141 -0
- package/lib/sh-latn-sRy4Tuaj.js +141 -0
- package/lib/sk-_iOeDNrQ.js +30 -0
- package/lib/sl-DpiklF-D.js +24 -0
- package/lib/sr-cyrl-Dpzrbd0W.js +155 -0
- package/lib/sv-CFm5y56M.js +24 -0
- package/lib/ta-BcghgTbD.js +24 -0
- package/lib/te-B5Spl2Jk.js +24 -0
- package/lib/th-DWX5iPSo.js +24 -0
- package/lib/tk-BMbKB10q.js +24 -0
- package/lib/tr-CIHIuzqc.js +24 -0
- package/lib/types/alignment-snap.d.ts +67 -0
- package/lib/types/base-object.d.ts +8 -0
- package/lib/types/basics/document-node-tools.d.ts +1 -0
- package/lib/types/basics/drawing-effect.d.ts +34 -0
- package/lib/types/basics/i-document-skeleton-cached.d.ts +7 -0
- package/lib/types/basics/i-events.d.ts +0 -6
- package/lib/types/basics/interfaces.d.ts +9 -0
- package/lib/types/basics/tools.d.ts +2 -22
- package/lib/types/components/docs/custom-block-render-viewport.d.ts +2 -0
- package/lib/types/components/docs/document.d.ts +4 -1
- package/lib/types/components/docs/extensions/line.d.ts +5 -1
- package/lib/types/components/docs/layout/block/paragraph/bullet.d.ts +2 -2
- package/lib/types/components/docs/layout/block/paragraph/layout-ruler.d.ts +1 -1
- package/lib/types/components/docs/layout/block/paragraph/shaping.d.ts +1 -1
- package/lib/types/components/docs/layout/doc-no-wrap-measure.d.ts +5 -0
- package/lib/types/components/docs/layout/doc-skeleton.d.ts +8 -0
- package/lib/types/components/docs/layout/line-breaker/enhancers/hyphen-enhancer.d.ts +2 -2
- package/lib/types/components/docs/layout/line-breaker/enhancers/link-enhancer.d.ts +2 -2
- package/lib/types/components/docs/layout/line-breaker/enhancers/whole-entity-enhancer.d.ts +33 -0
- package/lib/types/{basics/unit-convert.d.ts → components/docs/layout/line-breaker/extensions/east-asian-quote-linebreak-extension.d.ts} +2 -2
- package/lib/types/components/docs/layout/line-breaker/line-breaker.d.ts +1 -0
- package/lib/types/components/docs/layout/model/glyph.d.ts +15 -3
- package/lib/types/components/docs/layout/shaping-engine/font-cache.d.ts +0 -13
- package/lib/types/components/docs/layout/tools.d.ts +33 -1
- package/lib/types/components/docs/table-render-viewport.d.ts +2 -0
- package/lib/types/components/sheets/index.d.ts +2 -0
- package/lib/types/components/sheets/sheet.render-skeleton.d.ts +3 -94
- package/lib/types/components/sheets/spreadsheet.d.ts +4 -2
- package/lib/types/components/sheets/util.d.ts +10 -0
- package/lib/types/drawing-group.d.ts +4 -2
- package/lib/types/engine.d.ts +0 -7
- package/lib/types/index.d.ts +7 -3
- package/lib/types/plugin.d.ts +0 -7
- package/lib/types/render-manager/render-manager.service.d.ts +0 -21
- package/lib/types/scene.d.ts +1 -30
- package/lib/types/scene.input-manager.d.ts +1 -3
- package/lib/types/shape/index.d.ts +1 -0
- package/lib/types/shape/line.d.ts +50 -0
- package/lib/types/shape/scroll-bar.d.ts +6 -0
- package/lib/types/shape/shape.d.ts +7 -1
- package/lib/types/viewport.d.ts +1 -5
- package/lib/uk-Dir3oxLs.js +24 -0
- package/lib/umd/index.js +2 -3
- package/lib/zh-latn-pinyin-BdYb-Ey_.js +24 -0
- package/package.json +7 -9
- package/lib/types/components/docs/layout/shaping-engine/font-library.d.ts +0 -60
- package/lib/types/components/docs/layout/shaping-engine/text-shaping.d.ts +0 -34
- package/lib/types/services/render-config.service.d.ts +0 -28
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
export interface IAlignmentRect {
|
|
17
|
+
left: number;
|
|
18
|
+
top: number;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
}
|
|
22
|
+
export type AlignmentSnapAxis = 'x' | 'y';
|
|
23
|
+
export interface IAlignmentSnapGuide {
|
|
24
|
+
id: string;
|
|
25
|
+
axis: AlignmentSnapAxis;
|
|
26
|
+
position: number;
|
|
27
|
+
}
|
|
28
|
+
export interface IAlignmentSnapSessionConfig {
|
|
29
|
+
enterThreshold?: number;
|
|
30
|
+
exitThreshold?: number;
|
|
31
|
+
breakawayThreshold?: number;
|
|
32
|
+
softThreshold?: number;
|
|
33
|
+
hardThreshold?: number;
|
|
34
|
+
softMaxStrength?: number;
|
|
35
|
+
cooldownMs?: number;
|
|
36
|
+
}
|
|
37
|
+
export interface IAlignmentSnapAxisOptions {
|
|
38
|
+
axis: AlignmentSnapAxis;
|
|
39
|
+
value: number;
|
|
40
|
+
guide: IAlignmentSnapGuide | null;
|
|
41
|
+
now?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface IAlignmentSnapAxisResult {
|
|
44
|
+
snapped: boolean;
|
|
45
|
+
value: number;
|
|
46
|
+
guide: IAlignmentSnapGuide | null;
|
|
47
|
+
}
|
|
48
|
+
export declare function normalizeAlignmentRect(rect: IAlignmentRect): IAlignmentRect;
|
|
49
|
+
export declare function getAlignmentRectXAnchors(rect: IAlignmentRect): [number, number, number];
|
|
50
|
+
export declare function getAlignmentRectYAnchors(rect: IAlignmentRect): [number, number, number];
|
|
51
|
+
export declare function getClosestAlignmentOffset(activeAnchors: readonly number[], targetAnchors: readonly number[], threshold: number): number;
|
|
52
|
+
export declare class AlignmentSnapSession {
|
|
53
|
+
private readonly _enterThreshold;
|
|
54
|
+
private readonly _exitThreshold;
|
|
55
|
+
private readonly _breakawayThreshold;
|
|
56
|
+
private readonly _softThreshold;
|
|
57
|
+
private readonly _hardThreshold;
|
|
58
|
+
private readonly _softMaxStrength;
|
|
59
|
+
private readonly _cooldownMs;
|
|
60
|
+
private _activeGuideId;
|
|
61
|
+
private _activeGuideStartValue;
|
|
62
|
+
private _releasedUntil;
|
|
63
|
+
constructor(config?: IAlignmentSnapSessionConfig);
|
|
64
|
+
reset(): void;
|
|
65
|
+
resolveAxisSnap(options: IAlignmentSnapAxisOptions): IAlignmentSnapAxisResult;
|
|
66
|
+
private _resolveSnappedValue;
|
|
67
|
+
}
|
|
@@ -164,6 +164,14 @@ export declare abstract class BaseObject extends Disposable {
|
|
|
164
164
|
isRender(bounds?: IViewportInfo): boolean | undefined;
|
|
165
165
|
getParent(): any;
|
|
166
166
|
getState(): ITransformState;
|
|
167
|
+
/**
|
|
168
|
+
* Returns the flip state after composing this object with every ancestor
|
|
169
|
+
* drawing group whose transform participates in rendering.
|
|
170
|
+
*/
|
|
171
|
+
getEffectiveFlipState(): {
|
|
172
|
+
flipX: boolean;
|
|
173
|
+
flipY: boolean;
|
|
174
|
+
};
|
|
167
175
|
getRealBound(): IGroupBaseBound;
|
|
168
176
|
hide(): void;
|
|
169
177
|
show(): void;
|
|
@@ -24,6 +24,7 @@ export declare function getParagraphByGlyph(glyph: Nullable<IDocumentSkeletonGly
|
|
|
24
24
|
paragraphEnd: number;
|
|
25
25
|
startIndex: number;
|
|
26
26
|
paragraphId: string;
|
|
27
|
+
styleId?: string;
|
|
27
28
|
paragraphStyle?: import("@univerjs/core").IParagraphStyle;
|
|
28
29
|
bullet?: import("@univerjs/core").IBullet;
|
|
29
30
|
} | undefined;
|
|
@@ -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 { IGlowEffect, IShadowEffect } from '@univerjs/core';
|
|
17
|
+
import type { IBoundRectNoAngle } from './vector2';
|
|
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;
|
|
@@ -209,6 +209,7 @@ export interface IDocumentSkeletonGlyph {
|
|
|
209
209
|
url?: string;
|
|
210
210
|
featureId?: string;
|
|
211
211
|
drawingId?: string;
|
|
212
|
+
fauxBoldStrokeWidth?: number;
|
|
212
213
|
}
|
|
213
214
|
export interface IDocumentSkeletonBullet {
|
|
214
215
|
listId: string;
|
|
@@ -216,9 +217,13 @@ export interface IDocumentSkeletonBullet {
|
|
|
216
217
|
ts: ITextStyle;
|
|
217
218
|
fontStyle?: IDocumentSkeletonFontStyle;
|
|
218
219
|
startIndexItem: number;
|
|
220
|
+
startNumber?: number;
|
|
219
221
|
nestingLevel?: INestingLevel;
|
|
220
222
|
bulletAlign?: BulletAlignment;
|
|
221
223
|
bulletType?: boolean;
|
|
224
|
+
compactSpacing?: boolean;
|
|
225
|
+
preserveTextLineHeight?: boolean;
|
|
226
|
+
imageSource?: string;
|
|
222
227
|
paragraphProperties?: IParagraphProperties;
|
|
223
228
|
}
|
|
224
229
|
export interface IDocumentSkeletonDrawing {
|
|
@@ -241,6 +246,8 @@ export interface IDocumentSkeletonDrawing {
|
|
|
241
246
|
contentHeight?: number;
|
|
242
247
|
contentWidth?: number;
|
|
243
248
|
height?: number;
|
|
249
|
+
pageContentWidth?: number;
|
|
250
|
+
viewScale?: number;
|
|
244
251
|
viewportHeight?: number;
|
|
245
252
|
};
|
|
246
253
|
}
|
|
@@ -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
|
*/
|
|
@@ -94,6 +94,15 @@ export interface IParagraphConfig {
|
|
|
94
94
|
paragraphIndex: number;
|
|
95
95
|
documentCompatibilityPolicy?: IDocumentCompatibilityPolicy;
|
|
96
96
|
useWordStyleLineHeight?: boolean;
|
|
97
|
+
usePptxFontSizeLineHeight?: boolean;
|
|
98
|
+
usePptxNominalFontLineHeight?: boolean;
|
|
99
|
+
usePptxCompatibleLineSpacing?: boolean;
|
|
100
|
+
usePptxPercentageLineSpacing?: boolean;
|
|
101
|
+
pptxPercentageFontSize?: number;
|
|
102
|
+
usePptxNormAutofitLineHeight?: boolean;
|
|
103
|
+
pptxEmptyParagraphFontSize?: number;
|
|
104
|
+
pptxHasExplicitEndParaFontSize?: boolean;
|
|
105
|
+
sumPptxParagraphSpacing?: boolean;
|
|
97
106
|
docxFallbackAnchorLeft?: IParagraphStyle['indentStart'];
|
|
98
107
|
paragraphNonInlineSkeDrawings?: Map<string, IDocumentSkeletonDrawing>;
|
|
99
108
|
paragraphInlineSkeDrawings?: Map<string, IDocumentSkeletonDrawing>;
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type {
|
|
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
|
+
export declare function hasScrollableOverflow(contentSize: number, viewportSize: number): boolean;
|
|
19
20
|
export declare const getColor: (RgbArray: number[], opacity?: number) => string;
|
|
20
21
|
export declare const toPx: (num: number | string, ReferenceValue: Nullable<number>) => number;
|
|
21
22
|
/**
|
|
@@ -80,27 +81,6 @@ export declare function ptToMM(px: number): number;
|
|
|
80
81
|
export declare function pxToInch(px: number): number;
|
|
81
82
|
export declare function getScale(parentScale: IScale): number;
|
|
82
83
|
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
84
|
export declare function mergeInfoOffset(mergeInfo: IRangeWithCoord, offsetX: number, offsetY: number): {
|
|
105
85
|
startY: number;
|
|
106
86
|
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;
|
|
@@ -15,17 +15,21 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { IScale } from '@univerjs/core';
|
|
17
17
|
import type { IDocumentSkeletonGlyph } from '../../../basics/i-document-skeleton-cached';
|
|
18
|
+
import type { IBoundRectNoAngle } from '../../../basics/vector2';
|
|
18
19
|
import type { UniverRenderingContext } from '../../../context';
|
|
20
|
+
import type { IDrawInfo } from '../../extension';
|
|
19
21
|
import { docExtension } from '../doc-extension';
|
|
20
22
|
export declare class Line extends docExtension {
|
|
21
23
|
uKey: string;
|
|
22
24
|
Z_INDEX: number;
|
|
23
25
|
private _preBackgroundColor;
|
|
24
|
-
draw(ctx: UniverRenderingContext, parentScale: IScale, glyph: IDocumentSkeletonGlyph): void;
|
|
26
|
+
draw(ctx: UniverRenderingContext, parentScale: IScale, glyph: IDocumentSkeletonGlyph, _diff?: IBoundRectNoAngle, more?: IDrawInfo): void;
|
|
25
27
|
clearCache(): void;
|
|
26
28
|
private _drawLine;
|
|
27
29
|
private _drawLineTo;
|
|
28
30
|
private _setLineType;
|
|
29
31
|
private _isWave;
|
|
30
32
|
private _isDouble;
|
|
33
|
+
private _isAccounting;
|
|
34
|
+
private _isFirstAccountingGlyph;
|
|
31
35
|
}
|
|
@@ -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 { IBullet, ILists, LocaleService, Nullable } from '@univerjs/core';
|
|
16
|
+
import type { IBullet, ILists, ITextStyle, LocaleService, Nullable } from '@univerjs/core';
|
|
17
17
|
import type { IDocumentSkeletonBullet } from '../../../../../basics/i-document-skeleton-cached';
|
|
18
|
-
export declare function dealWithBullet(bullet?: IBullet, lists?: ILists, listLevelAncestors?: Array<Nullable<IDocumentSkeletonBullet>>, localeService?: LocaleService): IDocumentSkeletonBullet | undefined;
|
|
18
|
+
export declare function dealWithBullet(bullet?: IBullet, lists?: ILists, listLevelAncestors?: Array<Nullable<IDocumentSkeletonBullet>>, localeService?: LocaleService, compactSpacing?: boolean, paragraphTextStyle?: ITextStyle): IDocumentSkeletonBullet | undefined;
|
|
19
19
|
export declare function getDefaultBulletSke(listId: string, startIndex?: number): IDocumentSkeletonBullet;
|
|
@@ -18,7 +18,7 @@ import type { IParagraphConfig, IParagraphTableCache, ISectionBreakConfig } from
|
|
|
18
18
|
import type { IFloatObject, ILayoutContext } from '../../tools';
|
|
19
19
|
import { BooleanNumber, GridType, SpacingRule } from '@univerjs/core';
|
|
20
20
|
import { BreakPointType } from '../../line-breaker/break';
|
|
21
|
-
declare function isGlyphGroupBeyondDivideWidth(glyphGroup: IDocumentSkeletonGlyph[], offsetLeft: number, divideWidth: number): boolean;
|
|
21
|
+
declare function isGlyphGroupBeyondDivideWidth(glyphGroup: IDocumentSkeletonGlyph[], offsetLeft: number, divideWidth: number, hangingPunctuation?: boolean): boolean;
|
|
22
22
|
export declare function layoutParagraph(ctx: ILayoutContext, glyphGroup: IDocumentSkeletonGlyph[], pages: IDocumentSkeletonPage[], sectionBreakConfig: ISectionBreakConfig, paragraphConfig: IParagraphConfig, isParagraphFirstShapedText: boolean, breakPointType?: BreakPointType): IDocumentSkeletonPage[];
|
|
23
23
|
declare function __avoidFlowAffectingDrawingsForTable(table: IDocumentSkeletonTable, page: IDocumentSkeletonPage, column: IDocumentSkeletonColumn): void;
|
|
24
24
|
declare function _updateAndPositionTable(ctx: ILayoutContext, lineTop: number, lineHeight: number, page: IDocumentSkeletonPage, column: IDocumentSkeletonColumn, section: IDocumentSkeletonSection, skeTablesInParagraph: IParagraphTableCache[], paragraphIndex: number, sectionBreakConfig: ISectionBreakConfig, drawingAnchorTop?: number): boolean;
|
|
@@ -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
|
|
27
|
+
export declare function shaping(ctx: ILayoutContext, content: string, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig): IShapedText[];
|
|
@@ -27,6 +27,11 @@ export declare function measureDocumentNoWrapTextRangeWidth(documentData: IDocum
|
|
|
27
27
|
* details such as CJK-Latin spacing.
|
|
28
28
|
*/
|
|
29
29
|
export declare function measureDocumentNoWrapTextWidth(documentData: IDocumentData | null | undefined): number;
|
|
30
|
+
/**
|
|
31
|
+
* Measures the widest line after applying the docs Unicode break policy
|
|
32
|
+
* within a fixed-width host.
|
|
33
|
+
*/
|
|
34
|
+
export declare function measureDocumentWrappedTextWidth(documentData: IDocumentData | null | undefined, maxLineWidth: number): number;
|
|
30
35
|
/**
|
|
31
36
|
* Measures the widest segment that docs line breaking keeps together. This is
|
|
32
37
|
* useful when a host may wrap normally but still needs enough width to avoid
|
|
@@ -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
|
|
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:
|
|
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
|
|
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:
|
|
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
|
+
}
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
declare function
|
|
16
|
+
import type { LineBreaker } from '../line-breaker';
|
|
17
|
+
export declare function eastAsianQuoteLineBreakExtension(breaker: LineBreaker): void;
|
|
@@ -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
|
-
}
|
|
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
|
|
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;
|
|
@@ -21,4 +21,6 @@ export * from './row-header';
|
|
|
21
21
|
export * from './sheet-component';
|
|
22
22
|
export * from './sheet.render-skeleton';
|
|
23
23
|
export * from './spreadsheet';
|
|
24
|
+
export { calculateCellImageRect } from './util';
|
|
25
|
+
export type { ICellImageRectConfig } from './util';
|
|
24
26
|
export * from './watermark';
|