@lonik/oh-image 2.10.0 → 2.10.1

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.
@@ -1,7 +1,7 @@
1
1
  import { n as ImageLoaderOptions } from "./types-BEgZ3W30.js";
2
- import "./index-5MpToMnk.js";
2
+ import "./index-CaQSR67D.js";
3
3
  import { n as BaseLoaderOptions, t as BaseGlobalLoaderOptions } from "./base-loader-options-DCLkYppY.js";
4
- import * as react_jsx_runtime8 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime7 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/loaders/cloudflare/cloudflare-options.d.ts
7
7
  type CloudflareTransforms = Partial<{
@@ -40,6 +40,6 @@ declare const useCloudflareContext: () => CloudflareGlobalOptions, CloudflareLoa
40
40
  ...props
41
41
  }: {
42
42
  children: React.ReactNode;
43
- } & Partial<CloudflareGlobalOptions>) => react_jsx_runtime8.JSX.Element, useCloudflareLoader: (options?: CloudflareGlobalOptions | undefined) => (() => undefined) | ((imageOptions: ImageLoaderOptions) => string);
43
+ } & Partial<CloudflareGlobalOptions>) => react_jsx_runtime7.JSX.Element, useCloudflareLoader: (options?: CloudflareGlobalOptions | undefined) => (() => undefined) | ((imageOptions: ImageLoaderOptions) => string);
44
44
  //#endregion
45
45
  export { CloudflareGlobalOptions, CloudflareLoaderProvider, CloudflareOptions, CloudflareTransforms, useCloudflareContext, useCloudflareLoader };
@@ -1,5 +1,5 @@
1
1
  import { n as ImageLoaderOptions } from "./types-BEgZ3W30.js";
2
- import * as react_jsx_runtime6 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import { Cloudinary, CloudinaryImage } from "@cloudinary/url-gen";
4
4
 
5
5
  //#region src/loaders/cloudinary/cloudinary-options.d.ts
@@ -34,7 +34,7 @@ declare function CloudinaryLoaderProvider({
34
34
  children: React.ReactNode;
35
35
  transforms?: CloudinaryTransforms;
36
36
  placeholder?: CloudinaryTransforms;
37
- }): react_jsx_runtime6.JSX.Element;
37
+ }): react_jsx_runtime0.JSX.Element;
38
38
  declare function useCloudinaryLoader(options?: CloudinaryLoaderHookOptions | CloudinaryTransforms): (imageOptions: ImageLoaderOptions) => string;
39
39
  declare const useCloudinaryContext: () => CloudinaryLoaderContext;
40
40
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { n as ImageLoaderOptions } from "./types-BEgZ3W30.js";
2
- import "./index-5MpToMnk.js";
2
+ import "./index-CaQSR67D.js";
3
3
  import { n as BaseLoaderOptions, t as BaseGlobalLoaderOptions } from "./base-loader-options-DCLkYppY.js";
4
4
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { n as ImageLoaderOptions } from "./types-BEgZ3W30.js";
2
- import "./index-5MpToMnk.js";
2
+ import "./index-CaQSR67D.js";
3
3
  import { n as BaseLoaderOptions, t as BaseGlobalLoaderOptions } from "./base-loader-options-DCLkYppY.js";
4
- import * as react_jsx_runtime7 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/loaders/imgproxy/imgproxy-options.d.ts
7
7
  type ResizeType = "fit" | "fill" | "fill-down" | "force" | "auto";
@@ -384,6 +384,6 @@ declare const useImgproxyContext: () => ImgproxyGlobalOptions, ImgproxyLoaderPro
384
384
  ...props
385
385
  }: {
386
386
  children: React.ReactNode;
387
- } & Partial<ImgproxyGlobalOptions>) => react_jsx_runtime7.JSX.Element, useImgproxyLoader: (options?: ImgproxyGlobalOptions | undefined) => (() => undefined) | ((imageOptions: ImageLoaderOptions) => string);
387
+ } & Partial<ImgproxyGlobalOptions>) => react_jsx_runtime6.JSX.Element, useImgproxyLoader: (options?: ImgproxyGlobalOptions | undefined) => (() => undefined) | ((imageOptions: ImageLoaderOptions) => string);
388
388
  //#endregion
389
389
  export { ImgproxyGlobalOptions, ImgproxyLoaderProvider, ImgproxyOptions, ImgproxyTransforms, useImgproxyContext, useImgproxyLoader };
@@ -1,11 +1,11 @@
1
1
  import { r as ImageProps, t as ImageLoader } from "./types-BEgZ3W30.js";
2
- import * as react_jsx_runtime4 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/react/image.d.ts
5
- declare function Image(props: ImageProps): react_jsx_runtime4.JSX.Element;
5
+ declare function Image(props: ImageProps): react_jsx_runtime3.JSX.Element;
6
6
  //#endregion
7
7
  //#region src/react/image-factory.d.ts
8
- declare function __imageFactory(defaultProps: any): (props: any) => react_jsx_runtime4.JSX.Element;
8
+ declare function __imageFactory(defaultProps: any): (props: any) => react_jsx_runtime3.JSX.Element;
9
9
  //#endregion
10
10
  //#region src/react/use-img-loaded.d.ts
11
11
  /**
@@ -47,6 +47,6 @@ declare function ImageProvider({
47
47
  ...props
48
48
  }: {
49
49
  children: React.ReactNode;
50
- } & Partial<ImageContextValue>): react_jsx_runtime4.JSX.Element;
50
+ } & Partial<ImageContextValue>): react_jsx_runtime3.JSX.Element;
51
51
  //#endregion
52
52
  export { Image as a, __imageFactory as i, useImageContext as n, useImgLoaded as r, ImageProvider as t };
package/dist/kontent.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { n as ImageLoaderOptions } from "./types-BEgZ3W30.js";
2
- import "./index-5MpToMnk.js";
2
+ import "./index-CaQSR67D.js";
3
3
  import { n as BaseLoaderOptions, t as BaseGlobalLoaderOptions } from "./base-loader-options-DCLkYppY.js";
4
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/loaders/kontent/kontent-options.d.ts
7
7
  type KontentTransforms = Partial<{
@@ -44,6 +44,6 @@ declare const useKontentContext: () => KontentGlobalOptions, KontentLoaderProvid
44
44
  ...props
45
45
  }: {
46
46
  children: React.ReactNode;
47
- } & Partial<KontentGlobalOptions>) => react_jsx_runtime0.JSX.Element, useKontentLoader: (options?: KontentGlobalOptions | undefined) => (() => undefined) | ((imageOptions: ImageLoaderOptions) => string);
47
+ } & Partial<KontentGlobalOptions>) => react_jsx_runtime2.JSX.Element, useKontentLoader: (options?: KontentGlobalOptions | undefined) => (() => undefined) | ((imageOptions: ImageLoaderOptions) => string);
48
48
  //#endregion
49
49
  export { KontentGlobalOptions, KontentLoaderProvider, KontentOptions, KontentTransforms, useKontentContext, useKontentLoader };
package/dist/netlify.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { n as ImageLoaderOptions } from "./types-BEgZ3W30.js";
2
- import "./index-5MpToMnk.js";
2
+ import "./index-CaQSR67D.js";
3
3
  import { n as BaseLoaderOptions, t as BaseGlobalLoaderOptions } from "./base-loader-options-DCLkYppY.js";
4
- import * as react_jsx_runtime2 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/loaders/netlify/netlify-options.d.ts
7
7
  type NetlifyTransforms = Partial<{
@@ -21,6 +21,6 @@ declare const useNetlifyContext: () => NetlifyGlobalOptions, NetlifyLoaderProvid
21
21
  ...props
22
22
  }: {
23
23
  children: React.ReactNode;
24
- } & Partial<NetlifyGlobalOptions>) => react_jsx_runtime2.JSX.Element, useNetlifyLoader: (options?: NetlifyGlobalOptions | undefined) => (() => undefined) | ((imageOptions: ImageLoaderOptions) => string);
24
+ } & Partial<NetlifyGlobalOptions>) => react_jsx_runtime1.JSX.Element, useNetlifyLoader: (options?: NetlifyGlobalOptions | undefined) => (() => undefined) | ((imageOptions: ImageLoaderOptions) => string);
25
25
  //#endregion
26
26
  export { NetlifyGlobalOptions, NetlifyLoaderProvider, NetlifyOptions, NetlifyTransforms, useNetlifyContext, useNetlifyLoader };
package/dist/plugin.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { basename, dirname, extname, join, parse } from "node:path";
2
2
  import queryString from "query-string";
3
- import { extname as extname$1 } from "path";
4
3
  import { createHash } from "node:crypto";
5
4
  import { mkdir, readFile, writeFile } from "node:fs/promises";
6
5
  import pLimit from "p-limit";
@@ -71,7 +70,7 @@ function queryToOptions(processKey, uri) {
71
70
  }
72
71
  /** returns ext of file. removes '.' */
73
72
  function getCleanExt(filepath) {
74
- const ext = extname$1(filepath);
73
+ const ext = extname(filepath);
75
74
  return ext.startsWith(".") ? ext.slice(1) : ext;
76
75
  }
77
76
  function resolveTransforms(options, defaults, metadata, fileFormat) {
package/dist/react.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { n as ImageLoaderOptions, r as ImageProps, t as ImageLoader } from "./types-BEgZ3W30.js";
2
- import { a as Image, i as __imageFactory, n as useImageContext, r as useImgLoaded, t as ImageProvider } from "./index-5MpToMnk.js";
2
+ import { a as Image, i as __imageFactory, n as useImageContext, r as useImgLoaded, t as ImageProvider } from "./index-CaQSR67D.js";
3
3
  export { Image, ImageLoader, ImageLoaderOptions, ImageProps, ImageProvider, __imageFactory, useImageContext, useImgLoaded };
@@ -1,7 +1,7 @@
1
1
  import { n as ImageLoaderOptions } from "./types-BEgZ3W30.js";
2
- import "./index-5MpToMnk.js";
2
+ import "./index-CaQSR67D.js";
3
3
  import { n as BaseLoaderOptions, t as BaseGlobalLoaderOptions } from "./base-loader-options-DCLkYppY.js";
4
- import * as react_jsx_runtime1 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/loaders/wordpress/wordpress-options.d.ts
7
7
  type WordpressTransforms = Partial<{
@@ -31,6 +31,6 @@ declare const useWordpressContext: () => WordpressGlobalOptions, WordpressLoader
31
31
  ...props
32
32
  }: {
33
33
  children: React.ReactNode;
34
- } & Partial<WordpressGlobalOptions>) => react_jsx_runtime1.JSX.Element, useWordpressLoader: (options?: WordpressGlobalOptions | undefined) => (() => undefined) | ((imageOptions: ImageLoaderOptions) => string);
34
+ } & Partial<WordpressGlobalOptions>) => react_jsx_runtime8.JSX.Element, useWordpressLoader: (options?: WordpressGlobalOptions | undefined) => (() => undefined) | ((imageOptions: ImageLoaderOptions) => string);
35
35
  //#endregion
36
36
  export { WordpressGlobalOptions, WordpressLoaderProvider, WordpressOptions, WordpressTransforms, useWordpressContext, useWordpressLoader };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lonik/oh-image",
3
3
  "type": "module",
4
- "version": "2.10.0",
4
+ "version": "2.10.1",
5
5
  "description": "A React component library for optimized image handling.",
6
6
  "author": "Luka Onikadze <lukonik@gmail.com>",
7
7
  "license": "MIT",