@cck-ui/hooks 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.cjs +2 -0
- package/cjs/use-splitter/use-splitter.cjs +707 -0
- package/cjs/use-splitter/use-splitter.cjs.map +1 -0
- package/esm/index.mjs +2 -1
- package/esm/use-splitter/use-splitter.mjs +707 -0
- package/esm/use-splitter/use-splitter.mjs.map +1 -0
- package/lib/index.d.mts +2 -0
- package/lib/index.d.ts +2 -0
- package/lib/use-splitter/use-splitter.d.ts +210 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-splitter.cjs","names":[],"sources":["../../src/use-splitter/use-splitter.ts"],"sourcesContent":["import { computed, ComputedRef, onMounted, onUnmounted, ref, shallowRef } from 'vue'\n\n/**\n * @description Panel size expressed in CSS units. A bare `number` or `%` string is a flexible size (shares the leftover space), `px`/`rem` strings are fixed sizes that keep their pixel size when the container is resized.\n */\nexport type SplitterPaneSize = number | `${number}%` | `${number}px` | `${number}rem`\n\n/**\n * @description Keyboard step expressed in CSS units. A bare `number` or `%` string is a percentage of the container, `px`/`rem` strings are resolved to pixels.\n */\nexport type SplitterStep = number | `${number}%` | `${number}px` | `${number}rem`\n\nexport interface UseSplitterPanel {\n /**\n * @description Initial size, a `number`/`%` is a flexible size, `px`/`rem` is a fixed size. A bare number is treated as a percentage.\n */\n defaultSize: SplitterPaneSize\n /**\n * @description Minimum size in the same units as `defaultSize`\n * @default 0\n */\n min?: SplitterPaneSize\n /**\n * @description Maximum size in the same units as `defaultSize`, no limit by default\n */\n max?: SplitterPaneSize\n /**\n * @description Whether this panel can be collapsed\n * @default false\n */\n collapsible?: boolean\n /**\n * @description Size below which the panel snaps to collapsed, defaults to `min`\n */\n collapseThreshold?: SplitterPaneSize\n}\n\n/**\n * @description Panel configuration resolved to numeric units (percent or pixels passed to redistribute functions)\n */\nexport interface UseSplitterResolvedPanel {\n /**\n * @description Resolved default size in the same units as redistribute sizes\n */\n defaultSize: number\n /**\n * @description Resolved minimum size\n */\n min?: number\n /**\n * @description Resolved maximum size\n */\n max?: number\n /**\n * @description Whether this panel can be collapsed\n */\n collapsible?: boolean\n /**\n * @description Resolved collapse threshold\n */\n collapseThreshold?: number\n}\n\nexport interface UseSplitterRedistributeInput {\n /**\n * @description Current sizes before applying delta, in resolved units (percent or pixels)\n */\n sizes: number[]\n /**\n * @description Resolved panel configurations, in the same units as `sizes`\n */\n panels: UseSplitterResolvedPanel[]\n /**\n * @description Index of the handle being dragged\n */\n handleIndex: number\n /**\n * @description Requested size change in resolved units (positive = grow before-panel)\n */\n delta: number\n}\n\nexport type UseSplitterRedistributeFn = (input: UseSplitterRedistributeInput) => number[]\n\nexport interface UseSplitterOptions {\n /**\n * @description Panel configuration array (minimum 2 panels)\n */\n panels: UseSplitterPanel[]\n /**\n * @description Layout direction\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical'\n /**\n * @description Controlled sizes, each value keeps the unit it was declared in\n */\n sizes?: SplitterPaneSize[]\n /**\n * @description Called during resize with updated sizes, each value keeps its declared unit\n */\n onSizeChange?: (sizes: SplitterPaneSize[]) => void\n /**\n * @description Called when drag starts\n */\n onResizeStart?: (handleIndex: number) => void\n /**\n * @description Called when drag ends\n */\n onResizeEnd?: (handleIndex: number, sizes: SplitterPaneSize[]) => void\n /**\n * @description Called when a panel collapses or expands\n */\n onCollapseChange?: (panelIndex: number, collapsed: boolean) => void\n /**\n * @description 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 */\n redistribute?: 'nearest' | 'equal' | UseSplitterRedistributeFn\n /**\n * @description Keyboard step size, a `number`/`%` is a percentage, `px`/`rem` is resolved to pixels\n * @default 1\n */\n step?: SplitterStep\n /**\n * @description Shift + arrow step size, a `number`/`%` is a percentage, `px`/`rem` is resolved to pixels\n * @default 10\n */\n shiftStep?: SplitterStep\n /**\n * @description Text direction for keyboard nav\n * @default 'ltr'\n */\n dir?: 'ltr' | 'rtl'\n /**\n * @description Restore the two panels adjacent to a handle to their default ratio (preserving their combined size) when the handle is double-clicked\n * @default true\n */\n resetOnDoubleClick?: boolean\n /**\n * @description Enable/disable the hook\n * @default true\n */\n enabled?: boolean\n}\n\nexport interface UseSplitterReturnValue {\n /**\n * @description Current panel sizes, each value keeps the unit it was declared in\n */\n sizes: ComputedRef<SplitterPaneSize[]>\n /**\n * @description Whether sizes are tracked in pixels because any pane size, `min`, `max`, `step`, `shiftStep` or `collapseThrehold` uses a fixed `px`/`rem` unit\n */\n pixelMode: boolean\n /**\n * @description Which panels are currently collapsed\n */\n collapsed: boolean[]\n /**\n * @description Index of handle being dragged, or -1\n */\n activeHandle: number\n /**\n * @description Ref callback for the container element\n */\n containerRef: (el: HTMLElement | null) => void\n /**\n * @description Get props to spread on each resize handle\n */\n getHandleProps: (input: { index: number }) => {\n ref: (el: HTMLElement | null) => void\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: (event: KeyboardEvent) => void\n onDoubleClick: () => void\n 'data-active': boolean | undefined\n 'data-orientation': 'horizontal' | 'vertical'\n }\n getHandleEventHandlers: (input: { index: number }) => {\n onPointerDown: (event: PointerEvent) => void\n onTouchStart: (event: TouchEvent) => void\n onKeyDown: (event: KeyboardEvent) => void\n onDoubleClick: () => void\n }\n /**\n * @description Programmatically set sizes, each value keeps its declared unit\n */\n setSizes: (sizes: SplitterPaneSize[]) => void\n /**\n * @description Collapse a panel\n */\n collapse: (panelIndex: number) => void\n /**\n * @description Expand a collapsed panel\n */\n expand: (panelIndex: number) => void\n /**\n * @description Toggle collapse of a panel\n */\n toggleCollapse: (panelIndex: number) => void\n /**\n * @description Reset the two panels adjacent to a handle to their default ratio, preserving their combined size\n */\n reset: (handleIndex: number) => void\n}\n\nconst PX_RE = /^(-?[\\d.]+)px$/\nconst REM_RE = /^(-?[\\d.]+)rem$/\nconst PERCENT_RE = /^(-?[\\d.]+)%$/\n\nfunction isFixedSize(size: SplitterPaneSize | undefined): boolean {\n return typeof size === 'string' && (PX_RE.test(size) || REM_RE.test(size))\n}\n\nfunction sizeMagnitude(size: SplitterPaneSize): number {\n return typeof size === 'number' ? size : parseFloat(size)\n}\n\nfunction detectPixelMode(options: UseSplitterOptions): boolean {\n return (\n options.panels.some(\n (panel) =>\n isFixedSize(panel.defaultSize) ||\n isFixedSize(panel.min) ||\n isFixedSize(panel.max) ||\n isFixedSize(panel.collapseThreshold)\n ) ||\n isFixedSize(options.step) ||\n isFixedSize(options.shiftStep) ||\n (options.sizes?.some(isFixedSize) ?? false)\n )\n}\n\nfunction getRootFontSize(): number {\n if (typeof window === 'undefined') {\n return 16\n }\n const fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize)\n return Number.isFinite(fontSize) && fontSize > 0 ? fontSize : 16\n}\n\nfunction resolveSize(\n size: SplitterPaneSize,\n pixelMode: boolean,\n containerPx: number,\n rootFontSize: number\n): number {\n if (!pixelMode) {\n return sizeMagnitude(size)\n }\n\n if (typeof size === 'number') {\n return (size / 100) * containerPx\n }\n\n const percent = PERCENT_RE.exec(size)\n if (percent) {\n return (parseFloat(percent[1]) / 100) * containerPx\n }\n\n const rem = REM_RE.exec(size)\n if (rem) {\n return parseFloat(rem[1]) * rootFontSize\n }\n\n const px = PX_RE.exec(size)\n if (px) {\n return parseFloat(px[1])\n }\n\n return 0\n}\n\n/**\n * @description Down-scaling factor applied to fixed panes when their combined pixel size overflows the container, so they shrink to fit (matching `resolveWorkingSizes`). Returns `1` when nothing overflows or the layout is not in pixel mode. Encoders divide by this to invert the scaling and persist the original absolute sizes instead of the shrunk-to-fit ones.\n */\nfunction getFixedScale(\n sizes: SplitterPaneSize[],\n pixelMode: boolean,\n containerPx: number,\n rootFontSize: number\n): number {\n if (!pixelMode) {\n return 1\n }\n\n let fixedTotal = 0\n sizes.forEach((size) => {\n if (isFixedSize(size)) {\n fixedTotal += resolveSize(size, true, containerPx, rootFontSize)\n }\n })\n\n return fixedTotal > containerPx && fixedTotal > 0 ? containerPx / fixedTotal : 1\n}\n\n/**\n * @description Resolves all sizes to pixels at once. Fixed panes get their absolute pixel size, flexible panes share the leftover space by their weight ratio - matching how the layout is rendered with `flex-grow`, so drag math operates on the same pixel sizes the user sees.\n */\nfunction resolveWorkingSizes(\n sizes: SplitterPaneSize[],\n pixelMode: boolean,\n containerPx: number,\n rootFontSize: number\n): number[] {\n if (!pixelMode) {\n return sizes.map((size) => sizeMagnitude(size))\n }\n\n let fixedTotal = 0\n let flexibleWeight = 0\n sizes.forEach((size) => {\n if (isFixedSize(size)) {\n fixedTotal += resolveSize(size, true, containerPx, rootFontSize)\n } else {\n flexibleWeight += sizeMagnitude(size)\n }\n })\n\n const leftover = Math.max(0, containerPx - fixedTotal)\n const fixedScale = getFixedScale(sizes, pixelMode, containerPx, rootFontSize)\n\n return sizes.map((size) => {\n if (isFixedSize(size)) {\n return resolveSize(size, true, containerPx, rootFontSize) * fixedScale\n }\n return flexibleWeight > 0 ? (sizeMagnitude(size) / flexibleWeight) * leftover : 0\n })\n}\n\nfunction encodeSize(\n value: number,\n original: SplitterPaneSize,\n pixelMode: boolean,\n containerPx: number,\n rootFontSize: number,\n fixedScale: number = 1\n): SplitterPaneSize {\n if (!pixelMode) {\n return typeof original === 'string' && PERCENT_RE.test(original) ? `${value}%` : value\n }\n\n if (typeof original === 'number') {\n return containerPx > 0 ? (value / containerPx) * 100 : original\n }\n\n if (PERCENT_RE.test(original)) {\n return `${containerPx > 0 ? (value / containerPx) * 100 : parseFloat(original)}%`\n }\n\n const absolute = fixedScale > 0 ? value / fixedScale : value\n\n if (REM_RE.test(original)) {\n return `${rootFontSize > 0 ? absolute / rootFontSize : 0}rem`\n }\n\n return `${absolute}px`\n}\n\n/**\n * @description Encodes working pixel sizes back to raw sizes after a resize, keeping the unit each pane was declared in. Panes whose working size did not change keep their original raw value. When fixed panes overflow the container they render down-scaled, so their working sizes are scaled back up to absolute sizes (preserving their declared sizes). If the resize instead hands space to a flexible pane the overflow clears and the layout leaves the down-scaled regime: every pane is then encoded from its current working size - including untouched fixed panes (so they do not jump back to their over-sized value) and untouched flexible panes (so a pane that was squeezed to `0` does not keep a stale weight and steal the freed space on the next render)\n */\nfunction encodeWorkingSizes(\n nextWorking: number[],\n baseWorking: number[],\n baseRaw: SplitterPaneSize[],\n pixelMode: boolean,\n containerPx: number,\n rootFontSize: number\n): SplitterPaneSize[] {\n const fixedScale = getFixedScale(baseRaw, pixelMode, containerPx, rootFontSize)\n\n let fixedWorkingSum = 0\n nextWorking.forEach((value, i) => {\n if (isFixedSize(baseRaw[i])) {\n fixedWorkingSum += value\n }\n })\n const overflowCleared = fixedScale < 1 && fixedWorkingSum < containerPx - 1e-6\n const encodeScale = overflowCleared ? 1 : fixedScale\n\n return nextWorking.map((value, i) =>\n overflowCleared || Math.abs(value - baseWorking[i]) > 1e-6\n ? encodeSize(value, baseRaw[i], pixelMode, containerPx, rootFontSize, encodeScale)\n : baseRaw[i]\n )\n}\n\nfunction resolvePanel(\n panel: UseSplitterPanel,\n pixelMode: boolean,\n containerPx: number,\n rootFontSize: number\n): UseSplitterResolvedPanel {\n return {\n defaultSize: resolveSize(panel.defaultSize, pixelMode, containerPx, rootFontSize),\n min: panel.min != null ? resolveSize(panel.min, pixelMode, containerPx, rootFontSize) : 0,\n max:\n panel.max != null\n ? resolveSize(panel.max, pixelMode, containerPx, rootFontSize)\n : pixelMode\n ? containerPx\n : 100,\n collapseThreshold:\n panel.collapseThreshold != null\n ? resolveSize(panel.collapseThreshold, pixelMode, containerPx, rootFontSize)\n : undefined,\n collapsible: panel.collapsible,\n }\n}\n\nfunction resolveStep(\n step: SplitterStep,\n pixelMode: boolean,\n containerPx: number,\n rootFontSize: number\n): number {\n return resolveSize(step, pixelMode, containerPx, rootFontSize)\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: UseSplitterResolvedPanel): number {\n return panel.min ?? 0\n}\n\nfunction getMax(panel: UseSplitterResolvedPanel): number {\n return panel.max ?? Infinity\n}\n\nfunction getCollapseThreshold(panel: UseSplitterResolvedPanel): number {\n return panel.collapseThreshold ?? getMin(panel)\n}\n\nfunction checkCollapse(\n sizes: number[],\n panels: UseSplitterResolvedPanel[],\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: UseSplitterResolvedPanel[],\n handleIndex: number,\n delta: number\n): number[] {\n const result = [...sizes]\n const beforeIdx = handleIndex\n const afterIdx = handleIndex + 1\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: UseSplitterResolvedPanel[],\n handleIndex: number,\n delta: number\n): number[] {\n const result = [...sizes]\n if (delta > 0) {\n const growIdx = handleIndex\n const maxGrow = getMax(panels[growIdx]) - result[growIdx]\n const wantedGrow = Math.min(delta, maxGrow)\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 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 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 result[growIdx] += taken\n }\n return result\n}\n\nfunction redistributeEqual(\n sizes: number[],\n panels: UseSplitterResolvedPanel[],\n handleIndex: number,\n delta: number\n): number[] {\n const result = [...sizes]\n if (delta > 0) {\n const growIdx = handleIndex\n const maxGrow = getMax(panels[growIdx]) - result[growIdx]\n const wantedGrow = Math.min(delta, maxGrow)\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 let remaining = wantedGrow\n while (remaining > 0.001 && donors.length > 0) {\n const perDonor = remaining / donors.length\n const exhausted: number[] = []\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 for (let i = exhausted.length - 1; i >= 0; i -= 1) {\n donors.splice(exhausted[i], 1)\n }\n if (exhausted.length === 0) {\n break\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 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 let remaining = wantedGrow\n while (remaining > 0.001 && donors.length > 0) {\n const perDonor = remaining / donors.length\n const exhausted: number[] = []\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 for (let i = exhausted.length - 1; i >= 0; i -= 1) {\n donors.splice(exhausted[i], 1)\n }\n if (exhausted.length === 0) {\n break\n }\n }\n result[growIdx] += wantedGrow - remaining\n }\n return result\n}\n\nfunction applyConstraints(\n sizes: number[],\n panels: UseSplitterResolvedPanel[],\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(options: UseSplitterOptions): UseSplitterReturnValue {\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 resetOnDoubleClick = true,\n enabled = true,\n } = options\n\n const pixelMode = detectPixelMode(options)\n\n const currentSizes = ref<SplitterPaneSize[]>([])\n const activeHandle = ref(-1)\n const containerSize = ref(0)\n const containerEl = shallowRef<HTMLElement | null>(null)\n const rootFontSizeRef = ref(16)\n const preCollapseSizes = ref<SplitterPaneSize[]>([])\n const handleElementControllers = new Map<number, AbortController>()\n const documentController = shallowRef<AbortController | null>(null)\n const frameId = ref(0)\n const isDragging = ref(false)\n const startData = ref<{\n handleIndex: number\n startPointer: number\n containerSize: number\n rootFontSize: number\n pixelMode: boolean\n startSizes: number[]\n startRaw: SplitterPaneSize[]\n } | null>(null)\n\n const optionsRef = shallowRef(options)\n optionsRef.value = options\n\n const defaultSizes = panels.map((p) => p.defaultSize)\n\n const initSizes = () => {\n if (controlledSizes) {\n currentSizes.value = [...controlledSizes]\n } else {\n currentSizes.value = [...defaultSizes]\n }\n }\n initSizes()\n\n const collapsed = computed(() => currentSizes.value.map((s) => sizeMagnitude(s) === 0))\n\n const updateSizes = (newSizes: SplitterPaneSize[]) => {\n currentSizes.value = newSizes\n onSizeChange?.(newSizes)\n }\n\n const measureContainer = (): number => {\n const node = containerEl.value\n if (!node) {\n return 0\n }\n const rect = node.getBoundingClientRect()\n return orientation === 'horizontal' ? rect.width : rect.height\n }\n\n const collapsePanel = (panelIndex: number) => {\n if (!panels[panelIndex]?.collapsible) {\n return\n }\n if (sizeMagnitude(currentSizes.value[panelIndex]) === 0) {\n return\n }\n\n const container = pixelMode ? containerSize.value || measureContainer() : 0\n const rootFontSize = rootFontSizeRef.value\n const working = resolveWorkingSizes(currentSizes.value, pixelMode, container, rootFontSize)\n\n preCollapseSizes.value = [...currentSizes.value]\n const freedSize = working[panelIndex]\n working[panelIndex] = 0\n\n const neighbor = panelIndex === 0 ? 1 : panelIndex - 1\n working[neighbor] += freedSize\n\n updateSizes(\n working.map((value, i) =>\n encodeSize(value, currentSizes.value[i], pixelMode, container, rootFontSize)\n )\n )\n onCollapseChange?.(panelIndex, true)\n }\n\n const expandPanel = (panelIndex: number) => {\n if (!panels[panelIndex]?.collapsible) {\n return\n }\n if (sizeMagnitude(currentSizes.value[panelIndex]) !== 0) {\n return\n }\n\n const container = pixelMode ? containerSize.value || measureContainer() : 0\n const rootFontSize = rootFontSizeRef.value\n const working = resolveWorkingSizes(currentSizes.value, pixelMode, container, rootFontSize)\n\n const preCollapse = preCollapseSizes.value\n const restoreSource =\n preCollapse[panelIndex] != null && sizeMagnitude(preCollapse[panelIndex]) !== 0\n ? preCollapse[panelIndex]\n : panels[panelIndex].defaultSize\n const restoreSize = resolveSize(restoreSource, pixelMode, container, rootFontSize)\n\n const neighbor = panelIndex === 0 ? 1 : panelIndex - 1\n const neighborMin =\n panels[neighbor].min != null\n ? resolveSize(panels[neighbor].min!, pixelMode, container, rootFontSize)\n : 0\n const available = Math.max(0, working[neighbor] - neighborMin)\n const actualRestore = Math.min(restoreSize, available)\n\n if (actualRestore <= 0) {\n return\n }\n\n working[panelIndex] = actualRestore\n working[neighbor] -= actualRestore\n\n updateSizes(\n working.map((value, i) =>\n encodeSize(value, currentSizes.value[i], pixelMode, container, rootFontSize)\n )\n )\n onCollapseChange?.(panelIndex, false)\n }\n\n const toggleCollapsePanel = (panelIndex: number) => {\n if (sizeMagnitude(currentSizes.value[panelIndex]) === 0) {\n expandPanel(panelIndex)\n } else {\n collapsePanel(panelIndex)\n }\n }\n\n const reset = (handleIndex: number) => {\n const raw = currentSizes.value\n const beforeIdx = handleIndex\n const afterIdx = handleIndex + 1\n if (beforeIdx < 0 || afterIdx >= raw.length) {\n return\n }\n\n const container = pixelMode ? containerSize.value || measureContainer() : 0\n const rootFontSize = rootFontSizeRef.value\n const working = resolveWorkingSizes(raw, pixelMode, container, rootFontSize)\n const resolvedPanels = panels.map((p) => resolvePanel(p, pixelMode, container, rootFontSize))\n\n const total = working[beforeIdx] + working[afterIdx]\n const defBefore = resolvedPanels[beforeIdx].defaultSize\n const defAfter = resolvedPanels[afterIdx].defaultSize\n const defTotal = defBefore + defAfter\n const targetBefore = defTotal === 0 ? total / 2 : total * (defBefore / defTotal)\n\n const next = applyAdjacentOnly(\n working,\n resolvedPanels,\n beforeIdx,\n targetBefore - working[beforeIdx]\n )\n updateSizes(encodeWorkingSizes(next, working, raw, pixelMode, container, rootFontSize))\n }\n\n const containerRef = (el: HTMLElement | null) => {\n containerEl.value = el\n }\n\n onMounted(() => {\n const node = containerEl.value\n if (!node) {\n return\n }\n\n const update = () => {\n const rect = node.getBoundingClientRect()\n const size = orientation === 'horizontal' ? rect.width : rect.height\n rootFontSizeRef.value = getRootFontSize()\n containerSize.value = size\n }\n\n if (typeof ResizeObserver !== 'undefined') {\n const observer = new ResizeObserver(() => {\n cancelAnimationFrame(frameId.value)\n frameId.value = requestAnimationFrame(update)\n })\n observer.observe(node)\n update()\n\n onUnmounted(() => {\n cancelAnimationFrame(frameId.value)\n observer.disconnect()\n })\n } else {\n update()\n }\n })\n\n onUnmounted(() => {\n documentController.value?.abort()\n handleElementControllers.forEach((c) => c.abort())\n handleElementControllers.clear()\n cancelAnimationFrame(frameId.value)\n })\n\n const getHandleProps = (input: { index: number }) => {\n const { index } = input\n const orient = orientation\n const rootFontSize = rootFontSizeRef.value\n const working = resolveWorkingSizes(\n currentSizes.value,\n pixelMode,\n containerSize.value,\n rootFontSize\n )\n const resolvedPanels = panels.map((p) =>\n resolvePanel(p, pixelMode, containerSize.value, rootFontSize)\n )\n const beforeSize = working[index] ?? 0\n const beforePanel = resolvedPanels[index]\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (!enabled) {\n return\n }\n\n const isHorizontal = orient === 'horizontal'\n const isRtl = dir === 'rtl'\n const container = pixelMode ? containerSize.value || measureContainer() : 0\n const liveRootFontSize = rootFontSizeRef.value\n const liveWorking = resolveWorkingSizes(\n currentSizes.value,\n pixelMode,\n container,\n liveRootFontSize\n )\n const livePanels = panels.map((p) => resolvePanel(p, pixelMode, container, liveRootFontSize))\n const liveBeforePanel = livePanels[index]\n const liveAfterPanel = livePanels[index + 1]\n\n let delta = 0\n const currentStep = resolveStep(\n event.shiftKey ? shiftStep : step,\n pixelMode,\n container,\n liveRootFontSize\n )\n\n switch (event.key) {\n case 'ArrowLeft':\n if (!isHorizontal) {\n return\n }\n delta = isRtl ? currentStep : -currentStep\n break\n case 'ArrowRight':\n if (!isHorizontal) {\n return\n }\n delta = isRtl ? -currentStep : currentStep\n break\n case 'ArrowUp':\n if (isHorizontal) {\n return\n }\n delta = -currentStep\n break\n case 'ArrowDown':\n if (isHorizontal) {\n return\n }\n delta = currentStep\n break\n case 'Home':\n delta = -(liveWorking[index] - getMin(liveBeforePanel))\n break\n case 'End':\n delta = getMax(liveBeforePanel) - liveWorking[index]\n break\n case 'Enter':\n const beforeCollapsible = liveBeforePanel?.collapsible\n const afterCollapsible = liveAfterPanel?.collapsible\n\n if (beforeCollapsible && liveWorking[index] <= liveWorking[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 default:\n return\n }\n\n event.preventDefault()\n if (delta !== 0) {\n const newSizes = applyConstraints(liveWorking, livePanels, index, delta, redistribute)\n updateSizes(\n encodeWorkingSizes(\n newSizes,\n liveWorking,\n currentSizes.value,\n pixelMode,\n container,\n liveRootFontSize\n )\n )\n }\n }\n\n const onDoubleClick = () => {\n if (!enabled || !resetOnDoubleClick) {\n return\n }\n reset(index)\n }\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,\n onDoubleClick,\n 'data-active': activeHandle.value === index || undefined,\n 'data-orientation': orient,\n }\n }\n\n const createPointerDownHandler = (handleIndex: number) => (event: PointerEvent) => {\n if (optionsRef.value.enabled === false) {\n return\n }\n if (event.button !== 0) {\n return\n }\n\n const container = containerEl.value\n if (!container) {\n return\n }\n\n const opts = optionsRef.value\n const isHorizontal = (opts.orientation ?? 'horizontal') === 'horizontal'\n const rect = container.getBoundingClientRect()\n const containerSizePx = isHorizontal ? rect.width : rect.height\n const pointerPos = isHorizontal ? event.clientX : event.clientY\n const isPixelMode = detectPixelMode(opts)\n const rootFontSize = getRootFontSize()\n\n const raw = currentSizes.value\n const startSizes = resolveWorkingSizes(raw, isPixelMode, containerSizePx, rootFontSize)\n preCollapseSizes.value = [...raw]\n\n isDragging.value = true\n activeHandle.value = handleIndex\n startData.value = {\n handleIndex,\n startPointer: pointerPos,\n containerSize: containerSizePx,\n rootFontSize,\n pixelMode: isPixelMode,\n startSizes,\n startRaw: [...raw],\n }\n\n document.body.style.userSelect = 'none'\n document.body.style.webkitUserSelect = 'none'\n document.body.style.cursor = isHorizontal ? 'col-resize' : 'row-resize'\n\n opts.onResizeStart?.(handleIndex)\n\n documentController.value?.abort()\n documentController.value = new AbortController()\n const sig = documentController.value.signal\n\n const flushResize = (pointerEvent: PointerEvent) => {\n const data = startData.value\n if (!data) {\n return\n }\n const opts = optionsRef.value\n const isHorizontal = (opts.orientation ?? 'horizontal') === 'horizontal'\n const isRtl = isHorizontal && opts.dir === 'rtl'\n const pointerPos = isHorizontal ? pointerEvent.clientX : pointerEvent.clientY\n const pixelDelta = (isRtl ? -1 : 1) * (pointerPos - data.startPointer)\n const delta = data.pixelMode ? pixelDelta : (pixelDelta / data.containerSize) * 100\n\n const resolvedPanels = panels.map((p) =>\n resolvePanel(p, data.pixelMode, data.containerSize, data.rootFontSize)\n )\n\n const newSizes = applyConstraints(\n data.startSizes,\n resolvedPanels,\n data.handleIndex,\n delta,\n opts.redistribute\n )\n\n const encoded = encodeWorkingSizes(\n newSizes,\n data.startSizes,\n data.startRaw,\n data.pixelMode,\n data.containerSize,\n data.rootFontSize\n )\n\n updateSizes(encoded)\n }\n\n const onPointerMove = (event: PointerEvent) => {\n if (!isDragging.value) {\n return\n }\n cancelAnimationFrame(frameId.value)\n frameId.value = requestAnimationFrame(() => flushResize(event))\n }\n\n const onPointerUp = (event: PointerEvent) => {\n if (!isDragging.value) {\n return\n }\n cancelAnimationFrame(frameId.value)\n flushResize(event)\n\n isDragging.value = false\n const finishHandle = activeHandle.value\n activeHandle.value = -1\n\n document.body.style.userSelect = ''\n document.body.style.webkitUserSelect = ''\n document.body.style.cursor = ''\n\n documentController.value?.abort()\n documentController.value = null\n\n optionsRef.value.onResizeEnd?.(finishHandle, [...currentSizes.value])\n startData.value = null\n }\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 createTouchStartHandler = (handleIndex: number) => (event: TouchEvent) => {\n if (optionsRef.value.enabled === false) {\n return\n }\n if (event.touches.length !== 1) {\n return\n }\n event.preventDefault()\n\n const container = containerEl.value\n if (!container) {\n return\n }\n\n const opts = optionsRef.value\n const isHorizontal = (opts.orientation ?? 'horizontal') === 'horizontal'\n const rect = container.getBoundingClientRect()\n const containerSizePx = isHorizontal ? rect.width : rect.height\n const touch = event.touches[0]\n const pointerPos = isHorizontal ? touch.clientX : touch.clientY\n const isPixelMode = detectPixelMode(opts)\n const rootFontSize = getRootFontSize()\n\n const raw = currentSizes.value\n const startSizes = resolveWorkingSizes(raw, isPixelMode, containerSizePx, rootFontSize)\n preCollapseSizes.value = [...raw]\n\n isDragging.value = true\n activeHandle.value = handleIndex\n startData.value = {\n handleIndex,\n startPointer: pointerPos,\n containerSize: containerSizePx,\n rootFontSize,\n pixelMode: isPixelMode,\n startSizes,\n startRaw: [...raw],\n }\n\n document.body.style.userSelect = 'none'\n document.body.style.webkitUserSelect = 'none'\n document.body.style.cursor = isHorizontal ? 'col-resize' : 'row-resize'\n\n opts.onResizeStart?.(handleIndex)\n\n documentController.value?.abort()\n documentController.value = new AbortController()\n const sig = documentController.value.signal\n\n const flushResize = (touchEvent: TouchEvent) => {\n if (touchEvent.touches.length !== 1) {\n return\n }\n const data = startData.value\n if (!data) {\n return\n }\n const opts = optionsRef.value\n const isHorizontal = (opts.orientation ?? 'horizontal') === 'horizontal'\n const isRtl = isHorizontal && opts.dir === 'rtl'\n const touch = touchEvent.touches[0]\n const pointerPos = isHorizontal ? touch.clientX : touch.clientY\n const pixelDelta = (isRtl ? -1 : 1) * (pointerPos - data.startPointer)\n const delta = data.pixelMode ? pixelDelta : (pixelDelta / data.containerSize) * 100\n\n const resolvedPanels = panels.map((p) =>\n resolvePanel(p, data.pixelMode, data.containerSize, data.rootFontSize)\n )\n\n const newSizes = applyConstraints(\n data.startSizes,\n resolvedPanels,\n data.handleIndex,\n delta,\n opts.redistribute\n )\n\n const encoded = encodeWorkingSizes(\n newSizes,\n data.startSizes,\n data.startRaw,\n data.pixelMode,\n data.containerSize,\n data.rootFontSize\n )\n updateSizes(encoded)\n }\n\n const onTouchMove = (event: TouchEvent) => {\n if (event.touches.length !== 1) {\n return\n }\n if (!isDragging.value) {\n return\n }\n event.preventDefault()\n cancelAnimationFrame(frameId.value)\n frameId.value = requestAnimationFrame(() => flushResize(event))\n }\n\n const onTouchEnd = (event: TouchEvent) => {\n if (!isDragging.value) {\n return\n }\n cancelAnimationFrame(frameId.value)\n flushResize(event)\n\n isDragging.value = false\n const finishHandle = activeHandle.value\n activeHandle.value = -1\n\n document.body.style.userSelect = ''\n document.body.style.webkitUserSelect = ''\n document.body.style.cursor = ''\n\n documentController.value?.abort()\n documentController.value = null\n\n optionsRef.value.onResizeEnd?.(finishHandle, [...currentSizes.value])\n startData.value = null\n }\n\n document.addEventListener('touchmove', onTouchMove, { signal: sig })\n document.addEventListener('touchend', onTouchEnd, { signal: sig })\n document.addEventListener('touchcancel', onTouchEnd, { signal: sig })\n }\n\n const createKeyDownHandler = (handleIndex: number) => (event: KeyboardEvent) => {\n if (!enabled) {\n return\n }\n\n const isHorizontal = orientation === 'horizontal'\n const isRtl = dir === 'rtl'\n const container = pixelMode ? containerSize.value || measureContainer() : 0\n const liveRootFontSize = rootFontSizeRef.value\n const liveWorking = resolveWorkingSizes(\n currentSizes.value,\n pixelMode,\n container,\n liveRootFontSize\n )\n const livePanels = panels.map((p) => resolvePanel(p, pixelMode, container, liveRootFontSize))\n const liveBeforePanel = livePanels[handleIndex]\n const liveAfterPanel = livePanels[handleIndex + 1]\n\n let delta = 0\n const currentStep = resolveStep(\n event.shiftKey ? shiftStep : step,\n pixelMode,\n container,\n liveRootFontSize\n )\n\n switch (event.key) {\n case 'ArrowLeft':\n if (!isHorizontal) {\n return\n }\n delta = isRtl ? currentStep : -currentStep\n break\n case 'ArrowRight':\n if (!isHorizontal) {\n return\n }\n delta = isRtl ? -currentStep : currentStep\n break\n case 'ArrowUp':\n if (isHorizontal) {\n return\n }\n delta = -currentStep\n break\n case 'ArrowDown':\n if (isHorizontal) {\n return\n }\n delta = currentStep\n break\n case 'Home':\n delta = -(liveWorking[handleIndex] - getMin(liveBeforePanel))\n break\n case 'End':\n delta = getMax(liveBeforePanel) - liveWorking[handleIndex]\n break\n case 'Enter': {\n const beforeCollapsible = liveBeforePanel?.collapsible\n const afterCollapsible = liveAfterPanel?.collapsible\n\n if (beforeCollapsible && liveWorking[handleIndex] <= liveWorking[handleIndex + 1]) {\n toggleCollapsePanel(handleIndex)\n event.preventDefault()\n return\n }\n if (afterCollapsible) {\n toggleCollapsePanel(handleIndex + 1)\n event.preventDefault()\n return\n }\n if (beforeCollapsible) {\n toggleCollapsePanel(handleIndex)\n event.preventDefault()\n return\n }\n return\n }\n default:\n return\n }\n\n event.preventDefault()\n if (delta !== 0) {\n const newSizes = applyConstraints(liveWorking, livePanels, handleIndex, delta, redistribute)\n updateSizes(\n encodeWorkingSizes(\n newSizes,\n liveWorking,\n currentSizes.value,\n pixelMode,\n container,\n liveRootFontSize\n )\n )\n }\n }\n\n const createDoubleClickHandler = (handleIndex: number) => () => {\n const opts = optionsRef.value\n if (opts.enabled === false || opts.resetOnDoubleClick === false) {\n return\n }\n reset(handleIndex)\n }\n\n const getHandleRefCallback = (handleIndex: number): ((el: HTMLElement | null) => void) => {\n let controller = handleElementControllers.get(handleIndex)\n\n const callback = (node: HTMLElement | null) => {\n if (controller) {\n controller.abort()\n handleElementControllers.delete(handleIndex)\n controller = undefined\n }\n\n if (!node) {\n return\n }\n\n controller = new AbortController()\n handleElementControllers.set(handleIndex, controller)\n\n const onPointerDown = createPointerDownHandler(handleIndex)\n const onTouchStart = createTouchStartHandler(handleIndex)\n // const onKeyDown = createKeyDownHandler(handleIndex)\n // const onDoubleClick = createDoubleClickHandler(handleIndex)\n\n node.addEventListener('pointerdown', onPointerDown, { signal: controller.signal })\n node.addEventListener('touchstart', onTouchStart, { signal: controller.signal })\n }\n\n return callback\n }\n\n const getHandleEventHandlers = (input: { index: number }) => {\n const { index } = input\n return {\n onPointerDown: createPointerDownHandler(index),\n onTouchStart: createTouchStartHandler(index),\n onKeyDown: createKeyDownHandler(index),\n onDoubleClick: createDoubleClickHandler(index),\n }\n }\n\n const sizes = computed(() => currentSizes.value)\n\n return {\n sizes,\n pixelMode,\n collapsed: collapsed.value,\n activeHandle: activeHandle.value,\n containerRef,\n getHandleProps,\n getHandleEventHandlers,\n setSizes: updateSizes,\n collapse: collapsePanel,\n expand: expandPanel,\n toggleCollapse: toggleCollapsePanel,\n reset,\n }\n}\n"],"mappings":";;;AAsNA,MAAM,QAAQ;AACd,MAAM,SAAS;AACf,MAAM,aAAa;AAEnB,SA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