@lvce-editor/extension-search-view 3.6.0 → 3.8.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/extensionSearchViewWorkerMain.js +203 -128
- package/package.json +1 -1
|
@@ -60,37 +60,45 @@ class AssertionError extends Error {
|
|
|
60
60
|
this.name = 'AssertionError';
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
+
const Object$1 = 1;
|
|
64
|
+
const Number$1 = 2;
|
|
65
|
+
const Array$1 = 3;
|
|
66
|
+
const String = 4;
|
|
67
|
+
const Boolean$1 = 5;
|
|
68
|
+
const Function = 6;
|
|
69
|
+
const Null = 7;
|
|
70
|
+
const Unknown = 8;
|
|
63
71
|
const getType = value => {
|
|
64
72
|
switch (typeof value) {
|
|
65
73
|
case 'number':
|
|
66
|
-
return
|
|
74
|
+
return Number$1;
|
|
67
75
|
case 'function':
|
|
68
|
-
return
|
|
76
|
+
return Function;
|
|
69
77
|
case 'string':
|
|
70
|
-
return
|
|
78
|
+
return String;
|
|
71
79
|
case 'object':
|
|
72
80
|
if (value === null) {
|
|
73
|
-
return
|
|
81
|
+
return Null;
|
|
74
82
|
}
|
|
75
83
|
if (Array.isArray(value)) {
|
|
76
|
-
return
|
|
84
|
+
return Array$1;
|
|
77
85
|
}
|
|
78
|
-
return
|
|
86
|
+
return Object$1;
|
|
79
87
|
case 'boolean':
|
|
80
|
-
return
|
|
88
|
+
return Boolean$1;
|
|
81
89
|
default:
|
|
82
|
-
return
|
|
90
|
+
return Unknown;
|
|
83
91
|
}
|
|
84
92
|
};
|
|
85
93
|
const object = value => {
|
|
86
94
|
const type = getType(value);
|
|
87
|
-
if (type !==
|
|
95
|
+
if (type !== Object$1) {
|
|
88
96
|
throw new AssertionError('expected value to be of type object');
|
|
89
97
|
}
|
|
90
98
|
};
|
|
91
99
|
const number = value => {
|
|
92
100
|
const type = getType(value);
|
|
93
|
-
if (type !==
|
|
101
|
+
if (type !== Number$1) {
|
|
94
102
|
throw new AssertionError('expected value to be of type number');
|
|
95
103
|
}
|
|
96
104
|
};
|
|
@@ -344,22 +352,11 @@ class IpcChildWithModuleWorker extends Ipc {
|
|
|
344
352
|
const wrap$f = global => {
|
|
345
353
|
return new IpcChildWithModuleWorker(global);
|
|
346
354
|
};
|
|
347
|
-
const withResolvers = () => {
|
|
348
|
-
let _resolve;
|
|
349
|
-
const promise = new Promise(resolve => {
|
|
350
|
-
_resolve = resolve;
|
|
351
|
-
});
|
|
352
|
-
return {
|
|
353
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
354
|
-
resolve: _resolve,
|
|
355
|
-
promise
|
|
356
|
-
};
|
|
357
|
-
};
|
|
358
355
|
const waitForFirstMessage = async port => {
|
|
359
356
|
const {
|
|
360
357
|
resolve,
|
|
361
358
|
promise
|
|
362
|
-
} = withResolvers();
|
|
359
|
+
} = Promise.withResolvers();
|
|
363
360
|
port.addEventListener('message', resolve, {
|
|
364
361
|
once: true
|
|
365
362
|
});
|
|
@@ -430,7 +427,7 @@ const create$4 = (method, params) => {
|
|
|
430
427
|
};
|
|
431
428
|
};
|
|
432
429
|
const callbacks = Object.create(null);
|
|
433
|
-
const set$
|
|
430
|
+
const set$2 = (id, fn) => {
|
|
434
431
|
callbacks[id] = fn;
|
|
435
432
|
};
|
|
436
433
|
const get$2 = id => {
|
|
@@ -440,16 +437,16 @@ const remove = id => {
|
|
|
440
437
|
delete callbacks[id];
|
|
441
438
|
};
|
|
442
439
|
let id = 0;
|
|
443
|
-
const create$3 = () => {
|
|
440
|
+
const create$3$1 = () => {
|
|
444
441
|
return ++id;
|
|
445
442
|
};
|
|
446
443
|
const registerPromise = () => {
|
|
447
|
-
const id = create$3();
|
|
444
|
+
const id = create$3$1();
|
|
448
445
|
const {
|
|
449
446
|
resolve,
|
|
450
447
|
promise
|
|
451
448
|
} = Promise.withResolvers();
|
|
452
|
-
set$
|
|
449
|
+
set$2(id, resolve);
|
|
453
450
|
return {
|
|
454
451
|
id,
|
|
455
452
|
promise
|
|
@@ -522,6 +519,16 @@ const constructError = (message, type, name) => {
|
|
|
522
519
|
}
|
|
523
520
|
return new ErrorConstructor(message);
|
|
524
521
|
};
|
|
522
|
+
const joinLines = lines => {
|
|
523
|
+
return lines.join(NewLine);
|
|
524
|
+
};
|
|
525
|
+
const splitLines = lines => {
|
|
526
|
+
return lines.split(NewLine);
|
|
527
|
+
};
|
|
528
|
+
const getCurrentStack = () => {
|
|
529
|
+
const currentStack = joinLines(splitLines(new Error().stack || '').slice(2));
|
|
530
|
+
return currentStack;
|
|
531
|
+
};
|
|
525
532
|
const getNewLineIndex = (string, startIndex = undefined) => {
|
|
526
533
|
return string.indexOf(NewLine, startIndex);
|
|
527
534
|
};
|
|
@@ -532,19 +539,16 @@ const getParentStack = error => {
|
|
|
532
539
|
}
|
|
533
540
|
return parentStack;
|
|
534
541
|
};
|
|
535
|
-
const joinLines = lines => {
|
|
536
|
-
return lines.join(NewLine);
|
|
537
|
-
};
|
|
538
542
|
const MethodNotFound = -32601;
|
|
539
543
|
const Custom = -32001;
|
|
540
|
-
const splitLines = lines => {
|
|
541
|
-
return lines.split(NewLine);
|
|
542
|
-
};
|
|
543
544
|
const restoreJsonRpcError = error => {
|
|
545
|
+
const currentStack = getCurrentStack();
|
|
544
546
|
if (error && error instanceof Error) {
|
|
547
|
+
if (typeof error.stack === 'string') {
|
|
548
|
+
error.stack = error.stack + NewLine + currentStack;
|
|
549
|
+
}
|
|
545
550
|
return error;
|
|
546
551
|
}
|
|
547
|
-
const currentStack = joinLines(splitLines(new Error().stack || '').slice(1));
|
|
548
552
|
if (error && error.code && error.code === MethodNotFound) {
|
|
549
553
|
const restoredError = new JsonRpcError(error.message);
|
|
550
554
|
const parentStack = getParentStack(error);
|
|
@@ -625,6 +629,17 @@ const getErrorType = prettyError => {
|
|
|
625
629
|
}
|
|
626
630
|
return undefined;
|
|
627
631
|
};
|
|
632
|
+
const isAlreadyStack = line => {
|
|
633
|
+
return line.trim().startsWith('at ');
|
|
634
|
+
};
|
|
635
|
+
const getStack = prettyError => {
|
|
636
|
+
const stackString = prettyError.stack || '';
|
|
637
|
+
const newLineIndex = stackString.indexOf('\n');
|
|
638
|
+
if (newLineIndex !== -1 && !isAlreadyStack(stackString.slice(0, newLineIndex))) {
|
|
639
|
+
return stackString.slice(newLineIndex + 1);
|
|
640
|
+
}
|
|
641
|
+
return stackString;
|
|
642
|
+
};
|
|
628
643
|
const getErrorProperty = (error, prettyError) => {
|
|
629
644
|
if (error && error.code === E_COMMAND_NOT_FOUND) {
|
|
630
645
|
return {
|
|
@@ -637,7 +652,7 @@ const getErrorProperty = (error, prettyError) => {
|
|
|
637
652
|
code: Custom,
|
|
638
653
|
message: prettyError.message,
|
|
639
654
|
data: {
|
|
640
|
-
stack: prettyError
|
|
655
|
+
stack: getStack(prettyError),
|
|
641
656
|
codeFrame: prettyError.codeFrame,
|
|
642
657
|
type: getErrorType(prettyError),
|
|
643
658
|
code: prettyError.code,
|
|
@@ -645,18 +660,18 @@ const getErrorProperty = (error, prettyError) => {
|
|
|
645
660
|
}
|
|
646
661
|
};
|
|
647
662
|
};
|
|
648
|
-
const create$1$1 = (
|
|
663
|
+
const create$1$1 = (id, error) => {
|
|
649
664
|
return {
|
|
650
665
|
jsonrpc: Two,
|
|
651
|
-
id
|
|
666
|
+
id,
|
|
652
667
|
error
|
|
653
668
|
};
|
|
654
669
|
};
|
|
655
|
-
const getErrorResponse = (
|
|
670
|
+
const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
656
671
|
const prettyError = preparePrettyError(error);
|
|
657
672
|
logError(error, prettyError);
|
|
658
673
|
const errorProperty = getErrorProperty(error, prettyError);
|
|
659
|
-
return create$1$1(
|
|
674
|
+
return create$1$1(id, errorProperty);
|
|
660
675
|
};
|
|
661
676
|
const create$5 = (message, result) => {
|
|
662
677
|
return {
|
|
@@ -669,12 +684,27 @@ const getSuccessResponse = (message, result) => {
|
|
|
669
684
|
const resultProperty = result ?? null;
|
|
670
685
|
return create$5(message, resultProperty);
|
|
671
686
|
};
|
|
687
|
+
const getErrorResponseSimple = (id, error) => {
|
|
688
|
+
return {
|
|
689
|
+
jsonrpc: Two,
|
|
690
|
+
id,
|
|
691
|
+
error: {
|
|
692
|
+
code: Custom,
|
|
693
|
+
// @ts-ignore
|
|
694
|
+
message: error.message,
|
|
695
|
+
data: error
|
|
696
|
+
}
|
|
697
|
+
};
|
|
698
|
+
};
|
|
672
699
|
const getResponse = async (message, ipc, execute, preparePrettyError, logError, requiresSocket) => {
|
|
673
700
|
try {
|
|
674
701
|
const result = requiresSocket(message.method) ? await execute(message.method, ipc, ...message.params) : await execute(message.method, ...message.params);
|
|
675
702
|
return getSuccessResponse(message, result);
|
|
676
703
|
} catch (error) {
|
|
677
|
-
|
|
704
|
+
if (ipc.canUseSimpleErrorResponse) {
|
|
705
|
+
return getErrorResponseSimple(message.id, error);
|
|
706
|
+
}
|
|
707
|
+
return getErrorResponse(message.id, error, preparePrettyError, logError);
|
|
678
708
|
}
|
|
679
709
|
};
|
|
680
710
|
const defaultPreparePrettyError = error => {
|
|
@@ -729,7 +759,7 @@ const handleJsonRpcMessage = async (...args) => {
|
|
|
729
759
|
try {
|
|
730
760
|
ipc.send(response);
|
|
731
761
|
} catch (error) {
|
|
732
|
-
const errorResponse = getErrorResponse(message, error, preparePrettyError, logError);
|
|
762
|
+
const errorResponse = getErrorResponse(message.id, error, preparePrettyError, logError);
|
|
733
763
|
ipc.send(errorResponse);
|
|
734
764
|
}
|
|
735
765
|
return;
|
|
@@ -834,7 +864,7 @@ const listen$1 = async (module, options) => {
|
|
|
834
864
|
const ipc = module.wrap(rawIpc);
|
|
835
865
|
return ipc;
|
|
836
866
|
};
|
|
837
|
-
const create$
|
|
867
|
+
const create$3 = async ({
|
|
838
868
|
commandMap
|
|
839
869
|
}) => {
|
|
840
870
|
// TODO create a commandMap per rpc instance
|
|
@@ -846,10 +876,73 @@ const create$2 = async ({
|
|
|
846
876
|
};
|
|
847
877
|
const WebWorkerRpcClient = {
|
|
848
878
|
__proto__: null,
|
|
849
|
-
create: create$
|
|
879
|
+
create: create$3
|
|
880
|
+
};
|
|
881
|
+
|
|
882
|
+
const create$2 = () => {
|
|
883
|
+
const states = Object.create(null);
|
|
884
|
+
return {
|
|
885
|
+
get(uid) {
|
|
886
|
+
return states[uid];
|
|
887
|
+
},
|
|
888
|
+
set(uid, oldState, newState) {
|
|
889
|
+
states[uid] = {
|
|
890
|
+
oldState,
|
|
891
|
+
newState
|
|
892
|
+
};
|
|
893
|
+
},
|
|
894
|
+
dispose(uid) {
|
|
895
|
+
delete states[uid];
|
|
896
|
+
},
|
|
897
|
+
getKeys() {
|
|
898
|
+
return Object.keys(states).map(key => {
|
|
899
|
+
return Number.parseInt(key);
|
|
900
|
+
});
|
|
901
|
+
},
|
|
902
|
+
clear() {
|
|
903
|
+
for (const key of Object.keys(states)) {
|
|
904
|
+
delete states[key];
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
wrapCommand(fn) {
|
|
908
|
+
const wrapped = async (uid, ...args) => {
|
|
909
|
+
const {
|
|
910
|
+
newState
|
|
911
|
+
} = states[uid];
|
|
912
|
+
const newerState = await fn(newState, ...args);
|
|
913
|
+
if (newState === newerState) {
|
|
914
|
+
return;
|
|
915
|
+
}
|
|
916
|
+
const latest = states[uid];
|
|
917
|
+
states[uid] = {
|
|
918
|
+
oldState: latest.oldState,
|
|
919
|
+
newState: newerState
|
|
920
|
+
};
|
|
921
|
+
};
|
|
922
|
+
return wrapped;
|
|
923
|
+
},
|
|
924
|
+
diff(uid, modules, numbers) {
|
|
925
|
+
const {
|
|
926
|
+
oldState,
|
|
927
|
+
newState
|
|
928
|
+
} = states[uid];
|
|
929
|
+
const diffResult = [];
|
|
930
|
+
for (let i = 0; i < modules.length; i++) {
|
|
931
|
+
const fn = modules[i];
|
|
932
|
+
if (!fn(oldState, newState)) {
|
|
933
|
+
diffResult.push(numbers[i]);
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
return diffResult;
|
|
937
|
+
}
|
|
938
|
+
};
|
|
939
|
+
};
|
|
940
|
+
const terminate = () => {
|
|
941
|
+
globalThis.close();
|
|
850
942
|
};
|
|
851
943
|
|
|
852
|
-
const handleError = (error, notify = true, prefix = '') => {
|
|
944
|
+
const handleError = async (error, notify = true, prefix = '') => {
|
|
945
|
+
// @ts-ignore
|
|
853
946
|
console.error(error);
|
|
854
947
|
};
|
|
855
948
|
|
|
@@ -1110,7 +1203,8 @@ const handleInput = async (state, value) => {
|
|
|
1110
1203
|
// TODO handle out of order responses (a bit complicated)
|
|
1111
1204
|
// for now just assume everything comes back in order
|
|
1112
1205
|
} catch (error) {
|
|
1113
|
-
|
|
1206
|
+
// TODO send error to error worker
|
|
1207
|
+
await handleError(error);
|
|
1114
1208
|
return {
|
|
1115
1209
|
...state,
|
|
1116
1210
|
searchValue: value,
|
|
@@ -1127,73 +1221,14 @@ const closeSuggest = state => {
|
|
|
1127
1221
|
return state;
|
|
1128
1222
|
};
|
|
1129
1223
|
|
|
1130
|
-
const create$1 = () => {
|
|
1131
|
-
const states = Object.create(null);
|
|
1132
|
-
return {
|
|
1133
|
-
get(uid) {
|
|
1134
|
-
return states[uid];
|
|
1135
|
-
},
|
|
1136
|
-
set(uid, oldState, newState) {
|
|
1137
|
-
states[uid] = {
|
|
1138
|
-
oldState,
|
|
1139
|
-
newState
|
|
1140
|
-
};
|
|
1141
|
-
},
|
|
1142
|
-
dispose(uid) {
|
|
1143
|
-
delete states[uid];
|
|
1144
|
-
},
|
|
1145
|
-
getKeys() {
|
|
1146
|
-
return Object.keys(states).map(key => {
|
|
1147
|
-
return Number.parseInt(key);
|
|
1148
|
-
});
|
|
1149
|
-
},
|
|
1150
|
-
clear() {
|
|
1151
|
-
for (const key of Object.keys(states)) {
|
|
1152
|
-
delete states[key];
|
|
1153
|
-
}
|
|
1154
|
-
},
|
|
1155
|
-
wrapCommand(fn) {
|
|
1156
|
-
const wrapped = async (uid, ...args) => {
|
|
1157
|
-
const {
|
|
1158
|
-
newState
|
|
1159
|
-
} = states[uid];
|
|
1160
|
-
const newerState = await fn(newState, ...args);
|
|
1161
|
-
if (newState === newerState) {
|
|
1162
|
-
return;
|
|
1163
|
-
}
|
|
1164
|
-
const latest = states[uid];
|
|
1165
|
-
states[uid] = {
|
|
1166
|
-
oldState: latest.oldState,
|
|
1167
|
-
newState: newerState
|
|
1168
|
-
};
|
|
1169
|
-
};
|
|
1170
|
-
return wrapped;
|
|
1171
|
-
},
|
|
1172
|
-
diff(uid, modules, numbers) {
|
|
1173
|
-
const {
|
|
1174
|
-
oldState,
|
|
1175
|
-
newState
|
|
1176
|
-
} = states[uid];
|
|
1177
|
-
const diffResult = [];
|
|
1178
|
-
for (let i = 0; i < modules.length; i++) {
|
|
1179
|
-
const fn = modules[i];
|
|
1180
|
-
if (!fn(oldState, newState)) {
|
|
1181
|
-
diffResult.push(numbers[i]);
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
return diffResult;
|
|
1185
|
-
}
|
|
1186
|
-
};
|
|
1187
|
-
};
|
|
1188
|
-
|
|
1189
1224
|
const {
|
|
1190
1225
|
get: get$1,
|
|
1191
1226
|
set: set$1,
|
|
1192
1227
|
dispose: dispose$1,
|
|
1193
1228
|
wrapCommand
|
|
1194
|
-
} = create$
|
|
1229
|
+
} = create$2();
|
|
1195
1230
|
|
|
1196
|
-
const create = (id, uri, x, y, width, height, platform, assetDir) => {
|
|
1231
|
+
const create$1 = (id, uri, x, y, width, height, platform, assetDir) => {
|
|
1197
1232
|
const state = {
|
|
1198
1233
|
allExtensions: [],
|
|
1199
1234
|
assetDir,
|
|
@@ -1551,34 +1586,78 @@ const handleBlur = state => {
|
|
|
1551
1586
|
};
|
|
1552
1587
|
|
|
1553
1588
|
const rpcs = Object.create(null);
|
|
1554
|
-
const set$
|
|
1589
|
+
const set$g = (id, rpc) => {
|
|
1555
1590
|
rpcs[id] = rpc;
|
|
1556
1591
|
};
|
|
1557
1592
|
const get = id => {
|
|
1558
1593
|
return rpcs[id];
|
|
1559
1594
|
};
|
|
1595
|
+
|
|
1596
|
+
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
1597
|
+
|
|
1598
|
+
const create = rpcId => {
|
|
1599
|
+
return {
|
|
1600
|
+
// @ts-ignore
|
|
1601
|
+
invoke(method, ...params) {
|
|
1602
|
+
const rpc = get(rpcId);
|
|
1603
|
+
// @ts-ignore
|
|
1604
|
+
return rpc.invoke(method, ...params);
|
|
1605
|
+
},
|
|
1606
|
+
// @ts-ignore
|
|
1607
|
+
invokeAndTransfer(method, ...params) {
|
|
1608
|
+
const rpc = get(rpcId);
|
|
1609
|
+
// @ts-ignore
|
|
1610
|
+
return rpc.invokeAndTransfer(method, ...params);
|
|
1611
|
+
},
|
|
1612
|
+
set(rpc) {
|
|
1613
|
+
set$g(rpcId, rpc);
|
|
1614
|
+
},
|
|
1615
|
+
async dispose() {
|
|
1616
|
+
const rpc = get(rpcId);
|
|
1617
|
+
await rpc.dispose();
|
|
1618
|
+
}
|
|
1619
|
+
};
|
|
1620
|
+
};
|
|
1560
1621
|
const RendererWorker$1 = 1;
|
|
1561
|
-
const
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1622
|
+
const {
|
|
1623
|
+
invoke: invoke$3,
|
|
1624
|
+
set: set$3} = create(RendererWorker$1);
|
|
1625
|
+
const showContextMenu$1 = async (x, y, id, ...args) => {
|
|
1626
|
+
return invoke$3('ContextMenu.show', x, y, id, ...args);
|
|
1565
1627
|
};
|
|
1566
|
-
const
|
|
1567
|
-
|
|
1628
|
+
const setFocus$2 = key => {
|
|
1629
|
+
return invoke$3('Focus.setFocus', key);
|
|
1568
1630
|
};
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1571
|
-
invoke: invoke$2,
|
|
1572
|
-
set: set$2
|
|
1631
|
+
const openUri$2 = async (uri, focus, options) => {
|
|
1632
|
+
await invoke$3('Main.openUri', uri, focus, options);
|
|
1573
1633
|
};
|
|
1634
|
+
const RendererWorker$2 = {
|
|
1635
|
+
__proto__: null,
|
|
1636
|
+
invoke: invoke$3,
|
|
1637
|
+
openUri: openUri$2,
|
|
1638
|
+
set: set$3,
|
|
1639
|
+
setFocus: setFocus$2,
|
|
1640
|
+
showContextMenu: showContextMenu$1};
|
|
1574
1641
|
|
|
1575
1642
|
const {
|
|
1576
1643
|
invoke,
|
|
1577
|
-
set
|
|
1578
|
-
|
|
1644
|
+
set,
|
|
1645
|
+
showContextMenu,
|
|
1646
|
+
setFocus: setFocus$1,
|
|
1647
|
+
openUri: openUri$1
|
|
1648
|
+
} = RendererWorker$2;
|
|
1649
|
+
|
|
1650
|
+
const RendererWorker = {
|
|
1651
|
+
__proto__: null,
|
|
1652
|
+
invoke,
|
|
1653
|
+
openUri: openUri$1,
|
|
1654
|
+
set,
|
|
1655
|
+
setFocus: setFocus$1,
|
|
1656
|
+
showContextMenu
|
|
1657
|
+
};
|
|
1579
1658
|
|
|
1580
1659
|
const openUri = async uri => {
|
|
1581
|
-
return
|
|
1660
|
+
return openUri$1(uri);
|
|
1582
1661
|
};
|
|
1583
1662
|
|
|
1584
1663
|
const handleClick = async (state, index) => {
|
|
@@ -1635,7 +1714,7 @@ const show = async (x, y, id) => {
|
|
|
1635
1714
|
number(x);
|
|
1636
1715
|
number(y);
|
|
1637
1716
|
number(id);
|
|
1638
|
-
await
|
|
1717
|
+
await showContextMenu(x, y, id);
|
|
1639
1718
|
};
|
|
1640
1719
|
|
|
1641
1720
|
const ManageExtension = 8;
|
|
@@ -1655,9 +1734,9 @@ const handleEnable = (state, id) => {
|
|
|
1655
1734
|
return state;
|
|
1656
1735
|
};
|
|
1657
1736
|
|
|
1658
|
-
const
|
|
1659
|
-
|
|
1660
|
-
};
|
|
1737
|
+
const {
|
|
1738
|
+
setFocus
|
|
1739
|
+
} = RendererWorker;
|
|
1661
1740
|
|
|
1662
1741
|
const handleFocus = async state => {
|
|
1663
1742
|
await setFocus(FocusExtensions);
|
|
@@ -2436,10 +2515,6 @@ const scrollDown = state => {
|
|
|
2436
2515
|
return setDeltaY(state, newDeltaY);
|
|
2437
2516
|
};
|
|
2438
2517
|
|
|
2439
|
-
const terminate = () => {
|
|
2440
|
-
globalThis.close();
|
|
2441
|
-
};
|
|
2442
|
-
|
|
2443
2518
|
const toggleSuggest = state => {
|
|
2444
2519
|
return state;
|
|
2445
2520
|
};
|
|
@@ -2447,7 +2522,7 @@ const toggleSuggest = state => {
|
|
|
2447
2522
|
const commandMap = {
|
|
2448
2523
|
'SearchExtensions.clearSearchResults': wrapCommand(clearSearchResults),
|
|
2449
2524
|
'SearchExtensions.closeSuggest': wrapCommand(closeSuggest),
|
|
2450
|
-
'SearchExtensions.create': create,
|
|
2525
|
+
'SearchExtensions.create': create$1,
|
|
2451
2526
|
'SearchExtensions.diff2': diff2,
|
|
2452
2527
|
'SearchExtensions.dispose': dispose,
|
|
2453
2528
|
'SearchExtensions.focusFirst': wrapCommand(focusFirst),
|