@lvce-editor/test-worker 12.1.0 → 12.3.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
@@ -71,6 +71,11 @@ export interface FileItem {
71
71
  readonly uri: string;
72
72
  }
73
73
 
74
+ export interface Dirent {
75
+ readonly name: string;
76
+ readonly type: number;
77
+ }
78
+
74
79
  export interface SelectItem2Options {
75
80
  readonly callbackCommand: string;
76
81
  readonly label: string;
@@ -196,6 +201,12 @@ interface Editor {
196
201
  readonly rename: () => Promise<void>;
197
202
  readonly rename2: (newName: string) => Promise<void>;
198
203
  readonly selectAll: () => Promise<void>;
204
+ readonly selectAllLeft: () => Promise<void>;
205
+ readonly selectAllOccurrences: () => Promise<void>;
206
+ readonly selectAllRight: () => Promise<void>;
207
+ readonly selectDown: () => Promise<void>;
208
+ readonly selectUp: () => Promise<void>;
209
+ readonly selectionGrow: () => Promise<void>;
199
210
  readonly setCursor: (rowIndex: number, columnIndex: number) => Promise<void>;
200
211
  readonly setDeltaY: (deltaY: number) => Promise<void>;
201
212
  readonly setSelections: (selections: any) => Promise<void>;
@@ -209,6 +220,7 @@ interface Editor {
209
220
  readonly toggleCompletionDetails: () => Promise<void>;
210
221
  readonly toggleLineComment: () => Promise<void>;
211
222
  readonly type: (text: string) => Promise<void>;
223
+ readonly unIndent: () => Promise<void>;
212
224
  readonly undo: () => Promise<void>;
213
225
  }
214
226
 
@@ -332,7 +344,7 @@ interface FileSystem {
332
344
  readonly getTmpDir: ({ scheme }?: FileSystemTmpDirOptions) => Promise<string>;
333
345
  readonly loadFixture: (url: string) => Promise<string>;
334
346
  readonly mkdir: (uri: string) => Promise<void>;
335
- readonly readDir: (uri: string) => Promise<void>;
347
+ readonly readDir: (uri: string) => Promise<readonly Dirent[]>;
336
348
  readonly readFile: (uri: string) => Promise<string>;
337
349
  readonly remove: (uri: string) => Promise<void>;
338
350
  readonly setFiles: (files: readonly FileItem[]) => Promise<void>;
@@ -1930,6 +1930,24 @@ const copyLineDown = async () => {
1930
1930
  const cursorDown = async () => {
1931
1931
  await invoke('Editor.cursorDown');
1932
1932
  };
1933
+ const selectDown$1 = async () => {
1934
+ await invoke('Editor.selectDown');
1935
+ };
1936
+ const selectAllLeft = async () => {
1937
+ await invoke('Editor.selectAllLeft');
1938
+ };
1939
+ const selectionGrow = async () => {
1940
+ await invoke('Editor.selectionGrow');
1941
+ };
1942
+ const selectAllRight = async () => {
1943
+ await invoke('Editor.selectAllRight');
1944
+ };
1945
+ const selectAllOccurrences = async () => {
1946
+ await invoke('Editor.selectAllOccurrences');
1947
+ };
1948
+ const selectUp$1 = async () => {
1949
+ await invoke('Editor.selectUp');
1950
+ };
1933
1951
  const cursorUp = async () => {
1934
1952
  await invoke('Editor.cursorUp');
1935
1953
  };
@@ -1969,6 +1987,9 @@ const setDeltaY = async deltaY => {
1969
1987
  const format = async () => {
1970
1988
  await invoke('Editor.format');
1971
1989
  };
1990
+ const unIndent = async () => {
1991
+ await invoke('Editor.unIndent');
1992
+ };
1972
1993
  const insertLineBreak = async () => {
1973
1994
  await invoke('Editor.insertLineBreak');
1974
1995
  };
@@ -2170,6 +2191,12 @@ const Editor = {
2170
2191
  rename: rename$1,
2171
2192
  rename2,
2172
2193
  selectAll: selectAll$1,
2194
+ selectAllLeft,
2195
+ selectAllOccurrences,
2196
+ selectAllRight,
2197
+ selectDown: selectDown$1,
2198
+ selectUp: selectUp$1,
2199
+ selectionGrow,
2173
2200
  setCursor,
2174
2201
  setDeltaY,
2175
2202
  setSelections,
@@ -2183,6 +2210,7 @@ const Editor = {
2183
2210
  toggleCompletionDetails,
2184
2211
  toggleLineComment,
2185
2212
  type,
2213
+ unIndent,
2186
2214
  undo
2187
2215
  };
2188
2216
 
@@ -3860,10 +3888,28 @@ const Workspace = {
3860
3888
  setPath
3861
3889
  };
3862
3890
 
3891
+ const load = async url => {
3892
+ await invoke('Audio.load', url);
3893
+ };
3894
+ const play = async url => {
3895
+ await invoke('Audio.play', url);
3896
+ };
3897
+ const pause = async () => {
3898
+ await invoke('Audio.pause');
3899
+ };
3900
+
3901
+ const Audio = {
3902
+ __proto__: null,
3903
+ load,
3904
+ pause,
3905
+ play
3906
+ };
3907
+
3863
3908
  const createApi = (platform, assetDir) => {
3864
3909
  return {
3865
3910
  About,
3866
3911
  ActivityBar,
3912
+ Audio,
3867
3913
  BaseUrl: {
3868
3914
  getBaseUrl() {
3869
3915
  return assetDir;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "12.1.0",
3
+ "version": "12.3.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",