UNPKG

@zag-js/splitter

Version:

Core logic for the splitter widget implemented as a state machine

22 lines (18 loc) 570 B
import { NormalizedPanelData } from '../splitter.types.js'; import '@zag-js/core'; import '@zag-js/types'; import './registry.js'; /** * This code was modified from react-resizable-panels by Brian Vaughn * @see https://github.com/bvaughn/react-resizable-panels */ interface Layout { delta: number; initialSize: number[]; panels: NormalizedPanelData[]; pivotIndices: number[]; prevSize: number[]; trigger: "imperative-api" | "keyboard" | "mouse-or-touch"; } declare function resizeByDelta(props: Layout): number[]; export { resizeByDelta };