@lvce-editor/extension-search-view 5.4.0 → 6.0.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.
|
@@ -521,7 +521,7 @@ const create$4$1 = (method, params) => {
|
|
|
521
521
|
};
|
|
522
522
|
};
|
|
523
523
|
const callbacks = Object.create(null);
|
|
524
|
-
const set$
|
|
524
|
+
const set$6 = (id, fn) => {
|
|
525
525
|
callbacks[id] = fn;
|
|
526
526
|
};
|
|
527
527
|
const get$2 = id => {
|
|
@@ -540,7 +540,7 @@ const registerPromise = () => {
|
|
|
540
540
|
resolve,
|
|
541
541
|
promise
|
|
542
542
|
} = Promise.withResolvers();
|
|
543
|
-
set$
|
|
543
|
+
set$6(id, resolve);
|
|
544
544
|
return {
|
|
545
545
|
id,
|
|
546
546
|
promise
|
|
@@ -1056,9 +1056,12 @@ const LeftClick = 0;
|
|
|
1056
1056
|
|
|
1057
1057
|
const ExtensionHostWorker = 44;
|
|
1058
1058
|
const RendererWorker = 1;
|
|
1059
|
+
const ExtensionManagementWorker = 9006;
|
|
1060
|
+
|
|
1061
|
+
const FocusSelector = 'Viewlet.focusSelector';
|
|
1059
1062
|
|
|
1060
1063
|
const rpcs = Object.create(null);
|
|
1061
|
-
const set$
|
|
1064
|
+
const set$5 = (id, rpc) => {
|
|
1062
1065
|
rpcs[id] = rpc;
|
|
1063
1066
|
};
|
|
1064
1067
|
const get$1 = id => {
|
|
@@ -1067,6 +1070,10 @@ const get$1 = id => {
|
|
|
1067
1070
|
|
|
1068
1071
|
const create$2 = rpcId => {
|
|
1069
1072
|
return {
|
|
1073
|
+
async dispose() {
|
|
1074
|
+
const rpc = get$1(rpcId);
|
|
1075
|
+
await rpc.dispose();
|
|
1076
|
+
},
|
|
1070
1077
|
// @ts-ignore
|
|
1071
1078
|
invoke(method, ...params) {
|
|
1072
1079
|
const rpc = get$1(rpcId);
|
|
@@ -1080,20 +1087,16 @@ const create$2 = rpcId => {
|
|
|
1080
1087
|
return rpc.invokeAndTransfer(method, ...params);
|
|
1081
1088
|
},
|
|
1082
1089
|
set(rpc) {
|
|
1083
|
-
set$
|
|
1084
|
-
},
|
|
1085
|
-
async dispose() {
|
|
1086
|
-
const rpc = get$1(rpcId);
|
|
1087
|
-
await rpc.dispose();
|
|
1090
|
+
set$5(rpcId, rpc);
|
|
1088
1091
|
}
|
|
1089
1092
|
};
|
|
1090
1093
|
};
|
|
1091
1094
|
|
|
1092
1095
|
const {
|
|
1096
|
+
dispose: dispose$2,
|
|
1093
1097
|
invoke: invoke$2,
|
|
1094
1098
|
invokeAndTransfer: invokeAndTransfer$1,
|
|
1095
|
-
set: set$
|
|
1096
|
-
dispose: dispose$2
|
|
1099
|
+
set: set$4
|
|
1097
1100
|
} = create$2(ExtensionHostWorker);
|
|
1098
1101
|
const executeReferenceProvider = async (id, offset) => {
|
|
1099
1102
|
// @ts-ignore
|
|
@@ -1111,7 +1114,7 @@ const registerMockRpc = commandMap => {
|
|
|
1111
1114
|
const mockRpc = createMockRpc({
|
|
1112
1115
|
commandMap
|
|
1113
1116
|
});
|
|
1114
|
-
set$
|
|
1117
|
+
set$4(mockRpc);
|
|
1115
1118
|
return mockRpc;
|
|
1116
1119
|
};
|
|
1117
1120
|
|
|
@@ -1124,13 +1127,18 @@ const ExtensionHost = {
|
|
|
1124
1127
|
invoke: invoke$2,
|
|
1125
1128
|
invokeAndTransfer: invokeAndTransfer$1,
|
|
1126
1129
|
registerMockRpc,
|
|
1127
|
-
set: set$
|
|
1130
|
+
set: set$4
|
|
1128
1131
|
};
|
|
1129
1132
|
|
|
1133
|
+
const {
|
|
1134
|
+
set: set$3
|
|
1135
|
+
} = create$2(ExtensionManagementWorker);
|
|
1136
|
+
|
|
1130
1137
|
const {
|
|
1131
1138
|
invoke: invoke$1,
|
|
1132
1139
|
invokeAndTransfer,
|
|
1133
|
-
set: set$2
|
|
1140
|
+
set: set$2
|
|
1141
|
+
} = create$2(RendererWorker);
|
|
1134
1142
|
const showContextMenu2 = async (uid, menuId, x, y, args) => {
|
|
1135
1143
|
number(uid);
|
|
1136
1144
|
number(menuId);
|
|
@@ -1146,6 +1154,10 @@ const sendMessagePortToExtensionHostWorker$1 = async (port, rpcId = 0) => {
|
|
|
1146
1154
|
const writeClipBoardText = async text => {
|
|
1147
1155
|
await invoke$1('ClipBoard.writeText', /* text */text);
|
|
1148
1156
|
};
|
|
1157
|
+
const sendMessagePortToExtensionManagementWorker = async (port, rpcId) => {
|
|
1158
|
+
const command = 'Extensions.handleMessagePort';
|
|
1159
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionManagementWorker', port, command, rpcId);
|
|
1160
|
+
};
|
|
1149
1161
|
const openUri$1 = async (uri, focus, options) => {
|
|
1150
1162
|
await invoke$1('Main.openUri', uri, focus, options);
|
|
1151
1163
|
};
|
|
@@ -1352,6 +1364,7 @@ const HandleTouchMove = 13;
|
|
|
1352
1364
|
const HandleTouchStart = 14;
|
|
1353
1365
|
const HandleWheel = 15;
|
|
1354
1366
|
const HandleHeaderContextMenu = 16;
|
|
1367
|
+
const HandleBlur = 17;
|
|
1355
1368
|
|
|
1356
1369
|
const ClearAll = 'ClearAll';
|
|
1357
1370
|
const Filter = 'Filter';
|
|
@@ -1772,7 +1785,7 @@ const isEqual$2 = (oldState, newState) => {
|
|
|
1772
1785
|
};
|
|
1773
1786
|
|
|
1774
1787
|
const isEqual$1 = (oldState, newState) => {
|
|
1775
|
-
return oldState.items === newState.items && oldState.minLineY === newState.minLineY && oldState.maxLineY === newState.maxLineY && oldState.deltaY === newState.deltaY && oldState.focusedIndex === newState.focusedIndex && oldState.message === newState.message && oldState.inputActions === newState.inputActions && oldState.placeholder === newState.placeholder && oldState.scrollBarHeight === newState.scrollBarHeight;
|
|
1788
|
+
return oldState.items === newState.items && oldState.minLineY === newState.minLineY && oldState.maxLineY === newState.maxLineY && oldState.deltaY === newState.deltaY && oldState.focusedIndex === newState.focusedIndex && oldState.message === newState.message && oldState.focus === newState.focus && oldState.inputActions === newState.inputActions && oldState.placeholder === newState.placeholder && oldState.scrollBarHeight === newState.scrollBarHeight;
|
|
1776
1789
|
};
|
|
1777
1790
|
|
|
1778
1791
|
const User = 1;
|
|
@@ -2393,8 +2406,29 @@ const initializeExtensionHostWorker = async () => {
|
|
|
2393
2406
|
set(rpc);
|
|
2394
2407
|
};
|
|
2395
2408
|
|
|
2409
|
+
const createExtensionManagementWorkerRpc = async () => {
|
|
2410
|
+
try {
|
|
2411
|
+
const rpc = await TransferMessagePortRpcParent.create({
|
|
2412
|
+
commandMap: {},
|
|
2413
|
+
send: port => sendMessagePortToExtensionManagementWorker(port, 0)
|
|
2414
|
+
});
|
|
2415
|
+
return rpc;
|
|
2416
|
+
} catch (error) {
|
|
2417
|
+
throw new VError(error, `Failed to create extension management rpc`);
|
|
2418
|
+
}
|
|
2419
|
+
};
|
|
2420
|
+
|
|
2421
|
+
const initializeExtensionManagementWorker = async () => {
|
|
2422
|
+
try {
|
|
2423
|
+
const rpc = await createExtensionManagementWorkerRpc();
|
|
2424
|
+
set$3(rpc);
|
|
2425
|
+
} catch {
|
|
2426
|
+
// ignore
|
|
2427
|
+
}
|
|
2428
|
+
};
|
|
2429
|
+
|
|
2396
2430
|
const initialize = async () => {
|
|
2397
|
-
await initializeExtensionHostWorker();
|
|
2431
|
+
await Promise.all([initializeExtensionHostWorker(), initializeExtensionManagementWorker()]);
|
|
2398
2432
|
};
|
|
2399
2433
|
|
|
2400
2434
|
const Web = 1;
|
|
@@ -2617,7 +2651,7 @@ const renderFocus = newState => {
|
|
|
2617
2651
|
return [];
|
|
2618
2652
|
}
|
|
2619
2653
|
const selector = getSelector(focus);
|
|
2620
|
-
return [
|
|
2654
|
+
return [FocusSelector, uid, selector];
|
|
2621
2655
|
};
|
|
2622
2656
|
|
|
2623
2657
|
const renderFocusContext = newState => {
|
|
@@ -2829,6 +2863,7 @@ const getExtensionsListVirtualDom = (visibleExtensions, focusOutline) => {
|
|
|
2829
2863
|
ariaLabel: extensions(),
|
|
2830
2864
|
childCount: visibleExtensions.length,
|
|
2831
2865
|
className,
|
|
2866
|
+
onBlur: HandleBlur,
|
|
2832
2867
|
onContextmenu: HandleContextMenu,
|
|
2833
2868
|
onContextMenu: HandleContextMenu,
|
|
2834
2869
|
onFocus: HandleFocus,
|
|
@@ -2949,7 +2984,7 @@ const getExtensionsViewVirtualDom = state => {
|
|
|
2949
2984
|
scrollBarHeight,
|
|
2950
2985
|
scrollBarY
|
|
2951
2986
|
} = state;
|
|
2952
|
-
const focusOutline = focusedIndex === -1;
|
|
2987
|
+
const focusOutline = focusedIndex === -1 && state.focus === List$2;
|
|
2953
2988
|
return [{
|
|
2954
2989
|
ariaBusy: false,
|
|
2955
2990
|
ariaLive: 'polite',
|
|
@@ -3125,6 +3160,9 @@ const renderEventListeners = () => {
|
|
|
3125
3160
|
}, {
|
|
3126
3161
|
name: HandleFocus,
|
|
3127
3162
|
params: ['handleFocus']
|
|
3163
|
+
}, {
|
|
3164
|
+
name: HandleBlur,
|
|
3165
|
+
params: ['handleBlur']
|
|
3128
3166
|
}];
|
|
3129
3167
|
};
|
|
3130
3168
|
|