@univerjs/engine-render 0.6.0-alpha.0 → 0.6.0-experimental.20250212-dbe9830
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 +1 -1
- package/lib/es/index.js +5582 -6082
- package/lib/types/basics/const.d.ts +1 -1
- package/lib/types/basics/index.d.ts +1 -1
- package/lib/types/basics/interfaces.d.ts +9 -0
- package/lib/types/basics/tools.d.ts +9 -17
- package/lib/types/basics/unit-convert.d.ts +1 -1
- package/lib/types/components/docs/extensions/index.d.ts +1 -1
- package/lib/types/components/docs/horizon-bar.d.ts +1 -1
- package/lib/types/components/docs/layout/block/block-error.d.ts +1 -1
- package/lib/types/components/docs/layout/doc-skeleton.d.ts +1 -2
- package/lib/types/components/docs/layout/hyphenation/lang.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/af.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/as.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/be.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/bg.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/bn.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/ca.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/cop.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/cs.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/cu.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/cy.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/da.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/de-1901.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/de-1996.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/de-ch-1901.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/el-monoton.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/el-polyton.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/en-gb.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/en-us.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/es.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/et.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/eu.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/fi.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/fr.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/fur.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/ga.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/gl.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/grc.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/gu.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/hi.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/hr.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/hsb.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/hu.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/hy.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/ia.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/id.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/is.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/it.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/ka.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/kmr.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/kn.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/la-x-classic.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/la-x-liturgic.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/la.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/lt.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/lv.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/ml.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/mn-cyrl-x-lmc.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/mn-cyrl.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/mr.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/mul-ethi.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/nb.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/nl.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/nn.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/no.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/oc.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/or.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/pa.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/pi.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/pl.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/pms.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/pt.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/rm.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/ro.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/ru.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/sa.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/sh-cyrl.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/sh-latn.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/sk.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/sl.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/sr-cyrl.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/sv.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/ta.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/te.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/th.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/tk.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/tr.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/uk.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/patterns/zh-latn-pinyin.d.ts +1 -1
- package/lib/types/components/docs/layout/hyphenation/tools.d.ts +1 -1
- package/lib/types/components/docs/layout/line-breaker/break.d.ts +1 -1
- package/lib/types/components/docs/layout/line-breaker/classes.d.ts +1 -1
- package/lib/types/components/docs/layout/line-breaker/enhancers/utils.d.ts +1 -1
- package/lib/types/components/docs/layout/line-breaker/index.d.ts +1 -1
- package/lib/types/components/docs/layout/line-breaker/pairs.d.ts +1 -1
- package/lib/types/components/docs/layout/line-breaker/swap.d.ts +1 -1
- package/lib/types/components/docs/layout/line-breaker/tiny-inflate.d.ts +1 -1
- package/lib/types/components/docs/layout/line-breaker/trie-data.d.ts +1 -1
- package/lib/types/components/docs/layout/line-breaker/unicode-trie.d.ts +1 -1
- package/lib/types/components/docs/layout/model/table.d.ts +1 -1
- package/lib/types/components/docs/vertical-bar.d.ts +1 -1
- package/lib/types/components/index.d.ts +2 -3
- package/lib/types/components/sheets/column-header.d.ts +1 -1
- package/lib/types/components/sheets/extensions/background.d.ts +1 -1
- package/lib/types/components/sheets/extensions/border.d.ts +1 -1
- package/lib/types/components/sheets/extensions/column-header-layout.d.ts +1 -1
- package/lib/types/components/sheets/extensions/custom.d.ts +1 -1
- package/lib/types/components/sheets/extensions/font.d.ts +6 -6
- package/lib/types/components/sheets/extensions/index.d.ts +1 -1
- package/lib/types/components/sheets/extensions/marker.d.ts +1 -1
- package/lib/types/components/sheets/extensions/row-header-layout.d.ts +1 -1
- package/lib/types/components/sheets/extensions/sheet-extension.d.ts +1 -1
- package/lib/types/components/sheets/index.d.ts +2 -2
- package/lib/types/components/sheets/interfaces.d.ts +5 -2
- package/lib/types/components/sheets/row-header.d.ts +1 -1
- package/lib/types/components/sheets/sheet-component.d.ts +1 -1
- package/lib/types/components/sheets/{sheet-skeleton.d.ts → sheet.render-skeleton.d.ts} +51 -231
- package/lib/types/components/sheets/spreadsheet.d.ts +3 -8
- package/lib/types/components/slides/index.d.ts +1 -1
- package/lib/types/controllers/config.schema.d.ts +1 -1
- package/lib/types/custom/custom-object.d.ts +1 -1
- package/lib/types/custom/index.d.ts +1 -1
- package/lib/types/engine.d.ts +20 -2
- package/lib/types/index.d.ts +2 -3
- package/lib/types/render-manager/render-manager.service.d.ts +2 -4
- package/lib/types/render-manager/render-unit.d.ts +20 -0
- package/lib/types/scene.d.ts +35 -8
- package/lib/types/services/render-config.d.ts +1 -1
- package/lib/types/services/render-config.service.d.ts +1 -1
- package/lib/types/shape/control.d.ts +1 -1
- package/lib/types/shape/drawing.d.ts +1 -1
- package/lib/types/shape/index.d.ts +1 -1
- package/lib/types/viewport.d.ts +9 -2
- package/lib/umd/index.js +1 -1
- package/package.json +4 -4
- package/LICENSE +0 -176
- package/lib/types/components/skeleton.d.ts +0 -13
- package/lib/types/thin-engine.d.ts +0 -32
package/lib/types/scene.d.ts
CHANGED
|
@@ -25,7 +25,13 @@ export interface ISceneInputControlOptions {
|
|
|
25
25
|
export declare class Scene extends Disposable {
|
|
26
26
|
private _parent;
|
|
27
27
|
private _sceneKey;
|
|
28
|
+
/**
|
|
29
|
+
* Width of scene content, does not affected by zoom.
|
|
30
|
+
*/
|
|
28
31
|
private _width;
|
|
32
|
+
/**
|
|
33
|
+
* Height of scene content, does not affected by zoom.
|
|
34
|
+
*/
|
|
29
35
|
private _height;
|
|
30
36
|
private _scaleX;
|
|
31
37
|
private _scaleY;
|
|
@@ -87,8 +93,18 @@ export declare class Scene extends Disposable {
|
|
|
87
93
|
set height(num: number);
|
|
88
94
|
set scaleX(scaleX: number);
|
|
89
95
|
set scaleY(scaleY: number);
|
|
96
|
+
/**
|
|
97
|
+
* ancestorScaleX means this.scaleX * ancestorScaleX
|
|
98
|
+
*/
|
|
90
99
|
get ancestorScaleX(): number;
|
|
100
|
+
/**
|
|
101
|
+
* ancestorScaleY means this.scaleY * ancestorScaleY
|
|
102
|
+
*/
|
|
91
103
|
get ancestorScaleY(): number;
|
|
104
|
+
getAncestorScale(): {
|
|
105
|
+
scaleX: number;
|
|
106
|
+
scaleY: number;
|
|
107
|
+
};
|
|
92
108
|
get ancestorLeft(): number;
|
|
93
109
|
get ancestorTop(): number;
|
|
94
110
|
set cursor(val: CURSOR_TYPE);
|
|
@@ -103,8 +119,18 @@ export declare class Scene extends Disposable {
|
|
|
103
119
|
resetCursor(): void;
|
|
104
120
|
setCursor(val: CURSOR_TYPE): void;
|
|
105
121
|
setDefaultCursor(val: CURSOR_TYPE): void;
|
|
122
|
+
/**
|
|
123
|
+
* @deprecated use transformByState instead.
|
|
124
|
+
* @param width
|
|
125
|
+
* @param height
|
|
126
|
+
*/
|
|
106
127
|
resize(width?: number, height?: number): this;
|
|
107
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Unlike @scale, this method doesn't emit event.
|
|
130
|
+
* @param scaleX
|
|
131
|
+
* @param scaleY
|
|
132
|
+
*/
|
|
133
|
+
setScaleValueOnly(scaleX: number, scaleY: number): void;
|
|
108
134
|
/**
|
|
109
135
|
* Set scale, and then emit event to update Viewport scroll state.
|
|
110
136
|
* @param scaleX
|
|
@@ -113,9 +139,9 @@ export declare class Scene extends Disposable {
|
|
|
113
139
|
*/
|
|
114
140
|
scale(scaleX?: number, scaleY?: number): this;
|
|
115
141
|
/**
|
|
116
|
-
* current
|
|
142
|
+
* Apply scaleXY base on current scaleX and scaleY
|
|
117
143
|
*/
|
|
118
|
-
scaleBy(
|
|
144
|
+
scaleBy(deltaScaleX?: number, deltaScaleY?: number): this;
|
|
119
145
|
/**
|
|
120
146
|
* Reset canvas size and update scroll
|
|
121
147
|
* @param state
|
|
@@ -249,10 +275,6 @@ export declare class Scene extends Disposable {
|
|
|
249
275
|
getCoordRelativeToViewport(coord: Vector2): Vector2;
|
|
250
276
|
clearLayer(): void;
|
|
251
277
|
clearViewports(): void;
|
|
252
|
-
getAncestorScale(): {
|
|
253
|
-
scaleX: number;
|
|
254
|
-
scaleY: number;
|
|
255
|
-
};
|
|
256
278
|
getPrecisionScale(): {
|
|
257
279
|
scaleX: number;
|
|
258
280
|
scaleY: number;
|
|
@@ -280,7 +302,12 @@ export declare class Scene extends Disposable {
|
|
|
280
302
|
triggerDragEnter(evt: IDragEvent): boolean;
|
|
281
303
|
triggerDrop(evt: IDragEvent): boolean;
|
|
282
304
|
private _createDefaultLayer;
|
|
283
|
-
|
|
305
|
+
/**
|
|
306
|
+
* Triggered when scale, resize of scene.
|
|
307
|
+
* origin name: _setTransForm
|
|
308
|
+
*
|
|
309
|
+
*/
|
|
310
|
+
private _transformHandler;
|
|
284
311
|
/**
|
|
285
312
|
* If scene.event is disabled, scene.pick(cursor Pos) return null.
|
|
286
313
|
* Then only scene itself can response to pointer event, all objects under the scene would not.
|
package/lib/types/viewport.d.ts
CHANGED
|
@@ -80,8 +80,8 @@ export declare class Viewport {
|
|
|
80
80
|
* scrollX means scroll x value for scrollbar in viewMain
|
|
81
81
|
* use getBarScroll to get scrolling value(scrollX, scrollY) for scrollbar
|
|
82
82
|
*/
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
_scrollX: number;
|
|
84
|
+
_scrollY: number;
|
|
85
85
|
private _preScrollX;
|
|
86
86
|
private _preScrollY;
|
|
87
87
|
/**
|
|
@@ -200,6 +200,10 @@ export declare class Viewport {
|
|
|
200
200
|
get viewportScrollX(): number;
|
|
201
201
|
set viewportScrollY(val: number);
|
|
202
202
|
get viewportScrollY(): number;
|
|
203
|
+
set scrollX(val: number);
|
|
204
|
+
set scrollY(val: number);
|
|
205
|
+
get scrollX(): number;
|
|
206
|
+
get scrollY(): number;
|
|
203
207
|
set top(num: number);
|
|
204
208
|
set left(num: number);
|
|
205
209
|
set bottom(num: number);
|
|
@@ -216,6 +220,9 @@ export declare class Viewport {
|
|
|
216
220
|
get canvas(): UniverCanvas | null;
|
|
217
221
|
enable(): void;
|
|
218
222
|
disable(): void;
|
|
223
|
+
/**
|
|
224
|
+
* canvas resize & freeze change would invoke this method
|
|
225
|
+
*/
|
|
219
226
|
resetCanvasSizeAndUpdateScroll(): void;
|
|
220
227
|
setScrollBar(instance: BaseScrollBar): void;
|
|
221
228
|
removeScrollBar(): void;
|