@univerjs/engine-render 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +16 -0
- package/lib/cjs/index.js +23962 -0
- package/lib/esm/index.js +23259 -0
- package/lib/types/base-object.d.ts +155 -0
- package/lib/types/base-object.d.ts.map +1 -0
- package/lib/types/basics/cell-data.d.ts +6 -0
- package/lib/types/basics/cell-data.d.ts.map +1 -0
- package/lib/types/basics/const.d.ts +263 -0
- package/lib/types/basics/const.d.ts.map +1 -0
- package/lib/types/basics/document-node-tools.d.ts +10 -0
- package/lib/types/basics/document-node-tools.d.ts.map +1 -0
- package/lib/types/basics/draw.d.ts +39 -0
- package/lib/types/basics/draw.d.ts.map +1 -0
- package/lib/types/basics/font-cache.d.ts +37 -0
- package/lib/types/basics/font-cache.d.ts.map +1 -0
- package/lib/types/basics/i-document-skeleton-cached.d.ts +210 -0
- package/lib/types/basics/i-document-skeleton-cached.d.ts.map +1 -0
- package/lib/types/basics/i-events.d.ts +304 -0
- package/lib/types/basics/i-events.d.ts.map +1 -0
- package/lib/types/basics/index.d.ts +16 -0
- package/lib/types/basics/index.d.ts.map +1 -0
- package/lib/types/basics/interfaces.d.ts +102 -0
- package/lib/types/basics/interfaces.d.ts.map +1 -0
- package/lib/types/basics/path2.d.ts +10 -0
- package/lib/types/basics/path2.d.ts.map +1 -0
- package/lib/types/basics/performance-monitor.d.ts +111 -0
- package/lib/types/basics/performance-monitor.d.ts.map +1 -0
- package/lib/types/basics/position.d.ts +13 -0
- package/lib/types/basics/position.d.ts.map +1 -0
- package/lib/types/basics/quick-event.d.ts +4 -0
- package/lib/types/basics/quick-event.d.ts.map +1 -0
- package/lib/types/basics/range.d.ts +17 -0
- package/lib/types/basics/range.d.ts.map +1 -0
- package/lib/types/basics/scroll-xy.d.ts +5 -0
- package/lib/types/basics/scroll-xy.d.ts.map +1 -0
- package/lib/types/basics/tools.d.ts +109 -0
- package/lib/types/basics/tools.d.ts.map +1 -0
- package/lib/types/basics/transform.d.ts +143 -0
- package/lib/types/basics/transform.d.ts.map +1 -0
- package/lib/types/basics/unit-convert.d.ts +3 -0
- package/lib/types/basics/unit-convert.d.ts.map +1 -0
- package/lib/types/basics/vector2.d.ts +438 -0
- package/lib/types/basics/vector2.d.ts.map +1 -0
- package/lib/types/canvas.d.ts +55 -0
- package/lib/types/canvas.d.ts.map +1 -0
- package/lib/types/components/component.d.ts +13 -0
- package/lib/types/components/component.d.ts.map +1 -0
- package/lib/types/components/docs/block/block-error.d.ts +2 -0
- package/lib/types/components/docs/block/block-error.d.ts.map +1 -0
- package/lib/types/components/docs/block/index.d.ts +4 -0
- package/lib/types/components/docs/block/index.d.ts.map +1 -0
- package/lib/types/components/docs/block/paragraph/bullet-ruler.d.ts +3 -0
- package/lib/types/components/docs/block/paragraph/bullet-ruler.d.ts.map +1 -0
- package/lib/types/components/docs/block/paragraph/bullet.d.ts +5 -0
- package/lib/types/components/docs/block/paragraph/bullet.d.ts.map +1 -0
- package/lib/types/components/docs/block/paragraph/index.d.ts +7 -0
- package/lib/types/components/docs/block/paragraph/index.d.ts.map +1 -0
- package/lib/types/components/docs/block/paragraph/inline-drawing.d.ts +5 -0
- package/lib/types/components/docs/block/paragraph/inline-drawing.d.ts.map +1 -0
- package/lib/types/components/docs/block/paragraph/language-ruler.d.ts +12 -0
- package/lib/types/components/docs/block/paragraph/language-ruler.d.ts.map +1 -0
- package/lib/types/components/docs/block/paragraph/layout-ruler.d.ts +4 -0
- package/lib/types/components/docs/block/paragraph/layout-ruler.d.ts.map +1 -0
- package/lib/types/components/docs/block/paragraph/paragraph.d.ts +6 -0
- package/lib/types/components/docs/block/paragraph/paragraph.d.ts.map +1 -0
- package/lib/types/components/docs/block/section.d.ts +10 -0
- package/lib/types/components/docs/block/section.d.ts.map +1 -0
- package/lib/types/components/docs/block/table/table-cell.d.ts +1 -0
- package/lib/types/components/docs/block/table/table-cell.d.ts.map +1 -0
- package/lib/types/components/docs/block/table/table-row.d.ts +1 -0
- package/lib/types/components/docs/block/table/table-row.d.ts.map +1 -0
- package/lib/types/components/docs/block/table/table.d.ts +1 -0
- package/lib/types/components/docs/block/table/table.d.ts.map +1 -0
- package/lib/types/components/docs/common/column.d.ts +5 -0
- package/lib/types/components/docs/common/column.d.ts.map +1 -0
- package/lib/types/components/docs/common/convert-cursor.d.ts +60 -0
- package/lib/types/components/docs/common/convert-cursor.d.ts.map +1 -0
- package/lib/types/components/docs/common/index.d.ts +10 -0
- package/lib/types/components/docs/common/index.d.ts.map +1 -0
- package/lib/types/components/docs/common/line.d.ts +20 -0
- package/lib/types/components/docs/common/line.d.ts.map +1 -0
- package/lib/types/components/docs/common/liquid.d.ts +41 -0
- package/lib/types/components/docs/common/liquid.d.ts.map +1 -0
- package/lib/types/components/docs/common/page.d.ts +5 -0
- package/lib/types/components/docs/common/page.d.ts.map +1 -0
- package/lib/types/components/docs/common/range.d.ts +45 -0
- package/lib/types/components/docs/common/range.d.ts.map +1 -0
- package/lib/types/components/docs/common/section.d.ts +6 -0
- package/lib/types/components/docs/common/section.d.ts.map +1 -0
- package/lib/types/components/docs/common/span.d.ts +12 -0
- package/lib/types/components/docs/common/span.d.ts.map +1 -0
- package/lib/types/components/docs/common/tools.d.ts +73 -0
- package/lib/types/components/docs/common/tools.d.ts.map +1 -0
- package/lib/types/components/docs/doc-component.d.ts +34 -0
- package/lib/types/components/docs/doc-component.d.ts.map +1 -0
- package/lib/types/components/docs/doc-extension.d.ts +12 -0
- package/lib/types/components/docs/doc-extension.d.ts.map +1 -0
- package/lib/types/components/docs/doc-skeleton.d.ts +71 -0
- package/lib/types/components/docs/doc-skeleton.d.ts.map +1 -0
- package/lib/types/components/docs/document.d.ts +54 -0
- package/lib/types/components/docs/document.d.ts.map +1 -0
- package/lib/types/components/docs/extensions/background.d.ts +11 -0
- package/lib/types/components/docs/extensions/background.d.ts.map +1 -0
- package/lib/types/components/docs/extensions/border.d.ts +13 -0
- package/lib/types/components/docs/extensions/border.d.ts.map +1 -0
- package/lib/types/components/docs/extensions/font-and-base-line.d.ts +12 -0
- package/lib/types/components/docs/extensions/font-and-base-line.d.ts.map +1 -0
- package/lib/types/components/docs/extensions/index.d.ts +5 -0
- package/lib/types/components/docs/extensions/index.d.ts.map +1 -0
- package/lib/types/components/docs/extensions/line.d.ts +13 -0
- package/lib/types/components/docs/extensions/line.d.ts.map +1 -0
- package/lib/types/components/docs/horizon-bar.d.ts +3 -0
- package/lib/types/components/docs/horizon-bar.d.ts.map +1 -0
- package/lib/types/components/docs/index.d.ts +8 -0
- package/lib/types/components/docs/index.d.ts.map +1 -0
- package/lib/types/components/docs/text-selection-render-manager.d.ts +156 -0
- package/lib/types/components/docs/text-selection-render-manager.d.ts.map +1 -0
- package/lib/types/components/docs/vertical-bar.d.ts +3 -0
- package/lib/types/components/docs/vertical-bar.d.ts.map +1 -0
- package/lib/types/components/docs/view-model/data-stream-tree-node.d.ts +39 -0
- package/lib/types/components/docs/view-model/data-stream-tree-node.d.ts.map +1 -0
- package/lib/types/components/docs/view-model/document-view-model.d.ts +51 -0
- package/lib/types/components/docs/view-model/document-view-model.d.ts.map +1 -0
- package/lib/types/components/extension.d.ts +29 -0
- package/lib/types/components/extension.d.ts.map +1 -0
- package/lib/types/components/index.d.ts +7 -0
- package/lib/types/components/index.d.ts.map +1 -0
- package/lib/types/components/sheets/column-header.d.ts +13 -0
- package/lib/types/components/sheets/column-header.d.ts.map +1 -0
- package/lib/types/components/sheets/extensions/background.d.ts +9 -0
- package/lib/types/components/sheets/extensions/background.d.ts.map +1 -0
- package/lib/types/components/sheets/extensions/border-auxiliary.d.ts +13 -0
- package/lib/types/components/sheets/extensions/border-auxiliary.d.ts.map +1 -0
- package/lib/types/components/sheets/extensions/border.d.ts +10 -0
- package/lib/types/components/sheets/extensions/border.d.ts.map +1 -0
- package/lib/types/components/sheets/extensions/column-header-layout.d.ts +9 -0
- package/lib/types/components/sheets/extensions/column-header-layout.d.ts.map +1 -0
- package/lib/types/components/sheets/extensions/font.d.ts +15 -0
- package/lib/types/components/sheets/extensions/font.d.ts.map +1 -0
- package/lib/types/components/sheets/extensions/index.d.ts +8 -0
- package/lib/types/components/sheets/extensions/index.d.ts.map +1 -0
- package/lib/types/components/sheets/extensions/row-header-layout.d.ts +9 -0
- package/lib/types/components/sheets/extensions/row-header-layout.d.ts.map +1 -0
- package/lib/types/components/sheets/extensions/sheet-extension.d.ts +11 -0
- package/lib/types/components/sheets/extensions/sheet-extension.d.ts.map +1 -0
- package/lib/types/components/sheets/index.d.ts +8 -0
- package/lib/types/components/sheets/index.d.ts.map +1 -0
- package/lib/types/components/sheets/interfaces.d.ts +35 -0
- package/lib/types/components/sheets/interfaces.d.ts.map +1 -0
- package/lib/types/components/sheets/row-header.d.ts +13 -0
- package/lib/types/components/sheets/row-header.d.ts.map +1 -0
- package/lib/types/components/sheets/sheet-component.d.ts +38 -0
- package/lib/types/components/sheets/sheet-component.d.ts.map +1 -0
- package/lib/types/components/sheets/sheet-skeleton.d.ts +275 -0
- package/lib/types/components/sheets/sheet-skeleton.d.ts.map +1 -0
- package/lib/types/components/sheets/spreadsheet.d.ts +70 -0
- package/lib/types/components/sheets/spreadsheet.d.ts.map +1 -0
- package/lib/types/components/skeleton.d.ts +13 -0
- package/lib/types/components/skeleton.d.ts.map +1 -0
- package/lib/types/components/slides/index.d.ts +2 -0
- package/lib/types/components/slides/index.d.ts.map +1 -0
- package/lib/types/components/slides/slide.d.ts +27 -0
- package/lib/types/components/slides/slide.d.ts.map +1 -0
- package/lib/types/custom/custom-object.d.ts +13 -0
- package/lib/types/custom/custom-object.d.ts.map +1 -0
- package/lib/types/custom/index.d.ts +2 -0
- package/lib/types/custom/index.d.ts.map +1 -0
- package/lib/types/engine.d.ts +96 -0
- package/lib/types/engine.d.ts.map +1 -0
- package/lib/types/group.d.ts +25 -0
- package/lib/types/group.d.ts.map +1 -0
- package/lib/types/index.d.ts +17 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/layer.d.ts +21 -0
- package/lib/types/layer.d.ts.map +1 -0
- package/lib/types/render-engine.d.ts +13 -0
- package/lib/types/render-engine.d.ts.map +1 -0
- package/lib/types/render-manager.service.d.ts +51 -0
- package/lib/types/render-manager.service.d.ts.map +1 -0
- package/lib/types/scene-viewer.d.ts +27 -0
- package/lib/types/scene-viewer.d.ts.map +1 -0
- package/lib/types/scene.-transformer.d.ts +129 -0
- package/lib/types/scene.-transformer.d.ts.map +1 -0
- package/lib/types/scene.d.ts +124 -0
- package/lib/types/scene.d.ts.map +1 -0
- package/lib/types/scene.input-manager.d.ts +46 -0
- package/lib/types/scene.input-manager.d.ts.map +1 -0
- package/lib/types/scroll-timer.d.ts +35 -0
- package/lib/types/scroll-timer.d.ts.map +1 -0
- package/lib/types/services/object-transform-manager.service.d.ts +41 -0
- package/lib/types/services/object-transform-manager.service.d.ts.map +1 -0
- package/lib/types/shape/base-scroll-bar.d.ts +47 -0
- package/lib/types/shape/base-scroll-bar.d.ts.map +1 -0
- package/lib/types/shape/circle.d.ts +18 -0
- package/lib/types/shape/circle.d.ts.map +1 -0
- package/lib/types/shape/control.d.ts +3 -0
- package/lib/types/shape/control.d.ts.map +1 -0
- package/lib/types/shape/drawing.d.ts +3 -0
- package/lib/types/shape/drawing.d.ts.map +1 -0
- package/lib/types/shape/index.d.ts +12 -0
- package/lib/types/shape/index.d.ts.map +1 -0
- package/lib/types/shape/path.d.ts +92 -0
- package/lib/types/shape/path.d.ts.map +1 -0
- package/lib/types/shape/picture.d.ts +24 -0
- package/lib/types/shape/picture.d.ts.map +1 -0
- package/lib/types/shape/rect.d.ts +17 -0
- package/lib/types/shape/rect.d.ts.map +1 -0
- package/lib/types/shape/regular-polygon.d.ts +42 -0
- package/lib/types/shape/regular-polygon.d.ts.map +1 -0
- package/lib/types/shape/rich-text.d.ts +45 -0
- package/lib/types/shape/rich-text.d.ts.map +1 -0
- package/lib/types/shape/scroll-bar.d.ts +45 -0
- package/lib/types/shape/scroll-bar.d.ts.map +1 -0
- package/lib/types/shape/selection.d.ts +3 -0
- package/lib/types/shape/selection.d.ts.map +1 -0
- package/lib/types/shape/shape.d.ts +120 -0
- package/lib/types/shape/shape.d.ts.map +1 -0
- package/lib/types/thin-engine.d.ts +33 -0
- package/lib/types/thin-engine.d.ts.map +1 -0
- package/lib/types/thin-scene.d.ts +76 -0
- package/lib/types/thin-scene.d.ts.map +1 -0
- package/lib/types/viewport.d.ts +193 -0
- package/lib/types/viewport.d.ts.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window
|
|
3
|
+
*/
|
|
4
|
+
export declare class PerformanceMonitor {
|
|
5
|
+
private _enabled;
|
|
6
|
+
private _rollingFrameTime;
|
|
7
|
+
private _lastFrameTimeMs;
|
|
8
|
+
/**
|
|
9
|
+
* constructor
|
|
10
|
+
* @param frameSampleSize The number of samples required to saturate the sliding window
|
|
11
|
+
*/
|
|
12
|
+
constructor(frameSampleSize?: number);
|
|
13
|
+
/**
|
|
14
|
+
* Returns the average frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
|
|
15
|
+
*/
|
|
16
|
+
get averageFrameTime(): number;
|
|
17
|
+
/**
|
|
18
|
+
* Returns the variance frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
|
|
19
|
+
*/
|
|
20
|
+
get averageFrameTimeVariance(): number;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the frame time of the most recent frame
|
|
23
|
+
*/
|
|
24
|
+
get instantaneousFrameTime(): number;
|
|
25
|
+
/**
|
|
26
|
+
* Returns the average framerate in frames per second over the sliding window (or the subset of frames sampled so far)
|
|
27
|
+
*/
|
|
28
|
+
get averageFPS(): number;
|
|
29
|
+
/**
|
|
30
|
+
* Returns the average framerate in frames per second using the most recent frame time
|
|
31
|
+
*/
|
|
32
|
+
get instantaneousFPS(): number;
|
|
33
|
+
/**
|
|
34
|
+
* Returns true if enough samples have been taken to completely fill the sliding window
|
|
35
|
+
*/
|
|
36
|
+
get isSaturated(): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Returns true if sampling is enabled
|
|
39
|
+
*/
|
|
40
|
+
get isEnabled(): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Samples current frame
|
|
43
|
+
* @param timeMs A timestamp in milliseconds of the current frame to compare with other frames
|
|
44
|
+
*/
|
|
45
|
+
sampleFrame(timeMs?: number): void;
|
|
46
|
+
Now(): number;
|
|
47
|
+
/**
|
|
48
|
+
* Enables contributions to the sliding window sample set
|
|
49
|
+
*/
|
|
50
|
+
enable(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Disables contributions to the sliding window sample set
|
|
53
|
+
* Samples will not be interpolated over the disabled period
|
|
54
|
+
*/
|
|
55
|
+
disable(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Resets performance monitor
|
|
58
|
+
*/
|
|
59
|
+
reset(): void;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* RollingAverage
|
|
63
|
+
*
|
|
64
|
+
* Utility to efficiently compute the rolling average and variance over a sliding window of samples
|
|
65
|
+
*/
|
|
66
|
+
export declare class RollingAverage {
|
|
67
|
+
/**
|
|
68
|
+
* Current average
|
|
69
|
+
*/
|
|
70
|
+
average: number;
|
|
71
|
+
/**
|
|
72
|
+
* Current variance
|
|
73
|
+
*/
|
|
74
|
+
variance: number;
|
|
75
|
+
protected _samples: number[];
|
|
76
|
+
protected _sampleCount: number;
|
|
77
|
+
protected _pos: number;
|
|
78
|
+
protected _m2: number;
|
|
79
|
+
/**
|
|
80
|
+
* constructor
|
|
81
|
+
* @param length The number of samples required to saturate the sliding window
|
|
82
|
+
*/
|
|
83
|
+
constructor(length: number);
|
|
84
|
+
/**
|
|
85
|
+
* Adds a sample to the sample set
|
|
86
|
+
* @param v The sample value
|
|
87
|
+
*/
|
|
88
|
+
add(v: number): void;
|
|
89
|
+
/**
|
|
90
|
+
* Returns previously added values or null if outside of history or outside the sliding window domain
|
|
91
|
+
* @param i Index in history. For example, pass 0 for the most recent value and 1 for the value before that
|
|
92
|
+
* @return Value previously recorded with add() or null if outside of range
|
|
93
|
+
*/
|
|
94
|
+
history(i: number): number;
|
|
95
|
+
/**
|
|
96
|
+
* Returns true if enough samples have been taken to completely fill the sliding window
|
|
97
|
+
* @return true if sample-set saturated
|
|
98
|
+
*/
|
|
99
|
+
isSaturated(): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Resets the rolling average (equivalent to 0 samples taken so far)
|
|
102
|
+
*/
|
|
103
|
+
reset(): void;
|
|
104
|
+
/**
|
|
105
|
+
* Wraps a value around the sample range boundaries
|
|
106
|
+
* @param i Position in sample range, for example if the sample length is 5, and i is -3, then 2 will be returned.
|
|
107
|
+
* @return Wrapped position in sample range
|
|
108
|
+
*/
|
|
109
|
+
protected _wrapPosition(i: number): number;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=performance-monitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance-monitor.d.ts","sourceRoot":"","sources":["../../../src/basics/performance-monitor.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,QAAQ,CAAiB;IAEjC,OAAO,CAAC,iBAAiB,CAAkB;IAE3C,OAAO,CAAC,gBAAgB,CAAmB;IAE3C;;;OAGG;gBACS,eAAe,GAAE,MAAW;IAIxC;;OAEG;IACH,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IAED;;OAEG;IACH,IAAI,wBAAwB,IAAI,MAAM,CAErC;IAED;;OAEG;IACH,IAAI,sBAAsB,IAAI,MAAM,CAEnC;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED;;OAEG;IACH,IAAI,gBAAgB,IAAI,MAAM,CAQ7B;IAED;;OAEG;IACH,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;;OAGG;IACH,WAAW,CAAC,MAAM,GAAE,MAAmB;IAavC,GAAG,IAAI,MAAM;IAQb;;OAEG;IACH,MAAM;IAIN;;;OAGG;IACH,OAAO;IAMP;;OAEG;IACH,KAAK;CAMR;AAED;;;;GAIG;AACH,qBAAa,cAAc;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAK;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAK;IAErB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAM;IAElC,SAAS,CAAC,YAAY,EAAE,MAAM,CAAK;IAEnC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAK;IAE3B,SAAS,CAAC,GAAG,EAAE,MAAM,CAAK;IAE1B;;;OAGG;gBACS,MAAM,EAAE,MAAM;IAK1B;;;OAGG;IACH,GAAG,CAAC,CAAC,EAAE,MAAM;IA6Bb;;;;OAIG;IACH,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAS1B;;;OAGG;IACH,WAAW,IAAI,OAAO;IAItB;;OAEG;IACH,KAAK;IAQL;;;;OAIG;IACH,SAAS,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;CAI7C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BaseObject } from '../base-object';
|
|
2
|
+
import type { IBoundRect } from './vector2';
|
|
3
|
+
export declare function getOffsetRectForDom(ele: HTMLElement): {
|
|
4
|
+
top: number;
|
|
5
|
+
left: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function transformBoundingCoord(object: BaseObject, bounds: IBoundRect): {
|
|
8
|
+
minX: number;
|
|
9
|
+
maxX: number;
|
|
10
|
+
minY: number;
|
|
11
|
+
maxY: number;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=position.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../src/basics/position.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,WAAW;;;EAiBnD;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU;;;;;EAoB5E"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BaseObject } from '../base-object';
|
|
2
|
+
import type { IMouseEvent, IPointerEvent } from './i-events';
|
|
3
|
+
export declare function attachObjectHover(o: BaseObject, hoverIn: (o: any, evt: IPointerEvent | IMouseEvent) => void, hoverOut: (o: any, evt: IPointerEvent | IMouseEvent) => void): void;
|
|
4
|
+
//# sourceMappingURL=quick-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quick-event.d.ts","sourceRoot":"","sources":["../../../src/basics/quick-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE7D,wBAAgB,iBAAiB,CAC7B,CAAC,EAAE,UAAU,EACb,OAAO,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,KAAK,IAAI,EAC3D,QAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,KAAK,IAAI,QAS/D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ITextRangeParam } from '@univerjs/core';
|
|
2
|
+
export interface ITextSelectionStyle {
|
|
3
|
+
strokeWidth: number;
|
|
4
|
+
stroke: string;
|
|
5
|
+
strokeActive: string;
|
|
6
|
+
fill: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const NORMAL_TEXT_SELECTION_PLUGIN_STYLE: ITextSelectionStyle;
|
|
9
|
+
export interface ITextRangeWithStyle extends ITextRangeParam {
|
|
10
|
+
style?: ITextSelectionStyle;
|
|
11
|
+
}
|
|
12
|
+
export declare enum RANGE_DIRECTION {
|
|
13
|
+
NONE = "none",
|
|
14
|
+
BACKWARD = "backward",
|
|
15
|
+
FORWARD = "forward"
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=range.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../src/basics/range.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,WAAW,mBAAmB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,kCAAkC,EAAE,mBAKhD,CAAC;AAEF,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IACxD,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC/B;AAED,oBAAY,eAAe;IACvB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,OAAO,YAAY;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-xy.d.ts","sourceRoot":"","sources":["../../../src/basics/scroll-xy.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,GAAG;;;EAgBlD"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { IRange, IRangeWithCoord, IScale, ISelectionCell, ISelectionCellWithCoord, IStyleBase, LocaleService, Nullable } from '@univerjs/core';
|
|
2
|
+
import type { IBoundRectNoAngle } from './vector2';
|
|
3
|
+
export declare const getColor: (RgbArray: number[], opacity?: number) => string;
|
|
4
|
+
export declare const toPx: (num: number | string, ReferenceValue: Nullable<number>) => number;
|
|
5
|
+
/**
|
|
6
|
+
* Queue a new function into the requested animation frame pool (ie. this function will be executed byt the browser for the next frame)
|
|
7
|
+
* @param func - the function to be called
|
|
8
|
+
* @param requester - the object that will request the next frame. Falls back to window.
|
|
9
|
+
* @returns frame number
|
|
10
|
+
*/
|
|
11
|
+
export declare const requestNewFrame: (func: Function, requester?: any) => number;
|
|
12
|
+
export declare const cancelRequestFrame: (requestID: number, requester?: any) => any;
|
|
13
|
+
export declare const createCanvasElement: () => HTMLCanvasElement;
|
|
14
|
+
export declare const createImageElement: () => HTMLImageElement;
|
|
15
|
+
export declare const radToDeg: (rad: number) => number;
|
|
16
|
+
export declare const degToRad: (deg: number) => number;
|
|
17
|
+
/**
|
|
18
|
+
* Gets the pointer prefix to use
|
|
19
|
+
* @param engine defines the engine we are finding the prefix for
|
|
20
|
+
* @returns "pointer" if touch is enabled. Else returns "mouse"
|
|
21
|
+
*/
|
|
22
|
+
export declare const getPointerPrefix: () => string;
|
|
23
|
+
/**
|
|
24
|
+
* Utility function to detect if the current user agent is Safari
|
|
25
|
+
* @returns whether or not the current user agent is safari
|
|
26
|
+
*/
|
|
27
|
+
export declare const IsSafari: () => boolean;
|
|
28
|
+
export declare const generateRandomKey: (prefix?: string, keyLength?: number) => string;
|
|
29
|
+
export declare function getValueType(value: unknown): string;
|
|
30
|
+
export declare function isFunction(value?: unknown): value is boolean;
|
|
31
|
+
export declare function isDate(value?: Date): value is Date;
|
|
32
|
+
export declare function isRegExp(value?: unknown): value is RegExp;
|
|
33
|
+
export declare function isArray<T>(value?: unknown): value is T[];
|
|
34
|
+
export declare function isString(value?: unknown): value is string;
|
|
35
|
+
export declare function isNumber(value?: unknown): value is number;
|
|
36
|
+
export declare function isObject(value?: unknown): value is object;
|
|
37
|
+
export declare function precisionTo(num: number, accurate: number): number;
|
|
38
|
+
/**
|
|
39
|
+
* performance testing
|
|
40
|
+
* var time = performance.now(); for(let i=0;i<100000000;i++){ fixLineWidthByScale(i, 0.666); }; console.log(performance.now()-time);
|
|
41
|
+
*/
|
|
42
|
+
export declare function fixLineWidthByScale(num: number, scale: number): number;
|
|
43
|
+
export declare function getFontStyleString(textStyle?: IStyleBase, localeService?: LocaleService): {
|
|
44
|
+
fontCache: string;
|
|
45
|
+
fontString: string;
|
|
46
|
+
fontSize: number;
|
|
47
|
+
fontFamily: string;
|
|
48
|
+
};
|
|
49
|
+
export declare function isSupportBoundingBox(ctx: CanvasRenderingContext2D): boolean;
|
|
50
|
+
export declare function hasChineseText(text: string): boolean;
|
|
51
|
+
export declare function hasJapaneseText(text: string): boolean;
|
|
52
|
+
export declare function hasKoreanText(text: string): boolean;
|
|
53
|
+
export declare function hasCJK(text: string): boolean;
|
|
54
|
+
export declare function hasWrappableText(text: string): boolean;
|
|
55
|
+
export declare function hasAllLatin(text: string): boolean;
|
|
56
|
+
export declare function hasBasicLatin(text: string): boolean;
|
|
57
|
+
export declare function hasLatinOneSupplement(text: string): boolean;
|
|
58
|
+
export declare function hasLatinExtendedA(text: string): boolean;
|
|
59
|
+
export declare function hasLatinExtendedB(text: string): boolean;
|
|
60
|
+
export declare function hasArabic(text: string): boolean;
|
|
61
|
+
export declare function hasTibetan(text: string): boolean;
|
|
62
|
+
export declare function hasSpaceAndTab(text: string): boolean;
|
|
63
|
+
export declare function getDPI(): number;
|
|
64
|
+
export declare function ptToPx(pt: number): number;
|
|
65
|
+
export declare function pxToPt(px: number): number;
|
|
66
|
+
export declare function ptToMM(px: number): number;
|
|
67
|
+
export declare function pxToInch(px: number): number;
|
|
68
|
+
export declare function getScale(parentScale: IScale): number;
|
|
69
|
+
export declare function getCellPositionByIndex(row: number, column: number, rowHeightAccumulation: number[], columnWidthAccumulation: number[]): {
|
|
70
|
+
startY: number;
|
|
71
|
+
endY: number;
|
|
72
|
+
startX: number;
|
|
73
|
+
endX: number;
|
|
74
|
+
};
|
|
75
|
+
export declare function getCellByIndex(row: number, column: number, rowHeightAccumulation: number[], columnWidthAccumulation: number[], mergeData: IRange[]): ISelectionCellWithCoord;
|
|
76
|
+
/**
|
|
77
|
+
* Determines whether the cell(row, column) is within the range of the merged cells.
|
|
78
|
+
*/
|
|
79
|
+
export declare function getCellInfoInMergeData(row: number, column: number, mergeData?: IRange[]): ISelectionCell;
|
|
80
|
+
/**
|
|
81
|
+
* Determine whether there are any cells in a row that are not in the merged cells, mainly used for the calculation of auto height
|
|
82
|
+
*/
|
|
83
|
+
export declare function hasUnMergedCellInRow(row: number, startColumn: number, endColumn: number, mergeData: IRange[]): boolean;
|
|
84
|
+
export declare function mergeInfoOffset(mergeInfo: IRangeWithCoord, offsetX: number, offsetY: number, scaleX: number, scaleY: number): {
|
|
85
|
+
startX: number;
|
|
86
|
+
startY: number;
|
|
87
|
+
endX: number;
|
|
88
|
+
endY: number;
|
|
89
|
+
startRow: number;
|
|
90
|
+
startColumn: number;
|
|
91
|
+
endRow: number;
|
|
92
|
+
endColumn: number;
|
|
93
|
+
rangeType?: import("@univerjs/core").RANGE_TYPE | undefined;
|
|
94
|
+
startAbsoluteRefType?: import("@univerjs/core").AbsoluteRefType | undefined;
|
|
95
|
+
endAbsoluteRefType?: import("@univerjs/core").AbsoluteRefType | undefined;
|
|
96
|
+
};
|
|
97
|
+
export declare function isRectIntersect(rect1: IBoundRectNoAngle, rect2: IBoundRectNoAngle): boolean;
|
|
98
|
+
export declare function injectStyle(styles: string[]): void;
|
|
99
|
+
export declare function checkStyle(content: string): boolean;
|
|
100
|
+
export declare function pxToNum(unit: string): number;
|
|
101
|
+
export declare function getSizeForDom(dom: HTMLElement): {
|
|
102
|
+
top: number;
|
|
103
|
+
left: number;
|
|
104
|
+
right: number;
|
|
105
|
+
bottom: number;
|
|
106
|
+
width: number;
|
|
107
|
+
height: number;
|
|
108
|
+
};
|
|
109
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/basics/t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;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,QAU3C;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,WAQzC;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,UAEnC;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW;;;;;;;EAW7C"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { ITransformState } from '@univerjs/core';
|
|
2
|
+
import type { IRect } from './interfaces';
|
|
3
|
+
import { Vector2 } from './vector2';
|
|
4
|
+
export declare const INITIAL_MATRIX: number[];
|
|
5
|
+
export declare class Transform {
|
|
6
|
+
dirty: boolean;
|
|
7
|
+
private _m;
|
|
8
|
+
constructor(m?: number[]);
|
|
9
|
+
static create(m?: number[]): Transform;
|
|
10
|
+
reset(): void;
|
|
11
|
+
/**
|
|
12
|
+
* Copy UniverSheet.Transform object
|
|
13
|
+
* @method
|
|
14
|
+
* @name UniverSheet.Transform#copy
|
|
15
|
+
* @returns {UniverSheet.Transform}
|
|
16
|
+
* @example
|
|
17
|
+
* const tr = shape.getTransform().copy()
|
|
18
|
+
*/
|
|
19
|
+
copy(): Transform;
|
|
20
|
+
copyInto(tr: Transform): void;
|
|
21
|
+
/**
|
|
22
|
+
* Transform point
|
|
23
|
+
* @method
|
|
24
|
+
* @name UniverSheet.Transform#point
|
|
25
|
+
* @param {Object} point 2D point(x, y)
|
|
26
|
+
* @returns {Object} 2D point(x, y)
|
|
27
|
+
*/
|
|
28
|
+
applyPoint(point: Vector2, ignoreOffset?: boolean): Vector2;
|
|
29
|
+
/**
|
|
30
|
+
* Apply translation
|
|
31
|
+
* @method
|
|
32
|
+
* @name universheet.Transform#translate
|
|
33
|
+
* @param {Number} x
|
|
34
|
+
* @param {Number} y
|
|
35
|
+
* @returns {UniverSheet.Transform}
|
|
36
|
+
*/
|
|
37
|
+
translate(x: number, y: number): this;
|
|
38
|
+
/**
|
|
39
|
+
* Apply scale
|
|
40
|
+
* @method
|
|
41
|
+
* @name UniverSheet.Transform#scale
|
|
42
|
+
* @param {Number} sx
|
|
43
|
+
* @param {Number} sy
|
|
44
|
+
* @returns {UniverSheet.Transform}
|
|
45
|
+
*/
|
|
46
|
+
scale(sx: number, sy: number): this;
|
|
47
|
+
/**
|
|
48
|
+
* Apply rotation
|
|
49
|
+
* @method
|
|
50
|
+
* @name UniverSheet.Transform#rotate
|
|
51
|
+
* @param {Number} Degree Angle in Degree
|
|
52
|
+
* @returns {UniverSheet.Transform}
|
|
53
|
+
*/
|
|
54
|
+
rotate(deg: number): this;
|
|
55
|
+
/**
|
|
56
|
+
* Returns the translation
|
|
57
|
+
* @method
|
|
58
|
+
* @name UniverSheet.Transform#getTranslation
|
|
59
|
+
* @returns {Object} 2D point(x, y)
|
|
60
|
+
*/
|
|
61
|
+
getTranslation(): {
|
|
62
|
+
x: number;
|
|
63
|
+
y: number;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Apply skew
|
|
67
|
+
* @method
|
|
68
|
+
* @name UniverSheet.Transform#skew
|
|
69
|
+
* @param {Number} sx
|
|
70
|
+
* @param {Number} sy
|
|
71
|
+
* @returns {UniverSheet.Transform}
|
|
72
|
+
*/
|
|
73
|
+
skew(sx: number, sy: number): this;
|
|
74
|
+
/**
|
|
75
|
+
* Transform multiplication
|
|
76
|
+
* @method
|
|
77
|
+
* @name UniverSheet.Transform#multiply
|
|
78
|
+
* @param {UniverSheet.Transform} matrix
|
|
79
|
+
* @returns {UniverSheet.Transform}
|
|
80
|
+
*/
|
|
81
|
+
multiply(matrix: Transform): this;
|
|
82
|
+
/**
|
|
83
|
+
* Invert the matrix
|
|
84
|
+
* @method
|
|
85
|
+
* @name UniverSheet.Transform#invert
|
|
86
|
+
* @returns {UniverSheet.Transform}
|
|
87
|
+
*/
|
|
88
|
+
invert(): this;
|
|
89
|
+
/**
|
|
90
|
+
* return matrix
|
|
91
|
+
* @method
|
|
92
|
+
* @name UniverSheet.Transform#getMatrix
|
|
93
|
+
*/
|
|
94
|
+
getMatrix(): number[];
|
|
95
|
+
/**
|
|
96
|
+
* return matrix
|
|
97
|
+
* @method
|
|
98
|
+
* @name UniverSheet.Transform#getMatrix
|
|
99
|
+
*/
|
|
100
|
+
getMatrixByAccurate(accurate?: number): number[];
|
|
101
|
+
/**
|
|
102
|
+
* set to absolute position via translation
|
|
103
|
+
* @method
|
|
104
|
+
* @name UniverSheet.Transform#setAbsolutePosition
|
|
105
|
+
* @returns {UniverSheet.Transform}
|
|
106
|
+
*/
|
|
107
|
+
setAbsolutePosition(coord: Vector2): this;
|
|
108
|
+
/**
|
|
109
|
+
* convert transformation matrix back into node's attributes
|
|
110
|
+
* @method
|
|
111
|
+
* @name UniverSheet.Transform#decompose
|
|
112
|
+
* @returns {UniverSheet.Transform}
|
|
113
|
+
*/
|
|
114
|
+
decompose(): {
|
|
115
|
+
x: number;
|
|
116
|
+
y: number;
|
|
117
|
+
angle: number;
|
|
118
|
+
scaleX: number;
|
|
119
|
+
scaleY: number;
|
|
120
|
+
skewX: number;
|
|
121
|
+
skewY: number;
|
|
122
|
+
};
|
|
123
|
+
makeBoundingBoxFromPoints(points: Vector2[]): IRect;
|
|
124
|
+
composeMatrix(options: ITransformState): this;
|
|
125
|
+
clone(): Transform;
|
|
126
|
+
/**
|
|
127
|
+
* Returns a transform matrix starting from an object of the same kind of
|
|
128
|
+
* the one returned from qrDecompose, useful also if you want to calculate some
|
|
129
|
+
* transformations from an object that is not enLived yet.
|
|
130
|
+
* is called DimensionsTransformMatrix because those properties are the one that influence
|
|
131
|
+
* the size of the resulting box of the object.
|
|
132
|
+
* @param {Object} options
|
|
133
|
+
* @param {Number} [options.scaleX]
|
|
134
|
+
* @param {Number} [options.scaleY]
|
|
135
|
+
* @param {Boolean} [options.flipX]
|
|
136
|
+
* @param {Boolean} [options.flipY]
|
|
137
|
+
* @param {Number} [options.skewX]
|
|
138
|
+
* @param {Number} [options.skewX]
|
|
139
|
+
* @return {Number[]} transform matrix
|
|
140
|
+
*/
|
|
141
|
+
private _calcDimensionsMatrix;
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=transform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/basics/transform.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,eAAO,MAAM,cAAc,EAAE,MAAM,EAAuB,CAAC;AAE3D,qBAAa,SAAS;IAClB,KAAK,UAAS;IAEd,OAAO,CAAC,EAAE,CAAW;gBAET,CAAC,WAAiB;IAI9B,MAAM,CAAC,MAAM,CAAC,CAAC,WAAiB;IAIhC,KAAK;IASL;;;;;;;OAOG;IACH,IAAI;IAIJ,QAAQ,CAAC,EAAE,EAAE,SAAS;IAStB;;;;;;OAMG;IACH,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,GAAE,OAAe,GAAG,OAAO;IAUlE;;;;;;;OAOG;IACH,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAM9B;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;IAQ5B;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM;IAelB;;;;;OAKG;IACH,cAAc;;;;IAOd;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;IAY3B;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS;IAmB1B;;;;;OAKG;IACH,MAAM;IAiBN;;;;OAIG;IACH,SAAS;IAIT;;;;OAIG;IACH,mBAAmB,CAAC,QAAQ,SAAI;IAIhC;;;;;OAKG;IACH,mBAA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