oasis-editor 0.0.309 → 0.0.311
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-CINghPsi.js → OasisEditorApp-BPLSxH4R.js} +1 -1
- package/dist/app/controllers/useEditorLayout.d.ts +2 -1
- package/dist/core/commands/publicCommandTypes.d.ts +1 -1
- package/dist/core/commands/reviewMarkup.d.ts +21 -3
- package/dist/core/model/editorState.d.ts +3 -1
- package/dist/defaultToolbar--kHFg3Dr.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/OasisEditorEditorProps.d.ts +2 -1
- package/dist/ui/app/buildEditorViewProps.d.ts +2 -1
- package/dist/ui/app/createEditorDocumentRuntime.d.ts +1 -0
- package/dist/ui/canvas/CanvasChangeBarGeometry.d.ts +16 -0
- package/dist/ui/canvas/CanvasRevisionGeometry.d.ts +5 -5
- package/dist/ui/components/ChangeBarOverlay.d.ts +11 -0
- package/dist/ui/components/RevisionMarkupOverlay.d.ts +3 -2
- package/dist/ui/components/Toolbar/ReviewDisplayModeButton.d.ts +2 -1
- package/dist/ui/editorUiTypes.d.ts +12 -2
- package/package.json +1 -1
- package/dist/defaultToolbar-CSM7SoWl.js +0 -1
|
@@ -2,7 +2,7 @@ import { Accessor, JSX } from 'solid-js';
|
|
|
2
2
|
import { EditorLayoutDocument, EditorLayoutParagraph, EditorState } from '../core/model.js';
|
|
3
3
|
import { ImportProgressState } from '../app/controllers/useEditorDocumentIO.js';
|
|
4
4
|
import { ToolbarHost } from './components/Toolbar/state/createToolbarApi.js';
|
|
5
|
-
import { CaretBox, CommentHighlightBox, InputBox, LayoutOptionsOverlay, RevisionMarkupBox, RevisionBox, SelectedImageBox, SelectedTextBoxBox, SelectedTableBox, SelectionBox } from './editorUiTypes.js';
|
|
5
|
+
import { CaretBox, ChangeBarBox, CommentHighlightBox, InputBox, LayoutOptionsOverlay, RevisionMarkupBox, RevisionBox, SelectedImageBox, SelectedTextBoxBox, SelectedTableBox, SelectionBox } from './editorUiTypes.js';
|
|
6
6
|
import { ResizeHandleDirection } from './resizeGeometry.js';
|
|
7
7
|
type ImportProgress = ImportProgressState;
|
|
8
8
|
export interface OasisEditorEditorLayoutProps {
|
|
@@ -23,6 +23,7 @@ export interface OasisEditorEditorOverlayProps {
|
|
|
23
23
|
selectionBoxes: Accessor<SelectionBox[]>;
|
|
24
24
|
commentHighlights: Accessor<CommentHighlightBox[]>;
|
|
25
25
|
revisionMarkupBoxes: Accessor<RevisionMarkupBox[]>;
|
|
26
|
+
changeBarBoxes: Accessor<ChangeBarBox[]>;
|
|
26
27
|
onReplyToComment?: (commentId: string) => void;
|
|
27
28
|
onEditComment?: (commentId: string) => void;
|
|
28
29
|
canEditComment?: (commentId: string) => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Accessor, JSX } from 'solid-js';
|
|
2
|
-
import { CaretBox, CommentHighlightBox, InputBox, LayoutOptionsOverlay, RevisionMarkupBox, RevisionBox, SelectedImageBox, SelectedTextBoxBox, SelectedTableBox, SelectionBox } from '../editorUiTypes.js';
|
|
2
|
+
import { CaretBox, ChangeBarBox, CommentHighlightBox, InputBox, LayoutOptionsOverlay, RevisionMarkupBox, RevisionBox, SelectedImageBox, SelectedTextBoxBox, SelectedTableBox, SelectionBox } from '../editorUiTypes.js';
|
|
3
3
|
import { EditorLayoutDocument } from '../../core/model.js';
|
|
4
4
|
import { OasisEditorEditorFileHandlers, OasisEditorEditorInputHandlers, OasisEditorEditorLayoutProps, OasisEditorEditorOverlayProps, OasisEditorEditorRefProps, OasisEditorEditorSurfaceHandlers } from '../OasisEditorEditor.js';
|
|
5
5
|
import { createEditorFocusController } from './useEditorFocus.js';
|
|
@@ -26,6 +26,7 @@ export interface EditorViewOverlayInput {
|
|
|
26
26
|
selectionBoxes: Accessor<SelectionBox[]>;
|
|
27
27
|
commentHighlights: Accessor<CommentHighlightBox[]>;
|
|
28
28
|
revisionMarkupBoxes: Accessor<RevisionMarkupBox[]>;
|
|
29
|
+
changeBarBoxes: Accessor<ChangeBarBox[]>;
|
|
29
30
|
onReplyToComment?: (commentId: string) => void;
|
|
30
31
|
onEditComment?: (commentId: string) => void;
|
|
31
32
|
canEditComment?: (commentId: string) => boolean;
|
|
@@ -59,6 +59,7 @@ declare function createEditorDocumentRuntimeImpl(deps: EditorDocumentRuntimeDeps
|
|
|
59
59
|
selectionBoxes: import('solid-js').Accessor<import('../editorUiTypes.js').SelectionBox[]>;
|
|
60
60
|
commentHighlights: import('solid-js').Accessor<import('../editorUiTypes.js').CommentHighlightBox[]>;
|
|
61
61
|
revisionMarkupBoxes: import('solid-js').Accessor<import('../editorUiTypes.js').RevisionMarkupBox[]>;
|
|
62
|
+
changeBarBoxes: import('solid-js').Accessor<import('../editorUiTypes.js').ChangeBarBox[]>;
|
|
62
63
|
selectedImageBox: import('solid-js').Accessor<import('../canvas/CanvasSelectionGeometry.js').SelectedImageSelectionBox | null>;
|
|
63
64
|
selectedTextBoxBox: import('solid-js').Accessor<import('../canvas/CanvasSelectionGeometry.js').SelectedTextBoxSelectionBox | null>;
|
|
64
65
|
selectedTableBox: import('solid-js').Accessor<import('../canvas/CanvasSelectionGeometry.js').SelectedTableBox | null>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EditorState } from '../../core/model.js';
|
|
2
|
+
import { ChangeBarBox } from '../editorUiTypes.js';
|
|
3
|
+
import { CanvasLayoutSnapshot } from './CanvasLayoutSnapshot.js';
|
|
4
|
+
/**
|
|
5
|
+
* Project Simple Markup change bars into the margin. The snapshot is built from
|
|
6
|
+
* the *projected* (final) layout, whose paragraphs keep the raw document's ids,
|
|
7
|
+
* so we can match the raw revision-bearing paragraph ids against the painted
|
|
8
|
+
* line geometry. One bar per changed paragraph spans its first-to-last line;
|
|
9
|
+
* Word marks by individual line, but paragraph granularity is the scoped
|
|
10
|
+
* delivery here (structural/property revisions are not painted).
|
|
11
|
+
*
|
|
12
|
+
* Show Markup filters live in `collectChangeBarParagraphIds`, so hiding a
|
|
13
|
+
* category or reviewer removes the corresponding bar without touching data.
|
|
14
|
+
*/
|
|
15
|
+
export declare function computeChangeBars(snapshot: CanvasLayoutSnapshot, state: EditorState): ChangeBarBox[];
|
|
16
|
+
export type { ChangeBarBox };
|
|
@@ -2,11 +2,11 @@ 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 revision ranges into highlight rectangles,
|
|
6
|
-
* canvas layout snapshot's per-line slot positions (the same
|
|
7
|
-
* comment highlights and the selection geometry use). One box per
|
|
8
|
-
*
|
|
9
|
-
* filters come from the live editor state, not from the document.
|
|
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.
|
|
10
10
|
*/
|
|
11
11
|
export declare function computeRevisionMarkup(snapshot: CanvasLayoutSnapshot, state: EditorState): RevisionMarkupBox[];
|
|
12
12
|
export type { RevisionMarkupBox };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Accessor, JSX } from 'solid-js';
|
|
2
|
+
import { ChangeBarBox } from '../editorUiTypes.js';
|
|
3
|
+
export interface ChangeBarOverlayProps {
|
|
4
|
+
boxes: Accessor<ChangeBarBox[]>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Paints Word-style Simple Markup change bars: a thin vertical line in the left
|
|
8
|
+
* margin next to each paragraph that contains a tracked change. Presentational
|
|
9
|
+
* only — hit-testing and editing stay on the (read-only) canvas underneath.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ChangeBarOverlay(props: ChangeBarOverlayProps): JSX.Element;
|
|
@@ -5,7 +5,8 @@ export interface RevisionMarkupOverlayProps {
|
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Paints Word-style track-changes decorations over the canvas: a solid green
|
|
8
|
-
* underline for insertions
|
|
9
|
-
*
|
|
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.
|
|
10
11
|
*/
|
|
11
12
|
export declare function RevisionMarkupOverlay(props: RevisionMarkupOverlayProps): JSX.Element;
|
|
@@ -5,6 +5,7 @@ export interface ReviewDisplayModeButtonProps {
|
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Display for Review gallery (Word-style): a single trigger showing the
|
|
8
|
-
* current view, with All Markup / Final / Original items marked
|
|
8
|
+
* current view, with Simple Markup / All Markup / Final / Original items marked
|
|
9
|
+
* as radios. Simple Markup renders the final text with margin change bars.
|
|
9
10
|
*/
|
|
10
11
|
export declare function ReviewDisplayModeButton(props: ReviewDisplayModeButtonProps): JSX.Element;
|
|
@@ -56,10 +56,10 @@ export interface RevisionBox {
|
|
|
56
56
|
left: number;
|
|
57
57
|
top: number;
|
|
58
58
|
}
|
|
59
|
-
/** One decoration rectangle over
|
|
59
|
+
/** One decoration rectangle over a tracked insert/delete/formatting range. */
|
|
60
60
|
export interface RevisionMarkupBox {
|
|
61
61
|
revisionId: string;
|
|
62
|
-
type: "insert" | "delete";
|
|
62
|
+
type: "insert" | "delete" | "property";
|
|
63
63
|
left: number;
|
|
64
64
|
top: number;
|
|
65
65
|
width: number;
|
|
@@ -73,6 +73,16 @@ export interface CommentHighlightBox {
|
|
|
73
73
|
width: number;
|
|
74
74
|
height: number;
|
|
75
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* One vertical margin bar marking a paragraph that contains tracked changes in
|
|
78
|
+
* Simple Markup. Width is fixed by CSS; `left`/`top`/`height` are overlay-local.
|
|
79
|
+
*/
|
|
80
|
+
export interface ChangeBarBox {
|
|
81
|
+
paragraphId: string;
|
|
82
|
+
left: number;
|
|
83
|
+
top: number;
|
|
84
|
+
height: number;
|
|
85
|
+
}
|
|
76
86
|
/**
|
|
77
87
|
* State and actions backing the Word-style "Layout Options" popup for the
|
|
78
88
|
* selected image or text box.
|