@plasmicapp/react-web 0.2.201 → 0.2.202

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 (148) hide show
  1. package/dist/all.d.ts +1926 -1925
  2. package/dist/auth/PlasmicPageGuard.d.ts +11 -11
  3. package/dist/common.d.ts +10 -10
  4. package/dist/data-sources/index.d.ts +1 -1
  5. package/dist/host/index.d.ts +1 -1
  6. package/dist/index-common.d.ts +18 -18
  7. package/dist/index-skinny.d.ts +1 -1
  8. package/dist/index.cjs.js +3495 -3495
  9. package/dist/index.cjs.js.map +1 -1
  10. package/dist/index.d.ts +11 -11
  11. package/dist/plume/button/index.d.ts +36 -36
  12. package/dist/plume/checkbox/index.d.ts +47 -47
  13. package/dist/plume/collection-utils.d.ts +191 -191
  14. package/dist/plume/collection-utils.spec.d.ts +1 -1
  15. package/dist/plume/menu/context.d.ts +8 -8
  16. package/dist/plume/menu/index.d.ts +3 -3
  17. package/dist/plume/menu/menu-group.d.ts +23 -23
  18. package/dist/plume/menu/menu-item.d.ts +23 -23
  19. package/dist/plume/menu/menu.d.ts +39 -39
  20. package/dist/plume/menu-button/DropdownMenu.d.ts +34 -34
  21. package/dist/plume/menu-button/index.d.ts +2 -2
  22. package/dist/plume/menu-button/menu-button.d.ts +72 -72
  23. package/dist/plume/menu-button/menu-trigger.d.ts +21 -21
  24. package/dist/plume/plume-utils.d.ts +41 -41
  25. package/dist/plume/props-utils.d.ts +15 -15
  26. package/dist/plume/select/context.d.ts +3 -3
  27. package/dist/plume/select/index.d.ts +4 -4
  28. package/dist/plume/select/select-option-group.d.ts +23 -23
  29. package/dist/plume/select/select-option.d.ts +23 -23
  30. package/dist/plume/select/select.d.ts +111 -111
  31. package/dist/plume/switch/index.d.ts +39 -39
  32. package/dist/plume/text-input/index.d.ts +36 -36
  33. package/dist/plume/triggered-overlay/context.d.ts +14 -14
  34. package/dist/plume/triggered-overlay/index.d.ts +2 -2
  35. package/dist/plume/triggered-overlay/triggered-overlay.d.ts +24 -24
  36. package/dist/query/index.d.ts +1 -1
  37. package/dist/react-utils.d.ts +21 -21
  38. package/dist/react-utils.spec.d.ts +1 -1
  39. package/dist/react-web.esm.js +3496 -3496
  40. package/dist/react-web.esm.js.map +1 -1
  41. package/dist/render/PlasmicHead/index.d.ts +37 -37
  42. package/dist/render/PlasmicIcon.d.ts +4 -4
  43. package/dist/render/PlasmicImg/index.d.ts +81 -81
  44. package/dist/render/PlasmicLink.d.ts +2 -2
  45. package/dist/render/PlasmicSlot.d.ts +11 -11
  46. package/dist/render/Stack.d.ts +51 -51
  47. package/dist/render/elements.d.ts +74 -74
  48. package/dist/render/global-variants.d.ts +1 -1
  49. package/dist/render/screen-variants.d.ts +5 -5
  50. package/dist/render/ssr.d.ts +21 -21
  51. package/dist/render/translation.d.ts +19 -19
  52. package/dist/render/triggers.d.ts +39 -39
  53. package/dist/states/errors.d.ts +13 -13
  54. package/dist/states/graph.d.ts +25 -25
  55. package/dist/states/helpers.d.ts +43 -43
  56. package/dist/states/index.d.ts +4 -4
  57. package/dist/states/types.d.ts +66 -66
  58. package/dist/states/valtio.d.ts +10 -10
  59. package/dist/states/vanilla.d.ts +3 -3
  60. package/dist/stories/PlasmicImg.stories.d.ts +6 -6
  61. package/dist/stories/UseDollarState.stories.d.ts +78 -78
  62. package/lib/data-sources/index.d.ts +1 -1
  63. package/lib/host/index.d.ts +1 -1
  64. package/lib/query/index.d.ts +1 -1
  65. package/package.json +8 -9
  66. package/skinny/dist/auth/PlasmicPageGuard.d.ts +11 -11
  67. package/skinny/dist/{collection-utils-0967eaf0.js → collection-utils-2f28e4eb.js} +297 -297
  68. package/skinny/dist/{collection-utils-0967eaf0.js.map → collection-utils-2f28e4eb.js.map} +1 -1
  69. package/skinny/dist/{common-9d6d348d.js → common-ed411407.js} +130 -130
  70. package/skinny/dist/{common-9d6d348d.js.map → common-ed411407.js.map} +1 -1
  71. package/skinny/dist/common.d.ts +10 -10
  72. package/skinny/dist/data-sources/index.d.ts +1 -1
  73. package/skinny/dist/host/index.d.ts +1 -1
  74. package/skinny/dist/index-common.d.ts +18 -18
  75. package/skinny/dist/index-skinny.d.ts +1 -1
  76. package/skinny/dist/index.d.ts +11 -11
  77. package/skinny/dist/index.js +1559 -1559
  78. package/skinny/dist/index.js.map +1 -1
  79. package/skinny/dist/plume/button/index.d.ts +36 -36
  80. package/skinny/dist/plume/button/index.js +21 -21
  81. package/skinny/dist/plume/checkbox/index.d.ts +47 -47
  82. package/skinny/dist/plume/checkbox/index.js +64 -64
  83. package/skinny/dist/plume/collection-utils.d.ts +191 -191
  84. package/skinny/dist/plume/collection-utils.spec.d.ts +1 -1
  85. package/skinny/dist/plume/menu/context.d.ts +8 -8
  86. package/skinny/dist/plume/menu/index.d.ts +3 -3
  87. package/skinny/dist/plume/menu/index.js +165 -165
  88. package/skinny/dist/plume/menu/menu-group.d.ts +23 -23
  89. package/skinny/dist/plume/menu/menu-item.d.ts +23 -23
  90. package/skinny/dist/plume/menu/menu.d.ts +39 -39
  91. package/skinny/dist/plume/menu-button/DropdownMenu.d.ts +34 -34
  92. package/skinny/dist/plume/menu-button/index.d.ts +2 -2
  93. package/skinny/dist/plume/menu-button/index.js +125 -125
  94. package/skinny/dist/plume/menu-button/index.js.map +1 -1
  95. package/skinny/dist/plume/menu-button/menu-button.d.ts +72 -72
  96. package/skinny/dist/plume/menu-button/menu-trigger.d.ts +21 -21
  97. package/skinny/dist/plume/plume-utils.d.ts +41 -41
  98. package/skinny/dist/plume/props-utils.d.ts +15 -15
  99. package/skinny/dist/plume/select/context.d.ts +3 -3
  100. package/skinny/dist/plume/select/index.d.ts +4 -4
  101. package/skinny/dist/plume/select/index.js +250 -250
  102. package/skinny/dist/plume/select/index.js.map +1 -1
  103. package/skinny/dist/plume/select/select-option-group.d.ts +23 -23
  104. package/skinny/dist/plume/select/select-option.d.ts +23 -23
  105. package/skinny/dist/plume/select/select.d.ts +111 -111
  106. package/skinny/dist/plume/switch/index.d.ts +39 -39
  107. package/skinny/dist/plume/switch/index.js +61 -61
  108. package/skinny/dist/plume/text-input/index.d.ts +36 -36
  109. package/skinny/dist/plume/text-input/index.js +45 -45
  110. package/skinny/dist/plume/triggered-overlay/context.d.ts +14 -14
  111. package/skinny/dist/plume/triggered-overlay/index.d.ts +2 -2
  112. package/skinny/dist/plume/triggered-overlay/index.js +100 -100
  113. package/skinny/dist/plume/triggered-overlay/index.js.map +1 -1
  114. package/skinny/dist/plume/triggered-overlay/triggered-overlay.d.ts +24 -24
  115. package/skinny/dist/{plume-utils-7d68bcc0.js → plume-utils-e699cd08.js} +30 -30
  116. package/skinny/dist/{plume-utils-7d68bcc0.js.map → plume-utils-e699cd08.js.map} +1 -1
  117. package/skinny/dist/{props-utils-9f9c761a.js → props-utils-9d74371f.js} +4 -4
  118. package/skinny/dist/{props-utils-9f9c761a.js.map → props-utils-9d74371f.js.map} +1 -1
  119. package/skinny/dist/query/index.d.ts +1 -1
  120. package/skinny/dist/{react-utils-ee4e03ba.js → react-utils-5ff031c2.js} +195 -195
  121. package/skinny/dist/{react-utils-ee4e03ba.js.map → react-utils-5ff031c2.js.map} +1 -1
  122. package/skinny/dist/react-utils.d.ts +21 -21
  123. package/skinny/dist/react-utils.spec.d.ts +1 -1
  124. package/skinny/dist/render/PlasmicHead/index.d.ts +37 -37
  125. package/skinny/dist/render/PlasmicHead/index.js +54 -54
  126. package/skinny/dist/render/PlasmicIcon.d.ts +4 -4
  127. package/skinny/dist/render/PlasmicImg/index.d.ts +81 -81
  128. package/skinny/dist/render/PlasmicImg/index.js +297 -297
  129. package/skinny/dist/render/PlasmicLink.d.ts +2 -2
  130. package/skinny/dist/render/PlasmicSlot.d.ts +11 -11
  131. package/skinny/dist/render/Stack.d.ts +51 -51
  132. package/skinny/dist/render/elements.d.ts +74 -74
  133. package/skinny/dist/render/global-variants.d.ts +1 -1
  134. package/skinny/dist/render/screen-variants.d.ts +5 -5
  135. package/skinny/dist/render/ssr.d.ts +21 -21
  136. package/skinny/dist/render/translation.d.ts +19 -19
  137. package/skinny/dist/render/triggers.d.ts +39 -39
  138. package/skinny/dist/{ssr-c9834f50.js → ssr-8625df04.js} +107 -107
  139. package/skinny/dist/{ssr-c9834f50.js.map → ssr-8625df04.js.map} +1 -1
  140. package/skinny/dist/states/errors.d.ts +13 -13
  141. package/skinny/dist/states/graph.d.ts +25 -25
  142. package/skinny/dist/states/helpers.d.ts +43 -43
  143. package/skinny/dist/states/index.d.ts +4 -4
  144. package/skinny/dist/states/types.d.ts +66 -66
  145. package/skinny/dist/states/valtio.d.ts +10 -10
  146. package/skinny/dist/states/vanilla.d.ts +3 -3
  147. package/skinny/dist/stories/PlasmicImg.stories.d.ts +6 -6
  148. package/skinny/dist/stories/UseDollarState.stories.d.ts +78 -78
@@ -1,21 +1,21 @@
1
- import React from "react";
2
- export declare const isBrowser: boolean;
3
- export declare const NONE: unique symbol;
4
- export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;
5
- export declare function createElementWithChildren(elementType: any, props: any, children: React.ReactNode): React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.CElement<any, React.Component<any, any, any>>;
6
- export declare function ensureNotArray(children: React.ReactNode): any;
7
- /**
8
- * Flattens ReactNode into an array of ReactChild, but does NOT replace
9
- * missing keys with array index, as React.Children.toArray() does.
10
- */
11
- export declare function toChildArray(children: React.ReactNode): React.ReactChild[];
12
- export declare function isReactText(child: React.ReactNode): child is React.ReactText;
13
- export declare function isReactChild(child: React.ReactNode): child is React.ReactChild;
14
- export declare function isReactFragment(child: React.ReactNode): child is React.ReactElement;
15
- export declare function isReactNode(x: any): boolean;
16
- export type StrictProps<T, TExpected> = Exclude<keyof T, keyof TExpected> extends never ? {} : Partial<"Unexpected extraneous props">;
17
- export type HTMLElementRefOf<T extends keyof JSX.IntrinsicElements> = Exclude<React.ComponentProps<T>["ref"], string>;
18
- export declare function mergeProps(props: Record<string, any>, ...restProps: Record<string, any>[]): Record<string, any>;
19
- export declare function mergeRefs<T>(...refs: (React.Ref<T> | undefined)[]): (value: T) => void;
20
- export declare function mergePropVals(name: string, val1: any, val2: any): any;
21
- export declare function getElementTypeName(element: React.ReactElement): any;
1
+ import React from "react";
2
+ export declare const isBrowser: boolean;
3
+ export declare const NONE: unique symbol;
4
+ export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;
5
+ export declare function createElementWithChildren(elementType: any, props: any, children: React.ReactNode): React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.CElement<any, React.Component<any, any, any>>;
6
+ export declare function ensureNotArray(children: React.ReactNode): any;
7
+ /**
8
+ * Flattens ReactNode into an array of ReactChild, but does NOT replace
9
+ * missing keys with array index, as React.Children.toArray() does.
10
+ */
11
+ export declare function toChildArray(children: React.ReactNode): React.ReactChild[];
12
+ export declare function isReactText(child: React.ReactNode): child is React.ReactText;
13
+ export declare function isReactChild(child: React.ReactNode): child is React.ReactChild;
14
+ export declare function isReactFragment(child: React.ReactNode): child is React.ReactElement;
15
+ export declare function isReactNode(x: any): boolean;
16
+ export type StrictProps<T, TExpected> = Exclude<keyof T, keyof TExpected> extends never ? {} : Partial<"Unexpected extraneous props">;
17
+ export type HTMLElementRefOf<T extends keyof JSX.IntrinsicElements> = Exclude<React.ComponentProps<T>["ref"], string>;
18
+ export declare function mergeProps(props: Record<string, any>, ...restProps: Record<string, any>[]): Record<string, any>;
19
+ export declare function mergeRefs<T>(...refs: (React.Ref<T> | undefined)[]): (value: T) => void;
20
+ export declare function mergePropVals(name: string, val1: any, val2: any): any;
21
+ export declare function getElementTypeName(element: React.ReactElement): any;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,37 +1,37 @@
1
- import * as React from "react";
2
- export declare const PlasmicHeadContext: React.Context<React.ComponentType<any> | undefined>;
3
- type PlasmicHeadProps = {
4
- title?: string;
5
- description?: string;
6
- image?: string;
7
- canonical?: string;
8
- };
9
- export declare function PlasmicHead(props: PlasmicHeadProps): JSX.Element | null;
10
- export declare const plasmicHeadMeta: {
11
- name: string;
12
- displayName: string;
13
- description: string;
14
- importName: string;
15
- importPath: string;
16
- isRepeatable: boolean;
17
- styleSections: boolean;
18
- props: {
19
- title: {
20
- type: string;
21
- displayName: string;
22
- };
23
- description: {
24
- type: string;
25
- displayName: string;
26
- };
27
- image: {
28
- type: string;
29
- displayName: string;
30
- };
31
- canonical: {
32
- type: string;
33
- displayName: string;
34
- };
35
- };
36
- };
37
- export {};
1
+ import * as React from "react";
2
+ export declare const PlasmicHeadContext: React.Context<React.ComponentType<any> | undefined>;
3
+ type PlasmicHeadProps = {
4
+ title?: string;
5
+ description?: string;
6
+ image?: string;
7
+ canonical?: string;
8
+ };
9
+ export declare function PlasmicHead(props: PlasmicHeadProps): JSX.Element | null;
10
+ export declare const plasmicHeadMeta: {
11
+ name: string;
12
+ displayName: string;
13
+ description: string;
14
+ importName: string;
15
+ importPath: string;
16
+ isRepeatable: boolean;
17
+ styleSections: boolean;
18
+ props: {
19
+ title: {
20
+ type: string;
21
+ displayName: string;
22
+ };
23
+ description: {
24
+ type: string;
25
+ displayName: string;
26
+ };
27
+ image: {
28
+ type: string;
29
+ displayName: string;
30
+ };
31
+ canonical: {
32
+ type: string;
33
+ displayName: string;
34
+ };
35
+ };
36
+ };
37
+ export {};
@@ -1,59 +1,59 @@
1
1
  import * as React from 'react';
2
2
 
3
- var PlasmicHeadContext = React.createContext(undefined);
4
- function PlasmicHead(props) {
5
- var Head = React.useContext(PlasmicHeadContext);
6
- if (!Head) {
7
- console.warn("Plasmic: Head meta tags are being ignored. To make them work, pass a Head component into PlasmicRootProvider.");
8
- // TODO: Link to doc about Head.
9
- return null;
10
- }
11
- // Helmet does not support React.Fragments, so we need to use `[<meta />,
12
- // <meta />]` instead of `<><meta /><meta /></>`.
13
- return (React.createElement(Head, null,
14
- props.image ? ([
15
- React.createElement("meta", { key: "twitter:card", name: "twitter:card", content: "summary_large_image" }),
16
- React.createElement("meta", { key: "og:image", property: "og:image", content: props.image }),
17
- React.createElement("meta", { key: "twitter:image", name: "twitter:image", content: props.image }),
18
- ]) : (React.createElement("meta", { key: "twitter:card", name: "twitter:card", content: "summary" })),
19
- props.title && [
20
- React.createElement("title", { key: "title" }, props.title),
21
- React.createElement("meta", { key: "og:title", property: "og:title", content: props.title }),
22
- React.createElement("meta", { key: "twitter:title", property: "twitter:title", content: props.title }),
23
- ],
24
- props.description && [
25
- React.createElement("meta", { key: "description", name: "description", content: props.description }),
26
- React.createElement("meta", { key: "og:description", property: "og:description", content: props.description }),
27
- React.createElement("meta", { key: "twitter:description", name: "twitter:description", content: props.description }),
28
- ],
29
- props.canonical && (React.createElement("link", { key: "canonical", ref: "canonical", href: props.canonical }))));
30
- }
31
- var plasmicHeadMeta = {
32
- name: "hostless-plasmic-head",
33
- displayName: "Head",
34
- description: "Used to add page metadata to HTML <head />.",
35
- importName: "PlasmicHead",
36
- importPath: "@plasmicapp/react-web",
37
- isRepeatable: false,
38
- styleSections: false,
39
- props: {
40
- title: {
41
- type: "string",
42
- displayName: "Title"
43
- },
44
- description: {
45
- type: "string",
46
- displayName: "Description"
47
- },
48
- image: {
49
- type: "imageUrl",
50
- displayName: "Image"
51
- },
52
- canonical: {
53
- type: "string",
54
- displayName: "Canonical URL"
55
- }
56
- }
3
+ var PlasmicHeadContext = React.createContext(undefined);
4
+ function PlasmicHead(props) {
5
+ var Head = React.useContext(PlasmicHeadContext);
6
+ if (!Head) {
7
+ console.warn("Plasmic: Head meta tags are being ignored. To make them work, pass a Head component into PlasmicRootProvider.");
8
+ // TODO: Link to doc about Head.
9
+ return null;
10
+ }
11
+ // Helmet does not support React.Fragments, so we need to use `[<meta />,
12
+ // <meta />]` instead of `<><meta /><meta /></>`.
13
+ return (React.createElement(Head, null,
14
+ props.image ? ([
15
+ React.createElement("meta", { key: "twitter:card", name: "twitter:card", content: "summary_large_image" }),
16
+ React.createElement("meta", { key: "og:image", property: "og:image", content: props.image }),
17
+ React.createElement("meta", { key: "twitter:image", name: "twitter:image", content: props.image }),
18
+ ]) : (React.createElement("meta", { key: "twitter:card", name: "twitter:card", content: "summary" })),
19
+ props.title && [
20
+ React.createElement("title", { key: "title" }, props.title),
21
+ React.createElement("meta", { key: "og:title", property: "og:title", content: props.title }),
22
+ React.createElement("meta", { key: "twitter:title", property: "twitter:title", content: props.title }),
23
+ ],
24
+ props.description && [
25
+ React.createElement("meta", { key: "description", name: "description", content: props.description }),
26
+ React.createElement("meta", { key: "og:description", property: "og:description", content: props.description }),
27
+ React.createElement("meta", { key: "twitter:description", name: "twitter:description", content: props.description }),
28
+ ],
29
+ props.canonical && (React.createElement("link", { key: "canonical", ref: "canonical", href: props.canonical }))));
30
+ }
31
+ var plasmicHeadMeta = {
32
+ name: "hostless-plasmic-head",
33
+ displayName: "Head",
34
+ description: "Used to add page metadata to HTML <head />.",
35
+ importName: "PlasmicHead",
36
+ importPath: "@plasmicapp/react-web",
37
+ isRepeatable: false,
38
+ styleSections: false,
39
+ props: {
40
+ title: {
41
+ type: "string",
42
+ displayName: "Title",
43
+ },
44
+ description: {
45
+ type: "string",
46
+ displayName: "Description",
47
+ },
48
+ image: {
49
+ type: "imageUrl",
50
+ displayName: "Image",
51
+ },
52
+ canonical: {
53
+ type: "string",
54
+ displayName: "Canonical URL",
55
+ },
56
+ },
57
57
  };
58
58
 
59
59
  export { PlasmicHead, PlasmicHeadContext, plasmicHeadMeta };
@@ -1,4 +1,4 @@
1
- import * as React from "react";
2
- export declare function PlasmicIcon(props: React.ComponentProps<"svg"> & {
3
- PlasmicIconType: React.ComponentType;
4
- }): JSX.Element;
1
+ import * as React from "react";
2
+ export declare function PlasmicIcon(props: React.ComponentProps<"svg"> & {
3
+ PlasmicIconType: React.ComponentType;
4
+ }): JSX.Element;
@@ -1,81 +1,81 @@
1
- /**
2
- * Responsive `<img/>` replacement, based on `next/image`
3
- */
4
- import React from "react";
5
- export interface ImageLoader {
6
- supportsUrl: (url: string) => boolean;
7
- transformUrl: (opts: {
8
- src: string;
9
- width?: number;
10
- quality?: number;
11
- format?: "webp";
12
- }) => string;
13
- }
14
- type ImgTagProps = Omit<React.ComponentProps<"img">, "src" | "srcSet" | "ref" | "style">;
15
- export interface PlasmicImgProps extends ImgTagProps {
16
- /**
17
- * Either an object with the src string, and its full width and height,
18
- * or just a src string with unknown intrinsic dimensions.
19
- */
20
- src?: string | {
21
- src: string | {
22
- src: string;
23
- height: number;
24
- width: number;
25
- blurDataURL?: string;
26
- };
27
- fullHeight: number;
28
- fullWidth: number;
29
- aspectRatio?: number;
30
- };
31
- /**
32
- * className applied to the wrapper element if one is used.
33
- */
34
- className?: string;
35
- /**
36
- * css width
37
- */
38
- displayWidth?: number | string;
39
- /**
40
- * css height
41
- */
42
- displayHeight?: number | string;
43
- /**
44
- * css min-width
45
- */
46
- displayMinWidth?: number | string;
47
- /**
48
- * css min-height
49
- */
50
- displayMinHeight?: number | string;
51
- /**
52
- * css max-width
53
- */
54
- displayMaxWidth?: number | string;
55
- /**
56
- * css max-height
57
- */
58
- displayMaxHeight?: number | string;
59
- /**
60
- * For variable quality formats like jpg, the quality from 0 to 100
61
- */
62
- quality?: number;
63
- /**
64
- * ImageLoader to use for loading different dimensions of the image.
65
- * If none specified, will not attempt to load different dimensions.
66
- */
67
- loader?: "plasmic" | ImageLoader;
68
- /**
69
- * Style applied to the wrapper element. objectFit and objectPosition
70
- * rules are applied to the img element.
71
- */
72
- style?: React.CSSProperties;
73
- /**
74
- * Ref for the img element. The normal <PlasmicImg ref={...} />
75
- * prop gives the root element instead, which may be the img element
76
- * or a wrapper element
77
- */
78
- imgRef?: React.Ref<HTMLImageElement>;
79
- }
80
- export declare const PlasmicImg: React.ForwardRefExoticComponent<PlasmicImgProps & React.RefAttributes<HTMLElement>>;
81
- export {};
1
+ /**
2
+ * Responsive `<img/>` replacement, based on `next/image`
3
+ */
4
+ import React from "react";
5
+ export interface ImageLoader {
6
+ supportsUrl: (url: string) => boolean;
7
+ transformUrl: (opts: {
8
+ src: string;
9
+ width?: number;
10
+ quality?: number;
11
+ format?: "webp";
12
+ }) => string;
13
+ }
14
+ type ImgTagProps = Omit<React.ComponentProps<"img">, "src" | "srcSet" | "ref" | "style">;
15
+ export interface PlasmicImgProps extends ImgTagProps {
16
+ /**
17
+ * Either an object with the src string, and its full width and height,
18
+ * or just a src string with unknown intrinsic dimensions.
19
+ */
20
+ src?: string | {
21
+ src: string | {
22
+ src: string;
23
+ height: number;
24
+ width: number;
25
+ blurDataURL?: string;
26
+ };
27
+ fullHeight: number;
28
+ fullWidth: number;
29
+ aspectRatio?: number;
30
+ };
31
+ /**
32
+ * className applied to the wrapper element if one is used.
33
+ */
34
+ className?: string;
35
+ /**
36
+ * css width
37
+ */
38
+ displayWidth?: number | string;
39
+ /**
40
+ * css height
41
+ */
42
+ displayHeight?: number | string;
43
+ /**
44
+ * css min-width
45
+ */
46
+ displayMinWidth?: number | string;
47
+ /**
48
+ * css min-height
49
+ */
50
+ displayMinHeight?: number | string;
51
+ /**
52
+ * css max-width
53
+ */
54
+ displayMaxWidth?: number | string;
55
+ /**
56
+ * css max-height
57
+ */
58
+ displayMaxHeight?: number | string;
59
+ /**
60
+ * For variable quality formats like jpg, the quality from 0 to 100
61
+ */
62
+ quality?: number;
63
+ /**
64
+ * ImageLoader to use for loading different dimensions of the image.
65
+ * If none specified, will not attempt to load different dimensions.
66
+ */
67
+ loader?: "plasmic" | ImageLoader;
68
+ /**
69
+ * Style applied to the wrapper element. objectFit and objectPosition
70
+ * rules are applied to the img element.
71
+ */
72
+ style?: React.CSSProperties;
73
+ /**
74
+ * Ref for the img element. The normal <PlasmicImg ref={...} />
75
+ * prop gives the root element instead, which may be the img element
76
+ * or a wrapper element
77
+ */
78
+ imgRef?: React.Ref<HTMLImageElement>;
79
+ }
80
+ export declare const PlasmicImg: React.ForwardRefExoticComponent<PlasmicImgProps & React.RefAttributes<HTMLElement>>;
81
+ export {};