UNPKG

@zag-js/splitter

Version:

Core logic for the splitter widget implemented as a state machine

23 lines (20 loc) 1.56 kB
import { Scope } from '@zag-js/core'; import { CursorState, ResizeTriggerId } from './splitter.types.js'; import '@zag-js/types'; import './utils/registry.js'; declare const getRootId: (ctx: Scope) => any; declare const getResizeTriggerId: (ctx: Scope, id: string) => any; declare const getLabelId: (ctx: Scope) => any; declare const getPanelId: (ctx: Scope, id: string | number) => any; declare const getPanelEls: (ctx: Scope) => HTMLElement[]; declare const getGlobalCursorId: (ctx: Scope) => string; declare const getRootEl: (ctx: Scope) => HTMLElement | null; declare const getResizeTriggerEl: (ctx: Scope, id: string | null | undefined) => HTMLElement | null; declare const getPanelEl: (ctx: Scope, id: string | number) => HTMLElement | null; declare const resolveResizeTriggerId: (ctx: Scope, id: ResizeTriggerId) => `${string}:${string}` | null; declare const getCursor: (state: CursorState, x: boolean) => (string & {}) | "col-resize" | "e-resize" | "n-resize" | "row-resize" | "s-resize" | "w-resize"; declare const getResizeTriggerEls: (ctx: Scope) => HTMLElement[]; declare const getGlobalCursorEl: (ctx: Scope) => HTMLElement | null; declare const setupGlobalCursor: (ctx: Scope, state: CursorState, x: boolean, nonce?: string) => void; declare const removeGlobalCursor: (ctx: Scope) => void; export { getCursor, getGlobalCursorEl, getGlobalCursorId, getLabelId, getPanelEl, getPanelEls, getPanelId, getResizeTriggerEl, getResizeTriggerEls, getResizeTriggerId, getRootEl, getRootId, removeGlobalCursor, resolveResizeTriggerId, setupGlobalCursor };