refactor: standardize design
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -28,3 +28,23 @@ export interface ContextMenuAction {
|
||||
disabled?: boolean
|
||||
divider?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Shape of an item registered at the `documents_file_viewer` integration point.
|
||||
* Stored under `meta` so it fits inside a standard `ModuleIntegrationItem`.
|
||||
*/
|
||||
export interface DocumentViewerMeta {
|
||||
/** Exact MIME type matches, e.g. ['application/pdf'] */
|
||||
mimeTypes?: string[]
|
||||
/** Glob-style patterns, e.g. ['image/*', 'video/*'] */
|
||||
mimePatterns?: string[]
|
||||
}
|
||||
|
||||
export interface DocumentViewerItem {
|
||||
id: string
|
||||
label?: string
|
||||
priority?: number
|
||||
meta: DocumentViewerMeta
|
||||
/** Async factory returning the Vue viewer component */
|
||||
component: () => Promise<unknown>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user