@lvce-editor/source-control-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.
@@ -1045,13 +1045,13 @@ const Text = 12;
1045
1045
  const Img = 17;
1046
1046
  const TextArea = 62;
1047
1047
 
1048
- const TargetValue = 'event.target.value';
1048
+ const Button$1 = 'event.button';
1049
1049
  const ClientX = 'event.clientX';
1050
1050
  const ClientY = 'event.clientY';
1051
- const Button$1 = 'event.button';
1052
1051
  const DeltaMode = 'event.deltaMode';
1053
1052
  const DeltaY = 'event.deltaY';
1054
1053
  const TargetName = 'event.target.name';
1054
+ const TargetValue = 'event.target.value';
1055
1055
 
1056
1056
  const User = 1;
1057
1057
 
@@ -1716,6 +1716,17 @@ const Directory = 3;
1716
1716
  const DirectoryExpanded = 4;
1717
1717
  const File = 7;
1718
1718
 
1719
+ const getActualDecorationIcon = (iconDefinitions, icon) => {
1720
+ if (typeof icon === 'number') {
1721
+ const value = iconDefinitions[icon];
1722
+ if (!value) {
1723
+ return 'not-available';
1724
+ }
1725
+ return value;
1726
+ }
1727
+ return icon;
1728
+ };
1729
+
1719
1730
  const getFileIcon = ({
1720
1731
  name
1721
1732
  }) => {
@@ -1768,10 +1779,7 @@ const getDisplayItemsGroup = (group, expandedGroups, iconDefinitions) => {
1768
1779
  } = item;
1769
1780
  const baseName = pathBaseName(file);
1770
1781
  const folderName = file.slice(0, -baseName.length - 1);
1771
- let actualDecorationIcon = icon;
1772
- if (typeof icon === 'number') {
1773
- actualDecorationIcon = iconDefinitions[icon];
1774
- }
1782
+ const actualDecorationIcon = getActualDecorationIcon(iconDefinitions, icon);
1775
1783
  displayItems.push({
1776
1784
  file,
1777
1785
  label: baseName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/source-control-worker",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "description": "Source Control Worker",
5
5
  "keywords": [
6
6
  "Lvce Editor"