@univerjs/engine-render 0.2.7 → 0.2.9
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/cjs/index.js +4 -2
- package/lib/es/index.js +339 -189
- package/lib/types/base-object.d.ts +4 -3
- package/lib/types/basics/cell-data.d.ts +0 -1
- package/lib/types/basics/document-node-tools.d.ts +0 -1
- package/lib/types/basics/draw.d.ts +0 -1
- package/lib/types/basics/group-transform.d.ts +0 -1
- package/lib/types/basics/i-document-skeleton-cached.d.ts +0 -1
- package/lib/types/basics/i-events.d.ts +0 -1
- package/lib/types/basics/interfaces.d.ts +0 -1
- package/lib/types/basics/offset-rotation-axis.d.ts +0 -1
- package/lib/types/basics/path2.d.ts +0 -1
- package/lib/types/basics/position.d.ts +0 -1
- package/lib/types/basics/quick-event.d.ts +0 -1
- package/lib/types/basics/range.d.ts +0 -1
- package/lib/types/basics/text-rotation.d.ts +0 -1
- package/lib/types/basics/tools.d.ts +0 -1
- package/lib/types/basics/transform.d.ts +0 -1
- package/lib/types/basics/transformer-config.d.ts +0 -1
- package/lib/types/basics/vector2.d.ts +0 -1
- package/lib/types/basics/viewport-subtract.d.ts +0 -1
- package/lib/types/canvas.d.ts +0 -1
- package/lib/types/components/component.d.ts +0 -1
- package/lib/types/components/docs/doc-background.d.ts +0 -1
- package/lib/types/components/docs/doc-component.d.ts +0 -1
- package/lib/types/components/docs/doc-extension.d.ts +0 -1
- package/lib/types/components/docs/document.d.ts +1 -3
- package/lib/types/components/docs/extensions/background.d.ts +0 -1
- package/lib/types/components/docs/extensions/border.d.ts +0 -1
- package/lib/types/components/docs/extensions/font-and-base-line.d.ts +0 -1
- package/lib/types/components/docs/extensions/line.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/bullet-ruler.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/bullet.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/language-ruler.d.ts +5 -6
- package/lib/types/components/docs/layout/block/paragraph/layout-ruler.d.ts +1 -2
- package/lib/types/components/docs/layout/block/paragraph/line-adjustment.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/linebreaking.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/paragraph-layout.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/shaping.d.ts +0 -1
- package/lib/types/components/docs/layout/block/section.d.ts +0 -1
- package/lib/types/components/docs/layout/block/table.d.ts +0 -1
- package/lib/types/components/docs/layout/doc-skeleton.d.ts +2 -1
- package/lib/types/components/docs/layout/hyphenation/hyphen.d.ts +0 -1
- package/lib/types/components/docs/layout/hyphenation/language-detector.d.ts +0 -1
- package/lib/types/components/docs/layout/line-breaker/enhancers/hyphen-enhancer.d.ts +0 -1
- package/lib/types/components/docs/layout/line-breaker/extensions/custom-block-linebreak-extension.d.ts +0 -1
- package/lib/types/components/docs/layout/line-breaker/extensions/tab-linebreak-extension.d.ts +0 -1
- package/lib/types/components/docs/layout/line-breaker/line-breaker.d.ts +0 -1
- package/lib/types/components/docs/layout/line-breaker/rule.d.ts +0 -1
- package/lib/types/components/docs/layout/model/column.d.ts +0 -1
- package/lib/types/components/docs/layout/model/glyph.d.ts +0 -1
- package/lib/types/components/docs/layout/model/line.d.ts +0 -1
- package/lib/types/components/docs/layout/model/page.d.ts +0 -1
- package/lib/types/components/docs/layout/model/section.d.ts +0 -1
- package/lib/types/components/docs/layout/shaping-engine/font-cache.d.ts +0 -1
- package/lib/types/components/docs/layout/shaping-engine/font-library.d.ts +0 -1
- package/lib/types/components/docs/layout/shaping-engine/text-shaping.d.ts +0 -1
- package/lib/types/components/docs/layout/shaping-engine/utils.d.ts +0 -1
- package/lib/types/components/docs/layout/style/custom-decoration.d.ts +0 -1
- package/lib/types/components/docs/layout/style/custom-range.d.ts +0 -1
- package/lib/types/components/docs/layout/tools.d.ts +2 -3
- package/lib/types/components/docs/liquid.d.ts +1 -2
- package/lib/types/components/docs/text-selection/convert-rect-range.d.ts +0 -1
- package/lib/types/components/docs/text-selection/convert-text-range.d.ts +0 -1
- package/lib/types/components/docs/text-selection/range-interface.d.ts +0 -1
- package/lib/types/components/docs/text-selection/rect-range.d.ts +0 -1
- package/lib/types/components/docs/text-selection/selection-utils.d.ts +0 -1
- package/lib/types/components/docs/text-selection/text-range.d.ts +0 -1
- package/lib/types/components/docs/text-selection/text-selection-render-manager.d.ts +1 -2
- package/lib/types/components/docs/view-model/data-stream-tree-node.d.ts +0 -1
- package/lib/types/components/docs/view-model/document-view-model.d.ts +2 -1
- package/lib/types/components/extension.d.ts +0 -1
- package/lib/types/components/sheets/column-header.d.ts +0 -1
- package/lib/types/components/sheets/extensions/background.d.ts +0 -1
- package/lib/types/components/sheets/extensions/border.d.ts +0 -1
- package/lib/types/components/sheets/extensions/column-header-layout.d.ts +0 -1
- package/lib/types/components/sheets/extensions/custom.d.ts +0 -1
- package/lib/types/components/sheets/extensions/font.d.ts +0 -1
- package/lib/types/components/sheets/extensions/marker.d.ts +0 -1
- package/lib/types/components/sheets/extensions/row-header-layout.d.ts +0 -1
- package/lib/types/components/sheets/extensions/sheet-extension.d.ts +0 -1
- package/lib/types/components/sheets/interfaces.d.ts +0 -1
- package/lib/types/components/sheets/row-header.d.ts +0 -1
- package/lib/types/components/sheets/sheet-component.d.ts +0 -1
- package/lib/types/components/sheets/sheet-skeleton.d.ts +10 -2
- package/lib/types/components/sheets/spreadsheet.d.ts +0 -3
- package/lib/types/components/skeleton.d.ts +0 -1
- package/lib/types/components/slides/slide.d.ts +6 -2
- package/lib/types/custom/custom-object.d.ts +0 -1
- package/lib/types/engine.d.ts +0 -1
- package/lib/types/floating/util.d.ts +0 -1
- package/lib/types/group.d.ts +0 -1
- package/lib/types/layer.d.ts +0 -1
- package/lib/types/render-engine.d.ts +0 -1
- package/lib/types/render-manager/render-manager.service.d.ts +44 -3
- package/lib/types/render-manager/render-unit.d.ts +17 -4
- package/lib/types/scene-viewer.d.ts +0 -1
- package/lib/types/scene.d.ts +17 -7
- package/lib/types/scene.input-manager.d.ts +0 -1
- package/lib/types/scene.transformer.d.ts +0 -1
- package/lib/types/scroll-timer.d.ts +0 -1
- package/lib/types/shape/base-scroll-bar.d.ts +0 -1
- package/lib/types/shape/checkbox.d.ts +0 -1
- package/lib/types/shape/circle.d.ts +0 -1
- package/lib/types/shape/dashedrect.d.ts +0 -1
- package/lib/types/shape/dropdown-item.d.ts +0 -1
- package/lib/types/shape/image.d.ts +0 -1
- package/lib/types/shape/path.d.ts +0 -1
- package/lib/types/shape/rect.d.ts +0 -1
- package/lib/types/shape/regular-polygon.d.ts +0 -1
- package/lib/types/shape/rich-text.d.ts +3 -7
- package/lib/types/shape/scroll-bar.d.ts +0 -1
- package/lib/types/shape/shape.d.ts +0 -1
- package/lib/types/shape/text.d.ts +0 -1
- package/lib/types/thin-engine.d.ts +0 -1
- package/lib/types/thin-scene.d.ts +0 -1
- package/lib/types/viewport.d.ts +15 -34
- package/lib/umd/index.js +4 -2
- package/package.json +7 -7
|
@@ -7,7 +7,8 @@ import { IViewportInfo, Vector2 } from './basics/vector2';
|
|
|
7
7
|
import { UniverRenderingContext } from './context';
|
|
8
8
|
import { Layer } from './layer';
|
|
9
9
|
import { ITransformerConfig } from './basics/transformer-config';
|
|
10
|
-
|
|
10
|
+
import { Scene } from './scene';
|
|
11
|
+
import { Engine } from './engine';
|
|
11
12
|
export declare const BASE_OBJECT_ARRAY: string[];
|
|
12
13
|
export declare enum ObjectType {
|
|
13
14
|
UNKNOWN = 0,
|
|
@@ -162,10 +163,10 @@ export declare abstract class BaseObject extends Disposable {
|
|
|
162
163
|
triggerDrop(evt: IDragEvent | IMouseEvent): boolean;
|
|
163
164
|
dispose(): void;
|
|
164
165
|
toJson(): IKeyValue;
|
|
165
|
-
getScene():
|
|
166
|
+
getScene(): Nullable<Scene>;
|
|
166
167
|
resetCursor(): void;
|
|
167
168
|
setCursor(val: CURSOR_TYPE): void;
|
|
168
|
-
getEngine():
|
|
169
|
+
getEngine(): Nullable<Engine>;
|
|
169
170
|
getObjects(): BaseObject[];
|
|
170
171
|
getLayerIndex(): number;
|
|
171
172
|
applyTransform(): void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IDocumentBody, Nullable } from '@univerjs/core';
|
|
2
2
|
import { IDocumentSkeletonGlyph } from './i-document-skeleton-cached';
|
|
3
|
-
|
|
4
3
|
export declare function hasListGlyph(glyph: Nullable<IDocumentSkeletonGlyph>): boolean;
|
|
5
4
|
export declare function isIndentByGlyph(glyph: Nullable<IDocumentSkeletonGlyph>, body?: IDocumentBody): boolean;
|
|
6
5
|
export declare function isLastGlyph(glyph: Nullable<IDocumentSkeletonGlyph>): boolean;
|
|
@@ -3,7 +3,6 @@ import { UniverRenderingContext } from '../context';
|
|
|
3
3
|
import { BORDER_TYPE, ORIENTATION_TYPE } from './const';
|
|
4
4
|
import { IDocumentSkeletonLine } from './i-document-skeleton-cached';
|
|
5
5
|
import { Vector2 } from './vector2';
|
|
6
|
-
|
|
7
6
|
export interface IContext2D extends CanvasRenderingContext2D {
|
|
8
7
|
webkitBackingStorePixelRatio: number;
|
|
9
8
|
mozBackingStorePixelRatio: number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BulletAlignment, ColumnSeparatorType, DataStreamTreeTokenType, IDocDrawingBase, IDocumentRenderConfig, INestingLevel, IParagraphProperties, ITable, ITextStyle, PageOrientType } from '@univerjs/core';
|
|
2
2
|
import { BreakPointType } from '../components/docs/layout/line-breaker/break';
|
|
3
|
-
|
|
4
3
|
export interface IDocumentSkeletonCached extends ISkeletonResourceReference {
|
|
5
4
|
pages: IDocumentSkeletonPage[];
|
|
6
5
|
left: number;
|
|
@@ -3,7 +3,6 @@ import { DocumentViewModel } from '../components/docs/view-model/document-view-m
|
|
|
3
3
|
import { DocumentSkeletonPageType, IDocumentSkeletonBullet, IDocumentSkeletonDrawing, IDocumentSkeletonDrawingAnchor, IDocumentSkeletonFontStyle, IDocumentSkeletonGlyph, IDocumentSkeletonHeaderFooter, IDocumentSkeletonTable } from './i-document-skeleton-cached';
|
|
4
4
|
import { Vector2 } from './vector2';
|
|
5
5
|
import { ITransformerConfig } from './transformer-config';
|
|
6
|
-
|
|
7
6
|
export interface IObjectFullState extends ITransformState {
|
|
8
7
|
strokeWidth?: number;
|
|
9
8
|
zIndex?: number;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { BaseObject } from '../base-object';
|
|
2
2
|
import { IMouseEvent, IPointerEvent } from './i-events';
|
|
3
|
-
|
|
4
3
|
export declare function attachObjectHover(o: BaseObject, hoverIn: (o: any, evt: IPointerEvent | IMouseEvent) => void, hoverOut: (o: any, evt: IPointerEvent | IMouseEvent) => void): void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IRange, IRangeWithCoord, IScale, ISelectionCellWithMergeInfo, IStyleBase, LocaleService, Nullable } from '@univerjs/core';
|
|
2
2
|
import { IBoundRectNoAngle } from './vector2';
|
|
3
3
|
import { IDocumentSkeletonFontStyle } from './i-document-skeleton-cached';
|
|
4
|
-
|
|
5
4
|
export declare const getColor: (RgbArray: number[], opacity?: number) => string;
|
|
6
5
|
export declare const toPx: (num: number | string, ReferenceValue: Nullable<number>) => number;
|
|
7
6
|
/**
|
package/lib/types/canvas.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { BaseObject } from '../base-object';
|
|
|
3
3
|
import { IViewportInfo } from '../basics/vector2';
|
|
4
4
|
import { UniverRenderingContext } from '../context';
|
|
5
5
|
import { ComponentExtension } from './extension';
|
|
6
|
-
|
|
7
6
|
export declare class RenderComponent<T, U, V> extends BaseObject {
|
|
8
7
|
private _extensions;
|
|
9
8
|
get extensions(): Map<string, ComponentExtension<T, U, V>>;
|
|
@@ -2,7 +2,6 @@ import { IViewportInfo } from '../../basics/vector2';
|
|
|
2
2
|
import { UniverRenderingContext } from '../../context';
|
|
3
3
|
import { IDocumentsConfig, DocComponent } from './doc-component';
|
|
4
4
|
import { DocumentSkeleton } from './layout/doc-skeleton';
|
|
5
|
-
|
|
6
5
|
export declare class DocBackground extends DocComponent {
|
|
7
6
|
private _drawLiquid;
|
|
8
7
|
constructor(oKey: string, documentSkeleton?: DocumentSkeleton, config?: IDocumentsConfig);
|
|
@@ -4,7 +4,6 @@ import { UniverRenderingContext } from '../../context';
|
|
|
4
4
|
import { RenderComponent } from '../component';
|
|
5
5
|
import { DOCS_EXTENSION_TYPE } from './doc-extension';
|
|
6
6
|
import { DocumentSkeleton } from './layout/doc-skeleton';
|
|
7
|
-
|
|
8
7
|
export interface IPageMarginLayout {
|
|
9
8
|
pageMarginLeft: number;
|
|
10
9
|
pageMarginTop: number;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IDocumentSkeletonGlyph, IDocumentSkeletonLine } from '../../basics/i-document-skeleton-cached';
|
|
2
2
|
import { IBoundRectNoAngle } from '../../basics/vector2';
|
|
3
3
|
import { ComponentExtension } from '../extension';
|
|
4
|
-
|
|
5
4
|
export declare enum DOCS_EXTENSION_TYPE {
|
|
6
5
|
SPAN = 0,
|
|
7
6
|
LINE = 1
|
|
@@ -3,10 +3,8 @@ import { IDocumentSkeletonPage } from '../../basics/i-document-skeleton-cached';
|
|
|
3
3
|
import { Transform } from '../../basics/transform';
|
|
4
4
|
import { IViewportInfo } from '../../basics/vector2';
|
|
5
5
|
import { UniverRenderingContext } from '../../context';
|
|
6
|
-
import { Scene } from '../../scene';
|
|
7
6
|
import { IDocumentsConfig, IPageMarginLayout, DocComponent } from './doc-component';
|
|
8
7
|
import { DocumentSkeleton } from './layout/doc-skeleton';
|
|
9
|
-
|
|
10
8
|
export interface IPageRenderConfig {
|
|
11
9
|
page: IDocumentSkeletonPage;
|
|
12
10
|
pageLeft: number;
|
|
@@ -28,7 +26,7 @@ export declare class Documents extends DocComponent {
|
|
|
28
26
|
static create(oKey: string, documentSkeleton?: DocumentSkeleton, config?: IDocumentsConfig): Documents;
|
|
29
27
|
dispose(): void;
|
|
30
28
|
getOffsetConfig(): IDocumentOffsetConfig;
|
|
31
|
-
getEngine(): Nullable<import('../..').
|
|
29
|
+
getEngine(): Nullable<import('../..').Engine>;
|
|
32
30
|
changeSkeleton(newSkeleton: DocumentSkeleton): this;
|
|
33
31
|
protected _draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
|
|
34
32
|
draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
|
|
@@ -2,7 +2,6 @@ import { IScale } from '@univerjs/core';
|
|
|
2
2
|
import { IDocumentSkeletonGlyph } from '../../../basics/i-document-skeleton-cached';
|
|
3
3
|
import { UniverRenderingContext } from '../../../context';
|
|
4
4
|
import { docExtension } from '../doc-extension';
|
|
5
|
-
|
|
6
5
|
export declare class Background extends docExtension {
|
|
7
6
|
uKey: string;
|
|
8
7
|
Z_INDEX: number;
|
|
@@ -2,7 +2,6 @@ import { IScale } from '@univerjs/core';
|
|
|
2
2
|
import { IDocumentSkeletonGlyph } from '../../../basics/i-document-skeleton-cached';
|
|
3
3
|
import { UniverRenderingContext } from '../../../context';
|
|
4
4
|
import { docExtension } from '../doc-extension';
|
|
5
|
-
|
|
6
5
|
export declare class Border extends docExtension {
|
|
7
6
|
uKey: string;
|
|
8
7
|
Z_INDEX: number;
|
|
@@ -2,7 +2,6 @@ import { IScale } from '@univerjs/core';
|
|
|
2
2
|
import { IDocumentSkeletonGlyph } from '../../../basics/i-document-skeleton-cached';
|
|
3
3
|
import { UniverRenderingContext } from '../../../context';
|
|
4
4
|
import { docExtension } from '../doc-extension';
|
|
5
|
-
|
|
6
5
|
export declare class FontAndBaseLine extends docExtension {
|
|
7
6
|
uKey: string;
|
|
8
7
|
Z_INDEX: number;
|
|
@@ -2,7 +2,6 @@ import { IScale } from '@univerjs/core';
|
|
|
2
2
|
import { IDocumentSkeletonGlyph } from '../../../basics/i-document-skeleton-cached';
|
|
3
3
|
import { UniverRenderingContext } from '../../../context';
|
|
4
4
|
import { docExtension } from '../doc-extension';
|
|
5
|
-
|
|
6
5
|
export declare class Line extends docExtension {
|
|
7
6
|
uKey: string;
|
|
8
7
|
Z_INDEX: number;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IBullet, ILists, LocaleService, Nullable } from '@univerjs/core';
|
|
2
2
|
import { IDocumentSkeletonBullet } from '../../../../../basics/i-document-skeleton-cached';
|
|
3
|
-
|
|
4
3
|
export declare function dealWithBullet(bullet?: IBullet, lists?: ILists, listLevelAncestors?: Array<Nullable<IDocumentSkeletonBullet>>, localeService?: LocaleService): IDocumentSkeletonBullet | undefined;
|
|
5
4
|
export declare function getDefaultBulletSke(listId: string, startIndex?: number): IDocumentSkeletonBullet;
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IParagraph } from '@univerjs/core';
|
|
2
2
|
import { ISectionBreakConfig } from '../../../../../basics/interfaces';
|
|
3
3
|
import { DataStreamTreeNode } from '../../../view-model/data-stream-tree-node';
|
|
4
4
|
import { DocumentViewModel } from '../../../view-model/document-view-model';
|
|
5
|
-
|
|
6
|
-
export declare function otherHandler(index: number, charArray: string, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, paragraphStyle: IParagraphStyle): {
|
|
5
|
+
export declare function otherHandler(index: number, charArray: string, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, paragraph: IParagraph): {
|
|
7
6
|
step: number;
|
|
8
7
|
glyphGroup: import('../../../../..').IDocumentSkeletonGlyph[];
|
|
9
8
|
};
|
|
10
|
-
export declare function ArabicHandler(index: number, charArray: string, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig,
|
|
9
|
+
export declare function ArabicHandler(index: number, charArray: string, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, paragraph: IParagraph): {
|
|
11
10
|
step: number;
|
|
12
11
|
glyphGroup: import('../../../../..').IDocumentSkeletonGlyph[];
|
|
13
12
|
};
|
|
14
|
-
export declare function emojiHandler(index: number, charArray: string, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig,
|
|
13
|
+
export declare function emojiHandler(index: number, charArray: string, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, paragraph: IParagraph): {
|
|
15
14
|
step: number;
|
|
16
15
|
glyphGroup: import('../../../../..').IDocumentSkeletonGlyph[];
|
|
17
16
|
};
|
|
18
|
-
export declare function TibetanHandler(index: number, charArray: string, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig,
|
|
17
|
+
export declare function TibetanHandler(index: number, charArray: string, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, paragraph: IParagraph): {
|
|
19
18
|
step: number;
|
|
20
19
|
glyphGroup: import('../../../../..').IDocumentSkeletonGlyph[];
|
|
21
20
|
};
|
|
@@ -2,6 +2,5 @@ import { IDocumentSkeletonDrawing, IDocumentSkeletonGlyph, IDocumentSkeletonLine
|
|
|
2
2
|
import { IParagraphConfig, ISectionBreakConfig } from '../../../../../basics/interfaces';
|
|
3
3
|
import { ILayoutContext } from '../../tools';
|
|
4
4
|
import { BreakPointType } from '../../line-breaker/break';
|
|
5
|
-
|
|
6
|
-
export declare function layoutParagraph(ctx: ILayoutContext, glyphGroup: IDocumentSkeletonGlyph[], pages: IDocumentSkeletonPage[], sectionBreakConfig: ISectionBreakConfig, paragraphConfig: IParagraphConfig, paragraphStart?: boolean, breakPointType?: BreakPointType): IDocumentSkeletonPage[];
|
|
5
|
+
export declare function layoutParagraph(ctx: ILayoutContext, glyphGroup: IDocumentSkeletonGlyph[], pages: IDocumentSkeletonPage[], sectionBreakConfig: ISectionBreakConfig, paragraphConfig: IParagraphConfig, isParagraphFirstShapedText: boolean, breakPointType?: BreakPointType): IDocumentSkeletonPage[];
|
|
7
6
|
export declare function updateInlineDrawingPosition(line: IDocumentSkeletonLine, paragraphInlineSkeDrawings?: Map<string, IDocumentSkeletonDrawing>, blockAnchorTop?: number): void;
|
|
@@ -2,5 +2,4 @@ import { IDocumentSkeletonPage } from '../../../../../basics/i-document-skeleton
|
|
|
2
2
|
import { DocumentViewModel } from '../../../view-model/document-view-model';
|
|
3
3
|
import { DataStreamTreeNode } from '../../../view-model/data-stream-tree-node';
|
|
4
4
|
import { ISectionBreakConfig } from '../../../../../basics';
|
|
5
|
-
|
|
6
5
|
export declare function lineAdjustment(pages: IDocumentSkeletonPage[], viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig): void;
|
|
@@ -5,5 +5,4 @@ import { DataStreamTreeNode } from '../../../view-model/data-stream-tree-node';
|
|
|
5
5
|
import { ISectionBreakConfig } from '../../../../../basics/interfaces';
|
|
6
6
|
import { DocumentViewModel } from '../../../view-model/document-view-model';
|
|
7
7
|
import { IShapedText } from './shaping';
|
|
8
|
-
|
|
9
8
|
export declare function lineBreaking(ctx: ILayoutContext, viewModel: DocumentViewModel, shapedTextList: IShapedText[], curPage: IDocumentSkeletonPage, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, tableSkeleton: Nullable<IDocumentSkeletonTable>): IDocumentSkeletonPage[];
|
|
@@ -3,5 +3,4 @@ import { ISectionBreakConfig } from '../../../../../basics/interfaces';
|
|
|
3
3
|
import { ILayoutContext } from '../../tools';
|
|
4
4
|
import { DataStreamTreeNode } from '../../../view-model/data-stream-tree-node';
|
|
5
5
|
import { DocumentViewModel } from '../../../view-model/document-view-model';
|
|
6
|
-
|
|
7
6
|
export declare function dealWidthParagraph(ctx: ILayoutContext, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, curPage: IDocumentSkeletonPage, sectionBreakConfig: ISectionBreakConfig): IDocumentSkeletonPage[];
|
|
@@ -4,7 +4,6 @@ import { DataStreamTreeNode } from '../../../view-model/data-stream-tree-node';
|
|
|
4
4
|
import { DocumentViewModel } from '../../../view-model/document-view-model';
|
|
5
5
|
import { ISectionBreakConfig } from '../../../../../basics/interfaces';
|
|
6
6
|
import { BreakPointType } from '../../line-breaker/break';
|
|
7
|
-
|
|
8
7
|
export interface IShapedText {
|
|
9
8
|
text: string;
|
|
10
9
|
glyphs: IDocumentSkeletonGlyph[];
|
|
@@ -4,7 +4,6 @@ import { ISectionBreakConfig } from '../../../../basics/interfaces';
|
|
|
4
4
|
import { DataStreamTreeNode } from '../../view-model/data-stream-tree-node';
|
|
5
5
|
import { DocumentViewModel } from '../../view-model/document-view-model';
|
|
6
6
|
import { ILayoutContext } from '../tools';
|
|
7
|
-
|
|
8
7
|
export declare function dealWithSection(ctx: ILayoutContext, viewModel: DocumentViewModel, sectionNode: DataStreamTreeNode, curPage: IDocumentSkeletonPage, sectionBreakConfig: ISectionBreakConfig, layoutAnchor: Nullable<number>): {
|
|
9
8
|
pages: IDocumentSkeletonPage[];
|
|
10
9
|
renderedBlockIdMap: Map<string, boolean>;
|
|
@@ -3,7 +3,6 @@ import { IDocumentSkeletonPage, IDocumentSkeletonTable, ISectionBreakConfig } fr
|
|
|
3
3
|
import { DataStreamTreeNode } from '../../view-model/data-stream-tree-node';
|
|
4
4
|
import { DocumentViewModel } from '../../view-model/document-view-model';
|
|
5
5
|
import { ILayoutContext } from '../tools';
|
|
6
|
-
|
|
7
6
|
export declare function createTableSkeleton(ctx: ILayoutContext, curPage: IDocumentSkeletonPage, viewModel: DocumentViewModel, tableNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig): IDocumentSkeletonTable;
|
|
8
7
|
export declare function getNullTableSkeleton(st: number, ed: number, table: ITable): IDocumentSkeletonTable;
|
|
9
8
|
export declare function getTableSliceId(tableId: string, sliceIndex: number): string;
|
|
@@ -4,7 +4,6 @@ import { INodeInfo, INodePosition, INodeSearch } from '../../../basics/interface
|
|
|
4
4
|
import { IViewportInfo, Vector2 } from '../../../basics/vector2';
|
|
5
5
|
import { Skeleton } from '../../skeleton';
|
|
6
6
|
import { DocumentViewModel, DocumentEditArea } from '../view-model/document-view-model';
|
|
7
|
-
|
|
8
7
|
export declare enum DocumentSkeletonState {
|
|
9
8
|
PENDING = "pending",
|
|
10
9
|
CALCULATING = "calculating",
|
|
@@ -18,6 +17,8 @@ export interface IFindNodeRestrictions {
|
|
|
18
17
|
}
|
|
19
18
|
export declare class DocumentSkeleton extends Skeleton {
|
|
20
19
|
private _docViewModel;
|
|
20
|
+
private _dirty$;
|
|
21
|
+
readonly dirty$: import('rxjs').Observable<boolean>;
|
|
21
22
|
private _skeletonData;
|
|
22
23
|
private _findLiquid;
|
|
23
24
|
private _hyphen;
|
|
@@ -3,7 +3,6 @@ import { Break } from '../break';
|
|
|
3
3
|
import { IBreakPoints, LineBreaker } from '../line-breaker';
|
|
4
4
|
import { Hyphen } from '../../hyphenation/hyphen';
|
|
5
5
|
import { Lang } from '../../hyphenation/lang';
|
|
6
|
-
|
|
7
6
|
export declare function isLetter(char: string): boolean;
|
|
8
7
|
export declare class LineBreakerHyphenEnhancer implements IBreakPoints {
|
|
9
8
|
private _lineBreaker;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { ISectionColumnProperties, ColumnSeparatorType } from '@univerjs/core';
|
|
2
2
|
import { IDocumentSkeletonColumn } from '../../../../basics/i-document-skeleton-cached';
|
|
3
|
-
|
|
4
3
|
export declare function createSkeletonColumn(columnIndex: number | undefined, columnProperties: ISectionColumnProperties[], columnSeparatorType?: ColumnSeparatorType, pageWidth?: number): IDocumentSkeletonColumn;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IAdjustability, IDocumentSkeletonBullet, IDocumentSkeletonDivide, IDocumentSkeletonGlyph, GlyphType } from '../../../../basics/i-document-skeleton-cached';
|
|
2
2
|
import { IFontCreateConfig } from '../../../../basics/interfaces';
|
|
3
3
|
import { IOpenTypeGlyphInfo } from '../shaping-engine/text-shaping';
|
|
4
|
-
|
|
5
4
|
export declare function isSpace(char: string): boolean;
|
|
6
5
|
export declare function isJustifiable(content: string): boolean;
|
|
7
6
|
export declare function baseAdjustability(content: string, width: number): IAdjustability;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Nullable } from '@univerjs/core';
|
|
2
2
|
import { IDocumentSkeletonDivide, IDocumentSkeletonDrawing, IDocumentSkeletonDrawingAnchor, IDocumentSkeletonLine, IDocumentSkeletonPage, LineType } from '../../../../basics/i-document-skeleton-cached';
|
|
3
3
|
import { IParagraphConfig } from '../../../../basics';
|
|
4
|
-
|
|
5
4
|
interface ILineBoundingBox {
|
|
6
5
|
lineHeight: number;
|
|
7
6
|
lineTop: number;
|
|
@@ -4,6 +4,5 @@ import { ISectionBreakConfig } from '../../../../basics/interfaces';
|
|
|
4
4
|
import { DocumentViewModel } from '../../view-model/document-view-model';
|
|
5
5
|
import { ILayoutContext } from '../tools';
|
|
6
6
|
import { DataStreamTreeNode } from '../../view-model/data-stream-tree-node';
|
|
7
|
-
|
|
8
7
|
export declare function createSkeletonPage(ctx: ILayoutContext, sectionBreakConfig: ISectionBreakConfig, skeletonResourceReference: ISkeletonResourceReference, pageNumber?: number, breakType?: BreakType): IDocumentSkeletonPage;
|
|
9
8
|
export declare function createSkeletonCellPage(ctx: ILayoutContext, viewModel: DocumentViewModel, cellNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, tableConfig: ITable, row: number, col: number): IDocumentSkeletonPage;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ISectionColumnProperties, ColumnSeparatorType } from '@univerjs/core';
|
|
2
2
|
import { IDocumentSkeletonColumn, IDocumentSkeletonSection } from '../../../../basics/i-document-skeleton-cached';
|
|
3
|
-
|
|
4
3
|
export declare function createSkeletonSection(columnProperties?: ISectionColumnProperties[], columnSeparatorType?: ColumnSeparatorType, top?: number, left?: number, sectionWidth?: number, sectionHeight?: number): IDocumentSkeletonSection;
|
|
5
4
|
export declare function setColumnFullState(column: IDocumentSkeletonColumn, state: boolean): void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Nullable } from '@univerjs/core';
|
|
2
2
|
import { IDocumentSkeletonBoundingBox, IDocumentSkeletonFontStyle } from '../../../../basics/i-document-skeleton-cached';
|
|
3
3
|
import { IOpenTypeGlyphInfo } from './text-shaping';
|
|
4
|
-
|
|
5
4
|
export declare const DEFAULT_MEASURE_TEXT = "0";
|
|
6
5
|
export interface IMeasureTextCache {
|
|
7
6
|
fontBoundingBoxAscent: number;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { DocumentDataModel, INumberUnit, IObjectPositionH, IObjectPositionV, IParagraphStyle, ITextStyle, Nullable, BooleanNumber, GridType, SpacingRule } from '@univerjs/core';
|
|
1
|
+
import { DocumentDataModel, INumberUnit, IObjectPositionH, IObjectPositionV, IParagraph, IParagraphStyle, ITextStyle, Nullable, BooleanNumber, GridType, SpacingRule } from '@univerjs/core';
|
|
2
2
|
import { IDocumentSkeletonCached, IDocumentSkeletonColumn, IDocumentSkeletonDivide, IDocumentSkeletonDrawing, IDocumentSkeletonFontStyle, IDocumentSkeletonGlyph, IDocumentSkeletonLine, IDocumentSkeletonPage, IDocumentSkeletonSection, ISkeletonResourceReference } from '../../../basics/i-document-skeleton-cached';
|
|
3
3
|
import { IDocsConfig, IParagraphConfig, ISectionBreakConfig } from '../../../basics/interfaces';
|
|
4
4
|
import { DataStreamTreeNode } from '../view-model/data-stream-tree-node';
|
|
5
5
|
import { DocumentViewModel } from '../view-model/document-view-model';
|
|
6
6
|
import { Hyphen } from './hyphenation/hyphen';
|
|
7
7
|
import { LanguageDetector } from './hyphenation/language-detector';
|
|
8
|
-
|
|
9
8
|
export declare function getLastPage(pages: IDocumentSkeletonPage[]): IDocumentSkeletonPage;
|
|
10
9
|
export declare function getLastSection(page: IDocumentSkeletonPage): IDocumentSkeletonSection;
|
|
11
10
|
export declare function getLastColumn(page: IDocumentSkeletonPage): IDocumentSkeletonColumn;
|
|
@@ -73,7 +72,7 @@ export declare function getFontConfigFromLastGlyph(glyph: IDocumentSkeletonGlyph
|
|
|
73
72
|
snapToGrid: BooleanNumber;
|
|
74
73
|
pageWidth: number;
|
|
75
74
|
};
|
|
76
|
-
export declare function getFontCreateConfig(index: number, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig,
|
|
75
|
+
export declare function getFontCreateConfig(index: number, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, paragraph: IParagraph): IFontCreateConfig;
|
|
77
76
|
export declare function getNullSkeleton(): IDocumentSkeletonCached;
|
|
78
77
|
export declare function setPageParent(pages: IDocumentSkeletonPage[], parent: IDocumentSkeletonCached): void;
|
|
79
78
|
export interface ILayoutContext {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IDocumentSkeletonColumn, IDocumentSkeletonDivide, IDocumentSkeletonGlyph, IDocumentSkeletonLine, IDocumentSkeletonPage, IDocumentSkeletonSection, PageLayoutType } from '../../basics/i-document-skeleton-cached';
|
|
2
|
-
|
|
3
2
|
export declare class Liquid {
|
|
4
3
|
private _translateX;
|
|
5
4
|
private _translateY;
|
|
@@ -25,7 +24,7 @@ export declare class Liquid {
|
|
|
25
24
|
x: number;
|
|
26
25
|
y: number;
|
|
27
26
|
};
|
|
28
|
-
translateLine(line: IDocumentSkeletonLine,
|
|
27
|
+
translateLine(line: IDocumentSkeletonLine, includeMarginTop?: boolean, includePaddingTop?: boolean): {
|
|
29
28
|
x: number;
|
|
30
29
|
y: number;
|
|
31
30
|
};
|
|
@@ -2,7 +2,6 @@ import { Nullable } from '@univerjs/core';
|
|
|
2
2
|
import { INodePosition, IPoint } from '../../../basics';
|
|
3
3
|
import { IDocumentOffsetConfig } from '../document';
|
|
4
4
|
import { DocumentSkeleton } from '../layout/doc-skeleton';
|
|
5
|
-
|
|
6
5
|
export declare function isValidRectRange(anchorNodePosition: INodePosition, focusNodePosition: INodePosition): boolean;
|
|
7
6
|
export declare function isInSameTableCell(anchorNodePosition: INodePosition, focusNodePosition: INodePosition): boolean;
|
|
8
7
|
export declare function compareNodePositionInTable(a: INodePosition, b: INodePosition): boolean;
|
|
@@ -4,7 +4,6 @@ import { INodePosition } from '../../../basics/interfaces';
|
|
|
4
4
|
import { IPoint } from '../../../basics/vector2';
|
|
5
5
|
import { DocumentSkeleton } from '../layout/doc-skeleton';
|
|
6
6
|
import { IDocumentOffsetConfig } from '../document';
|
|
7
|
-
|
|
8
7
|
export declare enum NodePositionStateType {
|
|
9
8
|
NORMAL = 0,
|
|
10
9
|
START = 1,
|
|
@@ -4,7 +4,6 @@ import { ThinScene } from '../../../thin-scene';
|
|
|
4
4
|
import { Documents } from '../document';
|
|
5
5
|
import { DocumentSkeleton } from '../layout/doc-skeleton';
|
|
6
6
|
import { IDocRange, DOC_RANGE_TYPE } from './range-interface';
|
|
7
|
-
|
|
8
7
|
export declare function convertPositionsToRectRanges(scene: ThinScene, document: Documents, docSkeleton: DocumentSkeleton, anchorNodePosition: INodePosition, focusNodePosition: INodePosition, style?: ITextSelectionStyle, segmentId?: string): RectRange[];
|
|
9
8
|
export declare class RectRange implements IDocRange {
|
|
10
9
|
private _scene;
|