@weasel-js/routing 1.5.2 → 1.6.0

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.
@@ -226,6 +226,8 @@ function claimGestureOf(e) {
226
226
  return "longPress";
227
227
  case "wheel":
228
228
  return "wheel";
229
+ case "pinch":
230
+ return "pinch";
229
231
  default:
230
232
  return null;
231
233
  }
@@ -547,6 +549,8 @@ function createDispatcher(opts) {
547
549
  base.key = { key: event.key, repeat: false };
548
550
  } else if (event.kind === "wheel") {
549
551
  base.wheel = { deltaX: event.deltaX, deltaY: event.deltaY, deltaZ: 0 };
552
+ } else if (event.kind === "pinch") {
553
+ base.pinch = { scale: event.scale, rotation: event.rotation };
550
554
  } else if (event.kind === "pointerdown" || event.kind === "click" || event.kind === "doubleclick" || event.kind === "contextmenu") {
551
555
  const sx = event.x ?? (event.kind === "click" ? event.pressX : void 0) ?? 0;
552
556
  const sy = event.y ?? (event.kind === "click" ? event.pressY : void 0) ?? 0;
@@ -789,6 +793,15 @@ function createDispatcher(opts) {
789
793
  affordance: event.affordance,
790
794
  ...resolved
791
795
  };
796
+ } else if (event.kind === "pinch") {
797
+ params = {
798
+ scale: event.scale,
799
+ rotation: event.rotation,
800
+ clientX: event.clientX,
801
+ clientY: event.clientY,
802
+ affordance: event.affordance,
803
+ ...resolved
804
+ };
792
805
  } else if (event.kind === "click" || event.kind === "doubleclick") {
793
806
  params = {
794
807
  worldX: event.x,
@@ -1179,6 +1192,7 @@ var SPEC_KIND_TO_GESTURE = {
1179
1192
  key: "keyDown",
1180
1193
  "key-held": "keyHeld",
1181
1194
  wheel: "wheel",
1195
+ pinch: "pinch",
1182
1196
  click: "click",
1183
1197
  doubleClick: "dblTap",
1184
1198
  contextMenu: "contextMenu",
@@ -1510,5 +1524,5 @@ function dlog(namespace, ...args) {
1510
1524
  }
1511
1525
 
1512
1526
  export { ALWAYS, COARSE_TARGET_SCALE, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEVICE_PROFILE, INGEST_STRING_MIMES, NEVER, PREDICATE_TARGET, TOOL_OFFHAND_ID, actionBindings, buildDepsFromRequires, buildRouteRegistry, buildRuleCtx, buildToolOffhandBindings, clientToCanvas, clientToCanvasRect, createDispatcher, describeRule, dlog, evaluate, filterEligible, findConflicts, isDev, isEditableTarget, itemsFromClipboardData, itemsFromDataTransfer, itemsFromFiles, liveScope, makeToolOffhandAction, matchBest, matchSorted, matchesKeyBinding, offhandKeyFor, openPointerSession, pointerGestureId, recordModeSwitch, reportRouteConflicts, resolveDeviceProfile, resolveParams, routeGestureForSpecKind, routesForSpec, scopeBindings, specificity, targetConsultsAffordance, validateActionDefaultBinding, validateActionId };
1513
- //# sourceMappingURL=chunk-H5AGTB2J.js.map
1514
- //# sourceMappingURL=chunk-H5AGTB2J.js.map
1527
+ //# sourceMappingURL=chunk-D2TZLDP5.js.map
1528
+ //# sourceMappingURL=chunk-D2TZLDP5.js.map