@lvce-editor/test-worker 4.3.0 → 4.5.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 CHANGED
@@ -17,6 +17,14 @@ declare const selectCurrent: () => Promise<void>;
17
17
  declare const getBaseUrl: () => string;
18
18
  declare const execute: (id: string, ...args: readonly any[]) => Promise<any>;
19
19
  declare const selectItem: (text: string) => Promise<void>;
20
+ declare const openIframeInspector: () => Promise<void>;
21
+ declare const openCacheFolder: () => Promise<void>;
22
+ declare const openConfigFolder: () => Promise<void>;
23
+ declare const openLogsFolder: () => Promise<void>;
24
+ declare const openProcessExplorer: () => Promise<void>;
25
+ declare const reloadColorTheme: () => Promise<void>;
26
+ declare const reloadIconTheme: () => Promise<void>;
27
+ declare const toggleDeveloperTools: () => Promise<void>;
20
28
  declare const setCursor: (rowIndex: number, columnIndex: number) => Promise<void>;
21
29
  declare const openCompletion: () => Promise<void>;
22
30
  declare const closeCompletion: () => Promise<void>;
@@ -131,6 +139,15 @@ declare const press: (key: string) => Promise<void>;
131
139
  declare const openUri: (uri: string) => Promise<void>;
132
140
  declare const splitRight: () => Promise<void>;
133
141
  declare const openKeyBindings: () => Promise<void>;
142
+ declare const closeAllEditors: () => Promise<void>;
143
+ declare const closeTabsLeft: () => Promise<void>;
144
+ declare const closeTabsRight: () => Promise<void>;
145
+ declare const closeOthers: () => Promise<void>;
146
+ declare const closeActiveEditor: () => Promise<void>;
147
+ declare const focusFirst$3: () => Promise<void>;
148
+ declare const focusNext$5: () => Promise<void>;
149
+ declare const focusPrevious$3: () => Promise<void>;
150
+ declare const focusLast$3: () => Promise<void>;
134
151
  declare const open$2: (id: string) => Promise<void>;
135
152
  declare const getNodePath: () => Promise<string>;
136
153
  declare const isFirefox: () => boolean;
@@ -138,9 +155,9 @@ declare const show$1: () => Promise<void>;
138
155
  declare const open$3: () => Promise<void>;
139
156
  declare const handleInput$1: (value: string) => Promise<void>;
140
157
  declare const setValue$1: (value: string) => Promise<void>;
141
- declare const focusNext$5: () => Promise<void>;
158
+ declare const focusNext$6: () => Promise<void>;
142
159
  declare const focusIndex$1: (index: number) => Promise<void>;
143
- declare const focusPrevious$3: () => Promise<void>;
160
+ declare const focusPrevious$4: () => Promise<void>;
144
161
  declare const selectItem$1: (label: string) => Promise<void>;
145
162
  declare const selectIndex$1: (index: number) => Promise<void>;
146
163
  declare const executeCommand: (label: string) => Promise<void>;
@@ -153,14 +170,14 @@ declare const clearSearchResults: () => Promise<void>;
153
170
  declare const openDetails: () => Promise<void>;
154
171
  declare const collapseDetails: () => Promise<void>;
155
172
  declare const dismissItem: () => Promise<void>;
156
- declare const focusFirst$3: () => Promise<void>;
173
+ declare const focusFirst$4: () => Promise<void>;
157
174
  declare const focusIndex$2: (index: number) => Promise<void>;
158
175
  declare const selectIndex$2: (index: number) => Promise<void>;
159
- declare const focusNext$6: () => Promise<void>;
176
+ declare const focusNext$7: () => Promise<void>;
160
177
  declare const handleWheel$1: (deltaMode: number, deltaY: number) => Promise<void>;
161
178
  declare const focusNextPage: () => Promise<void>;
162
179
  declare const focusPreviousPage: () => Promise<void>;
163
- declare const focusPrevious$4: () => Promise<void>;
180
+ declare const focusPrevious$5: () => Promise<void>;
164
181
  declare const toggleSearchDetails: () => Promise<void>;
165
182
  declare const toggleMatchCase: () => Promise<void>;
166
183
  declare const toggleMatchWholeWord: () => Promise<void>;
@@ -175,11 +192,11 @@ declare const handleInput$2: (text: string) => Promise<void>;
175
192
  declare const update$1: () => Promise<void>;
176
193
  declare const closeMenu: () => Promise<void>;
177
194
  declare const focus$2: () => Promise<void>;
178
- declare const focusFirst$4: () => Promise<void>;
195
+ declare const focusFirst$5: () => Promise<void>;
179
196
  declare const focusIndex$3: (index: number) => Promise<void>;
180
- declare const focusLast$3: () => Promise<void>;
181
- declare const focusNext$7: () => Promise<void>;
182
- declare const focusPrevious$5: () => Promise<void>;
197
+ declare const focusLast$4: () => Promise<void>;
198
+ declare const focusNext$8: () => Promise<void>;
199
+ declare const focusPrevious$6: () => Promise<void>;
183
200
  declare const handleKeyArrowDown: () => Promise<void>;
184
201
  declare const handleKeyArrowLeft: () => Promise<void>;
185
202
  declare const handleKeyArrowRight: () => Promise<void>;
@@ -211,6 +228,9 @@ declare namespace Command {
211
228
  declare namespace ContextMenu {
212
229
  export { selectItem };
213
230
  }
231
+ declare namespace Developer {
232
+ export { openCacheFolder, openConfigFolder, openIframeInspector, openLogsFolder, openProcessExplorer, reloadColorTheme, reloadIconTheme, toggleDeveloperTools };
233
+ }
214
234
  declare namespace Editor {
215
235
  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 };
216
236
  }
@@ -242,7 +262,7 @@ declare namespace KeyBoard {
242
262
  export { press };
243
263
  }
244
264
  declare namespace Main {
245
- export { openKeyBindings, openUri, splitRight };
265
+ export { closeActiveEditor, closeAllEditors, closeOthers, closeTabsLeft, closeTabsRight, focusFirst$3 as focusFirst, focusLast$3 as focusLast, focusNext$5 as focusNext, focusPrevious$3 as focusPrevious, openKeyBindings, openUri, splitRight };
246
266
  }
247
267
  declare namespace Panel {
248
268
  export { open$2 as open };
@@ -254,10 +274,10 @@ declare namespace Problems {
254
274
  export { show$1 as show };
255
275
  }
256
276
  declare namespace QuickPick {
257
- export { executeCommand, focusIndex$1 as focusIndex, focusNext$5 as focusNext, focusPrevious$3 as focusPrevious, handleInput$1 as handleInput, open$3 as open, selectIndex$1 as selectIndex, selectItem$1 as selectItem, setValue$1 as setValue };
277
+ export { executeCommand, focusIndex$1 as focusIndex, focusNext$6 as focusNext, focusPrevious$4 as focusPrevious, handleInput$1 as handleInput, open$3 as open, selectIndex$1 as selectIndex, selectItem$1 as selectItem, setValue$1 as setValue };
258
278
  }
259
279
  declare namespace Search {
260
- export { clearSearchResults, collapseDetails, dismissItem, focusFirst$3 as focusFirst, focusIndex$2 as focusIndex, focusNext$6 as focusNext, focusNextPage, focusPrevious$4 as focusPrevious, focusPreviousPage, handleWheel$1 as handleWheel, openDetails, replaceAll, selectIndex$2 as selectIndex, setExcludeValue, setIncludeValue, setReplaceValue, setValue$2 as setValue, toggleMatchCase, toggleMatchWholeWord, togglePreserveCase, toggleReplace, toggleSearchDetails, toggleUseRegularExpression };
280
+ export { clearSearchResults, collapseDetails, dismissItem, focusFirst$4 as focusFirst, focusIndex$2 as focusIndex, focusNext$7 as focusNext, focusNextPage, focusPrevious$5 as focusPrevious, focusPreviousPage, handleWheel$1 as handleWheel, openDetails, replaceAll, selectIndex$2 as selectIndex, setExcludeValue, setIncludeValue, setReplaceValue, setValue$2 as setValue, toggleMatchCase, toggleMatchWholeWord, togglePreserveCase, toggleReplace, toggleSearchDetails, toggleUseRegularExpression };
261
281
  }
262
282
  declare namespace Settings {
263
283
  export { update };
@@ -272,7 +292,7 @@ declare namespace StatusBar {
272
292
  export { update$1 as update };
273
293
  }
274
294
  declare namespace TitleBarMenuBar {
275
- export { closeMenu, focus$2 as focus, focusFirst$4 as focusFirst, focusIndex$3 as focusIndex, focusLast$3 as focusLast, focusNext$7 as focusNext, focusPrevious$5 as focusPrevious, handleKeyArrowDown, handleKeyArrowLeft, handleKeyArrowRight, handleKeyArrowUp, handleKeyEnd, handleKeyEscape, handleKeyHome, handleKeySpace, toggleIndex, toggleMenu };
295
+ export { closeMenu, focus$2 as focus, focusFirst$5 as focusFirst, focusIndex$3 as focusIndex, focusLast$4 as focusLast, focusNext$8 as focusNext, focusPrevious$6 as focusPrevious, handleKeyArrowDown, handleKeyArrowLeft, handleKeyArrowRight, handleKeyArrowUp, handleKeyEnd, handleKeyEscape, handleKeyHome, handleKeySpace, toggleIndex, toggleMenu };
276
296
  }
277
297
  declare namespace WebView {
278
298
  export { fromId };
@@ -284,6 +304,7 @@ export interface TestApi {
284
304
  readonly BaseUrl: typeof BaseUrl,
285
305
  readonly Command: typeof Command,
286
306
  readonly ContextMenu: typeof ContextMenu,
307
+ readonly Developer: typeof Developer,
287
308
  readonly Editor: typeof Editor,
288
309
  readonly EditorCompletion: typeof EditorCompletion,
289
310
  readonly Explorer: typeof Explorer,
@@ -1334,17 +1334,17 @@ const handleClickClose = async () => {
1334
1334
  const handleClickCopy = async () => {
1335
1335
  return invoke('About.handleClickCopy');
1336
1336
  };
1337
- const focusNext$7 = async () => {
1337
+ const focusNext$8 = async () => {
1338
1338
  return invoke('About.focusNext');
1339
1339
  };
1340
- const focusPrevious$5 = async () => {
1340
+ const focusPrevious$6 = async () => {
1341
1341
  return invoke('About.focusPrevious');
1342
1342
  };
1343
1343
 
1344
1344
  const TestFrameWorkComponentAbout = {
1345
1345
  __proto__: null,
1346
- focusNext: focusNext$7,
1347
- focusPrevious: focusPrevious$5,
1346
+ focusNext: focusNext$8,
1347
+ focusPrevious: focusPrevious$6,
1348
1348
  handleClickClose,
1349
1349
  handleClickCopy,
1350
1350
  handleClickOk,
@@ -1354,16 +1354,16 @@ const TestFrameWorkComponentAbout = {
1354
1354
  const focus$2 = async () => {
1355
1355
  await invoke('ActivityBar.focus');
1356
1356
  };
1357
- const focusFirst$4 = async () => {
1357
+ const focusFirst$5 = async () => {
1358
1358
  await invoke('ActivityBar.focusFirst');
1359
1359
  };
1360
- const focusLast$3 = async () => {
1360
+ const focusLast$4 = async () => {
1361
1361
  await invoke('ActivityBar.focusLast');
1362
1362
  };
1363
- const focusNext$6 = async () => {
1363
+ const focusNext$7 = async () => {
1364
1364
  await invoke('ActivityBar.focusNext');
1365
1365
  };
1366
- const focusPrevious$4 = async () => {
1366
+ const focusPrevious$5 = async () => {
1367
1367
  await invoke('ActivityBar.focusPrevious');
1368
1368
  };
1369
1369
  const handleClick$2 = async index => {
@@ -1379,10 +1379,10 @@ const selectCurrent = async () => {
1379
1379
  const TestFrameworkComponentActivityBar = {
1380
1380
  __proto__: null,
1381
1381
  focus: focus$2,
1382
- focusFirst: focusFirst$4,
1383
- focusLast: focusLast$3,
1384
- focusNext: focusNext$6,
1385
- focusPrevious: focusPrevious$4,
1382
+ focusFirst: focusFirst$5,
1383
+ focusLast: focusLast$4,
1384
+ focusNext: focusNext$7,
1385
+ focusPrevious: focusPrevious$5,
1386
1386
  handleClick: handleClick$2,
1387
1387
  handleContextMenu: handleContextMenu$1,
1388
1388
  selectCurrent
@@ -1450,6 +1450,43 @@ const TestFrameWorkComponentContextMenu = {
1450
1450
  selectItem: selectItem$1
1451
1451
  };
1452
1452
 
1453
+ const openIframeInspector = async () => {
1454
+ return invoke('Developer.openIframeInspector');
1455
+ };
1456
+ const openCacheFolder = async () => {
1457
+ return invoke('Developer.openCacheFolder');
1458
+ };
1459
+ const openConfigFolder = async () => {
1460
+ return invoke('Developer.openConfigFolder');
1461
+ };
1462
+ const openLogsFolder = async () => {
1463
+ return invoke('Developer.openLogsFolder');
1464
+ };
1465
+ const openProcessExplorer = async () => {
1466
+ return invoke('Developer.openProcessExplorer');
1467
+ };
1468
+ const reloadColorTheme = async () => {
1469
+ return invoke('Developer.reloadColorTheme');
1470
+ };
1471
+ const reloadIconTheme = async () => {
1472
+ return invoke('Developer.reloadIconTheme');
1473
+ };
1474
+ const toggleDeveloperTools = async () => {
1475
+ return invoke('Developer.toggleDeveloperTools');
1476
+ };
1477
+
1478
+ const TestFrameWorkComponentDeveloper = {
1479
+ __proto__: null,
1480
+ openCacheFolder,
1481
+ openConfigFolder,
1482
+ openIframeInspector,
1483
+ openLogsFolder,
1484
+ openProcessExplorer,
1485
+ reloadColorTheme,
1486
+ reloadIconTheme,
1487
+ toggleDeveloperTools
1488
+ };
1489
+
1453
1490
  const setCursor = async (rowIndex, columnIndex) => {
1454
1491
  await invoke('Editor.cursorSet', rowIndex, columnIndex);
1455
1492
  };
@@ -1692,7 +1729,7 @@ const openContextMenu = async index => {
1692
1729
  const focus$1 = async () => {
1693
1730
  await invoke('Explorer.focusIndex', -1);
1694
1731
  };
1695
- const focusNext$5 = async () => {
1732
+ const focusNext$6 = async () => {
1696
1733
  await invoke('Explorer.focusNext');
1697
1734
  };
1698
1735
  const focusIndex$3 = async index => {
@@ -1704,10 +1741,10 @@ const clickCurrent = async () => {
1704
1741
  const handleArrowLeft = async () => {
1705
1742
  await invoke('Explorer.handleArrowLeft');
1706
1743
  };
1707
- const focusLast$2 = async () => {
1744
+ const focusLast$3 = async () => {
1708
1745
  await invoke('Explorer.focusLast');
1709
1746
  };
1710
- const focusFirst$3 = async () => {
1747
+ const focusFirst$4 = async () => {
1711
1748
  await invoke('Explorer.focusFirst');
1712
1749
  };
1713
1750
  const removeDirent = async () => {
@@ -1746,10 +1783,10 @@ const TestFrameWorkComponentExplorer = {
1746
1783
  expandAll,
1747
1784
  expandRecursively,
1748
1785
  focus: focus$1,
1749
- focusFirst: focusFirst$3,
1786
+ focusFirst: focusFirst$4,
1750
1787
  focusIndex: focusIndex$3,
1751
- focusLast: focusLast$2,
1752
- focusNext: focusNext$5,
1788
+ focusLast: focusLast$3,
1789
+ focusNext: focusNext$6,
1753
1790
  handleArrowLeft,
1754
1791
  handleClick: handleClick$1,
1755
1792
  newFile,
@@ -1856,7 +1893,7 @@ const TestFrameWorkComponentFileSystem = {
1856
1893
  writeFile
1857
1894
  };
1858
1895
 
1859
- const focusNext$4 = async () => {
1896
+ const focusNext$5 = async () => {
1860
1897
  await invoke('FindWidget.focusNext');
1861
1898
  };
1862
1899
  const setValue$2 = async value => {
@@ -1865,7 +1902,7 @@ const setValue$2 = async value => {
1865
1902
 
1866
1903
  const TestFrameWorkComponentFindWidget = {
1867
1904
  __proto__: null,
1868
- focusNext: focusNext$4,
1905
+ focusNext: focusNext$5,
1869
1906
  setValue: setValue$2
1870
1907
  };
1871
1908
 
@@ -1893,16 +1930,16 @@ const handleWheel$1 = (deltaMode, deltaY) => {
1893
1930
  const handleDoubleClick = (x, y) => {
1894
1931
  return invoke('KeyBindings.handleDoubleClick', x, y);
1895
1932
  };
1896
- const focusNext$3 = () => {
1933
+ const focusNext$4 = () => {
1897
1934
  return invoke('KeyBindings.focusNext');
1898
1935
  };
1899
- const focusPrevious$3 = () => {
1936
+ const focusPrevious$4 = () => {
1900
1937
  return invoke('KeyBindings.focusPrevious');
1901
1938
  };
1902
- const focusFirst$2 = () => {
1939
+ const focusFirst$3 = () => {
1903
1940
  return invoke('KeyBindings.focusFirst');
1904
1941
  };
1905
- const focusLast$1 = () => {
1942
+ const focusLast$2 = () => {
1906
1943
  return invoke('KeyBindings.focusLast');
1907
1944
  };
1908
1945
  const toggleRecordingKeys = () => {
@@ -1952,10 +1989,10 @@ const TestFrameWorkComponentKeyBindingsEditor = {
1952
1989
  clearInput,
1953
1990
  copyCommandId,
1954
1991
  copyCommandTitle,
1955
- focusFirst: focusFirst$2,
1956
- focusLast: focusLast$1,
1957
- focusNext: focusNext$3,
1958
- focusPrevious: focusPrevious$3,
1992
+ focusFirst: focusFirst$3,
1993
+ focusLast: focusLast$2,
1994
+ focusNext: focusNext$4,
1995
+ focusPrevious: focusPrevious$4,
1959
1996
  handleClick,
1960
1997
  handleContextMenu,
1961
1998
  handleDoubleClick,
@@ -1971,6 +2008,10 @@ const TestFrameWorkComponentKeyBindingsEditor = {
1971
2008
  toggleRecordingKeys
1972
2009
  };
1973
2010
 
2011
+ const Control = 'Control';
2012
+ const Space = 'Space';
2013
+ const Alt = 'Alt';
2014
+
1974
2015
  const getKeyOptions = rawKey => {
1975
2016
  if (rawKey.includes('+')) {
1976
2017
  const parts = rawKey.split('+');
@@ -1979,13 +2020,13 @@ const getKeyOptions = rawKey => {
1979
2020
  let key = '';
1980
2021
  for (const part of parts) {
1981
2022
  switch (part) {
1982
- case 'Control':
2023
+ case Control:
1983
2024
  ctrlKey = true;
1984
2025
  break;
1985
- case 'Space':
2026
+ case Space:
1986
2027
  key = ' ';
1987
2028
  break;
1988
- case 'Alt':
2029
+ case Alt:
1989
2030
  altKey = true;
1990
2031
  break;
1991
2032
  default:
@@ -2030,9 +2071,45 @@ const splitRight = async () => {
2030
2071
  const openKeyBindings = async () => {
2031
2072
  await invoke('Main.openKeyBindings');
2032
2073
  };
2074
+ const closeAllEditors = async () => {
2075
+ await invoke('Main.closeAllEditors');
2076
+ };
2077
+ const closeTabsLeft = async () => {
2078
+ await invoke('Main.closeTabsLeft');
2079
+ };
2080
+ const closeTabsRight = async () => {
2081
+ await invoke('Main.closeTabsRight');
2082
+ };
2083
+ const closeOthers = async () => {
2084
+ await invoke('Main.closeOthers');
2085
+ };
2086
+ const closeActiveEditor = async () => {
2087
+ await invoke('Main.closeActiveEditor');
2088
+ };
2089
+ const focusFirst$2 = async () => {
2090
+ await invoke('Main.focusFirst');
2091
+ };
2092
+ const focusNext$3 = async () => {
2093
+ await invoke('Main.focusNext');
2094
+ };
2095
+ const focusPrevious$3 = async () => {
2096
+ await invoke('Main.focusPrevious');
2097
+ };
2098
+ const focusLast$1 = async () => {
2099
+ await invoke('Main.focusLast');
2100
+ };
2033
2101
 
2034
2102
  const TestFrameWorkComponentMain = {
2035
2103
  __proto__: null,
2104
+ closeActiveEditor,
2105
+ closeAllEditors,
2106
+ closeOthers,
2107
+ closeTabsLeft,
2108
+ closeTabsRight,
2109
+ focusFirst: focusFirst$2,
2110
+ focusLast: focusLast$1,
2111
+ focusNext: focusNext$3,
2112
+ focusPrevious: focusPrevious$3,
2036
2113
  openKeyBindings,
2037
2114
  openUri,
2038
2115
  splitRight
@@ -2441,6 +2518,7 @@ const TestFrameWorkComponent = {
2441
2518
  BaseUrl: TestFrameWorkComponentBaseUrl,
2442
2519
  Command: TestFrameWorkComponentCommand,
2443
2520
  ContextMenu: TestFrameWorkComponentContextMenu,
2521
+ Developer: TestFrameWorkComponentDeveloper,
2444
2522
  Editor: TestFrameWorkComponentEditor,
2445
2523
  EditorCompletion: TestFrameWorkComponentEditorCompletion,
2446
2524
  Explorer: TestFrameWorkComponentExplorer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "4.3.0",
3
+ "version": "4.5.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",