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

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.
@@ -37,7 +37,8 @@ export declare class Element3D implements IVimElement {
37
37
  set color(color: RGBA32 | undefined);
38
38
  /**
39
39
  * Computes and returns the bounding box of the element.
40
+ * Returns undefined if the element is abstract.
40
41
  * @returns A promise resolving to the element's bounding box.
41
42
  */
42
- getBoundingBox(): Promise<Box3>;
43
+ getBoundingBox(): Promise<Box3 | undefined>;
43
44
  }
@@ -87,7 +87,7 @@ export declare class Element3D implements IVimElement {
87
87
  getBimParameters(): Promise<VimHelpers.ElementParameter[]>;
88
88
  /**
89
89
  * Retrieves the bounding box of the object from cache or computes it if needed.
90
- * Returns undefined if the object has no geometry.
90
+ * Returns undefined if the element is abstract.
91
91
  * @returns {THREE.Box3 | undefined} The bounding box of the object, or undefined if the object has no geometry.
92
92
  */
93
93
  getBoundingBox(): Promise<THREE.Box3>;
@@ -45597,7 +45597,7 @@ void main() {
45597
45597
  }
45598
45598
  /**
45599
45599
  * Retrieves the bounding box of the object from cache or computes it if needed.
45600
- * Returns undefined if the object has no geometry.
45600
+ * Returns undefined if the element is abstract.
45601
45601
  * @returns {THREE.Box3 | undefined} The bounding box of the object, or undefined if the object has no geometry.
45602
45602
  */
45603
45603
  async getBoundingBox() {
@@ -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 {
@@ -61005,6 +61008,7 @@ Averrage Date/Second ${avgDataRatePS} kb
61005
61008
  }
61006
61009
  /**
61007
61010
  * Computes and returns the bounding box of the element.
61011
+ * Returns undefined if the element is abstract.
61008
61012
  * @returns A promise resolving to the element's bounding box.
61009
61013
  */
61010
61014
  async getBoundingBox() {
@@ -68578,8 +68582,8 @@ Averrage Date/Second ${avgDataRatePS} kb
68578
68582
  InteractionMode2["ClickItemToExpand"] = "click-item-to-expand";
68579
68583
  InteractionMode2["ClickArrowToExpand"] = "click-arrow-to-expand";
68580
68584
  })(InteractionMode || (InteractionMode = {}));
68581
- var __assign$d = function() {
68582
- __assign$d = Object.assign || function(t) {
68585
+ var __assign$c = function() {
68586
+ __assign$c = Object.assign || function(t) {
68583
68587
  for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) {
68584
68588
  s = arguments[i2];
68585
68589
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -68587,13 +68591,13 @@ Averrage Date/Second ${avgDataRatePS} kb
68587
68591
  }
68588
68592
  return t;
68589
68593
  };
68590
- return __assign$d.apply(this, arguments);
68594
+ return __assign$c.apply(this, arguments);
68591
68595
  };
68592
68596
  var mergeInteractionManagers = function(main, fallback) {
68593
68597
  return {
68594
68598
  mode: main.mode,
68595
68599
  createInteractiveElementProps: function(item, treeId, actions, renderFlags) {
68596
- return __assign$d(__assign$d({}, fallback.createInteractiveElementProps(item, treeId, actions, renderFlags)), main.createInteractiveElementProps(item, treeId, actions, renderFlags));
68600
+ return __assign$c(__assign$c({}, fallback.createInteractiveElementProps(item, treeId, actions, renderFlags)), main.createInteractiveElementProps(item, treeId, actions, renderFlags));
68597
68601
  }
68598
68602
  };
68599
68603
  };
@@ -68611,10 +68615,11 @@ Averrage Date/Second ${avgDataRatePS} kb
68611
68615
  var _this = this;
68612
68616
  return {
68613
68617
  onClick: function(e) {
68618
+ var isSpacebarEvent = e.detail === 0;
68614
68619
  actions.focusItem();
68615
- if (e.shiftKey) {
68620
+ if (e.shiftKey && !isSpacebarEvent) {
68616
68621
  actions.selectUpTo(!isControlKey$1(e));
68617
- } else if (isControlKey$1(e)) {
68622
+ } else if (isControlKey$1(e) && !isSpacebarEvent) {
68618
68623
  if (renderFlags.isSelected) {
68619
68624
  actions.unselectItem();
68620
68625
  } else {
@@ -68662,10 +68667,11 @@ Averrage Date/Second ${avgDataRatePS} kb
68662
68667
  var _this = this;
68663
68668
  return {
68664
68669
  onClick: function(e) {
68670
+ var isSpacebarEvent = e.detail === 0;
68665
68671
  actions.focusItem();
68666
- if (e.shiftKey) {
68672
+ if (e.shiftKey && !isSpacebarEvent) {
68667
68673
  actions.selectUpTo(!isControlKey$1(e));
68668
- } else if (isControlKey$1(e)) {
68674
+ } else if (isControlKey$1(e) && !isSpacebarEvent) {
68669
68675
  if (renderFlags.isSelected) {
68670
68676
  actions.unselectItem();
68671
68677
  } else {
@@ -68709,10 +68715,11 @@ Averrage Date/Second ${avgDataRatePS} kb
68709
68715
  var _this = this;
68710
68716
  return {
68711
68717
  onClick: function(e) {
68718
+ var isSpacebarEvent = e.detail === 0;
68712
68719
  actions.focusItem();
68713
- if (e.shiftKey) {
68720
+ if (e.shiftKey && !isSpacebarEvent) {
68714
68721
  actions.selectUpTo(!isControlKey$1(e));
68715
- } else if (isControlKey$1(e)) {
68722
+ } else if (isControlKey$1(e) && !isSpacebarEvent) {
68716
68723
  if (renderFlags.isSelected) {
68717
68724
  actions.unselectItem();
68718
68725
  } else {
@@ -68830,7 +68837,7 @@ Averrage Date/Second ${avgDataRatePS} kb
68830
68837
  return isDescendant(treeId, parentLinearIndex, potentialParents);
68831
68838
  }, [getParentOfLinearItem]);
68832
68839
  return React2.useCallback(function(treeId, draggingItems) {
68833
- var _a3, _b2;
68840
+ var _a3, _b2, _c, _d;
68834
68841
  var linearItems = environment.linearItems[treeId];
68835
68842
  var targets = [];
68836
68843
  var skipUntilDepthIsLowerThan = -1;
@@ -68840,7 +68847,7 @@ Averrage Date/Second ${avgDataRatePS} kb
68840
68847
  // eslint-disable-next-line no-plusplus
68841
68848
  linearIndex++
68842
68849
  ) {
68843
- var _c = linearItems[linearIndex], item = _c.item, depth = _c.depth;
68850
+ var _e = linearItems[linearIndex], item = _e.item, depth = _e.depth;
68844
68851
  if (skipUntilDepthIsLowerThan !== -1 && depth > skipUntilDepthIsLowerThan) {
68845
68852
  continue;
68846
68853
  } else {
@@ -68878,14 +68885,17 @@ Averrage Date/Second ${avgDataRatePS} kb
68878
68885
  depth,
68879
68886
  treeId
68880
68887
  };
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)) {
68888
+ var depthOfItemAbove = (_b2 = (_a3 = linearItems[linearIndex - 1]) === null || _a3 === void 0 ? void 0 : _a3.depth) !== null && _b2 !== void 0 ? _b2 : -1;
68889
+ var depthOfItemBelow = (_d = (_c = linearItems[linearIndex + 1]) === null || _c === void 0 ? void 0 : _c.depth) !== null && _d !== void 0 ? _d : -1;
68890
+ var isWithinFolder = depth === depthOfItemAbove;
68891
+ var isBelowOpenFolder = depth === depthOfItemBelow - 1;
68892
+ if (!isWithinFolder && canDropAt(topPosition, draggingItems)) {
68883
68893
  targets.push(topPosition);
68884
68894
  }
68885
68895
  if (canDropAt(itemPosition, draggingItems)) {
68886
68896
  targets.push(itemPosition);
68887
68897
  }
68888
- if (canDropAt(bottomPosition, draggingItems)) {
68898
+ if (!isBelowOpenFolder && canDropAt(bottomPosition, draggingItems)) {
68889
68899
  targets.push(bottomPosition);
68890
68900
  }
68891
68901
  }
@@ -68924,8 +68934,8 @@ Averrage Date/Second ${avgDataRatePS} kb
68924
68934
  }
68925
68935
  }, __spreadArray$4(__spreadArray$4([], deps, true), changeOn, true));
68926
68936
  };
68927
- var __assign$c = function() {
68928
- __assign$c = Object.assign || function(t) {
68937
+ var __assign$b = function() {
68938
+ __assign$b = Object.assign || function(t) {
68929
68939
  for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) {
68930
68940
  s = arguments[i2];
68931
68941
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -68933,7 +68943,7 @@ Averrage Date/Second ${avgDataRatePS} kb
68933
68943
  }
68934
68944
  return t;
68935
68945
  };
68936
- return __assign$c.apply(this, arguments);
68946
+ return __assign$b.apply(this, arguments);
68937
68947
  };
68938
68948
  var buildMapForTrees = function(treeIds, build) {
68939
68949
  return treeIds.map(function(id2) {
@@ -68941,7 +68951,7 @@ Averrage Date/Second ${avgDataRatePS} kb
68941
68951
  }).reduce(function(a, _a3) {
68942
68952
  var _b2;
68943
68953
  var id2 = _a3[0], obj = _a3[1];
68944
- return __assign$c(__assign$c({}, a), (_b2 = {}, _b2[id2] = obj, _b2));
68954
+ return __assign$b(__assign$b({}, a), (_b2 = {}, _b2[id2] = obj, _b2));
68945
68955
  }, {});
68946
68956
  };
68947
68957
  var getDocument = function() {
@@ -69448,7 +69458,7 @@ Averrage Date/Second ${avgDataRatePS} kb
69448
69458
  var programmaticDragDown = React2.useCallback(function() {
69449
69459
  if (environment.activeTreeId) {
69450
69460
  setProgrammaticDragIndex(function(oldIndex) {
69451
- return Math.min(viableDragPositions[environment.activeTreeId].length, oldIndex + 1);
69461
+ return Math.min(viableDragPositions[environment.activeTreeId].length - 1, oldIndex + 1);
69452
69462
  });
69453
69463
  }
69454
69464
  }, [environment.activeTreeId, viableDragPositions]);
@@ -69493,8 +69503,8 @@ Averrage Date/Second ${avgDataRatePS} kb
69493
69503
  }, [onDropHandler, resetState]);
69494
69504
  return React__namespace.createElement(DragAndDropContext.Provider, { value: dnd }, children);
69495
69505
  };
69496
- var __assign$b = function() {
69497
- __assign$b = Object.assign || function(t) {
69506
+ var __assign$a = function() {
69507
+ __assign$a = Object.assign || function(t) {
69498
69508
  for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) {
69499
69509
  s = arguments[i2];
69500
69510
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -69502,13 +69512,13 @@ Averrage Date/Second ${avgDataRatePS} kb
69502
69512
  }
69503
69513
  return t;
69504
69514
  };
69505
- return __assign$b.apply(this, arguments);
69515
+ return __assign$a.apply(this, arguments);
69506
69516
  };
69507
69517
  var useCreatedEnvironmentRef = function(ref, actions) {
69508
69518
  var environment = useTreeEnvironment();
69509
69519
  var dnd = useDragAndDrop();
69510
69520
  React2.useImperativeHandle(ref, function() {
69511
- return __assign$b(__assign$b(__assign$b({}, actions), environment), { treeEnvironmentContext: environment, dragAndDropContext: dnd });
69521
+ return __assign$a(__assign$a(__assign$a({}, actions), environment), { treeEnvironmentContext: environment, dragAndDropContext: dnd });
69512
69522
  });
69513
69523
  };
69514
69524
  var waitFor = function(check2, intervalMs, timeoutMs) {
@@ -69864,8 +69874,8 @@ Averrage Date/Second ${avgDataRatePS} kb
69864
69874
  }
69865
69875
  }
69866
69876
  };
69867
- var __assign$a = function() {
69868
- __assign$a = Object.assign || function(t) {
69877
+ var __assign$9 = function() {
69878
+ __assign$9 = Object.assign || function(t) {
69869
69879
  for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) {
69870
69880
  s = arguments[i2];
69871
69881
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -69873,7 +69883,7 @@ Averrage Date/Second ${avgDataRatePS} kb
69873
69883
  }
69874
69884
  return t;
69875
69885
  };
69876
- return __assign$a.apply(this, arguments);
69886
+ return __assign$9.apply(this, arguments);
69877
69887
  };
69878
69888
  var cx$1 = function() {
69879
69889
  var classNames = [];
@@ -69904,7 +69914,7 @@ Averrage Date/Second ${avgDataRatePS} kb
69904
69914
  var item = _a3.item, context = _a3.context;
69905
69915
  return (
69906
69916
  // 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(
69917
+ 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
69918
  "svg",
69909
69919
  { 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
69920
  React2.createElement(
@@ -69937,12 +69947,12 @@ Averrage Date/Second ${avgDataRatePS} kb
69937
69947
  var type = context.isRenaming ? void 0 : "button";
69938
69948
  return React2.createElement(
69939
69949
  "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") }),
69950
+ __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
69951
  React2.createElement(
69942
69952
  "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") }),
69953
+ __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
69954
  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)
69955
+ 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
69956
  ),
69947
69957
  children
69948
69958
  );
@@ -69951,9 +69961,9 @@ Averrage Date/Second ${avgDataRatePS} kb
69951
69961
  var inputProps = _a3.inputProps, inputRef = _a3.inputRef, submitButtonProps = _a3.submitButtonProps, submitButtonRef = _a3.submitButtonRef, formProps = _a3.formProps;
69952
69962
  return React2.createElement(
69953
69963
  "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: "🗸" }))
69964
+ __assign$9({}, formProps, { className: "rct-tree-item-renaming-form" }),
69965
+ React2.createElement("input", __assign$9({}, inputProps, { ref: inputRef, className: "rct-tree-item-renaming-input" })),
69966
+ React2.createElement("input", __assign$9({}, submitButtonProps, { ref: submitButtonRef, type: "submit", className: "rct-tree-item-renaming-submit-button", value: "🗸" }))
69957
69967
  );
69958
69968
  },
69959
69969
  renderTreeContainer: function(_a3) {
@@ -69961,16 +69971,16 @@ Averrage Date/Second ${avgDataRatePS} kb
69961
69971
  return React2.createElement(
69962
69972
  "div",
69963
69973
  { 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)
69974
+ React2.createElement("div", __assign$9({}, containerProps, { style: __assign$9({ minHeight: "30px" }, containerProps.style) }), children)
69965
69975
  );
69966
69976
  },
69967
69977
  renderItemsContainer: function(_a3) {
69968
69978
  var children = _a3.children, containerProps = _a3.containerProps;
69969
- return React2.createElement("ul", __assign$a({}, containerProps, { className: "rct-tree-items-container" }), children);
69979
+ return React2.createElement("ul", __assign$9({}, containerProps, { className: "rct-tree-items-container" }), children);
69970
69980
  },
69971
69981
  renderDragBetweenLine: function(_a3) {
69972
69982
  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") }));
69983
+ 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
69984
  },
69975
69985
  renderSearchInput: function(_a3) {
69976
69986
  var inputProps = _a3.inputProps;
@@ -69978,7 +69988,7 @@ Averrage Date/Second ${avgDataRatePS} kb
69978
69988
  "div",
69979
69989
  { className: cx$1("rct-tree-search-input-container") },
69980
69990
  React2.createElement("span", { className: "rct-tree-input-icon" }),
69981
- React2.createElement("input", __assign$a({}, inputProps, { className: cx$1("rct-tree-search-input") }))
69991
+ React2.createElement("input", __assign$9({}, inputProps, { className: cx$1("rct-tree-search-input") }))
69982
69992
  );
69983
69993
  },
69984
69994
  renderLiveDescriptorContainer: function(_a3) {
@@ -70049,8 +70059,8 @@ Averrage Date/Second ${avgDataRatePS} kb
70049
70059
  }
70050
70060
  return itemIds;
70051
70061
  };
70052
- var __assign$9 = function() {
70053
- __assign$9 = Object.assign || function(t) {
70062
+ var __assign$8 = function() {
70063
+ __assign$8 = Object.assign || function(t) {
70054
70064
  for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) {
70055
70065
  s = arguments[i2];
70056
70066
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -70058,7 +70068,7 @@ Averrage Date/Second ${avgDataRatePS} kb
70058
70068
  }
70059
70069
  return t;
70060
70070
  };
70061
- return __assign$9.apply(this, arguments);
70071
+ return __assign$8.apply(this, arguments);
70062
70072
  };
70063
70073
  var __rest = function(s, e) {
70064
70074
  var t = {};
@@ -70108,7 +70118,7 @@ Averrage Date/Second ${avgDataRatePS} kb
70108
70118
  var registerTree = React2.useCallback(function(tree) {
70109
70119
  setTrees(function(trees3) {
70110
70120
  var _a4;
70111
- return __assign$9(__assign$9({}, trees3), (_a4 = {}, _a4[tree.treeId] = tree, _a4));
70121
+ return __assign$8(__assign$8({}, trees3), (_a4 = {}, _a4[tree.treeId] = tree, _a4));
70112
70122
  });
70113
70123
  onRegisterTree === null || onRegisterTree === void 0 ? void 0 : onRegisterTree(tree);
70114
70124
  }, [onRegisterTree]);
@@ -70165,33 +70175,26 @@ Averrage Date/Second ${avgDataRatePS} kb
70165
70175
  }
70166
70176
  }, [autoFocus, focusTree]);
70167
70177
  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);
70178
+ return __assign$8(__assign$8(__assign$8({}, renderers), props), { onFocusItem: onFocusItemHandler, registerTree, unregisterTree, onExpandItem, onCollapseItem, onDrop, setActiveTree, treeIds, trees: trees2, activeTreeId, linearItems });
70180
70179
  };
70181
70180
  var TreeEnvironmentContext = React__namespace.createContext(null);
70182
70181
  var useTreeEnvironment = function() {
70183
70182
  return React2.useContext(TreeEnvironmentContext);
70184
70183
  };
70185
70184
  var ControlledTreeEnvironment = React__namespace.forwardRef(function(props, ref) {
70186
- var _a3, _b2, _c;
70187
70185
  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] });
70186
+ var viewState = props.viewState, onFocusItem = props.onFocusItem;
70187
+ React2.useEffect(function() {
70188
+ var _a3, _b2, _c;
70189
+ for (var _i = 0, _d = Object.keys(environmentContextProps.trees); _i < _d.length; _i++) {
70190
+ var treeId = _d[_i];
70191
+ 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];
70192
+ var firstItem = firstItemIndex && props.items[firstItemIndex];
70193
+ if (!((_c = viewState[treeId]) === null || _c === void 0 ? void 0 : _c.focusedItem) && environmentContextProps.trees[treeId] && firstItem) {
70194
+ onFocusItem === null || onFocusItem === void 0 ? void 0 : onFocusItem(firstItem, treeId, false);
70195
+ }
70193
70196
  }
70194
- }
70197
+ }, [environmentContextProps.trees, onFocusItem, props.items, viewState]);
70195
70198
  return React__namespace.createElement(
70196
70199
  TreeEnvironmentContext.Provider,
70197
70200
  { value: environmentContextProps },
@@ -70286,11 +70289,11 @@ Averrage Date/Second ${avgDataRatePS} kb
70286
70289
  primaryAction: ["enter"],
70287
70290
  renameItem: ["f2"],
70288
70291
  abortRenameItem: ["escape"],
70289
- toggleSelectItem: ["control+space"],
70292
+ toggleSelectItem: ["control+ "],
70290
70293
  abortSearch: ["escape", "enter"],
70291
70294
  startSearch: [],
70292
70295
  selectAll: ["control+a"],
70293
- startProgrammaticDnd: ["control+d"],
70296
+ startProgrammaticDnd: ["control+shift+d"],
70294
70297
  completeProgrammaticDnd: ["enter"],
70295
70298
  abortProgrammaticDnd: ["escape"]
70296
70299
  };
@@ -70350,7 +70353,7 @@ Averrage Date/Second ${avgDataRatePS} kb
70350
70353
  return a || b;
70351
70354
  }, false);
70352
70355
  if (partialMatch) {
70353
- if (pressedKeys.current.length > 1 || !/^[a-zA-Z]$/.test(e.key)) {
70356
+ if (pressedKeys.current.length > 1 || !/^[a-zA-Z\s]$/.test(e.key)) {
70354
70357
  e.preventDefault();
70355
70358
  }
70356
70359
  }
@@ -70584,6 +70587,7 @@ Averrage Date/Second ${avgDataRatePS} kb
70584
70587
  useHotkey("toggleSelectItem", function(e) {
70585
70588
  var _a4, _b3, _c;
70586
70589
  e.preventDefault();
70590
+ e.stopPropagation();
70587
70591
  if (viewState.focusedItem !== void 0) {
70588
70592
  if (viewState.selectedItems && viewState.selectedItems.includes(viewState.focusedItem)) {
70589
70593
  (_a4 = environment.onSelectItems) === null || _a4 === void 0 ? void 0 : _a4.call(environment, viewState.selectedItems.filter(function(item) {
@@ -75822,11 +75826,15 @@ Averrage Date/Second ${avgDataRatePS} kb
75822
75826
  adapter.setBox(newBox);
75823
75827
  });
75824
75828
  const sectionSelection2 = useFuncRef(async () => {
75829
+ const currentBox = boxRef.current.clone();
75825
75830
  const box = await getSelectionBox.call() ?? await getSceneBox.call();
75831
+ if (!currentBox.equals(boxRef.current)) return;
75826
75832
  sectionBox2.call(box);
75827
75833
  });
75828
75834
  const sectionScene = useFuncRef(async () => {
75835
+ const currentBox = boxRef.current.clone();
75829
75836
  const box = await getSceneBox.call();
75837
+ if (!currentBox.equals(boxRef.current)) return;
75830
75838
  sectionBox2.call(box);
75831
75839
  });
75832
75840
  return {