@lvce-editor/explorer-view 2.30.0 → 2.32.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.
@@ -442,7 +442,7 @@ const create$4 = (method, params) => {
442
442
  };
443
443
  };
444
444
  const callbacks = Object.create(null);
445
- const set$2 = (id, fn) => {
445
+ const set$1 = (id, fn) => {
446
446
  callbacks[id] = fn;
447
447
  };
448
448
  const get$2 = id => {
@@ -461,7 +461,7 @@ const registerPromise = () => {
461
461
  resolve,
462
462
  promise
463
463
  } = Promise.withResolvers();
464
- set$2(id, resolve);
464
+ set$1(id, resolve);
465
465
  return {
466
466
  id,
467
467
  promise
@@ -989,6 +989,10 @@ const getPath = item => {
989
989
  return item.path;
990
990
  };
991
991
 
992
+ const getPaths = items => {
993
+ return items.map(getPath);
994
+ };
995
+
992
996
  const DELTA_EDITING = 100;
993
997
 
994
998
  const BlockDevice = 1;
@@ -1009,7 +1013,7 @@ const EditingDirectoryExpanded = DirectoryExpanded + DELTA_EDITING;
1009
1013
  const RendererWorker = 1;
1010
1014
 
1011
1015
  const rpcs = Object.create(null);
1012
- const set$1 = (id, rpc) => {
1016
+ const set$3 = (id, rpc) => {
1013
1017
  rpcs[id] = rpc;
1014
1018
  };
1015
1019
  const get$1 = id => {
@@ -1058,7 +1062,7 @@ const getFileIcons = async (dirents, fileIconCache) => {
1058
1062
  const missingRequests = getMissingIconRequests(dirents, fileIconCache);
1059
1063
  const newIcons = await requestFileIcons(missingRequests);
1060
1064
  const newFileIconCache = updateIconCache(fileIconCache, missingRequests, newIcons);
1061
- const paths = dirents.map(getPath);
1065
+ const paths = getPaths(dirents);
1062
1066
  const icons = getIconsCached(paths, newFileIconCache);
1063
1067
  return {
1064
1068
  icons,
@@ -1653,7 +1657,11 @@ const create2 = (uid, uri, x, y, width, height, args, parentUid, platform = 0) =
1653
1657
  end: 0
1654
1658
  },
1655
1659
  focusWord: '',
1656
- focusWordTimeout: 800
1660
+ focusWordTimeout: 800,
1661
+ finalDeltaY: 0,
1662
+ handleOffset: 0,
1663
+ scrollBarActive: false,
1664
+ scrollBarHeight: 0
1657
1665
  };
1658
1666
  set(uid, state, state);
1659
1667
  };
@@ -1696,7 +1704,11 @@ const create = (id, uri, x, y, width, height, args, parentUid, platform = 0) =>
1696
1704
  end: 0
1697
1705
  },
1698
1706
  focusWord: '',
1699
- focusWordTimeout: 800
1707
+ focusWordTimeout: 800,
1708
+ finalDeltaY: 0,
1709
+ handleOffset: 0,
1710
+ scrollBarActive: false,
1711
+ scrollBarHeight: 0
1700
1712
  };
1701
1713
  set(state.uid, state, state);
1702
1714
  return state;
@@ -2976,10 +2988,6 @@ const getExpandedDirents = items => {
2976
2988
  return items.filter(isExpanded);
2977
2989
  };
2978
2990
 
2979
- const getPaths = items => {
2980
- return items.map(getPath);
2981
- };
2982
-
2983
2991
  const refreshChildDirent = async (folder, dirent, pathSeparator, expandedFolders) => {
2984
2992
  const path = folder.path.endsWith(pathSeparator) ? `${folder.path}${dirent.name}` : `${folder.path}${pathSeparator}${dirent.name}`;
2985
2993
  const isExpandedFolder = expandedFolders.includes(path);
@@ -3835,10 +3843,11 @@ const loadContent = async (state, savedState) => {
3835
3843
  deltaY = savedState.deltaY;
3836
3844
  }
3837
3845
  const maxLineY = getExplorerMaxLineY(minLineY, height, itemHeight, restoredDirents.length);
3846
+ const visible = restoredDirents.slice(minLineY, maxLineY);
3838
3847
  const {
3839
3848
  icons,
3840
3849
  newFileIconCache
3841
- } = await getFileIcons(restoredDirents, fileIconCache);
3850
+ } = await getFileIcons(visible, fileIconCache);
3842
3851
  return {
3843
3852
  ...state,
3844
3853
  root,
@@ -4134,14 +4143,14 @@ const Chevron = 'Chevron';
4134
4143
  const Empty = '';
4135
4144
  const Explorer = 'Explorer';
4136
4145
  const ExplorerDropTarget = 'DropTarget';
4146
+ const ExplorerInputBox = 'ExplorerInputBox';
4137
4147
  const FileIcon = 'FileIcon';
4138
4148
  const FocusOutline = 'FocusOutline';
4139
- const ListItems = 'ListItems';
4140
4149
  const IconButton = 'IconButton';
4141
4150
  const InputBox = 'InputBox';
4142
- const ExplorerInputBox = 'ExplorerInputBox';
4143
4151
  const InputValidationError = 'InputValidationError';
4144
4152
  const Label = 'Label';
4153
+ const ListItems = 'ListItems';
4145
4154
  const MaskIconChevronDown = 'MaskIconChevronDown';
4146
4155
  const MaskIconChevronRight = 'MaskIconChevronRight';
4147
4156
  const TreeItem = 'TreeItem';
@@ -5103,7 +5112,7 @@ const listen = async () => {
5103
5112
  const rpc = await WebWorkerRpcClient.create({
5104
5113
  commandMap: commandMap
5105
5114
  });
5106
- set$1(RendererWorker, rpc);
5115
+ set$3(RendererWorker, rpc);
5107
5116
  };
5108
5117
 
5109
5118
  const main = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/explorer-view",
3
- "version": "2.30.0",
3
+ "version": "2.32.0",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",