@dreamboard-games/sdk 0.5.0-alpha.26 → 0.5.0-alpha.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.
package/README.md CHANGED
@@ -552,11 +552,11 @@ Standard playing cards are game-owned definitions with ordinary suit/rank
552
552
  properties; the SDK does not synthesize inventories or assign built-in rules.
553
553
 
554
554
  The exported `createGestureRecognizer(down, callbacks, options)` defaults to
555
- upward touch dragging so card containers retain sideways scrolling. A row that
556
- fits uses `{ scrub: true }`: a sliding finger reports each move through
557
- `browse`, and turning upward still drags. Pile controls can use
558
- `{ dragDirection: "any" }` with `touch-action: none` to drag toward a hand below
559
- or beside them. This classifies pointer intent only; submit an authored interaction
555
+ vertical touch dragging, up or down, so card containers retain sideways
556
+ scrolling. A row that fits uses `{ scrub: true }`: a sliding finger reports each
557
+ move through `browse`, and turning up or down still drags. Pile controls can use
558
+ `{ dragDirection: "any" }` with `touch-action: none` to drag toward a hand
559
+ beside them. This classifies pointer intent only; submit an authored interaction
560
560
  through the bound game to enforce its rules, without selecting a hidden card ID.
561
561
 
562
562
  ### Local card groups and marquee selection
@@ -1692,7 +1692,7 @@ var GESTURE_THRESHOLDS = Object.freeze({
1692
1692
  holdMs: 350,
1693
1693
  /** A mouse resting on a card this long inspects it. */
1694
1694
  hoverMs: 250,
1695
- /** A finger drags when upward travel exceeds this multiple of sideways travel. */
1695
+ /** A finger drags when vertical travel exceeds this multiple of sideways travel. */
1696
1696
  axisBias: 1.25
1697
1697
  });
1698
1698
  function createGestureRecognizer(down, callbacks, options = {}) {
@@ -1714,7 +1714,7 @@ function createGestureRecognizer(down, callbacks, options = {}) {
1714
1714
  finished = true;
1715
1715
  clearTimeout(holdTimer);
1716
1716
  }
1717
- const rises = (from, to) => from.y - to.y > GESTURE_THRESHOLDS.axisBias * Math.abs(to.x - from.x);
1717
+ const steep = (from, to) => Math.abs(to.y - from.y) > GESTURE_THRESHOLDS.axisBias * Math.abs(to.x - from.x);
1718
1718
  function drag(from, to) {
1719
1719
  if (!callbacks.dragStart(from)) return false;
1720
1720
  kind = "drag";
@@ -1729,14 +1729,14 @@ function createGestureRecognizer(down, callbacks, options = {}) {
1729
1729
  if (kind === "browse") {
1730
1730
  if (!options.scrub) return;
1731
1731
  callbacks.browse?.(at);
1732
- if (!rises(pull, at) || pull.y - at.y >= GESTURE_THRESHOLDS.slop && !drag(pull, at))
1732
+ if (!steep(pull, at) || Math.abs(at.y - pull.y) >= GESTURE_THRESHOLDS.slop && !drag(pull, at))
1733
1733
  pull = at;
1734
1734
  return;
1735
1735
  }
1736
1736
  if (kind !== "tap" || Math.hypot(at.x - origin.x, at.y - origin.y) < GESTURE_THRESHOLDS.slop)
1737
1737
  return;
1738
1738
  clearTimeout(holdTimer);
1739
- const lifts = mouse || options.dragDirection === "any" || rises(origin, at);
1739
+ const lifts = mouse || options.dragDirection === "any" || steep(origin, at);
1740
1740
  if (lifts && drag(origin, at)) return;
1741
1741
  kind = "browse";
1742
1742
  pull = at;
@@ -1789,4 +1789,4 @@ export {
1789
1789
  createGestureRecognizer,
1790
1790
  magneticDropPoint
1791
1791
  };
1792
- //# sourceMappingURL=chunk-3RFGPBES.js.map
1792
+ //# sourceMappingURL=chunk-3KBMAFNW.js.map