@codingfactory/mediables-vue 2.15.0 → 2.16.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.
@@ -33,10 +33,15 @@ export interface MediaLibraryHttpClient {
33
33
  patch?<T>(url: string, body?: unknown, config?: MediaLibraryRequestConfig): Promise<T>;
34
34
  delete?<T>(url: string, config?: MediaLibraryRequestConfig): Promise<T>;
35
35
  }
36
+ export interface MediaLibraryAlbumEndpoints {
37
+ list?: string;
38
+ create?: string;
39
+ }
36
40
  export interface MediaLibraryPickerDeps {
37
41
  httpClient: MediaLibraryHttpClient;
38
42
  uploadAdapter?: StorageAdapter;
39
43
  resolveThumbnailUrl?: (media: Media, variant?: 'sm' | 'md' | 'lg') => string | Promise<string>;
44
+ albumEndpoints?: MediaLibraryAlbumEndpoints;
40
45
  }
41
46
  export interface MediaSessionPolicy {
42
47
  key: string;
@@ -243,6 +248,8 @@ export interface MediaLibraryPickerSlots {
243
248
  export type MediaLibraryPickerTabId = 'upload' | 'media' | 'albums';
244
249
  /** Identifier for the management-view tab the user is currently viewing. */
245
250
  export type MediaManagementTabId = 'library' | 'trash';
251
+ /** Layout modes supported by the package-owned management shell. */
252
+ export type MediaManagementLayoutMode = 'grid' | 'table';
246
253
  /**
247
254
  * Payload for the picker `tabs` slot. Hosts get the active tab id, an
248
255
  * activate handler, and the resolved labels so they can render any tab
@@ -290,12 +297,35 @@ export interface MediaManagementBulkActionsSlotProps {
290
297
  selectedItems: Media[];
291
298
  isDeleting: boolean;
292
299
  onBulkDelete: () => void | Promise<void>;
300
+ onCreatePost?: () => void;
301
+ onCreateGallery?: () => void;
302
+ onAddToAlbum?: () => void;
293
303
  clearSelection: () => void;
294
304
  labels: {
295
305
  deleteButton: string;
306
+ createPostButton?: string;
307
+ createGalleryButton?: string;
308
+ addToAlbumButton?: string;
296
309
  selectedCount: (count: number) => string;
297
310
  };
298
311
  }
312
+ export interface MediaManagementItemActionsSlotProps {
313
+ media: Media;
314
+ selected: boolean;
315
+ canEdit: boolean;
316
+ onPreview: () => void;
317
+ onEdit?: () => void;
318
+ onCreatePost?: () => void;
319
+ onCreateGallery?: () => void;
320
+ onAddToAlbum?: () => void;
321
+ labels: {
322
+ previewButton: string;
323
+ editButton: string;
324
+ createPostButton: string;
325
+ createGalleryButton: string;
326
+ addToAlbumButton: string;
327
+ };
328
+ }
299
329
  /**
300
330
  * Payload for the management-view `trash-action` slot. Rendered per-row
301
331
  * inside the trash grid. Hosts can replace the default Restore button with
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingfactory/mediables-vue",
3
- "version": "2.15.0",
3
+ "version": "2.16.0",
4
4
  "publishConfig": {
5
5
  "access": "restricted"
6
6
  },