@lvce-editor/test-worker 10.5.0 → 10.7.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
@@ -88,6 +88,10 @@ interface ClipBoard {
88
88
  readonly writeText: (text: string) => Promise<void>;
89
89
  }
90
90
 
91
+ interface ColorPicker {
92
+ readonly setRelativeX: (x: number) => Promise<void>;
93
+ }
94
+
91
95
  interface Command {
92
96
  readonly execute: (id: string, ...args: readonly any[]) => Promise<any>;
93
97
  }
@@ -134,6 +138,8 @@ interface Editor {
134
138
  readonly cursorWordRight: () => Promise<void>;
135
139
  readonly deleteAllLeft: () => Promise<void>;
136
140
  readonly deleteAllRight: () => Promise<void>;
141
+ readonly disableCompletionsOnType: () => Promise<void>;
142
+ readonly enableCompletionsOnType: () => Promise<void>;
137
143
  readonly executeTabCompletion: () => Promise<void>;
138
144
  readonly findAllImplementations: () => Promise<void>;
139
145
  readonly findAllReferences: () => Promise<void>;
@@ -545,6 +551,7 @@ export interface TestApi {
545
551
  readonly ActivityBar: ActivityBar
546
552
  readonly BaseUrl: BaseUrl
547
553
  readonly ClipBoard: ClipBoard
554
+ readonly ColorPicker: ColorPicker
548
555
  readonly Command: Command
549
556
  readonly ContextMenu: ContextMenu
550
557
  readonly Developer: Developer
@@ -1679,6 +1679,15 @@ const ClipBoard = {
1679
1679
  writeText
1680
1680
  };
1681
1681
 
1682
+ const setRelativeX = async x => {
1683
+ await invoke$1('ColorPicker.setRelativeX', x);
1684
+ };
1685
+
1686
+ const ColorPicker = {
1687
+ __proto__: null,
1688
+ setRelativeX
1689
+ };
1690
+
1682
1691
  const execute$1 = async (id, ...args) => {
1683
1692
  // @ts-ignore
1684
1693
  return invoke$1(id, ...args);
@@ -1830,6 +1839,30 @@ const getEditorKey = async () => {
1830
1839
 
1831
1840
  const Script = 2;
1832
1841
 
1842
+ const update$1 = settings => {
1843
+ // @ts-ignore
1844
+ return invoke$1('Preferences.update', settings);
1845
+ };
1846
+ const enableDiagnostics = () => {
1847
+ // @ts-ignore
1848
+ return invoke$1('Preferences.update', {
1849
+ 'editor.diagnostics': true
1850
+ });
1851
+ };
1852
+ const disableDiagnostics = () => {
1853
+ // @ts-ignore
1854
+ return invoke$1('Preferences.update', {
1855
+ 'editor.diagnostics': false
1856
+ });
1857
+ };
1858
+
1859
+ const Settings = {
1860
+ __proto__: null,
1861
+ disableDiagnostics,
1862
+ enableDiagnostics,
1863
+ update: update$1
1864
+ };
1865
+
1833
1866
  const setCursor = async (rowIndex, columnIndex) => {
1834
1867
  await invoke$1('Editor.cursorSet', rowIndex, columnIndex);
1835
1868
  };
@@ -2042,6 +2075,16 @@ const shouldHaveDiagnostics = async expectedDiagnostics => {
2042
2075
  throw new Error(`Expected editor to have diagnostics ${stringifiedExpected} but was ${stringifiedActual}`);
2043
2076
  }
2044
2077
  };
2078
+ const enableCompletionsOnType = async () => {
2079
+ await update$1({
2080
+ 'editor.completionsOnType': true
2081
+ });
2082
+ };
2083
+ const disableCompletionsOnType = async () => {
2084
+ await update$1({
2085
+ 'editor.completionsOnType': true
2086
+ });
2087
+ };
2045
2088
 
2046
2089
  const Editor = {
2047
2090
  __proto__: null,
@@ -2064,6 +2107,8 @@ const Editor = {
2064
2107
  cursorWordRight,
2065
2108
  deleteAllLeft,
2066
2109
  deleteAllRight,
2110
+ disableCompletionsOnType,
2111
+ enableCompletionsOnType,
2067
2112
  executeTabCompletion,
2068
2113
  findAllImplementations,
2069
2114
  findAllReferences,
@@ -3464,30 +3509,6 @@ const Search = {
3464
3509
  toggleUseRegularExpression
3465
3510
  };
3466
3511
 
3467
- const update$1 = settings => {
3468
- // @ts-ignore
3469
- return invoke$1('Preferences.update', settings);
3470
- };
3471
- const enableDiagnostics = () => {
3472
- // @ts-ignore
3473
- return invoke$1('Preferences.update', {
3474
- 'editor.diagnostics': true
3475
- });
3476
- };
3477
- const disableDiagnostics = () => {
3478
- // @ts-ignore
3479
- return invoke$1('Preferences.update', {
3480
- 'editor.diagnostics': false
3481
- });
3482
- };
3483
-
3484
- const Settings = {
3485
- __proto__: null,
3486
- disableDiagnostics,
3487
- enableDiagnostics,
3488
- update: update$1
3489
- };
3490
-
3491
3512
  const show$1 = async () => {
3492
3513
  return invoke$1('Main.openUri', 'settings://');
3493
3514
  };
@@ -3786,6 +3807,7 @@ const createApi = (platform, assetDir) => {
3786
3807
  }
3787
3808
  },
3788
3809
  ClipBoard,
3810
+ ColorPicker,
3789
3811
  Command,
3790
3812
  ContextMenu,
3791
3813
  Developer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "10.5.0",
3
+ "version": "10.7.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,7 @@
11
11
  "type": "module",
12
12
  "main": "dist/testWorkerMain.js",
13
13
  "dependencies": {
14
- "@lvce-editor/constants": "^1.34.0"
14
+ "@lvce-editor/constants": "^1.38.0"
15
15
  },
16
16
  "types": "dist/api.d.ts"
17
17
  }