CameraLimits.gestures ​

Contract 2.0.0 · package sha256 a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e · generated from configurator-runtime.d.ts by services/onsite-scripter/scripts/build-contract-docs.mjs; edit the source, not this file.

Property of CameraLimits · labs, @experimental · since 2.0.0

ts
gestures?: 'greedy' | 'cooperative' | null;

How the view shares touch and the wheel with the page. 'greedy' (1.x's): every one-finger drag turns the product and every wheel over the view dollies. 'cooperative': a vertical one-finger swipe scrolls the page while a horizontal one turns the product (touch-action: pan-y on the view; a touch reaches the view once its first 10 CSS px show its direction, so a scroll never turns the product first), two fingers pinch and turn as before, and a plain wheel scrolls the page while Ctrl or Cmd with the wheel (a trackpad pinch) dollies. Use it for a full-width view on a phone page, where a shopper swiping to the options would otherwise turn the product. A touch drag of a part (input.drag) that starts vertical scrolls the page instead, so a page with part drags keeps 'greedy'. The browser allows the intersection of touch-action over the view and its ancestors up to the page's scroller, so el and every ancestor up to it must allow pan-y: remove touch-action: none (Tailwind's touch-none) there, or a vertical swipe still turns the product. Turning it on under such an ancestor records 'unsupported-spec' (path '/camera/limits/gestures', the element in message); the wheel half applies. null removes your value. Experimental: check supports('camera.limits.gestures') before writing it.

Default: unchanged (the document's, else 'greedy')

Example ​

Imports: values (has, validate, the Holo*Error classes, the pure helpers) from @holostep-configurators/runtime-client, types from @holostep-configurators/runtime-client/contract, /math and /testing names from those entries; boot from the runtime module the root's loadRuntimeAtFloor resolves to. A type your page defines is your app's: declare it there, never import it from the package.

Compiled under the contract's strict settings (examples/declaration/10-CameraLimits.gestures.ts):

ts
import type { Session } from '@holostep-configurators/runtime-client/contract';
declare const session: Session;
declare const signal: AbortSignal;
// A full-width view on a phone page: one finger scrolls past it, two fingers turn the product.
if (session.supports('camera.limits.gestures')) {
  await session.camera.limits({ gestures: 'cooperative' });
}

Generic-API test (spec 3.1) ​

Rule Result
1. Neutral name pass: gestures names no product
2. A precedent not recorded: no ledger row (coverage.json) names this member or its owner
3. Two apps, or labs labs (@experimental at a stable path, reached through has() or supports()): it graduates when a second app uses it
4. The cheaper fix first not recorded per member (Appendix B decides it per need)