@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.
- package/dist/all.d.ts +1926 -1925
- package/dist/auth/PlasmicPageGuard.d.ts +11 -11
- package/dist/common.d.ts +10 -10
- package/dist/data-sources/index.d.ts +1 -1
- package/dist/host/index.d.ts +1 -1
- package/dist/index-common.d.ts +18 -18
- package/dist/index-skinny.d.ts +1 -1
- package/dist/index.cjs.js +3495 -3495
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/plume/button/index.d.ts +36 -36
- package/dist/plume/checkbox/index.d.ts +47 -47
- package/dist/plume/collection-utils.d.ts +191 -191
- package/dist/plume/collection-utils.spec.d.ts +1 -1
- package/dist/plume/menu/context.d.ts +8 -8
- package/dist/plume/menu/index.d.ts +3 -3
- package/dist/plume/menu/menu-group.d.ts +23 -23
- package/dist/plume/menu/menu-item.d.ts +23 -23
- package/dist/plume/menu/menu.d.ts +39 -39
- package/dist/plume/menu-button/DropdownMenu.d.ts +34 -34
- package/dist/plume/menu-button/index.d.ts +2 -2
- package/dist/plume/menu-button/menu-button.d.ts +72 -72
- package/dist/plume/menu-button/menu-trigger.d.ts +21 -21
- package/dist/plume/plume-utils.d.ts +41 -41
- package/dist/plume/props-utils.d.ts +15 -15
- package/dist/plume/select/context.d.ts +3 -3
- package/dist/plume/select/index.d.ts +4 -4
- package/dist/plume/select/select-option-group.d.ts +23 -23
- package/dist/plume/select/select-option.d.ts +23 -23
- package/dist/plume/select/select.d.ts +111 -111
- package/dist/plume/switch/index.d.ts +39 -39
- package/dist/plume/text-input/index.d.ts +36 -36
- package/dist/plume/triggered-overlay/context.d.ts +14 -14
- package/dist/plume/triggered-overlay/index.d.ts +2 -2
- package/dist/plume/triggered-overlay/triggered-overlay.d.ts +24 -24
- package/dist/query/index.d.ts +1 -1
- package/dist/react-utils.d.ts +21 -21
- package/dist/react-utils.spec.d.ts +1 -1
- package/dist/react-web.esm.js +3496 -3496
- package/dist/react-web.esm.js.map +1 -1
- package/dist/render/PlasmicHead/index.d.ts +37 -37
- package/dist/render/PlasmicIcon.d.ts +4 -4
- package/dist/render/PlasmicImg/index.d.ts +81 -81
- package/dist/render/PlasmicLink.d.ts +2 -2
- package/dist/render/PlasmicSlot.d.ts +11 -11
- package/dist/render/Stack.d.ts +51 -51
- package/dist/render/elements.d.ts +74 -74
- package/dist/render/global-variants.d.ts +1 -1
- package/dist/render/screen-variants.d.ts +5 -5
- package/dist/render/ssr.d.ts +21 -21
- package/dist/render/translation.d.ts +19 -19
- package/dist/render/triggers.d.ts +39 -39
- package/dist/states/errors.d.ts +13 -13
- package/dist/states/graph.d.ts +25 -25
- package/dist/states/helpers.d.ts +43 -43
- package/dist/states/index.d.ts +4 -4
- package/dist/states/types.d.ts +66 -66
- package/dist/states/valtio.d.ts +10 -10
- package/dist/states/vanilla.d.ts +3 -3
- package/dist/stories/PlasmicImg.stories.d.ts +6 -6
- package/dist/stories/UseDollarState.stories.d.ts +78 -78
- package/lib/data-sources/index.d.ts +1 -1
- package/lib/host/index.d.ts +1 -1
- package/lib/query/index.d.ts +1 -1
- package/package.json +8 -9
- package/skinny/dist/auth/PlasmicPageGuard.d.ts +11 -11
- package/skinny/dist/{collection-utils-0967eaf0.js → collection-utils-2f28e4eb.js} +297 -297
- package/skinny/dist/{collection-utils-0967eaf0.js.map → collection-utils-2f28e4eb.js.map} +1 -1
- package/skinny/dist/{common-9d6d348d.js → common-ed411407.js} +130 -130
- package/skinny/dist/{common-9d6d348d.js.map → common-ed411407.js.map} +1 -1
- package/skinny/dist/common.d.ts +10 -10
- package/skinny/dist/data-sources/index.d.ts +1 -1
- package/skinny/dist/host/index.d.ts +1 -1
- package/skinny/dist/index-common.d.ts +18 -18
- package/skinny/dist/index-skinny.d.ts +1 -1
- package/skinny/dist/index.d.ts +11 -11
- package/skinny/dist/index.js +1559 -1559
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/plume/button/index.d.ts +36 -36
- package/skinny/dist/plume/button/index.js +21 -21
- package/skinny/dist/plume/checkbox/index.d.ts +47 -47
- package/skinny/dist/plume/checkbox/index.js +64 -64
- package/skinny/dist/plume/collection-utils.d.ts +191 -191
- package/skinny/dist/plume/collection-utils.spec.d.ts +1 -1
- package/skinny/dist/plume/menu/context.d.ts +8 -8
- package/skinny/dist/plume/menu/index.d.ts +3 -3
- package/skinny/dist/plume/menu/index.js +165 -165
- package/skinny/dist/plume/menu/menu-group.d.ts +23 -23
- package/skinny/dist/plume/menu/menu-item.d.ts +23 -23
- package/skinny/dist/plume/menu/menu.d.ts +39 -39
- package/skinny/dist/plume/menu-button/DropdownMenu.d.ts +34 -34
- package/skinny/dist/plume/menu-button/index.d.ts +2 -2
- package/skinny/dist/plume/menu-button/index.js +125 -125
- package/skinny/dist/plume/menu-button/index.js.map +1 -1
- package/skinny/dist/plume/menu-button/menu-button.d.ts +72 -72
- package/skinny/dist/plume/menu-button/menu-trigger.d.ts +21 -21
- package/skinny/dist/plume/plume-utils.d.ts +41 -41
- package/skinny/dist/plume/props-utils.d.ts +15 -15
- package/skinny/dist/plume/select/context.d.ts +3 -3
- package/skinny/dist/plume/select/index.d.ts +4 -4
- package/skinny/dist/plume/select/index.js +250 -250
- package/skinny/dist/plume/select/index.js.map +1 -1
- package/skinny/dist/plume/select/select-option-group.d.ts +23 -23
- package/skinny/dist/plume/select/select-option.d.ts +23 -23
- package/skinny/dist/plume/select/select.d.ts +111 -111
- package/skinny/dist/plume/switch/index.d.ts +39 -39
- package/skinny/dist/plume/switch/index.js +61 -61
- package/skinny/dist/plume/text-input/index.d.ts +36 -36
- package/skinny/dist/plume/text-input/index.js +45 -45
- package/skinny/dist/plume/triggered-overlay/context.d.ts +14 -14
- package/skinny/dist/plume/triggered-overlay/index.d.ts +2 -2
- package/skinny/dist/plume/triggered-overlay/index.js +100 -100
- package/skinny/dist/plume/triggered-overlay/index.js.map +1 -1
- package/skinny/dist/plume/triggered-overlay/triggered-overlay.d.ts +24 -24
- package/skinny/dist/{plume-utils-7d68bcc0.js → plume-utils-e699cd08.js} +30 -30
- package/skinny/dist/{plume-utils-7d68bcc0.js.map → plume-utils-e699cd08.js.map} +1 -1
- package/skinny/dist/{props-utils-9f9c761a.js → props-utils-9d74371f.js} +4 -4
- package/skinny/dist/{props-utils-9f9c761a.js.map → props-utils-9d74371f.js.map} +1 -1
- package/skinny/dist/query/index.d.ts +1 -1
- package/skinny/dist/{react-utils-ee4e03ba.js → react-utils-5ff031c2.js} +195 -195
- package/skinny/dist/{react-utils-ee4e03ba.js.map → react-utils-5ff031c2.js.map} +1 -1
- package/skinny/dist/react-utils.d.ts +21 -21
- package/skinny/dist/react-utils.spec.d.ts +1 -1
- package/skinny/dist/render/PlasmicHead/index.d.ts +37 -37
- package/skinny/dist/render/PlasmicHead/index.js +54 -54
- package/skinny/dist/render/PlasmicIcon.d.ts +4 -4
- package/skinny/dist/render/PlasmicImg/index.d.ts +81 -81
- package/skinny/dist/render/PlasmicImg/index.js +297 -297
- package/skinny/dist/render/PlasmicLink.d.ts +2 -2
- package/skinny/dist/render/PlasmicSlot.d.ts +11 -11
- package/skinny/dist/render/Stack.d.ts +51 -51
- package/skinny/dist/render/elements.d.ts +74 -74
- package/skinny/dist/render/global-variants.d.ts +1 -1
- package/skinny/dist/render/screen-variants.d.ts +5 -5
- package/skinny/dist/render/ssr.d.ts +21 -21
- package/skinny/dist/render/translation.d.ts +19 -19
- package/skinny/dist/render/triggers.d.ts +39 -39
- package/skinny/dist/{ssr-c9834f50.js → ssr-8625df04.js} +107 -107
- package/skinny/dist/{ssr-c9834f50.js.map → ssr-8625df04.js.map} +1 -1
- package/skinny/dist/states/errors.d.ts +13 -13
- package/skinny/dist/states/graph.d.ts +25 -25
- package/skinny/dist/states/helpers.d.ts +43 -43
- package/skinny/dist/states/index.d.ts +4 -4
- package/skinny/dist/states/types.d.ts +66 -66
- package/skinny/dist/states/valtio.d.ts +10 -10
- package/skinny/dist/states/vanilla.d.ts +3 -3
- package/skinny/dist/stories/PlasmicImg.stories.d.ts +6 -6
- 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 {};
|