@plasmicpkgs/plasmic-basic-components 0.0.2 → 0.0.6
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/Data.d.ts +32 -59
- package/dist/Embed.d.ts +5 -3
- package/dist/Iframe.d.ts +8 -3
- package/dist/ScrollRevealer.d.ts +12 -6
- package/dist/Video.d.ts +6 -0
- package/dist/index.d.ts +3 -1
- package/dist/plasmic-basic-components.cjs.development.js +151 -172
- package/dist/plasmic-basic-components.cjs.development.js.map +1 -1
- package/dist/plasmic-basic-components.cjs.production.min.js +1 -1
- package/dist/plasmic-basic-components.cjs.production.min.js.map +1 -1
- package/dist/plasmic-basic-components.esm.js +134 -169
- package/dist/plasmic-basic-components.esm.js.map +1 -1
- package/package.json +4 -13
- package/Data/dist/Data.d.ts +0 -97
- package/Data/dist/common.d.ts +0 -2
- package/Data/dist/index.cjs.js +0 -267
- package/Data/dist/index.cjs.js.map +0 -1
- package/Data/dist/index.esm.js +0 -246
- package/Data/dist/index.esm.js.map +0 -1
- package/Data/package.json +0 -6
- package/Embed/dist/Embed.d.ts +0 -8
- package/Embed/dist/common.d.ts +0 -2
- package/Embed/dist/index.cjs.js +0 -64
- package/Embed/dist/index.cjs.js.map +0 -1
- package/Embed/dist/index.esm.js +0 -55
- package/Embed/dist/index.esm.js.map +0 -1
- package/Embed/package.json +0 -6
- package/Iframe/dist/Iframe.d.ts +0 -8
- package/Iframe/dist/index.cjs.js +0 -62
- package/Iframe/dist/index.cjs.js.map +0 -1
- package/Iframe/dist/index.esm.js +0 -53
- package/Iframe/dist/index.esm.js.map +0 -1
- package/Iframe/package.json +0 -6
- package/ScrollRevealer/dist/ScrollRevealer.d.ts +0 -20
- package/ScrollRevealer/dist/index.cjs.js +0 -87
- package/ScrollRevealer/dist/index.cjs.js.map +0 -1
- package/ScrollRevealer/dist/index.esm.js +0 -77
- package/ScrollRevealer/dist/index.esm.js.map +0 -1
- package/ScrollRevealer/package.json +0 -6
- package/Video/dist/Video.d.ts +0 -3
- package/Video/dist/index.cjs.js +0 -100
- package/Video/dist/index.cjs.js.map +0 -1
- package/Video/dist/index.esm.js +0 -91
- package/Video/dist/index.esm.js.map +0 -1
- package/Video/package.json +0 -6
package/dist/Data.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { ComponentMeta } from "@plasmicapp/host";
|
|
2
|
+
import registerComponent from "@plasmicapp/host/registerComponent";
|
|
3
|
+
import React, { ComponentProps, ReactNode } from "react";
|
|
3
4
|
export declare type DataDict = Record<string, any>;
|
|
4
5
|
export declare const DataContext: React.Context<Record<string, any> | undefined>;
|
|
5
6
|
export declare function applySelector(rawData: DataDict | undefined, selector: string | undefined): any;
|
|
@@ -19,28 +20,23 @@ export interface CommonDynamicProps {
|
|
|
19
20
|
propSelectors?: SelectorDict;
|
|
20
21
|
}
|
|
21
22
|
export declare function DynamicElement<Tag extends keyof JSX.IntrinsicElements = "div">({ tag, className, children, propSelectors, ...props }: CommonDynamicProps & ComponentProps<Tag>): React.DOMElement<any, Element>;
|
|
22
|
-
export
|
|
23
|
+
export interface DynamicTextProps extends CommonDynamicProps {
|
|
23
24
|
selector?: string;
|
|
24
|
-
}
|
|
25
|
-
export declare function
|
|
25
|
+
}
|
|
26
|
+
export declare function DynamicText({ selector, propSelectors, ...props }: DynamicTextProps): JSX.Element;
|
|
27
|
+
export interface DynamicImageProps extends CommonDynamicProps, ComponentProps<"img"> {
|
|
26
28
|
selector?: string;
|
|
27
|
-
}
|
|
28
|
-
export
|
|
29
|
+
}
|
|
30
|
+
export declare function DynamicImage({ selector, propSelectors, ...props }: DynamicImageProps): JSX.Element;
|
|
31
|
+
export interface DynamicRepeaterProps {
|
|
29
32
|
children?: ReactNode;
|
|
30
|
-
style?: CSSProperties;
|
|
31
33
|
loopItemName?: string;
|
|
32
34
|
keySelector?: string;
|
|
33
35
|
selector?: string;
|
|
34
36
|
data?: any;
|
|
35
37
|
}
|
|
36
|
-
export declare function
|
|
37
|
-
export
|
|
38
|
-
columns?: number;
|
|
39
|
-
columnGap?: number;
|
|
40
|
-
rowGap?: number;
|
|
41
|
-
}
|
|
42
|
-
export declare function DynamicCollectionGrid({ columns, columnGap, rowGap, ...props }: DynamicCollectionGridProps): JSX.Element;
|
|
43
|
-
export declare const dynamicCollectionProps: {
|
|
38
|
+
export declare function DynamicRepeater({ children, loopItemName, keySelector, selector, data, }: DynamicRepeaterProps): JSX.Element;
|
|
39
|
+
export declare const dynamicRepeaterProps: {
|
|
44
40
|
readonly selector: {
|
|
45
41
|
readonly type: "string";
|
|
46
42
|
readonly description: "The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField";
|
|
@@ -51,47 +47,24 @@ export declare const dynamicCollectionProps: {
|
|
|
51
47
|
readonly description: "The name of the variable to use to store the current item in the loop";
|
|
52
48
|
};
|
|
53
49
|
readonly children: "slot";
|
|
54
|
-
readonly tag: {
|
|
55
|
-
readonly type: "string";
|
|
56
|
-
readonly description: "The HTML tag to use";
|
|
57
|
-
};
|
|
58
|
-
readonly propSelectors: {
|
|
59
|
-
readonly type: "object";
|
|
60
|
-
readonly description: "An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.";
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
export declare const dynamicCollectionGridProps: {
|
|
64
|
-
readonly columns: {
|
|
65
|
-
readonly type: "number";
|
|
66
|
-
readonly defaultValue: 2;
|
|
67
|
-
readonly description: "The number of columns to use in the grid";
|
|
68
|
-
};
|
|
69
|
-
readonly columnGap: {
|
|
70
|
-
readonly type: "number";
|
|
71
|
-
readonly defaultValue: 8;
|
|
72
|
-
readonly description: "The gap between columns";
|
|
73
|
-
};
|
|
74
|
-
readonly rowGap: {
|
|
75
|
-
readonly type: "number";
|
|
76
|
-
readonly defaultValue: 8;
|
|
77
|
-
readonly description: "The gap between rows";
|
|
78
|
-
};
|
|
79
|
-
readonly selector: {
|
|
80
|
-
readonly type: "string";
|
|
81
|
-
readonly description: "The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField";
|
|
82
|
-
};
|
|
83
|
-
readonly loopItemName: {
|
|
84
|
-
readonly type: "string";
|
|
85
|
-
readonly defaultValue: "item";
|
|
86
|
-
readonly description: "The name of the variable to use to store the current item in the loop";
|
|
87
|
-
};
|
|
88
|
-
readonly children: "slot";
|
|
89
|
-
readonly tag: {
|
|
90
|
-
readonly type: "string";
|
|
91
|
-
readonly description: "The HTML tag to use";
|
|
92
|
-
};
|
|
93
|
-
readonly propSelectors: {
|
|
94
|
-
readonly type: "object";
|
|
95
|
-
readonly description: "An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.";
|
|
96
|
-
};
|
|
97
50
|
};
|
|
51
|
+
export declare const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps>;
|
|
52
|
+
export declare function registerDynamicRepeater(loader?: {
|
|
53
|
+
registerComponent: typeof registerComponent;
|
|
54
|
+
}, customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>): void;
|
|
55
|
+
export declare const dataProviderMeta: ComponentMeta<DataProviderProps>;
|
|
56
|
+
export declare function registerDataProvider(loader?: {
|
|
57
|
+
registerComponent: typeof registerComponent;
|
|
58
|
+
}, customDataProviderMeta?: ComponentMeta<DataProviderProps>): void;
|
|
59
|
+
export declare const dynamicElementMeta: ComponentMeta<CommonDynamicProps>;
|
|
60
|
+
export declare function registerDynamicElement(loader?: {
|
|
61
|
+
registerComponent: typeof registerComponent;
|
|
62
|
+
}, customDynamicElementMeta?: ComponentMeta<CommonDynamicProps>): void;
|
|
63
|
+
export declare const dynamicTextMeta: ComponentMeta<DynamicTextProps>;
|
|
64
|
+
export declare function registerDynamicText(loader?: {
|
|
65
|
+
registerComponent: typeof registerComponent;
|
|
66
|
+
}, customDynamicTextMeta?: ComponentMeta<DynamicTextProps>): void;
|
|
67
|
+
export declare const dynamicImageMeta: ComponentMeta<DynamicImageProps>;
|
|
68
|
+
export declare function registerDynamicImage(loader?: {
|
|
69
|
+
registerComponent: typeof registerComponent;
|
|
70
|
+
}, customDynamicImageMeta?: ComponentMeta<DynamicImageProps>): void;
|
package/dist/Embed.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="react" />
|
|
1
|
+
import registerComponent, { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
3
2
|
export interface EmbedProps {
|
|
4
3
|
className?: string;
|
|
5
4
|
code: string;
|
|
6
5
|
hideInEditor?: boolean;
|
|
7
6
|
}
|
|
8
|
-
export
|
|
7
|
+
export declare const embedMeta: ComponentMeta<EmbedProps>;
|
|
8
|
+
export declare function registerEmbed(loader?: {
|
|
9
|
+
registerComponent: typeof registerComponent;
|
|
10
|
+
}, customEmbedMeta?: ComponentMeta<EmbedProps>): void;
|
package/dist/Iframe.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
/** @format */
|
|
2
1
|
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta } from "@plasmicapp/host";
|
|
3
|
+
import registerComponent from "@plasmicapp/host/registerComponent";
|
|
3
4
|
export interface IframeProps {
|
|
4
5
|
src: string;
|
|
5
|
-
|
|
6
|
+
preview?: boolean;
|
|
6
7
|
className?: string;
|
|
7
8
|
}
|
|
8
|
-
export default function Iframe({
|
|
9
|
+
export default function Iframe({ preview, src, className }: IframeProps): JSX.Element;
|
|
10
|
+
export declare const iframeMeta: ComponentMeta<IframeProps>;
|
|
11
|
+
export declare function registerIframe(loader?: {
|
|
12
|
+
registerComponent: typeof registerComponent;
|
|
13
|
+
}, customIframeMeta?: ComponentMeta<IframeProps>): void;
|
package/dist/ScrollRevealer.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import registerComponent, { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
1
2
|
import { ReactNode, RefObject } from "react";
|
|
2
3
|
export declare function useDirectionalIntersection({ ref, scrollDownThreshold, scrollUpThreshold, }: {
|
|
3
4
|
ref: RefObject<HTMLElement>;
|
|
4
5
|
scrollDownThreshold?: number;
|
|
5
6
|
scrollUpThreshold?: number;
|
|
6
7
|
}): boolean;
|
|
8
|
+
export interface ScrollRevealerProps {
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
scrollUpThreshold?: number;
|
|
12
|
+
scrollDownThreshold?: number;
|
|
13
|
+
}
|
|
7
14
|
/**
|
|
8
15
|
* Unlike react-awesome-reveal, ScrollRevealer:
|
|
9
16
|
*
|
|
@@ -12,9 +19,8 @@ export declare function useDirectionalIntersection({ ref, scrollDownThreshold, s
|
|
|
12
19
|
*
|
|
13
20
|
* TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.
|
|
14
21
|
*/
|
|
15
|
-
export default function ScrollRevealer({ children, className, scrollDownThreshold, scrollUpThreshold, }:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}): JSX.Element;
|
|
22
|
+
export default function ScrollRevealer({ children, className, scrollDownThreshold, scrollUpThreshold, }: ScrollRevealerProps): JSX.Element;
|
|
23
|
+
export declare const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps>;
|
|
24
|
+
export declare function registerScrollRevealer(loader?: {
|
|
25
|
+
registerComponent: typeof registerComponent;
|
|
26
|
+
}, customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>): void;
|
package/dist/Video.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import registerComponent, { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
1
2
|
import React from "react";
|
|
3
|
+
export declare type VideoProps = Pick<React.ComponentProps<"video">, "autoPlay" | "controls" | "loop" | "muted" | "playsInline" | "poster" | "preload" | "src">;
|
|
2
4
|
declare const Video: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "autoPlay" | "controls" | "loop" | "muted" | "playsInline" | "poster" | "preload" | "src"> & React.RefAttributes<HTMLVideoElement>>;
|
|
3
5
|
export default Video;
|
|
6
|
+
export declare const videoMeta: ComponentMeta<VideoProps>;
|
|
7
|
+
export declare function registerVideo(loader?: {
|
|
8
|
+
registerComponent: typeof registerComponent;
|
|
9
|
+
}, customVideoMeta?: ComponentMeta<VideoProps>): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from "./Data";
|
|
2
|
-
export
|
|
2
|
+
export * from "./Iframe";
|
|
3
3
|
export { default as Iframe } from "./Iframe";
|
|
4
|
+
export * from "./ScrollRevealer";
|
|
4
5
|
export { default as ScrollRevealer } from "./ScrollRevealer";
|
|
6
|
+
export * from "./Video";
|
|
5
7
|
export { default as Video } from "./Video";
|