@lvce-editor/status-bar-worker 1.3.0 → 1.5.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/statusBarWorkerMain.js +73 -2
- package/package.json +1 -1
|
@@ -1014,6 +1014,12 @@ const handleClick = (state, name) => {
|
|
|
1014
1014
|
return state;
|
|
1015
1015
|
};
|
|
1016
1016
|
|
|
1017
|
+
const initializeRendererProcess = async () => {};
|
|
1018
|
+
|
|
1019
|
+
const initialize = async () => {
|
|
1020
|
+
await initializeRendererProcess();
|
|
1021
|
+
};
|
|
1022
|
+
|
|
1017
1023
|
const getIndex = (items, item) => {
|
|
1018
1024
|
for (let i = 0; i < items.length; i++) {
|
|
1019
1025
|
if (items[i].name === item.name) {
|
|
@@ -1062,11 +1068,19 @@ const OnStatusBarItem = 'onStatusBarItem';
|
|
|
1062
1068
|
|
|
1063
1069
|
const GetStatusBarItems = 'ExtensionHost.getStatusBarItems';
|
|
1064
1070
|
|
|
1065
|
-
const Button = 'button';
|
|
1071
|
+
const Button$1 = 'button';
|
|
1066
1072
|
|
|
1067
1073
|
const Div = 4;
|
|
1068
1074
|
const Text = 12;
|
|
1069
1075
|
|
|
1076
|
+
const Button = 'event.button';
|
|
1077
|
+
const ClientX = 'event.clientX';
|
|
1078
|
+
const ClientY = 'event.clientY';
|
|
1079
|
+
const DeltaMode = 'event.deltaMode';
|
|
1080
|
+
const DeltaY = 'event.deltaY';
|
|
1081
|
+
const TargetName = 'event.target.name';
|
|
1082
|
+
const TargetValue = 'event.target.value';
|
|
1083
|
+
|
|
1070
1084
|
const ExtensionHostWorker = 44;
|
|
1071
1085
|
const RendererWorker = 1;
|
|
1072
1086
|
|
|
@@ -1210,7 +1224,7 @@ const getStatusBarItemVirtualDom = statusBarItem => {
|
|
|
1210
1224
|
return [{
|
|
1211
1225
|
childCount: 1,
|
|
1212
1226
|
className: StatusBarItem,
|
|
1213
|
-
role: Button,
|
|
1227
|
+
role: Button$1,
|
|
1214
1228
|
tabIndex: -1,
|
|
1215
1229
|
title: tooltip,
|
|
1216
1230
|
type: Div
|
|
@@ -1277,6 +1291,60 @@ const render2 = (uid, diffResult) => {
|
|
|
1277
1291
|
return commands;
|
|
1278
1292
|
};
|
|
1279
1293
|
|
|
1294
|
+
const HandleClickAt = 1;
|
|
1295
|
+
const HandleContextMenu = 2;
|
|
1296
|
+
const HandleFocus = 3;
|
|
1297
|
+
const HandleInput = 4;
|
|
1298
|
+
const HandleMouseOutAt = 6;
|
|
1299
|
+
const HandleMouseOver = 7;
|
|
1300
|
+
const HandleMouseOverAt = 8;
|
|
1301
|
+
const HandleWheel = 9;
|
|
1302
|
+
const HandleClickAction = 10;
|
|
1303
|
+
|
|
1304
|
+
const renderEventListeners = () => {
|
|
1305
|
+
return [{
|
|
1306
|
+
name: HandleWheel,
|
|
1307
|
+
params: ['handleWheel', DeltaMode, DeltaY],
|
|
1308
|
+
passive: true
|
|
1309
|
+
}, {
|
|
1310
|
+
name: HandleFocus,
|
|
1311
|
+
params: ['handleFocus']
|
|
1312
|
+
}, {
|
|
1313
|
+
name: HandleClickAt,
|
|
1314
|
+
params: ['handleClickAt', ClientX, ClientY, TargetName]
|
|
1315
|
+
}, {
|
|
1316
|
+
name: HandleMouseOverAt,
|
|
1317
|
+
params: ['handleMouseOverAt', ClientX, ClientY]
|
|
1318
|
+
}, {
|
|
1319
|
+
name: HandleMouseOver,
|
|
1320
|
+
params: ['handleMouseOver', ClientX, ClientY]
|
|
1321
|
+
}, {
|
|
1322
|
+
name: HandleMouseOutAt,
|
|
1323
|
+
params: ['handleMouseOutAt', ClientX, ClientY]
|
|
1324
|
+
}, {
|
|
1325
|
+
name: HandleInput,
|
|
1326
|
+
params: ['handleInput', TargetValue]
|
|
1327
|
+
}, {
|
|
1328
|
+
name: HandleContextMenu,
|
|
1329
|
+
params: ['handleContextMenu', Button, ClientX, ClientY],
|
|
1330
|
+
preventDefault: true
|
|
1331
|
+
}, {
|
|
1332
|
+
name: HandleWheel,
|
|
1333
|
+
params: ['handleWheel', DeltaMode, DeltaY],
|
|
1334
|
+
passive: true
|
|
1335
|
+
}, {
|
|
1336
|
+
name: HandleClickAction,
|
|
1337
|
+
params: ['handleActionClick', TargetName]
|
|
1338
|
+
}];
|
|
1339
|
+
};
|
|
1340
|
+
|
|
1341
|
+
const resize = (state, dimensions) => {
|
|
1342
|
+
return {
|
|
1343
|
+
...state,
|
|
1344
|
+
...dimensions
|
|
1345
|
+
};
|
|
1346
|
+
};
|
|
1347
|
+
|
|
1280
1348
|
const saveState = uid => {
|
|
1281
1349
|
number(uid);
|
|
1282
1350
|
const value = get$2(uid);
|
|
@@ -1297,11 +1365,14 @@ const commandMap = {
|
|
|
1297
1365
|
'StatusBar.create': create$1,
|
|
1298
1366
|
'StatusBar.diff2': diff2,
|
|
1299
1367
|
'StatusBar.handleClick': wrapCommand(handleClick),
|
|
1368
|
+
'StatusBar.initialize': initialize,
|
|
1300
1369
|
'StatusBar.itemLeftUpdate': wrapCommand(itemLeftUpdate),
|
|
1301
1370
|
'StatusBar.itemRightCreate': wrapCommand(itemRightCreate),
|
|
1302
1371
|
'StatusBar.itemRightUpdate': wrapCommand(itemRightUpdate),
|
|
1303
1372
|
'StatusBar.loadContent': wrapCommand(loadContent),
|
|
1304
1373
|
'StatusBar.render2': render2,
|
|
1374
|
+
'StatusBar.renderEventListeners': renderEventListeners,
|
|
1375
|
+
'StatusBar.resize': wrapCommand(resize),
|
|
1305
1376
|
'StatusBar.saveState': saveState,
|
|
1306
1377
|
'StatusBar.terminate': terminate
|
|
1307
1378
|
};
|