vuefinder 4.4.2 → 4.5.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/{CodeMirrorEditor-BRdSd9UC.js → CodeMirrorEditor-DPcTUWhC.js} +1904 -1874
- package/dist/{index-C2kj7Fyq.js → index-B9bI9zyT.js} +2 -2
- package/dist/{index-CH7b2rZ5.js → index-BKLxqgsI.js} +2 -2
- package/dist/index-BU3rC-rH.js +10462 -0
- package/dist/{index-CLK_2Y72.js → index-CT-JsU3N.js} +4 -4
- package/dist/{index-b7QehgWN.js → index-Db6sP_Je.js} +3 -3
- package/dist/{index-CMSBtuvw.js → index-DfMoK3wR.js} +2 -2
- package/dist/{index-K55yVG6x.js → index-DgSaX-qh.js} +1 -1
- package/dist/{index-3MWoBbsB.js → index-W-EnZoEi.js} +2 -2
- package/dist/{index-b8TYJBio.js → index-kB1ntjyd.js} +2 -2
- package/dist/locales/ar.js +34 -0
- package/dist/locales/de.js +34 -0
- package/dist/locales/en.js +34 -2
- package/dist/locales/es.js +34 -0
- package/dist/locales/fa.js +34 -0
- package/dist/locales/fr.js +34 -0
- package/dist/locales/he.js +34 -0
- package/dist/locales/hi.js +34 -0
- package/dist/locales/it.js +34 -0
- package/dist/locales/ja.js +34 -0
- package/dist/locales/nl.js +34 -0
- package/dist/locales/pl.js +34 -0
- package/dist/locales/pt.js +34 -0
- package/dist/locales/ru.js +34 -0
- package/dist/locales/sv.js +34 -0
- package/dist/locales/tr.js +34 -2
- package/dist/locales/zhCN.js +34 -0
- package/dist/locales/zhTW.js +34 -0
- package/dist/types/adapters/AdapterManager.d.ts +6 -1
- package/dist/types/components/FileItem.vue.d.ts +6 -6
- package/dist/types/components/FileRow.vue.d.ts +6 -6
- package/dist/types/components/modals/ModalGoToFolder.vue.d.ts +3 -0
- package/dist/types/components/modals/ModalLayout.vue.d.ts +18 -0
- package/dist/types/components/previews/Image.vue.d.ts +0 -1
- package/dist/types/components/previews/ImageEditor.vue.d.ts +12 -0
- package/dist/types/components/previews/PreviewChrome.vue.d.ts +7 -0
- package/dist/types/components/search/SearchInput.vue.d.ts +2 -2
- package/dist/types/composables/useModal.d.ts +4 -0
- package/dist/types/composables/usePreviewControls.d.ts +10 -0
- package/dist/types/types/preview.d.ts +45 -0
- package/dist/types/utils/imageEditor.d.ts +29 -0
- package/dist/types/utils/recentPaths.d.ts +3 -0
- package/dist/vuefinder.css +1 -1
- package/dist/vuefinder.js +15 -9602
- package/package.json +1 -1
package/dist/locales/sv.js
CHANGED
|
@@ -197,4 +197,38 @@ export default {
|
|
|
197
197
|
'Copy Path': 'Kopiera sökväg',
|
|
198
198
|
'Copy Download URL': 'Kopiera nedladdnings-URL',
|
|
199
199
|
uppy: uppyLocaleSv,
|
|
200
|
+
|
|
201
|
+
// Auto-added by sync-locales.mjs — English fallback, please translate.
|
|
202
|
+
Rotate: 'Rotate',
|
|
203
|
+
Grayscale: 'Grayscale',
|
|
204
|
+
Adjust: 'Adjust',
|
|
205
|
+
Apply: 'Apply',
|
|
206
|
+
Brightness: 'Brightness',
|
|
207
|
+
Contrast: 'Contrast',
|
|
208
|
+
Saturation: 'Saturation',
|
|
209
|
+
Original: 'Original',
|
|
210
|
+
'Rotate left 90°': 'Rotate left 90°',
|
|
211
|
+
'Rotate right 90°': 'Rotate right 90°',
|
|
212
|
+
'Flip horizontal': 'Flip horizontal',
|
|
213
|
+
'Flip vertical': 'Flip vertical',
|
|
214
|
+
'File info': 'File info',
|
|
215
|
+
Type: 'Type',
|
|
216
|
+
Dimensions: 'Dimensions',
|
|
217
|
+
Duration: 'Duration',
|
|
218
|
+
Path: 'Path',
|
|
219
|
+
'Download help': 'Download help',
|
|
220
|
+
'Discard unsaved changes?': 'You have unsaved changes. Discard?',
|
|
221
|
+
Editing: 'Editing',
|
|
222
|
+
Unsaved: 'Unsaved',
|
|
223
|
+
'File %s of %s': 'File %s of %s',
|
|
224
|
+
'Toggle word wrap': 'Toggle word wrap',
|
|
225
|
+
'Word wrap on — click to disable': 'Word wrap on — click to disable',
|
|
226
|
+
'Word wrap off — click to enable': 'Word wrap off — click to enable',
|
|
227
|
+
Recent: 'Recent',
|
|
228
|
+
'Remove from recent': 'Remove from recent',
|
|
229
|
+
'Edit this path': 'Edit this path',
|
|
230
|
+
'No recent folders yet.': 'No recent folders yet.',
|
|
231
|
+
'No matching folders.': 'No matching folders.',
|
|
232
|
+
'Folder not found': 'Folder not found',
|
|
233
|
+
'Loading…': 'Loading…',
|
|
200
234
|
};
|
package/dist/locales/tr.js
CHANGED
|
@@ -8,6 +8,32 @@ export default {
|
|
|
8
8
|
Save: 'Kaydet',
|
|
9
9
|
Edit: 'Düzenle',
|
|
10
10
|
Crop: 'Kes',
|
|
11
|
+
Rotate: 'Döndür',
|
|
12
|
+
Grayscale: 'Gri tonlama',
|
|
13
|
+
Adjust: 'Ayarla',
|
|
14
|
+
Apply: 'Uygula',
|
|
15
|
+
Reset: 'Sıfırla',
|
|
16
|
+
Brightness: 'Parlaklık',
|
|
17
|
+
Contrast: 'Kontrast',
|
|
18
|
+
Saturation: 'Doygunluk',
|
|
19
|
+
Original: 'Orijinal',
|
|
20
|
+
'Rotate left 90°': '90° sola döndür',
|
|
21
|
+
'Rotate right 90°': '90° sağa döndür',
|
|
22
|
+
'Flip horizontal': 'Yatay çevir',
|
|
23
|
+
'Flip vertical': 'Dikey çevir',
|
|
24
|
+
'File info': 'Dosya bilgisi',
|
|
25
|
+
Type: 'Tür',
|
|
26
|
+
Dimensions: 'Boyutlar',
|
|
27
|
+
Duration: 'Süre',
|
|
28
|
+
Path: 'Yol',
|
|
29
|
+
'Download help': 'İndirme yardımı',
|
|
30
|
+
'Discard unsaved changes?': 'Kaydedilmemiş değişiklikler var. Iptal edilsin mi?',
|
|
31
|
+
Editing: 'Düzenleniyor',
|
|
32
|
+
Unsaved: 'Kaydedilmedi',
|
|
33
|
+
'File %s of %s': '%s / %s dosya',
|
|
34
|
+
'Toggle word wrap': 'Satır sarmayı aç/kapat',
|
|
35
|
+
'Word wrap on — click to disable': 'Satır sarma açık — kapatmak için tıkla',
|
|
36
|
+
'Word wrap off — click to enable': 'Satır sarma kapalı — açmak için tıkla',
|
|
11
37
|
'New Folder': 'Yeni Klasör',
|
|
12
38
|
'New File': 'Yeni Dosya',
|
|
13
39
|
Rename: 'Yeniden Adlandır',
|
|
@@ -24,7 +50,6 @@ export default {
|
|
|
24
50
|
'Change View': 'Görünümü değiştir',
|
|
25
51
|
Storage: 'Depo',
|
|
26
52
|
'Go up a directory': 'Yukarı git',
|
|
27
|
-
Go: 'Git',
|
|
28
53
|
'Enter folder path:': 'Klasör yolunu girin:',
|
|
29
54
|
'Invalid path format. Path must be in format: storage://path/to/folder':
|
|
30
55
|
'Geçersiz yol formatı. Yol şu formatta olmalıdır: storage://path/to/folder',
|
|
@@ -88,7 +113,6 @@ export default {
|
|
|
88
113
|
|
|
89
114
|
Settings: 'Ayarlar',
|
|
90
115
|
Shortcuts: 'Kısayollar',
|
|
91
|
-
Reset: 'Sıfırla',
|
|
92
116
|
Escape: 'Çıkış',
|
|
93
117
|
Search: 'Ara',
|
|
94
118
|
'Toggle Sidebar': 'Kenar Çubuğunu Değiştir',
|
|
@@ -137,6 +161,14 @@ export default {
|
|
|
137
161
|
Forward: 'İleri',
|
|
138
162
|
Back: 'Geri',
|
|
139
163
|
'Go to Folder': 'Klasöre Git',
|
|
164
|
+
Go: 'Git',
|
|
165
|
+
Recent: 'Son',
|
|
166
|
+
'Remove from recent': 'Son kullanılanlardan kaldır',
|
|
167
|
+
'Edit this path': 'Bu yolu düzenle',
|
|
168
|
+
'No recent folders yet.': 'Henüz son ziyaret edilen klasör yok.',
|
|
169
|
+
'No matching folders.': 'Eşleşen klasör yok.',
|
|
170
|
+
'Folder not found': 'Klasör bulunamadı',
|
|
171
|
+
'Loading…': 'Yükleniyor…',
|
|
140
172
|
Sorting: 'Sıralama',
|
|
141
173
|
Asc: 'Artan',
|
|
142
174
|
Desc: 'Azalan',
|
package/dist/locales/zhCN.js
CHANGED
|
@@ -193,4 +193,38 @@ export default {
|
|
|
193
193
|
'Copy Path': '复制路径',
|
|
194
194
|
'Copy Download URL': '复制下载链接',
|
|
195
195
|
uppy: uppyLocalezhCN,
|
|
196
|
+
|
|
197
|
+
// Auto-added by sync-locales.mjs — English fallback, please translate.
|
|
198
|
+
Rotate: 'Rotate',
|
|
199
|
+
Grayscale: 'Grayscale',
|
|
200
|
+
Adjust: 'Adjust',
|
|
201
|
+
Apply: 'Apply',
|
|
202
|
+
Brightness: 'Brightness',
|
|
203
|
+
Contrast: 'Contrast',
|
|
204
|
+
Saturation: 'Saturation',
|
|
205
|
+
Original: 'Original',
|
|
206
|
+
'Rotate left 90°': 'Rotate left 90°',
|
|
207
|
+
'Rotate right 90°': 'Rotate right 90°',
|
|
208
|
+
'Flip horizontal': 'Flip horizontal',
|
|
209
|
+
'Flip vertical': 'Flip vertical',
|
|
210
|
+
'File info': 'File info',
|
|
211
|
+
Type: 'Type',
|
|
212
|
+
Dimensions: 'Dimensions',
|
|
213
|
+
Duration: 'Duration',
|
|
214
|
+
Path: 'Path',
|
|
215
|
+
'Download help': 'Download help',
|
|
216
|
+
'Discard unsaved changes?': 'You have unsaved changes. Discard?',
|
|
217
|
+
Editing: 'Editing',
|
|
218
|
+
Unsaved: 'Unsaved',
|
|
219
|
+
'File %s of %s': 'File %s of %s',
|
|
220
|
+
'Toggle word wrap': 'Toggle word wrap',
|
|
221
|
+
'Word wrap on — click to disable': 'Word wrap on — click to disable',
|
|
222
|
+
'Word wrap off — click to enable': 'Word wrap off — click to enable',
|
|
223
|
+
Recent: 'Recent',
|
|
224
|
+
'Remove from recent': 'Remove from recent',
|
|
225
|
+
'Edit this path': 'Edit this path',
|
|
226
|
+
'No recent folders yet.': 'No recent folders yet.',
|
|
227
|
+
'No matching folders.': 'No matching folders.',
|
|
228
|
+
'Folder not found': 'Folder not found',
|
|
229
|
+
'Loading…': 'Loading…',
|
|
196
230
|
};
|
package/dist/locales/zhTW.js
CHANGED
|
@@ -193,4 +193,38 @@ export default {
|
|
|
193
193
|
'Copy Path': '複製路徑',
|
|
194
194
|
'Copy Download URL': '複製下載連結',
|
|
195
195
|
uppy: uppyLocalezhTW,
|
|
196
|
+
|
|
197
|
+
// Auto-added by sync-locales.mjs — English fallback, please translate.
|
|
198
|
+
Rotate: 'Rotate',
|
|
199
|
+
Grayscale: 'Grayscale',
|
|
200
|
+
Adjust: 'Adjust',
|
|
201
|
+
Apply: 'Apply',
|
|
202
|
+
Brightness: 'Brightness',
|
|
203
|
+
Contrast: 'Contrast',
|
|
204
|
+
Saturation: 'Saturation',
|
|
205
|
+
Original: 'Original',
|
|
206
|
+
'Rotate left 90°': 'Rotate left 90°',
|
|
207
|
+
'Rotate right 90°': 'Rotate right 90°',
|
|
208
|
+
'Flip horizontal': 'Flip horizontal',
|
|
209
|
+
'Flip vertical': 'Flip vertical',
|
|
210
|
+
'File info': 'File info',
|
|
211
|
+
Type: 'Type',
|
|
212
|
+
Dimensions: 'Dimensions',
|
|
213
|
+
Duration: 'Duration',
|
|
214
|
+
Path: 'Path',
|
|
215
|
+
'Download help': 'Download help',
|
|
216
|
+
'Discard unsaved changes?': 'You have unsaved changes. Discard?',
|
|
217
|
+
Editing: 'Editing',
|
|
218
|
+
Unsaved: 'Unsaved',
|
|
219
|
+
'File %s of %s': 'File %s of %s',
|
|
220
|
+
'Toggle word wrap': 'Toggle word wrap',
|
|
221
|
+
'Word wrap on — click to disable': 'Word wrap on — click to disable',
|
|
222
|
+
'Word wrap off — click to enable': 'Word wrap off — click to enable',
|
|
223
|
+
Recent: 'Recent',
|
|
224
|
+
'Remove from recent': 'Remove from recent',
|
|
225
|
+
'Edit this path': 'Edit this path',
|
|
226
|
+
'No recent folders yet.': 'No recent folders yet.',
|
|
227
|
+
'No matching folders.': 'No matching folders.',
|
|
228
|
+
'Folder not found': 'Folder not found',
|
|
229
|
+
'Loading…': 'Loading…',
|
|
196
230
|
};
|
|
@@ -76,7 +76,12 @@ export declare class AdapterManager {
|
|
|
76
76
|
* @param path
|
|
77
77
|
* @returns
|
|
78
78
|
*/
|
|
79
|
-
open(path?: string): Promise<FsData>;
|
|
79
|
+
open(path?: string): Promise<FsData | undefined>;
|
|
80
|
+
/**
|
|
81
|
+
* Cancel an in-flight list/open request. Aborts the underlying fetch via
|
|
82
|
+
* the AbortSignal that TanStack Query passes to the query function.
|
|
83
|
+
*/
|
|
84
|
+
cancelOpen(path?: string): void;
|
|
80
85
|
/**
|
|
81
86
|
* Delete files with optimistic updates
|
|
82
87
|
*/
|
|
@@ -27,15 +27,15 @@ type __VLS_Slots = {} & {
|
|
|
27
27
|
icon?: (props: typeof __VLS_22) => any;
|
|
28
28
|
};
|
|
29
29
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
-
click: (event: Event |
|
|
31
|
-
contextmenu: (event:
|
|
32
|
-
dblclick: (event:
|
|
30
|
+
click: (event: Event | TouchEvent | MouseEvent) => any;
|
|
31
|
+
contextmenu: (event: TouchEvent | MouseEvent) => any;
|
|
32
|
+
dblclick: (event: TouchEvent | MouseEvent) => any;
|
|
33
33
|
dragend: (event: DragEvent) => any;
|
|
34
34
|
dragstart: (event: DragEvent) => any;
|
|
35
35
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
36
|
-
onClick?: ((event: Event |
|
|
37
|
-
onContextmenu?: ((event:
|
|
38
|
-
onDblclick?: ((event:
|
|
36
|
+
onClick?: ((event: Event | TouchEvent | MouseEvent) => any) | undefined;
|
|
37
|
+
onContextmenu?: ((event: TouchEvent | MouseEvent) => any) | undefined;
|
|
38
|
+
onDblclick?: ((event: TouchEvent | MouseEvent) => any) | undefined;
|
|
39
39
|
onDragend?: ((event: DragEvent) => any) | undefined;
|
|
40
40
|
onDragstart?: ((event: DragEvent) => any) | undefined;
|
|
41
41
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -22,15 +22,15 @@ type __VLS_Slots = {} & {
|
|
|
22
22
|
icon?: (props: typeof __VLS_14) => any;
|
|
23
23
|
};
|
|
24
24
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
-
click: (event: Event |
|
|
26
|
-
contextmenu: (event:
|
|
27
|
-
dblclick: (event:
|
|
25
|
+
click: (event: Event | TouchEvent | MouseEvent) => any;
|
|
26
|
+
contextmenu: (event: TouchEvent | MouseEvent) => any;
|
|
27
|
+
dblclick: (event: TouchEvent | MouseEvent) => any;
|
|
28
28
|
dragend: (event: DragEvent) => any;
|
|
29
29
|
dragstart: (event: DragEvent) => any;
|
|
30
30
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
-
onClick?: ((event: Event |
|
|
32
|
-
onContextmenu?: ((event:
|
|
33
|
-
onDblclick?: ((event:
|
|
31
|
+
onClick?: ((event: Event | TouchEvent | MouseEvent) => any) | undefined;
|
|
32
|
+
onContextmenu?: ((event: TouchEvent | MouseEvent) => any) | undefined;
|
|
33
|
+
onDblclick?: ((event: TouchEvent | MouseEvent) => any) | undefined;
|
|
34
34
|
onDragend?: ((event: DragEvent) => any) | undefined;
|
|
35
35
|
onDragstart?: ((event: DragEvent) => any) | undefined;
|
|
36
36
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -1,6 +1,24 @@
|
|
|
1
|
+
import { type StyleValue } from 'vue';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
showDragOverlay?: boolean;
|
|
3
4
|
dragOverlayText?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Intercept Esc / overlay-click. If provided, called instead of
|
|
7
|
+
* `app.modal.close()`. Owner is responsible for actually closing once
|
|
8
|
+
* any guard (e.g. dirty-discard confirm) passes.
|
|
9
|
+
*/
|
|
10
|
+
onRequestClose?: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Inline style applied to the modal body card. Used by ModalPreview to
|
|
13
|
+
* translate the entire box during swipe-to-navigate. Touch event handlers
|
|
14
|
+
* also forward here so the whole card responds to drag.
|
|
15
|
+
*/
|
|
16
|
+
bodyStyle?: StyleValue;
|
|
17
|
+
bodyClass?: string;
|
|
18
|
+
onBodyTouchstart?: (e: TouchEvent) => void;
|
|
19
|
+
onBodyTouchmove?: (e: TouchEvent) => void;
|
|
20
|
+
onBodyTouchend?: (e: TouchEvent) => void;
|
|
21
|
+
onBodyTouchcancel?: (e: TouchEvent) => void;
|
|
4
22
|
};
|
|
5
23
|
declare var __VLS_1: {}, __VLS_3: {};
|
|
6
24
|
type __VLS_Slots = {} & {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'vue-advanced-cropper/dist/style.css';
|
|
2
1
|
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
2
|
success: (...args: any[]) => void;
|
|
4
3
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import 'vue-advanced-cropper/dist/style.css';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
src: string;
|
|
4
|
+
filename: string;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
+
"update:src": (value: string) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
"onUpdate:src"?: ((value: string) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
+
"close-request": () => any;
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
+
"onClose-request"?: (() => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -6,11 +6,11 @@ interface Props {
|
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<Props, {
|
|
7
7
|
focus: () => void;
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
-
"update:modelValue": (value: string) => any;
|
|
10
9
|
keydown: (event: KeyboardEvent) => any;
|
|
10
|
+
"update:modelValue": (value: string) => any;
|
|
11
11
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
12
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
13
12
|
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
13
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
declare const _default: typeof __VLS_export;
|
|
16
16
|
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ConfigStore } from '../stores/config';
|
|
2
|
+
import type { PreviewControls } from '../types/preview';
|
|
2
3
|
export default function useModal(config: ConfigStore): {
|
|
3
4
|
visible: import("vue").Ref<boolean, boolean>;
|
|
4
5
|
type: import("vue").ShallowRef<any, any>;
|
|
@@ -7,4 +8,7 @@ export default function useModal(config: ConfigStore): {
|
|
|
7
8
|
close: () => void;
|
|
8
9
|
setEditMode: (mode: boolean) => void;
|
|
9
10
|
editMode: import("vue").Ref<boolean, boolean>;
|
|
11
|
+
controls: import("vue").ShallowRef<PreviewControls | null, PreviewControls | null>;
|
|
12
|
+
registerControls: (next: PreviewControls) => void;
|
|
13
|
+
unregisterControls: (current: PreviewControls) => void;
|
|
10
14
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PreviewControls } from '../types/preview';
|
|
2
|
+
/**
|
|
3
|
+
* Composable used inside a preview component to register its edit-lifecycle
|
|
4
|
+
* contract with the modal chrome. The chrome reads the live reactive fields
|
|
5
|
+
* to render Edit/Save/Cancel and dirty-state, and calls the methods when the
|
|
6
|
+
* user activates them.
|
|
7
|
+
*
|
|
8
|
+
* Call once at setup time with the contract. Cleanup is automatic.
|
|
9
|
+
*/
|
|
10
|
+
export declare function usePreviewControls(controls: PreviewControls): void;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Contract a preview component implements so the modal chrome (top bar)
|
|
4
|
+
* can drive its edit lifecycle uniformly — regardless of whether the
|
|
5
|
+
* previewer is a text editor, image cropper, csv editor, etc.
|
|
6
|
+
*
|
|
7
|
+
* The chrome reads the reactive fields to render the [Edit] / [Save] /
|
|
8
|
+
* [Cancel] buttons and the dirty-state indicator, and calls the methods
|
|
9
|
+
* when the user activates them.
|
|
10
|
+
*
|
|
11
|
+
* Non-editable previewers (PDF, Video, Audio, Default) register with
|
|
12
|
+
* `isEditable` always false and no-op handlers; the chrome hides Edit.
|
|
13
|
+
*/
|
|
14
|
+
export interface PreviewControls {
|
|
15
|
+
/** Whether this previewer supports edit mode at all (feature flag aware). */
|
|
16
|
+
isEditable: ComputedRef<boolean> | Ref<boolean>;
|
|
17
|
+
/** Whether the previewer is currently in edit mode. */
|
|
18
|
+
isEditing: ComputedRef<boolean> | Ref<boolean>;
|
|
19
|
+
/** Whether the user has made unsaved changes in edit mode. */
|
|
20
|
+
isDirty: ComputedRef<boolean> | Ref<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Label for the primary commit action — "Save" for text, "Crop" for
|
|
23
|
+
* image, etc. Used as the [Save]-position button label. null when not
|
|
24
|
+
* editable.
|
|
25
|
+
*/
|
|
26
|
+
primaryActionLabel: ComputedRef<string | null> | Ref<string | null>;
|
|
27
|
+
/** Enter edit mode. */
|
|
28
|
+
enterEdit: () => void | Promise<void>;
|
|
29
|
+
/** Commit the current edit (e.g. save text, apply crop). */
|
|
30
|
+
commitEdit: () => void | Promise<void>;
|
|
31
|
+
/** Discard the edit and return to view mode. */
|
|
32
|
+
cancelEdit: () => void | Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Optional extra info rows the chrome appends to the [i] popover.
|
|
35
|
+
* Used by Image to expose intrinsic width × height, by Video to expose
|
|
36
|
+
* duration, etc. — anything that can't be known until the asset loads.
|
|
37
|
+
*/
|
|
38
|
+
extraInfo?: ComputedRef<Array<{
|
|
39
|
+
label: string;
|
|
40
|
+
value: string;
|
|
41
|
+
}>> | Ref<Array<{
|
|
42
|
+
label: string;
|
|
43
|
+
value: string;
|
|
44
|
+
}>>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canvas-backed image edit primitives used by ImageEditor.vue.
|
|
3
|
+
*
|
|
4
|
+
* Each helper takes a source URL (the current "working" image), applies an
|
|
5
|
+
* operation, and returns a fresh data URL of the result. The image editor
|
|
6
|
+
* stores the result as the new working URL — destructive applies, single
|
|
7
|
+
* working canvas (see grill-me notes).
|
|
8
|
+
*/
|
|
9
|
+
export declare function mimeForFilename(filename: string): string;
|
|
10
|
+
export declare function loadImage(src: string): Promise<HTMLImageElement>;
|
|
11
|
+
/**
|
|
12
|
+
* Bake a CSS-style filter chain into a new image. Used by grayscale and
|
|
13
|
+
* brightness/contrast/saturation panels — the live preview applies the
|
|
14
|
+
* same filter via CSS, then on Apply we render it into the bitmap so
|
|
15
|
+
* subsequent operations see it.
|
|
16
|
+
*/
|
|
17
|
+
export declare function bakeFilter(srcUrl: string, filter: string, mime: string): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Rotate by a quarter-turn and/or flip on either axis. Width/height swap
|
|
20
|
+
* for 90/270 degree rotations.
|
|
21
|
+
*/
|
|
22
|
+
export declare function bakeRotation(srcUrl: string, rotation: 0 | 90 | 180 | 270, flipX: boolean, flipY: boolean, mime: string): Promise<string>;
|
|
23
|
+
/**
|
|
24
|
+
* Adjustment slider values are in [-100, 100] with 0 = neutral. Convert
|
|
25
|
+
* them into the CSS filter string used both for live preview and for the
|
|
26
|
+
* canvas bake.
|
|
27
|
+
*/
|
|
28
|
+
export declare function adjustToFilter(b: number, c: number, s: number): string;
|
|
29
|
+
export declare function dataUrlToBlob(dataUrl: string): Promise<Blob>;
|