oasis-editor 0.0.204 → 0.0.205

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.
@@ -35,6 +35,8 @@ export interface EssentialsFormattingCapability {
35
35
  canReplyToComment: () => boolean;
36
36
  newComment: () => boolean;
37
37
  replyComment: () => boolean;
38
+ editComment: () => boolean;
39
+ canEditComment: () => boolean;
38
40
  navigateRevisionNext: () => boolean;
39
41
  navigateRevisionPrevious: () => boolean;
40
42
  navigateCommentNext: () => boolean;
@@ -23,6 +23,7 @@ export interface OasisEditorEditorOverlayProps {
23
23
  selectionBoxes: Accessor<SelectionBox[]>;
24
24
  commentHighlights: Accessor<CommentHighlightBox[]>;
25
25
  onReplyToComment?: (commentId: string) => void;
26
+ onEditComment?: (commentId: string) => void;
26
27
  selectedImageBox: Accessor<SelectedImageBox | null>;
27
28
  selectedTextBoxBox: Accessor<SelectedTextBoxBox | null>;
28
29
  selectedTableBox: Accessor<SelectedTableBox | null>;
@@ -26,6 +26,7 @@ export interface EditorViewOverlayInput {
26
26
  selectionBoxes: Accessor<SelectionBox[]>;
27
27
  commentHighlights: Accessor<CommentHighlightBox[]>;
28
28
  onReplyToComment?: (commentId: string) => void;
29
+ onEditComment?: (commentId: string) => void;
29
30
  selectedImageBox: Accessor<SelectedImageBox | null>;
30
31
  selectedTextBoxBox: Accessor<SelectedTextBoxBox | null>;
31
32
  selectedTableBox: Accessor<SelectedTableBox | null>;
@@ -1,11 +1,14 @@
1
1
  import { EditorState } from '../../core/model.js';
2
2
  export interface CommentComposerDraft {
3
- mode: "new" | "reply";
3
+ mode: "new" | "reply" | "edit";
4
4
  /** Snapshot captured before modal focus steals the editor selection. */
5
5
  snapshot: EditorState;
6
6
  parentId?: string;
7
7
  parentAuthor?: string;
8
8
  parentText?: string;
9
+ commentId?: string;
10
+ commentAuthor?: string;
11
+ commentText?: string;
9
12
  }
10
13
  export interface CommentComposerDeps {
11
14
  state: () => EditorState;
@@ -19,9 +22,12 @@ export declare function createEditorCommentComposer(deps: CommentComposerDeps):
19
22
  lastAuthor: import('solid-js').Accessor<string>;
20
23
  canCreate: () => boolean;
21
24
  canReply: () => boolean;
25
+ canEdit: () => boolean;
22
26
  openNew: () => boolean;
23
27
  openReply: () => boolean;
24
28
  openReplyToId: (parentId: string) => boolean;
29
+ openEdit: () => boolean;
30
+ openEditToId: (commentId: string) => boolean;
25
31
  close: () => void;
26
32
  submit: (author: string, text: string) => boolean;
27
33
  };
@@ -6,6 +6,7 @@ export interface CommentHighlightOverlayProps {
6
6
  /** Comment bodies keyed by their editor-local id, for the hover popup. */
7
7
  commentsById: Accessor<Record<string, EditorComment>>;
8
8
  onReplyToComment?: (commentId: string) => void;
9
+ onEditComment?: (commentId: string) => void;
9
10
  readOnly?: boolean;
10
11
  }
11
12
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.204",
3
+ "version": "0.0.205",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {