eat-js-sdk 2.0.27 → 2.0.28

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.
@@ -13665,38 +13665,6 @@ function CategoriseItem($$anchor, $$props) {
13665
13665
  onclick()();
13666
13666
  }
13667
13667
  };
13668
- let isDragging2 = /* @__PURE__ */ state(false);
13669
- let touchStartY = /* @__PURE__ */ state(0);
13670
- let touchStartX = /* @__PURE__ */ state(0);
13671
- const handleTouchStart = (event2) => {
13672
- set(isDragging2, false);
13673
- if (event2.touches.length > 0) {
13674
- set(touchStartX, event2.touches[0].clientX, true);
13675
- set(touchStartY, event2.touches[0].clientY, true);
13676
- }
13677
- };
13678
- const handleTouchMove = (event2) => {
13679
- if (event2.touches.length > 0) {
13680
- const deltaX = Math.abs(event2.touches[0].clientX - get$1(touchStartX));
13681
- const deltaY = Math.abs(event2.touches[0].clientY - get$1(touchStartY));
13682
- if (deltaX > 10 || deltaY > 10) {
13683
- set(isDragging2, true);
13684
- }
13685
- }
13686
- };
13687
- const handleTouchEnd = (event2) => {
13688
- if (get$1(isDragging2)) {
13689
- set(isDragging2, false);
13690
- return;
13691
- }
13692
- event2.stopPropagation();
13693
- if (isLocked()) return;
13694
- if (resultType() && mode() !== MODES.INTERACTIVE) return;
13695
- if (hasAnyItemSelected() && !isSelected()) return;
13696
- if (onclick()) {
13697
- onclick()();
13698
- }
13699
- };
13700
13668
  const handleKeyDown = (event2) => {
13701
13669
  if (event2.key === "Enter" || event2.key === "Escape") {
13702
13670
  event2.preventDefault();
@@ -13905,9 +13873,6 @@ function CategoriseItem($$anchor, $$props) {
13905
13873
  };
13906
13874
  var button = root$6();
13907
13875
  button.__click = handleClick;
13908
- button.__touchstart = handleTouchStart;
13909
- button.__touchmove = handleTouchMove;
13910
- button.__touchend = handleTouchEnd;
13911
13876
  button.__keydown = handleKeyDown;
13912
13877
  var span = child(button);
13913
13878
  var node = child(span);
@@ -14021,7 +13986,7 @@ function CategoriseItem($$anchor, $$props) {
14021
13986
  append($$anchor, button);
14022
13987
  return pop($$exports);
14023
13988
  }
14024
- delegate(["click", "touchstart", "touchmove", "touchend", "keydown"]);
13989
+ delegate(["click", "keydown"]);
14025
13990
  create_custom_element(
14026
13991
  CategoriseItem,
14027
13992
  {
@@ -14146,7 +14111,9 @@ function CategoriseDndContainer($$anchor, $$props) {
14146
14111
  zoneItemTabIndex: get$1(getZoneItemTabIndex)(),
14147
14112
  zoneTabIndex: -1,
14148
14113
  autoAriaDisabled: true,
14149
- keyboardDisabled: true
14114
+ keyboardDisabled: true,
14115
+ delayTouchStart: 30
14116
+ // 30ms delay - quick enough for dragging, slow enough to detect clicks
14150
14117
  }));
14151
14118
  const isEmpty = /* @__PURE__ */ user_derived(() => get$1(dndItems).length === 0);
14152
14119
  const isSourceContainer = /* @__PURE__ */ user_derived(() => () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eat-js-sdk",
3
- "version": "2.0.27",
3
+ "version": "2.0.28",
4
4
  "change version": "2.0.0",
5
5
  "description": "Authoring tool frontend SDK",
6
6
  "contributors": [