@byeolnaerim/flex-layout 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) 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/flex-layout/components/FlexLayout.cjs +76 -0
  5. package/dist/flex-layout/components/FlexLayout.cjs.map +1 -0
  6. package/dist/flex-layout/components/FlexLayout.d.ts +2 -0
  7. package/dist/flex-layout/components/FlexLayout.js +70 -0
  8. package/dist/flex-layout/components/FlexLayout.js.map +1 -0
  9. package/dist/flex-layout/components/FlexLayoutContainer.cjs +196 -0
  10. package/dist/flex-layout/components/FlexLayoutContainer.cjs.map +1 -0
  11. package/dist/flex-layout/components/FlexLayoutContainer.d.ts +2 -0
  12. package/dist/flex-layout/components/FlexLayoutContainer.js +189 -0
  13. package/dist/flex-layout/components/FlexLayoutContainer.js.map +1 -0
  14. package/dist/flex-layout/components/FlexLayoutResizePanel.cjs +181 -0
  15. package/dist/flex-layout/components/FlexLayoutResizePanel.cjs.map +1 -0
  16. package/dist/flex-layout/components/FlexLayoutResizePanel.d.ts +2 -0
  17. package/dist/flex-layout/components/FlexLayoutResizePanel.js +175 -0
  18. package/dist/flex-layout/components/FlexLayoutResizePanel.js.map +1 -0
  19. package/dist/flex-layout/components/FlexLayoutSplitScreen.cjs +1211 -0
  20. package/dist/flex-layout/components/FlexLayoutSplitScreen.cjs.map +1 -0
  21. package/dist/flex-layout/components/FlexLayoutSplitScreen.d.ts +11 -0
  22. package/dist/flex-layout/components/FlexLayoutSplitScreen.js +1197 -0
  23. package/dist/flex-layout/components/FlexLayoutSplitScreen.js.map +1 -0
  24. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBox.cjs +339 -0
  25. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBox.cjs.map +1 -0
  26. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBox.d.ts +27 -0
  27. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBox.js +333 -0
  28. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBox.js.map +1 -0
  29. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.cjs +32 -0
  30. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.cjs.map +1 -0
  31. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.d.ts +5 -0
  32. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.js +25 -0
  33. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.js.map +1 -0
  34. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.cjs +40 -0
  35. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.cjs.map +1 -0
  36. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.d.ts +8 -0
  37. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.js +34 -0
  38. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.js.map +1 -0
  39. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.cjs +30 -0
  40. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.cjs.map +1 -0
  41. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.d.ts +4 -0
  42. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.js +24 -0
  43. package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.js.map +1 -0
  44. package/dist/flex-layout/components/FlexLayoutSplitScreenScrollBox.cjs +109 -0
  45. package/dist/flex-layout/components/FlexLayoutSplitScreenScrollBox.cjs.map +1 -0
  46. package/dist/flex-layout/components/FlexLayoutSplitScreenScrollBox.d.ts +9 -0
  47. package/dist/flex-layout/components/FlexLayoutSplitScreenScrollBox.js +103 -0
  48. package/dist/flex-layout/components/FlexLayoutSplitScreenScrollBox.js.map +1 -0
  49. package/dist/flex-layout/components/FlexLayoutStickyBox.cjs +226 -0
  50. package/dist/flex-layout/components/FlexLayoutStickyBox.cjs.map +1 -0
  51. package/dist/flex-layout/components/FlexLayoutStickyBox.d.ts +29 -0
  52. package/dist/flex-layout/components/FlexLayoutStickyBox.js +224 -0
  53. package/dist/flex-layout/components/FlexLayoutStickyBox.js.map +1 -0
  54. package/dist/flex-layout/components/index.cjs +52 -0
  55. package/dist/flex-layout/components/index.cjs.map +1 -0
  56. package/dist/flex-layout/components/index.d.ts +7 -0
  57. package/dist/flex-layout/components/index.js +9 -0
  58. package/dist/flex-layout/components/index.js.map +1 -0
  59. package/dist/flex-layout/hooks/index.cjs +21 -0
  60. package/dist/flex-layout/hooks/index.cjs.map +1 -0
  61. package/dist/flex-layout/hooks/index.d.ts +2 -0
  62. package/dist/flex-layout/hooks/index.js +4 -0
  63. package/dist/flex-layout/hooks/index.js.map +1 -0
  64. package/dist/{hooks.cjs → flex-layout/hooks/useDrag.cjs} +15 -208
  65. package/dist/flex-layout/hooks/useDrag.cjs.map +1 -0
  66. package/dist/{useDrag-DR01Ob3s.d.ts → flex-layout/hooks/useDrag.d.ts} +22 -25
  67. package/dist/{hooks.js → flex-layout/hooks/useDrag.js} +13 -203
  68. package/dist/flex-layout/hooks/useDrag.js.map +1 -0
  69. package/dist/flex-layout/hooks/useFlexLayoutSplitScreen.cjs +118 -0
  70. package/dist/flex-layout/hooks/useFlexLayoutSplitScreen.cjs.map +1 -0
  71. package/dist/flex-layout/hooks/useFlexLayoutSplitScreen.d.ts +28 -0
  72. package/dist/flex-layout/hooks/useFlexLayoutSplitScreen.js +116 -0
  73. package/dist/flex-layout/hooks/useFlexLayoutSplitScreen.js.map +1 -0
  74. package/dist/flex-layout/hooks/useListPaging.cjs +179 -0
  75. package/dist/flex-layout/hooks/useListPaging.cjs.map +1 -0
  76. package/dist/{hooks.d.ts → flex-layout/hooks/useListPaging.d.ts} +6 -12
  77. package/dist/flex-layout/hooks/useListPaging.js +175 -0
  78. package/dist/flex-layout/hooks/useListPaging.js.map +1 -0
  79. package/dist/flex-layout/hooks/useSizes.cjs +104 -0
  80. package/dist/flex-layout/hooks/useSizes.cjs.map +1 -0
  81. package/dist/flex-layout/hooks/useSizes.d.ts +8 -0
  82. package/dist/flex-layout/hooks/useSizes.js +101 -0
  83. package/dist/flex-layout/hooks/useSizes.js.map +1 -0
  84. package/dist/flex-layout/index.cjs +42 -0
  85. package/dist/flex-layout/index.cjs.map +1 -0
  86. package/dist/flex-layout/index.d.ts +5 -0
  87. package/dist/flex-layout/index.js +7 -0
  88. package/dist/flex-layout/index.js.map +1 -0
  89. package/dist/flex-layout/providers/FlexLayoutContext.cjs +26 -0
  90. package/dist/flex-layout/providers/FlexLayoutContext.cjs.map +1 -0
  91. package/dist/flex-layout/providers/FlexLayoutContext.d.ts +9 -0
  92. package/dist/flex-layout/providers/FlexLayoutContext.js +23 -0
  93. package/dist/flex-layout/providers/FlexLayoutContext.js.map +1 -0
  94. package/dist/{providers.cjs → flex-layout/providers/FlexLayoutHooks.cjs} +22 -186
  95. package/dist/flex-layout/providers/FlexLayoutHooks.cjs.map +1 -0
  96. package/dist/flex-layout/providers/FlexLayoutHooks.d.ts +51 -0
  97. package/dist/{providers.js → flex-layout/providers/FlexLayoutHooks.js} +14 -178
  98. package/dist/flex-layout/providers/FlexLayoutHooks.js.map +1 -0
  99. package/dist/flex-layout/providers/index.cjs +14 -0
  100. package/dist/flex-layout/providers/index.cjs.map +1 -0
  101. package/dist/flex-layout/providers/index.d.ts +1 -0
  102. package/dist/flex-layout/providers/index.js +3 -0
  103. package/dist/flex-layout/providers/index.js.map +1 -0
  104. package/dist/{store.cjs → flex-layout/store/FlexLayoutContainerStore.cjs} +20 -21
  105. package/dist/flex-layout/store/FlexLayoutContainerStore.cjs.map +1 -0
  106. package/dist/flex-layout/store/FlexLayoutContainerStore.d.ts +62 -0
  107. package/dist/{store.js → flex-layout/store/FlexLayoutContainerStore.js} +20 -21
  108. package/dist/flex-layout/store/FlexLayoutContainerStore.js.map +1 -0
  109. package/dist/flex-layout/store/index.cjs +14 -0
  110. package/dist/flex-layout/store/index.cjs.map +1 -0
  111. package/dist/flex-layout/store/index.d.ts +1 -0
  112. package/dist/flex-layout/store/index.js +3 -0
  113. package/dist/flex-layout/store/index.js.map +1 -0
  114. package/dist/flex-layout/styles/FlexLayout.module.css +416 -0
  115. package/dist/flex-layout/styles/listScroll.module.css +85 -0
  116. package/dist/flex-layout/styles/shake.module.css +41 -0
  117. package/dist/flex-layout/types/FlexDirectionTypes.cjs +4 -0
  118. package/dist/flex-layout/types/FlexDirectionTypes.cjs.map +1 -0
  119. package/dist/flex-layout/types/FlexDirectionTypes.d.ts +6 -0
  120. package/dist/flex-layout/types/FlexDirectionTypes.js +3 -0
  121. package/dist/flex-layout/types/FlexDirectionTypes.js.map +1 -0
  122. package/dist/flex-layout/types/FlexLayoutTypes.cjs +4 -0
  123. package/dist/flex-layout/types/FlexLayoutTypes.cjs.map +1 -0
  124. package/dist/flex-layout/types/FlexLayoutTypes.d.ts +53 -0
  125. package/dist/flex-layout/types/FlexLayoutTypes.js +3 -0
  126. package/dist/flex-layout/types/FlexLayoutTypes.js.map +1 -0
  127. package/dist/{utils.cjs → flex-layout/utils/FlexLayoutUtils.cjs} +3 -4
  128. package/dist/flex-layout/utils/FlexLayoutUtils.cjs.map +1 -0
  129. package/dist/flex-layout/utils/FlexLayoutUtils.d.ts +26 -0
  130. package/dist/{utils.js → flex-layout/utils/FlexLayoutUtils.js} +3 -4
  131. package/dist/flex-layout/utils/FlexLayoutUtils.js.map +1 -0
  132. package/dist/flex-layout/utils/index.cjs +14 -0
  133. package/dist/flex-layout/utils/index.cjs.map +1 -0
  134. package/dist/flex-layout/utils/index.d.ts +1 -0
  135. package/dist/flex-layout/utils/index.js +3 -0
  136. package/dist/flex-layout/utils/index.js.map +1 -0
  137. package/dist/index.cjs +10 -0
  138. package/dist/index.cjs.map +1 -1
  139. package/dist/index.d.ts +1 -2
  140. package/dist/index.js +1 -1
  141. package/dist/index.js.map +1 -1
  142. package/dist/types/css.d.cjs +4 -0
  143. package/dist/types/css.d.cjs.map +1 -0
  144. package/dist/types/css.d.js +3 -0
  145. package/dist/types/css.d.js.map +1 -0
  146. package/package.json +27 -44
  147. package/dist/FlexLayoutSplitScreenDragBox-eCtq4kLd.d.cts +0 -31
  148. package/dist/FlexLayoutSplitScreenDragBox-eCtq4kLd.d.ts +0 -31
  149. package/dist/components.cjs +0 -3048
  150. package/dist/components.cjs.map +0 -1
  151. package/dist/components.css +0 -471
  152. package/dist/components.css.map +0 -1
  153. package/dist/components.d.cts +0 -122
  154. package/dist/components.d.ts +0 -122
  155. package/dist/components.js +0 -3036
  156. package/dist/components.js.map +0 -1
  157. package/dist/hooks.cjs.map +0 -1
  158. package/dist/hooks.d.cts +0 -37
  159. package/dist/hooks.js.map +0 -1
  160. package/dist/index.d.cts +0 -2
  161. package/dist/providers.cjs.map +0 -1
  162. package/dist/providers.d.cts +0 -54
  163. package/dist/providers.d.ts +0 -54
  164. package/dist/providers.js.map +0 -1
  165. package/dist/store.cjs.map +0 -1
  166. package/dist/store.d.cts +0 -67
  167. package/dist/store.d.ts +0 -67
  168. package/dist/store.js.map +0 -1
  169. package/dist/useDrag-CYQnhUFk.d.cts +0 -108
  170. package/dist/utils.cjs.map +0 -1
  171. package/dist/utils.d.cts +0 -28
  172. package/dist/utils.d.ts +0 -28
  173. package/dist/utils.js.map +0 -1
@@ -0,0 +1,27 @@
1
+ import { CSSProperties, HTMLAttributes, MouseEvent, ReactElement, ReactNode, RefObject, TouchEvent } from "react";
2
+ export interface FlexLayoutSplitScreenDragBoxProps<E extends HTMLElement = HTMLElement> extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
3
+ onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
4
+ onTouchStart?: (event: TouchEvent<HTMLDivElement>) => void;
5
+ dropEndCallback?: ({ x, y, containerName, }: {
6
+ x: number;
7
+ y: number;
8
+ containerName: string;
9
+ }) => void;
10
+ style?: CSSProperties;
11
+ navigationTitle?: string;
12
+ targetComponent?: ReactElement;
13
+ dropDocumentOutsideOption?: DropDocumentOutsideOption;
14
+ children: ReactNode;
15
+ containerName: string;
16
+ screenKey?: string;
17
+ isBlockingActiveInput?: boolean;
18
+ customData?: Record<string, string | number | boolean | undefined>;
19
+ scrollTargetRef?: RefObject<E>;
20
+ }
21
+ export interface DropDocumentOutsideOption {
22
+ openUrl: string;
23
+ widthRatio?: number;
24
+ heightRatio?: number;
25
+ isNewTap?: boolean;
26
+ }
27
+ export default function FlexLayoutSplitScreenDragBox<E extends HTMLElement>({ onMouseDown, onTouchStart, dropEndCallback, style, navigationTitle, targetComponent, containerName, children, className, dropDocumentOutsideOption, screenKey, isBlockingActiveInput, customData, scrollTargetRef, ...props }: FlexLayoutSplitScreenDragBoxProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,333 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
+ import { useRef, useEffect } from 'react';
3
+ import { useDragEvents, dragState } from '../hooks/useDrag';
4
+ import styles from '../styles/FlexLayout.module.css';
5
+ import { isDocumentOut } from '../utils/FlexLayoutUtils';
6
+
7
+ const MAX_STEP = 18;
8
+ function edgeVelocity(x, y) {
9
+ const w = window.innerWidth, h = window.innerHeight;
10
+ const mx = w * 0.15, my = h * 0.15;
11
+ let vx = 0;
12
+ if (x < mx)
13
+ vx = -((mx - x) / mx) * MAX_STEP;
14
+ else if (x > w - mx)
15
+ vx = (x - (w - mx)) / mx * MAX_STEP;
16
+ let vy = 0;
17
+ if (y < my)
18
+ vy = -((my - y) / my) * MAX_STEP;
19
+ else if (y > h - my)
20
+ vy = (y - (h - my)) / my * MAX_STEP;
21
+ return { vx, vy };
22
+ }
23
+ function FlexLayoutSplitScreenDragBox({
24
+ onMouseDown,
25
+ onTouchStart,
26
+ dropEndCallback,
27
+ style,
28
+ navigationTitle,
29
+ targetComponent,
30
+ containerName,
31
+ children,
32
+ className,
33
+ dropDocumentOutsideOption,
34
+ screenKey = Array.from(
35
+ window.crypto.getRandomValues(new Uint32Array(16)),
36
+ (e) => e.toString(32).padStart(2, "0")
37
+ ).join(""),
38
+ isBlockingActiveInput = false,
39
+ customData = {},
40
+ scrollTargetRef,
41
+ ...props
42
+ }) {
43
+ const scrollRAF = useRef(null);
44
+ const velocity = useRef({ vx: 0, vy: 0 });
45
+ const ref = useRef(null);
46
+ const clonedNodeRef = useRef(null);
47
+ const clonedWidth = useRef(null);
48
+ const clonedHeight = useRef(null);
49
+ const hrefUrlRef = useRef("");
50
+ const { handleStart, handleMove, handleEnd } = useDragEvents({
51
+ isBlockingActiveInput
52
+ });
53
+ const handleMoveWrapper = (event) => {
54
+ let x = 0;
55
+ let y = 0;
56
+ if (event.type === "touchmove") {
57
+ const t = event.touches[0];
58
+ x = t.clientX;
59
+ y = t.clientY;
60
+ } else {
61
+ const m = event;
62
+ x = m.clientX;
63
+ y = m.clientY;
64
+ }
65
+ const { vx, vy } = edgeVelocity(x, y);
66
+ const inEdge = vx !== 0 || vy !== 0;
67
+ if (clonedNodeRef.current?.isConnected && !inEdge) {
68
+ event.preventDefault();
69
+ if (scrollRAF.current) {
70
+ cancelAnimationFrame(scrollRAF.current);
71
+ scrollRAF.current = null;
72
+ }
73
+ }
74
+ if (clonedNodeRef.current?.isConnected && inEdge) {
75
+ event.preventDefault();
76
+ velocity.current = { vx, vy };
77
+ if (!scrollRAF.current) {
78
+ const step = () => {
79
+ const target = scrollTargetRef?.current ?? document.scrollingElement;
80
+ if (target?.scrollBy) {
81
+ target.scrollBy(
82
+ velocity.current.vx,
83
+ velocity.current.vy
84
+ );
85
+ } else {
86
+ window.scrollBy(
87
+ velocity.current.vx,
88
+ velocity.current.vy
89
+ );
90
+ }
91
+ if (velocity.current.vx === 0 && velocity.current.vy === 0) {
92
+ scrollRAF.current = null;
93
+ return;
94
+ }
95
+ scrollRAF.current = requestAnimationFrame(step);
96
+ };
97
+ scrollRAF.current = requestAnimationFrame(step);
98
+ }
99
+ }
100
+ if (event.type !== "touchmove") {
101
+ event.preventDefault();
102
+ }
103
+ handleMove({
104
+ event,
105
+ notDragCallback: ({ x: x2, y: y2 }) => {
106
+ if (clonedNodeRef.current) clonedNodeRef.current.remove();
107
+ },
108
+ dragStartCallback: ({ x: x2, y: y2 }) => {
109
+ if (!clonedNodeRef.current) return;
110
+ navigator.vibrate(100);
111
+ clonedNodeRef.current.style.left = `${x2 - (clonedWidth.current || 0) / 2}px`;
112
+ clonedNodeRef.current.style.top = `${y2 - (clonedHeight.current || 0) / 2}px`;
113
+ },
114
+ moveingCallback: ({ x: x2, y: y2 }) => {
115
+ if (clonedNodeRef.current?.isConnected) {
116
+ clonedNodeRef.current.style.left = `${x2 - (clonedWidth.current || 0) / 2}px`;
117
+ clonedNodeRef.current.style.top = `${y2 - (clonedHeight.current || 0) / 2}px`;
118
+ }
119
+ dragState.next({
120
+ isDragging: true,
121
+ isDrop: false,
122
+ navigationTitle,
123
+ children: targetComponent,
124
+ x: x2,
125
+ y: y2,
126
+ containerName,
127
+ dropDocumentOutsideOption,
128
+ customData
129
+ });
130
+ }
131
+ });
132
+ };
133
+ const handleEndWrapper = (event) => {
134
+ if (scrollRAF.current !== null) {
135
+ cancelAnimationFrame(scrollRAF.current);
136
+ scrollRAF.current = null;
137
+ }
138
+ velocity.current = { vx: 0, vy: 0 };
139
+ handleEnd({
140
+ event,
141
+ dragEndCallback: ({ x, y }) => {
142
+ const href = hrefUrlRef.current;
143
+ if (clonedNodeRef.current) clonedNodeRef.current.remove();
144
+ if (dropDocumentOutsideOption && isDocumentOut({ x, y })) {
145
+ if (dropDocumentOutsideOption.isNewTap || !dropDocumentOutsideOption.widthRatio && !dropDocumentOutsideOption.heightRatio) {
146
+ window.open(href, "_blank");
147
+ } else {
148
+ const width = window.innerWidth * (dropDocumentOutsideOption.widthRatio || 1);
149
+ const height = window.innerHeight * (dropDocumentOutsideOption.heightRatio || 1);
150
+ window.open(
151
+ href,
152
+ "_blank",
153
+ `width=${width},height=${height},left=${window.screenLeft - x * -1 - width},top=${window.screenTop + y}`
154
+ );
155
+ }
156
+ }
157
+ dragState.next({
158
+ isDragging: false,
159
+ isDrop: true,
160
+ navigationTitle,
161
+ children: targetComponent,
162
+ x,
163
+ y,
164
+ containerName,
165
+ dropDocumentOutsideOption,
166
+ dropEndCallback,
167
+ screenKey,
168
+ customData
169
+ });
170
+ }
171
+ });
172
+ };
173
+ useEffect(() => {
174
+ if (ref.current) {
175
+ const clone = ref.current.cloneNode(true);
176
+ const originRect = ref.current.getBoundingClientRect();
177
+ clone.style.width = originRect.width + "px";
178
+ clone.style.height = originRect.height + "px";
179
+ clone.style.opacity = "0.3";
180
+ clone.style.backdropFilter = "blur(6px)";
181
+ clonedWidth.current = originRect.width;
182
+ clonedHeight.current = originRect.height;
183
+ if (dropDocumentOutsideOption?.openUrl) {
184
+ hrefUrlRef.current = dropDocumentOutsideOption.openUrl;
185
+ const href = document.createElement("span");
186
+ href.textContent = hrefUrlRef.current;
187
+ clone.prepend(href);
188
+ }
189
+ if (navigationTitle) {
190
+ const title = document.createElement("span");
191
+ title.textContent = navigationTitle;
192
+ clone.prepend(title);
193
+ }
194
+ clone.style.position = "fixed";
195
+ clonedNodeRef.current = clone;
196
+ clonedNodeRef.current.classList.add(
197
+ styles["flex-split-screen-drag-box-clone"]
198
+ );
199
+ }
200
+ }, []);
201
+ useEffect(() => {
202
+ const moveEvents = [
203
+ "mousemove",
204
+ "touchmove"
205
+ ];
206
+ const endEvents = ["mouseup", "touchend"];
207
+ moveEvents.forEach((eventName) => {
208
+ window.addEventListener(eventName, handleMoveWrapper, {
209
+ passive: false
210
+ });
211
+ });
212
+ endEvents.forEach((eventName) => {
213
+ window.addEventListener(eventName, handleEndWrapper);
214
+ });
215
+ return () => {
216
+ moveEvents.forEach((eventName) => {
217
+ window.removeEventListener(eventName, handleMoveWrapper);
218
+ });
219
+ endEvents.forEach((eventName) => {
220
+ window.removeEventListener(eventName, handleEndWrapper);
221
+ });
222
+ };
223
+ }, [
224
+ customData,
225
+ targetComponent,
226
+ dropDocumentOutsideOption,
227
+ screenKey,
228
+ isBlockingActiveInput,
229
+ containerName,
230
+ navigationTitle,
231
+ dropEndCallback
232
+ ]);
233
+ useEffect(() => {
234
+ const el = ref.current;
235
+ if (!el) return;
236
+ const onCtx = (e) => e.preventDefault();
237
+ el.addEventListener("contextmenu", onCtx);
238
+ return () => {
239
+ el.removeEventListener("contextmenu", onCtx);
240
+ };
241
+ }, []);
242
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
243
+ "div",
244
+ {
245
+ className: `${className || ""} ${styles["flex-split-screen-drag-box"]}`,
246
+ ref,
247
+ onContextMenu: (e) => e.preventDefault(),
248
+ onMouseDown: (ev) => {
249
+ if (onMouseDown) {
250
+ Promise.resolve().then(() => onMouseDown(ev));
251
+ }
252
+ handleStart({
253
+ event: ev,
254
+ dragStartCallback: ({ x, y }) => {
255
+ if (clonedNodeRef.current) {
256
+ document.body.appendChild(
257
+ clonedNodeRef.current
258
+ );
259
+ if (ref.current) {
260
+ const originRect = ref.current.getBoundingClientRect();
261
+ clonedNodeRef.current.style.width = originRect.width + "px";
262
+ clonedNodeRef.current.style.height = originRect.height + "px";
263
+ clonedWidth.current = originRect.width;
264
+ clonedHeight.current = originRect.height;
265
+ }
266
+ }
267
+ if (clonedNodeRef.current?.isConnected) {
268
+ navigator.vibrate(100);
269
+ clonedNodeRef.current.style.left = `${x - (clonedWidth.current || 0) / 2}px`;
270
+ clonedNodeRef.current.style.top = `${y - (clonedHeight.current || 0) / 2}px`;
271
+ }
272
+ dragState.next({
273
+ isDragging: true,
274
+ isDrop: false,
275
+ navigationTitle,
276
+ children: targetComponent,
277
+ x,
278
+ y,
279
+ containerName,
280
+ dropDocumentOutsideOption,
281
+ customData
282
+ });
283
+ }
284
+ });
285
+ },
286
+ onTouchStart: (ev) => {
287
+ if (onTouchStart) {
288
+ Promise.resolve().then(() => onTouchStart(ev));
289
+ }
290
+ handleStart({
291
+ event: ev,
292
+ dragStartCallback: ({ x, y }) => {
293
+ if (clonedNodeRef.current) {
294
+ document.body.appendChild(
295
+ clonedNodeRef.current
296
+ );
297
+ if (ref.current) {
298
+ const originRect = ref.current.getBoundingClientRect();
299
+ clonedNodeRef.current.style.width = originRect.width + "px";
300
+ clonedNodeRef.current.style.height = originRect.height + "px";
301
+ clonedWidth.current = originRect.width;
302
+ clonedHeight.current = originRect.height;
303
+ }
304
+ }
305
+ if (clonedNodeRef.current?.isConnected) {
306
+ navigator.vibrate(100);
307
+ clonedNodeRef.current.style.left = `${x - (clonedWidth.current || 0) / 2}px`;
308
+ clonedNodeRef.current.style.top = `${y - (clonedHeight.current || 0) / 2}px`;
309
+ }
310
+ dragState.next({
311
+ isDragging: true,
312
+ isDrop: false,
313
+ navigationTitle,
314
+ children: targetComponent,
315
+ x,
316
+ y,
317
+ containerName,
318
+ dropDocumentOutsideOption,
319
+ customData
320
+ });
321
+ }
322
+ });
323
+ },
324
+ style: { ...style },
325
+ ...props,
326
+ children
327
+ }
328
+ ) });
329
+ }
330
+
331
+ export { FlexLayoutSplitScreenDragBox as default };
332
+ //# sourceMappingURL=FlexLayoutSplitScreenDragBox.js.map
333
+ //# sourceMappingURL=FlexLayoutSplitScreenDragBox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/flex-layout/components/FlexLayoutSplitScreenDragBox.tsx"],"names":["x","y"],"mappings":";;;;;;AAeA,MAAM,QAAA,GAAW,EAAA;AAejB,SAAS,YAAA,CAAa,GAAW,CAAA,EAAW;AAC3C,EAAA,MAAM,CAAA,GAAI,MAAA,CAAO,UAAA,EAChB,CAAA,GAAI,MAAA,CAAO,WAAA;AACZ,EAAA,MAAM,EAAA,GAAK,CAAA,GAAI,IAAA,EACd,EAAA,GAAK,CAAA,GAAI,IAAA;AAGV,EAAA,IAAI,EAAA,GAAK,CAAA;AACT,EAAA,IAAI,CAAA,GAAI,EAAA;AAEP,IAAA,EAAA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n\tHTMLAttributes,\r\n\tMouseEvent,\r\n\tReactElement,\r\n\tReactNode,\r\n\tRefObject,\r\n\tTouchEvent,\r\n\tuseEffect,\r\n\tuseRef,\r\n} from \"react\";\r\nimport { dragState, useDragEvents } from \"../hooks/useDrag\";\r\n\r\nimport styles from \"../styles/FlexLayout.module.css\";\r\nimport { isDocumentOut } from \"../utils/FlexLayoutUtils\";\r\nconst MAX_STEP = 18;\r\n\r\nfunction shouldAllowViewportScroll(x: number, y: number) {\r\n\tconst w = window.innerWidth;\r\n\tconst h = window.innerHeight;\r\n\tconst marginX = w * 0.15;\r\n\tconst marginY = h * 0.15;\r\n\treturn (\r\n\t\tx < marginX || // 왼쪽 15 %\r\n\t\tx > w - marginX || // 오른쪽 15 %\r\n\t\ty < marginY || // 상단 15 %\r\n\t\ty > h - marginY // 하단 15 %\r\n\t);\r\n}\r\n\r\nfunction edgeVelocity(x: number, y: number) {\r\n\tconst w = window.innerWidth,\r\n\t\th = window.innerHeight;\r\n\tconst mx = w * 0.15,\r\n\t\tmy = h * 0.15;\r\n\r\n\t/* X 축 */\r\n\tlet vx = 0;\r\n\tif (x < mx)\r\n\t\t// ← 왼쪽\r\n\t\tvx = -((mx - x) / mx) * MAX_STEP;\r\n\telse if (x > w - mx)\r\n\t\t// → 오른쪽\r\n\t\tvx = ((x - (w - mx)) / mx) * MAX_STEP;\r\n\r\n\t/* Y 축 */\r\n\tlet vy = 0;\r\n\tif (y < my)\r\n\t\t// ↑ 상단\r\n\t\tvy = -((my - y) / my) * MAX_STEP;\r\n\telse if (y > h - my)\r\n\t\t// ↓ 하단\r\n\t\tvy = ((y - (h - my)) / my) * MAX_STEP;\r\n\r\n\treturn { vx, vy };\r\n}\r\nfunction calcVelocity(dx: number, dy: number, x: number, y: number) {\r\n\tconst w = window.innerWidth,\r\n\t\th = window.innerHeight;\r\n\tconst marginX = w * 0.15,\r\n\t\tmarginY = h * 0.15;\r\n\r\n\t/* 거리가 0(가장자리)~margin 사이면 1~4 배 가중치 */\r\n\tconst multX =\r\n\t\tx < marginX\r\n\t\t\t? 1 + ((marginX - x) / marginX) * 3\r\n\t\t\t: x > w - marginX\r\n\t\t\t\t? 1 + ((x - (w - marginX)) / marginX) * 3\r\n\t\t\t\t: 1;\r\n\r\n\tconst multY =\r\n\t\ty < marginY\r\n\t\t\t? 1 + ((marginY - y) / marginY) * 3\r\n\t\t\t: y > h - marginY\r\n\t\t\t\t? 1 + ((y - (h - marginY)) / marginY) * 3\r\n\t\t\t\t: 1;\r\n\r\n\t/* ←→·↑↓ **반대 방향**으로 스크롤 */\r\n\treturn { vx: -dx * multX, vy: -dy * multY };\r\n}\r\n\r\nexport interface FlexLayoutSplitScreenDragBoxProps<\r\n\tE extends HTMLElement = HTMLElement,\r\n> extends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\r\n\tonMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;\r\n\tonTouchStart?: (event: TouchEvent<HTMLDivElement>) => void;\r\n\tdropEndCallback?: ({\r\n\t\tx,\r\n\t\ty,\r\n\t\tcontainerName,\r\n\t}: {\r\n\t\tx: number;\r\n\t\ty: number;\r\n\t\tcontainerName: string;\r\n\t}) => void;\r\n\tstyle?: CSSProperties;\r\n\tnavigationTitle?: string;\r\n\ttargetComponent?: ReactElement;\r\n\tdropDocumentOutsideOption?: DropDocumentOutsideOption;\r\n\tchildren: ReactNode;\r\n\tcontainerName: string;\r\n\tscreenKey?: string;\r\n\tisBlockingActiveInput?: boolean;\r\n\tcustomData?: Record<string, string | number | boolean | undefined>;\r\n\tscrollTargetRef?: RefObject<E>;\r\n}\r\n\r\nexport interface DropDocumentOutsideOption {\r\n\topenUrl: string;\r\n\twidthRatio?: number;\r\n\theightRatio?: number;\r\n\tisNewTap?: boolean;\r\n}\r\n\r\nexport default function FlexLayoutSplitScreenDragBox<E extends HTMLElement>({\r\n\tonMouseDown,\r\n\tonTouchStart,\r\n\tdropEndCallback,\r\n\tstyle,\r\n\tnavigationTitle,\r\n\ttargetComponent,\r\n\tcontainerName,\r\n\tchildren,\r\n\tclassName,\r\n\tdropDocumentOutsideOption,\r\n\tscreenKey = Array.from(\r\n\t\twindow.crypto.getRandomValues(new Uint32Array(16)),\r\n\t\t(e) => e.toString(32).padStart(2, \"0\"),\r\n\t).join(\"\"),\r\n\tisBlockingActiveInput = false,\r\n\tcustomData = {},\r\n\tscrollTargetRef,\r\n\t...props\r\n}: FlexLayoutSplitScreenDragBoxProps) {\r\n\t//const lastTouch = useRef<{ x: number; y: number } | null>(null);\r\n\tconst scrollRAF = useRef<number | null>(null); // 애니메이션 루프 id\r\n\tconst velocity = useRef<{ vx: number; vy: number }>({ vx: 0, vy: 0 });\r\n\tconst ref = useRef<HTMLDivElement>(null);\r\n\tconst clonedNodeRef = useRef<HTMLDivElement | null>(null);\r\n\tconst clonedWidth = useRef<number | null>(null);\r\n\tconst clonedHeight = useRef<number | null>(null);\r\n\tconst hrefUrlRef = useRef<string>(\"\");\r\n\r\n\tconst { handleStart, handleMove, handleEnd } = useDragEvents({\r\n\t\tisBlockingActiveInput,\r\n\t});\r\n\tconst handleMoveWrapper = (event: Event) => {\r\n\t\tlet allowScrollEdge = false;\r\n\t\tlet x = 0;\r\n\t\tlet y = 0;\r\n\r\n\t\tif (event.type === \"touchmove\") {\r\n\t\t\tconst t = (event as globalThis.TouchEvent).touches[0];\r\n\t\t\tx = t.clientX;\r\n\t\t\ty = t.clientY;\r\n\t\t} else {\r\n\t\t\tconst m = event as globalThis.MouseEvent;\r\n\t\t\tx = m.clientX;\r\n\t\t\ty = m.clientY;\r\n\t\t}\r\n\t\tconst { vx, vy } = edgeVelocity(x, y);\r\n\t\tconst inEdge = vx !== 0 || vy !== 0;\r\n\r\n\t\tallowScrollEdge = shouldAllowViewportScroll(x, y);\r\n\t\t/* 중앙 영역이면 스크롤 막음, 가장자리면 허용 */\r\n\t\tif (clonedNodeRef.current?.isConnected && !inEdge) {\r\n\t\t\tevent.preventDefault(); // 화면 고정\r\n\t\t\tif (scrollRAF.current) {\r\n\t\t\t\tcancelAnimationFrame(scrollRAF.current);\r\n\t\t\t\tscrollRAF.current = null;\r\n\t\t\t}\r\n\t\t\t// velocity.current = { vx: 0, vy: 0 };\r\n\t\t}\r\n\r\n\t\tif (\r\n\t\t\tclonedNodeRef.current?.isConnected &&\r\n\t\t\tinEdge\r\n\t\t\t//&&lastTouch.current\r\n\t\t) {\r\n\t\t\tevent.preventDefault();\r\n\t\t\t// const dx = x - lastTouch.current.x; // 손가락 이동량\r\n\t\t\t// const dy = y - lastTouch.current.y;\r\n\r\n\t\t\tvelocity.current = { vx, vy }; // ← X·Y 둘 다 들어갈 수 있음\r\n\r\n\t\t\t// const { vx, vy } = calcVelocity(dx, dy, x, y);\r\n\r\n\t\t\tif (!scrollRAF.current) {\r\n\t\t\t\tconst step = () => {\r\n\t\t\t\t\tconst target =\r\n\t\t\t\t\t\tscrollTargetRef?.current ??\r\n\t\t\t\t\t\t(document.scrollingElement as HTMLElement | null);\r\n\r\n\t\t\t\t\tif (target?.scrollBy) {\r\n\t\t\t\t\t\ttarget.scrollBy(\r\n\t\t\t\t\t\t\tvelocity.current.vx,\r\n\t\t\t\t\t\t\tvelocity.current.vy,\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twindow.scrollBy(\r\n\t\t\t\t\t\t\tvelocity.current.vx,\r\n\t\t\t\t\t\t\tvelocity.current.vy,\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\tvelocity.current.vx === 0 &&\r\n\t\t\t\t\t\tvelocity.current.vy === 0\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tscrollRAF.current = null;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscrollRAF.current = requestAnimationFrame(step);\r\n\t\t\t\t};\r\n\t\t\t\tscrollRAF.current = requestAnimationFrame(step);\r\n\t\t\t}\r\n\r\n\t\t\t//lastTouch.current = { x, y };\r\n\t\t}\r\n\t\tif (event.type !== \"touchmove\") {\r\n\t\t\t/* 마우스 · 펜 → 항상 고정 */\r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\t\thandleMove({\r\n\t\t\tevent,\r\n\t\t\tnotDragCallback: ({ x, y }) => {\r\n\t\t\t\tif (clonedNodeRef.current) clonedNodeRef.current.remove();\r\n\t\t\t},\r\n\t\t\tdragStartCallback: ({ x, y }) => {\r\n\t\t\t\tif (!clonedNodeRef.current) return;\r\n\t\t\t\tnavigator.vibrate(100);\r\n\t\t\t\tclonedNodeRef.current.style.left = `${x - (clonedWidth.current || 0) / 2}px`;\r\n\t\t\t\tclonedNodeRef.current.style.top = `${y - (clonedHeight.current || 0) / 2}px`;\r\n\t\t\t},\r\n\t\t\tmoveingCallback: ({ x, y }) => {\r\n\t\t\t\tif (clonedNodeRef.current?.isConnected) {\r\n\t\t\t\t\tclonedNodeRef.current.style.left = `${x - (clonedWidth.current || 0) / 2}px`;\r\n\t\t\t\t\tclonedNodeRef.current.style.top = `${y - (clonedHeight.current || 0) / 2}px`;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdragState.next({\r\n\t\t\t\t\tisDragging: true,\r\n\t\t\t\t\tisDrop: false,\r\n\t\t\t\t\tnavigationTitle,\r\n\t\t\t\t\tchildren: targetComponent,\r\n\t\t\t\t\tx,\r\n\t\t\t\t\ty,\r\n\t\t\t\t\tcontainerName,\r\n\t\t\t\t\tdropDocumentOutsideOption,\r\n\t\t\t\t\tcustomData,\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t});\r\n\t};\r\n\tconst handleEndWrapper = (event: Event) => {\r\n\t\tif (scrollRAF.current !== null) {\r\n\t\t\tcancelAnimationFrame(scrollRAF.current);\r\n\t\t\tscrollRAF.current = null;\r\n\t\t}\r\n\t\tvelocity.current = { vx: 0, vy: 0 };\r\n\t\t//lastTouch.current = null;\r\n\t\thandleEnd({\r\n\t\t\tevent,\r\n\t\t\tdragEndCallback: ({ x, y }) => {\r\n\t\t\t\tconst href = hrefUrlRef.current;\r\n\t\t\t\tif (clonedNodeRef.current) clonedNodeRef.current.remove();\r\n\t\t\t\tif (dropDocumentOutsideOption && isDocumentOut({ x, y })) {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\tdropDocumentOutsideOption.isNewTap ||\r\n\t\t\t\t\t\t(!dropDocumentOutsideOption.widthRatio &&\r\n\t\t\t\t\t\t\t!dropDocumentOutsideOption.heightRatio)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\twindow.open(href, \"_blank\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst width =\r\n\t\t\t\t\t\t\twindow.innerWidth *\r\n\t\t\t\t\t\t\t(dropDocumentOutsideOption.widthRatio || 1);\r\n\t\t\t\t\t\tconst height =\r\n\t\t\t\t\t\t\twindow.innerHeight *\r\n\t\t\t\t\t\t\t(dropDocumentOutsideOption.heightRatio || 1);\r\n\t\t\t\t\t\twindow.open(\r\n\t\t\t\t\t\t\thref,\r\n\t\t\t\t\t\t\t\"_blank\",\r\n\t\t\t\t\t\t\t`width=${width},height=${height},left=${window.screenLeft - x * -1 - width},top=${window.screenTop + y}`,\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdragState.next({\r\n\t\t\t\t\tisDragging: false,\r\n\t\t\t\t\tisDrop: true,\r\n\t\t\t\t\tnavigationTitle,\r\n\t\t\t\t\tchildren: targetComponent,\r\n\t\t\t\t\tx,\r\n\t\t\t\t\ty,\r\n\t\t\t\t\tcontainerName,\r\n\t\t\t\t\tdropDocumentOutsideOption,\r\n\t\t\t\t\tdropEndCallback,\r\n\t\t\t\t\tscreenKey,\r\n\t\t\t\t\tcustomData,\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t});\r\n\t};\r\n\tuseEffect(() => {\r\n\t\tif (ref.current) {\r\n\t\t\tconst clone = ref.current.cloneNode(true) as HTMLDivElement; //document.createElement('div');\r\n\t\t\tconst originRect = ref.current.getBoundingClientRect();\r\n\t\t\tclone.style.width = originRect.width + \"px\";\r\n\t\t\tclone.style.height = originRect.height + \"px\";\r\n\t\t\tclone.style.opacity = \"0.3\";\r\n\t\t\tclone.style.backdropFilter = \"blur(6px)\";\r\n\t\t\tclonedWidth.current = originRect.width;\r\n\t\t\tclonedHeight.current = originRect.height;\r\n\t\t\tif (dropDocumentOutsideOption?.openUrl) {\r\n\t\t\t\threfUrlRef.current = dropDocumentOutsideOption!.openUrl;\r\n\t\t\t\tconst href = document.createElement(\"span\");\r\n\t\t\t\thref.textContent = hrefUrlRef.current;\r\n\t\t\t\tclone.prepend(href);\r\n\t\t\t}\r\n\r\n\t\t\tif (navigationTitle) {\r\n\t\t\t\tconst title = document.createElement(\"span\");\r\n\t\t\t\ttitle.textContent = navigationTitle;\r\n\t\t\t\tclone.prepend(title);\r\n\t\t\t}\r\n\t\t\tclone.style.position = \"fixed\";\r\n\t\t\tclonedNodeRef.current = clone;\r\n\t\t\tclonedNodeRef.current.classList.add(\r\n\t\t\t\tstyles[\"flex-split-screen-drag-box-clone\"],\r\n\t\t\t);\r\n\t\t}\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst moveEvents: Array<keyof WindowEventMap> = [\r\n\t\t\t\"mousemove\",\r\n\t\t\t\"touchmove\",\r\n\t\t];\r\n\t\tconst endEvents: Array<keyof WindowEventMap> = [\"mouseup\", \"touchend\"];\r\n\r\n\t\tmoveEvents.forEach((eventName) => {\r\n\t\t\twindow.addEventListener(eventName, handleMoveWrapper, {\r\n\t\t\t\tpassive: false,\r\n\t\t\t});\r\n\t\t});\r\n\t\tendEvents.forEach((eventName) => {\r\n\t\t\twindow.addEventListener(eventName, handleEndWrapper);\r\n\t\t});\r\n\t\treturn () => {\r\n\t\t\tmoveEvents.forEach((eventName) => {\r\n\t\t\t\twindow.removeEventListener(eventName, handleMoveWrapper);\r\n\t\t\t});\r\n\t\t\tendEvents.forEach((eventName) => {\r\n\t\t\t\twindow.removeEventListener(eventName, handleEndWrapper);\r\n\t\t\t});\r\n\t\t};\r\n\t}, [\r\n\t\tcustomData,\r\n\t\ttargetComponent,\r\n\t\tdropDocumentOutsideOption,\r\n\t\tscreenKey,\r\n\t\tisBlockingActiveInput,\r\n\t\tcontainerName,\r\n\t\tnavigationTitle,\r\n\t\tdropEndCallback,\r\n\t]);\r\n\tuseEffect(() => {\r\n\t\tconst el = ref.current;\r\n\t\tif (!el) return;\r\n\r\n\t\tconst onCtx = (e: Event) => e.preventDefault();\r\n\r\n\t\tel.addEventListener(\"contextmenu\", onCtx);\r\n\r\n\t\treturn () => {\r\n\t\t\tel.removeEventListener(\"contextmenu\", onCtx);\r\n\t\t};\r\n\t}, []);\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<div\r\n\t\t\t\tclassName={`${className || \"\"} ${styles[\"flex-split-screen-drag-box\"]}`}\r\n\t\t\t\tref={ref}\r\n\t\t\t\tonContextMenu={(e) => e.preventDefault()}\r\n\t\t\t\tonMouseDown={(ev) => {\r\n\t\t\t\t\tif (onMouseDown) {\r\n\t\t\t\t\t\tPromise.resolve().then(() => onMouseDown(ev));\r\n\t\t\t\t\t}\r\n\t\t\t\t\thandleStart({\r\n\t\t\t\t\t\tevent: ev,\r\n\t\t\t\t\t\tdragStartCallback: ({ x, y }) => {\r\n\t\t\t\t\t\t\tif (clonedNodeRef.current) {\r\n\t\t\t\t\t\t\t\tdocument.body.appendChild(\r\n\t\t\t\t\t\t\t\t\tclonedNodeRef.current,\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\tif (ref.current) {\r\n\t\t\t\t\t\t\t\t\tconst originRect =\r\n\t\t\t\t\t\t\t\t\t\tref.current.getBoundingClientRect();\r\n\t\t\t\t\t\t\t\t\tclonedNodeRef.current.style.width =\r\n\t\t\t\t\t\t\t\t\t\toriginRect.width + \"px\";\r\n\t\t\t\t\t\t\t\t\tclonedNodeRef.current.style.height =\r\n\t\t\t\t\t\t\t\t\t\toriginRect.height + \"px\";\r\n\r\n\t\t\t\t\t\t\t\t\tclonedWidth.current = originRect.width;\r\n\t\t\t\t\t\t\t\t\tclonedHeight.current = originRect.height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (clonedNodeRef.current?.isConnected) {\r\n\t\t\t\t\t\t\t\tnavigator.vibrate(100);\r\n\t\t\t\t\t\t\t\tclonedNodeRef.current.style.left = `${x - (clonedWidth.current || 0) / 2}px`;\r\n\t\t\t\t\t\t\t\tclonedNodeRef.current.style.top = `${y - (clonedHeight.current || 0) / 2}px`;\r\n\t\t\t\t\t\t\t\t//clonedNodeRef.current.style.left = `${clientX}px`;\r\n\t\t\t\t\t\t\t\t//clonedNodeRef.current.style.top = `${clientY}px`;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdragState.next({\r\n\t\t\t\t\t\t\t\tisDragging: true,\r\n\t\t\t\t\t\t\t\tisDrop: false,\r\n\t\t\t\t\t\t\t\tnavigationTitle,\r\n\t\t\t\t\t\t\t\tchildren: targetComponent,\r\n\t\t\t\t\t\t\t\tx,\r\n\t\t\t\t\t\t\t\ty,\r\n\t\t\t\t\t\t\t\tcontainerName,\r\n\t\t\t\t\t\t\t\tdropDocumentOutsideOption,\r\n\t\t\t\t\t\t\t\tcustomData,\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t});\r\n\t\t\t\t}}\r\n\t\t\t\tonTouchStart={(ev) => {\r\n\t\t\t\t\tif (onTouchStart) {\r\n\t\t\t\t\t\tPromise.resolve().then(() => onTouchStart(ev));\r\n\t\t\t\t\t}\r\n\t\t\t\t\thandleStart({\r\n\t\t\t\t\t\tevent: ev,\r\n\t\t\t\t\t\tdragStartCallback: ({ x, y }) => {\r\n\t\t\t\t\t\t\tif (clonedNodeRef.current) {\r\n\t\t\t\t\t\t\t\tdocument.body.appendChild(\r\n\t\t\t\t\t\t\t\t\tclonedNodeRef.current,\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\tif (ref.current) {\r\n\t\t\t\t\t\t\t\t\tconst originRect =\r\n\t\t\t\t\t\t\t\t\t\tref.current.getBoundingClientRect();\r\n\t\t\t\t\t\t\t\t\tclonedNodeRef.current.style.width =\r\n\t\t\t\t\t\t\t\t\t\toriginRect.width + \"px\";\r\n\t\t\t\t\t\t\t\t\tclonedNodeRef.current.style.height =\r\n\t\t\t\t\t\t\t\t\t\toriginRect.height + \"px\";\r\n\r\n\t\t\t\t\t\t\t\t\tclonedWidth.current = originRect.width;\r\n\t\t\t\t\t\t\t\t\tclonedHeight.current = originRect.height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (clonedNodeRef.current?.isConnected) {\r\n\t\t\t\t\t\t\t\tnavigator.vibrate(100);\r\n\t\t\t\t\t\t\t\tclonedNodeRef.current.style.left = `${x - (clonedWidth.current || 0) / 2}px`;\r\n\t\t\t\t\t\t\t\tclonedNodeRef.current.style.top = `${y - (clonedHeight.current || 0) / 2}px`;\r\n\t\t\t\t\t\t\t\t//clonedNodeRef.current.style.left = `${clientX}px`;\r\n\t\t\t\t\t\t\t\t//clonedNodeRef.current.style.top = `${clientY}px`;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdragState.next({\r\n\t\t\t\t\t\t\t\tisDragging: true,\r\n\t\t\t\t\t\t\t\tisDrop: false,\r\n\t\t\t\t\t\t\t\tnavigationTitle,\r\n\t\t\t\t\t\t\t\tchildren: targetComponent,\r\n\t\t\t\t\t\t\t\tx,\r\n\t\t\t\t\t\t\t\ty,\r\n\t\t\t\t\t\t\t\tcontainerName,\r\n\t\t\t\t\t\t\t\tdropDocumentOutsideOption,\r\n\t\t\t\t\t\t\t\tcustomData,\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t});\r\n\t\t\t\t}}\r\n\t\t\t\tstyle={{ ...style }}\r\n\t\t\t\t{...props}\r\n\t\t\t>\r\n\t\t\t\t{children}\r\n\t\t\t</div>\r\n\t\t\t{}\r\n\t\t</>\r\n\t);\r\n}\r\n"]}
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var styles = require('../styles/FlexLayout.module.css');
5
+ var FlexLayoutSplitScreenScrollBox = require('./FlexLayoutSplitScreenScrollBox');
6
+
7
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
+
9
+ var styles__default = /*#__PURE__*/_interopDefault(styles);
10
+ var FlexLayoutSplitScreenScrollBox__default = /*#__PURE__*/_interopDefault(FlexLayoutSplitScreenScrollBox);
11
+
12
+ function FlexLayoutSplitScreenDragBoxContainer({
13
+ className,
14
+ children,
15
+ layoutName,
16
+ ...props
17
+ }) {
18
+ return /* @__PURE__ */ jsxRuntime.jsx(
19
+ FlexLayoutSplitScreenScrollBox__default.default,
20
+ {
21
+ keyName: layoutName,
22
+ className: `${styles__default.default["flex-split-screen-drag-box-title-container"]} ${className && className !== "" && className || ""}`,
23
+ direction: "x",
24
+ ...props,
25
+ children
26
+ }
27
+ );
28
+ }
29
+
30
+ module.exports = FlexLayoutSplitScreenDragBoxContainer;
31
+ //# sourceMappingURL=FlexLayoutSplitScreenDragBoxContainer.cjs.map
32
+ //# sourceMappingURL=FlexLayoutSplitScreenDragBoxContainer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.tsx"],"names":["jsx","FlexLayoutSplitScreenScrollBox","styles"],"mappings":";;;;;;;;;;;AAQe,SAAR,qCAAA,CAAuD;AAAA,EAC7D,SAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAA+C;AAC9C,EAAA,uBACCA,cAAA;AAAA,IAACC,+CAAA;AAAA,IAAA;AAAA,MACA,OAAA,EAAS,UAAA;AAAA,MACT,SAAA,EAAW,CAAA,EAAGC,uBAAA,CAAO,4CAA4C,CAAC,IAAK,SAAA,IAAa,SAAA,KAAc,EAAA,IAAM,SAAA,IAAc,EAAE,CAAA,CAAA;AAAA,MACxH,SAAA,EAAU,GAAA;AAAA,MACT,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACF;AAEF","file":"FlexLayoutSplitScreenDragBoxContainer.cjs","sourcesContent":["\"use client\";\r\nimport { HTMLAttributes } from \"react\";\r\nimport styles from \"../styles/FlexLayout.module.css\";\r\nimport FlexLayoutSplitScreenScrollBox from \"./FlexLayoutSplitScreenScrollBox\";\r\nexport interface FlexLayoutSplitScreenDragBoxContainerProps extends HTMLAttributes<HTMLDivElement> {\r\n\tlayoutName: string;\r\n}\r\n\r\nexport default function FlexLayoutSplitScreenDragBoxContainer({\r\n\tclassName,\r\n\tchildren,\r\n\tlayoutName,\r\n\t...props\r\n}: FlexLayoutSplitScreenDragBoxContainerProps) {\r\n\treturn (\r\n\t\t<FlexLayoutSplitScreenScrollBox\r\n\t\t\tkeyName={layoutName}\r\n\t\t\tclassName={`${styles[\"flex-split-screen-drag-box-title-container\"]} ${(className && className !== \"\" && className) || \"\"}`}\r\n\t\t\tdirection=\"x\"\r\n\t\t\t{...props}\r\n\t\t>\r\n\t\t\t{children}\r\n\t\t</FlexLayoutSplitScreenScrollBox>\r\n\t);\r\n}\r\n"]}
@@ -0,0 +1,5 @@
1
+ import { HTMLAttributes } from "react";
2
+ export interface FlexLayoutSplitScreenDragBoxContainerProps extends HTMLAttributes<HTMLDivElement> {
3
+ layoutName: string;
4
+ }
5
+ export default function FlexLayoutSplitScreenDragBoxContainer({ className, children, layoutName, ...props }: FlexLayoutSplitScreenDragBoxContainerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import styles from '../styles/FlexLayout.module.css';
3
+ import FlexLayoutSplitScreenScrollBox from './FlexLayoutSplitScreenScrollBox';
4
+
5
+ function FlexLayoutSplitScreenDragBoxContainer({
6
+ className,
7
+ children,
8
+ layoutName,
9
+ ...props
10
+ }) {
11
+ return /* @__PURE__ */ jsx(
12
+ FlexLayoutSplitScreenScrollBox,
13
+ {
14
+ keyName: layoutName,
15
+ className: `${styles["flex-split-screen-drag-box-title-container"]} ${className && className !== "" && className || ""}`,
16
+ direction: "x",
17
+ ...props,
18
+ children
19
+ }
20
+ );
21
+ }
22
+
23
+ export { FlexLayoutSplitScreenDragBoxContainer as default };
24
+ //# sourceMappingURL=FlexLayoutSplitScreenDragBoxContainer.js.map
25
+ //# sourceMappingURL=FlexLayoutSplitScreenDragBoxContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.tsx"],"names":[],"mappings":";;;;AAQe,SAAR,qCAAA,CAAuD;AAAA,EAC7D,SAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAA+C;AAC9C,EAAA,uBACC,GAAA;AAAA,IAAC,8BAAA;AAAA,IAAA;AAAA,MACA,OAAA,EAAS,UAAA;AAAA,MACT,SAAA,EAAW,CAAA,EAAG,MAAA,CAAO,4CAA4C,CAAC,IAAK,SAAA,IAAa,SAAA,KAAc,EAAA,IAAM,SAAA,IAAc,EAAE,CAAA,CAAA;AAAA,MACxH,SAAA,EAAU,GAAA;AAAA,MACT,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACF;AAEF","file":"FlexLayoutSplitScreenDragBoxContainer.js","sourcesContent":["\"use client\";\r\nimport { HTMLAttributes } from \"react\";\r\nimport styles from \"../styles/FlexLayout.module.css\";\r\nimport FlexLayoutSplitScreenScrollBox from \"./FlexLayoutSplitScreenScrollBox\";\r\nexport interface FlexLayoutSplitScreenDragBoxContainerProps extends HTMLAttributes<HTMLDivElement> {\r\n\tlayoutName: string;\r\n}\r\n\r\nexport default function FlexLayoutSplitScreenDragBoxContainer({\r\n\tclassName,\r\n\tchildren,\r\n\tlayoutName,\r\n\t...props\r\n}: FlexLayoutSplitScreenDragBoxContainerProps) {\r\n\treturn (\r\n\t\t<FlexLayoutSplitScreenScrollBox\r\n\t\t\tkeyName={layoutName}\r\n\t\t\tclassName={`${styles[\"flex-split-screen-drag-box-title-container\"]} ${(className && className !== \"\" && className) || \"\"}`}\r\n\t\t\tdirection=\"x\"\r\n\t\t\t{...props}\r\n\t\t>\r\n\t\t\t{children}\r\n\t\t</FlexLayoutSplitScreenScrollBox>\r\n\t);\r\n}\r\n"]}
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var react = require('react');
5
+ var useDrag = require('../hooks/useDrag');
6
+ var styles = require('../styles/FlexLayout.module.css');
7
+
8
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
+
10
+ var styles__default = /*#__PURE__*/_interopDefault(styles);
11
+
12
+ function FlexLayoutSplitScreenDragBoxItem({
13
+ children,
14
+ onClose,
15
+ isActive,
16
+ ...props
17
+ }) {
18
+ react.useEffect(() => {
19
+ useDrag.allSplitScreenCount.next(useDrag.allSplitScreenCount.value + 1);
20
+ return () => {
21
+ if (useDrag.allSplitScreenCount.value <= 1) return;
22
+ useDrag.allSplitScreenCount.next(useDrag.allSplitScreenCount.value - 1);
23
+ };
24
+ }, []);
25
+ return /* @__PURE__ */ jsxRuntime.jsxs(
26
+ "div",
27
+ {
28
+ className: `${styles__default.default["flex-split-screen-drag-box-title-item"]} ${isActive ? styles__default.default["active"] : ""}`,
29
+ ...props,
30
+ children: [
31
+ children,
32
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: (ev) => onClose(ev), children: "X" })
33
+ ]
34
+ }
35
+ );
36
+ }
37
+
38
+ module.exports = FlexLayoutSplitScreenDragBoxItem;
39
+ //# sourceMappingURL=FlexLayoutSplitScreenDragBoxItem.cjs.map
40
+ //# sourceMappingURL=FlexLayoutSplitScreenDragBoxItem.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.tsx"],"names":["useEffect","allSplitScreenCount","jsxs","styles","jsx"],"mappings":";;;;;;;;;;;AASe,SAAR,gCAAA,CAAkD;AAAA,EACxD,QAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAA0C;AACzC,EAAAA,eAAA,CAAU,MAAM;AACf,IAAAC,2BAAA,CAAoB,IAAA,CAAKA,2BAAA,CAAoB,KAAA,GAAQ,CAAC,CAAA;AACtD,IAAA,OAAO,MAAM;AACZ,MAAA,IAAIA,2BAAA,CAAoB,SAAS,CAAA,EAAG;AACpC,MAAAA,2BAAA,CAAoB,IAAA,CAAKA,2BAAA,CAAoB,KAAA,GAAQ,CAAC,CAAA;AAAA,IACvD,CAAA;AAAA,EACD,CAAA,EAAG,EAAE,CAAA;AACL,EAAA,uBACCC,eAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,SAAA,EAAW,CAAA,EAAGC,uBAAA,CAAO,uCAAuC,CAAC,IAAI,QAAA,GAAWA,uBAAA,CAAO,QAAQ,CAAA,GAAI,EAAE,CAAA,CAAA;AAAA,MAChG,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,wBACDC,cAAA,CAAC,QAAA,EAAA,EAAO,IAAA,EAAK,QAAA,EAAS,OAAA,EAAS,CAAC,EAAA,KAAO,OAAA,CAAQ,EAAE,CAAA,EAAG,QAAA,EAAA,GAAA,EAEpD;AAAA;AAAA;AAAA,GACD;AAEF","file":"FlexLayoutSplitScreenDragBoxItem.cjs","sourcesContent":["import { MouseEvent, ReactElement, useEffect } from \"react\";\r\nimport { allSplitScreenCount } from \"../hooks/useDrag\";\r\nimport styles from \"../styles/FlexLayout.module.css\";\r\nimport { FlexLayoutSplitScreenDragBoxProps } from \"./FlexLayoutSplitScreenDragBox\";\r\nexport interface FlexLayoutSplitScreenDragBoxItemProps {\r\n\tchildren: ReactElement<FlexLayoutSplitScreenDragBoxProps>;\r\n\tonClose: (event: MouseEvent<HTMLButtonElement>) => void;\r\n\tisActive: boolean;\r\n}\r\nexport default function FlexLayoutSplitScreenDragBoxItem({\r\n\tchildren,\r\n\tonClose,\r\n\tisActive,\r\n\t...props\r\n}: FlexLayoutSplitScreenDragBoxItemProps) {\r\n\tuseEffect(() => {\r\n\t\tallSplitScreenCount.next(allSplitScreenCount.value + 1);\r\n\t\treturn () => {\r\n\t\t\tif (allSplitScreenCount.value <= 1) return;\r\n\t\t\tallSplitScreenCount.next(allSplitScreenCount.value - 1);\r\n\t\t};\r\n\t}, []);\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={`${styles[\"flex-split-screen-drag-box-title-item\"]} ${isActive ? styles[\"active\"] : \"\"}`}\r\n\t\t\t{...props}\r\n\t\t>\r\n\t\t\t{children}\r\n\t\t\t<button type=\"button\" onClick={(ev) => onClose(ev)}>\r\n\t\t\t\tX\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t);\r\n}\r\n"]}
@@ -0,0 +1,8 @@
1
+ import { MouseEvent, ReactElement } from "react";
2
+ import { FlexLayoutSplitScreenDragBoxProps } from "./FlexLayoutSplitScreenDragBox";
3
+ export interface FlexLayoutSplitScreenDragBoxItemProps {
4
+ children: ReactElement<FlexLayoutSplitScreenDragBoxProps>;
5
+ onClose: (event: MouseEvent<HTMLButtonElement>) => void;
6
+ isActive: boolean;
7
+ }
8
+ export default function FlexLayoutSplitScreenDragBoxItem({ children, onClose, isActive, ...props }: FlexLayoutSplitScreenDragBoxItemProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useEffect } from 'react';
3
+ import { allSplitScreenCount } from '../hooks/useDrag';
4
+ import styles from '../styles/FlexLayout.module.css';
5
+
6
+ function FlexLayoutSplitScreenDragBoxItem({
7
+ children,
8
+ onClose,
9
+ isActive,
10
+ ...props
11
+ }) {
12
+ useEffect(() => {
13
+ allSplitScreenCount.next(allSplitScreenCount.value + 1);
14
+ return () => {
15
+ if (allSplitScreenCount.value <= 1) return;
16
+ allSplitScreenCount.next(allSplitScreenCount.value - 1);
17
+ };
18
+ }, []);
19
+ return /* @__PURE__ */ jsxs(
20
+ "div",
21
+ {
22
+ className: `${styles["flex-split-screen-drag-box-title-item"]} ${isActive ? styles["active"] : ""}`,
23
+ ...props,
24
+ children: [
25
+ children,
26
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: (ev) => onClose(ev), children: "X" })
27
+ ]
28
+ }
29
+ );
30
+ }
31
+
32
+ export { FlexLayoutSplitScreenDragBoxItem as default };
33
+ //# sourceMappingURL=FlexLayoutSplitScreenDragBoxItem.js.map
34
+ //# sourceMappingURL=FlexLayoutSplitScreenDragBoxItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.tsx"],"names":[],"mappings":";;;;;AASe,SAAR,gCAAA,CAAkD;AAAA,EACxD,QAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAA0C;AACzC,EAAA,SAAA,CAAU,MAAM;AACf,IAAA,mBAAA,CAAoB,IAAA,CAAK,mBAAA,CAAoB,KAAA,GAAQ,CAAC,CAAA;AACtD,IAAA,OAAO,MAAM;AACZ,MAAA,IAAI,mBAAA,CAAoB,SAAS,CAAA,EAAG;AACpC,MAAA,mBAAA,CAAoB,IAAA,CAAK,mBAAA,CAAoB,KAAA,GAAQ,CAAC,CAAA;AAAA,IACvD,CAAA;AAAA,EACD,CAAA,EAAG,EAAE,CAAA;AACL,EAAA,uBACC,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,SAAA,EAAW,CAAA,EAAG,MAAA,CAAO,uCAAuC,CAAC,IAAI,QAAA,GAAW,MAAA,CAAO,QAAQ,CAAA,GAAI,EAAE,CAAA,CAAA;AAAA,MAChG,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,wBACD,GAAA,CAAC,QAAA,EAAA,EAAO,IAAA,EAAK,QAAA,EAAS,OAAA,EAAS,CAAC,EAAA,KAAO,OAAA,CAAQ,EAAE,CAAA,EAAG,QAAA,EAAA,GAAA,EAEpD;AAAA;AAAA;AAAA,GACD;AAEF","file":"FlexLayoutSplitScreenDragBoxItem.js","sourcesContent":["import { MouseEvent, ReactElement, useEffect } from \"react\";\r\nimport { allSplitScreenCount } from \"../hooks/useDrag\";\r\nimport styles from \"../styles/FlexLayout.module.css\";\r\nimport { FlexLayoutSplitScreenDragBoxProps } from \"./FlexLayoutSplitScreenDragBox\";\r\nexport interface FlexLayoutSplitScreenDragBoxItemProps {\r\n\tchildren: ReactElement<FlexLayoutSplitScreenDragBoxProps>;\r\n\tonClose: (event: MouseEvent<HTMLButtonElement>) => void;\r\n\tisActive: boolean;\r\n}\r\nexport default function FlexLayoutSplitScreenDragBoxItem({\r\n\tchildren,\r\n\tonClose,\r\n\tisActive,\r\n\t...props\r\n}: FlexLayoutSplitScreenDragBoxItemProps) {\r\n\tuseEffect(() => {\r\n\t\tallSplitScreenCount.next(allSplitScreenCount.value + 1);\r\n\t\treturn () => {\r\n\t\t\tif (allSplitScreenCount.value <= 1) return;\r\n\t\t\tallSplitScreenCount.next(allSplitScreenCount.value - 1);\r\n\t\t};\r\n\t}, []);\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={`${styles[\"flex-split-screen-drag-box-title-item\"]} ${isActive ? styles[\"active\"] : \"\"}`}\r\n\t\t\t{...props}\r\n\t\t>\r\n\t\t\t{children}\r\n\t\t\t<button type=\"button\" onClick={(ev) => onClose(ev)}>\r\n\t\t\t\tX\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t);\r\n}\r\n"]}
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var styles = require('../styles/FlexLayout.module.css');
5
+
6
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
+
8
+ var styles__default = /*#__PURE__*/_interopDefault(styles);
9
+
10
+ function FlexLayoutSplitScreenDragBoxTitleMore({
11
+ className,
12
+ ...props
13
+ }) {
14
+ return /* @__PURE__ */ jsxRuntime.jsxs(
15
+ "button",
16
+ {
17
+ ...props,
18
+ className: `${styles__default.default["flex-split-screen-drag-box-title-more"]} ${className || ""}`,
19
+ children: [
20
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "." }),
21
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "." }),
22
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "." })
23
+ ]
24
+ }
25
+ );
26
+ }
27
+
28
+ module.exports = FlexLayoutSplitScreenDragBoxTitleMore;
29
+ //# sourceMappingURL=FlexLayoutSplitScreenDragBoxTitleMore.cjs.map
30
+ //# sourceMappingURL=FlexLayoutSplitScreenDragBoxTitleMore.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.tsx"],"names":["jsxs","styles","jsx"],"mappings":";;;;;;;;;AAOe,SAAR,qCAAA,CAAuD;AAAA,EAC7D,SAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAA+C;AAC9C,EAAA,uBACCA,eAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,GAAG,KAAA;AAAA,MACJ,WAAW,CAAA,EAAGC,uBAAA,CAAO,uCAAuC,CAAC,CAAA,CAAA,EAAI,aAAa,EAAE,CAAA,CAAA;AAAA,MAEhF,QAAA,EAAA;AAAA,wBAAAC,cAAA,CAAC,UAAK,QAAA,EAAA,GAAA,EAAC,CAAA;AAAA,wBACPA,cAAA,CAAC,UAAK,QAAA,EAAA,GAAA,EAAC,CAAA;AAAA,wBACPA,cAAA,CAAC,UAAK,QAAA,EAAA,GAAA,EAAC;AAAA;AAAA;AAAA,GACR;AAEF","file":"FlexLayoutSplitScreenDragBoxTitleMore.cjs","sourcesContent":["import { HTMLAttributes } from \"react\";\r\nimport styles from \"../styles/FlexLayout.module.css\";\r\n\r\nexport interface FlexLayoutSplitScreenDragBoxTitleMoreProps extends Omit<\r\n\tHTMLAttributes<HTMLButtonElement>,\r\n\t\"children\"\r\n> {}\r\nexport default function FlexLayoutSplitScreenDragBoxTitleMore({\r\n\tclassName,\r\n\t...props\r\n}: FlexLayoutSplitScreenDragBoxTitleMoreProps) {\r\n\treturn (\r\n\t\t<button\r\n\t\t\t{...props}\r\n\t\t\tclassName={`${styles[\"flex-split-screen-drag-box-title-more\"]} ${className || \"\"}`}\r\n\t\t>\r\n\t\t\t<span>.</span>\r\n\t\t\t<span>.</span>\r\n\t\t\t<span>.</span>\r\n\t\t</button>\r\n\t);\r\n}\r\n"]}
@@ -0,0 +1,4 @@
1
+ import { HTMLAttributes } from "react";
2
+ export interface FlexLayoutSplitScreenDragBoxTitleMoreProps extends Omit<HTMLAttributes<HTMLButtonElement>, "children"> {
3
+ }
4
+ export default function FlexLayoutSplitScreenDragBoxTitleMore({ className, ...props }: FlexLayoutSplitScreenDragBoxTitleMoreProps): import("react/jsx-runtime").JSX.Element;