@univerjs/engine-render 1.0.3 → 1.0.4

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.
@@ -41,6 +41,8 @@ export interface IDocumentLayoutApplyResult {
41
41
  export interface IDocumentLayoutProgress {
42
42
  generation: number;
43
43
  publicationRevision: number;
44
+ /** Pagination may restart when a total-page field changes the available body space. */
45
+ paginationRevision?: number;
44
46
  didPublish: boolean;
45
47
  /** The publication atomically replaced the page containing the edit anchor. */
46
48
  didPublishAnchor: boolean;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { ICustomRange } from '@univerjs/core';
17
+ import type { IDocumentSkeletonGlyph } from '../../../basics/i-document-skeleton-cached';
18
+ export declare function resolveHeaderFooterFieldGlyph(glyph: IDocumentSkeletonGlyph, startIndex: number, endIndex: number, customRanges: ICustomRange[], pageNumber: number, pageCount: number | undefined): IDocumentSkeletonGlyph;
@@ -103,7 +103,7 @@ export interface IDocumentSkeletonLineContext {
103
103
  visualWidth?: number;
104
104
  }
105
105
  export type DocumentSkeletonTableSource = 'page' | 'table-cell' | 'column' | 'header' | 'footer';
106
- type HeaderFooterSkeletonMap = Map<string, Map<number, IDocumentSkeletonPage>>;
106
+ type HeaderFooterSkeletonMap = Map<string, Map<number | string, IDocumentSkeletonPage>>;
107
107
  export interface IDocumentSkeletonTableCellGeometry {
108
108
  cell: IDocumentSkeletonPage;
109
109
  cellRect: IBoundRectNoAngle;
@@ -241,6 +241,15 @@ export interface IDocumentPaginationMetrics {
241
241
  peakCheckpointLineCount: number;
242
242
  }
243
243
  export interface ILayoutContext {
244
+ headerFooterFieldContext?: {
245
+ pageNumber: number;
246
+ pageCount?: number;
247
+ };
248
+ fieldPageCount?: number;
249
+ hasNumPagesFields?: boolean;
250
+ fieldCountCandidates?: Set<number>;
251
+ fieldCountCycle?: boolean;
252
+ headerFooterMinimumMargins?: Map<string, number>;
244
253
  noteReferences?: ReadonlyMap<number, INoteReferenceLayout>;
245
254
  footnoteLayout?: DocumentFootnoteLayout;
246
255
  endnoteLayout?: DocumentEndnoteLayout;
@@ -45,6 +45,7 @@ export declare class DocumentLayoutSession extends Disposable {
45
45
  private readonly _viewModel;
46
46
  private readonly _skeleton;
47
47
  private _lastPublishedPageCount;
48
+ private _paginationRevision;
48
49
  private _layoutReason;
49
50
  private _didPublishEditAnchor;
50
51
  private _continuousPageSnapshot;