dn-react-router-toolkit 0.1.4 → 0.1.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.
@@ -6,12 +6,12 @@ import '../file-kit/object_storage.mjs';
6
6
  import '@aws-sdk/client-s3';
7
7
  import './repository.mjs';
8
8
 
9
- type Fn<T extends LoaderFunctionArgs | ActionFunctionArgs> = (arg: T) => Promise<unknown> | unknown;
10
- type InputFN = (auth?: JWTPayload) => Fn<LoaderFunctionArgs> | Fn<ActionFunctionArgs>;
11
- type WithAuthHandler<T extends LoaderFunctionArgs | ActionFunctionArgs> = (fn: InputFN) => Fn<T>;
12
- declare function createWithAuthHandler<T extends LoaderFunctionArgs | ActionFunctionArgs>({ JWT_MANAGER, AUTH, }: {
9
+ type Handler<T extends LoaderFunctionArgs | ActionFunctionArgs> = (arg: T) => Promise<unknown> | unknown;
10
+ type InputFN = (auth?: JWTPayload) => Handler<LoaderFunctionArgs> | Handler<ActionFunctionArgs>;
11
+ type WithAuthHandler<T extends LoaderFunctionArgs | ActionFunctionArgs> = (fn: InputFN) => Handler<T>;
12
+ declare function createWithAuthHandler<T extends LoaderFunctionArgs | ActionFunctionArgs>({ JWT_MANAGER, AUTH }: {
13
13
  JWT_MANAGER: JWTManager;
14
14
  AUTH: AuthService;
15
- }): WithAuthHandler<T>;
15
+ }): <THandler extends Handler<T>>(fn: (auth?: JWTPayload) => THandler) => THandler;
16
16
 
17
17
  export { type WithAuthHandler, createWithAuthHandler };
@@ -6,12 +6,12 @@ import '../file-kit/object_storage.js';
6
6
  import '@aws-sdk/client-s3';
7
7
  import './repository.js';
8
8
 
9
- type Fn<T extends LoaderFunctionArgs | ActionFunctionArgs> = (arg: T) => Promise<unknown> | unknown;
10
- type InputFN = (auth?: JWTPayload) => Fn<LoaderFunctionArgs> | Fn<ActionFunctionArgs>;
11
- type WithAuthHandler<T extends LoaderFunctionArgs | ActionFunctionArgs> = (fn: InputFN) => Fn<T>;
12
- declare function createWithAuthHandler<T extends LoaderFunctionArgs | ActionFunctionArgs>({ JWT_MANAGER, AUTH, }: {
9
+ type Handler<T extends LoaderFunctionArgs | ActionFunctionArgs> = (arg: T) => Promise<unknown> | unknown;
10
+ type InputFN = (auth?: JWTPayload) => Handler<LoaderFunctionArgs> | Handler<ActionFunctionArgs>;
11
+ type WithAuthHandler<T extends LoaderFunctionArgs | ActionFunctionArgs> = (fn: InputFN) => Handler<T>;
12
+ declare function createWithAuthHandler<T extends LoaderFunctionArgs | ActionFunctionArgs>({ JWT_MANAGER, AUTH }: {
13
13
  JWT_MANAGER: JWTManager;
14
14
  AUTH: AuthService;
15
- }): WithAuthHandler<T>;
15
+ }): <THandler extends Handler<T>>(fn: (auth?: JWTPayload) => THandler) => THandler;
16
16
 
17
17
  export { type WithAuthHandler, createWithAuthHandler };
@@ -54,12 +54,9 @@ var REFRESH_TOKEN_COOKIE = (0, import_react_router.createCookie)(REFRESH_TOKEN_K
54
54
  });
55
55
 
56
56
  // src/auth-kit/with_auth.ts
57
- function createWithAuthHandler({
58
- JWT_MANAGER,
59
- AUTH
60
- }) {
57
+ function createWithAuthHandler({ JWT_MANAGER, AUTH }) {
61
58
  return function(fn) {
62
- return async function(arg) {
59
+ const handler = async function(arg) {
63
60
  const cookie = arg.request.headers.get("cookie");
64
61
  const accessToken = await ACCESS_TOKEN_COOKIE.parse(cookie);
65
62
  if (accessToken) {
@@ -98,6 +95,7 @@ function createWithAuthHandler({
98
95
  }
99
96
  return fn(void 0)(arg);
100
97
  };
98
+ return handler;
101
99
  };
102
100
  }
103
101
  // Annotate the CommonJS export names for ESM import in node:
@@ -18,12 +18,9 @@ var REFRESH_TOKEN_COOKIE = createCookie(REFRESH_TOKEN_KEY, {
18
18
  });
19
19
 
20
20
  // src/auth-kit/with_auth.ts
21
- function createWithAuthHandler({
22
- JWT_MANAGER,
23
- AUTH
24
- }) {
21
+ function createWithAuthHandler({ JWT_MANAGER, AUTH }) {
25
22
  return function(fn) {
26
- return async function(arg) {
23
+ const handler = async function(arg) {
27
24
  const cookie = arg.request.headers.get("cookie");
28
25
  const accessToken = await ACCESS_TOKEN_COOKIE.parse(cookie);
29
26
  if (accessToken) {
@@ -62,6 +59,7 @@ function createWithAuthHandler({
62
59
  }
63
60
  return fn(void 0)(arg);
64
61
  };
62
+ return handler;
65
63
  };
66
64
  }
67
65
  export {
@@ -11,18 +11,21 @@ type FileInputProps = Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTM
11
11
  };
12
12
  type FileItem<T> = {
13
13
  key: string;
14
+ width?: number;
15
+ height?: number;
14
16
  item?: T;
15
17
  };
16
18
  type Props<T> = {
17
19
  defaultValue?: T | T[];
18
20
  options?: FileUploaderOptions;
19
- uploadFile?: (file: File, options?: FileUploaderOptions) => Promise<T>;
20
21
  onFileInput?: (files: File[]) => void;
21
22
  onFileUploaded?: (file: T) => Promise<void>;
22
- onChange?: (files: FileItem<T>[]) => void;
23
+ onChange?: (files: T[]) => void;
23
24
  limit?: number;
24
25
  };
25
- declare function useDropFileInput<T>({ defaultValue, options, uploadFile, onFileInput, onFileUploaded, limit, }?: Props<T>): {
26
+ declare function createUseDropFileInput<T>({ uploadFile, }: {
27
+ uploadFile: (file: File, options?: FileUploaderOptions) => Promise<T>;
28
+ }): ({ defaultValue, options, onChange, onFileInput, onFileUploaded, limit, }?: Props<T>) => {
26
29
  fileIds: string[];
27
30
  files: FileItem<T>[];
28
31
  setFiles: React.Dispatch<React.SetStateAction<FileItem<T>[]>>;
@@ -30,4 +33,4 @@ declare function useDropFileInput<T>({ defaultValue, options, uploadFile, onFile
30
33
  };
31
34
  declare function DropFileMessageBox(): React.JSX.Element;
32
35
 
33
- export { DropFileMessageBox, type FileInputProps, type FileItem, useDropFileInput as default, useDropFileInput };
36
+ export { DropFileMessageBox, type FileInputProps, type FileItem, createUseDropFileInput as default };
@@ -11,18 +11,21 @@ type FileInputProps = Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTM
11
11
  };
12
12
  type FileItem<T> = {
13
13
  key: string;
14
+ width?: number;
15
+ height?: number;
14
16
  item?: T;
15
17
  };
16
18
  type Props<T> = {
17
19
  defaultValue?: T | T[];
18
20
  options?: FileUploaderOptions;
19
- uploadFile?: (file: File, options?: FileUploaderOptions) => Promise<T>;
20
21
  onFileInput?: (files: File[]) => void;
21
22
  onFileUploaded?: (file: T) => Promise<void>;
22
- onChange?: (files: FileItem<T>[]) => void;
23
+ onChange?: (files: T[]) => void;
23
24
  limit?: number;
24
25
  };
25
- declare function useDropFileInput<T>({ defaultValue, options, uploadFile, onFileInput, onFileUploaded, limit, }?: Props<T>): {
26
+ declare function createUseDropFileInput<T>({ uploadFile, }: {
27
+ uploadFile: (file: File, options?: FileUploaderOptions) => Promise<T>;
28
+ }): ({ defaultValue, options, onChange, onFileInput, onFileUploaded, limit, }?: Props<T>) => {
26
29
  fileIds: string[];
27
30
  files: FileItem<T>[];
28
31
  setFiles: React.Dispatch<React.SetStateAction<FileItem<T>[]>>;
@@ -30,4 +33,4 @@ declare function useDropFileInput<T>({ defaultValue, options, uploadFile, onFile
30
33
  };
31
34
  declare function DropFileMessageBox(): React.JSX.Element;
32
35
 
33
- export { DropFileMessageBox, type FileInputProps, type FileItem, useDropFileInput as default, useDropFileInput };
36
+ export { DropFileMessageBox, type FileInputProps, type FileItem, createUseDropFileInput as default };
@@ -31,8 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var drop_file_input_exports = {};
32
32
  __export(drop_file_input_exports, {
33
33
  DropFileMessageBox: () => DropFileMessageBox,
34
- default: () => drop_file_input_default,
35
- useDropFileInput: () => useDropFileInput
34
+ default: () => createUseDropFileInput
36
35
  });
37
36
  module.exports = __toCommonJS(drop_file_input_exports);
38
37
  var import_react = __toESM(require("react"));
@@ -43,193 +42,256 @@ function cn(...classes) {
43
42
  return classes.filter(Boolean).join(" ").trim();
44
43
  }
45
44
 
46
- // src/file-kit/client/drop_file_input.tsx
47
- function useDropFileInput({
48
- defaultValue,
49
- options,
50
- uploadFile,
51
- onFileInput,
52
- onFileUploaded,
53
- limit
54
- } = {}) {
55
- const [files, setFiles] = (0, import_react.useState)(
56
- defaultValue ? (Array.isArray(defaultValue) ? defaultValue : [defaultValue]).map((v) => {
57
- return {
58
- key: (0, import_uuid.v4)(),
59
- item: v
45
+ // src/file-kit/client/metadata.ts
46
+ function generateMetadata(blob) {
47
+ return new Promise((resolve, reject) => {
48
+ if (blob.type.startsWith("image/")) {
49
+ const img = new Image();
50
+ img.src = URL.createObjectURL(blob);
51
+ img.onload = () => {
52
+ resolve({
53
+ width: img.width,
54
+ height: img.height
55
+ });
60
56
  };
61
- }).slice(0, limit ? limit : Infinity) : []
62
- );
63
- const fileRef = (0, import_react.useRef)([]);
64
- (0, import_react.useEffect)(() => {
65
- fileRef.current = files;
66
- }, [files]);
67
- const Component = (0, import_react.useCallback)(
68
- function Component2({
69
- className,
70
- container = "border border-dashed border-neutral-300 rounded flex items-center justify-center",
71
- draggingClassName,
72
- name,
73
- hideMessage = false,
74
- children,
75
- ...props
76
- }) {
77
- const [isDragging, setIsDragging] = (0, import_react.useState)(false);
78
- const handleDragEnter = (0, import_react.useCallback)((e) => {
79
- e.preventDefault();
80
- e.stopPropagation();
81
- setIsDragging(true);
82
- }, []);
83
- const handleDragLeave = (0, import_react.useCallback)((e) => {
84
- e.preventDefault();
85
- e.stopPropagation();
86
- setIsDragging(false);
87
- }, []);
88
- const handleDragOver = (0, import_react.useCallback)((e) => {
89
- e.preventDefault();
90
- e.stopPropagation();
91
- }, []);
92
- const handleFiles = (0, import_react.useCallback)(
93
- async (files2) => {
94
- if (limit && fileRef.current.length >= limit) {
95
- alert(`\uD30C\uC77C\uC740 \uCD5C\uB300 ${limit}\uAC1C \uC5C5\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`);
96
- return;
97
- }
98
- const filteredFiles = files2.filter((file) => {
99
- return true;
100
- });
101
- if (files2.length !== filteredFiles.length) {
102
- alert(`${props.accept} \uD615\uC2DD\uC758 \uD30C\uC77C\uB9CC \uC5C5\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`);
103
- }
104
- const limitedFiles = filteredFiles.slice(
105
- 0,
106
- limit ? limit - fileRef.current.length : Infinity
107
- );
108
- if (limitedFiles.length === 0) {
109
- return;
110
- }
111
- if (onFileInput) {
112
- onFileInput(limitedFiles);
113
- }
114
- for (const file of limitedFiles) {
115
- const fileItem = {
116
- key: (0, import_uuid.v4)()
117
- };
118
- setFiles((prevFiles) => [...prevFiles, fileItem]);
119
- uploadFile?.(file, options).then(async (item) => {
120
- await onFileUploaded?.(item);
121
- setFiles(
122
- (prevFiles) => prevFiles.map((f) => {
123
- if (f.key === fileItem.key) {
124
- return {
125
- ...f,
126
- item
127
- };
128
- }
129
- return f;
130
- })
131
- );
132
- });
133
- }
134
- },
135
- [props.accept]
136
- );
137
- const handleDrop = (0, import_react.useCallback)(
138
- (e) => {
57
+ img.onerror = reject;
58
+ return;
59
+ }
60
+ if (blob.type.startsWith("video/")) {
61
+ const video = document.createElement("video");
62
+ video.src = URL.createObjectURL(blob);
63
+ video.onloadedmetadata = () => {
64
+ resolve({
65
+ width: video.videoWidth,
66
+ height: video.videoHeight,
67
+ duration: video.duration
68
+ });
69
+ };
70
+ video.onerror = reject;
71
+ return;
72
+ }
73
+ resolve({});
74
+ });
75
+ }
76
+
77
+ // src/file-kit/client/drop_file_input.tsx
78
+ function createUseDropFileInput({
79
+ uploadFile
80
+ }) {
81
+ return function useDropFileInput({
82
+ defaultValue,
83
+ options,
84
+ onChange,
85
+ onFileInput,
86
+ onFileUploaded,
87
+ limit
88
+ } = {}) {
89
+ const [files, setFiles] = (0, import_react.useState)(
90
+ defaultValue ? (Array.isArray(defaultValue) ? defaultValue : [defaultValue]).map((v) => {
91
+ return {
92
+ key: (0, import_uuid.v4)(),
93
+ item: v
94
+ };
95
+ }).slice(0, limit ? limit : Infinity) : []
96
+ );
97
+ const fileRef = (0, import_react.useRef)([]);
98
+ (0, import_react.useEffect)(() => {
99
+ fileRef.current = files;
100
+ onChange?.(files.map((f) => f.item).filter(Boolean));
101
+ }, [files]);
102
+ const Component = (0, import_react.useCallback)(
103
+ function Component2({
104
+ className,
105
+ container = "border border-dashed border-neutral-300 rounded flex items-center justify-center",
106
+ draggingClassName,
107
+ name,
108
+ hideMessage = false,
109
+ children,
110
+ ...props
111
+ }) {
112
+ const [isDragging, setIsDragging] = (0, import_react.useState)(false);
113
+ const handleDragEnter = (0, import_react.useCallback)((e) => {
114
+ e.preventDefault();
115
+ e.stopPropagation();
116
+ setIsDragging(true);
117
+ }, []);
118
+ const handleDragLeave = (0, import_react.useCallback)((e) => {
139
119
  e.preventDefault();
140
120
  e.stopPropagation();
141
121
  setIsDragging(false);
142
- if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
143
- handleFiles(Array.from(e.dataTransfer.files));
144
- e.dataTransfer.clearData();
145
- }
146
- },
147
- [handleFiles]
148
- );
149
- const inputRef = (0, import_react.useRef)(null);
150
- const handleClick = (0, import_react.useCallback)(() => {
151
- inputRef.current?.click();
152
- }, []);
153
- const handleKeyDown = (0, import_react.useCallback)(
154
- (e) => {
155
- if (e.key === "Enter" || e.key === " ") {
156
- handleClick();
157
- }
158
- },
159
- [handleClick]
160
- );
161
- const handleChange = (0, import_react.useCallback)(
162
- (e) => {
163
- if (e.target.files && e.target.files.length > 0) {
164
- handleFiles(Array.from(e.target.files));
165
- e.target.value = "";
166
- }
167
- },
168
- [handleFiles]
169
- );
170
- return /* @__PURE__ */ import_react.default.createElement(
171
- "div",
172
- {
173
- className: cn(
174
- className,
175
- container,
176
- draggingClassName?.(isDragging) || (isDragging ? "bg-neutral-300/25" : "hover:bg-neutral-300/25"),
177
- "transition-colors cursor-pointer"
178
- ),
179
- onDragEnter: handleDragEnter,
180
- onDragLeave: handleDragLeave,
181
- onDragOver: handleDragOver,
182
- onDrop: handleDrop,
183
- onClick: handleClick,
184
- onChange: handleChange,
185
- onKeyDown: handleKeyDown,
186
- tabIndex: 0,
187
- role: "button"
188
- },
189
- /* @__PURE__ */ import_react.default.createElement("input", { ...props, defaultValue: "", type: "file", hidden: true, ref: inputRef }),
190
- /* @__PURE__ */ import_react.default.createElement(
191
- "input",
192
- {
193
- name,
194
- hidden: true,
195
- readOnly: true,
196
- value: files.map((file) => {
197
- if (file.item && typeof file.item === "object" && "id" in file.item) {
198
- return file.item.id;
122
+ }, []);
123
+ const handleDragOver = (0, import_react.useCallback)((e) => {
124
+ e.preventDefault();
125
+ e.stopPropagation();
126
+ }, []);
127
+ const handleFiles = (0, import_react.useCallback)(
128
+ async (files2) => {
129
+ if (limit && fileRef.current.length >= limit) {
130
+ alert(`\uD30C\uC77C\uC740 \uCD5C\uB300 ${limit}\uAC1C \uC5C5\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`);
131
+ return;
132
+ }
133
+ const filteredFiles = files2.filter((file) => {
134
+ if (!props.accept) {
135
+ return true;
199
136
  }
200
- return null;
201
- }).filter(Boolean).join(",")
202
- }
203
- ),
204
- children || !(hideMessage && !isDragging) && /* @__PURE__ */ import_react.default.createElement(DropFileMessageBox, null)
205
- );
206
- },
207
- [limit, fileRef, files, options, uploadFile, onFileInput, onFileUploaded]
208
- );
209
- const loadedFileIds = files.map((file) => {
210
- if (file.item && typeof file.item === "object" && "id" in file.item) {
211
- return file.item.id;
212
- }
213
- return null;
214
- }).filter(Boolean);
215
- const loadedFileIdsString = loadedFileIds.join(",");
216
- const fileIds = (0, import_react.useMemo)(
217
- () => loadedFileIdsString.split(",").filter(Boolean),
218
- [loadedFileIdsString]
219
- );
220
- return {
221
- fileIds,
222
- files,
223
- setFiles,
224
- Component
137
+ const accepts = props.accept.split(",");
138
+ for (const accept of accepts) {
139
+ const trimmedAccept = accept.trim();
140
+ if (file.type === trimmedAccept || file.type.endsWith(trimmedAccept) || file.name.endsWith(trimmedAccept)) {
141
+ return true;
142
+ }
143
+ if (trimmedAccept.endsWith("/*")) {
144
+ const baseType = trimmedAccept.replace("/*", "");
145
+ if (file.type.startsWith(baseType + "/")) {
146
+ return true;
147
+ }
148
+ }
149
+ }
150
+ return false;
151
+ });
152
+ if (files2.length !== filteredFiles.length) {
153
+ alert(`${props.accept} \uD615\uC2DD\uC758 \uD30C\uC77C\uB9CC \uC5C5\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`);
154
+ }
155
+ const limitedFiles = filteredFiles.slice(
156
+ 0,
157
+ limit ? limit - fileRef.current.length : Infinity
158
+ );
159
+ if (limitedFiles.length === 0) {
160
+ return;
161
+ }
162
+ if (onFileInput) {
163
+ onFileInput(limitedFiles);
164
+ }
165
+ for (const file of limitedFiles) {
166
+ const { width, height } = await generateMetadata(file);
167
+ const fileItem = {
168
+ key: (0, import_uuid.v4)(),
169
+ width: Number(width) || void 0,
170
+ height: Number(height) || void 0
171
+ };
172
+ setFiles((prevFiles) => [...prevFiles, fileItem]);
173
+ uploadFile?.(file, options).then(async (item) => {
174
+ await onFileUploaded?.(item);
175
+ setFiles(
176
+ (prevFiles) => prevFiles.map((f) => {
177
+ if (f.key === fileItem.key) {
178
+ return {
179
+ ...f,
180
+ item
181
+ };
182
+ }
183
+ return f;
184
+ })
185
+ );
186
+ });
187
+ }
188
+ },
189
+ [props.accept]
190
+ );
191
+ const handleDrop = (0, import_react.useCallback)(
192
+ (e) => {
193
+ e.preventDefault();
194
+ e.stopPropagation();
195
+ setIsDragging(false);
196
+ if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
197
+ handleFiles(Array.from(e.dataTransfer.files));
198
+ e.dataTransfer.clearData();
199
+ }
200
+ },
201
+ [handleFiles]
202
+ );
203
+ const inputRef = (0, import_react.useRef)(null);
204
+ const handleClick = (0, import_react.useCallback)(() => {
205
+ inputRef.current?.click();
206
+ }, []);
207
+ const handleKeyDown = (0, import_react.useCallback)(
208
+ (e) => {
209
+ if (e.key === "Enter" || e.key === " ") {
210
+ handleClick();
211
+ }
212
+ },
213
+ [handleClick]
214
+ );
215
+ const handleChange = (0, import_react.useCallback)(
216
+ (e) => {
217
+ if (e.target.files && e.target.files.length > 0) {
218
+ handleFiles(Array.from(e.target.files));
219
+ e.target.value = "";
220
+ }
221
+ },
222
+ [handleFiles]
223
+ );
224
+ return /* @__PURE__ */ import_react.default.createElement(
225
+ "div",
226
+ {
227
+ className: cn(
228
+ className,
229
+ container,
230
+ draggingClassName?.(isDragging) || (isDragging ? "bg-neutral-300/25" : "hover:bg-neutral-300/25"),
231
+ "transition-colors cursor-pointer"
232
+ ),
233
+ onDragEnter: handleDragEnter,
234
+ onDragLeave: handleDragLeave,
235
+ onDragOver: handleDragOver,
236
+ onDrop: handleDrop,
237
+ onClick: handleClick,
238
+ onChange: handleChange,
239
+ onKeyDown: handleKeyDown,
240
+ tabIndex: 0,
241
+ role: "button"
242
+ },
243
+ /* @__PURE__ */ import_react.default.createElement(
244
+ "input",
245
+ {
246
+ ...props,
247
+ defaultValue: "",
248
+ type: "file",
249
+ hidden: true,
250
+ ref: inputRef
251
+ }
252
+ ),
253
+ /* @__PURE__ */ import_react.default.createElement(
254
+ "input",
255
+ {
256
+ name,
257
+ hidden: true,
258
+ readOnly: true,
259
+ value: files.map((file) => {
260
+ if (file.item && typeof file.item === "object" && "id" in file.item) {
261
+ return file.item.id;
262
+ }
263
+ return null;
264
+ }).filter(Boolean).join(",")
265
+ }
266
+ ),
267
+ children || !(hideMessage && !isDragging) && /* @__PURE__ */ import_react.default.createElement(DropFileMessageBox, null)
268
+ );
269
+ },
270
+ [limit, fileRef, files, options, uploadFile, onFileInput, onFileUploaded]
271
+ );
272
+ const loadedFileIds = files.map((file) => {
273
+ if (file.item && typeof file.item === "object" && "id" in file.item) {
274
+ return file.item.id;
275
+ }
276
+ return null;
277
+ }).filter(Boolean);
278
+ const loadedFileIdsString = loadedFileIds.join(",");
279
+ const fileIds = (0, import_react.useMemo)(
280
+ () => loadedFileIdsString.split(",").filter(Boolean),
281
+ [loadedFileIdsString]
282
+ );
283
+ return {
284
+ fileIds,
285
+ files,
286
+ setFiles,
287
+ Component
288
+ };
225
289
  };
226
290
  }
227
291
  function DropFileMessageBox() {
228
292
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "text-sm pointer-events-none flex justify-center items-center" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ import_react.default.createElement("span", null, "\uD30C\uC77C\uC744 \uC5EC\uAE30\uB85C \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574\uC11C \uC120\uD0DD\uD574 \uC8FC\uC138\uC694")));
229
293
  }
230
- var drop_file_input_default = useDropFileInput;
231
294
  // Annotate the CommonJS export names for ESM import in node:
232
295
  0 && (module.exports = {
233
- DropFileMessageBox,
234
- useDropFileInput
296
+ DropFileMessageBox
235
297
  });