@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 @@
1
+ {"version":3,"file":"table-cell.d.ts","sourceRoot":"","sources":["../../../../../../src/components/docs/block/table/table-cell.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=table-row.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-row.d.ts","sourceRoot":"","sources":["../../../../../../src/components/docs/block/table/table-row.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../../../src/components/docs/block/table/table.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ISectionColumnProperties } from '@univerjs/core';
2
+ import { ColumnSeparatorType } from '@univerjs/core';
3
+ import type { IDocumentSkeletonColumn } from '../../../basics/i-document-skeleton-cached';
4
+ export declare function createSkeletonColumn(columnIndex: number | undefined, columnProperties: ISectionColumnProperties[], columnSeparatorType?: ColumnSeparatorType, pageWidth?: number): IDocumentSkeletonColumn;
5
+ //# sourceMappingURL=column.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../../../../src/components/docs/common/column.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAE1F,wBAAgB,oBAAoB,CAChC,WAAW,oBAAY,EACvB,gBAAgB,EAAE,wBAAwB,EAAE,EAC5C,mBAAmB,GAAE,mBAA8C,EACnE,SAAS,GAAE,MAAiB,GAC7B,uBAAuB,CAgBzB"}
@@ -0,0 +1,60 @@
1
+ import type { ITextRange, Nullable } from '@univerjs/core';
2
+ import type { INodePosition } from '../../../basics/interfaces';
3
+ import type { IPoint } from '../../../basics/vector2';
4
+ import type { DocumentSkeleton } from '../doc-skeleton';
5
+ import type { IDocumentOffsetConfig } from '../document';
6
+ export declare enum NodePositionStateType {
7
+ NORMAL = 0,
8
+ START = 1,
9
+ END = 2
10
+ }
11
+ export declare enum NodePositionType {
12
+ page = 0,
13
+ section = 1,
14
+ column = 2,
15
+ line = 3,
16
+ divide = 4,
17
+ span = 5
18
+ }
19
+ export interface ICurrentNodePositionState {
20
+ page: NodePositionStateType;
21
+ section: NodePositionStateType;
22
+ column: NodePositionStateType;
23
+ line: NodePositionStateType;
24
+ divide: NodePositionStateType;
25
+ span: NodePositionStateType;
26
+ }
27
+ export declare const NodePositionMap: {
28
+ page: number;
29
+ section: number;
30
+ column: number;
31
+ line: number;
32
+ divide: number;
33
+ span: number;
34
+ };
35
+ export declare function compareNodePositionLogic(pos1: INodePosition, pos2: INodePosition): boolean;
36
+ export declare function compareNodePosition(pos1: INodePosition, pos2: INodePosition): {
37
+ start: INodePosition;
38
+ end: INodePosition;
39
+ };
40
+ export declare function getOneTextSelectionRange(rangeList: ITextRange[]): Nullable<ITextRange>;
41
+ export declare class NodePositionConvertToCursor {
42
+ private _liquid;
43
+ private _documentOffsetConfig;
44
+ private _docSkeleton;
45
+ private _currentStartState;
46
+ private _currentEndState;
47
+ constructor(documentOffsetConfig: IDocumentOffsetConfig, docSkeleton: DocumentSkeleton);
48
+ getRangePointData(startOrigin: Nullable<INodePosition>, endOrigin: Nullable<INodePosition>): {
49
+ borderBoxPointGroup: IPoint[][];
50
+ contentBoxPointGroup: IPoint[][];
51
+ cursorList: ITextRange[];
52
+ };
53
+ private _resetCurrentNodePositionState;
54
+ private _setNodePositionState;
55
+ private _checkPreviousNodePositionState;
56
+ private _getSelectionRuler;
57
+ private _pushToPoints;
58
+ private _selectionIterator;
59
+ }
60
+ //# sourceMappingURL=convert-cursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert-cursor.d.ts","sourceRoot":"","sources":["../../../../../src/components/docs/common/convert-cursor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAUtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGzD,oBAAY,q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C,kBAAkB;CAgJ7B"}
@@ -0,0 +1,10 @@
1
+ export * from './column';
2
+ export * from './convert-cursor';
3
+ export * from './line';
4
+ export * from './liquid';
5
+ export * from './page';
6
+ export * from './range';
7
+ export * from './section';
8
+ export * from './span';
9
+ export * from './tools';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/docs/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { IDocumentSkeletonDivide, IDocumentSkeletonDrawing, IDocumentSkeletonDrawingAnchor, IDocumentSkeletonLine, LineType } from '../../../basics/i-document-skeleton-cached';
2
+ interface ILineBoundingBox {
3
+ lineHeight: number;
4
+ lineTop: number;
5
+ paddingLeft?: number;
6
+ paddingRight?: number;
7
+ paddingTop?: number;
8
+ paddingBottom?: number;
9
+ marginTop?: number;
10
+ spaceBelowApply?: number;
11
+ contentHeight: number;
12
+ }
13
+ export declare function createSkeletonLine(paragraphIndex: number, lineType: LineType, lineBoundingBox: ILineBoundingBox, columnWidth: number, lineIndex?: number, isParagraphStart?: boolean, affectSkeDrawings?: Map<string, IDocumentSkeletonDrawing>, headersDrawings?: Map<string, IDocumentSkeletonDrawing>, footersDrawings?: Map<string, IDocumentSkeletonDrawing>): IDocumentSkeletonLine;
14
+ export declare function calculateLineTopByDrawings(lineHeight?: number, lineTop?: number, pageSkeDrawings?: Map<string, IDocumentSkeletonDrawing>, headersDrawings?: Map<string, IDocumentSkeletonDrawing>, footersDrawings?: Map<string, IDocumentSkeletonDrawing>): number;
15
+ export declare function setDivideFullState(divide: IDocumentSkeletonDivide, state: boolean): void;
16
+ export declare function setLineMarginBottom(line: IDocumentSkeletonLine, marginBottom: number): void;
17
+ export declare function updateDivideInLine(line: IDocumentSkeletonLine): void;
18
+ export declare function createAndUpdateBlockAnchor(paragraphIndex: number, line: IDocumentSkeletonLine, top: number, drawingAnchor?: Map<number, IDocumentSkeletonDrawingAnchor>): void;
19
+ export {};
20
+ //# sourceMappingURL=line.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../../../../src/components/docs/common/line.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,qBAAqB,EACrB,QAAQ,EACX,MAAM,4CAA4C,CAAC;AAqBpD,UAAU,gBAAgB;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACzB;AAGD,wBAAgB,kBAAkB,CAC9B,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,gBAAgB,EACjC,WAAW,EAAE,MAAM,EACnB,SAAS,GAAE,MAAU,EACrB,gBAAgB,GAAE,OAAe,EACjC,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,EACzD,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,EACvD,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,GACxD,qBAAqB,CAwCvB;AAED,wBAAgB,0BAA0B,CACtC,UAAU,GAAE,MAAa,EACzB,OAAO,GAAE,MAAU,EACnB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,EACvD,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,EACvD,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,UAyB1D;AAkFD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,uBAAuB,EAAE,KAAK,EAAE,OAAO,QAEjF;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,QAEpF;AAGD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,qBAAqB,QAAI;AAwPlE,wBAAgB,0BAA0B,CACtC,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,qBAAqB,EAC3B,GAAG,EAAE,MAAM,EACX,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,8BAA8B,CAAC,QAe9D"}
@@ -0,0 +1,41 @@
1
+ import type { IDocumentSkeletonColumn, IDocumentSkeletonDivide, IDocumentSkeletonLine, IDocumentSkeletonPage, IDocumentSkeletonSection, IDocumentSkeletonSpan } from '../../../basics/i-document-skeleton-cached';
2
+ import { PageLayoutType } from '../../../basics/i-document-skeleton-cached';
3
+ export declare class Liquid {
4
+ private _translateX;
5
+ private _translateY;
6
+ private _translateSaveList;
7
+ get x(): number;
8
+ get y(): number;
9
+ reset(): void;
10
+ translateBy(x?: number, y?: number): void;
11
+ translate(x?: number, y?: number): void;
12
+ translateSave(): void;
13
+ translateRestore(): void;
14
+ translatePagePadding(page: IDocumentSkeletonPage): void;
15
+ restorePagePadding(page: IDocumentSkeletonPage): void;
16
+ translatePage(page: IDocumentSkeletonPage, type?: PageLayoutType, left?: number, top?: number, right?: number, bottom?: number): {
17
+ x: number;
18
+ y: number;
19
+ };
20
+ translateSection(section: IDocumentSkeletonSection): {
21
+ x: number;
22
+ y: number;
23
+ };
24
+ translateColumn(column: IDocumentSkeletonColumn): {
25
+ x: number;
26
+ y: number;
27
+ };
28
+ translateLine(line: IDocumentSkeletonLine, isDraw?: boolean): {
29
+ x: number;
30
+ y: number;
31
+ };
32
+ translateDivide(divide: IDocumentSkeletonDivide): {
33
+ x: number;
34
+ y: number;
35
+ };
36
+ translateSpan(span: IDocumentSkeletonSpan): {
37
+ x: number;
38
+ y: number;
39
+ };
40
+ }
41
+ //# sourceMappingURL=liquid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"liquid.d.ts","sourceRoot":"","sources":["../../../../../src/components/docs/common/liquid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACxB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAE5E,qBAAa,MAAM;IACf,OAAO,CAAC,WAAW,CAAa;IAEhC,OAAO,CAAC,WAAW,CAAa;IAEhC,OAAO,CAAC,kBAAkB,CAAuC;IAEjE,IAAI,CAAC,WAEJ;IAED,IAAI,CAAC,WAEJ;IAED,KAAK;IAKL,WAAW,CAAC,CAAC,GAAE,MAAU,EAAE,CAAC,GAAE,MAAU;IAKxC,SAAS,CAAC,CAAC,GAAE,MAAU,EAAE,CAAC,GAAE,MAAU;IAKtC,aAAa;IAOb,gBAAgB;IAoChB,oBAAoB,CAAC,IAAI,EAAE,qBAAqB;IAWhD,kBAAkB,CAAC,IAAI,EAAE,qBAAqB;IAW9C,aAAa,CACT,IAAI,EAAE,qBAAqB,EAC3B,IAAI,iBAA0B,EAC9B,IAAI,SAAI,EACR,GAAG,SAAI,EACP,KAAK,SAAI,EACT,MAAM,SAAI;;;;IAkCd,gBAAgB,CAAC,OAAO,EAAE,wBAAwB;;;;IASlD,eAAe,CAAC,MAAM,EAAE,uBAAuB;;;;IAW/C,aAAa,CAAC,IAAI,EAAE,qBAAqB,EAAE,MAAM,UAAQ;;;;IAgBzD,eAAe,CAAC,MAAM,EAAE,uBAAuB;;;;IAW/C,aAAa,CAAC,IAAI,EAAE,qBAAqB;;;;CAS5C"}
@@ -0,0 +1,5 @@
1
+ import type { IDocumentSkeletonPage, ISkeletonResourceReference } from '../../../basics/i-document-skeleton-cached';
2
+ import { BreakType } from '../../../basics/i-document-skeleton-cached';
3
+ import type { ISectionBreakConfig } from '../../../basics/interfaces';
4
+ export declare function createSkeletonPage(sectionBreakConfig: ISectionBreakConfig, skeletonResourceReference: ISkeletonResourceReference, pageNumber?: number, breakType?: BreakType): IDocumentSkeletonPage;
5
+ //# sourceMappingURL=page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/components/docs/common/page.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGR,qBAAqB,EACrB,0BAA0B,EAC7B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAUtE,wBAAgB,kBAAkB,CAC9B,kBAAkB,EAAE,mBAAmB,EACvC,yBAAyB,EAAE,0BAA0B,EACrD,UAAU,SAAI,EACd,SAAS,YAAoB,GAC9B,qBAAqB,CA6GvB"}
@@ -0,0 +1,45 @@
1
+ import type { Nullable } from '@univerjs/core';
2
+ import type { INodePosition } from '../../../basics/interfaces';
3
+ import type { ITextRangeWithStyle, ITextSelectionStyle } from '../../../basics/range';
4
+ import { RANGE_DIRECTION } from '../../../basics/range';
5
+ import type { Scene } from '../../../scene';
6
+ import { Rect } from '../../../shape/rect';
7
+ import type { ThinScene } from '../../../thin-scene';
8
+ import type { DocumentSkeleton } from '../doc-skeleton';
9
+ import type { IDocumentOffsetConfig } from '../document';
10
+ export declare function cursorConvertToTextRange(scene: Scene, range: ITextRangeWithStyle, docSkeleton: DocumentSkeleton, documentOffsetConfig: IDocumentOffsetConfig): Nullable<TextRange>;
11
+ export declare class TextRange {
12
+ private _scene;
13
+ private _documentOffsetConfig;
14
+ private _docSkeleton;
15
+ anchorNodePosition?: Nullable<INodePosition>;
16
+ focusNodePosition?: Nullable<INodePosition>;
17
+ style: ITextSelectionStyle;
18
+ private _current;
19
+ private _rangeShape;
20
+ private _anchorShape;
21
+ private _cursorList;
22
+ constructor(_scene: ThinScene, _documentOffsetConfig: IDocumentOffsetConfig, _docSkeleton: DocumentSkeleton, anchorNodePosition?: Nullable<INodePosition>, focusNodePosition?: Nullable<INodePosition>, style?: ITextSelectionStyle);
23
+ get startOffset(): number | undefined;
24
+ get endOffset(): number | undefined;
25
+ get collapsed(): boolean;
26
+ get startNodePosition(): INodePosition | null;
27
+ get endNodePosition(): Nullable<INodePosition>;
28
+ get direction(): RANGE_DIRECTION;
29
+ getAnchor(): Nullable<Rect<import("../../../shape/rect").IRectProps>>;
30
+ activeStatic(): void;
31
+ deactivateStatic(): void;
32
+ isActive(): boolean;
33
+ activate(): void;
34
+ deactivate(): void;
35
+ dispose(): void;
36
+ isIntersection(compareRange: TextRange): boolean;
37
+ refresh(): void;
38
+ private _isEmpty;
39
+ private _isCollapsed;
40
+ private _createOrUpdateRange;
41
+ private _getAnchorBounding;
42
+ private _createOrUpdateAnchor;
43
+ private _setCursorList;
44
+ }
45
+ //# sourceMappingURL=range.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../../../src/components/docs/common/range.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAsC,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA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AIhB,OAAO,CAAC,YAAY;IA8BpB,OAAO,CAAC,oBAAoB;IAwB5B,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,qBAAqB;IAyB7B,OAAO,CAAC,cAAc;CAOzB"}
@@ -0,0 +1,6 @@
1
+ import type { ISectionColumnProperties } from '@univerjs/core';
2
+ import { ColumnSeparatorType } from '@univerjs/core';
3
+ import type { IDocumentSkeletonColumn, IDocumentSkeletonSection } from '../../../basics/i-document-skeleton-cached';
4
+ export declare function createSkeletonSection(columnProperties?: ISectionColumnProperties[], columnSeparatorType?: ColumnSeparatorType, top?: number, left?: number, sectionWidth?: number, sectionHeight?: number): IDocumentSkeletonSection;
5
+ export declare function setColumnFullState(column: IDocumentSkeletonColumn, state: boolean): void;
6
+ //# sourceMappingURL=section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../../../../src/components/docs/common/section.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,KAAK,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAEpH,wBAAgB,qBAAqB,CACjC,gBAAgB,GAAE,wBAAwB,EAAO,EACjD,mBAAmB,GAAE,mBAA8C,EACnE,GAAG,GAAE,MAAU,EACf,IAAI,GAAE,MAAU,EAChB,YAAY,GAAE,MAAiB,EAC/B,aAAa,GAAE,MAAiB,GACjC,wBAAwB,CAuC1B;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,uBAAuB,EAAE,KAAK,EAAE,OAAO,QAEjF"}
@@ -0,0 +1,12 @@
1
+ import type { IDocumentSkeletonBullet, IDocumentSkeletonDivide, IDocumentSkeletonSpan } from '../../../basics/i-document-skeleton-cached';
2
+ import { SpanType } from '../../../basics/i-document-skeleton-cached';
3
+ import type { IFontCreateConfig } from '../../../basics/interfaces';
4
+ export declare function createSkeletonWordSpan(content: string, config: IFontCreateConfig, spanWidth?: number): IDocumentSkeletonSpan;
5
+ export declare function createSkeletonLetterSpan(content: string, config: IFontCreateConfig, spanWidth?: number): IDocumentSkeletonSpan;
6
+ export declare function createSkeletonTabSpan(config: IFontCreateConfig, spanWidth?: number): IDocumentSkeletonSpan;
7
+ export declare function _createSkeletonWordOrLetter(spanType: SpanType, content: string, config: IFontCreateConfig, spanWidth?: number): IDocumentSkeletonSpan;
8
+ export declare function createSkeletonBulletSpan(span: IDocumentSkeletonSpan, bulletSkeleton: IDocumentSkeletonBullet, charSpaceApply: number): IDocumentSkeletonSpan;
9
+ export declare function setSpanGroupLeft(spanGroup: IDocumentSkeletonSpan[], left?: number): void;
10
+ export declare function setSpanLeft(span: IDocumentSkeletonSpan, left?: number): void;
11
+ export declare function addSpanToDivide(divide: IDocumentSkeletonDivide, spanGroup: IDocumentSkeletonSpan[], offsetLeft?: number): void;
12
+ //# sourceMappingURL=span.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../../../../../src/components/docs/common/span.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACxB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAIpE,wBAAgB,sBAAsB,CAClC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,iBAAiB,EACzB,SAAS,CAAC,EAAE,MAAM,GACnB,qBAAqB,CAEvB;AAED,wBAAgB,wBAAwB,CACpC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,iBAAiB,EACzB,SAAS,CAAC,EAAE,MAAM,GACnB,qBAAqB,CAEvB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAE1G;AAED,wBAAgB,2BAA2B,CACvC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,iBAAiB,EACzB,SAAS,CAAC,EAAE,MAAM,GACnB,qBAAqB,CAyEvB;AAED,wBAAgB,wBAAwB,CACpC,IAAI,EAAE,qBAAqB,EAC3B,cAAc,EAAE,uBAAuB,EACvC,cAAc,EAAE,MAAM,GACvB,qBAAqB,CAwCvB;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,qBAAqB,EAAE,EAAE,IAAI,GAAE,MAAU,QASpF;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,qBAAqB,EAAE,IAAI,GAAE,MAAU,QAExE;AAED,wBAAgB,eAAe,CAC3B,MAAM,EAAE,uBAAuB,EAC/B,SAAS,EAAE,qBAAqB,EAAE,EAClC,UAAU,GAAE,MAAU,QA2BzB"}
@@ -0,0 +1,73 @@
1
+ import type { INumberUnit, IParagraphStyle, ITextStyle, ObjectPositionH, ObjectPositionV } from '@univerjs/core';
2
+ import { BooleanNumber, GridType, SpacingRule } from '@univerjs/core';
3
+ import type { IDocumentSkeletonColumn, IDocumentSkeletonDivide, IDocumentSkeletonLine, IDocumentSkeletonPage, IDocumentSkeletonSpan } from '../../../basics/i-document-skeleton-cached';
4
+ import type { IParagraphConfig, ISectionBreakConfig } from '../../../basics/interfaces';
5
+ import type { DataStreamTreeNode } from '../view-model/data-stream-tree-node';
6
+ import type { DocumentViewModel } from '../view-model/document-view-model';
7
+ export declare function getLastPage(pages: IDocumentSkeletonPage[]): IDocumentSkeletonPage;
8
+ export declare function getLastSection(page: IDocumentSkeletonPage): import("../../../basics/i-document-skeleton-cached").IDocumentSkeletonSection;
9
+ export declare function getLastColumn(page: IDocumentSkeletonPage): IDocumentSkeletonColumn;
10
+ export declare function getLastLine(page: IDocumentSkeletonPage): IDocumentSkeletonLine | undefined;
11
+ export declare function getLastLineByColumn(column: IDocumentSkeletonColumn): IDocumentSkeletonLine;
12
+ export declare function getPageContentWidth(page: IDocumentSkeletonPage): number;
13
+ export declare function getPreLine(line: IDocumentSkeletonLine): IDocumentSkeletonLine | undefined;
14
+ export declare function getColumnByDivide(divide: IDocumentSkeletonDivide): IDocumentSkeletonColumn | undefined;
15
+ export declare function getLastNotFullColumnInfo(page: IDocumentSkeletonPage): {
16
+ column: IDocumentSkeletonColumn;
17
+ isLast: boolean;
18
+ index: number;
19
+ } | undefined;
20
+ export declare function getLastNotFullDivideInfo(page: IDocumentSkeletonPage): {
21
+ divide: IDocumentSkeletonDivide;
22
+ isLast: boolean;
23
+ index: number;
24
+ } | undefined;
25
+ export declare function getNextDivide(curLine: IDocumentSkeletonLine, curDivide: IDocumentSkeletonDivide): IDocumentSkeletonDivide | undefined;
26
+ export declare function getLastRemainingDivide(curLine: IDocumentSkeletonLine): IDocumentSkeletonDivide | undefined;
27
+ export declare function getLastSpan(page: IDocumentSkeletonPage): IDocumentSkeletonSpan | undefined;
28
+ export declare function isColumnFull(page: IDocumentSkeletonPage): boolean;
29
+ export declare function isBlankPage(page: IDocumentSkeletonPage): boolean;
30
+ export declare function isBlankColumn(column: IDocumentSkeletonColumn): boolean;
31
+ export declare function reCalculateLineDivide(): void;
32
+ export declare function getNumberUnitValue(unitValue: number | INumberUnit, benchMark: number): number;
33
+ export declare function getCharSpaceApply(charSpace: number | undefined, defaultTabStop: number, gridType?: GridType, snapToGrid?: BooleanNumber): number;
34
+ export declare function validationGrid(gridType?: GridType, snapToGrid?: BooleanNumber): boolean;
35
+ export declare function getLineHeightConfig(sectionBreakConfig: ISectionBreakConfig, paragraphConfig: IParagraphConfig): {
36
+ paragraphLineGapDefault: number;
37
+ linePitch: number;
38
+ gridType: GridType;
39
+ lineSpacing: number;
40
+ spacingRule: SpacingRule;
41
+ snapToGrid: BooleanNumber;
42
+ };
43
+ export declare function getCharSpaceConfig(sectionBreakConfig: ISectionBreakConfig, paragraphConfig: IParagraphConfig): {
44
+ charSpace: number;
45
+ documentFontSize: number;
46
+ defaultTabStop: number;
47
+ gridType: GridType;
48
+ snapToGrid: BooleanNumber;
49
+ };
50
+ export declare function updateBlockIndex(pages: IDocumentSkeletonPage[], start?: number): void;
51
+ export declare function spanIterator(pages: IDocumentSkeletonPage[], iteratorFunction: (span: IDocumentSkeletonSpan) => void): void;
52
+ export declare function lineIterator(pages: IDocumentSkeletonPage[], iteratorFunction: (line: IDocumentSkeletonLine) => void): void;
53
+ export declare function columnIterator(pages: IDocumentSkeletonPage[], iteratorFunction: (column: IDocumentSkeletonColumn) => void): void;
54
+ export declare function getPositionHorizon(positionH: ObjectPositionH, column: IDocumentSkeletonColumn, page: IDocumentSkeletonPage, objectWidth: number, isPageBreak?: boolean): number | undefined;
55
+ export declare function getPositionVertical(positionV: ObjectPositionV, page: IDocumentSkeletonPage, lineTop: number, lineHeight: number, objectHeight: number, blockAnchorTop?: number, isPageBreak?: boolean): number | undefined;
56
+ export declare function getPositionHorizonBySpan(positionH: ObjectPositionH, span: IDocumentSkeletonSpan): void;
57
+ export declare function getSpanGroupWidth(divide: IDocumentSkeletonDivide): number;
58
+ interface IFontCreateConfig {
59
+ fontStyle: {
60
+ fontString: string;
61
+ fontSize: number;
62
+ fontFamily: string;
63
+ };
64
+ textStyle: ITextStyle;
65
+ charSpace: number;
66
+ gridType: GridType;
67
+ snapToGrid: BooleanNumber;
68
+ pageWidth: number;
69
+ }
70
+ export declare function clearFontCreateConfigCache(): void;
71
+ export declare function getFontCreateConfig(index: number, bodyModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, paragraphStyle: IParagraphStyle): IFontCreateConfig;
72
+ export {};
73
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../../../src/components/docs/common/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,WAAW,EACX,eAAe,EACf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mBAAmB,CAC/B,SAAS,EAAE,eAAe,EAC1B,IAAI,EAAE,qBAAqB,EAC3B,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,cAAc,CAAC,EAAE,MAAM,EACvB,WAAW,GAAE,OAAe,sBAwE/B;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,qBAAqB,QAE/F;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,uBAAuB,UAOhE;AAED,UAAU,iBAAiB;IACvB,SAAS,EAAE;QACP,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,aAAa,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACrB;AAID,wBAAgB,0BAA0B,SAEzC;AAED,wBAAgB,mBAAmB,CAC/B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,iBAAiB,EAC5B,aAAa,EAAE,kBAAkB,EACjC,kBAAkB,EAAE,mBAAmB,EACvC,cAAc,EAAE,eAAe,qBA+ClC"}
@@ -0,0 +1,34 @@
1
+ import type { Nullable } from '@univerjs/core';
2
+ import type { IDocumentSkeletonLine, IDocumentSkeletonSpan } from '../../basics/i-document-skeleton-cached';
3
+ import { PageLayoutType } from '../../basics/i-document-skeleton-cached';
4
+ import type { INodeInfo } from '../../basics/interfaces';
5
+ import type { IBoundRect } from '../../basics/vector2';
6
+ import { Canvas } from '../../canvas';
7
+ import { RenderComponent } from '../component';
8
+ import type { DOCS_EXTENSION_TYPE } from './doc-extension';
9
+ import type { DocumentSkeleton } from './doc-skeleton';
10
+ export declare class DocComponent extends RenderComponent<IDocumentSkeletonSpan | IDocumentSkeletonLine, DOCS_EXTENSION_TYPE> {
11
+ private _skeleton?;
12
+ private _allowCache;
13
+ pageMarginLeft: number;
14
+ pageMarginTop: number;
15
+ pageLayoutType: PageLayoutType;
16
+ protected _cacheCanvas: Nullable<Canvas>;
17
+ constructor(oKey: string, _skeleton?: DocumentSkeleton | undefined, _allowCache?: boolean);
18
+ setAllowCache(state?: boolean): void;
19
+ getSkeleton(): DocumentSkeleton | undefined;
20
+ setSkeleton(skeleton: DocumentSkeleton): void;
21
+ render(mainCtx: CanvasRenderingContext2D, bounds?: IBoundRect): this | undefined;
22
+ getParentScale(): {
23
+ scaleX: any;
24
+ scaleY: any;
25
+ };
26
+ scrollBySelection(): void;
27
+ syncSelection(): void;
28
+ remainActiveSelection(): void;
29
+ findNodeByCoord(offsetX: number, offsetY: number): Nullable<INodeInfo>;
30
+ findCoordByNode(span: IDocumentSkeletonSpan): void;
31
+ protected _getBounding(bounds?: IBoundRect): void;
32
+ protected _draw(ctx: CanvasRenderingContext2D, bounds?: IBoundRect): void;
33
+ }
34
+ //# sourceMappingURL=doc-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-component.d.ts","sourceRoot":"","sources":["../../../../src/components/docs/doc-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAC5G,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAyB,MAAM,yBAAyB,CAAC;AAChF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,qBAAa,YAAa,SAAQ,eAAe,CAAC,qBAAqB,GAAG,qBAAqB,EAAE,mBAAmB,CAAC;IAW7G,OAAO,CAAC,SAAS,CAAC;IAClB,OAAO,CAAC,WAAW;IAXvB,cAAc,EAAE,MAAM,CAAK;IAE3B,aAAa,EAAE,MAAM,CAAK;IAE1B,cAAc,EAAE,cAAc,CAA2B;IAEzD,SAAS,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;gBAGrC,IAAI,EAAE,MAAM,EACJ,SAAS,CAAC,8BAAkB,EAC5B,WAAW,GAAE,OAAe;IAcxC,aAAa,CAAC,KAAK,GAAE,OAAe;IAIpC,WAAW;IAIX,WAAW,CAAC,QAAQ,EAAE,gBAAgB;IAI7B,MAAM,CAAC,OAAO,EAAE,wBAAwB,EAAE,MAAM,CAAC,EAAE,UAAU;IAsBtE,cAAc;;;;IAiBd,iBAAiB;IAEjB,aAAa;IAEb,qBAAqB;IAErB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC,SAAS,CAAC;IAEtE,eAAe,CAAC,IAAI,EAAE,qBAAqB;IAE3C,SAAS,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,UAAU;IAE1C,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,wBAAwB,EAAE,MAAM,CAAC,EAAE,UAAU;CAGrE"}
@@ -0,0 +1,12 @@
1
+ import type { IDocumentSkeletonLine, IDocumentSkeletonSpan } from '../../basics/i-document-skeleton-cached';
2
+ import { ComponentExtension } from '../extension';
3
+ export declare enum DOCS_EXTENSION_TYPE {
4
+ SPAN = 0,
5
+ LINE = 1
6
+ }
7
+ export declare class docExtension extends ComponentExtension<IDocumentSkeletonSpan | IDocumentSkeletonLine, DOCS_EXTENSION_TYPE> {
8
+ type: DOCS_EXTENSION_TYPE;
9
+ translateX: number;
10
+ translateY: number;
11
+ }
12
+ //# sourceMappingURL=doc-extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-extension.d.ts","sourceRoot":"","sources":["../../../../src/components/docs/doc-extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,oBAAY,mBAAmB;IAC3B,IAAI,IAAA;IACJ,IAAI,IAAA;CACP;AAED,qBAAa,YAAa,SAAQ,kBAAkB,CAChD,qBAAqB,GAAG,qBAAqB,EAC7C,mBAAmB,CACtB;IACY,IAAI,sBAA4B;IAEhC,UAAU,SAAK;IAEf,UAAU,SAAK;CAC3B"}
@@ -0,0 +1,71 @@
1
+ import type { LocaleService, Nullable } from '@univerjs/core';
2
+ import type { IDocumentSkeletonCached, IDocumentSkeletonSpan } from '../../basics/i-document-skeleton-cached';
3
+ import { PageLayoutType } from '../../basics/i-document-skeleton-cached';
4
+ import type { INodeInfo, INodePosition, INodeSearch } from '../../basics/interfaces';
5
+ import type { IBoundRect, Vector2 } from '../../basics/vector2';
6
+ import { Skeleton } from '../skeleton';
7
+ import type { DocumentViewModel } from './view-model/document-view-model';
8
+ export declare enum DocumentSkeletonState {
9
+ PENDING = "pending",
10
+ CALCULATING = "calculating",
11
+ READY = "ready",
12
+ INVALID = "invalid"
13
+ }
14
+ export declare class DocumentSkeleton extends Skeleton {
15
+ private _docViewModel;
16
+ private _skeletonData;
17
+ private _renderedBlockIdMap;
18
+ private _findLiquid;
19
+ constructor(docViewModel: DocumentViewModel, localeService: LocaleService);
20
+ static create(docViewModel: DocumentViewModel, localeService: LocaleService): DocumentSkeleton;
21
+ getViewModel(): DocumentViewModel;
22
+ calculate(bounds?: IBoundRect): void;
23
+ getSkeletonData(): Nullable<IDocumentSkeletonCached>;
24
+ getActualSize(): {
25
+ actualWidth: number;
26
+ actualHeight: number;
27
+ };
28
+ private _getPageActualWidth;
29
+ getPageSize(): import("@univerjs/core").ISize | undefined;
30
+ findPositionBySpan(span: IDocumentSkeletonSpan): Nullable<INodeSearch>;
31
+ findNodePositionByCharIndex(charIndex: number, isBack?: boolean): Nullable<INodePosition>;
32
+ findNodeByCharIndex(charIndex: number): Nullable<IDocumentSkeletonSpan>;
33
+ findSpanByPosition(position: Nullable<INodePosition>): IDocumentSkeletonSpan | undefined;
34
+ findNodeByCoord(coord: Vector2, pageLayoutType: PageLayoutType, pageMarginLeft: number, pageMarginTop: number): Nullable<INodeInfo>;
35
+ private _getNearestNode;
36
+ private _getPageBoundingBox;
37
+ private _translatePage;
38
+ /**
39
+ * \v COLUMN_BREAK
40
+ * \f PAGE_BREAK
41
+ * \0 DOCS_END
42
+ * \t TAB
43
+ *
44
+ * Needs to be changed:
45
+ * \r PARAGRAPH
46
+ * \n SECTION_BREAK
47
+ *
48
+ * \b customBlock: Scenarios where customBlock, images, mentions, etc. do not participate in the document flow.
49
+ *
50
+ * Table
51
+ * \x1A table start
52
+ * \x1B table row start
53
+ * \x1C table cell start
54
+ * \x1D table cell end
55
+ * \x1E table row end
56
+ * \x1F table end
57
+ *
58
+ * Special ranges within the document flow::hyperlinks,field,structured document tags, bookmark,comment
59
+ * \x1F customRange start
60
+ * \x1E customRange end
61
+ *
62
+ * Split the document according to SectionBreak and perform layout calculations.
63
+ * @returns view model: skeleton
64
+ */
65
+ private _createSkeleton;
66
+ private _setPageParent;
67
+ private _addNewSectionByContinuous;
68
+ private _getNullSke;
69
+ private _findNodeIterator;
70
+ }
71
+ //# sourceMappingURL=doc-skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-skeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/docs/doc-skeleton.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA2C,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAWvG,OAAO,KAAK,EACR,uBAAuB,EAEvB,qBAAqB,EAExB,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cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,GACtB,QAAQ,CAAC,SAAS,CAAC;IAmKtB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,mBAAmB;IAsB3B,OAAO,CAAC,cAAc;IAStB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,OAAO,CAAC,eAAe;IAwMvB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,0BAA0B;IA8BlC,OAAO,CAAC,WAAW;IAanB,OAAO,CAAC,iBAAiB;CAoE5B"}
@@ -0,0 +1,54 @@
1
+ import './extensions';
2
+ import type { Nullable } from '@univerjs/core';
3
+ import { Observable } from '@univerjs/core';
4
+ import type { IDocumentSkeletonPage } from '../../basics/i-document-skeleton-cached';
5
+ import { PageLayoutType } from '../../basics/i-document-skeleton-cached';
6
+ import type { Transform } from '../../basics/transform';
7
+ import type { IBoundRect } from '../../basics/vector2';
8
+ import type { Scene } from '../../scene';
9
+ import { DocComponent } from './doc-component';
10
+ import type { DocumentSkeleton } from './doc-skeleton';
11
+ interface IPageMarginLayout {
12
+ pageMarginLeft: number;
13
+ pageMarginTop: number;
14
+ pageLayoutType?: PageLayoutType;
15
+ }
16
+ export interface IDocumentsConfig extends IPageMarginLayout {
17
+ allowCache?: boolean;
18
+ hasEditor?: boolean;
19
+ }
20
+ export interface IPageRenderConfig {
21
+ page: IDocumentSkeletonPage;
22
+ pageLeft: number;
23
+ pageTop: number;
24
+ ctx: CanvasRenderingContext2D;
25
+ }
26
+ export interface IDocumentOffsetConfig extends IPageMarginLayout {
27
+ docsLeft: number;
28
+ docsTop: number;
29
+ documentTransform: Transform;
30
+ }
31
+ export declare class Documents extends DocComponent {
32
+ isCalculateSkeleton: boolean;
33
+ onPageRenderObservable: Observable<IPageRenderConfig>;
34
+ docsLeft: number;
35
+ docsTop: number;
36
+ private _drawLiquid;
37
+ private _findLiquid;
38
+ private _skeletonObserver;
39
+ constructor(oKey: string, documentSkeleton?: DocumentSkeleton, config?: IDocumentsConfig);
40
+ static create(oKey: string, documentSkeleton?: DocumentSkeleton, config?: IDocumentsConfig): Documents;
41
+ setConfig(config?: IDocumentsConfig): void;
42
+ getOffsetConfig(): IDocumentOffsetConfig;
43
+ getEngine(): Nullable<import("../../thin-engine").ThinEngine<Scene>>;
44
+ draw(ctx: CanvasRenderingContext2D, bounds?: IBoundRect): void;
45
+ changeSkeleton(newSkeleton: DocumentSkeleton): this;
46
+ protected _draw(ctx: CanvasRenderingContext2D, bounds?: IBoundRect): void;
47
+ private _horizontalHandler;
48
+ private _verticalHandler;
49
+ private _startRotation;
50
+ private _resetRotation;
51
+ private _initialDefaultExtension;
52
+ }
53
+ export {};
54
+ //# sourceMappingURL=document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../../src/components/docs/document.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAkC,UAAU,EAA+B,MAAM,gBAAgB,CAAC;AAGzG,OAAO,KAAK,EAA2B,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAC9G,OAAO,EAAY,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEnF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,UAAU,iBAAiB;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,cAAc,CAAC;CACnC;AAED,MAAM,WAAW,gBAAiB,SAAQ,i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AwB;CAsEnC"}
@@ -0,0 +1,11 @@
1
+ import type { IScale } from '@univerjs/core';
2
+ import type { IDocumentSkeletonSpan } from '../../../basics/i-document-skeleton-cached';
3
+ import { docExtension } from '../doc-extension';
4
+ export declare class Background extends docExtension {
5
+ uKey: string;
6
+ zIndex: number;
7
+ private _preBackgroundColor;
8
+ draw(ctx: CanvasRenderingContext2D, parentScale: IScale, span: IDocumentSkeletonSpan): void;
9
+ clearCache(): void;
10
+ }
11
+ //# sourceMappingURL=background.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../../../../src/components/docs/extensions/background.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAGxF,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIhD,qBAAa,UAAW,SAAQ,YAAY;IAC/B,IAAI,SAAc;IAElB,MAAM,SAAM;IAErB,OAAO,CAAC,mBAAmB,CAAM;IAExB,IAAI,CAAC,GAAG,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB;IA8BpF,UAAU;CAGtB"}
@@ -0,0 +1,13 @@
1
+ import type { IScale } from '@univerjs/core';
2
+ import type { IDocumentSkeletonSpan } from '../../../basics/i-document-skeleton-cached';
3
+ import { docExtension } from '../doc-extension';
4
+ export declare class Border extends docExtension {
5
+ uKey: string;
6
+ zIndex: number;
7
+ private _preBorderStyle;
8
+ private _preBorderColor;
9
+ draw(ctx: CanvasRenderingContext2D, parentScale: IScale, span: IDocumentSkeletonSpan): void;
10
+ clearCache(): void;
11
+ private _createBorderCache;
12
+ }
13
+ //# sourceMappingURL=border.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"border.d.ts","sourceRoot":"","sources":["../../../../../src/components/docs/extensions/border.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmD,MAAM,EAAY,MAAM,gBAAgB,CAAC;AAKxG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAGxF,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIhD,qBAAa,MAAO,SAAQ,YAAY;IAC3B,IAAI,SAAc;IAElB,MAAM,SAAM;IAErB,OAAO,CAAC,eAAe,CAA6B;IAEpD,OAAO,CAAC,eAAe,CAAM;IAEpB,IAAI,CAAC,GAAG,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB;IAkDpF,UAAU;IAKnB,OAAO,CAAC,kBAAkB;CAS7B"}
@@ -0,0 +1,12 @@
1
+ import type { IScale } from '@univerjs/core';
2
+ import type { IDocumentSkeletonSpan } from '../../../basics/i-document-skeleton-cached';
3
+ import { docExtension } from '../doc-extension';
4
+ export declare class FontAndBaseLine extends docExtension {
5
+ uKey: string;
6
+ zIndex: number;
7
+ private _preFontString;
8
+ private _preFontColor;
9
+ draw(ctx: CanvasRenderingContext2D, parentScale: IScale, span: IDocumentSkeletonSpan): void;
10
+ clearCache(): void;
11
+ }
12
+ //# sourceMappingURL=font-and-base-line.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-and-base-line.d.ts","sourceRoot":"","sources":["../../../../../src/components/docs/extensions/font-and-base-line.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAI7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAGxF,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIhD,qBAAa,eAAgB,SAAQ,YAAY;IACpC,IAAI,SAAc;IAElB,MAAM,SAAM;IAErB,OAAO,CAAC,cAAc,CAAM;IAE5B,OAAO,CAAC,aAAa,CAAM;IAElB,IAAI,CAAC,GAAG,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB;IAyDpF,UAAU;CAItB"}
@@ -0,0 +1,5 @@
1
+ export * from './background';
2
+ export * from './border';
3
+ export * from './font-and-base-line';
4
+ export * from './line';
5
+ //# sourceMappingURL=index.d.ts.map