@unciatech/file-manager 0.0.19 → 0.0.21

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.
@@ -0,0 +1,194 @@
1
+ type FileUploadInput = {
2
+ file: File;
3
+ metadata: Partial<FileMetaData>;
4
+ videoSource?: VideoSource;
5
+ };
6
+ interface IFileManagerProvider {
7
+ getFolder(folderId: FolderId): Promise<Folder | null>;
8
+ getFolders(folderId: FolderId, page?: number, limit?: number, query?: string): Promise<{
9
+ folders: Folder[];
10
+ pagination: PaginationInfo;
11
+ }>;
12
+ getTags(): Promise<string[]>;
13
+ getFiles(folderId: FolderId, fileTypes?: FileType[] | null, page?: number, limit?: number, query?: string): Promise<{
14
+ files: FileMetaData[];
15
+ pagination: PaginationInfo;
16
+ }>;
17
+ /**
18
+ * Get files and folders separately (folders always come first)
19
+ * Folders are returned for the current page, followed by files
20
+ */
21
+ getItems(folderId: FolderId, fileTypes?: FileType[], page?: number, limit?: number, query?: string): Promise<{
22
+ folders: Folder[];
23
+ files: FileMetaData[];
24
+ pagination: PaginationInfo;
25
+ }>;
26
+ createFolder(name: string, parentId?: FolderId): Promise<Folder>;
27
+ uploadFiles(files: FileUploadInput[], folderId?: FolderId): Promise<FileMetaData[]>;
28
+ renameFolder(folderId: FolderId, newName: string): Promise<Folder>;
29
+ moveFiles(fileIds: EntityId[], newFolderId: FolderId): Promise<FileMetaData[]>;
30
+ moveFolders(folderIds: FolderId[], newParentId: FolderId): Promise<Folder[]>;
31
+ updateFileMetaData(fileId: EntityId, metaData: Partial<FileMetaData>): Promise<FileMetaData>;
32
+ deleteFiles(fileIds: EntityId[]): Promise<void>;
33
+ deleteFolders(folderIds: FolderId[]): Promise<void>;
34
+ findFiles(searchQuery: string): Promise<FileMetaData[]>;
35
+ findFolders(searchQuery: string): Promise<Folder[]>;
36
+ }
37
+
38
+ declare const MODE: {
39
+ readonly PAGE: "page";
40
+ readonly MODAL: "modal";
41
+ };
42
+ type Mode = (typeof MODE)[keyof typeof MODE];
43
+ declare const FILE_TYPE: {
44
+ readonly IMAGE: "images";
45
+ readonly VIDEO: "videos";
46
+ readonly AUDIO: "audios";
47
+ readonly FILE: "files";
48
+ };
49
+ type FileType = (typeof FILE_TYPE)[keyof typeof FILE_TYPE];
50
+ declare const SELECTION_MODE: {
51
+ readonly SINGLE: "single";
52
+ readonly MULTIPLE: "multiple";
53
+ };
54
+ type SelectionMode = (typeof SELECTION_MODE)[keyof typeof SELECTION_MODE];
55
+ declare const VIEW_MODE: {
56
+ readonly GRID: "grid";
57
+ readonly LIST: "list";
58
+ };
59
+ type ViewMode = (typeof VIEW_MODE)[keyof typeof VIEW_MODE];
60
+ declare const VIDEO_SOURCE: {
61
+ readonly LOCAL: "local";
62
+ readonly REMOTE: "remote";
63
+ readonly YOUTUBE: "youtube";
64
+ readonly VIMEO: "vimeo";
65
+ };
66
+ type VideoSource = (typeof VIDEO_SOURCE)[keyof typeof VIDEO_SOURCE];
67
+ interface MetaDataType {
68
+ /** Video or Audio duration in seconds. */
69
+ duration?: number;
70
+ /** Provider source for video content (e.g., 'local', 'youtube'). */
71
+ videoSource?: VideoSource;
72
+ /** Audio bitrate in kbps. */
73
+ bitrate?: number;
74
+ /** Total number of pages for document file types. */
75
+ pageCount?: number;
76
+ /** Original creator or author of the document. */
77
+ author?: string;
78
+ /** General description text used across multiple asset types. */
79
+ description?: string;
80
+ }
81
+ type EntityId = string | number;
82
+ type FolderId = string | number | null;
83
+ interface Folder {
84
+ id: FolderId;
85
+ name: string;
86
+ pathId: number;
87
+ path: string;
88
+ parent?: Folder | null;
89
+ folderCount?: number;
90
+ parentId: FolderId;
91
+ folderPath?: string;
92
+ color?: string;
93
+ fileCount?: number;
94
+ createdAt: Date;
95
+ updatedAt: Date;
96
+ tags?: string[];
97
+ }
98
+ interface FormatDetails {
99
+ ext: string;
100
+ url: string;
101
+ hash: string;
102
+ mime: string;
103
+ name: string;
104
+ path: string | null;
105
+ size: number;
106
+ width: number;
107
+ height: number;
108
+ }
109
+ /**
110
+ * Core interface representing a File entity in the file manager.
111
+ * Supports various formats (images, videos, audio, documents) via common fields
112
+ * and nested metadata structures.
113
+ */
114
+ interface FileMetaData {
115
+ /** Unique identifier for the file. */
116
+ id: EntityId;
117
+ /** Human-readable name of the file (including extension). */
118
+ name: string;
119
+ /** ID of the folder containing this file. Null represents the root directory. */
120
+ folderId: FolderId;
121
+ /** Path representation of the file's location (e.g., "/1/156"). */
122
+ folderPath?: string;
123
+ /** Size of the file in bytes. */
124
+ size: number;
125
+ /** Direct URL path to access or download the full asset. */
126
+ url: string;
127
+ /** URL to an optimized, lightweight thumbnail or preview of the asset. */
128
+ previewUrl?: string;
129
+ /** Content-Type HTTP header representation (e.g., "image/jpeg"). */
130
+ mime: string;
131
+ /** File extension including the dot (e.g., ".jpg"). */
132
+ ext?: string;
133
+ /** Content hash for deduplication and cache busting. */
134
+ hash?: string;
135
+ /** Accessible alt text for images to display when images are disabled. */
136
+ alternativeText?: string;
137
+ /** Caption text commonly used in images and videos. */
138
+ caption?: string;
139
+ /** Intrinsic width in pixels for image/video assets. */
140
+ width?: number;
141
+ /** Intrinsic height in pixels for image/video assets. */
142
+ height?: number;
143
+ /** Collection of generated optimized formats for images. */
144
+ formats?: Record<string, FormatDetails>;
145
+ /** Dynamic metadata payload containing properties specific to the asset type. */
146
+ metaData: MetaDataType;
147
+ /** Timestamp of file creation. */
148
+ createdAt: Date;
149
+ /** Timestamp of last file modification. */
150
+ updatedAt: Date;
151
+ /** Categorization tags for sorting and discovery. */
152
+ tags?: string[];
153
+ }
154
+ interface PaginationInfo {
155
+ currentPage: number;
156
+ totalPages: number;
157
+ totalFiles: number;
158
+ filesPerPage: number;
159
+ }
160
+ interface FileManagerPageProps {
161
+ allowedFileTypes: FileType[];
162
+ viewMode: ViewMode;
163
+ initialFolderId?: FolderId;
164
+ provider: IFileManagerProvider;
165
+ basePath?: string;
166
+ }
167
+ interface FileManagerModalProps {
168
+ open: boolean;
169
+ onClose: () => void;
170
+ onFilesSelected: (files: FileMetaData[]) => void;
171
+ fileSelectionMode?: SelectionMode;
172
+ allowedFileTypes: FileType[];
173
+ acceptedFileTypes?: FileType[];
174
+ viewMode?: ViewMode;
175
+ initialFolderId?: FolderId;
176
+ provider: IFileManagerProvider;
177
+ basePath?: string;
178
+ }
179
+ interface FileManagerRootProps {
180
+ mode: Mode;
181
+ selectionMode: SelectionMode;
182
+ allowedFileTypes: FileType[];
183
+ viewMode: ViewMode;
184
+ initialFolderId?: FolderId;
185
+ acceptedFileTypesForModal?: FileType[];
186
+ provider: IFileManagerProvider;
187
+ basePath?: string;
188
+ onFilesSelected?: (files: FileMetaData[]) => void;
189
+ onClose?: () => void;
190
+ maxUploadFiles?: number;
191
+ maxUploadSize?: number;
192
+ }
193
+
194
+ export type { EntityId as E, FolderId as F, IFileManagerProvider as I, Mode as M, PaginationInfo as P, SelectionMode as S, ViewMode as V, Folder as a, FileType as b, FileMetaData as c, FileUploadInput as d, FileManagerPageProps as e, FileManagerModalProps as f, FileManagerRootProps as g };
@@ -0,0 +1,194 @@
1
+ type FileUploadInput = {
2
+ file: File;
3
+ metadata: Partial<FileMetaData>;
4
+ videoSource?: VideoSource;
5
+ };
6
+ interface IFileManagerProvider {
7
+ getFolder(folderId: FolderId): Promise<Folder | null>;
8
+ getFolders(folderId: FolderId, page?: number, limit?: number, query?: string): Promise<{
9
+ folders: Folder[];
10
+ pagination: PaginationInfo;
11
+ }>;
12
+ getTags(): Promise<string[]>;
13
+ getFiles(folderId: FolderId, fileTypes?: FileType[] | null, page?: number, limit?: number, query?: string): Promise<{
14
+ files: FileMetaData[];
15
+ pagination: PaginationInfo;
16
+ }>;
17
+ /**
18
+ * Get files and folders separately (folders always come first)
19
+ * Folders are returned for the current page, followed by files
20
+ */
21
+ getItems(folderId: FolderId, fileTypes?: FileType[], page?: number, limit?: number, query?: string): Promise<{
22
+ folders: Folder[];
23
+ files: FileMetaData[];
24
+ pagination: PaginationInfo;
25
+ }>;
26
+ createFolder(name: string, parentId?: FolderId): Promise<Folder>;
27
+ uploadFiles(files: FileUploadInput[], folderId?: FolderId): Promise<FileMetaData[]>;
28
+ renameFolder(folderId: FolderId, newName: string): Promise<Folder>;
29
+ moveFiles(fileIds: EntityId[], newFolderId: FolderId): Promise<FileMetaData[]>;
30
+ moveFolders(folderIds: FolderId[], newParentId: FolderId): Promise<Folder[]>;
31
+ updateFileMetaData(fileId: EntityId, metaData: Partial<FileMetaData>): Promise<FileMetaData>;
32
+ deleteFiles(fileIds: EntityId[]): Promise<void>;
33
+ deleteFolders(folderIds: FolderId[]): Promise<void>;
34
+ findFiles(searchQuery: string): Promise<FileMetaData[]>;
35
+ findFolders(searchQuery: string): Promise<Folder[]>;
36
+ }
37
+
38
+ declare const MODE: {
39
+ readonly PAGE: "page";
40
+ readonly MODAL: "modal";
41
+ };
42
+ type Mode = (typeof MODE)[keyof typeof MODE];
43
+ declare const FILE_TYPE: {
44
+ readonly IMAGE: "images";
45
+ readonly VIDEO: "videos";
46
+ readonly AUDIO: "audios";
47
+ readonly FILE: "files";
48
+ };
49
+ type FileType = (typeof FILE_TYPE)[keyof typeof FILE_TYPE];
50
+ declare const SELECTION_MODE: {
51
+ readonly SINGLE: "single";
52
+ readonly MULTIPLE: "multiple";
53
+ };
54
+ type SelectionMode = (typeof SELECTION_MODE)[keyof typeof SELECTION_MODE];
55
+ declare const VIEW_MODE: {
56
+ readonly GRID: "grid";
57
+ readonly LIST: "list";
58
+ };
59
+ type ViewMode = (typeof VIEW_MODE)[keyof typeof VIEW_MODE];
60
+ declare const VIDEO_SOURCE: {
61
+ readonly LOCAL: "local";
62
+ readonly REMOTE: "remote";
63
+ readonly YOUTUBE: "youtube";
64
+ readonly VIMEO: "vimeo";
65
+ };
66
+ type VideoSource = (typeof VIDEO_SOURCE)[keyof typeof VIDEO_SOURCE];
67
+ interface MetaDataType {
68
+ /** Video or Audio duration in seconds. */
69
+ duration?: number;
70
+ /** Provider source for video content (e.g., 'local', 'youtube'). */
71
+ videoSource?: VideoSource;
72
+ /** Audio bitrate in kbps. */
73
+ bitrate?: number;
74
+ /** Total number of pages for document file types. */
75
+ pageCount?: number;
76
+ /** Original creator or author of the document. */
77
+ author?: string;
78
+ /** General description text used across multiple asset types. */
79
+ description?: string;
80
+ }
81
+ type EntityId = string | number;
82
+ type FolderId = string | number | null;
83
+ interface Folder {
84
+ id: FolderId;
85
+ name: string;
86
+ pathId: number;
87
+ path: string;
88
+ parent?: Folder | null;
89
+ folderCount?: number;
90
+ parentId: FolderId;
91
+ folderPath?: string;
92
+ color?: string;
93
+ fileCount?: number;
94
+ createdAt: Date;
95
+ updatedAt: Date;
96
+ tags?: string[];
97
+ }
98
+ interface FormatDetails {
99
+ ext: string;
100
+ url: string;
101
+ hash: string;
102
+ mime: string;
103
+ name: string;
104
+ path: string | null;
105
+ size: number;
106
+ width: number;
107
+ height: number;
108
+ }
109
+ /**
110
+ * Core interface representing a File entity in the file manager.
111
+ * Supports various formats (images, videos, audio, documents) via common fields
112
+ * and nested metadata structures.
113
+ */
114
+ interface FileMetaData {
115
+ /** Unique identifier for the file. */
116
+ id: EntityId;
117
+ /** Human-readable name of the file (including extension). */
118
+ name: string;
119
+ /** ID of the folder containing this file. Null represents the root directory. */
120
+ folderId: FolderId;
121
+ /** Path representation of the file's location (e.g., "/1/156"). */
122
+ folderPath?: string;
123
+ /** Size of the file in bytes. */
124
+ size: number;
125
+ /** Direct URL path to access or download the full asset. */
126
+ url: string;
127
+ /** URL to an optimized, lightweight thumbnail or preview of the asset. */
128
+ previewUrl?: string;
129
+ /** Content-Type HTTP header representation (e.g., "image/jpeg"). */
130
+ mime: string;
131
+ /** File extension including the dot (e.g., ".jpg"). */
132
+ ext?: string;
133
+ /** Content hash for deduplication and cache busting. */
134
+ hash?: string;
135
+ /** Accessible alt text for images to display when images are disabled. */
136
+ alternativeText?: string;
137
+ /** Caption text commonly used in images and videos. */
138
+ caption?: string;
139
+ /** Intrinsic width in pixels for image/video assets. */
140
+ width?: number;
141
+ /** Intrinsic height in pixels for image/video assets. */
142
+ height?: number;
143
+ /** Collection of generated optimized formats for images. */
144
+ formats?: Record<string, FormatDetails>;
145
+ /** Dynamic metadata payload containing properties specific to the asset type. */
146
+ metaData: MetaDataType;
147
+ /** Timestamp of file creation. */
148
+ createdAt: Date;
149
+ /** Timestamp of last file modification. */
150
+ updatedAt: Date;
151
+ /** Categorization tags for sorting and discovery. */
152
+ tags?: string[];
153
+ }
154
+ interface PaginationInfo {
155
+ currentPage: number;
156
+ totalPages: number;
157
+ totalFiles: number;
158
+ filesPerPage: number;
159
+ }
160
+ interface FileManagerPageProps {
161
+ allowedFileTypes: FileType[];
162
+ viewMode: ViewMode;
163
+ initialFolderId?: FolderId;
164
+ provider: IFileManagerProvider;
165
+ basePath?: string;
166
+ }
167
+ interface FileManagerModalProps {
168
+ open: boolean;
169
+ onClose: () => void;
170
+ onFilesSelected: (files: FileMetaData[]) => void;
171
+ fileSelectionMode?: SelectionMode;
172
+ allowedFileTypes: FileType[];
173
+ acceptedFileTypes?: FileType[];
174
+ viewMode?: ViewMode;
175
+ initialFolderId?: FolderId;
176
+ provider: IFileManagerProvider;
177
+ basePath?: string;
178
+ }
179
+ interface FileManagerRootProps {
180
+ mode: Mode;
181
+ selectionMode: SelectionMode;
182
+ allowedFileTypes: FileType[];
183
+ viewMode: ViewMode;
184
+ initialFolderId?: FolderId;
185
+ acceptedFileTypesForModal?: FileType[];
186
+ provider: IFileManagerProvider;
187
+ basePath?: string;
188
+ onFilesSelected?: (files: FileMetaData[]) => void;
189
+ onClose?: () => void;
190
+ maxUploadFiles?: number;
191
+ maxUploadSize?: number;
192
+ }
193
+
194
+ export type { EntityId as E, FolderId as F, IFileManagerProvider as I, Mode as M, PaginationInfo as P, SelectionMode as S, ViewMode as V, Folder as a, FileType as b, FileMetaData as c, FileUploadInput as d, FileManagerPageProps as e, FileManagerModalProps as f, FileManagerRootProps as g };
package/dist/index.d.mts CHANGED
@@ -1,197 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- type FileUploadInput = {
4
- file: File;
5
- metadata: Partial<FileMetaData>;
6
- videoSource?: VideoSource;
7
- };
8
- interface IFileManagerProvider {
9
- getFolder(folderId: FolderId): Promise<Folder | null>;
10
- getFolders(folderId: FolderId, page?: number, limit?: number, query?: string): Promise<{
11
- folders: Folder[];
12
- pagination: PaginationInfo;
13
- }>;
14
- getTags(): Promise<string[]>;
15
- getFiles(folderId: FolderId, fileTypes?: FileType[] | null, page?: number, limit?: number, query?: string): Promise<{
16
- files: FileMetaData[];
17
- pagination: PaginationInfo;
18
- }>;
19
- /**
20
- * Get files and folders separately (folders always come first)
21
- * Folders are returned for the current page, followed by files
22
- */
23
- getItems(folderId: FolderId, fileTypes?: FileType[], page?: number, limit?: number, query?: string): Promise<{
24
- folders: Folder[];
25
- files: FileMetaData[];
26
- pagination: PaginationInfo;
27
- }>;
28
- createFolder(name: string, parentId?: FolderId): Promise<Folder>;
29
- uploadFiles(files: FileUploadInput[], folderId?: FolderId): Promise<FileMetaData[]>;
30
- renameFolder(folderId: FolderId, newName: string): Promise<Folder>;
31
- moveFiles(fileIds: EntityId[], newFolderId: FolderId): Promise<FileMetaData[]>;
32
- moveFolders(folderIds: FolderId[], newParentId: FolderId): Promise<Folder[]>;
33
- updateFileMetaData(fileId: EntityId, metaData: Partial<FileMetaData>): Promise<FileMetaData>;
34
- deleteFiles(fileIds: EntityId[]): Promise<void>;
35
- deleteFolders(folderIds: FolderId[]): Promise<void>;
36
- findFiles(searchQuery: string): Promise<FileMetaData[]>;
37
- findFolders(searchQuery: string): Promise<Folder[]>;
38
- }
39
-
40
- declare const MODE: {
41
- readonly PAGE: "page";
42
- readonly MODAL: "modal";
43
- };
44
- type Mode = (typeof MODE)[keyof typeof MODE];
45
- declare const FILE_TYPE: {
46
- readonly IMAGE: "images";
47
- readonly VIDEO: "videos";
48
- readonly AUDIO: "audios";
49
- readonly FILE: "files";
50
- };
51
- type FileType = (typeof FILE_TYPE)[keyof typeof FILE_TYPE];
52
- declare const SELECTION_MODE: {
53
- readonly SINGLE: "single";
54
- readonly MULTIPLE: "multiple";
55
- };
56
- type SelectionMode = (typeof SELECTION_MODE)[keyof typeof SELECTION_MODE];
57
- declare const VIEW_MODE: {
58
- readonly GRID: "grid";
59
- readonly LIST: "list";
60
- };
61
- type ViewMode = (typeof VIEW_MODE)[keyof typeof VIEW_MODE];
62
- declare const VIDEO_SOURCE: {
63
- readonly LOCAL: "local";
64
- readonly REMOTE: "remote";
65
- readonly YOUTUBE: "youtube";
66
- readonly VIMEO: "vimeo";
67
- };
68
- type VideoSource = (typeof VIDEO_SOURCE)[keyof typeof VIDEO_SOURCE];
69
- interface MetaDataType {
70
- /** Video or Audio duration in seconds. */
71
- duration?: number;
72
- /** Provider source for video content (e.g., 'local', 'youtube'). */
73
- videoSource?: VideoSource;
74
- /** Audio bitrate in kbps. */
75
- bitrate?: number;
76
- /** Total number of pages for document file types. */
77
- pageCount?: number;
78
- /** Original creator or author of the document. */
79
- author?: string;
80
- /** General description text used across multiple asset types. */
81
- description?: string;
82
- }
83
- type EntityId = string | number;
84
- type FolderId = string | number | null;
85
- interface Folder {
86
- id: FolderId;
87
- name: string;
88
- pathId: number;
89
- path: string;
90
- parent?: Folder | null;
91
- folderCount?: number;
92
- parentId: FolderId;
93
- folderPath?: string;
94
- color?: string;
95
- fileCount?: number;
96
- createdAt: Date;
97
- updatedAt: Date;
98
- tags?: string[];
99
- }
100
- interface FormatDetails {
101
- ext: string;
102
- url: string;
103
- hash: string;
104
- mime: string;
105
- name: string;
106
- path: string | null;
107
- size: number;
108
- width: number;
109
- height: number;
110
- }
111
- /**
112
- * Core interface representing a File entity in the file manager.
113
- * Supports various formats (images, videos, audio, documents) via common fields
114
- * and nested metadata structures.
115
- */
116
- interface FileMetaData {
117
- /** Unique identifier for the file. */
118
- id: EntityId;
119
- /** Human-readable name of the file (including extension). */
120
- name: string;
121
- /** ID of the folder containing this file. Null represents the root directory. */
122
- folderId: FolderId;
123
- /** Path representation of the file's location (e.g., "/1/156"). */
124
- folderPath?: string;
125
- /** Size of the file in bytes. */
126
- size: number;
127
- /** Direct URL path to access or download the full asset. */
128
- url: string;
129
- /** URL to an optimized, lightweight thumbnail or preview of the asset. */
130
- previewUrl?: string;
131
- /** Content-Type HTTP header representation (e.g., "image/jpeg"). */
132
- mime: string;
133
- /** File extension including the dot (e.g., ".jpg"). */
134
- ext?: string;
135
- /** Content hash for deduplication and cache busting. */
136
- hash?: string;
137
- /** Accessible alt text for images to display when images are disabled. */
138
- alternativeText?: string;
139
- /** Caption text commonly used in images and videos. */
140
- caption?: string;
141
- /** Intrinsic width in pixels for image/video assets. */
142
- width?: number;
143
- /** Intrinsic height in pixels for image/video assets. */
144
- height?: number;
145
- /** Collection of generated optimized formats for images. */
146
- formats?: Record<string, FormatDetails>;
147
- /** Dynamic metadata payload containing properties specific to the asset type. */
148
- metaData: MetaDataType;
149
- /** Timestamp of file creation. */
150
- createdAt: Date;
151
- /** Timestamp of last file modification. */
152
- updatedAt: Date;
153
- /** Categorization tags for sorting and discovery. */
154
- tags?: string[];
155
- }
156
- interface PaginationInfo {
157
- currentPage: number;
158
- totalPages: number;
159
- totalFiles: number;
160
- filesPerPage: number;
161
- }
162
- interface FileManagerPageProps {
163
- allowedFileTypes: FileType[];
164
- viewMode: ViewMode;
165
- initialFolderId?: FolderId;
166
- provider: IFileManagerProvider;
167
- basePath?: string;
168
- }
169
- interface FileManagerModalProps {
170
- open: boolean;
171
- onClose: () => void;
172
- onFilesSelected: (files: FileMetaData[]) => void;
173
- fileSelectionMode?: SelectionMode;
174
- allowedFileTypes: FileType[];
175
- acceptedFileTypes?: FileType[];
176
- viewMode?: ViewMode;
177
- initialFolderId?: FolderId;
178
- provider: IFileManagerProvider;
179
- basePath?: string;
180
- }
181
- interface FileManagerRootProps {
182
- mode: Mode;
183
- selectionMode: SelectionMode;
184
- allowedFileTypes: FileType[];
185
- viewMode: ViewMode;
186
- initialFolderId?: FolderId;
187
- acceptedFileTypesForModal?: FileType[];
188
- provider: IFileManagerProvider;
189
- basePath?: string;
190
- onFilesSelected?: (files: FileMetaData[]) => void;
191
- onClose?: () => void;
192
- maxUploadFiles?: number;
193
- maxUploadSize?: number;
194
- }
2
+ import { e as FileManagerPageProps, f as FileManagerModalProps, g as FileManagerRootProps, c as FileMetaData, a as Folder, P as PaginationInfo, M as Mode, S as SelectionMode, b as FileType, I as IFileManagerProvider, d as FileUploadInput, F as FolderId, E as EntityId } from './file-manager-4KJI2OA3.mjs';
3
+ export { V as ViewMode } from './file-manager-4KJI2OA3.mjs';
195
4
 
196
5
  declare function FileManager(props: FileManagerPageProps): react_jsx_runtime.JSX.Element;
197
6
 
@@ -254,39 +63,4 @@ declare function FileManagerProvider({ children, mode, selectionMode, allowedFil
254
63
  }): react_jsx_runtime.JSX.Element;
255
64
  declare function useFileManager(): FileManagerContextType;
256
65
 
257
- declare class MockProvider implements IFileManagerProvider {
258
- getFolder(folderId: FolderId): Promise<Folder | null>;
259
- getFolders(folderId: FolderId, page?: number, limit?: number, query?: string): Promise<{
260
- folders: Folder[];
261
- pagination: PaginationInfo;
262
- }>;
263
- getTags(): Promise<string[]>;
264
- getFiles(folderId: FolderId, fileTypes?: FileType[], page?: number, limit?: number, query?: string): Promise<{
265
- files: FileMetaData[];
266
- pagination: PaginationInfo;
267
- }>;
268
- /**
269
- * Get files and folders separately (folders always come first)
270
- * Folders are not paginated (all folders in current directory are returned)
271
- * Files are paginated after folders
272
- */
273
- getItems(folderId: FolderId, fileTypes?: FileType[], page?: number, limit?: number, query?: string): Promise<{
274
- folders: Folder[];
275
- files: FileMetaData[];
276
- pagination: PaginationInfo;
277
- }>;
278
- createFolder(name: string, parentId?: FolderId): Promise<Folder>;
279
- private getMetaDataType;
280
- private getFileType;
281
- uploadFiles(files: FileUploadInput[], folderId?: FolderId): Promise<FileMetaData[]>;
282
- renameFolder(folderId: EntityId, newName: string): Promise<Folder>;
283
- updateFileMetaData(fileId: EntityId, updates: Partial<FileMetaData>): Promise<FileMetaData>;
284
- deleteFiles(fileIds: EntityId[]): Promise<void>;
285
- deleteFolders(folderIds: EntityId[]): Promise<void>;
286
- findFiles(searchQuery: string): Promise<FileMetaData[]>;
287
- findFolders(searchQuery: string): Promise<Folder[]>;
288
- moveFiles(fileIds: EntityId[], newFolderId: FolderId): Promise<FileMetaData[]>;
289
- moveFolders(folderIds: FolderId[], newParentId: FolderId): Promise<Folder[]>;
290
- }
291
-
292
- export { FileManager, FileManagerModal, type FileManagerModalProps, type FileManagerPageProps, FileManagerProvider, type FileMetaData, type FileType, type Folder, type IFileManagerProvider, MockProvider, type SelectionMode, type ViewMode, useFileManager };
66
+ export { FileManager, FileManagerModal, FileManagerModalProps, FileManagerPageProps, FileManagerProvider, FileMetaData, FileType, Folder, IFileManagerProvider, SelectionMode, useFileManager };