@univerjs/engine-render 0.2.7 → 0.2.8
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 +3 -1
- package/lib/es/index.js +88 -39
- package/lib/types/base-object.d.ts +0 -1
- package/lib/types/basics/cell-data.d.ts +0 -1
- package/lib/types/basics/document-node-tools.d.ts +0 -1
- package/lib/types/basics/draw.d.ts +0 -1
- package/lib/types/basics/group-transform.d.ts +0 -1
- package/lib/types/basics/i-document-skeleton-cached.d.ts +0 -1
- package/lib/types/basics/i-events.d.ts +0 -1
- package/lib/types/basics/interfaces.d.ts +0 -1
- package/lib/types/basics/offset-rotation-axis.d.ts +0 -1
- package/lib/types/basics/path2.d.ts +0 -1
- package/lib/types/basics/position.d.ts +0 -1
- package/lib/types/basics/quick-event.d.ts +0 -1
- package/lib/types/basics/range.d.ts +0 -1
- package/lib/types/basics/text-rotation.d.ts +0 -1
- package/lib/types/basics/tools.d.ts +0 -1
- package/lib/types/basics/transform.d.ts +0 -1
- package/lib/types/basics/transformer-config.d.ts +0 -1
- package/lib/types/basics/vector2.d.ts +0 -1
- package/lib/types/basics/viewport-subtract.d.ts +0 -1
- package/lib/types/canvas.d.ts +0 -1
- package/lib/types/components/component.d.ts +0 -1
- package/lib/types/components/docs/doc-background.d.ts +0 -1
- package/lib/types/components/docs/doc-component.d.ts +0 -1
- package/lib/types/components/docs/doc-extension.d.ts +0 -1
- package/lib/types/components/docs/document.d.ts +0 -1
- package/lib/types/components/docs/extensions/background.d.ts +0 -1
- package/lib/types/components/docs/extensions/border.d.ts +0 -1
- package/lib/types/components/docs/extensions/font-and-base-line.d.ts +0 -1
- package/lib/types/components/docs/extensions/line.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/bullet-ruler.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/bullet.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/language-ruler.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/layout-ruler.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/line-adjustment.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/linebreaking.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/paragraph-layout.d.ts +0 -1
- package/lib/types/components/docs/layout/block/paragraph/shaping.d.ts +0 -1
- package/lib/types/components/docs/layout/block/section.d.ts +0 -1
- package/lib/types/components/docs/layout/block/table.d.ts +0 -1
- package/lib/types/components/docs/layout/doc-skeleton.d.ts +0 -1
- package/lib/types/components/docs/layout/hyphenation/hyphen.d.ts +0 -1
- package/lib/types/components/docs/layout/hyphenation/language-detector.d.ts +0 -1
- package/lib/types/components/docs/layout/line-breaker/enhancers/hyphen-enhancer.d.ts +0 -1
- package/lib/types/components/docs/layout/line-breaker/extensions/custom-block-linebreak-extension.d.ts +0 -1
- package/lib/types/components/docs/layout/line-breaker/extensions/tab-linebreak-extension.d.ts +0 -1
- package/lib/types/components/docs/layout/line-breaker/line-breaker.d.ts +0 -1
- package/lib/types/components/docs/layout/line-breaker/rule.d.ts +0 -1
- package/lib/types/components/docs/layout/model/column.d.ts +0 -1
- package/lib/types/components/docs/layout/model/glyph.d.ts +0 -1
- package/lib/types/components/docs/layout/model/line.d.ts +0 -1
- package/lib/types/components/docs/layout/model/page.d.ts +0 -1
- package/lib/types/components/docs/layout/model/section.d.ts +0 -1
- package/lib/types/components/docs/layout/shaping-engine/font-cache.d.ts +0 -1
- package/lib/types/components/docs/layout/shaping-engine/font-library.d.ts +0 -1
- package/lib/types/components/docs/layout/shaping-engine/text-shaping.d.ts +0 -1
- package/lib/types/components/docs/layout/shaping-engine/utils.d.ts +0 -1
- package/lib/types/components/docs/layout/style/custom-decoration.d.ts +0 -1
- package/lib/types/components/docs/layout/style/custom-range.d.ts +0 -1
- package/lib/types/components/docs/layout/tools.d.ts +0 -1
- package/lib/types/components/docs/liquid.d.ts +0 -1
- package/lib/types/components/docs/text-selection/convert-rect-range.d.ts +0 -1
- package/lib/types/components/docs/text-selection/convert-text-range.d.ts +0 -1
- package/lib/types/components/docs/text-selection/range-interface.d.ts +0 -1
- package/lib/types/components/docs/text-selection/rect-range.d.ts +0 -1
- package/lib/types/components/docs/text-selection/selection-utils.d.ts +0 -1
- package/lib/types/components/docs/text-selection/text-range.d.ts +0 -1
- package/lib/types/components/docs/text-selection/text-selection-render-manager.d.ts +0 -1
- package/lib/types/components/docs/view-model/data-stream-tree-node.d.ts +0 -1
- package/lib/types/components/docs/view-model/document-view-model.d.ts +0 -1
- package/lib/types/components/extension.d.ts +0 -1
- package/lib/types/components/sheets/column-header.d.ts +0 -1
- package/lib/types/components/sheets/extensions/background.d.ts +0 -1
- package/lib/types/components/sheets/extensions/border.d.ts +0 -1
- package/lib/types/components/sheets/extensions/column-header-layout.d.ts +0 -1
- package/lib/types/components/sheets/extensions/custom.d.ts +0 -1
- package/lib/types/components/sheets/extensions/font.d.ts +0 -1
- package/lib/types/components/sheets/extensions/marker.d.ts +0 -1
- package/lib/types/components/sheets/extensions/row-header-layout.d.ts +0 -1
- package/lib/types/components/sheets/extensions/sheet-extension.d.ts +0 -1
- package/lib/types/components/sheets/interfaces.d.ts +0 -1
- package/lib/types/components/sheets/row-header.d.ts +0 -1
- package/lib/types/components/sheets/sheet-component.d.ts +0 -1
- package/lib/types/components/sheets/sheet-skeleton.d.ts +1 -1
- package/lib/types/components/sheets/spreadsheet.d.ts +0 -1
- package/lib/types/components/skeleton.d.ts +0 -1
- package/lib/types/components/slides/slide.d.ts +6 -2
- package/lib/types/custom/custom-object.d.ts +0 -1
- package/lib/types/engine.d.ts +0 -1
- package/lib/types/floating/util.d.ts +0 -1
- package/lib/types/group.d.ts +0 -1
- package/lib/types/layer.d.ts +0 -1
- package/lib/types/render-engine.d.ts +0 -1
- package/lib/types/render-manager/render-manager.service.d.ts +44 -3
- package/lib/types/render-manager/render-unit.d.ts +1 -2
- package/lib/types/scene-viewer.d.ts +0 -1
- package/lib/types/scene.d.ts +4 -1
- package/lib/types/scene.input-manager.d.ts +0 -1
- package/lib/types/scene.transformer.d.ts +0 -1
- package/lib/types/scroll-timer.d.ts +0 -1
- package/lib/types/shape/base-scroll-bar.d.ts +0 -1
- package/lib/types/shape/checkbox.d.ts +0 -1
- package/lib/types/shape/circle.d.ts +0 -1
- package/lib/types/shape/dashedrect.d.ts +0 -1
- package/lib/types/shape/dropdown-item.d.ts +0 -1
- package/lib/types/shape/image.d.ts +0 -1
- package/lib/types/shape/path.d.ts +0 -1
- package/lib/types/shape/rect.d.ts +0 -1
- package/lib/types/shape/regular-polygon.d.ts +0 -1
- package/lib/types/shape/rich-text.d.ts +2 -2
- package/lib/types/shape/scroll-bar.d.ts +0 -1
- package/lib/types/shape/shape.d.ts +0 -1
- package/lib/types/shape/text.d.ts +0 -1
- package/lib/types/thin-engine.d.ts +0 -1
- package/lib/types/thin-scene.d.ts +0 -1
- package/lib/types/viewport.d.ts +0 -1
- package/lib/umd/index.js +3 -1
- package/package.json +5 -5
|
@@ -2,7 +2,6 @@ import { Dependency, DependencyIdentifier, IDisposable, Nullable, UnitModel, Uni
|
|
|
2
2
|
import { Engine } from '../engine';
|
|
3
3
|
import { Scene } from '../scene';
|
|
4
4
|
import { RenderComponentType } from './render-manager.service';
|
|
5
|
-
|
|
6
5
|
export interface IRender {
|
|
7
6
|
unitId: string;
|
|
8
7
|
type: UniverInstanceType;
|
|
@@ -24,7 +23,7 @@ export interface IRenderContext<T extends UnitModel = UnitModel> extends Omit<IR
|
|
|
24
23
|
type: UnitType;
|
|
25
24
|
}
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
26
|
+
* RenderUnit impl IRender
|
|
28
27
|
*/
|
|
29
28
|
export declare class RenderUnit extends Disposable implements IRender {
|
|
30
29
|
readonly isRenderUnit: boolean;
|
|
@@ -5,7 +5,6 @@ import { IObjectFullState } from './basics/interfaces';
|
|
|
5
5
|
import { IViewportInfo, Vector2 } from './basics/vector2';
|
|
6
6
|
import { UniverRenderingContext } from './context';
|
|
7
7
|
import { ThinScene } from './thin-scene';
|
|
8
|
-
|
|
9
8
|
export declare class SceneViewer extends BaseObject {
|
|
10
9
|
private _subScenes;
|
|
11
10
|
private _activeSubScene;
|
package/lib/types/scene.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ import { ThinEngine } from './thin-engine';
|
|
|
12
12
|
import { ThinScene } from './thin-scene';
|
|
13
13
|
import { Viewport } from './viewport';
|
|
14
14
|
import { ITransformerConfig } from './basics/transformer-config';
|
|
15
|
-
|
|
16
15
|
export declare class Scene extends ThinScene {
|
|
17
16
|
private _parent;
|
|
18
17
|
private _layers;
|
|
@@ -101,6 +100,10 @@ export declare class Scene extends ThinScene {
|
|
|
101
100
|
getViewport(key: string): Viewport | undefined;
|
|
102
101
|
render(parentCtx?: UniverRenderingContext): void;
|
|
103
102
|
requestRender(parentCtx?: UniverRenderingContext): Promise<unknown>;
|
|
103
|
+
/**
|
|
104
|
+
* create transformer if not exist, and then transformer attach to object that passed in by parameter.
|
|
105
|
+
* @param o
|
|
106
|
+
*/
|
|
104
107
|
attachTransformerTo(o: BaseObject): void;
|
|
105
108
|
detachTransformerFrom(o: BaseObject): void;
|
|
106
109
|
initTransformer(config?: ITransformerConfig): void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Disposable } from '@univerjs/core';
|
|
2
2
|
import { IMouseEvent } from './basics/i-events';
|
|
3
3
|
import { ThinScene } from './thin-scene';
|
|
4
|
-
|
|
5
4
|
export declare class InputManager extends Disposable {
|
|
6
5
|
/** The distance in pixel that you have to move to prevent some events */
|
|
7
6
|
static DragMovementThreshold: number;
|
|
@@ -4,7 +4,6 @@ import { IMouseEvent, IPointerEvent } from './basics/i-events';
|
|
|
4
4
|
import { Group } from './group';
|
|
5
5
|
import { Scene } from './scene';
|
|
6
6
|
import { ITransformerConfig } from './basics/transformer-config';
|
|
7
|
-
|
|
8
7
|
declare enum MoveObserverType {
|
|
9
8
|
MOVE_START = 0,
|
|
10
9
|
MOVING = 1,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IViewportInfo } from '../basics/vector2';
|
|
2
2
|
import { UniverRenderingContext } from '../context';
|
|
3
3
|
import { IRectProps, Rect } from './rect';
|
|
4
|
-
|
|
5
4
|
export declare class DashedRect extends Rect {
|
|
6
5
|
static drawWith(ctx: UniverRenderingContext, props: IRectProps | Rect): void;
|
|
7
6
|
protected _draw(ctx: UniverRenderingContext, viewportInfo?: IViewportInfo): void;
|
|
@@ -3,7 +3,6 @@ import { UniverRenderingContext } from '../context';
|
|
|
3
3
|
import { IObjectFullState, IViewportInfo, RENDER_CLASS_TYPE } from '../basics';
|
|
4
4
|
import { ObjectType } from '../base-object';
|
|
5
5
|
import { IShapeProps, Shape } from './shape';
|
|
6
|
-
|
|
7
6
|
export interface IImageProps extends IShapeProps {
|
|
8
7
|
image?: HTMLImageElement;
|
|
9
8
|
url?: string;
|
|
@@ -2,7 +2,6 @@ import { UniverRenderingContext } from '../context';
|
|
|
2
2
|
import { IViewportInfo } from '../basics/vector2';
|
|
3
3
|
import { ObjectType } from '../base-object';
|
|
4
4
|
import { IShapeProps, Shape } from './shape';
|
|
5
|
-
|
|
6
5
|
export interface IRectProps extends IShapeProps {
|
|
7
6
|
radius?: number;
|
|
8
7
|
}
|
|
@@ -2,7 +2,6 @@ import { IObjectFullState } from '../basics/interfaces';
|
|
|
2
2
|
import { IPoint, Vector2 } from '../basics/vector2';
|
|
3
3
|
import { UniverRenderingContext } from '../context';
|
|
4
4
|
import { IShapeProps, Shape } from './shape';
|
|
5
|
-
|
|
6
5
|
export interface IRegularPolygonProps extends IShapeProps {
|
|
7
6
|
pointsGroup: IPoint[][];
|
|
8
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { IDocumentData, IStyleBase, ITransformState, LocaleService } from '@univerjs/core';
|
|
1
|
+
import { IDocumentData, IStyleBase, ITransformState, LocaleService, DocumentDataModel } from '@univerjs/core';
|
|
2
2
|
import { BASE_OBJECT_ARRAY, BaseObject, ObjectType } from '../base-object';
|
|
3
3
|
import { IViewportInfo } from '../basics/vector2';
|
|
4
4
|
import { UniverRenderingContext } from '../context';
|
|
5
|
-
|
|
6
5
|
export interface IRichTextProps extends ITransformState, IStyleBase {
|
|
7
6
|
text?: string;
|
|
8
7
|
richText?: IDocumentData;
|
|
@@ -22,6 +21,7 @@ export declare class RichText extends BaseObject {
|
|
|
22
21
|
private _documentData;
|
|
23
22
|
private _documentSkeleton;
|
|
24
23
|
private _documents;
|
|
24
|
+
documentModel: DocumentDataModel;
|
|
25
25
|
/**
|
|
26
26
|
* fontFamily
|
|
27
27
|
*/
|
|
@@ -3,7 +3,6 @@ import { UniverRenderingContext } from '../context';
|
|
|
3
3
|
import { Viewport } from '../viewport';
|
|
4
4
|
import { IScrollBarProps, BaseScrollBar } from './base-scroll-bar';
|
|
5
5
|
import { Rect } from './rect';
|
|
6
|
-
|
|
7
6
|
export declare class ScrollBar extends BaseScrollBar {
|
|
8
7
|
protected _view: Viewport;
|
|
9
8
|
private _mainScene;
|
|
@@ -3,7 +3,6 @@ import { BaseObject, ObjectType } from '../base-object';
|
|
|
3
3
|
import { IObjectFullState } from '../basics/interfaces';
|
|
4
4
|
import { IViewportInfo, Vector2 } from '../basics/vector2';
|
|
5
5
|
import { UniverRenderingContext } from '../context';
|
|
6
|
-
|
|
7
6
|
export type LineJoin = 'round' | 'bevel' | 'miter';
|
|
8
7
|
export type LineCap = 'butt' | 'round' | 'square';
|
|
9
8
|
export type PaintFirst = 'fill' | 'stroke';
|
|
@@ -3,7 +3,6 @@ import { CURSOR_TYPE, RENDER_CLASS_TYPE } from './basics/const';
|
|
|
3
3
|
import { IEvent } from './basics/i-events';
|
|
4
4
|
import { ITransformChangeState } from './basics/interfaces';
|
|
5
5
|
import { Canvas } from './canvas';
|
|
6
|
-
|
|
7
6
|
export declare abstract class ThinEngine<T extends IDisposable> extends Disposable {
|
|
8
7
|
onInputChanged$: EventSubject<IEvent>;
|
|
9
8
|
onTransformChange$: EventSubject<ITransformChangeState>;
|
|
@@ -8,7 +8,6 @@ import { Vector2 } from './basics/vector2';
|
|
|
8
8
|
import { UniverRenderingContext } from './context';
|
|
9
9
|
import { ThinEngine } from './thin-engine';
|
|
10
10
|
import { Scene } from './scene';
|
|
11
|
-
|
|
12
11
|
export declare abstract class ThinScene extends Disposable {
|
|
13
12
|
onTransformChange$: EventSubject<ITransformChangeState>;
|
|
14
13
|
onFileLoaded$: EventSubject<string>;
|
package/lib/types/viewport.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { IBoundRectNoAngle, IViewportInfo, Vector2 } from './basics/vector2';
|
|
|
6
6
|
import { UniverRenderingContext } from './context';
|
|
7
7
|
import { BaseScrollBar } from './shape/base-scroll-bar';
|
|
8
8
|
import { ThinScene } from './thin-scene';
|
|
9
|
-
|
|
10
9
|
interface IViewPosition {
|
|
11
10
|
top?: number;
|
|
12
11
|
left?: number;
|