oasis-editor 0.0.317 → 0.0.319

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.
@@ -1,24 +1,37 @@
1
1
  import { EditorState } from '../model.js';
2
2
  /**
3
- * A structural or formatting revision attached to a table cell
4
- * (`w:tcPr` insert/delete/merge or `w:tcPrChange`). Cell revisions live on the
5
- * cell's `style`, not on any run, so every surface that lists or marks changes
6
- * needs this walker. Grid (`w:tblGridChange`) and table/row-level revisions are
7
- * preservation-only here and deliberately excluded.
3
+ * Structural or property revisions attached to a table, one of its rows, or
4
+ * one of its cells (`w:tblPrChange`/`w:tblGridChange`, `w:trPrChange`,
5
+ * `w:tcPr` insert/delete/merge and `w:tcPrChange`). These live on the node's
6
+ * `style`, not on any run, so every surface that lists, marks or navigates
7
+ * changes needs this walker. Section-level `w:sectPrChange` and pending merge
8
+ * state remain preservation-only here.
8
9
  */
9
- export interface CellRevisionDescriptor {
10
+ export type TableRevisionScope = "table" | "row" | "cell";
11
+ export interface TableRevisionDescriptor {
10
12
  id: string;
11
- type: "insert" | "delete" | "merge" | "property";
13
+ type: "insert" | "delete" | "merge" | "property" | "grid";
12
14
  author: string;
13
15
  date: number;
14
- /** Every paragraph id inside the cell's block story (nested tables included). */
16
+ scope: TableRevisionScope;
17
+ tableId: string;
18
+ /** Document row index; absent for table-scoped revisions. */
19
+ rowIndex?: number;
20
+ /** Cell index; absent for row- and table-scoped revisions. */
21
+ cellIndex?: number;
22
+ /** Every paragraph id under this scope (nested tables included). */
15
23
  paragraphIds: string[];
16
- /** Concatenated cell text, used as the Reviewing Pane snippet. */
24
+ /** Concatenated text, used as the Reviewing Pane snippet. */
17
25
  snippet: string;
18
26
  }
27
+ /** Backwards-compatible name for the cell-scoped subset. */
28
+ export type CellRevisionDescriptor = TableRevisionDescriptor;
19
29
  /**
20
- * Every cell-level revision in the document, in document order, de-duplicated
21
- * by id. Unfiltered by Show Markup: the Reviewing Pane and navigation apply
22
- * their own visibility rules, while change bars filter at the call site.
30
+ * Every table-level revision in the document, in document order,
31
+ * de-duplicated by id. Unfiltered by Show Markup: the Reviewing Pane and
32
+ * navigation apply their own visibility rules, while painting and change bars
33
+ * filter at the call site through `isRevisionMarkupShown`.
23
34
  */
24
- export declare function collectCellRevisions(state: EditorState): CellRevisionDescriptor[];
35
+ export declare function collectTableRevisions(state: EditorState): TableRevisionDescriptor[];
36
+ /** Cell-scoped revisions only (the Delivery 137 surface). */
37
+ export declare function collectCellRevisions(state: EditorState): TableRevisionDescriptor[];
@@ -77,8 +77,8 @@ export declare function reviewDisplayProjection(mode: ReviewDisplayMode | undefi
77
77
  /**
78
78
  * Paragraph ids that should carry a Simple Markup change bar: every paragraph
79
79
  * in the raw document with at least one visible insert/delete text revision,
80
- * run-level formatting (property) revision, or a revised table cell (the bar
81
- * covers each paragraph inside that cell). Show Markup category and reviewer
80
+ * run-level formatting (property) revision, or a revised table/row/cell (the
81
+ * bar covers each paragraph under that scope). Show Markup category and reviewer
82
82
  * filters are applied through `isRevisionMarkupShown`, so hiding insertions,
83
83
  * deletions, formatting or a reviewer removes the matching bar. Endnotes have
84
84
  * no editable zone and are not walked.