@plasmicpkgs/plasmic-basic-components 0.0.278 → 0.0.279
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/ConditionGuard.d.ts +15 -15
- package/dist/Data.d.ts +77 -77
- package/dist/Embed.d.ts +24 -24
- package/dist/Embed.stories.d.ts +17 -17
- package/dist/Iframe.d.ts +16 -16
- package/dist/LoadingBoundary.d.ts +13 -13
- package/dist/Repeater.d.ts +14 -14
- package/dist/ScrollRevealer.d.ts +26 -26
- package/dist/SideEffect.d.ts +11 -11
- package/dist/Timer.d.ts +14 -14
- package/dist/Video.d.ts +13 -13
- package/dist/common.d.ts +7 -7
- package/dist/index.d.ts +10 -10
- package/dist/plasmic-basic-components.cjs.development.js +30 -30
- 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 +30 -30
- package/dist/plasmic-basic-components.esm.js.map +1 -1
- package/package.json +5 -5
package/dist/ConditionGuard.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface ConditionGuardProps {
|
|
4
|
-
condition: boolean;
|
|
5
|
-
onNotSatisfied?: () => Promise<void>;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
skipPaths?: Array<{
|
|
8
|
-
path: string;
|
|
9
|
-
}>;
|
|
10
|
-
}
|
|
11
|
-
export declare function ConditionGuard({ condition, onNotSatisfied, children, skipPaths, }: ConditionGuardProps): React.JSX.Element;
|
|
12
|
-
export declare const conditionGuardMeta: CodeComponentMeta<ConditionGuardProps>;
|
|
13
|
-
export declare function registerConditionGuard(loader?: {
|
|
14
|
-
registerComponent: typeof registerComponent;
|
|
15
|
-
}, customConditionGuardMeta?: CodeComponentMeta<ConditionGuardProps>): void;
|
|
1
|
+
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface ConditionGuardProps {
|
|
4
|
+
condition: boolean;
|
|
5
|
+
onNotSatisfied?: () => Promise<void>;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
skipPaths?: Array<{
|
|
8
|
+
path: string;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
export declare function ConditionGuard({ condition, onNotSatisfied, children, skipPaths, }: ConditionGuardProps): React.JSX.Element;
|
|
12
|
+
export declare const conditionGuardMeta: CodeComponentMeta<ConditionGuardProps>;
|
|
13
|
+
export declare function registerConditionGuard(loader?: {
|
|
14
|
+
registerComponent: typeof registerComponent;
|
|
15
|
+
}, customConditionGuardMeta?: CodeComponentMeta<ConditionGuardProps>): void;
|
package/dist/Data.d.ts
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { DataProviderProps, SelectorDict, DataProvider as _DataProvider, applySelector as _applySelector, useDataEnv as _useDataEnv, useSelector as _useSelector, useSelectors as _useSelectors } from "@plasmicapp/host";
|
|
2
|
-
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
3
|
-
import React, { ComponentProps, ReactNode } from "react";
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
6
|
-
*/
|
|
7
|
-
export declare const applySelector: typeof _applySelector;
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
10
|
-
*/
|
|
11
|
-
export declare const useSelector: typeof _useSelector;
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
14
|
-
*/
|
|
15
|
-
export declare const useSelectors: typeof _useSelectors;
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
18
|
-
*/
|
|
19
|
-
export declare const useDataEnv: typeof _useDataEnv;
|
|
20
|
-
export declare const DataProvider: typeof _DataProvider;
|
|
21
|
-
export interface CommonDynamicProps {
|
|
22
|
-
className?: string;
|
|
23
|
-
tag?: string;
|
|
24
|
-
propSelectors?: SelectorDict;
|
|
25
|
-
}
|
|
26
|
-
export declare function DynamicElement<Tag extends keyof JSX.IntrinsicElements = "div">({ tag, className, children, propSelectors, ...props }: CommonDynamicProps & ComponentProps<Tag>): React.DOMElement<any, Element>;
|
|
27
|
-
export interface DynamicTextProps extends CommonDynamicProps {
|
|
28
|
-
selector?: string;
|
|
29
|
-
}
|
|
30
|
-
export declare function DynamicText({ selector, propSelectors, ...props }: DynamicTextProps): React.JSX.Element;
|
|
31
|
-
export interface DynamicImageProps extends CommonDynamicProps, ComponentProps<"img"> {
|
|
32
|
-
selector?: string;
|
|
33
|
-
}
|
|
34
|
-
export declare function DynamicImage({ selector, propSelectors, ...props }: DynamicImageProps): React.JSX.Element;
|
|
35
|
-
export interface DynamicRepeaterProps {
|
|
36
|
-
children?: ReactNode;
|
|
37
|
-
loopItemName?: string;
|
|
38
|
-
keySelector?: string;
|
|
39
|
-
selector?: string;
|
|
40
|
-
data?: any;
|
|
41
|
-
}
|
|
42
|
-
export declare function DynamicRepeater({ children, loopItemName, keySelector, selector, data, }: DynamicRepeaterProps): React.JSX.Element;
|
|
43
|
-
export declare const dynamicRepeaterProps: {
|
|
44
|
-
readonly selector: {
|
|
45
|
-
readonly type: "string";
|
|
46
|
-
readonly description: "The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField";
|
|
47
|
-
};
|
|
48
|
-
readonly loopItemName: {
|
|
49
|
-
readonly type: "string";
|
|
50
|
-
readonly defaultValue: "item";
|
|
51
|
-
readonly description: "The name of the variable to use to store the current item in the loop";
|
|
52
|
-
};
|
|
53
|
-
readonly children: {
|
|
54
|
-
readonly type: "slot";
|
|
55
|
-
readonly isRepeated: true;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
export declare const dynamicRepeaterMeta: CodeComponentMeta<DynamicRepeaterProps>;
|
|
59
|
-
export declare function registerDynamicRepeater(loader?: {
|
|
60
|
-
registerComponent: typeof registerComponent;
|
|
61
|
-
}, customDynamicRepeaterMeta?: CodeComponentMeta<DynamicRepeaterProps>): void;
|
|
62
|
-
export declare const dataProviderMeta: CodeComponentMeta<DataProviderProps>;
|
|
63
|
-
export declare function registerDataProvider(loader?: {
|
|
64
|
-
registerComponent: typeof registerComponent;
|
|
65
|
-
}, customDataProviderMeta?: CodeComponentMeta<DataProviderProps>): void;
|
|
66
|
-
export declare const dynamicElementMeta: CodeComponentMeta<CommonDynamicProps>;
|
|
67
|
-
export declare function registerDynamicElement(loader?: {
|
|
68
|
-
registerComponent: typeof registerComponent;
|
|
69
|
-
}, customDynamicElementMeta?: CodeComponentMeta<CommonDynamicProps>): void;
|
|
70
|
-
export declare const dynamicTextMeta: CodeComponentMeta<DynamicTextProps>;
|
|
71
|
-
export declare function registerDynamicText(loader?: {
|
|
72
|
-
registerComponent: typeof registerComponent;
|
|
73
|
-
}, customDynamicTextMeta?: CodeComponentMeta<DynamicTextProps>): void;
|
|
74
|
-
export declare const dynamicImageMeta: CodeComponentMeta<DynamicImageProps>;
|
|
75
|
-
export declare function registerDynamicImage(loader?: {
|
|
76
|
-
registerComponent: typeof registerComponent;
|
|
77
|
-
}, customDynamicImageMeta?: CodeComponentMeta<DynamicImageProps>): void;
|
|
1
|
+
import { DataProviderProps, SelectorDict, DataProvider as _DataProvider, applySelector as _applySelector, useDataEnv as _useDataEnv, useSelector as _useSelector, useSelectors as _useSelectors } from "@plasmicapp/host";
|
|
2
|
+
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
3
|
+
import React, { ComponentProps, ReactNode } from "react";
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
6
|
+
*/
|
|
7
|
+
export declare const applySelector: typeof _applySelector;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useSelector: typeof _useSelector;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useSelectors: typeof _useSelectors;
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
18
|
+
*/
|
|
19
|
+
export declare const useDataEnv: typeof _useDataEnv;
|
|
20
|
+
export declare const DataProvider: typeof _DataProvider;
|
|
21
|
+
export interface CommonDynamicProps {
|
|
22
|
+
className?: string;
|
|
23
|
+
tag?: string;
|
|
24
|
+
propSelectors?: SelectorDict;
|
|
25
|
+
}
|
|
26
|
+
export declare function DynamicElement<Tag extends keyof JSX.IntrinsicElements = "div">({ tag, className, children, propSelectors, ...props }: CommonDynamicProps & ComponentProps<Tag>): React.DOMElement<any, Element>;
|
|
27
|
+
export interface DynamicTextProps extends CommonDynamicProps {
|
|
28
|
+
selector?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function DynamicText({ selector, propSelectors, ...props }: DynamicTextProps): React.JSX.Element;
|
|
31
|
+
export interface DynamicImageProps extends CommonDynamicProps, ComponentProps<"img"> {
|
|
32
|
+
selector?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function DynamicImage({ selector, propSelectors, ...props }: DynamicImageProps): React.JSX.Element;
|
|
35
|
+
export interface DynamicRepeaterProps {
|
|
36
|
+
children?: ReactNode;
|
|
37
|
+
loopItemName?: string;
|
|
38
|
+
keySelector?: string;
|
|
39
|
+
selector?: string;
|
|
40
|
+
data?: any;
|
|
41
|
+
}
|
|
42
|
+
export declare function DynamicRepeater({ children, loopItemName, keySelector, selector, data, }: DynamicRepeaterProps): React.JSX.Element;
|
|
43
|
+
export declare const dynamicRepeaterProps: {
|
|
44
|
+
readonly selector: {
|
|
45
|
+
readonly type: "string";
|
|
46
|
+
readonly description: "The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField";
|
|
47
|
+
};
|
|
48
|
+
readonly loopItemName: {
|
|
49
|
+
readonly type: "string";
|
|
50
|
+
readonly defaultValue: "item";
|
|
51
|
+
readonly description: "The name of the variable to use to store the current item in the loop";
|
|
52
|
+
};
|
|
53
|
+
readonly children: {
|
|
54
|
+
readonly type: "slot";
|
|
55
|
+
readonly isRepeated: true;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare const dynamicRepeaterMeta: CodeComponentMeta<DynamicRepeaterProps>;
|
|
59
|
+
export declare function registerDynamicRepeater(loader?: {
|
|
60
|
+
registerComponent: typeof registerComponent;
|
|
61
|
+
}, customDynamicRepeaterMeta?: CodeComponentMeta<DynamicRepeaterProps>): void;
|
|
62
|
+
export declare const dataProviderMeta: CodeComponentMeta<DataProviderProps>;
|
|
63
|
+
export declare function registerDataProvider(loader?: {
|
|
64
|
+
registerComponent: typeof registerComponent;
|
|
65
|
+
}, customDataProviderMeta?: CodeComponentMeta<DataProviderProps>): void;
|
|
66
|
+
export declare const dynamicElementMeta: CodeComponentMeta<CommonDynamicProps>;
|
|
67
|
+
export declare function registerDynamicElement(loader?: {
|
|
68
|
+
registerComponent: typeof registerComponent;
|
|
69
|
+
}, customDynamicElementMeta?: CodeComponentMeta<CommonDynamicProps>): void;
|
|
70
|
+
export declare const dynamicTextMeta: CodeComponentMeta<DynamicTextProps>;
|
|
71
|
+
export declare function registerDynamicText(loader?: {
|
|
72
|
+
registerComponent: typeof registerComponent;
|
|
73
|
+
}, customDynamicTextMeta?: CodeComponentMeta<DynamicTextProps>): void;
|
|
74
|
+
export declare const dynamicImageMeta: CodeComponentMeta<DynamicImageProps>;
|
|
75
|
+
export declare function registerDynamicImage(loader?: {
|
|
76
|
+
registerComponent: typeof registerComponent;
|
|
77
|
+
}, customDynamicImageMeta?: CodeComponentMeta<DynamicImageProps>): void;
|
package/dist/Embed.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface EmbedProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
code: string;
|
|
6
|
-
hideInEditor?: boolean;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* A common use case for embedding HTML snippets is loading/running script tags, so most of the logic here is for
|
|
10
|
-
* handling that.
|
|
11
|
-
*
|
|
12
|
-
* You can't just write innerHTML with some <script> tags in there. You need to explicitly add each one via the DOM API.
|
|
13
|
-
*
|
|
14
|
-
* You also can't just add the script tags and expect them to run sequentially, and sometimes there are multiple scripts
|
|
15
|
-
* with dependencies on each other. You have to explicitly wait for earlier ones to finish loading.
|
|
16
|
-
*
|
|
17
|
-
* One last complication is that Next.js can run the effect multiple times in development mode. There's nothing actually
|
|
18
|
-
* that we can/should do about that, but just something to be aware of if you are here debugging issues.
|
|
19
|
-
*/
|
|
20
|
-
export declare function Embed({ className, code, hideInEditor }: EmbedProps): React.JSX.Element;
|
|
21
|
-
export declare const embedMeta: CodeComponentMeta<EmbedProps>;
|
|
22
|
-
export declare function registerEmbed(loader?: {
|
|
23
|
-
registerComponent: typeof registerComponent;
|
|
24
|
-
}, customEmbedMeta?: CodeComponentMeta<EmbedProps>): void;
|
|
1
|
+
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface EmbedProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
code: string;
|
|
6
|
+
hideInEditor?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A common use case for embedding HTML snippets is loading/running script tags, so most of the logic here is for
|
|
10
|
+
* handling that.
|
|
11
|
+
*
|
|
12
|
+
* You can't just write innerHTML with some <script> tags in there. You need to explicitly add each one via the DOM API.
|
|
13
|
+
*
|
|
14
|
+
* You also can't just add the script tags and expect them to run sequentially, and sometimes there are multiple scripts
|
|
15
|
+
* with dependencies on each other. You have to explicitly wait for earlier ones to finish loading.
|
|
16
|
+
*
|
|
17
|
+
* One last complication is that Next.js can run the effect multiple times in development mode. There's nothing actually
|
|
18
|
+
* that we can/should do about that, but just something to be aware of if you are here debugging issues.
|
|
19
|
+
*/
|
|
20
|
+
export declare function Embed({ className, code, hideInEditor }: EmbedProps): React.JSX.Element;
|
|
21
|
+
export declare const embedMeta: CodeComponentMeta<EmbedProps>;
|
|
22
|
+
export declare function registerEmbed(loader?: {
|
|
23
|
+
registerComponent: typeof registerComponent;
|
|
24
|
+
}, customEmbedMeta?: CodeComponentMeta<EmbedProps>): void;
|
package/dist/Embed.stories.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { StoryObj } from "@storybook/react";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { Embed } from "./Embed";
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: typeof Embed;
|
|
7
|
-
args: {
|
|
8
|
-
code: string;
|
|
9
|
-
};
|
|
10
|
-
render: (args:
|
|
11
|
-
};
|
|
12
|
-
export default _default;
|
|
13
|
-
|
|
14
|
-
export declare const HtmlCssJs: Story;
|
|
15
|
-
export declare const HtmlCssJsSsr: Story;
|
|
16
|
-
export declare const Iframe: Story;
|
|
17
|
-
export declare const ScriptsLoadedSequentially: Story;
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Embed } from "./Embed";
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: typeof Embed;
|
|
7
|
+
args: {
|
|
8
|
+
code: string;
|
|
9
|
+
};
|
|
10
|
+
render: (args: import("./Embed").EmbedProps) => React.JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
type Story = StoryObj<typeof Embed>;
|
|
14
|
+
export declare const HtmlCssJs: Story;
|
|
15
|
+
export declare const HtmlCssJsSsr: Story;
|
|
16
|
+
export declare const Iframe: Story;
|
|
17
|
+
export declare const ScriptsLoadedSequentially: Story;
|
package/dist/Iframe.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface IframeProps {
|
|
4
|
-
useHtml?: boolean;
|
|
5
|
-
srcDoc?: string;
|
|
6
|
-
src?: string;
|
|
7
|
-
sandbox?: string;
|
|
8
|
-
preview?: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
onLoad?: React.ComponentProps<"iframe">["onLoad"];
|
|
11
|
-
}
|
|
12
|
-
export declare function Iframe({ preview, src, srcDoc, sandbox, useHtml, className, onLoad, }: IframeProps): React.JSX.Element;
|
|
13
|
-
export declare const iframeMeta: CodeComponentMeta<IframeProps>;
|
|
14
|
-
export declare function registerIframe(loader?: {
|
|
15
|
-
registerComponent: typeof registerComponent;
|
|
16
|
-
}, customIframeMeta?: CodeComponentMeta<IframeProps>): void;
|
|
1
|
+
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface IframeProps {
|
|
4
|
+
useHtml?: boolean;
|
|
5
|
+
srcDoc?: string;
|
|
6
|
+
src?: string;
|
|
7
|
+
sandbox?: string;
|
|
8
|
+
preview?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
onLoad?: React.ComponentProps<"iframe">["onLoad"];
|
|
11
|
+
}
|
|
12
|
+
export declare function Iframe({ preview, src, srcDoc, sandbox, useHtml, className, onLoad, }: IframeProps): React.JSX.Element;
|
|
13
|
+
export declare const iframeMeta: CodeComponentMeta<IframeProps>;
|
|
14
|
+
export declare function registerIframe(loader?: {
|
|
15
|
+
registerComponent: typeof registerComponent;
|
|
16
|
+
}, customIframeMeta?: CodeComponentMeta<IframeProps>): void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import React from "react";
|
|
3
|
-
interface LoadingBoundaryProps {
|
|
4
|
-
loadingState?: React.ReactNode;
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
forceLoading?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function LoadingBoundary({ children, forceLoading, loadingState, }: LoadingBoundaryProps): React.JSX.Element;
|
|
9
|
-
export declare const loadingBoundaryMeta: CodeComponentMeta<LoadingBoundaryProps>;
|
|
10
|
-
export declare function registerLoadingBoundary(loader?: {
|
|
11
|
-
registerComponent: typeof registerComponent;
|
|
12
|
-
}, customLoadingBoundaryMeta?: CodeComponentMeta<LoadingBoundaryProps>): void;
|
|
13
|
-
export {};
|
|
1
|
+
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface LoadingBoundaryProps {
|
|
4
|
+
loadingState?: React.ReactNode;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
forceLoading?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function LoadingBoundary({ children, forceLoading, loadingState, }: LoadingBoundaryProps): React.JSX.Element;
|
|
9
|
+
export declare const loadingBoundaryMeta: CodeComponentMeta<LoadingBoundaryProps>;
|
|
10
|
+
export declare function registerLoadingBoundary(loader?: {
|
|
11
|
+
registerComponent: typeof registerComponent;
|
|
12
|
+
}, customLoadingBoundaryMeta?: CodeComponentMeta<LoadingBoundaryProps>): void;
|
|
13
|
+
export {};
|
package/dist/Repeater.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import React from "react";
|
|
3
|
-
interface RepeaterProps<T> {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
items: T[];
|
|
6
|
-
itemName?: string;
|
|
7
|
-
indexName?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function Repeater<T>(props: RepeaterProps<T>): React.JSX.Element;
|
|
10
|
-
export declare const repeaterMeta: CodeComponentMeta<RepeaterProps<any>>;
|
|
11
|
-
export declare function registerRepeater(loader?: {
|
|
12
|
-
registerComponent: typeof registerComponent;
|
|
13
|
-
}, customRepeaterMeta?: CodeComponentMeta<RepeaterProps<any>>): void;
|
|
14
|
-
export {};
|
|
1
|
+
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface RepeaterProps<T> {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
items: T[];
|
|
6
|
+
itemName?: string;
|
|
7
|
+
indexName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function Repeater<T>(props: RepeaterProps<T>): React.JSX.Element;
|
|
10
|
+
export declare const repeaterMeta: CodeComponentMeta<RepeaterProps<any>>;
|
|
11
|
+
export declare function registerRepeater(loader?: {
|
|
12
|
+
registerComponent: typeof registerComponent;
|
|
13
|
+
}, customRepeaterMeta?: CodeComponentMeta<RepeaterProps<any>>): void;
|
|
14
|
+
export {};
|
package/dist/ScrollRevealer.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import React, { ReactNode, RefObject } from "react";
|
|
3
|
-
export declare function useDirectionalIntersection({ ref, scrollDownThreshold, scrollUpThreshold, }: {
|
|
4
|
-
ref: RefObject<HTMLElement>;
|
|
5
|
-
scrollDownThreshold?: number;
|
|
6
|
-
scrollUpThreshold?: number;
|
|
7
|
-
}): boolean;
|
|
8
|
-
export interface ScrollRevealerProps {
|
|
9
|
-
children?: ReactNode;
|
|
10
|
-
className?: string;
|
|
11
|
-
scrollUpThreshold?: number;
|
|
12
|
-
scrollDownThreshold?: number;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Unlike react-awesome-reveal, ScrollRevealer:
|
|
16
|
-
*
|
|
17
|
-
* - has configurable thresholds
|
|
18
|
-
* - triggers arbitrary render/unrender animations
|
|
19
|
-
*
|
|
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.
|
|
21
|
-
*/
|
|
22
|
-
export declare function ScrollRevealer({ children, className, scrollDownThreshold, scrollUpThreshold, }: ScrollRevealerProps): React.JSX.Element;
|
|
23
|
-
export declare const scrollRevealerMeta: CodeComponentMeta<ScrollRevealerProps>;
|
|
24
|
-
export declare function registerScrollRevealer(loader?: {
|
|
25
|
-
registerComponent: typeof registerComponent;
|
|
26
|
-
}, customScrollRevealerMeta?: CodeComponentMeta<ScrollRevealerProps>): void;
|
|
1
|
+
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import React, { ReactNode, RefObject } from "react";
|
|
3
|
+
export declare function useDirectionalIntersection({ ref, scrollDownThreshold, scrollUpThreshold, }: {
|
|
4
|
+
ref: RefObject<HTMLElement>;
|
|
5
|
+
scrollDownThreshold?: number;
|
|
6
|
+
scrollUpThreshold?: number;
|
|
7
|
+
}): boolean;
|
|
8
|
+
export interface ScrollRevealerProps {
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
scrollUpThreshold?: number;
|
|
12
|
+
scrollDownThreshold?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Unlike react-awesome-reveal, ScrollRevealer:
|
|
16
|
+
*
|
|
17
|
+
* - has configurable thresholds
|
|
18
|
+
* - triggers arbitrary render/unrender animations
|
|
19
|
+
*
|
|
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.
|
|
21
|
+
*/
|
|
22
|
+
export declare function ScrollRevealer({ children, className, scrollDownThreshold, scrollUpThreshold, }: ScrollRevealerProps): React.JSX.Element;
|
|
23
|
+
export declare const scrollRevealerMeta: CodeComponentMeta<ScrollRevealerProps>;
|
|
24
|
+
export declare function registerScrollRevealer(loader?: {
|
|
25
|
+
registerComponent: typeof registerComponent;
|
|
26
|
+
}, customScrollRevealerMeta?: CodeComponentMeta<ScrollRevealerProps>): void;
|
package/dist/SideEffect.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
export interface SideEffectProps {
|
|
3
|
-
onMount?: () => Promise<void>;
|
|
4
|
-
onUnmount?: () => Promise<void>;
|
|
5
|
-
deps?: unknown[];
|
|
6
|
-
}
|
|
7
|
-
export declare function SideEffect({ deps, onMount, onUnmount }: SideEffectProps): null;
|
|
8
|
-
export declare const sideEffectMeta: CodeComponentMeta<SideEffectProps>;
|
|
9
|
-
export declare function registerSideEffect(loader?: {
|
|
10
|
-
registerComponent: typeof registerComponent;
|
|
11
|
-
}, customMeta?: CodeComponentMeta<SideEffectProps>): void;
|
|
1
|
+
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
export interface SideEffectProps {
|
|
3
|
+
onMount?: () => Promise<void>;
|
|
4
|
+
onUnmount?: () => Promise<void>;
|
|
5
|
+
deps?: unknown[];
|
|
6
|
+
}
|
|
7
|
+
export declare function SideEffect({ deps, onMount, onUnmount }: SideEffectProps): null;
|
|
8
|
+
export declare const sideEffectMeta: CodeComponentMeta<SideEffectProps>;
|
|
9
|
+
export declare function registerSideEffect(loader?: {
|
|
10
|
+
registerComponent: typeof registerComponent;
|
|
11
|
+
}, customMeta?: CodeComponentMeta<SideEffectProps>): void;
|
package/dist/Timer.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
export interface TimerProps {
|
|
3
|
-
onTick: () => void;
|
|
4
|
-
isRunning?: boolean;
|
|
5
|
-
intervalSeconds?: number;
|
|
6
|
-
runWhileEditing: boolean;
|
|
7
|
-
"data-plasmic-canvas-envs"?: number;
|
|
8
|
-
}
|
|
9
|
-
export declare function useInterval(callback: () => void, delay: number | null): void;
|
|
10
|
-
export declare function Timer({ intervalSeconds, isRunning, onTick, runWhileEditing, "data-plasmic-canvas-envs": canvasId, }: TimerProps): null;
|
|
11
|
-
export declare const timerMeta: CodeComponentMeta<TimerProps>;
|
|
12
|
-
export declare function registerTimer(loader?: {
|
|
13
|
-
registerComponent: typeof registerComponent;
|
|
14
|
-
}, customMeta?: CodeComponentMeta<TimerProps>): void;
|
|
1
|
+
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
export interface TimerProps {
|
|
3
|
+
onTick: () => void;
|
|
4
|
+
isRunning?: boolean;
|
|
5
|
+
intervalSeconds?: number;
|
|
6
|
+
runWhileEditing: boolean;
|
|
7
|
+
"data-plasmic-canvas-envs"?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function useInterval(callback: () => void, delay: number | null): void;
|
|
10
|
+
export declare function Timer({ intervalSeconds, isRunning, onTick, runWhileEditing, "data-plasmic-canvas-envs": canvasId, }: TimerProps): null;
|
|
11
|
+
export declare const timerMeta: CodeComponentMeta<TimerProps>;
|
|
12
|
+
export declare function registerTimer(loader?: {
|
|
13
|
+
registerComponent: typeof registerComponent;
|
|
14
|
+
}, customMeta?: CodeComponentMeta<TimerProps>): void;
|
package/dist/Video.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export
|
|
4
|
-
interface VideoActions {
|
|
5
|
-
play(): void;
|
|
6
|
-
pause(): void;
|
|
7
|
-
}
|
|
8
|
-
export declare const Video: React.ForwardRefExoticComponent<
|
|
9
|
-
export declare const videoMeta: CodeComponentMeta<VideoProps>;
|
|
10
|
-
export declare function registerVideo(loader?: {
|
|
11
|
-
registerComponent: typeof registerComponent;
|
|
12
|
-
}, customVideoMeta?: CodeComponentMeta<VideoProps>): void;
|
|
13
|
-
export {};
|
|
1
|
+
import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export type VideoProps = Pick<React.ComponentProps<"video">, "autoPlay" | "controls" | "loop" | "muted" | "playsInline" | "poster" | "preload" | "src">;
|
|
4
|
+
interface VideoActions {
|
|
5
|
+
play(): void;
|
|
6
|
+
pause(): void;
|
|
7
|
+
}
|
|
8
|
+
export declare const Video: React.ForwardRefExoticComponent<VideoProps & React.RefAttributes<VideoActions>>;
|
|
9
|
+
export declare const videoMeta: CodeComponentMeta<VideoProps>;
|
|
10
|
+
export declare function registerVideo(loader?: {
|
|
11
|
+
registerComponent: typeof registerComponent;
|
|
12
|
+
}, customVideoMeta?: CodeComponentMeta<VideoProps>): void;
|
|
13
|
+
export {};
|
package/dist/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare const tuple: <T extends any[]>(...args: T) => T;
|
|
3
|
-
export declare function ensure<T>(x: T | null | undefined): T;
|
|
4
|
-
export declare const isBrowser: boolean;
|
|
5
|
-
export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;
|
|
6
|
-
export declare function useFirstRender(): boolean;
|
|
7
|
-
export declare const useId: (() => string) | undefined;
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const tuple: <T extends any[]>(...args: T) => T;
|
|
3
|
+
export declare function ensure<T>(x: T | null | undefined): T;
|
|
4
|
+
export declare const isBrowser: boolean;
|
|
5
|
+
export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;
|
|
6
|
+
export declare function useFirstRender(): boolean;
|
|
7
|
+
export declare const useId: (() => string) | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from "./ConditionGuard";
|
|
2
|
-
export * from "./Data";
|
|
3
|
-
export * from "./Embed";
|
|
4
|
-
export * from "./Iframe";
|
|
5
|
-
export * from "./LoadingBoundary";
|
|
6
|
-
export * from "./Repeater";
|
|
7
|
-
export * from "./ScrollRevealer";
|
|
8
|
-
export * from "./SideEffect";
|
|
9
|
-
export * from "./Timer";
|
|
10
|
-
export * from "./Video";
|
|
1
|
+
export * from "./ConditionGuard";
|
|
2
|
+
export * from "./Data";
|
|
3
|
+
export * from "./Embed";
|
|
4
|
+
export * from "./Iframe";
|
|
5
|
+
export * from "./LoadingBoundary";
|
|
6
|
+
export * from "./Repeater";
|
|
7
|
+
export * from "./ScrollRevealer";
|
|
8
|
+
export * from "./SideEffect";
|
|
9
|
+
export * from "./Timer";
|
|
10
|
+
export * from "./Video";
|