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.
@@ -10,6 +10,8 @@ export interface EditorTextDragDeps {
10
10
  applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: {
11
11
  mergeKey?: MergeKey;
12
12
  }) => void;
13
+ /** Commits a state without recording undo history (view-only changes). */
14
+ applyState: (state: EditorState) => void;
13
15
  applyTableAwareParagraphEdit: (state: EditorState, edit: (state: EditorState) => EditorState) => EditorState;
14
16
  clearPreferredColumn: () => void;
15
17
  resetTransactionGrouping: () => void;
@@ -20,6 +22,18 @@ export interface EditorTextDragDeps {
20
22
  warn?: (msg: string, payload?: unknown) => void;
21
23
  };
22
24
  }
25
+ /**
26
+ * A press that lands inside the current selection and never becomes a drag
27
+ * collapses the caret at the pressed offset (Word parity). This is a caret
28
+ * move, not a document edit, so it must not enter the undo stack: `Word` does
29
+ * not record an undo step for clicking, and a recorded no-op entry would make
30
+ * the first Ctrl+Z after a click do nothing visible.
31
+ *
32
+ * Returns `state` unchanged when the position is outside the selection, which
33
+ * is the signal that the press is a fresh caret placement (handled by the
34
+ * surface) rather than a collapse.
35
+ */
36
+ export declare function collapseSelectionAtPosition(state: EditorState, position: EditorPosition): EditorState;
23
37
  /** Cross-story drops are explicit transactions, not edits of the active
24
38
  * zone's flattened paragraph stream. Unsupported transfers are no-ops. */
25
39
  export declare function applyTextDragDrop(state: EditorState, destination: EditorPosition, hit: Pick<SurfaceHit, "zone" | "paragraphId" | "paragraphOffset" | "tableCellAnchorPosition">, copy: boolean, edit: EditorTextDragDeps["applyTableAwareParagraphEdit"], onRejected?: (error: unknown) => void): EditorState;
@@ -26,7 +26,6 @@ export declare const MERGE_KEYS: {
26
26
  readonly fontDialog: "font-dialog";
27
27
  readonly copyTextByDrag: "copyTextByDrag";
28
28
  readonly moveTextByDrag: "moveTextByDrag";
29
- readonly collapseSelectionByClick: "collapseSelectionByClick";
30
29
  readonly mergeTable: "mergeTable";
31
30
  readonly splitTable: "splitTable";
32
31
  readonly insertTableColumn: "insertTableColumn";