oasis-editor 0.0.368 → 0.0.370
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-DTrayMXa.js +1 -0
- package/dist/app/controllers/useEditorTextDrag.d.ts +14 -0
- package/dist/core/transactionMergeKeys.d.ts +0 -1
- package/dist/{defaultToolbar-BdHm7GcP.js → defaultToolbar-D0rn6_HF.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/app/createRevisionsPanel.d.ts +10 -5
- package/dist/ui/canvas/CanvasRevisionBalloonGeometry.d.ts +9 -8
- package/dist/ui/components/ReviewingPane.d.ts +4 -0
- package/dist/ui/components/RevisionMarkupOverlay.d.ts +2 -2
- package/dist/ui/editorUiTypes.d.ts +0 -4
- package/package.json +1 -1
- package/dist/OasisEditorApp-BCqvLzdx.js +0 -1
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The Reviewing Pane's open state
|
|
3
|
-
* the two drawers are independent,
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* The Reviewing Pane's open state and revision-list scroll offset. Kept
|
|
3
|
+
* separate from comment-panel state so the two drawers are independent,
|
|
4
|
+
* mirroring Word's distinct panes. Persisted to localStorage
|
|
5
|
+
* (`oasis-reviewing-pane-v1`) so both pane visibility and its scroll position
|
|
6
|
+
* survive reloads, like Word's reviewing pane. Writes happen in the mutators
|
|
7
|
+
* rather than an effect so the stored value is exact even outside a reactive
|
|
8
|
+
* root. Older builds stored only `"true"`/`"false"`; that legacy shape is still
|
|
9
|
+
* read (with a zero scroll offset) so upgrading keeps the pane's visibility.
|
|
7
10
|
*/
|
|
8
11
|
export declare function createRevisionsPanel(): {
|
|
9
12
|
open: () => boolean;
|
|
10
13
|
toggle: () => boolean;
|
|
11
14
|
close: () => void;
|
|
15
|
+
scrollTop: () => number;
|
|
16
|
+
setScrollTop: (value: number) => void;
|
|
12
17
|
};
|
|
13
18
|
export type RevisionsPanelController = ReturnType<typeof createRevisionsPanel>;
|
|
@@ -2,15 +2,16 @@ import { EditorState } from '../../core/model.js';
|
|
|
2
2
|
import { RevisionMarkupBox } from '../editorUiTypes.js';
|
|
3
3
|
import { CanvasLayoutSnapshot } from './CanvasLayoutSnapshot.js';
|
|
4
4
|
/**
|
|
5
|
-
* Project Word-style reviewer balloons into
|
|
6
|
-
* emitted per visible revision id (Show Markup category/reviewer filters are
|
|
5
|
+
* Project Word-style reviewer balloons into each page's right margin. One card
|
|
6
|
+
* is emitted per visible revision id (Show Markup category/reviewer filters are
|
|
7
7
|
* honoured through `isRevisionMarkupShown`), anchored to the first painted line
|
|
8
|
-
* of that revision's first paragraph. Cards
|
|
9
|
-
*
|
|
8
|
+
* of that revision's first paragraph. Cards stack vertically per page so they
|
|
9
|
+
* never overlap.
|
|
10
10
|
*
|
|
11
|
-
* The
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* by the caller to All Markup (Simple Markup
|
|
11
|
+
* The snapshot intentionally exposes no `margins` field, so the right margin is
|
|
12
|
+
* derived per page from the rightmost painted segment — the same "derive the
|
|
13
|
+
* margin from painted geometry" approach `computeChangeBars` uses on the left.
|
|
14
|
+
* Presentational only, and gated by the caller to All Markup (Simple Markup
|
|
15
|
+
* paints change bars instead).
|
|
15
16
|
*/
|
|
16
17
|
export declare function computeRevisionBalloons(snapshot: CanvasLayoutSnapshot, state: EditorState): RevisionMarkupBox[];
|
|
@@ -8,6 +8,10 @@ export interface ReviewingPaneProps {
|
|
|
8
8
|
onAcceptAll: () => void;
|
|
9
9
|
onRejectAll: () => void;
|
|
10
10
|
onClose: () => void;
|
|
11
|
+
/** Scroll offset restored into the revision list once it can scroll. */
|
|
12
|
+
scrollTop?: number;
|
|
13
|
+
/** Reports the revision list's scroll offset so the host can persist it. */
|
|
14
|
+
onScroll?: (scrollTop: number) => void;
|
|
11
15
|
}
|
|
12
16
|
/**
|
|
13
17
|
* Reviewing Pane: a right-side drawer listing every tracked change with
|
|
@@ -10,7 +10,7 @@ export interface RevisionMarkupOverlayProps {
|
|
|
10
10
|
* revisions (`variant === "cell"`) instead draw a full coloured cell outline,
|
|
11
11
|
* section-level revisions (`variant === "section"`) a dashed per-page outline,
|
|
12
12
|
* and `variant === "balloon"` a right-margin reviewer card (author, type and
|
|
13
|
-
* snippet)
|
|
14
|
-
*
|
|
13
|
+
* snippet). Presentational only — hit-testing and editing stay on the canvas
|
|
14
|
+
* underneath.
|
|
15
15
|
*/
|
|
16
16
|
export declare function RevisionMarkupOverlay(props: RevisionMarkupOverlayProps): JSX.Element;
|
|
@@ -74,10 +74,6 @@ export interface RevisionMarkupBox {
|
|
|
74
74
|
author?: string;
|
|
75
75
|
date?: number;
|
|
76
76
|
snippet?: string;
|
|
77
|
-
/** Connector line from the card back toward the anchor text. */
|
|
78
|
-
connectorLeft?: number;
|
|
79
|
-
connectorTop?: number;
|
|
80
|
-
connectorWidth?: number;
|
|
81
77
|
}
|
|
82
78
|
/** One highlight rectangle over a commented text range, tagged with its id. */
|
|
83
79
|
export interface CommentHighlightBox {
|