@byeolnaerim/flex-layout 0.0.4 → 0.0.6

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.
Files changed (82) hide show
  1. package/README.en.md +314 -0
  2. package/README.ko.md +312 -0
  3. package/README.md +314 -0
  4. package/dist/components.cjs +651 -657
  5. package/dist/components.cjs.map +1 -1
  6. package/dist/components.js +3027 -5
  7. package/dist/components.js.map +1 -1
  8. package/dist/flex-layout/components/FlexLayout.d.ts +2 -0
  9. package/dist/flex-layout/components/FlexLayoutContainer.d.ts +2 -0
  10. package/dist/flex-layout/components/FlexLayoutResizePanel.d.ts +2 -0
  11. package/dist/flex-layout/components/FlexLayoutSplitScreen.d.ts +11 -0
  12. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBox.d.ts +27 -0
  13. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.d.ts +5 -0
  14. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.d.ts +8 -0
  15. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.d.ts +3 -0
  16. package/dist/flex-layout/components/FlexLayoutSplitScreenScrollBox.d.ts +9 -0
  17. package/dist/flex-layout/components/FlexLayoutStickyBox.d.ts +29 -0
  18. package/dist/flex-layout/components/index.d.ts +7 -0
  19. package/dist/flex-layout/hooks/index.d.ts +2 -0
  20. package/dist/{useDrag-DR01Ob3s.d.ts → flex-layout/hooks/useDrag.d.ts} +19 -22
  21. package/dist/flex-layout/hooks/useFlexLayoutSplitScreen.d.ts +28 -0
  22. package/dist/{hooks.d.ts → flex-layout/hooks/useListPaging.d.ts} +6 -12
  23. package/dist/flex-layout/hooks/useSizes.d.ts +8 -0
  24. package/dist/flex-layout/index.d.ts +5 -0
  25. package/dist/flex-layout/providers/FlexLayoutContext.d.ts +8 -0
  26. package/dist/flex-layout/providers/FlexLayoutHooks.d.ts +51 -0
  27. package/dist/flex-layout/providers/index.d.ts +1 -0
  28. package/dist/flex-layout/store/FlexLayoutContainerStore.d.ts +62 -0
  29. package/dist/flex-layout/store/index.d.ts +1 -0
  30. package/dist/flex-layout/styles/FlexLayout.module.css +416 -0
  31. package/dist/flex-layout/styles/listScroll.module.css +85 -0
  32. package/dist/flex-layout/styles/shake.module.css +41 -0
  33. package/dist/flex-layout/types/FlexDirectionTypes.d.ts +6 -0
  34. package/dist/flex-layout/types/FlexLayoutTypes.d.ts +53 -0
  35. package/dist/flex-layout/utils/FlexLayoutUtils.d.ts +26 -0
  36. package/dist/flex-layout/utils/index.d.ts +1 -0
  37. package/dist/hooks.cjs.map +1 -1
  38. package/dist/hooks.js +407 -3
  39. package/dist/hooks.js.map +1 -1
  40. package/dist/index.cjs +681 -687
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.ts +1 -10
  43. package/dist/index.js +3396 -9
  44. package/dist/index.js.map +1 -1
  45. package/dist/providers.js +400 -4
  46. package/dist/providers.js.map +1 -1
  47. package/dist/store.js +180 -2
  48. package/dist/store.js.map +1 -1
  49. package/dist/utils.js +195 -2
  50. package/dist/utils.js.map +1 -1
  51. package/package.json +18 -45
  52. package/dist/FlexLayoutSplitScreenDragBox-eCtq4kLd.d.cts +0 -31
  53. package/dist/FlexLayoutSplitScreenDragBox-eCtq4kLd.d.ts +0 -31
  54. package/dist/chunk-3EDKZTM3.js +0 -3
  55. package/dist/chunk-3EDKZTM3.js.map +0 -1
  56. package/dist/chunk-5HWEFTNQ.js +0 -176
  57. package/dist/chunk-5HWEFTNQ.js.map +0 -1
  58. package/dist/chunk-7J5JUVZK.js +0 -3
  59. package/dist/chunk-7J5JUVZK.js.map +0 -1
  60. package/dist/chunk-CFQQ6ZDC.js +0 -182
  61. package/dist/chunk-CFQQ6ZDC.js.map +0 -1
  62. package/dist/chunk-JM3CZ5DU.js +0 -238
  63. package/dist/chunk-JM3CZ5DU.js.map +0 -1
  64. package/dist/chunk-PMTZFSP4.js +0 -219
  65. package/dist/chunk-PMTZFSP4.js.map +0 -1
  66. package/dist/chunk-UYI4Z27V.js +0 -2432
  67. package/dist/chunk-UYI4Z27V.js.map +0 -1
  68. package/dist/chunk-W4CNFJTK.js +0 -197
  69. package/dist/chunk-W4CNFJTK.js.map +0 -1
  70. package/dist/chunk-YIHCWXKY.js +0 -3
  71. package/dist/chunk-YIHCWXKY.js.map +0 -1
  72. package/dist/components.d.cts +0 -122
  73. package/dist/components.d.ts +0 -122
  74. package/dist/hooks.d.cts +0 -37
  75. package/dist/index.d.cts +0 -10
  76. package/dist/providers.d.cts +0 -54
  77. package/dist/providers.d.ts +0 -54
  78. package/dist/store.d.cts +0 -67
  79. package/dist/store.d.ts +0 -67
  80. package/dist/useDrag-CYQnhUFk.d.cts +0 -108
  81. package/dist/utils.d.cts +0 -28
  82. package/dist/utils.d.ts +0 -28
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var react = require('react');
3
+ var React2 = require('react');
4
4
  var equal = require('fast-deep-equal');
5
5
  var rxjs = require('rxjs');
6
6
  var operators = require('rxjs/operators');
7
- var jsxRuntime = require('react/jsx-runtime');
8
7
 
9
8
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
9
 
10
+ var React2__default = /*#__PURE__*/_interopDefault(React2);
11
11
  var equal__default = /*#__PURE__*/_interopDefault(equal);
12
12
 
13
13
  // src/flex-layout/components/FlexLayout.tsx
@@ -340,9 +340,9 @@ var ContainerOpenCloseProvider = ({
340
340
  if (!containerSpreadSubjectMap[containerName]) {
341
341
  containerSpreadSubjectMap[containerName] = new rxjs.Subject();
342
342
  }
343
- const [containers, setContainers] = react.useState([]);
344
- const [container, setContainer] = react.useState();
345
- react.useEffect(() => {
343
+ const [containers, setContainers] = React2.useState([]);
344
+ const [container, setContainer] = React2.useState();
345
+ React2.useEffect(() => {
346
346
  const subscription = getLayoutInfos(layoutName).subscribe(
347
347
  (layout) => {
348
348
  if (!layout || !layout.container[containerName] || !layout.container[containerName].current)
@@ -357,7 +357,7 @@ var ContainerOpenCloseProvider = ({
357
357
  );
358
358
  return () => subscription.unsubscribe();
359
359
  }, [containerName, layoutName]);
360
- react.useEffect(() => {
360
+ React2.useEffect(() => {
361
361
  const styleName = `${sizeName.charAt(0).toUpperCase() + sizeName.substring(1)}`;
362
362
  const clientSize = "client" + styleName;
363
363
  const outerSize = "outer" + styleName;
@@ -430,9 +430,9 @@ var ContainerOpenCloseProvider = ({
430
430
 
431
431
  // src/flex-layout/styles/FlexLayout.module.css
432
432
  var FlexLayout_default = {};
433
- var FlexLayoutContext = react.createContext(null);
433
+ var FlexLayoutContext = React2.createContext(null);
434
434
  function useFlexLayoutContext() {
435
- const context = react.useContext(FlexLayoutContext);
435
+ const context = React2.useContext(FlexLayoutContext);
436
436
  if (!context) {
437
437
  throw new Error(
438
438
  "useFlexLayoutContext must be used within FlexLayoutContext.Provider"
@@ -444,9 +444,11 @@ function FlexLayoutProvider({
444
444
  value,
445
445
  children
446
446
  }) {
447
- return /* @__PURE__ */ jsxRuntime.jsx(FlexLayoutContext.Provider, { value, children });
447
+ return /* @__PURE__ */ React.createElement(FlexLayoutContext.Provider, { value }, children);
448
448
  }
449
- var FlexLayout = ({
449
+
450
+ // src/flex-layout/components/FlexLayout.tsx
451
+ function FlexLayout({
450
452
  layoutName,
451
453
  direction,
452
454
  children,
@@ -455,20 +457,20 @@ var FlexLayout = ({
455
457
  panelClassName,
456
458
  panelMovementMode = "divorce",
457
459
  ...props
458
- }) => {
459
- const containerCount = react.Children.count(children);
460
+ }) {
461
+ const containerCount = React2.Children.count(children);
460
462
  const fitContent = direction === "row" ? "width" : "height";
461
- const isFragmentElement = (node) => react.isValidElement(node) && node.type === react.Fragment;
462
- const nodes = react.Children.toArray(children).flatMap(
463
- (node) => isFragmentElement(node) ? react.Children.toArray(node.props.children) : [node]
463
+ const isFragmentElement = (node) => React2.isValidElement(node) && node.type === React2.Fragment;
464
+ const nodes = React2.Children.toArray(children).flatMap(
465
+ (node) => isFragmentElement(node) ? React2.Children.toArray(node.props.children) : [node]
464
466
  );
465
467
  const flattenedChildren = nodes.filter(
466
- react.isValidElement
468
+ React2.isValidElement
467
469
  );
468
470
  if (flattenedChildren.length === 0) {
469
471
  return null;
470
472
  }
471
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
473
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
472
474
  FlexLayoutProvider,
473
475
  {
474
476
  value: {
@@ -478,39 +480,35 @@ var FlexLayout = ({
478
480
  panelClassName,
479
481
  containerCount,
480
482
  fitContent
483
+ }
484
+ },
485
+ /* @__PURE__ */ React.createElement(
486
+ "div",
487
+ {
488
+ className: `${FlexLayout_default["flex-layout"]} ${className && className !== "" ? className : ""}`,
489
+ ...ref ? { ref } : {},
490
+ ...props,
491
+ "data-layout_name": layoutName,
492
+ "data-direction": direction
481
493
  },
482
- children: /* @__PURE__ */ jsxRuntime.jsx(
483
- "div",
484
- {
485
- className: `${FlexLayout_default["flex-layout"]} ${className && className !== "" ? className : ""}`,
486
- ...ref ? { ref } : {},
487
- ...props,
488
- "data-layout_name": layoutName,
489
- "data-direction": direction,
490
- children: flattenedChildren.map((child, index) => {
491
- if (!child || !react.isValidElement(child)) return null;
492
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
493
- child,
494
- /* @__PURE__ */ jsxRuntime.jsx(
495
- ContainerOpenCloseProvider,
496
- {
497
- layoutName,
498
- containerName: child.props.containerName,
499
- sizeName: fitContent
500
- }
501
- )
502
- ] }, index);
503
- })
504
- }
505
- )
506
- }
507
- ) });
508
- };
509
- var FlexLayout_default2 = FlexLayout;
494
+ flattenedChildren.map((child, index) => {
495
+ if (!child || !React2.isValidElement(child)) return null;
496
+ return /* @__PURE__ */ React.createElement(React2.Fragment, { key: index }, child, /* @__PURE__ */ React.createElement(
497
+ ContainerOpenCloseProvider,
498
+ {
499
+ layoutName,
500
+ containerName: child.props.containerName,
501
+ sizeName: fitContent
502
+ }
503
+ ));
504
+ })
505
+ )
506
+ ));
507
+ }
510
508
  var useSize = (sizeName) => {
511
- const ref = react.useRef(null);
512
- const [size, setSize] = react.useState(void 0);
513
- react.useLayoutEffect(() => {
509
+ const ref = React2.useRef(null);
510
+ const [size, setSize] = React2.useState(void 0);
511
+ React2.useLayoutEffect(() => {
514
512
  if (!ref.current) return;
515
513
  const handleResize = () => {
516
514
  if (ref.current) {
@@ -547,7 +545,7 @@ var flexDirectionModel = {
547
545
  resizeCursor: "ns-resize"
548
546
  }
549
547
  };
550
- var FlexLayoutResizePanel = ({
548
+ function FlexLayoutResizePanel({
551
549
  direction,
552
550
  containerCount,
553
551
  panelMode = "default",
@@ -555,21 +553,21 @@ var FlexLayoutResizePanel = ({
555
553
  layoutName,
556
554
  panelClassName,
557
555
  panelMovementMode
558
- }) => {
559
- let isResizePanelClickRef = react.useRef(false);
556
+ }) {
557
+ let isResizePanelClickRef = React2.useRef(false);
560
558
  let prevTouchEvent = null;
561
- let parentSizeRef = react.useRef(0);
562
- let totalMovementRef = react.useRef(0);
563
- const containerCountRef = react.useRef(containerCount);
564
- react.useEffect(() => {
559
+ let parentSizeRef = React2.useRef(0);
560
+ let totalMovementRef = React2.useRef(0);
561
+ const containerCountRef = React2.useRef(containerCount);
562
+ React2.useEffect(() => {
565
563
  return () => {
566
564
  document.body.style.cursor = "";
567
565
  };
568
566
  }, []);
569
- react.useEffect(() => {
567
+ React2.useEffect(() => {
570
568
  containerCountRef.current = containerCount;
571
569
  }, [containerCount]);
572
- const panelRef = react.useRef(null);
570
+ const panelRef = React2.useRef(null);
573
571
  const panelMouseDownEvent = (event) => {
574
572
  if (!panelRef.current || !panelRef.current.parentElement) return;
575
573
  isResizePanelClickRef.current = true;
@@ -634,10 +632,12 @@ var FlexLayoutResizePanel = ({
634
632
  }
635
633
  const targetFlexGrow = targetSize / (parentSizeRef.current - 1) * containerCountRef.current;
636
634
  const nextElementFlexGrow = nextElementSize / (parentSizeRef.current - 1) * containerCountRef.current;
635
+ if (!(targetElement instanceof HTMLElement)) return;
636
+ if (!(nextElement instanceof HTMLElement)) return;
637
637
  targetElement.style.flex = `${targetFlexGrow} 1 0%`;
638
638
  nextElement.style.flex = `${nextElementFlexGrow} 1 0%`;
639
639
  }
640
- react.useEffect(() => {
640
+ React2.useEffect(() => {
641
641
  const addGlobalMoveEvent = (event) => {
642
642
  if (!isResizePanelClickRef.current || !panelRef.current) {
643
643
  return;
@@ -678,24 +678,25 @@ var FlexLayoutResizePanel = ({
678
678
  });
679
679
  };
680
680
  }, []);
681
- react.useEffect(() => {
681
+ React2.useEffect(() => {
682
682
  if (!panelRef.current) return;
683
683
  setResizePanelRef(layoutName, containerName, panelRef);
684
684
  }, [containerName, layoutName]);
685
- return /* @__PURE__ */ jsxRuntime.jsx(
685
+ return /* @__PURE__ */ React.createElement(
686
686
  "div",
687
687
  {
688
688
  id: containerName + "_resize_panel",
689
689
  className: `${FlexLayout_default["flex-resize-panel"]} ${FlexLayout_default[panelMode]} ${panelClassName && panelClassName !== "" ? panelClassName : ""}`,
690
690
  ref: panelRef,
691
691
  onMouseDown: panelMouseDownEvent,
692
- onTouchStart: panelMouseDownEvent,
693
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: FlexLayout_default.hover })
694
- }
692
+ onTouchStart: panelMouseDownEvent
693
+ },
694
+ /* @__PURE__ */ React.createElement("div", { className: FlexLayout_default.hover })
695
695
  );
696
- };
697
- var FlexLayoutResizePanel_default = FlexLayoutResizePanel;
698
- var FlexLayoutContainer = ({
696
+ }
697
+
698
+ // src/flex-layout/components/FlexLayoutContainer.tsx
699
+ function FlexLayoutContainer({
699
700
  isFitContent,
700
701
  isFitResize,
701
702
  // fitContent,
@@ -709,7 +710,7 @@ var FlexLayoutContainer = ({
709
710
  children,
710
711
  className,
711
712
  panelMode
712
- }) => {
713
+ }) {
713
714
  const {
714
715
  direction,
715
716
  panelMovementMode,
@@ -723,8 +724,8 @@ var FlexLayoutContainer = ({
723
724
  //?
724
725
  useSize(fitContent)
725
726
  );
726
- const flexContainerNodeRef = react.useRef(null);
727
- const flexContainerRef = react.useCallback(
727
+ const flexContainerNodeRef = React2.useRef(null);
728
+ const flexContainerRef = React2.useCallback(
728
729
  (node) => {
729
730
  flexContainerNodeRef.current = node;
730
731
  if (node !== null) {
@@ -733,15 +734,15 @@ var FlexLayoutContainer = ({
733
734
  },
734
735
  [layoutName, containerName]
735
736
  );
736
- const [growState, setGrowState] = react.useState(initialGrow);
737
- react.useEffect(() => {
737
+ const [growState, setGrowState] = React2.useState(initialGrow);
738
+ React2.useEffect(() => {
738
739
  setGrowState(initialGrow);
739
740
  }, [initialGrow]);
740
- const [prevGrowState, setPrevGrowState] = react.useState(
741
+ const [prevGrowState, setPrevGrowState] = React2.useState(
741
742
  initialPrevGrow
742
743
  );
743
- const [isFirstLoad, setIsFirstLoad] = react.useState(true);
744
- react.useEffect(() => {
744
+ const [isFirstLoad, setIsFirstLoad] = React2.useState(true);
745
+ React2.useEffect(() => {
745
746
  if (!flexContainerNodeRef.current) return;
746
747
  setContainerRef(layoutName, containerName, flexContainerNodeRef);
747
748
  return () => {
@@ -750,7 +751,7 @@ var FlexLayoutContainer = ({
750
751
  });
751
752
  };
752
753
  }, [containerName, layoutName]);
753
- react.useEffect(() => {
754
+ React2.useEffect(() => {
754
755
  if (typeof window == "undefined" || flexContainerNodeRef.current === null)
755
756
  return;
756
757
  const storedGrow = sessionStorage.getItem(containerName);
@@ -762,7 +763,7 @@ var FlexLayoutContainer = ({
762
763
  }
763
764
  }
764
765
  }, [containerName]);
765
- react.useEffect(() => {
766
+ React2.useEffect(() => {
766
767
  if (!flexContainerNodeRef.current) return;
767
768
  const targetNode = flexContainerNodeRef.current;
768
769
  const observer = new MutationObserver((mutations) => {
@@ -785,7 +786,7 @@ var FlexLayoutContainer = ({
785
786
  observer.disconnect();
786
787
  };
787
788
  }, [containerName]);
788
- react.useEffect(() => {
789
+ React2.useEffect(() => {
789
790
  if (!flexContainerNodeRef.current || !ref || !ref.current || !size || !fitContent)
790
791
  return;
791
792
  requestAnimationFrame(() => {
@@ -806,7 +807,7 @@ var FlexLayoutContainer = ({
806
807
  }
807
808
  });
808
809
  }, [size, containerCount, isFitResize, children]);
809
- react.useEffect(() => {
810
+ React2.useEffect(() => {
810
811
  if (!flexContainerNodeRef.current) return;
811
812
  let notGrowList = [];
812
813
  let containerList = [
@@ -832,55 +833,51 @@ var FlexLayoutContainer = ({
832
833
  });
833
834
  }
834
835
  }, []);
835
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
836
- /* @__PURE__ */ jsxRuntime.jsx(
836
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
837
+ "div",
838
+ {
839
+ id: containerName,
840
+ "data-container_name": containerName,
841
+ ref: flexContainerRef,
842
+ className: `${FlexLayout_default["flex-container"]} ${className && className !== "" ? className : ""}`,
843
+ ...growState !== void 0 ? { ["data-grow"]: growState } : {},
844
+ ...prevGrowState != void 0 ? { ["data-prev_grow"]: prevGrowState } : {},
845
+ "data-is_resize": isInitialResizable,
846
+ "data-is_resize_panel": isResizePanel,
847
+ style: growState !== void 0 && {
848
+ flex: `${growState} 1 0%`
849
+ } || {}
850
+ },
851
+ isFitContent && /* @__PURE__ */ React.createElement(
837
852
  "div",
838
853
  {
839
- id: containerName,
840
- "data-container_name": containerName,
841
- ref: flexContainerRef,
842
- className: `${FlexLayout_default["flex-container"]} ${className && className !== "" ? className : ""}`,
843
- ...growState !== void 0 ? { ["data-grow"]: growState } : {},
844
- ...prevGrowState != void 0 ? { ["data-prev_grow"]: prevGrowState } : {},
845
- "data-is_resize": isInitialResizable,
846
- "data-is_resize_panel": isResizePanel,
847
- style: growState !== void 0 && {
848
- flex: `${growState} 1 0%`
849
- } || {},
850
- children: isFitContent && /* @__PURE__ */ jsxRuntime.jsx(
851
- "div",
852
- {
853
- className: `${FlexLayout_default["flex-content-fit-wrapper"]}`,
854
- ref,
855
- children
856
- }
857
- ) || children
858
- }
859
- ),
860
- isResizePanel && /* @__PURE__ */ jsxRuntime.jsx(
861
- FlexLayoutResizePanel_default,
862
- {
863
- containerName,
864
- layoutName,
865
- direction,
866
- containerCount,
867
- panelMode,
868
- panelClassName,
869
- panelMovementMode
870
- }
871
- )
872
- ] });
873
- };
874
- var FlexLayoutContainer_default = FlexLayoutContainer;
854
+ className: `${FlexLayout_default["flex-content-fit-wrapper"]}`,
855
+ ref
856
+ },
857
+ children
858
+ ) || children
859
+ ), isResizePanel && /* @__PURE__ */ React.createElement(
860
+ FlexLayoutResizePanel,
861
+ {
862
+ containerName,
863
+ layoutName,
864
+ direction,
865
+ containerCount,
866
+ panelMode,
867
+ panelClassName,
868
+ panelMovementMode
869
+ }
870
+ ));
871
+ }
875
872
  var dragState = new rxjs.Subject();
876
873
  var filterChildren = (obj) => {
877
874
  const { children, ...rest } = obj || {};
878
875
  return rest;
879
876
  };
880
877
  var useDragCapture = (targetRef) => {
881
- const stateRef = react.useRef(null);
882
- const forceUpdate = react.useRef(0);
883
- react.useEffect(() => {
878
+ const stateRef = React2.useRef(null);
879
+ const forceUpdate = React2.useRef(0);
880
+ React2.useEffect(() => {
884
881
  const subscription = dragState.pipe(
885
882
  rxjs.map((value) => {
886
883
  if (!targetRef || !targetRef.current) return null;
@@ -935,8 +932,8 @@ var useDragCapture = (targetRef) => {
935
932
  });
936
933
  return () => subscription.unsubscribe();
937
934
  }, [targetRef]);
938
- const [, rerender] = react.useState({});
939
- react.useEffect(() => {
935
+ const [, rerender] = React2.useState({});
936
+ React2.useEffect(() => {
940
937
  const interval = setInterval(() => {
941
938
  rerender({});
942
939
  }, 50);
@@ -949,15 +946,15 @@ var allSplitScreenCount = new rxjs.BehaviorSubject(0);
949
946
  var useDragEvents = ({
950
947
  isBlockingActiveInput = false
951
948
  }) => {
952
- const dragResumeTimer = react.useRef(null);
949
+ const dragResumeTimer = React2.useRef(null);
953
950
  const scrollThreshold = 10;
954
- const isScrolling = react.useRef(false);
955
- const isPending = react.useRef(false);
956
- const isMouseDown = react.useRef(false);
957
- const isDragging = react.useRef(false);
958
- const touchStartX = react.useRef(0);
959
- const touchStartY = react.useRef(0);
960
- const handleStart = react.useCallback(
951
+ const isScrolling = React2.useRef(false);
952
+ const isPending = React2.useRef(false);
953
+ const isMouseDown = React2.useRef(false);
954
+ const isDragging = React2.useRef(false);
955
+ const touchStartX = React2.useRef(0);
956
+ const touchStartY = React2.useRef(0);
957
+ const handleStart = React2.useCallback(
961
958
  ({
962
959
  event: _event,
963
960
  dragStartCallback
@@ -995,7 +992,7 @@ var useDragEvents = ({
995
992
  },
996
993
  [isBlockingActiveInput]
997
994
  );
998
- const handleMove = react.useCallback(
995
+ const handleMove = React2.useCallback(
999
996
  ({
1000
997
  event: _event,
1001
998
  notDragCallback,
@@ -1034,7 +1031,7 @@ var useDragEvents = ({
1034
1031
  },
1035
1032
  [isBlockingActiveInput]
1036
1033
  );
1037
- const handleEnd = react.useCallback(
1034
+ const handleEnd = React2.useCallback(
1038
1035
  ({
1039
1036
  event: _event,
1040
1037
  dragEndCallback
@@ -1070,17 +1067,17 @@ function useFlexLayoutSplitScreen({
1070
1067
  parentLayoutName,
1071
1068
  layoutName
1072
1069
  }) {
1073
- const [direction, setDirection] = react.useState(
1070
+ const [direction, setDirection] = React2.useState(
1074
1071
  directionInitial
1075
1072
  );
1076
- const [isSplit, setIsSplit] = react.useState(isSplitInitial);
1077
- const [boundaryContainerSize, setBoundaryContainerSize] = react.useState(null);
1078
- const [centerDropTargetComponent, setCenterDropTargetComponent] = react.useState([]);
1079
- const [afterDropTargetComponent, setAfterDropTargetComponent] = react.useState([]);
1080
- const [beforeDropTargetComponent, setBeforeDropTargetComponent] = react.useState([]);
1081
- const layoutRef = react.useRef(null);
1073
+ const [isSplit, setIsSplit] = React2.useState(isSplitInitial);
1074
+ const [boundaryContainerSize, setBoundaryContainerSize] = React2.useState(null);
1075
+ const [centerDropTargetComponent, setCenterDropTargetComponent] = React2.useState([]);
1076
+ const [afterDropTargetComponent, setAfterDropTargetComponent] = React2.useState([]);
1077
+ const [beforeDropTargetComponent, setBeforeDropTargetComponent] = React2.useState([]);
1078
+ const layoutRef = React2.useRef(null);
1082
1079
  const dragState2 = useDragCapture(layoutRef);
1083
- react.useEffect(() => {
1080
+ React2.useEffect(() => {
1084
1081
  if (!dragState2) {
1085
1082
  setBoundaryContainerSize(null);
1086
1083
  return;
@@ -1207,13 +1204,13 @@ function FlexLayoutSplitScreenDragBox({
1207
1204
  scrollTargetRef,
1208
1205
  ...props
1209
1206
  }) {
1210
- const scrollRAF = react.useRef(null);
1211
- const velocity = react.useRef({ vx: 0, vy: 0 });
1212
- const ref = react.useRef(null);
1213
- const clonedNodeRef = react.useRef(null);
1214
- const clonedWidth = react.useRef(null);
1215
- const clonedHeight = react.useRef(null);
1216
- const hrefUrlRef = react.useRef("");
1207
+ const scrollRAF = React2.useRef(null);
1208
+ const velocity = React2.useRef({ vx: 0, vy: 0 });
1209
+ const ref = React2.useRef(null);
1210
+ const clonedNodeRef = React2.useRef(null);
1211
+ const clonedWidth = React2.useRef(null);
1212
+ const clonedHeight = React2.useRef(null);
1213
+ const hrefUrlRef = React2.useRef("");
1217
1214
  const { handleStart, handleMove, handleEnd } = useDragEvents({
1218
1215
  isBlockingActiveInput
1219
1216
  });
@@ -1243,10 +1240,18 @@ function FlexLayoutSplitScreenDragBox({
1243
1240
  velocity.current = { vx, vy };
1244
1241
  if (!scrollRAF.current) {
1245
1242
  const step = () => {
1246
- scrollTargetRef?.current?.scrollBy(
1247
- velocity.current.vx,
1248
- velocity.current.vy
1249
- );
1243
+ const target = scrollTargetRef?.current ?? document.scrollingElement;
1244
+ if (target?.scrollBy) {
1245
+ target.scrollBy(
1246
+ velocity.current.vx,
1247
+ velocity.current.vy
1248
+ );
1249
+ } else {
1250
+ window.scrollBy(
1251
+ velocity.current.vx,
1252
+ velocity.current.vy
1253
+ );
1254
+ }
1250
1255
  if (velocity.current.vx === 0 && velocity.current.vy === 0) {
1251
1256
  scrollRAF.current = null;
1252
1257
  return;
@@ -1329,7 +1334,7 @@ function FlexLayoutSplitScreenDragBox({
1329
1334
  }
1330
1335
  });
1331
1336
  };
1332
- react.useEffect(() => {
1337
+ React2.useEffect(() => {
1333
1338
  if (ref.current) {
1334
1339
  const clone = ref.current.cloneNode(true);
1335
1340
  const originRect = ref.current.getBoundingClientRect();
@@ -1357,7 +1362,7 @@ function FlexLayoutSplitScreenDragBox({
1357
1362
  );
1358
1363
  }
1359
1364
  }, []);
1360
- react.useEffect(() => {
1365
+ React2.useEffect(() => {
1361
1366
  const moveEvents = [
1362
1367
  "mousemove",
1363
1368
  "touchmove"
@@ -1389,7 +1394,7 @@ function FlexLayoutSplitScreenDragBox({
1389
1394
  navigationTitle,
1390
1395
  dropEndCallback
1391
1396
  ]);
1392
- react.useEffect(() => {
1397
+ React2.useEffect(() => {
1393
1398
  const el = ref.current;
1394
1399
  if (!el) return;
1395
1400
  const onCtx = (e) => e.preventDefault();
@@ -1398,7 +1403,7 @@ function FlexLayoutSplitScreenDragBox({
1398
1403
  el.removeEventListener("contextmenu", onCtx);
1399
1404
  };
1400
1405
  }, []);
1401
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
1406
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
1402
1407
  "div",
1403
1408
  {
1404
1409
  className: `${className || ""} ${FlexLayout_default["flex-split-screen-drag-box"]}`,
@@ -1481,14 +1486,16 @@ function FlexLayoutSplitScreenDragBox({
1481
1486
  });
1482
1487
  },
1483
1488
  style: { ...style },
1484
- ...props,
1485
- children
1486
- }
1487
- ) });
1489
+ ...props
1490
+ },
1491
+ children
1492
+ ));
1488
1493
  }
1489
1494
 
1490
1495
  // src/flex-layout/styles/listScroll.module.css
1491
1496
  var listScroll_default = {};
1497
+
1498
+ // src/flex-layout/components/FlexLayoutSplitScreenScrollBox.tsx
1492
1499
  var FlexLayoutSplitScreenScrollBox = ({
1493
1500
  className,
1494
1501
  children,
@@ -1497,10 +1504,10 @@ var FlexLayoutSplitScreenScrollBox = ({
1497
1504
  isDefaultScrollStyle = false,
1498
1505
  ...props
1499
1506
  }) => {
1500
- const scrollRef = react.useRef(null);
1501
- const [isMouseDown, setIsMouseDown] = react.useState(false);
1502
- const scrollEventSubject = react.useRef(new rxjs.Subject());
1503
- react.useEffect(() => {
1507
+ const scrollRef = React2.useRef(null);
1508
+ const [isMouseDown, setIsMouseDown] = React2.useState(false);
1509
+ const scrollEventSubject = React2.useRef(new rxjs.Subject());
1510
+ React2.useEffect(() => {
1504
1511
  const mouseUpSubscribe = rxjs.fromEvent(
1505
1512
  window,
1506
1513
  "mouseup"
@@ -1523,7 +1530,7 @@ var FlexLayoutSplitScreenScrollBox = ({
1523
1530
  scrollEventSubscribe.unsubscribe();
1524
1531
  };
1525
1532
  }, [keyName]);
1526
- react.useEffect(() => {
1533
+ React2.useEffect(() => {
1527
1534
  if (!scrollRef.current) return;
1528
1535
  let animationFrameId = null;
1529
1536
  const handleWheel = (event) => {
@@ -1552,7 +1559,7 @@ var FlexLayoutSplitScreenScrollBox = ({
1552
1559
  scrollRef.current?.removeEventListener("wheel", handleWheel);
1553
1560
  };
1554
1561
  }, []);
1555
- return /* @__PURE__ */ jsxRuntime.jsx(
1562
+ return /* @__PURE__ */ React.createElement(
1556
1563
  "div",
1557
1564
  {
1558
1565
  ref: scrollRef,
@@ -1575,27 +1582,29 @@ var FlexLayoutSplitScreenScrollBox = ({
1575
1582
  });
1576
1583
  },
1577
1584
  className: `${className || ""} ${isDefaultScrollStyle ? listScroll_default["default-scroll"] : listScroll_default["list-scroll"]} ${direction ? listScroll_default[direction] : ""}`,
1578
- ...props,
1579
- children
1580
- }
1585
+ ...props
1586
+ },
1587
+ children
1581
1588
  );
1582
1589
  };
1583
- var FlexLayoutSplitScreenScrollBox_default = react.memo(FlexLayoutSplitScreenScrollBox);
1590
+ var FlexLayoutSplitScreenScrollBox_default = React2.memo(FlexLayoutSplitScreenScrollBox);
1591
+
1592
+ // src/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.tsx
1584
1593
  function FlexLayoutSplitScreenDragBoxContainer({
1585
1594
  className,
1586
1595
  children,
1587
1596
  layoutName,
1588
1597
  ...props
1589
1598
  }) {
1590
- return /* @__PURE__ */ jsxRuntime.jsx(
1599
+ return /* @__PURE__ */ React.createElement(
1591
1600
  FlexLayoutSplitScreenScrollBox_default,
1592
1601
  {
1593
1602
  keyName: layoutName,
1594
1603
  className: `${FlexLayout_default["flex-split-screen-drag-box-title-container"]} ${className && className !== "" && className || ""}`,
1595
1604
  direction: "x",
1596
- ...props,
1597
- children
1598
- }
1605
+ ...props
1606
+ },
1607
+ children
1599
1608
  );
1600
1609
  }
1601
1610
  function FlexLayoutSplitScreenDragBoxItem({
@@ -1604,42 +1613,42 @@ function FlexLayoutSplitScreenDragBoxItem({
1604
1613
  isActive,
1605
1614
  ...props
1606
1615
  }) {
1607
- react.useEffect(() => {
1616
+ React2.useEffect(() => {
1608
1617
  allSplitScreenCount.next(allSplitScreenCount.value + 1);
1609
1618
  return () => {
1610
1619
  if (allSplitScreenCount.value <= 1) return;
1611
1620
  allSplitScreenCount.next(allSplitScreenCount.value - 1);
1612
1621
  };
1613
1622
  }, []);
1614
- return /* @__PURE__ */ jsxRuntime.jsxs(
1623
+ return /* @__PURE__ */ React.createElement(
1615
1624
  "div",
1616
1625
  {
1617
1626
  className: `${FlexLayout_default["flex-split-screen-drag-box-title-item"]} ${isActive ? FlexLayout_default["active"] : ""}`,
1618
- ...props,
1619
- children: [
1620
- children,
1621
- /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: (ev) => onClose(ev), children: "X" })
1622
- ]
1623
- }
1627
+ ...props
1628
+ },
1629
+ children,
1630
+ /* @__PURE__ */ React.createElement("button", { type: "button", onClick: (ev) => onClose(ev) }, "X")
1624
1631
  );
1625
1632
  }
1633
+
1634
+ // src/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.tsx
1626
1635
  function FlexLayoutSplitScreenDragBoxTitleMore({
1627
1636
  className,
1628
1637
  ...props
1629
1638
  }) {
1630
- return /* @__PURE__ */ jsxRuntime.jsxs(
1639
+ return /* @__PURE__ */ React.createElement(
1631
1640
  "button",
1632
1641
  {
1633
1642
  ...props,
1634
- className: `${FlexLayout_default["flex-split-screen-drag-box-title-more"]} ${className || ""}`,
1635
- children: [
1636
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "." }),
1637
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "." }),
1638
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "." })
1639
- ]
1640
- }
1643
+ className: `${FlexLayout_default["flex-split-screen-drag-box-title-more"]} ${className || ""}`
1644
+ },
1645
+ /* @__PURE__ */ React.createElement("span", null, "."),
1646
+ /* @__PURE__ */ React.createElement("span", null, "."),
1647
+ /* @__PURE__ */ React.createElement("span", null, ".")
1641
1648
  );
1642
1649
  }
1650
+
1651
+ // src/flex-layout/components/FlexLayoutSplitScreen.tsx
1643
1652
  function isOverDrop({
1644
1653
  x,
1645
1654
  y,
@@ -1707,7 +1716,7 @@ var handleUpdateDropTargetComponents = ({
1707
1716
  list = entries[1];
1708
1717
  const newComponent = {
1709
1718
  containerName: `${containerName + "_" + layoutName}${isUsePrefix ? "_" + orderName + "-" + list.length : ""}`,
1710
- component: react.cloneElement(
1719
+ component: React2.cloneElement(
1711
1720
  dropComponent,
1712
1721
  { key: screenKey, screenKey }
1713
1722
  ),
@@ -1852,7 +1861,7 @@ function FlexLayoutSplitScreen({
1852
1861
  parentLayoutName: "",
1853
1862
  layoutName
1854
1863
  });
1855
- react.useEffect(() => {
1864
+ React2.useEffect(() => {
1856
1865
  resetRootSplitScreen(layoutName);
1857
1866
  const subscribe = getSplitScreen(layoutName, layoutName).subscribe((layoutInfo) => {
1858
1867
  if (layoutInfo) {
@@ -1896,7 +1905,7 @@ function FlexLayoutSplitScreen({
1896
1905
  resetRootSplitScreen(layoutName);
1897
1906
  };
1898
1907
  }, [layoutName]);
1899
- react.useEffect(() => {
1908
+ React2.useEffect(() => {
1900
1909
  const subscribe = dropMovementEventSubject.pipe(
1901
1910
  rxjs.distinctUntilChanged((prev, curr) => {
1902
1911
  const filterChildren2 = (obj) => {
@@ -2083,142 +2092,137 @@ function FlexLayoutSplitScreen({
2083
2092
  afterDropTargetComponent,
2084
2093
  centerDropTargetComponent
2085
2094
  ]);
2086
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${FlexLayout_default["flex-split-screen"]}`, ref: layoutRef, children: [
2087
- /* @__PURE__ */ jsxRuntime.jsxs(
2088
- FlexLayout_default2,
2089
- {
2090
- direction,
2091
- layoutName,
2092
- "data-is_split": isSplit,
2093
- panelMovementMode: "bulldozer",
2094
- children: [
2095
- beforeDropTargetComponent.length != 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: beforeDropTargetComponent.map(
2096
- ({
2097
- containerName: cName,
2098
- component,
2099
- navigationTitle: navigationTitle2,
2100
- dropDocumentOutsideOption: dropDocumentOutsideOption2,
2101
- screenKey: screenKey2
2102
- }, i) => /* @__PURE__ */ jsxRuntime.jsx(
2103
- FlexLayoutContainer_default,
2095
+ return /* @__PURE__ */ React.createElement("div", { className: `${FlexLayout_default["flex-split-screen"]}`, ref: layoutRef }, /* @__PURE__ */ React.createElement(
2096
+ FlexLayout,
2097
+ {
2098
+ direction,
2099
+ layoutName,
2100
+ "data-is_split": isSplit,
2101
+ panelMovementMode: "bulldozer"
2102
+ },
2103
+ beforeDropTargetComponent.length != 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, beforeDropTargetComponent.map(
2104
+ ({
2105
+ containerName: cName,
2106
+ component,
2107
+ navigationTitle: navigationTitle2,
2108
+ dropDocumentOutsideOption: dropDocumentOutsideOption2,
2109
+ screenKey: screenKey2
2110
+ }, i) => /* @__PURE__ */ React.createElement(
2111
+ FlexLayoutContainer,
2112
+ {
2113
+ containerName: cName,
2114
+ isInitialResizable: true,
2115
+ isResizePanel: true,
2116
+ key: cName
2117
+ },
2118
+ /* @__PURE__ */ React.createElement(
2119
+ FlexLayoutSplitScreenChild,
2120
+ {
2121
+ parentDirection: direction,
2122
+ layoutName: `${layoutName}_before`,
2123
+ parentLayoutName: layoutName,
2124
+ containerName: cName,
2125
+ depth: 1,
2126
+ rootRef: layoutRef,
2127
+ screenKey: screenKey2,
2128
+ initialCenterComponents: [
2104
2129
  {
2130
+ navigationTitle: navigationTitle2,
2131
+ component,
2105
2132
  containerName: cName,
2106
- isInitialResizable: true,
2107
- isResizePanel: true,
2108
- children: /* @__PURE__ */ jsxRuntime.jsx(
2109
- FlexLayoutSplitScreenChild,
2110
- {
2111
- parentDirection: direction,
2112
- layoutName: `${layoutName}_before`,
2113
- parentLayoutName: layoutName,
2114
- containerName: cName,
2115
- depth: 1,
2116
- rootRef: layoutRef,
2117
- screenKey: screenKey2,
2118
- initialCenterComponents: [
2119
- {
2120
- navigationTitle: navigationTitle2,
2121
- component,
2122
- containerName: cName,
2123
- dropDocumentOutsideOption: dropDocumentOutsideOption2,
2124
- screenKey: screenKey2
2125
- }
2126
- ],
2127
- rootName: layoutName
2128
- }
2129
- )
2130
- },
2131
- cName
2132
- )
2133
- ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", {}),
2134
- centerDropTargetComponent.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", {}) : /* @__PURE__ */ jsxRuntime.jsx(
2135
- FlexLayoutContainer_default,
2133
+ dropDocumentOutsideOption: dropDocumentOutsideOption2,
2134
+ screenKey: screenKey2
2135
+ }
2136
+ ],
2137
+ rootName: layoutName
2138
+ }
2139
+ )
2140
+ )
2141
+ )) : /* @__PURE__ */ React.createElement("div", null),
2142
+ centerDropTargetComponent.length === 0 ? /* @__PURE__ */ React.createElement("div", null) : /* @__PURE__ */ React.createElement(
2143
+ FlexLayoutContainer,
2144
+ {
2145
+ containerName: `${centerDropTargetComponent[0].containerName}`,
2146
+ isInitialResizable: true,
2147
+ isResizePanel: isSplit
2148
+ },
2149
+ isSplit ? /* @__PURE__ */ React.createElement(
2150
+ FlexLayoutSplitScreenChild,
2151
+ {
2152
+ parentDirection: direction,
2153
+ layoutName: `${layoutName}_center`,
2154
+ parentLayoutName: layoutName,
2155
+ containerName: `${centerDropTargetComponent[0].containerName}`,
2156
+ depth: 0,
2157
+ rootRef: layoutRef,
2158
+ screenKey: centerDropTargetComponent[0].screenKey,
2159
+ initialCenterComponents: [
2136
2160
  {
2137
- containerName: `${centerDropTargetComponent[0].containerName}`,
2138
- isInitialResizable: true,
2139
- isResizePanel: isSplit,
2140
- children: isSplit ? /* @__PURE__ */ jsxRuntime.jsx(
2141
- FlexLayoutSplitScreenChild,
2142
- {
2143
- parentDirection: direction,
2144
- layoutName: `${layoutName}_center`,
2145
- parentLayoutName: layoutName,
2146
- containerName: `${centerDropTargetComponent[0].containerName}`,
2147
- depth: 0,
2148
- rootRef: layoutRef,
2149
- screenKey: centerDropTargetComponent[0].screenKey,
2150
- initialCenterComponents: [
2151
- {
2152
- navigationTitle: centerDropTargetComponent[0].navigationTitle,
2153
- component: centerDropTargetComponent[0].component,
2154
- containerName: centerDropTargetComponent[0].containerName,
2155
- dropDocumentOutsideOption: centerDropTargetComponent[0].dropDocumentOutsideOption,
2156
- screenKey: centerDropTargetComponent[0].screenKey
2157
- }
2158
- ],
2159
- rootName: layoutName
2160
- }
2161
- ) : /* @__PURE__ */ jsxRuntime.jsx(
2162
- FlexLayoutSplitScreenScrollBox_default,
2163
- {
2164
- keyName: centerDropTargetComponent[0].containerName,
2165
- isDefaultScrollStyle: true,
2166
- children: centerDropTargetComponent[0].component
2167
- }
2168
- )
2161
+ navigationTitle: centerDropTargetComponent[0].navigationTitle,
2162
+ component: centerDropTargetComponent[0].component,
2163
+ containerName: centerDropTargetComponent[0].containerName,
2164
+ dropDocumentOutsideOption: centerDropTargetComponent[0].dropDocumentOutsideOption,
2165
+ screenKey: centerDropTargetComponent[0].screenKey
2169
2166
  }
2170
- ),
2171
- afterDropTargetComponent.length != 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: afterDropTargetComponent.map(
2172
- ({
2173
- containerName: cName,
2174
- component,
2175
- navigationTitle: navigationTitle2,
2176
- dropDocumentOutsideOption: dropDocumentOutsideOption2,
2177
- screenKey: screenKey2
2178
- }, i) => /* @__PURE__ */ jsxRuntime.jsx(
2179
- FlexLayoutContainer_default,
2167
+ ],
2168
+ rootName: layoutName
2169
+ }
2170
+ ) : /* @__PURE__ */ React.createElement(
2171
+ FlexLayoutSplitScreenScrollBox_default,
2172
+ {
2173
+ keyName: centerDropTargetComponent[0].containerName,
2174
+ isDefaultScrollStyle: true
2175
+ },
2176
+ centerDropTargetComponent[0].component
2177
+ )
2178
+ ),
2179
+ afterDropTargetComponent.length != 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, afterDropTargetComponent.map(
2180
+ ({
2181
+ containerName: cName,
2182
+ component,
2183
+ navigationTitle: navigationTitle2,
2184
+ dropDocumentOutsideOption: dropDocumentOutsideOption2,
2185
+ screenKey: screenKey2
2186
+ }, i) => /* @__PURE__ */ React.createElement(
2187
+ FlexLayoutContainer,
2188
+ {
2189
+ containerName: cName,
2190
+ isInitialResizable: true,
2191
+ isResizePanel: afterDropTargetComponent.length - 1 !== i,
2192
+ key: cName
2193
+ },
2194
+ /* @__PURE__ */ React.createElement(
2195
+ FlexLayoutSplitScreenChild,
2196
+ {
2197
+ parentDirection: direction,
2198
+ layoutName: `${layoutName}_after`,
2199
+ parentLayoutName: layoutName,
2200
+ containerName: cName,
2201
+ depth: 1,
2202
+ rootRef: layoutRef,
2203
+ screenKey: screenKey2,
2204
+ initialCenterComponents: [
2180
2205
  {
2206
+ navigationTitle: navigationTitle2,
2207
+ component,
2181
2208
  containerName: cName,
2182
- isInitialResizable: true,
2183
- isResizePanel: afterDropTargetComponent.length - 1 !== i,
2184
- children: /* @__PURE__ */ jsxRuntime.jsx(
2185
- FlexLayoutSplitScreenChild,
2186
- {
2187
- parentDirection: direction,
2188
- layoutName: `${layoutName}_after`,
2189
- parentLayoutName: layoutName,
2190
- containerName: cName,
2191
- depth: 1,
2192
- rootRef: layoutRef,
2193
- screenKey: screenKey2,
2194
- initialCenterComponents: [
2195
- {
2196
- navigationTitle: navigationTitle2,
2197
- component,
2198
- containerName: cName,
2199
- dropDocumentOutsideOption: dropDocumentOutsideOption2,
2200
- screenKey: screenKey2
2201
- }
2202
- ],
2203
- rootName: layoutName
2204
- }
2205
- )
2206
- },
2207
- cName
2208
- )
2209
- ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", {})
2210
- ]
2211
- }
2212
- ),
2213
- boundaryContainerSize && /* @__PURE__ */ jsxRuntime.jsx(
2214
- "div",
2215
- {
2216
- className: `${FlexLayout_default["flex-split-screen-boundary-container"]}`,
2217
- style: { ...boundaryContainerSize },
2218
- children: "\u2B07\uFE0F\uB4DC\uB86D\uD558\uBA74 \uD654\uBA74\uC774 \uBD84\uD560\uB429\uB2C8\uB2E4."
2219
- }
2220
- )
2221
- ] });
2209
+ dropDocumentOutsideOption: dropDocumentOutsideOption2,
2210
+ screenKey: screenKey2
2211
+ }
2212
+ ],
2213
+ rootName: layoutName
2214
+ }
2215
+ )
2216
+ )
2217
+ )) : /* @__PURE__ */ React.createElement("div", null)
2218
+ ), boundaryContainerSize && /* @__PURE__ */ React.createElement(
2219
+ "div",
2220
+ {
2221
+ className: `${FlexLayout_default["flex-split-screen-boundary-container"]}`,
2222
+ style: { ...boundaryContainerSize }
2223
+ },
2224
+ "\u2B07\uFE0F\uB4DC\uB86D\uD558\uBA74 \uD654\uBA74\uC774 \uBD84\uD560\uB429\uB2C8\uB2E4."
2225
+ ));
2222
2226
  }
2223
2227
  function FlexLayoutSplitScreenChild({
2224
2228
  containerName,
@@ -2253,11 +2257,11 @@ function FlexLayoutSplitScreenChild({
2253
2257
  parentLayoutName,
2254
2258
  layoutName
2255
2259
  });
2256
- const [isEmptyContent, setIsEmptyContent] = react.useState(false);
2257
- const [activeIndex, setActiveIndex] = react.useState(0);
2258
- const centerDropTargetComponentRef = react.useRef(centerDropTargetComponent);
2259
- const activeIndexRef = react.useRef(activeIndex);
2260
- react.useEffect(() => {
2260
+ const [isEmptyContent, setIsEmptyContent] = React2.useState(false);
2261
+ const [activeIndex, setActiveIndex] = React2.useState(0);
2262
+ const centerDropTargetComponentRef = React2.useRef(centerDropTargetComponent);
2263
+ const activeIndexRef = React2.useRef(activeIndex);
2264
+ React2.useEffect(() => {
2261
2265
  const subscribe = getSplitScreen(rootName, `${layoutName}=${screenKey}`).pipe(rxjs.take(1)).subscribe((layoutInfo) => {
2262
2266
  setSplitScreen(rootName, `${layoutName}=${screenKey}`, {
2263
2267
  afterDropTargetComponent: layoutInfo?.afterDropTargetComponent || [],
@@ -2271,7 +2275,7 @@ function FlexLayoutSplitScreenChild({
2271
2275
  subscribe.unsubscribe();
2272
2276
  };
2273
2277
  }, [rootName, layoutName, initialCenterComponents]);
2274
- react.useEffect(() => {
2278
+ React2.useEffect(() => {
2275
2279
  const subscribe = getSplitScreen(rootName, `${layoutName}=${screenKey}`).subscribe((layoutInfo) => {
2276
2280
  if (layoutInfo) {
2277
2281
  setBeforeDropTargetComponent([
@@ -2301,7 +2305,7 @@ function FlexLayoutSplitScreenChild({
2301
2305
  subscribe.unsubscribe();
2302
2306
  };
2303
2307
  }, [rootName, layoutName]);
2304
- react.useEffect(() => {
2308
+ React2.useEffect(() => {
2305
2309
  const subscribe = dropMovementEventSubject.pipe(
2306
2310
  rxjs.distinctUntilChanged((prev, curr) => {
2307
2311
  const filterChildren2 = (obj) => {
@@ -2499,326 +2503,316 @@ function FlexLayoutSplitScreenChild({
2499
2503
  afterDropTargetComponent,
2500
2504
  centerDropTargetComponent
2501
2505
  ]);
2502
- react.useEffect(() => {
2506
+ React2.useEffect(() => {
2503
2507
  centerDropTargetComponentRef.current = centerDropTargetComponent;
2504
2508
  }, [centerDropTargetComponent]);
2505
- react.useEffect(() => {
2509
+ React2.useEffect(() => {
2506
2510
  activeIndexRef.current = activeIndex;
2507
2511
  }, [activeIndex]);
2508
- const [isOnlyOneScreen, setIsOnlyOneScreen] = react.useState(false);
2509
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !isEmptyContent && /* @__PURE__ */ jsxRuntime.jsxs(
2512
+ const [isOnlyOneScreen, setIsOnlyOneScreen] = React2.useState(false);
2513
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, !isEmptyContent && /* @__PURE__ */ React.createElement(
2510
2514
  "div",
2511
2515
  {
2512
2516
  className: `${FlexLayout_default["flex-split-screen"]}`,
2513
- ref: layoutRef,
2514
- children: [
2515
- /* @__PURE__ */ jsxRuntime.jsxs(
2516
- FlexLayout_default2,
2517
+ ref: layoutRef
2518
+ },
2519
+ /* @__PURE__ */ React.createElement(
2520
+ FlexLayout,
2521
+ {
2522
+ direction,
2523
+ layoutName: `${layoutName}`,
2524
+ panelMovementMode: "bulldozer"
2525
+ },
2526
+ beforeDropTargetComponent.length != 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, beforeDropTargetComponent.map(
2527
+ ({
2528
+ containerName: cName,
2529
+ component,
2530
+ navigationTitle,
2531
+ dropDocumentOutsideOption,
2532
+ screenKey: screenKey2
2533
+ }, i) => /* @__PURE__ */ React.createElement(
2534
+ FlexLayoutContainer,
2517
2535
  {
2518
- direction,
2519
- layoutName: `${layoutName}`,
2520
- panelMovementMode: "bulldozer",
2521
- children: [
2522
- beforeDropTargetComponent.length != 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: beforeDropTargetComponent.map(
2523
- ({
2524
- containerName: cName,
2525
- component,
2536
+ containerName: cName,
2537
+ isInitialResizable: true,
2538
+ isResizePanel: true,
2539
+ key: cName
2540
+ },
2541
+ /* @__PURE__ */ React.createElement(
2542
+ FlexLayoutSplitScreenChild,
2543
+ {
2544
+ parentDirection: direction,
2545
+ layoutName: `${layoutName}_before-${depth}`,
2546
+ parentLayoutName: layoutName,
2547
+ containerName: cName,
2548
+ depth: depth + 1,
2549
+ rootRef,
2550
+ screenKey: screenKey2,
2551
+ initialCenterComponents: [
2552
+ {
2526
2553
  navigationTitle,
2554
+ component,
2555
+ containerName: cName,
2527
2556
  dropDocumentOutsideOption,
2528
2557
  screenKey: screenKey2
2529
- }, i) => /* @__PURE__ */ jsxRuntime.jsx(
2530
- FlexLayoutContainer_default,
2531
- {
2532
- containerName: cName,
2533
- isInitialResizable: true,
2534
- isResizePanel: true,
2535
- children: /* @__PURE__ */ jsxRuntime.jsx(
2536
- FlexLayoutSplitScreenChild,
2537
- {
2538
- parentDirection: direction,
2539
- layoutName: `${layoutName}_before-${depth}`,
2540
- parentLayoutName: layoutName,
2541
- containerName: cName,
2542
- depth: depth + 1,
2543
- rootRef,
2544
- screenKey: screenKey2,
2545
- initialCenterComponents: [
2546
- {
2547
- navigationTitle,
2548
- component,
2549
- containerName: cName,
2550
- dropDocumentOutsideOption,
2551
- screenKey: screenKey2
2552
- }
2553
- ],
2554
- rootName
2555
- }
2556
- )
2557
- },
2558
- cName
2559
- )
2560
- ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", {}),
2561
- centerDropTargetComponent.length != 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
2562
- FlexLayoutContainer_default,
2558
+ }
2559
+ ],
2560
+ rootName
2561
+ }
2562
+ )
2563
+ )
2564
+ )) : /* @__PURE__ */ React.createElement("div", null),
2565
+ centerDropTargetComponent.length != 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
2566
+ FlexLayoutContainer,
2567
+ {
2568
+ containerName: `${(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName}`,
2569
+ isInitialResizable: true,
2570
+ isResizePanel: isSplit,
2571
+ key: (centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName
2572
+ },
2573
+ isSplit ? /* @__PURE__ */ React.createElement("div", { "data-key": screenKey }, /* @__PURE__ */ React.createElement(
2574
+ FlexLayoutSplitScreenChild,
2575
+ {
2576
+ parentDirection: direction,
2577
+ layoutName: `${layoutName}_center-${depth}`,
2578
+ parentLayoutName: layoutName,
2579
+ containerName: `${(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName}`,
2580
+ depth: depth + 1,
2581
+ rootRef,
2582
+ initialCenterComponents: centerDropTargetComponent.map(
2583
+ ({
2584
+ navigationTitle,
2585
+ component,
2586
+ containerName: cName,
2587
+ dropDocumentOutsideOption,
2588
+ screenKey: centerScreenKey
2589
+ }) => ({
2590
+ navigationTitle,
2591
+ component,
2592
+ containerName: cName,
2593
+ dropDocumentOutsideOption,
2594
+ screenKey: centerScreenKey
2595
+ })
2596
+ ),
2597
+ screenKey,
2598
+ rootName
2599
+ }
2600
+ )) : /* @__PURE__ */ React.createElement(
2601
+ FlexLayoutSplitScreenScrollBox_default,
2602
+ {
2603
+ keyName: (centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName,
2604
+ isDefaultScrollStyle: true
2605
+ },
2606
+ !isOnlyOneScreen && /* @__PURE__ */ React.createElement(
2607
+ "div",
2608
+ {
2609
+ className: `${FlexLayout_default["flex-split-screen-drag-box-title-wrapper-sticky"]}`
2610
+ },
2611
+ /* @__PURE__ */ React.createElement(
2612
+ "div",
2613
+ {
2614
+ "data-is_split": isSplit,
2615
+ "data-layout_name": layoutName,
2616
+ "data-parent_layout_name": parentLayoutName,
2617
+ "data-container_name": `${(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName}`,
2618
+ className: `${FlexLayout_default["flex-split-screen-drag-box-title-wrapper"]}`
2619
+ },
2620
+ /* @__PURE__ */ React.createElement(
2621
+ FlexLayoutSplitScreenDragBoxContainer,
2563
2622
  {
2564
- containerName: `${(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName}`,
2565
- isInitialResizable: true,
2566
- isResizePanel: isSplit,
2567
- children: isSplit ? /* @__PURE__ */ jsxRuntime.jsx("div", { "data-key": screenKey, children: /* @__PURE__ */ jsxRuntime.jsx(
2568
- FlexLayoutSplitScreenChild,
2569
- {
2570
- parentDirection: direction,
2571
- layoutName: `${layoutName}_center-${depth}`,
2572
- parentLayoutName: layoutName,
2573
- containerName: `${(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName}`,
2574
- depth: depth + 1,
2575
- rootRef,
2576
- initialCenterComponents: centerDropTargetComponent.map(
2577
- ({
2578
- navigationTitle,
2579
- component,
2580
- containerName: cName,
2581
- dropDocumentOutsideOption,
2582
- screenKey: centerScreenKey
2583
- }) => ({
2584
- navigationTitle,
2585
- component,
2586
- containerName: cName,
2587
- dropDocumentOutsideOption,
2588
- screenKey: centerScreenKey
2589
- })
2590
- ),
2591
- screenKey,
2592
- rootName
2593
- }
2594
- ) }) : /* @__PURE__ */ jsxRuntime.jsxs(
2595
- FlexLayoutSplitScreenScrollBox_default,
2623
+ key: layoutName,
2624
+ "data-layout_name": layoutName,
2625
+ layoutName
2626
+ },
2627
+ centerDropTargetComponent.map(
2628
+ (item, index) => /* @__PURE__ */ React.createElement(
2629
+ FlexLayoutSplitScreenDragBoxItem,
2596
2630
  {
2597
- keyName: (centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName,
2598
- isDefaultScrollStyle: true,
2599
- children: [
2600
- !isOnlyOneScreen && /* @__PURE__ */ jsxRuntime.jsx(
2601
- "div",
2602
- {
2603
- className: `${FlexLayout_default["flex-split-screen-drag-box-title-wrapper-sticky"]}`,
2604
- children: /* @__PURE__ */ jsxRuntime.jsxs(
2605
- "div",
2606
- {
2607
- "data-is_split": isSplit,
2608
- "data-layout_name": layoutName,
2609
- "data-parent_layout_name": parentLayoutName,
2610
- "data-container_name": `${(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName}`,
2611
- className: `${FlexLayout_default["flex-split-screen-drag-box-title-wrapper"]}`,
2612
- children: [
2613
- /* @__PURE__ */ jsxRuntime.jsx(
2614
- FlexLayoutSplitScreenDragBoxContainer,
2615
- {
2616
- "data-layout_name": layoutName,
2617
- layoutName,
2618
- children: centerDropTargetComponent.map(
2619
- (item, index) => /* @__PURE__ */ jsxRuntime.jsx(
2620
- FlexLayoutSplitScreenDragBoxItem,
2621
- {
2622
- onClose: (ev) => {
2623
- if (activeIndexRef.current === index && centerDropTargetComponent.length === 1) {
2624
- dropMovementEventSubject.next(
2625
- {
2626
- state: "remove",
2627
- targetContainerName: containerName,
2628
- targetParentLayoutName: parentLayoutName,
2629
- targetLayoutName: layoutName
2630
- }
2631
- );
2632
- } else {
2633
- if (centerDropTargetComponent.length === activeIndexRef.current + 1) {
2634
- setActiveIndex(
2635
- activeIndexRef.current - 1
2636
- );
2637
- }
2638
- setCenterDropTargetComponent(
2639
- (prev) => {
2640
- const result = handleRemove(
2641
- prev,
2642
- item.containerName,
2643
- () => {
2644
- }
2645
- );
2646
- return result;
2647
- }
2648
- );
2649
- }
2650
- },
2651
- isActive: activeIndex === index,
2652
- children: /* @__PURE__ */ jsxRuntime.jsx(
2653
- FlexLayoutSplitScreenDragBox,
2654
- {
2655
- onClick: () => {
2656
- setActiveIndex(
2657
- index
2658
- );
2659
- },
2660
- containerName: item.containerName,
2661
- dropDocumentOutsideOption: item.dropDocumentOutsideOption,
2662
- targetComponent: item.component,
2663
- navigationTitle: item.navigationTitle,
2664
- "data-container-name": item.containerName,
2665
- "data-layout-name": layoutName,
2666
- "data-parent-layout-name": parentLayoutName,
2667
- dropEndCallback: ({
2668
- x,
2669
- y,
2670
- containerName: appendContainerName
2671
- }) => {
2672
- if (!rootRef.current || !layoutRef.current)
2673
- return;
2674
- const isRootOver = isOverDrop(
2675
- {
2676
- x,
2677
- y,
2678
- element: rootRef.current
2679
- }
2680
- );
2681
- const isLayoutInner = isInnerDrop(
2682
- {
2683
- x,
2684
- y,
2685
- element: layoutRef.current
2686
- }
2687
- );
2688
- if (!isRootOver && !isLayoutInner || !isRootOver && isLayoutInner && centerDropTargetComponentRef.current.length > 1) {
2689
- const option = {};
2690
- if (centerDropTargetComponentRef.current.length > 1) {
2691
- const {
2692
- adjacentItem,
2693
- adjacentIndex
2694
- } = getAdjacentItem(
2695
- centerDropTargetComponentRef.current,
2696
- activeIndexRef.current
2697
- );
2698
- if (adjacentItem && activeIndexRef.current === index) {
2699
- Object.assign(
2700
- option,
2701
- {
2702
- x,
2703
- y,
2704
- targetComponent: adjacentItem.component,
2705
- nextContainerName: adjacentItem.containerName,
2706
- orderName: "center",
2707
- dropTargetComponentEvent: {
2708
- navigationTitle: adjacentItem.navigationTitle,
2709
- dropDocumentOutsideOption: adjacentItem.dropDocumentOutsideOption,
2710
- direction,
2711
- screenKey
2712
- }
2713
- }
2714
- );
2715
- }
2716
- }
2717
- if (index === 0) {
2718
- dropMovementEventSubject.next(
2719
- {
2720
- state: "remove",
2721
- targetContainerName: item.containerName,
2722
- targetParentLayoutName: parentLayoutName,
2723
- targetLayoutName: layoutName,
2724
- ...option
2725
- }
2726
- );
2727
- } else {
2728
- dropMovementEventSubject.next(
2729
- {
2730
- state: "remove",
2731
- targetContainerName: item.containerName,
2732
- targetParentLayoutName: "",
2733
- targetLayoutName: layoutName,
2734
- ...option
2735
- }
2736
- );
2737
- }
2738
- }
2739
- },
2740
- children: item.navigationTitle
2741
- }
2742
- )
2743
- },
2744
- item.navigationTitle + layoutName + item.containerName
2745
- )
2746
- )
2747
- },
2748
- layoutName
2749
- ),
2750
- /* @__PURE__ */ jsxRuntime.jsx(FlexLayoutSplitScreenDragBoxTitleMore, {})
2751
- ]
2752
- }
2753
- )
2631
+ onClose: (ev) => {
2632
+ if (activeIndexRef.current === index && centerDropTargetComponent.length === 1) {
2633
+ dropMovementEventSubject.next(
2634
+ {
2635
+ state: "remove",
2636
+ targetContainerName: containerName,
2637
+ targetParentLayoutName: parentLayoutName,
2638
+ targetLayoutName: layoutName
2639
+ }
2640
+ );
2641
+ } else {
2642
+ if (centerDropTargetComponent.length === activeIndexRef.current + 1) {
2643
+ setActiveIndex(
2644
+ activeIndexRef.current - 1
2645
+ );
2754
2646
  }
2755
- ),
2756
- (() => {
2757
- const target = centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0];
2758
- return target.component;
2759
- })()
2760
- ]
2761
- }
2762
- )
2763
- },
2764
- (centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName
2765
- ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", {}),
2766
- afterDropTargetComponent.length != 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: afterDropTargetComponent.map(
2767
- ({
2768
- containerName: cName,
2769
- component,
2770
- navigationTitle,
2771
- dropDocumentOutsideOption,
2772
- screenKey: screenKey2
2773
- }, i) => /* @__PURE__ */ jsxRuntime.jsx(
2774
- FlexLayoutContainer_default,
2775
- {
2776
- containerName: cName,
2777
- isInitialResizable: true,
2778
- isResizePanel: i !== afterDropTargetComponent.length - 1,
2779
- children: /* @__PURE__ */ jsxRuntime.jsx(
2780
- FlexLayoutSplitScreenChild,
2647
+ setCenterDropTargetComponent(
2648
+ (prev) => {
2649
+ const result = handleRemove(
2650
+ prev,
2651
+ item.containerName,
2652
+ () => {
2653
+ }
2654
+ );
2655
+ return result;
2656
+ }
2657
+ );
2658
+ }
2659
+ },
2660
+ key: item.navigationTitle + layoutName + item.containerName,
2661
+ isActive: activeIndex === index
2662
+ },
2663
+ /* @__PURE__ */ React.createElement(
2664
+ FlexLayoutSplitScreenDragBox,
2781
2665
  {
2782
- parentDirection: direction,
2783
- layoutName: `${layoutName}_after-${depth}`,
2784
- parentLayoutName: layoutName,
2785
- containerName: cName,
2786
- depth: depth + 1,
2787
- rootRef,
2788
- screenKey: screenKey2,
2789
- initialCenterComponents: [
2790
- {
2791
- navigationTitle,
2792
- component,
2793
- containerName: cName,
2794
- dropDocumentOutsideOption,
2795
- screenKey: screenKey2
2666
+ onClick: () => {
2667
+ setActiveIndex(
2668
+ index
2669
+ );
2670
+ },
2671
+ containerName: item.containerName,
2672
+ dropDocumentOutsideOption: item.dropDocumentOutsideOption,
2673
+ targetComponent: item.component,
2674
+ navigationTitle: item.navigationTitle,
2675
+ "data-container-name": item.containerName,
2676
+ "data-layout-name": layoutName,
2677
+ "data-parent-layout-name": parentLayoutName,
2678
+ dropEndCallback: ({
2679
+ x,
2680
+ y,
2681
+ containerName: appendContainerName
2682
+ }) => {
2683
+ if (!rootRef.current || !layoutRef.current)
2684
+ return;
2685
+ const isRootOver = isOverDrop(
2686
+ {
2687
+ x,
2688
+ y,
2689
+ element: rootRef.current
2690
+ }
2691
+ );
2692
+ const isLayoutInner = isInnerDrop(
2693
+ {
2694
+ x,
2695
+ y,
2696
+ element: layoutRef.current
2697
+ }
2698
+ );
2699
+ if (!isRootOver && !isLayoutInner || !isRootOver && isLayoutInner && centerDropTargetComponentRef.current.length > 1) {
2700
+ const option = {};
2701
+ if (centerDropTargetComponentRef.current.length > 1) {
2702
+ const {
2703
+ adjacentItem,
2704
+ adjacentIndex
2705
+ } = getAdjacentItem(
2706
+ centerDropTargetComponentRef.current,
2707
+ activeIndexRef.current
2708
+ );
2709
+ if (adjacentItem && activeIndexRef.current === index) {
2710
+ Object.assign(
2711
+ option,
2712
+ {
2713
+ x,
2714
+ y,
2715
+ targetComponent: adjacentItem.component,
2716
+ nextContainerName: adjacentItem.containerName,
2717
+ orderName: "center",
2718
+ dropTargetComponentEvent: {
2719
+ navigationTitle: adjacentItem.navigationTitle,
2720
+ dropDocumentOutsideOption: adjacentItem.dropDocumentOutsideOption,
2721
+ direction,
2722
+ screenKey
2723
+ }
2724
+ }
2725
+ );
2726
+ }
2727
+ }
2728
+ if (index === 0) {
2729
+ dropMovementEventSubject.next(
2730
+ {
2731
+ state: "remove",
2732
+ targetContainerName: item.containerName,
2733
+ targetParentLayoutName: parentLayoutName,
2734
+ targetLayoutName: layoutName,
2735
+ ...option
2736
+ }
2737
+ );
2738
+ } else {
2739
+ dropMovementEventSubject.next(
2740
+ {
2741
+ state: "remove",
2742
+ targetContainerName: item.containerName,
2743
+ targetParentLayoutName: "",
2744
+ targetLayoutName: layoutName,
2745
+ ...option
2746
+ }
2747
+ );
2748
+ }
2796
2749
  }
2797
- ],
2798
- rootName
2799
- }
2750
+ }
2751
+ },
2752
+ item.navigationTitle
2800
2753
  )
2801
- },
2802
- cName
2754
+ )
2803
2755
  )
2804
- ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", {})
2805
- ]
2806
- }
2807
- ),
2808
- boundaryContainerSize && /* @__PURE__ */ jsxRuntime.jsx(
2809
- "div",
2756
+ ),
2757
+ /* @__PURE__ */ React.createElement(FlexLayoutSplitScreenDragBoxTitleMore, null)
2758
+ )
2759
+ ),
2760
+ (() => {
2761
+ const target = centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0];
2762
+ return target.component;
2763
+ })()
2764
+ )
2765
+ )) : /* @__PURE__ */ React.createElement("div", null),
2766
+ afterDropTargetComponent.length != 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, afterDropTargetComponent.map(
2767
+ ({
2768
+ containerName: cName,
2769
+ component,
2770
+ navigationTitle,
2771
+ dropDocumentOutsideOption,
2772
+ screenKey: screenKey2
2773
+ }, i) => /* @__PURE__ */ React.createElement(
2774
+ FlexLayoutContainer,
2810
2775
  {
2811
- className: `${FlexLayout_default["flex-split-screen-boundary-container"]}`,
2812
- style: { ...boundaryContainerSize },
2813
- children: "\u2B07\uFE0F\uB4DC\uB86D\uD558\uBA74 \uD654\uBA74\uC774 \uBD84\uD560\uB429\uB2C8\uB2E4."
2814
- }
2776
+ containerName: cName,
2777
+ isInitialResizable: true,
2778
+ isResizePanel: i !== afterDropTargetComponent.length - 1,
2779
+ key: cName
2780
+ },
2781
+ /* @__PURE__ */ React.createElement(
2782
+ FlexLayoutSplitScreenChild,
2783
+ {
2784
+ parentDirection: direction,
2785
+ layoutName: `${layoutName}_after-${depth}`,
2786
+ parentLayoutName: layoutName,
2787
+ containerName: cName,
2788
+ depth: depth + 1,
2789
+ rootRef,
2790
+ screenKey: screenKey2,
2791
+ initialCenterComponents: [
2792
+ {
2793
+ navigationTitle,
2794
+ component,
2795
+ containerName: cName,
2796
+ dropDocumentOutsideOption,
2797
+ screenKey: screenKey2
2798
+ }
2799
+ ],
2800
+ rootName
2801
+ }
2802
+ )
2815
2803
  )
2816
- ]
2817
- }
2818
- ) });
2804
+ )) : /* @__PURE__ */ React.createElement("div", null)
2805
+ ),
2806
+ boundaryContainerSize && /* @__PURE__ */ React.createElement(
2807
+ "div",
2808
+ {
2809
+ className: `${FlexLayout_default["flex-split-screen-boundary-container"]}`,
2810
+ style: { ...boundaryContainerSize }
2811
+ },
2812
+ "\u2B07\uFE0F\uB4DC\uB86D\uD558\uBA74 \uD654\uBA74\uC774 \uBD84\uD560\uB429\uB2C8\uB2E4."
2813
+ )
2814
+ ));
2819
2815
  }
2820
- FlexLayoutSplitScreen.displayName = "FlexLayoutSplitScreen";
2821
- var FlexLayoutSplitScreen_default = FlexLayoutSplitScreen;
2822
2816
  function clamp(n, min, max) {
2823
2817
  return Math.max(min, Math.min(max, n));
2824
2818
  }
@@ -2859,33 +2853,33 @@ var FlexLayoutStickyBox = ({
2859
2853
  },
2860
2854
  ...rest
2861
2855
  }) => {
2862
- const offsetRef = react.useRef(offset);
2863
- const rootRef = react.useRef(null);
2864
- const contentRef = react.useRef(null);
2865
- const mutatingRef = react.useRef(false);
2866
- const lastOffsetRef = react.useRef(0);
2867
- const [resolvedEdge, setResolvedEdge] = react.useState("top");
2868
- const rafId = react.useRef(null);
2869
- const [contentDynamicStyle, setContentDynamicStyle] = react.useState({});
2870
- react.useEffect(() => {
2856
+ const offsetRef = React2.useRef(offset);
2857
+ const rootRef = React2.useRef(null);
2858
+ const contentRef = React2.useRef(null);
2859
+ const mutatingRef = React2.useRef(false);
2860
+ const lastOffsetRef = React2.useRef(0);
2861
+ const [resolvedEdge, setResolvedEdge] = React2.useState("top");
2862
+ const rafId = React2.useRef(null);
2863
+ const [contentDynamicStyle, setContentDynamicStyle] = React2.useState({});
2864
+ React2.useEffect(() => {
2871
2865
  setContentDynamicStyle({
2872
2866
  willChange: "transform",
2873
2867
  transition: "transform 50ms linear"
2874
2868
  });
2875
2869
  }, []);
2876
- react.useEffect(() => {
2870
+ React2.useEffect(() => {
2877
2871
  offsetRef.current = offset;
2878
2872
  scheduleUpdate();
2879
2873
  }, [offset]);
2880
- const [ioRoot, setIoRoot] = react.useState(null);
2881
- react.useEffect(() => {
2874
+ const [ioRoot, setIoRoot] = React2.useState(null);
2875
+ React2.useEffect(() => {
2882
2876
  const root = scrollRoot ?? pickDefaultScrollRoot();
2883
2877
  setResolvedEdge(
2884
2878
  edge === "auto" ? isVerticalScroll(root) ? "top" : "left" : edge
2885
2879
  );
2886
2880
  setIoRoot(root);
2887
2881
  }, [edge, scrollRoot]);
2888
- react.useEffect(() => {
2882
+ React2.useEffect(() => {
2889
2883
  if (edge !== "auto") {
2890
2884
  setResolvedEdge(edge);
2891
2885
  return;
@@ -2893,7 +2887,7 @@ var FlexLayoutStickyBox = ({
2893
2887
  const vertical = isVerticalScroll(ioRoot);
2894
2888
  setResolvedEdge(vertical ? "top" : "left");
2895
2889
  }, [edge, ioRoot]);
2896
- react.useEffect(() => {
2890
+ React2.useEffect(() => {
2897
2891
  }, []);
2898
2892
  const scheduleUpdate = () => {
2899
2893
  if (rafId.current != null) return;
@@ -2971,7 +2965,7 @@ var FlexLayoutStickyBox = ({
2971
2965
  mutatingRef.current = false;
2972
2966
  });
2973
2967
  };
2974
- react.useEffect(() => {
2968
+ React2.useEffect(() => {
2975
2969
  if (typeof window == "undefined") return;
2976
2970
  const rootEl = rootRef.current;
2977
2971
  if (!rootEl) return;
@@ -3010,7 +3004,7 @@ var FlexLayoutStickyBox = ({
3010
3004
  }
3011
3005
  };
3012
3006
  }, [ioRoot, resolvedEdge, offset, debug]);
3013
- return /* @__PURE__ */ jsxRuntime.jsx(
3007
+ return /* @__PURE__ */ React2__default.default.createElement(
3014
3008
  "div",
3015
3009
  {
3016
3010
  ref: rootRef,
@@ -3023,24 +3017,24 @@ var FlexLayoutStickyBox = ({
3023
3017
  // 부모 높이를 채우도록 설정
3024
3018
  ...style
3025
3019
  },
3026
- ...rest,
3027
- children: /* @__PURE__ */ jsxRuntime.jsx(
3028
- "div",
3029
- {
3030
- ref: contentRef,
3031
- style: contentDynamicStyle,
3032
- children
3033
- }
3034
- )
3035
- }
3020
+ ...rest
3021
+ },
3022
+ /* @__PURE__ */ React2__default.default.createElement(
3023
+ "div",
3024
+ {
3025
+ ref: contentRef,
3026
+ style: contentDynamicStyle
3027
+ },
3028
+ children
3029
+ )
3036
3030
  );
3037
3031
  };
3038
3032
  var FlexLayoutStickyBox_default = FlexLayoutStickyBox;
3039
3033
 
3040
- exports.FlexLayout = FlexLayout_default2;
3041
- exports.FlexLayoutContainer = FlexLayoutContainer_default;
3042
- exports.FlexLayoutResizePanel = FlexLayoutResizePanel_default;
3043
- exports.FlexLayoutSplitScreen = FlexLayoutSplitScreen_default;
3034
+ exports.FlexLayout = FlexLayout;
3035
+ exports.FlexLayoutContainer = FlexLayoutContainer;
3036
+ exports.FlexLayoutResizePanel = FlexLayoutResizePanel;
3037
+ exports.FlexLayoutSplitScreen = FlexLayoutSplitScreen;
3044
3038
  exports.FlexLayoutSplitScreenDragBox = FlexLayoutSplitScreenDragBox;
3045
3039
  exports.FlexLayoutSplitScreenScrollBox = FlexLayoutSplitScreenScrollBox_default;
3046
3040
  exports.FlexLayoutStickyBox = FlexLayoutStickyBox_default;