react-sync-board 0.5.2 → 0.5.3

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.
package/dist/esm/index.js CHANGED
@@ -8044,7 +8044,6 @@ var useItemActions = function useItemActions() {
8044
8044
  _ref19$passLocked,
8045
8045
  passLocked,
8046
8046
  foundElement,
8047
- isPassthrough,
8048
8047
  itemList,
8049
8048
  _yield$snapshot$getPr2,
8050
8049
  boardWrapper,
@@ -8071,35 +8070,40 @@ var useItemActions = function useItemActions() {
8071
8070
  foundElement = insideClass(target, "item");
8072
8071
 
8073
8072
  if (!foundElement) {
8074
- _context8.next = 27;
8073
+ _context8.next = 28;
8075
8074
  break;
8076
8075
  }
8077
8076
 
8078
- if (!(!passLocked && hasClass(foundElement, "locked") && !hasClass(foundElement, "selected"))) {
8077
+ if (!hasClass(foundElement, "selected")) {
8079
8078
  _context8.next = 8;
8080
8079
  break;
8081
8080
  }
8082
8081
 
8083
- return _context8.abrupt("return", null);
8082
+ return _context8.abrupt("return", foundElement);
8084
8083
 
8085
8084
  case 8:
8086
- // Is it a passthrough element?
8087
- isPassthrough = (hasClass(target, "passthrough") || !returnLocked && hasClass(foundElement, "locked")) && !hasClass(foundElement, "selected");
8085
+ if (!(!passLocked && hasClass(foundElement, "locked") && !hasClass(target, "passthrough"))) {
8086
+ _context8.next = 10;
8087
+ break;
8088
+ }
8088
8089
 
8089
- if (!isPassthrough) {
8090
- _context8.next = 27;
8090
+ return _context8.abrupt("return", returnLocked ? foundElement : null);
8091
+
8092
+ case 10:
8093
+ if (!hasClass(target, "passthrough")) {
8094
+ _context8.next = 28;
8091
8095
  break;
8092
8096
  }
8093
8097
 
8094
- _context8.next = 12;
8098
+ _context8.next = 13;
8095
8099
  return snapshot.getPromise(ItemListAtom);
8096
8100
 
8097
- case 12:
8101
+ case 13:
8098
8102
  itemList = _context8.sent;
8099
- _context8.next = 15;
8103
+ _context8.next = 16;
8100
8104
  return snapshot.getPromise(ConfigurationAtom);
8101
8105
 
8102
- case 15:
8106
+ case 16:
8103
8107
  _yield$snapshot$getPr2 = _context8.sent;
8104
8108
  boardWrapper = _yield$snapshot$getPr2.boardWrapper;
8105
8109
  // Found element under the cursor
@@ -8119,33 +8123,33 @@ var useItemActions = function useItemActions() {
8119
8123
 
8120
8124
  i = 0;
8121
8125
 
8122
- case 19:
8126
+ case 20:
8123
8127
  if (!(i < elems.length)) {
8124
- _context8.next = 26;
8128
+ _context8.next = 27;
8125
8129
  break;
8126
8130
  }
8127
8131
 
8128
8132
  elem = elems[i];
8129
8133
 
8130
- if (!(elem !== foundElement && (returnLocked || !hasClass(elem, "locked")))) {
8131
- _context8.next = 23;
8134
+ if (!(elem !== foundElement && (passLocked || !hasClass(elem, "locked")))) {
8135
+ _context8.next = 24;
8132
8136
  break;
8133
8137
  }
8134
8138
 
8135
8139
  return _context8.abrupt("return", elem);
8136
8140
 
8137
- case 23:
8141
+ case 24:
8138
8142
  i += 1;
8139
- _context8.next = 19;
8143
+ _context8.next = 20;
8140
8144
  break;
8141
8145
 
8142
- case 26:
8146
+ case 27:
8143
8147
  return _context8.abrupt("return", null);
8144
8148
 
8145
- case 27:
8149
+ case 28:
8146
8150
  return _context8.abrupt("return", foundElement);
8147
8151
 
8148
- case 28:
8152
+ case 29:
8149
8153
  case "end":
8150
8154
  return _context8.stop();
8151
8155
  }