smartrte-core 0.2.1 → 1.0.0-beta.2
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/CHANGELOG.md +16 -0
- package/README.md +23 -0
- package/dist/command.d.ts +8 -8
- package/dist/editor.d.ts +32 -0
- package/dist/editor.js +121 -0
- package/dist/foundation/annotations/index.d.ts +2 -0
- package/dist/foundation/annotations/index.js +2 -0
- package/dist/foundation/annotations/range.d.ts +54 -0
- package/dist/foundation/annotations/range.js +158 -0
- package/dist/foundation/annotations/types.d.ts +33 -0
- package/dist/foundation/annotations/types.js +1 -0
- package/dist/foundation/atom/commands.d.ts +11 -0
- package/dist/foundation/atom/commands.js +118 -0
- package/dist/foundation/atom/composition.d.ts +8 -0
- package/dist/foundation/atom/composition.js +22 -0
- package/dist/foundation/atom/declarations.d.ts +2 -0
- package/dist/foundation/atom/declarations.js +17 -0
- package/dist/foundation/atom/formats.d.ts +24 -0
- package/dist/foundation/atom/formats.js +105 -0
- package/dist/foundation/atom/index.d.ts +10 -0
- package/dist/foundation/atom/index.js +10 -0
- package/dist/foundation/atom/lifecycle.d.ts +12 -0
- package/dist/foundation/atom/lifecycle.js +41 -0
- package/dist/foundation/atom/persistence.d.ts +3 -0
- package/dist/foundation/atom/persistence.js +20 -0
- package/dist/foundation/atom/plugin.d.ts +20 -0
- package/dist/foundation/atom/plugin.js +55 -0
- package/dist/foundation/atom/schema.d.ts +3 -0
- package/dist/foundation/atom/schema.js +29 -0
- package/dist/foundation/atom/security.d.ts +10 -0
- package/dist/foundation/atom/security.js +20 -0
- package/dist/foundation/atom/selection.d.ts +3 -0
- package/dist/foundation/atom/selection.js +4 -0
- package/dist/foundation/atom/types.d.ts +47 -0
- package/dist/foundation/atom/types.js +1 -0
- package/dist/foundation/block/commands.d.ts +17 -0
- package/dist/foundation/block/commands.js +197 -0
- package/dist/foundation/block/formats.d.ts +33 -0
- package/dist/foundation/block/formats.js +57 -0
- package/dist/foundation/block/index.d.ts +5 -0
- package/dist/foundation/block/index.js +5 -0
- package/dist/foundation/block/input.d.ts +19 -0
- package/dist/foundation/block/input.js +67 -0
- package/dist/foundation/block/plugin.d.ts +26 -0
- package/dist/foundation/block/plugin.js +79 -0
- package/dist/foundation/block/schema.d.ts +49 -0
- package/dist/foundation/block/schema.js +27 -0
- package/dist/foundation/block/types.d.ts +40 -0
- package/dist/foundation/block/types.js +1 -0
- package/dist/foundation/boundaries.d.ts +11 -0
- package/dist/foundation/boundaries.js +117 -0
- package/dist/foundation/clipboard/detection.d.ts +3 -0
- package/dist/foundation/clipboard/detection.js +29 -0
- package/dist/foundation/clipboard/diagnostics.d.ts +24 -0
- package/dist/foundation/clipboard/diagnostics.js +59 -0
- package/dist/foundation/clipboard/index.d.ts +8 -0
- package/dist/foundation/clipboard/index.js +8 -0
- package/dist/foundation/clipboard/insertion.d.ts +22 -0
- package/dist/foundation/clipboard/insertion.js +210 -0
- package/dist/foundation/clipboard/normalizers.d.ts +8 -0
- package/dist/foundation/clipboard/normalizers.js +229 -0
- package/dist/foundation/clipboard/pipeline.d.ts +13 -0
- package/dist/foundation/clipboard/pipeline.js +58 -0
- package/dist/foundation/clipboard/sanitizer.d.ts +3 -0
- package/dist/foundation/clipboard/sanitizer.js +58 -0
- package/dist/foundation/clipboard/serialization.d.ts +5 -0
- package/dist/foundation/clipboard/serialization.js +33 -0
- package/dist/foundation/clipboard/transfer.d.ts +11 -0
- package/dist/foundation/clipboard/transfer.js +108 -0
- package/dist/foundation/clipboard/types.d.ts +65 -0
- package/dist/foundation/clipboard/types.js +1 -0
- package/dist/foundation/collab/index.d.ts +3 -0
- package/dist/foundation/collab/index.js +3 -0
- package/dist/foundation/collab/rebase.d.ts +28 -0
- package/dist/foundation/collab/rebase.js +82 -0
- package/dist/foundation/collab/transform.d.ts +73 -0
- package/dist/foundation/collab/transform.js +251 -0
- package/dist/foundation/collab/types.d.ts +52 -0
- package/dist/foundation/collab/types.js +1 -0
- package/dist/foundation/comments/fromSelection.d.ts +16 -0
- package/dist/foundation/comments/fromSelection.js +24 -0
- package/dist/foundation/comments/index.d.ts +3 -0
- package/dist/foundation/comments/index.js +3 -0
- package/dist/foundation/comments/rebase.d.ts +31 -0
- package/dist/foundation/comments/rebase.js +43 -0
- package/dist/foundation/comments/types.d.ts +37 -0
- package/dist/foundation/comments/types.js +1 -0
- package/dist/foundation/diff/documentDiff.d.ts +12 -0
- package/dist/foundation/diff/documentDiff.js +148 -0
- package/dist/foundation/diff/index.d.ts +3 -0
- package/dist/foundation/diff/index.js +3 -0
- package/dist/foundation/diff/textDiff.d.ts +12 -0
- package/dist/foundation/diff/textDiff.js +114 -0
- package/dist/foundation/diff/types.d.ts +74 -0
- package/dist/foundation/diff/types.js +1 -0
- package/dist/foundation/editor.d.ts +138 -0
- package/dist/foundation/editor.js +398 -0
- package/dist/foundation/formats/codec.d.ts +45 -0
- package/dist/foundation/formats/codec.js +1 -0
- package/dist/foundation/formats/docx/export.d.ts +4 -0
- package/dist/foundation/formats/docx/export.js +285 -0
- package/dist/foundation/formats/docx/import.d.ts +9 -0
- package/dist/foundation/formats/docx/import.js +37 -0
- package/dist/foundation/formats/docx/nestingGuard.d.ts +40 -0
- package/dist/foundation/formats/docx/nestingGuard.js +66 -0
- package/dist/foundation/formats/docx/portableAtoms.d.ts +4 -0
- package/dist/foundation/formats/docx/portableAtoms.js +66 -0
- package/dist/foundation/formats/docx/styledImport.d.ts +10 -0
- package/dist/foundation/formats/docx/styledImport.js +205 -0
- package/dist/foundation/formats/featureCodecs.d.ts +37 -0
- package/dist/foundation/formats/featureCodecs.js +69 -0
- package/dist/foundation/formats/fidelity.d.ts +31 -0
- package/dist/foundation/formats/fidelity.js +123 -0
- package/dist/foundation/formats/index.d.ts +7 -0
- package/dist/foundation/formats/index.js +7 -0
- package/dist/foundation/formats/pdf/format.d.ts +29 -0
- package/dist/foundation/formats/pdf/format.js +190 -0
- package/dist/foundation/history.d.ts +20 -0
- package/dist/foundation/history.js +121 -0
- package/dist/foundation/identity.d.ts +8 -0
- package/dist/foundation/identity.js +30 -0
- package/dist/foundation/index.d.ts +30 -0
- package/dist/foundation/index.js +30 -0
- package/dist/foundation/list/commands.d.ts +28 -0
- package/dist/foundation/list/commands.js +422 -0
- package/dist/foundation/list/formats.d.ts +21 -0
- package/dist/foundation/list/formats.js +813 -0
- package/dist/foundation/list/index.d.ts +8 -0
- package/dist/foundation/list/index.js +8 -0
- package/dist/foundation/list/input.d.ts +35 -0
- package/dist/foundation/list/input.js +320 -0
- package/dist/foundation/list/plugin.d.ts +21 -0
- package/dist/foundation/list/plugin.js +71 -0
- package/dist/foundation/list/presets.d.ts +16 -0
- package/dist/foundation/list/presets.js +21 -0
- package/dist/foundation/list/schema.d.ts +35 -0
- package/dist/foundation/list/schema.js +29 -0
- package/dist/foundation/list/shadow.d.ts +54 -0
- package/dist/foundation/list/shadow.js +75 -0
- package/dist/foundation/list/shadowCorpus.d.ts +10 -0
- package/dist/foundation/list/shadowCorpus.js +41 -0
- package/dist/foundation/list/types.d.ts +50 -0
- package/dist/foundation/list/types.js +1 -0
- package/dist/foundation/mapping.d.ts +11 -0
- package/dist/foundation/mapping.js +40 -0
- package/dist/foundation/marks/canonical.d.ts +9 -0
- package/dist/foundation/marks/canonical.js +72 -0
- package/dist/foundation/marks/commands.d.ts +21 -0
- package/dist/foundation/marks/commands.js +136 -0
- package/dist/foundation/marks/dom.d.ts +2 -0
- package/dist/foundation/marks/dom.js +46 -0
- package/dist/foundation/marks/editor.d.ts +8 -0
- package/dist/foundation/marks/editor.js +50 -0
- package/dist/foundation/marks/formats.d.ts +37 -0
- package/dist/foundation/marks/formats.js +49 -0
- package/dist/foundation/marks/hardBreak.d.ts +8 -0
- package/dist/foundation/marks/hardBreak.js +80 -0
- package/dist/foundation/marks/index.d.ts +11 -0
- package/dist/foundation/marks/index.js +11 -0
- package/dist/foundation/marks/normalization.d.ts +2 -0
- package/dist/foundation/marks/normalization.js +49 -0
- package/dist/foundation/marks/plugin.d.ts +14 -0
- package/dist/foundation/marks/plugin.js +63 -0
- package/dist/foundation/marks/resolveMarkRun.d.ts +8 -0
- package/dist/foundation/marks/resolveMarkRun.js +47 -0
- package/dist/foundation/marks/schema.d.ts +167 -0
- package/dist/foundation/marks/schema.js +50 -0
- package/dist/foundation/marks/stored.d.ts +2 -0
- package/dist/foundation/marks/stored.js +31 -0
- package/dist/foundation/marks/types.d.ts +40 -0
- package/dist/foundation/marks/types.js +1 -0
- package/dist/foundation/modelDom.d.ts +38 -0
- package/dist/foundation/modelDom.js +327 -0
- package/dist/foundation/normalization.d.ts +22 -0
- package/dist/foundation/normalization.js +132 -0
- package/dist/foundation/operations.d.ts +28 -0
- package/dist/foundation/operations.js +568 -0
- package/dist/foundation/plugin/builtins.d.ts +10 -0
- package/dist/foundation/plugin/builtins.js +27 -0
- package/dist/foundation/plugin/dispatch.d.ts +33 -0
- package/dist/foundation/plugin/dispatch.js +34 -0
- package/dist/foundation/plugin/index.d.ts +4 -0
- package/dist/foundation/plugin/index.js +4 -0
- package/dist/foundation/plugin/registry.d.ts +36 -0
- package/dist/foundation/plugin/registry.js +115 -0
- package/dist/foundation/plugin/types.d.ts +141 -0
- package/dist/foundation/plugin/types.js +13 -0
- package/dist/foundation/positions.d.ts +20 -0
- package/dist/foundation/positions.js +121 -0
- package/dist/foundation/schema.d.ts +57 -0
- package/dist/foundation/schema.js +371 -0
- package/dist/foundation/schemaBuilder.d.ts +41 -0
- package/dist/foundation/schemaBuilder.js +96 -0
- package/dist/foundation/scope/index.d.ts +2 -0
- package/dist/foundation/scope/index.js +2 -0
- package/dist/foundation/scope/resolveScope.d.ts +13 -0
- package/dist/foundation/scope/resolveScope.js +860 -0
- package/dist/foundation/scope/types.d.ts +122 -0
- package/dist/foundation/scope/types.js +1 -0
- package/dist/foundation/security/urlPolicy.d.ts +21 -0
- package/dist/foundation/security/urlPolicy.js +75 -0
- package/dist/foundation/structural/contentTarget.d.ts +21 -0
- package/dist/foundation/structural/contentTarget.js +51 -0
- package/dist/foundation/structural/index.d.ts +2 -0
- package/dist/foundation/structural/index.js +2 -0
- package/dist/foundation/structural/move.d.ts +7 -0
- package/dist/foundation/structural/move.js +35 -0
- package/dist/foundation/suggestions/index.d.ts +3 -0
- package/dist/foundation/suggestions/index.js +3 -0
- package/dist/foundation/suggestions/inline.d.ts +64 -0
- package/dist/foundation/suggestions/inline.js +116 -0
- package/dist/foundation/suggestions/structural.d.ts +40 -0
- package/dist/foundation/suggestions/structural.js +47 -0
- package/dist/foundation/suggestions/types.d.ts +19 -0
- package/dist/foundation/suggestions/types.js +1 -0
- package/dist/foundation/surface/index.d.ts +3 -0
- package/dist/foundation/surface/index.js +3 -0
- package/dist/foundation/surface/input.d.ts +127 -0
- package/dist/foundation/surface/input.js +1761 -0
- package/dist/foundation/surface/renderer.d.ts +84 -0
- package/dist/foundation/surface/renderer.js +974 -0
- package/dist/foundation/surface/types.d.ts +48 -0
- package/dist/foundation/surface/types.js +1 -0
- package/dist/foundation/table/commands.d.ts +31 -0
- package/dist/foundation/table/commands.js +470 -0
- package/dist/foundation/table/formats.d.ts +27 -0
- package/dist/foundation/table/formats.js +40 -0
- package/dist/foundation/table/grid.d.ts +8 -0
- package/dist/foundation/table/grid.js +178 -0
- package/dist/foundation/table/index.d.ts +6 -0
- package/dist/foundation/table/index.js +6 -0
- package/dist/foundation/table/plugin.d.ts +23 -0
- package/dist/foundation/table/plugin.js +119 -0
- package/dist/foundation/table/schema.d.ts +2 -0
- package/dist/foundation/table/schema.js +38 -0
- package/dist/foundation/table/selection.d.ts +7 -0
- package/dist/foundation/table/selection.js +35 -0
- package/dist/foundation/table/types.d.ts +109 -0
- package/dist/foundation/table/types.js +1 -0
- package/dist/foundation/transactions.d.ts +41 -0
- package/dist/foundation/transactions.js +90 -0
- package/dist/foundation/types.d.ts +261 -0
- package/dist/foundation/types.js +1 -0
- package/dist/foundation/versioning/diffVersions.d.ts +5 -0
- package/dist/foundation/versioning/diffVersions.js +3 -0
- package/dist/foundation/versioning/index.d.ts +2 -0
- package/dist/foundation/versioning/index.js +2 -0
- package/dist/foundation/versioning/types.d.ts +17 -0
- package/dist/foundation/versioning/types.js +1 -0
- package/dist/history.d.ts +20 -0
- package/dist/history.js +165 -0
- package/dist/html/compatibility.js +7 -1
- package/dist/index.d.ts +1 -14
- package/dist/index.js +9 -14
- package/dist/legacy/index.d.ts +45 -0
- package/dist/legacy/index.js +45 -0
- package/dist/legacyCommands/alignment.d.ts +20 -0
- package/dist/{commands → legacyCommands}/alignment.js +17 -0
- package/dist/legacyCommands/blocks.d.ts +14 -0
- package/dist/legacyCommands/blocks.js +105 -0
- package/dist/legacyCommands/checklist.d.ts +11 -0
- package/dist/legacyCommands/checklist.js +45 -0
- package/dist/legacyCommands/code.d.ts +15 -0
- package/dist/{commands → legacyCommands}/code.js +25 -1
- package/dist/legacyCommands/formula.d.ts +7 -0
- package/dist/legacyCommands/formula.js +67 -0
- package/dist/legacyCommands/inlineAtoms.d.ts +7 -0
- package/dist/legacyCommands/inlineAtoms.js +58 -0
- package/dist/legacyCommands/list.d.ts +38 -0
- package/dist/legacyCommands/list.js +477 -0
- package/dist/{commands → legacyCommands}/marks.d.ts +3 -0
- package/dist/{commands → legacyCommands}/marks.js +28 -11
- package/dist/legacyCommands/media.d.ts +31 -0
- package/dist/legacyCommands/media.js +205 -0
- package/dist/legacyCommands/move.d.ts +14 -0
- package/dist/legacyCommands/move.js +91 -0
- package/dist/legacyCommands/table.d.ts +91 -0
- package/dist/legacyCommands/table.js +547 -0
- package/dist/listPresets.d.ts +12 -0
- package/dist/listPresets.js +6 -0
- package/dist/listScope.d.ts +27 -0
- package/dist/listScope.js +104 -0
- package/dist/markdown/compatibility.d.ts +2 -0
- package/dist/markdown/compatibility.js +94 -2
- package/dist/marks.d.ts +5 -5
- package/dist/model.d.ts +65 -9
- package/dist/plugin.d.ts +15 -0
- package/dist/plugin.js +31 -0
- package/dist/plugins/alignment.d.ts +3 -0
- package/dist/plugins/alignment.js +6 -0
- package/dist/plugins/basicFormatting.d.ts +9 -0
- package/dist/plugins/basicFormatting.js +24 -0
- package/dist/plugins/blockType.d.ts +3 -0
- package/dist/plugins/blockType.js +6 -0
- package/dist/plugins/blockquote.d.ts +3 -0
- package/dist/plugins/blockquote.js +6 -0
- package/dist/plugins/checklist.d.ts +3 -0
- package/dist/plugins/checklist.js +10 -0
- package/dist/plugins/codeBlock.d.ts +3 -0
- package/dist/plugins/codeBlock.js +6 -0
- package/dist/plugins/formula.d.ts +3 -0
- package/dist/plugins/formula.js +9 -0
- package/dist/plugins/list.d.ts +3 -0
- package/dist/plugins/list.js +10 -0
- package/dist/plugins/media.d.ts +3 -0
- package/dist/plugins/media.js +12 -0
- package/dist/plugins/move.d.ts +3 -0
- package/dist/plugins/move.js +9 -0
- package/dist/plugins/table.d.ts +3 -0
- package/dist/plugins/table.js +22 -0
- package/dist/preset.d.ts +12 -0
- package/dist/preset.js +40 -0
- package/dist/schema.d.ts +22 -0
- package/dist/schema.js +333 -0
- package/dist/security/urlPolicy.d.ts +1 -17
- package/dist/security/urlPolicy.js +3 -69
- package/dist/selection.d.ts +1 -1
- package/dist/selectionMapping.d.ts +4 -0
- package/dist/selectionMapping.js +222 -0
- package/dist/table.d.ts +3 -3
- package/dist/transaction.d.ts +35 -12
- package/dist/transaction.js +174 -28
- package/dist/tree.d.ts +8 -2
- package/dist/tree.js +44 -0
- package/package.json +27 -8
- package/dist/commands/alignment.d.ts +0 -18
- package/dist/commands/code.d.ts +0 -13
- package/dist/commands/list.d.ts +0 -20
- package/dist/commands/list.js +0 -52
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { type FoundationEditor } from "../editor.js";
|
|
2
|
+
import type { CanonicalInputPipeline, CanonicalSubtreeRenderer } from "./types.js";
|
|
3
|
+
import type { CanonicalInputPipelineOptions } from "./types.js";
|
|
4
|
+
export declare class FoundationInputPipeline implements CanonicalInputPipeline {
|
|
5
|
+
readonly editor: FoundationEditor;
|
|
6
|
+
readonly renderer: CanonicalSubtreeRenderer;
|
|
7
|
+
private readonly root;
|
|
8
|
+
private readonly options;
|
|
9
|
+
private composition;
|
|
10
|
+
private readonly unhandled;
|
|
11
|
+
private readonly ownerDocument;
|
|
12
|
+
private destroyed;
|
|
13
|
+
private internalDrag;
|
|
14
|
+
private tableDragAnchor;
|
|
15
|
+
private trackChanges;
|
|
16
|
+
constructor(editor: FoundationEditor, renderer: CanonicalSubtreeRenderer, root: HTMLElement, options?: CanonicalInputPipelineOptions);
|
|
17
|
+
get unhandledInputTypes(): readonly string[];
|
|
18
|
+
private beforeInputListener;
|
|
19
|
+
private keyDownListener;
|
|
20
|
+
private compositionStartListener;
|
|
21
|
+
private compositionUpdateListener;
|
|
22
|
+
private compositionEndListener;
|
|
23
|
+
private tableMouseDownListener;
|
|
24
|
+
private tableMouseUpListener;
|
|
25
|
+
private clickListener;
|
|
26
|
+
private selectionChangeListener;
|
|
27
|
+
private pasteListener;
|
|
28
|
+
private copyListener;
|
|
29
|
+
private cutListener;
|
|
30
|
+
private dragStartListener;
|
|
31
|
+
private dropListener;
|
|
32
|
+
private cellFromNode;
|
|
33
|
+
private payloadFromTransfer;
|
|
34
|
+
private writeTransfer;
|
|
35
|
+
private selectionForPoint;
|
|
36
|
+
private commitClipboard;
|
|
37
|
+
handleCopy(event: ClipboardEvent): void;
|
|
38
|
+
handleCut(event: ClipboardEvent): void;
|
|
39
|
+
handlePaste(event: ClipboardEvent): void;
|
|
40
|
+
private handleDragStart;
|
|
41
|
+
handleDrop(event: DragEvent): void;
|
|
42
|
+
private commit;
|
|
43
|
+
private commandContext;
|
|
44
|
+
private commitStructuralResult;
|
|
45
|
+
/** First content-bearing child of a table cell, or the cell itself if somehow childless. */
|
|
46
|
+
private firstOwnerOf;
|
|
47
|
+
/**
|
|
48
|
+
* Tab/Shift+Tab cell-to-cell navigation (Phase 11 Tier 2 - previously
|
|
49
|
+
* "Tables own Tab navigation" was just a bare `return`, a genuinely
|
|
50
|
+
* missing feature, not a missing test). `grid.anchors` is already in
|
|
51
|
+
* reading order, so stepping ±1 through it is next/previous cell;
|
|
52
|
+
* stepping past the last cell appends a row via insertTableRowCommand and
|
|
53
|
+
* lands in its first cell, matching the reference precedent Tab already
|
|
54
|
+
* uses for a list item with no legal indent - always claim the key.
|
|
55
|
+
*/
|
|
56
|
+
private handleTableTab;
|
|
57
|
+
/**
|
|
58
|
+
* Every prefix of a valid SmartPos.path addresses a real ancestor node
|
|
59
|
+
* (the same property ownerAt already relies on), so walking path prefixes
|
|
60
|
+
* from longest to shortest finds the nearest enclosing table_cell/table
|
|
61
|
+
* without any DOM lookup - the model-level equivalent of cellFromNode,
|
|
62
|
+
* usable from a plain SmartPos rather than a DOM event target.
|
|
63
|
+
*/
|
|
64
|
+
private tableAncestorsAt;
|
|
65
|
+
/**
|
|
66
|
+
* Shift+Arrow rectangular cell-selection expansion (Phase 11 Tier 2 -
|
|
67
|
+
* previously no table-grid branch existed anywhere in arrow-key handling
|
|
68
|
+
* at all). Returns false when not applicable (anchor/head aren't both in
|
|
69
|
+
* the same table), letting the caller fall through to ordinary text-range
|
|
70
|
+
* arrow handling unchanged. Steps from the head cell's own top-left
|
|
71
|
+
* anchor corner - a reasonable v1 simplification for merged-cell edges,
|
|
72
|
+
* matching the existing renderer projection's own merge-snapping
|
|
73
|
+
* (surface/renderer.ts's syncCellSelectionProjection already snaps
|
|
74
|
+
* whatever rect the model selection implies through merged cells on
|
|
75
|
+
* render, so this does not need to duplicate that snapping here).
|
|
76
|
+
*/
|
|
77
|
+
private handleTableShiftArrow;
|
|
78
|
+
private replaceSelection;
|
|
79
|
+
/**
|
|
80
|
+
* Ambient track-changes mode (Phase 12a §2.3 follow-up, 2026-08-25):
|
|
81
|
+
* typed text becomes a real, live "insert"-kind suggestion mark instead
|
|
82
|
+
* of a plain insertText, and content it replaces is marked "delete"
|
|
83
|
+
* instead of actually removed - the same reviewable-suggestion contract
|
|
84
|
+
* as the explicit Suggest deletion/Suggest insertion toolbar actions,
|
|
85
|
+
* just applied automatically to ordinary typing. Scoped to a selection
|
|
86
|
+
* that's collapsed or fully within one inline owner; returns null for a
|
|
87
|
+
* selection crossing multiple paragraphs, so the caller falls through to
|
|
88
|
+
* the real (non-suggested) path - proposing a delete that spans several
|
|
89
|
+
* paragraphs plus an insert needs per-owner handling this pass doesn't
|
|
90
|
+
* build (see docs/PHASE_ROADMAP_8B_12B.md's Phase 12a status note).
|
|
91
|
+
*/
|
|
92
|
+
private suggestReplaceSelection;
|
|
93
|
+
/**
|
|
94
|
+
* True exactly when queueRangeDeletion's own same-parent forward-sibling
|
|
95
|
+
* path can handle this range (see its cross-parent/type/order checks,
|
|
96
|
+
* which this mirrors) - i.e. the two endpoints are different children of
|
|
97
|
+
* the very same parent, with compatible owner types, in forward order.
|
|
98
|
+
* Deliberately does not attempt to be more permissive than
|
|
99
|
+
* queueRangeDeletion itself; anything this returns false for keeps
|
|
100
|
+
* falling through to structuralDeletionPlan exactly as before.
|
|
101
|
+
*/
|
|
102
|
+
private canMergeAsSiblings;
|
|
103
|
+
private deleteRange;
|
|
104
|
+
/**
|
|
105
|
+
* Block atoms have no legal internal caret. When the browser reports a
|
|
106
|
+
* structural boundary beside one (including a node selection's head), move
|
|
107
|
+
* to the nearest editable block instead of manufacturing a position inside
|
|
108
|
+
* the atom. If the atom is at a container edge, create the empty paragraph
|
|
109
|
+
* that gives the user a real line to continue typing on.
|
|
110
|
+
*/
|
|
111
|
+
private moveFromStructuralBoundary;
|
|
112
|
+
private insertParagraph;
|
|
113
|
+
private insertLineBreak;
|
|
114
|
+
private deleteByInputType;
|
|
115
|
+
private deleteAcrossBlock;
|
|
116
|
+
handleBeforeInput(event: InputEvent): void;
|
|
117
|
+
private moveCaret;
|
|
118
|
+
handleKeyDown(event: KeyboardEvent): void;
|
|
119
|
+
handleCompositionStart(_event: CompositionEvent): void;
|
|
120
|
+
/** DOM remains authoritative; updates are intentionally observed, not rendered. */
|
|
121
|
+
handleCompositionUpdate(_event: CompositionEvent): void;
|
|
122
|
+
handleCompositionEnd(_event: CompositionEvent): void;
|
|
123
|
+
setTrackChanges(enabled: boolean, authorId?: string): void;
|
|
124
|
+
syncSelectionFromDom(): void;
|
|
125
|
+
destroy(): void;
|
|
126
|
+
}
|
|
127
|
+
export declare const createInputPipeline: (editor: FoundationEditor, renderer: CanonicalSubtreeRenderer, root: HTMLElement, options?: CanonicalInputPipelineOptions) => CanonicalInputPipeline;
|