@lvce-editor/source-control-worker 2.2.0 → 2.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.
@@ -1629,7 +1629,8 @@ const create2 = (id, uri, x, y, width, height, workspacePath) => {
1629
1629
  inputBoxMaxHeight: 214,
1630
1630
  history: [],
1631
1631
  viewMode: 1,
1632
- iconDefinitions: []
1632
+ iconDefinitions: [],
1633
+ decorationIcons: []
1633
1634
  };
1634
1635
  set$1(id, state, state);
1635
1636
  };
@@ -1716,6 +1717,17 @@ const Directory = 3;
1716
1717
  const DirectoryExpanded = 4;
1717
1718
  const File = 7;
1718
1719
 
1720
+ const getActualDecorationIcon = (iconDefinitions, icon) => {
1721
+ if (typeof icon === 'number') {
1722
+ const value = iconDefinitions[icon];
1723
+ if (!value) {
1724
+ return 'not-available';
1725
+ }
1726
+ return value;
1727
+ }
1728
+ return icon;
1729
+ };
1730
+
1719
1731
  const getFileIcon = ({
1720
1732
  name
1721
1733
  }) => {
@@ -1727,12 +1739,6 @@ const pathBaseName = path => {
1727
1739
  return path.slice(path.lastIndexOf('/') + 1);
1728
1740
  };
1729
1741
 
1730
- const getActualDecorationIcon = (iconDefinitions, icon) => {
1731
- if (typeof icon === 'number') {
1732
- return iconDefinitions[icon];
1733
- }
1734
- return icon;
1735
- };
1736
1742
  const getDisplayItemsGroup = (group, expandedGroups, iconDefinitions) => {
1737
1743
  const displayItems = [];
1738
1744
  const {
@@ -2127,10 +2133,12 @@ const loadContent = async (state, savedState) => {
2127
2133
  ...state,
2128
2134
  actionsCache,
2129
2135
  allGroups,
2136
+ decorationIcons: iconDefinitions,
2130
2137
  enabledProviderIds,
2131
2138
  fileIconCache: newFileIconCache,
2132
2139
  finalDeltaY,
2133
2140
  gitRoot,
2141
+ iconDefinitions,
2134
2142
  inputBoxHeight,
2135
2143
  inputPlaceholder,
2136
2144
  inputValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/source-control-worker",
3
- "version": "2.2.0",
3
+ "version": "2.4.0",
4
4
  "description": "Source Control Worker",
5
5
  "keywords": [
6
6
  "Lvce Editor"