@lvce-editor/text-search-worker 3.46.0 → 3.47.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 +11 -9
- package/package.json +1 -1
|
@@ -936,12 +936,12 @@ const invokeAndTransfer$1 = (ipc, method, ...params) => {
|
|
|
936
936
|
return invokeHelper(ipc, method, params, true);
|
|
937
937
|
};
|
|
938
938
|
|
|
939
|
-
const commands
|
|
939
|
+
const commands = Object.create(null);
|
|
940
940
|
const register = commandMap => {
|
|
941
|
-
Object.assign(commands
|
|
941
|
+
Object.assign(commands, commandMap);
|
|
942
942
|
};
|
|
943
943
|
const getCommand = key => {
|
|
944
|
-
return commands
|
|
944
|
+
return commands[key];
|
|
945
945
|
};
|
|
946
946
|
const execute = (command, ...args) => {
|
|
947
947
|
const fn = getCommand(command);
|
|
@@ -1779,9 +1779,10 @@ const getActionsVirtualDom = actions => {
|
|
|
1779
1779
|
}, ...actions.flatMap(getActionVirtualDom)];
|
|
1780
1780
|
};
|
|
1781
1781
|
|
|
1782
|
-
const
|
|
1782
|
+
const commandIds = ['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'];
|
|
1783
|
+
|
|
1783
1784
|
const getCommandIds = () => {
|
|
1784
|
-
return
|
|
1785
|
+
return commandIds;
|
|
1785
1786
|
};
|
|
1786
1787
|
|
|
1787
1788
|
const getFlags = uid => {
|
|
@@ -2870,7 +2871,7 @@ const textSearch = async (root, query, options, assetDir, platform) => {
|
|
|
2870
2871
|
// Based on https://github.com/microsoft/vscode/blob/ad375c92764b72a1f28f3e1626563e9e41e5c740/src/vs/workbench/contrib/search/browser/searchWidget.ts#L393 by Microsoft (License MIT)
|
|
2871
2872
|
|
|
2872
2873
|
const validateSearchInput = (value, flags) => {
|
|
2873
|
-
if (value
|
|
2874
|
+
if (!value) {
|
|
2874
2875
|
return '';
|
|
2875
2876
|
}
|
|
2876
2877
|
if (!(flags & UseRegularExpression$1)) {
|
|
@@ -3706,6 +3707,10 @@ const RenderReplaceValue = 4;
|
|
|
3706
3707
|
const RenderIncludeValue = 5;
|
|
3707
3708
|
const RenderExcludeValue = 6;
|
|
3708
3709
|
|
|
3710
|
+
const renderFocus = (oldState, newState) => {
|
|
3711
|
+
return oldState.focus === newState.focus || newState.focusSource === User;
|
|
3712
|
+
};
|
|
3713
|
+
|
|
3709
3714
|
const createViewModel = state => {
|
|
3710
3715
|
const {
|
|
3711
3716
|
listItems,
|
|
@@ -3768,9 +3773,6 @@ const renderExcludeValue = (oldState, newState) => {
|
|
|
3768
3773
|
return ['Viewlet.send', newState.uid, 'setValue', newState.excludeValue, `[name=${FilesToExclude}]`];
|
|
3769
3774
|
};
|
|
3770
3775
|
|
|
3771
|
-
const renderFocus = (oldState, newState) => {
|
|
3772
|
-
return oldState.focus === newState.focus || newState.focusSource === User;
|
|
3773
|
-
};
|
|
3774
3776
|
const getRenderer = diffType => {
|
|
3775
3777
|
switch (diffType) {
|
|
3776
3778
|
case RenderValue:
|