oasis-editor 0.0.206 → 0.0.208
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-D_Paqzfq.js → OasisEditorApp-BZSScJOd.js} +1 -1
- package/dist/core/commands/reviewActivity.d.ts +15 -0
- package/dist/core/editorState/nodeFactories.d.ts +1 -1
- package/dist/core/model/index.d.ts +1 -0
- package/dist/core/model/types/document.d.ts +6 -0
- package/dist/core/model/types/documentReviewActivity.d.ts +27 -0
- package/dist/defaultToolbar-BsQf2jiH.js +1 -0
- package/dist/i18n/locales/en.d.ts +10 -0
- package/dist/i18n/locales/pt-BR.d.ts +10 -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/app/createEditorCommentComposer.d.ts +6 -1
- package/dist/ui/components/ReviewCommentsPanel.d.ts +3 -0
- package/package.json +1 -1
- package/dist/defaultToolbar-CW4n_jCp.js +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EditorReviewActivity, EditorReviewActivityKind, EditorState } from '../model.js';
|
|
2
|
+
/** Only successful comment operations append a record; no UI-side logging. */
|
|
3
|
+
export declare function appendReviewActivity(state: EditorState, activity: EditorReviewActivity): EditorState;
|
|
4
|
+
/** Resolves thread identity safely for arbitrarily nested or cyclic replies. */
|
|
5
|
+
export declare function getReviewThreadId(state: EditorState, commentId: string): string | null;
|
|
6
|
+
/** Append in the same undoable transaction as the changed comment. */
|
|
7
|
+
export declare function appendReviewChange(before: EditorState, after: EditorState, detail: {
|
|
8
|
+
id: string;
|
|
9
|
+
kind: EditorReviewActivityKind;
|
|
10
|
+
commentId: string;
|
|
11
|
+
actorName: string;
|
|
12
|
+
actorId?: string;
|
|
13
|
+
timestamp: number;
|
|
14
|
+
parentId?: string;
|
|
15
|
+
}): EditorState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditorBlockNode, EditorFootnote, EditorParagraphNode, EditorTableCellNode, EditorTableNode, EditorTableRowNode, EditorTextRun, EditorTextStyle, EditorTextBoxData, EditorImageRunData } from '../model.js';
|
|
2
|
-
export type EditorNodeKind = "document" | "paragraph" | "run" | "table" | "table-row" | "table-cell" | "footnote" | "bookmark" | "comment" | "sdt";
|
|
2
|
+
export type EditorNodeKind = "document" | "paragraph" | "run" | "table" | "table-row" | "table-cell" | "footnote" | "bookmark" | "comment" | "review-activity" | "sdt";
|
|
3
3
|
/**
|
|
4
4
|
* Single authority for editor node IDs. Stateless and globally unique, so two
|
|
5
5
|
* editors mounted on the same page never share a sequence. The `kind` prefix is
|
|
@@ -17,6 +17,7 @@ export type { EditorFootnote } from './types/documentFootnotes.js';
|
|
|
17
17
|
export type { EditorEndnote } from './types/documentEndnotes.js';
|
|
18
18
|
export type { EditorBookmark, EditorBookmarkAnchor, EditorBookmarks, } from './types/documentBookmarks.js';
|
|
19
19
|
export type { EditorComment, EditorCommentAnchor, EditorComments, } from './types/documentComments.js';
|
|
20
|
+
export type { EditorReviewActivity, EditorReviewActivityKind, } from './types/documentReviewActivity.js';
|
|
20
21
|
export type { EditorOpcPartKind, EditorOpcPartEncoding, EditorOpcRelationship, EditorOpcContentTypes, EditorOpcPart, EditorDocxDiagnostic, EditorDocxSourcePackage, } from './types/docxSourcePackage.js';
|
|
21
22
|
export type { EditorPageMargins, EditorPageSettings, EditorColumnsSettings, EditorSection, EditorSectionBreakType, EditorSectionPropertiesSnapshot, EditorPageNumbering, EditorSectionVerticalAlign, EditorFontInfo, EditorFootnoteSettings, EditorFootnotes, EditorEndnoteSettings, EditorEndnotes, EditorDocumentDesign, EditorThemeData, EditorWatermark, EditorPageBorder, EditorDocument, } from './types/document.js';
|
|
22
23
|
export type { EditorPosition, EditorSelection, EditorEditingZone, } from './types/selection.js';
|
|
@@ -4,6 +4,7 @@ import { EditorFootnote } from './documentFootnotes.js';
|
|
|
4
4
|
import { EditorEndnote } from './documentEndnotes.js';
|
|
5
5
|
import { EditorBookmarks } from './documentBookmarks.js';
|
|
6
6
|
import { EditorComments } from './documentComments.js';
|
|
7
|
+
import { EditorReviewActivity } from './documentReviewActivity.js';
|
|
7
8
|
import { EditorNamedStyle } from './styles.js';
|
|
8
9
|
import { EditorDocxSourcePackage } from './docxSourcePackage.js';
|
|
9
10
|
export interface EditorPageMargins {
|
|
@@ -238,6 +239,11 @@ export interface EditorDocument {
|
|
|
238
239
|
* body shown in a hover/click popup.
|
|
239
240
|
*/
|
|
240
241
|
comments?: EditorComments;
|
|
242
|
+
/**
|
|
243
|
+
* Local review activity for the editor document. Not a DOCX comment part,
|
|
244
|
+
* authenticated server audit, or immutable event log. Part of undo/redo.
|
|
245
|
+
*/
|
|
246
|
+
reviewActivity?: EditorReviewActivity[];
|
|
241
247
|
/**
|
|
242
248
|
* `word/fontTable.xml` entries: the fonts the document declares, with
|
|
243
249
|
* substitution metadata. Preserved on import and re-emitted on export.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local review timeline entries, created on successful comment mutations.
|
|
3
|
+
* These are transaction-scoped editor data and are intentionally not emitted
|
|
4
|
+
* as WordprocessingML. The host can persist/export them separately if needed.
|
|
5
|
+
*
|
|
6
|
+
* The array is deliberately NOT capped: it rides snapshot-based undo/redo, so
|
|
7
|
+
* truncating it here would desynchronize history from the document state and
|
|
8
|
+
* silently drop entries on undo/redo. Long sessions accumulate entries; hosts
|
|
9
|
+
* that need bounded history should persist/rotate it out-of-band.
|
|
10
|
+
*/
|
|
11
|
+
export type EditorReviewActivityKind = "comment-created" | "comment-replied" | "comment-edited" | "comment-resolved" | "comment-reopened" | "comment-deleted";
|
|
12
|
+
export interface EditorReviewActivity {
|
|
13
|
+
id: string;
|
|
14
|
+
kind: EditorReviewActivityKind;
|
|
15
|
+
commentId: string;
|
|
16
|
+
/** Immediate parent when a reply is created. */
|
|
17
|
+
parentId?: string;
|
|
18
|
+
/** Stable root discussion id, even if subsequently removed. */
|
|
19
|
+
threadId: string;
|
|
20
|
+
actorName: string;
|
|
21
|
+
actorId?: string;
|
|
22
|
+
/** Snapshot label survives deletion without copying the comment body. */
|
|
23
|
+
targetAuthor: string;
|
|
24
|
+
timestamp: number;
|
|
25
|
+
/** Number of comments deleted with the selected subtree. */
|
|
26
|
+
affectedCount?: number;
|
|
27
|
+
}
|