@byeolnaerim/flex-layout 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/FlexLayoutSplitScreenDragBox-eCtq4kLd.d.cts +31 -0
- package/dist/FlexLayoutSplitScreenDragBox-eCtq4kLd.d.ts +31 -0
- package/dist/chunk-3EDKZTM3.js +3 -0
- package/dist/chunk-3EDKZTM3.js.map +1 -0
- package/dist/chunk-5HWEFTNQ.js +176 -0
- package/dist/chunk-5HWEFTNQ.js.map +1 -0
- package/dist/chunk-7J5JUVZK.js +3 -0
- package/dist/chunk-7J5JUVZK.js.map +1 -0
- package/dist/chunk-CFQQ6ZDC.js +182 -0
- package/dist/chunk-CFQQ6ZDC.js.map +1 -0
- package/dist/chunk-JM3CZ5DU.js +238 -0
- package/dist/chunk-JM3CZ5DU.js.map +1 -0
- package/dist/chunk-PMTZFSP4.js +219 -0
- package/dist/chunk-PMTZFSP4.js.map +1 -0
- package/dist/chunk-UYI4Z27V.js +2432 -0
- package/dist/chunk-UYI4Z27V.js.map +1 -0
- package/dist/chunk-W4CNFJTK.js +197 -0
- package/dist/chunk-W4CNFJTK.js.map +1 -0
- package/dist/chunk-YIHCWXKY.js +3 -0
- package/dist/chunk-YIHCWXKY.js.map +1 -0
- package/dist/components.cjs +3048 -0
- package/dist/components.cjs.map +1 -0
- package/dist/components.css +471 -0
- package/dist/components.css.map +1 -0
- package/dist/components.d.cts +122 -0
- package/dist/components.d.ts +122 -0
- package/dist/components.js +7 -0
- package/dist/components.js.map +1 -0
- package/dist/hooks.cjs +425 -0
- package/dist/hooks.cjs.map +1 -0
- package/dist/hooks.d.cts +37 -0
- package/dist/hooks.d.ts +37 -0
- package/dist/hooks.js +5 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.cts +10 -418
- package/dist/index.d.ts +10 -418
- package/dist/index.js +9 -3403
- package/dist/index.js.map +1 -1
- package/dist/providers.cjs +411 -0
- package/dist/providers.cjs.map +1 -0
- package/dist/providers.d.cts +54 -0
- package/dist/providers.d.ts +54 -0
- package/dist/providers.js +6 -0
- package/dist/providers.js.map +1 -0
- package/dist/store.cjs +204 -0
- package/dist/store.cjs.map +1 -0
- package/dist/store.d.cts +67 -0
- package/dist/store.d.ts +67 -0
- package/dist/store.js +4 -0
- package/dist/store.js.map +1 -0
- package/dist/useDrag-CYQnhUFk.d.cts +108 -0
- package/dist/useDrag-DR01Ob3s.d.ts +108 -0
- package/dist/utils.cjs +209 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +28 -0
- package/dist/utils.d.ts +28 -0
- package/dist/utils.js +4 -0
- package/dist/utils.js.map +1 -0
- package/package.json +25 -5
package/dist/hooks.d.cts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export { D as DragStateResultType, a as DragStateType, b as DropMovementEventType, c as DropPositionOrderName, d as DropTargetComponent, e as DropTargetComponentEvent, F as FolderEventType, P as PositionName, f as allSplitScreenCount, g as dragState, h as dropMovementEventSubject, i as folderEventSubject, s as setFolderEvent, u as useDragCapture, j as useDragEvents, k as useFolderEvent } from './useDrag-CYQnhUFk.cjs';
|
|
2
|
+
import { MutableRefObject } from 'react';
|
|
3
|
+
import 'rxjs';
|
|
4
|
+
import './FlexLayoutSplitScreenDragBox-eCtq4kLd.cjs';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
type OnReachTerminalType = {
|
|
8
|
+
isFirst: boolean;
|
|
9
|
+
isLast: boolean;
|
|
10
|
+
observer: IntersectionObserver;
|
|
11
|
+
};
|
|
12
|
+
interface UseListPagingForInfinityProps {
|
|
13
|
+
onReachTerminal?: (onReachTerminalData: OnReachTerminalType) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const useListPagingForSentinel: <E extends HTMLElement>({ onReachTerminal, }: UseListPagingForInfinityProps) => {
|
|
16
|
+
firstChildRef: (node: E | null) => void;
|
|
17
|
+
lastChildRef: (node: E | null) => void;
|
|
18
|
+
};
|
|
19
|
+
declare const usePaginationViewNumber: ({ initPageNumber, }: {
|
|
20
|
+
initPageNumber: number;
|
|
21
|
+
}) => {
|
|
22
|
+
showCurrentPageNumber: number;
|
|
23
|
+
showCurrentPageObserveTarget: (node: HTMLElement | null) => void;
|
|
24
|
+
};
|
|
25
|
+
declare const usePagingHandler: <T>({ lastCallPageNumber, dataListRef, }: {
|
|
26
|
+
lastCallPageNumber: number;
|
|
27
|
+
dataListRef: MutableRefObject<Array<T[] | null>>;
|
|
28
|
+
}) => {
|
|
29
|
+
jumpingPageNumberRef: MutableRefObject<number | null>;
|
|
30
|
+
paginationScrollIntoViewTarget: MutableRefObject<Record<number, HTMLDivElement | null>>;
|
|
31
|
+
pageNumberRef: MutableRefObject<number>;
|
|
32
|
+
setPaginationRef: (i: number) => (node: HTMLDivElement | null) => void;
|
|
33
|
+
handleReachTerminal: ({ isFirst, isLast, observer }: OnReachTerminalType, dataCallFetch: (callPageNumber: number) => void) => void;
|
|
34
|
+
handleClickPageChange: (page: number, dataCallFetch: (callPageNumber: number) => void) => void;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { type OnReachTerminalType, useListPagingForSentinel, usePaginationViewNumber, usePagingHandler };
|
package/dist/hooks.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export { D as DragStateResultType, a as DragStateType, b as DropMovementEventType, c as DropPositionOrderName, d as DropTargetComponent, e as DropTargetComponentEvent, F as FolderEventType, P as PositionName, f as allSplitScreenCount, g as dragState, h as dropMovementEventSubject, i as folderEventSubject, s as setFolderEvent, u as useDragCapture, j as useDragEvents, k as useFolderEvent } from './useDrag-DR01Ob3s.js';
|
|
2
|
+
import { MutableRefObject } from 'react';
|
|
3
|
+
import 'rxjs';
|
|
4
|
+
import './FlexLayoutSplitScreenDragBox-eCtq4kLd.js';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
type OnReachTerminalType = {
|
|
8
|
+
isFirst: boolean;
|
|
9
|
+
isLast: boolean;
|
|
10
|
+
observer: IntersectionObserver;
|
|
11
|
+
};
|
|
12
|
+
interface UseListPagingForInfinityProps {
|
|
13
|
+
onReachTerminal?: (onReachTerminalData: OnReachTerminalType) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const useListPagingForSentinel: <E extends HTMLElement>({ onReachTerminal, }: UseListPagingForInfinityProps) => {
|
|
16
|
+
firstChildRef: (node: E | null) => void;
|
|
17
|
+
lastChildRef: (node: E | null) => void;
|
|
18
|
+
};
|
|
19
|
+
declare const usePaginationViewNumber: ({ initPageNumber, }: {
|
|
20
|
+
initPageNumber: number;
|
|
21
|
+
}) => {
|
|
22
|
+
showCurrentPageNumber: number;
|
|
23
|
+
showCurrentPageObserveTarget: (node: HTMLElement | null) => void;
|
|
24
|
+
};
|
|
25
|
+
declare const usePagingHandler: <T>({ lastCallPageNumber, dataListRef, }: {
|
|
26
|
+
lastCallPageNumber: number;
|
|
27
|
+
dataListRef: MutableRefObject<Array<T[] | null>>;
|
|
28
|
+
}) => {
|
|
29
|
+
jumpingPageNumberRef: MutableRefObject<number | null>;
|
|
30
|
+
paginationScrollIntoViewTarget: MutableRefObject<Record<number, HTMLDivElement | null>>;
|
|
31
|
+
pageNumberRef: MutableRefObject<number>;
|
|
32
|
+
setPaginationRef: (i: number) => (node: HTMLDivElement | null) => void;
|
|
33
|
+
handleReachTerminal: ({ isFirst, isLast, observer }: OnReachTerminalType, dataCallFetch: (callPageNumber: number) => void) => void;
|
|
34
|
+
handleClickPageChange: (page: number, dataCallFetch: (callPageNumber: number) => void) => void;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { type OnReachTerminalType, useListPagingForSentinel, usePaginationViewNumber, usePagingHandler };
|
package/dist/hooks.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { useListPagingForSentinel, usePaginationViewNumber, usePagingHandler } from './chunk-5HWEFTNQ.js';
|
|
2
|
+
export { allSplitScreenCount, dragState, dropMovementEventSubject, folderEventSubject, setFolderEvent, useDragCapture, useDragEvents, useFolderEvent } from './chunk-PMTZFSP4.js';
|
|
3
|
+
import './chunk-W4CNFJTK.js';
|
|
4
|
+
//# sourceMappingURL=hooks.js.map
|
|
5
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"hooks.js"}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,418 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
| 'top-cylinder'
|
|
12
|
-
| 'left-cylinder'
|
|
13
|
-
| 'right-cylinder';
|
|
14
|
-
|
|
15
|
-
type Direction = 'row' | 'column';
|
|
16
|
-
type PanelMovementMode = 'bulldozer' | 'divorce' | 'stalker';
|
|
17
|
-
type FitContent = 'width' | 'height';
|
|
18
|
-
|
|
19
|
-
interface FlexLayoutChildrenType {
|
|
20
|
-
isInitialResizable?: boolean;
|
|
21
|
-
grow?: number;
|
|
22
|
-
prevGrow?: number;
|
|
23
|
-
panelMode?: ResizePanelMode;
|
|
24
|
-
isFitContent?: boolean;
|
|
25
|
-
isFitResize?: boolean;
|
|
26
|
-
isResizePanel?: boolean;
|
|
27
|
-
containerName: string;
|
|
28
|
-
children: ReactNode;
|
|
29
|
-
className?: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
interface FlexContainerProps extends FlexLayoutChildrenType {
|
|
33
|
-
readonly fitContent?: FitContent;
|
|
34
|
-
readonly containerCount?: number;
|
|
35
|
-
readonly layoutName?: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
interface FlexLayoutProps
|
|
39
|
-
extends Omit<
|
|
40
|
-
React.HTMLAttributes<HTMLDivElement>,
|
|
41
|
-
'children',
|
|
42
|
-
'id',
|
|
43
|
-
'panelClassName'
|
|
44
|
-
> {
|
|
45
|
-
direction: Direction;
|
|
46
|
-
children:
|
|
47
|
-
| ReactElement<FlexLayoutChildrenType>[]
|
|
48
|
-
| ReactElement<FlexLayoutChildrenType>;
|
|
49
|
-
layoutName: string;
|
|
50
|
-
isSplitScreen?: boolean;
|
|
51
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
52
|
-
className?: string;
|
|
53
|
-
panelClassName?: string;
|
|
54
|
-
panelMovementMode?: PanelMovementMode;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
type FlexLayoutResizePanelProps = {
|
|
58
|
-
direction: string;
|
|
59
|
-
containerCount: number;
|
|
60
|
-
panelMode?: ResizePanelMode;
|
|
61
|
-
containerName: string;
|
|
62
|
-
layoutName: string;
|
|
63
|
-
panelMovementMode: PanelMovementMode;
|
|
64
|
-
panelClassName?: string;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
declare const FlexLayout: ({ layoutName, direction, children, ref, className, panelClassName, panelMovementMode, ...props }: FlexLayoutProps) => react_jsx_runtime.JSX.Element | null;
|
|
68
|
-
|
|
69
|
-
declare const FlexLayoutContainer: ({ isFitContent, isFitResize, containerName, grow: initialGrow, prevGrow: initialPrevGrow, isInitialResizable, isResizePanel, children, className, panelMode, }: FlexContainerProps) => react_jsx_runtime.JSX.Element;
|
|
70
|
-
|
|
71
|
-
declare const FlexLayoutResizePanel: ({ direction, containerCount, panelMode, containerName, layoutName, panelClassName, panelMovementMode, }: FlexLayoutResizePanelProps) => react_jsx_runtime.JSX.Element;
|
|
72
|
-
|
|
73
|
-
interface FlexLayoutSplitScreenDragBoxProps<E extends HTMLElement = HTMLElement> extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
74
|
-
onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
75
|
-
onTouchStart?: (event: TouchEvent<HTMLDivElement>) => void;
|
|
76
|
-
dropEndCallback?: ({ x, y, containerName, }: {
|
|
77
|
-
x: number;
|
|
78
|
-
y: number;
|
|
79
|
-
containerName: string;
|
|
80
|
-
}) => void;
|
|
81
|
-
style?: CSSProperties;
|
|
82
|
-
navigationTitle?: string;
|
|
83
|
-
targetComponent?: ReactElement;
|
|
84
|
-
dropDocumentOutsideOption?: DropDocumentOutsideOption;
|
|
85
|
-
children: ReactNode;
|
|
86
|
-
containerName: string;
|
|
87
|
-
screenKey?: string;
|
|
88
|
-
isBlockingActiveInput?: boolean;
|
|
89
|
-
customData?: Record<string, string | number | boolean | undefined>;
|
|
90
|
-
scrollTargetRef?: RefObject<E>;
|
|
91
|
-
}
|
|
92
|
-
interface DropDocumentOutsideOption {
|
|
93
|
-
openUrl: string;
|
|
94
|
-
widthRatio?: number;
|
|
95
|
-
heightRatio?: number;
|
|
96
|
-
isNewTap?: boolean;
|
|
97
|
-
}
|
|
98
|
-
declare function FlexLayoutSplitScreenDragBox<E extends HTMLElement>({ onMouseDown, onTouchStart, dropEndCallback, style, navigationTitle, targetComponent, containerName, children, className, dropDocumentOutsideOption, screenKey, isBlockingActiveInput, customData, scrollTargetRef, ...props }: FlexLayoutSplitScreenDragBoxProps): react_jsx_runtime.JSX.Element;
|
|
99
|
-
|
|
100
|
-
type FlexLayoutSplitScreenProps = {
|
|
101
|
-
layoutName: string;
|
|
102
|
-
containerName: string;
|
|
103
|
-
children: ReactElement;
|
|
104
|
-
navigationTitle: string;
|
|
105
|
-
dropDocumentOutsideOption?: DropDocumentOutsideOption;
|
|
106
|
-
screenKey?: string;
|
|
107
|
-
};
|
|
108
|
-
declare function FlexLayoutSplitScreen({ children, containerName, layoutName, navigationTitle, dropDocumentOutsideOption, screenKey, }: FlexLayoutSplitScreenProps): react_jsx_runtime.JSX.Element;
|
|
109
|
-
declare namespace FlexLayoutSplitScreen {
|
|
110
|
-
var displayName: string;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
interface FlexLayoutSplitScreenScrollBoxProps extends HTMLAttributes<HTMLDivElement> {
|
|
114
|
-
keyName: string;
|
|
115
|
-
className?: string;
|
|
116
|
-
direction?: "x" | "y";
|
|
117
|
-
isDefaultScrollStyle?: boolean;
|
|
118
|
-
}
|
|
119
|
-
declare const _default: React$1.MemoExoticComponent<({ className, children, keyName, direction, isDefaultScrollStyle, ...props }: FlexLayoutSplitScreenScrollBoxProps) => react_jsx_runtime.JSX.Element>;
|
|
120
|
-
|
|
121
|
-
type Edge = 'auto' | 'top' | 'bottom' | 'left' | 'right';
|
|
122
|
-
interface FlexLayoutStickyBoxProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
123
|
-
/** 어느 방향으로 붙일지. 기본은 'auto' (세로 스크롤이면 top, 가로 스크롤이면 left) */
|
|
124
|
-
edge?: Edge;
|
|
125
|
-
/** 화면 모서리와의 여백(px). 기본 16 */
|
|
126
|
-
offset?: number;
|
|
127
|
-
/** 스크롤 루트. 명시 안 하면 가장 흔한 케이스인 <main> → 없으면 window(=viewport) */
|
|
128
|
-
scrollRoot?: Element | null;
|
|
129
|
-
/** 디버그 보조선 표시 */
|
|
130
|
-
debug?: boolean;
|
|
131
|
-
/** 자식 */
|
|
132
|
-
children: React__default.ReactNode;
|
|
133
|
-
onTranslateChange?: (value: number, rootRef: React__default.RefObject<HTMLDivElement | null>, contentRef: React__default.RefObject<HTMLDivElement | null>) => void;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* FlexLayoutStickyBox
|
|
137
|
-
* 부모(실제 경계) 안에서만 움직이며, `transform`을 동적으로 부여해
|
|
138
|
-
* “sticky처럼 보이도록” 만든다.
|
|
139
|
-
*
|
|
140
|
-
* 구조:
|
|
141
|
-
* <div data-root> // 이 박스가 부모 경계 안에서 공간을 차지
|
|
142
|
-
* <div data-content> // 이 박스가 transform으로 부드럽게 움직임
|
|
143
|
-
* {children}
|
|
144
|
-
* </div>
|
|
145
|
-
* </div>
|
|
146
|
-
*/
|
|
147
|
-
declare const FlexLayoutStickyBox: React__default.FC<FlexLayoutStickyBoxProps>;
|
|
148
|
-
|
|
149
|
-
interface DragStateType {
|
|
150
|
-
isDragging: boolean;
|
|
151
|
-
isDrop: boolean;
|
|
152
|
-
navigationTitle?: string;
|
|
153
|
-
children?: ReactElement;
|
|
154
|
-
containerName: string;
|
|
155
|
-
x: number;
|
|
156
|
-
y: number;
|
|
157
|
-
dropDocumentOutsideOption?: DropDocumentOutsideOption;
|
|
158
|
-
dropEndCallback?: ({ x, y, containerName, }: {
|
|
159
|
-
x: number;
|
|
160
|
-
y: number;
|
|
161
|
-
containerName: string;
|
|
162
|
-
}) => void;
|
|
163
|
-
screenKey?: string;
|
|
164
|
-
customData?: Record<string, string | number | boolean | undefined>;
|
|
165
|
-
}
|
|
166
|
-
type PositionName = "centerBoundary" | "leftBoundary" | "rightBoundary" | "topBoundary" | "bottomBoundary";
|
|
167
|
-
interface DragStateResultType extends DragStateType {
|
|
168
|
-
positionName: PositionName;
|
|
169
|
-
isOver: boolean;
|
|
170
|
-
}
|
|
171
|
-
declare const dragState: Subject<DragStateType>;
|
|
172
|
-
declare const useDragCapture: (targetRef: RefObject<HTMLElement | null>) => DragStateResultType | null;
|
|
173
|
-
interface DropTargetComponent {
|
|
174
|
-
containerName: string;
|
|
175
|
-
component: ReactElement;
|
|
176
|
-
navigationTitle?: string;
|
|
177
|
-
dropDocumentOutsideOption?: DropDocumentOutsideOption;
|
|
178
|
-
screenKey: string;
|
|
179
|
-
}
|
|
180
|
-
type DropPositionOrderName = "before" | "center" | "after";
|
|
181
|
-
interface DropMovementEventType {
|
|
182
|
-
state: "remove" | "append" | "change";
|
|
183
|
-
targetParentLayoutName: string;
|
|
184
|
-
targetLayoutName: string;
|
|
185
|
-
targetContainerName: string;
|
|
186
|
-
targetComponent?: ReactElement;
|
|
187
|
-
nextContainerName?: string;
|
|
188
|
-
parentOrderName?: DropPositionOrderName;
|
|
189
|
-
orderName?: DropPositionOrderName;
|
|
190
|
-
x?: number;
|
|
191
|
-
y?: number;
|
|
192
|
-
dropEndCallback?: ({ x, y, containerName, }: {
|
|
193
|
-
x: number;
|
|
194
|
-
y: number;
|
|
195
|
-
containerName: string;
|
|
196
|
-
}) => void;
|
|
197
|
-
dropTargetComponentEvent?: DropTargetComponentEvent;
|
|
198
|
-
}
|
|
199
|
-
interface DropTargetComponentEvent extends Omit<DropTargetComponent, "containerName" | "component"> {
|
|
200
|
-
direction: "row" | "column";
|
|
201
|
-
}
|
|
202
|
-
declare const dropMovementEventSubject: Subject<DropMovementEventType>;
|
|
203
|
-
declare const allSplitScreenCount: BehaviorSubject<number>;
|
|
204
|
-
declare const useDragEvents: ({ isBlockingActiveInput, }: {
|
|
205
|
-
isBlockingActiveInput?: boolean;
|
|
206
|
-
}) => {
|
|
207
|
-
handleStart: ({ event: _event, dragStartCallback, }: {
|
|
208
|
-
event: React.MouseEvent | React.TouchEvent | Event;
|
|
209
|
-
dragStartCallback: ({ x, y }: {
|
|
210
|
-
x: number;
|
|
211
|
-
y: number;
|
|
212
|
-
}) => void;
|
|
213
|
-
}) => void;
|
|
214
|
-
handleMove: ({ event: _event, notDragCallback, dragStartCallback, moveingCallback, }: {
|
|
215
|
-
event: React.MouseEvent | React.TouchEvent | Event;
|
|
216
|
-
notDragCallback?: ({ x, y }: {
|
|
217
|
-
x: number;
|
|
218
|
-
y: number;
|
|
219
|
-
}) => void;
|
|
220
|
-
dragStartCallback: ({ x, y }: {
|
|
221
|
-
x: number;
|
|
222
|
-
y: number;
|
|
223
|
-
}) => void;
|
|
224
|
-
moveingCallback: ({ x, y }: {
|
|
225
|
-
x: number;
|
|
226
|
-
y: number;
|
|
227
|
-
}) => void;
|
|
228
|
-
}) => void;
|
|
229
|
-
handleEnd: ({ event: _event, dragEndCallback, }: {
|
|
230
|
-
event: React.MouseEvent | React.TouchEvent | Event;
|
|
231
|
-
dragEndCallback: ({ x, y }: {
|
|
232
|
-
x: number;
|
|
233
|
-
y: number;
|
|
234
|
-
}) => void;
|
|
235
|
-
}) => void;
|
|
236
|
-
};
|
|
237
|
-
type FolderEventType = {
|
|
238
|
-
type: "new" | "sort" | "title" | "delete" | "insert" | "update" | "next";
|
|
239
|
-
isFolder: boolean;
|
|
240
|
-
title: string;
|
|
241
|
-
sort?: number;
|
|
242
|
-
parentId?: string;
|
|
243
|
-
id?: string;
|
|
244
|
-
newData?: any;
|
|
245
|
-
};
|
|
246
|
-
declare const folderEventSubject: Subject<FolderEventType>;
|
|
247
|
-
declare const setFolderEvent: (newValue: FolderEventType) => void;
|
|
248
|
-
declare const useFolderEvent: () => {
|
|
249
|
-
folderEvent: FolderEventType | null;
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
type OnReachTerminalType = {
|
|
253
|
-
isFirst: boolean;
|
|
254
|
-
isLast: boolean;
|
|
255
|
-
observer: IntersectionObserver;
|
|
256
|
-
};
|
|
257
|
-
interface UseListPagingForInfinityProps {
|
|
258
|
-
onReachTerminal?: (onReachTerminalData: OnReachTerminalType) => void;
|
|
259
|
-
}
|
|
260
|
-
declare const useListPagingForSentinel: <E extends HTMLElement>({ onReachTerminal, }: UseListPagingForInfinityProps) => {
|
|
261
|
-
firstChildRef: (node: E | null) => void;
|
|
262
|
-
lastChildRef: (node: E | null) => void;
|
|
263
|
-
};
|
|
264
|
-
declare const usePaginationViewNumber: ({ initPageNumber, }: {
|
|
265
|
-
initPageNumber: number;
|
|
266
|
-
}) => {
|
|
267
|
-
showCurrentPageNumber: number;
|
|
268
|
-
showCurrentPageObserveTarget: (node: HTMLElement | null) => void;
|
|
269
|
-
};
|
|
270
|
-
declare const usePagingHandler: <T>({ lastCallPageNumber, dataListRef, }: {
|
|
271
|
-
lastCallPageNumber: number;
|
|
272
|
-
dataListRef: MutableRefObject<Array<T[] | null>>;
|
|
273
|
-
}) => {
|
|
274
|
-
jumpingPageNumberRef: MutableRefObject<number | null>;
|
|
275
|
-
paginationScrollIntoViewTarget: MutableRefObject<Record<number, HTMLDivElement | null>>;
|
|
276
|
-
pageNumberRef: MutableRefObject<number>;
|
|
277
|
-
setPaginationRef: (i: number) => (node: HTMLDivElement | null) => void;
|
|
278
|
-
handleReachTerminal: ({ isFirst, isLast, observer }: OnReachTerminalType, dataCallFetch: (callPageNumber: number) => void) => void;
|
|
279
|
-
handleClickPageChange: (page: number, dataCallFetch: (callPageNumber: number) => void) => void;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
type SubjectMap<T> = Record<string, Subject<T>>;
|
|
283
|
-
interface ContainerStateRequest {
|
|
284
|
-
mode: "toggle" | "open" | "close";
|
|
285
|
-
initOpenState?: boolean;
|
|
286
|
-
onOpen?: () => void;
|
|
287
|
-
onClose?: () => void;
|
|
288
|
-
openOption?: {
|
|
289
|
-
isPrevSizeOpen?: boolean;
|
|
290
|
-
isResize?: boolean;
|
|
291
|
-
openGrowImportant?: number;
|
|
292
|
-
};
|
|
293
|
-
closeOption?: {
|
|
294
|
-
isResize?: boolean;
|
|
295
|
-
isDsiabledResizePanel?: boolean;
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
interface ContainerState {
|
|
299
|
-
isOpen: boolean;
|
|
300
|
-
targetContainer: HTMLElement;
|
|
301
|
-
grow: number;
|
|
302
|
-
}
|
|
303
|
-
declare const containerOpenCloseSubjectMap: SubjectMap<ContainerStateRequest>;
|
|
304
|
-
declare const containerSpreadSubjectMap: SubjectMap<ContainerState>;
|
|
305
|
-
declare const ContainerOpenCloseProvider: ({ layoutName, containerName, sizeName, }: {
|
|
306
|
-
layoutName: string;
|
|
307
|
-
containerName: string;
|
|
308
|
-
sizeName: "width" | "height";
|
|
309
|
-
}) => null;
|
|
310
|
-
declare const useContainers: (layoutName: string) => HTMLElement[];
|
|
311
|
-
declare const useLayoutName: (containerName: string) => string | undefined;
|
|
312
|
-
declare const useDecompositionLayout: ({ layoutName: initialLayoutName, containerName, }: {
|
|
313
|
-
layoutName?: string;
|
|
314
|
-
containerName: string;
|
|
315
|
-
}) => {
|
|
316
|
-
layout: HTMLElement[];
|
|
317
|
-
container: HTMLElement | undefined;
|
|
318
|
-
resizePanel: HTMLElement | undefined;
|
|
319
|
-
};
|
|
320
|
-
declare const useContainerSize: (containerName: string) => {
|
|
321
|
-
size: {
|
|
322
|
-
width: number;
|
|
323
|
-
height: number;
|
|
324
|
-
} | undefined;
|
|
325
|
-
};
|
|
326
|
-
declare const useDoubleClick: (containerName: string, opt: ContainerStateRequest) => {
|
|
327
|
-
isOpen: boolean | undefined;
|
|
328
|
-
isDoubleClick: boolean | undefined;
|
|
329
|
-
setIsDoubleClick: React$1.Dispatch<React$1.SetStateAction<boolean | undefined>>;
|
|
330
|
-
};
|
|
331
|
-
|
|
332
|
-
declare function isDocumentOut({ x, y }: {
|
|
333
|
-
x: number;
|
|
334
|
-
y: number;
|
|
335
|
-
}): boolean | undefined;
|
|
336
|
-
declare function getClientXy(event: Event): {
|
|
337
|
-
clientX: number;
|
|
338
|
-
clientY: number;
|
|
339
|
-
} | undefined;
|
|
340
|
-
declare function isOverMove(elementSize: number, elementMinSize: number): boolean;
|
|
341
|
-
declare function findNotCloseFlexContent(target: HTMLElement | Element | null, direction: 'previousElementSibling' | 'nextElementSibling'): HTMLElement | null;
|
|
342
|
-
declare function remain(flexContainerList: Array<HTMLElement>): Promise<unknown>;
|
|
343
|
-
declare function resize(list: Array<HTMLElement>, totalGrow: number): Promise<unknown>;
|
|
344
|
-
declare function mathWeight(totalCount: number, totalGrow: number): number;
|
|
345
|
-
declare function mathGrow(childSize: number, parentSize: number, containerCount: number): number;
|
|
346
|
-
declare function getGrow(growTarget: HTMLElement | Element): number;
|
|
347
|
-
declare function closeFlex(resizeTarget: HTMLElement, containers: HTMLElement[], { isResize, isDsiabledResizePanel, sizeName, }: {
|
|
348
|
-
isResize?: boolean;
|
|
349
|
-
isDsiabledResizePanel?: boolean;
|
|
350
|
-
sizeName: 'width' | 'height';
|
|
351
|
-
}): Promise<unknown>;
|
|
352
|
-
declare function openFlex(resizeTarget: HTMLElement, containers: HTMLElement[], { isPrevSizeOpen, isResize, openGrowImportant, sizeName, }: {
|
|
353
|
-
isPrevSizeOpen?: boolean;
|
|
354
|
-
isResize?: boolean;
|
|
355
|
-
openGrowImportant?: number;
|
|
356
|
-
sizeName?: 'width' | 'height';
|
|
357
|
-
}): Promise<unknown>;
|
|
358
|
-
|
|
359
|
-
interface ScrollPosition {
|
|
360
|
-
x: number;
|
|
361
|
-
y: number;
|
|
362
|
-
}
|
|
363
|
-
declare const scrollPositions: Record<string, ScrollPosition>;
|
|
364
|
-
/**
|
|
365
|
-
* 스크롤 위치 업데이트 함수
|
|
366
|
-
*
|
|
367
|
-
* 기존: 항상 store.next()가 호출됨 → 바뀌지 않았다면 건너뛰도록 변경
|
|
368
|
-
*/
|
|
369
|
-
declare const setScrollPosition: (layoutName: string, position: ScrollPosition) => void;
|
|
370
|
-
/**
|
|
371
|
-
* 스크롤 위치 구독
|
|
372
|
-
*/
|
|
373
|
-
declare const getScrollPosition: (layoutName: string) => rxjs.Observable<ScrollPosition>;
|
|
374
|
-
declare const removeScrollPosition: (layoutName: string) => void;
|
|
375
|
-
type SplitScreenComponents = {
|
|
376
|
-
afterDropTargetComponent: DropTargetComponent[];
|
|
377
|
-
beforeDropTargetComponent: DropTargetComponent[];
|
|
378
|
-
centerDropTargetComponent: DropTargetComponent[];
|
|
379
|
-
direction: "row" | "column";
|
|
380
|
-
};
|
|
381
|
-
type LayoutSplitScreenState = Record<string, Record<string, SplitScreenComponents>>;
|
|
382
|
-
declare const layoutSplitScreenStore: BehaviorSubject<LayoutSplitScreenState>;
|
|
383
|
-
declare const setSplitScreen: (rootName: string, layoutName: string, newComponents: SplitScreenComponents) => void;
|
|
384
|
-
declare const resetRootSplitScreen: (rootName: string) => void;
|
|
385
|
-
declare const removeSplitScreenChild: (rootName: string, layoutName: string) => void;
|
|
386
|
-
declare const getCurrentSplitScreenComponents: (rootName: string, layoutName: string) => SplitScreenComponents | undefined;
|
|
387
|
-
declare const getSplitScreen: (rootName: string, layoutName: string) => rxjs.Observable<SplitScreenComponents>;
|
|
388
|
-
type RefStore = {
|
|
389
|
-
[layoutName: string]: {
|
|
390
|
-
[containerName: string]: RefObject<HTMLElement | null>;
|
|
391
|
-
};
|
|
392
|
-
};
|
|
393
|
-
declare const flexContainerStore: BehaviorSubject<RefStore>;
|
|
394
|
-
declare const flexResizePanelStore: BehaviorSubject<RefStore>;
|
|
395
|
-
/**
|
|
396
|
-
* ref를 업데이트하는 함수
|
|
397
|
-
* - 기존: 무조건 next() → 새/이전 상태 비교 후 다를 경우에만 next()
|
|
398
|
-
*/
|
|
399
|
-
declare const setContainerRef: <T extends HTMLElement>(layoutName: string, containerName: string, ref: React.RefObject<T | null> | null) => void;
|
|
400
|
-
declare const setResizePanelRef: <T extends HTMLElement>(layoutName: string, containerName: string, ref: React.RefObject<T | null> | null) => void;
|
|
401
|
-
declare const getLayoutInfos: (layoutName: string) => rxjs.Observable<{
|
|
402
|
-
container: {
|
|
403
|
-
[containerName: string]: RefObject<HTMLElement | null>;
|
|
404
|
-
};
|
|
405
|
-
resizePanel: {
|
|
406
|
-
[containerName: string]: RefObject<HTMLElement | null>;
|
|
407
|
-
};
|
|
408
|
-
}>;
|
|
409
|
-
declare const getContainerRef: ({ containerName, layoutName, }: {
|
|
410
|
-
containerName: string;
|
|
411
|
-
layoutName?: string;
|
|
412
|
-
}) => rxjs.Observable<RefObject<HTMLElement | null> | undefined>;
|
|
413
|
-
declare const getResizePanelRef: ({ containerName, layoutName, }: {
|
|
414
|
-
containerName: string;
|
|
415
|
-
layoutName?: string;
|
|
416
|
-
}) => rxjs.Observable<RefObject<HTMLElement | null> | undefined>;
|
|
417
|
-
|
|
418
|
-
export { ContainerOpenCloseProvider, type DragStateResultType, type DragStateType, type DropMovementEventType, type DropPositionOrderName, type DropTargetComponent, type DropTargetComponentEvent, FlexLayout, FlexLayoutContainer, FlexLayoutResizePanel, FlexLayoutSplitScreen, FlexLayoutSplitScreenDragBox, _default as FlexLayoutSplitScreenScrollBox, FlexLayoutStickyBox, type FolderEventType, type LayoutSplitScreenState, type OnReachTerminalType, type PositionName, type ScrollPosition, type SplitScreenComponents, type SubjectMap, allSplitScreenCount, closeFlex, containerOpenCloseSubjectMap, containerSpreadSubjectMap, dragState, dropMovementEventSubject, findNotCloseFlexContent, flexContainerStore, flexResizePanelStore, folderEventSubject, getClientXy, getContainerRef, getCurrentSplitScreenComponents, getGrow, getLayoutInfos, getResizePanelRef, getScrollPosition, getSplitScreen, isDocumentOut, isOverMove, layoutSplitScreenStore, mathGrow, mathWeight, openFlex, remain, removeScrollPosition, removeSplitScreenChild, resetRootSplitScreen, resize, scrollPositions, setContainerRef, setFolderEvent, setResizePanelRef, setScrollPosition, setSplitScreen, useContainerSize, useContainers, useDecompositionLayout, useDoubleClick, useDragCapture, useDragEvents, useFolderEvent, useLayoutName, useListPagingForSentinel, usePaginationViewNumber, usePagingHandler };
|
|
1
|
+
export { FlexLayout, FlexLayoutContainer, FlexLayoutResizePanel, FlexLayoutSplitScreen, FlexLayoutSplitScreenScrollBox, FlexLayoutStickyBox } from './components.cjs';
|
|
2
|
+
export { F as FlexLayoutSplitScreenDragBox } from './FlexLayoutSplitScreenDragBox-eCtq4kLd.cjs';
|
|
3
|
+
export { D as DragStateResultType, a as DragStateType, b as DropMovementEventType, c as DropPositionOrderName, d as DropTargetComponent, e as DropTargetComponentEvent, F as FolderEventType, P as PositionName, f as allSplitScreenCount, g as dragState, h as dropMovementEventSubject, i as folderEventSubject, s as setFolderEvent, u as useDragCapture, j as useDragEvents, k as useFolderEvent } from './useDrag-CYQnhUFk.cjs';
|
|
4
|
+
export { OnReachTerminalType, useListPagingForSentinel, usePaginationViewNumber, usePagingHandler } from './hooks.cjs';
|
|
5
|
+
export { ContainerOpenCloseProvider, SubjectMap, containerOpenCloseSubjectMap, containerSpreadSubjectMap, useContainerSize, useContainers, useDecompositionLayout, useDoubleClick, useLayoutName } from './providers.cjs';
|
|
6
|
+
export { closeFlex, findNotCloseFlexContent, getClientXy, getGrow, isDocumentOut, isOverMove, mathGrow, mathWeight, openFlex, remain, resize } from './utils.cjs';
|
|
7
|
+
export { LayoutSplitScreenState, ScrollPosition, SplitScreenComponents, flexContainerStore, flexResizePanelStore, getContainerRef, getCurrentSplitScreenComponents, getLayoutInfos, getResizePanelRef, getScrollPosition, getSplitScreen, layoutSplitScreenStore, removeScrollPosition, removeSplitScreenChild, resetRootSplitScreen, scrollPositions, setContainerRef, setResizePanelRef, setScrollPosition, setSplitScreen } from './store.cjs';
|
|
8
|
+
import 'react/jsx-runtime';
|
|
9
|
+
import 'react';
|
|
10
|
+
import 'rxjs';
|