@lonik/oh-image 2.1.2 → 2.2.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.
@@ -0,0 +1,13 @@
1
+ //#region src/loaders/base-loader-options.d.ts
2
+ interface BaseLoaderOptions<T> {
3
+ path?: string;
4
+ transforms?: T;
5
+ }
6
+ interface BaseGlobalLoaderOptions<T> extends BaseLoaderOptions<T> {
7
+ placeholder?: T;
8
+ }
9
+ interface BaseLoaderTransforms {
10
+ [futureKey: string]: any;
11
+ }
12
+ //#endregion
13
+ export { BaseLoaderOptions as n, BaseLoaderTransforms as r, BaseGlobalLoaderOptions as t };
package/dist/client.d.ts CHANGED
@@ -1,17 +1,31 @@
1
- interface ImageSrc {
2
- /** Original width of the source image in pixels */
3
- width: number;
4
- /** Original height of the source image in pixels */
5
- height: number;
6
- /** URL to the placeholder image (if placeholder was enabled) */
7
- placeholderUrl?: string;
8
- /** Array of responsive image sources at different breakpoints */
9
- srcSets: string;
10
- /** URL to the main processed image */
11
- src: string;
12
- }
1
+ declare module "*&oh" {
2
+ export interface StaticImageProps extends Partial<
3
+ Pick<
4
+ ImgHTMLAttributes<HTMLImageElement>,
5
+ | "fetchPriority"
6
+ | "decoding"
7
+ | "loading"
8
+ | "srcSet"
9
+ | "className"
10
+ | "sizes"
11
+ | "style"
12
+ >
13
+ > {
14
+ /** Alternative text for the image, required for accessibility. Use an empty string for decorative images. */
15
+ alt: string;
16
+
17
+ /** Configures the Image component to load the image immediately. */
18
+ priority?: boolean;
19
+
20
+ /**
21
+ * Sets the image to "fill mode", which eliminates the height/width requirement and adds
22
+ * styles such that the image fills its containing element.
23
+ */
24
+ fill?: boolean;
25
+
26
+ breakpoints?: number[];
27
+ }
13
28
 
14
- declare module "*?oh" {
15
- const imageSrc: any;
16
- export default imageSrc;
29
+ const component: React.FC<StaticImageProps>;
30
+ export default component;
17
31
  }
@@ -0,0 +1,40 @@
1
+ import { s as ImageLoaderOptions } from "./index-DG8i2dGY.js";
2
+ import { n as BaseLoaderOptions, r as BaseLoaderTransforms, t as BaseGlobalLoaderOptions } from "./base-loader-options-C1EZVxmE.js";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+
5
+ //#region src/loaders/cloudflare/cloudflare-options.d.ts
6
+ type CloudflareTransforms = BaseLoaderTransforms & Partial<{
7
+ anim?: boolean;
8
+ background?: string;
9
+ blur?: number;
10
+ brightness?: number;
11
+ compression?: boolean;
12
+ contrast?: number;
13
+ dpr?: number;
14
+ dprs?: number[];
15
+ fit?: "scale-down" | "contain" | "cover" | "crop" | "pad";
16
+ format?: "auto" | "avif" | "webp" | "json";
17
+ gamma?: number;
18
+ gravity?: "auto" | "left" | "right" | "top" | "bottom" | string;
19
+ height?: number;
20
+ width?: number;
21
+ widths?: number[];
22
+ maxWidth?: number;
23
+ metadata?: "keep" | "copyright" | "none";
24
+ quality?: number;
25
+ rotate?: number;
26
+ sharpen?: number;
27
+ trim?: string;
28
+ }>;
29
+ type CloudflareOptions = BaseLoaderOptions<CloudflareTransforms>;
30
+ type CloudflareGlobalOptions = BaseGlobalLoaderOptions<CloudflareTransforms>;
31
+ //#endregion
32
+ //#region src/loaders/cloudflare/cloudflare-loader.d.ts
33
+ declare const useCloudflareContext: () => CloudflareGlobalOptions, CloudflareLoaderProvider: ({
34
+ children,
35
+ ...props
36
+ }: {
37
+ children: React.ReactNode;
38
+ } & Partial<CloudflareGlobalOptions>) => react_jsx_runtime0.JSX.Element, useCloudflareLoader: (options?: CloudflareGlobalOptions | undefined) => (() => undefined) | ((imageOptions: ImageLoaderOptions) => string);
39
+ //#endregion
40
+ export { CloudflareGlobalOptions, CloudflareLoaderProvider, CloudflareOptions, CloudflareTransforms, useCloudflareContext, useCloudflareLoader };
@@ -0,0 +1,16 @@
1
+ import { t as loaderFactory } from "./loader-factory-dkIeg239.js";
2
+
3
+ //#region src/loaders/cloudflare/cloudflare-loader.tsx
4
+ const { useLoaderContext: useCloudflareContext, LoaderProvider: CloudflareLoaderProvider, useLoader: useCloudflareLoader } = loaderFactory({
5
+ transforms: { format: "auto" },
6
+ placeholder: {
7
+ quality: 10,
8
+ format: "auto"
9
+ }
10
+ }, {
11
+ optionSeparator: "=",
12
+ paramSeparator: ","
13
+ }, ({ path, params, imageOptions }) => `${path}/cdn-cgi/image/${params}/${imageOptions.src}`);
14
+
15
+ //#endregion
16
+ export { CloudflareLoaderProvider, useCloudflareContext, useCloudflareLoader };
@@ -0,0 +1,111 @@
1
+ import { s as ImageLoaderOptions } from "./index-DG8i2dGY.js";
2
+ import { n as BaseLoaderOptions, r as BaseLoaderTransforms, t as BaseGlobalLoaderOptions } from "./base-loader-options-C1EZVxmE.js";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+
5
+ //#region src/loaders/cloudinary/cloudinary-options.d.ts
6
+ type BACKGROUND_MODE = "border" | "predominant" | "border_contrast" | "predominant_contrast" | "predominant_gradient" | "predominant_gradient_contrast" | "border_gradient" | "border_gradient_contrast";
7
+ type ANGLE_MODE = "vflip" | "hflip" | "ignore" | "auto_right" | "auto_left";
8
+ type CROP_MODE = "auto" | "auto_pad" | "crop" | "fill" | "fill_pad" | "fit" | "imagga_crop" | "imagga_scale" | "lfill" | "limit" | "lpad" | "mfit" | "mpad" | "pad" | "scale" | "thumb";
9
+ type COLOR_SPACE = "sRGB" | "tinysrgb" | "cmyk" | "no_cmyk" | "keep_cmyk" | "truecolor";
10
+ type ART_FILTER = "al_dente" | "athena" | "audrey" | "aurora" | "daguerre" | "eucalyptus" | "fes" | "frost" | "hairspray" | "hokusai" | "incognito" | "linen" | "peacock" | "primavera" | "quartz" | "red_rock" | "refresh" | "sizzle" | "sonnet" | "ukulele" | "zorro";
11
+ type FORMAT_TYPE = "3ds" | "ai" | "avif" | "bmp" | "bw" | "djvu" | "dng" | "eps" | "fbx" | "flif" | "gif" | "glb" | "gltf" | "heif" | "heic" | "ico" | "indd" | "jp2" | "jpg" | "jpeg" | "jxl" | "obj" | "pdf" | "ply" | "png" | "psd" | "raw" | "svg" | "tga" | "tif" | "tiff" | "u3ma" | "usdz" | "wdp" | "webp";
12
+ type CloudinaryTransforms = BaseLoaderTransforms & Partial<{
13
+ a?: number | ANGLE_MODE | string;
14
+ mode?: string;
15
+ ar?: string | number;
16
+ b?: string;
17
+ b_auto?: {
18
+ mode: BACKGROUND_MODE;
19
+ number: number;
20
+ direction: string;
21
+ color: string;
22
+ };
23
+ b_gen_fill?: {
24
+ prompt: string;
25
+ seed: number;
26
+ };
27
+ bl?: string;
28
+ bo?: string;
29
+ c?: CROP_MODE;
30
+ co?: string;
31
+ cs?: COLOR_SPACE;
32
+ d?: string;
33
+ dl?: number | string;
34
+ dn?: number;
35
+ dpr?: number | "auto";
36
+ du?: number | string;
37
+ e?: string;
38
+ e_accelerate?: number | boolean;
39
+ e_adv_redeye?: boolean;
40
+ anti_removal?: number | boolean;
41
+ art?: ART_FILTER;
42
+ e_art?: ART_FILTER;
43
+ e_auto_brightness?: boolean | number;
44
+ e_auto_color?: boolean | number;
45
+ e_auto_contrast?: boolean | number;
46
+ e_auto_enhance?: boolean | number;
47
+ e_background_removal?: boolean | string;
48
+ e_blur?: number | boolean;
49
+ e_blur_faces?: number | boolean;
50
+ e_blur_region?: number | boolean;
51
+ e_brightness?: number | boolean;
52
+ e_cartoonify?: number | string;
53
+ e_colorize?: number | boolean;
54
+ e_contrast?: number | boolean;
55
+ e_distort?: string;
56
+ e_drop_shadow?: number | string;
57
+ e_gamma?: number | boolean;
58
+ e_gradient_fade?: number | boolean;
59
+ e_grayscale?: boolean;
60
+ e_hue?: number | boolean;
61
+ e_improve?: boolean | string;
62
+ e_make_transparent?: number | string;
63
+ e_negate?: boolean;
64
+ e_oil_paint?: number | boolean;
65
+ e_pixelate?: number | boolean;
66
+ e_pixelate_faces?: number | boolean;
67
+ e_pixelate_region?: number | boolean;
68
+ e_redeye?: boolean;
69
+ e_saturation?: number | boolean;
70
+ e_screen?: boolean;
71
+ e_sepia?: number | boolean;
72
+ e_shadow?: number | string;
73
+ e_sharpen?: number | boolean;
74
+ e_shear?: string;
75
+ e_simulate_colorblind?: string;
76
+ e_tint?: string;
77
+ e_trim?: number | string;
78
+ e_unsharp_mask?: number | string;
79
+ e_vectorize?: number | string;
80
+ e_vignette?: number | boolean;
81
+ e_volume_mute?: boolean;
82
+ eo?: number | string;
83
+ f?: FORMAT_TYPE;
84
+ fl?: string | string[];
85
+ g?: string;
86
+ h?: number;
87
+ l?: string;
88
+ o?: number | string;
89
+ p?: string;
90
+ pg?: number | string;
91
+ q?: number | "auto" | string;
92
+ r?: number | "max" | string;
93
+ so?: number | string;
94
+ u?: string;
95
+ w?: number;
96
+ x?: number | string;
97
+ y?: number | string;
98
+ z?: number;
99
+ }>;
100
+ type CloudinaryOptions = BaseLoaderOptions<CloudinaryTransforms>;
101
+ type CloudinaryGlobalOptions = BaseGlobalLoaderOptions<CloudinaryTransforms>;
102
+ //#endregion
103
+ //#region src/loaders/cloudinary/cloudinary-loader.d.ts
104
+ declare const useCloudinaryContext: () => CloudinaryGlobalOptions, CloudinaryLoaderProvider: ({
105
+ children,
106
+ ...props
107
+ }: {
108
+ children: React.ReactNode;
109
+ } & Partial<CloudinaryGlobalOptions>) => react_jsx_runtime0.JSX.Element, useCloudinaryLoader: (options?: CloudinaryGlobalOptions | undefined) => (() => undefined) | ((imageOptions: ImageLoaderOptions) => string);
110
+ //#endregion
111
+ export { CloudinaryGlobalOptions, CloudinaryLoaderProvider, CloudinaryOptions, CloudinaryTransforms, useCloudinaryContext, useCloudinaryLoader };
@@ -0,0 +1,76 @@
1
+ import { t as loaderFactory } from "./loader-factory-dkIeg239.js";
2
+
3
+ //#region src/loaders/cloudinary/cloudinary-loader.tsx
4
+ function customResolver(key, value) {
5
+ if (typeof value === "boolean") return value ? key : void 0;
6
+ return `${key}:${value}`;
7
+ }
8
+ const { useLoaderContext: useCloudinaryContext, LoaderProvider: CloudinaryLoaderProvider, useLoader: useCloudinaryLoader } = loaderFactory({
9
+ transforms: { f: "webp" },
10
+ placeholder: {
11
+ q: 10,
12
+ f: "webp"
13
+ }
14
+ }, {
15
+ optionSeparator: "_",
16
+ paramSeparator: ",",
17
+ widthKey: "w",
18
+ heightKey: "h",
19
+ orders: {
20
+ b_auto: [
21
+ "mode",
22
+ "number",
23
+ "direction",
24
+ "color"
25
+ ],
26
+ b_gen_fill: ["prompt", "seed"]
27
+ },
28
+ customResolver: {
29
+ art: customResolver,
30
+ e_accelerate: customResolver,
31
+ e_adv_redeye: customResolver,
32
+ e_art: customResolver,
33
+ e_auto_brightness: customResolver,
34
+ e_auto_color: customResolver,
35
+ e_auto_contrast: customResolver,
36
+ e_auto_enhance: customResolver,
37
+ e_background_removal: customResolver,
38
+ e_blur: customResolver,
39
+ e_blur_faces: customResolver,
40
+ e_blur_region: customResolver,
41
+ e_brightness: customResolver,
42
+ e_cartoonify: customResolver,
43
+ e_colorize: customResolver,
44
+ e_contrast: customResolver,
45
+ e_distort: customResolver,
46
+ e_drop_shadow: customResolver,
47
+ e_gamma: customResolver,
48
+ e_gradient_fade: customResolver,
49
+ e_grayscale: customResolver,
50
+ e_hue: customResolver,
51
+ e_improve: customResolver,
52
+ e_make_transparent: customResolver,
53
+ e_negate: customResolver,
54
+ e_oil_paint: customResolver,
55
+ e_pixelate: customResolver,
56
+ e_pixelate_faces: customResolver,
57
+ e_pixelate_region: customResolver,
58
+ e_redeye: customResolver,
59
+ e_saturation: customResolver,
60
+ e_screen: customResolver,
61
+ e_sepia: customResolver,
62
+ e_shadow: customResolver,
63
+ e_sharpen: customResolver,
64
+ e_shear: customResolver,
65
+ e_simulate_colorblind: customResolver,
66
+ e_tint: customResolver,
67
+ e_trim: customResolver,
68
+ e_unsharp_mask: customResolver,
69
+ e_vectorize: customResolver,
70
+ e_vignette: customResolver,
71
+ e_volume_mute: customResolver
72
+ }
73
+ }, ({ path, params, imageOptions }) => `${path}/image/upload/${params}/${imageOptions.src}`);
74
+
75
+ //#endregion
76
+ export { CloudinaryLoaderProvider, useCloudinaryContext, useCloudinaryLoader };
@@ -0,0 +1,376 @@
1
+ import { s as ImageLoaderOptions } from "./index-DG8i2dGY.js";
2
+ import { n as BaseLoaderOptions, r as BaseLoaderTransforms, t as BaseGlobalLoaderOptions } from "./base-loader-options-C1EZVxmE.js";
3
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
4
+
5
+ //#region src/loaders/imgproxy/imgproxy-options.d.ts
6
+ type ResizeType = "fit" | "fill" | "fill-down" | "force" | "auto";
7
+ type ResizeAlgorithm = "nearest" | "linear" | "cubic" | "lanczos2" | "lanczos3";
8
+ type GravityType = "no" | "so" | "ea" | "we" | "noea" | "nowe" | "soea" | "sowe" | "ce";
9
+ interface ResizeOptions {
10
+ resizing_type?: ResizeType;
11
+ width?: number;
12
+ height?: number;
13
+ enlarge?: boolean;
14
+ extend?: boolean;
15
+ }
16
+ interface SizeOptions {
17
+ width?: number;
18
+ height?: number;
19
+ enlarge?: boolean;
20
+ extend?: boolean;
21
+ }
22
+ interface ExtendOptions {
23
+ extend?: boolean;
24
+ gravity?: GravityType;
25
+ }
26
+ interface GravityOptions {
27
+ type: GravityType;
28
+ x_offset?: number;
29
+ y_offset?: number;
30
+ }
31
+ interface CropOptions {
32
+ width: number;
33
+ height: number;
34
+ gravity?: GravityType;
35
+ }
36
+ interface TrimOptions {
37
+ threshold: number;
38
+ color?: string;
39
+ equal_hor?: boolean;
40
+ equal_ver?: boolean;
41
+ }
42
+ interface PaddingOptions {
43
+ top?: number;
44
+ right?: number;
45
+ bottom?: number;
46
+ left?: number;
47
+ }
48
+ interface BackgroundOptions {
49
+ r: number;
50
+ g: number;
51
+ b: number;
52
+ }
53
+ interface AdjustOptions {
54
+ brightness?: number;
55
+ contrast?: number;
56
+ saturation?: number;
57
+ }
58
+ interface BlurDetectionsOptions {
59
+ sigma: number;
60
+ class_names: string[];
61
+ }
62
+ interface DrawDetectionsOptions {
63
+ draw: boolean;
64
+ class_names: string[];
65
+ }
66
+ interface WatermarkOptions {
67
+ opacity: number;
68
+ position?: GravityType | "re";
69
+ x_offset?: number;
70
+ y_offset?: number;
71
+ scale?: number;
72
+ }
73
+ interface WatermarkSizeOptions {
74
+ width: number;
75
+ height: number;
76
+ }
77
+ interface UnsharpeningOptions {
78
+ mode?: string;
79
+ weight?: number;
80
+ dividor?: number;
81
+ }
82
+ interface AutoqualityOptions {
83
+ method?: string;
84
+ target?: number;
85
+ min_quality?: number;
86
+ max_quality?: number;
87
+ allowed_error?: number;
88
+ }
89
+ interface JpegOptions {
90
+ progressive?: boolean;
91
+ no_subsample?: boolean;
92
+ trellis_quant?: boolean;
93
+ overshoot_deringing?: boolean;
94
+ optimize_scans?: boolean;
95
+ quant_table?: number;
96
+ }
97
+ interface PngOptions {
98
+ interlaced?: boolean;
99
+ quantize?: boolean;
100
+ quantization_colors?: number;
101
+ }
102
+ type ImgproxyTransforms = BaseLoaderTransforms & Partial<{
103
+ /**
104
+ * Defines the resizing type, width, height, enlarge, and extend.
105
+ * All arguments are optional and can be omitted to use their default values.
106
+ */
107
+ resize?: ResizeOptions;
108
+ /**
109
+ * Defines the width, height, enlarge, and extend.
110
+ * All arguments are optional and can be omitted to use their default values.
111
+ */
112
+ size?: SizeOptions;
113
+ /**
114
+ * Defines how imgproxy will resize the source image.
115
+ * Default: fit
116
+ */
117
+ resizing_type?: ResizeType;
118
+ /**
119
+ * Defines the algorithm that imgproxy will use for resizing.
120
+ * Default: lanczos3
121
+ */
122
+ resizing_algorithm?: ResizeAlgorithm;
123
+ /**
124
+ * Defines the width of the resulting image.
125
+ * Default: 0
126
+ */
127
+ width?: number;
128
+ /**
129
+ * Defines the height of the resulting image.
130
+ * Default: 0
131
+ */
132
+ height?: number;
133
+ /**
134
+ * Defines the minimum width of the resulting image.
135
+ * Default: 0
136
+ */
137
+ "min-width"?: number;
138
+ /**
139
+ * Defines the minimum height of the resulting image.
140
+ * Default: 0
141
+ */
142
+ "min-height"?: number;
143
+ /**
144
+ * When set, imgproxy will multiply the image dimensions according to these factors.
145
+ * Default: 1
146
+ */
147
+ zoom?: number | {
148
+ x: number;
149
+ y: number;
150
+ };
151
+ /**
152
+ * When set, imgproxy will multiply the image dimensions according to this factor for HiDPI (Retina) devices.
153
+ * Default: 1
154
+ */
155
+ dpr?: number;
156
+ /**
157
+ * When set to true, imgproxy will enlarge the image if it is smaller than the given size.
158
+ * Default: false
159
+ */
160
+ enlarge?: boolean;
161
+ /**
162
+ * When set to true, imgproxy will extend the image if it is smaller than the given size.
163
+ * Can also specify gravity.
164
+ * Default: false:ce:0:0
165
+ */
166
+ extend?: boolean | ExtendOptions;
167
+ /**
168
+ * When imgproxy needs to cut some parts of the image, it is guided by the gravity option.
169
+ * Default: ce:0:0
170
+ */
171
+ gravity?: GravityOptions;
172
+ /**
173
+ * Defines an area of the image to be processed (crop before resize).
174
+ */
175
+ crop?: CropOptions;
176
+ /**
177
+ * Removes surrounding background.
178
+ */
179
+ trim?: TrimOptions;
180
+ /**
181
+ * Defines padding size.
182
+ */
183
+ padding?: PaddingOptions;
184
+ /**
185
+ * When set to true, imgproxy will automatically rotate images based on the EXIF Orientation parameter.
186
+ */
187
+ auto_rotate?: boolean;
188
+ /**
189
+ * Rotates the image on the specified angle.
190
+ * Default: 0
191
+ */
192
+ rotate?: number;
193
+ /**
194
+ * When set, imgproxy will fill the resulting image background with the specified color.
195
+ * Default: disabled
196
+ */
197
+ background?: string | BackgroundOptions;
198
+ /**
199
+ * Adds an alpha channel to background.
200
+ * Default: 1
201
+ */
202
+ background_alpha?: number;
203
+ /**
204
+ * Defines the brightness, contrast, and saturation.
205
+ */
206
+ adjust?: AdjustOptions;
207
+ /**
208
+ * When set, imgproxy will adjust brightness of the resulting image.
209
+ * Default: 0
210
+ */
211
+ brightness?: number;
212
+ /**
213
+ * When set, imgproxy will adjust the contrast of the resulting image.
214
+ * Default: 1
215
+ */
216
+ contrast?: number;
217
+ /**
218
+ * When set, imgproxy will adjust saturation of the resulting image.
219
+ * Default: 1
220
+ */
221
+ saturation?: number;
222
+ /**
223
+ * When set, imgproxy will apply a gaussian blur filter to the resulting image.
224
+ * Default: disabled
225
+ */
226
+ blur?: number;
227
+ /**
228
+ * When set, imgproxy will apply the sharpen filter to the resulting image.
229
+ * Default: disabled
230
+ */
231
+ sharpen?: number;
232
+ /**
233
+ * When set, imgproxy will apply the pixelate filter to the resulting image.
234
+ * Default: disabled
235
+ */
236
+ pixelate?: number;
237
+ /**
238
+ * Allows redefining unsharpening options.
239
+ */
240
+ unsharpening?: UnsharpeningOptions;
241
+ /**
242
+ * imgproxy detects objects of the provided classes and blurs them.
243
+ */
244
+ blur_detections?: BlurDetectionsOptions;
245
+ /**
246
+ * When draw is set to true, imgproxy detects objects of the provided classes and draws their bounding boxes.
247
+ */
248
+ draw_detections?: DrawDetectionsOptions;
249
+ /**
250
+ * Places a watermark on the processed image.
251
+ * Default: disabled
252
+ */
253
+ watermark?: WatermarkOptions;
254
+ /**
255
+ * When set, imgproxy will use the image from the specified URL as a watermark.
256
+ * Default: blank
257
+ */
258
+ watermark_url?: string;
259
+ /**
260
+ * When set, imgproxy will generate an image from the provided text and use it as a watermark.
261
+ * Default: blank
262
+ */
263
+ watermark_text?: string;
264
+ /**
265
+ * Defines the desired width and height of the watermark.
266
+ * Default: 0:0
267
+ */
268
+ watermark_size?: WatermarkSizeOptions;
269
+ /**
270
+ * When set, imgproxy will prepend a <style> node with the provided content to the <svg> node.
271
+ * Default: blank
272
+ */
273
+ style?: string;
274
+ /**
275
+ * When set to true, imgproxy will strip the metadata (EXIF, IPTC, etc.) on JPEG and WebP output images.
276
+ */
277
+ strip_metadata?: boolean;
278
+ /**
279
+ * When set to true, imgproxy will not remove copyright info while stripping metadata.
280
+ */
281
+ keep_copyright?: boolean;
282
+ /**
283
+ * When set to true, imgproxy will transform the embedded color profile (ICC) to sRGB and remove it from the image.
284
+ */
285
+ strip_color_profile?: boolean;
286
+ /**
287
+ * When set to true and the source image has an embedded thumbnail, imgproxy will always use the embedded thumbnail.
288
+ */
289
+ enforce_thumbnail?: boolean;
290
+ /**
291
+ * When set to true, imgproxy will return attachment in the Content-Disposition header.
292
+ */
293
+ return_attachment?: boolean;
294
+ /**
295
+ * Redefines quality of the resulting image, as a percentage.
296
+ * Default: 0
297
+ */
298
+ quality?: number;
299
+ /**
300
+ * Adds or redefines IMGPROXY_FORMAT_QUALITY values.
301
+ */
302
+ format_quality?: Record<string, number>;
303
+ /**
304
+ * Redefines autoquality settings.
305
+ */
306
+ autoquality?: AutoqualityOptions;
307
+ /**
308
+ * When set, imgproxy automatically degrades the quality of the image until the image size is under the specified amount of bytes.
309
+ * Default: 0
310
+ */
311
+ max_bytes?: number;
312
+ /**
313
+ * Allows redefining JPEG saving options.
314
+ */
315
+ jpeg_options?: JpegOptions;
316
+ /**
317
+ * Allows redefining PNG saving options.
318
+ */
319
+ png_options?: PngOptions;
320
+ /**
321
+ * Specifies the resulting image format.
322
+ * Default: jpg
323
+ */
324
+ format?: string;
325
+ /**
326
+ * When a source image supports pagination or animation, this option allows specifying the page to use it on.
327
+ * Default: 0
328
+ */
329
+ page?: number;
330
+ /**
331
+ * Allows redefining IMGPROXY_VIDEO_THUMBNAIL_SECOND config.
332
+ */
333
+ video_thumbnail_second?: number;
334
+ /**
335
+ * You can use a custom fallback image by specifying its URL.
336
+ * Default: blank
337
+ */
338
+ fallback_image_url?: string;
339
+ /**
340
+ * When set, imgproxy will skip the processing of the listed formats.
341
+ * Default: empty
342
+ */
343
+ skip_processing?: string[];
344
+ /**
345
+ * Cache buster doesn't affect image processing but its changing allows for bypassing the CDN, proxy server and browser cache.
346
+ * Default: empty
347
+ */
348
+ cachebuster?: string;
349
+ /**
350
+ * When set, imgproxy will check the provided unix timestamp and return 404 when expired.
351
+ * Default: empty
352
+ */
353
+ expires?: number;
354
+ /**
355
+ * Defines a filename for the Content-Disposition header.
356
+ * Default: empty
357
+ */
358
+ filename?: string;
359
+ /**
360
+ * Defines a list of presets to be used by imgproxy.
361
+ * Default: empty
362
+ */
363
+ preset?: string[];
364
+ }>;
365
+ type ImgproxyOptions = BaseLoaderOptions<ImgproxyTransforms>;
366
+ type ImgproxyGlobalOptions = BaseGlobalLoaderOptions<ImgproxyTransforms>;
367
+ //#endregion
368
+ //#region src/loaders/imgproxy/imgproxy-loader.d.ts
369
+ declare const useImgproxyContext: () => ImgproxyGlobalOptions, ImgproxyLoaderProvider: ({
370
+ children,
371
+ ...props
372
+ }: {
373
+ children: React.ReactNode;
374
+ } & Partial<ImgproxyGlobalOptions>) => react_jsx_runtime1.JSX.Element, useImgproxyLoader: (options?: ImgproxyGlobalOptions | undefined) => (() => undefined) | ((imageOptions: ImageLoaderOptions) => string);
375
+ //#endregion
376
+ export { ImgproxyGlobalOptions, ImgproxyLoaderProvider, ImgproxyOptions, ImgproxyTransforms, useImgproxyContext, useImgproxyLoader };