oasis-editor 0.0.316 → 0.0.318

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.
@@ -0,0 +1,37 @@
1
+ import { EditorState } from '../model.js';
2
+ /**
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.
9
+ */
10
+ export type TableRevisionScope = "table" | "row" | "cell";
11
+ export interface TableRevisionDescriptor {
12
+ id: string;
13
+ type: "insert" | "delete" | "merge" | "property" | "grid";
14
+ author: string;
15
+ date: number;
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). */
23
+ paragraphIds: string[];
24
+ /** Concatenated text, used as the Reviewing Pane snippet. */
25
+ snippet: string;
26
+ }
27
+ /** Backwards-compatible name for the cell-scoped subset. */
28
+ export type CellRevisionDescriptor = TableRevisionDescriptor;
29
+ /**
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`.
34
+ */
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[];
@@ -76,8 +76,9 @@ export declare function isRevisionMarkupShown(state: EditorState, type: string,
76
76
  export declare function reviewDisplayProjection(mode: ReviewDisplayMode | undefined): "final" | "original" | null;
77
77
  /**
78
78
  * Paragraph ids that should carry a Simple Markup change bar: every paragraph
79
- * in the raw document with at least one visible insert/delete text revision or
80
- * run-level formatting (property) revision. Show Markup category and reviewer
79
+ * in the raw document with at least one visible insert/delete text revision,
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
81
82
  * filters are applied through `isRevisionMarkupShown`, so hiding insertions,
82
83
  * deletions, formatting or a reviewer removes the matching bar. Endnotes have
83
84
  * no editable zone and are not walked.