UNPKG

@mantine/hooks

Version:

A collection of 50+ hooks for state and UI management

1 lines 36.7 kB
{"version":3,"file":"use-splitter.mjs","names":[],"sources":["../../src/use-splitter/use-splitter.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-deprecated */\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport { useUncontrolled } from '../use-uncontrolled/use-uncontrolled';\n\nexport interface UseSplitterPanel {\n /** Initial size as percentage (0-100). All panels must sum to 100. */\n defaultSize: number;\n /** Minimum size percentage, `0` by default */\n min?: number;\n /** Maximum size percentage, `100` by default */\n max?: number;\n /** Whether this panel can be collapsed, `false` by default */\n collapsible?: boolean;\n /** Size below which the panel snaps to collapsed (percentage), defaults to `min` */\n collapseThreshold?: number;\n}\n\nexport interface UseSplitterRedistributeInput {\n /** Current sizes before applying delta */\n sizes: number[];\n /** Panel configurations */\n panels: UseSplitterPanel[];\n /** Index of the handle being dragged */\n handleIndex: number;\n /** Requested size change in percentage (positive = grow before-panel) */\n delta: number;\n}\n\nexport type UseSplitterRedistributeFn = (input: UseSplitterRedistributeInput) => number[];\n\nexport interface UseSplitterOptions {\n /** Panel configuration array (minimum 2 panels) */\n panels: UseSplitterPanel[];\n /** Layout direction, `'horizontal'` by default */\n orientation?: 'horizontal' | 'vertical';\n /** Controlled sizes (percentages summing to 100) */\n sizes?: number[];\n /** Called during resize with updated sizes */\n onSizeChange?: (sizes: number[]) => void;\n /** Called when drag starts */\n onResizeStart?: (handleIndex: number) => void;\n /** Called when drag ends */\n onResizeEnd?: (handleIndex: number, sizes: number[]) => void;\n /** Called when a panel collapses or expands */\n onCollapseChange?: (panelIndex: number, collapsed: boolean) => void;\n /** How to borrow space from non-adjacent panels when the immediate neighbor is at its min/max.\n * `'nearest'` takes from the nearest panel in the drag direction first.\n * `'equal'` distributes equally among all panels in the drag direction.\n * A function receives sizes, panels, handleIndex and delta, and returns new sizes.\n * When not set, only the two adjacent panels are affected. */\n redistribute?: 'nearest' | 'equal' | UseSplitterRedistributeFn;\n /** Keyboard step size in percentage, `1` by default */\n step?: number;\n /** Shift+arrow step size in percentage, `10` by default */\n shiftStep?: number;\n /** Text direction for keyboard nav, `'ltr'` by default */\n dir?: 'ltr' | 'rtl';\n /** Enable/disable the hook, `true` by default */\n enabled?: boolean;\n}\n\nexport interface UseSplitterReturnValue<T extends HTMLElement = any> {\n /** Ref callback for the container element */\n ref: React.RefCallback<T | null>;\n /** Current panel sizes as percentages */\n sizes: number[];\n /** Which panels are currently collapsed */\n collapsed: boolean[];\n /** Index of handle being dragged, or -1 */\n activeHandle: number;\n /** Get props to spread on each resize handle */\n getHandleProps: (input: { index: number }) => {\n ref: React.RefCallback<HTMLElement>;\n role: 'separator';\n 'aria-orientation': 'horizontal' | 'vertical';\n 'aria-valuenow': number;\n 'aria-valuemin': number;\n 'aria-valuemax': number;\n tabIndex: number;\n onKeyDown: React.KeyboardEventHandler;\n 'data-active': boolean | undefined;\n 'data-orientation': 'horizontal' | 'vertical';\n };\n /** Programmatically set sizes */\n setSizes: (sizes: number[]) => void;\n /** Collapse a panel */\n collapse: (panelIndex: number) => void;\n /** Expand a collapsed panel */\n expand: (panelIndex: number) => void;\n /** Toggle collapse of a panel */\n toggleCollapse: (panelIndex: number) => void;\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\nfunction getMin(panel: UseSplitterPanel): number {\n return panel.min ?? 0;\n}\n\nfunction getMax(panel: UseSplitterPanel): number {\n return panel.max ?? 100;\n}\n\nfunction getCollapseThreshold(panel: UseSplitterPanel): number {\n return panel.collapseThreshold ?? getMin(panel);\n}\n\ninterface SplitterInternalState {\n isDragging: boolean;\n handleIndex: number;\n startPointer: number;\n containerSize: number;\n startSizes: number[];\n preCollapseSizes: number[];\n}\n\nfunction createInitialInternalState(): SplitterInternalState {\n return {\n isDragging: false,\n handleIndex: -1,\n startPointer: 0,\n containerSize: 0,\n startSizes: [],\n preCollapseSizes: [],\n };\n}\n\nfunction checkCollapse(\n sizes: number[],\n panels: UseSplitterPanel[],\n handleIndex: number,\n delta: number\n): number[] | null {\n const beforeIdx = handleIndex;\n const afterIdx = handleIndex + 1;\n const beforePanel = panels[beforeIdx];\n const afterPanel = panels[afterIdx];\n\n const rawBefore = sizes[beforeIdx] + delta;\n const rawAfter = sizes[afterIdx] - delta;\n\n if (\n beforePanel.collapsible &&\n rawBefore < getCollapseThreshold(beforePanel) &&\n rawBefore < sizes[beforeIdx]\n ) {\n const result = [...sizes];\n result[afterIdx] += result[beforeIdx];\n result[beforeIdx] = 0;\n return result;\n }\n\n if (\n afterPanel.collapsible &&\n rawAfter < getCollapseThreshold(afterPanel) &&\n rawAfter < sizes[afterIdx]\n ) {\n const result = [...sizes];\n result[beforeIdx] += result[afterIdx];\n result[afterIdx] = 0;\n return result;\n }\n\n return null;\n}\n\nfunction applyAdjacentOnly(\n sizes: number[],\n panels: UseSplitterPanel[],\n handleIndex: number,\n delta: number\n): number[] {\n const result = [...sizes];\n const beforeIdx = handleIndex;\n const afterIdx = handleIndex + 1;\n\n const total = result[beforeIdx] + result[afterIdx];\n const effectiveBeforeMax = Math.min(getMax(panels[beforeIdx]), total - getMin(panels[afterIdx]));\n const effectiveBeforeMin = Math.max(getMin(panels[beforeIdx]), total - getMax(panels[afterIdx]));\n const newBefore = clamp(result[beforeIdx] + delta, effectiveBeforeMin, effectiveBeforeMax);\n result[beforeIdx] = newBefore;\n result[afterIdx] = total - newBefore;\n return result;\n}\n\nfunction redistributeNearest(\n sizes: number[],\n panels: UseSplitterPanel[],\n handleIndex: number,\n delta: number\n): number[] {\n const result = [...sizes];\n\n if (delta > 0) {\n const growIdx = handleIndex;\n const maxGrow = getMax(panels[growIdx]) - result[growIdx];\n const wantedGrow = Math.min(delta, maxGrow);\n\n let taken = 0;\n for (let i = handleIndex + 1; i < result.length && taken < wantedGrow; i += 1) {\n const canGive = result[i] - getMin(panels[i]);\n const take = Math.min(canGive, wantedGrow - taken);\n result[i] -= take;\n taken += take;\n }\n\n result[growIdx] += taken;\n } else if (delta < 0) {\n const growIdx = handleIndex + 1;\n const maxGrow = getMax(panels[growIdx]) - result[growIdx];\n const wantedGrow = Math.min(Math.abs(delta), maxGrow);\n\n let taken = 0;\n for (let i = handleIndex; i >= 0 && taken < wantedGrow; i -= 1) {\n const canGive = result[i] - getMin(panels[i]);\n const take = Math.min(canGive, wantedGrow - taken);\n result[i] -= take;\n taken += take;\n }\n\n result[growIdx] += taken;\n }\n\n return result;\n}\n\nfunction redistributeEqual(\n sizes: number[],\n panels: UseSplitterPanel[],\n handleIndex: number,\n delta: number\n): number[] {\n const result = [...sizes];\n\n if (delta > 0) {\n const growIdx = handleIndex;\n const maxGrow = getMax(panels[growIdx]) - result[growIdx];\n const wantedGrow = Math.min(delta, maxGrow);\n\n const donors: number[] = [];\n for (let i = handleIndex + 1; i < result.length; i += 1) {\n if (result[i] > getMin(panels[i])) {\n donors.push(i);\n }\n }\n\n let remaining = wantedGrow;\n while (remaining > 0.001 && donors.length > 0) {\n const perDonor = remaining / donors.length;\n const exhausted: number[] = [];\n\n for (let d = 0; d < donors.length; d += 1) {\n const idx = donors[d];\n const canGive = result[idx] - getMin(panels[idx]);\n const take = Math.min(canGive, perDonor);\n result[idx] -= take;\n remaining -= take;\n if (canGive <= perDonor + 0.001) {\n exhausted.push(d);\n }\n }\n\n for (let i = exhausted.length - 1; i >= 0; i -= 1) {\n donors.splice(exhausted[i], 1);\n }\n\n if (exhausted.length === 0) {\n break;\n }\n }\n\n result[growIdx] += wantedGrow - remaining;\n } else if (delta < 0) {\n const growIdx = handleIndex + 1;\n const maxGrow = getMax(panels[growIdx]) - result[growIdx];\n const wantedGrow = Math.min(Math.abs(delta), maxGrow);\n\n const donors: number[] = [];\n for (let i = handleIndex; i >= 0; i -= 1) {\n if (result[i] > getMin(panels[i])) {\n donors.push(i);\n }\n }\n\n let remaining = wantedGrow;\n while (remaining > 0.001 && donors.length > 0) {\n const perDonor = remaining / donors.length;\n const exhausted: number[] = [];\n\n for (let d = 0; d < donors.length; d += 1) {\n const idx = donors[d];\n const canGive = result[idx] - getMin(panels[idx]);\n const take = Math.min(canGive, perDonor);\n result[idx] -= take;\n remaining -= take;\n if (canGive <= perDonor + 0.001) {\n exhausted.push(d);\n }\n }\n\n for (let i = exhausted.length - 1; i >= 0; i -= 1) {\n donors.splice(exhausted[i], 1);\n }\n\n if (exhausted.length === 0) {\n break;\n }\n }\n\n result[growIdx] += wantedGrow - remaining;\n }\n\n return result;\n}\n\nfunction applyConstraints(\n sizes: number[],\n panels: UseSplitterPanel[],\n handleIndex: number,\n delta: number,\n redistribute?: 'nearest' | 'equal' | UseSplitterRedistributeFn\n): number[] {\n if (typeof redistribute === 'function') {\n return redistribute({ sizes: [...sizes], panels, handleIndex, delta });\n }\n\n if (redistribute === 'nearest' || redistribute === 'equal') {\n const strategy = redistribute === 'nearest' ? redistributeNearest : redistributeEqual;\n const result = strategy(sizes, panels, handleIndex, delta);\n\n const beforeIdx = handleIndex;\n const afterIdx = handleIndex + 1;\n const beforePanel = panels[beforeIdx];\n const afterPanel = panels[afterIdx];\n\n if (\n beforePanel.collapsible &&\n result[beforeIdx] < getCollapseThreshold(beforePanel) &&\n result[beforeIdx] < sizes[beforeIdx]\n ) {\n const freed = result[beforeIdx];\n result[afterIdx] += freed;\n result[beforeIdx] = 0;\n } else if (\n afterPanel.collapsible &&\n result[afterIdx] < getCollapseThreshold(afterPanel) &&\n result[afterIdx] < sizes[afterIdx]\n ) {\n const freed = result[afterIdx];\n result[beforeIdx] += freed;\n result[afterIdx] = 0;\n }\n\n return result;\n }\n\n const collapsed = checkCollapse(sizes, panels, handleIndex, delta);\n if (collapsed) {\n return collapsed;\n }\n\n return applyAdjacentOnly(sizes, panels, handleIndex, delta);\n}\n\nexport function useSplitter<T extends HTMLElement = any>(\n options: UseSplitterOptions\n): UseSplitterReturnValue<T> {\n const {\n panels,\n orientation = 'horizontal',\n sizes: controlledSizes,\n onSizeChange,\n onCollapseChange,\n redistribute,\n step = 1,\n shiftStep = 10,\n dir = 'ltr',\n enabled = true,\n } = options;\n\n const defaultSizes = panels.map((p) => p.defaultSize);\n\n const [currentSizes, setCurrentSizes] = useUncontrolled({\n value: controlledSizes,\n defaultValue: defaultSizes,\n finalValue: defaultSizes,\n onChange: onSizeChange,\n });\n\n const [activeHandle, setActiveHandle] = useState(-1);\n\n const optionsRef = useRef(options);\n optionsRef.current = options;\n\n const internalStateRef = useRef<SplitterInternalState>(createInitialInternalState());\n const containerRef = useRef<T | null>(null);\n const documentControllerRef = useRef<AbortController | null>(null);\n const frameRef = useRef(0);\n const currentSizesRef = useRef(currentSizes);\n currentSizesRef.current = currentSizes;\n\n const preCollapseSizesRef = useRef<number[]>(defaultSizes);\n\n const collapsed = currentSizes.map((size) => size === 0);\n\n const updateSizes = useCallback(\n (newSizes: number[]) => {\n currentSizesRef.current = newSizes;\n setCurrentSizes(newSizes);\n },\n [setCurrentSizes]\n );\n\n const collapsePanel = useCallback(\n (panelIndex: number) => {\n if (!panels[panelIndex]?.collapsible) {\n return;\n }\n const sizes = currentSizesRef.current;\n if (sizes[panelIndex] === 0) {\n return;\n }\n\n preCollapseSizesRef.current = [...sizes];\n const newSizes = [...sizes];\n const freedSize = newSizes[panelIndex];\n newSizes[panelIndex] = 0;\n\n const neighbor = panelIndex === 0 ? 1 : panelIndex - 1;\n newSizes[neighbor] += freedSize;\n\n updateSizes(newSizes);\n onCollapseChange?.(panelIndex, true);\n },\n [panels, updateSizes, onCollapseChange]\n );\n\n const expandPanel = useCallback(\n (panelIndex: number) => {\n if (!panels[panelIndex]?.collapsible) {\n return;\n }\n const sizes = currentSizesRef.current;\n if (sizes[panelIndex] !== 0) {\n return;\n }\n\n const preCollapse = preCollapseSizesRef.current;\n const restoreSize = preCollapse[panelIndex] || panels[panelIndex].defaultSize;\n const newSizes = [...sizes];\n\n const neighbor = panelIndex === 0 ? 1 : panelIndex - 1;\n const available = Math.max(0, newSizes[neighbor] - getMin(panels[neighbor]));\n const actualRestore = Math.min(restoreSize, available);\n\n if (actualRestore <= 0) {\n return;\n }\n\n newSizes[panelIndex] = actualRestore;\n newSizes[neighbor] -= actualRestore;\n\n updateSizes(newSizes);\n onCollapseChange?.(panelIndex, false);\n },\n [panels, updateSizes, onCollapseChange]\n );\n\n const toggleCollapsePanel = useCallback(\n (panelIndex: number) => {\n if (currentSizesRef.current[panelIndex] === 0) {\n expandPanel(panelIndex);\n } else {\n collapsePanel(panelIndex);\n }\n },\n [collapsePanel, expandPanel]\n );\n\n const containerRefCallback: React.RefCallback<T | null> = useCallback((node) => {\n containerRef.current = node;\n }, []);\n\n const handleRefCallbacks = useRef<Map<number, (node: HTMLElement | null) => void>>(new Map());\n const handleElementControllers = useRef<Map<number, AbortController>>(new Map());\n\n const getHandleRefCallback = useCallback(\n (handleIndex: number): React.RefCallback<HTMLElement> => {\n if (handleRefCallbacks.current.has(handleIndex)) {\n return handleRefCallbacks.current.get(handleIndex)!;\n }\n\n const callback = (node: HTMLElement | null) => {\n const existingController = handleElementControllers.current.get(handleIndex);\n if (existingController) {\n existingController.abort();\n handleElementControllers.current.delete(handleIndex);\n }\n\n if (!node) {\n return;\n }\n\n const elementController = new AbortController();\n handleElementControllers.current.set(handleIndex, elementController);\n\n const onPointerDown = (event: PointerEvent) => {\n if (optionsRef.current.enabled === false) {\n return;\n }\n if (event.button !== 0) {\n return;\n }\n\n const container = containerRef.current;\n if (!container) {\n return;\n }\n\n const rect = container.getBoundingClientRect();\n const isHorizontal = (optionsRef.current.orientation ?? 'horizontal') === 'horizontal';\n const containerSize = isHorizontal ? rect.width : rect.height;\n const pointerPos = isHorizontal ? event.clientX : event.clientY;\n\n const s = internalStateRef.current;\n s.isDragging = true;\n s.handleIndex = handleIndex;\n s.startPointer = pointerPos;\n s.containerSize = containerSize;\n s.startSizes = [...currentSizesRef.current];\n s.preCollapseSizes = [...preCollapseSizesRef.current];\n\n setActiveHandle(handleIndex);\n document.body.style.userSelect = 'none';\n document.body.style.webkitUserSelect = 'none';\n document.body.style.cursor = isHorizontal ? 'col-resize' : 'row-resize';\n\n optionsRef.current.onResizeStart?.(handleIndex);\n\n documentControllerRef.current?.abort();\n documentControllerRef.current = new AbortController();\n const sig = documentControllerRef.current.signal;\n\n document.addEventListener('pointermove', onPointerMove, { signal: sig });\n document.addEventListener('pointerup', onPointerUp, { signal: sig });\n document.addEventListener('pointercancel', onPointerUp, { signal: sig });\n };\n\n const flushResize = (pointerEvent: PointerEvent) => {\n const s = internalStateRef.current;\n if (!s.containerSize) {\n return;\n }\n const isHorizontal = (optionsRef.current.orientation ?? 'horizontal') === 'horizontal';\n const isRtl = isHorizontal && optionsRef.current.dir === 'rtl';\n const pointerPos = isHorizontal ? pointerEvent.clientX : pointerEvent.clientY;\n const pixelDelta = pointerPos - s.startPointer;\n const percentDelta = ((isRtl ? -pixelDelta : pixelDelta) / s.containerSize) * 100;\n\n const opts = optionsRef.current;\n const newSizes = applyConstraints(\n s.startSizes,\n opts.panels,\n s.handleIndex,\n percentDelta,\n opts.redistribute\n );\n\n const prevSizes = currentSizesRef.current;\n const beforeWasCollapsed = prevSizes[s.handleIndex] === 0;\n const afterWasCollapsed = prevSizes[s.handleIndex + 1] === 0;\n const beforeNowCollapsed = newSizes[s.handleIndex] === 0;\n const afterNowCollapsed = newSizes[s.handleIndex + 1] === 0;\n\n if (!beforeWasCollapsed && beforeNowCollapsed) {\n preCollapseSizesRef.current = [...s.startSizes];\n opts.onCollapseChange?.(s.handleIndex, true);\n } else if (beforeWasCollapsed && !beforeNowCollapsed) {\n opts.onCollapseChange?.(s.handleIndex, false);\n }\n\n if (!afterWasCollapsed && afterNowCollapsed) {\n preCollapseSizesRef.current = [...s.startSizes];\n opts.onCollapseChange?.(s.handleIndex + 1, true);\n } else if (afterWasCollapsed && !afterNowCollapsed) {\n opts.onCollapseChange?.(s.handleIndex + 1, false);\n }\n\n currentSizesRef.current = newSizes;\n setCurrentSizes(newSizes);\n };\n\n const onPointerMove = (event: PointerEvent) => {\n const s = internalStateRef.current;\n if (!s.isDragging) {\n return;\n }\n\n cancelAnimationFrame(frameRef.current);\n frameRef.current = requestAnimationFrame(() => {\n flushResize(event);\n });\n };\n\n const onPointerUp = (event: PointerEvent) => {\n const s = internalStateRef.current;\n if (!s.isDragging) {\n return;\n }\n\n cancelAnimationFrame(frameRef.current);\n flushResize(event);\n\n s.isDragging = false;\n const finishedHandle = s.handleIndex;\n s.handleIndex = -1;\n\n setActiveHandle(-1);\n document.body.style.userSelect = '';\n document.body.style.webkitUserSelect = '';\n document.body.style.cursor = '';\n\n documentControllerRef.current?.abort();\n documentControllerRef.current = null;\n\n optionsRef.current.onResizeEnd?.(finishedHandle, [...currentSizesRef.current]);\n };\n\n node.addEventListener('pointerdown', onPointerDown, {\n signal: elementController.signal,\n });\n };\n\n handleRefCallbacks.current.set(handleIndex, callback);\n return callback;\n },\n [setCurrentSizes]\n );\n\n const getHandleProps = useCallback(\n (input: { index: number }) => {\n const { index } = input;\n const orient = orientation;\n const beforeSize = currentSizes[index] ?? 0;\n const beforePanel = panels[index];\n const afterPanel = panels[index + 1];\n\n return {\n ref: getHandleRefCallback(index),\n role: 'separator' as const,\n 'aria-orientation': orient,\n 'aria-valuenow': Math.round(beforeSize),\n 'aria-valuemin': Math.round(getMin(beforePanel)),\n 'aria-valuemax': Math.round(getMax(beforePanel)),\n tabIndex: 0,\n onKeyDown: (event: React.KeyboardEvent) => {\n if (!enabled) {\n return;\n }\n\n const isHorizontal = orient === 'horizontal';\n const isRtl = dir === 'rtl';\n\n let delta = 0;\n const currentStep = event.shiftKey ? shiftStep : step;\n\n switch (event.key) {\n case 'ArrowLeft': {\n if (!isHorizontal) {\n return;\n }\n delta = isRtl ? currentStep : -currentStep;\n break;\n }\n case 'ArrowRight': {\n if (!isHorizontal) {\n return;\n }\n delta = isRtl ? -currentStep : currentStep;\n break;\n }\n case 'ArrowUp': {\n if (isHorizontal) {\n return;\n }\n delta = -currentStep;\n break;\n }\n case 'ArrowDown': {\n if (isHorizontal) {\n return;\n }\n delta = currentStep;\n break;\n }\n case 'Home': {\n delta = -(currentSizes[index] - getMin(beforePanel));\n break;\n }\n case 'End': {\n delta = getMax(beforePanel) - currentSizes[index];\n break;\n }\n case 'Enter': {\n const beforeCollapsible = beforePanel?.collapsible;\n const afterCollapsible = afterPanel?.collapsible;\n\n if (beforeCollapsible && currentSizes[index] <= currentSizes[index + 1]) {\n toggleCollapsePanel(index);\n event.preventDefault();\n return;\n }\n if (afterCollapsible) {\n toggleCollapsePanel(index + 1);\n event.preventDefault();\n return;\n }\n if (beforeCollapsible) {\n toggleCollapsePanel(index);\n event.preventDefault();\n return;\n }\n return;\n }\n default:\n return;\n }\n\n event.preventDefault();\n\n if (delta !== 0) {\n const newSizes = applyConstraints(currentSizes, panels, index, delta, redistribute);\n const beforeWas = currentSizes[index] === 0;\n const afterWas = currentSizes[index + 1] === 0;\n const beforeNow = newSizes[index] === 0;\n const afterNow = newSizes[index + 1] === 0;\n\n if (!beforeWas && beforeNow) {\n preCollapseSizesRef.current = [...currentSizes];\n onCollapseChange?.(index, true);\n } else if (beforeWas && !beforeNow) {\n onCollapseChange?.(index, false);\n }\n\n if (!afterWas && afterNow) {\n preCollapseSizesRef.current = [...currentSizes];\n onCollapseChange?.(index + 1, true);\n } else if (afterWas && !afterNow) {\n onCollapseChange?.(index + 1, false);\n }\n\n updateSizes(newSizes);\n }\n },\n 'data-active': activeHandle === index || undefined,\n 'data-orientation': orient,\n };\n },\n [\n orientation,\n currentSizes,\n panels,\n enabled,\n dir,\n step,\n shiftStep,\n activeHandle,\n redistribute,\n getHandleRefCallback,\n toggleCollapsePanel,\n updateSizes,\n onCollapseChange,\n ]\n );\n\n useEffect(\n () => () => {\n documentControllerRef.current?.abort();\n documentControllerRef.current = null;\n handleElementControllers.current.forEach((controller) => controller.abort());\n handleElementControllers.current.clear();\n cancelAnimationFrame(frameRef.current);\n\n if (internalStateRef.current.isDragging) {\n internalStateRef.current.isDragging = false;\n document.body.style.userSelect = '';\n document.body.style.webkitUserSelect = '';\n document.body.style.cursor = '';\n }\n },\n []\n );\n\n return {\n ref: containerRefCallback,\n sizes: currentSizes,\n collapsed,\n activeHandle,\n getHandleProps,\n setSizes: updateSizes,\n collapse: collapsePanel,\n expand: expandPanel,\n toggleCollapse: toggleCollapsePanel,\n };\n}\n\nexport namespace useSplitter {\n export type Panel = UseSplitterPanel;\n export type Options = UseSplitterOptions;\n export type RedistributeInput = UseSplitterRedistributeInput;\n export type RedistributeFn = UseSplitterRedistributeFn;\n export type ReturnValue<T extends HTMLElement = any> = UseSplitterReturnValue<T>;\n}\n"],"mappings":";;;;AA6FA,SAAS,MAAM,OAAe,KAAa,KAAqB;CAC9D,OAAO,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,GAAG;AAC3C;AAEA,SAAS,OAAO,OAAiC;CAC/C,OAAO,MAAM,OAAO;AACtB;AAEA,SAAS,OAAO,OAAiC;CAC/C,OAAO,MAAM,OAAO;AACtB;AAEA,SAAS,qBAAqB,OAAiC;CAC7D,OAAO,MAAM,qBAAqB,OAAO,KAAK;AAChD;AAWA,SAAS,6BAAoD;CAC3D,OAAO;EACL,YAAY;EACZ,aAAa;EACb,cAAc;EACd,eAAe;EACf,YAAY,CAAC;EACb,kBAAkB,CAAC;CACrB;AACF;AAEA,SAAS,cACP,OACA,QACA,aACA,OACiB;CACjB,MAAM,YAAY;CAClB,MAAM,WAAW,cAAc;CAC/B,MAAM,cAAc,OAAO;CAC3B,MAAM,aAAa,OAAO;CAE1B,MAAM,YAAY,MAAM,aAAa;CACrC,MAAM,WAAW,MAAM,YAAY;CAEnC,IACE,YAAY,eACZ,YAAY,qBAAqB,WAAW,KAC5C,YAAY,MAAM,YAClB;EACA,MAAM,SAAS,CAAC,GAAG,KAAK;EACxB,OAAO,aAAa,OAAO;EAC3B,OAAO,aAAa;EACpB,OAAO;CACT;CAEA,IACE,WAAW,eACX,WAAW,qBAAqB,UAAU,KAC1C,WAAW,MAAM,WACjB;EACA,MAAM,SAA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