@lvce-editor/explorer-view 2.15.0 → 2.17.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.
@@ -3893,6 +3893,8 @@ const getVisibleExplorerItems = (items, minLineY, maxLineY, focusedIndex, editin
3893
3893
  const className = isFocused ? mergeClassNames(TreeItem, TreeItemActive) : TreeItem;
3894
3894
  const expanded = getExpandedType(item.type);
3895
3895
  const ariaExpanded = ariaExpandedValues[expanded];
3896
+
3897
+ // @ts-ignore
3896
3898
  visible.push({
3897
3899
  ...item,
3898
3900
  isEditing: i === editingIndex,
@@ -4224,7 +4226,7 @@ const getPathPartChildren = async pathPart => {
4224
4226
  return children;
4225
4227
  };
4226
4228
  const mergeVisibleWithHiddenItems = (visibleItems, hiddenItems) => {
4227
- const merged = [...hiddenItems];
4229
+ const merged = [...visibleItems, ...hiddenItems];
4228
4230
  const seen = Object.create(null);
4229
4231
  const unique = [];
4230
4232
  for (const item of merged) {
@@ -4234,57 +4236,6 @@ const mergeVisibleWithHiddenItems = (visibleItems, hiddenItems) => {
4234
4236
  seen[item.path] = true;
4235
4237
  unique.push(item);
4236
4238
  }
4237
-
4238
- // depth one
4239
- // let depth=1
4240
- // while(true){
4241
- // for(const item of unique){
4242
- // if(item.depth===depth){
4243
- // ordered.push(item)
4244
- // }
4245
- // }
4246
- // break
4247
- // }
4248
- // const getChildren = (path) => {
4249
- // const children = []
4250
- // for (const item of unique) {
4251
- // if (item.path.startsWith(path) && item.path !== path) {
4252
- // ordered.push(item)
4253
- // }
4254
- // }
4255
- // return children
4256
- // }
4257
- // for (const item of unique) {
4258
- // for (const potentialChild of unique) {
4259
- // if (
4260
- // potentialChild.path.startsWith(item.path) &&
4261
- // potentialChild.path !== item.path
4262
- // ) {
4263
- // ordered.push(potentialChild)
4264
- // }
4265
- // }
4266
- // }
4267
- // const refreshedRoots = Object.create(null)
4268
- // for (const hiddenItem of hiddenItems) {
4269
- // const parent = hiddenItem.path.slice(0, hiddenItem.path.lastIndexOf('/'))
4270
- // refreshedRoots[parent] = true
4271
- // }
4272
- // const mergedDirents = []
4273
- // for(const v)
4274
- // for (const visibleItem of visibleItems) {
4275
- // if (visibleItem.path === hiddenItemRoot) {
4276
- // // TODO update aria posinset and aria setsize
4277
- // mergedDirents.push(...hiddenItems)
4278
- // } else {
4279
- // for (const hiddenItem of hiddenItems) {
4280
- // if (hiddenItem.path === visibleItem.path) {
4281
- // continue
4282
- // }
4283
- // }
4284
- // mergedDirents.push(visibleItem)
4285
- // }
4286
- // }
4287
-
4288
4239
  return unique;
4289
4240
  };
4290
4241
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/explorer-view",
3
- "version": "2.15.0",
3
+ "version": "2.17.0",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",