@plasmicpkgs/plasmic-basic-components 0.0.2 → 0.0.3
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 -5
- package/dist/Embed.d.ts +5 -1
- 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 +4 -0
- package/dist/plasmic-basic-components.cjs.development.js +160 -58
- 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 +140 -59
- 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,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ComponentMeta } from "@plasmicapp/host";
|
|
2
|
+
import registerComponent from "@plasmicapp/host/registerComponent";
|
|
2
3
|
import React, { ComponentProps, CSSProperties, ReactNode } from "react";
|
|
3
4
|
export declare type DataDict = Record<string, any>;
|
|
4
5
|
export declare const DataContext: React.Context<Record<string, any> | undefined>;
|
|
@@ -19,12 +20,14 @@ 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
|
-
}
|
|
29
|
+
}
|
|
30
|
+
export declare function DynamicImage({ selector, propSelectors, ...props }: DynamicImageProps): JSX.Element;
|
|
28
31
|
export interface DynamicCollectionProps extends CommonDynamicProps {
|
|
29
32
|
children?: ReactNode;
|
|
30
33
|
style?: CSSProperties;
|
|
@@ -40,6 +43,22 @@ export interface DynamicCollectionGridProps extends DynamicCollectionProps {
|
|
|
40
43
|
rowGap?: number;
|
|
41
44
|
}
|
|
42
45
|
export declare function DynamicCollectionGrid({ columns, columnGap, rowGap, ...props }: DynamicCollectionGridProps): JSX.Element;
|
|
46
|
+
export declare const dataProviderMeta: ComponentMeta<DataProviderProps>;
|
|
47
|
+
export declare function registerDataProvider(loader?: {
|
|
48
|
+
registerComponent: typeof registerComponent;
|
|
49
|
+
}, customDataProviderMeta?: ComponentMeta<DataProviderProps>): void;
|
|
50
|
+
export declare const dynamicElementMeta: ComponentMeta<CommonDynamicProps>;
|
|
51
|
+
export declare function registerDynamicElement(loader?: {
|
|
52
|
+
registerComponent: typeof registerComponent;
|
|
53
|
+
}, customDynamicElementMeta?: ComponentMeta<CommonDynamicProps>): void;
|
|
54
|
+
export declare const dynamicTextMeta: ComponentMeta<DynamicTextProps>;
|
|
55
|
+
export declare function registerDynamicText(loader?: {
|
|
56
|
+
registerComponent: typeof registerComponent;
|
|
57
|
+
}, customDynamicTextMeta?: ComponentMeta<DynamicTextProps>): void;
|
|
58
|
+
export declare const dynamicImageMeta: ComponentMeta<DynamicImageProps>;
|
|
59
|
+
export declare function registerDynamicImage(loader?: {
|
|
60
|
+
registerComponent: typeof registerComponent;
|
|
61
|
+
}, customDynamicImageMeta?: ComponentMeta<DynamicImageProps>): void;
|
|
43
62
|
export declare const dynamicCollectionProps: {
|
|
44
63
|
readonly selector: {
|
|
45
64
|
readonly type: "string";
|
|
@@ -60,6 +79,10 @@ export declare const dynamicCollectionProps: {
|
|
|
60
79
|
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
80
|
};
|
|
62
81
|
};
|
|
82
|
+
export declare const dynamicCollectionMeta: ComponentMeta<DynamicCollectionProps>;
|
|
83
|
+
export declare function registerDynamicCollection(loader?: {
|
|
84
|
+
registerComponent: typeof registerComponent;
|
|
85
|
+
}, customDynamicCollectionMeta?: ComponentMeta<DynamicCollectionProps>): void;
|
|
63
86
|
export declare const dynamicCollectionGridProps: {
|
|
64
87
|
readonly columns: {
|
|
65
88
|
readonly type: "number";
|
|
@@ -95,3 +118,7 @@ export declare const dynamicCollectionGridProps: {
|
|
|
95
118
|
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
119
|
};
|
|
97
120
|
};
|
|
121
|
+
export declare const dynamicCollectionGridMeta: ComponentMeta<DynamicCollectionGridProps>;
|
|
122
|
+
export declare function registerDynamicCollectionGrid(loader?: {
|
|
123
|
+
registerComponent: typeof registerComponent;
|
|
124
|
+
}, customDynamicCollectionGridMeta?: ComponentMeta<DynamicCollectionGridProps>): void;
|
package/dist/Embed.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
/** @format */
|
|
2
1
|
/// <reference types="react" />
|
|
2
|
+
import registerComponent, { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
3
3
|
export interface EmbedProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
code: string;
|
|
6
6
|
hideInEditor?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export default function Embed({ className, code, hideInEditor, }: EmbedProps): JSX.Element;
|
|
9
|
+
export declare const embedMeta: ComponentMeta<EmbedProps>;
|
|
10
|
+
export declare function registerEmbed(loader?: {
|
|
11
|
+
registerComponent: typeof registerComponent;
|
|
12
|
+
}, 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,9 @@
|
|
|
1
1
|
export * from "./Data";
|
|
2
|
+
export * from "./Embed";
|
|
2
3
|
export { default as Embed } from "./Embed";
|
|
4
|
+
export * from "./Iframe";
|
|
3
5
|
export { default as Iframe } from "./Iframe";
|
|
6
|
+
export * from "./ScrollRevealer";
|
|
4
7
|
export { default as ScrollRevealer } from "./ScrollRevealer";
|
|
8
|
+
export * from "./Video";
|
|
5
9
|
export { default as Video } from "./Video";
|
|
@@ -238,9 +238,11 @@ function DynamicCollectionGrid(_ref9) {
|
|
|
238
238
|
}
|
|
239
239
|
}));
|
|
240
240
|
}
|
|
241
|
-
var thisModule = "@plasmicpkgs/plasmic-basic-components
|
|
242
|
-
|
|
243
|
-
name: "
|
|
241
|
+
var thisModule = "@plasmicpkgs/plasmic-basic-components";
|
|
242
|
+
var dataProviderMeta = {
|
|
243
|
+
name: "hostless-data-provider",
|
|
244
|
+
displayName: "Data Provider",
|
|
245
|
+
importName: "DataProvider",
|
|
244
246
|
importPath: thisModule,
|
|
245
247
|
// description: "Makes some specified data available to the subtree in a context",
|
|
246
248
|
props: {
|
|
@@ -265,20 +267,27 @@ registerComponent(DataProvider, {
|
|
|
265
267
|
type: "slot",
|
|
266
268
|
defaultValue: [{
|
|
267
269
|
type: "component",
|
|
268
|
-
name: "
|
|
270
|
+
name: "hostless-dynamic-text",
|
|
269
271
|
props: {
|
|
270
272
|
selector: "celebrities.0.name"
|
|
271
273
|
}
|
|
272
274
|
}, {
|
|
273
275
|
type: "component",
|
|
274
|
-
name: "
|
|
276
|
+
name: "hostless-dynamic-image",
|
|
275
277
|
props: {
|
|
276
278
|
selector: "celebrities.0.profilePicture"
|
|
277
279
|
}
|
|
278
280
|
}]
|
|
279
281
|
}
|
|
280
282
|
}
|
|
281
|
-
}
|
|
283
|
+
};
|
|
284
|
+
function registerDataProvider(loader, customDataProviderMeta) {
|
|
285
|
+
if (loader) {
|
|
286
|
+
loader.registerComponent(DataProvider, customDataProviderMeta != null ? customDataProviderMeta : dataProviderMeta);
|
|
287
|
+
} else {
|
|
288
|
+
registerComponent(DataProvider, customDataProviderMeta != null ? customDataProviderMeta : dataProviderMeta);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
282
291
|
var dynamicPropsWithoutTag = {
|
|
283
292
|
propSelectors: {
|
|
284
293
|
type: "object",
|
|
@@ -296,33 +305,60 @@ var dynamicProps = /*#__PURE__*/_extends({}, dynamicPropsWithoutTag, {
|
|
|
296
305
|
}); // TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.
|
|
297
306
|
|
|
298
307
|
|
|
299
|
-
|
|
300
|
-
name: "
|
|
308
|
+
var dynamicElementMeta = {
|
|
309
|
+
name: "hostless-dynamic-element",
|
|
310
|
+
displayName: "Dynamic Element",
|
|
311
|
+
importName: "DynamicElement",
|
|
301
312
|
importPath: thisModule,
|
|
302
|
-
props: _extends({}, dynamicProps, {
|
|
313
|
+
props: /*#__PURE__*/_extends({}, dynamicProps, {
|
|
303
314
|
children: "slot"
|
|
304
315
|
})
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
|
|
316
|
+
};
|
|
317
|
+
function registerDynamicElement(loader, customDynamicElementMeta) {
|
|
318
|
+
if (loader) {
|
|
319
|
+
loader.registerComponent(DynamicElement, customDynamicElementMeta != null ? customDynamicElementMeta : dynamicElementMeta);
|
|
320
|
+
} else {
|
|
321
|
+
registerComponent(DynamicElement, customDynamicElementMeta != null ? customDynamicElementMeta : dynamicElementMeta);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
var dynamicTextMeta = {
|
|
325
|
+
name: "hostless-dynamic-text",
|
|
326
|
+
importName: "DynamicText",
|
|
327
|
+
displayName: "Dynamic Text",
|
|
308
328
|
importPath: thisModule,
|
|
309
|
-
props: _extends({}, dynamicProps, {
|
|
329
|
+
props: /*#__PURE__*/_extends({}, dynamicProps, {
|
|
310
330
|
selector: {
|
|
311
331
|
type: "string",
|
|
312
332
|
description: "The selector expression to use to get the text, such as: someVariable.0.someField"
|
|
313
333
|
}
|
|
314
334
|
})
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
335
|
+
};
|
|
336
|
+
function registerDynamicText(loader, customDynamicTextMeta) {
|
|
337
|
+
if (loader) {
|
|
338
|
+
loader.registerComponent(DynamicText, customDynamicTextMeta != null ? customDynamicTextMeta : dynamicTextMeta);
|
|
339
|
+
} else {
|
|
340
|
+
registerComponent(DynamicText, customDynamicTextMeta != null ? customDynamicTextMeta : dynamicTextMeta);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
var dynamicImageMeta = {
|
|
344
|
+
name: "hostless-dynamic-image",
|
|
345
|
+
displayName: "Dynamic Image",
|
|
346
|
+
importName: "DynamicImage",
|
|
318
347
|
importPath: thisModule,
|
|
319
|
-
props: _extends({}, dynamicPropsWithoutTag, {
|
|
348
|
+
props: /*#__PURE__*/_extends({}, dynamicPropsWithoutTag, {
|
|
320
349
|
selector: {
|
|
321
350
|
type: "string",
|
|
322
351
|
description: "The selector expression to use to get the image source URL, such as: someVariable.0.someField"
|
|
323
352
|
}
|
|
324
353
|
})
|
|
325
|
-
}
|
|
354
|
+
};
|
|
355
|
+
function registerDynamicImage(loader, customDynamicImageMeta) {
|
|
356
|
+
if (loader) {
|
|
357
|
+
loader.registerComponent(DynamicImage, customDynamicImageMeta != null ? customDynamicImageMeta : dynamicImageMeta);
|
|
358
|
+
} else {
|
|
359
|
+
registerComponent(DynamicImage, customDynamicImageMeta != null ? customDynamicImageMeta : dynamicImageMeta);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
326
362
|
var dynamicCollectionProps = /*#__PURE__*/_extends({}, dynamicProps, {
|
|
327
363
|
selector: {
|
|
328
364
|
type: "string",
|
|
@@ -335,11 +371,20 @@ var dynamicCollectionProps = /*#__PURE__*/_extends({}, dynamicProps, {
|
|
|
335
371
|
},
|
|
336
372
|
children: "slot"
|
|
337
373
|
});
|
|
338
|
-
|
|
339
|
-
name: "
|
|
374
|
+
var dynamicCollectionMeta = {
|
|
375
|
+
name: "hostless-dynamic-collection",
|
|
376
|
+
displayName: "Dynamic Collection",
|
|
377
|
+
importName: "DynamicCollection",
|
|
340
378
|
importPath: thisModule,
|
|
341
379
|
props: dynamicCollectionProps
|
|
342
|
-
}
|
|
380
|
+
};
|
|
381
|
+
function registerDynamicCollection(loader, customDynamicCollectionMeta) {
|
|
382
|
+
if (loader) {
|
|
383
|
+
loader.registerComponent(DynamicCollection, customDynamicCollectionMeta != null ? customDynamicCollectionMeta : dynamicCollectionMeta);
|
|
384
|
+
} else {
|
|
385
|
+
registerComponent(DynamicCollection, customDynamicCollectionMeta != null ? customDynamicCollectionMeta : dynamicCollectionMeta);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
343
388
|
var dynamicCollectionGridProps = /*#__PURE__*/_extends({}, dynamicCollectionProps, {
|
|
344
389
|
columns: {
|
|
345
390
|
type: "number",
|
|
@@ -357,13 +402,21 @@ var dynamicCollectionGridProps = /*#__PURE__*/_extends({}, dynamicCollectionProp
|
|
|
357
402
|
description: "The gap between rows"
|
|
358
403
|
}
|
|
359
404
|
});
|
|
360
|
-
|
|
361
|
-
name: "
|
|
405
|
+
var dynamicCollectionGridMeta = {
|
|
406
|
+
name: "hostless-dynamic-collection-grid",
|
|
407
|
+
displayName: "Dynamic Collection Grid",
|
|
408
|
+
importName: "DynamicCollectionGrid",
|
|
362
409
|
importPath: thisModule,
|
|
363
410
|
props: dynamicCollectionGridProps
|
|
364
|
-
}
|
|
411
|
+
};
|
|
412
|
+
function registerDynamicCollectionGrid(loader, customDynamicCollectionGridMeta) {
|
|
413
|
+
if (loader) {
|
|
414
|
+
loader.registerComponent(DynamicCollectionGrid, customDynamicCollectionGridMeta != null ? customDynamicCollectionGridMeta : dynamicCollectionGridMeta);
|
|
415
|
+
} else {
|
|
416
|
+
registerComponent(DynamicCollectionGrid, customDynamicCollectionGridMeta != null ? customDynamicCollectionGridMeta : dynamicCollectionGridMeta);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
365
419
|
|
|
366
|
-
/** @format */
|
|
367
420
|
function Embed(_ref) {
|
|
368
421
|
var className = _ref.className,
|
|
369
422
|
code = _ref.code,
|
|
@@ -393,9 +446,11 @@ function Embed(_ref) {
|
|
|
393
446
|
}
|
|
394
447
|
});
|
|
395
448
|
}
|
|
396
|
-
|
|
397
|
-
name: "
|
|
398
|
-
|
|
449
|
+
var embedMeta = {
|
|
450
|
+
name: "hostless-embed",
|
|
451
|
+
displayName: "Embed",
|
|
452
|
+
importName: "Embed",
|
|
453
|
+
importPath: "@plasmicpkgs/plasmic-basic-components",
|
|
399
454
|
props: {
|
|
400
455
|
code: {
|
|
401
456
|
type: "string",
|
|
@@ -404,23 +459,29 @@ registerComponent(Embed, {
|
|
|
404
459
|
hideInEditor: {
|
|
405
460
|
type: "boolean",
|
|
406
461
|
displayName: "Hide in editor",
|
|
407
|
-
description: "Disable running the code while editing in Plasmic Studio (may require reload)"
|
|
462
|
+
description: "Disable running the code while editing in Plasmic Studio (may require reload)",
|
|
463
|
+
editOnly: true
|
|
408
464
|
}
|
|
409
465
|
},
|
|
410
|
-
isDefaultExport: true,
|
|
411
466
|
defaultStyles: {
|
|
412
467
|
maxWidth: "100%"
|
|
413
468
|
}
|
|
414
|
-
}
|
|
469
|
+
};
|
|
470
|
+
function registerEmbed(loader, customEmbedMeta) {
|
|
471
|
+
if (loader) {
|
|
472
|
+
loader.registerComponent(Embed, customEmbedMeta != null ? customEmbedMeta : embedMeta);
|
|
473
|
+
} else {
|
|
474
|
+
registerComponent(Embed, customEmbedMeta != null ? customEmbedMeta : embedMeta);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
415
477
|
|
|
416
|
-
/** @format */
|
|
417
478
|
function Iframe(_ref) {
|
|
418
|
-
var
|
|
479
|
+
var preview = _ref.preview,
|
|
419
480
|
src = _ref.src,
|
|
420
481
|
className = _ref.className;
|
|
421
482
|
var isEditing = React.useContext(host.PlasmicCanvasContext);
|
|
422
483
|
|
|
423
|
-
if (isEditing && !
|
|
484
|
+
if (isEditing && !preview) {
|
|
424
485
|
return React__default.createElement("div", {
|
|
425
486
|
className: className
|
|
426
487
|
}, React__default.createElement("div", {
|
|
@@ -448,27 +509,34 @@ function Iframe(_ref) {
|
|
|
448
509
|
className: className
|
|
449
510
|
});
|
|
450
511
|
}
|
|
451
|
-
|
|
452
|
-
name: "
|
|
453
|
-
|
|
512
|
+
var iframeMeta = {
|
|
513
|
+
name: "hostless-iframe",
|
|
514
|
+
displayName: "Iframe",
|
|
515
|
+
importName: "Iframe",
|
|
516
|
+
importPath: "@plasmicpkgs/plasmic-basic-components",
|
|
454
517
|
props: {
|
|
455
518
|
src: {
|
|
456
519
|
type: "string",
|
|
457
520
|
defaultValue: "https://www.example.com"
|
|
458
521
|
},
|
|
459
|
-
|
|
522
|
+
preview: {
|
|
460
523
|
type: "boolean",
|
|
461
|
-
displayName: "Preview",
|
|
462
524
|
description: "Load the iframe while editing in Plasmic Studio"
|
|
463
525
|
}
|
|
464
526
|
},
|
|
465
|
-
isDefaultExport: true,
|
|
466
527
|
defaultStyles: {
|
|
467
528
|
width: "300px",
|
|
468
529
|
height: "150px",
|
|
469
530
|
maxWidth: "100%"
|
|
470
531
|
}
|
|
471
|
-
}
|
|
532
|
+
};
|
|
533
|
+
function registerIframe(loader, customIframeMeta) {
|
|
534
|
+
if (loader) {
|
|
535
|
+
loader.registerComponent(Iframe, customIframeMeta != null ? customIframeMeta : iframeMeta);
|
|
536
|
+
} else {
|
|
537
|
+
registerComponent(Iframe, customIframeMeta != null ? customIframeMeta : iframeMeta);
|
|
538
|
+
}
|
|
539
|
+
}
|
|
472
540
|
|
|
473
541
|
function useDirectionalIntersection(_ref) {
|
|
474
542
|
var ref = _ref.ref,
|
|
@@ -534,10 +602,11 @@ function ScrollRevealer(_ref2) {
|
|
|
534
602
|
ref: intersectionRef
|
|
535
603
|
}, revealed ? children : null);
|
|
536
604
|
}
|
|
537
|
-
|
|
538
|
-
name: "
|
|
605
|
+
var scrollRevealerMeta = {
|
|
606
|
+
name: "hostless-scroll-revealer",
|
|
607
|
+
importName: "ScrollRevealer",
|
|
539
608
|
displayName: "Scroll Revealer",
|
|
540
|
-
importPath: "@plasmicpkgs/plasmic-basic-components
|
|
609
|
+
importPath: "@plasmicpkgs/plasmic-basic-components",
|
|
541
610
|
props: {
|
|
542
611
|
children: "slot",
|
|
543
612
|
scrollDownThreshold: {
|
|
@@ -553,21 +622,29 @@ registerComponent(ScrollRevealer, {
|
|
|
553
622
|
description: "While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)"
|
|
554
623
|
}
|
|
555
624
|
},
|
|
556
|
-
isDefaultExport: true,
|
|
557
625
|
defaultStyles: {
|
|
558
626
|
width: "stretch",
|
|
559
627
|
maxWidth: "100%"
|
|
560
628
|
}
|
|
561
|
-
}
|
|
629
|
+
};
|
|
630
|
+
function registerScrollRevealer(loader, customScrollRevealerMeta) {
|
|
631
|
+
if (loader) {
|
|
632
|
+
loader.registerComponent(ScrollRevealer, customScrollRevealerMeta != null ? customScrollRevealerMeta : scrollRevealerMeta);
|
|
633
|
+
} else {
|
|
634
|
+
registerComponent(ScrollRevealer, customScrollRevealerMeta != null ? customScrollRevealerMeta : scrollRevealerMeta);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
562
637
|
|
|
563
638
|
var Video = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
564
639
|
return React__default.createElement("video", Object.assign({
|
|
565
640
|
ref: ref
|
|
566
641
|
}, props));
|
|
567
642
|
});
|
|
568
|
-
|
|
569
|
-
name: "
|
|
570
|
-
|
|
643
|
+
var videoMeta = {
|
|
644
|
+
name: "hostless-html-video",
|
|
645
|
+
importName: "Video",
|
|
646
|
+
displayName: "HTML Video",
|
|
647
|
+
importPath: "@plasmicpkgs/plasmic-basic-components",
|
|
571
648
|
props: {
|
|
572
649
|
src: {
|
|
573
650
|
type: "string",
|
|
@@ -600,13 +677,11 @@ registerComponent(Video, {
|
|
|
600
677
|
displayName: "Muted",
|
|
601
678
|
description: "Whether audio should be muted"
|
|
602
679
|
},
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
// "Image to show while video is downloading",
|
|
609
|
-
// },
|
|
680
|
+
poster: {
|
|
681
|
+
type: "imageUrl",
|
|
682
|
+
displayName: "Poster (placeholder) image",
|
|
683
|
+
description: "Image to show while video is downloading"
|
|
684
|
+
},
|
|
610
685
|
preload: {
|
|
611
686
|
type: "choice",
|
|
612
687
|
options: ["none", "metadata", "auto"],
|
|
@@ -614,13 +689,19 @@ registerComponent(Video, {
|
|
|
614
689
|
description: "Whether to preload nothing, metadata only, or the full video"
|
|
615
690
|
}
|
|
616
691
|
},
|
|
617
|
-
isDefaultExport: true,
|
|
618
692
|
defaultStyles: {
|
|
619
693
|
height: "hug",
|
|
620
694
|
width: "640px",
|
|
621
695
|
maxWidth: "100%"
|
|
622
696
|
}
|
|
623
|
-
}
|
|
697
|
+
};
|
|
698
|
+
function registerVideo(loader, customVideoMeta) {
|
|
699
|
+
if (loader) {
|
|
700
|
+
loader.registerComponent(Video, customVideoMeta != null ? customVideoMeta : videoMeta);
|
|
701
|
+
} else {
|
|
702
|
+
registerComponent(Video, customVideoMeta != null ? customVideoMeta : videoMeta);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
624
705
|
|
|
625
706
|
exports.DataContext = DataContext;
|
|
626
707
|
exports.DataProvider = DataProvider;
|
|
@@ -634,9 +715,30 @@ exports.Iframe = Iframe;
|
|
|
634
715
|
exports.ScrollRevealer = ScrollRevealer;
|
|
635
716
|
exports.Video = Video;
|
|
636
717
|
exports.applySelector = applySelector;
|
|
718
|
+
exports.dataProviderMeta = dataProviderMeta;
|
|
719
|
+
exports.dynamicCollectionGridMeta = dynamicCollectionGridMeta;
|
|
637
720
|
exports.dynamicCollectionGridProps = dynamicCollectionGridProps;
|
|
721
|
+
exports.dynamicCollectionMeta = dynamicCollectionMeta;
|
|
638
722
|
exports.dynamicCollectionProps = dynamicCollectionProps;
|
|
723
|
+
exports.dynamicElementMeta = dynamicElementMeta;
|
|
724
|
+
exports.dynamicImageMeta = dynamicImageMeta;
|
|
725
|
+
exports.dynamicTextMeta = dynamicTextMeta;
|
|
726
|
+
exports.embedMeta = embedMeta;
|
|
727
|
+
exports.iframeMeta = iframeMeta;
|
|
728
|
+
exports.registerDataProvider = registerDataProvider;
|
|
729
|
+
exports.registerDynamicCollection = registerDynamicCollection;
|
|
730
|
+
exports.registerDynamicCollectionGrid = registerDynamicCollectionGrid;
|
|
731
|
+
exports.registerDynamicElement = registerDynamicElement;
|
|
732
|
+
exports.registerDynamicImage = registerDynamicImage;
|
|
733
|
+
exports.registerDynamicText = registerDynamicText;
|
|
734
|
+
exports.registerEmbed = registerEmbed;
|
|
735
|
+
exports.registerIframe = registerIframe;
|
|
736
|
+
exports.registerScrollRevealer = registerScrollRevealer;
|
|
737
|
+
exports.registerVideo = registerVideo;
|
|
738
|
+
exports.scrollRevealerMeta = scrollRevealerMeta;
|
|
639
739
|
exports.useDataEnv = useDataEnv;
|
|
740
|
+
exports.useDirectionalIntersection = useDirectionalIntersection;
|
|
640
741
|
exports.useSelector = useSelector;
|
|
641
742
|
exports.useSelectors = useSelectors;
|
|
743
|
+
exports.videoMeta = videoMeta;
|
|
642
744
|
//# sourceMappingURL=plasmic-basic-components.cjs.development.js.map
|