@plasmicpkgs/plasmic-basic-components 0.0.5 → 0.0.9
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 +19 -77
- package/dist/Embed.d.ts +2 -0
- package/dist/EmbedCss.d.ts +10 -0
- package/dist/index.d.ts +4 -0
- package/dist/plasmic-basic-components.cjs.development.js +128 -81
- 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 +120 -75
- package/dist/plasmic-basic-components.esm.js.map +1 -1
- package/package.json +4 -4
package/dist/Data.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentMeta } from "@plasmicapp/host";
|
|
2
2
|
import registerComponent from "@plasmicapp/host/registerComponent";
|
|
3
|
-
import React, { ComponentProps,
|
|
3
|
+
import React, { ComponentProps, ReactNode } from "react";
|
|
4
4
|
export declare type DataDict = Record<string, any>;
|
|
5
5
|
export declare const DataContext: React.Context<Record<string, any> | undefined>;
|
|
6
6
|
export declare function applySelector(rawData: DataDict | undefined, selector: string | undefined): any;
|
|
@@ -28,21 +28,30 @@ export interface DynamicImageProps extends CommonDynamicProps, ComponentProps<"i
|
|
|
28
28
|
selector?: string;
|
|
29
29
|
}
|
|
30
30
|
export declare function DynamicImage({ selector, propSelectors, ...props }: DynamicImageProps): JSX.Element;
|
|
31
|
-
export interface
|
|
31
|
+
export interface DynamicRepeaterProps {
|
|
32
32
|
children?: ReactNode;
|
|
33
|
-
style?: CSSProperties;
|
|
34
33
|
loopItemName?: string;
|
|
35
34
|
keySelector?: string;
|
|
36
35
|
selector?: string;
|
|
37
36
|
data?: any;
|
|
38
37
|
}
|
|
39
|
-
export declare function
|
|
40
|
-
export
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
38
|
+
export declare function DynamicRepeater({ children, loopItemName, keySelector, selector, data, }: DynamicRepeaterProps): JSX.Element;
|
|
39
|
+
export declare const dynamicRepeaterProps: {
|
|
40
|
+
readonly selector: {
|
|
41
|
+
readonly type: "string";
|
|
42
|
+
readonly description: "The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField";
|
|
43
|
+
};
|
|
44
|
+
readonly loopItemName: {
|
|
45
|
+
readonly type: "string";
|
|
46
|
+
readonly defaultValue: "item";
|
|
47
|
+
readonly description: "The name of the variable to use to store the current item in the loop";
|
|
48
|
+
};
|
|
49
|
+
readonly children: "slot";
|
|
50
|
+
};
|
|
51
|
+
export declare const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps>;
|
|
52
|
+
export declare function registerDynamicRepeater(loader?: {
|
|
53
|
+
registerComponent: typeof registerComponent;
|
|
54
|
+
}, customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>): void;
|
|
46
55
|
export declare const dataProviderMeta: ComponentMeta<DataProviderProps>;
|
|
47
56
|
export declare function registerDataProvider(loader?: {
|
|
48
57
|
registerComponent: typeof registerComponent;
|
|
@@ -59,70 +68,3 @@ export declare const dynamicImageMeta: ComponentMeta<DynamicImageProps>;
|
|
|
59
68
|
export declare function registerDynamicImage(loader?: {
|
|
60
69
|
registerComponent: typeof registerComponent;
|
|
61
70
|
}, customDynamicImageMeta?: ComponentMeta<DynamicImageProps>): void;
|
|
62
|
-
export declare const dynamicCollectionProps: {
|
|
63
|
-
readonly selector: {
|
|
64
|
-
readonly type: "string";
|
|
65
|
-
readonly description: "The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField";
|
|
66
|
-
};
|
|
67
|
-
readonly loopItemName: {
|
|
68
|
-
readonly type: "string";
|
|
69
|
-
readonly defaultValue: "item";
|
|
70
|
-
readonly description: "The name of the variable to use to store the current item in the loop";
|
|
71
|
-
};
|
|
72
|
-
readonly children: "slot";
|
|
73
|
-
readonly tag: {
|
|
74
|
-
readonly type: "string";
|
|
75
|
-
readonly defaultValueHint: "div";
|
|
76
|
-
readonly description: "The HTML tag to use";
|
|
77
|
-
};
|
|
78
|
-
readonly propSelectors: {
|
|
79
|
-
readonly type: "object";
|
|
80
|
-
readonly defaultValueHint: {};
|
|
81
|
-
readonly description: "An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.";
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
export declare const dynamicCollectionMeta: ComponentMeta<DynamicCollectionProps>;
|
|
85
|
-
export declare function registerDynamicCollection(loader?: {
|
|
86
|
-
registerComponent: typeof registerComponent;
|
|
87
|
-
}, customDynamicCollectionMeta?: ComponentMeta<DynamicCollectionProps>): void;
|
|
88
|
-
export declare const dynamicCollectionGridProps: {
|
|
89
|
-
readonly columns: {
|
|
90
|
-
readonly type: "number";
|
|
91
|
-
readonly defaultValue: 2;
|
|
92
|
-
readonly description: "The number of columns to use in the grid";
|
|
93
|
-
};
|
|
94
|
-
readonly columnGap: {
|
|
95
|
-
readonly type: "number";
|
|
96
|
-
readonly defaultValue: 8;
|
|
97
|
-
readonly description: "The gap between columns";
|
|
98
|
-
};
|
|
99
|
-
readonly rowGap: {
|
|
100
|
-
readonly type: "number";
|
|
101
|
-
readonly defaultValue: 8;
|
|
102
|
-
readonly description: "The gap between rows";
|
|
103
|
-
};
|
|
104
|
-
readonly selector: {
|
|
105
|
-
readonly type: "string";
|
|
106
|
-
readonly description: "The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField";
|
|
107
|
-
};
|
|
108
|
-
readonly loopItemName: {
|
|
109
|
-
readonly type: "string";
|
|
110
|
-
readonly defaultValue: "item";
|
|
111
|
-
readonly description: "The name of the variable to use to store the current item in the loop";
|
|
112
|
-
};
|
|
113
|
-
readonly children: "slot";
|
|
114
|
-
readonly tag: {
|
|
115
|
-
readonly type: "string";
|
|
116
|
-
readonly defaultValueHint: "div";
|
|
117
|
-
readonly description: "The HTML tag to use";
|
|
118
|
-
};
|
|
119
|
-
readonly propSelectors: {
|
|
120
|
-
readonly type: "object";
|
|
121
|
-
readonly defaultValueHint: {};
|
|
122
|
-
readonly description: "An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.";
|
|
123
|
-
};
|
|
124
|
-
};
|
|
125
|
-
export declare const dynamicCollectionGridMeta: ComponentMeta<DynamicCollectionGridProps>;
|
|
126
|
-
export declare function registerDynamicCollectionGrid(loader?: {
|
|
127
|
-
registerComponent: typeof registerComponent;
|
|
128
|
-
}, customDynamicCollectionGridMeta?: ComponentMeta<DynamicCollectionGridProps>): void;
|
package/dist/Embed.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import registerComponent, { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
3
|
export interface EmbedProps {
|
|
3
4
|
className?: string;
|
|
4
5
|
code: string;
|
|
5
6
|
hideInEditor?: boolean;
|
|
6
7
|
}
|
|
8
|
+
export default function Embed({ className, code, hideInEditor, }: EmbedProps): JSX.Element;
|
|
7
9
|
export declare const embedMeta: ComponentMeta<EmbedProps>;
|
|
8
10
|
export declare function registerEmbed(loader?: {
|
|
9
11
|
registerComponent: typeof registerComponent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import registerComponent, { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
3
|
+
export interface EmbedCssProps {
|
|
4
|
+
css: string;
|
|
5
|
+
}
|
|
6
|
+
export default function EmbedCss({ css }: EmbedCssProps): JSX.Element;
|
|
7
|
+
export declare const embedCssMeta: ComponentMeta<EmbedCssProps>;
|
|
8
|
+
export declare function registerEmbedCss(loader?: {
|
|
9
|
+
registerComponent: typeof registerComponent;
|
|
10
|
+
}, customEmbedCssMeta?: ComponentMeta<EmbedCssProps>): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export * from "./Data";
|
|
2
|
+
export * from "./Embed";
|
|
3
|
+
export { default as Embed } from "./Embed";
|
|
2
4
|
export * from "./Iframe";
|
|
3
5
|
export { default as Iframe } from "./Iframe";
|
|
4
6
|
export * from "./ScrollRevealer";
|
|
5
7
|
export { default as ScrollRevealer } from "./ScrollRevealer";
|
|
6
8
|
export * from "./Video";
|
|
7
9
|
export { default as Video } from "./Video";
|
|
10
|
+
export * from "./EmbedCss";
|
|
11
|
+
export { default as EmbedCss } from "./EmbedCss";
|
|
@@ -87,8 +87,17 @@ var tuple = function tuple() {
|
|
|
87
87
|
|
|
88
88
|
return args;
|
|
89
89
|
};
|
|
90
|
+
function ensure(x) {
|
|
91
|
+
if (x === null || x === undefined) {
|
|
92
|
+
debugger;
|
|
93
|
+
throw new Error("Value must not be undefined or null");
|
|
94
|
+
} else {
|
|
95
|
+
return x;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
90
98
|
|
|
91
99
|
var DataContext = /*#__PURE__*/React.createContext(undefined);
|
|
100
|
+
var thisModule = "@plasmicpkgs/plasmic-basic-components";
|
|
92
101
|
function applySelector(rawData, selector) {
|
|
93
102
|
if (!selector) {
|
|
94
103
|
return undefined;
|
|
@@ -191,19 +200,17 @@ function DynamicImage(_ref6) {
|
|
|
191
200
|
src: "https://studio.plasmic.app/static/img/placeholder.png"
|
|
192
201
|
}));
|
|
193
202
|
}
|
|
194
|
-
function
|
|
203
|
+
function DynamicRepeater(_ref7) {
|
|
195
204
|
var _ref8;
|
|
196
205
|
|
|
197
|
-
var
|
|
206
|
+
var children = _ref7.children,
|
|
198
207
|
loopItemName = _ref7.loopItemName,
|
|
199
|
-
children = _ref7.children,
|
|
200
|
-
data = _ref7.data,
|
|
201
208
|
keySelector = _ref7.keySelector,
|
|
202
|
-
|
|
203
|
-
|
|
209
|
+
selector = _ref7.selector,
|
|
210
|
+
data = _ref7.data;
|
|
204
211
|
// Defaults to an array of three items.
|
|
205
212
|
var finalData = (_ref8 = data != null ? data : useSelector(selector)) != null ? _ref8 : [1, 2, 3];
|
|
206
|
-
return React__default.createElement(
|
|
213
|
+
return React__default.createElement(React__default.Fragment, null, finalData == null ? void 0 : finalData.map == null ? void 0 : finalData.map(function (item, index) {
|
|
207
214
|
var _applySelector;
|
|
208
215
|
|
|
209
216
|
return React__default.createElement(DataProvider, {
|
|
@@ -213,24 +220,32 @@ function DynamicCollection(_ref7) {
|
|
|
213
220
|
}, host.repeatedElement(index === 0, children));
|
|
214
221
|
}));
|
|
215
222
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
223
|
+
var dynamicRepeaterProps = {
|
|
224
|
+
selector: {
|
|
225
|
+
type: "string",
|
|
226
|
+
description: "The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField"
|
|
227
|
+
},
|
|
228
|
+
loopItemName: {
|
|
229
|
+
type: "string",
|
|
230
|
+
defaultValue: "item",
|
|
231
|
+
description: "The name of the variable to use to store the current item in the loop"
|
|
232
|
+
},
|
|
233
|
+
children: "slot"
|
|
234
|
+
};
|
|
235
|
+
var dynamicRepeaterMeta = {
|
|
236
|
+
name: "hostless-dynamic-repeater",
|
|
237
|
+
displayName: "Dynamic Repeater",
|
|
238
|
+
importName: "DynamicRepeater",
|
|
239
|
+
importPath: thisModule,
|
|
240
|
+
props: dynamicRepeaterProps
|
|
241
|
+
};
|
|
242
|
+
function registerDynamicRepeater(loader, customDynamicRepeaterMeta) {
|
|
243
|
+
if (loader) {
|
|
244
|
+
loader.registerComponent(DynamicRepeater, customDynamicRepeaterMeta != null ? customDynamicRepeaterMeta : dynamicRepeaterMeta);
|
|
245
|
+
} else {
|
|
246
|
+
registerComponent(DynamicRepeater, customDynamicRepeaterMeta != null ? customDynamicRepeaterMeta : dynamicRepeaterMeta);
|
|
247
|
+
}
|
|
232
248
|
}
|
|
233
|
-
var thisModule = "@plasmicpkgs/plasmic-basic-components";
|
|
234
249
|
var dataProviderMeta = {
|
|
235
250
|
name: "hostless-data-provider",
|
|
236
251
|
displayName: "Data Provider",
|
|
@@ -351,61 +366,62 @@ function registerDynamicImage(loader, customDynamicImageMeta) {
|
|
|
351
366
|
registerComponent(DynamicImage, customDynamicImageMeta != null ? customDynamicImageMeta : dynamicImageMeta);
|
|
352
367
|
}
|
|
353
368
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
369
|
+
|
|
370
|
+
function Embed(_ref) {
|
|
371
|
+
var className = _ref.className,
|
|
372
|
+
code = _ref.code,
|
|
373
|
+
_ref$hideInEditor = _ref.hideInEditor,
|
|
374
|
+
hideInEditor = _ref$hideInEditor === void 0 ? false : _ref$hideInEditor;
|
|
375
|
+
var rootElt = React.useRef(null);
|
|
376
|
+
React.useEffect(function () {
|
|
377
|
+
if (hideInEditor) {
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
Array.from(ensure(rootElt.current).querySelectorAll("script")).forEach(function (oldScript) {
|
|
382
|
+
var newScript = document.createElement("script");
|
|
383
|
+
Array.from(oldScript.attributes).forEach(function (attr) {
|
|
384
|
+
return newScript.setAttribute(attr.name, attr.value);
|
|
385
|
+
});
|
|
386
|
+
newScript.appendChild(document.createTextNode(oldScript.innerHTML));
|
|
387
|
+
ensure(oldScript.parentNode).replaceChild(newScript, oldScript);
|
|
388
|
+
});
|
|
389
|
+
}, [code, hideInEditor]);
|
|
390
|
+
var effectiveCode = hideInEditor ? "" : code;
|
|
391
|
+
return React__default.createElement("div", {
|
|
392
|
+
ref: rootElt,
|
|
393
|
+
className: className,
|
|
394
|
+
dangerouslySetInnerHTML: {
|
|
395
|
+
__html: effectiveCode
|
|
396
|
+
}
|
|
397
|
+
});
|
|
379
398
|
}
|
|
380
|
-
var
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
399
|
+
var embedMeta = {
|
|
400
|
+
name: "hostless-embed",
|
|
401
|
+
displayName: "Embed HTML",
|
|
402
|
+
importName: "Embed",
|
|
403
|
+
importPath: "@plasmicpkgs/plasmic-basic-components",
|
|
404
|
+
props: {
|
|
405
|
+
code: {
|
|
406
|
+
type: "string",
|
|
407
|
+
defaultValue: "https://www.example.com"
|
|
408
|
+
},
|
|
409
|
+
hideInEditor: {
|
|
410
|
+
type: "boolean",
|
|
411
|
+
displayName: "Hide in editor",
|
|
412
|
+
description: "Disable running the code while editing in Plasmic Studio (may require reload)",
|
|
413
|
+
editOnly: true
|
|
414
|
+
}
|
|
390
415
|
},
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
defaultValue: 8,
|
|
394
|
-
description: "The gap between rows"
|
|
416
|
+
defaultStyles: {
|
|
417
|
+
maxWidth: "100%"
|
|
395
418
|
}
|
|
396
|
-
});
|
|
397
|
-
var dynamicCollectionGridMeta = {
|
|
398
|
-
name: "hostless-dynamic-collection-grid",
|
|
399
|
-
displayName: "Dynamic Collection Grid",
|
|
400
|
-
importName: "DynamicCollectionGrid",
|
|
401
|
-
importPath: thisModule,
|
|
402
|
-
props: dynamicCollectionGridProps
|
|
403
419
|
};
|
|
404
|
-
function
|
|
420
|
+
function registerEmbed(loader, customEmbedMeta) {
|
|
405
421
|
if (loader) {
|
|
406
|
-
loader.registerComponent(
|
|
422
|
+
loader.registerComponent(Embed, customEmbedMeta != null ? customEmbedMeta : embedMeta);
|
|
407
423
|
} else {
|
|
408
|
-
registerComponent(
|
|
424
|
+
registerComponent(Embed, customEmbedMeta != null ? customEmbedMeta : embedMeta);
|
|
409
425
|
}
|
|
410
426
|
}
|
|
411
427
|
|
|
@@ -637,32 +653,63 @@ function registerVideo(loader, customVideoMeta) {
|
|
|
637
653
|
}
|
|
638
654
|
}
|
|
639
655
|
|
|
656
|
+
function EmbedCss(_ref) {
|
|
657
|
+
var css = _ref.css;
|
|
658
|
+
return React__default.createElement("style", {
|
|
659
|
+
dangerouslySetInnerHTML: {
|
|
660
|
+
__html: css
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
var embedCssMeta = {
|
|
665
|
+
name: "hostless-embed-css",
|
|
666
|
+
displayName: "EmbedCss",
|
|
667
|
+
importName: "EmbedCss",
|
|
668
|
+
importPath: "@plasmicpkgs/plasmic-basic-components",
|
|
669
|
+
props: {
|
|
670
|
+
css: {
|
|
671
|
+
type: "string",
|
|
672
|
+
defaultValueHint: "Some CSS snippet",
|
|
673
|
+
description: "CSS rules to be inserted"
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
function registerEmbedCss(loader, customEmbedCssMeta) {
|
|
678
|
+
if (loader) {
|
|
679
|
+
loader.registerComponent(EmbedCss, customEmbedCssMeta != null ? customEmbedCssMeta : embedCssMeta);
|
|
680
|
+
} else {
|
|
681
|
+
registerComponent(EmbedCss, customEmbedCssMeta != null ? customEmbedCssMeta : embedCssMeta);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
640
685
|
exports.DataContext = DataContext;
|
|
641
686
|
exports.DataProvider = DataProvider;
|
|
642
|
-
exports.DynamicCollection = DynamicCollection;
|
|
643
|
-
exports.DynamicCollectionGrid = DynamicCollectionGrid;
|
|
644
687
|
exports.DynamicElement = DynamicElement;
|
|
645
688
|
exports.DynamicImage = DynamicImage;
|
|
689
|
+
exports.DynamicRepeater = DynamicRepeater;
|
|
646
690
|
exports.DynamicText = DynamicText;
|
|
691
|
+
exports.Embed = Embed;
|
|
692
|
+
exports.EmbedCss = EmbedCss;
|
|
647
693
|
exports.Iframe = Iframe;
|
|
648
694
|
exports.ScrollRevealer = ScrollRevealer;
|
|
649
695
|
exports.Video = Video;
|
|
650
696
|
exports.applySelector = applySelector;
|
|
651
697
|
exports.dataProviderMeta = dataProviderMeta;
|
|
652
|
-
exports.dynamicCollectionGridMeta = dynamicCollectionGridMeta;
|
|
653
|
-
exports.dynamicCollectionGridProps = dynamicCollectionGridProps;
|
|
654
|
-
exports.dynamicCollectionMeta = dynamicCollectionMeta;
|
|
655
|
-
exports.dynamicCollectionProps = dynamicCollectionProps;
|
|
656
698
|
exports.dynamicElementMeta = dynamicElementMeta;
|
|
657
699
|
exports.dynamicImageMeta = dynamicImageMeta;
|
|
700
|
+
exports.dynamicRepeaterMeta = dynamicRepeaterMeta;
|
|
701
|
+
exports.dynamicRepeaterProps = dynamicRepeaterProps;
|
|
658
702
|
exports.dynamicTextMeta = dynamicTextMeta;
|
|
703
|
+
exports.embedCssMeta = embedCssMeta;
|
|
704
|
+
exports.embedMeta = embedMeta;
|
|
659
705
|
exports.iframeMeta = iframeMeta;
|
|
660
706
|
exports.registerDataProvider = registerDataProvider;
|
|
661
|
-
exports.registerDynamicCollection = registerDynamicCollection;
|
|
662
|
-
exports.registerDynamicCollectionGrid = registerDynamicCollectionGrid;
|
|
663
707
|
exports.registerDynamicElement = registerDynamicElement;
|
|
664
708
|
exports.registerDynamicImage = registerDynamicImage;
|
|
709
|
+
exports.registerDynamicRepeater = registerDynamicRepeater;
|
|
665
710
|
exports.registerDynamicText = registerDynamicText;
|
|
711
|
+
exports.registerEmbed = registerEmbed;
|
|
712
|
+
exports.registerEmbedCss = registerEmbedCss;
|
|
666
713
|
exports.registerIframe = registerIframe;
|
|
667
714
|
exports.registerScrollRevealer = registerScrollRevealer;
|
|
668
715
|
exports.registerVideo = registerVideo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plasmic-basic-components.cjs.development.js","sources":["../src/common.ts","../src/Data.tsx","../src/Iframe.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx"],"sourcesContent":["export const tuple = <T extends any[]>(...args: T): T => args;\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n","import { ComponentMeta, repeatedElement } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ComponentProps,\n createContext,\n createElement,\n CSSProperties,\n ReactNode,\n useContext,\n} from \"react\";\nimport { tuple } from \"./common\";\n\nexport type DataDict = Record<string, any>;\n\nexport const DataContext = createContext<DataDict | undefined>(undefined);\n\nexport function applySelector(\n rawData: DataDict | undefined,\n selector: string | undefined\n): any {\n if (!selector) {\n return undefined;\n }\n let curData = rawData;\n for (const key of selector.split(\".\")) {\n curData = curData?.[key];\n }\n return curData;\n}\n\nexport type SelectorDict = Record<string, string | undefined>;\n\nexport function useSelector(selector: string | undefined): any {\n const rawData = useDataEnv();\n return applySelector(rawData, selector);\n}\n\nexport function useSelectors(selectors: SelectorDict = {}): any {\n const rawData = useDataEnv();\n return Object.fromEntries(\n Object.entries(selectors)\n .filter(([key, selector]) => !!key && !!selector)\n .map(([key, selector]) => tuple(key, applySelector(rawData, selector)))\n );\n}\n\nexport function useDataEnv() {\n return useContext(DataContext);\n}\n\nexport interface DataProviderProps {\n name?: string;\n data?: any;\n children?: ReactNode;\n}\n\nexport function DataProvider({ name, data, children }: DataProviderProps) {\n const existingEnv = useDataEnv() ?? {};\n if (!name) {\n return <>{children}</>;\n } else {\n return (\n <DataContext.Provider value={{ ...existingEnv, [name]: data }}>\n {children}\n </DataContext.Provider>\n );\n }\n}\n\nexport interface CommonDynamicProps {\n className?: string;\n tag?: string;\n propSelectors?: SelectorDict;\n}\n\nexport function DynamicElement<\n Tag extends keyof JSX.IntrinsicElements = \"div\"\n>({\n tag = \"div\",\n className,\n children,\n propSelectors,\n ...props\n}: CommonDynamicProps & ComponentProps<Tag>) {\n const computed = useSelectors(propSelectors);\n return createElement(tag, {\n children,\n ...props,\n ...computed,\n className: className + \" \" + computed.className,\n });\n}\n\nexport interface DynamicTextProps extends CommonDynamicProps {\n selector?: string;\n}\n\nexport function DynamicText({\n selector,\n propSelectors,\n ...props\n}: DynamicTextProps) {\n return (\n <DynamicElement\n {...props}\n propSelectors={{ ...propSelectors, children: selector }}\n >\n {/*This is the default text*/}\n (DynamicText requires a selector)\n </DynamicElement>\n );\n}\n\nexport interface DynamicImageProps\n extends CommonDynamicProps,\n ComponentProps<\"img\"> {\n selector?: string;\n}\n\nexport function DynamicImage({\n selector,\n propSelectors,\n ...props\n}: DynamicImageProps) {\n return (\n <DynamicElement<\"img\">\n tag={\"img\"}\n loading={\"lazy\"}\n style={{\n objectFit: \"cover\",\n }}\n {...props}\n propSelectors={{ ...propSelectors, src: selector }}\n // Default image placeholder\n src=\"https://studio.plasmic.app/static/img/placeholder.png\"\n />\n );\n}\n\nexport interface DynamicCollectionProps extends CommonDynamicProps {\n children?: ReactNode;\n style?: CSSProperties;\n loopItemName?: string;\n keySelector?: string;\n selector?: string;\n data?: any;\n}\n\nexport function DynamicCollection({\n selector,\n loopItemName,\n children,\n data,\n keySelector,\n ...props\n}: DynamicCollectionProps) {\n // Defaults to an array of three items.\n const finalData = data ?? useSelector(selector) ?? [1, 2, 3];\n return (\n <DynamicElement {...props}>\n {finalData?.map?.((item: any, index: number) => (\n <DataProvider\n key={applySelector(item, keySelector) ?? index}\n name={loopItemName}\n data={item}\n >\n {repeatedElement(index === 0, children)}\n </DataProvider>\n ))}\n </DynamicElement>\n );\n}\n\nexport interface DynamicCollectionGridProps extends DynamicCollectionProps {\n columns?: number;\n columnGap?: number;\n rowGap?: number;\n}\n\nexport function DynamicCollectionGrid({\n columns,\n columnGap = 0,\n rowGap = 0,\n ...props\n}: DynamicCollectionGridProps) {\n return (\n <DynamicCollection\n {...props}\n style={{\n display: \"grid\",\n gridTemplateColumns: `repeat(${columns}, 1fr)`,\n columnGap: `${columnGap}px`,\n rowGap: `${rowGap}px`,\n }}\n />\n );\n}\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: \"hostless-dynamic-text\",\n props: {\n selector: \"celebrities.0.name\",\n },\n },\n {\n type: \"component\",\n name: \"hostless-dynamic-image\",\n props: {\n selector: \"celebrities.0.profilePicture\",\n },\n },\n ],\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(DataProvider, customDataProviderMeta ?? dataProviderMeta);\n }\n}\n\nconst dynamicPropsWithoutTag = {\n propSelectors: {\n type: \"object\",\n defaultValueHint: {},\n description:\n \"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.\",\n },\n} as const;\n\nconst dynamicProps = {\n ...dynamicPropsWithoutTag,\n tag: {\n type: \"string\",\n defaultValueHint: \"div\",\n description: \"The HTML tag to use\",\n },\n} as const;\n\n// TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.\n\nexport const dynamicElementMeta: ComponentMeta<CommonDynamicProps> = {\n name: \"hostless-dynamic-element\",\n displayName: \"Dynamic Element\",\n importName: \"DynamicElement\",\n importPath: thisModule,\n props: { ...dynamicProps, children: \"slot\" },\n};\n\nexport function registerDynamicElement(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicElementMeta?: ComponentMeta<CommonDynamicProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n } else {\n registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n }\n}\n\nexport const dynamicTextMeta: ComponentMeta<DynamicTextProps> = {\n name: \"hostless-dynamic-text\",\n importName: \"DynamicText\",\n displayName: \"Dynamic Text\",\n importPath: thisModule,\n props: {\n ...dynamicProps,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the text, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicText(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicTextMeta?: ComponentMeta<DynamicTextProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicText,\n customDynamicTextMeta ?? dynamicTextMeta\n );\n } else {\n registerComponent(DynamicText, customDynamicTextMeta ?? dynamicTextMeta);\n }\n}\n\nexport const dynamicImageMeta: ComponentMeta<DynamicImageProps> = {\n name: \"hostless-dynamic-image\",\n displayName: \"Dynamic Image\",\n importName: \"DynamicImage\",\n importPath: thisModule,\n props: {\n ...dynamicPropsWithoutTag,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the image source URL, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicImage(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicImageMeta?: ComponentMeta<DynamicImageProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicImage,\n customDynamicImageMeta ?? dynamicImageMeta\n );\n } else {\n registerComponent(DynamicImage, customDynamicImageMeta ?? dynamicImageMeta);\n }\n}\n\nexport const dynamicCollectionProps = {\n ...dynamicProps,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: \"slot\",\n} as const;\n\nexport const dynamicCollectionMeta: ComponentMeta<DynamicCollectionProps> = {\n name: \"hostless-dynamic-collection\",\n displayName: \"Dynamic Collection\",\n importName: \"DynamicCollection\",\n importPath: thisModule,\n props: dynamicCollectionProps,\n};\n\nexport function registerDynamicCollection(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicCollectionMeta?: ComponentMeta<DynamicCollectionProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicCollection,\n customDynamicCollectionMeta ?? dynamicCollectionMeta\n );\n } else {\n registerComponent(\n DynamicCollection,\n customDynamicCollectionMeta ?? dynamicCollectionMeta\n );\n }\n}\n\nexport const dynamicCollectionGridProps = {\n ...dynamicCollectionProps,\n columns: {\n type: \"number\",\n defaultValue: 2,\n description: \"The number of columns to use in the grid\",\n },\n columnGap: {\n type: \"number\",\n defaultValue: 8,\n description: \"The gap between columns\",\n },\n rowGap: {\n type: \"number\",\n defaultValue: 8,\n description: \"The gap between rows\",\n },\n} as const;\n\nexport const dynamicCollectionGridMeta: ComponentMeta<DynamicCollectionGridProps> = {\n name: \"hostless-dynamic-collection-grid\",\n displayName: \"Dynamic Collection Grid\",\n importName: \"DynamicCollectionGrid\",\n importPath: thisModule,\n props: dynamicCollectionGridProps,\n};\n\nexport function registerDynamicCollectionGrid(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicCollectionGridMeta?: ComponentMeta<DynamicCollectionGridProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicCollectionGrid,\n customDynamicCollectionGridMeta ?? dynamicCollectionGridMeta\n );\n } else {\n registerComponent(\n DynamicCollectionGrid,\n customDynamicCollectionGridMeta ?? dynamicCollectionGridMeta\n );\n }\n}\n","import { ComponentMeta, PlasmicCanvasContext } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { useContext } from \"react\";\n\nexport interface IframeProps {\n src: string;\n preview?: boolean;\n className?: string;\n}\n\nexport default function Iframe({ preview, src, className }: IframeProps) {\n const isEditing = useContext(PlasmicCanvasContext);\n if (isEditing && !preview) {\n return (\n <div className={className}>\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: \"#eee\",\n color: \"#888\",\n fontSize: \"36px\",\n fontFamily: \"sans-serif\",\n fontWeight: \"bold\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n }}\n >\n Iframe placeholder\n </div>\n </div>\n );\n }\n return <iframe src={src} className={className} />;\n}\n\nexport const iframeMeta: ComponentMeta<IframeProps> = {\n name: \"hostless-iframe\",\n displayName: \"Iframe\",\n importName: \"Iframe\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue: \"https://www.example.com\",\n },\n preview: {\n type: \"boolean\",\n description: \"Load the iframe while editing in Plasmic Studio\",\n },\n },\n defaultStyles: {\n width: \"300px\",\n height: \"150px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerIframe(\n loader?: { registerComponent: typeof registerComponent },\n customIframeMeta?: ComponentMeta<IframeProps>\n) {\n if (loader) {\n loader.registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n } else {\n registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * 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.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"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)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n"],"names":["tuple","args","DataContext","createContext","undefined","applySelector","rawData","selector","curData","split","key","useSelector","useDataEnv","useSelectors","selectors","Object","fromEntries","entries","filter","map","useContext","DataProvider","name","data","children","existingEnv","React","Provider","value","DynamicElement","tag","className","propSelectors","props","computed","createElement","DynamicText","DynamicImage","loading","style","objectFit","src","DynamicCollection","loopItemName","keySelector","finalData","item","index","repeatedElement","DynamicCollectionGrid","columns","columnGap","rowGap","display","gridTemplateColumns","thisModule","dataProviderMeta","displayName","importName","importPath","type","defaultValue","description","birthYear","profilePicture","registerDataProvider","loader","customDataProviderMeta","registerComponent","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","dynamicCollectionProps","dynamicCollectionMeta","registerDynamicCollection","customDynamicCollectionMeta","dynamicCollectionGridProps","dynamicCollectionGridMeta","registerDynamicCollectionGrid","customDynamicCollectionGridMeta","Iframe","preview","isEditing","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","alignItems","justifyContent","overflow","iframeMeta","defaultStyles","width","height","maxWidth","registerIframe","customIframeMeta","useDirectionalIntersection","ref","scrollDownThreshold","scrollUpThreshold","useState","revealed","setRevealed","useEffect","current","IntersectionObserver","handler","intersectionRatio","observer","root","rootMargin","threshold","observe","disconnect","ScrollRevealer","intersectionRef","useRef","scrollRevealerMeta","registerScrollRevealer","customScrollRevealerMeta","Video","forwardRef","videoMeta","autoPlay","controls","playsInline","loop","muted","poster","preload","options","registerVideo","customVideoMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,KAAK,GAAG,SAARA,KAAQ;AAAA,oCAAqBC,IAArB;AAAqBA,IAAAA,IAArB;AAAA;;AAAA,SAAoCA,IAApC;AAAA,CAAd;;ICcMC,WAAW,gBAAGC,mBAAa,CAAuBC,SAAvB,CAAjC;AAEP,SAAgBC,cACdC,SACAC;AAEA,MAAI,CAACA,QAAL,EAAe;AACb,WAAOH,SAAP;AACD;;AACD,MAAII,OAAO,GAAGF,OAAd;;AACA,uDAAkBC,QAAQ,CAACE,KAAT,CAAe,GAAf,CAAlB,wCAAuC;AAAA;;AAAA,QAA5BC,GAA4B;AACrCF,IAAAA,OAAO,eAAGA,OAAH,qBAAG,SAAUE,GAAV,CAAV;AACD;;AACD,SAAOF,OAAP;AACD;AAID,SAAgBG,YAAYJ;AAC1B,MAAMD,OAAO,GAAGM,UAAU,EAA1B;AACA,SAAOP,aAAa,CAACC,OAAD,EAAUC,QAAV,CAApB;AACD;AAED,SAAgBM,aAAaC;MAAAA;AAAAA,IAAAA,YAA0B;;;AACrD,MAAMR,OAAO,GAAGM,UAAU,EAA1B;AACA,SAAOG,MAAM,CAACC,WAAP,CACLD,MAAM,CAACE,OAAP,CAAeH,SAAf,EACGI,MADH,CACU;AAAA,QAAER,GAAF;AAAA,QAAOH,QAAP;AAAA,WAAqB,CAAC,CAACG,GAAF,IAAS,CAAC,CAACH,QAAhC;AAAA,GADV,EAEGY,GAFH,CAEO;AAAA,QAAET,GAAF;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plasmic-basic-components.cjs.development.js","sources":["../src/common.ts","../src/Data.tsx","../src/Embed.tsx","../src/Iframe.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx","../src/EmbedCss.tsx"],"sourcesContent":["export const tuple = <T extends any[]>(...args: T): T => args;\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n","import { ComponentMeta, repeatedElement } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ComponentProps,\n createContext,\n createElement,\n ReactNode,\n useContext,\n} from \"react\";\nimport { tuple } from \"./common\";\n\nexport type DataDict = Record<string, any>;\n\nexport const DataContext = createContext<DataDict | undefined>(undefined);\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nexport function applySelector(\n rawData: DataDict | undefined,\n selector: string | undefined\n): any {\n if (!selector) {\n return undefined;\n }\n let curData = rawData;\n for (const key of selector.split(\".\")) {\n curData = curData?.[key];\n }\n return curData;\n}\n\nexport type SelectorDict = Record<string, string | undefined>;\n\nexport function useSelector(selector: string | undefined): any {\n const rawData = useDataEnv();\n return applySelector(rawData, selector);\n}\n\nexport function useSelectors(selectors: SelectorDict = {}): any {\n const rawData = useDataEnv();\n return Object.fromEntries(\n Object.entries(selectors)\n .filter(([key, selector]) => !!key && !!selector)\n .map(([key, selector]) => tuple(key, applySelector(rawData, selector)))\n );\n}\n\nexport function useDataEnv() {\n return useContext(DataContext);\n}\n\nexport interface DataProviderProps {\n name?: string;\n data?: any;\n children?: ReactNode;\n}\n\nexport function DataProvider({ name, data, children }: DataProviderProps) {\n const existingEnv = useDataEnv() ?? {};\n if (!name) {\n return <>{children}</>;\n } else {\n return (\n <DataContext.Provider value={{ ...existingEnv, [name]: data }}>\n {children}\n </DataContext.Provider>\n );\n }\n}\n\nexport interface CommonDynamicProps {\n className?: string;\n tag?: string;\n propSelectors?: SelectorDict;\n}\n\nexport function DynamicElement<\n Tag extends keyof JSX.IntrinsicElements = \"div\"\n>({\n tag = \"div\",\n className,\n children,\n propSelectors,\n ...props\n}: CommonDynamicProps & ComponentProps<Tag>) {\n const computed = useSelectors(propSelectors);\n return createElement(tag, {\n children,\n ...props,\n ...computed,\n className: className + \" \" + computed.className,\n });\n}\n\nexport interface DynamicTextProps extends CommonDynamicProps {\n selector?: string;\n}\n\nexport function DynamicText({\n selector,\n propSelectors,\n ...props\n}: DynamicTextProps) {\n return (\n <DynamicElement\n {...props}\n propSelectors={{ ...propSelectors, children: selector }}\n >\n {/*This is the default text*/}\n (DynamicText requires a selector)\n </DynamicElement>\n );\n}\n\nexport interface DynamicImageProps\n extends CommonDynamicProps,\n ComponentProps<\"img\"> {\n selector?: string;\n}\n\nexport function DynamicImage({\n selector,\n propSelectors,\n ...props\n}: DynamicImageProps) {\n return (\n <DynamicElement<\"img\">\n tag={\"img\"}\n loading={\"lazy\"}\n style={{\n objectFit: \"cover\",\n }}\n {...props}\n propSelectors={{ ...propSelectors, src: selector }}\n // Default image placeholder\n src=\"https://studio.plasmic.app/static/img/placeholder.png\"\n />\n );\n}\n\nexport interface DynamicRepeaterProps {\n children?: ReactNode;\n loopItemName?: string;\n keySelector?: string;\n selector?: string;\n data?: any;\n}\n\nexport function DynamicRepeater({\n children,\n loopItemName,\n keySelector,\n selector,\n data,\n}: DynamicRepeaterProps) {\n // Defaults to an array of three items.\n const finalData = data ?? useSelector(selector) ?? [1, 2, 3];\n return (\n <>\n {finalData?.map?.((item: any, index: number) => (\n <DataProvider\n key={applySelector(item, keySelector) ?? index}\n name={loopItemName}\n data={item}\n >\n {repeatedElement(index === 0, children)}\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: \"slot\",\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: \"hostless-dynamic-text\",\n props: {\n selector: \"celebrities.0.name\",\n },\n },\n {\n type: \"component\",\n name: \"hostless-dynamic-image\",\n props: {\n selector: \"celebrities.0.profilePicture\",\n },\n },\n ],\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(DataProvider, customDataProviderMeta ?? dataProviderMeta);\n }\n}\n\nconst dynamicPropsWithoutTag = {\n propSelectors: {\n type: \"object\",\n defaultValueHint: {},\n description:\n \"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.\",\n },\n} as const;\n\nconst dynamicProps = {\n ...dynamicPropsWithoutTag,\n tag: {\n type: \"string\",\n defaultValueHint: \"div\",\n description: \"The HTML tag to use\",\n },\n} as const;\n\n// TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.\n\nexport const dynamicElementMeta: ComponentMeta<CommonDynamicProps> = {\n name: \"hostless-dynamic-element\",\n displayName: \"Dynamic Element\",\n importName: \"DynamicElement\",\n importPath: thisModule,\n props: { ...dynamicProps, children: \"slot\" },\n};\n\nexport function registerDynamicElement(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicElementMeta?: ComponentMeta<CommonDynamicProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n } else {\n registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n }\n}\n\nexport const dynamicTextMeta: ComponentMeta<DynamicTextProps> = {\n name: \"hostless-dynamic-text\",\n importName: \"DynamicText\",\n displayName: \"Dynamic Text\",\n importPath: thisModule,\n props: {\n ...dynamicProps,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the text, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicText(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicTextMeta?: ComponentMeta<DynamicTextProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicText,\n customDynamicTextMeta ?? dynamicTextMeta\n );\n } else {\n registerComponent(DynamicText, customDynamicTextMeta ?? dynamicTextMeta);\n }\n}\n\nexport const dynamicImageMeta: ComponentMeta<DynamicImageProps> = {\n name: \"hostless-dynamic-image\",\n displayName: \"Dynamic Image\",\n importName: \"DynamicImage\",\n importPath: thisModule,\n props: {\n ...dynamicPropsWithoutTag,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the image source URL, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicImage(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicImageMeta?: ComponentMeta<DynamicImageProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicImage,\n customDynamicImageMeta ?? dynamicImageMeta\n );\n } else {\n registerComponent(DynamicImage, customDynamicImageMeta ?? dynamicImageMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, { useEffect, useRef } from \"react\";\nimport { ensure } from \"./common\";\n\nexport interface EmbedProps {\n className?: string;\n code: string;\n hideInEditor?: boolean;\n}\n\nexport default function Embed({\n className,\n code,\n hideInEditor = false,\n}: EmbedProps) {\n const rootElt = useRef<HTMLDivElement>(null);\n useEffect(() => {\n if (hideInEditor) {\n return;\n }\n Array.from(ensure(rootElt.current).querySelectorAll(\"script\")).forEach(\n (oldScript) => {\n const newScript = document.createElement(\"script\");\n Array.from(oldScript.attributes).forEach((attr) =>\n newScript.setAttribute(attr.name, attr.value)\n );\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n ensure(oldScript.parentNode).replaceChild(newScript, oldScript);\n }\n );\n }, [code, hideInEditor]);\n const effectiveCode = hideInEditor ? \"\" : code;\n return (\n <div\n ref={rootElt}\n className={className}\n dangerouslySetInnerHTML={{ __html: effectiveCode }}\n />\n );\n}\n\nexport const embedMeta: ComponentMeta<EmbedProps> = {\n name: \"hostless-embed\",\n displayName: \"Embed HTML\",\n importName: \"Embed\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n code: {\n type: \"string\",\n defaultValue: \"https://www.example.com\",\n },\n hideInEditor: {\n type: \"boolean\",\n displayName: \"Hide in editor\",\n description:\n \"Disable running the code while editing in Plasmic Studio (may require reload)\",\n editOnly: true,\n },\n },\n defaultStyles: {\n maxWidth: \"100%\",\n },\n};\n\nexport function registerEmbed(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedMeta?: ComponentMeta<EmbedProps>\n) {\n if (loader) {\n loader.registerComponent(Embed, customEmbedMeta ?? embedMeta);\n } else {\n registerComponent(Embed, customEmbedMeta ?? embedMeta);\n }\n}\n","import { ComponentMeta, PlasmicCanvasContext } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { useContext } from \"react\";\n\nexport interface IframeProps {\n src: string;\n preview?: boolean;\n className?: string;\n}\n\nexport default function Iframe({ preview, src, className }: IframeProps) {\n const isEditing = useContext(PlasmicCanvasContext);\n if (isEditing && !preview) {\n return (\n <div className={className}>\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: \"#eee\",\n color: \"#888\",\n fontSize: \"36px\",\n fontFamily: \"sans-serif\",\n fontWeight: \"bold\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n }}\n >\n Iframe placeholder\n </div>\n </div>\n );\n }\n return <iframe src={src} className={className} />;\n}\n\nexport const iframeMeta: ComponentMeta<IframeProps> = {\n name: \"hostless-iframe\",\n displayName: \"Iframe\",\n importName: \"Iframe\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue: \"https://www.example.com\",\n },\n preview: {\n type: \"boolean\",\n description: \"Load the iframe while editing in Plasmic Studio\",\n },\n },\n defaultStyles: {\n width: \"300px\",\n height: \"150px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerIframe(\n loader?: { registerComponent: typeof registerComponent },\n customIframeMeta?: ComponentMeta<IframeProps>\n) {\n if (loader) {\n loader.registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n } else {\n registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * 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.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"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)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css: string;\n}\n\nexport default function EmbedCss({\n css\n}: EmbedCssProps) {\n return (\n <style\n dangerouslySetInnerHTML={{ __html: css }}\n />\n );\n}\n\nexport const embedCssMeta: ComponentMeta<EmbedCssProps> = { \n name: \"hostless-embed-css\",\n displayName: \"EmbedCss\",\n importName: \"EmbedCss\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n css: {\n type: \"string\",\n defaultValueHint: \"Some CSS snippet\",\n description: \"CSS rules to be inserted\",\n },\n },\n};\n\nexport function registerEmbedCss(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedCssMeta?: ComponentMeta<EmbedCssProps>\n) {\n if (loader) {\n loader.registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n } else {\n registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n }\n}\n"],"names":["tuple","args","ensure","x","undefined","Error","DataContext","createContext","thisModule","applySelector","rawData","selector","curData","split","key","useSelector","useDataEnv","useSelectors","selectors","Object","fromEntries","entries","filter","map","useContext","DataProvider","name","data","children","existingEnv","React","Provider","value","DynamicElement","tag","className","propSelectors","props","computed","createElement","DynamicText","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","finalData","item","index","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","Embed","code","hideInEditor","rootElt","useRef","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","appendChild","createTextNode","innerHTML","parentNode","replaceChild","effectiveCode","ref","dangerouslySetInnerHTML","__html","embedMeta","editOnly","defaultStyles","maxWidth","registerEmbed","customEmbedMeta","Iframe","preview","isEditing","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","registerIframe","customIframeMeta","useDirectionalIntersection","scrollDownThreshold","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","handler","intersectionRatio","observer","root","rootMargin","threshold","observe","disconnect","ScrollRevealer","intersectionRef","scrollRevealerMeta","registerScrollRevealer","customScrollRevealerMeta","Video","forwardRef","videoMeta","autoPlay","controls","playsInline","loop","muted","poster","preload","options","registerVideo","customVideoMeta","EmbedCss","css","embedCssMeta","registerEmbedCss","customEmbedCssMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IA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