@lvce-editor/test-worker 3.16.0 → 3.18.0
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/api.d.ts +23 -4
- package/dist/testWorkerMain.js +71 -2
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ declare const execute: (id: string, ...args: readonly any[]) => Promise<any>;
|
|
|
19
19
|
declare const selectItem: (text: string) => Promise<void>;
|
|
20
20
|
declare const setCursor: (rowIndex: number, columnIndex: number) => Promise<void>;
|
|
21
21
|
declare const openCompletion: () => Promise<void>;
|
|
22
|
+
declare const closeCompletion: () => Promise<void>;
|
|
22
23
|
declare const openEditorContextMenu: () => Promise<void>;
|
|
23
24
|
declare const invokeTabCompletion: () => Promise<void>;
|
|
24
25
|
declare const executeTabCompletion: () => Promise<void>;
|
|
@@ -69,6 +70,8 @@ declare const rename: () => Promise<void>;
|
|
|
69
70
|
declare const showHover: () => Promise<void>;
|
|
70
71
|
declare const openRename: () => Promise<void>;
|
|
71
72
|
declare const shouldHaveText: (expectedText: string) => Promise<void>;
|
|
73
|
+
declare const selectIndex: (index: number) => Promise<void>;
|
|
74
|
+
declare const selectCurrentIndex: () => Promise<void>;
|
|
72
75
|
declare const openContextMenu$1: (index: number) => Promise<void>;
|
|
73
76
|
declare const focus$1: () => Promise<void>;
|
|
74
77
|
declare const focusNext$2: () => Promise<void>;
|
|
@@ -111,7 +114,19 @@ declare const focusNext$4: () => Promise<void>;
|
|
|
111
114
|
declare const focusPrevious$2: () => Promise<void>;
|
|
112
115
|
declare const focusFirst$2: () => Promise<void>;
|
|
113
116
|
declare const focusLast$2: () => Promise<void>;
|
|
117
|
+
declare const toggleRecordingKeys: () => Promise<void>;
|
|
118
|
+
declare const startRecordingKeys: () => Promise<void>;
|
|
119
|
+
declare const clearInput: () => Promise<void>;
|
|
120
|
+
declare const sortByPrecedence: () => Promise<void>;
|
|
121
|
+
declare const stopRecordingKeys: () => Promise<void>;
|
|
114
122
|
declare const handleContextMenu$1: (button: number, x: number, y: number) => Promise<void>;
|
|
123
|
+
declare const copyCommandId: () => Promise<void>;
|
|
124
|
+
declare const copyCommandTitle: () => Promise<void>;
|
|
125
|
+
declare const addKeyBinding: () => Promise<void>;
|
|
126
|
+
declare const removeKeyBinding: () => Promise<void>;
|
|
127
|
+
declare const changeWhenExpression: () => Promise<void>;
|
|
128
|
+
declare const showSameKeyBindings: () => Promise<void>;
|
|
129
|
+
declare const resetKeyBinding: () => Promise<void>;
|
|
115
130
|
declare const press: (key: string) => Promise<void>;
|
|
116
131
|
declare const openUri: (uri: string) => Promise<void>;
|
|
117
132
|
declare const splitRight: () => Promise<void>;
|
|
@@ -136,7 +151,7 @@ declare const clearSearchResults: () => Promise<void>;
|
|
|
136
151
|
declare const dismissItem: () => Promise<void>;
|
|
137
152
|
declare const focusFirst$3: () => Promise<void>;
|
|
138
153
|
declare const focusIndex$2: (index: number) => Promise<void>;
|
|
139
|
-
declare const selectIndex: (index: number) => Promise<void>;
|
|
154
|
+
declare const selectIndex$1: (index: number) => Promise<void>;
|
|
140
155
|
declare const focusNext$6: () => Promise<void>;
|
|
141
156
|
declare const handleWheel$1: (deltaMode: number, deltaY: number) => Promise<void>;
|
|
142
157
|
declare const focusNextPage: () => Promise<void>;
|
|
@@ -193,7 +208,10 @@ declare namespace ContextMenu {
|
|
|
193
208
|
export { selectItem };
|
|
194
209
|
}
|
|
195
210
|
declare namespace Editor {
|
|
196
|
-
export { addAllMissingImports, closeColorPicker, closeCompletionDetails, copy, copyLineDown, copyLineUp, cursorCharacterLeft, cursorCharacterRight, cursorDown, cursorEnd, cursorHome, cursorUp, cursorWordLeft, cursorWordPartLeft, cursorWordPartRight, cursorWordRight, deleteAllLeft, deleteAllRight, executeTabCompletion, findAllImplementations, findAllReferences, format, getText, goToDefinition, goToTypeDefinition, insertLineBreak, invokeBraceCompletion, invokeTabCompletion, openColorPicker, openCompletion, openCompletionDetails, openContextMenu, openEditorContextMenu, openFind, openFindWidget, openHover, openRename, openSourceActions, organizeImports, rename, selectAll, setCursor, setDeltaY, setSelections, shouldHaveText, showHover, sortImports, sourceActionsSelectCurrent, toggleBlockComment, toggleCompletionDetails, toggleLineComment, type };
|
|
211
|
+
export { addAllMissingImports, closeColorPicker, closeCompletion, closeCompletionDetails, copy, copyLineDown, copyLineUp, cursorCharacterLeft, cursorCharacterRight, cursorDown, cursorEnd, cursorHome, cursorUp, cursorWordLeft, cursorWordPartLeft, cursorWordPartRight, cursorWordRight, deleteAllLeft, deleteAllRight, executeTabCompletion, findAllImplementations, findAllReferences, format, getText, goToDefinition, goToTypeDefinition, insertLineBreak, invokeBraceCompletion, invokeTabCompletion, openColorPicker, openCompletion, openCompletionDetails, openContextMenu, openEditorContextMenu, openFind, openFindWidget, openHover, openRename, openSourceActions, organizeImports, rename, selectAll, setCursor, setDeltaY, setSelections, shouldHaveText, showHover, sortImports, sourceActionsSelectCurrent, toggleBlockComment, toggleCompletionDetails, toggleLineComment, type };
|
|
212
|
+
}
|
|
213
|
+
declare namespace EditorCompletion {
|
|
214
|
+
export { selectCurrentIndex, selectIndex };
|
|
197
215
|
}
|
|
198
216
|
declare namespace Explorer {
|
|
199
217
|
export { acceptEdit, cancelEdit, clickCurrent, expandAll, expandRecursively, focus$1 as focus, focusFirst$1 as focusFirst, focusIndex, focusLast$1 as focusLast, focusNext$2 as focusNext, handleArrowLeft, handleClick$1 as handleClick, newFile, openContextMenu$1 as openContextMenu, removeDirent, rename$1 as rename, updateEditingValue };
|
|
@@ -214,7 +232,7 @@ declare namespace IconTheme {
|
|
|
214
232
|
export { setIconTheme };
|
|
215
233
|
}
|
|
216
234
|
declare namespace KeyBindingsEditor {
|
|
217
|
-
export { focusFirst$2 as focusFirst, focusLast$2 as focusLast, focusNext$4 as focusNext, focusPrevious$2 as focusPrevious, handleClick$2 as handleClick, handleContextMenu$1 as handleContextMenu, handleDoubleClick, handleInput, handleWheel, open$1 as open };
|
|
235
|
+
export { addKeyBinding, changeWhenExpression, clearInput, copyCommandId, copyCommandTitle, focusFirst$2 as focusFirst, focusLast$2 as focusLast, focusNext$4 as focusNext, focusPrevious$2 as focusPrevious, handleClick$2 as handleClick, handleContextMenu$1 as handleContextMenu, handleDoubleClick, handleInput, handleWheel, open$1 as open, removeKeyBinding, resetKeyBinding, showSameKeyBindings, sortByPrecedence, startRecordingKeys, stopRecordingKeys, toggleRecordingKeys };
|
|
218
236
|
}
|
|
219
237
|
declare namespace KeyBoard {
|
|
220
238
|
export { press };
|
|
@@ -235,7 +253,7 @@ declare namespace QuickPick {
|
|
|
235
253
|
export { executeCommand, focusIndex$1 as focusIndex, focusNext$5 as focusNext, focusPrevious$3 as focusPrevious, open$3 as open, selectItem$1 as selectItem, setValue$1 as setValue };
|
|
236
254
|
}
|
|
237
255
|
declare namespace Search {
|
|
238
|
-
export { clearSearchResults, dismissItem, focusFirst$3 as focusFirst, focusIndex$2 as focusIndex, focusNext$6 as focusNext, focusNextPage, focusPrevious$4 as focusPrevious, focusPreviousPage, handleWheel$1 as handleWheel, replaceAll, selectIndex, setExcludeValue, setIncludeValue, setReplaceValue, setValue$2 as setValue, toggleMatchCase, toggleMatchWholeWord, togglePreserveCase, toggleReplace, toggleSearchDetails, toggleUseRegularExpression };
|
|
256
|
+
export { clearSearchResults, dismissItem, focusFirst$3 as focusFirst, focusIndex$2 as focusIndex, focusNext$6 as focusNext, focusNextPage, focusPrevious$4 as focusPrevious, focusPreviousPage, handleWheel$1 as handleWheel, replaceAll, selectIndex$1 as selectIndex, setExcludeValue, setIncludeValue, setReplaceValue, setValue$2 as setValue, toggleMatchCase, toggleMatchWholeWord, togglePreserveCase, toggleReplace, toggleSearchDetails, toggleUseRegularExpression };
|
|
239
257
|
}
|
|
240
258
|
declare namespace Settings {
|
|
241
259
|
export { update };
|
|
@@ -263,6 +281,7 @@ export interface TestApi {
|
|
|
263
281
|
readonly Command: typeof Command,
|
|
264
282
|
readonly ContextMenu: typeof ContextMenu,
|
|
265
283
|
readonly Editor: typeof Editor,
|
|
284
|
+
readonly EditorCompletion: typeof EditorCompletion,
|
|
266
285
|
readonly Explorer: typeof Explorer,
|
|
267
286
|
readonly Extension: typeof Extension,
|
|
268
287
|
readonly ExtensionDetail: typeof ExtensionDetail,
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -1329,6 +1329,9 @@ const setCursor = async (rowIndex, columnIndex) => {
|
|
|
1329
1329
|
const openCompletion = async () => {
|
|
1330
1330
|
await invoke('Editor.openCompletion');
|
|
1331
1331
|
};
|
|
1332
|
+
const closeCompletion = async () => {
|
|
1333
|
+
await invoke('Editor.closeCompletion');
|
|
1334
|
+
};
|
|
1332
1335
|
const openEditorContextMenu = async () => {
|
|
1333
1336
|
await invoke('Editor.handleContextMenu', 0, 0);
|
|
1334
1337
|
};
|
|
@@ -1462,7 +1465,10 @@ const closeColorPicker = async () => {
|
|
|
1462
1465
|
await invoke('Editor.closeColorPicker');
|
|
1463
1466
|
};
|
|
1464
1467
|
const openContextMenu$1 = async () => {
|
|
1465
|
-
|
|
1468
|
+
const button = 0;
|
|
1469
|
+
const x = 0;
|
|
1470
|
+
const y = 0;
|
|
1471
|
+
await invoke('Editor.contextMenu', button, x, y);
|
|
1466
1472
|
};
|
|
1467
1473
|
const getText = async () => {
|
|
1468
1474
|
return invoke('Editor.getText');
|
|
@@ -1487,6 +1493,7 @@ const TestFrameWorkComponentEditor = {
|
|
|
1487
1493
|
__proto__: null,
|
|
1488
1494
|
addAllMissingImports,
|
|
1489
1495
|
closeColorPicker,
|
|
1496
|
+
closeCompletion,
|
|
1490
1497
|
closeCompletionDetails,
|
|
1491
1498
|
copy,
|
|
1492
1499
|
copyLineDown,
|
|
@@ -1539,6 +1546,19 @@ const TestFrameWorkComponentEditor = {
|
|
|
1539
1546
|
type
|
|
1540
1547
|
};
|
|
1541
1548
|
|
|
1549
|
+
const selectIndex$1 = async index => {
|
|
1550
|
+
await invoke('EditorCompletion.selectIndex', index);
|
|
1551
|
+
};
|
|
1552
|
+
const selectCurrentIndex = async () => {
|
|
1553
|
+
await invoke('EditorCompletion.selectCurrentIndex');
|
|
1554
|
+
};
|
|
1555
|
+
|
|
1556
|
+
const TestFrameWorkComponentEditorCompletion = {
|
|
1557
|
+
__proto__: null,
|
|
1558
|
+
selectCurrentIndex,
|
|
1559
|
+
selectIndex: selectIndex$1
|
|
1560
|
+
};
|
|
1561
|
+
|
|
1542
1562
|
const openContextMenu = async index => {
|
|
1543
1563
|
await invoke('Explorer.handleContextMenuKeyboard', index);
|
|
1544
1564
|
};
|
|
@@ -1758,12 +1778,53 @@ const focusFirst$2 = () => {
|
|
|
1758
1778
|
const focusLast$1 = () => {
|
|
1759
1779
|
return invoke('KeyBindings.focusLast');
|
|
1760
1780
|
};
|
|
1781
|
+
const toggleRecordingKeys = () => {
|
|
1782
|
+
return invoke('KeyBindings.toggleRecordingKeys');
|
|
1783
|
+
};
|
|
1784
|
+
const startRecordingKeys = () => {
|
|
1785
|
+
return invoke('KeyBindings.startRecordingKeys');
|
|
1786
|
+
};
|
|
1787
|
+
const clearInput = () => {
|
|
1788
|
+
return invoke('KeyBindings.clearInput');
|
|
1789
|
+
};
|
|
1790
|
+
const sortByPrecedence = () => {
|
|
1791
|
+
return invoke('KeyBindings.sortByPrecedence');
|
|
1792
|
+
};
|
|
1793
|
+
const stopRecordingKeys = () => {
|
|
1794
|
+
return invoke('KeyBindings.stopRecordingKeys');
|
|
1795
|
+
};
|
|
1761
1796
|
const handleContextMenu = (button, x, y) => {
|
|
1762
1797
|
return invoke('KeyBindings.handleContextMenu', button, x, y);
|
|
1763
1798
|
};
|
|
1799
|
+
const copyCommandId = () => {
|
|
1800
|
+
return invoke('KeyBindings.copyCommandId');
|
|
1801
|
+
};
|
|
1802
|
+
const copyCommandTitle = () => {
|
|
1803
|
+
return invoke('KeyBindings.copyCommandTitle');
|
|
1804
|
+
};
|
|
1805
|
+
const addKeyBinding = () => {
|
|
1806
|
+
return invoke('KeyBindings.addKeyBinding');
|
|
1807
|
+
};
|
|
1808
|
+
const removeKeyBinding = () => {
|
|
1809
|
+
return invoke('KeyBindings.removeKeyBinding');
|
|
1810
|
+
};
|
|
1811
|
+
const changeWhenExpression = () => {
|
|
1812
|
+
return invoke('KeyBindings.changeWhenExpression');
|
|
1813
|
+
};
|
|
1814
|
+
const showSameKeyBindings = () => {
|
|
1815
|
+
return invoke('KeyBindings.showSameKeyBindings');
|
|
1816
|
+
};
|
|
1817
|
+
const resetKeyBinding = () => {
|
|
1818
|
+
return invoke('KeyBindings.resetKeyBinding');
|
|
1819
|
+
};
|
|
1764
1820
|
|
|
1765
1821
|
const TestFrameWorkComponentKeyBindingsEditor = {
|
|
1766
1822
|
__proto__: null,
|
|
1823
|
+
addKeyBinding,
|
|
1824
|
+
changeWhenExpression,
|
|
1825
|
+
clearInput,
|
|
1826
|
+
copyCommandId,
|
|
1827
|
+
copyCommandTitle,
|
|
1767
1828
|
focusFirst: focusFirst$2,
|
|
1768
1829
|
focusLast: focusLast$1,
|
|
1769
1830
|
focusNext: focusNext$3,
|
|
@@ -1773,7 +1834,14 @@ const TestFrameWorkComponentKeyBindingsEditor = {
|
|
|
1773
1834
|
handleDoubleClick,
|
|
1774
1835
|
handleInput: handleInput$1,
|
|
1775
1836
|
handleWheel: handleWheel$1,
|
|
1776
|
-
open: open$3
|
|
1837
|
+
open: open$3,
|
|
1838
|
+
removeKeyBinding,
|
|
1839
|
+
resetKeyBinding,
|
|
1840
|
+
showSameKeyBindings,
|
|
1841
|
+
sortByPrecedence,
|
|
1842
|
+
startRecordingKeys,
|
|
1843
|
+
stopRecordingKeys,
|
|
1844
|
+
toggleRecordingKeys
|
|
1777
1845
|
};
|
|
1778
1846
|
|
|
1779
1847
|
const getKeyOptions = rawKey => {
|
|
@@ -2242,6 +2310,7 @@ const TestFrameWorkComponent = {
|
|
|
2242
2310
|
Command: TestFrameWorkComponentCommand,
|
|
2243
2311
|
ContextMenu: TestFrameWorkComponentContextMenu,
|
|
2244
2312
|
Editor: TestFrameWorkComponentEditor,
|
|
2313
|
+
EditorCompletion: TestFrameWorkComponentEditorCompletion,
|
|
2245
2314
|
Explorer: TestFrameWorkComponentExplorer,
|
|
2246
2315
|
Extension: TestFrameWorkComponentExtension,
|
|
2247
2316
|
ExtensionDetail: TestFrameWorkComponentExtensionDetail,
|