@lvce-editor/renderer-process 30.12.1 → 30.12.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.
@@ -5162,14 +5162,7 @@ const getNodeIndex = $Node => {
5162
5162
  };
5163
5163
 
5164
5164
  const get$ItemFromEvent = event => {
5165
- const $Target = event.target;
5166
- if ($Target.classList.contains('ActivityBarItem')) {
5167
- return $Target;
5168
- }
5169
- if ($Target.classList.contains('ActivityBarItemIcon')) {
5170
- return $Target.parentNode;
5171
- }
5172
- return undefined;
5165
+ return event.target.closest?.('.ActivityBarItem');
5173
5166
  };
5174
5167
  const handleMouseDown$3 = event => {
5175
5168
  const {
@@ -7763,10 +7756,7 @@ const handleFocus = event => {
7763
7756
  };
7764
7757
  const getButtonIndex = $Node => {
7765
7758
  let index = -1;
7766
- while ($Node) {
7767
- if ($Node.className !== 'SourceControlButton') {
7768
- break;
7769
- }
7759
+ while ($Node?.classList.contains('SourceControlButton')) {
7770
7760
  $Node = $Node.previousElementSibling;
7771
7761
  index++;
7772
7762
  }
@@ -7777,8 +7767,9 @@ const handleClick$3 = event => {
7777
7767
  target
7778
7768
  } = event;
7779
7769
  const uid = fromEvent(event);
7780
- if (target.className === 'SourceControlButton') {
7781
- const index = getButtonIndex(target);
7770
+ const $Button = target.closest?.('.SourceControlButton');
7771
+ if ($Button) {
7772
+ const index = getButtonIndex($Button);
7782
7773
  handleButtonClick(uid, index);
7783
7774
  return;
7784
7775
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "30.12.1",
3
+ "version": "30.12.2",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"