| 1 |
interface MediaSize { |
| 2 |
height: number; |
| 3 |
width: number; |
| 4 |
url: string; |
| 5 |
orientation: string; |
| 6 |
} |
| 7 |
interface MediaSizes { |
| 8 |
thumbnail?: MediaSize; |
| 9 |
medium?: MediaSize; |
| 10 |
large?: MediaSize; |
| 11 |
full?: MediaSize; |
| 12 |
} |
| 13 |
|
| 14 |
interface media { |
| 15 |
id: number; |
| 16 |
title: string; |
| 17 |
filename: string; |
| 18 |
url: string; |
| 19 |
link: string; |
| 20 |
alt: string; |
| 21 |
author: string; |
| 22 |
description: string; |
| 23 |
caption: string; |
| 24 |
name: string; |
| 25 |
status: string; |
| 26 |
uploadedTo: number; |
| 27 |
date: string; |
| 28 |
modified: string; |
| 29 |
menuOrder: number; |
| 30 |
mime: string; |
| 31 |
type: string; |
| 32 |
subtype: string; |
| 33 |
icon: string; |
| 34 |
dateFormatted: string; |
| 35 |
nonces: { |
| 36 |
update: string; |
| 37 |
delete: string; |
| 38 |
edit: string; |
| 39 |
}; |
| 40 |
editLink: string; |
| 41 |
meta: boolean; |
| 42 |
authorName: string; |
| 43 |
authorLink: string; |
| 44 |
filesizeInBytes: number; |
| 45 |
filesizeHumanReadable: string; |
| 46 |
context: string; |
| 47 |
height: number; |
| 48 |
width: number; |
| 49 |
orientation: string; |
| 50 |
sizes: MediaSizes; |
| 51 |
compat: { |
| 52 |
item: string; |
| 53 |
meta: string; |
| 54 |
}; |
| 55 |
} |
| 56 |
|
| 57 |
export interface AttributesTypes { |
| 58 |
media: media; |
| 59 |
height: string; |
| 60 |
width: string; |
| 61 |
alt: string; |
| 62 |
aspectRatio: string; |
| 63 |
scale: string; |
| 64 |
sizeSlug: string; |
| 65 |
caption: string; |
| 66 |
href: string; |
| 67 |
linkClass: string; |
| 68 |
linkDestination: string; |
| 69 |
rel: string; |
| 70 |
linkTarget: string; |
| 71 |
} |
| 72 |
export interface MainPropTypes { |
| 73 |
attributes: AttributesTypes; |
| 74 |
setAttributes: (attrs: object) => void; |
| 75 |
} |
| 76 |
export interface ExtendMainPropTypes extends MainPropTypes { |
| 77 |
showCaption: boolean; |
| 78 |
setShowCaption: (showCaption: boolean) => void; |
| 79 |
setIsEditingImage: (isImageEditing: boolean) => void; |
| 80 |
} |
| 81 |
export interface ImageTypes extends MainPropTypes { |
| 82 |
imageRef: HTMLImageElement | null; |
| 83 |
} |
| 84 |
|