@capgo/capacitor-file-picker 8.0.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/CapgoCapacitorFilePicker.podspec +17 -0
- package/Package.swift +28 -0
- package/README.md +403 -0
- package/android/build.gradle +58 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/app/capgo/capacitor/filepicker/CapgoFilePickerPlugin.java +473 -0
- package/dist/docs.json +804 -0
- package/dist/esm/definitions.d.ts +347 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +22 -0
- package/dist/esm/web.js +147 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +161 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +164 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Sources/CapgoFilePickerPlugin/CapgoFilePickerPlugin.swift +393 -0
- package/ios/Tests/CapgoFilePickerPluginTests/CapgoFilePickerPluginTests.swift +11 -0
- package/package.json +88 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@capacitor/core');
|
|
4
|
+
|
|
5
|
+
const CapgoFilePicker = core.registerPlugin('CapgoFilePicker', {
|
|
6
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapgoFilePickerWeb()),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
class CapgoFilePickerWeb extends core.WebPlugin {
|
|
10
|
+
async pickFiles(options) {
|
|
11
|
+
const files = await this.openFilePicker({
|
|
12
|
+
types: options === null || options === void 0 ? void 0 : options.types,
|
|
13
|
+
multiple: (options === null || options === void 0 ? void 0 : options.limit) !== 1,
|
|
14
|
+
});
|
|
15
|
+
const pickedFiles = [];
|
|
16
|
+
for (const file of files) {
|
|
17
|
+
const pickedFile = {
|
|
18
|
+
name: file.name,
|
|
19
|
+
mimeType: file.type || 'application/octet-stream',
|
|
20
|
+
size: file.size,
|
|
21
|
+
blob: file,
|
|
22
|
+
modifiedAt: file.lastModified,
|
|
23
|
+
};
|
|
24
|
+
if (options === null || options === void 0 ? void 0 : options.readData) {
|
|
25
|
+
pickedFile.data = await this.getDataFromFile(file);
|
|
26
|
+
}
|
|
27
|
+
if (file.type.startsWith('image/')) {
|
|
28
|
+
const dimensions = await this.getImageDimensions(file);
|
|
29
|
+
pickedFile.width = dimensions.width;
|
|
30
|
+
pickedFile.height = dimensions.height;
|
|
31
|
+
}
|
|
32
|
+
pickedFiles.push(pickedFile);
|
|
33
|
+
}
|
|
34
|
+
return { files: pickedFiles };
|
|
35
|
+
}
|
|
36
|
+
async pickImages(options) {
|
|
37
|
+
return this.pickFiles({
|
|
38
|
+
types: ['image/*'],
|
|
39
|
+
limit: options === null || options === void 0 ? void 0 : options.limit,
|
|
40
|
+
readData: options === null || options === void 0 ? void 0 : options.readData,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
async pickVideos(options) {
|
|
44
|
+
return this.pickFiles({
|
|
45
|
+
types: ['video/*'],
|
|
46
|
+
limit: options === null || options === void 0 ? void 0 : options.limit,
|
|
47
|
+
readData: options === null || options === void 0 ? void 0 : options.readData,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
async pickMedia(options) {
|
|
51
|
+
return this.pickFiles({
|
|
52
|
+
types: ['image/*', 'video/*'],
|
|
53
|
+
limit: options === null || options === void 0 ? void 0 : options.limit,
|
|
54
|
+
readData: options === null || options === void 0 ? void 0 : options.readData,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async pickDirectory() {
|
|
58
|
+
throw this.unimplemented('pickDirectory is not supported on web');
|
|
59
|
+
}
|
|
60
|
+
async convertHeicToJpeg(_options) {
|
|
61
|
+
throw this.unimplemented('convertHeicToJpeg is not supported on web');
|
|
62
|
+
}
|
|
63
|
+
async copyFile(_options) {
|
|
64
|
+
throw this.unimplemented('copyFile is not supported on web');
|
|
65
|
+
}
|
|
66
|
+
async checkPermissions() {
|
|
67
|
+
return {
|
|
68
|
+
readExternalStorage: 'granted',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
async requestPermissions() {
|
|
72
|
+
return {
|
|
73
|
+
readExternalStorage: 'granted',
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
async addListener(_eventName, _listenerFunc) {
|
|
77
|
+
return {
|
|
78
|
+
remove: async () => {
|
|
79
|
+
// No-op on web
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
async removeAllListeners() {
|
|
84
|
+
// No-op on web
|
|
85
|
+
}
|
|
86
|
+
async getPluginVersion() {
|
|
87
|
+
return { version: 'web' };
|
|
88
|
+
}
|
|
89
|
+
openFilePicker(options) {
|
|
90
|
+
return new Promise((resolve) => {
|
|
91
|
+
var _a;
|
|
92
|
+
const input = document.createElement('input');
|
|
93
|
+
input.type = 'file';
|
|
94
|
+
input.multiple = (_a = options.multiple) !== null && _a !== void 0 ? _a : true;
|
|
95
|
+
if (options.types && options.types.length > 0) {
|
|
96
|
+
input.accept = options.types.join(',');
|
|
97
|
+
}
|
|
98
|
+
input.style.display = 'none';
|
|
99
|
+
document.body.appendChild(input);
|
|
100
|
+
let resolved = false;
|
|
101
|
+
const handleChange = () => {
|
|
102
|
+
resolved = true;
|
|
103
|
+
const files = Array.from(input.files || []);
|
|
104
|
+
cleanup();
|
|
105
|
+
resolve(files);
|
|
106
|
+
};
|
|
107
|
+
const handleCancel = () => {
|
|
108
|
+
// Small delay to ensure change event fires first if files were selected
|
|
109
|
+
setTimeout(() => {
|
|
110
|
+
if (!resolved) {
|
|
111
|
+
cleanup();
|
|
112
|
+
resolve([]);
|
|
113
|
+
}
|
|
114
|
+
}, 300);
|
|
115
|
+
};
|
|
116
|
+
const cleanup = () => {
|
|
117
|
+
input.removeEventListener('change', handleChange);
|
|
118
|
+
window.removeEventListener('focus', handleCancel);
|
|
119
|
+
document.body.removeChild(input);
|
|
120
|
+
};
|
|
121
|
+
input.addEventListener('change', handleChange);
|
|
122
|
+
window.addEventListener('focus', handleCancel);
|
|
123
|
+
input.click();
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
getDataFromFile(file) {
|
|
127
|
+
return new Promise((resolve, reject) => {
|
|
128
|
+
const reader = new FileReader();
|
|
129
|
+
reader.onload = () => {
|
|
130
|
+
const result = reader.result;
|
|
131
|
+
// Remove data URL prefix to get pure base64
|
|
132
|
+
const base64 = result.split(',')[1] || '';
|
|
133
|
+
resolve(base64);
|
|
134
|
+
};
|
|
135
|
+
reader.onerror = () => reject(new Error('Failed to read file'));
|
|
136
|
+
reader.readAsDataURL(file);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
getImageDimensions(file) {
|
|
140
|
+
return new Promise((resolve) => {
|
|
141
|
+
const img = new Image();
|
|
142
|
+
img.onload = () => {
|
|
143
|
+
URL.revokeObjectURL(img.src);
|
|
144
|
+
resolve({ width: img.width, height: img.height });
|
|
145
|
+
};
|
|
146
|
+
img.onerror = () => {
|
|
147
|
+
URL.revokeObjectURL(img.src);
|
|
148
|
+
resolve({ width: 0, height: 0 });
|
|
149
|
+
};
|
|
150
|
+
img.src = URL.createObjectURL(file);
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
156
|
+
__proto__: null,
|
|
157
|
+
CapgoFilePickerWeb: CapgoFilePickerWeb
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
exports.CapgoFilePicker = CapgoFilePicker;
|
|
161
|
+
//# sourceMappingURL=plugin.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapgoFilePicker = registerPlugin('CapgoFilePicker', {\n web: () => import('./web').then((m) => new m.CapgoFilePickerWeb()),\n});\nexport * from './definitions';\nexport { CapgoFilePicker };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapgoFilePickerWeb extends WebPlugin {\n async pickFiles(options) {\n const files = await this.openFilePicker({\n types: options === null || options === void 0 ? void 0 : options.types,\n multiple: (options === null || options === void 0 ? void 0 : options.limit) !== 1,\n });\n const pickedFiles = [];\n for (const file of files) {\n const pickedFile = {\n name: file.name,\n mimeType: file.type || 'application/octet-stream',\n size: file.size,\n blob: file,\n modifiedAt: file.lastModified,\n };\n if (options === null || options === void 0 ? void 0 : options.readData) {\n pickedFile.data = await this.getDataFromFile(file);\n }\n if (file.type.startsWith('image/')) {\n const dimensions = await this.getImageDimensions(file);\n pickedFile.width = dimensions.width;\n pickedFile.height = dimensions.height;\n }\n pickedFiles.push(pickedFile);\n }\n return { files: pickedFiles };\n }\n async pickImages(options) {\n return this.pickFiles({\n types: ['image/*'],\n limit: options === null || options === void 0 ? void 0 : options.limit,\n readData: options === null || options === void 0 ? void 0 : options.readData,\n });\n }\n async pickVideos(options) {\n return this.pickFiles({\n types: ['video/*'],\n limit: options === null || options === void 0 ? void 0 : options.limit,\n readData: options === null || options === void 0 ? void 0 : options.readData,\n });\n }\n async pickMedia(options) {\n return this.pickFiles({\n types: ['image/*', 'video/*'],\n limit: options === null || options === void 0 ? void 0 : options.limit,\n readData: options === null || options === void 0 ? void 0 : options.readData,\n });\n }\n async pickDirectory() {\n throw this.unimplemented('pickDirectory is not supported on web');\n }\n async convertHeicToJpeg(_options) {\n throw this.unimplemented('convertHeicToJpeg is not supported on web');\n }\n async copyFile(_options) {\n throw this.unimplemented('copyFile is not supported on web');\n }\n async checkPermissions() {\n return {\n readExternalStorage: 'granted',\n };\n }\n async requestPermissions() {\n return {\n readExternalStorage: 'granted',\n };\n }\n async addListener(_eventName, _listenerFunc) {\n return {\n remove: async () => {\n // No-op on web\n },\n };\n }\n async removeAllListeners() {\n // No-op on web\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n openFilePicker(options) {\n return new Promise((resolve) => {\n var _a;\n const input = document.createElement('input');\n input.type = 'file';\n input.multiple = (_a = options.multiple) !== null && _a !== void 0 ? _a : true;\n if (options.types && options.types.length > 0) {\n input.accept = options.types.join(',');\n }\n input.style.display = 'none';\n document.body.appendChild(input);\n let resolved = false;\n const handleChange = () => {\n resolved = true;\n const files = Array.from(input.files || []);\n cleanup();\n resolve(files);\n };\n const handleCancel = () => {\n // Small delay to ensure change event fires first if files were selected\n setTimeout(() => {\n if (!resolved) {\n cleanup();\n resolve([]);\n }\n }, 300);\n };\n const cleanup = () => {\n input.removeEventListener('change', handleChange);\n window.removeEventListener('focus', handleCancel);\n document.body.removeChild(input);\n };\n input.addEventListener('change', handleChange);\n window.addEventListener('focus', handleCancel);\n input.click();\n });\n }\n getDataFromFile(file) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n const result = reader.result;\n // Remove data URL prefix to get pure base64\n const base64 = result.split(',')[1] || '';\n resolve(base64);\n };\n reader.onerror = () => reject(new Error('Failed to read file'));\n reader.readAsDataURL(file);\n });\n }\n getImageDimensions(file) {\n return new Promise((resolve) => {\n const img = new Image();\n img.onload = () => {\n URL.revokeObjectURL(img.src);\n resolve({ width: img.width, height: img.height });\n };\n img.onerror = () => {\n URL.revokeObjectURL(img.src);\n resolve({ width: 0, height: 0 });\n };\n img.src = URL.createObjectURL(file);\n });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;AAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACtE,CAAC;;ACFM,MAAM,kBAAkB,SAASC,cAAS,C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/C,QAAQ,CAAC,CAAC;AACV,IAAI;AACJ;;;;;;;;;"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
var capacitorCapgoFilePicker = (function (exports, core) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const CapgoFilePicker = core.registerPlugin('CapgoFilePicker', {
|
|
5
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapgoFilePickerWeb()),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
class CapgoFilePickerWeb extends core.WebPlugin {
|
|
9
|
+
async pickFiles(options) {
|
|
10
|
+
const files = await this.openFilePicker({
|
|
11
|
+
types: options === null || options === void 0 ? void 0 : options.types,
|
|
12
|
+
multiple: (options === null || options === void 0 ? void 0 : options.limit) !== 1,
|
|
13
|
+
});
|
|
14
|
+
const pickedFiles = [];
|
|
15
|
+
for (const file of files) {
|
|
16
|
+
const pickedFile = {
|
|
17
|
+
name: file.name,
|
|
18
|
+
mimeType: file.type || 'application/octet-stream',
|
|
19
|
+
size: file.size,
|
|
20
|
+
blob: file,
|
|
21
|
+
modifiedAt: file.lastModified,
|
|
22
|
+
};
|
|
23
|
+
if (options === null || options === void 0 ? void 0 : options.readData) {
|
|
24
|
+
pickedFile.data = await this.getDataFromFile(file);
|
|
25
|
+
}
|
|
26
|
+
if (file.type.startsWith('image/')) {
|
|
27
|
+
const dimensions = await this.getImageDimensions(file);
|
|
28
|
+
pickedFile.width = dimensions.width;
|
|
29
|
+
pickedFile.height = dimensions.height;
|
|
30
|
+
}
|
|
31
|
+
pickedFiles.push(pickedFile);
|
|
32
|
+
}
|
|
33
|
+
return { files: pickedFiles };
|
|
34
|
+
}
|
|
35
|
+
async pickImages(options) {
|
|
36
|
+
return this.pickFiles({
|
|
37
|
+
types: ['image/*'],
|
|
38
|
+
limit: options === null || options === void 0 ? void 0 : options.limit,
|
|
39
|
+
readData: options === null || options === void 0 ? void 0 : options.readData,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async pickVideos(options) {
|
|
43
|
+
return this.pickFiles({
|
|
44
|
+
types: ['video/*'],
|
|
45
|
+
limit: options === null || options === void 0 ? void 0 : options.limit,
|
|
46
|
+
readData: options === null || options === void 0 ? void 0 : options.readData,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
async pickMedia(options) {
|
|
50
|
+
return this.pickFiles({
|
|
51
|
+
types: ['image/*', 'video/*'],
|
|
52
|
+
limit: options === null || options === void 0 ? void 0 : options.limit,
|
|
53
|
+
readData: options === null || options === void 0 ? void 0 : options.readData,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
async pickDirectory() {
|
|
57
|
+
throw this.unimplemented('pickDirectory is not supported on web');
|
|
58
|
+
}
|
|
59
|
+
async convertHeicToJpeg(_options) {
|
|
60
|
+
throw this.unimplemented('convertHeicToJpeg is not supported on web');
|
|
61
|
+
}
|
|
62
|
+
async copyFile(_options) {
|
|
63
|
+
throw this.unimplemented('copyFile is not supported on web');
|
|
64
|
+
}
|
|
65
|
+
async checkPermissions() {
|
|
66
|
+
return {
|
|
67
|
+
readExternalStorage: 'granted',
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
async requestPermissions() {
|
|
71
|
+
return {
|
|
72
|
+
readExternalStorage: 'granted',
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
async addListener(_eventName, _listenerFunc) {
|
|
76
|
+
return {
|
|
77
|
+
remove: async () => {
|
|
78
|
+
// No-op on web
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
async removeAllListeners() {
|
|
83
|
+
// No-op on web
|
|
84
|
+
}
|
|
85
|
+
async getPluginVersion() {
|
|
86
|
+
return { version: 'web' };
|
|
87
|
+
}
|
|
88
|
+
openFilePicker(options) {
|
|
89
|
+
return new Promise((resolve) => {
|
|
90
|
+
var _a;
|
|
91
|
+
const input = document.createElement('input');
|
|
92
|
+
input.type = 'file';
|
|
93
|
+
input.multiple = (_a = options.multiple) !== null && _a !== void 0 ? _a : true;
|
|
94
|
+
if (options.types && options.types.length > 0) {
|
|
95
|
+
input.accept = options.types.join(',');
|
|
96
|
+
}
|
|
97
|
+
input.style.display = 'none';
|
|
98
|
+
document.body.appendChild(input);
|
|
99
|
+
let resolved = false;
|
|
100
|
+
const handleChange = () => {
|
|
101
|
+
resolved = true;
|
|
102
|
+
const files = Array.from(input.files || []);
|
|
103
|
+
cleanup();
|
|
104
|
+
resolve(files);
|
|
105
|
+
};
|
|
106
|
+
const handleCancel = () => {
|
|
107
|
+
// Small delay to ensure change event fires first if files were selected
|
|
108
|
+
setTimeout(() => {
|
|
109
|
+
if (!resolved) {
|
|
110
|
+
cleanup();
|
|
111
|
+
resolve([]);
|
|
112
|
+
}
|
|
113
|
+
}, 300);
|
|
114
|
+
};
|
|
115
|
+
const cleanup = () => {
|
|
116
|
+
input.removeEventListener('change', handleChange);
|
|
117
|
+
window.removeEventListener('focus', handleCancel);
|
|
118
|
+
document.body.removeChild(input);
|
|
119
|
+
};
|
|
120
|
+
input.addEventListener('change', handleChange);
|
|
121
|
+
window.addEventListener('focus', handleCancel);
|
|
122
|
+
input.click();
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
getDataFromFile(file) {
|
|
126
|
+
return new Promise((resolve, reject) => {
|
|
127
|
+
const reader = new FileReader();
|
|
128
|
+
reader.onload = () => {
|
|
129
|
+
const result = reader.result;
|
|
130
|
+
// Remove data URL prefix to get pure base64
|
|
131
|
+
const base64 = result.split(',')[1] || '';
|
|
132
|
+
resolve(base64);
|
|
133
|
+
};
|
|
134
|
+
reader.onerror = () => reject(new Error('Failed to read file'));
|
|
135
|
+
reader.readAsDataURL(file);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
getImageDimensions(file) {
|
|
139
|
+
return new Promise((resolve) => {
|
|
140
|
+
const img = new Image();
|
|
141
|
+
img.onload = () => {
|
|
142
|
+
URL.revokeObjectURL(img.src);
|
|
143
|
+
resolve({ width: img.width, height: img.height });
|
|
144
|
+
};
|
|
145
|
+
img.onerror = () => {
|
|
146
|
+
URL.revokeObjectURL(img.src);
|
|
147
|
+
resolve({ width: 0, height: 0 });
|
|
148
|
+
};
|
|
149
|
+
img.src = URL.createObjectURL(file);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
155
|
+
__proto__: null,
|
|
156
|
+
CapgoFilePickerWeb: CapgoFilePickerWeb
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
exports.CapgoFilePicker = CapgoFilePicker;
|
|
160
|
+
|
|
161
|
+
return exports;
|
|
162
|
+
|
|
163
|
+
})({}, capacitorExports);
|
|
164
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapgoFilePicker = registerPlugin('CapgoFilePicker', {\n web: () => import('./web').then((m) => new m.CapgoFilePickerWeb()),\n});\nexport * from './definitions';\nexport { CapgoFilePicker };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapgoFilePickerWeb extends WebPlugin {\n async pickFiles(options) {\n const files = await this.openFilePicker({\n types: options === null || options === void 0 ? void 0 : options.types,\n multiple: (options === null || options === void 0 ? void 0 : options.limit) !== 1,\n });\n const pickedFiles = [];\n for (const file of files) {\n const pickedFile = {\n name: file.name,\n mimeType: file.type || 'application/octet-stream',\n size: file.size,\n blob: file,\n modifiedAt: file.lastModified,\n };\n if (options === null || options === void 0 ? void 0 : options.readData) {\n pickedFile.data = await this.getDataFromFile(file);\n }\n if (file.type.startsWith('image/')) {\n const dimensions = await this.getImageDimensions(file);\n pickedFile.width = dimensions.width;\n pickedFile.height = dimensions.height;\n }\n pickedFiles.push(pickedFile);\n }\n return { files: pickedFiles };\n }\n async pickImages(options) {\n return this.pickFiles({\n types: ['image/*'],\n limit: options === null || options === void 0 ? void 0 : options.limit,\n readData: options === null || options === void 0 ? void 0 : options.readData,\n });\n }\n async pickVideos(options) {\n return this.pickFiles({\n types: ['video/*'],\n limit: options === null || options === void 0 ? void 0 : options.limit,\n readData: options === null || options === void 0 ? void 0 : options.readData,\n });\n }\n async pickMedia(options) {\n return this.pickFiles({\n types: ['image/*', 'video/*'],\n limit: options === null || options === void 0 ? void 0 : options.limit,\n readData: options === null || options === void 0 ? void 0 : options.readData,\n });\n }\n async pickDirectory() {\n throw this.unimplemented('pickDirectory is not supported on web');\n }\n async convertHeicToJpeg(_options) {\n throw this.unimplemented('convertHeicToJpeg is not supported on web');\n }\n async copyFile(_options) {\n throw this.unimplemented('copyFile is not supported on web');\n }\n async checkPermissions() {\n return {\n readExternalStorage: 'granted',\n };\n }\n async requestPermissions() {\n return {\n readExternalStorage: 'granted',\n };\n }\n async addListener(_eventName, _listenerFunc) {\n return {\n remove: async () => {\n // No-op on web\n },\n };\n }\n async removeAllListeners() {\n // No-op on web\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n openFilePicker(options) {\n return new Promise((resolve) => {\n var _a;\n const input = document.createElement('input');\n input.type = 'file';\n input.multiple = (_a = options.multiple) !== null && _a !== void 0 ? _a : true;\n if (options.types && options.types.length > 0) {\n input.accept = options.types.join(',');\n }\n input.style.display = 'none';\n document.body.appendChild(input);\n let resolved = false;\n const handleChange = () => {\n resolved = true;\n const files = Array.from(input.files || []);\n cleanup();\n resolve(files);\n };\n const handleCancel = () => {\n // Small delay to ensure change event fires first if files were selected\n setTimeout(() => {\n if (!resolved) {\n cleanup();\n resolve([]);\n }\n }, 300);\n };\n const cleanup = () => {\n input.removeEventListener('change', handleChange);\n window.removeEventListener('focus', handleCancel);\n document.body.removeChild(input);\n };\n input.addEventListener('change', handleChange);\n window.addEventListener('focus', handleCancel);\n input.click();\n });\n }\n getDataFromFile(file) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n const result = reader.result;\n // Remove data URL prefix to get pure base64\n const base64 = result.split(',')[1] || '';\n resolve(base64);\n };\n reader.onerror = () => reject(new Error('Failed to read file'));\n reader.readAsDataURL(file);\n });\n }\n getImageDimensions(file) {\n return new Promise((resolve) => {\n const img = new Image();\n img.onload = () => {\n URL.revokeObjectURL(img.src);\n resolve({ width: img.width, height: img.height });\n };\n img.onerror = () => {\n URL.revokeObjectURL(img.src);\n resolve({ width: 0, height: 0 });\n };\n img.src = URL.createObjectURL(file);\n });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;IAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACtE,CAAC;;ICFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;IAClD,IAAI,MAAM,SAAS,CAAC,OAAO,EAAE;IAC7B,QAAQ,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC;IAChD,YAAY,KAAK,EAAE,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,KAAK;IAClF,YAAY,QAAQ,EAAE,CAAC,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,KAAK,MAAM,CAAC;IAC7F,SAAS,CAAC;IACV,QAAQ,MAAM,WAAW,GAAG,EAAE;IAC9B,QAAQ,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;IAClC,YAAY,MAAM,UAAU,GAAG;IAC/B,gBAAgB,IAAI,EAAE,IAAI,CAAC,IAAI;IAC/B,gBAAgB,QAAQ,EAAE,IAAI,CAAC,IAAI,IAAI,0BAA0B;IACjE,gBAAgB,IAAI,EAAE,IAAI,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