@lvce-editor/text-search-view 1.17.2 → 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/textSearchViewMain.js +49 -24
- package/package.json +1 -1
|
@@ -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
|
|
|
@@ -6931,6 +6944,13 @@ const render2 = (uid, diffResult) => {
|
|
|
6931
6944
|
|
|
6932
6945
|
const Button = 1;
|
|
6933
6946
|
|
|
6947
|
+
const getActionButtonClassName = enabled => {
|
|
6948
|
+
if (enabled) {
|
|
6949
|
+
return IconButton;
|
|
6950
|
+
}
|
|
6951
|
+
return mergeClassNames(IconButton, IconButtonDisabled);
|
|
6952
|
+
};
|
|
6953
|
+
|
|
6934
6954
|
const getIconVirtualDom = (icon, type = Div) => {
|
|
6935
6955
|
return {
|
|
6936
6956
|
childCount: 0,
|
|
@@ -6940,12 +6960,6 @@ const getIconVirtualDom = (icon, type = Div) => {
|
|
|
6940
6960
|
};
|
|
6941
6961
|
};
|
|
6942
6962
|
|
|
6943
|
-
const getClassName = enabled => {
|
|
6944
|
-
if (enabled) {
|
|
6945
|
-
return IconButton;
|
|
6946
|
-
}
|
|
6947
|
-
return mergeClassNames(IconButton, IconButtonDisabled);
|
|
6948
|
-
};
|
|
6949
6963
|
const getActionButtonVirtualDom = action => {
|
|
6950
6964
|
const {
|
|
6951
6965
|
enabled,
|
|
@@ -6953,7 +6967,7 @@ const getActionButtonVirtualDom = action => {
|
|
|
6953
6967
|
id,
|
|
6954
6968
|
label
|
|
6955
6969
|
} = action;
|
|
6956
|
-
const className =
|
|
6970
|
+
const className = getActionButtonClassName(enabled);
|
|
6957
6971
|
const disabled = !enabled;
|
|
6958
6972
|
return [{
|
|
6959
6973
|
childCount: 1,
|
|
@@ -7433,6 +7447,17 @@ const commandMap$1 = {
|
|
|
7433
7447
|
'TextSearch.viewAsTree': wrapCommand(viewAsTree)
|
|
7434
7448
|
};
|
|
7435
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
|
+
|
|
7436
7461
|
const initializeDialogWorker = async () => {
|
|
7437
7462
|
const rpc = await create$5({
|
|
7438
7463
|
commandMap: {},
|
|
@@ -7494,7 +7519,7 @@ const listen = async () => {
|
|
|
7494
7519
|
commandMap: commandMap$1
|
|
7495
7520
|
});
|
|
7496
7521
|
set$4(rpc);
|
|
7497
|
-
await Promise.all([initializeDialogWorker(), initializeIconThemeWorker(), initializeTextMeasurementWorker(), initializeTextSearchWorker()]);
|
|
7522
|
+
await Promise.all([initializeClipBoardWorker(), initializeDialogWorker(), initializeIconThemeWorker(), initializeTextMeasurementWorker(), initializeTextSearchWorker()]);
|
|
7498
7523
|
};
|
|
7499
7524
|
|
|
7500
7525
|
const main = async () => {
|