@lvce-editor/activity-bar-worker 1.8.0 → 1.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.
@@ -1073,6 +1073,10 @@ const Home = 12;
1073
1073
  const UpArrow = 14;
1074
1074
  const DownArrow = 16;
1075
1075
 
1076
+ const ActivityBar$3 = 1;
1077
+ const Settings$1 = 12;
1078
+ const ActivityBarAdditionalViews = 17;
1079
+
1076
1080
  const LeftClick = 0;
1077
1081
 
1078
1082
  const DebugWorker = 55;
@@ -1136,15 +1140,6 @@ const getIndexFromPosition = (y, eventX, eventY, itemHeight, itemCount) => {
1136
1140
  return index;
1137
1141
  };
1138
1142
 
1139
- const show = async (x, y, id, ...args) => {
1140
- // TODO
1141
- };
1142
-
1143
- const handleClickAdditionalViews = async (state, x, y, viewletId) => {
1144
- await show();
1145
- return state;
1146
- };
1147
-
1148
1143
  const rpcs = Object.create(null);
1149
1144
  const set$2 = (id, rpc) => {
1150
1145
  rpcs[id] = rpc;
@@ -1532,6 +1527,15 @@ const RendererWorker = {
1532
1527
  writeClipBoardText
1533
1528
  };
1534
1529
 
1530
+ const show = async (x, y, id, ...args) => {
1531
+ await showContextMenu(x, y, id, args);
1532
+ };
1533
+
1534
+ const handleClickAdditionalViews = async (state, x, y, viewletId) => {
1535
+ await show(x, y, ActivityBarAdditionalViews);
1536
+ return state;
1537
+ };
1538
+
1535
1539
  const {
1536
1540
  set,
1537
1541
  invoke
@@ -1559,7 +1563,7 @@ const handleClickOther = async (state, x, y, viewletId) => {
1559
1563
  };
1560
1564
 
1561
1565
  const handleClickSettings = async (state, x, y, viewletId) => {
1562
- await show();
1566
+ await show(x, y, Settings$1);
1563
1567
  return state;
1564
1568
  };
1565
1569
 
@@ -1577,9 +1581,9 @@ const handleClickIndex = async (state, button, index, x, y) => {
1577
1581
  const viewletId = item.id;
1578
1582
  switch (viewletId) {
1579
1583
  case 'Settings':
1580
- return handleClickSettings(state);
1584
+ return handleClickSettings(state, x, y);
1581
1585
  case 'Additional Views':
1582
- return handleClickAdditionalViews(state);
1586
+ return handleClickAdditionalViews(state, x, y);
1583
1587
  default:
1584
1588
  return handleClickOther(state, x, y, viewletId);
1585
1589
  }
@@ -1596,7 +1600,7 @@ const handleClick = async (state, button, eventX, eventY) => {
1596
1600
  };
1597
1601
 
1598
1602
  const handleContextMenu = async (state, button, x, y) => {
1599
- await show();
1603
+ await show(x, y, ActivityBar$3);
1600
1604
  return state;
1601
1605
  };
1602
1606
 
@@ -1614,7 +1618,10 @@ const findIndex = (activityBarItems, id) => {
1614
1618
  };
1615
1619
 
1616
1620
  const handleSideBarViewletChange = (state, id, ...args) => {
1617
- const index = findIndex(state.activityBarItems, id);
1621
+ const {
1622
+ activityBarItems
1623
+ } = state;
1624
+ const index = findIndex(activityBarItems, id);
1618
1625
  return {
1619
1626
  ...state,
1620
1627
  selectedIndex: index
@@ -1941,7 +1948,8 @@ const renderEventListeners = () => {
1941
1948
  params: ['handleFocus']
1942
1949
  }, {
1943
1950
  name: HandleContextMenu,
1944
- params: ['handleContextMenu', Button$1, ClientX, ClientY]
1951
+ params: ['handleContextMenu', Button$1, ClientX, ClientY],
1952
+ preventDefault: true
1945
1953
  }, {
1946
1954
  name: HandleMouseDown,
1947
1955
  params: ['handleClick', Button$1, ClientX, ClientY],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/activity-bar-worker",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",