@lvce-editor/text-search-worker 5.20.0 → 5.22.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 +31 -27
- package/package.json +1 -1
|
@@ -1340,7 +1340,7 @@ const Electron = 2;
|
|
|
1340
1340
|
const Remote = 3;
|
|
1341
1341
|
|
|
1342
1342
|
const DebugWorker = 55;
|
|
1343
|
-
const RendererWorker$
|
|
1343
|
+
const RendererWorker$1 = 1;
|
|
1344
1344
|
const SearchProcess = 77;
|
|
1345
1345
|
const IconThemeWorker = 7009;
|
|
1346
1346
|
|
|
@@ -1710,19 +1710,19 @@ const {
|
|
|
1710
1710
|
invokeAndTransfer,
|
|
1711
1711
|
set: set$2,
|
|
1712
1712
|
dispose
|
|
1713
|
-
} = create$2(RendererWorker$
|
|
1713
|
+
} = create$2(RendererWorker$1);
|
|
1714
1714
|
const searchFileHtml = async uri => {
|
|
1715
1715
|
return invoke$2('ExtensionHost.searchFileWithHtml', uri);
|
|
1716
1716
|
};
|
|
1717
1717
|
const getFilePathElectron = async file => {
|
|
1718
1718
|
return invoke$2('FileSystemHandle.getFilePathElectron', file);
|
|
1719
1719
|
};
|
|
1720
|
-
const showContextMenu
|
|
1720
|
+
const showContextMenu = async (x, y, id, ...args) => {
|
|
1721
1721
|
return invoke$2('ContextMenu.show', x, y, id, ...args);
|
|
1722
1722
|
};
|
|
1723
|
-
const showContextMenu2 = async (uid, menuId, x, y, args) => {
|
|
1723
|
+
const showContextMenu2$1 = async (uid, menuId, x, y, args) => {
|
|
1724
1724
|
// @ts-ignore
|
|
1725
|
-
await
|
|
1725
|
+
await invoke$2('ContextMenu.show2', uid, menuId, x, y, args);
|
|
1726
1726
|
};
|
|
1727
1727
|
const getElectronVersion = async () => {
|
|
1728
1728
|
return invoke$2('Process.getElectronVersion');
|
|
@@ -1983,7 +1983,7 @@ const registerMockRpc = commandMap => {
|
|
|
1983
1983
|
return mockRpc;
|
|
1984
1984
|
};
|
|
1985
1985
|
|
|
1986
|
-
const RendererWorker
|
|
1986
|
+
const RendererWorker = {
|
|
1987
1987
|
__proto__: null,
|
|
1988
1988
|
activateByEvent,
|
|
1989
1989
|
applyBulkReplacement: applyBulkReplacement$1,
|
|
@@ -2054,8 +2054,8 @@ const RendererWorker$1 = {
|
|
|
2054
2054
|
setFocus,
|
|
2055
2055
|
setWebViewPort,
|
|
2056
2056
|
setWorkspacePath,
|
|
2057
|
-
showContextMenu
|
|
2058
|
-
showContextMenu2,
|
|
2057
|
+
showContextMenu,
|
|
2058
|
+
showContextMenu2: showContextMenu2$1,
|
|
2059
2059
|
showErrorDialog,
|
|
2060
2060
|
showMessageBox,
|
|
2061
2061
|
showSaveFilePicker,
|
|
@@ -2095,8 +2095,8 @@ const {
|
|
|
2095
2095
|
openUri: openUri$1,
|
|
2096
2096
|
sendMessagePortToSearchProcess,
|
|
2097
2097
|
set: set$1,
|
|
2098
|
-
|
|
2099
|
-
writeClipBoardText} = RendererWorker
|
|
2098
|
+
showContextMenu2,
|
|
2099
|
+
writeClipBoardText} = RendererWorker;
|
|
2100
2100
|
|
|
2101
2101
|
const copy = async state => {
|
|
2102
2102
|
const {
|
|
@@ -2239,7 +2239,7 @@ const isEqual$5 = (oldState, newState) => {
|
|
|
2239
2239
|
};
|
|
2240
2240
|
|
|
2241
2241
|
const isEqual$4 = (oldState, newState) => {
|
|
2242
|
-
return oldState.focus === newState.focus;
|
|
2242
|
+
return oldState.focus === newState.focus && oldState.focused === newState.focused;
|
|
2243
2243
|
};
|
|
2244
2244
|
|
|
2245
2245
|
const diffType$3 = RenderIncludeValue;
|
|
@@ -2853,23 +2853,24 @@ const getKeyBindings = () => {
|
|
|
2853
2853
|
return [...getSearchHeaderKeyBindings(), ...getSearchResultKeyBindings()];
|
|
2854
2854
|
};
|
|
2855
2855
|
|
|
2856
|
-
const getMenuEntryIds = () => {
|
|
2857
|
-
return [Search$1];
|
|
2858
|
-
};
|
|
2859
2856
|
const getMenuEntries = () => {
|
|
2860
2857
|
return [{
|
|
2861
2858
|
id: 'dismiss',
|
|
2862
2859
|
label: dismiss(),
|
|
2863
2860
|
flags: None$1,
|
|
2864
|
-
command:
|
|
2861
|
+
command: 'Search.removeCurrent'
|
|
2865
2862
|
}, {
|
|
2866
2863
|
id: 'copyPath',
|
|
2867
2864
|
label: copyPath(),
|
|
2868
2865
|
flags: None$1,
|
|
2869
|
-
command:
|
|
2866
|
+
command: 'Search.copyPath'
|
|
2870
2867
|
}];
|
|
2871
2868
|
};
|
|
2872
2869
|
|
|
2870
|
+
const getMenuEntryIds = () => {
|
|
2871
|
+
return [Search$1];
|
|
2872
|
+
};
|
|
2873
|
+
|
|
2873
2874
|
const handleError = error => {
|
|
2874
2875
|
console.error(`[text-search-worker] ${error}`);
|
|
2875
2876
|
};
|
|
@@ -2931,7 +2932,7 @@ const getIconsCached = (dirents, fileIconCache) => {
|
|
|
2931
2932
|
const getFileName = path => {
|
|
2932
2933
|
const slashIndex = path.lastIndexOf('/');
|
|
2933
2934
|
if (slashIndex === -1) {
|
|
2934
|
-
return
|
|
2935
|
+
return path;
|
|
2935
2936
|
}
|
|
2936
2937
|
return path.slice(slashIndex + 1);
|
|
2937
2938
|
};
|
|
@@ -5613,26 +5614,29 @@ const viewAsTree = async state => {
|
|
|
5613
5614
|
|
|
5614
5615
|
const Keyboard = -1;
|
|
5615
5616
|
|
|
5616
|
-
const
|
|
5617
|
-
|
|
5618
|
-
number(x);
|
|
5619
|
-
number(y);
|
|
5620
|
-
number(id);
|
|
5621
|
-
// TODO
|
|
5622
|
-
await showContextMenu(x, y, id, ...args);
|
|
5617
|
+
const show2 = async (uid, menuId, x, y, args) => {
|
|
5618
|
+
await showContextMenu2(uid, menuId, x, y, args);
|
|
5623
5619
|
};
|
|
5624
5620
|
|
|
5625
5621
|
const handleContextMenuKeyboard = async state => {
|
|
5626
5622
|
const {
|
|
5627
5623
|
x,
|
|
5628
|
-
y
|
|
5624
|
+
y,
|
|
5625
|
+
uid
|
|
5629
5626
|
} = state; // TODO
|
|
5630
|
-
await
|
|
5627
|
+
await show2(uid, Search$1, x, y, {
|
|
5628
|
+
menuId: Search$1
|
|
5629
|
+
});
|
|
5631
5630
|
return state;
|
|
5632
5631
|
};
|
|
5633
5632
|
|
|
5634
5633
|
const handleContextMenuMouseAt = async (state, x, y) => {
|
|
5635
|
-
|
|
5634
|
+
const {
|
|
5635
|
+
uid
|
|
5636
|
+
} = state;
|
|
5637
|
+
await show2(uid, Search$1, x, y, {
|
|
5638
|
+
menuId: Search$1
|
|
5639
|
+
});
|
|
5636
5640
|
return state;
|
|
5637
5641
|
};
|
|
5638
5642
|
|