@univerjs/engine-render 0.1.3 → 0.1.5
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 +10914 -10855
- 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 +10 -24
- 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 +15 -23
- package/lib/types/basics/i-events.d.ts +2 -16
- package/lib/types/basics/interfaces.d.ts +7 -21
- 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 +10 -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 +3 -0
- 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 +10 -25
- package/lib/types/components/docs/doc-extension.d.ts +4 -18
- package/lib/types/components/docs/document.d.ts +10 -26
- package/lib/types/components/docs/extensions/background.d.ts +5 -19
- package/lib/types/components/docs/extensions/border.d.ts +5 -19
- package/lib/types/components/docs/extensions/font-and-base-line.d.ts +5 -19
- package/lib/types/components/docs/extensions/line.d.ts +5 -19
- package/lib/types/components/docs/layout/block/paragraph/bullet-ruler.d.ts +3 -0
- package/lib/types/components/docs/layout/block/paragraph/bullet.d.ts +5 -0
- package/lib/types/components/docs/layout/block/paragraph/inline-drawing.d.ts +5 -0
- package/lib/types/components/docs/layout/block/paragraph/language-ruler.d.ts +21 -0
- package/lib/types/components/docs/layout/block/paragraph/layout-ruler.d.ts +4 -0
- package/lib/types/components/docs/layout/block/paragraph/layout.d.ts +6 -0
- package/lib/types/components/docs/layout/block/paragraph/line-adjustment.d.ts +4 -0
- package/lib/types/components/docs/layout/block/paragraph/linebreaking.d.ts +7 -0
- package/lib/types/components/docs/layout/block/paragraph/shaping.d.ts +11 -0
- package/lib/types/components/docs/layout/block/section.d.ts +10 -0
- package/lib/types/components/docs/{doc-skeleton.d.ts → layout/doc-skeleton.d.ts} +11 -26
- package/lib/types/components/docs/layout/linebreak/extensions/tab-linebreak-extension.d.ts +3 -0
- package/lib/types/components/docs/layout/linebreak/linebreaker.d.ts +27 -0
- package/lib/types/components/docs/layout/model/__test__/glyph.spec.d.ts +16 -0
- package/lib/types/components/docs/layout/model/column.d.ts +4 -0
- package/lib/types/components/docs/layout/model/glyph.d.ts +16 -0
- package/lib/types/components/docs/{common → layout/model}/line.d.ts +2 -16
- package/lib/types/components/docs/layout/model/page.d.ts +4 -0
- package/lib/types/components/docs/layout/model/section.d.ts +5 -0
- package/lib/types/components/docs/{common → layout}/tools.d.ts +10 -25
- package/lib/types/components/docs/{common/liquid.d.ts → liquid.d.ts} +4 -19
- package/lib/types/components/docs/{common → text-selection}/convert-cursor.d.ts +9 -23
- package/lib/types/components/docs/{common → text-selection}/text-range.d.ts +10 -25
- package/lib/types/components/docs/{text-selection-render-manager.d.ts → text-selection/text-selection-render-manager.d.ts} +15 -28
- 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/index.d.ts +0 -1
- 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/font.d.ts +4 -18
- 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/context.d.ts +4 -0
- package/lib/types/custom/custom-object.d.ts +3 -17
- package/lib/types/engine.d.ts +9 -19
- package/lib/types/group.d.ts +4 -19
- package/lib/types/index.d.ts +9 -1
- package/lib/types/layer.d.ts +5 -18
- package/lib/types/render-engine.d.ts +4 -18
- package/lib/types/render-manager.service.d.ts +10 -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/circle.d.ts +3 -18
- 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/thin-engine.d.ts +6 -21
- package/lib/types/thin-scene.d.ts +11 -24
- package/lib/types/viewport.d.ts +9 -28
- package/lib/umd/index.js +2 -2
- package/package.json +10 -9
- package/lib/types/components/docs/block/index.d.ts +0 -18
- package/lib/types/components/docs/block/paragraph/bullet-ruler.d.ts +0 -17
- package/lib/types/components/docs/block/paragraph/bullet.d.ts +0 -19
- package/lib/types/components/docs/block/paragraph/index.d.ts +0 -21
- package/lib/types/components/docs/block/paragraph/inline-drawing.d.ts +0 -19
- package/lib/types/components/docs/block/paragraph/language-ruler.d.ts +0 -35
- package/lib/types/components/docs/block/paragraph/layout-ruler.d.ts +0 -18
- package/lib/types/components/docs/block/paragraph/paragraph.d.ts +0 -20
- package/lib/types/components/docs/block/section.d.ts +0 -24
- package/lib/types/components/docs/common/column.d.ts +0 -19
- package/lib/types/components/docs/common/index.d.ts +0 -24
- package/lib/types/components/docs/common/page.d.ts +0 -19
- package/lib/types/components/docs/common/section.d.ts +0 -20
- package/lib/types/components/docs/common/span.d.ts +0 -28
- package/lib/types/components/docs/index.d.ts +0 -22
- package/lib/types/components/docs/linebreak/extensions/tab-linebreak-extension.d.ts +0 -17
- package/lib/types/components/docs/linebreak/linebreaker.d.ts +0 -41
- /package/lib/types/components/docs/{block → layout/block}/block-error.d.ts +0 -0
- /package/lib/types/components/docs/{linebreak → layout/linebreak}/__tests__/linebreak.spec.d.ts +0 -0
- /package/lib/types/components/docs/{linebreak → layout/linebreak}/break.d.ts +0 -0
- /package/lib/types/components/docs/{linebreak → layout/linebreak}/classes.d.ts +0 -0
- /package/lib/types/components/docs/{linebreak → layout/linebreak}/index.d.ts +0 -0
- /package/lib/types/components/docs/{linebreak → layout/linebreak}/pairs.d.ts +0 -0
- /package/lib/types/components/docs/{linebreak → layout/linebreak}/rule.d.ts +0 -0
- /package/lib/types/components/docs/{linebreak → layout/linebreak}/swap.d.ts +0 -0
- /package/lib/types/components/docs/{linebreak → layout/linebreak}/tiny-inflate.d.ts +0 -0
- /package/lib/types/components/docs/{linebreak → layout/linebreak}/trie-data.d.ts +0 -0
- /package/lib/types/components/docs/{linebreak → layout/linebreak}/unicode-trie.d.ts +0 -0
|
@@ -1,23 +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 { Nullable } from '@univerjs/core';
|
|
17
|
-
import { Observable } from '@univerjs/core';
|
|
18
|
-
import type { UniverRenderingContext } from '../../context';
|
|
19
|
-
import type { Scene } from '../../scene';
|
|
20
1
|
import { SceneViewer } from '../../scene-viewer';
|
|
2
|
+
import { Scene } from '../../scene';
|
|
3
|
+
import { UniverRenderingContext } from '../../context';
|
|
4
|
+
import { Nullable, Observable } from '@univerjs/core';
|
|
5
|
+
|
|
21
6
|
export declare enum SLIDE_NAVIGATION_KEY {
|
|
22
7
|
LEFT = "__slideNavigationLeft__",
|
|
23
8
|
RIGHT = "__slideNavigationRight__"
|
|
@@ -28,7 +13,7 @@ export declare class Slide extends SceneViewer {
|
|
|
28
13
|
activeFirstPage(): void;
|
|
29
14
|
addPage(scene: Scene): void;
|
|
30
15
|
changePage(id?: string): void;
|
|
31
|
-
hasPage(key: string): import(
|
|
16
|
+
hasPage(key: string): import('../../thin-scene').ThinScene | undefined;
|
|
32
17
|
addNavigation(): void;
|
|
33
18
|
removeNavigation(): void;
|
|
34
19
|
enableNav(): void;
|
package/lib/types/context.d.ts
CHANGED
|
@@ -150,6 +150,10 @@ export declare class UniverRenderingContext2D implements CanvasRenderingContext2
|
|
|
150
150
|
* @method
|
|
151
151
|
*/
|
|
152
152
|
closePath(): void;
|
|
153
|
+
/**
|
|
154
|
+
* Chrome hardware acceleration causes canvas stroke to fail to draw lines on Mac.
|
|
155
|
+
*/
|
|
156
|
+
closePathByEnv(): void;
|
|
153
157
|
/**
|
|
154
158
|
* createImageData function.
|
|
155
159
|
* @method
|
|
@@ -1,21 +1,7 @@
|
|
|
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
|
-
*/
|
|
1
|
+
import { UniverRenderingContext } from '../context';
|
|
2
|
+
import { IViewportBound, Vector2 } from '../basics/vector2';
|
|
16
3
|
import { BaseObject } from '../base-object';
|
|
17
|
-
|
|
18
|
-
import type { UniverRenderingContext } from '../context';
|
|
4
|
+
|
|
19
5
|
export declare class CustomObject extends BaseObject {
|
|
20
6
|
private _render;
|
|
21
7
|
private _isHitCustom?;
|
package/lib/types/engine.d.ts
CHANGED
|
@@ -1,23 +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 { Observable } from '@univerjs/core';
|
|
17
|
-
import type { CURSOR_TYPE } from './basics/const';
|
|
18
|
-
import { Canvas, type CanvasRenderMode } from './canvas';
|
|
19
|
-
import type { Scene } from './scene';
|
|
20
1
|
import { ThinEngine } from './thin-engine';
|
|
2
|
+
import { Scene } from './scene';
|
|
3
|
+
import { Canvas, CanvasRenderMode } from './canvas';
|
|
4
|
+
import { CURSOR_TYPE } from './basics/const';
|
|
5
|
+
import { Observable } from '@univerjs/core';
|
|
6
|
+
|
|
21
7
|
export declare class Engine extends ThinEngine<Scene> {
|
|
22
8
|
renderEvenInBackground: boolean;
|
|
23
9
|
/**
|
|
@@ -37,6 +23,7 @@ export declare class Engine extends ThinEngine<Scene> {
|
|
|
37
23
|
private _requestNewFrameHandler;
|
|
38
24
|
private _frameId;
|
|
39
25
|
private _usingSafari;
|
|
26
|
+
private _resizeObserver;
|
|
40
27
|
private _fps;
|
|
41
28
|
private _deltaTime;
|
|
42
29
|
private _performanceMonitor;
|
|
@@ -52,6 +39,8 @@ export declare class Engine extends ThinEngine<Scene> {
|
|
|
52
39
|
private pointer;
|
|
53
40
|
private _mouseId;
|
|
54
41
|
private _isUsingFirefox;
|
|
42
|
+
private _previousWidth;
|
|
43
|
+
private _previousHeight;
|
|
55
44
|
constructor(elemWidth?: number, elemHeight?: number, pixelRatio?: number, mode?: CanvasRenderMode);
|
|
56
45
|
get width(): number;
|
|
57
46
|
get height(): number;
|
|
@@ -113,4 +102,5 @@ export declare class Engine extends ThinEngine<Scene> {
|
|
|
113
102
|
private _getWheelEventName;
|
|
114
103
|
private _getPassive;
|
|
115
104
|
private _getPointerType;
|
|
105
|
+
private _matchMediaHandler;
|
|
116
106
|
}
|
package/lib/types/group.d.ts
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
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
|
-
*/
|
|
1
|
+
import { UniverRenderingContext } from './context';
|
|
2
|
+
import { IViewportBound, Vector2 } from './basics/vector2';
|
|
3
|
+
import { CURSOR_TYPE, RENDER_CLASS_TYPE } from './basics/const';
|
|
16
4
|
import { BaseObject } from './base-object';
|
|
17
|
-
|
|
18
|
-
import { RENDER_CLASS_TYPE } from './basics/const';
|
|
19
|
-
import type { IViewportBound, Vector2 } from './basics/vector2';
|
|
20
|
-
import type { UniverRenderingContext } from './context';
|
|
5
|
+
|
|
21
6
|
export declare class Group extends BaseObject {
|
|
22
7
|
private _objects;
|
|
23
8
|
constructor(key?: string, ...objects: BaseObject[]);
|
package/lib/types/index.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export * from './base-object';
|
|
|
17
17
|
export * from './basics';
|
|
18
18
|
export * from './canvas';
|
|
19
19
|
export * from './components';
|
|
20
|
-
export { DocumentViewModel } from './components/docs/view-model/document-view-model';
|
|
21
20
|
export * from './context';
|
|
22
21
|
export * from './custom';
|
|
23
22
|
export * from './engine';
|
|
@@ -30,3 +29,12 @@ export * from './scene-viewer';
|
|
|
30
29
|
export * from './scroll-timer';
|
|
31
30
|
export * from './shape';
|
|
32
31
|
export * from './viewport';
|
|
32
|
+
export { DocumentViewModel } from './components/docs/view-model/document-view-model';
|
|
33
|
+
export { getAnchorBounding, TEXT_RANGE_LAYER_INDEX, TextRange } from './components/docs/text-selection/text-range';
|
|
34
|
+
export { NodePositionConvertToCursor } from './components/docs/text-selection/convert-cursor';
|
|
35
|
+
export { Liquid } from './components/docs/liquid';
|
|
36
|
+
export { ITextSelectionRenderManager, TextSelectionRenderManager, getCanvasOffsetByEngine, } from './components/docs/text-selection/text-selection-render-manager';
|
|
37
|
+
export type { IActiveTextRange, IEditorInputConfig, ITextSelectionInnerParam } from './components/docs/text-selection/text-selection-render-manager';
|
|
38
|
+
export { Documents } from './components/docs/document';
|
|
39
|
+
export type { IPageRenderConfig } from './components/docs/document';
|
|
40
|
+
export { DocumentSkeleton } from './components/docs/layout/doc-skeleton';
|
package/lib/types/layer.d.ts
CHANGED
|
@@ -1,22 +1,8 @@
|
|
|
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 { Disposable } from '@univerjs/core';
|
|
1
|
+
import { ThinScene } from './thin-scene';
|
|
2
|
+
import { UniverRenderingContext } from './context';
|
|
17
3
|
import { BaseObject } from './base-object';
|
|
18
|
-
import
|
|
19
|
-
|
|
4
|
+
import { Disposable } from '@univerjs/core';
|
|
5
|
+
|
|
20
6
|
export declare class Layer extends Disposable {
|
|
21
7
|
private _scene;
|
|
22
8
|
private _zIndex;
|
|
@@ -40,6 +26,7 @@ export declare class Layer extends Disposable {
|
|
|
40
26
|
makeDirty(state?: boolean): this;
|
|
41
27
|
isDirty(): boolean;
|
|
42
28
|
render(parentCtx?: UniverRenderingContext, isMaxLayer?: boolean): this;
|
|
29
|
+
private _layerBehavior;
|
|
43
30
|
private _initialCacheCanvas;
|
|
44
31
|
private _draw;
|
|
45
32
|
private _applyCache;
|
|
@@ -1,25 +1,11 @@
|
|
|
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 { Plugin, PluginType } from '@univerjs/core';
|
|
17
|
-
import { Injector } from '@wendellhu/redi';
|
|
18
1
|
import { Engine } from './engine';
|
|
2
|
+
import { Injector } from '@wendellhu/redi';
|
|
3
|
+
import { Plugin, PluginType } from '@univerjs/core';
|
|
4
|
+
|
|
19
5
|
/**
|
|
20
6
|
* The global rendering engine.
|
|
21
7
|
*/
|
|
22
|
-
export declare const IRenderingEngine: import(
|
|
8
|
+
export declare const IRenderingEngine: import('@wendellhu/redi').IdentifierDecorator<Engine>;
|
|
23
9
|
export declare class UniverRenderEnginePlugin extends Plugin {
|
|
24
10
|
readonly _injector: Injector;
|
|
25
11
|
static type: PluginType;
|
|
@@ -1,26 +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 type { Nullable } from '@univerjs/core';
|
|
17
|
-
import type { Observable } from 'rxjs';
|
|
18
|
-
import type { BaseObject } from './base-object';
|
|
19
|
-
import type { DocComponent } from './components/docs/doc-component';
|
|
20
|
-
import type { SheetComponent } from './components/sheets/sheet-component';
|
|
21
|
-
import type { Slide } from './components/slides/slide';
|
|
22
|
-
import { Engine } from './engine';
|
|
23
1
|
import { Scene } from './scene';
|
|
2
|
+
import { Engine } from './engine';
|
|
3
|
+
import { Slide } from './components/slides/slide';
|
|
4
|
+
import { SheetComponent } from './components/sheets/sheet-component';
|
|
5
|
+
import { DocComponent } from './components/docs/doc-component';
|
|
6
|
+
import { BaseObject } from './base-object';
|
|
7
|
+
import { Observable } from 'rxjs';
|
|
8
|
+
import { Nullable } from '@univerjs/core';
|
|
9
|
+
|
|
24
10
|
export interface IRenderManagerService {
|
|
25
11
|
currentRender$: Observable<Nullable<string>>;
|
|
26
12
|
createRender$: Observable<Nullable<string>>;
|
|
@@ -58,6 +44,7 @@ export declare class RenderManagerService implements IRenderManagerService {
|
|
|
58
44
|
get defaultEngine(): Engine;
|
|
59
45
|
dispose(): void;
|
|
60
46
|
createRenderWithParent(unitId: string, parentUnitId: string): IRender;
|
|
47
|
+
createRenderWithEngine(unitId: string, engine: Engine): IRender;
|
|
61
48
|
create(unitId: Nullable<string>): void;
|
|
62
49
|
createRender(unitId: string): IRender;
|
|
63
50
|
private _createRender;
|
|
@@ -71,4 +58,4 @@ export declare class RenderManagerService implements IRenderManagerService {
|
|
|
71
58
|
getRenderAll(): Map<string, IRender>;
|
|
72
59
|
private _disposeItem;
|
|
73
60
|
}
|
|
74
|
-
export declare const IRenderManagerService: import(
|
|
61
|
+
export declare const IRenderManagerService: import('@wendellhu/redi').IdentifierDecorator<RenderManagerService>;
|
|
@@ -1,25 +1,11 @@
|
|
|
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 { BaseObject } from './base-object';
|
|
1
|
+
import { ThinScene } from './thin-scene';
|
|
2
|
+
import { UniverRenderingContext } from './context';
|
|
3
|
+
import { IViewportBound, Vector2 } from './basics/vector2';
|
|
4
|
+
import { IObjectFullState } from './basics/interfaces';
|
|
18
5
|
import { RENDER_CLASS_TYPE } from './basics/const';
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
import type { ThinScene } from './thin-scene';
|
|
6
|
+
import { BaseObject } from './base-object';
|
|
7
|
+
import { Nullable } from '@univerjs/core';
|
|
8
|
+
|
|
23
9
|
export declare class SceneViewer extends BaseObject {
|
|
24
10
|
private _subScenes;
|
|
25
11
|
private _activeSubScene;
|
package/lib/types/scene.d.ts
CHANGED
|
@@ -1,32 +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
|
-
*/
|
|
16
|
-
import type { Nullable } from '@univerjs/core';
|
|
17
|
-
import type { BaseObject } from './base-object';
|
|
18
|
-
import { CURSOR_TYPE } from './basics/const';
|
|
19
|
-
import type { IKeyboardEvent, IMouseEvent, IPointerEvent, IWheelEvent } from './basics/i-events';
|
|
20
|
-
import type { ISceneTransformState } from './basics/interfaces';
|
|
21
|
-
import { Vector2 } from './basics/vector2';
|
|
22
|
-
import type { UniverRenderingContext } from './context';
|
|
23
|
-
import { Layer } from './layer';
|
|
24
|
-
import type { ITransformerConfig } from './scene.transformer';
|
|
25
|
-
import { Transformer } from './scene.transformer';
|
|
26
|
-
import type { SceneViewer } from './scene-viewer';
|
|
27
|
-
import type { ThinEngine } from './thin-engine';
|
|
1
|
+
import { Viewport } from './viewport';
|
|
28
2
|
import { ThinScene } from './thin-scene';
|
|
29
|
-
import
|
|
3
|
+
import { ThinEngine } from './thin-engine';
|
|
4
|
+
import { SceneViewer } from './scene-viewer';
|
|
5
|
+
import { ITransformerConfig, Transformer } from './scene.transformer';
|
|
6
|
+
import { Layer } from './layer';
|
|
7
|
+
import { UniverRenderingContext } from './context';
|
|
8
|
+
import { Vector2 } from './basics/vector2';
|
|
9
|
+
import { ISceneTransformState } from './basics/interfaces';
|
|
10
|
+
import { IKeyboardEvent, IMouseEvent, IPointerEvent, IWheelEvent } from './basics/i-events';
|
|
11
|
+
import { CURSOR_TYPE } from './basics/const';
|
|
12
|
+
import { BaseObject } from './base-object';
|
|
13
|
+
import { Nullable } from '@univerjs/core';
|
|
14
|
+
|
|
30
15
|
export declare class Scene extends ThinScene {
|
|
31
16
|
private _parent;
|
|
32
17
|
private _layers;
|
|
@@ -34,7 +19,7 @@ export declare class Scene extends ThinScene {
|
|
|
34
19
|
private _cursor;
|
|
35
20
|
private _defaultCursor;
|
|
36
21
|
private _addObject$;
|
|
37
|
-
readonly addObject$: import(
|
|
22
|
+
readonly addObject$: import('rxjs').Observable<Scene>;
|
|
38
23
|
/**
|
|
39
24
|
* Transformer constructor. Transformer is a special type of group that allow you transform
|
|
40
25
|
* primitives and shapes. Transforming tool is not changing `width` and `height` properties of nodes
|
|
@@ -1,21 +1,7 @@
|
|
|
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
|
-
*/
|
|
1
|
+
import { ThinScene } from './thin-scene';
|
|
2
|
+
import { IMouseEvent } from './basics/i-events';
|
|
16
3
|
import { Disposable } from '@univerjs/core';
|
|
17
|
-
|
|
18
|
-
import type { ThinScene } from './thin-scene';
|
|
4
|
+
|
|
19
5
|
export declare class InputManager extends Disposable {
|
|
20
6
|
/** The distance in pixel that you have to move to prevent some events */
|
|
21
7
|
static DragMovementThreshold: number;
|
|
@@ -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 { Nullable } from '@univerjs/core';
|
|
17
|
-
import { Disposable, Observable } from '@univerjs/core';
|
|
18
|
-
import type { BaseObject } from './base-object';
|
|
19
|
-
import type { IMouseEvent, IPointerEvent } from './basics/i-events';
|
|
1
|
+
import { ThinScene } from './thin-scene';
|
|
20
2
|
import { Group } from './group';
|
|
21
|
-
import
|
|
3
|
+
import { IMouseEvent, IPointerEvent } from './basics/i-events';
|
|
4
|
+
import { BaseObject } from './base-object';
|
|
5
|
+
import { Nullable, Disposable, Observable } from '@univerjs/core';
|
|
6
|
+
|
|
22
7
|
declare enum MoveObserverType {
|
|
23
8
|
MOVE_START = 0,
|
|
24
9
|
MOVING = 1,
|
|
@@ -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 { IPaddingData } from '@univerjs/core';
|
|
17
|
-
import type { Scene } from './scene';
|
|
18
|
-
import type { Viewport } from './viewport';
|
|
1
|
+
import { Viewport } from './viewport';
|
|
2
|
+
import { Scene } from './scene';
|
|
3
|
+
import { IPaddingData } from '@univerjs/core';
|
|
4
|
+
|
|
19
5
|
export declare enum ScrollTimerType {
|
|
20
6
|
NONE = 0,
|
|
21
7
|
X = 1,
|
|
@@ -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 { Nullable } from '@univerjs/core';
|
|
17
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
1
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
|
+
import { Nullable } from '@univerjs/core';
|
|
3
|
+
|
|
18
4
|
export interface ITransformObject {
|
|
19
5
|
unitId: string;
|
|
20
6
|
objectId: string;
|
|
@@ -45,7 +31,7 @@ export declare class ObjectTransformManagerService implements IDisposable {
|
|
|
45
31
|
private _currentObject;
|
|
46
32
|
private _objectParam;
|
|
47
33
|
private readonly _currentObject$;
|
|
48
|
-
readonly currentObject$: import(
|
|
34
|
+
readonly currentObject$: import('rxjs').Observable<Nullable<ITransformObject>>;
|
|
49
35
|
dispose(): void;
|
|
50
36
|
updateObject(transformObject: ITransformObject): void;
|
|
51
37
|
setCurrent(searchParam: IObjectTransformManagerSearch): void;
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 { Disposable, type Nullable } from '@univerjs/core';
|
|
17
|
-
import type { Vector2 } from '../basics/vector2';
|
|
18
|
-
import type { UniverRenderingContext } from '../context';
|
|
19
|
-
import type { ThinScene } from '../thin-scene';
|
|
20
|
-
import type { Rect } from './rect';
|
|
1
|
+
import { Rect } from './rect';
|
|
2
|
+
import { ThinScene } from '../thin-scene';
|
|
3
|
+
import { UniverRenderingContext } from '../context';
|
|
4
|
+
import { Vector2 } from '../basics/vector2';
|
|
5
|
+
import { Disposable, Nullable } from '@univerjs/core';
|
|
6
|
+
|
|
21
7
|
export interface IScrollBarProps {
|
|
22
8
|
thumbMargin?: number;
|
|
23
9
|
thumbLengthRatio?: number;
|
|
@@ -52,7 +38,7 @@ export declare class BaseScrollBar extends Disposable {
|
|
|
52
38
|
get ratioScrollY(): number;
|
|
53
39
|
get miniThumbRatioX(): number;
|
|
54
40
|
get miniThumbRatioY(): number;
|
|
55
|
-
pick(coord: Vector2): Rect<import(
|
|
41
|
+
pick(coord: Vector2): Rect<import('./rect').IRectProps> | null;
|
|
56
42
|
dispose(): void;
|
|
57
43
|
hasHorizonThumb(): boolean;
|
|
58
44
|
hasVerticalThumb(): boolean;
|
|
@@ -1,21 +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 { UniverRenderingContext } from '../context';
|
|
17
|
-
import type { IShapeProps } from './shape';
|
|
18
|
-
import { Shape } from './shape';
|
|
1
|
+
import { IShapeProps, Shape } from './shape';
|
|
2
|
+
import { UniverRenderingContext } from '../context';
|
|
3
|
+
|
|
19
4
|
export interface ICircleProps extends IShapeProps {
|
|
20
5
|
radius: number;
|
|
21
6
|
}
|
|
@@ -1,21 +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 { UniverRenderingContext } from '../context';
|
|
17
|
-
import type { IShapeProps } from './shape';
|
|
18
|
-
import { Shape } from './shape';
|
|
1
|
+
import { IShapeProps, Shape } from './shape';
|
|
2
|
+
import { UniverRenderingContext } from '../context';
|
|
3
|
+
|
|
19
4
|
interface IPathDataArray {
|
|
20
5
|
command: string;
|
|
21
6
|
points: number[];
|
|
@@ -1,22 +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 { UniverRenderingContext } from '../context';
|
|
18
|
-
import type { IShapeProps } from './shape';
|
|
19
|
-
import { Shape } from './shape';
|
|
1
|
+
import { IShapeProps, Shape } from './shape';
|
|
2
|
+
import { UniverRenderingContext } from '../context';
|
|
3
|
+
import { Nullable } from '@univerjs/core';
|
|
4
|
+
|
|
20
5
|
export interface IPictureProps extends IShapeProps {
|
|
21
6
|
image?: HTMLImageElement;
|
|
22
7
|
url?: string;
|
|
@@ -1,21 +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 { UniverRenderingContext } from '../context';
|
|
17
|
-
import type { IShapeProps } from './shape';
|
|
18
|
-
import { Shape } from './shape';
|
|
1
|
+
import { IShapeProps, Shape } from './shape';
|
|
2
|
+
import { UniverRenderingContext } from '../context';
|
|
3
|
+
|
|
19
4
|
export interface IRectProps extends IShapeProps {
|
|
20
5
|
radius?: number;
|
|
21
6
|
}
|