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.
@@ -1,5 +1,5 @@
1
1
  import { EditorLayoutParagraph, EditorState, EditorLayoutDocument } from '../../core/model.js';
2
- import { CaretBox, CommentHighlightBox, InputBox, RevisionMarkupBox, SelectionBox } from '../../ui/editorUiTypes.js';
2
+ import { CaretBox, ChangeBarBox, CommentHighlightBox, InputBox, RevisionMarkupBox, SelectionBox } from '../../ui/editorUiTypes.js';
3
3
  import { SelectedImageSelectionBox, SelectedTextBoxSelectionBox, SelectedTableBox } from '../../ui/canvas/CanvasSelectionGeometry.js';
4
4
  interface UseEditorLayoutProps {
5
5
  state: EditorState;
@@ -25,6 +25,7 @@ declare function useEditorLayoutImpl(props: UseEditorLayoutProps): {
25
25
  selectionBoxes: import('solid-js').Accessor<SelectionBox[]>;
26
26
  commentHighlights: import('solid-js').Accessor<CommentHighlightBox[]>;
27
27
  revisionMarkupBoxes: import('solid-js').Accessor<RevisionMarkupBox[]>;
28
+ changeBarBoxes: import('solid-js').Accessor<ChangeBarBox[]>;
28
29
  selectedImageBox: import('solid-js').Accessor<SelectedImageSelectionBox | null>;
29
30
  selectedTextBoxBox: import('solid-js').Accessor<SelectedTextBoxSelectionBox | null>;
30
31
  selectedTableBox: import('solid-js').Accessor<SelectedTableBox | null>;
@@ -131,7 +131,7 @@ export interface OasisCommandPayloads {
131
131
  repeatLastAction: undefined;
132
132
  acceptRevisions: undefined;
133
133
  rejectRevisions: undefined;
134
- setReviewDisplayMode: "all" | "final" | "original";
134
+ setReviewDisplayMode: "all" | "final" | "original" | "simple";
135
135
  acceptAllRevisions: undefined;
136
136
  rejectAllRevisions: undefined;
137
137
  requestAcceptAllRevisions: undefined;
@@ -1,4 +1,4 @@
1
- import { EditorState } from '../model.js';
1
+ import { EditorState, ReviewDisplayMode } from '../model.js';
2
2
  /** The display sections Word's Show Markup menu filters. */
3
3
  export type MarkupSection = "insertions" | "deletions" | "comments";
4
4
  /**
@@ -62,6 +62,23 @@ export declare function isMarkupAuthorShown(state: EditorState, author: string):
62
62
  * (Word's menu only has insertion/deletion/comment categories).
63
63
  */
64
64
  export declare function isRevisionMarkupShown(state: EditorState, type: string, author: string): boolean;
65
+ /**
66
+ * Which tracked-revision projection a Display for Review mode renders, or
67
+ * `null` for All Markup (the raw, unresolved document). Simple Markup shows the
68
+ * accepted ("final") text and hides inline insert/delete decorations, painting
69
+ * margin change bars instead. Kept pure so the projection policy is unit-tested
70
+ * independently of the Solid layout controller.
71
+ */
72
+ export declare function reviewDisplayProjection(mode: ReviewDisplayMode | undefined): "final" | "original" | null;
73
+ /**
74
+ * Paragraph ids that should carry a Simple Markup change bar: every paragraph
75
+ * in the raw document with at least one visible insert/delete text revision or
76
+ * run-level formatting (property) revision. Show Markup reviewer filters are
77
+ * applied through `isRevisionMarkupShown`, so a hidden reviewer removes its
78
+ * bar; category flags only apply to insert/delete (Word has no formatting
79
+ * category in this menu). Endnotes have no editable zone and are not walked.
80
+ */
81
+ export declare function collectChangeBarParagraphIds(state: EditorState): Set<string>;
65
82
  /** The explicit author allow-list, or null when all authors are shown. */
66
83
  export declare function visibleMarkupAuthors(state: EditorState): string[] | null;
67
84
  /** Flip one markup section; returns the same state when nothing changes. */
@@ -84,7 +101,8 @@ export declare function setMarkupAuthors(state: EditorState, authors: string[] |
84
101
  */
85
102
  export declare function toggleMarkupAuthor(state: EditorState, author: string, knownAuthors: readonly string[]): EditorState;
86
103
  /**
87
- * Every author with markup in the document: tracked-revision authors plus
88
- * comment authors, sorted for a stable menu. Empty when nothing is marked.
104
+ * Every author with markup in the document: tracked insert/delete and
105
+ * run-level formatting (property) revision authors plus comment authors,
106
+ * sorted for a stable menu. Empty when nothing is marked.
89
107
  */
90
108
  export declare function collectMarkupAuthors(state: EditorState): string[];
@@ -2,7 +2,7 @@ import { EditorDocument } from './types/document.js';
2
2
  import { EditorPosition, EditorSelection, EditorEditingZone } from './types/selection.js';
3
3
  import { HeaderFooterStoryKind } from './headerFooterStories.js';
4
4
  /** Display-for-Review rendering mode for tracked revisions. */
5
- export type ReviewDisplayMode = "all" | "final" | "original";
5
+ export type ReviewDisplayMode = "all" | "final" | "original" | "simple";
6
6
  export interface EditorState {
7
7
  document: EditorDocument;
8
8
  selection: EditorSelection;
@@ -26,6 +26,8 @@ export interface EditorState {
26
26
  * "all" — show markup (default)
27
27
  * "final" — render as accepted (insertions kept, deletions dropped)
28
28
  * "original" — render as rejected (insertions dropped, deletions restored)
29
+ * "simple" — render as accepted (final text) with margin change bars
30
+ * instead of inline insert/delete decorations
29
31
  * Presentation only; the underlying revision marks are untouched.
30
32
  */
31
33
  reviewDisplayMode?: ReviewDisplayMode;