Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions src/types/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { IPXOptions } from 'ipx'
import type { ImageOptions, CreateImageOptions } from './image'
import type { ImageOptions, CreateImageOptions, ImageModifiers } from './image'

// eslint-disable-next-line no-use-before-define
export type ProviderSetup = (providerOptions: ImageModuleProvider, moduleOptions: ModuleOptions, nuxt: any)
Expand All @@ -12,8 +12,35 @@ export interface InputProvider<T = any> {
setup?: ProviderSetup
}

export interface CloudinaryModifiers extends ImageModifiers {
format: string
quality: string
background: string
rotate: 'auto_right' | 'auto_left' | 'ignore' | 'vflip' | 'hflip' | number
roundCorner: string
gravity: string
effect: string
color: string
flags: string
dpr: string
opacity: number
overlay: string
underlay: string
transformation: string
zoom: number
colorSpace: string
customFunc: string
density: number
}

export interface CloudinaryOptions {
baseURL: string
modifiers: Partial<CloudinaryModifiers>
[key: string]: any
}

export interface ImageProviders {
cloudinary?: any
cloudinary?: Partial<CloudinaryOptions>
contentful?: any
fastly?: any
glide?: any
Expand Down