react-public-components 1.1.4 → 1.1.5
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/dist/index.cjs +81 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +81 -42
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -246,7 +246,6 @@ var CustomSplitter = ({
|
|
|
246
246
|
const resolvedOrientation = orientation != null ? orientation : vertical ? "vertical" : "horizontal";
|
|
247
247
|
const rootRef = (0, import_react2.useRef)(null);
|
|
248
248
|
const sizesRef = (0, import_react2.useRef)([]);
|
|
249
|
-
const lastNonZeroSizesRef = (0, import_react2.useRef)([]);
|
|
250
249
|
const [containerSize, setContainerSize] = (0, import_react2.useState)(0);
|
|
251
250
|
const [draggingIndex, setDraggingIndex] = (0, import_react2.useState)(null);
|
|
252
251
|
const [hoveredIndex, setHoveredIndex] = (0, import_react2.useState)(null);
|
|
@@ -287,6 +286,9 @@ var CustomSplitter = ({
|
|
|
287
286
|
if (size <= 1) {
|
|
288
287
|
return 0;
|
|
289
288
|
}
|
|
289
|
+
if (size < getPanelMin(index)) {
|
|
290
|
+
return size;
|
|
291
|
+
}
|
|
290
292
|
return clamp(size, getPanelMin(index), getPanelMax(index));
|
|
291
293
|
});
|
|
292
294
|
},
|
|
@@ -325,11 +327,6 @@ var CustomSplitter = ({
|
|
|
325
327
|
const normalized = normalizeToTrack(nextSizes);
|
|
326
328
|
setSizes(normalized);
|
|
327
329
|
sizesRef.current = normalized;
|
|
328
|
-
normalized.forEach((size, index) => {
|
|
329
|
-
if (size > 1) {
|
|
330
|
-
lastNonZeroSizesRef.current[index] = size;
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
330
|
if (notify) {
|
|
334
331
|
onResize == null ? void 0 : onResize(roundSizes(normalized));
|
|
335
332
|
}
|
|
@@ -353,17 +350,16 @@ var CustomSplitter = ({
|
|
|
353
350
|
setSizes((previous) => {
|
|
354
351
|
const nextSizes = buildInitialSizes(previous);
|
|
355
352
|
sizesRef.current = nextSizes;
|
|
356
|
-
lastNonZeroSizesRef.current = nextSizes.map(
|
|
357
|
-
(size) => Math.max(size, trackSize / Math.max(panels.length, 1))
|
|
358
|
-
);
|
|
359
353
|
return nextSizes;
|
|
360
354
|
});
|
|
361
|
-
}, [buildInitialSizes
|
|
355
|
+
}, [buildInitialSizes]);
|
|
362
356
|
const getResizedPair = (0, import_react2.useCallback)(
|
|
363
357
|
(sourceSizes, index, delta) => {
|
|
364
358
|
const nextSizes = [...sourceSizes];
|
|
365
|
-
const
|
|
366
|
-
const
|
|
359
|
+
const isLeftCollapsed = sourceSizes[index] <= 1;
|
|
360
|
+
const isRightCollapsed = sourceSizes[index + 1] <= 1;
|
|
361
|
+
const leftMin = isLeftCollapsed ? 0 : getPanelMin(index);
|
|
362
|
+
const rightMin = isRightCollapsed ? 0 : getPanelMin(index + 1);
|
|
367
363
|
const leftMax = getPanelMax(index);
|
|
368
364
|
const rightMax = getPanelMax(index + 1);
|
|
369
365
|
const minDelta = Math.max(leftMin - sourceSizes[index], sourceSizes[index + 1] - rightMax);
|
|
@@ -411,14 +407,16 @@ var CustomSplitter = ({
|
|
|
411
407
|
document.addEventListener("pointerup", handlePointerUp);
|
|
412
408
|
};
|
|
413
409
|
const toggleCollapse = (index, neighborIndex) => {
|
|
410
|
+
var _a;
|
|
414
411
|
const nextSizes = [...sizesRef.current];
|
|
415
412
|
if (nextSizes[index] > 1) {
|
|
416
|
-
lastNonZeroSizesRef.current[index] = nextSizes[index];
|
|
417
413
|
nextSizes[neighborIndex] += nextSizes[index];
|
|
418
414
|
nextSizes[index] = 0;
|
|
419
415
|
} else {
|
|
420
|
-
const
|
|
421
|
-
|
|
416
|
+
const initialSizes = buildInitialSizes();
|
|
417
|
+
const initialSize = (_a = initialSizes[index]) != null ? _a : parseSize(panels[index].props.defaultSize, trackSize, trackSize / panels.length);
|
|
418
|
+
const restoredSize = clamp(initialSize, getPanelMin(index), getPanelMax(index));
|
|
419
|
+
nextSizes[index] = restoredSize;
|
|
422
420
|
nextSizes[neighborIndex] = Math.max(0, nextSizes[neighborIndex] - nextSizes[index]);
|
|
423
421
|
}
|
|
424
422
|
updateSizes(nextSizes);
|
|
@@ -455,6 +453,7 @@ var CustomSplitter = ({
|
|
|
455
453
|
return null;
|
|
456
454
|
}
|
|
457
455
|
const Icon = resolvedOrientation === "horizontal" ? direction === "start" ? LeftOutlined : RightOutlined : direction === "start" ? UpOutlined : DownOutlined;
|
|
456
|
+
const isHorizontal = resolvedOrientation === "horizontal";
|
|
458
457
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
459
458
|
"button",
|
|
460
459
|
{
|
|
@@ -468,24 +467,33 @@ var CustomSplitter = ({
|
|
|
468
467
|
alignItems: "center",
|
|
469
468
|
background: "#fff",
|
|
470
469
|
border: "1px solid #d9d9d9",
|
|
471
|
-
borderRadius:
|
|
470
|
+
borderRadius: 3,
|
|
472
471
|
color: "#595959",
|
|
473
472
|
cursor: "pointer",
|
|
474
473
|
display: "flex",
|
|
475
|
-
height:
|
|
474
|
+
height: isHorizontal ? 40 : 14,
|
|
475
|
+
width: isHorizontal ? 14 : 40,
|
|
476
476
|
justifyContent: "center",
|
|
477
477
|
padding: 0,
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
478
|
+
fontSize: 10,
|
|
479
|
+
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)",
|
|
480
|
+
transition: "all 0.2s ease"
|
|
481
481
|
},
|
|
482
482
|
type: "button",
|
|
483
|
+
onMouseEnter: (e) => {
|
|
484
|
+
e.currentTarget.style.background = "#e5e7eb";
|
|
485
|
+
e.currentTarget.style.color = "#1f2937";
|
|
486
|
+
},
|
|
487
|
+
onMouseLeave: (e) => {
|
|
488
|
+
e.currentTarget.style.background = "#fff";
|
|
489
|
+
e.currentTarget.style.color = "#595959";
|
|
490
|
+
},
|
|
483
491
|
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, {})
|
|
484
492
|
}
|
|
485
493
|
);
|
|
486
494
|
};
|
|
487
495
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className, ref: rootRef, style: rootStyle, children: panels.map((panel, index) => {
|
|
488
|
-
var _a, _b, _c;
|
|
496
|
+
var _a, _b, _c, _d;
|
|
489
497
|
const isHidden = sizes[index] <= 1;
|
|
490
498
|
const isLeftOrTopCollapsed = ((_a = sizes[index]) != null ? _a : 0) <= 1;
|
|
491
499
|
const isRightOrBottomCollapsed = ((_b = sizes[index + 1]) != null ? _b : 0) <= 1;
|
|
@@ -500,12 +508,24 @@ var CustomSplitter = ({
|
|
|
500
508
|
flex: `0 0 ${(_c = sizes[index]) != null ? _c : 0}px`,
|
|
501
509
|
minHeight: 0,
|
|
502
510
|
minWidth: 0,
|
|
503
|
-
overflow: "
|
|
504
|
-
|
|
511
|
+
overflow: "hidden",
|
|
512
|
+
position: "relative",
|
|
505
513
|
transition: draggingIndex === null ? "flex-basis 0.2s ease" : void 0,
|
|
506
514
|
...panel.props.style
|
|
507
515
|
},
|
|
508
|
-
children: !isHidden &&
|
|
516
|
+
children: !isHidden && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
517
|
+
"div",
|
|
518
|
+
{
|
|
519
|
+
style: {
|
|
520
|
+
boxSizing: "border-box",
|
|
521
|
+
height: "100%",
|
|
522
|
+
overflow: "auto",
|
|
523
|
+
padding: ((_d = sizes[index]) != null ? _d : 0) < 32 ? 0 : 16,
|
|
524
|
+
width: "100%"
|
|
525
|
+
},
|
|
526
|
+
children: panel.props.children
|
|
527
|
+
}
|
|
528
|
+
)
|
|
509
529
|
}
|
|
510
530
|
),
|
|
511
531
|
index < panels.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
@@ -542,14 +562,14 @@ var CustomSplitter = ({
|
|
|
542
562
|
},
|
|
543
563
|
tabIndex: 0,
|
|
544
564
|
children: [
|
|
545
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
565
|
+
(hoveredIndex === index || draggingIndex === index || !isAnyCollapsed) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
546
566
|
"div",
|
|
547
567
|
{
|
|
548
568
|
style: {
|
|
549
|
-
background: hoveredIndex === index || draggingIndex === index
|
|
569
|
+
background: hoveredIndex === index || draggingIndex === index ? "#1677ff" : "#d9d9d9",
|
|
550
570
|
borderRadius: 2,
|
|
551
|
-
height: resolvedOrientation === "horizontal" ?
|
|
552
|
-
width: resolvedOrientation === "horizontal" ? 2 :
|
|
571
|
+
height: resolvedOrientation === "horizontal" ? 40 : 2,
|
|
572
|
+
width: resolvedOrientation === "horizontal" ? 2 : 40
|
|
553
573
|
}
|
|
554
574
|
}
|
|
555
575
|
),
|
|
@@ -558,9 +578,14 @@ var CustomSplitter = ({
|
|
|
558
578
|
{
|
|
559
579
|
style: {
|
|
560
580
|
position: "absolute",
|
|
581
|
+
top: "50%",
|
|
582
|
+
left: "50%",
|
|
583
|
+
transform: "translate(-50%, -50%)",
|
|
561
584
|
display: "flex",
|
|
562
|
-
flexDirection: resolvedOrientation === "horizontal" ? "
|
|
563
|
-
|
|
585
|
+
flexDirection: resolvedOrientation === "horizontal" ? "row" : "column",
|
|
586
|
+
alignItems: "center",
|
|
587
|
+
justifyContent: "center",
|
|
588
|
+
gap: 2,
|
|
564
589
|
opacity: hoveredIndex === index || draggingIndex === index ? 1 : 0,
|
|
565
590
|
pointerEvents: hoveredIndex === index || draggingIndex === index ? "auto" : "none",
|
|
566
591
|
transition: "opacity 0.15s ease",
|
|
@@ -577,18 +602,23 @@ var CustomSplitter = ({
|
|
|
577
602
|
{
|
|
578
603
|
style: {
|
|
579
604
|
position: "absolute",
|
|
605
|
+
top: resolvedOrientation === "horizontal" ? "50%" : isLeftOrTopCollapsed ? 0 : void 0,
|
|
606
|
+
bottom: resolvedOrientation === "horizontal" ? void 0 : isRightOrBottomCollapsed ? 0 : void 0,
|
|
607
|
+
left: resolvedOrientation === "horizontal" ? isLeftOrTopCollapsed ? 0 : void 0 : "50%",
|
|
608
|
+
right: resolvedOrientation === "horizontal" ? isRightOrBottomCollapsed ? 0 : void 0 : void 0,
|
|
580
609
|
display: "flex",
|
|
581
610
|
alignItems: "center",
|
|
582
611
|
justifyContent: "center",
|
|
583
|
-
opacity:
|
|
584
|
-
pointerEvents:
|
|
585
|
-
|
|
586
|
-
|
|
612
|
+
opacity: 1,
|
|
613
|
+
pointerEvents: "auto",
|
|
614
|
+
zIndex: 5,
|
|
615
|
+
transform: resolvedOrientation === "horizontal" ? `translate(${isLeftOrTopCollapsed ? "4px" : "-4px"}, -50%)` : `translate(-50%, ${isLeftOrTopCollapsed ? "4px" : "-4px"})`
|
|
587
616
|
},
|
|
588
617
|
children: (() => {
|
|
589
618
|
const ExpandIcon = resolvedOrientation === "horizontal" ? isLeftOrTopCollapsed ? RightOutlined : LeftOutlined : isLeftOrTopCollapsed ? DownOutlined : UpOutlined;
|
|
590
619
|
const targetIndex = isLeftOrTopCollapsed ? index : index + 1;
|
|
591
620
|
const neighborIndex = isLeftOrTopCollapsed ? index + 1 : index;
|
|
621
|
+
const isHorizontal = resolvedOrientation === "horizontal";
|
|
592
622
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
593
623
|
"button",
|
|
594
624
|
{
|
|
@@ -600,20 +630,29 @@ var CustomSplitter = ({
|
|
|
600
630
|
},
|
|
601
631
|
style: {
|
|
602
632
|
alignItems: "center",
|
|
603
|
-
background: "#
|
|
604
|
-
border: "1px solid #
|
|
605
|
-
borderRadius:
|
|
606
|
-
color: "#
|
|
633
|
+
background: "#f3f4f6",
|
|
634
|
+
border: "1px solid #e5e7eb",
|
|
635
|
+
borderRadius: 3,
|
|
636
|
+
color: "#595959",
|
|
607
637
|
cursor: "pointer",
|
|
608
638
|
display: "flex",
|
|
609
|
-
height:
|
|
639
|
+
height: isHorizontal ? 40 : 14,
|
|
640
|
+
width: isHorizontal ? 14 : 40,
|
|
610
641
|
justifyContent: "center",
|
|
611
642
|
padding: 0,
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
643
|
+
fontSize: 10,
|
|
644
|
+
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.08)",
|
|
645
|
+
transition: "all 0.2s ease"
|
|
615
646
|
},
|
|
616
647
|
type: "button",
|
|
648
|
+
onMouseEnter: (e) => {
|
|
649
|
+
e.currentTarget.style.background = "#e5e7eb";
|
|
650
|
+
e.currentTarget.style.color = "#1f2937";
|
|
651
|
+
},
|
|
652
|
+
onMouseLeave: (e) => {
|
|
653
|
+
e.currentTarget.style.background = "#f3f4f6";
|
|
654
|
+
e.currentTarget.style.color = "#595959";
|
|
655
|
+
},
|
|
617
656
|
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ExpandIcon, {})
|
|
618
657
|
}
|
|
619
658
|
);
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../CollapseBox/index.tsx","../src/icons.tsx","../Splitter/index.tsx"],"sourcesContent":["// 统一入口\nexport { default as CollapseBox } from '../CollapseBox';\nexport type {\n\tCollapseBoxProps,\n\tCollapseBoxDirection,\n\tCollapseBoxButtonPosition,\n} from '../CollapseBox';\n\nexport { default as Splitter } from '../Splitter';\nexport type {\n\tSplitterProps,\n\tSplitterPanelProps,\n\tSplitterSize,\n\tSplitterOrientation,\n} from '../Splitter';\n","import { useState, type CSSProperties, type ReactNode } from 'react';\nimport { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '../src/icons';\nimport './index.less';\n\nexport type CollapseBoxDirection = 'horizontal' | 'vertical';\nexport type CollapseBoxButtonPosition = 'left' | 'right' | 'top' | 'bottom';\n\nexport interface CollapseBoxProps {\n\tchildren?: ReactNode;\n\ttitle?: string;\n\tdirection?: CollapseBoxDirection;\n\tbuttonPosition?: CollapseBoxButtonPosition;\n\tdefaultWidth?: number | string;\n\tdefaultHeight?: number | string;\n\tcontentPadding?: string;\n\theaderHeight?: number;\n\tclassName?: string;\n}\n\nconst formatDimension = (value?: number | string): string | undefined => {\n\tif (value === undefined || value === null) return undefined;\n\treturn typeof value === 'number' ? `${value}px` : value;\n};\n\nconst ChevronLeft = () => <LeftOutlined />;\n\nconst ChevronRight = () => <RightOutlined />;\n\nconst ChevronUp = () => <UpOutlined />;\n\nconst ChevronDown = () => <DownOutlined />;\n\nconst CollapsibleBox = ({\n\tchildren,\n\ttitle = '内容区域',\n\tdirection = 'horizontal',\n\tbuttonPosition = 'right',\n\tdefaultWidth = 600,\n\tdefaultHeight = 300,\n\tcontentPadding = '16px',\n\theaderHeight = 16,\n\tclassName,\n}: CollapseBoxProps) => {\n\tconst [isExpanded, setIsExpanded] = useState(true);\n\n\tconst getContentMaxHeight = () => {\n\t\tif (typeof defaultHeight === 'number') {\n\t\t\treturn `${defaultHeight - headerHeight}px`;\n\t\t}\n\t\tif (typeof defaultHeight === 'string') {\n\t\t\treturn headerHeight ? `calc(${defaultHeight} - ${headerHeight}px)` : defaultHeight;\n\t\t}\n\t\treturn '100%';\n\t};\n\n\tconst getIcon = () => {\n\t\tif (direction === 'horizontal') {\n\t\t\tif (buttonPosition === 'right') {\n\t\t\t\treturn isExpanded ? <ChevronRight /> : <ChevronLeft />;\n\t\t\t} else {\n\t\t\t\treturn isExpanded ? <ChevronLeft /> : <ChevronRight />;\n\t\t\t}\n\t\t} else {\n\t\t\tif (buttonPosition === 'bottom') {\n\t\t\t\treturn isExpanded ? <ChevronUp /> : <ChevronDown />;\n\t\t\t} else {\n\t\t\t\treturn isExpanded ? <ChevronDown /> : <ChevronUp />;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst getButtonClass = () => {\n\t\tif (direction === 'horizontal') {\n\t\t\treturn buttonPosition === 'right' ? 'button-right' : 'button-left';\n\t\t} else {\n\t\t\treturn buttonPosition === 'bottom' ? 'button-bottom' : 'button-top';\n\t\t}\n\t};\n\n\tconst getContainerStyle = (): CSSProperties => {\n\t\tconst resolvedHeight = formatDimension(defaultHeight);\n\t\tconst resolvedWidth = formatDimension(defaultWidth);\n\t\tif (direction === 'horizontal') {\n\t\t\treturn {\n\t\t\t\twidth: isExpanded ? resolvedWidth : '0px',\n\t\t\t\theight: resolvedHeight,\n\t\t\t\tminWidth: 0,\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\theight: isExpanded ? resolvedHeight : '0px',\n\t\t\t\twidth: resolvedWidth,\n\t\t\t\tminHeight: 0,\n\t\t\t};\n\t\t}\n\t};\n\n\tconst baseWrapperClass =\n\t\tdirection === 'horizontal' ? 'collapsible-wrapper horizontal' : 'collapsible-wrapper vertical';\n\tconst wrapperClass = className ? `${baseWrapperClass} ${className}` : baseWrapperClass;\n\n\tconst containerClass =\n\t\tdirection === 'horizontal' && buttonPosition === 'right'\n\t\t\t? 'collapsible-container align-right'\n\t\t\t: 'collapsible-container';\n\tconst height = getContentMaxHeight();\n\tconst contentStyle: CSSProperties = {\n\t\tmaxHeight: direction === 'vertical' ? (isExpanded ? height : '0px') : height,\n\t\toverflowY: 'auto',\n\t\tpadding: direction === 'vertical' && !isExpanded ? '0px' : contentPadding,\n\t\tboxSizing: 'border-box',\n\t};\n\n\t// 折叠时(纵向 + 底部按钮):按钮需切换为 top:0 定位,使其显示在折叠线下方\n\tconst buttonStyle: CSSProperties =\n\t\tdirection === 'vertical' && buttonPosition === 'bottom' && !isExpanded\n\t\t\t? { top: '0px', bottom: 'auto' }\n\t\t\t: {};\n\n\t// 让 wrapper 高度跟随容器,确保 bottom:0 的按钮贴住容器底部\n\t// 折叠时 wrapper 高度为 0,配合按钮的 translateY(-100%) 让按钮显示在折叠线上方\n\tconst formattedWidth = formatDimension(defaultWidth);\n\tconst formattedHeight = formatDimension(defaultHeight);\n\tconst wrapperStyle: CSSProperties | undefined =\n\t\tdirection === 'vertical'\n\t\t\t? isExpanded\n\t\t\t\t? {\n\t\t\t\t\t\theight: formattedHeight,\n\t\t\t\t\t\twidth: formattedWidth,\n\t\t\t\t\t}\n\t\t\t\t: { height: 0, width: formattedWidth }\n\t\t\t: undefined;\n\n\treturn (\n\t\t<div className={wrapperClass} style={wrapperStyle}>\n\t\t\t<div style={getContainerStyle()} className={containerClass}>\n\t\t\t\t{title && (\n\t\t\t\t\t<div className=\"collapsible-header\" style={{ display: 'none' }}>\n\t\t\t\t\t\t<h3>{title}</h3>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"collapsible-content\" style={contentStyle}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tonClick={() => setIsExpanded(!isExpanded)}\n\t\t\t\tclassName={`toggle-button ${getButtonClass()}`}\n\t\t\t\tstyle={buttonStyle}\n\t\t\t\ttitle={isExpanded ? '隐藏' : '展开'}\n\t\t\t>\n\t\t\t\t{getIcon()}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default CollapsibleBox;\n","import type { CSSProperties } from 'react';\n\ninterface IconProps {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n}\n\nconst baseStyle: CSSProperties = {\n\tdisplay: 'inline-block',\n\twidth: '1em',\n\theight: '1em',\n\tverticalAlign: '-0.125em',\n};\n\nexport const LeftOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"left\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z\" />\n\t</svg>\n);\n\nexport const RightOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"right\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z\" />\n\t</svg>\n);\n\nexport const UpOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"up\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M890.5 755.3L537.4 268a31.96 31.96 0 00-50.8 0L133.5 755.3a7.95 7.95 0 006.3 12.7h75.5c4.9 0 9.6-2.3 12.6-6.1l281-360 281 360c3 3.8 7.7 6.1 12.6 6.1h75.5c6.7 0 10.4-7.6 6.1-12.7z\" />\n\t</svg>\n);\n\nexport const DownOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"down\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 37 17.6 49.8 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z\" />\n\t</svg>\n);\n","import { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '../src/icons';\nimport type {\n\tCSSProperties,\n\tReactElement,\n\tReactNode,\n\tPointerEvent as ReactPointerEvent,\n} from 'react';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nexport type SplitterSize = number | `${number}%`;\nexport type SplitterOrientation = 'horizontal' | 'vertical';\n\nexport type SplitterPanelProps = {\n\tchildren?: ReactNode;\n\tcollapsible?: boolean;\n\tdefaultSize?: SplitterSize;\n\tmax?: SplitterSize;\n\tmin?: SplitterSize;\n\tresizable?: boolean;\n\tsize?: SplitterSize;\n\tstyle?: CSSProperties;\n};\n\nexport type SplitterProps = {\n\tchildren: ReactNode;\n\tclassName?: string;\n\tdraggerSize?: number;\n\tlazy?: boolean;\n\tonResize?: (sizes: number[]) => void;\n\tonResizeEnd?: (sizes: number[]) => void;\n\tonResizeStart?: (sizes: number[]) => void;\n\torientation?: SplitterOrientation;\n\tstyle?: CSSProperties;\n\tvertical?: boolean;\n};\n\ntype SplitterComponent = React.FC<SplitterProps> & {\n\tPanel: React.FC<SplitterPanelProps>;\n};\n\nconst DEFAULT_DRAGGER_SIZE = 4;\nconst MIN_DRAG_SIZE = 40; // 手动拖拽调整大小时的默认最小限制 (px)\n\nconst SplitterPanel: React.FC<SplitterPanelProps> = ({ children }) => <>{children}</>;\n\nconst isPercentSize = (value: SplitterSize): value is `${number}%` =>\n\ttypeof value === 'string' && value.endsWith('%');\n\nconst parseSize = (value: SplitterSize | undefined, total: number, fallback: number) => {\n\tif (value === undefined) {\n\t\treturn fallback;\n\t}\n\n\tif (isPercentSize(value)) {\n\t\treturn (Number.parseFloat(value) / 100) * total;\n\t}\n\n\treturn Number(value);\n};\n\nconst roundSizes = (sizes: number[]) => sizes.map((size) => Math.round(size));\n\nconst getPointerPosition = (\n\tevent: PointerEvent | ReactPointerEvent,\n\torientation: SplitterOrientation,\n) => (orientation === 'horizontal' ? event.clientX : event.clientY);\n\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\nconst CustomSplitter: SplitterComponent = ({\n\tchildren,\n\tclassName,\n\tdraggerSize = DEFAULT_DRAGGER_SIZE,\n\tlazy = false,\n\tonResize,\n\tonResizeEnd,\n\tonResizeStart,\n\torientation,\n\tstyle,\n\tvertical = false,\n}) => {\n\tconst resolvedOrientation = orientation ?? (vertical ? 'vertical' : 'horizontal');\n\tconst rootRef = useRef<HTMLDivElement>(null);\n\tconst sizesRef = useRef<number[]>([]);\n\tconst lastNonZeroSizesRef = useRef<number[]>([]);\n\tconst [containerSize, setContainerSize] = useState(0);\n\tconst [draggingIndex, setDraggingIndex] = useState<number | null>(null);\n\tconst [hoveredIndex, setHoveredIndex] = useState<number | null>(null);\n\tconst [sizes, setSizes] = useState<number[]>([]);\n\n\tconst panels = useMemo(\n\t\t() =>\n\t\t\tReact.Children.toArray(children).filter(\n\t\t\t\tReact.isValidElement,\n\t\t\t) as ReactElement<SplitterPanelProps>[],\n\t\t[children],\n\t);\n\n\tconst trackSize = Math.max(0, containerSize - Math.max(0, panels.length - 1) * draggerSize);\n\n\tconst getPanelMin = useCallback(\n\t\t(index: number) => parseSize(panels[index]?.props.min, trackSize, 0),\n\t\t[panels, trackSize],\n\t);\n\n\tconst getPanelMax = useCallback(\n\t\t(index: number) => parseSize(panels[index]?.props.max, trackSize, trackSize),\n\t\t[panels, trackSize],\n\t);\n\n\tconst normalizeToTrack = useCallback(\n\t\t(nextSizes: number[]) => {\n\t\t\tif (!trackSize || !nextSizes.length) {\n\t\t\t\treturn nextSizes;\n\t\t\t}\n\n\t\t\tconst normalized = [...nextSizes];\n\t\t\tconst diff = trackSize - normalized.reduce((sum, size) => sum + size, 0);\n\t\t\tconst flexibleIndex = normalized.findIndex((size) => size > 0);\n\t\t\tif (flexibleIndex !== -1) {\n\t\t\t\tnormalized[flexibleIndex] += diff;\n\t\t\t}\n\n\t\t\treturn normalized.map((size, index) => {\n\t\t\t\t// 折叠状态(size <= 1)保持为 0,不受 min 限制干扰\n\t\t\t\tif (size <= 1) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\treturn clamp(size, getPanelMin(index), getPanelMax(index));\n\t\t\t});\n\t\t},\n\t\t[getPanelMax, getPanelMin, trackSize],\n\t);\n\n\tconst buildInitialSizes = useCallback(\n\t\t(previous?: number[]) => {\n\t\t\tif (!trackSize || !panels.length) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tif (previous?.length === panels.length) {\n\t\t\t\tconst previousTotal = previous.reduce((sum, size) => sum + size, 0);\n\t\t\t\tif (previousTotal > 0) {\n\t\t\t\t\treturn normalizeToTrack(previous.map((size) => (size / previousTotal) * trackSize));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst explicitSizes = panels.map((panel) =>\n\t\t\t\tparseSize(panel.props.size ?? panel.props.defaultSize, trackSize, -1),\n\t\t\t);\n\t\t\tconst usedSize = explicitSizes\n\t\t\t\t.filter((size) => size >= 0)\n\t\t\t\t.reduce((sum, size) => sum + size, 0);\n\t\t\tconst unsetCount = explicitSizes.filter((size) => size < 0).length;\n\t\t\tconst fallbackSize = unsetCount ? Math.max(0, (trackSize - usedSize) / unsetCount) : 0;\n\n\t\t\treturn normalizeToTrack(\n\t\t\t\texplicitSizes.map((size, index) =>\n\t\t\t\t\tclamp(size >= 0 ? size : fallbackSize, getPanelMin(index), getPanelMax(index)),\n\t\t\t\t),\n\t\t\t);\n\t\t},\n\t\t[getPanelMax, getPanelMin, normalizeToTrack, panels, trackSize],\n\t);\n\n\tconst updateSizes = useCallback(\n\t\t(nextSizes: number[], notify = true) => {\n\t\t\tconst normalized = normalizeToTrack(nextSizes);\n\t\t\tsetSizes(normalized);\n\t\t\tsizesRef.current = normalized;\n\t\t\tnormalized.forEach((size, index) => {\n\t\t\t\tif (size > 1) {\n\t\t\t\t\tlastNonZeroSizesRef.current[index] = size;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (notify) {\n\t\t\t\tonResize?.(roundSizes(normalized));\n\t\t\t}\n\t\t},\n\t\t[normalizeToTrack, onResize],\n\t);\n\n\tuseEffect(() => {\n\t\tconst node = rootRef.current;\n\t\tif (!node) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst syncSize = () => {\n\t\t\tsetContainerSize(resolvedOrientation === 'horizontal' ? node.clientWidth : node.clientHeight);\n\t\t};\n\t\tsyncSize();\n\n\t\tconst observer = new ResizeObserver(syncSize);\n\t\tobserver.observe(node);\n\t\treturn () => observer.disconnect();\n\t}, [resolvedOrientation]);\n\n\tuseEffect(() => {\n\t\tsetSizes((previous) => {\n\t\t\tconst nextSizes = buildInitialSizes(previous);\n\t\t\tsizesRef.current = nextSizes;\n\t\t\tlastNonZeroSizesRef.current = nextSizes.map((size) =>\n\t\t\t\tMath.max(size, trackSize / Math.max(panels.length, 1)),\n\t\t\t);\n\t\t\treturn nextSizes;\n\t\t});\n\t}, [buildInitialSizes, panels.length, trackSize]);\n\n\tconst getResizedPair = useCallback(\n\t\t(sourceSizes: number[], index: number, delta: number) => {\n\t\t\tconst nextSizes = [...sourceSizes];\n\t\t\tconst leftMin = getPanelMin(index);\n\t\t\tconst rightMin = getPanelMin(index + 1);\n\t\t\tconst leftMax = getPanelMax(index);\n\t\t\tconst rightMax = getPanelMax(index + 1);\n\n\t\t\tconst minDelta = Math.max(leftMin - sourceSizes[index], sourceSizes[index + 1] - rightMax);\n\t\t\tconst maxDelta = Math.min(leftMax - sourceSizes[index], sourceSizes[index + 1] - rightMin);\n\t\t\tconst safeDelta = clamp(delta, minDelta, maxDelta);\n\n\t\t\tnextSizes[index] = sourceSizes[index] + safeDelta;\n\t\t\tnextSizes[index + 1] = sourceSizes[index + 1] - safeDelta;\n\t\t\treturn normalizeToTrack(nextSizes);\n\t\t},\n\t\t[getPanelMax, getPanelMin, normalizeToTrack],\n\t);\n\n\tconst resizePair = useCallback(\n\t\t(index: number, delta: number, notify = true) => {\n\t\t\tupdateSizes(getResizedPair(sizesRef.current, index, delta), notify);\n\t\t},\n\t\t[getResizedPair, updateSizes],\n\t);\n\n\tconst startResize = (index: number, event: ReactPointerEvent<HTMLDivElement>) => {\n\t\tif (panels[index].props.resizable === false || panels[index + 1].props.resizable === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tconst startPosition = getPointerPosition(event, resolvedOrientation);\n\t\tconst startSizes = [...sizesRef.current];\n\t\tlet latestSizes = startSizes;\n\n\t\tsetDraggingIndex(index);\n\t\tonResizeStart?.(roundSizes(startSizes));\n\n\t\tconst handlePointerMove = (moveEvent: PointerEvent) => {\n\t\t\tconst delta = getPointerPosition(moveEvent, resolvedOrientation) - startPosition;\n\t\t\tlatestSizes = getResizedPair(startSizes, index, delta);\n\t\t\tif (!lazy) {\n\t\t\t\tupdateSizes(latestSizes, true);\n\t\t\t}\n\t\t};\n\n\t\tconst handlePointerUp = () => {\n\t\t\tdocument.removeEventListener('pointermove', handlePointerMove);\n\t\t\tdocument.removeEventListener('pointerup', handlePointerUp);\n\t\t\tsetDraggingIndex(null);\n\t\t\tif (lazy) {\n\t\t\t\tupdateSizes(latestSizes, true);\n\t\t\t}\n\t\t\tonResizeEnd?.(roundSizes(sizesRef.current));\n\t\t};\n\n\t\tdocument.addEventListener('pointermove', handlePointerMove);\n\t\tdocument.addEventListener('pointerup', handlePointerUp);\n\t};\n\n\tconst toggleCollapse = (index: number, neighborIndex: number) => {\n\t\tconst nextSizes = [...sizesRef.current];\n\n\t\tif (nextSizes[index] > 1) {\n\t\t\tlastNonZeroSizesRef.current[index] = nextSizes[index];\n\t\t\tnextSizes[neighborIndex] += nextSizes[index];\n\t\t\tnextSizes[index] = 0;\n\t\t} else {\n\t\t\tconst restoredSize =\n\t\t\t\tlastNonZeroSizesRef.current[index] ||\n\t\t\t\tparseSize(panels[index].props.defaultSize, trackSize, trackSize / panels.length);\n\t\t\tnextSizes[index] = clamp(restoredSize, getPanelMin(index), getPanelMax(index));\n\t\t\tnextSizes[neighborIndex] = Math.max(0, nextSizes[neighborIndex] - nextSizes[index]);\n\t\t}\n\n\t\tupdateSizes(nextSizes);\n\t\tonResizeEnd?.(roundSizes(sizesRef.current));\n\t};\n\n\tconst resetSizes = () => {\n\t\tconst nextSizes = buildInitialSizes();\n\t\tupdateSizes(nextSizes);\n\t\tonResizeEnd?.(roundSizes(nextSizes));\n\t};\n\n\tconst rootStyle: CSSProperties = {\n\t\tborder: '1px solid #f0f0f0',\n\t\tborderRadius: 8,\n\t\tboxSizing: 'border-box',\n\t\tdisplay: 'flex',\n\t\tflexDirection: resolvedOrientation === 'horizontal' ? 'row' : 'column',\n\t\theight: 360,\n\t\tminHeight: 0,\n\t\toverflow: 'hidden',\n\t\tposition: 'relative',\n\t\twidth: '100%',\n\t\t...style,\n\t};\n\n\tconst renderCollapseButton = (\n\t\tdraggerIndex: number,\n\t\tpanelIndex: number,\n\t\tdirection: 'start' | 'end',\n\t) => {\n\t\tconst panel = panels[panelIndex];\n\t\tif (!panel?.props.collapsible) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst neighborIndex = direction === 'start' ? panelIndex + 1 : panelIndex - 1;\n\t\tconst isCollapsed = (sizes[panelIndex] ?? 0) <= 1;\n\t\tconst isNeighborCollapsed = (sizes[neighborIndex] ?? 0) <= 1;\n\n\t\t// 自己折叠后隐藏;对侧面板折叠后也隐藏(避免与展开按钮重复/语义冲突)\n\t\tif (isCollapsed || isNeighborCollapsed) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// 展开时箭头指向面板将被折叠到的方向\n\t\tconst Icon =\n\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t? direction === 'start'\n\t\t\t\t\t? LeftOutlined\n\t\t\t\t\t: RightOutlined\n\t\t\t\t: direction === 'start'\n\t\t\t\t\t? UpOutlined\n\t\t\t\t\t: DownOutlined;\n\n\t\treturn (\n\t\t\t<button\n\t\t\t\taria-label=\"折叠面板\"\n\t\t\t\ttitle=\"折叠面板\"\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\ttoggleCollapse(panelIndex, neighborIndex);\n\t\t\t\t}}\n\t\t\t\tstyle={{\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tbackground: '#fff',\n\t\t\t\t\tborder: '1px solid #d9d9d9',\n\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\tcolor: '#595959',\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\theight: 20,\n\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\tpadding: 0,\n\t\t\t\t\twidth: 20,\n\t\t\t\t\tfontSize: 12,\n\t\t\t\t\tboxShadow: '0 2px 4px rgba(0,0,0,0.08)',\n\t\t\t\t}}\n\t\t\t\ttype=\"button\"\n\t\t\t>\n\t\t\t\t<Icon />\n\t\t\t</button>\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className={className} ref={rootRef} style={rootStyle}>\n\t\t\t{panels.map((panel, index) => {\n\t\t\t\tconst isHidden = sizes[index] <= 1;\n\t\t\t\tconst isLeftOrTopCollapsed = (sizes[index] ?? 0) <= 1;\n\t\t\t\tconst isRightOrBottomCollapsed = (sizes[index + 1] ?? 0) <= 1;\n\t\t\t\tconst isAnyCollapsed = isLeftOrTopCollapsed || isRightOrBottomCollapsed;\n\n\t\t\t\treturn (\n\t\t\t\t\t<React.Fragment key={index}>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tbackground: index % 2 ? '#fff' : '#fafafa',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tflex: `0 0 ${sizes[index] ?? 0}px`,\n\t\t\t\t\t\t\t\tminHeight: 0,\n\t\t\t\t\t\t\t\tminWidth: 0,\n\t\t\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t\t\t\tpadding: isHidden ? 0 : 16,\n\t\t\t\t\t\t\t\ttransition: draggingIndex === null ? 'flex-basis 0.2s ease' : undefined,\n\t\t\t\t\t\t\t\t...panel.props.style,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{!isHidden && panel.props.children}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{index < panels.length - 1 && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\taria-orientation={resolvedOrientation}\n\t\t\t\t\t\t\t\tonDoubleClick={resetSizes}\n\t\t\t\t\t\t\t\tonKeyDown={(event) => {\n\t\t\t\t\t\t\t\t\tconst step = event.shiftKey ? 40 : 10;\n\t\t\t\t\t\t\t\t\tconst directionMap =\n\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t? { ArrowLeft: -step, ArrowRight: step }\n\t\t\t\t\t\t\t\t\t\t\t: { ArrowUp: -step, ArrowDown: step };\n\t\t\t\t\t\t\t\t\tconst delta = directionMap[event.key as keyof typeof directionMap];\n\t\t\t\t\t\t\t\t\tif (delta !== undefined) {\n\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\tresizePair(index, delta);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonPointerDown={(event) => startResize(index, event)}\n\t\t\t\t\t\t\t\tonPointerEnter={() => setHoveredIndex(index)}\n\t\t\t\t\t\t\t\tonPointerLeave={() => setHoveredIndex(null)}\n\t\t\t\t\t\t\t\trole=\"separator\"\n\t\t\t\t\t\t\t\ttitle=\"拖动调整大小,双击重置\"\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index\n\t\t\t\t\t\t\t\t\t\t\t? '#e6f4ff'\n\t\t\t\t\t\t\t\t\t\t\t: '#f5f5f5',\n\t\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t\tcursor:\n\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t? 'col-resize'\n\t\t\t\t\t\t\t\t\t\t\t: 'row-resize',\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\tflex: `0 0 ${draggerSize}px`,\n\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\toutline: 'none',\n\t\t\t\t\t\t\t\t\tposition: 'relative',\n\t\t\t\t\t\t\t\t\tuserSelect: 'none',\n\t\t\t\t\t\t\t\t\tzIndex: isAnyCollapsed ? 2 : 1,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index || isAnyCollapsed\n\t\t\t\t\t\t\t\t\t\t\t\t? '#1677ff'\n\t\t\t\t\t\t\t\t\t\t\t\t: '#d9d9d9',\n\t\t\t\t\t\t\t\t\t\tborderRadius: 2,\n\t\t\t\t\t\t\t\t\t\theight: resolvedOrientation === 'horizontal' ? 48 : 2,\n\t\t\t\t\t\t\t\t\t\twidth: resolvedOrientation === 'horizontal' ? 2 : 48,\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{/* 未折叠状态下呈现折叠按钮(默认隐藏,鼠标移动到拖拽区域时显示) */}\n\t\t\t\t\t\t\t\t{!isAnyCollapsed && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\tflexDirection: resolvedOrientation === 'horizontal' ? 'column' : 'row',\n\t\t\t\t\t\t\t\t\t\t\tgap: 4,\n\t\t\t\t\t\t\t\t\t\t\topacity: hoveredIndex === index || draggingIndex === index ? 1 : 0,\n\t\t\t\t\t\t\t\t\t\t\tpointerEvents:\n\t\t\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index ? 'auto' : 'none',\n\t\t\t\t\t\t\t\t\t\t\ttransition: 'opacity 0.15s ease',\n\t\t\t\t\t\t\t\t\t\t\tzIndex: 5,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{renderCollapseButton(index, index, 'start')}\n\t\t\t\t\t\t\t\t\t\t{renderCollapseButton(index, index + 1, 'end')}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{/* 折叠状态下呈现展开按钮(默认隐藏,鼠标移动到拖拽区域时显示,且仅点击 icon 展开) */}\n\t\t\t\t\t\t\t\t{isAnyCollapsed && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\t\t\topacity: hoveredIndex === index || draggingIndex === index ? 1 : 0,\n\t\t\t\t\t\t\t\t\t\t\tpointerEvents:\n\t\t\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index ? 'auto' : 'none',\n\t\t\t\t\t\t\t\t\t\t\ttransition: 'opacity 0.15s ease',\n\t\t\t\t\t\t\t\t\t\t\tzIndex: 5,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{(() => {\n\t\t\t\t\t\t\t\t\t\t\tconst ExpandIcon =\n\t\t\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t\t\t? isLeftOrTopCollapsed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? RightOutlined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: LeftOutlined\n\t\t\t\t\t\t\t\t\t\t\t\t\t: isLeftOrTopCollapsed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? DownOutlined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: UpOutlined;\n\n\t\t\t\t\t\t\t\t\t\t\tconst targetIndex = isLeftOrTopCollapsed ? index : index + 1;\n\t\t\t\t\t\t\t\t\t\t\tconst neighborIndex = isLeftOrTopCollapsed ? index + 1 : index;\n\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-label=\"展开面板\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"展开面板\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoggleCollapse(targetIndex, neighborIndex);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: '#fff',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tborder: '1px solid #1677ff',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: '#1677ff',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: 12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tboxShadow: '0 2px 4px rgba(0,0,0,0.12)',\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ExpandIcon />\n\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})()}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</React.Fragment>\n\t\t\t\t);\n\t\t\t})}\n\t\t</div>\n\t);\n};\n\nCustomSplitter.Panel = SplitterPanel;\n\nexport default CustomSplitter;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA6D;;;AC0B3D;AAnBF,IAAM,YAA2B;AAAA,EAChC,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,eAAe;AAChB;AAEO,IAAM,eAAe,CAAC,EAAE,OAAO,UAAU,MAC/C;AAAA,EAAC;AAAA;AAAA,IACA,SAAQ;AAAA,IACR,WAAU;AAAA,IACV,aAAU;AAAA,IACV,OAAM;AAAA,IACN,QAAO;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A,gBAEF,GAAG;AAAA;AAAA,YACJ;AAAA;AAAA;AAAA,MAEF;AAAA,SAtJmB,KAwJrB;AAAA,EAEF,CAAC,GACF;AAEF;AAEA,eAAe,QAAQ;AAEvB,IAAO,mBAAQ;","names":["import_jsx_runtime","import_react","import_jsx_runtime","React"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../CollapseBox/index.tsx","../src/icons.tsx","../Splitter/index.tsx"],"sourcesContent":["// 统一入口\nexport { default as CollapseBox } from '../CollapseBox';\nexport type {\n\tCollapseBoxProps,\n\tCollapseBoxDirection,\n\tCollapseBoxButtonPosition,\n} from '../CollapseBox';\n\nexport { default as Splitter } from '../Splitter';\nexport type {\n\tSplitterProps,\n\tSplitterPanelProps,\n\tSplitterSize,\n\tSplitterOrientation,\n} from '../Splitter';\n","import { useState, type CSSProperties, type ReactNode } from 'react';\nimport { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '../src/icons';\nimport './index.less';\n\nexport type CollapseBoxDirection = 'horizontal' | 'vertical';\nexport type CollapseBoxButtonPosition = 'left' | 'right' | 'top' | 'bottom';\n\nexport interface CollapseBoxProps {\n\tchildren?: ReactNode;\n\ttitle?: string;\n\tdirection?: CollapseBoxDirection;\n\tbuttonPosition?: CollapseBoxButtonPosition;\n\tdefaultWidth?: number | string;\n\tdefaultHeight?: number | string;\n\tcontentPadding?: string;\n\theaderHeight?: number;\n\tclassName?: string;\n}\n\nconst formatDimension = (value?: number | string): string | undefined => {\n\tif (value === undefined || value === null) return undefined;\n\treturn typeof value === 'number' ? `${value}px` : value;\n};\n\nconst ChevronLeft = () => <LeftOutlined />;\n\nconst ChevronRight = () => <RightOutlined />;\n\nconst ChevronUp = () => <UpOutlined />;\n\nconst ChevronDown = () => <DownOutlined />;\n\nconst CollapsibleBox = ({\n\tchildren,\n\ttitle = '内容区域',\n\tdirection = 'horizontal',\n\tbuttonPosition = 'right',\n\tdefaultWidth = 600,\n\tdefaultHeight = 300,\n\tcontentPadding = '16px',\n\theaderHeight = 16,\n\tclassName,\n}: CollapseBoxProps) => {\n\tconst [isExpanded, setIsExpanded] = useState(true);\n\n\tconst getContentMaxHeight = () => {\n\t\tif (typeof defaultHeight === 'number') {\n\t\t\treturn `${defaultHeight - headerHeight}px`;\n\t\t}\n\t\tif (typeof defaultHeight === 'string') {\n\t\t\treturn headerHeight ? `calc(${defaultHeight} - ${headerHeight}px)` : defaultHeight;\n\t\t}\n\t\treturn '100%';\n\t};\n\n\tconst getIcon = () => {\n\t\tif (direction === 'horizontal') {\n\t\t\tif (buttonPosition === 'right') {\n\t\t\t\treturn isExpanded ? <ChevronRight /> : <ChevronLeft />;\n\t\t\t} else {\n\t\t\t\treturn isExpanded ? <ChevronLeft /> : <ChevronRight />;\n\t\t\t}\n\t\t} else {\n\t\t\tif (buttonPosition === 'bottom') {\n\t\t\t\treturn isExpanded ? <ChevronUp /> : <ChevronDown />;\n\t\t\t} else {\n\t\t\t\treturn isExpanded ? <ChevronDown /> : <ChevronUp />;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst getButtonClass = () => {\n\t\tif (direction === 'horizontal') {\n\t\t\treturn buttonPosition === 'right' ? 'button-right' : 'button-left';\n\t\t} else {\n\t\t\treturn buttonPosition === 'bottom' ? 'button-bottom' : 'button-top';\n\t\t}\n\t};\n\n\tconst getContainerStyle = (): CSSProperties => {\n\t\tconst resolvedHeight = formatDimension(defaultHeight);\n\t\tconst resolvedWidth = formatDimension(defaultWidth);\n\t\tif (direction === 'horizontal') {\n\t\t\treturn {\n\t\t\t\twidth: isExpanded ? resolvedWidth : '0px',\n\t\t\t\theight: resolvedHeight,\n\t\t\t\tminWidth: 0,\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\theight: isExpanded ? resolvedHeight : '0px',\n\t\t\t\twidth: resolvedWidth,\n\t\t\t\tminHeight: 0,\n\t\t\t};\n\t\t}\n\t};\n\n\tconst baseWrapperClass =\n\t\tdirection === 'horizontal' ? 'collapsible-wrapper horizontal' : 'collapsible-wrapper vertical';\n\tconst wrapperClass = className ? `${baseWrapperClass} ${className}` : baseWrapperClass;\n\n\tconst containerClass =\n\t\tdirection === 'horizontal' && buttonPosition === 'right'\n\t\t\t? 'collapsible-container align-right'\n\t\t\t: 'collapsible-container';\n\tconst height = getContentMaxHeight();\n\tconst contentStyle: CSSProperties = {\n\t\tmaxHeight: direction === 'vertical' ? (isExpanded ? height : '0px') : height,\n\t\toverflowY: 'auto',\n\t\tpadding: direction === 'vertical' && !isExpanded ? '0px' : contentPadding,\n\t\tboxSizing: 'border-box',\n\t};\n\n\t// 折叠时(纵向 + 底部按钮):按钮需切换为 top:0 定位,使其显示在折叠线下方\n\tconst buttonStyle: CSSProperties =\n\t\tdirection === 'vertical' && buttonPosition === 'bottom' && !isExpanded\n\t\t\t? { top: '0px', bottom: 'auto' }\n\t\t\t: {};\n\n\t// 让 wrapper 高度跟随容器,确保 bottom:0 的按钮贴住容器底部\n\t// 折叠时 wrapper 高度为 0,配合按钮的 translateY(-100%) 让按钮显示在折叠线上方\n\tconst formattedWidth = formatDimension(defaultWidth);\n\tconst formattedHeight = formatDimension(defaultHeight);\n\tconst wrapperStyle: CSSProperties | undefined =\n\t\tdirection === 'vertical'\n\t\t\t? isExpanded\n\t\t\t\t? {\n\t\t\t\t\t\theight: formattedHeight,\n\t\t\t\t\t\twidth: formattedWidth,\n\t\t\t\t\t}\n\t\t\t\t: { height: 0, width: formattedWidth }\n\t\t\t: undefined;\n\n\treturn (\n\t\t<div className={wrapperClass} style={wrapperStyle}>\n\t\t\t<div style={getContainerStyle()} className={containerClass}>\n\t\t\t\t{title && (\n\t\t\t\t\t<div className=\"collapsible-header\" style={{ display: 'none' }}>\n\t\t\t\t\t\t<h3>{title}</h3>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"collapsible-content\" style={contentStyle}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tonClick={() => setIsExpanded(!isExpanded)}\n\t\t\t\tclassName={`toggle-button ${getButtonClass()}`}\n\t\t\t\tstyle={buttonStyle}\n\t\t\t\ttitle={isExpanded ? '隐藏' : '展开'}\n\t\t\t>\n\t\t\t\t{getIcon()}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default CollapsibleBox;\n","import type { CSSProperties } from 'react';\n\ninterface IconProps {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n}\n\nconst baseStyle: CSSProperties = {\n\tdisplay: 'inline-block',\n\twidth: '1em',\n\theight: '1em',\n\tverticalAlign: '-0.125em',\n};\n\nexport const LeftOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"left\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z\" />\n\t</svg>\n);\n\nexport const RightOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"right\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z\" />\n\t</svg>\n);\n\nexport const UpOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"up\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M890.5 755.3L537.4 268a31.96 31.96 0 00-50.8 0L133.5 755.3a7.95 7.95 0 006.3 12.7h75.5c4.9 0 9.6-2.3 12.6-6.1l281-360 281 360c3 3.8 7.7 6.1 12.6 6.1h75.5c6.7 0 10.4-7.6 6.1-12.7z\" />\n\t</svg>\n);\n\nexport const DownOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"down\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 37 17.6 49.8 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z\" />\n\t</svg>\n);\n","import { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '../src/icons';\nimport type {\n\tCSSProperties,\n\tReactElement,\n\tReactNode,\n\tPointerEvent as ReactPointerEvent,\n} from 'react';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nexport type SplitterSize = number | `${number}%`;\nexport type SplitterOrientation = 'horizontal' | 'vertical';\n\nexport type SplitterPanelProps = {\n\tchildren?: ReactNode;\n\tcollapsible?: boolean;\n\tdefaultSize?: SplitterSize;\n\tmax?: SplitterSize;\n\tmin?: SplitterSize;\n\tresizable?: boolean;\n\tsize?: SplitterSize;\n\tstyle?: CSSProperties;\n};\n\nexport type SplitterProps = {\n\tchildren: ReactNode;\n\tclassName?: string;\n\tdraggerSize?: number;\n\tlazy?: boolean;\n\tonResize?: (sizes: number[]) => void;\n\tonResizeEnd?: (sizes: number[]) => void;\n\tonResizeStart?: (sizes: number[]) => void;\n\torientation?: SplitterOrientation;\n\tstyle?: CSSProperties;\n\tvertical?: boolean;\n};\n\ntype SplitterComponent = React.FC<SplitterProps> & {\n\tPanel: React.FC<SplitterPanelProps>;\n};\n\nconst DEFAULT_DRAGGER_SIZE = 4;\nconst MIN_DRAG_SIZE = 40; // 手动拖拽调整大小时的默认最小限制 (px)\n\nconst SplitterPanel: React.FC<SplitterPanelProps> = ({ children }) => <>{children}</>;\n\nconst isPercentSize = (value: SplitterSize): value is `${number}%` =>\n\ttypeof value === 'string' && value.endsWith('%');\n\nconst parseSize = (value: SplitterSize | undefined, total: number, fallback: number) => {\n\tif (value === undefined) {\n\t\treturn fallback;\n\t}\n\n\tif (isPercentSize(value)) {\n\t\treturn (Number.parseFloat(value) / 100) * total;\n\t}\n\n\treturn Number(value);\n};\n\nconst roundSizes = (sizes: number[]) => sizes.map((size) => Math.round(size));\n\nconst getPointerPosition = (\n\tevent: PointerEvent | ReactPointerEvent,\n\torientation: SplitterOrientation,\n) => (orientation === 'horizontal' ? event.clientX : event.clientY);\n\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\nconst CustomSplitter: SplitterComponent = ({\n\tchildren,\n\tclassName,\n\tdraggerSize = DEFAULT_DRAGGER_SIZE,\n\tlazy = false,\n\tonResize,\n\tonResizeEnd,\n\tonResizeStart,\n\torientation,\n\tstyle,\n\tvertical = false,\n}) => {\n\tconst resolvedOrientation = orientation ?? (vertical ? 'vertical' : 'horizontal');\n\tconst rootRef = useRef<HTMLDivElement>(null);\n\tconst sizesRef = useRef<number[]>([]);\n\tconst [containerSize, setContainerSize] = useState(0);\n\tconst [draggingIndex, setDraggingIndex] = useState<number | null>(null);\n\tconst [hoveredIndex, setHoveredIndex] = useState<number | null>(null);\n\tconst [sizes, setSizes] = useState<number[]>([]);\n\n\tconst panels = useMemo(\n\t\t() =>\n\t\t\tReact.Children.toArray(children).filter(\n\t\t\t\tReact.isValidElement,\n\t\t\t) as ReactElement<SplitterPanelProps>[],\n\t\t[children],\n\t);\n\n\tconst trackSize = Math.max(0, containerSize - Math.max(0, panels.length - 1) * draggerSize);\n\n\tconst getPanelMin = useCallback(\n\t\t(index: number) => parseSize(panels[index]?.props.min, trackSize, 0),\n\t\t[panels, trackSize],\n\t);\n\n\tconst getPanelMax = useCallback(\n\t\t(index: number) => parseSize(panels[index]?.props.max, trackSize, trackSize),\n\t\t[panels, trackSize],\n\t);\n\n\tconst normalizeToTrack = useCallback(\n\t\t(nextSizes: number[]) => {\n\t\t\tif (!trackSize || !nextSizes.length) {\n\t\t\t\treturn nextSizes;\n\t\t\t}\n\n\t\t\tconst normalized = [...nextSizes];\n\t\t\tconst diff = trackSize - normalized.reduce((sum, size) => sum + size, 0);\n\t\t\tconst flexibleIndex = normalized.findIndex((size) => size > 0);\n\t\t\tif (flexibleIndex !== -1) {\n\t\t\t\tnormalized[flexibleIndex] += diff;\n\t\t\t}\n\n\t\t\treturn normalized.map((size, index) => {\n\t\t\t\t// 折叠状态(size <= 1)保持为 0,不受 min 限制干扰\n\t\t\t\tif (size <= 1) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\t// 拖拽过程从 0 拖出时,允许在 0 到 min 之间平滑过渡,不被强行跳变到 min\n\t\t\t\tif (size < getPanelMin(index)) {\n\t\t\t\t\treturn size;\n\t\t\t\t}\n\t\t\t\treturn clamp(size, getPanelMin(index), getPanelMax(index));\n\t\t\t});\n\t\t},\n\t\t[getPanelMax, getPanelMin, trackSize],\n\t);\n\n\tconst buildInitialSizes = useCallback(\n\t\t(previous?: number[]) => {\n\t\t\tif (!trackSize || !panels.length) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tif (previous?.length === panels.length) {\n\t\t\t\tconst previousTotal = previous.reduce((sum, size) => sum + size, 0);\n\t\t\t\tif (previousTotal > 0) {\n\t\t\t\t\treturn normalizeToTrack(previous.map((size) => (size / previousTotal) * trackSize));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst explicitSizes = panels.map((panel) =>\n\t\t\t\tparseSize(panel.props.size ?? panel.props.defaultSize, trackSize, -1),\n\t\t\t);\n\t\t\tconst usedSize = explicitSizes\n\t\t\t\t.filter((size) => size >= 0)\n\t\t\t\t.reduce((sum, size) => sum + size, 0);\n\t\t\tconst unsetCount = explicitSizes.filter((size) => size < 0).length;\n\t\t\tconst fallbackSize = unsetCount ? Math.max(0, (trackSize - usedSize) / unsetCount) : 0;\n\n\t\t\treturn normalizeToTrack(\n\t\t\t\texplicitSizes.map((size, index) =>\n\t\t\t\t\tclamp(size >= 0 ? size : fallbackSize, getPanelMin(index), getPanelMax(index)),\n\t\t\t\t),\n\t\t\t);\n\t\t},\n\t\t[getPanelMax, getPanelMin, normalizeToTrack, panels, trackSize],\n\t);\n\n\tconst updateSizes = useCallback(\n\t\t(nextSizes: number[], notify = true) => {\n\t\t\tconst normalized = normalizeToTrack(nextSizes);\n\t\t\tsetSizes(normalized);\n\t\t\tsizesRef.current = normalized;\n\t\t\tif (notify) {\n\t\t\t\tonResize?.(roundSizes(normalized));\n\t\t\t}\n\t\t},\n\t\t[normalizeToTrack, onResize],\n\t);\n\n\tuseEffect(() => {\n\t\tconst node = rootRef.current;\n\t\tif (!node) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst syncSize = () => {\n\t\t\tsetContainerSize(resolvedOrientation === 'horizontal' ? node.clientWidth : node.clientHeight);\n\t\t};\n\t\tsyncSize();\n\n\t\tconst observer = new ResizeObserver(syncSize);\n\t\tobserver.observe(node);\n\t\treturn () => observer.disconnect();\n\t}, [resolvedOrientation]);\n\n\tuseEffect(() => {\n\t\tsetSizes((previous) => {\n\t\t\tconst nextSizes = buildInitialSizes(previous);\n\t\t\tsizesRef.current = nextSizes;\n\t\t\treturn nextSizes;\n\t\t});\n\t}, [buildInitialSizes]);\n\n\tconst getResizedPair = useCallback(\n\t\t(sourceSizes: number[], index: number, delta: number) => {\n\t\t\tconst nextSizes = [...sourceSizes];\n\t\t\tconst isLeftCollapsed = sourceSizes[index] <= 1;\n\t\t\tconst isRightCollapsed = sourceSizes[index + 1] <= 1;\n\n\t\t\tconst leftMin = isLeftCollapsed ? 0 : getPanelMin(index);\n\t\t\tconst rightMin = isRightCollapsed ? 0 : getPanelMin(index + 1);\n\t\t\tconst leftMax = getPanelMax(index);\n\t\t\tconst rightMax = getPanelMax(index + 1);\n\n\t\t\tconst minDelta = Math.max(leftMin - sourceSizes[index], sourceSizes[index + 1] - rightMax);\n\t\t\tconst maxDelta = Math.min(leftMax - sourceSizes[index], sourceSizes[index + 1] - rightMin);\n\t\t\tconst safeDelta = clamp(delta, minDelta, maxDelta);\n\n\t\t\tnextSizes[index] = sourceSizes[index] + safeDelta;\n\t\t\tnextSizes[index + 1] = sourceSizes[index + 1] - safeDelta;\n\t\t\treturn normalizeToTrack(nextSizes);\n\t\t},\n\t\t[getPanelMax, getPanelMin, normalizeToTrack],\n\t);\n\n\tconst resizePair = useCallback(\n\t\t(index: number, delta: number, notify = true) => {\n\t\t\tupdateSizes(getResizedPair(sizesRef.current, index, delta), notify);\n\t\t},\n\t\t[getResizedPair, updateSizes],\n\t);\n\n\tconst startResize = (index: number, event: ReactPointerEvent<HTMLDivElement>) => {\n\t\tif (panels[index].props.resizable === false || panels[index + 1].props.resizable === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tconst startPosition = getPointerPosition(event, resolvedOrientation);\n\t\tconst startSizes = [...sizesRef.current];\n\t\tlet latestSizes = startSizes;\n\n\t\tsetDraggingIndex(index);\n\t\tonResizeStart?.(roundSizes(startSizes));\n\n\t\tconst handlePointerMove = (moveEvent: PointerEvent) => {\n\t\t\tconst delta = getPointerPosition(moveEvent, resolvedOrientation) - startPosition;\n\t\t\tlatestSizes = getResizedPair(startSizes, index, delta);\n\t\t\tif (!lazy) {\n\t\t\t\tupdateSizes(latestSizes, true);\n\t\t\t}\n\t\t};\n\n\t\tconst handlePointerUp = () => {\n\t\t\tdocument.removeEventListener('pointermove', handlePointerMove);\n\t\t\tdocument.removeEventListener('pointerup', handlePointerUp);\n\t\t\tsetDraggingIndex(null);\n\t\t\tif (lazy) {\n\t\t\t\tupdateSizes(latestSizes, true);\n\t\t\t}\n\t\t\tonResizeEnd?.(roundSizes(sizesRef.current));\n\t\t};\n\n\t\tdocument.addEventListener('pointermove', handlePointerMove);\n\t\tdocument.addEventListener('pointerup', handlePointerUp);\n\t};\n\n\tconst toggleCollapse = (index: number, neighborIndex: number) => {\n\t\tconst nextSizes = [...sizesRef.current];\n\n\t\tif (nextSizes[index] > 1) {\n\t\t\tnextSizes[neighborIndex] += nextSizes[index];\n\t\t\tnextSizes[index] = 0;\n\t\t} else {\n\t\t\tconst initialSizes = buildInitialSizes();\n\t\t\tconst initialSize =\n\t\t\t\tinitialSizes[index] ??\n\t\t\t\tparseSize(panels[index].props.defaultSize, trackSize, trackSize / panels.length);\n\t\t\tconst restoredSize = clamp(initialSize, getPanelMin(index), getPanelMax(index));\n\t\t\tnextSizes[index] = restoredSize;\n\t\t\tnextSizes[neighborIndex] = Math.max(0, nextSizes[neighborIndex] - nextSizes[index]);\n\t\t}\n\n\t\tupdateSizes(nextSizes);\n\t\tonResizeEnd?.(roundSizes(sizesRef.current));\n\t};\n\n\tconst resetSizes = () => {\n\t\tconst nextSizes = buildInitialSizes();\n\t\tupdateSizes(nextSizes);\n\t\tonResizeEnd?.(roundSizes(nextSizes));\n\t};\n\n\tconst rootStyle: CSSProperties = {\n\t\tborder: '1px solid #f0f0f0',\n\t\tborderRadius: 8,\n\t\tboxSizing: 'border-box',\n\t\tdisplay: 'flex',\n\t\tflexDirection: resolvedOrientation === 'horizontal' ? 'row' : 'column',\n\t\theight: 360,\n\t\tminHeight: 0,\n\t\toverflow: 'hidden',\n\t\tposition: 'relative',\n\t\twidth: '100%',\n\t\t...style,\n\t};\n\n\tconst renderCollapseButton = (\n\t\tdraggerIndex: number,\n\t\tpanelIndex: number,\n\t\tdirection: 'start' | 'end',\n\t) => {\n\t\tconst panel = panels[panelIndex];\n\t\tif (!panel?.props.collapsible) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst neighborIndex = direction === 'start' ? panelIndex + 1 : panelIndex - 1;\n\t\tconst isCollapsed = (sizes[panelIndex] ?? 0) <= 1;\n\t\tconst isNeighborCollapsed = (sizes[neighborIndex] ?? 0) <= 1;\n\n\t\t// 自己折叠后隐藏;对侧面板折叠后也隐藏(避免与展开按钮重复/语义冲突)\n\t\tif (isCollapsed || isNeighborCollapsed) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// 展开时箭头指向面板将被折叠到的方向\n\t\tconst Icon =\n\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t? direction === 'start'\n\t\t\t\t\t? LeftOutlined\n\t\t\t\t\t: RightOutlined\n\t\t\t\t: direction === 'start'\n\t\t\t\t\t? UpOutlined\n\t\t\t\t\t: DownOutlined;\n\n\t\tconst isHorizontal = resolvedOrientation === 'horizontal';\n\n\t\treturn (\n\t\t\t<button\n\t\t\t\taria-label=\"折叠面板\"\n\t\t\t\ttitle=\"折叠面板\"\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\ttoggleCollapse(panelIndex, neighborIndex);\n\t\t\t\t}}\n\t\t\t\tstyle={{\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tbackground: '#fff',\n\t\t\t\t\tborder: '1px solid #d9d9d9',\n\t\t\t\t\tborderRadius: 3,\n\t\t\t\t\tcolor: '#595959',\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\theight: isHorizontal ? 40 : 14,\n\t\t\t\t\twidth: isHorizontal ? 14 : 40,\n\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\tpadding: 0,\n\t\t\t\t\tfontSize: 10,\n\t\t\t\t\tboxShadow: '0 1px 2px rgba(0, 0, 0, 0.05)',\n\t\t\t\t\ttransition: 'all 0.2s ease',\n\t\t\t\t}}\n\t\t\t\ttype=\"button\"\n\t\t\t\tonMouseEnter={(e) => {\n\t\t\t\t\te.currentTarget.style.background = '#e5e7eb';\n\t\t\t\t\te.currentTarget.style.color = '#1f2937';\n\t\t\t\t}}\n\t\t\t\tonMouseLeave={(e) => {\n\t\t\t\t\te.currentTarget.style.background = '#fff';\n\t\t\t\t\te.currentTarget.style.color = '#595959';\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<Icon />\n\t\t\t</button>\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className={className} ref={rootRef} style={rootStyle}>\n\t\t\t{panels.map((panel, index) => {\n\t\t\t\tconst isHidden = sizes[index] <= 1;\n\t\t\t\tconst isLeftOrTopCollapsed = (sizes[index] ?? 0) <= 1;\n\t\t\t\tconst isRightOrBottomCollapsed = (sizes[index + 1] ?? 0) <= 1;\n\t\t\t\tconst isAnyCollapsed = isLeftOrTopCollapsed || isRightOrBottomCollapsed;\n\n\t\t\t\treturn (\n\t\t\t\t\t<React.Fragment key={index}>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tbackground: index % 2 ? '#fff' : '#fafafa',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tflex: `0 0 ${sizes[index] ?? 0}px`,\n\t\t\t\t\t\t\t\tminHeight: 0,\n\t\t\t\t\t\t\t\tminWidth: 0,\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tposition: 'relative',\n\t\t\t\t\t\t\t\ttransition: draggingIndex === null ? 'flex-basis 0.2s ease' : undefined,\n\t\t\t\t\t\t\t\t...panel.props.style,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{!isHidden && (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t\t\t\t\t\tpadding: (sizes[index] ?? 0) < 32 ? 0 : 16,\n\t\t\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{panel.props.children}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{index < panels.length - 1 && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\taria-orientation={resolvedOrientation}\n\t\t\t\t\t\t\t\tonDoubleClick={resetSizes}\n\t\t\t\t\t\t\t\tonKeyDown={(event) => {\n\t\t\t\t\t\t\t\t\tconst step = event.shiftKey ? 40 : 10;\n\t\t\t\t\t\t\t\t\tconst directionMap =\n\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t? { ArrowLeft: -step, ArrowRight: step }\n\t\t\t\t\t\t\t\t\t\t\t: { ArrowUp: -step, ArrowDown: step };\n\t\t\t\t\t\t\t\t\tconst delta = directionMap[event.key as keyof typeof directionMap];\n\t\t\t\t\t\t\t\t\tif (delta !== undefined) {\n\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\tresizePair(index, delta);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonPointerDown={(event) => startResize(index, event)}\n\t\t\t\t\t\t\t\tonPointerEnter={() => setHoveredIndex(index)}\n\t\t\t\t\t\t\t\tonPointerLeave={() => setHoveredIndex(null)}\n\t\t\t\t\t\t\t\trole=\"separator\"\n\t\t\t\t\t\t\t\ttitle=\"拖动调整大小,双击重置\"\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index\n\t\t\t\t\t\t\t\t\t\t\t? '#e6f4ff'\n\t\t\t\t\t\t\t\t\t\t\t: '#f5f5f5',\n\t\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t\tcursor:\n\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t? 'col-resize'\n\t\t\t\t\t\t\t\t\t\t\t: 'row-resize',\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\tflex: `0 0 ${draggerSize}px`,\n\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\toutline: 'none',\n\t\t\t\t\t\t\t\t\tposition: 'relative',\n\t\t\t\t\t\t\t\t\tuserSelect: 'none',\n\t\t\t\t\t\t\t\t\tzIndex: isAnyCollapsed ? 2 : 1,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{/* 呈现拖拽指示线 */}\n\t\t\t\t\t\t\t\t{(hoveredIndex === index || draggingIndex === index || !isAnyCollapsed) && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index\n\t\t\t\t\t\t\t\t\t\t\t\t\t? '#1677ff'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: '#d9d9d9',\n\t\t\t\t\t\t\t\t\t\t\tborderRadius: 2,\n\t\t\t\t\t\t\t\t\t\t\theight: resolvedOrientation === 'horizontal' ? 40 : 2,\n\t\t\t\t\t\t\t\t\t\t\twidth: resolvedOrientation === 'horizontal' ? 2 : 40,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{/* 未折叠状态下呈现折叠按钮(鼠标移动到拖拽区域时显示,左右并排) */}\n\t\t\t\t\t\t\t\t{!isAnyCollapsed && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t\t\t\ttop: '50%',\n\t\t\t\t\t\t\t\t\t\t\tleft: '50%',\n\t\t\t\t\t\t\t\t\t\t\ttransform: 'translate(-50%, -50%)',\n\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\tflexDirection: resolvedOrientation === 'horizontal' ? 'row' : 'column',\n\t\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\t\t\tgap: 2,\n\t\t\t\t\t\t\t\t\t\t\topacity: hoveredIndex === index || draggingIndex === index ? 1 : 0,\n\t\t\t\t\t\t\t\t\t\t\tpointerEvents:\n\t\t\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index ? 'auto' : 'none',\n\t\t\t\t\t\t\t\t\t\t\ttransition: 'opacity 0.15s ease',\n\t\t\t\t\t\t\t\t\t\t\tzIndex: 5,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{renderCollapseButton(index, index, 'start')}\n\t\t\t\t\t\t\t\t\t\t{renderCollapseButton(index, index + 1, 'end')}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{/* 折叠状态下呈现展开按钮(常态保持显示,精准垂直居中) */}\n\t\t\t\t\t\t\t\t{isAnyCollapsed && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t\t\t\ttop: resolvedOrientation === 'horizontal' ? '50%' : isLeftOrTopCollapsed ? 0 : undefined,\n\t\t\t\t\t\t\t\t\t\t\tbottom: resolvedOrientation === 'horizontal' ? undefined : isRightOrBottomCollapsed ? 0 : undefined,\n\t\t\t\t\t\t\t\t\t\t\tleft: resolvedOrientation === 'horizontal' ? (isLeftOrTopCollapsed ? 0 : undefined) : '50%',\n\t\t\t\t\t\t\t\t\t\t\tright: resolvedOrientation === 'horizontal' ? (isRightOrBottomCollapsed ? 0 : undefined) : undefined,\n\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t\t\t\t\tzIndex: 5,\n\t\t\t\t\t\t\t\t\t\t\ttransform:\n\t\t\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `translate(${isLeftOrTopCollapsed ? '4px' : '-4px'}, -50%)`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: `translate(-50%, ${isLeftOrTopCollapsed ? '4px' : '-4px'})`,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{(() => {\n\t\t\t\t\t\t\t\t\t\t\tconst ExpandIcon =\n\t\t\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t\t\t? isLeftOrTopCollapsed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? RightOutlined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: LeftOutlined\n\t\t\t\t\t\t\t\t\t\t\t\t\t: isLeftOrTopCollapsed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? DownOutlined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: UpOutlined;\n\n\t\t\t\t\t\t\t\t\t\t\tconst targetIndex = isLeftOrTopCollapsed ? index : index + 1;\n\t\t\t\t\t\t\t\t\t\t\tconst neighborIndex = isLeftOrTopCollapsed ? index + 1 : index;\n\t\t\t\t\t\t\t\t\t\t\tconst isHorizontal = resolvedOrientation === 'horizontal';\n\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-label=\"展开面板\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"展开面板\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoggleCollapse(targetIndex, neighborIndex);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: '#f3f4f6',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tborder: '1px solid #e5e7eb',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: 3,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: '#595959',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: isHorizontal ? 40 : 14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: isHorizontal ? 14 : 40,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: 10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tboxShadow: '0 1px 3px rgba(0, 0, 0, 0.08)',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransition: 'all 0.2s ease',\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style.background = '#e5e7eb';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style.color = '#1f2937';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style.background = '#f3f4f6';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style.color = '#595959';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ExpandIcon />\n\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})()}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</React.Fragment>\n\t\t\t\t);\n\t\t\t})}\n\t\t</div>\n\t);\n};\n\nCustomSplitter.Panel = Spl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AAA,sBACA,cAAc,CAAC,MAAM;AACpB,0BAAE,cAAc,MAAM,aAAa;AACnC,0BAAE,cAAc,MAAM,QAAQ;AAAA,sBAC/B;AAAA,sBAEA,uDAAC,cAAW;AAAA;AAAA,kBACb;AAAA,gBAEF,GAAG;AAAA;AAAA,YACJ;AAAA;AAAA;AAAA,MAEF;AAAA,SA1LmB,KA4LrB;AAAA,EAEF,CAAC,GACF;AAEF;AAEA,eAAe,QAAQ;AAEvB,IAAO,mBAAQ;","names":["import_jsx_runtime","import_react","import_jsx_runtime","React"]}
|
package/dist/index.js
CHANGED
|
@@ -209,7 +209,6 @@ var CustomSplitter = ({
|
|
|
209
209
|
const resolvedOrientation = orientation != null ? orientation : vertical ? "vertical" : "horizontal";
|
|
210
210
|
const rootRef = useRef(null);
|
|
211
211
|
const sizesRef = useRef([]);
|
|
212
|
-
const lastNonZeroSizesRef = useRef([]);
|
|
213
212
|
const [containerSize, setContainerSize] = useState2(0);
|
|
214
213
|
const [draggingIndex, setDraggingIndex] = useState2(null);
|
|
215
214
|
const [hoveredIndex, setHoveredIndex] = useState2(null);
|
|
@@ -250,6 +249,9 @@ var CustomSplitter = ({
|
|
|
250
249
|
if (size <= 1) {
|
|
251
250
|
return 0;
|
|
252
251
|
}
|
|
252
|
+
if (size < getPanelMin(index)) {
|
|
253
|
+
return size;
|
|
254
|
+
}
|
|
253
255
|
return clamp(size, getPanelMin(index), getPanelMax(index));
|
|
254
256
|
});
|
|
255
257
|
},
|
|
@@ -288,11 +290,6 @@ var CustomSplitter = ({
|
|
|
288
290
|
const normalized = normalizeToTrack(nextSizes);
|
|
289
291
|
setSizes(normalized);
|
|
290
292
|
sizesRef.current = normalized;
|
|
291
|
-
normalized.forEach((size, index) => {
|
|
292
|
-
if (size > 1) {
|
|
293
|
-
lastNonZeroSizesRef.current[index] = size;
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
293
|
if (notify) {
|
|
297
294
|
onResize == null ? void 0 : onResize(roundSizes(normalized));
|
|
298
295
|
}
|
|
@@ -316,17 +313,16 @@ var CustomSplitter = ({
|
|
|
316
313
|
setSizes((previous) => {
|
|
317
314
|
const nextSizes = buildInitialSizes(previous);
|
|
318
315
|
sizesRef.current = nextSizes;
|
|
319
|
-
lastNonZeroSizesRef.current = nextSizes.map(
|
|
320
|
-
(size) => Math.max(size, trackSize / Math.max(panels.length, 1))
|
|
321
|
-
);
|
|
322
316
|
return nextSizes;
|
|
323
317
|
});
|
|
324
|
-
}, [buildInitialSizes
|
|
318
|
+
}, [buildInitialSizes]);
|
|
325
319
|
const getResizedPair = useCallback(
|
|
326
320
|
(sourceSizes, index, delta) => {
|
|
327
321
|
const nextSizes = [...sourceSizes];
|
|
328
|
-
const
|
|
329
|
-
const
|
|
322
|
+
const isLeftCollapsed = sourceSizes[index] <= 1;
|
|
323
|
+
const isRightCollapsed = sourceSizes[index + 1] <= 1;
|
|
324
|
+
const leftMin = isLeftCollapsed ? 0 : getPanelMin(index);
|
|
325
|
+
const rightMin = isRightCollapsed ? 0 : getPanelMin(index + 1);
|
|
330
326
|
const leftMax = getPanelMax(index);
|
|
331
327
|
const rightMax = getPanelMax(index + 1);
|
|
332
328
|
const minDelta = Math.max(leftMin - sourceSizes[index], sourceSizes[index + 1] - rightMax);
|
|
@@ -374,14 +370,16 @@ var CustomSplitter = ({
|
|
|
374
370
|
document.addEventListener("pointerup", handlePointerUp);
|
|
375
371
|
};
|
|
376
372
|
const toggleCollapse = (index, neighborIndex) => {
|
|
373
|
+
var _a;
|
|
377
374
|
const nextSizes = [...sizesRef.current];
|
|
378
375
|
if (nextSizes[index] > 1) {
|
|
379
|
-
lastNonZeroSizesRef.current[index] = nextSizes[index];
|
|
380
376
|
nextSizes[neighborIndex] += nextSizes[index];
|
|
381
377
|
nextSizes[index] = 0;
|
|
382
378
|
} else {
|
|
383
|
-
const
|
|
384
|
-
|
|
379
|
+
const initialSizes = buildInitialSizes();
|
|
380
|
+
const initialSize = (_a = initialSizes[index]) != null ? _a : parseSize(panels[index].props.defaultSize, trackSize, trackSize / panels.length);
|
|
381
|
+
const restoredSize = clamp(initialSize, getPanelMin(index), getPanelMax(index));
|
|
382
|
+
nextSizes[index] = restoredSize;
|
|
385
383
|
nextSizes[neighborIndex] = Math.max(0, nextSizes[neighborIndex] - nextSizes[index]);
|
|
386
384
|
}
|
|
387
385
|
updateSizes(nextSizes);
|
|
@@ -418,6 +416,7 @@ var CustomSplitter = ({
|
|
|
418
416
|
return null;
|
|
419
417
|
}
|
|
420
418
|
const Icon = resolvedOrientation === "horizontal" ? direction === "start" ? LeftOutlined : RightOutlined : direction === "start" ? UpOutlined : DownOutlined;
|
|
419
|
+
const isHorizontal = resolvedOrientation === "horizontal";
|
|
421
420
|
return /* @__PURE__ */ jsx3(
|
|
422
421
|
"button",
|
|
423
422
|
{
|
|
@@ -431,24 +430,33 @@ var CustomSplitter = ({
|
|
|
431
430
|
alignItems: "center",
|
|
432
431
|
background: "#fff",
|
|
433
432
|
border: "1px solid #d9d9d9",
|
|
434
|
-
borderRadius:
|
|
433
|
+
borderRadius: 3,
|
|
435
434
|
color: "#595959",
|
|
436
435
|
cursor: "pointer",
|
|
437
436
|
display: "flex",
|
|
438
|
-
height:
|
|
437
|
+
height: isHorizontal ? 40 : 14,
|
|
438
|
+
width: isHorizontal ? 14 : 40,
|
|
439
439
|
justifyContent: "center",
|
|
440
440
|
padding: 0,
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
441
|
+
fontSize: 10,
|
|
442
|
+
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)",
|
|
443
|
+
transition: "all 0.2s ease"
|
|
444
444
|
},
|
|
445
445
|
type: "button",
|
|
446
|
+
onMouseEnter: (e) => {
|
|
447
|
+
e.currentTarget.style.background = "#e5e7eb";
|
|
448
|
+
e.currentTarget.style.color = "#1f2937";
|
|
449
|
+
},
|
|
450
|
+
onMouseLeave: (e) => {
|
|
451
|
+
e.currentTarget.style.background = "#fff";
|
|
452
|
+
e.currentTarget.style.color = "#595959";
|
|
453
|
+
},
|
|
446
454
|
children: /* @__PURE__ */ jsx3(Icon, {})
|
|
447
455
|
}
|
|
448
456
|
);
|
|
449
457
|
};
|
|
450
458
|
return /* @__PURE__ */ jsx3("div", { className, ref: rootRef, style: rootStyle, children: panels.map((panel, index) => {
|
|
451
|
-
var _a, _b, _c;
|
|
459
|
+
var _a, _b, _c, _d;
|
|
452
460
|
const isHidden = sizes[index] <= 1;
|
|
453
461
|
const isLeftOrTopCollapsed = ((_a = sizes[index]) != null ? _a : 0) <= 1;
|
|
454
462
|
const isRightOrBottomCollapsed = ((_b = sizes[index + 1]) != null ? _b : 0) <= 1;
|
|
@@ -463,12 +471,24 @@ var CustomSplitter = ({
|
|
|
463
471
|
flex: `0 0 ${(_c = sizes[index]) != null ? _c : 0}px`,
|
|
464
472
|
minHeight: 0,
|
|
465
473
|
minWidth: 0,
|
|
466
|
-
overflow: "
|
|
467
|
-
|
|
474
|
+
overflow: "hidden",
|
|
475
|
+
position: "relative",
|
|
468
476
|
transition: draggingIndex === null ? "flex-basis 0.2s ease" : void 0,
|
|
469
477
|
...panel.props.style
|
|
470
478
|
},
|
|
471
|
-
children: !isHidden &&
|
|
479
|
+
children: !isHidden && /* @__PURE__ */ jsx3(
|
|
480
|
+
"div",
|
|
481
|
+
{
|
|
482
|
+
style: {
|
|
483
|
+
boxSizing: "border-box",
|
|
484
|
+
height: "100%",
|
|
485
|
+
overflow: "auto",
|
|
486
|
+
padding: ((_d = sizes[index]) != null ? _d : 0) < 32 ? 0 : 16,
|
|
487
|
+
width: "100%"
|
|
488
|
+
},
|
|
489
|
+
children: panel.props.children
|
|
490
|
+
}
|
|
491
|
+
)
|
|
472
492
|
}
|
|
473
493
|
),
|
|
474
494
|
index < panels.length - 1 && /* @__PURE__ */ jsxs2(
|
|
@@ -505,14 +525,14 @@ var CustomSplitter = ({
|
|
|
505
525
|
},
|
|
506
526
|
tabIndex: 0,
|
|
507
527
|
children: [
|
|
508
|
-
/* @__PURE__ */ jsx3(
|
|
528
|
+
(hoveredIndex === index || draggingIndex === index || !isAnyCollapsed) && /* @__PURE__ */ jsx3(
|
|
509
529
|
"div",
|
|
510
530
|
{
|
|
511
531
|
style: {
|
|
512
|
-
background: hoveredIndex === index || draggingIndex === index
|
|
532
|
+
background: hoveredIndex === index || draggingIndex === index ? "#1677ff" : "#d9d9d9",
|
|
513
533
|
borderRadius: 2,
|
|
514
|
-
height: resolvedOrientation === "horizontal" ?
|
|
515
|
-
width: resolvedOrientation === "horizontal" ? 2 :
|
|
534
|
+
height: resolvedOrientation === "horizontal" ? 40 : 2,
|
|
535
|
+
width: resolvedOrientation === "horizontal" ? 2 : 40
|
|
516
536
|
}
|
|
517
537
|
}
|
|
518
538
|
),
|
|
@@ -521,9 +541,14 @@ var CustomSplitter = ({
|
|
|
521
541
|
{
|
|
522
542
|
style: {
|
|
523
543
|
position: "absolute",
|
|
544
|
+
top: "50%",
|
|
545
|
+
left: "50%",
|
|
546
|
+
transform: "translate(-50%, -50%)",
|
|
524
547
|
display: "flex",
|
|
525
|
-
flexDirection: resolvedOrientation === "horizontal" ? "
|
|
526
|
-
|
|
548
|
+
flexDirection: resolvedOrientation === "horizontal" ? "row" : "column",
|
|
549
|
+
alignItems: "center",
|
|
550
|
+
justifyContent: "center",
|
|
551
|
+
gap: 2,
|
|
527
552
|
opacity: hoveredIndex === index || draggingIndex === index ? 1 : 0,
|
|
528
553
|
pointerEvents: hoveredIndex === index || draggingIndex === index ? "auto" : "none",
|
|
529
554
|
transition: "opacity 0.15s ease",
|
|
@@ -540,18 +565,23 @@ var CustomSplitter = ({
|
|
|
540
565
|
{
|
|
541
566
|
style: {
|
|
542
567
|
position: "absolute",
|
|
568
|
+
top: resolvedOrientation === "horizontal" ? "50%" : isLeftOrTopCollapsed ? 0 : void 0,
|
|
569
|
+
bottom: resolvedOrientation === "horizontal" ? void 0 : isRightOrBottomCollapsed ? 0 : void 0,
|
|
570
|
+
left: resolvedOrientation === "horizontal" ? isLeftOrTopCollapsed ? 0 : void 0 : "50%",
|
|
571
|
+
right: resolvedOrientation === "horizontal" ? isRightOrBottomCollapsed ? 0 : void 0 : void 0,
|
|
543
572
|
display: "flex",
|
|
544
573
|
alignItems: "center",
|
|
545
574
|
justifyContent: "center",
|
|
546
|
-
opacity:
|
|
547
|
-
pointerEvents:
|
|
548
|
-
|
|
549
|
-
|
|
575
|
+
opacity: 1,
|
|
576
|
+
pointerEvents: "auto",
|
|
577
|
+
zIndex: 5,
|
|
578
|
+
transform: resolvedOrientation === "horizontal" ? `translate(${isLeftOrTopCollapsed ? "4px" : "-4px"}, -50%)` : `translate(-50%, ${isLeftOrTopCollapsed ? "4px" : "-4px"})`
|
|
550
579
|
},
|
|
551
580
|
children: (() => {
|
|
552
581
|
const ExpandIcon = resolvedOrientation === "horizontal" ? isLeftOrTopCollapsed ? RightOutlined : LeftOutlined : isLeftOrTopCollapsed ? DownOutlined : UpOutlined;
|
|
553
582
|
const targetIndex = isLeftOrTopCollapsed ? index : index + 1;
|
|
554
583
|
const neighborIndex = isLeftOrTopCollapsed ? index + 1 : index;
|
|
584
|
+
const isHorizontal = resolvedOrientation === "horizontal";
|
|
555
585
|
return /* @__PURE__ */ jsx3(
|
|
556
586
|
"button",
|
|
557
587
|
{
|
|
@@ -563,20 +593,29 @@ var CustomSplitter = ({
|
|
|
563
593
|
},
|
|
564
594
|
style: {
|
|
565
595
|
alignItems: "center",
|
|
566
|
-
background: "#
|
|
567
|
-
border: "1px solid #
|
|
568
|
-
borderRadius:
|
|
569
|
-
color: "#
|
|
596
|
+
background: "#f3f4f6",
|
|
597
|
+
border: "1px solid #e5e7eb",
|
|
598
|
+
borderRadius: 3,
|
|
599
|
+
color: "#595959",
|
|
570
600
|
cursor: "pointer",
|
|
571
601
|
display: "flex",
|
|
572
|
-
height:
|
|
602
|
+
height: isHorizontal ? 40 : 14,
|
|
603
|
+
width: isHorizontal ? 14 : 40,
|
|
573
604
|
justifyContent: "center",
|
|
574
605
|
padding: 0,
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
606
|
+
fontSize: 10,
|
|
607
|
+
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.08)",
|
|
608
|
+
transition: "all 0.2s ease"
|
|
578
609
|
},
|
|
579
610
|
type: "button",
|
|
611
|
+
onMouseEnter: (e) => {
|
|
612
|
+
e.currentTarget.style.background = "#e5e7eb";
|
|
613
|
+
e.currentTarget.style.color = "#1f2937";
|
|
614
|
+
},
|
|
615
|
+
onMouseLeave: (e) => {
|
|
616
|
+
e.currentTarget.style.background = "#f3f4f6";
|
|
617
|
+
e.currentTarget.style.color = "#595959";
|
|
618
|
+
},
|
|
580
619
|
children: /* @__PURE__ */ jsx3(ExpandIcon, {})
|
|
581
620
|
}
|
|
582
621
|
);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../CollapseBox/index.tsx","../src/icons.tsx","../Splitter/index.tsx"],"sourcesContent":["import { useState, type CSSProperties, type ReactNode } from 'react';\nimport { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '../src/icons';\nimport './index.less';\n\nexport type CollapseBoxDirection = 'horizontal' | 'vertical';\nexport type CollapseBoxButtonPosition = 'left' | 'right' | 'top' | 'bottom';\n\nexport interface CollapseBoxProps {\n\tchildren?: ReactNode;\n\ttitle?: string;\n\tdirection?: CollapseBoxDirection;\n\tbuttonPosition?: CollapseBoxButtonPosition;\n\tdefaultWidth?: number | string;\n\tdefaultHeight?: number | string;\n\tcontentPadding?: string;\n\theaderHeight?: number;\n\tclassName?: string;\n}\n\nconst formatDimension = (value?: number | string): string | undefined => {\n\tif (value === undefined || value === null) return undefined;\n\treturn typeof value === 'number' ? `${value}px` : value;\n};\n\nconst ChevronLeft = () => <LeftOutlined />;\n\nconst ChevronRight = () => <RightOutlined />;\n\nconst ChevronUp = () => <UpOutlined />;\n\nconst ChevronDown = () => <DownOutlined />;\n\nconst CollapsibleBox = ({\n\tchildren,\n\ttitle = '内容区域',\n\tdirection = 'horizontal',\n\tbuttonPosition = 'right',\n\tdefaultWidth = 600,\n\tdefaultHeight = 300,\n\tcontentPadding = '16px',\n\theaderHeight = 16,\n\tclassName,\n}: CollapseBoxProps) => {\n\tconst [isExpanded, setIsExpanded] = useState(true);\n\n\tconst getContentMaxHeight = () => {\n\t\tif (typeof defaultHeight === 'number') {\n\t\t\treturn `${defaultHeight - headerHeight}px`;\n\t\t}\n\t\tif (typeof defaultHeight === 'string') {\n\t\t\treturn headerHeight ? `calc(${defaultHeight} - ${headerHeight}px)` : defaultHeight;\n\t\t}\n\t\treturn '100%';\n\t};\n\n\tconst getIcon = () => {\n\t\tif (direction === 'horizontal') {\n\t\t\tif (buttonPosition === 'right') {\n\t\t\t\treturn isExpanded ? <ChevronRight /> : <ChevronLeft />;\n\t\t\t} else {\n\t\t\t\treturn isExpanded ? <ChevronLeft /> : <ChevronRight />;\n\t\t\t}\n\t\t} else {\n\t\t\tif (buttonPosition === 'bottom') {\n\t\t\t\treturn isExpanded ? <ChevronUp /> : <ChevronDown />;\n\t\t\t} else {\n\t\t\t\treturn isExpanded ? <ChevronDown /> : <ChevronUp />;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst getButtonClass = () => {\n\t\tif (direction === 'horizontal') {\n\t\t\treturn buttonPosition === 'right' ? 'button-right' : 'button-left';\n\t\t} else {\n\t\t\treturn buttonPosition === 'bottom' ? 'button-bottom' : 'button-top';\n\t\t}\n\t};\n\n\tconst getContainerStyle = (): CSSProperties => {\n\t\tconst resolvedHeight = formatDimension(defaultHeight);\n\t\tconst resolvedWidth = formatDimension(defaultWidth);\n\t\tif (direction === 'horizontal') {\n\t\t\treturn {\n\t\t\t\twidth: isExpanded ? resolvedWidth : '0px',\n\t\t\t\theight: resolvedHeight,\n\t\t\t\tminWidth: 0,\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\theight: isExpanded ? resolvedHeight : '0px',\n\t\t\t\twidth: resolvedWidth,\n\t\t\t\tminHeight: 0,\n\t\t\t};\n\t\t}\n\t};\n\n\tconst baseWrapperClass =\n\t\tdirection === 'horizontal' ? 'collapsible-wrapper horizontal' : 'collapsible-wrapper vertical';\n\tconst wrapperClass = className ? `${baseWrapperClass} ${className}` : baseWrapperClass;\n\n\tconst containerClass =\n\t\tdirection === 'horizontal' && buttonPosition === 'right'\n\t\t\t? 'collapsible-container align-right'\n\t\t\t: 'collapsible-container';\n\tconst height = getContentMaxHeight();\n\tconst contentStyle: CSSProperties = {\n\t\tmaxHeight: direction === 'vertical' ? (isExpanded ? height : '0px') : height,\n\t\toverflowY: 'auto',\n\t\tpadding: direction === 'vertical' && !isExpanded ? '0px' : contentPadding,\n\t\tboxSizing: 'border-box',\n\t};\n\n\t// 折叠时(纵向 + 底部按钮):按钮需切换为 top:0 定位,使其显示在折叠线下方\n\tconst buttonStyle: CSSProperties =\n\t\tdirection === 'vertical' && buttonPosition === 'bottom' && !isExpanded\n\t\t\t? { top: '0px', bottom: 'auto' }\n\t\t\t: {};\n\n\t// 让 wrapper 高度跟随容器,确保 bottom:0 的按钮贴住容器底部\n\t// 折叠时 wrapper 高度为 0,配合按钮的 translateY(-100%) 让按钮显示在折叠线上方\n\tconst formattedWidth = formatDimension(defaultWidth);\n\tconst formattedHeight = formatDimension(defaultHeight);\n\tconst wrapperStyle: CSSProperties | undefined =\n\t\tdirection === 'vertical'\n\t\t\t? isExpanded\n\t\t\t\t? {\n\t\t\t\t\t\theight: formattedHeight,\n\t\t\t\t\t\twidth: formattedWidth,\n\t\t\t\t\t}\n\t\t\t\t: { height: 0, width: formattedWidth }\n\t\t\t: undefined;\n\n\treturn (\n\t\t<div className={wrapperClass} style={wrapperStyle}>\n\t\t\t<div style={getContainerStyle()} className={containerClass}>\n\t\t\t\t{title && (\n\t\t\t\t\t<div className=\"collapsible-header\" style={{ display: 'none' }}>\n\t\t\t\t\t\t<h3>{title}</h3>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"collapsible-content\" style={contentStyle}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tonClick={() => setIsExpanded(!isExpanded)}\n\t\t\t\tclassName={`toggle-button ${getButtonClass()}`}\n\t\t\t\tstyle={buttonStyle}\n\t\t\t\ttitle={isExpanded ? '隐藏' : '展开'}\n\t\t\t>\n\t\t\t\t{getIcon()}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default CollapsibleBox;\n","import type { CSSProperties } from 'react';\n\ninterface IconProps {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n}\n\nconst baseStyle: CSSProperties = {\n\tdisplay: 'inline-block',\n\twidth: '1em',\n\theight: '1em',\n\tverticalAlign: '-0.125em',\n};\n\nexport const LeftOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"left\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z\" />\n\t</svg>\n);\n\nexport const RightOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"right\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z\" />\n\t</svg>\n);\n\nexport const UpOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"up\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M890.5 755.3L537.4 268a31.96 31.96 0 00-50.8 0L133.5 755.3a7.95 7.95 0 006.3 12.7h75.5c4.9 0 9.6-2.3 12.6-6.1l281-360 281 360c3 3.8 7.7 6.1 12.6 6.1h75.5c6.7 0 10.4-7.6 6.1-12.7z\" />\n\t</svg>\n);\n\nexport const DownOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"down\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 37 17.6 49.8 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z\" />\n\t</svg>\n);\n","import { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '../src/icons';\nimport type {\n\tCSSProperties,\n\tReactElement,\n\tReactNode,\n\tPointerEvent as ReactPointerEvent,\n} from 'react';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nexport type SplitterSize = number | `${number}%`;\nexport type SplitterOrientation = 'horizontal' | 'vertical';\n\nexport type SplitterPanelProps = {\n\tchildren?: ReactNode;\n\tcollapsible?: boolean;\n\tdefaultSize?: SplitterSize;\n\tmax?: SplitterSize;\n\tmin?: SplitterSize;\n\tresizable?: boolean;\n\tsize?: SplitterSize;\n\tstyle?: CSSProperties;\n};\n\nexport type SplitterProps = {\n\tchildren: ReactNode;\n\tclassName?: string;\n\tdraggerSize?: number;\n\tlazy?: boolean;\n\tonResize?: (sizes: number[]) => void;\n\tonResizeEnd?: (sizes: number[]) => void;\n\tonResizeStart?: (sizes: number[]) => void;\n\torientation?: SplitterOrientation;\n\tstyle?: CSSProperties;\n\tvertical?: boolean;\n};\n\ntype SplitterComponent = React.FC<SplitterProps> & {\n\tPanel: React.FC<SplitterPanelProps>;\n};\n\nconst DEFAULT_DRAGGER_SIZE = 4;\nconst MIN_DRAG_SIZE = 40; // 手动拖拽调整大小时的默认最小限制 (px)\n\nconst SplitterPanel: React.FC<SplitterPanelProps> = ({ children }) => <>{children}</>;\n\nconst isPercentSize = (value: SplitterSize): value is `${number}%` =>\n\ttypeof value === 'string' && value.endsWith('%');\n\nconst parseSize = (value: SplitterSize | undefined, total: number, fallback: number) => {\n\tif (value === undefined) {\n\t\treturn fallback;\n\t}\n\n\tif (isPercentSize(value)) {\n\t\treturn (Number.parseFloat(value) / 100) * total;\n\t}\n\n\treturn Number(value);\n};\n\nconst roundSizes = (sizes: number[]) => sizes.map((size) => Math.round(size));\n\nconst getPointerPosition = (\n\tevent: PointerEvent | ReactPointerEvent,\n\torientation: SplitterOrientation,\n) => (orientation === 'horizontal' ? event.clientX : event.clientY);\n\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\nconst CustomSplitter: SplitterComponent = ({\n\tchildren,\n\tclassName,\n\tdraggerSize = DEFAULT_DRAGGER_SIZE,\n\tlazy = false,\n\tonResize,\n\tonResizeEnd,\n\tonResizeStart,\n\torientation,\n\tstyle,\n\tvertical = false,\n}) => {\n\tconst resolvedOrientation = orientation ?? (vertical ? 'vertical' : 'horizontal');\n\tconst rootRef = useRef<HTMLDivElement>(null);\n\tconst sizesRef = useRef<number[]>([]);\n\tconst lastNonZeroSizesRef = useRef<number[]>([]);\n\tconst [containerSize, setContainerSize] = useState(0);\n\tconst [draggingIndex, setDraggingIndex] = useState<number | null>(null);\n\tconst [hoveredIndex, setHoveredIndex] = useState<number | null>(null);\n\tconst [sizes, setSizes] = useState<number[]>([]);\n\n\tconst panels = useMemo(\n\t\t() =>\n\t\t\tReact.Children.toArray(children).filter(\n\t\t\t\tReact.isValidElement,\n\t\t\t) as ReactElement<SplitterPanelProps>[],\n\t\t[children],\n\t);\n\n\tconst trackSize = Math.max(0, containerSize - Math.max(0, panels.length - 1) * draggerSize);\n\n\tconst getPanelMin = useCallback(\n\t\t(index: number) => parseSize(panels[index]?.props.min, trackSize, 0),\n\t\t[panels, trackSize],\n\t);\n\n\tconst getPanelMax = useCallback(\n\t\t(index: number) => parseSize(panels[index]?.props.max, trackSize, trackSize),\n\t\t[panels, trackSize],\n\t);\n\n\tconst normalizeToTrack = useCallback(\n\t\t(nextSizes: number[]) => {\n\t\t\tif (!trackSize || !nextSizes.length) {\n\t\t\t\treturn nextSizes;\n\t\t\t}\n\n\t\t\tconst normalized = [...nextSizes];\n\t\t\tconst diff = trackSize - normalized.reduce((sum, size) => sum + size, 0);\n\t\t\tconst flexibleIndex = normalized.findIndex((size) => size > 0);\n\t\t\tif (flexibleIndex !== -1) {\n\t\t\t\tnormalized[flexibleIndex] += diff;\n\t\t\t}\n\n\t\t\treturn normalized.map((size, index) => {\n\t\t\t\t// 折叠状态(size <= 1)保持为 0,不受 min 限制干扰\n\t\t\t\tif (size <= 1) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\treturn clamp(size, getPanelMin(index), getPanelMax(index));\n\t\t\t});\n\t\t},\n\t\t[getPanelMax, getPanelMin, trackSize],\n\t);\n\n\tconst buildInitialSizes = useCallback(\n\t\t(previous?: number[]) => {\n\t\t\tif (!trackSize || !panels.length) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tif (previous?.length === panels.length) {\n\t\t\t\tconst previousTotal = previous.reduce((sum, size) => sum + size, 0);\n\t\t\t\tif (previousTotal > 0) {\n\t\t\t\t\treturn normalizeToTrack(previous.map((size) => (size / previousTotal) * trackSize));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst explicitSizes = panels.map((panel) =>\n\t\t\t\tparseSize(panel.props.size ?? panel.props.defaultSize, trackSize, -1),\n\t\t\t);\n\t\t\tconst usedSize = explicitSizes\n\t\t\t\t.filter((size) => size >= 0)\n\t\t\t\t.reduce((sum, size) => sum + size, 0);\n\t\t\tconst unsetCount = explicitSizes.filter((size) => size < 0).length;\n\t\t\tconst fallbackSize = unsetCount ? Math.max(0, (trackSize - usedSize) / unsetCount) : 0;\n\n\t\t\treturn normalizeToTrack(\n\t\t\t\texplicitSizes.map((size, index) =>\n\t\t\t\t\tclamp(size >= 0 ? size : fallbackSize, getPanelMin(index), getPanelMax(index)),\n\t\t\t\t),\n\t\t\t);\n\t\t},\n\t\t[getPanelMax, getPanelMin, normalizeToTrack, panels, trackSize],\n\t);\n\n\tconst updateSizes = useCallback(\n\t\t(nextSizes: number[], notify = true) => {\n\t\t\tconst normalized = normalizeToTrack(nextSizes);\n\t\t\tsetSizes(normalized);\n\t\t\tsizesRef.current = normalized;\n\t\t\tnormalized.forEach((size, index) => {\n\t\t\t\tif (size > 1) {\n\t\t\t\t\tlastNonZeroSizesRef.current[index] = size;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (notify) {\n\t\t\t\tonResize?.(roundSizes(normalized));\n\t\t\t}\n\t\t},\n\t\t[normalizeToTrack, onResize],\n\t);\n\n\tuseEffect(() => {\n\t\tconst node = rootRef.current;\n\t\tif (!node) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst syncSize = () => {\n\t\t\tsetContainerSize(resolvedOrientation === 'horizontal' ? node.clientWidth : node.clientHeight);\n\t\t};\n\t\tsyncSize();\n\n\t\tconst observer = new ResizeObserver(syncSize);\n\t\tobserver.observe(node);\n\t\treturn () => observer.disconnect();\n\t}, [resolvedOrientation]);\n\n\tuseEffect(() => {\n\t\tsetSizes((previous) => {\n\t\t\tconst nextSizes = buildInitialSizes(previous);\n\t\t\tsizesRef.current = nextSizes;\n\t\t\tlastNonZeroSizesRef.current = nextSizes.map((size) =>\n\t\t\t\tMath.max(size, trackSize / Math.max(panels.length, 1)),\n\t\t\t);\n\t\t\treturn nextSizes;\n\t\t});\n\t}, [buildInitialSizes, panels.length, trackSize]);\n\n\tconst getResizedPair = useCallback(\n\t\t(sourceSizes: number[], index: number, delta: number) => {\n\t\t\tconst nextSizes = [...sourceSizes];\n\t\t\tconst leftMin = getPanelMin(index);\n\t\t\tconst rightMin = getPanelMin(index + 1);\n\t\t\tconst leftMax = getPanelMax(index);\n\t\t\tconst rightMax = getPanelMax(index + 1);\n\n\t\t\tconst minDelta = Math.max(leftMin - sourceSizes[index], sourceSizes[index + 1] - rightMax);\n\t\t\tconst maxDelta = Math.min(leftMax - sourceSizes[index], sourceSizes[index + 1] - rightMin);\n\t\t\tconst safeDelta = clamp(delta, minDelta, maxDelta);\n\n\t\t\tnextSizes[index] = sourceSizes[index] + safeDelta;\n\t\t\tnextSizes[index + 1] = sourceSizes[index + 1] - safeDelta;\n\t\t\treturn normalizeToTrack(nextSizes);\n\t\t},\n\t\t[getPanelMax, getPanelMin, normalizeToTrack],\n\t);\n\n\tconst resizePair = useCallback(\n\t\t(index: number, delta: number, notify = true) => {\n\t\t\tupdateSizes(getResizedPair(sizesRef.current, index, delta), notify);\n\t\t},\n\t\t[getResizedPair, updateSizes],\n\t);\n\n\tconst startResize = (index: number, event: ReactPointerEvent<HTMLDivElement>) => {\n\t\tif (panels[index].props.resizable === false || panels[index + 1].props.resizable === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tconst startPosition = getPointerPosition(event, resolvedOrientation);\n\t\tconst startSizes = [...sizesRef.current];\n\t\tlet latestSizes = startSizes;\n\n\t\tsetDraggingIndex(index);\n\t\tonResizeStart?.(roundSizes(startSizes));\n\n\t\tconst handlePointerMove = (moveEvent: PointerEvent) => {\n\t\t\tconst delta = getPointerPosition(moveEvent, resolvedOrientation) - startPosition;\n\t\t\tlatestSizes = getResizedPair(startSizes, index, delta);\n\t\t\tif (!lazy) {\n\t\t\t\tupdateSizes(latestSizes, true);\n\t\t\t}\n\t\t};\n\n\t\tconst handlePointerUp = () => {\n\t\t\tdocument.removeEventListener('pointermove', handlePointerMove);\n\t\t\tdocument.removeEventListener('pointerup', handlePointerUp);\n\t\t\tsetDraggingIndex(null);\n\t\t\tif (lazy) {\n\t\t\t\tupdateSizes(latestSizes, true);\n\t\t\t}\n\t\t\tonResizeEnd?.(roundSizes(sizesRef.current));\n\t\t};\n\n\t\tdocument.addEventListener('pointermove', handlePointerMove);\n\t\tdocument.addEventListener('pointerup', handlePointerUp);\n\t};\n\n\tconst toggleCollapse = (index: number, neighborIndex: number) => {\n\t\tconst nextSizes = [...sizesRef.current];\n\n\t\tif (nextSizes[index] > 1) {\n\t\t\tlastNonZeroSizesRef.current[index] = nextSizes[index];\n\t\t\tnextSizes[neighborIndex] += nextSizes[index];\n\t\t\tnextSizes[index] = 0;\n\t\t} else {\n\t\t\tconst restoredSize =\n\t\t\t\tlastNonZeroSizesRef.current[index] ||\n\t\t\t\tparseSize(panels[index].props.defaultSize, trackSize, trackSize / panels.length);\n\t\t\tnextSizes[index] = clamp(restoredSize, getPanelMin(index), getPanelMax(index));\n\t\t\tnextSizes[neighborIndex] = Math.max(0, nextSizes[neighborIndex] - nextSizes[index]);\n\t\t}\n\n\t\tupdateSizes(nextSizes);\n\t\tonResizeEnd?.(roundSizes(sizesRef.current));\n\t};\n\n\tconst resetSizes = () => {\n\t\tconst nextSizes = buildInitialSizes();\n\t\tupdateSizes(nextSizes);\n\t\tonResizeEnd?.(roundSizes(nextSizes));\n\t};\n\n\tconst rootStyle: CSSProperties = {\n\t\tborder: '1px solid #f0f0f0',\n\t\tborderRadius: 8,\n\t\tboxSizing: 'border-box',\n\t\tdisplay: 'flex',\n\t\tflexDirection: resolvedOrientation === 'horizontal' ? 'row' : 'column',\n\t\theight: 360,\n\t\tminHeight: 0,\n\t\toverflow: 'hidden',\n\t\tposition: 'relative',\n\t\twidth: '100%',\n\t\t...style,\n\t};\n\n\tconst renderCollapseButton = (\n\t\tdraggerIndex: number,\n\t\tpanelIndex: number,\n\t\tdirection: 'start' | 'end',\n\t) => {\n\t\tconst panel = panels[panelIndex];\n\t\tif (!panel?.props.collapsible) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst neighborIndex = direction === 'start' ? panelIndex + 1 : panelIndex - 1;\n\t\tconst isCollapsed = (sizes[panelIndex] ?? 0) <= 1;\n\t\tconst isNeighborCollapsed = (sizes[neighborIndex] ?? 0) <= 1;\n\n\t\t// 自己折叠后隐藏;对侧面板折叠后也隐藏(避免与展开按钮重复/语义冲突)\n\t\tif (isCollapsed || isNeighborCollapsed) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// 展开时箭头指向面板将被折叠到的方向\n\t\tconst Icon =\n\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t? direction === 'start'\n\t\t\t\t\t? LeftOutlined\n\t\t\t\t\t: RightOutlined\n\t\t\t\t: direction === 'start'\n\t\t\t\t\t? UpOutlined\n\t\t\t\t\t: DownOutlined;\n\n\t\treturn (\n\t\t\t<button\n\t\t\t\taria-label=\"折叠面板\"\n\t\t\t\ttitle=\"折叠面板\"\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\ttoggleCollapse(panelIndex, neighborIndex);\n\t\t\t\t}}\n\t\t\t\tstyle={{\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tbackground: '#fff',\n\t\t\t\t\tborder: '1px solid #d9d9d9',\n\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\tcolor: '#595959',\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\theight: 20,\n\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\tpadding: 0,\n\t\t\t\t\twidth: 20,\n\t\t\t\t\tfontSize: 12,\n\t\t\t\t\tboxShadow: '0 2px 4px rgba(0,0,0,0.08)',\n\t\t\t\t}}\n\t\t\t\ttype=\"button\"\n\t\t\t>\n\t\t\t\t<Icon />\n\t\t\t</button>\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className={className} ref={rootRef} style={rootStyle}>\n\t\t\t{panels.map((panel, index) => {\n\t\t\t\tconst isHidden = sizes[index] <= 1;\n\t\t\t\tconst isLeftOrTopCollapsed = (sizes[index] ?? 0) <= 1;\n\t\t\t\tconst isRightOrBottomCollapsed = (sizes[index + 1] ?? 0) <= 1;\n\t\t\t\tconst isAnyCollapsed = isLeftOrTopCollapsed || isRightOrBottomCollapsed;\n\n\t\t\t\treturn (\n\t\t\t\t\t<React.Fragment key={index}>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tbackground: index % 2 ? '#fff' : '#fafafa',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tflex: `0 0 ${sizes[index] ?? 0}px`,\n\t\t\t\t\t\t\t\tminHeight: 0,\n\t\t\t\t\t\t\t\tminWidth: 0,\n\t\t\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t\t\t\tpadding: isHidden ? 0 : 16,\n\t\t\t\t\t\t\t\ttransition: draggingIndex === null ? 'flex-basis 0.2s ease' : undefined,\n\t\t\t\t\t\t\t\t...panel.props.style,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{!isHidden && panel.props.children}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{index < panels.length - 1 && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\taria-orientation={resolvedOrientation}\n\t\t\t\t\t\t\t\tonDoubleClick={resetSizes}\n\t\t\t\t\t\t\t\tonKeyDown={(event) => {\n\t\t\t\t\t\t\t\t\tconst step = event.shiftKey ? 40 : 10;\n\t\t\t\t\t\t\t\t\tconst directionMap =\n\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t? { ArrowLeft: -step, ArrowRight: step }\n\t\t\t\t\t\t\t\t\t\t\t: { ArrowUp: -step, ArrowDown: step };\n\t\t\t\t\t\t\t\t\tconst delta = directionMap[event.key as keyof typeof directionMap];\n\t\t\t\t\t\t\t\t\tif (delta !== undefined) {\n\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\tresizePair(index, delta);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonPointerDown={(event) => startResize(index, event)}\n\t\t\t\t\t\t\t\tonPointerEnter={() => setHoveredIndex(index)}\n\t\t\t\t\t\t\t\tonPointerLeave={() => setHoveredIndex(null)}\n\t\t\t\t\t\t\t\trole=\"separator\"\n\t\t\t\t\t\t\t\ttitle=\"拖动调整大小,双击重置\"\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index\n\t\t\t\t\t\t\t\t\t\t\t? '#e6f4ff'\n\t\t\t\t\t\t\t\t\t\t\t: '#f5f5f5',\n\t\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t\tcursor:\n\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t? 'col-resize'\n\t\t\t\t\t\t\t\t\t\t\t: 'row-resize',\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\tflex: `0 0 ${draggerSize}px`,\n\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\toutline: 'none',\n\t\t\t\t\t\t\t\t\tposition: 'relative',\n\t\t\t\t\t\t\t\t\tuserSelect: 'none',\n\t\t\t\t\t\t\t\t\tzIndex: isAnyCollapsed ? 2 : 1,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index || isAnyCollapsed\n\t\t\t\t\t\t\t\t\t\t\t\t? '#1677ff'\n\t\t\t\t\t\t\t\t\t\t\t\t: '#d9d9d9',\n\t\t\t\t\t\t\t\t\t\tborderRadius: 2,\n\t\t\t\t\t\t\t\t\t\theight: resolvedOrientation === 'horizontal' ? 48 : 2,\n\t\t\t\t\t\t\t\t\t\twidth: resolvedOrientation === 'horizontal' ? 2 : 48,\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{/* 未折叠状态下呈现折叠按钮(默认隐藏,鼠标移动到拖拽区域时显示) */}\n\t\t\t\t\t\t\t\t{!isAnyCollapsed && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\tflexDirection: resolvedOrientation === 'horizontal' ? 'column' : 'row',\n\t\t\t\t\t\t\t\t\t\t\tgap: 4,\n\t\t\t\t\t\t\t\t\t\t\topacity: hoveredIndex === index || draggingIndex === index ? 1 : 0,\n\t\t\t\t\t\t\t\t\t\t\tpointerEvents:\n\t\t\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index ? 'auto' : 'none',\n\t\t\t\t\t\t\t\t\t\t\ttransition: 'opacity 0.15s ease',\n\t\t\t\t\t\t\t\t\t\t\tzIndex: 5,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{renderCollapseButton(index, index, 'start')}\n\t\t\t\t\t\t\t\t\t\t{renderCollapseButton(index, index + 1, 'end')}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{/* 折叠状态下呈现展开按钮(默认隐藏,鼠标移动到拖拽区域时显示,且仅点击 icon 展开) */}\n\t\t\t\t\t\t\t\t{isAnyCollapsed && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\t\t\topacity: hoveredIndex === index || draggingIndex === index ? 1 : 0,\n\t\t\t\t\t\t\t\t\t\t\tpointerEvents:\n\t\t\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index ? 'auto' : 'none',\n\t\t\t\t\t\t\t\t\t\t\ttransition: 'opacity 0.15s ease',\n\t\t\t\t\t\t\t\t\t\t\tzIndex: 5,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{(() => {\n\t\t\t\t\t\t\t\t\t\t\tconst ExpandIcon =\n\t\t\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t\t\t? isLeftOrTopCollapsed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? RightOutlined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: LeftOutlined\n\t\t\t\t\t\t\t\t\t\t\t\t\t: isLeftOrTopCollapsed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? DownOutlined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: UpOutlined;\n\n\t\t\t\t\t\t\t\t\t\t\tconst targetIndex = isLeftOrTopCollapsed ? index : index + 1;\n\t\t\t\t\t\t\t\t\t\t\tconst neighborIndex = isLeftOrTopCollapsed ? index + 1 : index;\n\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-label=\"展开面板\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"展开面板\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoggleCollapse(targetIndex, neighborIndex);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: '#fff',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tborder: '1px solid #1677ff',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: '#1677ff',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: 12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tboxShadow: '0 2px 4px rgba(0,0,0,0.12)',\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ExpandIcon />\n\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})()}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</React.Fragment>\n\t\t\t\t);\n\t\t\t})}\n\t\t</div>\n\t);\n};\n\nCustomSplitter.Panel = SplitterPanel;\n\nexport default CustomSplitter;\n"],"mappings":";AAAA,SAAS,gBAAoD;;;AC0B3D;AAnBF,IAAM,YAA2B;AAAA,EAChC,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,eAAe;AAChB;AAEO,IAAM,eAAe,CAAC,EAAE,OAAO,UAAU,MAC/C;AAAA,EAAC;AAAA;AAAA,IACA,SAAQ;AAAA,IACR,WAAU;AAAA,IACV,aAAU;AAAA,IACV,OAAM;AAAA,IACN,QAAO;AAAA,IACP,MAAK;AAAA,IACL,eAAY;AAAA,IACZ,OAAO,EAAE,GAAG,WAAW,GAAG,MAAM;AAAA,IAChC;AAAA,IAEA,8BAAC,UAAK,GAAE,yLAAwL;AAAA;AACjM;AAGM,IAAM,gBAAgB,CAAC,EAAE,OAAO,UAAU,MAChD;AAAA,EAAC;AAAA;AAAA,IACA,SAAQ;AAAA,IACR,WAAU;AAAA,IACV,aAAU;AAAA,IACV,OAAM;AAAA,IACN,QAAO;AAAA,IACP,MAAK;AAAA,IACL,eAAY;AAAA,IACZ,OAAO,EAAE,GAAG,WAAW,GAAG,MAAM;AAAA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B,IAAO,mBAAQ;","names":["jsx","useState","jsx","jsxs","jsx","useState","jsxs"]}
|
|
1
|
+
{"version":3,"sources":["../CollapseBox/index.tsx","../src/icons.tsx","../Splitter/index.tsx"],"sourcesContent":["import { useState, type CSSProperties, type ReactNode } from 'react';\nimport { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '../src/icons';\nimport './index.less';\n\nexport type CollapseBoxDirection = 'horizontal' | 'vertical';\nexport type CollapseBoxButtonPosition = 'left' | 'right' | 'top' | 'bottom';\n\nexport interface CollapseBoxProps {\n\tchildren?: ReactNode;\n\ttitle?: string;\n\tdirection?: CollapseBoxDirection;\n\tbuttonPosition?: CollapseBoxButtonPosition;\n\tdefaultWidth?: number | string;\n\tdefaultHeight?: number | string;\n\tcontentPadding?: string;\n\theaderHeight?: number;\n\tclassName?: string;\n}\n\nconst formatDimension = (value?: number | string): string | undefined => {\n\tif (value === undefined || value === null) return undefined;\n\treturn typeof value === 'number' ? `${value}px` : value;\n};\n\nconst ChevronLeft = () => <LeftOutlined />;\n\nconst ChevronRight = () => <RightOutlined />;\n\nconst ChevronUp = () => <UpOutlined />;\n\nconst ChevronDown = () => <DownOutlined />;\n\nconst CollapsibleBox = ({\n\tchildren,\n\ttitle = '内容区域',\n\tdirection = 'horizontal',\n\tbuttonPosition = 'right',\n\tdefaultWidth = 600,\n\tdefaultHeight = 300,\n\tcontentPadding = '16px',\n\theaderHeight = 16,\n\tclassName,\n}: CollapseBoxProps) => {\n\tconst [isExpanded, setIsExpanded] = useState(true);\n\n\tconst getContentMaxHeight = () => {\n\t\tif (typeof defaultHeight === 'number') {\n\t\t\treturn `${defaultHeight - headerHeight}px`;\n\t\t}\n\t\tif (typeof defaultHeight === 'string') {\n\t\t\treturn headerHeight ? `calc(${defaultHeight} - ${headerHeight}px)` : defaultHeight;\n\t\t}\n\t\treturn '100%';\n\t};\n\n\tconst getIcon = () => {\n\t\tif (direction === 'horizontal') {\n\t\t\tif (buttonPosition === 'right') {\n\t\t\t\treturn isExpanded ? <ChevronRight /> : <ChevronLeft />;\n\t\t\t} else {\n\t\t\t\treturn isExpanded ? <ChevronLeft /> : <ChevronRight />;\n\t\t\t}\n\t\t} else {\n\t\t\tif (buttonPosition === 'bottom') {\n\t\t\t\treturn isExpanded ? <ChevronUp /> : <ChevronDown />;\n\t\t\t} else {\n\t\t\t\treturn isExpanded ? <ChevronDown /> : <ChevronUp />;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst getButtonClass = () => {\n\t\tif (direction === 'horizontal') {\n\t\t\treturn buttonPosition === 'right' ? 'button-right' : 'button-left';\n\t\t} else {\n\t\t\treturn buttonPosition === 'bottom' ? 'button-bottom' : 'button-top';\n\t\t}\n\t};\n\n\tconst getContainerStyle = (): CSSProperties => {\n\t\tconst resolvedHeight = formatDimension(defaultHeight);\n\t\tconst resolvedWidth = formatDimension(defaultWidth);\n\t\tif (direction === 'horizontal') {\n\t\t\treturn {\n\t\t\t\twidth: isExpanded ? resolvedWidth : '0px',\n\t\t\t\theight: resolvedHeight,\n\t\t\t\tminWidth: 0,\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\theight: isExpanded ? resolvedHeight : '0px',\n\t\t\t\twidth: resolvedWidth,\n\t\t\t\tminHeight: 0,\n\t\t\t};\n\t\t}\n\t};\n\n\tconst baseWrapperClass =\n\t\tdirection === 'horizontal' ? 'collapsible-wrapper horizontal' : 'collapsible-wrapper vertical';\n\tconst wrapperClass = className ? `${baseWrapperClass} ${className}` : baseWrapperClass;\n\n\tconst containerClass =\n\t\tdirection === 'horizontal' && buttonPosition === 'right'\n\t\t\t? 'collapsible-container align-right'\n\t\t\t: 'collapsible-container';\n\tconst height = getContentMaxHeight();\n\tconst contentStyle: CSSProperties = {\n\t\tmaxHeight: direction === 'vertical' ? (isExpanded ? height : '0px') : height,\n\t\toverflowY: 'auto',\n\t\tpadding: direction === 'vertical' && !isExpanded ? '0px' : contentPadding,\n\t\tboxSizing: 'border-box',\n\t};\n\n\t// 折叠时(纵向 + 底部按钮):按钮需切换为 top:0 定位,使其显示在折叠线下方\n\tconst buttonStyle: CSSProperties =\n\t\tdirection === 'vertical' && buttonPosition === 'bottom' && !isExpanded\n\t\t\t? { top: '0px', bottom: 'auto' }\n\t\t\t: {};\n\n\t// 让 wrapper 高度跟随容器,确保 bottom:0 的按钮贴住容器底部\n\t// 折叠时 wrapper 高度为 0,配合按钮的 translateY(-100%) 让按钮显示在折叠线上方\n\tconst formattedWidth = formatDimension(defaultWidth);\n\tconst formattedHeight = formatDimension(defaultHeight);\n\tconst wrapperStyle: CSSProperties | undefined =\n\t\tdirection === 'vertical'\n\t\t\t? isExpanded\n\t\t\t\t? {\n\t\t\t\t\t\theight: formattedHeight,\n\t\t\t\t\t\twidth: formattedWidth,\n\t\t\t\t\t}\n\t\t\t\t: { height: 0, width: formattedWidth }\n\t\t\t: undefined;\n\n\treturn (\n\t\t<div className={wrapperClass} style={wrapperStyle}>\n\t\t\t<div style={getContainerStyle()} className={containerClass}>\n\t\t\t\t{title && (\n\t\t\t\t\t<div className=\"collapsible-header\" style={{ display: 'none' }}>\n\t\t\t\t\t\t<h3>{title}</h3>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"collapsible-content\" style={contentStyle}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tonClick={() => setIsExpanded(!isExpanded)}\n\t\t\t\tclassName={`toggle-button ${getButtonClass()}`}\n\t\t\t\tstyle={buttonStyle}\n\t\t\t\ttitle={isExpanded ? '隐藏' : '展开'}\n\t\t\t>\n\t\t\t\t{getIcon()}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default CollapsibleBox;\n","import type { CSSProperties } from 'react';\n\ninterface IconProps {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n}\n\nconst baseStyle: CSSProperties = {\n\tdisplay: 'inline-block',\n\twidth: '1em',\n\theight: '1em',\n\tverticalAlign: '-0.125em',\n};\n\nexport const LeftOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"left\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z\" />\n\t</svg>\n);\n\nexport const RightOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"right\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z\" />\n\t</svg>\n);\n\nexport const UpOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"up\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M890.5 755.3L537.4 268a31.96 31.96 0 00-50.8 0L133.5 755.3a7.95 7.95 0 006.3 12.7h75.5c4.9 0 9.6-2.3 12.6-6.1l281-360 281 360c3 3.8 7.7 6.1 12.6 6.1h75.5c6.7 0 10.4-7.6 6.1-12.7z\" />\n\t</svg>\n);\n\nexport const DownOutlined = ({ style, className }: IconProps) => (\n\t<svg\n\t\tviewBox=\"0 0 1024 1024\"\n\t\tfocusable=\"false\"\n\t\tdata-icon=\"down\"\n\t\twidth=\"1em\"\n\t\theight=\"1em\"\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t\tstyle={{ ...baseStyle, ...style }}\n\t\tclassName={className}\n\t>\n\t\t<path d=\"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 37 17.6 49.8 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z\" />\n\t</svg>\n);\n","import { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '../src/icons';\nimport type {\n\tCSSProperties,\n\tReactElement,\n\tReactNode,\n\tPointerEvent as ReactPointerEvent,\n} from 'react';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nexport type SplitterSize = number | `${number}%`;\nexport type SplitterOrientation = 'horizontal' | 'vertical';\n\nexport type SplitterPanelProps = {\n\tchildren?: ReactNode;\n\tcollapsible?: boolean;\n\tdefaultSize?: SplitterSize;\n\tmax?: SplitterSize;\n\tmin?: SplitterSize;\n\tresizable?: boolean;\n\tsize?: SplitterSize;\n\tstyle?: CSSProperties;\n};\n\nexport type SplitterProps = {\n\tchildren: ReactNode;\n\tclassName?: string;\n\tdraggerSize?: number;\n\tlazy?: boolean;\n\tonResize?: (sizes: number[]) => void;\n\tonResizeEnd?: (sizes: number[]) => void;\n\tonResizeStart?: (sizes: number[]) => void;\n\torientation?: SplitterOrientation;\n\tstyle?: CSSProperties;\n\tvertical?: boolean;\n};\n\ntype SplitterComponent = React.FC<SplitterProps> & {\n\tPanel: React.FC<SplitterPanelProps>;\n};\n\nconst DEFAULT_DRAGGER_SIZE = 4;\nconst MIN_DRAG_SIZE = 40; // 手动拖拽调整大小时的默认最小限制 (px)\n\nconst SplitterPanel: React.FC<SplitterPanelProps> = ({ children }) => <>{children}</>;\n\nconst isPercentSize = (value: SplitterSize): value is `${number}%` =>\n\ttypeof value === 'string' && value.endsWith('%');\n\nconst parseSize = (value: SplitterSize | undefined, total: number, fallback: number) => {\n\tif (value === undefined) {\n\t\treturn fallback;\n\t}\n\n\tif (isPercentSize(value)) {\n\t\treturn (Number.parseFloat(value) / 100) * total;\n\t}\n\n\treturn Number(value);\n};\n\nconst roundSizes = (sizes: number[]) => sizes.map((size) => Math.round(size));\n\nconst getPointerPosition = (\n\tevent: PointerEvent | ReactPointerEvent,\n\torientation: SplitterOrientation,\n) => (orientation === 'horizontal' ? event.clientX : event.clientY);\n\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\nconst CustomSplitter: SplitterComponent = ({\n\tchildren,\n\tclassName,\n\tdraggerSize = DEFAULT_DRAGGER_SIZE,\n\tlazy = false,\n\tonResize,\n\tonResizeEnd,\n\tonResizeStart,\n\torientation,\n\tstyle,\n\tvertical = false,\n}) => {\n\tconst resolvedOrientation = orientation ?? (vertical ? 'vertical' : 'horizontal');\n\tconst rootRef = useRef<HTMLDivElement>(null);\n\tconst sizesRef = useRef<number[]>([]);\n\tconst [containerSize, setContainerSize] = useState(0);\n\tconst [draggingIndex, setDraggingIndex] = useState<number | null>(null);\n\tconst [hoveredIndex, setHoveredIndex] = useState<number | null>(null);\n\tconst [sizes, setSizes] = useState<number[]>([]);\n\n\tconst panels = useMemo(\n\t\t() =>\n\t\t\tReact.Children.toArray(children).filter(\n\t\t\t\tReact.isValidElement,\n\t\t\t) as ReactElement<SplitterPanelProps>[],\n\t\t[children],\n\t);\n\n\tconst trackSize = Math.max(0, containerSize - Math.max(0, panels.length - 1) * draggerSize);\n\n\tconst getPanelMin = useCallback(\n\t\t(index: number) => parseSize(panels[index]?.props.min, trackSize, 0),\n\t\t[panels, trackSize],\n\t);\n\n\tconst getPanelMax = useCallback(\n\t\t(index: number) => parseSize(panels[index]?.props.max, trackSize, trackSize),\n\t\t[panels, trackSize],\n\t);\n\n\tconst normalizeToTrack = useCallback(\n\t\t(nextSizes: number[]) => {\n\t\t\tif (!trackSize || !nextSizes.length) {\n\t\t\t\treturn nextSizes;\n\t\t\t}\n\n\t\t\tconst normalized = [...nextSizes];\n\t\t\tconst diff = trackSize - normalized.reduce((sum, size) => sum + size, 0);\n\t\t\tconst flexibleIndex = normalized.findIndex((size) => size > 0);\n\t\t\tif (flexibleIndex !== -1) {\n\t\t\t\tnormalized[flexibleIndex] += diff;\n\t\t\t}\n\n\t\t\treturn normalized.map((size, index) => {\n\t\t\t\t// 折叠状态(size <= 1)保持为 0,不受 min 限制干扰\n\t\t\t\tif (size <= 1) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\t// 拖拽过程从 0 拖出时,允许在 0 到 min 之间平滑过渡,不被强行跳变到 min\n\t\t\t\tif (size < getPanelMin(index)) {\n\t\t\t\t\treturn size;\n\t\t\t\t}\n\t\t\t\treturn clamp(size, getPanelMin(index), getPanelMax(index));\n\t\t\t});\n\t\t},\n\t\t[getPanelMax, getPanelMin, trackSize],\n\t);\n\n\tconst buildInitialSizes = useCallback(\n\t\t(previous?: number[]) => {\n\t\t\tif (!trackSize || !panels.length) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tif (previous?.length === panels.length) {\n\t\t\t\tconst previousTotal = previous.reduce((sum, size) => sum + size, 0);\n\t\t\t\tif (previousTotal > 0) {\n\t\t\t\t\treturn normalizeToTrack(previous.map((size) => (size / previousTotal) * trackSize));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst explicitSizes = panels.map((panel) =>\n\t\t\t\tparseSize(panel.props.size ?? panel.props.defaultSize, trackSize, -1),\n\t\t\t);\n\t\t\tconst usedSize = explicitSizes\n\t\t\t\t.filter((size) => size >= 0)\n\t\t\t\t.reduce((sum, size) => sum + size, 0);\n\t\t\tconst unsetCount = explicitSizes.filter((size) => size < 0).length;\n\t\t\tconst fallbackSize = unsetCount ? Math.max(0, (trackSize - usedSize) / unsetCount) : 0;\n\n\t\t\treturn normalizeToTrack(\n\t\t\t\texplicitSizes.map((size, index) =>\n\t\t\t\t\tclamp(size >= 0 ? size : fallbackSize, getPanelMin(index), getPanelMax(index)),\n\t\t\t\t),\n\t\t\t);\n\t\t},\n\t\t[getPanelMax, getPanelMin, normalizeToTrack, panels, trackSize],\n\t);\n\n\tconst updateSizes = useCallback(\n\t\t(nextSizes: number[], notify = true) => {\n\t\t\tconst normalized = normalizeToTrack(nextSizes);\n\t\t\tsetSizes(normalized);\n\t\t\tsizesRef.current = normalized;\n\t\t\tif (notify) {\n\t\t\t\tonResize?.(roundSizes(normalized));\n\t\t\t}\n\t\t},\n\t\t[normalizeToTrack, onResize],\n\t);\n\n\tuseEffect(() => {\n\t\tconst node = rootRef.current;\n\t\tif (!node) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst syncSize = () => {\n\t\t\tsetContainerSize(resolvedOrientation === 'horizontal' ? node.clientWidth : node.clientHeight);\n\t\t};\n\t\tsyncSize();\n\n\t\tconst observer = new ResizeObserver(syncSize);\n\t\tobserver.observe(node);\n\t\treturn () => observer.disconnect();\n\t}, [resolvedOrientation]);\n\n\tuseEffect(() => {\n\t\tsetSizes((previous) => {\n\t\t\tconst nextSizes = buildInitialSizes(previous);\n\t\t\tsizesRef.current = nextSizes;\n\t\t\treturn nextSizes;\n\t\t});\n\t}, [buildInitialSizes]);\n\n\tconst getResizedPair = useCallback(\n\t\t(sourceSizes: number[], index: number, delta: number) => {\n\t\t\tconst nextSizes = [...sourceSizes];\n\t\t\tconst isLeftCollapsed = sourceSizes[index] <= 1;\n\t\t\tconst isRightCollapsed = sourceSizes[index + 1] <= 1;\n\n\t\t\tconst leftMin = isLeftCollapsed ? 0 : getPanelMin(index);\n\t\t\tconst rightMin = isRightCollapsed ? 0 : getPanelMin(index + 1);\n\t\t\tconst leftMax = getPanelMax(index);\n\t\t\tconst rightMax = getPanelMax(index + 1);\n\n\t\t\tconst minDelta = Math.max(leftMin - sourceSizes[index], sourceSizes[index + 1] - rightMax);\n\t\t\tconst maxDelta = Math.min(leftMax - sourceSizes[index], sourceSizes[index + 1] - rightMin);\n\t\t\tconst safeDelta = clamp(delta, minDelta, maxDelta);\n\n\t\t\tnextSizes[index] = sourceSizes[index] + safeDelta;\n\t\t\tnextSizes[index + 1] = sourceSizes[index + 1] - safeDelta;\n\t\t\treturn normalizeToTrack(nextSizes);\n\t\t},\n\t\t[getPanelMax, getPanelMin, normalizeToTrack],\n\t);\n\n\tconst resizePair = useCallback(\n\t\t(index: number, delta: number, notify = true) => {\n\t\t\tupdateSizes(getResizedPair(sizesRef.current, index, delta), notify);\n\t\t},\n\t\t[getResizedPair, updateSizes],\n\t);\n\n\tconst startResize = (index: number, event: ReactPointerEvent<HTMLDivElement>) => {\n\t\tif (panels[index].props.resizable === false || panels[index + 1].props.resizable === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tconst startPosition = getPointerPosition(event, resolvedOrientation);\n\t\tconst startSizes = [...sizesRef.current];\n\t\tlet latestSizes = startSizes;\n\n\t\tsetDraggingIndex(index);\n\t\tonResizeStart?.(roundSizes(startSizes));\n\n\t\tconst handlePointerMove = (moveEvent: PointerEvent) => {\n\t\t\tconst delta = getPointerPosition(moveEvent, resolvedOrientation) - startPosition;\n\t\t\tlatestSizes = getResizedPair(startSizes, index, delta);\n\t\t\tif (!lazy) {\n\t\t\t\tupdateSizes(latestSizes, true);\n\t\t\t}\n\t\t};\n\n\t\tconst handlePointerUp = () => {\n\t\t\tdocument.removeEventListener('pointermove', handlePointerMove);\n\t\t\tdocument.removeEventListener('pointerup', handlePointerUp);\n\t\t\tsetDraggingIndex(null);\n\t\t\tif (lazy) {\n\t\t\t\tupdateSizes(latestSizes, true);\n\t\t\t}\n\t\t\tonResizeEnd?.(roundSizes(sizesRef.current));\n\t\t};\n\n\t\tdocument.addEventListener('pointermove', handlePointerMove);\n\t\tdocument.addEventListener('pointerup', handlePointerUp);\n\t};\n\n\tconst toggleCollapse = (index: number, neighborIndex: number) => {\n\t\tconst nextSizes = [...sizesRef.current];\n\n\t\tif (nextSizes[index] > 1) {\n\t\t\tnextSizes[neighborIndex] += nextSizes[index];\n\t\t\tnextSizes[index] = 0;\n\t\t} else {\n\t\t\tconst initialSizes = buildInitialSizes();\n\t\t\tconst initialSize =\n\t\t\t\tinitialSizes[index] ??\n\t\t\t\tparseSize(panels[index].props.defaultSize, trackSize, trackSize / panels.length);\n\t\t\tconst restoredSize = clamp(initialSize, getPanelMin(index), getPanelMax(index));\n\t\t\tnextSizes[index] = restoredSize;\n\t\t\tnextSizes[neighborIndex] = Math.max(0, nextSizes[neighborIndex] - nextSizes[index]);\n\t\t}\n\n\t\tupdateSizes(nextSizes);\n\t\tonResizeEnd?.(roundSizes(sizesRef.current));\n\t};\n\n\tconst resetSizes = () => {\n\t\tconst nextSizes = buildInitialSizes();\n\t\tupdateSizes(nextSizes);\n\t\tonResizeEnd?.(roundSizes(nextSizes));\n\t};\n\n\tconst rootStyle: CSSProperties = {\n\t\tborder: '1px solid #f0f0f0',\n\t\tborderRadius: 8,\n\t\tboxSizing: 'border-box',\n\t\tdisplay: 'flex',\n\t\tflexDirection: resolvedOrientation === 'horizontal' ? 'row' : 'column',\n\t\theight: 360,\n\t\tminHeight: 0,\n\t\toverflow: 'hidden',\n\t\tposition: 'relative',\n\t\twidth: '100%',\n\t\t...style,\n\t};\n\n\tconst renderCollapseButton = (\n\t\tdraggerIndex: number,\n\t\tpanelIndex: number,\n\t\tdirection: 'start' | 'end',\n\t) => {\n\t\tconst panel = panels[panelIndex];\n\t\tif (!panel?.props.collapsible) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst neighborIndex = direction === 'start' ? panelIndex + 1 : panelIndex - 1;\n\t\tconst isCollapsed = (sizes[panelIndex] ?? 0) <= 1;\n\t\tconst isNeighborCollapsed = (sizes[neighborIndex] ?? 0) <= 1;\n\n\t\t// 自己折叠后隐藏;对侧面板折叠后也隐藏(避免与展开按钮重复/语义冲突)\n\t\tif (isCollapsed || isNeighborCollapsed) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// 展开时箭头指向面板将被折叠到的方向\n\t\tconst Icon =\n\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t? direction === 'start'\n\t\t\t\t\t? LeftOutlined\n\t\t\t\t\t: RightOutlined\n\t\t\t\t: direction === 'start'\n\t\t\t\t\t? UpOutlined\n\t\t\t\t\t: DownOutlined;\n\n\t\tconst isHorizontal = resolvedOrientation === 'horizontal';\n\n\t\treturn (\n\t\t\t<button\n\t\t\t\taria-label=\"折叠面板\"\n\t\t\t\ttitle=\"折叠面板\"\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\ttoggleCollapse(panelIndex, neighborIndex);\n\t\t\t\t}}\n\t\t\t\tstyle={{\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tbackground: '#fff',\n\t\t\t\t\tborder: '1px solid #d9d9d9',\n\t\t\t\t\tborderRadius: 3,\n\t\t\t\t\tcolor: '#595959',\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\theight: isHorizontal ? 40 : 14,\n\t\t\t\t\twidth: isHorizontal ? 14 : 40,\n\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\tpadding: 0,\n\t\t\t\t\tfontSize: 10,\n\t\t\t\t\tboxShadow: '0 1px 2px rgba(0, 0, 0, 0.05)',\n\t\t\t\t\ttransition: 'all 0.2s ease',\n\t\t\t\t}}\n\t\t\t\ttype=\"button\"\n\t\t\t\tonMouseEnter={(e) => {\n\t\t\t\t\te.currentTarget.style.background = '#e5e7eb';\n\t\t\t\t\te.currentTarget.style.color = '#1f2937';\n\t\t\t\t}}\n\t\t\t\tonMouseLeave={(e) => {\n\t\t\t\t\te.currentTarget.style.background = '#fff';\n\t\t\t\t\te.currentTarget.style.color = '#595959';\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<Icon />\n\t\t\t</button>\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className={className} ref={rootRef} style={rootStyle}>\n\t\t\t{panels.map((panel, index) => {\n\t\t\t\tconst isHidden = sizes[index] <= 1;\n\t\t\t\tconst isLeftOrTopCollapsed = (sizes[index] ?? 0) <= 1;\n\t\t\t\tconst isRightOrBottomCollapsed = (sizes[index + 1] ?? 0) <= 1;\n\t\t\t\tconst isAnyCollapsed = isLeftOrTopCollapsed || isRightOrBottomCollapsed;\n\n\t\t\t\treturn (\n\t\t\t\t\t<React.Fragment key={index}>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tbackground: index % 2 ? '#fff' : '#fafafa',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tflex: `0 0 ${sizes[index] ?? 0}px`,\n\t\t\t\t\t\t\t\tminHeight: 0,\n\t\t\t\t\t\t\t\tminWidth: 0,\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tposition: 'relative',\n\t\t\t\t\t\t\t\ttransition: draggingIndex === null ? 'flex-basis 0.2s ease' : undefined,\n\t\t\t\t\t\t\t\t...panel.props.style,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{!isHidden && (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t\t\t\t\t\tpadding: (sizes[index] ?? 0) < 32 ? 0 : 16,\n\t\t\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{panel.props.children}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{index < panels.length - 1 && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\taria-orientation={resolvedOrientation}\n\t\t\t\t\t\t\t\tonDoubleClick={resetSizes}\n\t\t\t\t\t\t\t\tonKeyDown={(event) => {\n\t\t\t\t\t\t\t\t\tconst step = event.shiftKey ? 40 : 10;\n\t\t\t\t\t\t\t\t\tconst directionMap =\n\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t? { ArrowLeft: -step, ArrowRight: step }\n\t\t\t\t\t\t\t\t\t\t\t: { ArrowUp: -step, ArrowDown: step };\n\t\t\t\t\t\t\t\t\tconst delta = directionMap[event.key as keyof typeof directionMap];\n\t\t\t\t\t\t\t\t\tif (delta !== undefined) {\n\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\tresizePair(index, delta);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonPointerDown={(event) => startResize(index, event)}\n\t\t\t\t\t\t\t\tonPointerEnter={() => setHoveredIndex(index)}\n\t\t\t\t\t\t\t\tonPointerLeave={() => setHoveredIndex(null)}\n\t\t\t\t\t\t\t\trole=\"separator\"\n\t\t\t\t\t\t\t\ttitle=\"拖动调整大小,双击重置\"\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index\n\t\t\t\t\t\t\t\t\t\t\t? '#e6f4ff'\n\t\t\t\t\t\t\t\t\t\t\t: '#f5f5f5',\n\t\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t\tcursor:\n\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t? 'col-resize'\n\t\t\t\t\t\t\t\t\t\t\t: 'row-resize',\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\tflex: `0 0 ${draggerSize}px`,\n\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\toutline: 'none',\n\t\t\t\t\t\t\t\t\tposition: 'relative',\n\t\t\t\t\t\t\t\t\tuserSelect: 'none',\n\t\t\t\t\t\t\t\t\tzIndex: isAnyCollapsed ? 2 : 1,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{/* 呈现拖拽指示线 */}\n\t\t\t\t\t\t\t\t{(hoveredIndex === index || draggingIndex === index || !isAnyCollapsed) && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index\n\t\t\t\t\t\t\t\t\t\t\t\t\t? '#1677ff'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: '#d9d9d9',\n\t\t\t\t\t\t\t\t\t\t\tborderRadius: 2,\n\t\t\t\t\t\t\t\t\t\t\theight: resolvedOrientation === 'horizontal' ? 40 : 2,\n\t\t\t\t\t\t\t\t\t\t\twidth: resolvedOrientation === 'horizontal' ? 2 : 40,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{/* 未折叠状态下呈现折叠按钮(鼠标移动到拖拽区域时显示,左右并排) */}\n\t\t\t\t\t\t\t\t{!isAnyCollapsed && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t\t\t\ttop: '50%',\n\t\t\t\t\t\t\t\t\t\t\tleft: '50%',\n\t\t\t\t\t\t\t\t\t\t\ttransform: 'translate(-50%, -50%)',\n\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\tflexDirection: resolvedOrientation === 'horizontal' ? 'row' : 'column',\n\t\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\t\t\tgap: 2,\n\t\t\t\t\t\t\t\t\t\t\topacity: hoveredIndex === index || draggingIndex === index ? 1 : 0,\n\t\t\t\t\t\t\t\t\t\t\tpointerEvents:\n\t\t\t\t\t\t\t\t\t\t\t\thoveredIndex === index || draggingIndex === index ? 'auto' : 'none',\n\t\t\t\t\t\t\t\t\t\t\ttransition: 'opacity 0.15s ease',\n\t\t\t\t\t\t\t\t\t\t\tzIndex: 5,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{renderCollapseButton(index, index, 'start')}\n\t\t\t\t\t\t\t\t\t\t{renderCollapseButton(index, index + 1, 'end')}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{/* 折叠状态下呈现展开按钮(常态保持显示,精准垂直居中) */}\n\t\t\t\t\t\t\t\t{isAnyCollapsed && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t\t\t\ttop: resolvedOrientation === 'horizontal' ? '50%' : isLeftOrTopCollapsed ? 0 : undefined,\n\t\t\t\t\t\t\t\t\t\t\tbottom: resolvedOrientation === 'horizontal' ? undefined : isRightOrBottomCollapsed ? 0 : undefined,\n\t\t\t\t\t\t\t\t\t\t\tleft: resolvedOrientation === 'horizontal' ? (isLeftOrTopCollapsed ? 0 : undefined) : '50%',\n\t\t\t\t\t\t\t\t\t\t\tright: resolvedOrientation === 'horizontal' ? (isRightOrBottomCollapsed ? 0 : undefined) : undefined,\n\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t\t\t\t\tzIndex: 5,\n\t\t\t\t\t\t\t\t\t\t\ttransform:\n\t\t\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `translate(${isLeftOrTopCollapsed ? '4px' : '-4px'}, -50%)`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: `translate(-50%, ${isLeftOrTopCollapsed ? '4px' : '-4px'})`,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{(() => {\n\t\t\t\t\t\t\t\t\t\t\tconst ExpandIcon =\n\t\t\t\t\t\t\t\t\t\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t\t\t\t\t\t\t\t\t\t? isLeftOrTopCollapsed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? RightOutlined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: LeftOutlined\n\t\t\t\t\t\t\t\t\t\t\t\t\t: isLeftOrTopCollapsed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? DownOutlined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: UpOutlined;\n\n\t\t\t\t\t\t\t\t\t\t\tconst targetIndex = isLeftOrTopCollapsed ? index : index + 1;\n\t\t\t\t\t\t\t\t\t\t\tconst neighborIndex = isLeftOrTopCollapsed ? index + 1 : index;\n\t\t\t\t\t\t\t\t\t\t\tconst isHorizontal = resolvedOrientation === 'horizontal';\n\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-label=\"展开面板\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"展开面板\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoggleCollapse(targetIndex, neighborIndex);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: '#f3f4f6',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tborder: '1px solid #e5e7eb',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: 3,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: '#595959',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: isHorizontal ? 40 : 14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: isHorizontal ? 14 : 40,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontSize: 10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tboxShadow: '0 1px 3px rgba(0, 0, 0, 0.08)',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransition: 'all 0.2s ease',\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style.background = '#e5e7eb';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style.color = '#1f2937';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style.background = '#f3f4f6';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style.color = '#595959';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ExpandIcon />\n\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})()}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</React.Fragment>\n\t\t\t\t);\n\t\t\t})}\n\t\t</div>\n\t);\n};\n\nCustomSplitter.Panel = SplitterPanel;\n\nexport default CustomSplitter;\n"],"mappings":";AAAA,SAAS,gBAAoD;;;AC0B3D;AAnBF,IAAM,YAA2B;AAAA,EAChC,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,eAAe;AAChB;AAEO,IAAM,eAAe,CAAC,EAAE,OAAO,UAAU,MAC/C;AAAA,EAAC;AAAA;AAAA,IACA,SAAQ;AAAA,IACR,WAAU;AAAA,IACV,aAAU;AAAA,IACV,OAAM;AAAA,IACN,QAAO;AAAA,IACP,MAAK;AAAA,IACL,eAAY;AAAA,IACZ,OA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