motion-dom 14.10.1 → 14.11.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.
package/dist/cjs/index.js CHANGED
@@ -9625,6 +9625,7 @@ const variantPriorityOrder = [
9625
9625
  "whileHover",
9626
9626
  "whileTap",
9627
9627
  "whileDrag",
9628
+ "whilePinch",
9628
9629
  "exit",
9629
9630
  ];
9630
9631
  const variantProps = /* @__PURE__ */ ["initial"].concat(variantPriorityOrder);
@@ -11418,6 +11419,10 @@ class VisualElementDragControls {
11418
11419
  this.openDragLock = null;
11419
11420
  this.isDragging = false;
11420
11421
  this.currentDirection = null;
11422
+ /**
11423
+ * Where the drag started, which pointer offsets are added to. Public
11424
+ * so pinch() can restart a drag from where it leaves the element.
11425
+ */
11421
11426
  this.originPoint = { x: 0, y: 0 };
11422
11427
  /**
11423
11428
  * The permitted boundaries of travel, in pixels.
@@ -12189,6 +12194,540 @@ function hover(elementOrSelector, onHoverStart, options = {}) {
12189
12194
  return cancel;
12190
12195
  }
12191
12196
 
12197
+ /**
12198
+ * A trackpad pinch arrives as a stream of `wheel` events with no end
12199
+ * event, so it ends once none have arrived for this long.
12200
+ */
12201
+ const wheelTimeout = 150;
12202
+ /**
12203
+ * Convert an `x`/`y` set in other units (e.g. `"-50%"` to centre an
12204
+ * element) to pixels, so the gesture can add to it.
12205
+ */
12206
+ const toPixels = (value, size) => {
12207
+ const latest = value.get();
12208
+ if (typeof latest === "string") {
12209
+ value.set(parseFloat(latest) * (latest.endsWith("%") ? size / 100 : 1));
12210
+ }
12211
+ };
12212
+ const limitsOf = (option) => typeof option === "object" ? option : {};
12213
+ /**
12214
+ * Resolve `elastic` to a resistance for each side, as for `dragElastic`.
12215
+ */
12216
+ const resolveElastic = (elastic = defaultElastic) => {
12217
+ const side = (value) => value === true ? defaultElastic : +(value || 0);
12218
+ return typeof elastic === "object"
12219
+ ? { min: side(elastic.min), max: side(elastic.max) }
12220
+ : { min: side(elastic), max: side(elastic) };
12221
+ };
12222
+ const clampTo = (value, { min = -Infinity, max = Infinity }) => motionUtils.clamp(min, max, value);
12223
+ /**
12224
+ * The raw gesture value that elastic shows as `value`. A pinch that starts
12225
+ * while a value is still past its limit (like during a spring back) carries
12226
+ * on from it, rather than jumping.
12227
+ */
12228
+ const unconstrain = (value, option, resistance) => {
12229
+ const limit = clampTo(value, limitsOf(option));
12230
+ const elastic = resistance[value < limit ? "min" : "max"];
12231
+ return elastic ? limit + (value - limit) / elastic : value;
12232
+ };
12233
+ /**
12234
+ * Listen for pinch gestures on `element`: two touches (or pens), a trackpad
12235
+ * pinch (`wheel` with `ctrlKey`, as Chrome, Edge and Firefox report it),
12236
+ * and Safari's `gesture*` events.
12237
+ *
12238
+ * `getValues` is called each time a gesture starts, in the frame's read
12239
+ * step, for the scale/rotate/x/y values to write to. It runs alongside the
12240
+ * element measurement so neither forces a layout.
12241
+ *
12242
+ * `getOptions` is read whenever it's needed, so options can change while
12243
+ * listening. Return `false` to disable the gesture, which also ends one in
12244
+ * progress.
12245
+ *
12246
+ * `onPinchStart` is called once as each gesture starts, with the gesture's
12247
+ * info as a third argument. It can return the gesture's handlers, as for
12248
+ * `pinch()`.
12249
+ */
12250
+ function addPinchListeners(element, getValues, getEnabledOptions, onPinchStart) {
12251
+ const pointers = new Map();
12252
+ /**
12253
+ * The gesture as last reported: focal point, log of a distance and an
12254
+ * angle. Only changes in distance and angle matter, so trackpad and
12255
+ * Safari input write a virtual distance (the scale) here. Logs keep
12256
+ * a long trackpad pinch from overflowing.
12257
+ */
12258
+ const current = { x: 0, y: 0, l: 0, a: 0 };
12259
+ const start = { ...current };
12260
+ const prev = { ...current };
12261
+ let source;
12262
+ let lastEvent;
12263
+ let values;
12264
+ let originX = 0;
12265
+ let originY = 0;
12266
+ let lastX = 0;
12267
+ let lastY = 0;
12268
+ let hasMoved = false;
12269
+ let wheelTime = 0;
12270
+ let handlers = {};
12271
+ let unlock;
12272
+ /**
12273
+ * The gesture's scale and rotation before limits and elastic apply.
12274
+ */
12275
+ let rawScale = 1;
12276
+ let rawRotate = 0;
12277
+ let stopSnap = () => { };
12278
+ /**
12279
+ * The latest enabled options, so a gesture disabled mid-way can still
12280
+ * report its end.
12281
+ */
12282
+ let options = {};
12283
+ const getOptions = () => (options = getEnabledOptions() || options);
12284
+ const info = () => ({
12285
+ point: { x: current.x, y: current.y },
12286
+ offset: { x: current.x - start.x, y: current.y - start.y },
12287
+ scale: Math.exp(current.l - start.l),
12288
+ rotate: current.a - start.a,
12289
+ });
12290
+ /**
12291
+ * Read the element's box and values, and find its layout origin: its
12292
+ * centre without `x`/`y`. Scale and rotate are applied around the
12293
+ * centre (the default transform origin), so they don't move it.
12294
+ */
12295
+ const measure = () => {
12296
+ const { left, top, width, height } = element.getBoundingClientRect();
12297
+ const { scale, rotate, pan, elastic } = getOptions();
12298
+ const [s, r, x, y] = (values = getValues());
12299
+ const resistance = resolveElastic(elastic);
12300
+ /**
12301
+ * Stop animations on values this gesture writes, and leave the
12302
+ * rest running.
12303
+ */
12304
+ scale !== false && s.stop();
12305
+ rotate !== false && r.stop();
12306
+ rawScale = unconstrain(s.get(), scale, resistance);
12307
+ rawRotate = unconstrain(r.get(), rotate, resistance);
12308
+ if (pan !== false) {
12309
+ x.stop();
12310
+ y.stop();
12311
+ toPixels(x, element.offsetWidth ?? width);
12312
+ toPixels(y, element.offsetHeight ?? height);
12313
+ }
12314
+ lastX = x.get();
12315
+ lastY = y.get();
12316
+ originX = left + width / 2 - lastX;
12317
+ originY = top + height / 2 - lastY;
12318
+ };
12319
+ const dragControls = () => elementDragControls.get(visualElementStore.get(element));
12320
+ /**
12321
+ * On release, spring scale and rotation back inside their limits (or
12322
+ * to a `snap` angle), keeping the focal point in place, or everything
12323
+ * back to its origin with `snapToOrigin`.
12324
+ */
12325
+ const snap = () => {
12326
+ const { scale: scaleOption, rotate: rotateOption, pan, snapToOrigin, transition, } = options;
12327
+ const [scale, rotate, x, y] = values;
12328
+ const s0 = scale.get();
12329
+ const r0 = rotate.get();
12330
+ const x0 = x.get();
12331
+ const y0 = y.get();
12332
+ const { snap: step } = limitsOf(rotateOption);
12333
+ let s1 = clampTo(s0, limitsOf(scaleOption));
12334
+ let r1 = clampTo(step ? Math.round(r0 / step) * step : r0, limitsOf(rotateOption));
12335
+ if (snapToOrigin) {
12336
+ s1 = 1;
12337
+ // The nearest upright angle, so it turns the shortest way
12338
+ r1 = Math.round(r0 / 360) * 360;
12339
+ }
12340
+ /**
12341
+ * Keep the focal point in place, unless the element doesn't move
12342
+ * with it, or a drag carries on and owns x/y.
12343
+ */
12344
+ const moves = pan !== false && !dragControls()?.isDragging;
12345
+ const vx = originX + x0 - current.x;
12346
+ const vy = originY + y0 - current.y;
12347
+ if (!s0 ||
12348
+ (s1 === s0 && r1 === r0 && !(snapToOrigin && moves && (x0 || y0)))) {
12349
+ return;
12350
+ }
12351
+ const generator = spring({
12352
+ keyframes: [0, 1],
12353
+ stiffness: 200,
12354
+ damping: 40,
12355
+ ...transition,
12356
+ });
12357
+ const startTime = time.now();
12358
+ /**
12359
+ * Drive the values from one spring, from 0 to 1, so they stay in
12360
+ * step and the focal point stays in place.
12361
+ */
12362
+ const tick = () => {
12363
+ if (dragControls()?.isDragging)
12364
+ return stopSnap();
12365
+ const { value: p, done } = generator.next(time.now() - startTime);
12366
+ if (done)
12367
+ stopSnap();
12368
+ const k = mixNumber$1(s0, s1, p);
12369
+ const r = mixNumber$1(r0, r1, p);
12370
+ const angle = ((r - r0) * Math.PI) / 180;
12371
+ const cos = (Math.cos(angle) * k) / s0;
12372
+ const sin = (Math.sin(angle) * k) / s0;
12373
+ scaleOption !== false && scale.set(k);
12374
+ rotateOption !== false && rotate.set(r);
12375
+ if (moves) {
12376
+ x.set(snapToOrigin
12377
+ ? mixNumber$1(x0, 0, p)
12378
+ : x0 + cos * vx - sin * vy - vx);
12379
+ y.set(snapToOrigin
12380
+ ? mixNumber$1(y0, 0, p)
12381
+ : y0 + sin * vx + cos * vy - vy);
12382
+ }
12383
+ };
12384
+ stopSnap = () => cancelFrame(tick);
12385
+ frame.update(tick, true);
12386
+ };
12387
+ /**
12388
+ * Apply the change in the gesture since the last frame as an
12389
+ * incremental scale and rotation around the previous focal point,
12390
+ * plus the focal point's movement.
12391
+ */
12392
+ const apply = () => {
12393
+ if (!values || !hasMoved)
12394
+ return;
12395
+ hasMoved = false;
12396
+ const { rotate: rotateOption, scale: scaleOption, pan, elastic, } = getOptions();
12397
+ const [scale, rotate, x, y] = values;
12398
+ const resistance = resolveElastic(elastic);
12399
+ const latest = scale.get();
12400
+ let theta = 0;
12401
+ let k = 1;
12402
+ /**
12403
+ * Apply limits and elastic to the gesture's raw scale and rotation.
12404
+ * At a hard limit, the raw value stops too, so moving back responds
12405
+ * straight away.
12406
+ */
12407
+ const constrain = (raw, option) => {
12408
+ const limits = limitsOf(option);
12409
+ const limit = clampTo(raw, limits);
12410
+ return resistance[raw < limit ? "min" : "max"]
12411
+ ? [applyConstraints(raw, limits, resistance), raw]
12412
+ : [limit, limit];
12413
+ };
12414
+ if (scaleOption !== false && latest) {
12415
+ const [next, raw] = constrain(motionUtils.clamp(1e-9, 1e9, rawScale * Math.exp(current.l - prev.l)), scaleOption);
12416
+ rawScale = raw;
12417
+ k = next / latest;
12418
+ scale.set(next);
12419
+ }
12420
+ if (rotateOption !== false) {
12421
+ const [next, raw] = constrain(rawRotate + current.a - prev.a, rotateOption);
12422
+ rawRotate = raw;
12423
+ theta = next - rotate.get();
12424
+ if (theta)
12425
+ rotate.set(next);
12426
+ }
12427
+ if (pan !== false) {
12428
+ /**
12429
+ * Pinch owns x/y while it runs, so stop any animation started
12430
+ * on them since (like a drag's snap back) taking over after.
12431
+ */
12432
+ x.stop();
12433
+ y.stop();
12434
+ /**
12435
+ * If drag() or the drag prop is dragging this element with one
12436
+ * of the touches, it has set x/y this frame to where it started
12437
+ * plus the touch's offset. Carry on from our own values instead,
12438
+ * and restart the drag from them and the touch's latest point.
12439
+ * That way it continues from wherever the pinch leaves the
12440
+ * element, and its release velocity only counts movement after
12441
+ * the pinch, so a zoom doesn't end in a fling.
12442
+ */
12443
+ const drag = dragControls();
12444
+ const isDragging = drag?.isDragging;
12445
+ if (!isDragging) {
12446
+ lastX = x.get();
12447
+ lastY = y.get();
12448
+ }
12449
+ const angle = (theta * Math.PI) / 180;
12450
+ const cos = Math.cos(angle) * k;
12451
+ const sin = Math.sin(angle) * k;
12452
+ const dx = prev.x - originX - lastX;
12453
+ const dy = prev.y - originY - lastY;
12454
+ /**
12455
+ * Move the centre so the previous focal point, scaled and
12456
+ * rotated around the centre, lands on the current focal point.
12457
+ */
12458
+ lastX += dx + current.x - prev.x - (cos * dx - sin * dy);
12459
+ lastY += dy + current.y - prev.y - (sin * dx + cos * dy);
12460
+ if (isDragging) {
12461
+ const history = drag.panSession.history;
12462
+ history.splice(0, history.length - 1);
12463
+ /**
12464
+ * Date the point long ago, so drag only measures release
12465
+ * velocity from moves after the pinch. A move that drag
12466
+ * processes as the touch lifts is part of the pinch.
12467
+ */
12468
+ history[0].timestamp = -Infinity;
12469
+ drag.originPoint.x = lastX;
12470
+ drag.originPoint.y = lastY;
12471
+ }
12472
+ x.set(lastX);
12473
+ y.set(lastY);
12474
+ }
12475
+ Object.assign(prev, current);
12476
+ handlers.onPinch?.(lastEvent, info());
12477
+ };
12478
+ /**
12479
+ * Runs after the update step, where drag sets x/y, so it has the final
12480
+ * say on them each frame.
12481
+ */
12482
+ const update = () => {
12483
+ if (!getEnabledOptions())
12484
+ return end(lastEvent);
12485
+ apply();
12486
+ if (source === "wheel" && time.now() - wheelTime > wheelTimeout) {
12487
+ end(lastEvent);
12488
+ }
12489
+ };
12490
+ const begin = (event, from) => {
12491
+ if (!getEnabledOptions())
12492
+ return;
12493
+ stopSnap();
12494
+ source = from;
12495
+ lastEvent = event;
12496
+ hasMoved = false;
12497
+ values = undefined;
12498
+ handlers = {};
12499
+ Object.assign(start, current);
12500
+ Object.assign(prev, current);
12501
+ frame.read(measure);
12502
+ frame.preRender(update, true);
12503
+ const result = onPinchStart(element, event, info());
12504
+ handlers =
12505
+ typeof result === "function" ? { onComplete: result } : result || {};
12506
+ };
12507
+ const end = (event) => {
12508
+ if (!source)
12509
+ return;
12510
+ cancelFrame(measure);
12511
+ cancelFrame(update);
12512
+ if (getEnabledOptions()) {
12513
+ apply();
12514
+ values && snap();
12515
+ }
12516
+ source = undefined;
12517
+ handlers.onComplete?.(event, info());
12518
+ };
12519
+ const moved = (event) => {
12520
+ lastEvent = event;
12521
+ hasMoved = true;
12522
+ };
12523
+ const readPointers = () => {
12524
+ const [a, b] = pointers.values();
12525
+ const angle = (Math.atan2(b.y - a.y, b.x - a.x) * 180) / Math.PI;
12526
+ const delta = angle - current.a;
12527
+ current.x = (a.x + b.x) / 2;
12528
+ current.y = (a.y + b.y) / 2;
12529
+ current.l = Math.log(Math.hypot(b.x - a.x, b.y - a.y) || 1);
12530
+ /**
12531
+ * Take the shortest way round, so rotation keeps counting past
12532
+ * 180deg rather than flipping to -180deg.
12533
+ */
12534
+ current.a += delta - 360 * Math.round(delta / 360);
12535
+ };
12536
+ const setPointer = (event) => pointers.set(event.pointerId, { x: event.clientX, y: event.clientY });
12537
+ const onPointerMove = (event) => {
12538
+ if (!pointers.has(event.pointerId))
12539
+ return;
12540
+ setPointer(event);
12541
+ if (source === "pointer") {
12542
+ readPointers();
12543
+ moved(event);
12544
+ }
12545
+ };
12546
+ const onPointerUp = (event) => {
12547
+ if (!pointers.delete(event.pointerId))
12548
+ return;
12549
+ if (source === "pointer")
12550
+ end(event);
12551
+ if (!pointers.size) {
12552
+ toggleWindowListeners();
12553
+ release();
12554
+ }
12555
+ };
12556
+ /**
12557
+ * Once a touch is down on the element, listen on the window too, so
12558
+ * the second touch can land beside it (for instance on a small image).
12559
+ */
12560
+ const onPointerDown = (event) => {
12561
+ if (source ||
12562
+ pointers.size > 1 ||
12563
+ pointers.has(event.pointerId) ||
12564
+ event.pointerType === "mouse") {
12565
+ return;
12566
+ }
12567
+ if (!pointers.size)
12568
+ toggleWindowListeners(true);
12569
+ setPointer(event);
12570
+ if (pointers.size === 2) {
12571
+ readPointers();
12572
+ begin(event, "pointer");
12573
+ /**
12574
+ * Unless this element drags, hold the drag lock until every
12575
+ * touch lifts. A press on it then ends as a cancel, rather than
12576
+ * a tap, and a draggable parent doesn't drag.
12577
+ */
12578
+ if (source &&
12579
+ !unlock &&
12580
+ !elementDragControls.get(visualElementStore.get(element))) {
12581
+ unlock = setDragLock(true);
12582
+ }
12583
+ }
12584
+ };
12585
+ /**
12586
+ * Release the drag lock a frame later, so a press ending on this same
12587
+ * pointerup still sees it.
12588
+ */
12589
+ const release = () => {
12590
+ const done = unlock;
12591
+ unlock = undefined;
12592
+ done && frame.postRender(done);
12593
+ };
12594
+ const toggleWindowListeners = (add) => {
12595
+ const method = add ? "addEventListener" : "removeEventListener";
12596
+ window[method]("pointerdown", onPointerDown);
12597
+ window[method]("pointermove", onPointerMove);
12598
+ window[method]("pointerup", onPointerUp);
12599
+ window[method]("pointercancel", onPointerUp);
12600
+ };
12601
+ const onWheel = (event) => {
12602
+ if (!event.ctrlKey || (source && source !== "wheel"))
12603
+ return;
12604
+ current.x = event.clientX;
12605
+ current.y = event.clientY;
12606
+ if (!source) {
12607
+ current.l = 0;
12608
+ begin(event, "wheel");
12609
+ if (!source)
12610
+ return;
12611
+ }
12612
+ event.preventDefault();
12613
+ /**
12614
+ * Lines (Firefox's mouse wheel) to pixels, and cap each event so a
12615
+ * mouse wheel notch with ctrl held (about 100px) zooms a step.
12616
+ */
12617
+ current.l -=
12618
+ motionUtils.clamp(-50, 50, event.deltaY * (event.deltaMode ? 16 : 1)) / 100;
12619
+ wheelTime = time.now();
12620
+ moved(event);
12621
+ };
12622
+ /**
12623
+ * Safari reports trackpad pinches as `gesture*` events. iOS Safari
12624
+ * fires them for touches too, alongside the pointer events we track.
12625
+ */
12626
+ const onGesture = (event) => {
12627
+ if (!pointers.size && (!source || source === "gesture")) {
12628
+ const { scale, rotation, clientX, clientY } = event;
12629
+ current.x = clientX;
12630
+ current.y = clientY;
12631
+ current.l = Math.log(scale);
12632
+ current.a = rotation;
12633
+ if (source) {
12634
+ moved(event);
12635
+ if (event.type === "gestureend")
12636
+ end(event);
12637
+ }
12638
+ else if (event.type === "gesturestart") {
12639
+ begin(event, "gesture");
12640
+ }
12641
+ }
12642
+ if (source)
12643
+ event.preventDefault();
12644
+ };
12645
+ const listeners = {
12646
+ pointerdown: onPointerDown,
12647
+ wheel: onWheel,
12648
+ gesturestart: onGesture,
12649
+ gesturechange: onGesture,
12650
+ gestureend: onGesture,
12651
+ };
12652
+ for (const name in listeners) {
12653
+ element.addEventListener(name, listeners[name], { passive: false });
12654
+ }
12655
+ return () => {
12656
+ for (const name in listeners) {
12657
+ element.removeEventListener(name, listeners[name]);
12658
+ }
12659
+ toggleWindowListeners();
12660
+ end(lastEvent);
12661
+ stopSnap();
12662
+ pointers.clear();
12663
+ release();
12664
+ };
12665
+ }
12666
+ const valueKeys = ["scale", "rotate", "x", "y"];
12667
+ /**
12668
+ * The element's scale/rotate/x/y motion values: those of its
12669
+ * VisualElement if it has one (it's a <motion.*> component, or drag() or
12670
+ * animateLayout() own it), otherwise those animate() binds to it, created
12671
+ * from its current style if this is the first time.
12672
+ */
12673
+ const getElementValues = (element) => {
12674
+ const visualElement = visualElementStore.get(element);
12675
+ const effect = isSVGElement(element) ? svgSubjectEffect : styleSubjectEffect;
12676
+ return valueKeys.map((key) => {
12677
+ if (visualElement) {
12678
+ return visualElement.getValue(key, key === "scale" ? 1 : 0);
12679
+ }
12680
+ let value = effect.get(element, key);
12681
+ if (!value) {
12682
+ value = motionValue(readStyleValue(element, key));
12683
+ effect(element, { [key]: value });
12684
+ }
12685
+ return value;
12686
+ });
12687
+ };
12688
+ function pinch(elementOrSelector, startOrOptions, options = {}) {
12689
+ let onPinchStart = () => { };
12690
+ if (typeof startOrOptions === "function") {
12691
+ onPinchStart = startOrOptions;
12692
+ }
12693
+ else if (startOrOptions) {
12694
+ options = startOrOptions;
12695
+ }
12696
+ const scope = activeScope.current;
12697
+ /**
12698
+ * Run the start callback and the handlers it returns in the active
12699
+ * scope, so work they start is collected. A returned function is
12700
+ * bound by `scope.bind` itself.
12701
+ */
12702
+ if (scope) {
12703
+ const start = scope.bind(onPinchStart);
12704
+ onPinchStart = (element, event) => {
12705
+ const result = start(element, event);
12706
+ if (typeof result !== "object")
12707
+ return result;
12708
+ const handlers = {};
12709
+ for (const key in result) {
12710
+ const name = key;
12711
+ const handler = result[name];
12712
+ handlers[name] = handler && scope.bind(handler);
12713
+ }
12714
+ return handlers;
12715
+ };
12716
+ }
12717
+ const cleanups = resolveElements(elementOrSelector).map((element) => {
12718
+ scope?.track(element);
12719
+ const { style } = element;
12720
+ const touchAction = style.touchAction;
12721
+ style.touchAction = "none";
12722
+ const remove = addPinchListeners(element, () => getElementValues(element), () => options, onPinchStart);
12723
+ return () => {
12724
+ remove();
12725
+ style.touchAction = touchAction;
12726
+ };
12727
+ });
12728
+ return addToScope(() => cleanups.forEach((cleanup) => cleanup()));
12729
+ }
12730
+
12192
12731
  /**
12193
12732
  * Recursively traverse up the tree to check whether the provided child node
12194
12733
  * is the parent or a descendant of it.
@@ -12404,14 +12943,18 @@ function press(targetOrSelector, onPressStart, options = {}) {
12404
12943
  */
12405
12944
  const endEventOptions = { ...eventOptions, capture: true };
12406
12945
  const onPointerEnd = (endEvent, success) => {
12946
+ /**
12947
+ * Another touch lifting (for instance after a pinch) doesn't
12948
+ * end the press.
12949
+ */
12950
+ if (!isPrimaryPointer(endEvent))
12951
+ return;
12407
12952
  window.removeEventListener("pointerup", onPointerUp, endEventOptions);
12408
12953
  window.removeEventListener("pointercancel", onPointerCancel, endEventOptions);
12409
12954
  window.removeEventListener("pointermove", onPointerMove, endEventOptions);
12410
12955
  target.removeEventListener("contextmenu", preventDefault);
12411
12956
  cancelFrame(tick);
12412
12957
  isPressing.delete(target);
12413
- if (!isPrimaryPointer(endEvent))
12414
- return;
12415
12958
  /**
12416
12959
  * A press that ends while a drag is active is a cancel.
12417
12960
  */
@@ -14929,6 +15472,7 @@ exports.addAttrValue = addAttrValue;
14929
15472
  exports.addBuilderToScope = addBuilderToScope;
14930
15473
  exports.addDomEvent = addDomEvent;
14931
15474
  exports.addEffect = addEffect;
15475
+ exports.addPinchListeners = addPinchListeners;
14932
15476
  exports.addPointerEvent = addPointerEvent;
14933
15477
  exports.addPointerInfo = addPointerInfo;
14934
15478
  exports.addSVGValue = addSVGValue;
@@ -15124,6 +15668,7 @@ exports.parseAnimateLayoutArgs = parseAnimateLayoutArgs;
15124
15668
  exports.parseCSSVariable = parseCSSVariable;
15125
15669
  exports.parseValueFromTransform = parseValueFromTransform;
15126
15670
  exports.percent = percent;
15671
+ exports.pinch = pinch;
15127
15672
  exports.pixelsToPercent = pixelsToPercent;
15128
15673
  exports.positionalKeys = positionalKeys;
15129
15674
  exports.prefersReducedMotion = prefersReducedMotion;