@cannyminds/dms-file-viewers 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-3STHCDAC.js +1402 -0
- package/dist/chunk-3STHCDAC.js.map +1 -0
- package/dist/chunk-4RL77HKO.js +196 -0
- package/dist/chunk-4RL77HKO.js.map +1 -0
- package/dist/chunk-73ZIFR3P.mjs +1402 -0
- package/dist/chunk-73ZIFR3P.mjs.map +1 -0
- package/dist/chunk-7JTIG6OU.js +177 -0
- package/dist/chunk-7JTIG6OU.js.map +1 -0
- package/dist/chunk-BNHQYEZ7.js +448 -0
- package/dist/chunk-BNHQYEZ7.js.map +1 -0
- package/dist/chunk-EMP7RZM2.js +159 -0
- package/dist/chunk-EMP7RZM2.js.map +1 -0
- package/dist/chunk-FZYMVHF6.mjs +159 -0
- package/dist/chunk-FZYMVHF6.mjs.map +1 -0
- package/dist/chunk-GNWU6XHH.js +288 -0
- package/dist/chunk-GNWU6XHH.js.map +1 -0
- package/dist/chunk-LKBM4O47.mjs +177 -0
- package/dist/chunk-LKBM4O47.mjs.map +1 -0
- package/dist/chunk-NOLXOOIP.mjs +448 -0
- package/dist/chunk-NOLXOOIP.mjs.map +1 -0
- package/dist/chunk-QLJKOQTP.mjs +78 -0
- package/dist/chunk-QLJKOQTP.mjs.map +1 -0
- package/dist/chunk-QQDQJ7TS.mjs +263 -0
- package/dist/chunk-QQDQJ7TS.mjs.map +1 -0
- package/dist/chunk-QRYIHDRT.mjs +196 -0
- package/dist/chunk-QRYIHDRT.mjs.map +1 -0
- package/dist/chunk-RE4XRGSV.js +263 -0
- package/dist/chunk-RE4XRGSV.js.map +1 -0
- package/dist/chunk-XQBXRMB7.mjs +288 -0
- package/dist/chunk-XQBXRMB7.mjs.map +1 -0
- package/dist/chunk-Z7FUO5RX.js +78 -0
- package/dist/chunk-Z7FUO5RX.js.map +1 -0
- package/dist/components/viewers/AudioViewer.js +9 -0
- package/dist/components/viewers/AudioViewer.js.map +1 -0
- package/dist/components/viewers/AudioViewer.mjs +9 -0
- package/dist/components/viewers/AudioViewer.mjs.map +1 -0
- package/dist/components/viewers/DefaultViewer.js +8 -0
- package/dist/components/viewers/DefaultViewer.js.map +1 -0
- package/dist/components/viewers/DefaultViewer.mjs +8 -0
- package/dist/components/viewers/DefaultViewer.mjs.map +1 -0
- package/dist/components/viewers/ImageViewer.js +10 -0
- package/dist/components/viewers/ImageViewer.js.map +1 -0
- package/dist/components/viewers/ImageViewer.mjs +10 -0
- package/dist/components/viewers/ImageViewer.mjs.map +1 -0
- package/dist/components/viewers/PDFViewer.js +9 -0
- package/dist/components/viewers/PDFViewer.js.map +1 -0
- package/dist/components/viewers/PDFViewer.mjs +9 -0
- package/dist/components/viewers/PDFViewer.mjs.map +1 -0
- package/dist/components/viewers/TIFFViewer.js +9 -0
- package/dist/components/viewers/TIFFViewer.js.map +1 -0
- package/dist/components/viewers/TIFFViewer.mjs +9 -0
- package/dist/components/viewers/TIFFViewer.mjs.map +1 -0
- package/dist/components/viewers/TextViewer.js +9 -0
- package/dist/components/viewers/TextViewer.js.map +1 -0
- package/dist/components/viewers/TextViewer.mjs +9 -0
- package/dist/components/viewers/TextViewer.mjs.map +1 -0
- package/dist/components/viewers/VideoViewer.js +9 -0
- package/dist/components/viewers/VideoViewer.js.map +1 -0
- package/dist/components/viewers/VideoViewer.mjs +9 -0
- package/dist/components/viewers/VideoViewer.mjs.map +1 -0
- package/dist/index.js +284 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +284 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/utils/fileUtils.ts
|
|
4
|
+
var getFileExtension = (fileName) => {
|
|
5
|
+
const extension = fileName.toLowerCase().split(".").pop();
|
|
6
|
+
return extension || "";
|
|
7
|
+
};
|
|
8
|
+
var getMimeTypeFromExtension = (extension) => {
|
|
9
|
+
const mimeTypes = {
|
|
10
|
+
"pdf": "application/pdf",
|
|
11
|
+
"txt": "text/plain",
|
|
12
|
+
"json": "application/json",
|
|
13
|
+
"xml": "text/xml",
|
|
14
|
+
"csv": "text/csv",
|
|
15
|
+
"jpg": "image/jpeg",
|
|
16
|
+
"jpeg": "image/jpeg",
|
|
17
|
+
"png": "image/png",
|
|
18
|
+
"gif": "image/gif",
|
|
19
|
+
"svg": "image/svg+xml",
|
|
20
|
+
"mp4": "video/mp4",
|
|
21
|
+
"webm": "video/webm",
|
|
22
|
+
"mp3": "audio/mpeg",
|
|
23
|
+
"wav": "audio/wav",
|
|
24
|
+
"doc": "application/msword",
|
|
25
|
+
"docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
26
|
+
"xls": "application/vnd.ms-excel",
|
|
27
|
+
"xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
28
|
+
};
|
|
29
|
+
return mimeTypes[extension] || "application/octet-stream";
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// src/components/FileIcon.tsx
|
|
33
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
34
|
+
var FileIcon = ({ ext, size = 48, sx = {} }) => {
|
|
35
|
+
const extension = ext?.toLowerCase().replace(/^\./, "") || "";
|
|
36
|
+
const getIconConfig = (extension2) => {
|
|
37
|
+
switch (extension2) {
|
|
38
|
+
case "pdf":
|
|
39
|
+
return { color: "#d32f2f", bgColor: "#ffebee", label: "PDF" };
|
|
40
|
+
case "doc":
|
|
41
|
+
case "docx":
|
|
42
|
+
return { color: "#1976d2", bgColor: "#e3f2fd", label: extension2.toUpperCase() };
|
|
43
|
+
case "xls":
|
|
44
|
+
case "xlsx":
|
|
45
|
+
return { color: "#388e3c", bgColor: "#e8f5e8", label: extension2.toUpperCase() };
|
|
46
|
+
case "ppt":
|
|
47
|
+
case "pptx":
|
|
48
|
+
return { color: "#f57c00", bgColor: "#fff3e0", label: extension2.toUpperCase() };
|
|
49
|
+
case "jpg":
|
|
50
|
+
case "jpeg":
|
|
51
|
+
case "png":
|
|
52
|
+
case "gif":
|
|
53
|
+
case "svg":
|
|
54
|
+
case "webp":
|
|
55
|
+
case "bmp":
|
|
56
|
+
case "tiff":
|
|
57
|
+
case "tif":
|
|
58
|
+
return { color: "#7b1fa2", bgColor: "#f3e5f5", label: extension2.toUpperCase() };
|
|
59
|
+
case "mp4":
|
|
60
|
+
case "avi":
|
|
61
|
+
case "mov":
|
|
62
|
+
case "wmv":
|
|
63
|
+
case "webm":
|
|
64
|
+
case "mkv":
|
|
65
|
+
return { color: "#c2185b", bgColor: "#fce4ec", label: extension2.toUpperCase() };
|
|
66
|
+
case "mp3":
|
|
67
|
+
case "wav":
|
|
68
|
+
case "flac":
|
|
69
|
+
case "aac":
|
|
70
|
+
case "ogg":
|
|
71
|
+
case "m4a":
|
|
72
|
+
return { color: "#303f9f", bgColor: "#e8eaf6", label: extension2.toUpperCase() };
|
|
73
|
+
case "zip":
|
|
74
|
+
case "rar":
|
|
75
|
+
case "7z":
|
|
76
|
+
case "tar":
|
|
77
|
+
case "gz":
|
|
78
|
+
return { color: "#f9a825", bgColor: "#fffde7", label: extension2.toUpperCase() };
|
|
79
|
+
case "txt":
|
|
80
|
+
case "md":
|
|
81
|
+
case "csv":
|
|
82
|
+
return { color: "#424242", bgColor: "#f5f5f5", label: extension2.toUpperCase() };
|
|
83
|
+
case "js":
|
|
84
|
+
case "jsx":
|
|
85
|
+
case "ts":
|
|
86
|
+
case "tsx":
|
|
87
|
+
case "html":
|
|
88
|
+
case "css":
|
|
89
|
+
case "json":
|
|
90
|
+
case "xml":
|
|
91
|
+
case "py":
|
|
92
|
+
case "java":
|
|
93
|
+
case "cpp":
|
|
94
|
+
case "c":
|
|
95
|
+
return { color: "#424242", bgColor: "#f5f5f5", label: extension2.toUpperCase() };
|
|
96
|
+
default:
|
|
97
|
+
return { color: "#757575", bgColor: "#fafafa", label: extension2 ? extension2.toUpperCase() : "FILE" };
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const iconConfig = getIconConfig(extension);
|
|
101
|
+
const getSVGIcon = (ext2) => {
|
|
102
|
+
const iconSize = size * 0.6;
|
|
103
|
+
switch (ext2) {
|
|
104
|
+
case "pdf":
|
|
105
|
+
case "doc":
|
|
106
|
+
case "docx":
|
|
107
|
+
case "ppt":
|
|
108
|
+
case "pptx":
|
|
109
|
+
return /* @__PURE__ */ jsxs("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", children: [
|
|
110
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
111
|
+
/* @__PURE__ */ jsx("polyline", { points: "14,2 14,8 20,8", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
112
|
+
/* @__PURE__ */ jsx("line", { x1: "16", y1: "13", x2: "8", y2: "13", stroke: iconConfig.color, strokeWidth: "2" }),
|
|
113
|
+
/* @__PURE__ */ jsx("line", { x1: "16", y1: "17", x2: "8", y2: "17", stroke: iconConfig.color, strokeWidth: "2" }),
|
|
114
|
+
/* @__PURE__ */ jsx("polyline", { points: "10,9 9,9 8,9", stroke: iconConfig.color, strokeWidth: "2" })
|
|
115
|
+
] });
|
|
116
|
+
case "xls":
|
|
117
|
+
case "xlsx":
|
|
118
|
+
return /* @__PURE__ */ jsxs("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", children: [
|
|
119
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
120
|
+
/* @__PURE__ */ jsx("polyline", { points: "14,2 14,8 20,8", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
121
|
+
/* @__PURE__ */ jsx("line", { x1: "8", y1: "13", x2: "16", y2: "13", stroke: iconConfig.color, strokeWidth: "2" }),
|
|
122
|
+
/* @__PURE__ */ jsx("line", { x1: "8", y1: "17", x2: "16", y2: "17", stroke: iconConfig.color, strokeWidth: "2" }),
|
|
123
|
+
/* @__PURE__ */ jsx("line", { x1: "12", y1: "9", x2: "12", y2: "21", stroke: iconConfig.color, strokeWidth: "2" })
|
|
124
|
+
] });
|
|
125
|
+
case "jpg":
|
|
126
|
+
case "jpeg":
|
|
127
|
+
case "png":
|
|
128
|
+
case "gif":
|
|
129
|
+
case "svg":
|
|
130
|
+
case "webp":
|
|
131
|
+
case "bmp":
|
|
132
|
+
case "tiff":
|
|
133
|
+
case "tif":
|
|
134
|
+
return /* @__PURE__ */ jsxs("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", children: [
|
|
135
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
136
|
+
/* @__PURE__ */ jsx("circle", { cx: "8.5", cy: "8.5", r: "1.5", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
137
|
+
/* @__PURE__ */ jsx("polyline", { points: "21,15 16,10 5,21", stroke: iconConfig.color, strokeWidth: "2", fill: "none" })
|
|
138
|
+
] });
|
|
139
|
+
case "mp4":
|
|
140
|
+
case "avi":
|
|
141
|
+
case "mov":
|
|
142
|
+
case "wmv":
|
|
143
|
+
case "webm":
|
|
144
|
+
case "mkv":
|
|
145
|
+
return /* @__PURE__ */ jsxs("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", children: [
|
|
146
|
+
/* @__PURE__ */ jsx("polygon", { points: "23 12 8 2 8 22 23 12", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
147
|
+
/* @__PURE__ */ jsx("rect", { x: "1", y: "5", width: "6", height: "14", rx: "1", stroke: iconConfig.color, strokeWidth: "2", fill: "none" })
|
|
148
|
+
] });
|
|
149
|
+
case "mp3":
|
|
150
|
+
case "wav":
|
|
151
|
+
case "flac":
|
|
152
|
+
case "aac":
|
|
153
|
+
case "ogg":
|
|
154
|
+
case "m4a":
|
|
155
|
+
return /* @__PURE__ */ jsxs("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", children: [
|
|
156
|
+
/* @__PURE__ */ jsx("path", { d: "M9 18V5l12-2v13", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
157
|
+
/* @__PURE__ */ jsx("circle", { cx: "6", cy: "18", r: "3", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
158
|
+
/* @__PURE__ */ jsx("circle", { cx: "18", cy: "16", r: "3", stroke: iconConfig.color, strokeWidth: "2", fill: "none" })
|
|
159
|
+
] });
|
|
160
|
+
case "zip":
|
|
161
|
+
case "rar":
|
|
162
|
+
case "7z":
|
|
163
|
+
case "tar":
|
|
164
|
+
case "gz":
|
|
165
|
+
return /* @__PURE__ */ jsxs("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", children: [
|
|
166
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "11", width: "18", height: "10", rx: "2", ry: "2", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
167
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "16", r: "1", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
168
|
+
/* @__PURE__ */ jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4", stroke: iconConfig.color, strokeWidth: "2", fill: "none" })
|
|
169
|
+
] });
|
|
170
|
+
case "txt":
|
|
171
|
+
case "md":
|
|
172
|
+
case "csv":
|
|
173
|
+
return /* @__PURE__ */ jsxs("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", children: [
|
|
174
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
175
|
+
/* @__PURE__ */ jsx("polyline", { points: "14,2 14,8 20,8", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
176
|
+
/* @__PURE__ */ jsx("line", { x1: "16", y1: "13", x2: "8", y2: "13", stroke: iconConfig.color, strokeWidth: "2" }),
|
|
177
|
+
/* @__PURE__ */ jsx("line", { x1: "16", y1: "17", x2: "8", y2: "17", stroke: iconConfig.color, strokeWidth: "2" })
|
|
178
|
+
] });
|
|
179
|
+
case "js":
|
|
180
|
+
case "jsx":
|
|
181
|
+
case "ts":
|
|
182
|
+
case "tsx":
|
|
183
|
+
case "html":
|
|
184
|
+
case "css":
|
|
185
|
+
case "json":
|
|
186
|
+
case "xml":
|
|
187
|
+
case "py":
|
|
188
|
+
case "java":
|
|
189
|
+
case "cpp":
|
|
190
|
+
case "c":
|
|
191
|
+
return /* @__PURE__ */ jsxs("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", children: [
|
|
192
|
+
/* @__PURE__ */ jsx("polyline", { points: "16 18 22 12 16 6", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
193
|
+
/* @__PURE__ */ jsx("polyline", { points: "8 6 2 12 8 18", stroke: iconConfig.color, strokeWidth: "2", fill: "none" })
|
|
194
|
+
] });
|
|
195
|
+
default:
|
|
196
|
+
return /* @__PURE__ */ jsxs("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", children: [
|
|
197
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z", stroke: iconConfig.color, strokeWidth: "2", fill: "none" }),
|
|
198
|
+
/* @__PURE__ */ jsx("polyline", { points: "14,2 14,8 20,8", stroke: iconConfig.color, strokeWidth: "2", fill: "none" })
|
|
199
|
+
] });
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
const containerStyle = {
|
|
203
|
+
position: "relative",
|
|
204
|
+
display: "inline-flex",
|
|
205
|
+
alignItems: "center",
|
|
206
|
+
justifyContent: "center",
|
|
207
|
+
...sx
|
|
208
|
+
};
|
|
209
|
+
const iconBoxStyle = {
|
|
210
|
+
position: "relative",
|
|
211
|
+
width: size,
|
|
212
|
+
height: size,
|
|
213
|
+
backgroundColor: iconConfig.bgColor,
|
|
214
|
+
borderRadius: "8px",
|
|
215
|
+
border: "1px solid rgba(0, 0, 0, 0.12)",
|
|
216
|
+
display: "flex",
|
|
217
|
+
alignItems: "center",
|
|
218
|
+
justifyContent: "center",
|
|
219
|
+
transition: "all 0.2s ease-in-out",
|
|
220
|
+
cursor: "default"
|
|
221
|
+
};
|
|
222
|
+
const labelStyle = {
|
|
223
|
+
position: "absolute",
|
|
224
|
+
bottom: "-4px",
|
|
225
|
+
right: "-4px",
|
|
226
|
+
padding: "2px 4px",
|
|
227
|
+
backgroundColor: "#ffffff",
|
|
228
|
+
border: "1px solid rgba(0, 0, 0, 0.12)",
|
|
229
|
+
borderRadius: "4px",
|
|
230
|
+
boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.1)",
|
|
231
|
+
fontSize: "10px",
|
|
232
|
+
fontWeight: 600,
|
|
233
|
+
color: iconConfig.color,
|
|
234
|
+
lineHeight: 1,
|
|
235
|
+
fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif'
|
|
236
|
+
};
|
|
237
|
+
return /* @__PURE__ */ jsx("div", { style: containerStyle, children: /* @__PURE__ */ jsxs(
|
|
238
|
+
"div",
|
|
239
|
+
{
|
|
240
|
+
style: iconBoxStyle,
|
|
241
|
+
onMouseEnter: (e) => {
|
|
242
|
+
e.currentTarget.style.boxShadow = "0px 4px 8px rgba(0, 0, 0, 0.12)";
|
|
243
|
+
e.currentTarget.style.transform = "translateY(-1px)";
|
|
244
|
+
},
|
|
245
|
+
onMouseLeave: (e) => {
|
|
246
|
+
e.currentTarget.style.boxShadow = "none";
|
|
247
|
+
e.currentTarget.style.transform = "translateY(0)";
|
|
248
|
+
},
|
|
249
|
+
children: [
|
|
250
|
+
getSVGIcon(extension),
|
|
251
|
+
/* @__PURE__ */ jsx("div", { style: labelStyle, children: iconConfig.label })
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
) });
|
|
255
|
+
};
|
|
256
|
+
var FileIcon_default = FileIcon;
|
|
257
|
+
|
|
258
|
+
export {
|
|
259
|
+
getFileExtension,
|
|
260
|
+
getMimeTypeFromExtension,
|
|
261
|
+
FileIcon_default
|
|
262
|
+
};
|
|
263
|
+
//# sourceMappingURL=chunk-QQDQJ7TS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/fileUtils.ts","../src/components/FileIcon.tsx"],"sourcesContent":["export const getFileExtension = (fileName: string): string => {\r\n const extension = fileName.toLowerCase().split('.').pop();\r\n return extension || '';\r\n};\r\n\r\nexport const getMimeTypeFromExtension = (extension: string): string => {\r\n const mimeTypes: Record<string, string> = {\r\n 'pdf': 'application/pdf',\r\n 'txt': 'text/plain',\r\n 'json': 'application/json',\r\n 'xml': 'text/xml',\r\n 'csv': 'text/csv',\r\n 'jpg': 'image/jpeg',\r\n 'jpeg': 'image/jpeg',\r\n 'png': 'image/png',\r\n 'gif': 'image/gif',\r\n 'svg': 'image/svg+xml',\r\n 'mp4': 'video/mp4',\r\n 'webm': 'video/webm',\r\n 'mp3': 'audio/mpeg',\r\n 'wav': 'audio/wav',\r\n 'doc': 'application/msword',\r\n 'docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\r\n 'xls': 'application/vnd.ms-excel',\r\n 'xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\r\n };\r\n\r\n return mimeTypes[extension] || 'application/octet-stream';\r\n};","import React from 'react';\r\n\r\ninterface FileIconProps {\r\n ext?: string;\r\n size?: number;\r\n sx?: React.CSSProperties;\r\n}\r\n\r\nconst FileIcon: React.FC<FileIconProps> = ({ ext, size = 48, sx = {} }) => {\r\n const extension = (ext?.toLowerCase().replace(/^\\./, '')) || '';\r\n\r\n const getIconConfig = (extension: string) => {\r\n switch (extension) {\r\n case 'pdf':\r\n return { color: '#d32f2f', bgColor: '#ffebee', label: 'PDF' };\r\n case 'doc':\r\n case 'docx':\r\n return { color: '#1976d2', bgColor: '#e3f2fd', label: extension.toUpperCase() };\r\n case 'xls':\r\n case 'xlsx':\r\n return { color: '#388e3c', bgColor: '#e8f5e8', label: extension.toUpperCase() };\r\n case 'ppt':\r\n case 'pptx':\r\n return { color: '#f57c00', bgColor: '#fff3e0', label: extension.toUpperCase() };\r\n case 'jpg':\r\n case 'jpeg':\r\n case 'png':\r\n case 'gif':\r\n case 'svg':\r\n case 'webp':\r\n case 'bmp':\r\n case 'tiff':\r\n case 'tif':\r\n return { color: '#7b1fa2', bgColor: '#f3e5f5', label: extension.toUpperCase() };\r\n case 'mp4':\r\n case 'avi':\r\n case 'mov':\r\n case 'wmv':\r\n case 'webm':\r\n case 'mkv':\r\n return { color: '#c2185b', bgColor: '#fce4ec', label: extension.toUpperCase() };\r\n case 'mp3':\r\n case 'wav':\r\n case 'flac':\r\n case 'aac':\r\n case 'ogg':\r\n case 'm4a':\r\n return { color: '#303f9f', bgColor: '#e8eaf6', label: extension.toUpperCase() };\r\n case 'zip':\r\n case 'rar':\r\n case '7z':\r\n case 'tar':\r\n case 'gz':\r\n return { color: '#f9a825', bgColor: '#fffde7', label: extension.toUpperCase() };\r\n case 'txt':\r\n case 'md':\r\n case 'csv':\r\n return { color: '#424242', bgColor: '#f5f5f5', label: extension.toUpperCase() };\r\n case 'js':\r\n case 'jsx':\r\n case 'ts':\r\n case 'tsx':\r\n case 'html':\r\n case 'css':\r\n case 'json':\r\n case 'xml':\r\n case 'py':\r\n case 'java':\r\n case 'cpp':\r\n case 'c':\r\n return { color: '#424242', bgColor: '#f5f5f5', label: extension.toUpperCase() };\r\n default:\r\n return { color: '#757575', bgColor: '#fafafa', label: extension ? extension.toUpperCase() : 'FILE' };\r\n }\r\n };\r\n\r\n const iconConfig = getIconConfig(extension);\r\n\r\n const getSVGIcon = (ext: string) => {\r\n const iconSize = size * 0.6;\r\n \r\n switch (ext) {\r\n case 'pdf':\r\n case 'doc':\r\n case 'docx':\r\n case 'ppt':\r\n case 'pptx':\r\n return (\r\n <svg width={iconSize} height={iconSize} viewBox=\"0 0 24 24\" fill=\"none\">\r\n <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <polyline points=\"14,2 14,8 20,8\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\" stroke={iconConfig.color} strokeWidth=\"2\"/>\r\n <line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\" stroke={iconConfig.color} strokeWidth=\"2\"/>\r\n <polyline points=\"10,9 9,9 8,9\" stroke={iconConfig.color} strokeWidth=\"2\"/>\r\n </svg>\r\n );\r\n case 'xls':\r\n case 'xlsx':\r\n return (\r\n <svg width={iconSize} height={iconSize} viewBox=\"0 0 24 24\" fill=\"none\">\r\n <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <polyline points=\"14,2 14,8 20,8\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <line x1=\"8\" y1=\"13\" x2=\"16\" y2=\"13\" stroke={iconConfig.color} strokeWidth=\"2\"/>\r\n <line x1=\"8\" y1=\"17\" x2=\"16\" y2=\"17\" stroke={iconConfig.color} strokeWidth=\"2\"/>\r\n <line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"21\" stroke={iconConfig.color} strokeWidth=\"2\"/>\r\n </svg>\r\n );\r\n case 'jpg':\r\n case 'jpeg':\r\n case 'png':\r\n case 'gif':\r\n case 'svg':\r\n case 'webp':\r\n case 'bmp':\r\n case 'tiff':\r\n case 'tif':\r\n return (\r\n <svg width={iconSize} height={iconSize} viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <polyline points=\"21,15 16,10 5,21\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n </svg>\r\n );\r\n case 'mp4':\r\n case 'avi':\r\n case 'mov':\r\n case 'wmv':\r\n case 'webm':\r\n case 'mkv':\r\n return (\r\n <svg width={iconSize} height={iconSize} viewBox=\"0 0 24 24\" fill=\"none\">\r\n <polygon points=\"23 12 8 2 8 22 23 12\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <rect x=\"1\" y=\"5\" width=\"6\" height=\"14\" rx=\"1\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n </svg>\r\n );\r\n case 'mp3':\r\n case 'wav':\r\n case 'flac':\r\n case 'aac':\r\n case 'ogg':\r\n case 'm4a':\r\n return (\r\n <svg width={iconSize} height={iconSize} viewBox=\"0 0 24 24\" fill=\"none\">\r\n <path d=\"M9 18V5l12-2v13\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <circle cx=\"6\" cy=\"18\" r=\"3\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <circle cx=\"18\" cy=\"16\" r=\"3\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n </svg>\r\n );\r\n case 'zip':\r\n case 'rar':\r\n case '7z':\r\n case 'tar':\r\n case 'gz':\r\n return (\r\n <svg width={iconSize} height={iconSize} viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect x=\"3\" y=\"11\" width=\"18\" height=\"10\" rx=\"2\" ry=\"2\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <circle cx=\"12\" cy=\"16\" r=\"1\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <path d=\"M7 11V7a5 5 0 0 1 10 0v4\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n </svg>\r\n );\r\n case 'txt':\r\n case 'md':\r\n case 'csv':\r\n return (\r\n <svg width={iconSize} height={iconSize} viewBox=\"0 0 24 24\" fill=\"none\">\r\n <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <polyline points=\"14,2 14,8 20,8\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\" stroke={iconConfig.color} strokeWidth=\"2\"/>\r\n <line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\" stroke={iconConfig.color} strokeWidth=\"2\"/>\r\n </svg>\r\n );\r\n case 'js':\r\n case 'jsx':\r\n case 'ts':\r\n case 'tsx':\r\n case 'html':\r\n case 'css':\r\n case 'json':\r\n case 'xml':\r\n case 'py':\r\n case 'java':\r\n case 'cpp':\r\n case 'c':\r\n return (\r\n <svg width={iconSize} height={iconSize} viewBox=\"0 0 24 24\" fill=\"none\">\r\n <polyline points=\"16 18 22 12 16 6\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <polyline points=\"8 6 2 12 8 18\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n </svg>\r\n );\r\n default:\r\n return (\r\n <svg width={iconSize} height={iconSize} viewBox=\"0 0 24 24\" fill=\"none\">\r\n <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n <polyline points=\"14,2 14,8 20,8\" stroke={iconConfig.color} strokeWidth=\"2\" fill=\"none\"/>\r\n </svg>\r\n );\r\n }\r\n };\r\n\r\n const containerStyle: React.CSSProperties = {\r\n position: 'relative',\r\n display: 'inline-flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n ...sx\r\n };\r\n\r\n const iconBoxStyle: React.CSSProperties = {\r\n position: 'relative',\r\n width: size,\r\n height: size,\r\n backgroundColor: iconConfig.bgColor,\r\n borderRadius: '8px',\r\n border: '1px solid rgba(0, 0, 0, 0.12)',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n transition: 'all 0.2s ease-in-out',\r\n cursor: 'default'\r\n };\r\n\r\n const labelStyle: React.CSSProperties = {\r\n position: 'absolute',\r\n bottom: '-4px',\r\n right: '-4px',\r\n padding: '2px 4px',\r\n backgroundColor: '#ffffff',\r\n border: '1px solid rgba(0, 0, 0, 0.12)',\r\n borderRadius: '4px',\r\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.1)',\r\n fontSize: '10px',\r\n fontWeight: 600,\r\n color: iconConfig.color,\r\n lineHeight: 1,\r\n fontFamily: '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif'\r\n };\r\n\r\n return (\r\n <div style={containerStyle}>\r\n <div \r\n style={iconBoxStyle}\r\n onMouseEnter={(e) => {\r\n e.currentTarget.style.boxShadow = '0px 4px 8px rgba(0, 0, 0, 0.12)';\r\n e.currentTarget.style.transform = 'translateY(-1px)';\r\n }}\r\n onMouseLeave={(e) => {\r\n e.currentTarget.style.boxShadow = 'none';\r\n e.currentTarget.style.transform = 'translateY(0)';\r\n }}\r\n >\r\n {getSVGIcon(extension)}\r\n <div style={labelStyle}>\r\n {iconConfig.label}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default File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AAA,IACV,YAAY;AAAA,IACZ,OAAO,WAAW;AAAA,IAClB,YAAY;AAAA,IACZ,YAAY;AAAA,EACd;AAEA,SACE,oBAAC,SAAI,OAAO,gBACV;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,MACP,cAAc,CAAC,MAAM;AACnB,UAAE,cAAc,MAAM,YAAY;AAClC,UAAE,cAAc,MAAM,YAAY;AAAA,MACpC;AAAA,MACA,cAAc,CAAC,MAAM;AACnB,UAAE,cAAc,MAAM,YAAY;AAClC,UAAE,cAAc,MAAM,YAAY;AAAA,MACpC;AAAA,MAEC;AAAA,mBAAW,SAAS;AAAA,QACrB,oBAAC,SAAI,OAAO,YACT,qBAAW,OACd;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;AAEA,IAAO,mBAAQ;","names":["extension","ext"]}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
FileIcon_default,
|
|
4
|
+
getFileExtension
|
|
5
|
+
} from "./chunk-QQDQJ7TS.mjs";
|
|
6
|
+
|
|
7
|
+
// src/components/viewers/VideoViewer.tsx
|
|
8
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
9
|
+
import { Box, Card, CardContent, CardHeader, LinearProgress, Typography, IconButton, Tooltip } from "@mui/material";
|
|
10
|
+
import DownloadIcon from "@mui/icons-material/Download";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
var VideoViewer = ({
|
|
13
|
+
file,
|
|
14
|
+
url,
|
|
15
|
+
fileName,
|
|
16
|
+
className = "",
|
|
17
|
+
style = {},
|
|
18
|
+
width = "100%",
|
|
19
|
+
height = "100%",
|
|
20
|
+
onLoad,
|
|
21
|
+
onError,
|
|
22
|
+
onDownloadClick,
|
|
23
|
+
// Filter out props that shouldn't be passed to DOM
|
|
24
|
+
mimeType: _mimeType,
|
|
25
|
+
fileSize: _fileSize,
|
|
26
|
+
showPageCount: _showPageCount,
|
|
27
|
+
showPageNavigation: _showPageNavigation,
|
|
28
|
+
showZoomControls: _showZoomControls,
|
|
29
|
+
showDownload: _showDownload,
|
|
30
|
+
showPrint: _showPrint,
|
|
31
|
+
showSearch: _showSearch,
|
|
32
|
+
showMetadata: _showMetadata,
|
|
33
|
+
showProperties: _showProperties,
|
|
34
|
+
onMetadataClick: _onMetadataClick,
|
|
35
|
+
onPropertiesClick: _onPropertiesClick,
|
|
36
|
+
onPrintClick: _onPrintClick,
|
|
37
|
+
customRegistry: _customRegistry,
|
|
38
|
+
...props
|
|
39
|
+
}) => {
|
|
40
|
+
const videoRef = useRef(null);
|
|
41
|
+
const [videoSource, setVideoSource] = useState(null);
|
|
42
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
43
|
+
const [error, setError] = useState(null);
|
|
44
|
+
const [videoDimensions, setVideoDimensions] = useState(null);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
let objectUrl = null;
|
|
47
|
+
if (file) {
|
|
48
|
+
objectUrl = URL.createObjectURL(file);
|
|
49
|
+
setVideoSource(objectUrl);
|
|
50
|
+
setIsLoading(true);
|
|
51
|
+
} else if (url) {
|
|
52
|
+
setVideoSource(url);
|
|
53
|
+
} else {
|
|
54
|
+
setVideoSource(null);
|
|
55
|
+
}
|
|
56
|
+
setError(null);
|
|
57
|
+
return () => {
|
|
58
|
+
if (objectUrl) {
|
|
59
|
+
URL.revokeObjectURL(objectUrl);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
}, [file, url]);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
const element = videoRef.current;
|
|
65
|
+
if (!element) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const handleLoaded = () => {
|
|
69
|
+
setIsLoading(false);
|
|
70
|
+
setVideoDimensions({
|
|
71
|
+
width: element.videoWidth,
|
|
72
|
+
height: element.videoHeight
|
|
73
|
+
});
|
|
74
|
+
onLoad?.();
|
|
75
|
+
};
|
|
76
|
+
const handleError = () => {
|
|
77
|
+
const message = "Failed to load video resource";
|
|
78
|
+
setIsLoading(false);
|
|
79
|
+
setError(message);
|
|
80
|
+
onError?.(new Error(message));
|
|
81
|
+
};
|
|
82
|
+
element.addEventListener("loadedmetadata", handleLoaded);
|
|
83
|
+
element.addEventListener("error", handleError);
|
|
84
|
+
return () => {
|
|
85
|
+
element.removeEventListener("loadedmetadata", handleLoaded);
|
|
86
|
+
element.removeEventListener("error", handleError);
|
|
87
|
+
};
|
|
88
|
+
}, [onLoad, onError, videoSource]);
|
|
89
|
+
const resolvedFileName = useMemo(
|
|
90
|
+
() => fileName || file?.name || (url ? url.split("/").pop() : "video"),
|
|
91
|
+
[fileName, file, url]
|
|
92
|
+
);
|
|
93
|
+
const fileExtension = useMemo(
|
|
94
|
+
() => getFileExtension(resolvedFileName || ""),
|
|
95
|
+
[resolvedFileName]
|
|
96
|
+
);
|
|
97
|
+
const handleDownload = useCallback(async () => {
|
|
98
|
+
if (!file && !url) return;
|
|
99
|
+
try {
|
|
100
|
+
let blob;
|
|
101
|
+
let filename = resolvedFileName || "video.mp4";
|
|
102
|
+
if (file) {
|
|
103
|
+
blob = file;
|
|
104
|
+
filename = file.name;
|
|
105
|
+
} else if (url) {
|
|
106
|
+
const response = await fetch(url);
|
|
107
|
+
if (!response.ok) {
|
|
108
|
+
throw new Error(`Failed to fetch video (${response.status})`);
|
|
109
|
+
}
|
|
110
|
+
blob = await response.blob();
|
|
111
|
+
} else {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const downloadUrl = URL.createObjectURL(blob);
|
|
115
|
+
const link = document.createElement("a");
|
|
116
|
+
link.href = downloadUrl;
|
|
117
|
+
link.download = filename;
|
|
118
|
+
document.body.appendChild(link);
|
|
119
|
+
link.click();
|
|
120
|
+
document.body.removeChild(link);
|
|
121
|
+
URL.revokeObjectURL(downloadUrl);
|
|
122
|
+
} catch (err) {
|
|
123
|
+
onError?.(err instanceof Error ? err : new Error("Download failed"));
|
|
124
|
+
}
|
|
125
|
+
}, [file, url, resolvedFileName, onError]);
|
|
126
|
+
return /* @__PURE__ */ jsx(
|
|
127
|
+
Box,
|
|
128
|
+
{
|
|
129
|
+
className: `video-viewer ${className}`,
|
|
130
|
+
sx: { width, height, ...style },
|
|
131
|
+
...props,
|
|
132
|
+
children: /* @__PURE__ */ jsxs(Card, { sx: { height: "100%", display: "flex", flexDirection: "column" }, elevation: 1, children: [
|
|
133
|
+
/* @__PURE__ */ jsx(
|
|
134
|
+
CardHeader,
|
|
135
|
+
{
|
|
136
|
+
avatar: /* @__PURE__ */ jsx(FileIcon_default, { ext: fileExtension, size: 32 }),
|
|
137
|
+
title: /* @__PURE__ */ jsx(Typography, { variant: "subtitle1", fontWeight: 500, children: resolvedFileName }),
|
|
138
|
+
action: /* @__PURE__ */ jsx(Tooltip, { title: "Download", children: /* @__PURE__ */ jsx(
|
|
139
|
+
IconButton,
|
|
140
|
+
{
|
|
141
|
+
size: "small",
|
|
142
|
+
onClick: onDownloadClick,
|
|
143
|
+
children: /* @__PURE__ */ jsx(DownloadIcon, {})
|
|
144
|
+
}
|
|
145
|
+
) }),
|
|
146
|
+
sx: { pb: 1.5 }
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
isLoading && /* @__PURE__ */ jsx(LinearProgress, { sx: { mx: 3, mb: 2 } }),
|
|
150
|
+
error && /* @__PURE__ */ jsx(Typography, { color: "error", variant: "body2", sx: { px: 3, pb: 1 }, children: error }),
|
|
151
|
+
/* @__PURE__ */ jsx(CardContent, { sx: {
|
|
152
|
+
flexGrow: 1,
|
|
153
|
+
display: "flex",
|
|
154
|
+
alignItems: "center",
|
|
155
|
+
justifyContent: "center",
|
|
156
|
+
p: 2,
|
|
157
|
+
overflow: "hidden"
|
|
158
|
+
}, children: videoSource ? /* @__PURE__ */ jsx(
|
|
159
|
+
Box,
|
|
160
|
+
{
|
|
161
|
+
sx: {
|
|
162
|
+
width: "100%",
|
|
163
|
+
height: "100%",
|
|
164
|
+
display: "flex",
|
|
165
|
+
alignItems: "center",
|
|
166
|
+
justifyContent: "center",
|
|
167
|
+
backgroundColor: "#000",
|
|
168
|
+
borderRadius: 2
|
|
169
|
+
},
|
|
170
|
+
children: /* @__PURE__ */ jsx(
|
|
171
|
+
"video",
|
|
172
|
+
{
|
|
173
|
+
ref: videoRef,
|
|
174
|
+
controls: true,
|
|
175
|
+
controlsList: "nodownload",
|
|
176
|
+
style: {
|
|
177
|
+
maxWidth: "100%",
|
|
178
|
+
maxHeight: "100%",
|
|
179
|
+
width: "auto",
|
|
180
|
+
height: "auto",
|
|
181
|
+
objectFit: "contain"
|
|
182
|
+
},
|
|
183
|
+
src: videoSource
|
|
184
|
+
}
|
|
185
|
+
)
|
|
186
|
+
}
|
|
187
|
+
) : /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", children: "No video source provided." }) })
|
|
188
|
+
] })
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
export {
|
|
194
|
+
VideoViewer
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=chunk-QRYIHDRT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/viewers/VideoViewer.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\r\nimport { Box, Card, CardContent, CardHeader, LinearProgress, Typography, Stack, IconButton, Tooltip } from '@mui/material';\r\nimport DownloadIcon from '@mui/icons-material/Download';\r\nimport { FileViewerProps } from '../../types';\r\nimport { getFileExtension } from '../../utils/fileUtils';\r\nimport FileIcon from '../FileIcon';\r\n\r\nexport const VideoViewer: React.FC<FileViewerProps> = ({\r\n file,\r\n url,\r\n fileName,\r\n className = '',\r\n style = {},\r\n width = '100%',\r\n height = '100%',\r\n onLoad,\r\n onError,\r\n onDownloadClick,\r\n // Filter out props that shouldn't be passed to DOM\r\n mimeType: _mimeType,\r\n fileSize: _fileSize,\r\n showPageCount: _showPageCount,\r\n showPageNavigation: _showPageNavigation,\r\n showZoomControls: _showZoomControls,\r\n showDownload: _showDownload,\r\n showPrint: _showPrint,\r\n showSearch: _showSearch,\r\n showMetadata: _showMetadata,\r\n showProperties: _showProperties,\r\n onMetadataClick: _onMetadataClick,\r\n onPropertiesClick: _onPropertiesClick,\r\n onPrintClick: _onPrintClick,\r\n customRegistry: _customRegistry,\r\n ...props\r\n}) => {\r\n const videoRef = useRef<HTMLVideoElement | null>(null);\r\n const [videoSource, setVideoSource] = useState<string | null>(null);\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [error, setError] = useState<string | null>(null);\r\n const [videoDimensions, setVideoDimensions] = useState<{ width: number; height: number } | null>(null);\r\n\r\n useEffect(() => {\r\n let objectUrl: string | null = null;\r\n\r\n if (file) {\r\n objectUrl = URL.createObjectURL(file);\r\n setVideoSource(objectUrl);\r\n setIsLoading(true);\r\n } else if (url) {\r\n setVideoSource(url);\r\n } else {\r\n setVideoSource(null);\r\n }\r\n\r\n setError(null);\r\n\r\n return () => {\r\n if (objectUrl) {\r\n URL.revokeObjectURL(objectUrl);\r\n }\r\n };\r\n }, [file, url]);\r\n\r\n useEffect(() => {\r\n const element = videoRef.current;\r\n if (!element) {\r\n return;\r\n }\r\n\r\n const handleLoaded = () => {\r\n setIsLoading(false);\r\n // Capture video dimensions\r\n setVideoDimensions({\r\n width: element.videoWidth,\r\n height: element.videoHeight\r\n });\r\n onLoad?.();\r\n };\r\n\r\n const handleError = () => {\r\n const message = 'Failed to load video resource';\r\n setIsLoading(false);\r\n setError(message);\r\n onError?.(new Error(message));\r\n };\r\n\r\n element.addEventListener('loadedmetadata', handleLoaded);\r\n element.addEventListener('error', handleError);\r\n\r\n return () => {\r\n element.removeEventListener('loadedmetadata', handleLoaded);\r\n element.removeEventListener('error', handleError);\r\n };\r\n }, [onLoad, onError, videoSource]);\r\n\r\n const resolvedFileName = useMemo(\r\n () => fileName || file?.name || (url ? url.split('/').pop() : 'video'),\r\n [fileName, file, url]\r\n );\r\n\r\n const fileExtension = useMemo(\r\n () => getFileExtension(resolvedFileName || ''),\r\n [resolvedFileName]\r\n );\r\n\r\n const handleDownload = useCallback(async () => {\r\n if (!file && !url) return;\r\n \r\n try {\r\n let blob: Blob;\r\n let filename = resolvedFileName || 'video.mp4';\r\n \r\n if (file) {\r\n blob = file;\r\n filename = file.name;\r\n } else if (url) {\r\n const response = await fetch(url);\r\n if (!response.ok) {\r\n throw new Error(`Failed to fetch video (${response.status})`);\r\n }\r\n blob = await response.blob();\r\n } else {\r\n return;\r\n }\r\n \r\n const downloadUrl = URL.createObjectURL(blob);\r\n const link = document.createElement('a');\r\n link.href = downloadUrl;\r\n link.download = filename;\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n URL.revokeObjectURL(downloadUrl);\r\n } catch (err) {\r\n // Handle download errors silently or show user-friendly message\r\n onError?.(err instanceof Error ? err : new Error('Download failed'));\r\n }\r\n }, [file, url, resolvedFileName, onError]);\r\n\r\n return (\r\n <Box\r\n className={`video-viewer ${className}`}\r\n sx={{ width, height, ...style }}\r\n {...props}\r\n >\r\n <Card sx={{ height: '100%', display: 'flex', flexDirection: 'column' }} elevation={1}>\r\n <CardHeader\r\n avatar={<FileIcon ext={fileExtension} size={32} />}\r\n title={\r\n <Typography variant=\"subtitle1\" fontWeight={500}>\r\n {resolvedFileName}\r\n </Typography>\r\n }\r\n action={\r\n <Tooltip title=\"Download\">\r\n <IconButton\r\n size=\"small\"\r\n onClick={onDownloadClick}\r\n >\r\n <DownloadIcon />\r\n </IconButton>\r\n </Tooltip>\r\n }\r\n sx={{ pb: 1.5 }}\r\n />\r\n {isLoading && <LinearProgress sx={{ mx: 3, mb: 2 }} />}\r\n {error && (\r\n <Typography color=\"error\" variant=\"body2\" sx={{ px: 3, pb: 1 }}>\r\n {error}\r\n </Typography>\r\n )}\r\n <CardContent sx={{ \r\n flexGrow: 1, \r\n display: 'flex', \r\n alignItems: 'center', \r\n justifyContent: 'center', \r\n p: 2,\r\n overflow: 'hidden'\r\n }}>\r\n {videoSource ? (\r\n <Box\r\n sx={{\r\n width: '100%',\r\n height: '100%',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n backgroundColor: '#000',\r\n borderRadius: 2\r\n }}\r\n >\r\n <video\r\n ref={videoRef}\r\n controls\r\n controlsList=\"nodownload\"\r\n style={{\r\n maxWidth: '100%',\r\n maxHeight: '100%',\r\n width: 'auto',\r\n height: 'auto',\r\n objectFit: 'contain'\r\n }}\r\n src={videoSource}\r\n />\r\n </Box>\r\n ) : (\r\n <Typography variant=\"body2\" color=\"text.secondary\">\r\n No video source provided.\r\n </Typography>\r\n )}\r\n </CardContent>\r\n </Card>\r\n </Box>\r\n );\r\n};"],"mappings":";;;;;;;AAAA,SAAgB,aAAa,WAAW,SAAS,QAAQ,gBAAgB;AACzE,SAAS,KAAK,MAAM,aAAa,YAAY,gBAAgB,YAAmB,YAAY,eAAe;AAC3G,OAAO,kBAAkB;AA+InB,SAEY,KAFZ;AA1IC,IAAM,cAAyC,CAAC;AAAA,EACrD;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ,CAAC;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA,UAAU;AAAA,EACV,UAAU;AAAA,EACV,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,GAAG;AACL,MAAM;AACJ,QAAM,WAAW,OAAgC,IAAI;AACrD,QAAM,CAAC,aAAa,cAAc,IAAI,SAAwB,IAAI;AAClE,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AACh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