@lvce-editor/text-search-worker 3.40.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.
- package/dist/textSearchWorkerMain.js +39 -20
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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
|
|
@@ -2009,7 +1998,10 @@ const HandleInput = 'handleInput';
|
|
|
2009
1998
|
const HandleListBlur = 'handleListBlur';
|
|
2010
1999
|
const HandleReplaceInput = 'handleReplaceInput';
|
|
2011
2000
|
const HandleScrollBarPointerDown = 'handleScrollBarPointerDown';
|
|
2001
|
+
const HandleToggleButtonClick = 'handleToggleButtonClick';
|
|
2012
2002
|
const HandleWheel = 'handleWheel';
|
|
2003
|
+
const HandleListFocus = 'handleListFocus';
|
|
2004
|
+
const HandleContextMenu = 'handleContextMenu';
|
|
2013
2005
|
|
|
2014
2006
|
const FilesToExclude = 'FilesToExclude';
|
|
2015
2007
|
const FilesToInclude = 'FilesToInclude';
|
|
@@ -3795,6 +3787,32 @@ const renderEventListeners = () => {
|
|
|
3795
3787
|
}, {
|
|
3796
3788
|
name: HandleReplaceInput,
|
|
3797
3789
|
params: ['handleReplaceInput', 'event.target.value']
|
|
3790
|
+
}, {
|
|
3791
|
+
name: HandleInput,
|
|
3792
|
+
params: ['handleInput', 'event.target.value', User]
|
|
3793
|
+
}, {
|
|
3794
|
+
name: HandleClick,
|
|
3795
|
+
params: ['handleClickAt', 'event.clientX', 'event.clientY']
|
|
3796
|
+
}, {
|
|
3797
|
+
name: HandleToggleButtonClick,
|
|
3798
|
+
params: ['handleClickAt', 'event.clientX', 'event.clientY']
|
|
3799
|
+
}, {
|
|
3800
|
+
name: HandleListFocus,
|
|
3801
|
+
params: ['handleClickAt', 'event.clientX', 'event.clientY']
|
|
3802
|
+
}, {
|
|
3803
|
+
name: HandleListBlur,
|
|
3804
|
+
params: ['handleListBlur']
|
|
3805
|
+
}, {
|
|
3806
|
+
name: HandleContextMenu,
|
|
3807
|
+
params: ['handleContextMenu', 'event.button', 'event.clientX', 'event.clientY'],
|
|
3808
|
+
preventDefault: true
|
|
3809
|
+
}, {
|
|
3810
|
+
name: HandleWheel,
|
|
3811
|
+
params: ['handleContextMenu', 'event.deltaMode', 'event.deltaY'],
|
|
3812
|
+
passive: true
|
|
3813
|
+
}, {
|
|
3814
|
+
name: HandleHeaderClick2,
|
|
3815
|
+
params: ['handleHeaderClick', 'event.target.name']
|
|
3798
3816
|
}];
|
|
3799
3817
|
};
|
|
3800
3818
|
|
|
@@ -4397,6 +4415,7 @@ const commandMap = {
|
|
|
4397
4415
|
'TextSearch.focusPreviousInput': wrapCommand(focusPreviousInput),
|
|
4398
4416
|
'TextSearch.focusPreviousPage': wrapCommand(focusPreviousPage),
|
|
4399
4417
|
'TextSearch.focusRegex': wrapCommand(focusRegex),
|
|
4418
|
+
'TextSearch.getCommandIds': getCommandIds,
|
|
4400
4419
|
'TextSearch.focusRegexNext': wrapCommand(focusRegexNext),
|
|
4401
4420
|
'TextSearch.focusReplaceAll': wrapCommand(focusReplaceAll),
|
|
4402
4421
|
'TextSearch.focusReplaceValue': wrapCommand(focusReplaceValue$1),
|