vim-web 0.4.1-dev.0 → 0.4.1-dev.1

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.
@@ -46854,7 +46854,7 @@ void main() {
46854
46854
  return this._onDispose;
46855
46855
  }
46856
46856
  getBoundingBox() {
46857
- const box = this.getFullSet().getBoundingBox();
46857
+ const box = this.scene.getBoundingBox();
46858
46858
  return Promise.resolve(box);
46859
46859
  }
46860
46860
  /**
@@ -52585,15 +52585,18 @@ void main() {
52585
52585
  this._id = -1;
52586
52586
  }
52587
52587
  onPointerDown(event) {
52588
- if (this._id >= 0) {
52589
- this._canvas.releasePointerCapture(this._id);
52590
- }
52588
+ this.release();
52591
52589
  this._canvas.setPointerCapture(event.pointerId);
52592
52590
  this._id = event.pointerId;
52593
52591
  }
52594
52592
  onPointerUp(event) {
52595
- this._canvas.releasePointerCapture(this._id);
52596
- this._id = -1;
52593
+ this.release();
52594
+ }
52595
+ release() {
52596
+ if (this._id >= 0) {
52597
+ this._canvas.releasePointerCapture(this._id);
52598
+ this._id = -1;
52599
+ }
52597
52600
  }
52598
52601
  }
52599
52602
  class DoubleClickHandler {
@@ -68578,8 +68581,8 @@ Averrage Date/Second ${avgDataRatePS} kb
68578
68581
  InteractionMode2["ClickItemToExpand"] = "click-item-to-expand";
68579
68582
  InteractionMode2["ClickArrowToExpand"] = "click-arrow-to-expand";
68580
68583
  })(InteractionMode || (InteractionMode = {}));
68581
- var __assign$d = function() {
68582
- __assign$d = Object.assign || function(t) {
68584
+ var __assign$c = function() {
68585
+ __assign$c = Object.assign || function(t) {
68583
68586
  for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) {
68584
68587
  s = arguments[i2];
68585
68588
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -68587,13 +68590,13 @@ Averrage Date/Second ${avgDataRatePS} kb
68587
68590
  }
68588
68591
  return t;
68589
68592
  };
68590
- return __assign$d.apply(this, arguments);
68593
+ return __assign$c.apply(this, arguments);
68591
68594
  };
68592
68595
  var mergeInteractionManagers = function(main, fallback) {
68593
68596
  return {
68594
68597
  mode: main.mode,
68595
68598
  createInteractiveElementProps: function(item, treeId, actions, renderFlags) {
68596
- return __assign$d(__assign$d({}, fallback.createInteractiveElementProps(item, treeId, actions, renderFlags)), main.createInteractiveElementProps(item, treeId, actions, renderFlags));
68599
+ return __assign$c(__assign$c({}, fallback.createInteractiveElementProps(item, treeId, actions, renderFlags)), main.createInteractiveElementProps(item, treeId, actions, renderFlags));
68597
68600
  }
68598
68601
  };
68599
68602
  };
@@ -68611,10 +68614,11 @@ Averrage Date/Second ${avgDataRatePS} kb
68611
68614
  var _this = this;
68612
68615
  return {
68613
68616
  onClick: function(e) {
68617
+ var isSpacebarEvent = e.detail === 0;
68614
68618
  actions.focusItem();
68615
- if (e.shiftKey) {
68619
+ if (e.shiftKey && !isSpacebarEvent) {
68616
68620
  actions.selectUpTo(!isControlKey$1(e));
68617
- } else if (isControlKey$1(e)) {
68621
+ } else if (isControlKey$1(e) && !isSpacebarEvent) {
68618
68622
  if (renderFlags.isSelected) {
68619
68623
  actions.unselectItem();
68620
68624
  } else {
@@ -68662,10 +68666,11 @@ Averrage Date/Second ${avgDataRatePS} kb
68662
68666
  var _this = this;
68663
68667
  return {
68664
68668
  onClick: function(e) {
68669
+ var isSpacebarEvent = e.detail === 0;
68665
68670
  actions.focusItem();
68666
- if (e.shiftKey) {
68671
+ if (e.shiftKey && !isSpacebarEvent) {
68667
68672
  actions.selectUpTo(!isControlKey$1(e));
68668
- } else if (isControlKey$1(e)) {
68673
+ } else if (isControlKey$1(e) && !isSpacebarEvent) {
68669
68674
  if (renderFlags.isSelected) {
68670
68675
  actions.unselectItem();
68671
68676
  } else {
@@ -68709,10 +68714,11 @@ Averrage Date/Second ${avgDataRatePS} kb
68709
68714
  var _this = this;
68710
68715
  return {
68711
68716
  onClick: function(e) {
68717
+ var isSpacebarEvent = e.detail === 0;
68712
68718
  actions.focusItem();
68713
- if (e.shiftKey) {
68719
+ if (e.shiftKey && !isSpacebarEvent) {
68714
68720
  actions.selectUpTo(!isControlKey$1(e));
68715
- } else if (isControlKey$1(e)) {
68721
+ } else if (isControlKey$1(e) && !isSpacebarEvent) {
68716
68722
  if (renderFlags.isSelected) {
68717
68723
  actions.unselectItem();
68718
68724
  } else {
@@ -68830,7 +68836,7 @@ Averrage Date/Second ${avgDataRatePS} kb
68830
68836
  return isDescendant(treeId, parentLinearIndex, potentialParents);
68831
68837
  }, [getParentOfLinearItem]);
68832
68838
  return React2.useCallback(function(treeId, draggingItems) {
68833
- var _a3, _b2;
68839
+ var _a3, _b2, _c, _d;
68834
68840
  var linearItems = environment.linearItems[treeId];
68835
68841
  var targets = [];
68836
68842
  var skipUntilDepthIsLowerThan = -1;
@@ -68840,7 +68846,7 @@ Averrage Date/Second ${avgDataRatePS} kb
68840
68846
  // eslint-disable-next-line no-plusplus
68841
68847
  linearIndex++
68842
68848
  ) {
68843
- var _c = linearItems[linearIndex], item = _c.item, depth = _c.depth;
68849
+ var _e = linearItems[linearIndex], item = _e.item, depth = _e.depth;
68844
68850
  if (skipUntilDepthIsLowerThan !== -1 && depth > skipUntilDepthIsLowerThan) {
68845
68851
  continue;
68846
68852
  } else {
@@ -68878,14 +68884,17 @@ Averrage Date/Second ${avgDataRatePS} kb
68878
68884
  depth,
68879
68885
  treeId
68880
68886
  };
68881
- var skipTopPosition = depth === ((_b2 = (_a3 = linearItems[linearIndex - 1]) === null || _a3 === void 0 ? void 0 : _a3.depth) !== null && _b2 !== void 0 ? _b2 : -1);
68882
- if (!skipTopPosition && canDropAt(topPosition, draggingItems)) {
68887
+ var depthOfItemAbove = (_b2 = (_a3 = linearItems[linearIndex - 1]) === null || _a3 === void 0 ? void 0 : _a3.depth) !== null && _b2 !== void 0 ? _b2 : -1;
68888
+ var depthOfItemBelow = (_d = (_c = linearItems[linearIndex + 1]) === null || _c === void 0 ? void 0 : _c.depth) !== null && _d !== void 0 ? _d : -1;
68889
+ var isWithinFolder = depth === depthOfItemAbove;
68890
+ var isBelowOpenFolder = depth === depthOfItemBelow - 1;
68891
+ if (!isWithinFolder && canDropAt(topPosition, draggingItems)) {
68883
68892
  targets.push(topPosition);
68884
68893
  }
68885
68894
  if (canDropAt(itemPosition, draggingItems)) {
68886
68895
  targets.push(itemPosition);
68887
68896
  }
68888
- if (canDropAt(bottomPosition, draggingItems)) {
68897
+ if (!isBelowOpenFolder && canDropAt(bottomPosition, draggingItems)) {
68889
68898
  targets.push(bottomPosition);
68890
68899
  }
68891
68900
  }
@@ -68924,8 +68933,8 @@ Averrage Date/Second ${avgDataRatePS} kb
68924
68933
  }
68925
68934
  }, __spreadArray$4(__spreadArray$4([], deps, true), changeOn, true));
68926
68935
  };
68927
- var __assign$c = function() {
68928
- __assign$c = Object.assign || function(t) {
68936
+ var __assign$b = function() {
68937
+ __assign$b = Object.assign || function(t) {
68929
68938
  for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) {
68930
68939
  s = arguments[i2];
68931
68940
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -68933,7 +68942,7 @@ Averrage Date/Second ${avgDataRatePS} kb
68933
68942
  }
68934
68943
  return t;
68935
68944
  };
68936
- return __assign$c.apply(this, arguments);
68945
+ return __assign$b.apply(this, arguments);
68937
68946
  };
68938
68947
  var buildMapForTrees = function(treeIds, build) {
68939
68948
  return treeIds.map(function(id2) {
@@ -68941,7 +68950,7 @@ Averrage Date/Second ${avgDataRatePS} kb
68941
68950
  }).reduce(function(a, _a3) {
68942
68951
  var _b2;
68943
68952
  var id2 = _a3[0], obj = _a3[1];
68944
- return __assign$c(__assign$c({}, a), (_b2 = {}, _b2[id2] = obj, _b2));
68953
+ return __assign$b(__assign$b({}, a), (_b2 = {}, _b2[id2] = obj, _b2));
68945
68954
  }, {});
68946
68955
  };
68947
68956
  var getDocument = function() {
@@ -69448,7 +69457,7 @@ Averrage Date/Second ${avgDataRatePS} kb
69448
69457
  var programmaticDragDown = React2.useCallback(function() {
69449
69458
  if (environment.activeTreeId) {
69450
69459
  setProgrammaticDragIndex(function(oldIndex) {
69451
- return Math.min(viableDragPositions[environment.activeTreeId].length, oldIndex + 1);
69460
+ return Math.min(viableDragPositions[environment.activeTreeId].length - 1, oldIndex + 1);
69452
69461
  });
69453
69462
  }
69454
69463
  }, [environment.activeTreeId, viableDragPositions]);
@@ -69493,8 +69502,8 @@ Averrage Date/Second ${avgDataRatePS} kb
69493
69502
  }, [onDropHandler, resetState]);
69494
69503
  return React__namespace.createElement(DragAndDropContext.Provider, { value: dnd }, children);
69495
69504
  };
69496
- var __assign$b = function() {
69497
- __assign$b = Object.assign || function(t) {
69505
+ var __assign$a = function() {
69506
+ __assign$a = Object.assign || function(t) {
69498
69507
  for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) {
69499
69508
  s = arguments[i2];
69500
69509
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -69502,13 +69511,13 @@ Averrage Date/Second ${avgDataRatePS} kb
69502
69511
  }
69503
69512
  return t;
69504
69513
  };
69505
- return __assign$b.apply(this, arguments);
69514
+ return __assign$a.apply(this, arguments);
69506
69515
  };
69507
69516
  var useCreatedEnvironmentRef = function(ref, actions) {
69508
69517
  var environment = useTreeEnvironment();
69509
69518
  var dnd = useDragAndDrop();
69510
69519
  React2.useImperativeHandle(ref, function() {
69511
- return __assign$b(__assign$b(__assign$b({}, actions), environment), { treeEnvironmentContext: environment, dragAndDropContext: dnd });
69520
+ return __assign$a(__assign$a(__assign$a({}, actions), environment), { treeEnvironmentContext: environment, dragAndDropContext: dnd });
69512
69521
  });
69513
69522
  };
69514
69523
  var waitFor = function(check2, intervalMs, timeoutMs) {
@@ -69864,8 +69873,8 @@ Averrage Date/Second ${avgDataRatePS} kb
69864
69873
  }
69865
69874
  }
69866
69875
  };
69867
- var __assign$a = function() {
69868
- __assign$a = Object.assign || function(t) {
69876
+ var __assign$9 = function() {
69877
+ __assign$9 = Object.assign || function(t) {
69869
69878
  for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) {
69870
69879
  s = arguments[i2];
69871
69880
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -69873,7 +69882,7 @@ Averrage Date/Second ${avgDataRatePS} kb
69873
69882
  }
69874
69883
  return t;
69875
69884
  };
69876
- return __assign$a.apply(this, arguments);
69885
+ return __assign$9.apply(this, arguments);
69877
69886
  };
69878
69887
  var cx$1 = function() {
69879
69888
  var classNames = [];
@@ -69904,7 +69913,7 @@ Averrage Date/Second ${avgDataRatePS} kb
69904
69913
  var item = _a3.item, context = _a3.context;
69905
69914
  return (
69906
69915
  // Icons from https://blueprintjs.com/docs/#icons
69907
- React2.createElement("div", __assign$a({ className: cx$1(item.isFolder && "rct-tree-item-arrow-isFolder", context.isExpanded && "rct-tree-item-arrow-expanded", "rct-tree-item-arrow") }, context.arrowProps), item.isFolder && (context.isExpanded ? React2.createElement(
69916
+ React2.createElement("div", __assign$9({ className: cx$1(item.isFolder && "rct-tree-item-arrow-isFolder", context.isExpanded && "rct-tree-item-arrow-expanded", "rct-tree-item-arrow") }, context.arrowProps), item.isFolder && (context.isExpanded ? React2.createElement(
69908
69917
  "svg",
69909
69918
  { version: "1.1", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", x: "0px", y: "0px", viewBox: "0 0 16 16", enableBackground: "new 0 0 16 16", xmlSpace: "preserve" },
69910
69919
  React2.createElement(
@@ -69937,12 +69946,12 @@ Averrage Date/Second ${avgDataRatePS} kb
69937
69946
  var type = context.isRenaming ? void 0 : "button";
69938
69947
  return React2.createElement(
69939
69948
  "li",
69940
- __assign$a({}, context.itemContainerWithChildrenProps, { className: cx$1("rct-tree-item-li", item.isFolder && "rct-tree-item-li-isFolder", context.isSelected && "rct-tree-item-li-selected", context.isExpanded && "rct-tree-item-li-expanded", context.isFocused && "rct-tree-item-li-focused", context.isDraggingOver && "rct-tree-item-li-dragging-over", context.isSearchMatching && "rct-tree-item-li-search-match") }),
69949
+ __assign$9({}, context.itemContainerWithChildrenProps, { className: cx$1("rct-tree-item-li", item.isFolder && "rct-tree-item-li-isFolder", context.isSelected && "rct-tree-item-li-selected", context.isExpanded && "rct-tree-item-li-expanded", context.isFocused && "rct-tree-item-li-focused", context.isDraggingOver && "rct-tree-item-li-dragging-over", context.isSearchMatching && "rct-tree-item-li-search-match") }),
69941
69950
  React2.createElement(
69942
69951
  "div",
69943
- __assign$a({}, context.itemContainerWithoutChildrenProps, { style: { "--depthOffset": "".concat((depth + 1) * renderDepthOffset, "px") }, className: cx$1("rct-tree-item-title-container", item.isFolder && "rct-tree-item-title-container-isFolder", context.isSelected && "rct-tree-item-title-container-selected", context.isExpanded && "rct-tree-item-title-container-expanded", context.isFocused && "rct-tree-item-title-container-focused", context.isDraggingOver && "rct-tree-item-title-container-dragging-over", context.isSearchMatching && "rct-tree-item-title-container-search-match") }),
69952
+ __assign$9({}, context.itemContainerWithoutChildrenProps, { style: { "--depthOffset": "".concat((depth + 1) * renderDepthOffset, "px") }, className: cx$1("rct-tree-item-title-container", item.isFolder && "rct-tree-item-title-container-isFolder", context.isSelected && "rct-tree-item-title-container-selected", context.isExpanded && "rct-tree-item-title-container-expanded", context.isFocused && "rct-tree-item-title-container-focused", context.isDraggingOver && "rct-tree-item-title-container-dragging-over", context.isSearchMatching && "rct-tree-item-title-container-search-match") }),
69944
69953
  arrow,
69945
- React2.createElement(InteractiveComponent, __assign$a({ type }, context.interactiveElementProps, { className: cx$1("rct-tree-item-button", item.isFolder && "rct-tree-item-button-isFolder", context.isSelected && "rct-tree-item-button-selected", context.isExpanded && "rct-tree-item-button-expanded", context.isFocused && "rct-tree-item-button-focused", context.isDraggingOver && "rct-tree-item-button-dragging-over", context.isSearchMatching && "rct-tree-item-button-search-match") }), title2)
69954
+ React2.createElement(InteractiveComponent, __assign$9({ type }, context.interactiveElementProps, { className: cx$1("rct-tree-item-button", item.isFolder && "rct-tree-item-button-isFolder", context.isSelected && "rct-tree-item-button-selected", context.isExpanded && "rct-tree-item-button-expanded", context.isFocused && "rct-tree-item-button-focused", context.isDraggingOver && "rct-tree-item-button-dragging-over", context.isSearchMatching && "rct-tree-item-button-search-match") }), title2)
69946
69955
  ),
69947
69956
  children
69948
69957
  );
@@ -69951,9 +69960,9 @@ Averrage Date/Second ${avgDataRatePS} kb
69951
69960
  var inputProps = _a3.inputProps, inputRef = _a3.inputRef, submitButtonProps = _a3.submitButtonProps, submitButtonRef = _a3.submitButtonRef, formProps = _a3.formProps;
69952
69961
  return React2.createElement(
69953
69962
  "form",
69954
- __assign$a({}, formProps, { className: "rct-tree-item-renaming-form" }),
69955
- React2.createElement("input", __assign$a({}, inputProps, { ref: inputRef, className: "rct-tree-item-renaming-input" })),
69956
- React2.createElement("input", __assign$a({}, submitButtonProps, { ref: submitButtonRef, type: "submit", className: "rct-tree-item-renaming-submit-button", value: "🗸" }))
69963
+ __assign$9({}, formProps, { className: "rct-tree-item-renaming-form" }),
69964
+ React2.createElement("input", __assign$9({}, inputProps, { ref: inputRef, className: "rct-tree-item-renaming-input" })),
69965
+ React2.createElement("input", __assign$9({}, submitButtonProps, { ref: submitButtonRef, type: "submit", className: "rct-tree-item-renaming-submit-button", value: "🗸" }))
69957
69966
  );
69958
69967
  },
69959
69968
  renderTreeContainer: function(_a3) {
@@ -69961,16 +69970,16 @@ Averrage Date/Second ${avgDataRatePS} kb
69961
69970
  return React2.createElement(
69962
69971
  "div",
69963
69972
  { className: cx$1("rct-tree-root", info.isFocused && "rct-tree-root-focus", info.isRenaming && "rct-tree-root-renaming", info.areItemsSelected && "rct-tree-root-itemsselected", rtl) },
69964
- React2.createElement("div", __assign$a({}, containerProps, { style: __assign$a({ minHeight: "30px" }, containerProps.style) }), children)
69973
+ React2.createElement("div", __assign$9({}, containerProps, { style: __assign$9({ minHeight: "30px" }, containerProps.style) }), children)
69965
69974
  );
69966
69975
  },
69967
69976
  renderItemsContainer: function(_a3) {
69968
69977
  var children = _a3.children, containerProps = _a3.containerProps;
69969
- return React2.createElement("ul", __assign$a({}, containerProps, { className: "rct-tree-items-container" }), children);
69978
+ return React2.createElement("ul", __assign$9({}, containerProps, { className: "rct-tree-items-container" }), children);
69970
69979
  },
69971
69980
  renderDragBetweenLine: function(_a3) {
69972
69981
  var draggingPosition = _a3.draggingPosition, lineProps = _a3.lineProps;
69973
- return React2.createElement("div", __assign$a({}, lineProps, { style: { left: "".concat(draggingPosition.depth * renderDepthOffset, "px") }, className: cx$1("rct-tree-drag-between-line", draggingPosition.targetType === "between-items" && draggingPosition.linePosition === "top" && "rct-tree-drag-between-line-top", draggingPosition.targetType === "between-items" && draggingPosition.linePosition === "bottom" && "rct-tree-drag-between-line-bottom") }));
69982
+ return React2.createElement("div", __assign$9({}, lineProps, { style: { left: "".concat(draggingPosition.depth * renderDepthOffset, "px") }, className: cx$1("rct-tree-drag-between-line", draggingPosition.targetType === "between-items" && draggingPosition.linePosition === "top" && "rct-tree-drag-between-line-top", draggingPosition.targetType === "between-items" && draggingPosition.linePosition === "bottom" && "rct-tree-drag-between-line-bottom") }));
69974
69983
  },
69975
69984
  renderSearchInput: function(_a3) {
69976
69985
  var inputProps = _a3.inputProps;
@@ -69978,7 +69987,7 @@ Averrage Date/Second ${avgDataRatePS} kb
69978
69987
  "div",
69979
69988
  { className: cx$1("rct-tree-search-input-container") },
69980
69989
  React2.createElement("span", { className: "rct-tree-input-icon" }),
69981
- React2.createElement("input", __assign$a({}, inputProps, { className: cx$1("rct-tree-search-input") }))
69990
+ React2.createElement("input", __assign$9({}, inputProps, { className: cx$1("rct-tree-search-input") }))
69982
69991
  );
69983
69992
  },
69984
69993
  renderLiveDescriptorContainer: function(_a3) {
@@ -70049,8 +70058,8 @@ Averrage Date/Second ${avgDataRatePS} kb
70049
70058
  }
70050
70059
  return itemIds;
70051
70060
  };
70052
- var __assign$9 = function() {
70053
- __assign$9 = Object.assign || function(t) {
70061
+ var __assign$8 = function() {
70062
+ __assign$8 = Object.assign || function(t) {
70054
70063
  for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) {
70055
70064
  s = arguments[i2];
70056
70065
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -70058,7 +70067,7 @@ Averrage Date/Second ${avgDataRatePS} kb
70058
70067
  }
70059
70068
  return t;
70060
70069
  };
70061
- return __assign$9.apply(this, arguments);
70070
+ return __assign$8.apply(this, arguments);
70062
70071
  };
70063
70072
  var __rest = function(s, e) {
70064
70073
  var t = {};
@@ -70108,7 +70117,7 @@ Averrage Date/Second ${avgDataRatePS} kb
70108
70117
  var registerTree = React2.useCallback(function(tree) {
70109
70118
  setTrees(function(trees3) {
70110
70119
  var _a4;
70111
- return __assign$9(__assign$9({}, trees3), (_a4 = {}, _a4[tree.treeId] = tree, _a4));
70120
+ return __assign$8(__assign$8({}, trees3), (_a4 = {}, _a4[tree.treeId] = tree, _a4));
70112
70121
  });
70113
70122
  onRegisterTree === null || onRegisterTree === void 0 ? void 0 : onRegisterTree(tree);
70114
70123
  }, [onRegisterTree]);
@@ -70165,33 +70174,26 @@ Averrage Date/Second ${avgDataRatePS} kb
70165
70174
  }
70166
70175
  }, [autoFocus, focusTree]);
70167
70176
  var renderers = useRenderers(props);
70168
- return __assign$9(__assign$9(__assign$9({}, renderers), props), { onFocusItem: onFocusItemHandler, registerTree, unregisterTree, onExpandItem, onCollapseItem, onDrop, setActiveTree, treeIds, trees: trees2, activeTreeId, linearItems });
70169
- };
70170
- var __assign$8 = function() {
70171
- __assign$8 = Object.assign || function(t) {
70172
- for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) {
70173
- s = arguments[i2];
70174
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
70175
- t[p] = s[p];
70176
- }
70177
- return t;
70178
- };
70179
- return __assign$8.apply(this, arguments);
70177
+ return __assign$8(__assign$8(__assign$8({}, renderers), props), { onFocusItem: onFocusItemHandler, registerTree, unregisterTree, onExpandItem, onCollapseItem, onDrop, setActiveTree, treeIds, trees: trees2, activeTreeId, linearItems });
70180
70178
  };
70181
70179
  var TreeEnvironmentContext = React__namespace.createContext(null);
70182
70180
  var useTreeEnvironment = function() {
70183
70181
  return React2.useContext(TreeEnvironmentContext);
70184
70182
  };
70185
70183
  var ControlledTreeEnvironment = React__namespace.forwardRef(function(props, ref) {
70186
- var _a3, _b2, _c;
70187
70184
  var environmentContextProps = useControlledTreeEnvironmentProps(props);
70188
- var viewState = props.viewState;
70189
- for (var _i = 0, _d = Object.keys(environmentContextProps.trees); _i < _d.length; _i++) {
70190
- var treeId = _d[_i];
70191
- if (!((_a3 = viewState[treeId]) === null || _a3 === void 0 ? void 0 : _a3.focusedItem) && environmentContextProps.trees[treeId]) {
70192
- viewState[treeId] = __assign$8(__assign$8({}, viewState[treeId]), { focusedItem: (_c = (_b2 = props.items[environmentContextProps.trees[treeId].rootItem]) === null || _b2 === void 0 ? void 0 : _b2.children) === null || _c === void 0 ? void 0 : _c[0] });
70185
+ var viewState = props.viewState, onFocusItem = props.onFocusItem;
70186
+ React2.useEffect(function() {
70187
+ var _a3, _b2, _c;
70188
+ for (var _i = 0, _d = Object.keys(environmentContextProps.trees); _i < _d.length; _i++) {
70189
+ var treeId = _d[_i];
70190
+ var firstItemIndex = (_b2 = (_a3 = props.items[environmentContextProps.trees[treeId].rootItem]) === null || _a3 === void 0 ? void 0 : _a3.children) === null || _b2 === void 0 ? void 0 : _b2[0];
70191
+ var firstItem = firstItemIndex && props.items[firstItemIndex];
70192
+ if (!((_c = viewState[treeId]) === null || _c === void 0 ? void 0 : _c.focusedItem) && environmentContextProps.trees[treeId] && firstItem) {
70193
+ onFocusItem === null || onFocusItem === void 0 ? void 0 : onFocusItem(firstItem, treeId, false);
70194
+ }
70193
70195
  }
70194
- }
70196
+ }, [environmentContextProps.trees, onFocusItem, props.items, viewState]);
70195
70197
  return React__namespace.createElement(
70196
70198
  TreeEnvironmentContext.Provider,
70197
70199
  { value: environmentContextProps },
@@ -70286,11 +70288,11 @@ Averrage Date/Second ${avgDataRatePS} kb
70286
70288
  primaryAction: ["enter"],
70287
70289
  renameItem: ["f2"],
70288
70290
  abortRenameItem: ["escape"],
70289
- toggleSelectItem: ["control+space"],
70291
+ toggleSelectItem: ["control+ "],
70290
70292
  abortSearch: ["escape", "enter"],
70291
70293
  startSearch: [],
70292
70294
  selectAll: ["control+a"],
70293
- startProgrammaticDnd: ["control+d"],
70295
+ startProgrammaticDnd: ["control+shift+d"],
70294
70296
  completeProgrammaticDnd: ["enter"],
70295
70297
  abortProgrammaticDnd: ["escape"]
70296
70298
  };
@@ -70350,7 +70352,7 @@ Averrage Date/Second ${avgDataRatePS} kb
70350
70352
  return a || b;
70351
70353
  }, false);
70352
70354
  if (partialMatch) {
70353
- if (pressedKeys.current.length > 1 || !/^[a-zA-Z]$/.test(e.key)) {
70355
+ if (pressedKeys.current.length > 1 || !/^[a-zA-Z\s]$/.test(e.key)) {
70354
70356
  e.preventDefault();
70355
70357
  }
70356
70358
  }
@@ -70584,6 +70586,7 @@ Averrage Date/Second ${avgDataRatePS} kb
70584
70586
  useHotkey("toggleSelectItem", function(e) {
70585
70587
  var _a4, _b3, _c;
70586
70588
  e.preventDefault();
70589
+ e.stopPropagation();
70587
70590
  if (viewState.focusedItem !== void 0) {
70588
70591
  if (viewState.selectedItems && viewState.selectedItems.includes(viewState.focusedItem)) {
70589
70592
  (_a4 = environment.onSelectItems) === null || _a4 === void 0 ? void 0 : _a4.call(environment, viewState.selectedItems.filter(function(item) {