@pierre/diffs 1.2.6 → 1.3.0-beta.1
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/components/CodeView.d.ts +0 -1
- package/dist/components/CodeView.d.ts.map +1 -1
- package/dist/components/CodeView.js +0 -23
- package/dist/components/CodeView.js.map +1 -1
- package/dist/components/File.d.ts +7 -2
- package/dist/components/File.d.ts.map +1 -1
- package/dist/components/File.js +36 -2
- package/dist/components/File.js.map +1 -1
- package/dist/components/FileDiff.d.ts +8 -2
- package/dist/components/FileDiff.d.ts.map +1 -1
- package/dist/components/FileDiff.js +73 -1
- package/dist/components/FileDiff.js.map +1 -1
- package/dist/components/UnresolvedFile.d.ts.map +1 -1
- package/dist/components/UnresolvedFile.js +2 -2
- package/dist/components/VirtualizedFile.d.ts +2 -1
- package/dist/components/VirtualizedFile.d.ts.map +1 -1
- package/dist/components/VirtualizedFile.js +48 -48
- package/dist/components/VirtualizedFile.js.map +1 -1
- package/dist/components/VirtualizedFileDiff.js +42 -22
- package/dist/components/VirtualizedFileDiff.js.map +1 -1
- package/dist/components/Virtualizer.d.ts +1 -1
- package/dist/components/Virtualizer.d.ts.map +1 -1
- package/dist/components/Virtualizer.js +3 -5
- package/dist/components/Virtualizer.js.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/editor/command.d.ts +6 -0
- package/dist/editor/command.d.ts.map +1 -0
- package/dist/editor/command.js +31 -0
- package/dist/editor/command.js.map +1 -0
- package/dist/editor/css.d.ts +6 -0
- package/dist/editor/css.d.ts.map +1 -0
- package/dist/editor/css.js +218 -0
- package/dist/editor/css.js.map +1 -0
- package/dist/editor/editStack.d.ts +66 -0
- package/dist/editor/editStack.d.ts.map +1 -0
- package/dist/editor/editStack.js +218 -0
- package/dist/editor/editStack.js.map +1 -0
- package/dist/editor/editor.d.ts +22 -0
- package/dist/editor/editor.d.ts.map +1 -0
- package/dist/editor/editor.js +1323 -0
- package/dist/editor/editor.js.map +1 -0
- package/dist/editor/index.d.ts +3 -0
- package/dist/editor/index.js +4 -0
- package/dist/editor/lineAnnotations.d.ts +8 -0
- package/dist/editor/lineAnnotations.d.ts.map +1 -0
- package/dist/editor/lineAnnotations.js +32 -0
- package/dist/editor/lineAnnotations.js.map +1 -0
- package/dist/editor/pieceTable.d.ts +33 -0
- package/dist/editor/pieceTable.d.ts.map +1 -0
- package/dist/editor/pieceTable.js +590 -0
- package/dist/editor/pieceTable.js.map +1 -0
- package/dist/editor/platform.d.ts +12 -0
- package/dist/editor/platform.d.ts.map +1 -0
- package/dist/editor/platform.js +44 -0
- package/dist/editor/platform.js.map +1 -0
- package/dist/editor/quickEdit.d.ts +29 -0
- package/dist/editor/quickEdit.d.ts.map +1 -0
- package/dist/editor/quickEdit.js +81 -0
- package/dist/editor/quickEdit.js.map +1 -0
- package/dist/editor/searchPanel.d.ts +30 -0
- package/dist/editor/searchPanel.d.ts.map +1 -0
- package/dist/editor/searchPanel.js +219 -0
- package/dist/editor/searchPanel.js.map +1 -0
- package/dist/editor/selection.d.ts +126 -0
- package/dist/editor/selection.d.ts.map +1 -0
- package/dist/editor/selection.js +900 -0
- package/dist/editor/selection.js.map +1 -0
- package/dist/editor/textDocument.d.ts +139 -0
- package/dist/editor/textDocument.d.ts.map +1 -0
- package/dist/editor/textDocument.js +202 -0
- package/dist/editor/textDocument.js.map +1 -0
- package/dist/editor/textMeasure.d.ts +32 -0
- package/dist/editor/textMeasure.d.ts.map +1 -0
- package/dist/editor/textMeasure.js +108 -0
- package/dist/editor/textMeasure.js.map +1 -0
- package/dist/editor/tokenzier.d.ts +37 -0
- package/dist/editor/tokenzier.d.ts.map +1 -0
- package/dist/editor/tokenzier.js +348 -0
- package/dist/editor/tokenzier.js.map +1 -0
- package/dist/editor/utils.d.ts +16 -0
- package/dist/editor/utils.d.ts.map +1 -0
- package/dist/editor/utils.js +37 -0
- package/dist/editor/utils.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/react/EditorContext.d.ts +16 -0
- package/dist/react/EditorContext.d.ts.map +1 -0
- package/dist/react/EditorContext.js +26 -0
- package/dist/react/EditorContext.js.map +1 -0
- package/dist/react/File.d.ts +2 -1
- package/dist/react/File.d.ts.map +1 -1
- package/dist/react/File.js +3 -2
- package/dist/react/File.js.map +1 -1
- package/dist/react/FileDiff.d.ts +3 -1
- package/dist/react/FileDiff.d.ts.map +1 -1
- package/dist/react/FileDiff.js +3 -2
- package/dist/react/FileDiff.js.map +1 -1
- package/dist/react/MultiFileDiff.d.ts +3 -1
- package/dist/react/MultiFileDiff.d.ts.map +1 -1
- package/dist/react/MultiFileDiff.js +3 -2
- package/dist/react/MultiFileDiff.js.map +1 -1
- package/dist/react/PatchDiff.d.ts +3 -1
- package/dist/react/PatchDiff.d.ts.map +1 -1
- package/dist/react/PatchDiff.js +3 -2
- package/dist/react/PatchDiff.js.map +1 -1
- package/dist/react/index.d.ts +3 -2
- package/dist/react/index.js +2 -1
- package/dist/react/jsx.d.ts +0 -1
- package/dist/react/jsx.d.ts.map +1 -1
- package/dist/react/types.d.ts +1 -0
- package/dist/react/types.d.ts.map +1 -1
- package/dist/react/types.js +0 -1
- package/dist/react/utils/useFileDiffInstance.d.ts +3 -1
- package/dist/react/utils/useFileDiffInstance.d.ts.map +1 -1
- package/dist/react/utils/useFileDiffInstance.js +31 -5
- package/dist/react/utils/useFileDiffInstance.js.map +1 -1
- package/dist/react/utils/useFileInstance.d.ts +4 -1
- package/dist/react/utils/useFileInstance.d.ts.map +1 -1
- package/dist/react/utils/useFileInstance.js +30 -5
- package/dist/react/utils/useFileInstance.js.map +1 -1
- package/dist/renderers/DiffHunksRenderer.d.ts +2 -2
- package/dist/renderers/DiffHunksRenderer.d.ts.map +1 -1
- package/dist/renderers/DiffHunksRenderer.js +9 -5
- package/dist/renderers/DiffHunksRenderer.js.map +1 -1
- package/dist/renderers/FileRenderer.d.ts +5 -1
- package/dist/renderers/FileRenderer.d.ts.map +1 -1
- package/dist/renderers/FileRenderer.js +108 -41
- package/dist/renderers/FileRenderer.js.map +1 -1
- package/dist/ssr/index.d.ts +2 -2
- package/dist/style.js +1 -1
- package/dist/style.js.map +1 -1
- package/dist/types.d.ts +45 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/cleanLastNewline.js +6 -1
- package/dist/utils/cleanLastNewline.js.map +1 -1
- package/dist/utils/computeEstimatedDiffHeights.js +20 -9
- package/dist/utils/computeEstimatedDiffHeights.js.map +1 -1
- package/dist/utils/computeFileOffsets.d.ts +13 -0
- package/dist/utils/computeFileOffsets.d.ts.map +1 -0
- package/dist/utils/computeFileOffsets.js +33 -0
- package/dist/utils/computeFileOffsets.js.map +1 -0
- package/dist/utils/createTransformerWithState.js +9 -0
- package/dist/utils/createTransformerWithState.js.map +1 -1
- package/dist/utils/iterateOverDiff.js +182 -147
- package/dist/utils/iterateOverDiff.js.map +1 -1
- package/dist/utils/renderDiffWithHighlighter.js +1 -1
- package/dist/utils/renderFileWithHighlighter.js +5 -14
- package/dist/utils/renderFileWithHighlighter.js.map +1 -1
- package/dist/utils/virtualDiffLayout.d.ts +2 -23
- package/dist/utils/virtualDiffLayout.d.ts.map +1 -1
- package/dist/utils/virtualDiffLayout.js +1 -41
- package/dist/utils/virtualDiffLayout.js.map +1 -1
- package/dist/worker/WorkerPoolManager.js +1 -1
- package/dist/worker/{wasm-BaDzIkIn.js → wasm-D4DU5jgR.js} +2 -2
- package/dist/worker/wasm-D4DU5jgR.js.map +1 -0
- package/dist/worker/worker-portable.js +349 -363
- package/dist/worker/worker-portable.js.map +1 -1
- package/dist/worker/worker.js +222 -243
- package/dist/worker/worker.js.map +1 -1
- package/package.json +9 -1
- package/dist/utils/iterateOverFile.d.ts +0 -50
- package/dist/utils/iterateOverFile.d.ts.map +0 -1
- package/dist/utils/iterateOverFile.js +0 -49
- package/dist/utils/iterateOverFile.js.map +0 -1
- package/dist/worker/wasm-BaDzIkIn.js.map +0 -1
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { DiffLineAnnotation } from "../types.js";
|
|
2
|
+
import { Position, Range, ResolvedTextEdit, TextDocument, TextDocumentChange, TextEdit } from "./textDocument.js";
|
|
3
|
+
|
|
4
|
+
//#region src/editor/selection.d.ts
|
|
5
|
+
declare const DirectionBackward = -1;
|
|
6
|
+
declare const DirectionNone = 0;
|
|
7
|
+
declare const DirectionForward = 1;
|
|
8
|
+
type SelectionDirection = typeof DirectionBackward | typeof DirectionNone | typeof DirectionForward;
|
|
9
|
+
interface EditorSelection extends Range {
|
|
10
|
+
direction: SelectionDirection;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Converts a selection from a web selection to an editor selection.
|
|
14
|
+
*/
|
|
15
|
+
declare function convertSelection(range: StaticRange, direction?: SelectionDirection): EditorSelection | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Resolves the indent edits for a selection.
|
|
18
|
+
*/
|
|
19
|
+
declare function resolveIndentEdits(textDocument: TextDocument<unknown>, selection: EditorSelection, tabSize: number, outdent: boolean): [edits: TextEdit[], nextSelection: EditorSelection];
|
|
20
|
+
/**
|
|
21
|
+
* Maps the cursor move to all selections.
|
|
22
|
+
*/
|
|
23
|
+
declare function mapCursorMove(textDocument: TextDocument<unknown>, selections: EditorSelection[], shortcut: 'textStart' | 'start' | 'end' | 'up' | 'down' | 'left' | 'right'): EditorSelection[];
|
|
24
|
+
/**
|
|
25
|
+
* Same as mapCursorMove, but with shift key pressed.
|
|
26
|
+
*/
|
|
27
|
+
declare function mapSelectionShift(textDocument: TextDocument<unknown>, selections: EditorSelection[], shortcut: 'textStart' | 'start' | 'end' | 'up' | 'down' | 'left' | 'right'): EditorSelection[];
|
|
28
|
+
/**
|
|
29
|
+
* Applies a text change to the given text document
|
|
30
|
+
*/
|
|
31
|
+
declare function applyTextChangeToSelections<LAnnotation>(textDocument: TextDocument<LAnnotation>, selections: EditorSelection[], edit: ResolvedTextEdit, lineAnnotations?: DiffLineAnnotation<LAnnotation>[], tabSize?: number): {
|
|
32
|
+
nextSelections: EditorSelection[];
|
|
33
|
+
change?: TextDocumentChange;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Applies a text replace to multiple selections.
|
|
37
|
+
*/
|
|
38
|
+
declare function applyTextReplaceToSelections<LAnnotation>(textDocument: TextDocument<LAnnotation>, selections: EditorSelection[], texts: string[], lineAnnotations?: DiffLineAnnotation<LAnnotation>[]): {
|
|
39
|
+
nextSelections: EditorSelection[];
|
|
40
|
+
change?: TextDocumentChange;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Swaps the two characters adjacent to a collapsed selection, matching browser
|
|
44
|
+
* insertTranspose (Ctrl+T) behavior.
|
|
45
|
+
*/
|
|
46
|
+
declare function applyTransposeToSelections<LAnnotation>(textDocument: TextDocument<LAnnotation>, selections: EditorSelection[], lineAnnotations?: DiffLineAnnotation<LAnnotation>[]): {
|
|
47
|
+
nextSelections: EditorSelection[];
|
|
48
|
+
change?: TextDocumentChange;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Deletes from each selection to the end of its line, including the line break
|
|
52
|
+
* when the caret is already at the end of a non-final line. Non-collapsed
|
|
53
|
+
* selections delete their selected text instead.
|
|
54
|
+
*/
|
|
55
|
+
declare function applyDeleteHardLineForwardToSelections<LAnnotation>(textDocument: TextDocument<LAnnotation>, selections: EditorSelection[], lineAnnotations?: DiffLineAnnotation<LAnnotation>[]): {
|
|
56
|
+
nextSelections: EditorSelection[];
|
|
57
|
+
change?: TextDocumentChange;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Checks if a selection is collapsed.
|
|
61
|
+
*/
|
|
62
|
+
declare function isCollapsedSelection(selection: EditorSelection): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Returns the caret (focus) position for a selection.
|
|
65
|
+
*/
|
|
66
|
+
declare function getCaretPosition(selection: EditorSelection): Position;
|
|
67
|
+
/**
|
|
68
|
+
* Checks if a line is editable.
|
|
69
|
+
*/
|
|
70
|
+
declare function isLineEditable(lineType: string): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Checks whether selections `a` and `b` intersect.
|
|
73
|
+
*/
|
|
74
|
+
declare function selectionIntersects(a: EditorSelection, b: EditorSelection): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Compares two positions.
|
|
77
|
+
*/
|
|
78
|
+
declare function comparePosition(a: Position, b: Position): number;
|
|
79
|
+
/**
|
|
80
|
+
* Creates a selection from anchor and focus offsets.
|
|
81
|
+
*/
|
|
82
|
+
declare function createSelectionFromAnchorAndFocusOffsets(textDocument: TextDocument<unknown>, anchorOffset: number, focusOffset: number): EditorSelection;
|
|
83
|
+
/**
|
|
84
|
+
* Creates a selection from a anchor and focus selection.
|
|
85
|
+
*/
|
|
86
|
+
declare function createSelectionFrom(anchorSelection: EditorSelection, focusSelection: EditorSelection): EditorSelection;
|
|
87
|
+
/**
|
|
88
|
+
* Extends or shrinks the selection `original` using the endpoints of `target`, \
|
|
89
|
+
* matching contenteditable shift + click extend behavior.
|
|
90
|
+
*/
|
|
91
|
+
declare function extendSelection(original: EditorSelection, target: EditorSelection): EditorSelection;
|
|
92
|
+
/**
|
|
93
|
+
* Extends multiple selections.
|
|
94
|
+
*/
|
|
95
|
+
declare function extendSelections(selections: EditorSelection[], target: EditorSelection): EditorSelection[];
|
|
96
|
+
/**
|
|
97
|
+
* Merges overlapping selections.
|
|
98
|
+
*/
|
|
99
|
+
declare function mergeOverlappingSelections(selections: EditorSelection[]): EditorSelection[];
|
|
100
|
+
/**
|
|
101
|
+
* Finds the next matching word and updates the selections.
|
|
102
|
+
*/
|
|
103
|
+
declare function findNexMatch(textDocument: TextDocument<unknown>, selections: EditorSelection[]): EditorSelection[] | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Get the full selection of the document.
|
|
106
|
+
*/
|
|
107
|
+
declare function getDocumentFullSelection(textDocument: TextDocument<unknown>): EditorSelection;
|
|
108
|
+
/**
|
|
109
|
+
* Get the boundary selection of the document.
|
|
110
|
+
*/
|
|
111
|
+
declare function getDocumentBoundarySelection(textDocument: TextDocument<unknown>, atEnd: boolean): EditorSelection;
|
|
112
|
+
/**
|
|
113
|
+
* Get the text of the selections for the given text document.
|
|
114
|
+
*/
|
|
115
|
+
declare function getSelectionText(textDocument: TextDocument<unknown>, selections: EditorSelection[]): string;
|
|
116
|
+
/**
|
|
117
|
+
* Get the anchor node and offset for a selection.
|
|
118
|
+
*/
|
|
119
|
+
declare function getSelectionAnchor(lineElement: HTMLElement, character: number): [Node, number];
|
|
120
|
+
/**
|
|
121
|
+
* Expands a zero-width selection to the word-like segment that contains the caret.
|
|
122
|
+
*/
|
|
123
|
+
declare function expandCollapsedSelectionToWord(textDocument: TextDocument<unknown>, selection: EditorSelection): EditorSelection;
|
|
124
|
+
//#endregion
|
|
125
|
+
export { DirectionBackward, DirectionForward, DirectionNone, EditorSelection, SelectionDirection, applyDeleteHardLineForwardToSelections, applyTextChangeToSelections, applyTextReplaceToSelections, applyTransposeToSelections, comparePosition, convertSelection, createSelectionFrom, createSelectionFromAnchorAndFocusOffsets, expandCollapsedSelectionToWord, extendSelection, extendSelections, findNexMatch, getCaretPosition, getDocumentBoundarySelection, getDocumentFullSelection, getSelectionAnchor, getSelectionText, isCollapsedSelection, isLineEditable, mapCursorMove, mapSelectionShift, mergeOverlappingSelections, resolveIndentEdits, selectionIntersects };
|
|
126
|
+
//# sourceMappingURL=selection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection.d.ts","names":["DiffLineAnnotation","Position","Range","ResolvedTextEdit","TextDocument","TextDocumentChange","TextEdit","DirectionBackward","DirectionNone","DirectionForward","SelectionDirection","EditorSelection","convertSelection","StaticRange","resolveIndentEdits","mapCursorMove","mapSelectionShift","applyTextChangeToSelections","LAnnotation","applyTextReplaceToSelections","applyTransposeToSelections","applyDeleteHardLineForwardToSelections","isCollapsedSelection","getCaretPosition","isLineEditable","selectionIntersects","comparePosition","createSelectionFromAnchorAndFocusOffsets","createSelectionFrom","extendSelection","extendSelections","mergeOverlappingSelections","findNexMatch","getDocumentFullSelection","getDocumentBoundarySelection","getSelectionText","getSelectionAnchor","HTMLElement","Node","expandCollapsedSelectionToWord"],"sources":["../../src/editor/selection.d.ts"],"sourcesContent":["import type { DiffLineAnnotation } from '../types';\nimport type { Position, Range, ResolvedTextEdit, TextDocument, TextDocumentChange, TextEdit } from './textDocument';\nexport declare const DirectionBackward = -1;\nexport declare const DirectionNone = 0;\nexport declare const DirectionForward = 1;\nexport type SelectionDirection = typeof DirectionBackward | typeof DirectionNone | typeof DirectionForward;\nexport interface EditorSelection extends Range {\n direction: SelectionDirection;\n}\n/**\n * Converts a selection from a web selection to an editor selection.\n */\nexport declare function convertSelection(range: StaticRange, direction?: SelectionDirection): EditorSelection | undefined;\n/**\n * Resolves the indent edits for a selection.\n */\nexport declare function resolveIndentEdits(textDocument: TextDocument<unknown>, selection: EditorSelection, tabSize: number, outdent: boolean): [edits: TextEdit[], nextSelection: EditorSelection];\n/**\n * Maps the cursor move to all selections.\n */\nexport declare function mapCursorMove(textDocument: TextDocument<unknown>, selections: EditorSelection[], shortcut: 'textStart' | 'start' | 'end' | 'up' | 'down' | 'left' | 'right'): EditorSelection[];\n/**\n * Same as mapCursorMove, but with shift key pressed.\n */\nexport declare function mapSelectionShift(textDocument: TextDocument<unknown>, selections: EditorSelection[], shortcut: 'textStart' | 'start' | 'end' | 'up' | 'down' | 'left' | 'right'): EditorSelection[];\n/**\n * Applies a text change to the given text document\n */\nexport declare function applyTextChangeToSelections<LAnnotation>(textDocument: TextDocument<LAnnotation>, selections: EditorSelection[], edit: ResolvedTextEdit, lineAnnotations?: DiffLineAnnotation<LAnnotation>[], tabSize?: number): {\n nextSelections: EditorSelection[];\n change?: TextDocumentChange;\n};\n/**\n * Applies a text replace to multiple selections.\n */\nexport declare function applyTextReplaceToSelections<LAnnotation>(textDocument: TextDocument<LAnnotation>, selections: EditorSelection[], texts: string[], lineAnnotations?: DiffLineAnnotation<LAnnotation>[]): {\n nextSelections: EditorSelection[];\n change?: TextDocumentChange;\n};\n/**\n * Swaps the two characters adjacent to a collapsed selection, matching browser\n * insertTranspose (Ctrl+T) behavior.\n */\nexport declare function applyTransposeToSelections<LAnnotation>(textDocument: TextDocument<LAnnotation>, selections: EditorSelection[], lineAnnotations?: DiffLineAnnotation<LAnnotation>[]): {\n nextSelections: EditorSelection[];\n change?: TextDocumentChange;\n};\n/**\n * Deletes from each selection to the end of its line, including the line break\n * when the caret is already at the end of a non-final line. Non-collapsed\n * selections delete their selected text instead.\n */\nexport declare function applyDeleteHardLineForwardToSelections<LAnnotation>(textDocument: TextDocument<LAnnotation>, selections: EditorSelection[], lineAnnotations?: DiffLineAnnotation<LAnnotation>[]): {\n nextSelections: EditorSelection[];\n change?: TextDocumentChange;\n};\n/**\n * Checks if a selection is collapsed.\n */\nexport declare function isCollapsedSelection(selection: EditorSelection): boolean;\n/**\n * Returns the caret (focus) position for a selection.\n */\nexport declare function getCaretPosition(selection: EditorSelection): Position;\n/**\n * Checks if a line is editable.\n */\nexport declare function isLineEditable(lineType: string): boolean;\n/**\n * Checks whether selections `a` and `b` intersect.\n */\nexport declare function selectionIntersects(a: EditorSelection, b: EditorSelection): boolean;\n/**\n * Compares two positions.\n */\nexport declare function comparePosition(a: Position, b: Position): number;\n/**\n * Creates a selection from anchor and focus offsets.\n */\nexport declare function createSelectionFromAnchorAndFocusOffsets(textDocument: TextDocument<unknown>, anchorOffset: number, focusOffset: number): EditorSelection;\n/**\n * Creates a selection from a anchor and focus selection.\n */\nexport declare function createSelectionFrom(anchorSelection: EditorSelection, focusSelection: EditorSelection): EditorSelection;\n/**\n * Extends or shrinks the selection `original` using the endpoints of `target`, \\\n * matching contenteditable shift + click extend behavior.\n */\nexport declare function extendSelection(original: EditorSelection, target: EditorSelection): EditorSelection;\n/**\n * Extends multiple selections.\n */\nexport declare function extendSelections(selections: EditorSelection[], target: EditorSelection): EditorSelection[];\n/**\n * Merges overlapping selections.\n */\nexport declare function mergeOverlappingSelections(selections: EditorSelection[]): EditorSelection[];\n/**\n * Finds the next matching word and updates the selections.\n */\nexport declare function findNexMatch(textDocument: TextDocument<unknown>, selections: EditorSelection[]): EditorSelection[] | undefined;\n/**\n * Get the full selection of the document.\n */\nexport declare function getDocumentFullSelection(textDocument: TextDocument<unknown>): EditorSelection;\n/**\n * Get the boundary selection of the document.\n */\nexport declare function getDocumentBoundarySelection(textDocument: TextDocument<unknown>, atEnd: boolean): EditorSelection;\n/**\n * Get the text of the selections for the given text document.\n */\nexport declare function getSelectionText(textDocument: TextDocument<unknown>, selections: EditorSelection[]): string;\n/**\n * Get the anchor node and offset for a selection.\n */\nexport declare function getSelectionAnchor(lineElement: HTMLElement, character: number): [Node, number];\n/**\n * Expands a zero-width selection to the word-like segment that contains the caret.\n */\nexport declare function expandCollapsedSelectionToWord(textDocument: TextDocument<unknown>, selection: EditorSelection): EditorSelection;\n//# sourceMappingURL=selection.d.ts.map"],"mappings":";;;;cAEqBO,iBAAAA;cACAC,aAAAA;AADAD,cAEAE,gBAAAA,GAFiB,CAAA;AACjBD,KAETE,kBAAAA,GAFsB,OAEMH,iBAFN,GAAA,OAEiCC,aAFjC,GAAA,OAEwDC,gBAFxD;AACbA,UAEJE,eAAAA,SAAwBT,KAFJ,CAAA;EACzBQ,SAAAA,EAEGA,kBAFe;;;;;AACbC,iBAMOC,gBAAAA,CALTF,KAAAA,EAKiCG,WANPX,EAAK,SAAA,CAAA,EAM2BQ,kBAN3B,CAAA,EAMgDC,eANhD,GAAA,SAAA;AAM9C;;;AAA8FA,iBAItEG,kBAAAA,CAJsEH,YAAAA,EAIrCP,YAJqCO,CAAAA,OAAAA,CAAAA,EAAAA,SAAAA,EAIHA,eAJGA,EAAAA,OAAAA,EAAAA,MAAAA,EAAAA,OAAAA,EAAAA,OAAAA,CAAAA,EAAAA,CAAAA,KAAAA,EAI0DL,QAJ1DK,EAAAA,EAAAA,aAA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