@lvce-editor/text-search-worker 3.41.0 → 3.42.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.
@@ -473,7 +473,6 @@ const getFirstEvent = (eventEmitter, eventMap) => {
473
473
  }
474
474
  return promise;
475
475
  };
476
- const Message$1 = 3;
477
476
  const create$5$1 = async ({
478
477
  messagePort,
479
478
  isMessagePortOpen
@@ -481,24 +480,9 @@ const create$5$1 = async ({
481
480
  if (!isMessagePort(messagePort)) {
482
481
  throw new IpcError('port must be of type MessagePort');
483
482
  }
484
- if (isMessagePortOpen) {
483
+ {
485
484
  return messagePort;
486
485
  }
487
- const eventPromise = getFirstEvent(messagePort, {
488
- message: Message$1
489
- });
490
- messagePort.start();
491
- const {
492
- type,
493
- event
494
- } = await eventPromise;
495
- if (type !== Message$1) {
496
- throw new IpcError('Failed to wait for ipc message');
497
- }
498
- if (event.data !== readyMessage) {
499
- throw new IpcError('unexpected first message');
500
- }
501
- return messagePort;
502
486
  };
503
487
  const signal$1 = messagePort => {
504
488
  messagePort.start();
@@ -936,12 +920,12 @@ const invokeAndTransfer$1 = (ipc, method, ...params) => {
936
920
  return invokeHelper(ipc, method, params, true);
937
921
  };
938
922
 
939
- const commands = Object.create(null);
923
+ const commands$1 = Object.create(null);
940
924
  const register = commandMap => {
941
- Object.assign(commands, commandMap);
925
+ Object.assign(commands$1, commandMap);
942
926
  };
943
927
  const getCommand = key => {
944
- return commands[key];
928
+ return commands$1[key];
945
929
  };
946
930
  const execute = (command, ...args) => {
947
931
  const fn = getCommand(command);
@@ -1778,6 +1762,11 @@ const getActionsVirtualDom = actions => {
1778
1762
  }, ...actions.flatMap(getActionVirtualDom)];
1779
1763
  };
1780
1764
 
1765
+ const commands = ['clearSearchResults', 'copy', 'dismissItem', 'focusFirst', 'focusIndex', 'focusLast', 'focusMatchCase', 'focusMatchCasePrevious', 'focusMatchWholeWord', 'focusNext', 'focusNextInput', 'focusNextPage', 'focusPreserveCasePrevious', 'focusPrevious', 'focusPreviousInput', 'focusPreviousPage', 'focusRegex', 'focusRegexNext', 'focusReplaceAll', 'focusReplaceValue', 'focusReplaceValueNext', 'focusReplaceValuePrevious', 'focusSearchValue', 'focusSearchValueNext', 'handleClick', 'handleClickAt', 'handleContextMenu', 'handleContextMenuKeyboard', 'handleContextMenuMouseAt', 'handleExcludeInput', 'handleFocusIn', 'handleHeaderClick', 'handleIconThemeChange', 'handleIconThemeChange', 'handleIncludeInput', 'handleInput', 'handleListBlur', 'handleListFocus', 'handleReplaceInput', 'handleScrollBarCaptureLost', 'handleScrollBarClick', 'handleScrollBarMove', 'handleScrollBarThumbPointerMove', 'handleTouchEnd', 'handleTouchMove', 'handleTouchStart', 'handleUpdate', 'handleWheel', 'refresh', 'replaceAll', 'scrollDown', 'selectIndex', 'submit', 'toggleMatchCase', 'toggleMatchWholeWord', 'togglePreserveCase', 'toggleReplace', 'toggleSearchDetails', 'toggleUseRegularExpression'];
1766
+ const getCommandIds = () => {
1767
+ return commands;
1768
+ };
1769
+
1781
1770
  const getFlags = uid => {
1782
1771
  const {
1783
1772
  newState
@@ -4426,6 +4415,7 @@ const commandMap = {
4426
4415
  'TextSearch.focusPreviousInput': wrapCommand(focusPreviousInput),
4427
4416
  'TextSearch.focusPreviousPage': wrapCommand(focusPreviousPage),
4428
4417
  'TextSearch.focusRegex': wrapCommand(focusRegex),
4418
+ 'TextSearch.getCommandIds': getCommandIds,
4429
4419
  'TextSearch.focusRegexNext': wrapCommand(focusRegexNext),
4430
4420
  'TextSearch.focusReplaceAll': wrapCommand(focusReplaceAll),
4431
4421
  'TextSearch.focusReplaceValue': wrapCommand(focusReplaceValue$1),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/text-search-worker",
3
- "version": "3.41.0",
3
+ "version": "3.42.0",
4
4
  "description": "Text Search Worker",
5
5
  "keywords": [
6
6
  "text-search"