@lvce-editor/text-search-worker 5.12.0 → 5.13.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 +26 -8
- package/package.json +1 -1
|
@@ -1330,6 +1330,8 @@ const TargetValue = 'event.target.value';
|
|
|
1330
1330
|
|
|
1331
1331
|
const Search$1 = 18;
|
|
1332
1332
|
|
|
1333
|
+
const LeftClick = 0;
|
|
1334
|
+
|
|
1333
1335
|
const Electron = 2;
|
|
1334
1336
|
const Remote = 3;
|
|
1335
1337
|
|
|
@@ -3491,6 +3493,19 @@ const handleListBlur = state => {
|
|
|
3491
3493
|
};
|
|
3492
3494
|
};
|
|
3493
3495
|
|
|
3496
|
+
const handleListFocus = async state => {
|
|
3497
|
+
const {
|
|
3498
|
+
listFocused
|
|
3499
|
+
} = state;
|
|
3500
|
+
if (listFocused) {
|
|
3501
|
+
return state;
|
|
3502
|
+
}
|
|
3503
|
+
return {
|
|
3504
|
+
...state,
|
|
3505
|
+
listFocused: true
|
|
3506
|
+
};
|
|
3507
|
+
};
|
|
3508
|
+
|
|
3494
3509
|
const handleSharedInput = (state, name, value, inputSource = Script) => {
|
|
3495
3510
|
const fn = getInputHandler(name);
|
|
3496
3511
|
return fn(state, value, inputSource);
|
|
@@ -3988,8 +4003,10 @@ const handleClickAt = async (state, eventX, eventY) => {
|
|
|
3988
4003
|
return selectIndex(state, index);
|
|
3989
4004
|
};
|
|
3990
4005
|
|
|
3991
|
-
const handleListPointerDown = async state => {
|
|
3992
|
-
|
|
4006
|
+
const handleListPointerDown = async (state, button) => {
|
|
4007
|
+
if (button !== LeftClick) {
|
|
4008
|
+
return state;
|
|
4009
|
+
}
|
|
3993
4010
|
return {
|
|
3994
4011
|
...state,
|
|
3995
4012
|
listFocused: true
|
|
@@ -4380,7 +4397,6 @@ const getSearchMessageVirtualDom = (message, indented) => {
|
|
|
4380
4397
|
type: Div,
|
|
4381
4398
|
className: getClassName(indented),
|
|
4382
4399
|
role: Status,
|
|
4383
|
-
tabIndex: 0,
|
|
4384
4400
|
childCount: 1
|
|
4385
4401
|
}, text(message)];
|
|
4386
4402
|
};
|
|
@@ -4942,7 +4958,8 @@ const getSearchResultsVirtualDom = (visibleItems, focusOutline, scrollbarHeight,
|
|
|
4942
4958
|
tabIndex: 0,
|
|
4943
4959
|
childCount,
|
|
4944
4960
|
onBlur: HandleListBlur,
|
|
4945
|
-
onPointerDown: HandleListPointerDown
|
|
4961
|
+
onPointerDown: HandleListPointerDown,
|
|
4962
|
+
onFocus: HandleListFocus
|
|
4946
4963
|
}, ...getTreeItemsVirtualDom(visibleItems, deltaY, itemHeight), ...getScrollBarVirtualDom(scrollbarHeight, scrollBarY, scrollBarValue)];
|
|
4947
4964
|
};
|
|
4948
4965
|
|
|
@@ -5118,7 +5135,7 @@ const renderEventListeners = () => {
|
|
|
5118
5135
|
params: ['handleClickAt', ClientX, ClientY]
|
|
5119
5136
|
}, {
|
|
5120
5137
|
name: HandleListPointerDown,
|
|
5121
|
-
params: ['handleListPointerDown']
|
|
5138
|
+
params: ['handleListPointerDown', Button$1]
|
|
5122
5139
|
}, {
|
|
5123
5140
|
name: HandleToggleButtonClick,
|
|
5124
5141
|
params: ['handleToggleButtonClick']
|
|
@@ -5423,7 +5440,6 @@ const commandMap = {
|
|
|
5423
5440
|
'TextSearch.collapseDetails': wrapCommand(collapseDetails),
|
|
5424
5441
|
'TextSearch.copy': wrapCommand(copy),
|
|
5425
5442
|
'TextSearch.copyPath': wrapCommand(copyPath),
|
|
5426
|
-
'TextSearch.handleInputBlur': wrapCommand(handleInputBlur),
|
|
5427
5443
|
'TextSearch.diff2': diff2,
|
|
5428
5444
|
'TextSearch.dismissItem': wrapCommand(dismissItem),
|
|
5429
5445
|
'TextSearch.expandDetails': wrapCommand(expandDetails),
|
|
@@ -5450,7 +5466,6 @@ const commandMap = {
|
|
|
5450
5466
|
'TextSearch.focusSearchValue': wrapCommand(focusSearchValue$1),
|
|
5451
5467
|
'TextSearch.focusSearchValueNext': wrapCommand(focusSearchValueNext),
|
|
5452
5468
|
'TextSearch.handleClickAt': wrapCommand(handleClickAt),
|
|
5453
|
-
'TextSearch.handleInputFocus': wrapCommand(handleInputFocus),
|
|
5454
5469
|
'TextSearch.handleContextMenu': wrapCommand(handleContextMenu),
|
|
5455
5470
|
'TextSearch.handleExcludeInput': wrapCommand(handleExcludeInput),
|
|
5456
5471
|
'TextSearch.handleFocusIn': wrapCommand(handleFocusIn),
|
|
@@ -5462,7 +5477,11 @@ const commandMap = {
|
|
|
5462
5477
|
'TextSearch.handleIncludeInput': wrapCommand(handleIncludeInput),
|
|
5463
5478
|
'TextSearch.handleInput': wrapCommand(handleInput),
|
|
5464
5479
|
'TextSearch.handleInput2': wrapCommand(handleInput2),
|
|
5480
|
+
'TextSearch.handleInputBlur': wrapCommand(handleInputBlur),
|
|
5481
|
+
'TextSearch.handleInputFocus': wrapCommand(handleInputFocus),
|
|
5465
5482
|
'TextSearch.handleListBlur': wrapCommand(handleListBlur),
|
|
5483
|
+
'TextSearch.handleListFocus': wrapCommand(handleListFocus),
|
|
5484
|
+
'TextSearch.handleListPointerDown': wrapCommand(handleListPointerDown),
|
|
5466
5485
|
'TextSearch.handleReplaceInput': wrapCommand(handleReplaceInput),
|
|
5467
5486
|
'TextSearch.handleScrollBarCaptureLost': wrapCommand(handleScrollBarCaptureLost),
|
|
5468
5487
|
'TextSearch.handleScrollBarClick': wrapCommand(handleScrollBarClick),
|
|
@@ -5485,7 +5504,6 @@ const commandMap = {
|
|
|
5485
5504
|
'TextSearch.toggleReplace': wrapCommand(toggleReplace),
|
|
5486
5505
|
'TextSearch.toggleSearchDetails': wrapCommand(toggleDetailsExpanded),
|
|
5487
5506
|
'TextSearch.toggleUseIgnoreFiles': wrapCommand(toggleUseIgnoreFiles),
|
|
5488
|
-
'TextSearch.handleListPointerDown': wrapCommand(handleListPointerDown),
|
|
5489
5507
|
'TextSearch.toggleUseRegularExpression': wrapCommand(toggleUseRegularExpression),
|
|
5490
5508
|
'TextSearch.viewAsTree': wrapCommand(viewAsTree),
|
|
5491
5509
|
// not wrapped
|