@codingfactory/mediables-vue 2.15.0 → 2.17.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/{PixiFrameExporter-QBVjL5I-.js → PixiFrameExporter-B1jinD_-.js} +2 -2
- package/dist/{PixiFrameExporter-QBVjL5I-.js.map → PixiFrameExporter-B1jinD_-.js.map} +1 -1
- package/dist/{PixiFrameExporter-F0BnA8PJ.cjs → PixiFrameExporter-vNJtMooF.cjs} +2 -2
- package/dist/{PixiFrameExporter-F0BnA8PJ.cjs.map → PixiFrameExporter-vNJtMooF.cjs.map} +1 -1
- package/dist/components/AlbumNavRail.vue.d.ts +27 -0
- package/dist/components/AlbumTree.vue.d.ts +2 -0
- package/dist/components/MediaAlbumPickerModal.vue.d.ts +14 -0
- package/dist/components/MediaBulkActionBar.vue.d.ts +33 -0
- package/dist/components/MediaEmptyState.vue.d.ts +20 -0
- package/dist/components/MediaFilterChips.vue.d.ts +26 -0
- package/dist/components/MediaInspectorPanel.vue.d.ts +36 -0
- package/dist/components/MediaLibraryShell.vue.d.ts +36 -0
- package/dist/components/MediaLibraryToolbar.vue.d.ts +11 -0
- package/dist/components/MediaLibraryWorkspace.vue.d.ts +70 -0
- package/dist/components/MediaManagementView.vue.d.ts +33 -1
- package/dist/components/MediaShortcutHelp.vue.d.ts +13 -0
- package/dist/components/MediaTrashWorkspace.vue.d.ts +15 -0
- package/dist/components/MediaUsageList.vue.d.ts +17 -0
- package/dist/components/MediaVariantStrip.vue.d.ts +10 -0
- package/dist/composables/useAlbums.d.ts +10 -1
- package/dist/composables/useMediaDeletion.d.ts +36 -0
- package/dist/composables/useMediaDisplayName.d.ts +19 -0
- package/dist/composables/useMediaLibraryQuery.d.ts +25 -2
- package/dist/composables/useMediaLibraryUploads.d.ts +41 -0
- package/dist/composables/useMediaSelection.d.ts +34 -4
- package/dist/composables/useMediaTrash.d.ts +10 -0
- package/dist/index-DCTHBp0p.cjs +357 -0
- package/dist/index-DCTHBp0p.cjs.map +1 -0
- package/dist/{index-CxgL9IC3.js → index-IIKslTrU.js} +19349 -16351
- package/dist/index-IIKslTrU.js.map +1 -0
- package/dist/index.d.ts +34 -3
- package/dist/mediables-vue.cjs +1 -1
- package/dist/mediables-vue.mjs +109 -90
- package/dist/render-page/assets/{index-jZGmiMRr.js → index-DQB8PyEU.js} +11 -2
- package/dist/render-page/index.html +1 -1
- package/dist/stores/albumStore.d.ts +17 -0
- package/dist/style.css +1 -1
- package/dist/types/media.d.ts +5 -0
- package/dist/types/mediaLibraryPicker.d.ts +73 -1
- package/package.json +1 -1
- package/dist/index-CdE6UIlk.cjs +0 -357
- package/dist/index-CdE6UIlk.cjs.map +0 -1
- package/dist/index-CxgL9IC3.js.map +0 -1
package/dist/types/media.d.ts
CHANGED
|
@@ -43,6 +43,11 @@ export interface Media {
|
|
|
43
43
|
deletion_status?: DeletionStatus;
|
|
44
44
|
is_trashed?: boolean;
|
|
45
45
|
purge_after?: string | null;
|
|
46
|
+
parent_media_uuid?: string | null;
|
|
47
|
+
album_count?: number;
|
|
48
|
+
usage_count?: number;
|
|
49
|
+
variant_count?: number;
|
|
50
|
+
last_used_at?: string | null;
|
|
46
51
|
}
|
|
47
52
|
/**
|
|
48
53
|
* Lifecycle states from the trash-aware deletion state machine.
|
|
@@ -2,8 +2,10 @@ import type { VNode } from 'vue';
|
|
|
2
2
|
import type { StorageAdapter } from './adapter';
|
|
3
3
|
import type { Media } from './media';
|
|
4
4
|
export type MediaKind = 'image' | 'video' | 'audio' | 'document' | (string & {});
|
|
5
|
-
export type MediaSort = 'newest' | 'oldest';
|
|
5
|
+
export type MediaSort = 'newest' | 'oldest' | 'name' | 'largest' | (string & {});
|
|
6
|
+
export type MediaUsageStatus = 'used' | 'not_used';
|
|
6
7
|
export type MediaSelectionMode = 'single' | 'multiple';
|
|
8
|
+
export type MediaLibraryPickerMode = 'picker-single' | 'picker-multi' | 'management';
|
|
7
9
|
export type MediaLibraryUploadBehavior = 'adapter' | 'delegate';
|
|
8
10
|
export type MediaLibraryView = {
|
|
9
11
|
scope: 'library';
|
|
@@ -11,11 +13,22 @@ export type MediaLibraryView = {
|
|
|
11
13
|
scope: 'album';
|
|
12
14
|
albumId: string;
|
|
13
15
|
albumName?: string;
|
|
16
|
+
} | {
|
|
17
|
+
scope: 'trash';
|
|
18
|
+
} | {
|
|
19
|
+
scope: 'selection';
|
|
20
|
+
} | {
|
|
21
|
+
scope: 'unfiled';
|
|
14
22
|
};
|
|
15
23
|
export interface MediaLibraryFilters {
|
|
16
24
|
query?: string;
|
|
17
25
|
kinds?: MediaKind[];
|
|
18
26
|
sort?: MediaSort;
|
|
27
|
+
created_after?: string;
|
|
28
|
+
created_before?: string;
|
|
29
|
+
usage_status?: MediaUsageStatus | null;
|
|
30
|
+
unfiled_only?: boolean;
|
|
31
|
+
selected_uuids?: string[];
|
|
19
32
|
}
|
|
20
33
|
export interface MediaUploadTarget {
|
|
21
34
|
type: 'library' | 'album';
|
|
@@ -33,10 +46,15 @@ export interface MediaLibraryHttpClient {
|
|
|
33
46
|
patch?<T>(url: string, body?: unknown, config?: MediaLibraryRequestConfig): Promise<T>;
|
|
34
47
|
delete?<T>(url: string, config?: MediaLibraryRequestConfig): Promise<T>;
|
|
35
48
|
}
|
|
49
|
+
export interface MediaLibraryAlbumEndpoints {
|
|
50
|
+
list?: string;
|
|
51
|
+
create?: string;
|
|
52
|
+
}
|
|
36
53
|
export interface MediaLibraryPickerDeps {
|
|
37
54
|
httpClient: MediaLibraryHttpClient;
|
|
38
55
|
uploadAdapter?: StorageAdapter;
|
|
39
56
|
resolveThumbnailUrl?: (media: Media, variant?: 'sm' | 'md' | 'lg') => string | Promise<string>;
|
|
57
|
+
albumEndpoints?: MediaLibraryAlbumEndpoints;
|
|
40
58
|
}
|
|
41
59
|
export interface MediaSessionPolicy {
|
|
42
60
|
key: string;
|
|
@@ -64,6 +82,9 @@ export interface MediaLibraryResponsePagination {
|
|
|
64
82
|
has_more: boolean;
|
|
65
83
|
per_page: number | null;
|
|
66
84
|
count: number | null;
|
|
85
|
+
total?: number | null;
|
|
86
|
+
current_page?: number | null;
|
|
87
|
+
last_page?: number | null;
|
|
67
88
|
}
|
|
68
89
|
export interface MediaLibraryResponseMeta {
|
|
69
90
|
cursor: string | null;
|
|
@@ -174,9 +195,34 @@ export interface MediaLibraryPickerLabels {
|
|
|
174
195
|
previewNext?: string;
|
|
175
196
|
previewSelect?: string;
|
|
176
197
|
previewDeselect?: string;
|
|
198
|
+
selectAction?: string;
|
|
199
|
+
allMedia?: string;
|
|
200
|
+
unfiled?: string;
|
|
201
|
+
pageTitle?: string;
|
|
202
|
+
albumLabel?: string;
|
|
203
|
+
}
|
|
204
|
+
export interface MediaLibraryCapabilities {
|
|
205
|
+
allowAddToAlbum?: boolean;
|
|
206
|
+
allowBulkDelete?: boolean;
|
|
207
|
+
allowCreateGallery?: boolean;
|
|
208
|
+
allowCreatePost?: boolean;
|
|
209
|
+
allowImageEdit?: boolean;
|
|
210
|
+
allowPreview?: boolean;
|
|
211
|
+
allowVideoEdit?: boolean;
|
|
212
|
+
allowVisibilityChange?: boolean;
|
|
213
|
+
allowDownloadZip?: boolean;
|
|
214
|
+
showRawFileName?: boolean;
|
|
177
215
|
}
|
|
216
|
+
export interface MediaItemFilterResult {
|
|
217
|
+
allowed: boolean;
|
|
218
|
+
reason?: string;
|
|
219
|
+
}
|
|
220
|
+
export type MediaItemFilter = (media: Media) => boolean | string | MediaItemFilterResult;
|
|
178
221
|
export interface MediaLibraryPickerProps {
|
|
179
222
|
deps: MediaLibraryPickerDeps;
|
|
223
|
+
mode?: MediaLibraryPickerMode;
|
|
224
|
+
capabilities?: MediaLibraryCapabilities;
|
|
225
|
+
itemFilter?: MediaItemFilter;
|
|
180
226
|
modelValue?: string[];
|
|
181
227
|
defaultSelectedIds?: string[];
|
|
182
228
|
selectionMode?: MediaSelectionMode;
|
|
@@ -243,6 +289,8 @@ export interface MediaLibraryPickerSlots {
|
|
|
243
289
|
export type MediaLibraryPickerTabId = 'upload' | 'media' | 'albums';
|
|
244
290
|
/** Identifier for the management-view tab the user is currently viewing. */
|
|
245
291
|
export type MediaManagementTabId = 'library' | 'trash';
|
|
292
|
+
/** Layout modes supported by the package-owned management shell. */
|
|
293
|
+
export type MediaManagementLayoutMode = 'grid' | 'table';
|
|
246
294
|
/**
|
|
247
295
|
* Payload for the picker `tabs` slot. Hosts get the active tab id, an
|
|
248
296
|
* activate handler, and the resolved labels so they can render any tab
|
|
@@ -288,14 +336,38 @@ export interface MediaManagementBulkActionsSlotProps {
|
|
|
288
336
|
selectedCount: number;
|
|
289
337
|
selectedItemIds: string[];
|
|
290
338
|
selectedItems: Media[];
|
|
339
|
+
crossPageCount: number;
|
|
291
340
|
isDeleting: boolean;
|
|
292
341
|
onBulkDelete: () => void | Promise<void>;
|
|
342
|
+
onCreatePost?: () => void;
|
|
343
|
+
onCreateGallery?: () => void;
|
|
344
|
+
onAddToAlbum?: () => void;
|
|
293
345
|
clearSelection: () => void;
|
|
294
346
|
labels: {
|
|
295
347
|
deleteButton: string;
|
|
348
|
+
createPostButton?: string;
|
|
349
|
+
createGalleryButton?: string;
|
|
350
|
+
addToAlbumButton?: string;
|
|
296
351
|
selectedCount: (count: number) => string;
|
|
297
352
|
};
|
|
298
353
|
}
|
|
354
|
+
export interface MediaManagementItemActionsSlotProps {
|
|
355
|
+
media: Media;
|
|
356
|
+
selected: boolean;
|
|
357
|
+
canEdit: boolean;
|
|
358
|
+
onPreview: () => void;
|
|
359
|
+
onEdit?: () => void;
|
|
360
|
+
onCreatePost?: () => void;
|
|
361
|
+
onCreateGallery?: () => void;
|
|
362
|
+
onAddToAlbum?: () => void;
|
|
363
|
+
labels: {
|
|
364
|
+
previewButton: string;
|
|
365
|
+
editButton: string;
|
|
366
|
+
createPostButton: string;
|
|
367
|
+
createGalleryButton: string;
|
|
368
|
+
addToAlbumButton: string;
|
|
369
|
+
};
|
|
370
|
+
}
|
|
299
371
|
/**
|
|
300
372
|
* Payload for the management-view `trash-action` slot. Rendered per-row
|
|
301
373
|
* inside the trash grid. Hosts can replace the default Restore button with
|