@univerjs/engine-render 0.1.0-alpha.1 → 0.1.0-alpha.3
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/LICENSE.txt +178 -0
- package/README.md +1 -1
- package/lib/cjs/index.js +73 -23962
- package/lib/es/index.js +15060 -0
- package/lib/types/base-object.d.ts +21 -6
- package/lib/types/basics/cell-data.d.ts +15 -1
- package/lib/types/basics/const.d.ts +16 -154
- package/lib/types/basics/document-node-tools.d.ts +15 -1
- package/lib/types/basics/draw.d.ts +15 -1
- package/lib/types/basics/font-cache.d.ts +15 -1
- package/lib/types/basics/i-document-skeleton-cached.d.ts +17 -3
- package/lib/types/basics/i-events.d.ts +17 -6
- package/lib/types/basics/index.d.ts +15 -1
- package/lib/types/basics/interfaces.d.ts +15 -1
- package/lib/types/basics/path2.d.ts +15 -1
- package/lib/types/basics/performance-monitor.d.ts +15 -1
- package/lib/types/basics/position.d.ts +15 -1
- package/lib/types/basics/quick-event.d.ts +15 -1
- package/lib/types/basics/range.d.ts +20 -1
- package/lib/types/basics/scroll-xy.d.ts +15 -1
- package/lib/types/basics/tools.d.ts +22 -8
- package/lib/types/basics/transform.d.ts +15 -1
- package/lib/types/basics/unit-convert.d.ts +15 -1
- package/lib/types/basics/vector2.d.ts +23 -1
- package/lib/types/canvas.d.ts +15 -1
- package/lib/types/components/component.d.ts +22 -8
- package/lib/types/components/docs/block/block-error.d.ts +15 -1
- package/lib/types/components/docs/block/index.d.ts +15 -1
- package/lib/types/components/docs/block/paragraph/bullet-ruler.d.ts +15 -1
- package/lib/types/components/docs/block/paragraph/bullet.d.ts +16 -2
- package/lib/types/components/docs/block/paragraph/index.d.ts +15 -1
- package/lib/types/components/docs/block/paragraph/inline-drawing.d.ts +15 -1
- package/lib/types/components/docs/block/paragraph/language-ruler.d.ts +32 -9
- package/lib/types/components/docs/block/paragraph/layout-ruler.d.ts +15 -1
- package/lib/types/components/docs/block/paragraph/paragraph.d.ts +15 -1
- package/lib/types/components/docs/block/section.d.ts +15 -1
- package/lib/types/components/docs/common/column.d.ts +15 -1
- package/lib/types/components/docs/common/convert-cursor.d.ts +17 -3
- package/lib/types/components/docs/common/index.d.ts +15 -1
- package/lib/types/components/docs/common/line.d.ts +16 -2
- package/lib/types/components/docs/common/liquid.d.ts +15 -1
- package/lib/types/components/docs/common/page.d.ts +15 -1
- package/lib/types/components/docs/common/range.d.ts +17 -3
- package/lib/types/components/docs/common/section.d.ts +15 -1
- package/lib/types/components/docs/common/span.d.ts +17 -1
- package/lib/types/components/docs/common/tools.d.ts +15 -2
- package/lib/types/components/docs/doc-component.d.ts +21 -11
- package/lib/types/components/docs/doc-extension.d.ts +17 -2
- package/lib/types/components/docs/doc-skeleton.d.ts +18 -4
- package/lib/types/components/docs/document.d.ts +18 -7
- package/lib/types/components/docs/extensions/background.d.ts +15 -1
- package/lib/types/components/docs/extensions/border.d.ts +15 -1
- package/lib/types/components/docs/extensions/font-and-base-line.d.ts +16 -1
- package/lib/types/components/docs/extensions/index.d.ts +15 -1
- package/lib/types/components/docs/extensions/line.d.ts +16 -1
- package/lib/types/components/docs/horizon-bar.d.ts +15 -1
- package/lib/types/components/docs/index.d.ts +15 -1
- package/lib/types/components/docs/text-selection-render-manager.d.ts +41 -25
- package/lib/types/components/docs/vertical-bar.d.ts +15 -1
- package/lib/types/components/docs/view-model/data-stream-tree-node.d.ts +15 -1
- package/lib/types/components/docs/view-model/document-view-model.d.ts +15 -1
- package/lib/types/components/extension.d.ts +17 -3
- package/lib/types/components/index.d.ts +15 -1
- package/lib/types/components/sheets/column-header.d.ts +17 -3
- package/lib/types/components/sheets/extensions/background.d.ts +17 -3
- package/lib/types/components/sheets/extensions/border.d.ts +17 -3
- package/lib/types/components/sheets/extensions/column-header-layout.d.ts +15 -1
- package/lib/types/components/sheets/extensions/font.d.ts +17 -3
- package/lib/types/components/sheets/extensions/index.d.ts +15 -2
- package/lib/types/components/sheets/extensions/row-header-layout.d.ts +15 -1
- package/lib/types/components/sheets/extensions/sheet-extension.d.ts +19 -2
- package/lib/types/components/sheets/index.d.ts +15 -1
- package/lib/types/components/sheets/interfaces.d.ts +17 -2
- package/lib/types/components/sheets/row-header.d.ts +17 -3
- package/lib/types/components/sheets/sheet-component.d.ts +23 -9
- package/lib/types/components/sheets/sheet-skeleton.d.ts +43 -11
- package/lib/types/components/sheets/spreadsheet.d.ts +33 -17
- package/lib/types/components/skeleton.d.ts +15 -1
- package/lib/types/components/slides/index.d.ts +15 -1
- package/lib/types/components/slides/slide.d.ts +15 -1
- package/lib/types/custom/custom-object.d.ts +17 -3
- package/lib/types/custom/index.d.ts +15 -1
- package/lib/types/engine.d.ts +18 -4
- package/lib/types/group.d.ts +17 -3
- package/lib/types/index.d.ts +16 -2
- package/lib/types/layer.d.ts +29 -3
- package/lib/types/render-engine.d.ts +16 -2
- package/lib/types/render-manager.service.d.ts +15 -1
- package/lib/types/scene-viewer.d.ts +17 -3
- package/lib/types/scene.-transformer.d.ts +15 -1
- package/lib/types/scene.d.ts +18 -5
- package/lib/types/scene.input-manager.d.ts +19 -2
- package/lib/types/scroll-timer.d.ts +15 -1
- package/lib/types/services/object-transform-manager.service.d.ts +15 -1
- package/lib/types/shape/base-scroll-bar.d.ts +15 -1
- package/lib/types/shape/circle.d.ts +15 -1
- package/lib/types/shape/control.d.ts +15 -1
- package/lib/types/shape/drawing.d.ts +15 -1
- package/lib/types/shape/index.d.ts +15 -1
- package/lib/types/shape/path.d.ts +15 -1
- package/lib/types/shape/picture.d.ts +15 -1
- package/lib/types/shape/rect.d.ts +15 -1
- package/lib/types/shape/regular-polygon.d.ts +15 -1
- package/lib/types/shape/rich-text.d.ts +17 -6
- package/lib/types/shape/scroll-bar.d.ts +15 -1
- package/lib/types/shape/selection.d.ts +15 -1
- package/lib/types/shape/shape.d.ts +17 -11
- package/lib/types/thin-engine.d.ts +15 -1
- package/lib/types/thin-scene.d.ts +18 -3
- package/lib/types/viewport.d.ts +26 -11
- package/lib/umd/index.js +73 -0
- package/package.json +22 -14
- package/LICENSE +0 -21
- package/lib/esm/index.js +0 -23259
- package/lib/types/base-object.d.ts.map +0 -1
- package/lib/types/basics/cell-data.d.ts.map +0 -1
- package/lib/types/basics/const.d.ts.map +0 -1
- package/lib/types/basics/document-node-tools.d.ts.map +0 -1
- package/lib/types/basics/draw.d.ts.map +0 -1
- package/lib/types/basics/font-cache.d.ts.map +0 -1
- package/lib/types/basics/i-document-skeleton-cached.d.ts.map +0 -1
- package/lib/types/basics/i-events.d.ts.map +0 -1
- package/lib/types/basics/index.d.ts.map +0 -1
- package/lib/types/basics/interfaces.d.ts.map +0 -1
- package/lib/types/basics/path2.d.ts.map +0 -1
- package/lib/types/basics/performance-monitor.d.ts.map +0 -1
- package/lib/types/basics/position.d.ts.map +0 -1
- package/lib/types/basics/quick-event.d.ts.map +0 -1
- package/lib/types/basics/range.d.ts.map +0 -1
- package/lib/types/basics/scroll-xy.d.ts.map +0 -1
- package/lib/types/basics/tools.d.ts.map +0 -1
- package/lib/types/basics/transform.d.ts.map +0 -1
- package/lib/types/basics/unit-convert.d.ts.map +0 -1
- package/lib/types/basics/vector2.d.ts.map +0 -1
- package/lib/types/canvas.d.ts.map +0 -1
- package/lib/types/components/component.d.ts.map +0 -1
- package/lib/types/components/docs/block/block-error.d.ts.map +0 -1
- package/lib/types/components/docs/block/index.d.ts.map +0 -1
- package/lib/types/components/docs/block/paragraph/bullet-ruler.d.ts.map +0 -1
- package/lib/types/components/docs/block/paragraph/bullet.d.ts.map +0 -1
- package/lib/types/components/docs/block/paragraph/index.d.ts.map +0 -1
- package/lib/types/components/docs/block/paragraph/inline-drawing.d.ts.map +0 -1
- package/lib/types/components/docs/block/paragraph/language-ruler.d.ts.map +0 -1
- package/lib/types/components/docs/block/paragraph/layout-ruler.d.ts.map +0 -1
- package/lib/types/components/docs/block/paragraph/paragraph.d.ts.map +0 -1
- package/lib/types/components/docs/block/section.d.ts.map +0 -1
- package/lib/types/components/docs/block/table/table-cell.d.ts +0 -1
- package/lib/types/components/docs/block/table/table-cell.d.ts.map +0 -1
- package/lib/types/components/docs/block/table/table-row.d.ts +0 -1
- package/lib/types/components/docs/block/table/table-row.d.ts.map +0 -1
- package/lib/types/components/docs/block/table/table.d.ts +0 -1
- package/lib/types/components/docs/block/table/table.d.ts.map +0 -1
- package/lib/types/components/docs/common/column.d.ts.map +0 -1
- package/lib/types/components/docs/common/convert-cursor.d.ts.map +0 -1
- package/lib/types/components/docs/common/index.d.ts.map +0 -1
- package/lib/types/components/docs/common/line.d.ts.map +0 -1
- package/lib/types/components/docs/common/liquid.d.ts.map +0 -1
- package/lib/types/components/docs/common/page.d.ts.map +0 -1
- package/lib/types/components/docs/common/range.d.ts.map +0 -1
- package/lib/types/components/docs/common/section.d.ts.map +0 -1
- package/lib/types/components/docs/common/span.d.ts.map +0 -1
- package/lib/types/components/docs/common/tools.d.ts.map +0 -1
- package/lib/types/components/docs/doc-component.d.ts.map +0 -1
- package/lib/types/components/docs/doc-extension.d.ts.map +0 -1
- package/lib/types/components/docs/doc-skeleton.d.ts.map +0 -1
- package/lib/types/components/docs/document.d.ts.map +0 -1
- package/lib/types/components/docs/extensions/background.d.ts.map +0 -1
- package/lib/types/components/docs/extensions/border.d.ts.map +0 -1
- package/lib/types/components/docs/extensions/font-and-base-line.d.ts.map +0 -1
- package/lib/types/components/docs/extensions/index.d.ts.map +0 -1
- package/lib/types/components/docs/extensions/line.d.ts.map +0 -1
- package/lib/types/components/docs/horizon-bar.d.ts.map +0 -1
- package/lib/types/components/docs/index.d.ts.map +0 -1
- package/lib/types/components/docs/text-selection-render-manager.d.ts.map +0 -1
- package/lib/types/components/docs/vertical-bar.d.ts.map +0 -1
- package/lib/types/components/docs/view-model/data-stream-tree-node.d.ts.map +0 -1
- package/lib/types/components/docs/view-model/document-view-model.d.ts.map +0 -1
- package/lib/types/components/extension.d.ts.map +0 -1
- package/lib/types/components/index.d.ts.map +0 -1
- package/lib/types/components/sheets/column-header.d.ts.map +0 -1
- package/lib/types/components/sheets/extensions/background.d.ts.map +0 -1
- package/lib/types/components/sheets/extensions/border-auxiliary.d.ts +0 -13
- package/lib/types/components/sheets/extensions/border-auxiliary.d.ts.map +0 -1
- package/lib/types/components/sheets/extensions/border.d.ts.map +0 -1
- package/lib/types/components/sheets/extensions/column-header-layout.d.ts.map +0 -1
- package/lib/types/components/sheets/extensions/font.d.ts.map +0 -1
- package/lib/types/components/sheets/extensions/index.d.ts.map +0 -1
- package/lib/types/components/sheets/extensions/row-header-layout.d.ts.map +0 -1
- package/lib/types/components/sheets/extensions/sheet-extension.d.ts.map +0 -1
- package/lib/types/components/sheets/index.d.ts.map +0 -1
- package/lib/types/components/sheets/interfaces.d.ts.map +0 -1
- package/lib/types/components/sheets/row-header.d.ts.map +0 -1
- package/lib/types/components/sheets/sheet-component.d.ts.map +0 -1
- package/lib/types/components/sheets/sheet-skeleton.d.ts.map +0 -1
- package/lib/types/components/sheets/spreadsheet.d.ts.map +0 -1
- package/lib/types/components/skeleton.d.ts.map +0 -1
- package/lib/types/components/slides/index.d.ts.map +0 -1
- package/lib/types/components/slides/slide.d.ts.map +0 -1
- package/lib/types/custom/custom-object.d.ts.map +0 -1
- package/lib/types/custom/index.d.ts.map +0 -1
- package/lib/types/engine.d.ts.map +0 -1
- package/lib/types/group.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/layer.d.ts.map +0 -1
- package/lib/types/render-engine.d.ts.map +0 -1
- package/lib/types/render-manager.service.d.ts.map +0 -1
- package/lib/types/scene-viewer.d.ts.map +0 -1
- package/lib/types/scene.-transformer.d.ts.map +0 -1
- package/lib/types/scene.d.ts.map +0 -1
- package/lib/types/scene.input-manager.d.ts.map +0 -1
- package/lib/types/scroll-timer.d.ts.map +0 -1
- package/lib/types/services/object-transform-manager.service.d.ts.map +0 -1
- package/lib/types/shape/base-scroll-bar.d.ts.map +0 -1
- package/lib/types/shape/circle.d.ts.map +0 -1
- package/lib/types/shape/control.d.ts.map +0 -1
- package/lib/types/shape/drawing.d.ts.map +0 -1
- package/lib/types/shape/index.d.ts.map +0 -1
- package/lib/types/shape/path.d.ts.map +0 -1
- package/lib/types/shape/picture.d.ts.map +0 -1
- package/lib/types/shape/rect.d.ts.map +0 -1
- package/lib/types/shape/regular-polygon.d.ts.map +0 -1
- package/lib/types/shape/rich-text.d.ts.map +0 -1
- package/lib/types/shape/scroll-bar.d.ts.map +0 -1
- package/lib/types/shape/selection.d.ts.map +0 -1
- package/lib/types/shape/shape.d.ts.map +0 -1
- package/lib/types/thin-engine.d.ts.map +0 -1
- package/lib/types/thin-scene.d.ts.map +0 -1
- package/lib/types/viewport.d.ts.map +0 -1
|
@@ -1,13 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
import type { Nullable } from '@univerjs/core';
|
|
2
17
|
import type { INodePosition } from '../../../basics/interfaces';
|
|
3
|
-
import type {
|
|
18
|
+
import type { ISuccinctTextRangeParam, ITextSelectionStyle } from '../../../basics/range';
|
|
4
19
|
import { RANGE_DIRECTION } from '../../../basics/range';
|
|
5
20
|
import type { Scene } from '../../../scene';
|
|
6
21
|
import { Rect } from '../../../shape/rect';
|
|
7
22
|
import type { ThinScene } from '../../../thin-scene';
|
|
8
23
|
import type { DocumentSkeleton } from '../doc-skeleton';
|
|
9
24
|
import type { IDocumentOffsetConfig } from '../document';
|
|
10
|
-
export declare function cursorConvertToTextRange(scene: Scene, range:
|
|
25
|
+
export declare function cursorConvertToTextRange(scene: Scene, range: ISuccinctTextRangeParam, docSkeleton: DocumentSkeleton, documentOffsetConfig: IDocumentOffsetConfig): Nullable<TextRange>;
|
|
11
26
|
export declare class TextRange {
|
|
12
27
|
private _scene;
|
|
13
28
|
private _documentOffsetConfig;
|
|
@@ -42,4 +57,3 @@ export declare class TextRange {
|
|
|
42
57
|
private _createOrUpdateAnchor;
|
|
43
58
|
private _setCursorList;
|
|
44
59
|
}
|
|
45
|
-
//# sourceMappingURL=range.d.ts.map
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
import type { ISectionColumnProperties } from '@univerjs/core';
|
|
2
17
|
import { ColumnSeparatorType } from '@univerjs/core';
|
|
3
18
|
import type { IDocumentSkeletonColumn, IDocumentSkeletonSection } from '../../../basics/i-document-skeleton-cached';
|
|
4
19
|
export declare function createSkeletonSection(columnProperties?: ISectionColumnProperties[], columnSeparatorType?: ColumnSeparatorType, top?: number, left?: number, sectionWidth?: number, sectionHeight?: number): IDocumentSkeletonSection;
|
|
5
20
|
export declare function setColumnFullState(column: IDocumentSkeletonColumn, state: boolean): void;
|
|
6
|
-
//# sourceMappingURL=section.d.ts.map
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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 { Nullable } from '@univerjs/core';
|
|
1
17
|
import type { IDocumentSkeletonBullet, IDocumentSkeletonDivide, IDocumentSkeletonSpan } from '../../../basics/i-document-skeleton-cached';
|
|
2
18
|
import { SpanType } from '../../../basics/i-document-skeleton-cached';
|
|
3
19
|
import type { IFontCreateConfig } from '../../../basics/interfaces';
|
|
@@ -9,4 +25,4 @@ export declare function createSkeletonBulletSpan(span: IDocumentSkeletonSpan, bu
|
|
|
9
25
|
export declare function setSpanGroupLeft(spanGroup: IDocumentSkeletonSpan[], left?: number): void;
|
|
10
26
|
export declare function setSpanLeft(span: IDocumentSkeletonSpan, left?: number): void;
|
|
11
27
|
export declare function addSpanToDivide(divide: IDocumentSkeletonDivide, spanGroup: IDocumentSkeletonSpan[], offsetLeft?: number): void;
|
|
12
|
-
|
|
28
|
+
export declare function hasMixedTextLayout(preSpan: Nullable<IDocumentSkeletonSpan>, span: IDocumentSkeletonSpan): boolean;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
import type { INumberUnit, IParagraphStyle, ITextStyle, ObjectPositionH, ObjectPositionV } from '@univerjs/core';
|
|
2
17
|
import { BooleanNumber, GridType, SpacingRule } from '@univerjs/core';
|
|
3
18
|
import type { IDocumentSkeletonColumn, IDocumentSkeletonDivide, IDocumentSkeletonLine, IDocumentSkeletonPage, IDocumentSkeletonSpan } from '../../../basics/i-document-skeleton-cached';
|
|
@@ -53,7 +68,6 @@ export declare function lineIterator(pages: IDocumentSkeletonPage[], iteratorFun
|
|
|
53
68
|
export declare function columnIterator(pages: IDocumentSkeletonPage[], iteratorFunction: (column: IDocumentSkeletonColumn) => void): void;
|
|
54
69
|
export declare function getPositionHorizon(positionH: ObjectPositionH, column: IDocumentSkeletonColumn, page: IDocumentSkeletonPage, objectWidth: number, isPageBreak?: boolean): number | undefined;
|
|
55
70
|
export declare function getPositionVertical(positionV: ObjectPositionV, page: IDocumentSkeletonPage, lineTop: number, lineHeight: number, objectHeight: number, blockAnchorTop?: number, isPageBreak?: boolean): number | undefined;
|
|
56
|
-
export declare function getPositionHorizonBySpan(positionH: ObjectPositionH, span: IDocumentSkeletonSpan): void;
|
|
57
71
|
export declare function getSpanGroupWidth(divide: IDocumentSkeletonDivide): number;
|
|
58
72
|
interface IFontCreateConfig {
|
|
59
73
|
fontStyle: {
|
|
@@ -70,4 +84,3 @@ interface IFontCreateConfig {
|
|
|
70
84
|
export declare function clearFontCreateConfigCache(): void;
|
|
71
85
|
export declare function getFontCreateConfig(index: number, bodyModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, paragraphStyle: IParagraphStyle): IFontCreateConfig;
|
|
72
86
|
export {};
|
|
73
|
-
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1,24 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
import type { Nullable } from '@univerjs/core';
|
|
2
17
|
import type { IDocumentSkeletonLine, IDocumentSkeletonSpan } from '../../basics/i-document-skeleton-cached';
|
|
3
18
|
import { PageLayoutType } from '../../basics/i-document-skeleton-cached';
|
|
4
19
|
import type { INodeInfo } from '../../basics/interfaces';
|
|
5
|
-
import type {
|
|
6
|
-
import { Canvas } from '../../canvas';
|
|
20
|
+
import type { IBoundRectNoAngle, IViewportBound } from '../../basics/vector2';
|
|
7
21
|
import { RenderComponent } from '../component';
|
|
8
22
|
import type { DOCS_EXTENSION_TYPE } from './doc-extension';
|
|
9
23
|
import type { DocumentSkeleton } from './doc-skeleton';
|
|
10
|
-
export declare class DocComponent extends RenderComponent<IDocumentSkeletonSpan | IDocumentSkeletonLine, DOCS_EXTENSION_TYPE> {
|
|
24
|
+
export declare class DocComponent extends RenderComponent<IDocumentSkeletonSpan | IDocumentSkeletonLine, DOCS_EXTENSION_TYPE, IBoundRectNoAngle[]> {
|
|
11
25
|
private _skeleton?;
|
|
12
|
-
private _allowCache;
|
|
13
26
|
pageMarginLeft: number;
|
|
14
27
|
pageMarginTop: number;
|
|
15
28
|
pageLayoutType: PageLayoutType;
|
|
16
|
-
|
|
17
|
-
constructor(oKey: string, _skeleton?: DocumentSkeleton | undefined, _allowCache?: boolean);
|
|
18
|
-
setAllowCache(state?: boolean): void;
|
|
29
|
+
constructor(oKey: string, _skeleton?: DocumentSkeleton | undefined);
|
|
19
30
|
getSkeleton(): DocumentSkeleton | undefined;
|
|
20
31
|
setSkeleton(skeleton: DocumentSkeleton): void;
|
|
21
|
-
render(mainCtx: CanvasRenderingContext2D, bounds?:
|
|
32
|
+
render(mainCtx: CanvasRenderingContext2D, bounds?: IViewportBound): this | undefined;
|
|
22
33
|
getParentScale(): {
|
|
23
34
|
scaleX: any;
|
|
24
35
|
scaleY: any;
|
|
@@ -28,7 +39,6 @@ export declare class DocComponent extends RenderComponent<IDocumentSkeletonSpan
|
|
|
28
39
|
remainActiveSelection(): void;
|
|
29
40
|
findNodeByCoord(offsetX: number, offsetY: number): Nullable<INodeInfo>;
|
|
30
41
|
findCoordByNode(span: IDocumentSkeletonSpan): void;
|
|
31
|
-
protected _getBounding(bounds?:
|
|
32
|
-
protected _draw(ctx: CanvasRenderingContext2D, bounds?:
|
|
42
|
+
protected _getBounding(bounds?: IViewportBound): void;
|
|
43
|
+
protected _draw(ctx: CanvasRenderingContext2D, bounds?: IViewportBound): void;
|
|
33
44
|
}
|
|
34
|
-
//# sourceMappingURL=doc-component.d.ts.map
|
|
@@ -1,12 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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 '../..';
|
|
1
17
|
import type { IDocumentSkeletonLine, IDocumentSkeletonSpan } from '../../basics/i-document-skeleton-cached';
|
|
2
18
|
import { ComponentExtension } from '../extension';
|
|
3
19
|
export declare enum DOCS_EXTENSION_TYPE {
|
|
4
20
|
SPAN = 0,
|
|
5
21
|
LINE = 1
|
|
6
22
|
}
|
|
7
|
-
export declare class docExtension extends ComponentExtension<IDocumentSkeletonSpan | IDocumentSkeletonLine, DOCS_EXTENSION_TYPE> {
|
|
23
|
+
export declare class docExtension extends ComponentExtension<IDocumentSkeletonSpan | IDocumentSkeletonLine, DOCS_EXTENSION_TYPE, IBoundRectNoAngle> {
|
|
8
24
|
type: DOCS_EXTENSION_TYPE;
|
|
9
25
|
translateX: number;
|
|
10
26
|
translateY: number;
|
|
11
27
|
}
|
|
12
|
-
//# sourceMappingURL=doc-extension.d.ts.map
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
import type { LocaleService, Nullable } from '@univerjs/core';
|
|
2
17
|
import type { IDocumentSkeletonCached, IDocumentSkeletonSpan } from '../../basics/i-document-skeleton-cached';
|
|
3
18
|
import { PageLayoutType } from '../../basics/i-document-skeleton-cached';
|
|
4
19
|
import type { INodeInfo, INodePosition, INodeSearch } from '../../basics/interfaces';
|
|
5
|
-
import type {
|
|
20
|
+
import type { IViewportBound, Vector2 } from '../../basics/vector2';
|
|
6
21
|
import { Skeleton } from '../skeleton';
|
|
7
22
|
import type { DocumentViewModel } from './view-model/document-view-model';
|
|
8
23
|
export declare enum DocumentSkeletonState {
|
|
@@ -16,10 +31,10 @@ export declare class DocumentSkeleton extends Skeleton {
|
|
|
16
31
|
private _skeletonData;
|
|
17
32
|
private _renderedBlockIdMap;
|
|
18
33
|
private _findLiquid;
|
|
19
|
-
constructor(
|
|
34
|
+
constructor(_docViewModel: DocumentViewModel, localeService: LocaleService);
|
|
20
35
|
static create(docViewModel: DocumentViewModel, localeService: LocaleService): DocumentSkeleton;
|
|
21
36
|
getViewModel(): DocumentViewModel;
|
|
22
|
-
calculate(bounds?:
|
|
37
|
+
calculate(bounds?: IViewportBound): void;
|
|
23
38
|
getSkeletonData(): Nullable<IDocumentSkeletonCached>;
|
|
24
39
|
getActualSize(): {
|
|
25
40
|
actualWidth: number;
|
|
@@ -68,4 +83,3 @@ export declare class DocumentSkeleton extends Skeleton {
|
|
|
68
83
|
private _getNullSke;
|
|
69
84
|
private _findNodeIterator;
|
|
70
85
|
}
|
|
71
|
-
//# sourceMappingURL=doc-skeleton.d.ts.map
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
2
16
|
import type { Nullable } from '@univerjs/core';
|
|
3
17
|
import { Observable } from '@univerjs/core';
|
|
4
18
|
import type { IDocumentSkeletonPage } from '../../basics/i-document-skeleton-cached';
|
|
5
19
|
import { PageLayoutType } from '../../basics/i-document-skeleton-cached';
|
|
6
20
|
import type { Transform } from '../../basics/transform';
|
|
7
|
-
import type {
|
|
21
|
+
import type { IViewportBound } from '../../basics/vector2';
|
|
8
22
|
import type { Scene } from '../../scene';
|
|
9
23
|
import { DocComponent } from './doc-component';
|
|
10
24
|
import type { DocumentSkeleton } from './doc-skeleton';
|
|
@@ -14,7 +28,6 @@ interface IPageMarginLayout {
|
|
|
14
28
|
pageLayoutType?: PageLayoutType;
|
|
15
29
|
}
|
|
16
30
|
export interface IDocumentsConfig extends IPageMarginLayout {
|
|
17
|
-
allowCache?: boolean;
|
|
18
31
|
hasEditor?: boolean;
|
|
19
32
|
}
|
|
20
33
|
export interface IPageRenderConfig {
|
|
@@ -29,7 +42,6 @@ export interface IDocumentOffsetConfig extends IPageMarginLayout {
|
|
|
29
42
|
documentTransform: Transform;
|
|
30
43
|
}
|
|
31
44
|
export declare class Documents extends DocComponent {
|
|
32
|
-
isCalculateSkeleton: boolean;
|
|
33
45
|
onPageRenderObservable: Observable<IPageRenderConfig>;
|
|
34
46
|
docsLeft: number;
|
|
35
47
|
docsTop: number;
|
|
@@ -41,9 +53,9 @@ export declare class Documents extends DocComponent {
|
|
|
41
53
|
setConfig(config?: IDocumentsConfig): void;
|
|
42
54
|
getOffsetConfig(): IDocumentOffsetConfig;
|
|
43
55
|
getEngine(): Nullable<import("../../thin-engine").ThinEngine<Scene>>;
|
|
44
|
-
draw(ctx: CanvasRenderingContext2D, bounds?:
|
|
56
|
+
draw(ctx: CanvasRenderingContext2D, bounds?: IViewportBound): void;
|
|
45
57
|
changeSkeleton(newSkeleton: DocumentSkeleton): this;
|
|
46
|
-
protected _draw(ctx: CanvasRenderingContext2D, bounds?:
|
|
58
|
+
protected _draw(ctx: CanvasRenderingContext2D, bounds?: IViewportBound): void;
|
|
47
59
|
private _horizontalHandler;
|
|
48
60
|
private _verticalHandler;
|
|
49
61
|
private _startRotation;
|
|
@@ -51,4 +63,3 @@ export declare class Documents extends DocComponent {
|
|
|
51
63
|
private _initialDefaultExtension;
|
|
52
64
|
}
|
|
53
65
|
export {};
|
|
54
|
-
//# sourceMappingURL=document.d.ts.map
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
import type { IScale } from '@univerjs/core';
|
|
2
17
|
import type { IDocumentSkeletonSpan } from '../../../basics/i-document-skeleton-cached';
|
|
3
18
|
import { docExtension } from '../doc-extension';
|
|
@@ -8,4 +23,3 @@ export declare class Background extends docExtension {
|
|
|
8
23
|
draw(ctx: CanvasRenderingContext2D, parentScale: IScale, span: IDocumentSkeletonSpan): void;
|
|
9
24
|
clearCache(): void;
|
|
10
25
|
}
|
|
11
|
-
//# sourceMappingURL=background.d.ts.map
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
import type { IScale } from '@univerjs/core';
|
|
2
17
|
import type { IDocumentSkeletonSpan } from '../../../basics/i-document-skeleton-cached';
|
|
3
18
|
import { docExtension } from '../doc-extension';
|
|
@@ -10,4 +25,3 @@ export declare class Border extends docExtension {
|
|
|
10
25
|
clearCache(): void;
|
|
11
26
|
private _createBorderCache;
|
|
12
27
|
}
|
|
13
|
-
//# sourceMappingURL=border.d.ts.map
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
import type { IScale } from '@univerjs/core';
|
|
2
17
|
import type { IDocumentSkeletonSpan } from '../../../basics/i-document-skeleton-cached';
|
|
3
18
|
import { docExtension } from '../doc-extension';
|
|
@@ -7,6 +22,6 @@ export declare class FontAndBaseLine extends docExtension {
|
|
|
7
22
|
private _preFontString;
|
|
8
23
|
private _preFontColor;
|
|
9
24
|
draw(ctx: CanvasRenderingContext2D, parentScale: IScale, span: IDocumentSkeletonSpan): void;
|
|
25
|
+
private _fillText;
|
|
10
26
|
clearCache(): void;
|
|
11
27
|
}
|
|
12
|
-
//# sourceMappingURL=font-and-base-line.d.ts.map
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
export * from './background';
|
|
2
17
|
export * from './border';
|
|
3
18
|
export * from './font-and-base-line';
|
|
4
19
|
export * from './line';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
import type { IScale } from '@univerjs/core';
|
|
2
17
|
import type { IDocumentSkeletonSpan } from '../../../basics/i-document-skeleton-cached';
|
|
3
18
|
import { docExtension } from '../doc-extension';
|
|
@@ -7,7 +22,7 @@ export declare class Line extends docExtension {
|
|
|
7
22
|
private _preBackgroundColor;
|
|
8
23
|
draw(ctx: CanvasRenderingContext2D, parentScale: IScale, span: IDocumentSkeletonSpan): void;
|
|
9
24
|
clearCache(): void;
|
|
25
|
+
private _drawLine;
|
|
10
26
|
private _setLineType;
|
|
11
27
|
private _getLineWidth;
|
|
12
28
|
}
|
|
13
|
-
//# sourceMappingURL=line.d.ts.map
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
export declare class DocumentHorizonBar {
|
|
2
17
|
}
|
|
3
|
-
//# sourceMappingURL=horizon-bar.d.ts.map
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
export * from './block';
|
|
2
17
|
export * from './common';
|
|
3
18
|
export * from './doc-skeleton';
|
|
@@ -5,4 +20,3 @@ export * from './document';
|
|
|
5
20
|
export * from './horizon-bar';
|
|
6
21
|
export * from './text-selection-render-manager';
|
|
7
22
|
export * from './vertical-bar';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
import type { Nullable } from '@univerjs/core';
|
|
2
17
|
import { RxDisposable } from '@univerjs/core';
|
|
3
18
|
import type { Observable } from 'rxjs';
|
|
4
19
|
import type { IMouseEvent, IPointerEvent } from '../../basics/i-events';
|
|
5
20
|
import type { INodePosition } from '../../basics/interfaces';
|
|
6
|
-
import type { ITextRangeWithStyle, ITextSelectionStyle, RANGE_DIRECTION } from '../../basics/range';
|
|
21
|
+
import type { ISuccinctTextRangeParam, ITextRangeWithStyle, ITextSelectionStyle, RANGE_DIRECTION } from '../../basics/range';
|
|
7
22
|
import type { Engine } from '../../engine';
|
|
8
23
|
import type { Scene } from '../../scene';
|
|
9
24
|
import type { Viewport } from '../../viewport';
|
|
@@ -19,6 +34,21 @@ interface IAddTextRangesConfig {
|
|
|
19
34
|
skeleton: DocumentSkeleton;
|
|
20
35
|
documentOffsetConfig: IDocumentOffsetConfig;
|
|
21
36
|
}
|
|
37
|
+
export interface ITextSelectionInnerParam {
|
|
38
|
+
textRanges: TextRange[];
|
|
39
|
+
segmentId: string;
|
|
40
|
+
style: ITextSelectionStyle;
|
|
41
|
+
}
|
|
42
|
+
export interface IActiveTextRange {
|
|
43
|
+
startOffset: number;
|
|
44
|
+
endOffset: number;
|
|
45
|
+
collapsed: boolean;
|
|
46
|
+
startNodePosition: Nullable<INodePosition>;
|
|
47
|
+
endNodePosition: Nullable<INodePosition>;
|
|
48
|
+
direction: RANGE_DIRECTION;
|
|
49
|
+
segmentId: string;
|
|
50
|
+
style: ITextSelectionStyle;
|
|
51
|
+
}
|
|
22
52
|
export interface ITextSelectionRenderManager {
|
|
23
53
|
readonly onInputBefore$: Observable<Nullable<IEditorInputConfig>>;
|
|
24
54
|
readonly onKeydown$: Observable<Nullable<IEditorInputConfig>>;
|
|
@@ -28,16 +58,16 @@ export interface ITextSelectionRenderManager {
|
|
|
28
58
|
readonly onCompositionend$: Observable<Nullable<IEditorInputConfig>>;
|
|
29
59
|
readonly onSelectionStart$: Observable<Nullable<INodePosition>>;
|
|
30
60
|
readonly onPaste$: Observable<Nullable<IEditorInputConfig>>;
|
|
31
|
-
readonly
|
|
61
|
+
readonly textSelectionInner$: Observable<Nullable<ITextSelectionInnerParam>>;
|
|
62
|
+
__getEditorContainer(): HTMLElement;
|
|
32
63
|
getViewPort(): Viewport;
|
|
33
64
|
enableSelection(): void;
|
|
34
65
|
disableSelection(): void;
|
|
35
66
|
setSegment(id: string): void;
|
|
36
67
|
setStyle(style: ITextSelectionStyle): void;
|
|
37
68
|
resetStyle(): void;
|
|
38
|
-
getAllTextRanges(): TextRange[];
|
|
39
69
|
removeAllTextRanges(): void;
|
|
40
|
-
addTextRanges(ranges:
|
|
70
|
+
addTextRanges(ranges: ISuccinctTextRangeParam[], config?: IAddTextRangesConfig): void;
|
|
41
71
|
sync(): void;
|
|
42
72
|
activate(x: number, y: number): void;
|
|
43
73
|
focus(): void;
|
|
@@ -45,11 +75,6 @@ export interface ITextSelectionRenderManager {
|
|
|
45
75
|
deactivate(): void;
|
|
46
76
|
changeRuntime(docSkeleton: DocumentSkeleton, scene: Scene, viewport?: Nullable<Viewport>, documentOffsetConfig?: IDocumentOffsetConfig): void;
|
|
47
77
|
dispose(): void;
|
|
48
|
-
getActiveRange(): Nullable<ITextRangeWithStyle & {
|
|
49
|
-
startNodePosition: Nullable<INodePosition>;
|
|
50
|
-
endNodePosition: Nullable<INodePosition>;
|
|
51
|
-
direction: RANGE_DIRECTION;
|
|
52
|
-
}>;
|
|
53
78
|
handleDblClick(evt: IPointerEvent | IMouseEvent, documentOffsetConfig: IDocumentOffsetConfig, viewport: Nullable<Viewport>): void;
|
|
54
79
|
handleTripleClick(evt: IPointerEvent | IMouseEvent, documentOffsetConfig: IDocumentOffsetConfig, viewport: Nullable<Viewport>): void;
|
|
55
80
|
eventTrigger(evt: IPointerEvent | IMouseEvent, documentOffsetConfig: IDocumentOffsetConfig, viewport: Nullable<Viewport>): void;
|
|
@@ -79,8 +104,8 @@ export declare class TextSelectionRenderManager extends RxDisposable implements
|
|
|
79
104
|
readonly onSelectionStart$: Observable<Nullable<INodePosition>>;
|
|
80
105
|
private readonly _onPaste$;
|
|
81
106
|
readonly onPaste$: Observable<Nullable<IEditorInputConfig>>;
|
|
82
|
-
private readonly
|
|
83
|
-
readonly
|
|
107
|
+
private readonly _textSelectionInner$;
|
|
108
|
+
readonly textSelectionInner$: Observable<Nullable<ITextSelectionInnerParam>>;
|
|
84
109
|
private _container;
|
|
85
110
|
private _inputParent;
|
|
86
111
|
private _input;
|
|
@@ -98,24 +123,14 @@ export declare class TextSelectionRenderManager extends RxDisposable implements
|
|
|
98
123
|
private _isIMEInputApply;
|
|
99
124
|
private _activeViewport;
|
|
100
125
|
constructor(_docSkeleton?: Nullable<DocumentSkeleton>, _scene?: Nullable<Scene>, viewport?: Nullable<Viewport>);
|
|
126
|
+
__getEditorContainer(): HTMLElement;
|
|
101
127
|
getViewPort(): Viewport;
|
|
102
128
|
setSegment(id: string): void;
|
|
103
129
|
setStyle(style?: ITextSelectionStyle): void;
|
|
104
130
|
resetStyle(): void;
|
|
105
131
|
enableSelection(): void;
|
|
106
132
|
disableSelection(): void;
|
|
107
|
-
|
|
108
|
-
startOffset: number;
|
|
109
|
-
endOffset: number;
|
|
110
|
-
collapsed: boolean;
|
|
111
|
-
startNodePosition: INodePosition | null;
|
|
112
|
-
endNodePosition: Nullable<INodePosition>;
|
|
113
|
-
direction: RANGE_DIRECTION;
|
|
114
|
-
segmentId: string;
|
|
115
|
-
style: ITextSelectionStyle;
|
|
116
|
-
} | null;
|
|
117
|
-
getAllTextRanges(): TextRange[];
|
|
118
|
-
addTextRanges(ranges: ITextRangeWithStyle[], config?: IAddTextRangesConfig): void;
|
|
133
|
+
addTextRanges(ranges: ISuccinctTextRangeParam[]): void;
|
|
119
134
|
sync(): void;
|
|
120
135
|
activate(x: number, y: number): void;
|
|
121
136
|
focus(): void;
|
|
@@ -126,6 +141,8 @@ export declare class TextSelectionRenderManager extends RxDisposable implements
|
|
|
126
141
|
handleTripleClick(evt: IPointerEvent | IMouseEvent, documentOffsetConfig: IDocumentOffsetConfig, viewportMain: Nullable<Viewport>): void;
|
|
127
142
|
eventTrigger(evt: IPointerEvent | IMouseEvent, documentOffsetConfig: IDocumentOffsetConfig, viewportMain: Nullable<Viewport>): void;
|
|
128
143
|
removeAllTextRanges(): void;
|
|
144
|
+
private _getAllTextRanges;
|
|
145
|
+
private _getActiveRange;
|
|
129
146
|
private _add;
|
|
130
147
|
private _getActiveRangeInstance;
|
|
131
148
|
dispose(): void;
|
|
@@ -141,7 +158,7 @@ export declare class TextSelectionRenderManager extends RxDisposable implements
|
|
|
141
158
|
private _isEmpty;
|
|
142
159
|
private _getCanvasOffset;
|
|
143
160
|
private _scrollToSelection;
|
|
144
|
-
private
|
|
161
|
+
private _updateDomCursorPositionAndSize;
|
|
145
162
|
private _moving;
|
|
146
163
|
private _attachScrollEvent;
|
|
147
164
|
private _initInputEvents;
|
|
@@ -153,4 +170,3 @@ export declare class TextSelectionRenderManager extends RxDisposable implements
|
|
|
153
170
|
}
|
|
154
171
|
export declare const ITextSelectionRenderManager: import("@wendellhu/redi").IdentifierDecorator<TextSelectionRenderManager>;
|
|
155
172
|
export {};
|
|
156
|
-
//# sourceMappingURL=text-selection-render-manager.d.ts.map
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
export declare class DocumentVerticalBar {
|
|
2
17
|
}
|
|
3
|
-
//# sourceMappingURL=vertical-bar.d.ts.map
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
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
|
+
*/
|
|
1
16
|
import type { Nullable } from '@univerjs/core';
|
|
2
17
|
import { DataStreamTreeNodeType } from '@univerjs/core';
|
|
3
18
|
export declare class DataStreamTreeNode {
|
|
@@ -36,4 +51,3 @@ export declare class DataStreamTreeNode {
|
|
|
36
51
|
private _addIndexForBlock;
|
|
37
52
|
private _resetBlocks;
|
|
38
53
|
}
|
|
39
|
-
//# sourceMappingURL=data-stream-tree-node.d.ts.map
|