@univerjs/engine-render 0.1.4 → 0.1.6
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 +2 -2
- package/lib/es/index.js +3042 -2847
- package/lib/types/base-object.d.ts +7 -23
- package/lib/types/basics/cell-data.d.ts +2 -16
- package/lib/types/basics/document-node-tools.d.ts +4 -18
- package/lib/types/basics/draw.d.ts +5 -20
- package/lib/types/basics/font-cache.d.ts +4 -18
- package/lib/types/basics/i-document-skeleton-cached.d.ts +2 -16
- package/lib/types/basics/i-events.d.ts +2 -16
- package/lib/types/basics/interfaces.d.ts +5 -19
- package/lib/types/basics/path2.d.ts +2 -16
- package/lib/types/basics/position.d.ts +3 -17
- package/lib/types/basics/quick-event.d.ts +3 -17
- package/lib/types/basics/range.d.ts +2 -16
- package/lib/types/basics/text-rotation.d.ts +2 -16
- package/lib/types/basics/tools.d.ts +6 -20
- package/lib/types/basics/transform.d.ts +3 -17
- package/lib/types/basics/vector2.d.ts +2 -16
- package/lib/types/basics/viewport-subtract.d.ts +2 -16
- package/lib/types/canvas.d.ts +1 -15
- package/lib/types/components/component.d.ts +5 -19
- package/lib/types/components/docs/doc-component.d.ts +8 -23
- package/lib/types/components/docs/doc-extension.d.ts +3 -17
- package/lib/types/components/docs/document.d.ts +9 -26
- package/lib/types/components/docs/extensions/background.d.ts +4 -18
- package/lib/types/components/docs/extensions/border.d.ts +4 -18
- package/lib/types/components/docs/extensions/font-and-base-line.d.ts +4 -18
- package/lib/types/components/docs/extensions/line.d.ts +4 -18
- package/lib/types/components/docs/layout/block/paragraph/bullet-ruler.d.ts +1 -15
- package/lib/types/components/docs/layout/block/paragraph/bullet.d.ts +3 -17
- package/lib/types/components/docs/layout/block/paragraph/inline-drawing.d.ts +4 -18
- package/lib/types/components/docs/layout/block/paragraph/language-ruler.d.ts +9 -23
- package/lib/types/components/docs/layout/block/paragraph/layout-ruler.d.ts +3 -17
- package/lib/types/components/docs/layout/block/paragraph/layout.d.ts +5 -19
- package/lib/types/components/docs/layout/block/paragraph/line-adjustment.d.ts +3 -17
- package/lib/types/components/docs/layout/block/paragraph/linebreaking.d.ts +6 -20
- package/lib/types/components/docs/layout/block/paragraph/shaping.d.ts +6 -20
- package/lib/types/components/docs/layout/block/section.d.ts +5 -19
- package/lib/types/components/docs/layout/doc-skeleton.d.ts +7 -22
- package/lib/types/components/docs/layout/linebreak/extensions/tab-linebreak-extension.d.ts +2 -16
- package/lib/types/components/docs/layout/linebreak/linebreaker.d.ts +2 -16
- package/lib/types/components/docs/layout/model/column.d.ts +3 -18
- package/lib/types/components/docs/layout/model/glyph.d.ts +3 -18
- package/lib/types/components/docs/layout/model/line.d.ts +2 -16
- package/lib/types/components/docs/layout/model/page.d.ts +3 -18
- package/lib/types/components/docs/layout/model/section.d.ts +3 -18
- package/lib/types/components/docs/layout/tools.d.ts +7 -22
- package/lib/types/components/docs/liquid.d.ts +2 -17
- package/lib/types/components/docs/text-selection/convert-cursor.d.ts +6 -20
- package/lib/types/components/docs/text-selection/text-range.d.ts +10 -25
- package/lib/types/components/docs/text-selection/text-selection-render-manager.d.ts +12 -27
- package/lib/types/components/docs/view-model/data-stream-tree-node.d.ts +2 -17
- package/lib/types/components/docs/view-model/document-view-model.d.ts +8 -23
- package/lib/types/components/extension.d.ts +5 -20
- package/lib/types/components/sheets/column-header.d.ts +5 -19
- package/lib/types/components/sheets/extensions/background.d.ts +4 -18
- package/lib/types/components/sheets/extensions/border.d.ts +4 -18
- package/lib/types/components/sheets/extensions/column-header-layout.d.ts +4 -18
- package/lib/types/components/sheets/extensions/custom.d.ts +10 -0
- package/lib/types/components/sheets/extensions/font.d.ts +4 -18
- package/lib/types/components/sheets/extensions/index.d.ts +2 -0
- package/lib/types/components/sheets/extensions/marker.d.ts +10 -0
- package/lib/types/components/sheets/extensions/row-header-layout.d.ts +4 -18
- package/lib/types/components/sheets/extensions/sheet-extension.d.ts +4 -18
- package/lib/types/components/sheets/interfaces.d.ts +4 -18
- package/lib/types/components/sheets/row-header.d.ts +5 -19
- package/lib/types/components/sheets/sheet-component.d.ts +6 -20
- package/lib/types/components/sheets/sheet-skeleton.d.ts +8 -23
- package/lib/types/components/sheets/spreadsheet.d.ts +8 -22
- package/lib/types/components/skeleton.d.ts +2 -16
- package/lib/types/components/slides/slide.d.ts +5 -20
- package/lib/types/custom/custom-object.d.ts +3 -17
- package/lib/types/engine.d.ts +7 -19
- package/lib/types/group.d.ts +4 -19
- package/lib/types/index.d.ts +1 -0
- package/lib/types/layer.d.ts +4 -18
- package/lib/types/render-engine.d.ts +4 -18
- package/lib/types/render-manager.service.d.ts +9 -23
- package/lib/types/scene-viewer.d.ts +7 -21
- package/lib/types/scene.d.ts +14 -29
- package/lib/types/scene.input-manager.d.ts +3 -17
- package/lib/types/scene.transformer.d.ts +5 -20
- package/lib/types/scroll-timer.d.ts +4 -18
- package/lib/types/services/object-transform-manager.service.d.ts +4 -18
- package/lib/types/shape/base-scroll-bar.d.ts +7 -21
- package/lib/types/shape/checkbox.d.ts +17 -0
- package/lib/types/shape/circle.d.ts +3 -18
- package/lib/types/shape/dropdown-item.d.ts +12 -0
- package/lib/types/shape/index.d.ts +1 -0
- package/lib/types/shape/path.d.ts +3 -18
- package/lib/types/shape/picture.d.ts +4 -19
- package/lib/types/shape/rect.d.ts +3 -18
- package/lib/types/shape/regular-polygon.d.ts +5 -20
- package/lib/types/shape/rich-text.d.ts +4 -18
- package/lib/types/shape/scroll-bar.d.ts +6 -21
- package/lib/types/shape/shape.d.ts +5 -19
- package/lib/types/shape/text.d.ts +7 -0
- package/lib/types/thin-engine.d.ts +6 -21
- package/lib/types/thin-scene.d.ts +8 -24
- package/lib/types/viewport.d.ts +9 -25
- package/lib/umd/index.js +2 -2
- package/package.json +6 -6
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { EventState, IKeyValue, Nullable, Observer } from '@univerjs/core';
|
|
17
|
-
import { Observable } from '@univerjs/core';
|
|
18
|
-
import type { EVENT_TYPE } from './basics/const';
|
|
19
|
-
import { CURSOR_TYPE, RENDER_CLASS_TYPE } from './basics/const';
|
|
20
|
-
import type { IMouseEvent, IPointerEvent, IWheelEvent } from './basics/i-events';
|
|
21
|
-
import type { IObjectFullState, ITransformChangeState } from './basics/interfaces';
|
|
1
|
+
import { UniverRenderingContext } from './context';
|
|
2
|
+
import { IViewportBound, Vector2 } from './basics/vector2';
|
|
22
3
|
import { Transform } from './basics/transform';
|
|
23
|
-
import
|
|
24
|
-
import
|
|
4
|
+
import { IObjectFullState, ITransformChangeState } from './basics/interfaces';
|
|
5
|
+
import { IMouseEvent, IPointerEvent, IWheelEvent } from './basics/i-events';
|
|
6
|
+
import { EVENT_TYPE, CURSOR_TYPE, RENDER_CLASS_TYPE } from './basics/const';
|
|
7
|
+
import { EventState, IKeyValue, Nullable, Observer, Observable } from '@univerjs/core';
|
|
8
|
+
|
|
25
9
|
export declare const BASE_OBJECT_ARRAY: string[];
|
|
26
10
|
export declare abstract class BaseObject {
|
|
27
11
|
groupKey?: string;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { ICellData, IStyleData } from '@univerjs/core';
|
|
1
|
+
import { ICellData, IStyleData } from '@univerjs/core';
|
|
2
|
+
|
|
17
3
|
export interface ITempCellData extends ICellData {
|
|
18
4
|
style: IStyleData;
|
|
19
5
|
prefix: string[];
|
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { IDocumentBody, Nullable } from '@univerjs/core';
|
|
17
|
-
import type { IDocumentSkeletonGlyph } from './i-document-skeleton-cached';
|
|
1
|
+
import { IDocumentSkeletonGlyph } from './i-document-skeleton-cached';
|
|
2
|
+
import { IDocumentBody, Nullable } from '@univerjs/core';
|
|
3
|
+
|
|
18
4
|
export declare function hasListGlyph(glyph: Nullable<IDocumentSkeletonGlyph>): boolean;
|
|
19
5
|
export declare function isIndentByGlyph(glyph: Nullable<IDocumentSkeletonGlyph>, body?: IDocumentBody): boolean;
|
|
20
6
|
export declare function isLastGlyph(glyph: Nullable<IDocumentSkeletonGlyph>): boolean;
|
|
21
7
|
export declare function isFirstGlyph(glyph: Nullable<IDocumentSkeletonGlyph>): boolean;
|
|
22
|
-
export declare function getParagraphByGlyph(glyph: Nullable<IDocumentSkeletonGlyph>, body?: IDocumentBody): import(
|
|
8
|
+
export declare function getParagraphByGlyph(glyph: Nullable<IDocumentSkeletonGlyph>, body?: IDocumentBody): import('@univerjs/core').IParagraph | undefined;
|
|
23
9
|
export declare function isPlaceholderOrSpace(glyph: Nullable<IDocumentSkeletonGlyph>): boolean;
|
|
24
10
|
export declare function isSameLine(glyph1: Nullable<IDocumentSkeletonGlyph>, glyph2: Nullable<IDocumentSkeletonGlyph>): boolean;
|
|
@@ -1,24 +1,9 @@
|
|
|
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 { IPosition } from '@univerjs/core';
|
|
17
|
-
import { BorderStyleTypes } from '@univerjs/core';
|
|
18
|
-
import type { UniverRenderingContext } from '../context';
|
|
19
|
-
import { BORDER_TYPE, ORIENTATION_TYPE } from './const';
|
|
20
|
-
import type { IDocumentSkeletonLine } from './i-document-skeleton-cached';
|
|
21
1
|
import { Vector2 } from './vector2';
|
|
2
|
+
import { IDocumentSkeletonLine } from './i-document-skeleton-cached';
|
|
3
|
+
import { BORDER_TYPE, ORIENTATION_TYPE } from './const';
|
|
4
|
+
import { UniverRenderingContext } from '../context';
|
|
5
|
+
import { IPosition, BorderStyleTypes } from '@univerjs/core';
|
|
6
|
+
|
|
22
7
|
export interface IContext2D extends CanvasRenderingContext2D {
|
|
23
8
|
webkitBackingStorePixelRatio: number;
|
|
24
9
|
mozBackingStorePixelRatio: number;
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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';
|
|
17
|
-
import type { IDocumentSkeletonBoundingBox, IDocumentSkeletonFontStyle } from './i-document-skeleton-cached';
|
|
18
|
-
import type { IMeasureTextCache } from './interfaces';
|
|
1
|
+
import { IMeasureTextCache } from './interfaces';
|
|
2
|
+
import { IDocumentSkeletonBoundingBox, IDocumentSkeletonFontStyle } from './i-document-skeleton-cached';
|
|
3
|
+
import { Nullable } from '@univerjs/core';
|
|
4
|
+
|
|
19
5
|
export declare class FontCache {
|
|
20
6
|
private static _getTextHeightCache;
|
|
21
7
|
private static _context;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { BulletAlignment, ColumnSeparatorType, DataStreamTreeTokenType, IDocumentRenderConfig, IDrawing, IIndentStart, INestingLevel, ITextStyle, PageOrientType } from '@univerjs/core';
|
|
1
|
+
import { BulletAlignment, ColumnSeparatorType, DataStreamTreeTokenType, IDocumentRenderConfig, IDrawing, IIndentStart, INestingLevel, ITextStyle, PageOrientType } from '@univerjs/core';
|
|
2
|
+
|
|
17
3
|
export interface IDocumentSkeletonCached extends ISkeletonResourceReference {
|
|
18
4
|
pages: IDocumentSkeletonPage[];
|
|
19
5
|
left: number;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
+
import { Nullable } from '@univerjs/core';
|
|
2
|
+
|
|
17
3
|
/**
|
|
18
4
|
* Alias type for number that are floats
|
|
19
5
|
*/
|
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 { BooleanNumber, GridType, IDocStyleBase, IDocumentLayout, IOffset, IParagraphStyle, IReferenceSource, IScale, ISectionBreakBase, ISize, ITextStyle, ITransformState, LocaleService } from '@univerjs/core';
|
|
17
|
-
import type { DocumentViewModel } from '../components/docs/view-model/document-view-model';
|
|
18
|
-
import type { IDocumentSkeletonBullet, IDocumentSkeletonDrawing, IDocumentSkeletonDrawingAnchor, IDocumentSkeletonFontStyle, IDocumentSkeletonFooter, IDocumentSkeletonGlyph, IDocumentSkeletonHeader } from './i-document-skeleton-cached';
|
|
19
|
-
import type { Vector2 } from './vector2';
|
|
1
|
+
import { Vector2 } from './vector2';
|
|
2
|
+
import { IDocumentSkeletonBullet, IDocumentSkeletonDrawing, IDocumentSkeletonDrawingAnchor, IDocumentSkeletonFontStyle, IDocumentSkeletonFooter, IDocumentSkeletonGlyph, IDocumentSkeletonHeader } from './i-document-skeleton-cached';
|
|
3
|
+
import { DocumentViewModel } from '../components/docs/view-model/document-view-model';
|
|
4
|
+
import { BooleanNumber, GridType, IDocStyleBase, IDocumentLayout, IOffset, IParagraphStyle, IReferenceSource, IScale, ISectionBreakBase, ISize, ITextStyle, ITransformState, LocaleService } from '@univerjs/core';
|
|
5
|
+
|
|
20
6
|
export interface IObjectFullState extends ITransformState {
|
|
21
7
|
strokeWidth?: number;
|
|
22
8
|
zIndex?: number;
|
|
@@ -1,20 +1,6 @@
|
|
|
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';
|
|
17
1
|
import { Vector2 } from './vector2';
|
|
2
|
+
import { Nullable } from '@univerjs/core';
|
|
3
|
+
|
|
18
4
|
export declare const INITIAL_Path2: Vector2[];
|
|
19
5
|
export declare class Path2 {
|
|
20
6
|
private _lines;
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { BaseObject } from '../base-object';
|
|
17
|
-
import type { IBoundRect } from './vector2';
|
|
1
|
+
import { IBoundRect } from './vector2';
|
|
2
|
+
import { BaseObject } from '../base-object';
|
|
3
|
+
|
|
18
4
|
export declare function getOffsetRectForDom(ele: HTMLElement): {
|
|
19
5
|
top: number;
|
|
20
6
|
left: number;
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { BaseObject } from '../base-object';
|
|
17
|
-
import type { IMouseEvent, IPointerEvent } from './i-events';
|
|
1
|
+
import { IMouseEvent, IPointerEvent } from './i-events';
|
|
2
|
+
import { BaseObject } from '../base-object';
|
|
3
|
+
|
|
18
4
|
export declare function attachObjectHover(o: BaseObject, hoverIn: (o: any, evt: IPointerEvent | IMouseEvent) => void, hoverOut: (o: any, evt: IPointerEvent | IMouseEvent) => void): void;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { ITextRangeParam } from '@univerjs/core';
|
|
1
|
+
import { ITextRangeParam } from '@univerjs/core';
|
|
2
|
+
|
|
17
3
|
export interface ITextSelectionStyle {
|
|
18
4
|
strokeWidth: number;
|
|
19
5
|
stroke: string;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 ITextRotation } from '@univerjs/core';
|
|
1
|
+
import { ITextRotation } from '@univerjs/core';
|
|
2
|
+
|
|
17
3
|
export declare const VERTICAL_ROTATE_ANGLE = 90;
|
|
18
4
|
export declare function convertTextRotation(textRotation?: ITextRotation): {
|
|
19
5
|
centerAngle: number;
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { IRange, IRangeWithCoord, IScale, ISelectionCell, ISelectionCellWithCoord, IStyleBase, LocaleService, Nullable } from '@univerjs/core';
|
|
17
|
-
import type { IBoundRectNoAngle } from './vector2';
|
|
1
|
+
import { IBoundRectNoAngle } from './vector2';
|
|
2
|
+
import { IRange, IRangeWithCoord, IScale, ISelectionCell, ISelectionCellWithCoord, IStyleBase, LocaleService, Nullable } from '@univerjs/core';
|
|
3
|
+
|
|
18
4
|
export declare const getColor: (RgbArray: number[], opacity?: number) => string;
|
|
19
5
|
export declare const toPx: (num: number | string, ReferenceValue: Nullable<number>) => number;
|
|
20
6
|
/**
|
|
@@ -108,9 +94,9 @@ export declare function mergeInfoOffset(mergeInfo: IRangeWithCoord, offsetX: num
|
|
|
108
94
|
endY: number;
|
|
109
95
|
startColumn: number;
|
|
110
96
|
endColumn: number;
|
|
111
|
-
rangeType?: import(
|
|
112
|
-
startAbsoluteRefType?: import(
|
|
113
|
-
endAbsoluteRefType?: import(
|
|
97
|
+
rangeType?: import('@univerjs/core').RANGE_TYPE | undefined;
|
|
98
|
+
startAbsoluteRefType?: import('@univerjs/core').AbsoluteRefType | undefined;
|
|
99
|
+
endAbsoluteRefType?: import('@univerjs/core').AbsoluteRefType | undefined;
|
|
114
100
|
startRow: number;
|
|
115
101
|
endRow: number;
|
|
116
102
|
};
|
|
@@ -1,21 +1,7 @@
|
|
|
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 { ITransformState } from '@univerjs/core';
|
|
17
|
-
import type { IRect } from './interfaces';
|
|
18
1
|
import { Vector2 } from './vector2';
|
|
2
|
+
import { IRect } from './interfaces';
|
|
3
|
+
import { ITransformState } from '@univerjs/core';
|
|
4
|
+
|
|
19
5
|
export declare const INITIAL_MATRIX: number[];
|
|
20
6
|
export declare class Transform {
|
|
21
7
|
dirty: boolean;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { DeepImmutable, FloatArray } from './i-events';
|
|
1
|
+
import { DeepImmutable, FloatArray } from './i-events';
|
|
2
|
+
|
|
17
3
|
export interface IPoint {
|
|
18
4
|
x: number;
|
|
19
5
|
y: number;
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { IRange } from '@univerjs/core';
|
|
1
|
+
import { IRange } from '@univerjs/core';
|
|
2
|
+
|
|
17
3
|
export declare function subtractViewportRange(range1: IRange, range2: IRange): IRange[];
|
package/lib/types/canvas.d.ts
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
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
1
|
import { UniverRenderingContext } from './context';
|
|
2
|
+
|
|
17
3
|
/**
|
|
18
4
|
* canvas render mode
|
|
19
5
|
*/
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { IDisposable } from '@wendellhu/redi';
|
|
1
|
+
import { ComponentExtension } from './extension';
|
|
2
|
+
import { UniverRenderingContext } from '../context';
|
|
3
|
+
import { IViewportBound } from '../basics/vector2';
|
|
17
4
|
import { BaseObject } from '../base-object';
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
import type { ComponentExtension } from './extension';
|
|
5
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
6
|
+
|
|
21
7
|
export declare class RenderComponent<T, U, V> extends BaseObject {
|
|
22
8
|
private _extensions;
|
|
23
9
|
get extensions(): Map<string, ComponentExtension<T, U, V>>;
|
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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';
|
|
17
|
-
import type { IDocumentSkeletonGlyph, IDocumentSkeletonLine } from '../../basics/i-document-skeleton-cached';
|
|
18
|
-
import { PageLayoutType } from '../../basics/i-document-skeleton-cached';
|
|
19
|
-
import type { INodeInfo } from '../../basics/interfaces';
|
|
20
|
-
import type { IBoundRectNoAngle, IViewportBound } from '../../basics/vector2';
|
|
21
|
-
import type { UniverRenderingContext } from '../../context';
|
|
1
|
+
import { DocumentSkeleton } from './layout/doc-skeleton';
|
|
2
|
+
import { DOCS_EXTENSION_TYPE } from './doc-extension';
|
|
22
3
|
import { RenderComponent } from '../component';
|
|
23
|
-
import
|
|
24
|
-
import
|
|
4
|
+
import { UniverRenderingContext } from '../../context';
|
|
5
|
+
import { IBoundRectNoAngle, IViewportBound } from '../../basics/vector2';
|
|
6
|
+
import { INodeInfo } from '../../basics/interfaces';
|
|
7
|
+
import { IDocumentSkeletonGlyph, IDocumentSkeletonLine, PageLayoutType } from '../../basics/i-document-skeleton-cached';
|
|
8
|
+
import { Nullable } from '@univerjs/core';
|
|
9
|
+
|
|
25
10
|
export declare class DocComponent extends RenderComponent<IDocumentSkeletonGlyph | IDocumentSkeletonLine, DOCS_EXTENSION_TYPE, IBoundRectNoAngle[]> {
|
|
26
11
|
private _skeleton?;
|
|
27
12
|
pageMarginLeft: number;
|
|
@@ -1,21 +1,7 @@
|
|
|
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 { IDocumentSkeletonGlyph, IDocumentSkeletonLine } from '../../basics/i-document-skeleton-cached';
|
|
17
|
-
import type { IBoundRectNoAngle } from '../../basics/vector2';
|
|
18
1
|
import { ComponentExtension } from '../extension';
|
|
2
|
+
import { IBoundRectNoAngle } from '../../basics/vector2';
|
|
3
|
+
import { IDocumentSkeletonGlyph, IDocumentSkeletonLine } from '../../basics/i-document-skeleton-cached';
|
|
4
|
+
|
|
19
5
|
export declare enum DOCS_EXTENSION_TYPE {
|
|
20
6
|
SPAN = 0,
|
|
21
7
|
LINE = 1
|
|
@@ -1,29 +1,12 @@
|
|
|
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 './extensions';
|
|
17
|
-
import type { Nullable } from '@univerjs/core';
|
|
18
|
-
import { Observable } from '@univerjs/core';
|
|
19
|
-
import type { IDocumentSkeletonPage } from '../../basics/i-document-skeleton-cached';
|
|
20
|
-
import { PageLayoutType } from '../../basics/i-document-skeleton-cached';
|
|
21
|
-
import type { Transform } from '../../basics/transform';
|
|
22
|
-
import type { IViewportBound } from '../../basics/vector2';
|
|
23
|
-
import type { UniverRenderingContext } from '../../context';
|
|
24
|
-
import type { Scene } from '../../scene';
|
|
1
|
+
import { DocumentSkeleton } from './layout/doc-skeleton';
|
|
25
2
|
import { DocComponent } from './doc-component';
|
|
26
|
-
import
|
|
3
|
+
import { Scene } from '../../scene';
|
|
4
|
+
import { UniverRenderingContext } from '../../context';
|
|
5
|
+
import { IViewportBound } from '../../basics/vector2';
|
|
6
|
+
import { Transform } from '../../basics/transform';
|
|
7
|
+
import { IDocumentSkeletonPage, PageLayoutType } from '../../basics/i-document-skeleton-cached';
|
|
8
|
+
import { Nullable, Observable } from '@univerjs/core';
|
|
9
|
+
|
|
27
10
|
interface IPageMarginLayout {
|
|
28
11
|
pageMarginLeft: number;
|
|
29
12
|
pageMarginTop: number;
|
|
@@ -54,7 +37,7 @@ export declare class Documents extends DocComponent {
|
|
|
54
37
|
static create(oKey: string, documentSkeleton?: DocumentSkeleton, config?: IDocumentsConfig): Documents;
|
|
55
38
|
setConfig(config?: IDocumentsConfig): void;
|
|
56
39
|
getOffsetConfig(): IDocumentOffsetConfig;
|
|
57
|
-
getEngine(): Nullable<import(
|
|
40
|
+
getEngine(): Nullable<import('../..').ThinEngine<Scene>>;
|
|
58
41
|
draw(ctx: UniverRenderingContext, bounds?: IViewportBound): void;
|
|
59
42
|
changeSkeleton(newSkeleton: DocumentSkeleton): this;
|
|
60
43
|
protected _draw(ctx: UniverRenderingContext, bounds?: IViewportBound): void;
|
|
@@ -1,22 +1,8 @@
|
|
|
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 { IScale } from '@univerjs/core';
|
|
17
|
-
import type { IDocumentSkeletonGlyph } from '../../../basics/i-document-skeleton-cached';
|
|
18
|
-
import type { UniverRenderingContext } from '../../../context';
|
|
19
1
|
import { docExtension } from '../doc-extension';
|
|
2
|
+
import { UniverRenderingContext } from '../../../context';
|
|
3
|
+
import { IDocumentSkeletonGlyph } from '../../../basics/i-document-skeleton-cached';
|
|
4
|
+
import { IScale } from '@univerjs/core';
|
|
5
|
+
|
|
20
6
|
export declare class Background extends docExtension {
|
|
21
7
|
uKey: string;
|
|
22
8
|
Z_INDEX: number;
|