oasis-editor 0.0.325 → 0.0.327

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,16 @@
1
+ import { EditorState } from '../../core/model.js';
2
+ import { RevisionMarkupBox } from '../editorUiTypes.js';
3
+ import { CanvasLayoutSnapshot } from './CanvasLayoutSnapshot.js';
4
+ /**
5
+ * Project Word-style reviewer balloons into the right page margin. One card is
6
+ * emitted per visible revision id (Show Markup category/reviewer filters are
7
+ * honoured through `isRevisionMarkupShown`), anchored to the first painted line
8
+ * of that revision's first paragraph. Cards are stacked vertically per page so
9
+ * they never overlap, and each carries a short connector back toward the text.
10
+ *
11
+ * The right-margin x is derived per page from `page.left + page.width`, the same
12
+ * way `computeChangeBars` derives its per-page left-margin x — the snapshot
13
+ * intentionally exposes no `margins` field. This is presentational only, gated
14
+ * by the caller to All Markup (Simple Markup paints change bars instead).
15
+ */
16
+ export declare function computeRevisionBalloons(snapshot: CanvasLayoutSnapshot, state: EditorState): RevisionMarkupBox[];
@@ -8,8 +8,9 @@ export interface RevisionMarkupOverlayProps {
8
8
  * underline for insertions, a red strike-through for deletions and a violet
9
9
  * underline for formatting (property) revisions. Structural table-cell
10
10
  * revisions (`variant === "cell"`) instead draw a full coloured cell outline,
11
- * and section-level `w:sectPrChange` revisions (`variant === "section"`) draw
12
- * an outline around the section's paragraphs on each page. Presentational only
13
- * — hit-testing and editing stay on the canvas underneath.
11
+ * section-level revisions (`variant === "section"`) a dashed per-page outline,
12
+ * and `variant === "balloon"` a right-margin reviewer card (author, type and
13
+ * snippet) with a connector back to the anchor text. Presentational only —
14
+ * hit-testing and editing stay on the canvas underneath.
14
15
  */
15
16
  export declare function RevisionMarkupOverlay(props: RevisionMarkupOverlayProps): JSX.Element;
@@ -62,14 +62,22 @@ export interface RevisionMarkupBox {
62
62
  type: "insert" | "delete" | "property" | "merge" | "grid";
63
63
  /**
64
64
  * `cell` paints a full table-cell outline; `section` paints the union of a
65
- * section's paragraphs on each page as a section-properties outline. Both
66
- * replace the text underline.
65
+ * section's paragraphs on each page; `balloon` paints a right-margin reviewer
66
+ * card. All three replace the text underline.
67
67
  */
68
- variant?: "cell" | "section";
68
+ variant?: "cell" | "section" | "balloon";
69
69
  left: number;
70
70
  top: number;
71
71
  width: number;
72
72
  height: number;
73
+ /** `balloon` payload — author/date/snippet for the card. */
74
+ author?: string;
75
+ date?: number;
76
+ snippet?: string;
77
+ /** Connector line from the card back toward the anchor text. */
78
+ connectorLeft?: number;
79
+ connectorTop?: number;
80
+ connectorWidth?: number;
73
81
  }
74
82
  /** One highlight rectangle over a commented text range, tagged with its id. */
75
83
  export interface CommentHighlightBox {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.325",
3
+ "version": "0.0.327",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {