@lvce-editor/status-bar-worker 1.3.0 → 1.4.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.
@@ -1062,11 +1062,19 @@ const OnStatusBarItem = 'onStatusBarItem';
1062
1062
 
1063
1063
  const GetStatusBarItems = 'ExtensionHost.getStatusBarItems';
1064
1064
 
1065
- const Button = 'button';
1065
+ const Button$1 = 'button';
1066
1066
 
1067
1067
  const Div = 4;
1068
1068
  const Text = 12;
1069
1069
 
1070
+ const Button = 'event.button';
1071
+ const ClientX = 'event.clientX';
1072
+ const ClientY = 'event.clientY';
1073
+ const DeltaMode = 'event.deltaMode';
1074
+ const DeltaY = 'event.deltaY';
1075
+ const TargetName = 'event.target.name';
1076
+ const TargetValue = 'event.target.value';
1077
+
1070
1078
  const ExtensionHostWorker = 44;
1071
1079
  const RendererWorker = 1;
1072
1080
 
@@ -1210,7 +1218,7 @@ const getStatusBarItemVirtualDom = statusBarItem => {
1210
1218
  return [{
1211
1219
  childCount: 1,
1212
1220
  className: StatusBarItem,
1213
- role: Button,
1221
+ role: Button$1,
1214
1222
  tabIndex: -1,
1215
1223
  title: tooltip,
1216
1224
  type: Div
@@ -1277,6 +1285,53 @@ const render2 = (uid, diffResult) => {
1277
1285
  return commands;
1278
1286
  };
1279
1287
 
1288
+ const HandleClickAt = 1;
1289
+ const HandleContextMenu = 2;
1290
+ const HandleFocus = 3;
1291
+ const HandleInput = 4;
1292
+ const HandleMouseOutAt = 6;
1293
+ const HandleMouseOver = 7;
1294
+ const HandleMouseOverAt = 8;
1295
+ const HandleWheel = 9;
1296
+ const HandleClickAction = 10;
1297
+
1298
+ const renderEventListeners = () => {
1299
+ return [{
1300
+ name: HandleWheel,
1301
+ params: ['handleWheel', DeltaMode, DeltaY],
1302
+ passive: true
1303
+ }, {
1304
+ name: HandleFocus,
1305
+ params: ['handleFocus']
1306
+ }, {
1307
+ name: HandleClickAt,
1308
+ params: ['handleClickAt', ClientX, ClientY, TargetName]
1309
+ }, {
1310
+ name: HandleMouseOverAt,
1311
+ params: ['handleMouseOverAt', ClientX, ClientY]
1312
+ }, {
1313
+ name: HandleMouseOver,
1314
+ params: ['handleMouseOver', ClientX, ClientY]
1315
+ }, {
1316
+ name: HandleMouseOutAt,
1317
+ params: ['handleMouseOutAt', ClientX, ClientY]
1318
+ }, {
1319
+ name: HandleInput,
1320
+ params: ['handleInput', TargetValue]
1321
+ }, {
1322
+ name: HandleContextMenu,
1323
+ params: ['handleContextMenu', Button, ClientX, ClientY],
1324
+ preventDefault: true
1325
+ }, {
1326
+ name: HandleWheel,
1327
+ params: ['handleWheel', DeltaMode, DeltaY],
1328
+ passive: true
1329
+ }, {
1330
+ name: HandleClickAction,
1331
+ params: ['handleActionClick', TargetName]
1332
+ }];
1333
+ };
1334
+
1280
1335
  const saveState = uid => {
1281
1336
  number(uid);
1282
1337
  const value = get$2(uid);
@@ -1302,6 +1357,7 @@ const commandMap = {
1302
1357
  'StatusBar.itemRightUpdate': wrapCommand(itemRightUpdate),
1303
1358
  'StatusBar.loadContent': wrapCommand(loadContent),
1304
1359
  'StatusBar.render2': render2,
1360
+ 'StatusBar.renderEventListeners': renderEventListeners,
1305
1361
  'StatusBar.saveState': saveState,
1306
1362
  'StatusBar.terminate': terminate
1307
1363
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/status-bar-worker",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Status Bar Worker",
5
5
  "repository": {
6
6
  "type": "git",