@lvce-editor/activity-bar-worker 5.1.0 → 5.2.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.
@@ -1473,6 +1473,14 @@ const getMenuEntriesAccount = state => {
1473
1473
  }];
1474
1474
  };
1475
1475
 
1476
+ const Tab = 1;
1477
+ const Button = 1 << 1;
1478
+ const Progress = 1 << 2;
1479
+ const Enabled = 1 << 3;
1480
+ const Selected = 1 << 4;
1481
+ const Focused = 1 << 5;
1482
+ const MarginTop = 1 << 6;
1483
+
1476
1484
  const emptyObject = {};
1477
1485
  const RE_PLACEHOLDER = /\{(PH\d+)\}/g;
1478
1486
  const i18nString = (key, placeholders = emptyObject) => {
@@ -1579,14 +1587,6 @@ const menuEntrySeparator = {
1579
1587
  label: ''
1580
1588
  };
1581
1589
 
1582
- const Tab = 1;
1583
- const Button = 1 << 1;
1584
- const Progress = 1 << 2;
1585
- const Enabled = 1 << 3;
1586
- const Selected = 1 << 4;
1587
- const Focused = 1 << 5;
1588
- const MarginTop = 1 << 6;
1589
-
1590
1590
  const toContextMenuItem$1 = activityBarItem => {
1591
1591
  const isEnabled = activityBarItem.flags & Enabled;
1592
1592
  return {
@@ -1603,7 +1603,13 @@ const getMenuEntriesActivityBar = state => {
1603
1603
  activityBarItems,
1604
1604
  sideBarLocation
1605
1605
  } = state;
1606
- return [...activityBarItems.map(toContextMenuItem$1), menuEntrySeparator, menuEntryMoveSideBar(sideBarLocation), {
1606
+ const topItems = activityBarItems.filter(item => !(item.flags & Button));
1607
+ const bottomItems = activityBarItems.filter(item => item.flags & Button);
1608
+ const entries = [...topItems.map(toContextMenuItem$1)];
1609
+ if (bottomItems.length > 0) {
1610
+ entries.push(menuEntrySeparator, ...bottomItems.map(toContextMenuItem$1));
1611
+ }
1612
+ return [...entries, menuEntrySeparator, menuEntryMoveSideBar(sideBarLocation), {
1607
1613
  command: 'Layout.hideActivityBar',
1608
1614
  flags: None,
1609
1615
  id: 'hideActivityBar',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/activity-bar-worker",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",