@lvce-editor/text-search-worker 4.8.0 → 4.9.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 -14
- package/package.json +1 -1
|
@@ -599,7 +599,7 @@ const create$4 = (method, params) => {
|
|
|
599
599
|
};
|
|
600
600
|
};
|
|
601
601
|
const callbacks = Object.create(null);
|
|
602
|
-
const set$
|
|
602
|
+
const set$4 = (id, fn) => {
|
|
603
603
|
callbacks[id] = fn;
|
|
604
604
|
};
|
|
605
605
|
const get$2 = id => {
|
|
@@ -618,7 +618,7 @@ const registerPromise = () => {
|
|
|
618
618
|
resolve,
|
|
619
619
|
promise
|
|
620
620
|
} = Promise.withResolvers();
|
|
621
|
-
set$
|
|
621
|
+
set$4(id, resolve);
|
|
622
622
|
return {
|
|
623
623
|
id,
|
|
624
624
|
promise
|
|
@@ -1003,7 +1003,7 @@ const listen$1 = async (module, options) => {
|
|
|
1003
1003
|
const ipc = module.wrap(rawIpc);
|
|
1004
1004
|
return ipc;
|
|
1005
1005
|
};
|
|
1006
|
-
const create$
|
|
1006
|
+
const create$8 = async ({
|
|
1007
1007
|
commandMap,
|
|
1008
1008
|
messagePort,
|
|
1009
1009
|
isMessagePortOpen
|
|
@@ -1021,7 +1021,7 @@ const create$7 = async ({
|
|
|
1021
1021
|
};
|
|
1022
1022
|
const MessagePortRpcParent = {
|
|
1023
1023
|
__proto__: null,
|
|
1024
|
-
create: create$
|
|
1024
|
+
create: create$8
|
|
1025
1025
|
};
|
|
1026
1026
|
const create$1$1 = async ({
|
|
1027
1027
|
commandMap,
|
|
@@ -1118,26 +1118,39 @@ const collapseDetails = state => {
|
|
|
1118
1118
|
};
|
|
1119
1119
|
};
|
|
1120
1120
|
|
|
1121
|
-
const RendererWorker = 1;
|
|
1122
|
-
|
|
1123
1121
|
const rpcs = Object.create(null);
|
|
1124
|
-
const set$
|
|
1122
|
+
const set$3 = (id, rpc) => {
|
|
1125
1123
|
rpcs[id] = rpc;
|
|
1126
1124
|
};
|
|
1127
1125
|
const get$1 = id => {
|
|
1128
1126
|
return rpcs[id];
|
|
1129
1127
|
};
|
|
1130
|
-
|
|
1131
|
-
const invoke$2 = (method, ...params) => {
|
|
1132
|
-
const rpc = get$1(RendererWorker);
|
|
1128
|
+
const RendererWorker$1 = 1;
|
|
1129
|
+
const invoke$2$1 = (method, ...params) => {
|
|
1130
|
+
const rpc = get$1(RendererWorker$1);
|
|
1133
1131
|
// @ts-ignore
|
|
1134
1132
|
return rpc.invoke(method, ...params);
|
|
1135
1133
|
};
|
|
1136
|
-
const invokeAndTransfer = (method, ...params) => {
|
|
1137
|
-
const rpc = get$1(RendererWorker);
|
|
1134
|
+
const invokeAndTransfer$2 = (method, ...params) => {
|
|
1135
|
+
const rpc = get$1(RendererWorker$1);
|
|
1138
1136
|
// @ts-ignore
|
|
1139
1137
|
return rpc.invokeAndTransfer(method, ...params);
|
|
1140
1138
|
};
|
|
1139
|
+
const set$2 = rpc => {
|
|
1140
|
+
set$3(RendererWorker$1, rpc);
|
|
1141
|
+
};
|
|
1142
|
+
const RendererWorker = {
|
|
1143
|
+
__proto__: null,
|
|
1144
|
+
invoke: invoke$2$1,
|
|
1145
|
+
invokeAndTransfer: invokeAndTransfer$2,
|
|
1146
|
+
set: set$2
|
|
1147
|
+
};
|
|
1148
|
+
|
|
1149
|
+
const {
|
|
1150
|
+
invoke: invoke$2,
|
|
1151
|
+
invokeAndTransfer,
|
|
1152
|
+
set: set$1
|
|
1153
|
+
} = RendererWorker;
|
|
1141
1154
|
|
|
1142
1155
|
const copy = async state => {
|
|
1143
1156
|
const {
|
|
@@ -4682,7 +4695,6 @@ const commandMap = {
|
|
|
4682
4695
|
'TextSearch.handleScrollBarMove': wrapCommand(handleScrollBarMove),
|
|
4683
4696
|
'TextSearch.handleSharedInput': wrapCommand(handleSharedInput),
|
|
4684
4697
|
'TextSearch.handleWheel': wrapCommand(handleWheel),
|
|
4685
|
-
'TextSearch.launchSearchProcess': wrapCommand(launchSearchProcess),
|
|
4686
4698
|
'TextSearch.loadContent': wrapCommand(loadContent),
|
|
4687
4699
|
'TextSearch.nextHistoryResult': wrapCommand(nextHistoryResult),
|
|
4688
4700
|
'TextSearch.previousHistoryResult': wrapCommand(previousHistoryResult),
|
|
@@ -4719,7 +4731,7 @@ const listen = async () => {
|
|
|
4719
4731
|
const rpc = await WebWorkerRpcClient.create({
|
|
4720
4732
|
commandMap: commandMap
|
|
4721
4733
|
});
|
|
4722
|
-
set$1(
|
|
4734
|
+
set$1(rpc);
|
|
4723
4735
|
};
|
|
4724
4736
|
|
|
4725
4737
|
const main = async () => {
|