@hamur/image 0.0.0-stage → 0.0.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.
Files changed (156) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +24 -2
  3. package/dist/chunks/bun-index-n7xnn0a2.js +502 -0
  4. package/dist/src/adapters/angular.js +275 -0
  5. package/dist/src/adapters/html.js +70 -0
  6. package/dist/src/adapters/preact.js +82 -0
  7. package/dist/src/adapters/react.js +84 -0
  8. package/dist/src/adapters/solid.js +93 -0
  9. package/dist/src/adapters/svelte.js +15 -0
  10. package/dist/src/adapters/vue.js +147 -0
  11. package/dist/src/index.js +1442 -0
  12. package/dist/src/server/index.js +9 -0
  13. package/dist/types/src/adapters/angular-img.d.ts +40 -0
  14. package/dist/types/src/adapters/angular-picture.d.ts +36 -0
  15. package/dist/types/src/adapters/angular.d.ts +3 -0
  16. package/dist/types/src/adapters/html-img.d.ts +10 -0
  17. package/dist/types/src/adapters/html-picture.d.ts +6 -0
  18. package/dist/types/src/adapters/html.d.ts +6 -0
  19. package/dist/types/src/adapters/preact-img.d.ts +8 -0
  20. package/dist/types/src/adapters/preact-picture.d.ts +6 -0
  21. package/dist/types/src/adapters/preact.d.ts +6 -0
  22. package/dist/types/src/adapters/react-img.d.ts +8 -0
  23. package/dist/types/src/adapters/react-picture.d.ts +6 -0
  24. package/dist/types/src/adapters/react.d.ts +6 -0
  25. package/dist/types/src/adapters/solid-img.d.ts +8 -0
  26. package/dist/types/src/adapters/solid-picture.d.ts +6 -0
  27. package/dist/types/src/adapters/solid.d.ts +6 -0
  28. package/dist/types/src/adapters/svelte.d.ts +3 -0
  29. package/dist/types/src/adapters/vue-img.d.ts +119 -0
  30. package/dist/types/src/adapters/vue-picture.d.ts +121 -0
  31. package/dist/types/src/adapters/vue.d.ts +234 -0
  32. package/dist/types/src/build/endpoint.d.ts +12 -0
  33. package/dist/types/src/build/platform.d.ts +24 -0
  34. package/dist/types/src/build/runtime.d.ts +9 -0
  35. package/dist/types/src/build/types.d.ts +4 -0
  36. package/dist/types/src/build/variants.d.ts +8 -0
  37. package/dist/types/src/domains.d.ts +27 -0
  38. package/dist/types/src/index.d.ts +9 -0
  39. package/dist/types/src/module.d.ts +3 -0
  40. package/dist/types/src/options.d.ts +15 -0
  41. package/dist/types/src/providers/bunny.d.ts +9 -0
  42. package/dist/types/src/providers/cloudflare.d.ts +9 -0
  43. package/dist/types/src/providers/cloudflareImages.d.ts +9 -0
  44. package/dist/types/src/providers/cloudinary.d.ts +9 -0
  45. package/dist/types/src/providers/contentful.d.ts +9 -0
  46. package/dist/types/src/providers/fastly.d.ts +9 -0
  47. package/dist/types/src/providers/hamur-url.d.ts +3 -0
  48. package/dist/types/src/providers/hamur.d.ts +3 -0
  49. package/dist/types/src/providers/imagekit.d.ts +9 -0
  50. package/dist/types/src/providers/imgix.d.ts +9 -0
  51. package/dist/types/src/providers/imgproxy.d.ts +9 -0
  52. package/dist/types/src/providers/ipx.d.ts +9 -0
  53. package/dist/types/src/providers/netlify.d.ts +9 -0
  54. package/dist/types/src/providers/none.d.ts +8 -0
  55. package/dist/types/src/providers/sanity.d.ts +9 -0
  56. package/dist/types/src/providers/shared.d.ts +7 -0
  57. package/dist/types/src/providers/storyblok.d.ts +9 -0
  58. package/dist/types/src/providers/strapi.d.ts +9 -0
  59. package/dist/types/src/providers/supabase.d.ts +9 -0
  60. package/dist/types/src/providers/twicpics.d.ts +9 -0
  61. package/dist/types/src/providers/uploadcare.d.ts +9 -0
  62. package/dist/types/src/providers/vercel-url.d.ts +3 -0
  63. package/dist/types/src/providers/vercel.d.ts +3 -0
  64. package/dist/types/src/providers/weserv.d.ts +9 -0
  65. package/dist/types/src/runtime/image.d.ts +28 -0
  66. package/dist/types/src/runtime/img.d.ts +71 -0
  67. package/dist/types/src/runtime/index.d.ts +9 -0
  68. package/dist/types/src/runtime/picture.d.ts +24 -0
  69. package/dist/types/src/runtime/sizes.d.ts +8 -0
  70. package/dist/types/src/runtime/source.d.ts +3 -0
  71. package/dist/types/src/server/door.d.ts +1 -0
  72. package/dist/types/src/server/endpoint.d.ts +46 -0
  73. package/dist/types/src/server/handler.d.ts +1 -0
  74. package/dist/types/src/server/index.d.ts +1 -0
  75. package/dist/types/src/server/miss-handler.d.ts +1 -0
  76. package/dist/types/src/server/miss.d.ts +1 -0
  77. package/dist/types/src/server/parse.d.ts +30 -0
  78. package/dist/types/src/server/remote.d.ts +20 -0
  79. package/dist/types/src/types.d.ts +178 -0
  80. package/package.json +114 -4
  81. package/src/adapters/Img.svelte +33 -0
  82. package/src/adapters/Picture.svelte +39 -0
  83. package/src/adapters/angular-img.ts +144 -0
  84. package/src/adapters/angular-picture.ts +146 -0
  85. package/src/adapters/angular.ts +3 -0
  86. package/src/adapters/html-img.ts +42 -0
  87. package/src/adapters/html-picture.ts +30 -0
  88. package/src/adapters/html.ts +9 -0
  89. package/src/adapters/preact-img.ts +51 -0
  90. package/src/adapters/preact-picture.ts +40 -0
  91. package/src/adapters/preact.ts +9 -0
  92. package/src/adapters/react-img.ts +54 -0
  93. package/src/adapters/react-picture.ts +49 -0
  94. package/src/adapters/react.ts +9 -0
  95. package/src/adapters/solid-img.ts +47 -0
  96. package/src/adapters/solid-picture.ts +43 -0
  97. package/src/adapters/solid.ts +9 -0
  98. package/src/adapters/svelte.ts +3 -0
  99. package/src/adapters/test/ImgCustomPage.svelte +14 -0
  100. package/src/adapters/test/ImgPage.svelte +5 -0
  101. package/src/adapters/test/ImgPreloadPage.svelte +6 -0
  102. package/src/adapters/test/PicturePage.svelte +6 -0
  103. package/src/adapters/test/PicturePreloadPage.svelte +5 -0
  104. package/src/adapters/test/support.ts +116 -0
  105. package/src/adapters/vue-img.ts +72 -0
  106. package/src/adapters/vue-picture.ts +64 -0
  107. package/src/adapters/vue.ts +7 -0
  108. package/src/build/endpoint.ts +78 -0
  109. package/src/build/platform.ts +99 -0
  110. package/src/build/runtime.ts +118 -0
  111. package/src/build/types.ts +23 -0
  112. package/src/build/variants.ts +174 -0
  113. package/src/domains.ts +84 -0
  114. package/src/env.d.ts +24 -0
  115. package/src/index.ts +23 -0
  116. package/src/module.ts +29 -0
  117. package/src/options.ts +329 -0
  118. package/src/providers/bunny.ts +21 -0
  119. package/src/providers/cloudflare.ts +22 -0
  120. package/src/providers/cloudflareImages.ts +25 -0
  121. package/src/providers/cloudinary.ts +31 -0
  122. package/src/providers/contentful.ts +26 -0
  123. package/src/providers/fastly.ts +29 -0
  124. package/src/providers/hamur-url.ts +81 -0
  125. package/src/providers/hamur.ts +8 -0
  126. package/src/providers/imagekit.ts +30 -0
  127. package/src/providers/imgix.ts +26 -0
  128. package/src/providers/imgproxy.ts +24 -0
  129. package/src/providers/ipx.ts +26 -0
  130. package/src/providers/netlify.ts +23 -0
  131. package/src/providers/none.ts +9 -0
  132. package/src/providers/sanity.ts +29 -0
  133. package/src/providers/shared.ts +17 -0
  134. package/src/providers/storyblok.ts +24 -0
  135. package/src/providers/strapi.ts +24 -0
  136. package/src/providers/supabase.ts +26 -0
  137. package/src/providers/twicpics.ts +26 -0
  138. package/src/providers/uploadcare.ts +32 -0
  139. package/src/providers/vercel-url.ts +18 -0
  140. package/src/providers/vercel.ts +8 -0
  141. package/src/providers/weserv.ts +25 -0
  142. package/src/runtime/image.ts +266 -0
  143. package/src/runtime/img.ts +241 -0
  144. package/src/runtime/index.ts +18 -0
  145. package/src/runtime/picture.ts +62 -0
  146. package/src/runtime/sizes.ts +52 -0
  147. package/src/runtime/source.ts +8 -0
  148. package/src/server/door.ts +1 -0
  149. package/src/server/endpoint.ts +428 -0
  150. package/src/server/handler.ts +33 -0
  151. package/src/server/index.ts +1 -0
  152. package/src/server/miss-handler.ts +20 -0
  153. package/src/server/miss.ts +1 -0
  154. package/src/server/parse.ts +152 -0
  155. package/src/server/remote.ts +166 -0
  156. package/src/types.ts +177 -0
@@ -0,0 +1,9 @@
1
+ // @bun
2
+ import {
3
+ getImage2,
4
+ getSizes2
5
+ } from "../../chunks/bun-index-n7xnn0a2.js";
6
+ export {
7
+ getImage2 as getImage,
8
+ getSizes2 as getSizes
9
+ };
@@ -0,0 +1,40 @@
1
+ import { type OnInit } from "@angular/core";
2
+ import type { ImageMeta } from "hamur";
3
+ import type { ImageFit, ImageFormat, ImageModifiers } from "../types.ts";
4
+ /** An attribute binding takes a string, and `null` removes the attribute. */
5
+ export declare const strings: (attributes: Record<string, unknown>) => Record<string, string | null>;
6
+ /**
7
+ * `<img hamurImg src="/hero.jpg" width="1200" alt="">`. The host bindings write what the other adapters' `Img`
8
+ * writes on its `<img>`; every other attribute and listener stays the element's own. The props that are not attributes are
9
+ * taken off the element. `src`, `srcset` and `sizes` are written only when they differ: the browser loads the image again on
10
+ * every write, so a binding that rewrites the server's equal value during hydration fires `load` again.
11
+ */
12
+ export declare class Img implements OnInit {
13
+ readonly src: import("@angular/core/types/core.js").InputSignal<string | ImageMeta>;
14
+ readonly alt: import("@angular/core/types/core.js").InputSignal<string | undefined>;
15
+ readonly width: import("@angular/core/types/core.js").InputSignal<string | number | undefined>;
16
+ readonly height: import("@angular/core/types/core.js").InputSignal<string | number | undefined>;
17
+ readonly sizes: import("@angular/core/types/core.js").InputSignal<string | undefined>;
18
+ readonly densities: import("@angular/core/types/core.js").InputSignal<number[] | undefined>;
19
+ readonly format: import("@angular/core/types/core.js").InputSignal<ImageFormat | undefined>;
20
+ readonly quality: import("@angular/core/types/core.js").InputSignalWithTransform<number | undefined, unknown>;
21
+ readonly fit: import("@angular/core/types/core.js").InputSignal<ImageFit | undefined>;
22
+ readonly modifiers: import("@angular/core/types/core.js").InputSignal<ImageModifiers | undefined>;
23
+ readonly provider: import("@angular/core/types/core.js").InputSignal<string | undefined>;
24
+ readonly preset: import("@angular/core/types/core.js").InputSignal<string | undefined>;
25
+ readonly loading: import("@angular/core/types/core.js").InputSignal<"eager" | "lazy" | undefined>;
26
+ readonly decoding: import("@angular/core/types/core.js").InputSignal<string | undefined>;
27
+ readonly fetchpriority: import("@angular/core/types/core.js").InputSignal<"auto" | "high" | "low" | undefined>;
28
+ readonly preload: import("@angular/core/types/core.js").InputSignalWithTransform<boolean, unknown>;
29
+ readonly placeholder: import("@angular/core/types/core.js").InputSignal<string | undefined>;
30
+ readonly placeholderClass: import("@angular/core/types/core.js").InputSignal<string | undefined>;
31
+ private readonly injector;
32
+ private readonly loaded;
33
+ private readonly events;
34
+ private readonly resolved;
35
+ protected readonly attrs: import("@angular/core/types/_chrome_dev_tools_performance-chunk.js").Signal<Record<string, string | null>>;
36
+ protected readonly painted: import("@angular/core/types/_chrome_dev_tools_performance-chunk.js").Signal<Record<string, string>>;
37
+ protected readonly paintedClass: import("@angular/core/types/_chrome_dev_tools_performance-chunk.js").Signal<string>;
38
+ constructor();
39
+ ngOnInit(): void;
40
+ }
@@ -0,0 +1,36 @@
1
+ import { type OnInit } from "@angular/core";
2
+ import type { ImageMeta } from "hamur";
3
+ import type { ImageFit, ImageFormat, ImageModifiers } from "../types.ts";
4
+ /**
5
+ * `<hamur-picture src="/hero.jpg" format="webp" width="1200" alt="" />`, one `<source>` per format and the
6
+ * `<img>` in the source's own format, or the `<img>` alone when the provider makes no other format.
7
+ */
8
+ export declare class Picture implements OnInit {
9
+ readonly src: import("@angular/core/types/core.js").InputSignal<string | ImageMeta>;
10
+ readonly alt: import("@angular/core/types/core.js").InputSignal<string | undefined>;
11
+ readonly width: import("@angular/core/types/core.js").InputSignal<string | number | undefined>;
12
+ readonly height: import("@angular/core/types/core.js").InputSignal<string | number | undefined>;
13
+ readonly sizes: import("@angular/core/types/core.js").InputSignal<string | undefined>;
14
+ readonly densities: import("@angular/core/types/core.js").InputSignal<number[] | undefined>;
15
+ readonly format: import("@angular/core/types/core.js").InputSignal<ImageFormat[] | ImageFormat | undefined>;
16
+ readonly legacyFormat: import("@angular/core/types/core.js").InputSignal<ImageFormat | undefined>;
17
+ readonly quality: import("@angular/core/types/core.js").InputSignalWithTransform<number | undefined, unknown>;
18
+ readonly fit: import("@angular/core/types/core.js").InputSignal<ImageFit | undefined>;
19
+ readonly modifiers: import("@angular/core/types/core.js").InputSignal<ImageModifiers | undefined>;
20
+ readonly provider: import("@angular/core/types/core.js").InputSignal<string | undefined>;
21
+ readonly preset: import("@angular/core/types/core.js").InputSignal<string | undefined>;
22
+ readonly loading: import("@angular/core/types/core.js").InputSignal<"eager" | "lazy" | undefined>;
23
+ readonly decoding: import("@angular/core/types/core.js").InputSignal<string | undefined>;
24
+ readonly fetchpriority: import("@angular/core/types/core.js").InputSignal<"auto" | "high" | "low" | undefined>;
25
+ readonly preload: import("@angular/core/types/core.js").InputSignalWithTransform<boolean, unknown>;
26
+ readonly placeholder: import("@angular/core/types/core.js").InputSignal<string | undefined>;
27
+ readonly placeholderClass: import("@angular/core/types/core.js").InputSignal<string | undefined>;
28
+ private readonly injector;
29
+ private readonly loaded;
30
+ private readonly element;
31
+ private readonly events;
32
+ protected readonly parts: import("@angular/core/types/_chrome_dev_tools_performance-chunk.js").Signal<import("../runtime/picture.ts").PictureParts>;
33
+ protected readonly shown: import("@angular/core/types/_chrome_dev_tools_performance-chunk.js").Signal<Record<string, string | null>>;
34
+ constructor();
35
+ ngOnInit(): void;
36
+ }
@@ -0,0 +1,3 @@
1
+ export { getImage, getSizes } from "../runtime/index.ts";
2
+ export { Img } from "./angular-img.ts";
3
+ export { Picture } from "./angular-picture.ts";
@@ -0,0 +1,10 @@
1
+ import { type ImgAttributes, type ImgOptions, type ImgState as State } from "../runtime/img.ts";
2
+ /** html has no component events: `isLoaded` is `false` and `imgAttrs` holds strings. */
3
+ export type ImgState = State<Record<string, string>>;
4
+ export type ImgProps = ImgOptions & {
5
+ fetchpriority?: "high" | "low" | "auto";
6
+ custom?: (state: ImgState) => string;
7
+ [attribute: string]: unknown;
8
+ };
9
+ export declare const escape: (value: unknown) => string;
10
+ export declare function createImg(attributes: ImgAttributes): (props: ImgProps) => string;
@@ -0,0 +1,6 @@
1
+ import { type PictureAttributes, type PictureOptions } from "../runtime/picture.ts";
2
+ export type PictureProps = PictureOptions & {
3
+ fetchpriority?: "high" | "low" | "auto";
4
+ [attribute: string]: unknown;
5
+ };
6
+ export declare function createPicture(attributes: PictureAttributes): (props: PictureProps) => string;
@@ -0,0 +1,6 @@
1
+ import { getImage, getSizes } from "../runtime/index.ts";
2
+ export type { ImgProps, ImgState } from "./html-img.ts";
3
+ export type { PictureProps } from "./html-picture.ts";
4
+ export { getImage, getSizes };
5
+ export declare const Img: (props: import("./html-img.ts").ImgProps) => string;
6
+ export declare const Picture: (props: import("./html-picture.ts").PictureProps) => string;
@@ -0,0 +1,8 @@
1
+ import { type ComponentChildren, type JSX } from "preact";
2
+ import { type ImgAttributes, type ImgOptions, type ImgState as State } from "../runtime/img.ts";
3
+ export type ImgState = State;
4
+ export type ImgProps = ImgOptions & {
5
+ fetchpriority?: "high" | "low" | "auto";
6
+ children?: ComponentChildren | ((state: ImgState) => ComponentChildren);
7
+ } & Omit<JSX.IntrinsicElements["img"], keyof ImgOptions | "srcset" | "srcSet" | "fetchpriority" | "fetchPriority" | "children">;
8
+ export declare function createImg(attributes: ImgAttributes): (props: ImgProps) => ComponentChildren;
@@ -0,0 +1,6 @@
1
+ import { type JSX, type VNode } from "preact";
2
+ import { type PictureAttributes, type PictureOptions } from "../runtime/picture.ts";
3
+ export type PictureProps = PictureOptions & {
4
+ fetchpriority?: "high" | "low" | "auto";
5
+ } & Omit<JSX.IntrinsicElements["img"], keyof PictureOptions | "srcset" | "srcSet" | "fetchpriority" | "fetchPriority">;
6
+ export declare function createPicture(attributes: PictureAttributes): (props: PictureProps) => VNode;
@@ -0,0 +1,6 @@
1
+ import { getImage, getSizes } from "../runtime/index.ts";
2
+ export type { ImgProps, ImgState } from "./preact-img.ts";
3
+ export type { PictureProps } from "./preact-picture.ts";
4
+ export { getImage, getSizes };
5
+ export declare const Img: (props: import("./preact-img.ts").ImgProps) => import("preact").ComponentChildren;
6
+ export declare const Picture: (props: import("./preact-picture.ts").PictureProps) => import("preact").VNode;
@@ -0,0 +1,8 @@
1
+ import { type ImgHTMLAttributes, type ReactNode } from "react";
2
+ import { type ImgAttributes, type ImgOptions, type ImgState as State } from "../runtime/img.ts";
3
+ export type ImgState = State;
4
+ export type ImgProps = ImgOptions & {
5
+ fetchPriority?: "high" | "low" | "auto";
6
+ children?: (state: ImgState) => ReactNode;
7
+ } & Omit<ImgHTMLAttributes<HTMLImageElement>, keyof ImgOptions | "srcSet" | "fetchPriority" | "children">;
8
+ export declare function createImg(attributes: ImgAttributes): (props: ImgProps) => ReactNode;
@@ -0,0 +1,6 @@
1
+ import { type ImgHTMLAttributes, type ReactElement } from "react";
2
+ import { type PictureAttributes, type PictureOptions } from "../runtime/picture.ts";
3
+ export type PictureProps = PictureOptions & {
4
+ fetchPriority?: "high" | "low" | "auto";
5
+ } & Omit<ImgHTMLAttributes<HTMLImageElement>, keyof PictureOptions | "srcSet" | "fetchPriority">;
6
+ export declare function createPicture(attributes: PictureAttributes): (props: PictureProps) => ReactElement;
@@ -0,0 +1,6 @@
1
+ import { getImage, getSizes } from "../runtime/index.ts";
2
+ export type { ImgProps, ImgState } from "./react-img.ts";
3
+ export type { PictureProps } from "./react-picture.ts";
4
+ export { getImage, getSizes };
5
+ export declare const Img: (props: import("./react-img.ts").ImgProps) => import("react").ReactNode;
6
+ export declare const Picture: (props: import("./react-picture.ts").PictureProps) => import("react").ReactElement;
@@ -0,0 +1,8 @@
1
+ import { type JSX } from "@solidjs/web";
2
+ import { type ImgAttributes, type ImgOptions, type ImgState as State } from "../runtime/img.ts";
3
+ export type ImgState = State;
4
+ export type ImgProps = ImgOptions & {
5
+ fetchpriority?: "high" | "low" | "auto";
6
+ children?: ((state: ImgState) => JSX.Element) | JSX.Element;
7
+ } & Omit<JSX.ImgHTMLAttributes<HTMLImageElement>, keyof ImgOptions | "srcset" | "fetchpriority" | "children">;
8
+ export declare function createImg(attributes: ImgAttributes): (props: ImgProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { type JSX } from "@solidjs/web";
2
+ import { type PictureAttributes, type PictureOptions } from "../runtime/picture.ts";
3
+ export type PictureProps = PictureOptions & {
4
+ fetchpriority?: "high" | "low" | "auto";
5
+ } & Omit<JSX.ImgHTMLAttributes<HTMLImageElement>, keyof PictureOptions | "srcset" | "fetchpriority">;
6
+ export declare function createPicture(attributes: PictureAttributes): (props: PictureProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { getImage, getSizes } from "../runtime/index.ts";
2
+ export type { ImgProps, ImgState } from "./solid-img.ts";
3
+ export type { PictureProps } from "./solid-picture.ts";
4
+ export { getImage, getSizes };
5
+ export declare const Img: (props: import("./solid-img.ts").ImgProps) => import("@solidjs/web").JSX.Element;
6
+ export declare const Picture: (props: import("./solid-picture.ts").PictureProps) => import("@solidjs/web").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { getImage, getSizes } from "../runtime/index.ts";
2
+ export { default as Img } from "./Img.svelte";
3
+ export { default as Picture } from "./Picture.svelte";
@@ -0,0 +1,119 @@
1
+ import { type PropType, type VNodeChild } from "vue";
2
+ import type { ImageMeta } from "hamur";
3
+ import type { ImageFit, ImageFormat, ImageModifiers, HamurImagePreset, HamurImageProvider } from "../types.ts";
4
+ import { type ImgAttributes, type ImgState } from "../runtime/img.ts";
5
+ export declare function createImg(attributes: ImgAttributes): import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
+ src: {
7
+ type: PropType<string | ImageMeta>;
8
+ required: true;
9
+ };
10
+ alt: {
11
+ type: StringConstructor;
12
+ };
13
+ width: {
14
+ type: PropType<number | `${number}`>;
15
+ };
16
+ height: {
17
+ type: PropType<number | `${number}`>;
18
+ };
19
+ sizes: {
20
+ type: StringConstructor;
21
+ };
22
+ densities: {
23
+ type: PropType<number[]>;
24
+ };
25
+ format: {
26
+ type: PropType<ImageFormat>;
27
+ };
28
+ quality: {
29
+ type: NumberConstructor;
30
+ };
31
+ fit: {
32
+ type: PropType<ImageFit>;
33
+ };
34
+ modifiers: {
35
+ type: PropType<ImageModifiers>;
36
+ };
37
+ provider: {
38
+ type: PropType<HamurImageProvider>;
39
+ };
40
+ preset: {
41
+ type: PropType<HamurImagePreset>;
42
+ };
43
+ loading: {
44
+ type: PropType<"lazy" | "eager">;
45
+ };
46
+ fetchpriority: {
47
+ type: PropType<"high" | "low" | "auto">;
48
+ };
49
+ placeholder: {
50
+ type: StringConstructor;
51
+ };
52
+ placeholderClass: {
53
+ type: StringConstructor;
54
+ };
55
+ preload: {
56
+ type: BooleanConstructor;
57
+ };
58
+ custom: {
59
+ type: PropType<(state: ImgState) => VNodeChild>;
60
+ };
61
+ }>, () => VNodeChild, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
62
+ src: {
63
+ type: PropType<string | ImageMeta>;
64
+ required: true;
65
+ };
66
+ alt: {
67
+ type: StringConstructor;
68
+ };
69
+ width: {
70
+ type: PropType<number | `${number}`>;
71
+ };
72
+ height: {
73
+ type: PropType<number | `${number}`>;
74
+ };
75
+ sizes: {
76
+ type: StringConstructor;
77
+ };
78
+ densities: {
79
+ type: PropType<number[]>;
80
+ };
81
+ format: {
82
+ type: PropType<ImageFormat>;
83
+ };
84
+ quality: {
85
+ type: NumberConstructor;
86
+ };
87
+ fit: {
88
+ type: PropType<ImageFit>;
89
+ };
90
+ modifiers: {
91
+ type: PropType<ImageModifiers>;
92
+ };
93
+ provider: {
94
+ type: PropType<HamurImageProvider>;
95
+ };
96
+ preset: {
97
+ type: PropType<HamurImagePreset>;
98
+ };
99
+ loading: {
100
+ type: PropType<"lazy" | "eager">;
101
+ };
102
+ fetchpriority: {
103
+ type: PropType<"high" | "low" | "auto">;
104
+ };
105
+ placeholder: {
106
+ type: StringConstructor;
107
+ };
108
+ placeholderClass: {
109
+ type: StringConstructor;
110
+ };
111
+ preload: {
112
+ type: BooleanConstructor;
113
+ };
114
+ custom: {
115
+ type: PropType<(state: ImgState) => VNodeChild>;
116
+ };
117
+ }>> & Readonly<{}>, {
118
+ preload: boolean;
119
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,121 @@
1
+ import { type PropType } from "vue";
2
+ import type { ImageMeta } from "hamur";
3
+ import type { ImageFit, ImageFormat, ImageModifiers, HamurImagePreset, HamurImageProvider } from "../types.ts";
4
+ import { type PictureAttributes } from "../runtime/picture.ts";
5
+ export declare function createPicture(attributes: PictureAttributes): import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
+ src: {
7
+ type: PropType<string | ImageMeta>;
8
+ required: true;
9
+ };
10
+ alt: {
11
+ type: StringConstructor;
12
+ };
13
+ width: {
14
+ type: PropType<number | `${number}`>;
15
+ };
16
+ height: {
17
+ type: PropType<number | `${number}`>;
18
+ };
19
+ sizes: {
20
+ type: StringConstructor;
21
+ };
22
+ densities: {
23
+ type: PropType<number[]>;
24
+ };
25
+ format: {
26
+ type: PropType<ImageFormat | ImageFormat[]>;
27
+ };
28
+ legacyFormat: {
29
+ type: PropType<ImageFormat>;
30
+ };
31
+ quality: {
32
+ type: NumberConstructor;
33
+ };
34
+ fit: {
35
+ type: PropType<ImageFit>;
36
+ };
37
+ modifiers: {
38
+ type: PropType<ImageModifiers>;
39
+ };
40
+ provider: {
41
+ type: PropType<HamurImageProvider>;
42
+ };
43
+ preset: {
44
+ type: PropType<HamurImagePreset>;
45
+ };
46
+ loading: {
47
+ type: PropType<"lazy" | "eager">;
48
+ };
49
+ fetchpriority: {
50
+ type: PropType<"high" | "low" | "auto">;
51
+ };
52
+ preload: {
53
+ type: BooleanConstructor;
54
+ };
55
+ placeholder: {
56
+ type: StringConstructor;
57
+ };
58
+ placeholderClass: {
59
+ type: StringConstructor;
60
+ };
61
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
62
+ [key: string]: any;
63
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
64
+ src: {
65
+ type: PropType<string | ImageMeta>;
66
+ required: true;
67
+ };
68
+ alt: {
69
+ type: StringConstructor;
70
+ };
71
+ width: {
72
+ type: PropType<number | `${number}`>;
73
+ };
74
+ height: {
75
+ type: PropType<number | `${number}`>;
76
+ };
77
+ sizes: {
78
+ type: StringConstructor;
79
+ };
80
+ densities: {
81
+ type: PropType<number[]>;
82
+ };
83
+ format: {
84
+ type: PropType<ImageFormat | ImageFormat[]>;
85
+ };
86
+ legacyFormat: {
87
+ type: PropType<ImageFormat>;
88
+ };
89
+ quality: {
90
+ type: NumberConstructor;
91
+ };
92
+ fit: {
93
+ type: PropType<ImageFit>;
94
+ };
95
+ modifiers: {
96
+ type: PropType<ImageModifiers>;
97
+ };
98
+ provider: {
99
+ type: PropType<HamurImageProvider>;
100
+ };
101
+ preset: {
102
+ type: PropType<HamurImagePreset>;
103
+ };
104
+ loading: {
105
+ type: PropType<"lazy" | "eager">;
106
+ };
107
+ fetchpriority: {
108
+ type: PropType<"high" | "low" | "auto">;
109
+ };
110
+ preload: {
111
+ type: BooleanConstructor;
112
+ };
113
+ placeholder: {
114
+ type: StringConstructor;
115
+ };
116
+ placeholderClass: {
117
+ type: StringConstructor;
118
+ };
119
+ }>> & Readonly<{}>, {
120
+ preload: boolean;
121
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;