@lvce-editor/text-search-view 1.17.1 → 1.17.3
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/settings.json +1 -1
- package/dist/textSearchViewMain.js +53 -25
- package/package.json +1 -1
package/dist/settings.json
CHANGED
|
@@ -1135,7 +1135,7 @@ const createMockRpc = ({
|
|
|
1135
1135
|
};
|
|
1136
1136
|
|
|
1137
1137
|
const rpcs = Object.create(null);
|
|
1138
|
-
const set$
|
|
1138
|
+
const set$9 = (id, rpc) => {
|
|
1139
1139
|
rpcs[id] = rpc;
|
|
1140
1140
|
};
|
|
1141
1141
|
const get$1 = id => {
|
|
@@ -1168,7 +1168,7 @@ const create$3 = rpcId => {
|
|
|
1168
1168
|
const mockRpc = createMockRpc({
|
|
1169
1169
|
commandMap
|
|
1170
1170
|
});
|
|
1171
|
-
set$
|
|
1171
|
+
set$9(rpcId, mockRpc);
|
|
1172
1172
|
// @ts-ignore
|
|
1173
1173
|
mockRpc[Symbol.dispose] = () => {
|
|
1174
1174
|
remove$2(rpcId);
|
|
@@ -1177,7 +1177,7 @@ const create$3 = rpcId => {
|
|
|
1177
1177
|
return mockRpc;
|
|
1178
1178
|
},
|
|
1179
1179
|
set(rpc) {
|
|
1180
|
-
set$
|
|
1180
|
+
set$9(rpcId, rpc);
|
|
1181
1181
|
}
|
|
1182
1182
|
};
|
|
1183
1183
|
};
|
|
@@ -1443,6 +1443,7 @@ const None$1 = 0;
|
|
|
1443
1443
|
|
|
1444
1444
|
const LeftClick = 0;
|
|
1445
1445
|
|
|
1446
|
+
const ClipBoardWorker = 3400;
|
|
1446
1447
|
const DialogWorker = 7014;
|
|
1447
1448
|
const IconThemeWorker = 7009;
|
|
1448
1449
|
const RendererProcess = 1670;
|
|
@@ -1476,6 +1477,17 @@ const FocusSearchWholeWord = 34;
|
|
|
1476
1477
|
const FocusToggleDetails = 1010;
|
|
1477
1478
|
const FocusToggleReplace = 1020;
|
|
1478
1479
|
|
|
1480
|
+
const {
|
|
1481
|
+
invoke: invoke$7,
|
|
1482
|
+
set: set$8
|
|
1483
|
+
} = create$3(ClipBoardWorker);
|
|
1484
|
+
const writeText$1 = async text => {
|
|
1485
|
+
return invoke$7('ClipBoard.writeText', text);
|
|
1486
|
+
};
|
|
1487
|
+
const readText$1 = async () => {
|
|
1488
|
+
return invoke$7('ClipBoard.readText');
|
|
1489
|
+
};
|
|
1490
|
+
|
|
1479
1491
|
const {
|
|
1480
1492
|
invoke: invoke$6,
|
|
1481
1493
|
set: set$7
|
|
@@ -1507,6 +1519,10 @@ const showContextMenu2 = async (uid, menuId, x, y, args) => {
|
|
|
1507
1519
|
number(y);
|
|
1508
1520
|
await invoke$3('ContextMenu.show2', uid, menuId, x, y, args);
|
|
1509
1521
|
};
|
|
1522
|
+
const sendMessagePortToClipBoardWorker$1 = async (port, rpcId) => {
|
|
1523
|
+
const command = 'ClipBoard.handleMessagePort';
|
|
1524
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToClipBoardWorker', port, command, rpcId);
|
|
1525
|
+
};
|
|
1510
1526
|
const sendMessagePortToTextSearchWorker = async (port, rpcId) => {
|
|
1511
1527
|
const command = 'HandleMessagePort.handleMessagePort';
|
|
1512
1528
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToTextSearchWorker', port, command, rpcId);
|
|
@@ -1522,9 +1538,6 @@ const sendMessagePortToIconThemeWorker = async (port, rpcId) => {
|
|
|
1522
1538
|
const handleWorkspaceRefresh = async () => {
|
|
1523
1539
|
return invoke$3('Layout.handleWorkspaceRefresh');
|
|
1524
1540
|
};
|
|
1525
|
-
const writeClipBoardText = async text => {
|
|
1526
|
-
await invoke$3('ClipBoard.writeText', /* text */text);
|
|
1527
|
-
};
|
|
1528
1541
|
const sendMessagePortToTextMeasurementWorker = async port => {
|
|
1529
1542
|
const command = 'TextMeasurement.handleMessagePort';
|
|
1530
1543
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToTextMeasurementWorker', port, command, 0);
|
|
@@ -2354,7 +2367,7 @@ const invoke$1 = (method, ...params) => {
|
|
|
2354
2367
|
return get$1(TextMeasurementWorker).invoke(method, ...params);
|
|
2355
2368
|
};
|
|
2356
2369
|
const set$2 = rpc => {
|
|
2357
|
-
set$
|
|
2370
|
+
set$9(TextMeasurementWorker, rpc);
|
|
2358
2371
|
};
|
|
2359
2372
|
|
|
2360
2373
|
const SearchMessageFontFamily = 'system-ui';
|
|
@@ -2392,6 +2405,13 @@ const collapseDetails = async state => {
|
|
|
2392
2405
|
};
|
|
2393
2406
|
};
|
|
2394
2407
|
|
|
2408
|
+
const writeText = async text => {
|
|
2409
|
+
await writeText$1(text);
|
|
2410
|
+
};
|
|
2411
|
+
const readText = async () => {
|
|
2412
|
+
return await readText$1();
|
|
2413
|
+
};
|
|
2414
|
+
|
|
2395
2415
|
const copy$1 = async state => {
|
|
2396
2416
|
const {
|
|
2397
2417
|
focusedIndex,
|
|
@@ -2401,17 +2421,10 @@ const copy$1 = async state => {
|
|
|
2401
2421
|
return state;
|
|
2402
2422
|
}
|
|
2403
2423
|
const item = items[focusedIndex];
|
|
2404
|
-
await
|
|
2424
|
+
await writeText(item.text);
|
|
2405
2425
|
return state;
|
|
2406
2426
|
};
|
|
2407
2427
|
|
|
2408
|
-
const writeText = async text => {
|
|
2409
|
-
await writeClipBoardText(text);
|
|
2410
|
-
};
|
|
2411
|
-
const readText = async () => {
|
|
2412
|
-
return await invoke$3('ClipBoard.readText');
|
|
2413
|
-
};
|
|
2414
|
-
|
|
2415
2428
|
const getActualIndex$1 = state => {
|
|
2416
2429
|
const {
|
|
2417
2430
|
focusedIndex,
|
|
@@ -2475,7 +2488,7 @@ const copyPath$1 = async state => {
|
|
|
2475
2488
|
return state;
|
|
2476
2489
|
}
|
|
2477
2490
|
const item = items[actualIndex];
|
|
2478
|
-
await
|
|
2491
|
+
await writeText(item.text);
|
|
2479
2492
|
return state;
|
|
2480
2493
|
};
|
|
2481
2494
|
|
|
@@ -3678,7 +3691,10 @@ const openSearchEditor = async state => {
|
|
|
3678
3691
|
const getSearchExcludes = async (fallback = []) => {
|
|
3679
3692
|
try {
|
|
3680
3693
|
const value = await invoke$3('Preferences.get', 'search.exclude');
|
|
3681
|
-
if (
|
|
3694
|
+
if (Array.isArray(value)) {
|
|
3695
|
+
return value.filter(item => typeof item === 'string');
|
|
3696
|
+
}
|
|
3697
|
+
if (!value || typeof value !== 'object') {
|
|
3682
3698
|
return [];
|
|
3683
3699
|
}
|
|
3684
3700
|
const excludes = [];
|
|
@@ -6928,6 +6944,13 @@ const render2 = (uid, diffResult) => {
|
|
|
6928
6944
|
|
|
6929
6945
|
const Button = 1;
|
|
6930
6946
|
|
|
6947
|
+
const getActionButtonClassName = enabled => {
|
|
6948
|
+
if (enabled) {
|
|
6949
|
+
return IconButton;
|
|
6950
|
+
}
|
|
6951
|
+
return mergeClassNames(IconButton, IconButtonDisabled);
|
|
6952
|
+
};
|
|
6953
|
+
|
|
6931
6954
|
const getIconVirtualDom = (icon, type = Div) => {
|
|
6932
6955
|
return {
|
|
6933
6956
|
childCount: 0,
|
|
@@ -6937,12 +6960,6 @@ const getIconVirtualDom = (icon, type = Div) => {
|
|
|
6937
6960
|
};
|
|
6938
6961
|
};
|
|
6939
6962
|
|
|
6940
|
-
const getClassName = enabled => {
|
|
6941
|
-
if (enabled) {
|
|
6942
|
-
return IconButton;
|
|
6943
|
-
}
|
|
6944
|
-
return mergeClassNames(IconButton, IconButtonDisabled);
|
|
6945
|
-
};
|
|
6946
6963
|
const getActionButtonVirtualDom = action => {
|
|
6947
6964
|
const {
|
|
6948
6965
|
enabled,
|
|
@@ -6950,7 +6967,7 @@ const getActionButtonVirtualDom = action => {
|
|
|
6950
6967
|
id,
|
|
6951
6968
|
label
|
|
6952
6969
|
} = action;
|
|
6953
|
-
const className =
|
|
6970
|
+
const className = getActionButtonClassName(enabled);
|
|
6954
6971
|
const disabled = !enabled;
|
|
6955
6972
|
return [{
|
|
6956
6973
|
childCount: 1,
|
|
@@ -7430,6 +7447,17 @@ const commandMap$1 = {
|
|
|
7430
7447
|
'TextSearch.viewAsTree': wrapCommand(viewAsTree)
|
|
7431
7448
|
};
|
|
7432
7449
|
|
|
7450
|
+
const sendMessagePortToClipBoardWorker = async port => {
|
|
7451
|
+
await sendMessagePortToClipBoardWorker$1(port, 0);
|
|
7452
|
+
};
|
|
7453
|
+
const initializeClipBoardWorker = async () => {
|
|
7454
|
+
const rpc = await create$5({
|
|
7455
|
+
commandMap: {},
|
|
7456
|
+
send: sendMessagePortToClipBoardWorker
|
|
7457
|
+
});
|
|
7458
|
+
set$8(rpc);
|
|
7459
|
+
};
|
|
7460
|
+
|
|
7433
7461
|
const initializeDialogWorker = async () => {
|
|
7434
7462
|
const rpc = await create$5({
|
|
7435
7463
|
commandMap: {},
|
|
@@ -7491,7 +7519,7 @@ const listen = async () => {
|
|
|
7491
7519
|
commandMap: commandMap$1
|
|
7492
7520
|
});
|
|
7493
7521
|
set$4(rpc);
|
|
7494
|
-
await Promise.all([initializeDialogWorker(), initializeIconThemeWorker(), initializeTextMeasurementWorker(), initializeTextSearchWorker()]);
|
|
7522
|
+
await Promise.all([initializeClipBoardWorker(), initializeDialogWorker(), initializeIconThemeWorker(), initializeTextMeasurementWorker(), initializeTextSearchWorker()]);
|
|
7495
7523
|
};
|
|
7496
7524
|
|
|
7497
7525
|
const main = async () => {
|