@lvce-editor/test-worker 4.18.0 → 4.19.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
@@ -82,6 +82,8 @@ declare const selectIndex: (index: number) => Promise<void>;
82
82
  declare const selectCurrentIndex: () => Promise<void>;
83
83
  declare const openContextMenu$1: (index: number) => Promise<void>;
84
84
  declare const handleDragLeave: () => Promise<void>;
85
+ declare const handleBlur: () => Promise<void>;
86
+ declare const handleInputBlur: () => Promise<void>;
85
87
  declare const focus$1: () => Promise<void>;
86
88
  declare const focusNext$2: () => Promise<void>;
87
89
  declare const selectUp: () => Promise<void>;
@@ -261,7 +263,7 @@ declare namespace EditorCompletion {
261
263
  export { selectCurrentIndex, selectIndex };
262
264
  }
263
265
  declare namespace Explorer {
264
- 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, handleClickAt, handleDragLeave, handleDragOver, handleDrop, newFile, newFolder, openContextMenu$1 as openContextMenu, refresh, removeDirent, rename$1 as rename, renameDirent, selectAll$1 as selectAll, selectDown, selectIndices, selectUp, updateEditingValue };
266
+ export { acceptEdit, cancelEdit, clickCurrent, expandAll, expandRecursively, focus$1 as focus, focusFirst$1 as focusFirst, focusIndex, focusLast$1 as focusLast, focusNext$2 as focusNext, handleArrowLeft, handleBlur, handleClick$1 as handleClick, handleClickAt, handleDragLeave, handleDragOver, handleDrop, handleInputBlur, newFile, newFolder, openContextMenu$1 as openContextMenu, refresh, removeDirent, rename$1 as rename, renameDirent, selectAll$1 as selectAll, selectDown, selectIndices, selectUp, updateEditingValue };
265
267
  }
266
268
  declare namespace Extension {
267
269
  export { addNodeExtension, addWebExtension };
@@ -344,22 +344,11 @@ class IpcChildWithModuleWorker extends Ipc {
344
344
  const wrap$f = global => {
345
345
  return new IpcChildWithModuleWorker(global);
346
346
  };
347
- const withResolvers = () => {
348
- let _resolve;
349
- const promise = new Promise(resolve => {
350
- _resolve = resolve;
351
- });
352
- return {
353
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
354
- resolve: _resolve,
355
- promise
356
- };
357
- };
358
347
  const waitForFirstMessage = async port => {
359
348
  const {
360
349
  resolve,
361
350
  promise
362
- } = withResolvers();
351
+ } = Promise.withResolvers();
363
352
  port.addEventListener('message', resolve, {
364
353
  once: true
365
354
  });
@@ -438,7 +427,7 @@ const getFirstEvent = (eventEmitter, eventMap) => {
438
427
  const {
439
428
  resolve,
440
429
  promise
441
- } = withResolvers();
430
+ } = Promise.withResolvers();
442
431
  const listenerMap = Object.create(null);
443
432
  const cleanup = value => {
444
433
  for (const event of Object.keys(eventMap)) {
@@ -524,7 +513,7 @@ const create$4 = (method, params) => {
524
513
  };
525
514
  };
526
515
  const callbacks = Object.create(null);
527
- const set$4 = (id, fn) => {
516
+ const set$3 = (id, fn) => {
528
517
  callbacks[id] = fn;
529
518
  };
530
519
  const get$2 = id => {
@@ -543,7 +532,7 @@ const registerPromise = () => {
543
532
  resolve,
544
533
  promise
545
534
  } = Promise.withResolvers();
546
- set$4(id, resolve);
535
+ set$3(id, resolve);
547
536
  return {
548
537
  id,
549
538
  promise
@@ -928,7 +917,7 @@ const listen$1 = async (module, options) => {
928
917
  const ipc = module.wrap(rawIpc);
929
918
  return ipc;
930
919
  };
931
- const create$8 = async ({
920
+ const create$9 = async ({
932
921
  commandMap,
933
922
  messagePort,
934
923
  isMessagePortOpen
@@ -946,7 +935,7 @@ const create$8 = async ({
946
935
  };
947
936
  const MessagePortRpcParent = {
948
937
  __proto__: null,
949
- create: create$8
938
+ create: create$9
950
939
  };
951
940
  const create$1 = async ({
952
941
  commandMap
@@ -968,7 +957,7 @@ const formatDuration = duration => {
968
957
  };
969
958
 
970
959
  const rpcs = Object.create(null);
971
- const set$3 = (id, rpc) => {
960
+ const set$5 = (id, rpc) => {
972
961
  rpcs[id] = rpc;
973
962
  };
974
963
  const get$1 = id => {
@@ -986,7 +975,7 @@ const invokeAndTransfer$2 = (method, ...params) => {
986
975
  return rpc.invokeAndTransfer(method, ...params);
987
976
  };
988
977
  const set$2 = rpc => {
989
- set$3(RendererWorker$1, rpc);
978
+ set$5(RendererWorker$1, rpc);
990
979
  };
991
980
  const RendererWorker = {
992
981
  __proto__: null,
@@ -1908,6 +1897,12 @@ const openContextMenu = async index => {
1908
1897
  const handleDragLeave = async () => {
1909
1898
  await invoke('Explorer.handleDragLeave');
1910
1899
  };
1900
+ const handleBlur = async () => {
1901
+ await invoke('Explorer.handleBlur');
1902
+ };
1903
+ const handleInputBlur = async () => {
1904
+ await invoke('Explorer.handleInputBlur');
1905
+ };
1911
1906
  const focus$1 = async () => {
1912
1907
  await invoke('Explorer.focusIndex', -1);
1913
1908
  };
@@ -2000,11 +1995,13 @@ const TestFrameWorkComponentExplorer = {
2000
1995
  focusLast: focusLast$5,
2001
1996
  focusNext: focusNext$7,
2002
1997
  handleArrowLeft,
1998
+ handleBlur,
2003
1999
  handleClick: handleClick$1,
2004
2000
  handleClickAt: handleClickAt$1,
2005
2001
  handleDragLeave,
2006
2002
  handleDragOver,
2007
2003
  handleDrop,
2004
+ handleInputBlur,
2008
2005
  newFile,
2009
2006
  newFolder,
2010
2007
  openContextMenu,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "4.18.0",
3
+ "version": "4.19.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",