oasis-editor 0.0.313 → 0.0.315

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.
@@ -2,11 +2,10 @@ import { EditorState } from '../../core/model.js';
2
2
  import { RevisionMarkupBox } from '../editorUiTypes.js';
3
3
  import { CanvasLayoutSnapshot } from './CanvasLayoutSnapshot.js';
4
4
  /**
5
- * Project insert/delete/formatting revision ranges into highlight rectangles,
6
- * reusing the canvas layout snapshot's per-line slot positions (the same
7
- * machinery the comment highlights and the selection geometry use). One box per
8
- * covered line; merge/grid and structural table revisions are not painted.
9
- * Show Markup filters come from the live editor state, not from the document.
5
+ * Project insert/delete/formatting text ranges and structural/formatting table
6
+ * cell revisions into highlight rectangles. Text ranges reuse the canvas layout
7
+ * snapshot's per-line slot positions; cell revisions use the cell box. Show
8
+ * Markup filters come from the live editor state, not from the document.
10
9
  */
11
10
  export declare function computeRevisionMarkup(snapshot: CanvasLayoutSnapshot, state: EditorState): RevisionMarkupBox[];
12
11
  export type { RevisionMarkupBox };
@@ -24,7 +24,10 @@ export interface CanvasSnapshotTableCellInfo {
24
24
  width: number;
25
25
  height: number;
26
26
  anchorPosition: EditorPosition;
27
+ /** Structural/formatting revision on this cell (`w:tcPr`/`w:tcPrChange`). */
27
28
  revisionId?: string;
29
+ revisionType?: "insert" | "delete" | "merge" | "property";
30
+ revisionAuthor?: string;
28
31
  }
29
32
  export interface CanvasSnapshotParagraph {
30
33
  paragraph: EditorParagraphNode;
@@ -6,7 +6,8 @@ export interface RevisionMarkupOverlayProps {
6
6
  /**
7
7
  * Paints Word-style track-changes decorations over the canvas: a solid green
8
8
  * underline for insertions, a red strike-through for deletions and a violet
9
- * underline for formatting (property) revisions. Presentational only —
10
- * hit-testing and editing stay on the canvas surface underneath.
9
+ * underline for formatting (property) revisions. Structural table-cell
10
+ * revisions (`variant === "cell"`) instead draw a full coloured cell outline.
11
+ * Presentational only — hit-testing and editing stay on the canvas underneath.
11
12
  */
12
13
  export declare function RevisionMarkupOverlay(props: RevisionMarkupOverlayProps): JSX.Element;
@@ -59,7 +59,9 @@ export interface RevisionBox {
59
59
  /** One decoration rectangle over a tracked insert/delete/formatting range. */
60
60
  export interface RevisionMarkupBox {
61
61
  revisionId: string;
62
- type: "insert" | "delete" | "property";
62
+ type: "insert" | "delete" | "property" | "merge";
63
+ /** `cell` paints a full table-cell outline instead of a text underline. */
64
+ variant?: "cell";
63
65
  left: number;
64
66
  top: number;
65
67
  width: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.313",
3
+ "version": "0.0.315",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {