react-public-components 1.1.5 → 1.1.7
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/README.md +1 -1
- package/dist/index.cjs +92 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +92 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ import { Splitter } from 'react-public-components';
|
|
|
101
101
|
| `defaultSize` | `number \| '${number}%'` | - | 初始尺寸(未设置时按剩余空间平均分配) |
|
|
102
102
|
| `min` | `number \| '${number}%'` | `0` | 最小尺寸 |
|
|
103
103
|
| `max` | `number \| '${number}%'` | - | 最大尺寸 |
|
|
104
|
-
| `collapsible` | `boolean`
|
|
104
|
+
| `collapsible` | `boolean \| { start?: boolean; end?: boolean; showCollapsibleIcon?: boolean \| 'auto' }` | `false` | 是否允许折叠面板。支持配置指定折叠方向(`start`/`end`)及图标显示策略(`showCollapsibleIcon`) |
|
|
105
105
|
| `resizable` | `boolean` | `true` | 是否允许拖拽调整(两侧任一为 `false` 都会禁用对应分隔条) |
|
|
106
106
|
| `style` | `CSSProperties` | - | 面板自定义样式 |
|
|
107
107
|
|
package/dist/index.cjs
CHANGED
|
@@ -216,6 +216,24 @@ var CollapseBox_default = CollapsibleBox;
|
|
|
216
216
|
// Splitter/index.tsx
|
|
217
217
|
var import_react2 = __toESM(require("react"), 1);
|
|
218
218
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
219
|
+
var getCollapsibleConfig = (collapsible) => {
|
|
220
|
+
var _a, _b, _c;
|
|
221
|
+
if (!collapsible) {
|
|
222
|
+
return { start: false, end: false, showCollapsibleIcon: "auto" };
|
|
223
|
+
}
|
|
224
|
+
if (typeof collapsible === "boolean") {
|
|
225
|
+
return {
|
|
226
|
+
start: collapsible,
|
|
227
|
+
end: collapsible,
|
|
228
|
+
showCollapsibleIcon: collapsible ? true : "auto"
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
return {
|
|
232
|
+
start: (_a = collapsible.start) != null ? _a : false,
|
|
233
|
+
end: (_b = collapsible.end) != null ? _b : false,
|
|
234
|
+
showCollapsibleIcon: (_c = collapsible.showCollapsibleIcon) != null ? _c : true
|
|
235
|
+
};
|
|
236
|
+
};
|
|
219
237
|
var DEFAULT_DRAGGER_SIZE = 4;
|
|
220
238
|
var SplitterPanel = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children });
|
|
221
239
|
var isPercentSize = (value) => typeof value === "string" && value.endsWith("%");
|
|
@@ -239,6 +257,7 @@ var CustomSplitter = ({
|
|
|
239
257
|
onResize,
|
|
240
258
|
onResizeEnd,
|
|
241
259
|
onResizeStart,
|
|
260
|
+
onCollapse,
|
|
242
261
|
orientation,
|
|
243
262
|
style,
|
|
244
263
|
vertical = false
|
|
@@ -249,6 +268,7 @@ var CustomSplitter = ({
|
|
|
249
268
|
const [containerSize, setContainerSize] = (0, import_react2.useState)(0);
|
|
250
269
|
const [draggingIndex, setDraggingIndex] = (0, import_react2.useState)(null);
|
|
251
270
|
const [hoveredIndex, setHoveredIndex] = (0, import_react2.useState)(null);
|
|
271
|
+
const [hoveredCollapsePanelIndex, setHoveredCollapsePanelIndex] = (0, import_react2.useState)(null);
|
|
252
272
|
const [sizes, setSizes] = (0, import_react2.useState)([]);
|
|
253
273
|
const panels = (0, import_react2.useMemo)(
|
|
254
274
|
() => import_react2.default.Children.toArray(children).filter(
|
|
@@ -401,7 +421,13 @@ var CustomSplitter = ({
|
|
|
401
421
|
if (lazy) {
|
|
402
422
|
updateSizes(latestSizes, true);
|
|
403
423
|
}
|
|
404
|
-
|
|
424
|
+
const currentSizes = roundSizes(sizesRef.current);
|
|
425
|
+
const currentCollapsed = sizesRef.current.map((size) => size <= 1);
|
|
426
|
+
const startCollapsed = startSizes.map((size) => size <= 1);
|
|
427
|
+
if (currentCollapsed.some((c, i) => c !== startCollapsed[i])) {
|
|
428
|
+
onCollapse == null ? void 0 : onCollapse(currentCollapsed, currentSizes);
|
|
429
|
+
}
|
|
430
|
+
onResizeEnd == null ? void 0 : onResizeEnd(currentSizes);
|
|
405
431
|
};
|
|
406
432
|
document.addEventListener("pointermove", handlePointerMove);
|
|
407
433
|
document.addEventListener("pointerup", handlePointerUp);
|
|
@@ -420,12 +446,21 @@ var CustomSplitter = ({
|
|
|
420
446
|
nextSizes[neighborIndex] = Math.max(0, nextSizes[neighborIndex] - nextSizes[index]);
|
|
421
447
|
}
|
|
422
448
|
updateSizes(nextSizes);
|
|
423
|
-
|
|
449
|
+
const currentSizes = roundSizes(sizesRef.current);
|
|
450
|
+
const currentCollapsed = sizesRef.current.map((size) => size <= 1);
|
|
451
|
+
onCollapse == null ? void 0 : onCollapse(currentCollapsed, currentSizes);
|
|
452
|
+
onResizeEnd == null ? void 0 : onResizeEnd(currentSizes);
|
|
424
453
|
};
|
|
425
454
|
const resetSizes = () => {
|
|
455
|
+
const previousCollapsed = sizesRef.current.map((size) => size <= 1);
|
|
426
456
|
const nextSizes = buildInitialSizes();
|
|
427
457
|
updateSizes(nextSizes);
|
|
428
|
-
|
|
458
|
+
const currentSizes = roundSizes(sizesRef.current);
|
|
459
|
+
const currentCollapsed = sizesRef.current.map((size) => size <= 1);
|
|
460
|
+
if (currentCollapsed.some((c, i) => c !== previousCollapsed[i])) {
|
|
461
|
+
onCollapse == null ? void 0 : onCollapse(currentCollapsed, currentSizes);
|
|
462
|
+
}
|
|
463
|
+
onResizeEnd == null ? void 0 : onResizeEnd(currentSizes);
|
|
429
464
|
};
|
|
430
465
|
const rootStyle = {
|
|
431
466
|
border: "1px solid #f0f0f0",
|
|
@@ -443,7 +478,9 @@ var CustomSplitter = ({
|
|
|
443
478
|
const renderCollapseButton = (draggerIndex, panelIndex, direction) => {
|
|
444
479
|
var _a, _b;
|
|
445
480
|
const panel = panels[panelIndex];
|
|
446
|
-
|
|
481
|
+
const config = getCollapsibleConfig(panel == null ? void 0 : panel.props.collapsible);
|
|
482
|
+
const isAllowed = direction === "start" ? config.start : config.end;
|
|
483
|
+
if (!isAllowed || config.showCollapsibleIcon === false) {
|
|
447
484
|
return null;
|
|
448
485
|
}
|
|
449
486
|
const neighborIndex = direction === "start" ? panelIndex + 1 : panelIndex - 1;
|
|
@@ -454,11 +491,16 @@ var CustomSplitter = ({
|
|
|
454
491
|
}
|
|
455
492
|
const Icon = resolvedOrientation === "horizontal" ? direction === "start" ? LeftOutlined : RightOutlined : direction === "start" ? UpOutlined : DownOutlined;
|
|
456
493
|
const isHorizontal = resolvedOrientation === "horizontal";
|
|
494
|
+
const isAlwaysShow = config.showCollapsibleIcon === true;
|
|
495
|
+
const isHoveredOrDragging = hoveredIndex === draggerIndex || draggingIndex === draggerIndex;
|
|
496
|
+
const opacity = isAlwaysShow || isHoveredOrDragging ? 1 : 0;
|
|
497
|
+
const pointerEvents = isAlwaysShow || isHoveredOrDragging ? "auto" : "none";
|
|
498
|
+
const buttonTitle = resolvedOrientation === "horizontal" ? direction === "start" ? "\u6298\u53E0\u5DE6\u4FA7\u9762\u677F" : "\u6298\u53E0\u53F3\u4FA7\u9762\u677F" : direction === "start" ? "\u6298\u53E0\u4E0A\u65B9\u9762\u677F" : "\u6298\u53E0\u4E0B\u65B9\u9762\u677F";
|
|
457
499
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
458
500
|
"button",
|
|
459
501
|
{
|
|
460
|
-
"aria-label":
|
|
461
|
-
title:
|
|
502
|
+
"aria-label": buttonTitle,
|
|
503
|
+
title: buttonTitle,
|
|
462
504
|
onClick: (event) => {
|
|
463
505
|
event.stopPropagation();
|
|
464
506
|
toggleCollapse(panelIndex, neighborIndex);
|
|
@@ -477,16 +519,20 @@ var CustomSplitter = ({
|
|
|
477
519
|
padding: 0,
|
|
478
520
|
fontSize: 10,
|
|
479
521
|
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)",
|
|
480
|
-
transition: "all 0.2s ease"
|
|
522
|
+
transition: "all 0.2s ease",
|
|
523
|
+
opacity,
|
|
524
|
+
pointerEvents
|
|
481
525
|
},
|
|
482
526
|
type: "button",
|
|
483
527
|
onMouseEnter: (e) => {
|
|
484
528
|
e.currentTarget.style.background = "#e5e7eb";
|
|
485
529
|
e.currentTarget.style.color = "#1f2937";
|
|
530
|
+
setHoveredCollapsePanelIndex(panelIndex);
|
|
486
531
|
},
|
|
487
532
|
onMouseLeave: (e) => {
|
|
488
533
|
e.currentTarget.style.background = "#fff";
|
|
489
534
|
e.currentTarget.style.color = "#595959";
|
|
535
|
+
setHoveredCollapsePanelIndex(null);
|
|
490
536
|
},
|
|
491
537
|
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, {})
|
|
492
538
|
}
|
|
@@ -510,7 +556,8 @@ var CustomSplitter = ({
|
|
|
510
556
|
minWidth: 0,
|
|
511
557
|
overflow: "hidden",
|
|
512
558
|
position: "relative",
|
|
513
|
-
|
|
559
|
+
boxShadow: hoveredCollapsePanelIndex === index ? "inset 0 0 0 2px #1677ff" : void 0,
|
|
560
|
+
transition: draggingIndex === null ? "box-shadow 0.2s ease, flex-basis 0.2s ease" : void 0,
|
|
514
561
|
...panel.props.style
|
|
515
562
|
},
|
|
516
563
|
children: !isHidden && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -586,14 +633,35 @@ var CustomSplitter = ({
|
|
|
586
633
|
alignItems: "center",
|
|
587
634
|
justifyContent: "center",
|
|
588
635
|
gap: 2,
|
|
589
|
-
opacity: hoveredIndex === index || draggingIndex === index ? 1 : 0,
|
|
590
|
-
pointerEvents: hoveredIndex === index || draggingIndex === index ? "auto" : "none",
|
|
591
|
-
transition: "opacity 0.15s ease",
|
|
592
636
|
zIndex: 5
|
|
593
637
|
},
|
|
594
638
|
children: [
|
|
595
|
-
|
|
596
|
-
|
|
639
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
640
|
+
"div",
|
|
641
|
+
{
|
|
642
|
+
style: {
|
|
643
|
+
alignItems: "center",
|
|
644
|
+
display: "flex",
|
|
645
|
+
justifyContent: "flex-end",
|
|
646
|
+
minHeight: resolvedOrientation === "horizontal" ? void 0 : 14,
|
|
647
|
+
minWidth: resolvedOrientation === "horizontal" ? 14 : void 0
|
|
648
|
+
},
|
|
649
|
+
children: renderCollapseButton(index, index, "start")
|
|
650
|
+
}
|
|
651
|
+
),
|
|
652
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
653
|
+
"div",
|
|
654
|
+
{
|
|
655
|
+
style: {
|
|
656
|
+
alignItems: "center",
|
|
657
|
+
display: "flex",
|
|
658
|
+
justifyContent: "flex-start",
|
|
659
|
+
minHeight: resolvedOrientation === "horizontal" ? void 0 : 14,
|
|
660
|
+
minWidth: resolvedOrientation === "horizontal" ? 14 : void 0
|
|
661
|
+
},
|
|
662
|
+
children: renderCollapseButton(index, index + 1, "end")
|
|
663
|
+
}
|
|
664
|
+
)
|
|
597
665
|
]
|
|
598
666
|
}
|
|
599
667
|
),
|
|
@@ -615,15 +683,21 @@ var CustomSplitter = ({
|
|
|
615
683
|
transform: resolvedOrientation === "horizontal" ? `translate(${isLeftOrTopCollapsed ? "4px" : "-4px"}, -50%)` : `translate(-50%, ${isLeftOrTopCollapsed ? "4px" : "-4px"})`
|
|
616
684
|
},
|
|
617
685
|
children: (() => {
|
|
618
|
-
const ExpandIcon = resolvedOrientation === "horizontal" ? isLeftOrTopCollapsed ? RightOutlined : LeftOutlined : isLeftOrTopCollapsed ? DownOutlined : UpOutlined;
|
|
619
686
|
const targetIndex = isLeftOrTopCollapsed ? index : index + 1;
|
|
687
|
+
const targetPanel = panels[targetIndex];
|
|
688
|
+
const config = getCollapsibleConfig(targetPanel == null ? void 0 : targetPanel.props.collapsible);
|
|
689
|
+
if (config.showCollapsibleIcon === false) {
|
|
690
|
+
return null;
|
|
691
|
+
}
|
|
692
|
+
const ExpandIcon = resolvedOrientation === "horizontal" ? isLeftOrTopCollapsed ? RightOutlined : LeftOutlined : isLeftOrTopCollapsed ? DownOutlined : UpOutlined;
|
|
620
693
|
const neighborIndex = isLeftOrTopCollapsed ? index + 1 : index;
|
|
621
694
|
const isHorizontal = resolvedOrientation === "horizontal";
|
|
695
|
+
const expandTitle = resolvedOrientation === "horizontal" ? isLeftOrTopCollapsed ? "\u5C55\u5F00\u5DE6\u4FA7\u9762\u677F" : "\u5C55\u5F00\u53F3\u4FA7\u9762\u677F" : isLeftOrTopCollapsed ? "\u5C55\u5F00\u4E0A\u65B9\u9762\u677F" : "\u5C55\u5F00\u4E0B\u65B9\u9762\u677F";
|
|
622
696
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
623
697
|
"button",
|
|
624
698
|
{
|
|
625
|
-
"aria-label":
|
|
626
|
-
title:
|
|
699
|
+
"aria-label": expandTitle,
|
|
700
|
+
title: expandTitle,
|
|
627
701
|
onClick: (event) => {
|
|
628
702
|
event.stopPropagation();
|
|
629
703
|
toggleCollapse(targetIndex, neighborIndex);
|
|
@@ -648,10 +722,12 @@ var CustomSplitter = ({
|
|
|
648
722
|
onMouseEnter: (e) => {
|
|
649
723
|
e.currentTarget.style.background = "#e5e7eb";
|
|
650
724
|
e.currentTarget.style.color = "#1f2937";
|
|
725
|
+
setHoveredCollapsePanelIndex(targetIndex);
|
|
651
726
|
},
|
|
652
727
|
onMouseLeave: (e) => {
|
|
653
728
|
e.currentTarget.style.background = "#f3f4f6";
|
|
654
729
|
e.currentTarget.style.color = "#595959";
|
|
730
|
+
setHoveredCollapsePanelIndex(null);
|
|
655
731
|
},
|
|
656
732
|
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ExpandIcon, {})
|
|
657
733
|
}
|
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 [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;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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EA,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\tSplitterCollapsible,\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 SplitterCollapsible =\n\t| boolean\n\t| {\n\t\t\tstart?: boolean;\n\t\t\tend?: boolean;\n\t\t\tshowCollapsibleIcon?: boolean | 'auto';\n\t };\n\nexport type SplitterPanelProps = {\n\tchildren?: ReactNode;\n\tcollapsible?: SplitterCollapsible;\n\tdefaultSize?: SplitterSize;\n\tmax?: SplitterSize;\n\tmin?: SplitterSize;\n\tresizable?: boolean;\n\tsize?: SplitterSize;\n\tstyle?: CSSProperties;\n};\n\nexport interface ResolvedCollapsible {\n\tstart: boolean;\n\tend: boolean;\n\tshowCollapsibleIcon: boolean | 'auto';\n}\n\nconst getCollapsibleConfig = (collapsible?: SplitterCollapsible): ResolvedCollapsible => {\n\tif (!collapsible) {\n\t\treturn { start: false, end: false, showCollapsibleIcon: 'auto' };\n\t}\n\tif (typeof collapsible === 'boolean') {\n\t\treturn {\n\t\t\tstart: collapsible,\n\t\t\tend: collapsible,\n\t\t\tshowCollapsibleIcon: collapsible ? true : 'auto',\n\t\t};\n\t}\n\treturn {\n\t\tstart: collapsible.start ?? false,\n\t\tend: collapsible.end ?? false,\n\t\tshowCollapsibleIcon: collapsible.showCollapsibleIcon ?? true,\n\t};\n};\n\nexport type SplitterProps = {\n\tchildren: ReactNode;\n\tclassName?: string;\n\tdraggerSize?: number;\n\tlazy?: boolean;\n\tonCollapse?: (collapsed: boolean[], sizes: number[]) => void;\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\tonCollapse,\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 [hoveredCollapsePanelIndex, setHoveredCollapsePanelIndex] = 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\tconst currentSizes = roundSizes(sizesRef.current);\n\t\t\tconst currentCollapsed = sizesRef.current.map((size) => size <= 1);\n\t\t\tconst startCollapsed = startSizes.map((size) => size <= 1);\n\t\t\tif (currentCollapsed.some((c, i) => c !== startCollapsed[i])) {\n\t\t\t\tonCollapse?.(currentCollapsed, currentSizes);\n\t\t\t}\n\t\t\tonResizeEnd?.(currentSizes);\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\tconst currentSizes = roundSizes(sizesRef.current);\n\t\tconst currentCollapsed = sizesRef.current.map((size) => size <= 1);\n\t\tonCollapse?.(currentCollapsed, currentSizes);\n\t\tonResizeEnd?.(currentSizes);\n\t};\n\n\tconst resetSizes = () => {\n\t\tconst previousCollapsed = sizesRef.current.map((size) => size <= 1);\n\t\tconst nextSizes = buildInitialSizes();\n\t\tupdateSizes(nextSizes);\n\t\tconst currentSizes = roundSizes(sizesRef.current);\n\t\tconst currentCollapsed = sizesRef.current.map((size) => size <= 1);\n\t\tif (currentCollapsed.some((c, i) => c !== previousCollapsed[i])) {\n\t\t\tonCollapse?.(currentCollapsed, currentSizes);\n\t\t}\n\t\tonResizeEnd?.(currentSizes);\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\tconst config = getCollapsibleConfig(panel?.props.collapsible);\n\t\tconst isAllowed = direction === 'start' ? config.start : config.end;\n\n\t\tif (!isAllowed || config.showCollapsibleIcon === false) {\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\t\tconst isAlwaysShow = config.showCollapsibleIcon === true;\n\t\tconst isHoveredOrDragging = hoveredIndex === draggerIndex || draggingIndex === draggerIndex;\n\t\tconst opacity = isAlwaysShow || isHoveredOrDragging ? 1 : 0;\n\t\tconst pointerEvents = isAlwaysShow || isHoveredOrDragging ? 'auto' : 'none';\n\n\t\tconst buttonTitle =\n\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t? direction === 'start'\n\t\t\t\t\t? '折叠左侧面板'\n\t\t\t\t\t: '折叠右侧面板'\n\t\t\t\t: direction === 'start'\n\t\t\t\t\t? '折叠上方面板'\n\t\t\t\t\t: '折叠下方面板';\n\n\t\treturn (\n\t\t\t<button\n\t\t\t\taria-label={buttonTitle}\n\t\t\t\ttitle={buttonTitle}\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\topacity,\n\t\t\t\t\tpointerEvents,\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\tsetHoveredCollapsePanelIndex(panelIndex);\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\tsetHoveredCollapsePanelIndex(null);\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\tboxShadow:\n\t\t\t\t\t\t\t\t\thoveredCollapsePanelIndex === index ? 'inset 0 0 0 2px #1677ff' : undefined,\n\t\t\t\t\t\t\t\ttransition:\n\t\t\t\t\t\t\t\t\tdraggingIndex === null\n\t\t\t\t\t\t\t\t\t\t? 'box-shadow 0.2s ease, flex-basis 0.2s ease'\n\t\t\t\t\t\t\t\t\t\t: 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\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<div\n\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\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\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\t\t\t\t\t\t\tminHeight: resolvedOrientation === 'horizontal' ? undefined : 14,\n\t\t\t\t\t\t\t\t\t\t\t\tminWidth: resolvedOrientation === 'horizontal' ? 14 : undefined,\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\t\t{renderCollapseButton(index, index, 'start')}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\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\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'flex-start',\n\t\t\t\t\t\t\t\t\t\t\t\tminHeight: resolvedOrientation === 'horizontal' ? undefined : 14,\n\t\t\t\t\t\t\t\t\t\t\t\tminWidth: resolvedOrientation === 'horizontal' ? 14 : undefined,\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\t\t{renderCollapseButton(index, index + 1, 'end')}\n\t\t\t\t\t\t\t\t\t\t</div>\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 targetIndex = isLeftOrTopCollapsed ? index : index + 1;\n\t\t\t\t\t\t\t\t\t\t\tconst targetPanel = panels[targetIndex];\n\t\t\t\t\t\t\t\t\t\t\tconst config = getCollapsibleConfig(targetPanel?.props.collapsible);\n\t\t\t\t\t\t\t\t\t\t\tif (config.showCollapsibleIcon === false) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t\t\t\t\t}\n\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 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\tconst expandTitle =\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? '展开左侧面板'\n\t\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\t: isLeftOrTopCollapsed\n\t\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\t\t: '展开下方面板';\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={expandTitle}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle={expandTitle}\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\tsetHoveredCollapsePanelIndex(targetIndex);\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\tsetHoveredCollapsePanelIndex(null);\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;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;AAAA,IACP,MAAK;AAAA,IACL,eAAY;AAAA,IACZ,OAAO,EAAE,GAAG,WAAW,GAAG,MAAM;AAAA,I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,OAAO;AAAA,wBACP,QAAQ;AAAA,wBACR,SAAS;AAAA,wBACT,QAAQ,eAAe,KAAK;AAAA,wBAC5B,OAAO,eAAe,KAAK;AAAA,wBAC3B,gBAAgB;AAAA,wBAChB,SAAS;AAAA,wBACT,UAAU;AAAA,wBACV,WAAW;AAAA,wBACX,YAAY;AAAA,sBACb;AAAA,sBACA,MAAK;AAAA,sBACL,cAAc,CAAC,MAAM;AACpB,0BAAE,cAAc,MAAM,aAAa;AACnC,0BAAE,cAAc,MAAM,QAAQ;AAC9B,qDAA6B,WAAW;AAAA,sBACzC;AAAA,sBACA,cAAc,CAAC,MAAM;AACpB,0BAAE,cAAc,MAAM,aAAa;AACnC,0BAAE,cAAc,MAAM,QAAQ;AAC9B,qDAA6B,IAAI;AAAA,sBAClC;AAAA,sBAEA,uDAAC,cAAW;AAAA;AAAA,kBACb;AAAA,gBAEF,GAAG;AAAA;AAAA,YACJ;AAAA;AAAA;AAAA,MAEF;AAAA,SAhOmB,KAkOrB;AAAA,EAEF,CAAC,GACF;AAEF;AAEA,eAAe,QAAQ;AAEvB,IAAO,mBAAQ;","names":["import_jsx_runtime","import_react","import_jsx_runtime","React"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -18,9 +18,14 @@ declare const CollapsibleBox: ({ children, title, direction, buttonPosition, def
|
|
|
18
18
|
|
|
19
19
|
type SplitterSize = number | `${number}%`;
|
|
20
20
|
type SplitterOrientation = 'horizontal' | 'vertical';
|
|
21
|
+
type SplitterCollapsible = boolean | {
|
|
22
|
+
start?: boolean;
|
|
23
|
+
end?: boolean;
|
|
24
|
+
showCollapsibleIcon?: boolean | 'auto';
|
|
25
|
+
};
|
|
21
26
|
type SplitterPanelProps = {
|
|
22
27
|
children?: ReactNode;
|
|
23
|
-
collapsible?:
|
|
28
|
+
collapsible?: SplitterCollapsible;
|
|
24
29
|
defaultSize?: SplitterSize;
|
|
25
30
|
max?: SplitterSize;
|
|
26
31
|
min?: SplitterSize;
|
|
@@ -33,6 +38,7 @@ type SplitterProps = {
|
|
|
33
38
|
className?: string;
|
|
34
39
|
draggerSize?: number;
|
|
35
40
|
lazy?: boolean;
|
|
41
|
+
onCollapse?: (collapsed: boolean[], sizes: number[]) => void;
|
|
36
42
|
onResize?: (sizes: number[]) => void;
|
|
37
43
|
onResizeEnd?: (sizes: number[]) => void;
|
|
38
44
|
onResizeStart?: (sizes: number[]) => void;
|
|
@@ -45,4 +51,4 @@ type SplitterComponent = React__default.FC<SplitterProps> & {
|
|
|
45
51
|
};
|
|
46
52
|
declare const CustomSplitter: SplitterComponent;
|
|
47
53
|
|
|
48
|
-
export { CollapsibleBox as CollapseBox, type CollapseBoxButtonPosition, type CollapseBoxDirection, type CollapseBoxProps, CustomSplitter as Splitter, type SplitterOrientation, type SplitterPanelProps, type SplitterProps, type SplitterSize };
|
|
54
|
+
export { CollapsibleBox as CollapseBox, type CollapseBoxButtonPosition, type CollapseBoxDirection, type CollapseBoxProps, CustomSplitter as Splitter, type SplitterCollapsible, type SplitterOrientation, type SplitterPanelProps, type SplitterProps, type SplitterSize };
|
package/dist/index.d.ts
CHANGED
|
@@ -18,9 +18,14 @@ declare const CollapsibleBox: ({ children, title, direction, buttonPosition, def
|
|
|
18
18
|
|
|
19
19
|
type SplitterSize = number | `${number}%`;
|
|
20
20
|
type SplitterOrientation = 'horizontal' | 'vertical';
|
|
21
|
+
type SplitterCollapsible = boolean | {
|
|
22
|
+
start?: boolean;
|
|
23
|
+
end?: boolean;
|
|
24
|
+
showCollapsibleIcon?: boolean | 'auto';
|
|
25
|
+
};
|
|
21
26
|
type SplitterPanelProps = {
|
|
22
27
|
children?: ReactNode;
|
|
23
|
-
collapsible?:
|
|
28
|
+
collapsible?: SplitterCollapsible;
|
|
24
29
|
defaultSize?: SplitterSize;
|
|
25
30
|
max?: SplitterSize;
|
|
26
31
|
min?: SplitterSize;
|
|
@@ -33,6 +38,7 @@ type SplitterProps = {
|
|
|
33
38
|
className?: string;
|
|
34
39
|
draggerSize?: number;
|
|
35
40
|
lazy?: boolean;
|
|
41
|
+
onCollapse?: (collapsed: boolean[], sizes: number[]) => void;
|
|
36
42
|
onResize?: (sizes: number[]) => void;
|
|
37
43
|
onResizeEnd?: (sizes: number[]) => void;
|
|
38
44
|
onResizeStart?: (sizes: number[]) => void;
|
|
@@ -45,4 +51,4 @@ type SplitterComponent = React__default.FC<SplitterProps> & {
|
|
|
45
51
|
};
|
|
46
52
|
declare const CustomSplitter: SplitterComponent;
|
|
47
53
|
|
|
48
|
-
export { CollapsibleBox as CollapseBox, type CollapseBoxButtonPosition, type CollapseBoxDirection, type CollapseBoxProps, CustomSplitter as Splitter, type SplitterOrientation, type SplitterPanelProps, type SplitterProps, type SplitterSize };
|
|
54
|
+
export { CollapsibleBox as CollapseBox, type CollapseBoxButtonPosition, type CollapseBoxDirection, type CollapseBoxProps, CustomSplitter as Splitter, type SplitterCollapsible, type SplitterOrientation, type SplitterPanelProps, type SplitterProps, type SplitterSize };
|
package/dist/index.js
CHANGED
|
@@ -179,6 +179,24 @@ var CollapseBox_default = CollapsibleBox;
|
|
|
179
179
|
// Splitter/index.tsx
|
|
180
180
|
import React, { useCallback, useEffect, useMemo, useRef, useState as useState2 } from "react";
|
|
181
181
|
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
182
|
+
var getCollapsibleConfig = (collapsible) => {
|
|
183
|
+
var _a, _b, _c;
|
|
184
|
+
if (!collapsible) {
|
|
185
|
+
return { start: false, end: false, showCollapsibleIcon: "auto" };
|
|
186
|
+
}
|
|
187
|
+
if (typeof collapsible === "boolean") {
|
|
188
|
+
return {
|
|
189
|
+
start: collapsible,
|
|
190
|
+
end: collapsible,
|
|
191
|
+
showCollapsibleIcon: collapsible ? true : "auto"
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
return {
|
|
195
|
+
start: (_a = collapsible.start) != null ? _a : false,
|
|
196
|
+
end: (_b = collapsible.end) != null ? _b : false,
|
|
197
|
+
showCollapsibleIcon: (_c = collapsible.showCollapsibleIcon) != null ? _c : true
|
|
198
|
+
};
|
|
199
|
+
};
|
|
182
200
|
var DEFAULT_DRAGGER_SIZE = 4;
|
|
183
201
|
var SplitterPanel = ({ children }) => /* @__PURE__ */ jsx3(Fragment, { children });
|
|
184
202
|
var isPercentSize = (value) => typeof value === "string" && value.endsWith("%");
|
|
@@ -202,6 +220,7 @@ var CustomSplitter = ({
|
|
|
202
220
|
onResize,
|
|
203
221
|
onResizeEnd,
|
|
204
222
|
onResizeStart,
|
|
223
|
+
onCollapse,
|
|
205
224
|
orientation,
|
|
206
225
|
style,
|
|
207
226
|
vertical = false
|
|
@@ -212,6 +231,7 @@ var CustomSplitter = ({
|
|
|
212
231
|
const [containerSize, setContainerSize] = useState2(0);
|
|
213
232
|
const [draggingIndex, setDraggingIndex] = useState2(null);
|
|
214
233
|
const [hoveredIndex, setHoveredIndex] = useState2(null);
|
|
234
|
+
const [hoveredCollapsePanelIndex, setHoveredCollapsePanelIndex] = useState2(null);
|
|
215
235
|
const [sizes, setSizes] = useState2([]);
|
|
216
236
|
const panels = useMemo(
|
|
217
237
|
() => React.Children.toArray(children).filter(
|
|
@@ -364,7 +384,13 @@ var CustomSplitter = ({
|
|
|
364
384
|
if (lazy) {
|
|
365
385
|
updateSizes(latestSizes, true);
|
|
366
386
|
}
|
|
367
|
-
|
|
387
|
+
const currentSizes = roundSizes(sizesRef.current);
|
|
388
|
+
const currentCollapsed = sizesRef.current.map((size) => size <= 1);
|
|
389
|
+
const startCollapsed = startSizes.map((size) => size <= 1);
|
|
390
|
+
if (currentCollapsed.some((c, i) => c !== startCollapsed[i])) {
|
|
391
|
+
onCollapse == null ? void 0 : onCollapse(currentCollapsed, currentSizes);
|
|
392
|
+
}
|
|
393
|
+
onResizeEnd == null ? void 0 : onResizeEnd(currentSizes);
|
|
368
394
|
};
|
|
369
395
|
document.addEventListener("pointermove", handlePointerMove);
|
|
370
396
|
document.addEventListener("pointerup", handlePointerUp);
|
|
@@ -383,12 +409,21 @@ var CustomSplitter = ({
|
|
|
383
409
|
nextSizes[neighborIndex] = Math.max(0, nextSizes[neighborIndex] - nextSizes[index]);
|
|
384
410
|
}
|
|
385
411
|
updateSizes(nextSizes);
|
|
386
|
-
|
|
412
|
+
const currentSizes = roundSizes(sizesRef.current);
|
|
413
|
+
const currentCollapsed = sizesRef.current.map((size) => size <= 1);
|
|
414
|
+
onCollapse == null ? void 0 : onCollapse(currentCollapsed, currentSizes);
|
|
415
|
+
onResizeEnd == null ? void 0 : onResizeEnd(currentSizes);
|
|
387
416
|
};
|
|
388
417
|
const resetSizes = () => {
|
|
418
|
+
const previousCollapsed = sizesRef.current.map((size) => size <= 1);
|
|
389
419
|
const nextSizes = buildInitialSizes();
|
|
390
420
|
updateSizes(nextSizes);
|
|
391
|
-
|
|
421
|
+
const currentSizes = roundSizes(sizesRef.current);
|
|
422
|
+
const currentCollapsed = sizesRef.current.map((size) => size <= 1);
|
|
423
|
+
if (currentCollapsed.some((c, i) => c !== previousCollapsed[i])) {
|
|
424
|
+
onCollapse == null ? void 0 : onCollapse(currentCollapsed, currentSizes);
|
|
425
|
+
}
|
|
426
|
+
onResizeEnd == null ? void 0 : onResizeEnd(currentSizes);
|
|
392
427
|
};
|
|
393
428
|
const rootStyle = {
|
|
394
429
|
border: "1px solid #f0f0f0",
|
|
@@ -406,7 +441,9 @@ var CustomSplitter = ({
|
|
|
406
441
|
const renderCollapseButton = (draggerIndex, panelIndex, direction) => {
|
|
407
442
|
var _a, _b;
|
|
408
443
|
const panel = panels[panelIndex];
|
|
409
|
-
|
|
444
|
+
const config = getCollapsibleConfig(panel == null ? void 0 : panel.props.collapsible);
|
|
445
|
+
const isAllowed = direction === "start" ? config.start : config.end;
|
|
446
|
+
if (!isAllowed || config.showCollapsibleIcon === false) {
|
|
410
447
|
return null;
|
|
411
448
|
}
|
|
412
449
|
const neighborIndex = direction === "start" ? panelIndex + 1 : panelIndex - 1;
|
|
@@ -417,11 +454,16 @@ var CustomSplitter = ({
|
|
|
417
454
|
}
|
|
418
455
|
const Icon = resolvedOrientation === "horizontal" ? direction === "start" ? LeftOutlined : RightOutlined : direction === "start" ? UpOutlined : DownOutlined;
|
|
419
456
|
const isHorizontal = resolvedOrientation === "horizontal";
|
|
457
|
+
const isAlwaysShow = config.showCollapsibleIcon === true;
|
|
458
|
+
const isHoveredOrDragging = hoveredIndex === draggerIndex || draggingIndex === draggerIndex;
|
|
459
|
+
const opacity = isAlwaysShow || isHoveredOrDragging ? 1 : 0;
|
|
460
|
+
const pointerEvents = isAlwaysShow || isHoveredOrDragging ? "auto" : "none";
|
|
461
|
+
const buttonTitle = resolvedOrientation === "horizontal" ? direction === "start" ? "\u6298\u53E0\u5DE6\u4FA7\u9762\u677F" : "\u6298\u53E0\u53F3\u4FA7\u9762\u677F" : direction === "start" ? "\u6298\u53E0\u4E0A\u65B9\u9762\u677F" : "\u6298\u53E0\u4E0B\u65B9\u9762\u677F";
|
|
420
462
|
return /* @__PURE__ */ jsx3(
|
|
421
463
|
"button",
|
|
422
464
|
{
|
|
423
|
-
"aria-label":
|
|
424
|
-
title:
|
|
465
|
+
"aria-label": buttonTitle,
|
|
466
|
+
title: buttonTitle,
|
|
425
467
|
onClick: (event) => {
|
|
426
468
|
event.stopPropagation();
|
|
427
469
|
toggleCollapse(panelIndex, neighborIndex);
|
|
@@ -440,16 +482,20 @@ var CustomSplitter = ({
|
|
|
440
482
|
padding: 0,
|
|
441
483
|
fontSize: 10,
|
|
442
484
|
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)",
|
|
443
|
-
transition: "all 0.2s ease"
|
|
485
|
+
transition: "all 0.2s ease",
|
|
486
|
+
opacity,
|
|
487
|
+
pointerEvents
|
|
444
488
|
},
|
|
445
489
|
type: "button",
|
|
446
490
|
onMouseEnter: (e) => {
|
|
447
491
|
e.currentTarget.style.background = "#e5e7eb";
|
|
448
492
|
e.currentTarget.style.color = "#1f2937";
|
|
493
|
+
setHoveredCollapsePanelIndex(panelIndex);
|
|
449
494
|
},
|
|
450
495
|
onMouseLeave: (e) => {
|
|
451
496
|
e.currentTarget.style.background = "#fff";
|
|
452
497
|
e.currentTarget.style.color = "#595959";
|
|
498
|
+
setHoveredCollapsePanelIndex(null);
|
|
453
499
|
},
|
|
454
500
|
children: /* @__PURE__ */ jsx3(Icon, {})
|
|
455
501
|
}
|
|
@@ -473,7 +519,8 @@ var CustomSplitter = ({
|
|
|
473
519
|
minWidth: 0,
|
|
474
520
|
overflow: "hidden",
|
|
475
521
|
position: "relative",
|
|
476
|
-
|
|
522
|
+
boxShadow: hoveredCollapsePanelIndex === index ? "inset 0 0 0 2px #1677ff" : void 0,
|
|
523
|
+
transition: draggingIndex === null ? "box-shadow 0.2s ease, flex-basis 0.2s ease" : void 0,
|
|
477
524
|
...panel.props.style
|
|
478
525
|
},
|
|
479
526
|
children: !isHidden && /* @__PURE__ */ jsx3(
|
|
@@ -549,14 +596,35 @@ var CustomSplitter = ({
|
|
|
549
596
|
alignItems: "center",
|
|
550
597
|
justifyContent: "center",
|
|
551
598
|
gap: 2,
|
|
552
|
-
opacity: hoveredIndex === index || draggingIndex === index ? 1 : 0,
|
|
553
|
-
pointerEvents: hoveredIndex === index || draggingIndex === index ? "auto" : "none",
|
|
554
|
-
transition: "opacity 0.15s ease",
|
|
555
599
|
zIndex: 5
|
|
556
600
|
},
|
|
557
601
|
children: [
|
|
558
|
-
|
|
559
|
-
|
|
602
|
+
/* @__PURE__ */ jsx3(
|
|
603
|
+
"div",
|
|
604
|
+
{
|
|
605
|
+
style: {
|
|
606
|
+
alignItems: "center",
|
|
607
|
+
display: "flex",
|
|
608
|
+
justifyContent: "flex-end",
|
|
609
|
+
minHeight: resolvedOrientation === "horizontal" ? void 0 : 14,
|
|
610
|
+
minWidth: resolvedOrientation === "horizontal" ? 14 : void 0
|
|
611
|
+
},
|
|
612
|
+
children: renderCollapseButton(index, index, "start")
|
|
613
|
+
}
|
|
614
|
+
),
|
|
615
|
+
/* @__PURE__ */ jsx3(
|
|
616
|
+
"div",
|
|
617
|
+
{
|
|
618
|
+
style: {
|
|
619
|
+
alignItems: "center",
|
|
620
|
+
display: "flex",
|
|
621
|
+
justifyContent: "flex-start",
|
|
622
|
+
minHeight: resolvedOrientation === "horizontal" ? void 0 : 14,
|
|
623
|
+
minWidth: resolvedOrientation === "horizontal" ? 14 : void 0
|
|
624
|
+
},
|
|
625
|
+
children: renderCollapseButton(index, index + 1, "end")
|
|
626
|
+
}
|
|
627
|
+
)
|
|
560
628
|
]
|
|
561
629
|
}
|
|
562
630
|
),
|
|
@@ -578,15 +646,21 @@ var CustomSplitter = ({
|
|
|
578
646
|
transform: resolvedOrientation === "horizontal" ? `translate(${isLeftOrTopCollapsed ? "4px" : "-4px"}, -50%)` : `translate(-50%, ${isLeftOrTopCollapsed ? "4px" : "-4px"})`
|
|
579
647
|
},
|
|
580
648
|
children: (() => {
|
|
581
|
-
const ExpandIcon = resolvedOrientation === "horizontal" ? isLeftOrTopCollapsed ? RightOutlined : LeftOutlined : isLeftOrTopCollapsed ? DownOutlined : UpOutlined;
|
|
582
649
|
const targetIndex = isLeftOrTopCollapsed ? index : index + 1;
|
|
650
|
+
const targetPanel = panels[targetIndex];
|
|
651
|
+
const config = getCollapsibleConfig(targetPanel == null ? void 0 : targetPanel.props.collapsible);
|
|
652
|
+
if (config.showCollapsibleIcon === false) {
|
|
653
|
+
return null;
|
|
654
|
+
}
|
|
655
|
+
const ExpandIcon = resolvedOrientation === "horizontal" ? isLeftOrTopCollapsed ? RightOutlined : LeftOutlined : isLeftOrTopCollapsed ? DownOutlined : UpOutlined;
|
|
583
656
|
const neighborIndex = isLeftOrTopCollapsed ? index + 1 : index;
|
|
584
657
|
const isHorizontal = resolvedOrientation === "horizontal";
|
|
658
|
+
const expandTitle = resolvedOrientation === "horizontal" ? isLeftOrTopCollapsed ? "\u5C55\u5F00\u5DE6\u4FA7\u9762\u677F" : "\u5C55\u5F00\u53F3\u4FA7\u9762\u677F" : isLeftOrTopCollapsed ? "\u5C55\u5F00\u4E0A\u65B9\u9762\u677F" : "\u5C55\u5F00\u4E0B\u65B9\u9762\u677F";
|
|
585
659
|
return /* @__PURE__ */ jsx3(
|
|
586
660
|
"button",
|
|
587
661
|
{
|
|
588
|
-
"aria-label":
|
|
589
|
-
title:
|
|
662
|
+
"aria-label": expandTitle,
|
|
663
|
+
title: expandTitle,
|
|
590
664
|
onClick: (event) => {
|
|
591
665
|
event.stopPropagation();
|
|
592
666
|
toggleCollapse(targetIndex, neighborIndex);
|
|
@@ -611,10 +685,12 @@ var CustomSplitter = ({
|
|
|
611
685
|
onMouseEnter: (e) => {
|
|
612
686
|
e.currentTarget.style.background = "#e5e7eb";
|
|
613
687
|
e.currentTarget.style.color = "#1f2937";
|
|
688
|
+
setHoveredCollapsePanelIndex(targetIndex);
|
|
614
689
|
},
|
|
615
690
|
onMouseLeave: (e) => {
|
|
616
691
|
e.currentTarget.style.background = "#f3f4f6";
|
|
617
692
|
e.currentTarget.style.color = "#595959";
|
|
693
|
+
setHoveredCollapsePanelIndex(null);
|
|
618
694
|
},
|
|
619
695
|
children: /* @__PURE__ */ jsx3(ExpandIcon, {})
|
|
620
696
|
}
|
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 [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,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,IAChC;AAAA,IAEA,8BAAC,UAAK,GAAE,0LAAyL;AAAA;AAClM;AAGM,IAAM,aAAa,CAAC,EAAE,OAAO,UAAU,MAC7C;AAAA,EAAC;AAAA;AAAA,IACA,SAAQ;AAAA,IACR,WAAU;AAAA,IACV,aAAU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A,sBACN,SAAS,CAAC,UAAU;AACnB,8BAAM,gBAAgB;AACtB,uCAAe,aAAa,aAAa;AAAA,sBAC1C;AAAA,sBACA,OAAO;AAAA,wBACN,YAAY;AAAA,wBACZ,YAAY;AAAA,wBACZ,QAAQ;AAAA,wBACR,cAAc;AAAA,wBACd,OAAO;AAAA,wBACP,QAAQ;AAAA,wBACR,SAAS;AAAA,wBACT,QAAQ,eAAe,KAAK;AAAA,wBAC5B,OAAO,eAAe,KAAK;AAAA,wBAC3B,gBAAgB;AAAA,wBAChB,SAAS;AAAA,wBACT,UAAU;AAAA,wBACV,WAAW;AAAA,wBACX,YAAY;AAAA,sBACb;AAAA,sBACA,MAAK;AAAA,sBACL,cAAc,CAAC,MAAM;AACpB,0BAAE,cAAc,MAAM,aAAa;AACnC,0BAAE,cAAc,MAAM,QAAQ;AAAA,sBAC/B;AAAA,sBACA,cAAc,CAAC,MAAM;AACpB,0BAAE,cAAc,MAAM,aAAa;AACnC,0BAAE,cAAc,MAAM,QAAQ;AAAA,sBAC/B;AAAA,sBAEA,0BAAAA,KAAC,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":["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 SplitterCollapsible =\n\t| boolean\n\t| {\n\t\t\tstart?: boolean;\n\t\t\tend?: boolean;\n\t\t\tshowCollapsibleIcon?: boolean | 'auto';\n\t };\n\nexport type SplitterPanelProps = {\n\tchildren?: ReactNode;\n\tcollapsible?: SplitterCollapsible;\n\tdefaultSize?: SplitterSize;\n\tmax?: SplitterSize;\n\tmin?: SplitterSize;\n\tresizable?: boolean;\n\tsize?: SplitterSize;\n\tstyle?: CSSProperties;\n};\n\nexport interface ResolvedCollapsible {\n\tstart: boolean;\n\tend: boolean;\n\tshowCollapsibleIcon: boolean | 'auto';\n}\n\nconst getCollapsibleConfig = (collapsible?: SplitterCollapsible): ResolvedCollapsible => {\n\tif (!collapsible) {\n\t\treturn { start: false, end: false, showCollapsibleIcon: 'auto' };\n\t}\n\tif (typeof collapsible === 'boolean') {\n\t\treturn {\n\t\t\tstart: collapsible,\n\t\t\tend: collapsible,\n\t\t\tshowCollapsibleIcon: collapsible ? true : 'auto',\n\t\t};\n\t}\n\treturn {\n\t\tstart: collapsible.start ?? false,\n\t\tend: collapsible.end ?? false,\n\t\tshowCollapsibleIcon: collapsible.showCollapsibleIcon ?? true,\n\t};\n};\n\nexport type SplitterProps = {\n\tchildren: ReactNode;\n\tclassName?: string;\n\tdraggerSize?: number;\n\tlazy?: boolean;\n\tonCollapse?: (collapsed: boolean[], sizes: number[]) => void;\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\tonCollapse,\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 [hoveredCollapsePanelIndex, setHoveredCollapsePanelIndex] = 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\tconst currentSizes = roundSizes(sizesRef.current);\n\t\t\tconst currentCollapsed = sizesRef.current.map((size) => size <= 1);\n\t\t\tconst startCollapsed = startSizes.map((size) => size <= 1);\n\t\t\tif (currentCollapsed.some((c, i) => c !== startCollapsed[i])) {\n\t\t\t\tonCollapse?.(currentCollapsed, currentSizes);\n\t\t\t}\n\t\t\tonResizeEnd?.(currentSizes);\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\tconst currentSizes = roundSizes(sizesRef.current);\n\t\tconst currentCollapsed = sizesRef.current.map((size) => size <= 1);\n\t\tonCollapse?.(currentCollapsed, currentSizes);\n\t\tonResizeEnd?.(currentSizes);\n\t};\n\n\tconst resetSizes = () => {\n\t\tconst previousCollapsed = sizesRef.current.map((size) => size <= 1);\n\t\tconst nextSizes = buildInitialSizes();\n\t\tupdateSizes(nextSizes);\n\t\tconst currentSizes = roundSizes(sizesRef.current);\n\t\tconst currentCollapsed = sizesRef.current.map((size) => size <= 1);\n\t\tif (currentCollapsed.some((c, i) => c !== previousCollapsed[i])) {\n\t\t\tonCollapse?.(currentCollapsed, currentSizes);\n\t\t}\n\t\tonResizeEnd?.(currentSizes);\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\tconst config = getCollapsibleConfig(panel?.props.collapsible);\n\t\tconst isAllowed = direction === 'start' ? config.start : config.end;\n\n\t\tif (!isAllowed || config.showCollapsibleIcon === false) {\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\t\tconst isAlwaysShow = config.showCollapsibleIcon === true;\n\t\tconst isHoveredOrDragging = hoveredIndex === draggerIndex || draggingIndex === draggerIndex;\n\t\tconst opacity = isAlwaysShow || isHoveredOrDragging ? 1 : 0;\n\t\tconst pointerEvents = isAlwaysShow || isHoveredOrDragging ? 'auto' : 'none';\n\n\t\tconst buttonTitle =\n\t\t\tresolvedOrientation === 'horizontal'\n\t\t\t\t? direction === 'start'\n\t\t\t\t\t? '折叠左侧面板'\n\t\t\t\t\t: '折叠右侧面板'\n\t\t\t\t: direction === 'start'\n\t\t\t\t\t? '折叠上方面板'\n\t\t\t\t\t: '折叠下方面板';\n\n\t\treturn (\n\t\t\t<button\n\t\t\t\taria-label={buttonTitle}\n\t\t\t\ttitle={buttonTitle}\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\topacity,\n\t\t\t\t\tpointerEvents,\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\tsetHoveredCollapsePanelIndex(panelIndex);\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\tsetHoveredCollapsePanelIndex(null);\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\tboxShadow:\n\t\t\t\t\t\t\t\t\thoveredCollapsePanelIndex === index ? 'inset 0 0 0 2px #1677ff' : undefined,\n\t\t\t\t\t\t\t\ttransition:\n\t\t\t\t\t\t\t\t\tdraggingIndex === null\n\t\t\t\t\t\t\t\t\t\t? 'box-shadow 0.2s ease, flex-basis 0.2s ease'\n\t\t\t\t\t\t\t\t\t\t: 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\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<div\n\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\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\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\t\t\t\t\t\t\tminHeight: resolvedOrientation === 'horizontal' ? undefined : 14,\n\t\t\t\t\t\t\t\t\t\t\t\tminWidth: resolvedOrientation === 'horizontal' ? 14 : undefined,\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\t\t{renderCollapseButton(index, index, 'start')}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\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\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\t\t\tjustifyContent: 'flex-start',\n\t\t\t\t\t\t\t\t\t\t\t\tminHeight: resolvedOrientation === 'horizontal' ? undefined : 14,\n\t\t\t\t\t\t\t\t\t\t\t\tminWidth: resolvedOrientation === 'horizontal' ? 14 : undefined,\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\t\t{renderCollapseButton(index, index + 1, 'end')}\n\t\t\t\t\t\t\t\t\t\t</div>\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 targetIndex = isLeftOrTopCollapsed ? index : index + 1;\n\t\t\t\t\t\t\t\t\t\t\tconst targetPanel = panels[targetIndex];\n\t\t\t\t\t\t\t\t\t\t\tconst config = getCollapsibleConfig(targetPanel?.props.collapsible);\n\t\t\t\t\t\t\t\t\t\t\tif (config.showCollapsibleIcon === false) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t\t\t\t\t}\n\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 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\tconst expandTitle =\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? '展开左侧面板'\n\t\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\t: isLeftOrTopCollapsed\n\t\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\t\t: '展开下方面板';\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={expandTitle}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle={expandTitle}\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\tsetHoveredCollapsePanelIndex(targetIndex);\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\tsetHoveredCollapsePanelIndex(null);\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\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