@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.
Files changed (225) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -0
  3. package/lib/cjs/index.js +23962 -0
  4. package/lib/esm/index.js +23259 -0
  5. package/lib/types/base-object.d.ts +155 -0
  6. package/lib/types/base-object.d.ts.map +1 -0
  7. package/lib/types/basics/cell-data.d.ts +6 -0
  8. package/lib/types/basics/cell-data.d.ts.map +1 -0
  9. package/lib/types/basics/const.d.ts +263 -0
  10. package/lib/types/basics/const.d.ts.map +1 -0
  11. package/lib/types/basics/document-node-tools.d.ts +10 -0
  12. package/lib/types/basics/document-node-tools.d.ts.map +1 -0
  13. package/lib/types/basics/draw.d.ts +39 -0
  14. package/lib/types/basics/draw.d.ts.map +1 -0
  15. package/lib/types/basics/font-cache.d.ts +37 -0
  16. package/lib/types/basics/font-cache.d.ts.map +1 -0
  17. package/lib/types/basics/i-document-skeleton-cached.d.ts +210 -0
  18. package/lib/types/basics/i-document-skeleton-cached.d.ts.map +1 -0
  19. package/lib/types/basics/i-events.d.ts +304 -0
  20. package/lib/types/basics/i-events.d.ts.map +1 -0
  21. package/lib/types/basics/index.d.ts +16 -0
  22. package/lib/types/basics/index.d.ts.map +1 -0
  23. package/lib/types/basics/interfaces.d.ts +102 -0
  24. package/lib/types/basics/interfaces.d.ts.map +1 -0
  25. package/lib/types/basics/path2.d.ts +10 -0
  26. package/lib/types/basics/path2.d.ts.map +1 -0
  27. package/lib/types/basics/performance-monitor.d.ts +111 -0
  28. package/lib/types/basics/performance-monitor.d.ts.map +1 -0
  29. package/lib/types/basics/position.d.ts +13 -0
  30. package/lib/types/basics/position.d.ts.map +1 -0
  31. package/lib/types/basics/quick-event.d.ts +4 -0
  32. package/lib/types/basics/quick-event.d.ts.map +1 -0
  33. package/lib/types/basics/range.d.ts +17 -0
  34. package/lib/types/basics/range.d.ts.map +1 -0
  35. package/lib/types/basics/scroll-xy.d.ts +5 -0
  36. package/lib/types/basics/scroll-xy.d.ts.map +1 -0
  37. package/lib/types/basics/tools.d.ts +109 -0
  38. package/lib/types/basics/tools.d.ts.map +1 -0
  39. package/lib/types/basics/transform.d.ts +143 -0
  40. package/lib/types/basics/transform.d.ts.map +1 -0
  41. package/lib/types/basics/unit-convert.d.ts +3 -0
  42. package/lib/types/basics/unit-convert.d.ts.map +1 -0
  43. package/lib/types/basics/vector2.d.ts +438 -0
  44. package/lib/types/basics/vector2.d.ts.map +1 -0
  45. package/lib/types/canvas.d.ts +55 -0
  46. package/lib/types/canvas.d.ts.map +1 -0
  47. package/lib/types/components/component.d.ts +13 -0
  48. package/lib/types/components/component.d.ts.map +1 -0
  49. package/lib/types/components/docs/block/block-error.d.ts +2 -0
  50. package/lib/types/components/docs/block/block-error.d.ts.map +1 -0
  51. package/lib/types/components/docs/block/index.d.ts +4 -0
  52. package/lib/types/components/docs/block/index.d.ts.map +1 -0
  53. package/lib/types/components/docs/block/paragraph/bullet-ruler.d.ts +3 -0
  54. package/lib/types/components/docs/block/paragraph/bullet-ruler.d.ts.map +1 -0
  55. package/lib/types/components/docs/block/paragraph/bullet.d.ts +5 -0
  56. package/lib/types/components/docs/block/paragraph/bullet.d.ts.map +1 -0
  57. package/lib/types/components/docs/block/paragraph/index.d.ts +7 -0
  58. package/lib/types/components/docs/block/paragraph/index.d.ts.map +1 -0
  59. package/lib/types/components/docs/block/paragraph/inline-drawing.d.ts +5 -0
  60. package/lib/types/components/docs/block/paragraph/inline-drawing.d.ts.map +1 -0
  61. package/lib/types/components/docs/block/paragraph/language-ruler.d.ts +12 -0
  62. package/lib/types/components/docs/block/paragraph/language-ruler.d.ts.map +1 -0
  63. package/lib/types/components/docs/block/paragraph/layout-ruler.d.ts +4 -0
  64. package/lib/types/components/docs/block/paragraph/layout-ruler.d.ts.map +1 -0
  65. package/lib/types/components/docs/block/paragraph/paragraph.d.ts +6 -0
  66. package/lib/types/components/docs/block/paragraph/paragraph.d.ts.map +1 -0
  67. package/lib/types/components/docs/block/section.d.ts +10 -0
  68. package/lib/types/components/docs/block/section.d.ts.map +1 -0
  69. package/lib/types/components/docs/block/table/table-cell.d.ts +1 -0
  70. package/lib/types/components/docs/block/table/table-cell.d.ts.map +1 -0
  71. package/lib/types/components/docs/block/table/table-row.d.ts +1 -0
  72. package/lib/types/components/docs/block/table/table-row.d.ts.map +1 -0
  73. package/lib/types/components/docs/block/table/table.d.ts +1 -0
  74. package/lib/types/components/docs/block/table/table.d.ts.map +1 -0
  75. package/lib/types/components/docs/common/column.d.ts +5 -0
  76. package/lib/types/components/docs/common/column.d.ts.map +1 -0
  77. package/lib/types/components/docs/common/convert-cursor.d.ts +60 -0
  78. package/lib/types/components/docs/common/convert-cursor.d.ts.map +1 -0
  79. package/lib/types/components/docs/common/index.d.ts +10 -0
  80. package/lib/types/components/docs/common/index.d.ts.map +1 -0
  81. package/lib/types/components/docs/common/line.d.ts +20 -0
  82. package/lib/types/components/docs/common/line.d.ts.map +1 -0
  83. package/lib/types/components/docs/common/liquid.d.ts +41 -0
  84. package/lib/types/components/docs/common/liquid.d.ts.map +1 -0
  85. package/lib/types/components/docs/common/page.d.ts +5 -0
  86. package/lib/types/components/docs/common/page.d.ts.map +1 -0
  87. package/lib/types/components/docs/common/range.d.ts +45 -0
  88. package/lib/types/components/docs/common/range.d.ts.map +1 -0
  89. package/lib/types/components/docs/common/section.d.ts +6 -0
  90. package/lib/types/components/docs/common/section.d.ts.map +1 -0
  91. package/lib/types/components/docs/common/span.d.ts +12 -0
  92. package/lib/types/components/docs/common/span.d.ts.map +1 -0
  93. package/lib/types/components/docs/common/tools.d.ts +73 -0
  94. package/lib/types/components/docs/common/tools.d.ts.map +1 -0
  95. package/lib/types/components/docs/doc-component.d.ts +34 -0
  96. package/lib/types/components/docs/doc-component.d.ts.map +1 -0
  97. package/lib/types/components/docs/doc-extension.d.ts +12 -0
  98. package/lib/types/components/docs/doc-extension.d.ts.map +1 -0
  99. package/lib/types/components/docs/doc-skeleton.d.ts +71 -0
  100. package/lib/types/components/docs/doc-skeleton.d.ts.map +1 -0
  101. package/lib/types/components/docs/document.d.ts +54 -0
  102. package/lib/types/components/docs/document.d.ts.map +1 -0
  103. package/lib/types/components/docs/extensions/background.d.ts +11 -0
  104. package/lib/types/components/docs/extensions/background.d.ts.map +1 -0
  105. package/lib/types/components/docs/extensions/border.d.ts +13 -0
  106. package/lib/types/components/docs/extensions/border.d.ts.map +1 -0
  107. package/lib/types/components/docs/extensions/font-and-base-line.d.ts +12 -0
  108. package/lib/types/components/docs/extensions/font-and-base-line.d.ts.map +1 -0
  109. package/lib/types/components/docs/extensions/index.d.ts +5 -0
  110. package/lib/types/components/docs/extensions/index.d.ts.map +1 -0
  111. package/lib/types/components/docs/extensions/line.d.ts +13 -0
  112. package/lib/types/components/docs/extensions/line.d.ts.map +1 -0
  113. package/lib/types/components/docs/horizon-bar.d.ts +3 -0
  114. package/lib/types/components/docs/horizon-bar.d.ts.map +1 -0
  115. package/lib/types/components/docs/index.d.ts +8 -0
  116. package/lib/types/components/docs/index.d.ts.map +1 -0
  117. package/lib/types/components/docs/text-selection-render-manager.d.ts +156 -0
  118. package/lib/types/components/docs/text-selection-render-manager.d.ts.map +1 -0
  119. package/lib/types/components/docs/vertical-bar.d.ts +3 -0
  120. package/lib/types/components/docs/vertical-bar.d.ts.map +1 -0
  121. package/lib/types/components/docs/view-model/data-stream-tree-node.d.ts +39 -0
  122. package/lib/types/components/docs/view-model/data-stream-tree-node.d.ts.map +1 -0
  123. package/lib/types/components/docs/view-model/document-view-model.d.ts +51 -0
  124. package/lib/types/components/docs/view-model/document-view-model.d.ts.map +1 -0
  125. package/lib/types/components/extension.d.ts +29 -0
  126. package/lib/types/components/extension.d.ts.map +1 -0
  127. package/lib/types/components/index.d.ts +7 -0
  128. package/lib/types/components/index.d.ts.map +1 -0
  129. package/lib/types/components/sheets/column-header.d.ts +13 -0
  130. package/lib/types/components/sheets/column-header.d.ts.map +1 -0
  131. package/lib/types/components/sheets/extensions/background.d.ts +9 -0
  132. package/lib/types/components/sheets/extensions/background.d.ts.map +1 -0
  133. package/lib/types/components/sheets/extensions/border-auxiliary.d.ts +13 -0
  134. package/lib/types/components/sheets/extensions/border-auxiliary.d.ts.map +1 -0
  135. package/lib/types/components/sheets/extensions/border.d.ts +10 -0
  136. package/lib/types/components/sheets/extensions/border.d.ts.map +1 -0
  137. package/lib/types/components/sheets/extensions/column-header-layout.d.ts +9 -0
  138. package/lib/types/components/sheets/extensions/column-header-layout.d.ts.map +1 -0
  139. package/lib/types/components/sheets/extensions/font.d.ts +15 -0
  140. package/lib/types/components/sheets/extensions/font.d.ts.map +1 -0
  141. package/lib/types/components/sheets/extensions/index.d.ts +8 -0
  142. package/lib/types/components/sheets/extensions/index.d.ts.map +1 -0
  143. package/lib/types/components/sheets/extensions/row-header-layout.d.ts +9 -0
  144. package/lib/types/components/sheets/extensions/row-header-layout.d.ts.map +1 -0
  145. package/lib/types/components/sheets/extensions/sheet-extension.d.ts +11 -0
  146. package/lib/types/components/sheets/extensions/sheet-extension.d.ts.map +1 -0
  147. package/lib/types/components/sheets/index.d.ts +8 -0
  148. package/lib/types/components/sheets/index.d.ts.map +1 -0
  149. package/lib/types/components/sheets/interfaces.d.ts +35 -0
  150. package/lib/types/components/sheets/interfaces.d.ts.map +1 -0
  151. package/lib/types/components/sheets/row-header.d.ts +13 -0
  152. package/lib/types/components/sheets/row-header.d.ts.map +1 -0
  153. package/lib/types/components/sheets/sheet-component.d.ts +38 -0
  154. package/lib/types/components/sheets/sheet-component.d.ts.map +1 -0
  155. package/lib/types/components/sheets/sheet-skeleton.d.ts +275 -0
  156. package/lib/types/components/sheets/sheet-skeleton.d.ts.map +1 -0
  157. package/lib/types/components/sheets/spreadsheet.d.ts +70 -0
  158. package/lib/types/components/sheets/spreadsheet.d.ts.map +1 -0
  159. package/lib/types/components/skeleton.d.ts +13 -0
  160. package/lib/types/components/skeleton.d.ts.map +1 -0
  161. package/lib/types/components/slides/index.d.ts +2 -0
  162. package/lib/types/components/slides/index.d.ts.map +1 -0
  163. package/lib/types/components/slides/slide.d.ts +27 -0
  164. package/lib/types/components/slides/slide.d.ts.map +1 -0
  165. package/lib/types/custom/custom-object.d.ts +13 -0
  166. package/lib/types/custom/custom-object.d.ts.map +1 -0
  167. package/lib/types/custom/index.d.ts +2 -0
  168. package/lib/types/custom/index.d.ts.map +1 -0
  169. package/lib/types/engine.d.ts +96 -0
  170. package/lib/types/engine.d.ts.map +1 -0
  171. package/lib/types/group.d.ts +25 -0
  172. package/lib/types/group.d.ts.map +1 -0
  173. package/lib/types/index.d.ts +17 -0
  174. package/lib/types/index.d.ts.map +1 -0
  175. package/lib/types/layer.d.ts +21 -0
  176. package/lib/types/layer.d.ts.map +1 -0
  177. package/lib/types/render-engine.d.ts +13 -0
  178. package/lib/types/render-engine.d.ts.map +1 -0
  179. package/lib/types/render-manager.service.d.ts +51 -0
  180. package/lib/types/render-manager.service.d.ts.map +1 -0
  181. package/lib/types/scene-viewer.d.ts +27 -0
  182. package/lib/types/scene-viewer.d.ts.map +1 -0
  183. package/lib/types/scene.-transformer.d.ts +129 -0
  184. package/lib/types/scene.-transformer.d.ts.map +1 -0
  185. package/lib/types/scene.d.ts +124 -0
  186. package/lib/types/scene.d.ts.map +1 -0
  187. package/lib/types/scene.input-manager.d.ts +46 -0
  188. package/lib/types/scene.input-manager.d.ts.map +1 -0
  189. package/lib/types/scroll-timer.d.ts +35 -0
  190. package/lib/types/scroll-timer.d.ts.map +1 -0
  191. package/lib/types/services/object-transform-manager.service.d.ts +41 -0
  192. package/lib/types/services/object-transform-manager.service.d.ts.map +1 -0
  193. package/lib/types/shape/base-scroll-bar.d.ts +47 -0
  194. package/lib/types/shape/base-scroll-bar.d.ts.map +1 -0
  195. package/lib/types/shape/circle.d.ts +18 -0
  196. package/lib/types/shape/circle.d.ts.map +1 -0
  197. package/lib/types/shape/control.d.ts +3 -0
  198. package/lib/types/shape/control.d.ts.map +1 -0
  199. package/lib/types/shape/drawing.d.ts +3 -0
  200. package/lib/types/shape/drawing.d.ts.map +1 -0
  201. package/lib/types/shape/index.d.ts +12 -0
  202. package/lib/types/shape/index.d.ts.map +1 -0
  203. package/lib/types/shape/path.d.ts +92 -0
  204. package/lib/types/shape/path.d.ts.map +1 -0
  205. package/lib/types/shape/picture.d.ts +24 -0
  206. package/lib/types/shape/picture.d.ts.map +1 -0
  207. package/lib/types/shape/rect.d.ts +17 -0
  208. package/lib/types/shape/rect.d.ts.map +1 -0
  209. package/lib/types/shape/regular-polygon.d.ts +42 -0
  210. package/lib/types/shape/regular-polygon.d.ts.map +1 -0
  211. package/lib/types/shape/rich-text.d.ts +45 -0
  212. package/lib/types/shape/rich-text.d.ts.map +1 -0
  213. package/lib/types/shape/scroll-bar.d.ts +45 -0
  214. package/lib/types/shape/scroll-bar.d.ts.map +1 -0
  215. package/lib/types/shape/selection.d.ts +3 -0
  216. package/lib/types/shape/selection.d.ts.map +1 -0
  217. package/lib/types/shape/shape.d.ts +120 -0
  218. package/lib/types/shape/shape.d.ts.map +1 -0
  219. package/lib/types/thin-engine.d.ts +33 -0
  220. package/lib/types/thin-engine.d.ts.map +1 -0
  221. package/lib/types/thin-scene.d.ts +76 -0
  222. package/lib/types/thin-scene.d.ts.map +1 -0
  223. package/lib/types/viewport.d.ts +193 -0
  224. package/lib/types/viewport.d.ts.map +1 -0
  225. package/package.json +52 -0
@@ -0,0 +1,210 @@
1
+ import type { BulletAlignment, ColumnSeparatorType, DataStreamTreeTokenType, IDocumentRenderConfig, IDrawing, IIndentStart, INestingLevel, ITextStyle, PageOrientType } from '@univerjs/core';
2
+ export interface IDocumentSkeletonCached extends ISkeletonResourceReference {
3
+ pages: IDocumentSkeletonPage[];
4
+ left: number;
5
+ top: number;
6
+ st: number;
7
+ ed?: number;
8
+ }
9
+ export interface ISkeletonResourceReference {
10
+ skeHeaders: Map<string, Map<number, IDocumentSkeletonHeader>>;
11
+ skeFooters: Map<string, Map<number, IDocumentSkeletonFooter>>;
12
+ skeListLevel?: Map<string, IDocumentSkeletonBullet[]>;
13
+ drawingAnchor?: Map<number, IDocumentSkeletonDrawingAnchor>;
14
+ }
15
+ export interface IDocumentSkeletonDrawingAnchor {
16
+ elements: IDocumentSkeletonLine[];
17
+ paragraphIndex: number;
18
+ top: number;
19
+ }
20
+ export interface IDocumentSkeletonHeaderFooterBase {
21
+ lines: IDocumentSkeletonLine[];
22
+ skeDrawings: Map<string, IDocumentSkeletonDrawing>;
23
+ height: number;
24
+ st: number;
25
+ ed: number;
26
+ marginLeft: number;
27
+ }
28
+ export interface IDocumentSkeletonHeader extends IDocumentSkeletonHeaderFooterBase {
29
+ marginTop: number;
30
+ }
31
+ export interface IDocumentSkeletonFooter extends IDocumentSkeletonHeaderFooterBase {
32
+ marginBottom: number;
33
+ }
34
+ export interface IDocumentSkeletonPage {
35
+ sections: IDocumentSkeletonSection[];
36
+ headerId: string;
37
+ footerId: string;
38
+ pageWidth: number;
39
+ pageHeight: number;
40
+ pageOrient: PageOrientType;
41
+ marginLeft: number;
42
+ marginRight: number;
43
+ marginTop: number;
44
+ marginBottom: number;
45
+ pageNumber: number;
46
+ pageNumberStart: number;
47
+ verticalAlign: Boolean;
48
+ angle: number;
49
+ width: number;
50
+ height: number;
51
+ breakType: BreakType;
52
+ st: number;
53
+ ed: number;
54
+ skeDrawings: Map<string, IDocumentSkeletonDrawing>;
55
+ renderConfig?: IDocumentRenderConfig;
56
+ parent?: IDocumentSkeletonCached;
57
+ }
58
+ export interface IDocumentSkeletonSection {
59
+ columns: IDocumentSkeletonColumn[];
60
+ colCount: number;
61
+ height: number;
62
+ top: number;
63
+ st: number;
64
+ ed: number;
65
+ parent?: IDocumentSkeletonPage;
66
+ }
67
+ export interface IDocumentSkeletonColumn {
68
+ lines: IDocumentSkeletonLine[];
69
+ left: number;
70
+ width: number;
71
+ height?: number;
72
+ spaceWidth: number;
73
+ separator: ColumnSeparatorType;
74
+ st: number;
75
+ ed: number;
76
+ drawingLRIds: [];
77
+ isFull: boolean;
78
+ parent?: IDocumentSkeletonSection;
79
+ }
80
+ export interface IDocumentSkeletonLine {
81
+ paragraphIndex: number;
82
+ type: LineType;
83
+ divides: IDocumentSkeletonDivide[];
84
+ divideLen: number;
85
+ lineHeight: number;
86
+ contentHeight: number;
87
+ top: number;
88
+ asc: number;
89
+ paddingTop: number;
90
+ paddingBottom: number;
91
+ marginTop: number;
92
+ marginBottom: number;
93
+ spaceBelowApply: number;
94
+ width?: number;
95
+ st: number;
96
+ ed: number;
97
+ lineIndex: number;
98
+ bullet?: IDocumentSkeletonBullet;
99
+ paragraphStart: boolean;
100
+ parent?: IDocumentSkeletonColumn;
101
+ }
102
+ export interface IDocumentSkeletonDivide {
103
+ spanGroup: IDocumentSkeletonSpan[];
104
+ width: number;
105
+ left: number;
106
+ paddingLeft: number;
107
+ isFull: boolean;
108
+ st: number;
109
+ ed: number;
110
+ parent?: IDocumentSkeletonLine;
111
+ }
112
+ export interface IDocumentSkeletonSpan {
113
+ eId?: string;
114
+ spanType: SpanType;
115
+ streamType: DataStreamTreeTokenType;
116
+ width: number;
117
+ bBox: IDocumentSkeletonBoundingBox;
118
+ paddingLeft: number;
119
+ left: number;
120
+ count?: number;
121
+ content?: string;
122
+ ts?: ITextStyle;
123
+ fontStyle?: IDocumentSkeletonFontStyle;
124
+ parent?: IDocumentSkeletonDivide;
125
+ url?: string;
126
+ featureId?: string;
127
+ }
128
+ export interface IDocumentSkeletonBullet extends IIndentStart {
129
+ listId: string;
130
+ symbol: string;
131
+ ts: ITextStyle;
132
+ fontStyle?: IDocumentSkeletonFontStyle;
133
+ startIndexItem: number;
134
+ bBox: IDocumentSkeletonBoundingBox;
135
+ nestingLevel?: INestingLevel;
136
+ bulletAlign?: BulletAlignment;
137
+ bulletType?: boolean;
138
+ }
139
+ export interface IDocumentSkeletonDrawing {
140
+ objectId: string;
141
+ aLeft: number;
142
+ aTop: number;
143
+ width: number;
144
+ height: number;
145
+ angle: number;
146
+ initialState: boolean;
147
+ drawingOrigin: IDrawing;
148
+ }
149
+ export interface IDocumentSkeletonFontStyle {
150
+ fontString: string;
151
+ fontSize: number;
152
+ fontFamily: string;
153
+ }
154
+ export interface IDocumentSkeletonBoundingBox {
155
+ width: number;
156
+ ba: number;
157
+ bd: number;
158
+ aba: number;
159
+ abd: number;
160
+ sp: number;
161
+ sbr: number;
162
+ sbo: number;
163
+ spr: number;
164
+ spo: number;
165
+ }
166
+ export declare enum SkeletonType {
167
+ SPAN = 0,
168
+ DIVIDE = 1,
169
+ LINE = 2,
170
+ COLUMN = 3,
171
+ SECTION = 4,
172
+ PAGE = 5,
173
+ DRAWING = 6,
174
+ BULLET = 7,
175
+ HEADER = 8,
176
+ FOOTER = 9,
177
+ ALL = 10
178
+ }
179
+ export declare enum BreakType {
180
+ SECTION = 0,
181
+ PAGE = 1,
182
+ COLUMN = 2
183
+ }
184
+ export declare enum LineType {
185
+ PARAGRAPH = 0,
186
+ BLOCK = 1
187
+ }
188
+ export declare enum SpanType {
189
+ LETTER = 0,
190
+ WORD = 1,
191
+ LIST = 2,
192
+ PLACEHOLDER = 3,
193
+ TAB = 4,
194
+ IMAGE = 5,
195
+ AT = 6,
196
+ MATH = 7,
197
+ MULTI_LINE = 8,
198
+ CUSTOM = 9
199
+ }
200
+ /**
201
+ * Determining the text layout, whether it's vertical or horizontal,
202
+ * data storage is primarily horizontal,
203
+ * and vertical layout is supported through rendering and drawing.
204
+ */
205
+ export declare enum PageLayoutType {
206
+ VERTICAL = 0,
207
+ HORIZONTAL = 1,
208
+ AUTO = 2
209
+ }
210
+ //# sourceMappingURL=i-document-skeleton-cached.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-document-skeleton-cached.d.ts","sourceRoot":"","sources":["../../../src/basics/i-document-skeleton-cached.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB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AAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,YAAY;IACpB,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,OAAO,IAAA;IACP,MAAM,IAAA;IACN,MAAM,IAAA;IACN,MAAM,IAAA;IACN,GAAG,KAAA;CACN;AAED,oBAAY,SAAS;IACjB,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,MAAM,IAAA;CACT;AAED,oBAAY,QAAQ;IAChB,SAAS,IAAA;IACT,KAAK,IAAA;CACR;AAED,oBAAY,QAAQ;IAChB,MAAM,IAAA;IACN,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,WAAW,IAAA;IACX,GAAG,IAAA;IACH,KAAK,IAAA;IACL,EAAE,IAAA;IACF,IAAI,IAAA;IACJ,UAAU,IAAA;IACV,MAAM,IAAA;CACT;AAED;;;;GAIG;AACH,oBAAY,cAAc;IACtB,QAAQ,IAAA;IACR,UAAU,IAAA;IACV,IAAI,IAAA;CACP"}
@@ -0,0 +1,304 @@
1
+ import type { Nullable } from '@univerjs/core';
2
+ /**
3
+ * Alias type for number that are floats
4
+ */
5
+ export type float = number;
6
+ /**
7
+ * Alias type for number that are doubles.
8
+ */
9
+ export type double = number;
10
+ export type int = number;
11
+ /**
12
+ * Alias type for number array or Float32Array
13
+ */
14
+ export type FloatArray = number[] | Float32Array;
15
+ /**
16
+ * Alias type for number array or Float32Array or Int32 Array or Uint32Array or Uint16Array
17
+ */
18
+ export type IndicesArray = number[] | Int32Array | Uint32Array | Uint16Array;
19
+ /**
20
+ * Alias for types that can be used by a Buffer or VertexBuffer.
21
+ */
22
+ export type DataArray = number[] | ArrayBuffer | ArrayBufferView;
23
+ /**
24
+ * Alias type for primitive types
25
+ */
26
+ type Primitive = undefined | null | boolean | string | number | Function;
27
+ /**
28
+ * Type modifier to make all the properties of an object Readonly
29
+ */
30
+ export type Immutable<T> = T extends Primitive ? T : T extends Array<infer U> ? readonly U[] : DeepImmutable<T>;
31
+ /**
32
+ * Type modifier to make all the properties of an object Readonly recursively
33
+ */
34
+ export type DeepImmutable<T> = T extends Primitive ? T : T extends Array<infer U> ? DeepImmutableArray<U> : DeepImmutableObject<T>;
35
+ /**
36
+ * Type modifier to make object properties readonly.
37
+ */
38
+ export type DeepImmutableObject<T> = {
39
+ readonly [K in keyof T]: DeepImmutable<T[K]>;
40
+ };
41
+ /** @hidden */
42
+ interface DeepImmutableArray<T> extends ReadonlyArray<DeepImmutable<T>> {
43
+ }
44
+ /** @hidden */
45
+ export interface Class<T> {
46
+ new (...param: any): T;
47
+ }
48
+ /**
49
+ * Event Types
50
+ */
51
+ export declare enum DeviceInputEventType {
52
+ /** PointerMove */
53
+ PointerMove = 0,
54
+ /** PointerDown */
55
+ PointerDown = 1,
56
+ /** PointerUp */
57
+ PointerUp = 2,
58
+ Dblclick = 3,
59
+ Keyboard = 4
60
+ }
61
+ /**
62
+ * Native friendly interface for Event Obj ect
63
+ */
64
+ export interface IEvent extends Event {
65
+ /**
66
+ * Device type
67
+ */
68
+ deviceType: DeviceType;
69
+ /**
70
+ * Device slot
71
+ */
72
+ inputIndex: number;
73
+ /**
74
+ * Previous state of given input
75
+ */
76
+ previousState: Nullable<number>;
77
+ /**
78
+ * Current state of given input
79
+ */
80
+ currentState: Nullable<number>;
81
+ }
82
+ /**
83
+ * Native friendly interface for UIEvent Object
84
+ */
85
+ export interface IUIEvent extends IEvent, UIEvent {
86
+ }
87
+ /**
88
+ * Native friendly interface for KeyboardEvent Object
89
+ */
90
+ export interface IKeyboardEvent extends IUIEvent {
91
+ /**
92
+ * Status of Alt key being pressed
93
+ */
94
+ altKey: boolean;
95
+ /**
96
+ * Unicode value of character pressed
97
+ * @deprecated
98
+ */
99
+ charCode?: number;
100
+ /**
101
+ * Code for key based on layout
102
+ */
103
+ code: string;
104
+ /**
105
+ * Status of Ctrl key being pressed
106
+ */
107
+ ctrlKey: boolean;
108
+ /**
109
+ * String representation of key
110
+ */
111
+ key: string;
112
+ keyCode: number;
113
+ /**
114
+ * Status of Meta key (eg. Windows key) being pressed
115
+ */
116
+ metaKey: boolean;
117
+ /**
118
+ * Status of Shift key being pressed
119
+ */
120
+ shiftKey: boolean;
121
+ }
122
+ /**
123
+ * Native friendly interface for MouseEvent Object
124
+ */
125
+ export interface IMouseEvent extends IUIEvent, MouseEvent {
126
+ /**
127
+ * Status of Alt key being pressed
128
+ */
129
+ altKey: boolean;
130
+ /**
131
+ * Value of single mouse button pressed
132
+ */
133
+ button: number;
134
+ /**
135
+ * Value of all mouse buttons pressed
136
+ */
137
+ buttons: number;
138
+ /**
139
+ * Current X coordinate
140
+ */
141
+ clientX: number;
142
+ /**
143
+ * Current Y coordinate
144
+ */
145
+ clientY: number;
146
+ /**
147
+ * Status of Ctrl key being pressed
148
+ */
149
+ ctrlKey: boolean;
150
+ /**
151
+ * Status of Meta key (eg. Windows key) being pressed
152
+ */
153
+ metaKey: boolean;
154
+ /**
155
+ * Delta of movement on X axis
156
+ */
157
+ movementX: number;
158
+ /**
159
+ * Delta of movement on Y axis
160
+ */
161
+ movementY: number;
162
+ /**
163
+ * Delta of movement on X axis
164
+ */
165
+ mozMovementX?: number;
166
+ /**
167
+ * Delta of movement on Y axis
168
+ */
169
+ mozMovementY?: number;
170
+ /**
171
+ * Delta of movement on X axis
172
+ */
173
+ msMovementX?: any;
174
+ /**
175
+ * Delta of movement on Y axi s
176
+ */
177
+ msMovementY?: any;
178
+ /**
179
+ * Current coordinate of X within container
180
+ */
181
+ offsetX: number;
182
+ /**
183
+ * Current coordinate of Y within container
184
+ */
185
+ offsetY: number;
186
+ /**
187
+ * Status of Shift key being pressed
188
+ */
189
+ shiftKey: boolean;
190
+ /**
191
+ * Delta of movement on X axis
192
+ */
193
+ webkitMovementX?: any;
194
+ /**
195
+ * Delta of movement on Y axis
196
+ */
197
+ webkitMovementY?: any;
198
+ /**
199
+ * Alias of clientX
200
+ */
201
+ x: number;
202
+ /**
203
+ * Alias of clientY
204
+ */
205
+ y: number;
206
+ }
207
+ /**
208
+ * Native friendly interface for PointerEvent Object
209
+ */
210
+ export interface IPointerEvent extends IMouseEvent {
211
+ /**
212
+ * Pointer Event ID
213
+ */
214
+ pointerId: number;
215
+ /**
216
+ * Type of pointer
217
+ */
218
+ pointerType: string;
219
+ }
220
+ /**
221
+ * Native friendly interface for WheelEvent Object
222
+ */
223
+ export interface IWheelEvent extends IMouseEvent {
224
+ /**
225
+ * Units for delta value
226
+ */
227
+ deltaMode: number;
228
+ /**
229
+ * Horizontal scroll delta
230
+ */
231
+ deltaX: number;
232
+ deltaY: number;
233
+ /**
234
+ * Z-Axis scroll delta
235
+ */
236
+ deltaZ: number;
237
+ /**
238
+ * WheelDelta (From MouseWheel Event)
239
+ */
240
+ wheelDelta?: number;
241
+ }
242
+ /**
243
+ * Constants used for Events
244
+ */
245
+ export declare class EventConstants {
246
+ /**
247
+ * Pixel delta for Wheel Events (Default)
248
+ */
249
+ static DOM_DELTA_PIXEL: number;
250
+ /**
251
+ * Line delta for Wheel Events
252
+ */
253
+ static DOM_DELTA_LINE: number;
254
+ /**
255
+ * Page delta for Wheel Events
256
+ */
257
+ static DOM_DELTA_PAGE: number;
258
+ }
259
+ /**
260
+ * Enum for Device Types
261
+ */
262
+ export declare enum DeviceType {
263
+ /** Generic */
264
+ Generic = 0,
265
+ /** Keyboard */
266
+ Keyboard = 1,
267
+ /** Mouse */
268
+ Mouse = 2,
269
+ /** Touch Pointers */
270
+ Touch = 3
271
+ }
272
+ /**
273
+ * Enum for All Pointers (Touch/Mouse)
274
+ */
275
+ export declare enum PointerInput {
276
+ /** Horizontal Axis */
277
+ Horizontal = 0,
278
+ /** Vertical Axis */
279
+ Vertical = 1,
280
+ /** Left Click or Touch */
281
+ LeftClick = 2,
282
+ /** Middle Click */
283
+ MiddleClick = 3,
284
+ /** Right Click */
285
+ RightClick = 4,
286
+ /** Browser Back */
287
+ BrowserBack = 5,
288
+ /** Browser Forward */
289
+ BrowserForward = 6,
290
+ /** Mouse Wheel X */
291
+ MouseWheelX = 7,
292
+ /** Mouse Wheel Y */
293
+ MouseWheelY = 8,
294
+ /** Mouse Wheel Z */
295
+ MouseWheelZ = 9,
296
+ /** Delta X */
297
+ DeltaHorizontal = 10,
298
+ /** Delta Y */
299
+ DeltaVertical = 11,
300
+ /** MoveBeing Hijack for simultaneous buttons pressed for instance */
301
+ FakeMove = 12
302
+ }
303
+ export {};
304
+ //# sourceMappingURL=i-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-events.d.ts","sourceRoot":"","sources":["../../../src/basics/i-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAE3B;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAK5B,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,EAAE,GAAG,YAAY,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,EAAE,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,EAAE,GAAG,WAAW,GAAG,eAAe,CAAC;AAEjE;;GAEG;AACH,KAAK,SAAS,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GACxC,CAAC,GACD,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KAAK;CAChB"}
@@ -0,0 +1,16 @@
1
+ export * from './cell-data';
2
+ export * from './const';
3
+ export * from './document-node-tools';
4
+ export * from './draw';
5
+ export * from './font-cache';
6
+ export * from './i-document-skeleton-cached';
7
+ export * from './i-events';
8
+ export * from './interfaces';
9
+ export * from './path2';
10
+ export * from './performance-monitor';
11
+ export * from './range';
12
+ export * from './scroll-xy';
13
+ export * from './tools';
14
+ export * from './transform';
15
+ export * from './vector2';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/basics/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,102 @@
1
+ import type { BooleanNumber, GridType, IDocStyleBase, IDocumentLayout, IOffset, IParagraphStyle, IReferenceSource, IScale, ISectionBreakBase, ISize, ITextStyle, ITransformState, LocaleService } from '@univerjs/core';
2
+ import type { DocumentViewModel } from '../components/docs/view-model/document-view-model';
3
+ import type { IDocumentSkeletonBullet, IDocumentSkeletonDrawing, IDocumentSkeletonDrawingAnchor, IDocumentSkeletonFontStyle, IDocumentSkeletonFooter, IDocumentSkeletonHeader, IDocumentSkeletonSpan } from './i-document-skeleton-cached';
4
+ import type { Vector2 } from './vector2';
5
+ export interface IObjectFullState extends ITransformState {
6
+ strokeWidth?: number;
7
+ zIndex?: number;
8
+ isTransformer?: boolean;
9
+ forceRender?: boolean;
10
+ debounceParentDirty?: boolean;
11
+ }
12
+ export interface IRect extends ISize, IOffset {
13
+ points: Vector2[];
14
+ }
15
+ export interface ISceneTransformState extends ISize, IScale {
16
+ }
17
+ export declare enum TRANSFORM_CHANGE_OBSERVABLE_TYPE {
18
+ translate = 0,
19
+ resize = 1,
20
+ scale = 2,
21
+ skew = 3,
22
+ flip = 4,
23
+ all = 5
24
+ }
25
+ export interface ITransformChangeState {
26
+ type: TRANSFORM_CHANGE_OBSERVABLE_TYPE;
27
+ value: number | string | boolean | {
28
+ x: number | string | boolean;
29
+ y: number | string | boolean;
30
+ } | IObjectFullState | ISceneTransformState;
31
+ preValue: number | string | boolean | {
32
+ x: number | string | boolean;
33
+ y: number | string | boolean;
34
+ } | IObjectFullState | ISceneTransformState;
35
+ }
36
+ export interface IFontLocale {
37
+ fontList: string[];
38
+ defaultFontSize: number;
39
+ }
40
+ export interface IMeasureTextCache {
41
+ fontBoundingBoxAscent: number;
42
+ fontBoundingBoxDescent: number;
43
+ actualBoundingBoxAscent: number;
44
+ actualBoundingBoxDescent: number;
45
+ width: number;
46
+ }
47
+ export interface IDocsConfig extends IReferenceSource, IDocumentLayout {
48
+ localeService: LocaleService;
49
+ documentTextStyle?: ITextStyle;
50
+ headerTreeMap: Map<string, DocumentViewModel>;
51
+ footerTreeMap: Map<string, DocumentViewModel>;
52
+ }
53
+ export interface IHeaderIds {
54
+ defaultHeaderId?: string;
55
+ evenPageHeaderId?: string;
56
+ firstPageHeaderId?: string;
57
+ }
58
+ export interface IFooterIds {
59
+ defaultFooterId?: string;
60
+ evenPageFooterId?: string;
61
+ firstPageFooterId?: string;
62
+ }
63
+ export interface ISectionBreakConfig extends IDocStyleBase, ISectionBreakBase, IDocsConfig {
64
+ headerIds?: IHeaderIds;
65
+ footerIds?: IFooterIds;
66
+ useFirstPageHeaderFooter?: BooleanNumber;
67
+ useEvenPageHeaderFooter?: BooleanNumber;
68
+ }
69
+ export interface IParagraphConfig {
70
+ paragraphIndex: number;
71
+ paragraphAffectSkeDrawings?: Map<string, IDocumentSkeletonDrawing>;
72
+ bulletSkeleton?: IDocumentSkeletonBullet;
73
+ paragraphStyle?: IParagraphStyle;
74
+ skeHeaders: Map<string, Map<number, IDocumentSkeletonHeader>>;
75
+ skeFooters: Map<string, Map<number, IDocumentSkeletonFooter>>;
76
+ drawingAnchor?: Map<number, IDocumentSkeletonDrawingAnchor>;
77
+ }
78
+ export interface IFontCreateConfig {
79
+ fontStyle: IDocumentSkeletonFontStyle;
80
+ textStyle: ITextStyle;
81
+ charSpace: number;
82
+ gridType?: GridType;
83
+ snapToGrid: BooleanNumber;
84
+ pageWidth?: number;
85
+ }
86
+ export interface INodeInfo {
87
+ node: IDocumentSkeletonSpan;
88
+ ratioX: number;
89
+ ratioY: number;
90
+ }
91
+ export interface INodeSearch {
92
+ span: number;
93
+ divide: number;
94
+ line: number;
95
+ column: number;
96
+ section: number;
97
+ page: number;
98
+ }
99
+ export interface INodePosition extends INodeSearch {
100
+ isBack: boolean;
101
+ }
102
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/basics/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,aAAa,EACb,QAAQ,EACR,aAAa,EACb,eAAe,EACf,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,MAAM,EACN,iBAAiB,EACjB,KAAK,EACL,UAAU,EACV,eAAe,EACf,aAAa,EAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,KAAK,EACR,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEz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AE,8BAA8B,CAAC,CAAC;CAE/D;AAED,MAAM,WAAW,iBAAiB;IAC9B,SAAS,EAAE,0BAA0B,CAAC;IACtC,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,EAAE,aAAa,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAaD,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAc,SAAQ,WAAW;IAC9C,MAAM,EAAE,OAAO,CAAC;CACnB"}
@@ -0,0 +1,10 @@
1
+ import type { Nullable } from '@univerjs/core';
2
+ import { Vector2 } from './vector2';
3
+ export declare const INITIAL_Path2: Vector2[];
4
+ export declare class Path2 {
5
+ private _lines;
6
+ constructor(_lines?: Vector2[]);
7
+ intersection(lines: Vector2[]): Nullable<Vector2[]>;
8
+ private _intersection;
9
+ }
10
+ //# sourceMappingURL=path2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path2.d.ts","sourceRoot":"","sources":["../../../src/basics/path2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,eAAO,MAAM,aAAa,EAAE,OAAO,EAA2C,CAAC;AAO/E,qBAAa,KAAK;IACF,OAAO,CAAC,MAAM;gBAAN,MAAM,GAAE,OAAO,EAAkB;IAErD,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC;IAkCnD,OAAO,CAAC,aAAa;CAgCxB"}