@lvce-editor/activity-bar-worker 2.1.0 → 2.3.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.
@@ -912,6 +912,8 @@ const Unchecked = 3;
912
912
 
913
913
  const LeftClick = 0;
914
914
 
915
+ const Web = 1;
916
+
915
917
  const RendererWorker = 1;
916
918
 
917
919
  const SetCss = 'Viewlet.setCss';
@@ -1072,7 +1074,7 @@ const create = (id, uri, x, y, width, height, args, parentUid, platform = 0) =>
1072
1074
  height,
1073
1075
  itemHeight: 48,
1074
1076
  numberOfVisibleItems: 0,
1075
- platform: 0,
1077
+ platform,
1076
1078
  scrollBarHeight: 0,
1077
1079
  selectedIndex: -1,
1078
1080
  sideBarLocation: 0,
@@ -1224,6 +1226,10 @@ const ActivityBar$2 = 'Activity Bar';
1224
1226
  const MoveSideBarLeft = 'Move Side Bar Left';
1225
1227
  const MoveSideBarRight = 'Move Side Bar Right';
1226
1228
  const HideActivityBar = 'Hide Activity Bar';
1229
+ const CheckForUpdates = 'Check For Updates';
1230
+ const ColorTheme = 'Color Theme';
1231
+ const CommandPalette = 'Command Palette';
1232
+ const KeyboardShortcuts = 'Keyboard Shortcuts';
1227
1233
 
1228
1234
  const explorer = () => {
1229
1235
  return i18nString(Explorer$1);
@@ -1240,7 +1246,7 @@ const runAndDebug = () => {
1240
1246
  const extensions = () => {
1241
1247
  return i18nString(Extensions$2);
1242
1248
  };
1243
- const settings$1 = () => {
1249
+ const settings = () => {
1244
1250
  return i18nString(Settings);
1245
1251
  };
1246
1252
  const additionalViews = () => {
@@ -1258,6 +1264,18 @@ const moveSideBarLeft = () => {
1258
1264
  const hideActivityBar = () => {
1259
1265
  return i18nString(HideActivityBar);
1260
1266
  };
1267
+ const checkForUpdates = () => {
1268
+ return i18nString(CheckForUpdates);
1269
+ };
1270
+ const commandPalette = () => {
1271
+ return i18nString(CommandPalette);
1272
+ };
1273
+ const keyboardShortcuts = () => {
1274
+ return i18nString(KeyboardShortcuts);
1275
+ };
1276
+ const colorTheme = () => {
1277
+ return i18nString(ColorTheme);
1278
+ };
1261
1279
 
1262
1280
  const Left = 1;
1263
1281
  const Right = 2;
@@ -1345,34 +1363,12 @@ const getMenuEntriesAdditionalViews = state => {
1345
1363
  return hiddenActivityBarItems.map(toContextMenuItem);
1346
1364
  };
1347
1365
 
1348
- /**
1349
- * @enum {string}
1350
- */
1351
- const UiStrings = {
1352
- CheckForUpdates: 'Check For Updates',
1353
- ColorTheme: 'Color Theme',
1354
- CommandPalette: 'Command Palette',
1355
- KeyboardShortcuts: 'Keyboard Shortcuts',
1356
- Settings: 'Settings'};
1357
- const checkForUpdates = () => {
1358
- return i18nString(UiStrings.CheckForUpdates);
1359
- };
1360
- const commandPalette = () => {
1361
- return i18nString(UiStrings.CommandPalette);
1362
- };
1363
- const settings = () => {
1364
- return i18nString(UiStrings.Settings);
1365
- };
1366
- const keyboardShortcuts = () => {
1367
- return i18nString(UiStrings.KeyboardShortcuts);
1368
- };
1369
- const colorTheme = () => {
1370
- return i18nString(UiStrings.ColorTheme);
1371
- };
1372
-
1373
1366
  const keyBindingsUri = 'app://keybindings';
1374
- const getMenuEntriesSettings = () => {
1375
- return [{
1367
+ const getMenuEntriesSettings = state => {
1368
+ const {
1369
+ platform
1370
+ } = state;
1371
+ const items = [{
1376
1372
  command: 'QuickPick.showEverything',
1377
1373
  flags: None,
1378
1374
  id: 'commandPalette',
@@ -1393,12 +1389,16 @@ const getMenuEntriesSettings = () => {
1393
1389
  flags: None,
1394
1390
  id: 'colorTheme',
1395
1391
  label: colorTheme()
1396
- }, menuEntrySeparator, {
1397
- command: 'AutoUpdater.checkForUpdates',
1398
- flags: None,
1399
- id: 'checkForUpdates',
1400
- label: checkForUpdates()
1401
1392
  }];
1393
+ if (platform !== Web) {
1394
+ items.push(menuEntrySeparator, {
1395
+ command: 'AutoUpdater.checkForUpdates',
1396
+ flags: None,
1397
+ id: 'checkForUpdates',
1398
+ label: checkForUpdates()
1399
+ });
1400
+ }
1401
+ return items;
1402
1402
  };
1403
1403
 
1404
1404
  const getMenuEntries = (state, options) => {
@@ -1411,7 +1411,7 @@ const getMenuEntries = (state, options) => {
1411
1411
  case ActivityBarAdditionalViews:
1412
1412
  return getMenuEntriesAdditionalViews(state);
1413
1413
  case Settings$1:
1414
- return getMenuEntriesSettings();
1414
+ return getMenuEntriesSettings(state);
1415
1415
  default:
1416
1416
  return [];
1417
1417
  }
@@ -1770,7 +1770,7 @@ const getActivityBarItems = () => {
1770
1770
  icon: SettingsGear,
1771
1771
  id: 'Settings',
1772
1772
  keyShortcuts: '',
1773
- title: settings$1()
1773
+ title: settings()
1774
1774
  }];
1775
1775
  };
1776
1776
 
@@ -1783,11 +1783,12 @@ const loadContent = async (state, savedState) => {
1783
1783
  const explorerIndex = 0;
1784
1784
  const itemsWithSelected = markSelected(items, explorerIndex);
1785
1785
  const filteredItems = getFilteredActivityBarItems(itemsWithSelected, height, itemHeight);
1786
+ const newItems = await updateItemsWithBadgeCount(filteredItems);
1786
1787
  return {
1787
1788
  ...state,
1788
1789
  activityBarItems: itemsWithSelected,
1789
1790
  currentViewletId: Explorer,
1790
- filteredItems,
1791
+ filteredItems: newItems,
1791
1792
  selectedIndex: explorerIndex,
1792
1793
  sideBarLocation: Left,
1793
1794
  sideBarVisible: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/activity-bar-worker",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",