oasis-editor 0.0.326 → 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.
- package/dist/OasisEditorApp-BKI4ByVG.js +1 -0
- package/dist/core/commands/revisionDescriptors.d.ts +21 -0
- package/dist/{defaultToolbar-BuIHSXO6.js → defaultToolbar-BN5Wbr1A.js} +1 -1
- 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/CanvasRevisionBalloonGeometry.d.ts +16 -0
- package/dist/ui/components/RevisionMarkupOverlay.d.ts +4 -3
- package/dist/ui/editorUiTypes.d.ts +11 -3
- package/package.json +1 -1
- package/dist/OasisEditorApp-D6bmKAQd.js +0 -1
|
@@ -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
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
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
|
|
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 {
|