@univerjs/engine-render 0.1.3 → 0.1.5

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 (126) hide show
  1. package/lib/cjs/index.js +2 -2
  2. package/lib/es/index.js +10914 -10855
  3. package/lib/types/base-object.d.ts +7 -23
  4. package/lib/types/basics/cell-data.d.ts +2 -16
  5. package/lib/types/basics/document-node-tools.d.ts +10 -24
  6. package/lib/types/basics/draw.d.ts +5 -20
  7. package/lib/types/basics/font-cache.d.ts +4 -18
  8. package/lib/types/basics/i-document-skeleton-cached.d.ts +15 -23
  9. package/lib/types/basics/i-events.d.ts +2 -16
  10. package/lib/types/basics/interfaces.d.ts +7 -21
  11. package/lib/types/basics/path2.d.ts +2 -16
  12. package/lib/types/basics/position.d.ts +3 -17
  13. package/lib/types/basics/quick-event.d.ts +3 -17
  14. package/lib/types/basics/range.d.ts +2 -16
  15. package/lib/types/basics/text-rotation.d.ts +2 -16
  16. package/lib/types/basics/tools.d.ts +10 -20
  17. package/lib/types/basics/transform.d.ts +3 -17
  18. package/lib/types/basics/vector2.d.ts +2 -16
  19. package/lib/types/basics/viewport-subtract.d.ts +3 -0
  20. package/lib/types/canvas.d.ts +1 -15
  21. package/lib/types/components/component.d.ts +5 -19
  22. package/lib/types/components/docs/doc-component.d.ts +10 -25
  23. package/lib/types/components/docs/doc-extension.d.ts +4 -18
  24. package/lib/types/components/docs/document.d.ts +10 -26
  25. package/lib/types/components/docs/extensions/background.d.ts +5 -19
  26. package/lib/types/components/docs/extensions/border.d.ts +5 -19
  27. package/lib/types/components/docs/extensions/font-and-base-line.d.ts +5 -19
  28. package/lib/types/components/docs/extensions/line.d.ts +5 -19
  29. package/lib/types/components/docs/layout/block/paragraph/bullet-ruler.d.ts +3 -0
  30. package/lib/types/components/docs/layout/block/paragraph/bullet.d.ts +5 -0
  31. package/lib/types/components/docs/layout/block/paragraph/inline-drawing.d.ts +5 -0
  32. package/lib/types/components/docs/layout/block/paragraph/language-ruler.d.ts +21 -0
  33. package/lib/types/components/docs/layout/block/paragraph/layout-ruler.d.ts +4 -0
  34. package/lib/types/components/docs/layout/block/paragraph/layout.d.ts +6 -0
  35. package/lib/types/components/docs/layout/block/paragraph/line-adjustment.d.ts +4 -0
  36. package/lib/types/components/docs/layout/block/paragraph/linebreaking.d.ts +7 -0
  37. package/lib/types/components/docs/layout/block/paragraph/shaping.d.ts +11 -0
  38. package/lib/types/components/docs/layout/block/section.d.ts +10 -0
  39. package/lib/types/components/docs/{doc-skeleton.d.ts → layout/doc-skeleton.d.ts} +11 -26
  40. package/lib/types/components/docs/layout/linebreak/extensions/tab-linebreak-extension.d.ts +3 -0
  41. package/lib/types/components/docs/layout/linebreak/linebreaker.d.ts +27 -0
  42. package/lib/types/components/docs/layout/model/__test__/glyph.spec.d.ts +16 -0
  43. package/lib/types/components/docs/layout/model/column.d.ts +4 -0
  44. package/lib/types/components/docs/layout/model/glyph.d.ts +16 -0
  45. package/lib/types/components/docs/{common → layout/model}/line.d.ts +2 -16
  46. package/lib/types/components/docs/layout/model/page.d.ts +4 -0
  47. package/lib/types/components/docs/layout/model/section.d.ts +5 -0
  48. package/lib/types/components/docs/{common → layout}/tools.d.ts +10 -25
  49. package/lib/types/components/docs/{common/liquid.d.ts → liquid.d.ts} +4 -19
  50. package/lib/types/components/docs/{common → text-selection}/convert-cursor.d.ts +9 -23
  51. package/lib/types/components/docs/{common → text-selection}/text-range.d.ts +10 -25
  52. package/lib/types/components/docs/{text-selection-render-manager.d.ts → text-selection/text-selection-render-manager.d.ts} +15 -28
  53. package/lib/types/components/docs/view-model/data-stream-tree-node.d.ts +2 -17
  54. package/lib/types/components/docs/view-model/document-view-model.d.ts +8 -23
  55. package/lib/types/components/extension.d.ts +5 -20
  56. package/lib/types/components/index.d.ts +0 -1
  57. package/lib/types/components/sheets/column-header.d.ts +5 -19
  58. package/lib/types/components/sheets/extensions/background.d.ts +4 -18
  59. package/lib/types/components/sheets/extensions/border.d.ts +4 -18
  60. package/lib/types/components/sheets/extensions/column-header-layout.d.ts +4 -18
  61. package/lib/types/components/sheets/extensions/font.d.ts +4 -18
  62. package/lib/types/components/sheets/extensions/row-header-layout.d.ts +4 -18
  63. package/lib/types/components/sheets/extensions/sheet-extension.d.ts +4 -18
  64. package/lib/types/components/sheets/interfaces.d.ts +4 -18
  65. package/lib/types/components/sheets/row-header.d.ts +5 -19
  66. package/lib/types/components/sheets/sheet-component.d.ts +6 -20
  67. package/lib/types/components/sheets/sheet-skeleton.d.ts +8 -23
  68. package/lib/types/components/sheets/spreadsheet.d.ts +8 -22
  69. package/lib/types/components/skeleton.d.ts +2 -16
  70. package/lib/types/components/slides/slide.d.ts +5 -20
  71. package/lib/types/context.d.ts +4 -0
  72. package/lib/types/custom/custom-object.d.ts +3 -17
  73. package/lib/types/engine.d.ts +9 -19
  74. package/lib/types/group.d.ts +4 -19
  75. package/lib/types/index.d.ts +9 -1
  76. package/lib/types/layer.d.ts +5 -18
  77. package/lib/types/render-engine.d.ts +4 -18
  78. package/lib/types/render-manager.service.d.ts +10 -23
  79. package/lib/types/scene-viewer.d.ts +7 -21
  80. package/lib/types/scene.d.ts +14 -29
  81. package/lib/types/scene.input-manager.d.ts +3 -17
  82. package/lib/types/scene.transformer.d.ts +5 -20
  83. package/lib/types/scroll-timer.d.ts +4 -18
  84. package/lib/types/services/object-transform-manager.service.d.ts +4 -18
  85. package/lib/types/shape/base-scroll-bar.d.ts +7 -21
  86. package/lib/types/shape/circle.d.ts +3 -18
  87. package/lib/types/shape/path.d.ts +3 -18
  88. package/lib/types/shape/picture.d.ts +4 -19
  89. package/lib/types/shape/rect.d.ts +3 -18
  90. package/lib/types/shape/regular-polygon.d.ts +5 -20
  91. package/lib/types/shape/rich-text.d.ts +4 -18
  92. package/lib/types/shape/scroll-bar.d.ts +6 -21
  93. package/lib/types/shape/shape.d.ts +5 -19
  94. package/lib/types/thin-engine.d.ts +6 -21
  95. package/lib/types/thin-scene.d.ts +11 -24
  96. package/lib/types/viewport.d.ts +9 -28
  97. package/lib/umd/index.js +2 -2
  98. package/package.json +10 -9
  99. package/lib/types/components/docs/block/index.d.ts +0 -18
  100. package/lib/types/components/docs/block/paragraph/bullet-ruler.d.ts +0 -17
  101. package/lib/types/components/docs/block/paragraph/bullet.d.ts +0 -19
  102. package/lib/types/components/docs/block/paragraph/index.d.ts +0 -21
  103. package/lib/types/components/docs/block/paragraph/inline-drawing.d.ts +0 -19
  104. package/lib/types/components/docs/block/paragraph/language-ruler.d.ts +0 -35
  105. package/lib/types/components/docs/block/paragraph/layout-ruler.d.ts +0 -18
  106. package/lib/types/components/docs/block/paragraph/paragraph.d.ts +0 -20
  107. package/lib/types/components/docs/block/section.d.ts +0 -24
  108. package/lib/types/components/docs/common/column.d.ts +0 -19
  109. package/lib/types/components/docs/common/index.d.ts +0 -24
  110. package/lib/types/components/docs/common/page.d.ts +0 -19
  111. package/lib/types/components/docs/common/section.d.ts +0 -20
  112. package/lib/types/components/docs/common/span.d.ts +0 -28
  113. package/lib/types/components/docs/index.d.ts +0 -22
  114. package/lib/types/components/docs/linebreak/extensions/tab-linebreak-extension.d.ts +0 -17
  115. package/lib/types/components/docs/linebreak/linebreaker.d.ts +0 -41
  116. /package/lib/types/components/docs/{block → layout/block}/block-error.d.ts +0 -0
  117. /package/lib/types/components/docs/{linebreak → layout/linebreak}/__tests__/linebreak.spec.d.ts +0 -0
  118. /package/lib/types/components/docs/{linebreak → layout/linebreak}/break.d.ts +0 -0
  119. /package/lib/types/components/docs/{linebreak → layout/linebreak}/classes.d.ts +0 -0
  120. /package/lib/types/components/docs/{linebreak → layout/linebreak}/index.d.ts +0 -0
  121. /package/lib/types/components/docs/{linebreak → layout/linebreak}/pairs.d.ts +0 -0
  122. /package/lib/types/components/docs/{linebreak → layout/linebreak}/rule.d.ts +0 -0
  123. /package/lib/types/components/docs/{linebreak → layout/linebreak}/swap.d.ts +0 -0
  124. /package/lib/types/components/docs/{linebreak → layout/linebreak}/tiny-inflate.d.ts +0 -0
  125. /package/lib/types/components/docs/{linebreak → layout/linebreak}/trie-data.d.ts +0 -0
  126. /package/lib/types/components/docs/{linebreak → layout/linebreak}/unicode-trie.d.ts +0 -0
@@ -1,28 +1,13 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from '@univerjs/core';
17
- import type { INodePosition } from '../../../basics/interfaces';
18
- import type { ISuccinctTextRangeParam, ITextSelectionStyle } from '../../../basics/range';
19
- import { RANGE_DIRECTION } from '../../../basics/range';
20
- import type { IPoint } from '../../../basics/vector2';
21
- import type { Scene } from '../../../scene';
1
+ import { Documents } from '../document';
2
+ import { DocumentSkeleton } from '../layout/doc-skeleton';
3
+ import { ThinScene } from '../../../thin-scene';
22
4
  import { Rect } from '../../../shape/rect';
23
- import type { ThinScene } from '../../../thin-scene';
24
- import type { DocumentSkeleton } from '../doc-skeleton';
25
- import type { Documents } from '../document';
5
+ import { Scene } from '../../../scene';
6
+ import { IPoint } from '../../../basics/vector2';
7
+ import { ISuccinctTextRangeParam, ITextSelectionStyle, RANGE_DIRECTION } from '../../../basics/range';
8
+ import { INodePosition } from '../../../basics/interfaces';
9
+ import { Nullable } from '@univerjs/core';
10
+
26
11
  export declare const TEXT_RANGE_LAYER_INDEX = 1;
27
12
  export declare function cursorConvertToTextRange(scene: Scene, range: ISuccinctTextRangeParam, docSkeleton: DocumentSkeleton, document: Documents): Nullable<TextRange>;
28
13
  export declare function getAnchorBounding(pointsGroup: IPoint[][]): {
@@ -51,7 +36,7 @@ export declare class TextRange {
51
36
  get startNodePosition(): INodePosition | null;
52
37
  get endNodePosition(): Nullable<INodePosition>;
53
38
  get direction(): RANGE_DIRECTION;
54
- getAnchor(): Nullable<Rect<import("../../../shape/rect").IRectProps>>;
39
+ getAnchor(): Nullable<Rect<import('../../../shape/rect').IRectProps>>;
55
40
  activeStatic(): void;
56
41
  deactivateStatic(): void;
57
42
  isActive(): boolean;
@@ -1,30 +1,15 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from '@univerjs/core';
17
- import { ILogService, RxDisposable } from '@univerjs/core';
18
- import type { Observable } from 'rxjs';
19
- import type { IMouseEvent, IPointerEvent } from '../../basics/i-events';
20
- import type { INodePosition } from '../../basics/interfaces';
21
- import type { ISuccinctTextRangeParam, ITextRangeWithStyle, ITextSelectionStyle, RANGE_DIRECTION } from '../../basics/range';
22
- import type { Engine } from '../../engine';
23
- import type { Scene } from '../../scene';
24
- import type { Viewport } from '../../viewport';
25
- import { TextRange } from './common/text-range';
26
- import type { DocumentSkeleton } from './doc-skeleton';
27
- import type { Documents } from './document';
1
+ import { TextRange } from './text-range';
2
+ import { Documents } from '../document';
3
+ import { DocumentSkeleton } from '../layout/doc-skeleton';
4
+ import { Viewport } from '../../../viewport';
5
+ import { Scene } from '../../../scene';
6
+ import { Engine } from '../../../engine';
7
+ import { ISuccinctTextRangeParam, ITextRangeWithStyle, ITextSelectionStyle, RANGE_DIRECTION } from '../../../basics/range';
8
+ import { INodePosition } from '../../../basics/interfaces';
9
+ import { IMouseEvent, IPointerEvent } from '../../../basics/i-events';
10
+ import { Observable } from 'rxjs';
11
+ import { Nullable, ILogService, RxDisposable } from '@univerjs/core';
12
+
28
13
  export declare function getCanvasOffsetByEngine(engine: Nullable<Engine>): {
29
14
  left: number;
30
15
  top: number;
@@ -77,6 +62,7 @@ export interface ITextSelectionRenderManager {
77
62
  handleDblClick(evt: IPointerEvent | IMouseEvent): void;
78
63
  handleTripleClick(evt: IPointerEvent | IMouseEvent): void;
79
64
  eventTrigger(evt: IPointerEvent | IMouseEvent): void;
65
+ setCursorManually(evtOffsetX: number, evtOffsetY: number): void;
80
66
  }
81
67
  export interface IEditorInputConfig {
82
68
  event: Event | CompositionEvent | KeyboardEvent;
@@ -144,6 +130,7 @@ export declare class TextSelectionRenderManager extends RxDisposable implements
144
130
  changeRuntime(docSkeleton: DocumentSkeleton, scene: Scene, document: Documents): void;
145
131
  handleDblClick(evt: IPointerEvent | IMouseEvent): void;
146
132
  handleTripleClick(evt: IPointerEvent | IMouseEvent): void;
133
+ setCursorManually(evtOffsetX: number, evtOffsetY: number): void;
147
134
  eventTrigger(evt: IPointerEvent | IMouseEvent): void;
148
135
  removeAllTextRanges(): void;
149
136
  private _getAllTextRanges;
@@ -172,4 +159,4 @@ export declare class TextSelectionRenderManager extends RxDisposable implements
172
159
  private _detachEvent;
173
160
  private _activeSelectionRefresh;
174
161
  }
175
- export declare const ITextSelectionRenderManager: import("@wendellhu/redi").IdentifierDecorator<TextSelectionRenderManager>;
162
+ export declare const ITextSelectionRenderManager: import('@wendellhu/redi').IdentifierDecorator<TextSelectionRenderManager>;
@@ -1,20 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from '@univerjs/core';
17
- import { DataStreamTreeNodeType } from '@univerjs/core';
1
+ import { Nullable, DataStreamTreeNodeType } from '@univerjs/core';
2
+
18
3
  export declare class DataStreamTreeNode {
19
4
  nodeType: DataStreamTreeNodeType;
20
5
  content?: string | undefined;
@@ -1,22 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDocumentBody, ITextRun } from '@univerjs/core';
17
- import { DocumentDataModel } from '@univerjs/core';
18
- import type { IDisposable } from '@wendellhu/redi';
19
1
  import { DataStreamTreeNode } from './data-stream-tree-node';
2
+ import { IDisposable } from '@wendellhu/redi';
3
+ import { IDocumentBody, ITextRun, DocumentDataModel } from '@univerjs/core';
4
+
20
5
  export declare class DocumentViewModel implements IDisposable {
21
6
  private _documentDataModel;
22
7
  children: DataStreamTreeNode[];
@@ -42,16 +27,16 @@ export declare class DocumentViewModel implements IDisposable {
42
27
  /** Get pure text content in the given range. */
43
28
  getText(): string;
44
29
  resetCache(): void;
45
- getSectionBreak(index: number): import("@univerjs/core").ISectionBreak | undefined;
46
- getParagraph(index: number): import("@univerjs/core").IParagraph | undefined;
30
+ getSectionBreak(index: number): import('@univerjs/core').ISectionBreak | undefined;
31
+ getParagraph(index: number): import('@univerjs/core').IParagraph | undefined;
47
32
  getTextRunRange(startIndex: number | undefined, endIndex: number): ITextRun[];
48
33
  /**
49
34
  * textRun matches according to the selection. If the text length is 10, then the range of textRun is from 0 to 11.
50
35
  */
51
36
  getTextRun(index: number): ITextRun | undefined;
52
- getCustomBlock(index: number): import("@univerjs/core").ICustomBlock | undefined;
53
- getTable(index: number): import("@univerjs/core").ITable | undefined;
54
- getCustomRange(index: number): import("@univerjs/core").ICustomRange | undefined;
37
+ getCustomBlock(index: number): import('@univerjs/core').ICustomBlock | undefined;
38
+ getTable(index: number): import('@univerjs/core').ITable | undefined;
39
+ getCustomRange(index: number): import('@univerjs/core').ICustomRange | undefined;
55
40
  protected _transformToTree(dataStream: string): DataStreamTreeNode[];
56
41
  private _processPreviousNodesUntil;
57
42
  private _batchParent;
@@ -1,23 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDocumentRenderConfig, IScale, Nullable } from '@univerjs/core';
17
- import { Registry } from '@univerjs/core';
18
- import type { BaseObject } from '../base-object';
19
- import type { Vector2 } from '../basics/vector2';
20
- import type { UniverRenderingContext } from '../context';
1
+ import { UniverRenderingContext } from '../context';
2
+ import { Vector2 } from '../basics/vector2';
3
+ import { BaseObject } from '../base-object';
4
+ import { IDocumentRenderConfig, IScale, Nullable, Registry } from '@univerjs/core';
5
+
21
6
  export interface IExtensionConfig {
22
7
  originTranslate?: Vector2;
23
8
  spanStartPoint?: Vector2;
@@ -14,7 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export * from './component';
17
- export * from './docs';
18
17
  export * from './extension';
19
18
  export * from './sheets';
20
19
  export * from './skeleton';
@@ -1,23 +1,9 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IViewportBound, Vector2 } from '../../basics/vector2';
17
- import type { UniverRenderingContext } from '../../context';
18
- import type { ColumnHeaderLayout } from './extensions/column-header-layout';
1
+ import { SpreadsheetSkeleton } from './sheet-skeleton';
19
2
  import { SpreadsheetHeader } from './sheet-component';
20
- import type { SpreadsheetSkeleton } from './sheet-skeleton';
3
+ import { ColumnHeaderLayout } from './extensions/column-header-layout';
4
+ import { UniverRenderingContext } from '../../context';
5
+ import { IViewportBound, Vector2 } from '../../basics/vector2';
6
+
21
7
  export declare class SpreadsheetColumnHeader extends SpreadsheetHeader {
22
8
  private _columnHeaderLayoutExtension;
23
9
  constructor(oKey: string, spreadsheetSkeleton?: SpreadsheetSkeleton);
@@ -1,22 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IRange, IScale } from '@univerjs/core';
17
- import type { UniverRenderingContext } from '../../../context';
18
- import type { SpreadsheetSkeleton } from '../sheet-skeleton';
19
1
  import { SheetExtension } from './sheet-extension';
2
+ import { SpreadsheetSkeleton } from '../sheet-skeleton';
3
+ import { UniverRenderingContext } from '../../../context';
4
+ import { IRange, IScale } from '@univerjs/core';
5
+
20
6
  export declare class Background extends SheetExtension {
21
7
  uKey: string;
22
8
  Z_INDEX: number;
@@ -1,22 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IRange, IScale } from '@univerjs/core';
17
- import type { UniverRenderingContext } from '../../../context';
18
- import type { SpreadsheetSkeleton } from '../sheet-skeleton';
19
1
  import { SheetExtension } from './sheet-extension';
2
+ import { SpreadsheetSkeleton } from '../sheet-skeleton';
3
+ import { UniverRenderingContext } from '../../../context';
4
+ import { IRange, IScale } from '@univerjs/core';
5
+
20
6
  export declare class Border extends SheetExtension {
21
7
  uKey: string;
22
8
  Z_INDEX: number;
@@ -1,22 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IScale } from '@univerjs/core';
17
- import type { UniverRenderingContext } from '../../../context';
18
- import type { SpreadsheetSkeleton } from '../sheet-skeleton';
19
1
  import { SheetExtension } from './sheet-extension';
2
+ import { SpreadsheetSkeleton } from '../sheet-skeleton';
3
+ import { UniverRenderingContext } from '../../../context';
4
+ import { IScale } from '@univerjs/core';
5
+
20
6
  export declare class ColumnHeaderLayout extends SheetExtension {
21
7
  uKey: string;
22
8
  Z_INDEX: number;
@@ -1,22 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IRange, IScale } from '@univerjs/core';
17
- import type { UniverRenderingContext } from '../../../context';
18
- import { type SpreadsheetSkeleton } from '../sheet-skeleton';
19
1
  import { SheetExtension } from './sheet-extension';
2
+ import { SpreadsheetSkeleton } from '../sheet-skeleton';
3
+ import { UniverRenderingContext } from '../../../context';
4
+ import { IRange, IScale } from '@univerjs/core';
5
+
20
6
  export interface ISheetFontRenderExtension {
21
7
  fontRenderExtension?: {
22
8
  leftOffset?: number;
@@ -1,22 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IScale } from '@univerjs/core';
17
- import type { UniverRenderingContext } from '../../../context';
18
- import type { SpreadsheetSkeleton } from '../sheet-skeleton';
19
1
  import { SheetExtension } from './sheet-extension';
2
+ import { SpreadsheetSkeleton } from '../sheet-skeleton';
3
+ import { UniverRenderingContext } from '../../../context';
4
+ import { IScale } from '@univerjs/core';
5
+
20
6
  export declare class RowHeaderLayout extends SheetExtension {
21
7
  uKey: string;
22
8
  Z_INDEX: number;
@@ -1,27 +1,13 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { type IRange } from '@univerjs/core';
1
+ import { SpreadsheetSkeleton } from '../sheet-skeleton';
17
2
  import { ComponentExtension } from '../../extension';
18
- import type { SpreadsheetSkeleton } from '../sheet-skeleton';
3
+ import { IRange } from '@univerjs/core';
4
+
19
5
  export declare enum SHEET_EXTENSION_TYPE {
20
6
  GRID = 0
21
7
  }
22
8
  export declare class SheetExtension extends ComponentExtension<SpreadsheetSkeleton, SHEET_EXTENSION_TYPE, IRange[]> {
23
9
  type: SHEET_EXTENSION_TYPE;
24
- getCellIndex(rowIndex: number, columnIndex: number, rowHeightAccumulation: number[], columnWidthAccumulation: number[], dataMergeCache: IRange[]): import("@univerjs/core").ISelectionCellWithCoord;
10
+ getCellIndex(rowIndex: number, columnIndex: number, rowHeightAccumulation: number[], columnWidthAccumulation: number[], dataMergeCache: IRange[]): import('@univerjs/core').ISelectionCellWithCoord;
25
11
  isRenderDiffRangesByCell(range: IRange, diffRanges?: IRange[]): boolean;
26
12
  isRenderDiffRangesByColumn(curStartColumn: number, curEndColumn: number, diffRanges?: IRange[]): boolean;
27
13
  isRenderDiffRangesByRow(curStartRow: number, curEndRow: number, diffRanges?: IRange[]): boolean;
@@ -1,21 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { BorderStyleTypes, HorizontalAlign, ISelectionCellWithCoord, ObjectMatrix, VerticalAlign, WrapStrategy } from '@univerjs/core';
17
- import type { BORDER_TYPE } from '../../basics/const';
18
- import type { DocumentSkeleton } from '../docs/doc-skeleton';
1
+ import { DocumentSkeleton } from '../docs/layout/doc-skeleton';
2
+ import { BORDER_TYPE } from '../../basics/const';
3
+ import { BorderStyleTypes, HorizontalAlign, ISelectionCellWithCoord, ObjectMatrix, VerticalAlign, WrapStrategy } from '@univerjs/core';
4
+
19
5
  export interface BorderCache {
20
6
  [key: string]: BorderCacheItem | {};
21
7
  }
@@ -1,23 +1,9 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IViewportBound, Vector2 } from '../../basics/vector2';
17
- import type { UniverRenderingContext } from '../../context';
18
- import type { RowHeaderLayout } from './extensions/row-header-layout';
1
+ import { SpreadsheetSkeleton } from './sheet-skeleton';
19
2
  import { SpreadsheetHeader } from './sheet-component';
20
- import type { SpreadsheetSkeleton } from './sheet-skeleton';
3
+ import { RowHeaderLayout } from './extensions/row-header-layout';
4
+ import { UniverRenderingContext } from '../../context';
5
+ import { IViewportBound, Vector2 } from '../../basics/vector2';
6
+
21
7
  export declare class SpreadsheetRowHeader extends SpreadsheetHeader {
22
8
  private _rowHeaderLayoutExtension;
23
9
  constructor(oKey: string, spreadsheetSkeleton?: SpreadsheetSkeleton);
@@ -1,24 +1,10 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IRange, Nullable } from '@univerjs/core';
17
- import type { IViewportBound, Vector2 } from '../../basics/vector2';
18
- import type { UniverRenderingContext } from '../../context';
1
+ import { SpreadsheetSkeleton } from './sheet-skeleton';
2
+ import { SHEET_EXTENSION_TYPE } from './extensions/sheet-extension';
19
3
  import { RenderComponent } from '../component';
20
- import type { SHEET_EXTENSION_TYPE } from './extensions/sheet-extension';
21
- import type { SpreadsheetSkeleton } from './sheet-skeleton';
4
+ import { UniverRenderingContext } from '../../context';
5
+ import { IViewportBound, Vector2 } from '../../basics/vector2';
6
+ import { IRange, Nullable } from '@univerjs/core';
7
+
22
8
  export declare class SheetComponent extends RenderComponent<SpreadsheetSkeleton, SHEET_EXTENSION_TYPE, IRange[]> {
23
9
  private _skeleton?;
24
10
  constructor(oKey: string, _skeleton?: SpreadsheetSkeleton | undefined);
@@ -1,24 +1,9 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICellData, IPaddingData, IRange, ISelectionCellWithCoord, ITextRotation, IWorksheetData, Nullable, Styles, Worksheet } from '@univerjs/core';
17
- import { BooleanNumber, DocumentDataModel, HorizontalAlign, IContextService, LocaleService, ObjectMatrix, VerticalAlign, WrapStrategy } from '@univerjs/core';
18
- import type { IBoundRectNoAngle, IViewportBound } from '../../basics/vector2';
19
- import { DocumentSkeleton } from '../docs/doc-skeleton';
1
+ import { IStylesCache } from './interfaces';
20
2
  import { Skeleton } from '../skeleton';
21
- import type { IStylesCache } from './interfaces';
3
+ import { DocumentSkeleton } from '../docs/layout/doc-skeleton';
4
+ import { IBoundRectNoAngle, IViewportBound } from '../../basics/vector2';
5
+ import { ICellData, IPaddingData, IRange, ISelectionCellWithCoord, ITextRotation, IWorksheetData, Nullable, Styles, Worksheet, BooleanNumber, DocumentDataModel, HorizontalAlign, IContextService, LocaleService, ObjectMatrix, VerticalAlign, WrapStrategy } from '@univerjs/core';
6
+
22
7
  /**
23
8
  * Obtain the height and width of a cell's text, taking into account scenarios with rotated text.
24
9
  * @param documentSkeleton Data of the document's ViewModel
@@ -243,9 +228,9 @@ export declare class SpreadsheetSkeleton extends Skeleton {
243
228
  endY: number;
244
229
  startColumn: number;
245
230
  endColumn: number;
246
- rangeType?: import("@univerjs/core").RANGE_TYPE | undefined;
247
- startAbsoluteRefType?: import("@univerjs/core").AbsoluteRefType | undefined;
248
- endAbsoluteRefType?: import("@univerjs/core").AbsoluteRefType | undefined;
231
+ rangeType?: import('@univerjs/core').RANGE_TYPE | undefined;
232
+ startAbsoluteRefType?: import('@univerjs/core').AbsoluteRefType | undefined;
233
+ endAbsoluteRefType?: import('@univerjs/core').AbsoluteRefType | undefined;
249
234
  startRow: number;
250
235
  endRow: number;
251
236
  };
@@ -1,26 +1,12 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IViewportBound, Vector2 } from '../../basics/vector2';
17
- import type { UniverRenderingContext } from '../../context';
18
- import { Documents } from '../docs/document';
19
- import type { Background } from './extensions/background';
20
- import type { Border } from './extensions/border';
21
- import type { Font } from './extensions/font';
1
+ import { SpreadsheetSkeleton } from './sheet-skeleton';
22
2
  import { SheetComponent } from './sheet-component';
23
- import type { SpreadsheetSkeleton } from './sheet-skeleton';
3
+ import { Font } from './extensions/font';
4
+ import { Border } from './extensions/border';
5
+ import { Background } from './extensions/background';
6
+ import { Documents } from '../docs/document';
7
+ import { UniverRenderingContext } from '../../context';
8
+ import { IViewportBound, Vector2 } from '../../basics/vector2';
9
+
24
10
  export declare class Spreadsheet extends SheetComponent {
25
11
  private _allowCache;
26
12
  private _backgroundExtension;
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
1
+ import { IFontLocale } from '../basics/interfaces';
16
2
  import { Disposable, LocaleService } from '@univerjs/core';
17
- import type { IFontLocale } from '../basics/interfaces';
3
+
18
4
  export declare class Skeleton extends Disposable {
19
5
  protected readonly _localService: LocaleService;
20
6
  private _fontLocale;