@monaco-neovim-wasm/lib 0.1.8 → 0.1.9
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/monaco-neovim-wasm.es.js +790 -529
- package/dist/monacoNeovim.d.ts +31 -0
- package/package.json +1 -1
package/dist/monacoNeovim.d.ts
CHANGED
|
@@ -88,6 +88,9 @@ export type MonacoNeovimOptions = {
|
|
|
88
88
|
onMessage?: (text: string | null) => void;
|
|
89
89
|
onPopupmenu?: (items: PopupMenuItem[] | null, selected: number) => void;
|
|
90
90
|
cmdlineContainer?: HTMLElement | null;
|
|
91
|
+
insertSyncDebounceMs?: number;
|
|
92
|
+
debug?: boolean;
|
|
93
|
+
debugLog?: (line: string) => void;
|
|
91
94
|
shouldHandleKey?: (ev: KeyboardEvent) => boolean;
|
|
92
95
|
translateKey?: (ev: KeyboardEvent) => string | null;
|
|
93
96
|
};
|
|
@@ -137,6 +140,8 @@ export declare class MonacoNeovimClient {
|
|
|
137
140
|
private searchRefreshPending;
|
|
138
141
|
private execLuaAvailable;
|
|
139
142
|
private visualSelectionRefreshTimer;
|
|
143
|
+
private selectionSyncTimer;
|
|
144
|
+
private pendingSelection;
|
|
140
145
|
private lastCursorStyle;
|
|
141
146
|
private lastCursorBlink;
|
|
142
147
|
private lastCursorWidth;
|
|
@@ -145,6 +150,10 @@ export declare class MonacoNeovimClient {
|
|
|
145
150
|
private nextSeedLines;
|
|
146
151
|
private cmdlineEl;
|
|
147
152
|
private cmdlineVisible;
|
|
153
|
+
private cmdlineTextRaw;
|
|
154
|
+
private cmdlineCursorByte;
|
|
155
|
+
private cmdlineCursorOffsetBytes;
|
|
156
|
+
private cmdlineCursorContentBytes;
|
|
148
157
|
private messageEl;
|
|
149
158
|
private messageTimer;
|
|
150
159
|
private popupEl;
|
|
@@ -155,7 +164,18 @@ export declare class MonacoNeovimClient {
|
|
|
155
164
|
private compositionActive;
|
|
156
165
|
private pendingResyncAfterComposition;
|
|
157
166
|
private ignoreNextInputEvent;
|
|
167
|
+
private ignoreNvimBufLinesUntil;
|
|
168
|
+
private exitingInsertMode;
|
|
169
|
+
private pendingKeysAfterExit;
|
|
170
|
+
private exitInsertTimer;
|
|
171
|
+
private dotRepeatKeys;
|
|
172
|
+
private dotRepeatBackspaces;
|
|
158
173
|
private ignoreTextKeydownUntil;
|
|
174
|
+
private lastImeCommitAt;
|
|
175
|
+
private lastImeCommitText;
|
|
176
|
+
private recordingRegister;
|
|
177
|
+
private recordingRefreshArmed;
|
|
178
|
+
private recordingRefreshTimer;
|
|
159
179
|
private optimisticCursorUntil;
|
|
160
180
|
private optimisticCursorPos;
|
|
161
181
|
private optimisticCursorPrevPos;
|
|
@@ -167,6 +187,10 @@ export declare class MonacoNeovimClient {
|
|
|
167
187
|
private modelContentDisposable;
|
|
168
188
|
private originalOptions;
|
|
169
189
|
private resyncTimer;
|
|
190
|
+
private debugLog;
|
|
191
|
+
private scheduleRecordingRefresh;
|
|
192
|
+
private refreshRecordingState;
|
|
193
|
+
private sendCmdlineImeText;
|
|
170
194
|
constructor(editor: MonacoEditor.IStandaloneCodeEditor, options?: MonacoNeovimOptions);
|
|
171
195
|
start(seedLines?: string[]): Promise<void>;
|
|
172
196
|
stop(silent?: boolean): void;
|
|
@@ -175,6 +199,7 @@ export declare class MonacoNeovimClient {
|
|
|
175
199
|
call<T = unknown>(method: string, params?: unknown[]): Promise<T>;
|
|
176
200
|
command(cmd: string): void;
|
|
177
201
|
input(keys: string): void;
|
|
202
|
+
type(text: string, wrapEnter?: boolean): void;
|
|
178
203
|
paste(text: string): void;
|
|
179
204
|
execLua<T = unknown>(code: string, args?: unknown[]): Promise<T>;
|
|
180
205
|
getSession(): NeovimWasmSession | null;
|
|
@@ -196,11 +221,13 @@ export declare class MonacoNeovimClient {
|
|
|
196
221
|
private handleClipboardCopy;
|
|
197
222
|
private handleRequest;
|
|
198
223
|
private handleNotify;
|
|
224
|
+
private computeLinePatch;
|
|
199
225
|
private applyLinePatch;
|
|
200
226
|
private applyLinePatchToModel;
|
|
201
227
|
private setModelText;
|
|
202
228
|
private initCmdlineUi;
|
|
203
229
|
private setCmdline;
|
|
230
|
+
private setCmdlineCursor;
|
|
204
231
|
private setMessage;
|
|
205
232
|
private setPopupmenu;
|
|
206
233
|
private applyMonacoWrap;
|
|
@@ -227,8 +254,12 @@ export declare class MonacoNeovimClient {
|
|
|
227
254
|
private applySearchHighlights;
|
|
228
255
|
private applyVisualDecorations;
|
|
229
256
|
private applyNvimMode;
|
|
257
|
+
private armInsertExit;
|
|
258
|
+
private syncDotRepeatToNvim;
|
|
230
259
|
private handleKey;
|
|
231
260
|
private handleMouse;
|
|
261
|
+
private handleSelection;
|
|
262
|
+
private syncVisualSelectionToNvim;
|
|
232
263
|
private sendInput;
|
|
233
264
|
private modifiedKeyName;
|
|
234
265
|
private hasExplicitModAllowlist;
|