useManipulation
import { useManipulation, useSignal } from "@pibbl/core";useManipulation(options) creates one controller for the mounted component.
Pass a writable box signal and attach controller.frameProps to a
ManipulationFrame. Descendant handles
start interactions; active and snapshot expose readonly signal state, and
cancel() restores the starting geometry for an active interaction.
const box = useSignal({ left: 40, top: 32, width: 180, height: 100 });const manipulation = useManipulation({ box, move: {}, resize: {} });Related types: PibblManipulationController, PibblManipulationOptions.
API details from source
Section titled “API details from source”
Creates a mount-owned controller for moving, resizing, and rotating declared geometry.
useManipulation: (options: PibblManipulationOptions) => PibblManipulationControllerRelated API: useManipulation, PibblManipulationOptions, PibblManipulationController.
Parameters
Section titled “Parameters”options— Target state, enabled operations, constraints, and lifecycle callbacks. See PibblManipulationOptions .
Returns
Section titled “Returns”Stable controls and state for the mounted manipulation interaction. See PibblManipulationController .
See also
Section titled “See also”View source — packages/core/src/lib/manipulation/controller.ts:194
Implementation guidance for agents
Section titled “Implementation guidance for agents”Read the Input, focus, and native HTML companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.
Complete minimal examples
Section titled “Complete minimal examples”- Own a manipulation controller: Compose a drag surface and one resize handle, inspect gesture state, and cancel explicitly. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision 380919b. ALPHA — NOT FOR PRODUCTION USE.