oasis-editor 0.0.323 → 0.0.324
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.
- package/dist/OasisEditorApp-DW6joMcq.js +1 -0
- package/dist/core/commands/cellRevisions.d.ts +30 -4
- package/dist/core/commands/reviewMarkup.d.ts +9 -7
- package/dist/defaultToolbar-DMTTdv2b.js +1 -0
- package/dist/i18n/locales/en.d.ts +1 -0
- package/dist/i18n/locales/pt-BR.d.ts +1 -0
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/ui/canvas/CanvasRevisionGeometry.d.ts +4 -3
- package/dist/ui/components/RevisionMarkupOverlay.d.ts +4 -2
- package/dist/ui/editorUiTypes.d.ts +6 -2
- package/package.json +1 -1
- package/dist/OasisEditorApp-Dbi6wWe6.js +0 -1
- package/dist/defaultToolbar-CzkxV5ty.js +0 -1
|
@@ -2,12 +2,28 @@ import { EditorState } from '../model.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Structural or property revisions attached to a table, one of its rows, or
|
|
4
4
|
* one of its cells (`w:tblPrChange`/`w:tblGridChange`, `w:trPrChange`,
|
|
5
|
-
* `w:tcPr` insert/delete/merge and `w:tcPrChange`)
|
|
6
|
-
* `
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* `w:tcPr` insert/delete/merge and `w:tcPrChange`), plus section-level
|
|
6
|
+
* `w:sectPrChange` property revisions. These live on the node's `style` (or the
|
|
7
|
+
* section), not on any run, so every surface that lists, marks or navigates
|
|
8
|
+
* changes needs these walkers. Pending merge state (`mergeRevisionState`) still
|
|
9
|
+
* carries only an id — no author/date/type — so it remains preservation-only
|
|
10
|
+
* and cannot become a Reviewing Pane row without new semantics.
|
|
9
11
|
*/
|
|
10
12
|
export type TableRevisionScope = "table" | "row" | "cell";
|
|
13
|
+
/** A `w:sectPrChange` property revision on a section. */
|
|
14
|
+
export interface SectionRevisionDescriptor {
|
|
15
|
+
id: string;
|
|
16
|
+
/** `w:sectPrChange` is a formatting change (Word's Formatting category). */
|
|
17
|
+
type: "property";
|
|
18
|
+
author: string;
|
|
19
|
+
date: number;
|
|
20
|
+
sectionId: string;
|
|
21
|
+
sectionIndex: number;
|
|
22
|
+
/** Every body paragraph id under the section (nested tables included). */
|
|
23
|
+
paragraphIds: string[];
|
|
24
|
+
/** Concatenated body text, used as the Reviewing Pane snippet. */
|
|
25
|
+
snippet: string;
|
|
26
|
+
}
|
|
11
27
|
export interface TableRevisionDescriptor {
|
|
12
28
|
id: string;
|
|
13
29
|
type: "insert" | "delete" | "merge" | "property" | "grid";
|
|
@@ -35,3 +51,13 @@ export type CellRevisionDescriptor = TableRevisionDescriptor;
|
|
|
35
51
|
export declare function collectTableRevisions(state: EditorState): TableRevisionDescriptor[];
|
|
36
52
|
/** Cell-scoped revisions only (the Delivery 137 surface). */
|
|
37
53
|
export declare function collectCellRevisions(state: EditorState): TableRevisionDescriptor[];
|
|
54
|
+
/**
|
|
55
|
+
* Every section-level `w:sectPrChange` property revision, in document order,
|
|
56
|
+
* de-duplicated by id. A section revision has no run to carry its id, so each
|
|
57
|
+
* descriptor carries the section's body paragraph ids: the first anchors Next/
|
|
58
|
+
* Previous Change and the Reviewing Pane row, while the whole set drives
|
|
59
|
+
* Simple Markup change bars and the painted section outline. Unfiltered by Show
|
|
60
|
+
* Markup; consumers apply `isRevisionMarkupShown` at the call site (the type is
|
|
61
|
+
* `"property"`, so it follows the dedicated Formatting checkbox).
|
|
62
|
+
*/
|
|
63
|
+
export declare function collectSectionRevisions(state: EditorState): SectionRevisionDescriptor[];
|
|
@@ -77,11 +77,12 @@ 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,
|
|
81
|
-
* bar covers each paragraph under that scope)
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
80
|
+
* run-level formatting (property) revision, a revised table/row/cell (the
|
|
81
|
+
* bar covers each paragraph under that scope), or a revised section (every
|
|
82
|
+
* paragraph in the section). Show Markup category and reviewer filters are
|
|
83
|
+
* applied through `isRevisionMarkupShown`, so hiding insertions, deletions,
|
|
84
|
+
* formatting or a reviewer removes the matching bar. Endnotes have no editable
|
|
85
|
+
* zone and are not walked.
|
|
85
86
|
*/
|
|
86
87
|
export declare function collectChangeBarParagraphIds(state: EditorState): Set<string>;
|
|
87
88
|
/** A visible revision's extent in the accepted (final) text of a paragraph. */
|
|
@@ -92,8 +93,9 @@ export interface ChangeBarRange {
|
|
|
92
93
|
/**
|
|
93
94
|
* Per-paragraph extents of visible revisions, expressed in *final-text* offsets
|
|
94
95
|
* — the coordinate space of Simple Markup's projected layout. A `null` value
|
|
95
|
-
* means the whole paragraph is changed (a table/row/cell/grid
|
|
96
|
-
* every line), while an array marks only the lines overlapping
|
|
96
|
+
* means the whole paragraph is changed (a table/row/cell/grid or section
|
|
97
|
+
* revision covers every line), while an array marks only the lines overlapping
|
|
98
|
+
* those ranges.
|
|
97
99
|
*
|
|
98
100
|
* Inserted and property-revision runs survive the "final" projection, so their
|
|
99
101
|
* offsets are used directly. Deleted runs are removed from the projection, so
|