oasis-editor 0.0.348 → 0.0.350

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.
@@ -16,6 +16,8 @@ export interface EditorKeyboardDeps extends EditorTransactionPort, FocusInputPor
16
16
  isReadOnly: () => boolean;
17
17
  pendingCaretTextStyle?: () => EditorTextStyle | undefined;
18
18
  autoTabIndentEnabled?: () => boolean;
19
+ isMacPlatform?: () => boolean;
20
+ isCaretAtWrappedLineStart?: () => boolean;
19
21
  commandsController: {
20
22
  promptForImageAlt: () => void;
21
23
  promptForLink: () => void;
@@ -10,6 +10,8 @@ export interface TabContext {
10
10
  wholeParagraphs: boolean;
11
11
  atListStart: boolean;
12
12
  autoIndentAtStart?: boolean;
13
+ atWrappedLineStart?: boolean;
14
+ isMac?: boolean;
13
15
  reverseFirstLineIndent?: boolean;
14
16
  }
15
17
  /** Pure routing policy: table context and host modifiers take precedence. */
@@ -21,8 +21,19 @@ export interface UseEditorNavigationProps {
21
21
  */
22
22
  zoomFactor?: () => number;
23
23
  }
24
+ /**
25
+ * At shared wrap offsets, the rendered caret's y selects the line.
26
+ * If geometry is stale or ambiguous, preserve literal tab typing.
27
+ */
28
+ export declare function isWrappedLineStart(lines: readonly {
29
+ startOffset: number;
30
+ endOffset: number;
31
+ top: number;
32
+ height: number;
33
+ }[], offset: number, caretY: number): boolean;
24
34
  export declare function createEditorNavigation(deps: UseEditorNavigationProps): ReturnType<typeof createEditorNavigationImpl>;
25
35
  declare function createEditorNavigationImpl(deps: UseEditorNavigationProps): {
36
+ isCaretAtWrappedLineStart: () => boolean;
26
37
  moveSelectionToParagraphBoundary: (boundary: "start" | "end", extend: boolean) => boolean;
27
38
  moveSelectionToDocumentBoundary: (boundary: "start" | "end", extend: boolean) => boolean;
28
39
  moveSelectionByWord: (direction: "left" | "right", extend: boolean) => boolean;
@@ -10,3 +10,11 @@ export declare function tabIntervalPx(state: EditorState): number;
10
10
  export declare function stepTabParagraphIndent(state: EditorState, direction: -1 | 1): EditorState;
11
11
  /** AutoFormat at a nonempty paragraph's first line, or its inverse. */
12
12
  export declare function stepFirstLineIndent(state: EditorState, direction: -1 | 1): EditorState;
13
+ /**
14
+ * Ordinary Backspace at a collapsed paragraph start reverses indentation
15
+ * before deleting a paragraph boundary. Reverse the body indent first, then
16
+ * the first-line indent, matching the order established by consecutive Tabs.
17
+ * List-item boundaries are handled by the existing list-specific policy.
18
+ */
19
+ export declare function resolveParagraphBoundaryOutdent(state: EditorState): "paragraph" | "firstLine" | null;
20
+ export declare function outdentParagraphAtBoundary(state: EditorState): EditorState;