@plasmicpkgs/plasmic-basic-components 0.0.98 → 0.0.100

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.
@@ -10,46 +10,39 @@ var React = require('react');
10
10
  var React__default = _interopDefault(React);
11
11
 
12
12
  function _extends() {
13
- _extends = Object.assign || function (target) {
13
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
14
14
  for (var i = 1; i < arguments.length; i++) {
15
15
  var source = arguments[i];
16
-
17
16
  for (var key in source) {
18
17
  if (Object.prototype.hasOwnProperty.call(source, key)) {
19
18
  target[key] = source[key];
20
19
  }
21
20
  }
22
21
  }
23
-
24
22
  return target;
25
23
  };
26
-
27
24
  return _extends.apply(this, arguments);
28
25
  }
29
-
30
26
  function _objectWithoutPropertiesLoose(source, excluded) {
31
27
  if (source == null) return {};
32
28
  var target = {};
33
29
  var sourceKeys = Object.keys(source);
34
30
  var key, i;
35
-
36
31
  for (i = 0; i < sourceKeys.length; i++) {
37
32
  key = sourceKeys[i];
38
33
  if (excluded.indexOf(key) >= 0) continue;
39
34
  target[key] = source[key];
40
35
  }
41
-
42
36
  return target;
43
37
  }
44
38
 
45
39
  var _excluded = ["tag", "className", "children", "propSelectors"],
46
- _excluded2 = ["selector", "propSelectors"],
47
- _excluded3 = ["selector", "propSelectors"];
40
+ _excluded2 = ["selector", "propSelectors"],
41
+ _excluded3 = ["selector", "propSelectors"];
48
42
  var thisModule = "@plasmicpkgs/plasmic-basic-components";
49
43
  /**
50
44
  * @deprecated This should be imported from @plasmicapp/host instead.
51
45
  */
52
-
53
46
  var applySelector = function applySelector() {
54
47
  console.warn("DEPRECATED: Import applySelector from @plasmicapp/host instead.");
55
48
  return host.applySelector.apply(void 0, arguments);
@@ -57,7 +50,6 @@ var applySelector = function applySelector() {
57
50
  /**
58
51
  * @deprecated This should be imported from @plasmicapp/host instead.
59
52
  */
60
-
61
53
  var useSelector = function useSelector() {
62
54
  console.warn("DEPRECATED: Import useSelector from @plasmicapp/host instead.");
63
55
  return host.useSelector.apply(void 0, arguments);
@@ -65,7 +57,6 @@ var useSelector = function useSelector() {
65
57
  /**
66
58
  * @deprecated This should be imported from @plasmicapp/host instead.
67
59
  */
68
-
69
60
  var useSelectors = function useSelectors() {
70
61
  console.warn("DEPRECATED: Import useSelectors from @plasmicapp/host instead.");
71
62
  return host.useSelectors.apply(void 0, arguments);
@@ -73,7 +64,6 @@ var useSelectors = function useSelectors() {
73
64
  /**
74
65
  * @deprecated This should be imported from @plasmicapp/host instead.
75
66
  */
76
-
77
67
  var useDataEnv = function useDataEnv() {
78
68
  console.warn("DEPRECATED: Import useDataEnv from @plasmicapp/host instead.");
79
69
  return host.useDataEnv.apply(void 0, arguments);
@@ -83,14 +73,12 @@ var DataProvider = function DataProvider() {
83
73
  };
84
74
  function DynamicElement(_ref) {
85
75
  var _ref$tag = _ref.tag,
86
- tag = _ref$tag === void 0 ? "div" : _ref$tag,
87
- className = _ref.className,
88
- children = _ref.children,
89
- propSelectors = _ref.propSelectors,
90
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
91
-
76
+ tag = _ref$tag === void 0 ? "div" : _ref$tag,
77
+ className = _ref.className,
78
+ children = _ref.children,
79
+ propSelectors = _ref.propSelectors,
80
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
92
81
  var computed = host.useSelectors(propSelectors);
93
-
94
82
  return React.createElement(tag, _extends({
95
83
  children: children
96
84
  }, props, computed, {
@@ -99,9 +87,8 @@ function DynamicElement(_ref) {
99
87
  }
100
88
  function DynamicText(_ref2) {
101
89
  var selector = _ref2.selector,
102
- propSelectors = _ref2.propSelectors,
103
- props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
104
-
90
+ propSelectors = _ref2.propSelectors,
91
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
105
92
  return React__default.createElement(DynamicElement, Object.assign({}, props, {
106
93
  propSelectors: _extends({}, propSelectors, {
107
94
  children: selector
@@ -110,9 +97,8 @@ function DynamicText(_ref2) {
110
97
  }
111
98
  function DynamicImage(_ref3) {
112
99
  var selector = _ref3.selector,
113
- propSelectors = _ref3.propSelectors,
114
- props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
115
-
100
+ propSelectors = _ref3.propSelectors,
101
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
116
102
  return React__default.createElement(DynamicElement, Object.assign({
117
103
  tag: "img",
118
104
  loading: "lazy",
@@ -129,17 +115,15 @@ function DynamicImage(_ref3) {
129
115
  }
130
116
  function DynamicRepeater(_ref4) {
131
117
  var _ref5;
132
-
133
118
  var children = _ref4.children,
134
- loopItemName = _ref4.loopItemName,
135
- keySelector = _ref4.keySelector,
136
- selector = _ref4.selector,
137
- data = _ref4.data;
119
+ loopItemName = _ref4.loopItemName,
120
+ keySelector = _ref4.keySelector,
121
+ selector = _ref4.selector,
122
+ data = _ref4.data;
138
123
  // Defaults to an array of three items.
139
124
  var finalData = (_ref5 = data != null ? data : host.useSelector(selector)) != null ? _ref5 : [1, 2, 3];
140
125
  return React__default.createElement(React__default.Fragment, null, finalData == null ? void 0 : finalData.map == null ? void 0 : finalData.map(function (item, index) {
141
126
  var _applySelector2;
142
-
143
127
  return React__default.createElement(host.DataProvider, {
144
128
  key: (_applySelector2 = host.applySelector(item, keySelector)) != null ? _applySelector2 : index,
145
129
  name: loopItemName,
@@ -220,16 +204,14 @@ var dynamicPropsWithoutTag = {
220
204
  description: "An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value."
221
205
  }
222
206
  };
223
-
224
207
  var dynamicProps = /*#__PURE__*/_extends({}, dynamicPropsWithoutTag, {
225
208
  tag: {
226
209
  type: "string",
227
210
  defaultValueHint: "div",
228
211
  description: "The HTML tag to use"
229
212
  }
230
- }); // TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.
231
-
232
-
213
+ });
214
+ // TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.
233
215
  var dynamicElementMeta = {
234
216
  name: "hostless-dynamic-element",
235
217
  displayName: "Dynamic Element",
@@ -296,15 +278,14 @@ function ensure(x) {
296
278
 
297
279
  function Embed(_ref) {
298
280
  var className = _ref.className,
299
- code = _ref.code,
300
- _ref$hideInEditor = _ref.hideInEditor,
301
- hideInEditor = _ref$hideInEditor === void 0 ? false : _ref$hideInEditor;
281
+ code = _ref.code,
282
+ _ref$hideInEditor = _ref.hideInEditor,
283
+ hideInEditor = _ref$hideInEditor === void 0 ? false : _ref$hideInEditor;
302
284
  var rootElt = React.useRef(null);
303
285
  React.useEffect(function () {
304
286
  if (hideInEditor) {
305
287
  return;
306
288
  }
307
-
308
289
  Array.from(ensure(rootElt.current).querySelectorAll("script")).forEach(function (oldScript) {
309
290
  var newScript = document.createElement("script");
310
291
  Array.from(oldScript.attributes).forEach(function (attr) {
@@ -359,10 +340,9 @@ function registerEmbed(loader, customEmbedMeta) {
359
340
 
360
341
  function Iframe(_ref) {
361
342
  var preview = _ref.preview,
362
- src = _ref.src,
363
- className = _ref.className;
343
+ src = _ref.src,
344
+ className = _ref.className;
364
345
  var isEditing = React.useContext(host.PlasmicCanvasContext);
365
-
366
346
  if (isEditing && !preview) {
367
347
  return React__default.createElement("div", {
368
348
  className: className
@@ -385,7 +365,6 @@ function Iframe(_ref) {
385
365
  }
386
366
  }, "Iframe placeholder"));
387
367
  }
388
-
389
368
  return React__default.createElement("iframe", {
390
369
  src: src,
391
370
  className: className
@@ -423,17 +402,14 @@ function registerIframe(loader, customIframeMeta) {
423
402
  var thisModule$1 = "@plasmicpkgs/plasmic-basic-components";
424
403
  var defaultItemName = "currentItem";
425
404
  var defaultIndexName = "currentIndex";
426
-
427
405
  function Repeater(props) {
428
406
  var children = props.children,
429
- items = props.items,
430
- itemName = props.itemName,
431
- indexName = props.indexName;
432
-
407
+ items = props.items,
408
+ itemName = props.itemName,
409
+ indexName = props.indexName;
433
410
  if (!Array.isArray(items)) {
434
411
  throw new Error("Repeater received an invalid collection: not an array.");
435
412
  }
436
-
437
413
  return React__default.createElement(React__default.Fragment, null, items.map(function (item, index) {
438
414
  return React__default.createElement(host.DataProvider, {
439
415
  key: index.toString(),
@@ -445,7 +421,6 @@ function Repeater(props) {
445
421
  }, host.repeatedElement(index, children)));
446
422
  }));
447
423
  }
448
-
449
424
  var repeaterMeta = {
450
425
  name: "plasmic-repeater",
451
426
  displayName: "Repeater",
@@ -489,15 +464,13 @@ function registerRepeater(loader, customRepeaterMeta) {
489
464
 
490
465
  function useDirectionalIntersection(_ref) {
491
466
  var ref = _ref.ref,
492
- _ref$scrollDownThresh = _ref.scrollDownThreshold,
493
- scrollDownThreshold = _ref$scrollDownThresh === void 0 ? 0.5 : _ref$scrollDownThresh,
494
- _ref$scrollUpThreshol = _ref.scrollUpThreshold,
495
- scrollUpThreshold = _ref$scrollUpThreshol === void 0 ? 0 : _ref$scrollUpThreshol;
496
-
467
+ _ref$scrollDownThresh = _ref.scrollDownThreshold,
468
+ scrollDownThreshold = _ref$scrollDownThresh === void 0 ? 0.5 : _ref$scrollDownThresh,
469
+ _ref$scrollUpThreshol = _ref.scrollUpThreshold,
470
+ scrollUpThreshold = _ref$scrollUpThreshol === void 0 ? 0 : _ref$scrollUpThreshol;
497
471
  var _useState = React.useState(false),
498
- revealed = _useState[0],
499
- setRevealed = _useState[1];
500
-
472
+ revealed = _useState[0],
473
+ setRevealed = _useState[1];
501
474
  React.useEffect(function () {
502
475
  if (ref.current && typeof IntersectionObserver === "function") {
503
476
  var handler = function handler(entries) {
@@ -507,7 +480,6 @@ function useDirectionalIntersection(_ref) {
507
480
  setRevealed(false);
508
481
  }
509
482
  };
510
-
511
483
  var observer = new IntersectionObserver(handler, {
512
484
  root: null,
513
485
  rootMargin: "0%",
@@ -519,7 +491,6 @@ function useDirectionalIntersection(_ref) {
519
491
  observer.disconnect();
520
492
  };
521
493
  }
522
-
523
494
  return function () {};
524
495
  }, [ref.current, scrollDownThreshold, scrollUpThreshold]);
525
496
  return revealed;
@@ -532,14 +503,13 @@ function useDirectionalIntersection(_ref) {
532
503
  *
533
504
  * 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.
534
505
  */
535
-
536
506
  function ScrollRevealer(_ref2) {
537
507
  var children = _ref2.children,
538
- className = _ref2.className,
539
- _ref2$scrollDownThres = _ref2.scrollDownThreshold,
540
- scrollDownThreshold = _ref2$scrollDownThres === void 0 ? 0.5 : _ref2$scrollDownThres,
541
- _ref2$scrollUpThresho = _ref2.scrollUpThreshold,
542
- scrollUpThreshold = _ref2$scrollUpThresho === void 0 ? 0 : _ref2$scrollUpThresho;
508
+ className = _ref2.className,
509
+ _ref2$scrollDownThres = _ref2.scrollDownThreshold,
510
+ scrollDownThreshold = _ref2$scrollDownThres === void 0 ? 0.5 : _ref2$scrollDownThres,
511
+ _ref2$scrollUpThresho = _ref2.scrollUpThreshold,
512
+ scrollUpThreshold = _ref2$scrollUpThresho === void 0 ? 0 : _ref2$scrollUpThresho;
543
513
  var intersectionRef = React.useRef(null);
544
514
  var revealed = useDirectionalIntersection({
545
515
  ref: intersectionRef,
@@ -1 +1 @@
1
- {"version":3,"file":"plasmic-basic-components.cjs.development.js","sources":["../src/Data.tsx","../src/common.ts","../src/Embed.tsx","../src/Iframe.tsx","../src/Repeater.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx"],"sourcesContent":["import {\n applySelector as _applySelector,\n ComponentMeta,\n DataProvider as _DataProvider,\n DataProviderProps,\n repeatedElement,\n SelectorDict,\n useDataEnv as _useDataEnv,\n useSelector as _useSelector,\n useSelectors as _useSelectors,\n} from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps, createElement, ReactNode } from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const applySelector: typeof _applySelector = function (...args) {\n console.warn(\n \"DEPRECATED: Import applySelector from @plasmicapp/host instead.\"\n );\n return _applySelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelector: typeof _useSelector = function (...args) {\n console.warn(\"DEPRECATED: Import useSelector from @plasmicapp/host instead.\");\n return _useSelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelectors: typeof _useSelectors = function (...args) {\n console.warn(\n \"DEPRECATED: Import useSelectors from @plasmicapp/host instead.\"\n );\n return _useSelectors(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useDataEnv: typeof _useDataEnv = function (...args) {\n console.warn(\"DEPRECATED: Import useDataEnv from @plasmicapp/host instead.\");\n return _useDataEnv(...args);\n};\n\nexport const DataProvider: typeof _DataProvider = function (...args) {\n return _DataProvider(...args);\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, 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: {\n type: \"slot\",\n isRepeated: true,\n },\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 providesData: true,\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 },\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(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\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","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 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 style={{ whiteSpace: \"normal\" }}\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: \"code\",\n lang: \"html\",\n defaultValueHint:\n \"<div>Paste your embed code via the right sidebar</div>\",\n description: \"The HTML code to be embedded\",\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 {\n ComponentMeta,\n DataProvider,\n registerComponent,\n repeatedElement,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nconst defaultItemName = \"currentItem\";\nconst defaultIndexName = \"currentIndex\";\n\ninterface RepeaterProps<T> {\n children: React.ReactNode;\n items: T[];\n itemName?: string;\n indexName?: string;\n}\n\nfunction Repeater<T>(props: RepeaterProps<T>) {\n const { children, items, itemName, indexName } = props;\n\n if (!Array.isArray(items)) {\n throw new Error(\"Repeater received an invalid collection: not an array.\");\n }\n\n return (\n <>\n {items.map((item, index) => (\n <DataProvider\n key={index.toString()}\n name={itemName || defaultItemName}\n data={item}\n >\n <DataProvider name={indexName || defaultIndexName} data={index}>\n {repeatedElement(index, children)}\n </DataProvider>\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const repeaterMeta: ComponentMeta<RepeaterProps<any>> = {\n name: `plasmic-repeater`,\n displayName: \"Repeater\",\n importName: \"Repeater\",\n importPath: thisModule,\n providesData: true,\n props: {\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n items: {\n type: \"array\",\n defaultValue: [1, 2, 3],\n displayName: \"Collection\",\n description: \"Items array (JavaScript expression).\",\n },\n itemName: {\n type: \"string\",\n defaultValue: defaultItemName,\n defaultValueHint: defaultItemName,\n displayName: \"Item\",\n description: \"Data context key for the current item.\",\n },\n indexName: {\n type: \"string\",\n defaultValue: defaultIndexName,\n defaultValueHint: defaultIndexName,\n displayName: \"Index\",\n description: \"Data context key for the index of the current item.\",\n },\n },\n};\n\nexport function registerRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customRepeaterMeta?: ComponentMeta<RepeaterProps<any>>\n) {\n if (loader) {\n loader.registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n } else {\n registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n }\n}\n\nexport default Repeater;\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. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work.\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n defaultValue: true,\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":["thisModule","applySelector","console","warn","_applySelector","useSelector","_useSelector","useSelectors","_useSelectors","useDataEnv","_useDataEnv","DataProvider","_DataProvider","DynamicElement","tag","className","children","propSelectors","props","computed","createElement","DynamicText","selector","React","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","data","finalData","map","item","index","key","name","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","isRepeated","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","providesData","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","ensure","x","undefined","Error","Embed","code","hideInEditor","rootElt","useRef","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","value","appendChild","createTextNode","innerHTML","parentNode","replaceChild","effectiveCode","ref","dangerouslySetInnerHTML","__html","whiteSpace","embedMeta","lang","editOnly","defaultStyles","maxWidth","registerEmbed","customEmbedMeta","Iframe","preview","isEditing","useContext","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","registerIframe","customIframeMeta","defaultItemName","defaultIndexName","Repeater","items","itemName","indexName","isArray","toString","repeaterMeta","registerRepeater","customRepeaterMeta","useDirectionalIntersection","scrollDownThreshold","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","handler","entries","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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,UAAU,GA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cACd/H,QACAgI;AAEA,MAAIhI,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACE,iBAAP,CAAyBkH,KAAzB,EAAgCY,eAAhC,WAAgCA,eAAhC,GAAmDV,SAAnD;AACD,GAFD,MAEO;AACLpH,IAAAA,iBAAiB,CAACkH,KAAD,EAAQY,eAAR,WAAQA,eAAR,GAA2BV,SAA3B,CAAjB;AACD;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plasmic-basic-components.cjs.development.js","sources":["../src/Data.tsx","../src/common.ts","../src/Embed.tsx","../src/Iframe.tsx","../src/Repeater.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx"],"sourcesContent":["import {\n applySelector as _applySelector,\n ComponentMeta,\n DataProvider as _DataProvider,\n DataProviderProps,\n repeatedElement,\n SelectorDict,\n useDataEnv as _useDataEnv,\n useSelector as _useSelector,\n useSelectors as _useSelectors,\n} from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps, createElement, ReactNode } from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const applySelector: typeof _applySelector = function (...args) {\n console.warn(\n \"DEPRECATED: Import applySelector from @plasmicapp/host instead.\"\n );\n return _applySelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelector: typeof _useSelector = function (...args) {\n console.warn(\"DEPRECATED: Import useSelector from @plasmicapp/host instead.\");\n return _useSelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelectors: typeof _useSelectors = function (...args) {\n console.warn(\n \"DEPRECATED: Import useSelectors from @plasmicapp/host instead.\"\n );\n return _useSelectors(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useDataEnv: typeof _useDataEnv = function (...args) {\n console.warn(\"DEPRECATED: Import useDataEnv from @plasmicapp/host instead.\");\n return _useDataEnv(...args);\n};\n\nexport const DataProvider: typeof _DataProvider = function (...args) {\n return _DataProvider(...args);\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, 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: {\n type: \"slot\",\n isRepeated: true,\n },\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 providesData: true,\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 },\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(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\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","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 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 style={{ whiteSpace: \"normal\" }}\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: \"code\",\n lang: \"html\",\n defaultValueHint:\n \"<div>Paste your embed code via the right sidebar</div>\",\n description: \"The HTML code to be embedded\",\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 {\n ComponentMeta,\n DataProvider,\n registerComponent,\n repeatedElement,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nconst defaultItemName = \"currentItem\";\nconst defaultIndexName = \"currentIndex\";\n\ninterface RepeaterProps<T> {\n children: React.ReactNode;\n items: T[];\n itemName?: string;\n indexName?: string;\n}\n\nfunction Repeater<T>(props: RepeaterProps<T>) {\n const { children, items, itemName, indexName } = props;\n\n if (!Array.isArray(items)) {\n throw new Error(\"Repeater received an invalid collection: not an array.\");\n }\n\n return (\n <>\n {items.map((item, index) => (\n <DataProvider\n key={index.toString()}\n name={itemName || defaultItemName}\n data={item}\n >\n <DataProvider name={indexName || defaultIndexName} data={index}>\n {repeatedElement(index, children)}\n </DataProvider>\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const repeaterMeta: ComponentMeta<RepeaterProps<any>> = {\n name: `plasmic-repeater`,\n displayName: \"Repeater\",\n importName: \"Repeater\",\n importPath: thisModule,\n providesData: true,\n props: {\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n items: {\n type: \"array\",\n defaultValue: [1, 2, 3],\n displayName: \"Collection\",\n description: \"Items array (JavaScript expression).\",\n },\n itemName: {\n type: \"string\",\n defaultValue: defaultItemName,\n defaultValueHint: defaultItemName,\n displayName: \"Item\",\n description: \"Data context key for the current item.\",\n },\n indexName: {\n type: \"string\",\n defaultValue: defaultIndexName,\n defaultValueHint: defaultIndexName,\n displayName: \"Index\",\n description: \"Data context key for the index of the current item.\",\n },\n },\n};\n\nexport function registerRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customRepeaterMeta?: ComponentMeta<RepeaterProps<any>>\n) {\n if (loader) {\n loader.registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n } else {\n registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n }\n}\n\nexport default Repeater;\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. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work.\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n defaultValue: true,\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":["thisModule","applySelector","console","warn","_applySelector","useSelector","_useSelector","useSelectors","_useSelectors","useDataEnv","_useDataEnv","DataProvider","_DataProvider","DynamicElement","tag","className","children","propSelectors","props","computed","createElement","DynamicText","selector","React","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","data","finalData","map","item","index","key","name","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","isRepeated","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","providesData","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","ensure","x","undefined","Error","Embed","code","hideInEditor","rootElt","useRef","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","value","appendChild","createTextNode","innerHTML","parentNode","replaceChild","effectiveCode","ref","dangerouslySetInnerHTML","__html","whiteSpace","embedMeta","lang","editOnly","defaultStyles","maxWidth","registerEmbed","customEmbedMeta","Iframe","preview","isEditing","useContext","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","registerIframe","customIframeMeta","defaultItemName","defaultIndexName","Repeater","items","itemName","indexName","isArray","toString","repeaterMeta","registerRepeater","customRepeaterMeta","useDirectionalIntersection","scrollDownThreshold","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","handler","entries","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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,UAAU,GAAG,uCAAuC;AAE1D;;;IAGaC,aAAa,GAA0B,SAAvCA,aAAa;EACxBC,OAAO,CAACC,IAAI,CACV,iEAAiE,CAClE;EACD,OAAOC,kBAAc,yBAAS;AAChC;AAEA;;;IAGaC,WAAW,GAAwB,SAAnCA,WAAW;EACtBH,OAAO,CAACC,IAAI,CAAC,+DAA+D,CAAC;EAC7E,OAAOG,gBAAY,yBAAS;AAC9B;AAEA;;;IAGaC,YAAY,GAAyB,SAArCA,YAAY;EACvBL,OAAO,CAACC,IAAI,CACV,gEAAgE,CACjE;EACD,OAAOK,iBAAa,yBAAS;AAC/B;AAEA;;;IAGaC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ACtBJ,WAAW,EACT;;GAEL;EACDgE,aAAa,EAAE;IACbyB,MAAM,EAAE,KAAK;IACbD,KAAK,EAAE,OAAO;IACdvB,QAAQ,EAAE;;CAEb;AAED,SAAgBsE,aAAa,CAC3B/H,MAAwD,EACxDgI,eAA2C;EAE3C,IAAIhI,MAAM,EAAE;IACVA,MAAM,CAACE,iBAAiB,CAACkH,KAAK,EAAEY,eAAe,WAAfA,eAAe,GAAIV,SAAS,CAAC;GAC9D,MAAM;IACLpH,iBAAiB,CAACkH,KAAK,EAAEY,eAAe,WAAfA,eAAe,GAAIV,SAAS,CAAC;;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@plasmicapp/host"),r=e(require("@plasmicapp/host/registerComponent")),o=require("react"),a=e(o);function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function i(e,t){if(null==e)return{};var r,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)t.indexOf(r=n[o])>=0||(a[r]=e[r]);return a}var l=["tag","className","children","propSelectors"],s=["selector","propSelectors"],p=["selector","propSelectors"],c="@plasmicpkgs/plasmic-basic-components";function m(e){var r=e.tag,a=void 0===r?"div":r,s=e.className,p=e.children,c=e.propSelectors,m=i(e,l),d=t.useSelectors(c);return o.createElement(a,n({children:p},m,d,{className:s+" "+d.className}))}function d(e){var t=e.selector,r=e.propSelectors,o=i(e,s);return a.createElement(m,Object.assign({},o,{propSelectors:n({},r,{children:t})}),"(DynamicText requires a selector)")}function u(e){var t=e.selector,r=e.propSelectors,o=i(e,p);return a.createElement(m,Object.assign({tag:"img",loading:"lazy",style:{objectFit:"cover"}},o,{propSelectors:n({},r,{src:t}),src:"https://studio.plasmic.app/static/img/placeholder.png"}))}function h(e){var r,o=e.children,n=e.loopItemName,i=e.keySelector,l=e.data,s=null!=(r=null!=l?l:t.useSelector(e.selector))?r:[1,2,3];return a.createElement(a.Fragment,null,null==s||null==s.map?void 0:s.map((function(e,r){var l;return a.createElement(t.DataProvider,{key:null!=(l=t.applySelector(e,i))?l:r,name:n,data:e},t.repeatedElement(r,o))})))}var y={selector:{type:"string",description:"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField"},loopItemName:{type:"string",defaultValue:"item",description:"The name of the variable to use to store the current item in the loop"},children:{type:"slot",isRepeated:!0}},f={name:"hostless-dynamic-repeater",displayName:"Dynamic Repeater",importName:"DynamicRepeater",importPath:c,props:y},v={name:"hostless-data-provider",displayName:"Data Provider",importName:"DataProvider",importPath:c,providesData:!0,props:{name:{type:"string",defaultValue:"celebrities",description:"The name of the variable to store the data in"},data:{type:"object",defaultValue:[{name:"Fill Murray",birthYear:1950,profilePicture:["https://www.fillmurray.com/200/300"]},{name:"Place Cage",birthYear:1950,profilePicture:["https://www.placecage.com/200/300"]}]},children:{type:"slot"}}},g={propSelectors:{type:"object",defaultValueHint:{},description:"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value."}},x=n({},g,{tag:{type:"string",defaultValueHint:"div",description:"The HTML tag to use"}}),b={name:"hostless-dynamic-element",displayName:"Dynamic Element",importName:"DynamicElement",importPath:c,props:n({},x,{children:"slot"})},N={name:"hostless-dynamic-text",importName:"DynamicText",displayName:"Dynamic Text",importPath:c,props:n({},x,{selector:{type:"string",description:"The selector expression to use to get the text, such as: someVariable.0.someField"}})},w={name:"hostless-dynamic-image",displayName:"Dynamic Image",importName:"DynamicImage",importPath:c,props:n({},g,{selector:{type:"string",description:"The selector expression to use to get the image source URL, such as: someVariable.0.someField"}})};function E(e){if(null==e)throw new Error("Value must not be undefined or null");return e}function D(e){var t=e.className,r=e.code,n=e.hideInEditor,i=void 0!==n&&n,l=o.useRef(null);return o.useEffect((function(){i||Array.from(E(l.current).querySelectorAll("script")).forEach((function(e){var t=document.createElement("script");Array.from(e.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),t.appendChild(document.createTextNode(e.innerHTML)),E(e.parentNode).replaceChild(t,e)}))}),[r,i]),a.createElement("div",{ref:l,className:t,dangerouslySetInnerHTML:{__html:i?"":r},style:{whiteSpace:"normal"}})}var S={name:"hostless-embed",displayName:"Embed HTML",importName:"Embed",importPath:"@plasmicpkgs/plasmic-basic-components",props:{code:{type:"code",lang:"html",defaultValueHint:"<div>Paste your embed code via the right sidebar</div>",description:"The HTML code to be embedded"},hideInEditor:{type:"boolean",displayName:"Hide in editor",description:"Disable running the code while editing in Plasmic Studio (may require reload)",editOnly:!0}},defaultStyles:{maxWidth:"100%"}};function P(e){var r=e.preview,n=e.src,i=e.className;return o.useContext(t.PlasmicCanvasContext)&&!r?a.createElement("div",{className:i},a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"#eee",color:"#888",fontSize:"36px",fontFamily:"sans-serif",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"}},"Iframe placeholder")):a.createElement("iframe",{src:n,className:i})}var I={name:"hostless-iframe",displayName:"Iframe",importName:"Iframe",importPath:"@plasmicpkgs/plasmic-basic-components",props:{src:{type:"string",defaultValue:"https://www.example.com"},preview:{type:"boolean",description:"Load the iframe while editing in Plasmic Studio"}},defaultStyles:{width:"300px",height:"150px",maxWidth:"100%"}};function T(e){var r=e.children,o=e.items,n=e.itemName,i=e.indexName;if(!Array.isArray(o))throw new Error("Repeater received an invalid collection: not an array.");return a.createElement(a.Fragment,null,o.map((function(e,o){return a.createElement(t.DataProvider,{key:o.toString(),name:n||"currentItem",data:e},a.createElement(t.DataProvider,{name:i||"currentIndex",data:o},t.repeatedElement(o,r)))})))}var R={name:"plasmic-repeater",displayName:"Repeater",importName:"Repeater",importPath:"@plasmicpkgs/plasmic-basic-components",providesData:!0,props:{children:{type:"slot",isRepeated:!0},items:{type:"array",defaultValue:[1,2,3],displayName:"Collection",description:"Items array (JavaScript expression)."},itemName:{type:"string",defaultValue:"currentItem",defaultValueHint:"currentItem",displayName:"Item",description:"Data context key for the current item."},indexName:{type:"string",defaultValue:"currentIndex",defaultValueHint:"currentIndex",displayName:"Index",description:"Data context key for the index of the current item."}}};function C(e){var t=e.ref,r=e.scrollDownThreshold,a=void 0===r?.5:r,n=e.scrollUpThreshold,i=void 0===n?0:n,l=o.useState(!1),s=l[0],p=l[1];return o.useEffect((function(){if(t.current&&"function"==typeof IntersectionObserver){var e=new IntersectionObserver((function(e){e[0].intersectionRatio>=a?p(!0):e[0].intersectionRatio<=i&&p(!1)}),{root:null,rootMargin:"0%",threshold:[i,a]});return e.observe(t.current),function(){p(!1),e.disconnect()}}return function(){}}),[t.current,a,i]),s}function V(e){var t=e.children,r=e.className,n=e.scrollDownThreshold,i=void 0===n?.5:n,l=e.scrollUpThreshold,s=void 0===l?0:l,p=o.useRef(null),c=C({ref:p,scrollUpThreshold:s,scrollDownThreshold:i});return a.createElement("div",{className:r,ref:p},c?t:null)}var M={name:"hostless-scroll-revealer",importName:"ScrollRevealer",displayName:"Scroll Revealer",importPath:"@plasmicpkgs/plasmic-basic-components",props:{children:"slot",scrollDownThreshold:{type:"number",displayName:"Scroll down threshold",defaultValueHint:.5,description:"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)"},scrollUpThreshold:{type:"number",displayName:"Scroll up threshold",defaultValueHint:0,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)"}},defaultStyles:{width:"stretch",maxWidth:"100%"}},k=a.forwardRef((function(e,t){return a.createElement("video",Object.assign({ref:t},e))})),H={name:"hostless-html-video",importName:"Video",displayName:"HTML Video",importPath:"@plasmicpkgs/plasmic-basic-components",props:{src:{type:"string",defaultValue:"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm",displayName:"Source URL",description:"URL to a video file."},autoPlay:{type:"boolean",displayName:"Auto Play",description:"Whether the video show automatically start playing when the player loads. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work."},controls:{type:"boolean",displayName:"Show Controls",description:"Whether the video player controls should be displayed",defaultValue:!0},playsInline:{type:"boolean",displayName:"Plays inline",description:"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that."},loop:{type:"boolean",displayName:"Loop",description:"Whether the video should be played again after it finishes"},muted:{type:"boolean",displayName:"Muted",description:"Whether audio should be muted"},poster:{type:"imageUrl",displayName:"Poster (placeholder) image",description:"Image to show while video is downloading"},preload:{type:"choice",options:["none","metadata","auto"],displayName:"Preload",description:"Whether to preload nothing, metadata only, or the full video"}},defaultStyles:{height:"hug",width:"640px",maxWidth:"100%"}};exports.DataProvider=function(){return t.DataProvider.apply(void 0,arguments)},exports.DynamicElement=m,exports.DynamicImage=u,exports.DynamicRepeater=h,exports.DynamicText=d,exports.Embed=D,exports.Iframe=P,exports.Repeater=T,exports.ScrollRevealer=V,exports.Video=k,exports.applySelector=function(){return console.warn("DEPRECATED: Import applySelector from @plasmicapp/host instead."),t.applySelector.apply(void 0,arguments)},exports.dataProviderMeta=v,exports.dynamicElementMeta=b,exports.dynamicImageMeta=w,exports.dynamicRepeaterMeta=f,exports.dynamicRepeaterProps=y,exports.dynamicTextMeta=N,exports.embedMeta=S,exports.iframeMeta=I,exports.registerDataProvider=function(e,o){e?e.registerComponent(t.DataProvider,null!=o?o:v):r(t.DataProvider,null!=o?o:v)},exports.registerDynamicElement=function(e,t){e?e.registerComponent(m,null!=t?t:b):r(m,null!=t?t:b)},exports.registerDynamicImage=function(e,t){e?e.registerComponent(u,null!=t?t:w):r(u,null!=t?t:w)},exports.registerDynamicRepeater=function(e,t){e?e.registerComponent(h,null!=t?t:f):r(h,null!=t?t:f)},exports.registerDynamicText=function(e,t){e?e.registerComponent(d,null!=t?t:N):r(d,null!=t?t:N)},exports.registerEmbed=function(e,t){e?e.registerComponent(D,null!=t?t:S):r(D,null!=t?t:S)},exports.registerIframe=function(e,t){e?e.registerComponent(P,null!=t?t:I):r(P,null!=t?t:I)},exports.registerRepeater=function(e,r){e?e.registerComponent(T,null!=r?r:R):t.registerComponent(T,null!=r?r:R)},exports.registerScrollRevealer=function(e,t){e?e.registerComponent(V,null!=t?t:M):r(V,null!=t?t:M)},exports.registerVideo=function(e,t){e?e.registerComponent(k,null!=t?t:H):r(k,null!=t?t:H)},exports.repeaterMeta=R,exports.scrollRevealerMeta=M,exports.useDataEnv=function(){return console.warn("DEPRECATED: Import useDataEnv from @plasmicapp/host instead."),t.useDataEnv.apply(void 0,arguments)},exports.useDirectionalIntersection=C,exports.useSelector=function(){return console.warn("DEPRECATED: Import useSelector from @plasmicapp/host instead."),t.useSelector.apply(void 0,arguments)},exports.useSelectors=function(){return console.warn("DEPRECATED: Import useSelectors from @plasmicapp/host instead."),t.useSelectors.apply(void 0,arguments)},exports.videoMeta=H;
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@plasmicapp/host"),r=e(require("@plasmicapp/host/registerComponent")),a=require("react"),o=e(a);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function i(e,t){if(null==e)return{};var r,a,o={},n=Object.keys(e);for(a=0;a<n.length;a++)t.indexOf(r=n[a])>=0||(o[r]=e[r]);return o}var l=["tag","className","children","propSelectors"],s=["selector","propSelectors"],p=["selector","propSelectors"],c="@plasmicpkgs/plasmic-basic-components";function m(e){var r=e.tag,o=void 0===r?"div":r,s=e.className,p=e.children,c=e.propSelectors,m=i(e,l),d=t.useSelectors(c);return a.createElement(o,n({children:p},m,d,{className:s+" "+d.className}))}function d(e){var t=e.selector,r=e.propSelectors,a=i(e,s);return o.createElement(m,Object.assign({},a,{propSelectors:n({},r,{children:t})}),"(DynamicText requires a selector)")}function u(e){var t=e.selector,r=e.propSelectors,a=i(e,p);return o.createElement(m,Object.assign({tag:"img",loading:"lazy",style:{objectFit:"cover"}},a,{propSelectors:n({},r,{src:t}),src:"https://studio.plasmic.app/static/img/placeholder.png"}))}function h(e){var r,a=e.children,n=e.loopItemName,i=e.keySelector,l=e.data,s=null!=(r=null!=l?l:t.useSelector(e.selector))?r:[1,2,3];return o.createElement(o.Fragment,null,null==s||null==s.map?void 0:s.map((function(e,r){var l;return o.createElement(t.DataProvider,{key:null!=(l=t.applySelector(e,i))?l:r,name:n,data:e},t.repeatedElement(r,a))})))}var y={selector:{type:"string",description:"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField"},loopItemName:{type:"string",defaultValue:"item",description:"The name of the variable to use to store the current item in the loop"},children:{type:"slot",isRepeated:!0}},f={name:"hostless-dynamic-repeater",displayName:"Dynamic Repeater",importName:"DynamicRepeater",importPath:c,props:y},v={name:"hostless-data-provider",displayName:"Data Provider",importName:"DataProvider",importPath:c,providesData:!0,props:{name:{type:"string",defaultValue:"celebrities",description:"The name of the variable to store the data in"},data:{type:"object",defaultValue:[{name:"Fill Murray",birthYear:1950,profilePicture:["https://www.fillmurray.com/200/300"]},{name:"Place Cage",birthYear:1950,profilePicture:["https://www.placecage.com/200/300"]}]},children:{type:"slot"}}},g={propSelectors:{type:"object",defaultValueHint:{},description:"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value."}},x=n({},g,{tag:{type:"string",defaultValueHint:"div",description:"The HTML tag to use"}}),b={name:"hostless-dynamic-element",displayName:"Dynamic Element",importName:"DynamicElement",importPath:c,props:n({},x,{children:"slot"})},N={name:"hostless-dynamic-text",importName:"DynamicText",displayName:"Dynamic Text",importPath:c,props:n({},x,{selector:{type:"string",description:"The selector expression to use to get the text, such as: someVariable.0.someField"}})},w={name:"hostless-dynamic-image",displayName:"Dynamic Image",importName:"DynamicImage",importPath:c,props:n({},g,{selector:{type:"string",description:"The selector expression to use to get the image source URL, such as: someVariable.0.someField"}})};function E(e){if(null==e)throw new Error("Value must not be undefined or null");return e}function D(e){var t=e.className,r=e.code,n=e.hideInEditor,i=void 0!==n&&n,l=a.useRef(null);return a.useEffect((function(){i||Array.from(E(l.current).querySelectorAll("script")).forEach((function(e){var t=document.createElement("script");Array.from(e.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),t.appendChild(document.createTextNode(e.innerHTML)),E(e.parentNode).replaceChild(t,e)}))}),[r,i]),o.createElement("div",{ref:l,className:t,dangerouslySetInnerHTML:{__html:i?"":r},style:{whiteSpace:"normal"}})}var S={name:"hostless-embed",displayName:"Embed HTML",importName:"Embed",importPath:"@plasmicpkgs/plasmic-basic-components",props:{code:{type:"code",lang:"html",defaultValueHint:"<div>Paste your embed code via the right sidebar</div>",description:"The HTML code to be embedded"},hideInEditor:{type:"boolean",displayName:"Hide in editor",description:"Disable running the code while editing in Plasmic Studio (may require reload)",editOnly:!0}},defaultStyles:{maxWidth:"100%"}};function P(e){var r=e.preview,n=e.src,i=e.className;return a.useContext(t.PlasmicCanvasContext)&&!r?o.createElement("div",{className:i},o.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"#eee",color:"#888",fontSize:"36px",fontFamily:"sans-serif",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"}},"Iframe placeholder")):o.createElement("iframe",{src:n,className:i})}var I={name:"hostless-iframe",displayName:"Iframe",importName:"Iframe",importPath:"@plasmicpkgs/plasmic-basic-components",props:{src:{type:"string",defaultValue:"https://www.example.com"},preview:{type:"boolean",description:"Load the iframe while editing in Plasmic Studio"}},defaultStyles:{width:"300px",height:"150px",maxWidth:"100%"}};function T(e){var r=e.children,a=e.items,n=e.itemName,i=e.indexName;if(!Array.isArray(a))throw new Error("Repeater received an invalid collection: not an array.");return o.createElement(o.Fragment,null,a.map((function(e,a){return o.createElement(t.DataProvider,{key:a.toString(),name:n||"currentItem",data:e},o.createElement(t.DataProvider,{name:i||"currentIndex",data:a},t.repeatedElement(a,r)))})))}var R={name:"plasmic-repeater",displayName:"Repeater",importName:"Repeater",importPath:"@plasmicpkgs/plasmic-basic-components",providesData:!0,props:{children:{type:"slot",isRepeated:!0},items:{type:"array",defaultValue:[1,2,3],displayName:"Collection",description:"Items array (JavaScript expression)."},itemName:{type:"string",defaultValue:"currentItem",defaultValueHint:"currentItem",displayName:"Item",description:"Data context key for the current item."},indexName:{type:"string",defaultValue:"currentIndex",defaultValueHint:"currentIndex",displayName:"Index",description:"Data context key for the index of the current item."}}};function C(e){var t=e.ref,r=e.scrollDownThreshold,o=void 0===r?.5:r,n=e.scrollUpThreshold,i=void 0===n?0:n,l=a.useState(!1),s=l[0],p=l[1];return a.useEffect((function(){if(t.current&&"function"==typeof IntersectionObserver){var e=new IntersectionObserver((function(e){e[0].intersectionRatio>=o?p(!0):e[0].intersectionRatio<=i&&p(!1)}),{root:null,rootMargin:"0%",threshold:[i,o]});return e.observe(t.current),function(){p(!1),e.disconnect()}}return function(){}}),[t.current,o,i]),s}function V(e){var t=e.children,r=e.className,n=e.scrollDownThreshold,i=void 0===n?.5:n,l=e.scrollUpThreshold,s=void 0===l?0:l,p=a.useRef(null),c=C({ref:p,scrollUpThreshold:s,scrollDownThreshold:i});return o.createElement("div",{className:r,ref:p},c?t:null)}var M={name:"hostless-scroll-revealer",importName:"ScrollRevealer",displayName:"Scroll Revealer",importPath:"@plasmicpkgs/plasmic-basic-components",props:{children:"slot",scrollDownThreshold:{type:"number",displayName:"Scroll down threshold",defaultValueHint:.5,description:"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)"},scrollUpThreshold:{type:"number",displayName:"Scroll up threshold",defaultValueHint:0,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)"}},defaultStyles:{width:"stretch",maxWidth:"100%"}},k=o.forwardRef((function(e,t){return o.createElement("video",Object.assign({ref:t},e))})),H={name:"hostless-html-video",importName:"Video",displayName:"HTML Video",importPath:"@plasmicpkgs/plasmic-basic-components",props:{src:{type:"string",defaultValue:"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm",displayName:"Source URL",description:"URL to a video file."},autoPlay:{type:"boolean",displayName:"Auto Play",description:"Whether the video show automatically start playing when the player loads. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work."},controls:{type:"boolean",displayName:"Show Controls",description:"Whether the video player controls should be displayed",defaultValue:!0},playsInline:{type:"boolean",displayName:"Plays inline",description:"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that."},loop:{type:"boolean",displayName:"Loop",description:"Whether the video should be played again after it finishes"},muted:{type:"boolean",displayName:"Muted",description:"Whether audio should be muted"},poster:{type:"imageUrl",displayName:"Poster (placeholder) image",description:"Image to show while video is downloading"},preload:{type:"choice",options:["none","metadata","auto"],displayName:"Preload",description:"Whether to preload nothing, metadata only, or the full video"}},defaultStyles:{height:"hug",width:"640px",maxWidth:"100%"}};exports.DataProvider=function(){return t.DataProvider.apply(void 0,arguments)},exports.DynamicElement=m,exports.DynamicImage=u,exports.DynamicRepeater=h,exports.DynamicText=d,exports.Embed=D,exports.Iframe=P,exports.Repeater=T,exports.ScrollRevealer=V,exports.Video=k,exports.applySelector=function(){return console.warn("DEPRECATED: Import applySelector from @plasmicapp/host instead."),t.applySelector.apply(void 0,arguments)},exports.dataProviderMeta=v,exports.dynamicElementMeta=b,exports.dynamicImageMeta=w,exports.dynamicRepeaterMeta=f,exports.dynamicRepeaterProps=y,exports.dynamicTextMeta=N,exports.embedMeta=S,exports.iframeMeta=I,exports.registerDataProvider=function(e,a){e?e.registerComponent(t.DataProvider,null!=a?a:v):r(t.DataProvider,null!=a?a:v)},exports.registerDynamicElement=function(e,t){e?e.registerComponent(m,null!=t?t:b):r(m,null!=t?t:b)},exports.registerDynamicImage=function(e,t){e?e.registerComponent(u,null!=t?t:w):r(u,null!=t?t:w)},exports.registerDynamicRepeater=function(e,t){e?e.registerComponent(h,null!=t?t:f):r(h,null!=t?t:f)},exports.registerDynamicText=function(e,t){e?e.registerComponent(d,null!=t?t:N):r(d,null!=t?t:N)},exports.registerEmbed=function(e,t){e?e.registerComponent(D,null!=t?t:S):r(D,null!=t?t:S)},exports.registerIframe=function(e,t){e?e.registerComponent(P,null!=t?t:I):r(P,null!=t?t:I)},exports.registerRepeater=function(e,r){e?e.registerComponent(T,null!=r?r:R):t.registerComponent(T,null!=r?r:R)},exports.registerScrollRevealer=function(e,t){e?e.registerComponent(V,null!=t?t:M):r(V,null!=t?t:M)},exports.registerVideo=function(e,t){e?e.registerComponent(k,null!=t?t:H):r(k,null!=t?t:H)},exports.repeaterMeta=R,exports.scrollRevealerMeta=M,exports.useDataEnv=function(){return console.warn("DEPRECATED: Import useDataEnv from @plasmicapp/host instead."),t.useDataEnv.apply(void 0,arguments)},exports.useDirectionalIntersection=C,exports.useSelector=function(){return console.warn("DEPRECATED: Import useSelector from @plasmicapp/host instead."),t.useSelector.apply(void 0,arguments)},exports.useSelectors=function(){return console.warn("DEPRECATED: Import useSelectors from @plasmicapp/host instead."),t.useSelectors.apply(void 0,arguments)},exports.videoMeta=H;
2
2
  //# sourceMappingURL=plasmic-basic-components.cjs.production.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plasmic-basic-components.cjs.production.min.js","sources":["../src/Data.tsx","../src/common.ts","../src/Embed.tsx","../src/Iframe.tsx","../src/Repeater.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx"],"sourcesContent":["import {\n applySelector as _applySelector,\n ComponentMeta,\n DataProvider as _DataProvider,\n DataProviderProps,\n repeatedElement,\n SelectorDict,\n useDataEnv as _useDataEnv,\n useSelector as _useSelector,\n useSelectors as _useSelectors,\n} from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps, createElement, ReactNode } from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const applySelector: typeof _applySelector = function (...args) {\n console.warn(\n \"DEPRECATED: Import applySelector from @plasmicapp/host instead.\"\n );\n return _applySelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelector: typeof _useSelector = function (...args) {\n console.warn(\"DEPRECATED: Import useSelector from @plasmicapp/host instead.\");\n return _useSelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelectors: typeof _useSelectors = function (...args) {\n console.warn(\n \"DEPRECATED: Import useSelectors from @plasmicapp/host instead.\"\n );\n return _useSelectors(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useDataEnv: typeof _useDataEnv = function (...args) {\n console.warn(\"DEPRECATED: Import useDataEnv from @plasmicapp/host instead.\");\n return _useDataEnv(...args);\n};\n\nexport const DataProvider: typeof _DataProvider = function (...args) {\n return _DataProvider(...args);\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, 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: {\n type: \"slot\",\n isRepeated: true,\n },\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 providesData: true,\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 },\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(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\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","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 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 style={{ whiteSpace: \"normal\" }}\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: \"code\",\n lang: \"html\",\n defaultValueHint:\n \"<div>Paste your embed code via the right sidebar</div>\",\n description: \"The HTML code to be embedded\",\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 {\n ComponentMeta,\n DataProvider,\n registerComponent,\n repeatedElement,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nconst defaultItemName = \"currentItem\";\nconst defaultIndexName = \"currentIndex\";\n\ninterface RepeaterProps<T> {\n children: React.ReactNode;\n items: T[];\n itemName?: string;\n indexName?: string;\n}\n\nfunction Repeater<T>(props: RepeaterProps<T>) {\n const { children, items, itemName, indexName } = props;\n\n if (!Array.isArray(items)) {\n throw new Error(\"Repeater received an invalid collection: not an array.\");\n }\n\n return (\n <>\n {items.map((item, index) => (\n <DataProvider\n key={index.toString()}\n name={itemName || defaultItemName}\n data={item}\n >\n <DataProvider name={indexName || defaultIndexName} data={index}>\n {repeatedElement(index, children)}\n </DataProvider>\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const repeaterMeta: ComponentMeta<RepeaterProps<any>> = {\n name: `plasmic-repeater`,\n displayName: \"Repeater\",\n importName: \"Repeater\",\n importPath: thisModule,\n providesData: true,\n props: {\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n items: {\n type: \"array\",\n defaultValue: [1, 2, 3],\n displayName: \"Collection\",\n description: \"Items array (JavaScript expression).\",\n },\n itemName: {\n type: \"string\",\n defaultValue: defaultItemName,\n defaultValueHint: defaultItemName,\n displayName: \"Item\",\n description: \"Data context key for the current item.\",\n },\n indexName: {\n type: \"string\",\n defaultValue: defaultIndexName,\n defaultValueHint: defaultIndexName,\n displayName: \"Index\",\n description: \"Data context key for the index of the current item.\",\n },\n },\n};\n\nexport function registerRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customRepeaterMeta?: ComponentMeta<RepeaterProps<any>>\n) {\n if (loader) {\n loader.registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n } else {\n registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n }\n}\n\nexport default Repeater;\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. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work.\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n defaultValue: true,\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":["thisModule","DynamicElement","tag","className","children","propSelectors","props","computed","_useSelectors","createElement","DynamicText","selector","React","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","data","finalData","_useSelector","map","item","index","_DataProvider","key","_applySelector","name","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","isRepeated","dynamicRepeaterMeta","displayName","importName","importPath","dataProviderMeta","providesData","birthYear","profilePicture","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","dynamicTextMeta","dynamicImageMeta","ensure","x","Error","Embed","code","hideInEditor","rootElt","useRef","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","value","appendChild","createTextNode","innerHTML","parentNode","replaceChild","ref","dangerouslySetInnerHTML","__html","whiteSpace","embedMeta","lang","editOnly","defaultStyles","maxWidth","Iframe","preview","useContext","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","Repeater","items","itemName","indexName","isArray","DataProvider","toString","repeaterMeta","useDirectionalIntersection","scrollDownThreshold","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","observer","entries","intersectionRatio","root","rootMargin","threshold","observe","disconnect","ScrollRevealer","intersectionRef","scrollRevealerMeta","Video","forwardRef","videoMeta","autoPlay","controls","playsInline","loop","muted","poster","preload","options","console","warn","loader","customDataProviderMeta","registerComponent","customDynamicElementMeta","customDynamicImageMeta","customDynamicRepeaterMeta","customDynamicTextMeta","customEmbedMeta","customIframeMeta","customRepeaterMeta","customScrollRevealerMeta","customVideoMeta","_useDataEnv"],"mappings":"+rBAcMA,EAAa,iDAgDHC,aAGdC,IAAAA,aAAM,QACNC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,cACGC,SAEGC,EAAWC,eAAcH,UACxBI,gBAAcP,KACnBE,SAAAA,GACGE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AAkB9F,QAAOmG,EAAAA,EAAmBxE,GAEnDmE,EAAkB9F,QAAOmG,EAAAA,EAAmBxE,oCCb9CiE,EACAQ,GAEIR,EACFA,EAAOE,kBAAkB9D,QAAQoE,EAAAA,EAAoBlD,GAErD4C,EAAkB9D,QAAQoE,EAAAA,EAAoBlD,sCCShD0C,EACAS,GAEIT,EACFA,EAAOE,kBAAkBzC,QAAUgD,EAAAA,EAAsBzC,GAEzDkC,oBAAkBzC,QAAUgD,EAAAA,EAAsBzC,4CC0BpDgC,EACAU,GAEIV,EACFA,EAAOE,kBACLlB,QACA0B,EAAAA,EAA4BxB,GAG9BgB,EACElB,QACA0B,EAAAA,EAA4BxB,mCCnChCc,EACAW,GAEIX,EACFA,EAAOE,kBAAkBf,QAAOwB,EAAAA,EAAmBtB,GAEnDa,EAAkBf,QAAOwB,EAAAA,EAAmBtB,2EN9CF,kBAC5CS,QAAQC,KAAK,gEACNa,+FApBuC,kBAC9Cd,QAAQC,KAAK,iEACN1H,4DAMyC,kBAChDyH,QAAQC,KACN,kEAEKzI"}
1
+ {"version":3,"file":"plasmic-basic-components.cjs.production.min.js","sources":["../src/Data.tsx","../src/common.ts","../src/Embed.tsx","../src/Iframe.tsx","../src/Repeater.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx"],"sourcesContent":["import {\n applySelector as _applySelector,\n ComponentMeta,\n DataProvider as _DataProvider,\n DataProviderProps,\n repeatedElement,\n SelectorDict,\n useDataEnv as _useDataEnv,\n useSelector as _useSelector,\n useSelectors as _useSelectors,\n} from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps, createElement, ReactNode } from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const applySelector: typeof _applySelector = function (...args) {\n console.warn(\n \"DEPRECATED: Import applySelector from @plasmicapp/host instead.\"\n );\n return _applySelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelector: typeof _useSelector = function (...args) {\n console.warn(\"DEPRECATED: Import useSelector from @plasmicapp/host instead.\");\n return _useSelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelectors: typeof _useSelectors = function (...args) {\n console.warn(\n \"DEPRECATED: Import useSelectors from @plasmicapp/host instead.\"\n );\n return _useSelectors(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useDataEnv: typeof _useDataEnv = function (...args) {\n console.warn(\"DEPRECATED: Import useDataEnv from @plasmicapp/host instead.\");\n return _useDataEnv(...args);\n};\n\nexport const DataProvider: typeof _DataProvider = function (...args) {\n return _DataProvider(...args);\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, 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: {\n type: \"slot\",\n isRepeated: true,\n },\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 providesData: true,\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 },\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(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\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","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 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 style={{ whiteSpace: \"normal\" }}\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: \"code\",\n lang: \"html\",\n defaultValueHint:\n \"<div>Paste your embed code via the right sidebar</div>\",\n description: \"The HTML code to be embedded\",\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 {\n ComponentMeta,\n DataProvider,\n registerComponent,\n repeatedElement,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nconst defaultItemName = \"currentItem\";\nconst defaultIndexName = \"currentIndex\";\n\ninterface RepeaterProps<T> {\n children: React.ReactNode;\n items: T[];\n itemName?: string;\n indexName?: string;\n}\n\nfunction Repeater<T>(props: RepeaterProps<T>) {\n const { children, items, itemName, indexName } = props;\n\n if (!Array.isArray(items)) {\n throw new Error(\"Repeater received an invalid collection: not an array.\");\n }\n\n return (\n <>\n {items.map((item, index) => (\n <DataProvider\n key={index.toString()}\n name={itemName || defaultItemName}\n data={item}\n >\n <DataProvider name={indexName || defaultIndexName} data={index}>\n {repeatedElement(index, children)}\n </DataProvider>\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const repeaterMeta: ComponentMeta<RepeaterProps<any>> = {\n name: `plasmic-repeater`,\n displayName: \"Repeater\",\n importName: \"Repeater\",\n importPath: thisModule,\n providesData: true,\n props: {\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n items: {\n type: \"array\",\n defaultValue: [1, 2, 3],\n displayName: \"Collection\",\n description: \"Items array (JavaScript expression).\",\n },\n itemName: {\n type: \"string\",\n defaultValue: defaultItemName,\n defaultValueHint: defaultItemName,\n displayName: \"Item\",\n description: \"Data context key for the current item.\",\n },\n indexName: {\n type: \"string\",\n defaultValue: defaultIndexName,\n defaultValueHint: defaultIndexName,\n displayName: \"Index\",\n description: \"Data context key for the index of the current item.\",\n },\n },\n};\n\nexport function registerRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customRepeaterMeta?: ComponentMeta<RepeaterProps<any>>\n) {\n if (loader) {\n loader.registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n } else {\n registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n }\n}\n\nexport default Repeater;\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. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work.\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n defaultValue: true,\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":["thisModule","DynamicElement","tag","className","children","propSelectors","props","computed","_useSelectors","createElement","DynamicText","selector","React","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","data","finalData","_useSelector","map","item","index","_DataProvider","key","_applySelector","name","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","isRepeated","dynamicRepeaterMeta","displayName","importName","importPath","dataProviderMeta","providesData","birthYear","profilePicture","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","dynamicTextMeta","dynamicImageMeta","ensure","x","Error","Embed","code","_ref$hideInEditor","hideInEditor","rootElt","useRef","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","value","appendChild","createTextNode","innerHTML","parentNode","replaceChild","ref","dangerouslySetInnerHTML","__html","whiteSpace","embedMeta","lang","editOnly","defaultStyles","maxWidth","Iframe","preview","useContext","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","Repeater","items","itemName","indexName","isArray","DataProvider","toString","repeaterMeta","useDirectionalIntersection","_ref$scrollDownThresh","scrollDownThreshold","_ref$scrollUpThreshol","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","observer","entries","intersectionRatio","root","rootMargin","threshold","observe","disconnect","ScrollRevealer","_ref2$scrollDownThres","_ref2$scrollUpThresho","intersectionRef","scrollRevealerMeta","Video","forwardRef","videoMeta","autoPlay","controls","playsInline","loop","muted","poster","preload","options","console","warn","loader","customDataProviderMeta","registerComponent","customDynamicElementMeta","customDynamicImageMeta","customDynamicRepeaterMeta","customDynamicTextMeta","customEmbedMeta","customIframeMeta","customRepeaterMeta","customScrollRevealerMeta","customVideoMeta","_useDataEnv"],"mappings":"mtBAcMA,EAAa,iDAgDHC,aAGdC,IAAAA,aAAM,QACNC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,cACGC,SAEGC,EAAWC,eAAcH,GAC/B,OAAOI,gBAAcP,KACnBE,SAAAA,GACGE,EACAC,GACHJ,UAAWA,EAAY,IAAMI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H,yCAqHjCkH,EACAM,GAEIN,EACFA,EAAOE,kBACL/I,QACAmJ,EAAAA,EAAyB5G,GAG3BwG,EAAkB/I,QAAamJ,EAAAA,EAAyB5G,mCE3P1DsG,EACAO,GAEIP,EACFA,EAAOE,kBAAkBnG,QAAOwG,EAAAA,EAAmB5E,GAEnDuE,EAAkBnG,QAAOwG,EAAAA,EAAmB5E,oCCb9CqE,EACAQ,GAEIR,EACFA,EAAOE,kBAAkBlE,QAAQwE,EAAAA,EAAoBtD,GAErDgD,EAAkBlE,QAAQwE,EAAAA,EAAoBtD,sCCShD8C,EACAS,GAEIT,EACFA,EAAOE,kBAAkB7C,QAAUoD,EAAAA,EAAsB7C,GAEzDsC,oBAAkB7C,QAAUoD,EAAAA,EAAsB7C,4CC0BpDoC,EACAU,GAEIV,EACFA,EAAOE,kBACLpB,QACA4B,EAAAA,EAA4BxB,GAG9BgB,EACEpB,QACA4B,EAAAA,EAA4BxB,mCCnChCc,EACAW,GAEIX,EACFA,EAAOE,kBAAkBf,QAAOwB,EAAAA,EAAmBtB,GAEnDa,EAAkBf,QAAOwB,EAAAA,EAAmBtB,2EN9CF,WAE5C,OADAS,QAAQC,KAAK,gEACNa,+FApBuC,WAE9C,OADAd,QAAQC,KAAK,iEACN/H,4DAMyC,WAIhD,OAHA8H,QAAQC,KACN,kEAEK9I"}
@@ -3,46 +3,39 @@ import registerComponent from '@plasmicapp/host/registerComponent';
3
3
  import React, { createElement, useRef, useEffect, useContext, useState } from 'react';
4
4
 
5
5
  function _extends() {
6
- _extends = Object.assign || function (target) {
6
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
7
7
  for (var i = 1; i < arguments.length; i++) {
8
8
  var source = arguments[i];
9
-
10
9
  for (var key in source) {
11
10
  if (Object.prototype.hasOwnProperty.call(source, key)) {
12
11
  target[key] = source[key];
13
12
  }
14
13
  }
15
14
  }
16
-
17
15
  return target;
18
16
  };
19
-
20
17
  return _extends.apply(this, arguments);
21
18
  }
22
-
23
19
  function _objectWithoutPropertiesLoose(source, excluded) {
24
20
  if (source == null) return {};
25
21
  var target = {};
26
22
  var sourceKeys = Object.keys(source);
27
23
  var key, i;
28
-
29
24
  for (i = 0; i < sourceKeys.length; i++) {
30
25
  key = sourceKeys[i];
31
26
  if (excluded.indexOf(key) >= 0) continue;
32
27
  target[key] = source[key];
33
28
  }
34
-
35
29
  return target;
36
30
  }
37
31
 
38
32
  var _excluded = ["tag", "className", "children", "propSelectors"],
39
- _excluded2 = ["selector", "propSelectors"],
40
- _excluded3 = ["selector", "propSelectors"];
33
+ _excluded2 = ["selector", "propSelectors"],
34
+ _excluded3 = ["selector", "propSelectors"];
41
35
  var thisModule = "@plasmicpkgs/plasmic-basic-components";
42
36
  /**
43
37
  * @deprecated This should be imported from @plasmicapp/host instead.
44
38
  */
45
-
46
39
  var applySelector = function applySelector() {
47
40
  console.warn("DEPRECATED: Import applySelector from @plasmicapp/host instead.");
48
41
  return applySelector$1.apply(void 0, arguments);
@@ -50,7 +43,6 @@ var applySelector = function applySelector() {
50
43
  /**
51
44
  * @deprecated This should be imported from @plasmicapp/host instead.
52
45
  */
53
-
54
46
  var useSelector = function useSelector() {
55
47
  console.warn("DEPRECATED: Import useSelector from @plasmicapp/host instead.");
56
48
  return useSelector$1.apply(void 0, arguments);
@@ -58,7 +50,6 @@ var useSelector = function useSelector() {
58
50
  /**
59
51
  * @deprecated This should be imported from @plasmicapp/host instead.
60
52
  */
61
-
62
53
  var useSelectors = function useSelectors() {
63
54
  console.warn("DEPRECATED: Import useSelectors from @plasmicapp/host instead.");
64
55
  return useSelectors$1.apply(void 0, arguments);
@@ -66,7 +57,6 @@ var useSelectors = function useSelectors() {
66
57
  /**
67
58
  * @deprecated This should be imported from @plasmicapp/host instead.
68
59
  */
69
-
70
60
  var useDataEnv = function useDataEnv() {
71
61
  console.warn("DEPRECATED: Import useDataEnv from @plasmicapp/host instead.");
72
62
  return useDataEnv$1.apply(void 0, arguments);
@@ -76,14 +66,12 @@ var DataProvider = function DataProvider() {
76
66
  };
77
67
  function DynamicElement(_ref) {
78
68
  var _ref$tag = _ref.tag,
79
- tag = _ref$tag === void 0 ? "div" : _ref$tag,
80
- className = _ref.className,
81
- children = _ref.children,
82
- propSelectors = _ref.propSelectors,
83
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
84
-
69
+ tag = _ref$tag === void 0 ? "div" : _ref$tag,
70
+ className = _ref.className,
71
+ children = _ref.children,
72
+ propSelectors = _ref.propSelectors,
73
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
85
74
  var computed = useSelectors$1(propSelectors);
86
-
87
75
  return createElement(tag, _extends({
88
76
  children: children
89
77
  }, props, computed, {
@@ -92,9 +80,8 @@ function DynamicElement(_ref) {
92
80
  }
93
81
  function DynamicText(_ref2) {
94
82
  var selector = _ref2.selector,
95
- propSelectors = _ref2.propSelectors,
96
- props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
97
-
83
+ propSelectors = _ref2.propSelectors,
84
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
98
85
  return React.createElement(DynamicElement, Object.assign({}, props, {
99
86
  propSelectors: _extends({}, propSelectors, {
100
87
  children: selector
@@ -103,9 +90,8 @@ function DynamicText(_ref2) {
103
90
  }
104
91
  function DynamicImage(_ref3) {
105
92
  var selector = _ref3.selector,
106
- propSelectors = _ref3.propSelectors,
107
- props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
108
-
93
+ propSelectors = _ref3.propSelectors,
94
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
109
95
  return React.createElement(DynamicElement, Object.assign({
110
96
  tag: "img",
111
97
  loading: "lazy",
@@ -122,17 +108,15 @@ function DynamicImage(_ref3) {
122
108
  }
123
109
  function DynamicRepeater(_ref4) {
124
110
  var _ref5;
125
-
126
111
  var children = _ref4.children,
127
- loopItemName = _ref4.loopItemName,
128
- keySelector = _ref4.keySelector,
129
- selector = _ref4.selector,
130
- data = _ref4.data;
112
+ loopItemName = _ref4.loopItemName,
113
+ keySelector = _ref4.keySelector,
114
+ selector = _ref4.selector,
115
+ data = _ref4.data;
131
116
  // Defaults to an array of three items.
132
117
  var finalData = (_ref5 = data != null ? data : useSelector$1(selector)) != null ? _ref5 : [1, 2, 3];
133
118
  return React.createElement(React.Fragment, null, finalData == null ? void 0 : finalData.map == null ? void 0 : finalData.map(function (item, index) {
134
119
  var _applySelector2;
135
-
136
120
  return React.createElement(DataProvider$1, {
137
121
  key: (_applySelector2 = applySelector$1(item, keySelector)) != null ? _applySelector2 : index,
138
122
  name: loopItemName,
@@ -213,16 +197,14 @@ var dynamicPropsWithoutTag = {
213
197
  description: "An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value."
214
198
  }
215
199
  };
216
-
217
200
  var dynamicProps = /*#__PURE__*/_extends({}, dynamicPropsWithoutTag, {
218
201
  tag: {
219
202
  type: "string",
220
203
  defaultValueHint: "div",
221
204
  description: "The HTML tag to use"
222
205
  }
223
- }); // TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.
224
-
225
-
206
+ });
207
+ // TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.
226
208
  var dynamicElementMeta = {
227
209
  name: "hostless-dynamic-element",
228
210
  displayName: "Dynamic Element",
@@ -289,15 +271,14 @@ function ensure(x) {
289
271
 
290
272
  function Embed(_ref) {
291
273
  var className = _ref.className,
292
- code = _ref.code,
293
- _ref$hideInEditor = _ref.hideInEditor,
294
- hideInEditor = _ref$hideInEditor === void 0 ? false : _ref$hideInEditor;
274
+ code = _ref.code,
275
+ _ref$hideInEditor = _ref.hideInEditor,
276
+ hideInEditor = _ref$hideInEditor === void 0 ? false : _ref$hideInEditor;
295
277
  var rootElt = useRef(null);
296
278
  useEffect(function () {
297
279
  if (hideInEditor) {
298
280
  return;
299
281
  }
300
-
301
282
  Array.from(ensure(rootElt.current).querySelectorAll("script")).forEach(function (oldScript) {
302
283
  var newScript = document.createElement("script");
303
284
  Array.from(oldScript.attributes).forEach(function (attr) {
@@ -352,10 +333,9 @@ function registerEmbed(loader, customEmbedMeta) {
352
333
 
353
334
  function Iframe(_ref) {
354
335
  var preview = _ref.preview,
355
- src = _ref.src,
356
- className = _ref.className;
336
+ src = _ref.src,
337
+ className = _ref.className;
357
338
  var isEditing = useContext(PlasmicCanvasContext);
358
-
359
339
  if (isEditing && !preview) {
360
340
  return React.createElement("div", {
361
341
  className: className
@@ -378,7 +358,6 @@ function Iframe(_ref) {
378
358
  }
379
359
  }, "Iframe placeholder"));
380
360
  }
381
-
382
361
  return React.createElement("iframe", {
383
362
  src: src,
384
363
  className: className
@@ -416,17 +395,14 @@ function registerIframe(loader, customIframeMeta) {
416
395
  var thisModule$1 = "@plasmicpkgs/plasmic-basic-components";
417
396
  var defaultItemName = "currentItem";
418
397
  var defaultIndexName = "currentIndex";
419
-
420
398
  function Repeater(props) {
421
399
  var children = props.children,
422
- items = props.items,
423
- itemName = props.itemName,
424
- indexName = props.indexName;
425
-
400
+ items = props.items,
401
+ itemName = props.itemName,
402
+ indexName = props.indexName;
426
403
  if (!Array.isArray(items)) {
427
404
  throw new Error("Repeater received an invalid collection: not an array.");
428
405
  }
429
-
430
406
  return React.createElement(React.Fragment, null, items.map(function (item, index) {
431
407
  return React.createElement(DataProvider$1, {
432
408
  key: index.toString(),
@@ -438,7 +414,6 @@ function Repeater(props) {
438
414
  }, repeatedElement(index, children)));
439
415
  }));
440
416
  }
441
-
442
417
  var repeaterMeta = {
443
418
  name: "plasmic-repeater",
444
419
  displayName: "Repeater",
@@ -482,15 +457,13 @@ function registerRepeater(loader, customRepeaterMeta) {
482
457
 
483
458
  function useDirectionalIntersection(_ref) {
484
459
  var ref = _ref.ref,
485
- _ref$scrollDownThresh = _ref.scrollDownThreshold,
486
- scrollDownThreshold = _ref$scrollDownThresh === void 0 ? 0.5 : _ref$scrollDownThresh,
487
- _ref$scrollUpThreshol = _ref.scrollUpThreshold,
488
- scrollUpThreshold = _ref$scrollUpThreshol === void 0 ? 0 : _ref$scrollUpThreshol;
489
-
460
+ _ref$scrollDownThresh = _ref.scrollDownThreshold,
461
+ scrollDownThreshold = _ref$scrollDownThresh === void 0 ? 0.5 : _ref$scrollDownThresh,
462
+ _ref$scrollUpThreshol = _ref.scrollUpThreshold,
463
+ scrollUpThreshold = _ref$scrollUpThreshol === void 0 ? 0 : _ref$scrollUpThreshol;
490
464
  var _useState = useState(false),
491
- revealed = _useState[0],
492
- setRevealed = _useState[1];
493
-
465
+ revealed = _useState[0],
466
+ setRevealed = _useState[1];
494
467
  useEffect(function () {
495
468
  if (ref.current && typeof IntersectionObserver === "function") {
496
469
  var handler = function handler(entries) {
@@ -500,7 +473,6 @@ function useDirectionalIntersection(_ref) {
500
473
  setRevealed(false);
501
474
  }
502
475
  };
503
-
504
476
  var observer = new IntersectionObserver(handler, {
505
477
  root: null,
506
478
  rootMargin: "0%",
@@ -512,7 +484,6 @@ function useDirectionalIntersection(_ref) {
512
484
  observer.disconnect();
513
485
  };
514
486
  }
515
-
516
487
  return function () {};
517
488
  }, [ref.current, scrollDownThreshold, scrollUpThreshold]);
518
489
  return revealed;
@@ -525,14 +496,13 @@ function useDirectionalIntersection(_ref) {
525
496
  *
526
497
  * 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.
527
498
  */
528
-
529
499
  function ScrollRevealer(_ref2) {
530
500
  var children = _ref2.children,
531
- className = _ref2.className,
532
- _ref2$scrollDownThres = _ref2.scrollDownThreshold,
533
- scrollDownThreshold = _ref2$scrollDownThres === void 0 ? 0.5 : _ref2$scrollDownThres,
534
- _ref2$scrollUpThresho = _ref2.scrollUpThreshold,
535
- scrollUpThreshold = _ref2$scrollUpThresho === void 0 ? 0 : _ref2$scrollUpThresho;
501
+ className = _ref2.className,
502
+ _ref2$scrollDownThres = _ref2.scrollDownThreshold,
503
+ scrollDownThreshold = _ref2$scrollDownThres === void 0 ? 0.5 : _ref2$scrollDownThres,
504
+ _ref2$scrollUpThresho = _ref2.scrollUpThreshold,
505
+ scrollUpThreshold = _ref2$scrollUpThresho === void 0 ? 0 : _ref2$scrollUpThresho;
536
506
  var intersectionRef = useRef(null);
537
507
  var revealed = useDirectionalIntersection({
538
508
  ref: intersectionRef,
@@ -1 +1 @@
1
- {"version":3,"file":"plasmic-basic-components.esm.js","sources":["../src/Data.tsx","../src/common.ts","../src/Embed.tsx","../src/Iframe.tsx","../src/Repeater.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx"],"sourcesContent":["import {\n applySelector as _applySelector,\n ComponentMeta,\n DataProvider as _DataProvider,\n DataProviderProps,\n repeatedElement,\n SelectorDict,\n useDataEnv as _useDataEnv,\n useSelector as _useSelector,\n useSelectors as _useSelectors,\n} from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps, createElement, ReactNode } from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const applySelector: typeof _applySelector = function (...args) {\n console.warn(\n \"DEPRECATED: Import applySelector from @plasmicapp/host instead.\"\n );\n return _applySelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelector: typeof _useSelector = function (...args) {\n console.warn(\"DEPRECATED: Import useSelector from @plasmicapp/host instead.\");\n return _useSelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelectors: typeof _useSelectors = function (...args) {\n console.warn(\n \"DEPRECATED: Import useSelectors from @plasmicapp/host instead.\"\n );\n return _useSelectors(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useDataEnv: typeof _useDataEnv = function (...args) {\n console.warn(\"DEPRECATED: Import useDataEnv from @plasmicapp/host instead.\");\n return _useDataEnv(...args);\n};\n\nexport const DataProvider: typeof _DataProvider = function (...args) {\n return _DataProvider(...args);\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, 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: {\n type: \"slot\",\n isRepeated: true,\n },\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 providesData: true,\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 },\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(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\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","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 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 style={{ whiteSpace: \"normal\" }}\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: \"code\",\n lang: \"html\",\n defaultValueHint:\n \"<div>Paste your embed code via the right sidebar</div>\",\n description: \"The HTML code to be embedded\",\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 {\n ComponentMeta,\n DataProvider,\n registerComponent,\n repeatedElement,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nconst defaultItemName = \"currentItem\";\nconst defaultIndexName = \"currentIndex\";\n\ninterface RepeaterProps<T> {\n children: React.ReactNode;\n items: T[];\n itemName?: string;\n indexName?: string;\n}\n\nfunction Repeater<T>(props: RepeaterProps<T>) {\n const { children, items, itemName, indexName } = props;\n\n if (!Array.isArray(items)) {\n throw new Error(\"Repeater received an invalid collection: not an array.\");\n }\n\n return (\n <>\n {items.map((item, index) => (\n <DataProvider\n key={index.toString()}\n name={itemName || defaultItemName}\n data={item}\n >\n <DataProvider name={indexName || defaultIndexName} data={index}>\n {repeatedElement(index, children)}\n </DataProvider>\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const repeaterMeta: ComponentMeta<RepeaterProps<any>> = {\n name: `plasmic-repeater`,\n displayName: \"Repeater\",\n importName: \"Repeater\",\n importPath: thisModule,\n providesData: true,\n props: {\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n items: {\n type: \"array\",\n defaultValue: [1, 2, 3],\n displayName: \"Collection\",\n description: \"Items array (JavaScript expression).\",\n },\n itemName: {\n type: \"string\",\n defaultValue: defaultItemName,\n defaultValueHint: defaultItemName,\n displayName: \"Item\",\n description: \"Data context key for the current item.\",\n },\n indexName: {\n type: \"string\",\n defaultValue: defaultIndexName,\n defaultValueHint: defaultIndexName,\n displayName: \"Index\",\n description: \"Data context key for the index of the current item.\",\n },\n },\n};\n\nexport function registerRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customRepeaterMeta?: ComponentMeta<RepeaterProps<any>>\n) {\n if (loader) {\n loader.registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n } else {\n registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n }\n}\n\nexport default Repeater;\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. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work.\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n defaultValue: true,\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":["thisModule","applySelector","console","warn","_applySelector","useSelector","_useSelector","useSelectors","_useSelectors","useDataEnv","_useDataEnv","DataProvider","_DataProvider","DynamicElement","tag","className","children","propSelectors","props","computed","createElement","DynamicText","selector","React","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","data","finalData","map","item","index","key","name","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","isRepeated","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","providesData","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","ensure","x","undefined","Error","Embed","code","hideInEditor","rootElt","useRef","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","value","appendChild","createTextNode","innerHTML","parentNode","replaceChild","effectiveCode","ref","dangerouslySetInnerHTML","__html","whiteSpace","embedMeta","lang","editOnly","defaultStyles","maxWidth","registerEmbed","customEmbedMeta","Iframe","preview","isEditing","useContext","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","registerIframe","customIframeMeta","defaultItemName","defaultIndexName","Repeater","items","itemName","indexName","isArray","toString","repeaterMeta","registerRepeater","customRepeaterMeta","useDirectionalIntersection","scrollDownThreshold","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","handler","entries","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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,UAAU,GAAG,uCAAnB;AAEA;;;;IAGaC,aAAa,GAA0B,SAAvCA,aAAuC;AAClDC,EAAAA,OAAO,CAACC,IAAR,CACE,iEADF;AAGA,SAAOC,eAAc,MAAd,mBAAP;AACD;AAED;;;;IAGaC,WAAW,GAAwB,SAAnCA,WAAmC;AAC9CH,EAAAA,OAAO,CAACC,IAAR,CAAa,+DAAb;AACA,SAAOG,aAAY,MAAZ,mBAAP;AACD;AAED;;;;IAGaC,YAAY,GAAyB,SAArCA,YAAqC;AAChDL,EAAAA,OAAO,CAACC,IAAR,CACE,gEADF;AAGA,SAAOK,cAAa,MAAb,mBAAP;AACD;AAED;;;;IAGaC,UAAU,GAAuB,SAAjCA,UAAiC;AAC5CP,EAAAA,OAAO,CAACC,IAAR,CAAa,8DAAb;AACA,SAAOO,YAAW,MAAX,mBAAP;AACD;IAEYC,YAAY,GAAyB,SAAr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AAA,WAAW,EAAE;AAHT,KA1BD;AA+BLmI,IAAAA,KAAK,EAAE;AACLpI,MAAAA,IAAI,EAAE,SADD;AAELK,MAAAA,WAAW,EAAE,OAFR;AAGLJ,MAAAA,WAAW,EAAE;AAHR,KA/BF;AAoCLoI,IAAAA,MAAM,EAAE;AACNrI,MAAAA,IAAI,EAAE,UADA;AAENK,MAAAA,WAAW,EAAE,4BAFP;AAGNJ,MAAAA,WAAW,EAAE;AAHP,KApCH;AAyCLqI,IAAAA,OAAO,EAAE;AACPtI,MAAAA,IAAI,EAAE,QADC;AAEPuI,MAAAA,OAAO,EAAE,CAAC,MAAD,EAAS,UAAT,EAAqB,MAArB,CAFF;AAGPlI,MAAAA,WAAW,EAAE,SAHN;AAIPJ,MAAAA,WAAW,EACT;AALK;AAzCJ,GAL2C;AAsDlDgE,EAAAA,aAAa,EAAE;AACbyB,IAAAA,MAAM,EAAE,KADK;AAEbD,IAAAA,KAAK,EAAE,OAFM;AAGbvB,IAAAA,QAAQ,EAAE;AAHG;AAtDmC,CAA7C;AA6DP,SAAgBsE,cACd/H,QACAgI;AAEA,MAAIhI,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACE,iBAAP,CAAyBkH,KAAzB,EAAgCY,eAAhC,WAAgCA,eAAhC,GAAmDV,SAAnD;AACD,GAFD,MAEO;AACLpH,IAAAA,iBAAiB,CAACkH,KAAD,EAAQY,eAAR,WAAQA,eAAR,GAA2BV,SAA3B,CAAjB;AACD;AACF;;;;"}
1
+ {"version":3,"file":"plasmic-basic-components.esm.js","sources":["../src/Data.tsx","../src/common.ts","../src/Embed.tsx","../src/Iframe.tsx","../src/Repeater.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx"],"sourcesContent":["import {\n applySelector as _applySelector,\n ComponentMeta,\n DataProvider as _DataProvider,\n DataProviderProps,\n repeatedElement,\n SelectorDict,\n useDataEnv as _useDataEnv,\n useSelector as _useSelector,\n useSelectors as _useSelectors,\n} from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps, createElement, ReactNode } from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const applySelector: typeof _applySelector = function (...args) {\n console.warn(\n \"DEPRECATED: Import applySelector from @plasmicapp/host instead.\"\n );\n return _applySelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelector: typeof _useSelector = function (...args) {\n console.warn(\"DEPRECATED: Import useSelector from @plasmicapp/host instead.\");\n return _useSelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelectors: typeof _useSelectors = function (...args) {\n console.warn(\n \"DEPRECATED: Import useSelectors from @plasmicapp/host instead.\"\n );\n return _useSelectors(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useDataEnv: typeof _useDataEnv = function (...args) {\n console.warn(\"DEPRECATED: Import useDataEnv from @plasmicapp/host instead.\");\n return _useDataEnv(...args);\n};\n\nexport const DataProvider: typeof _DataProvider = function (...args) {\n return _DataProvider(...args);\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, 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: {\n type: \"slot\",\n isRepeated: true,\n },\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 providesData: true,\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 },\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(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\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","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 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 style={{ whiteSpace: \"normal\" }}\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: \"code\",\n lang: \"html\",\n defaultValueHint:\n \"<div>Paste your embed code via the right sidebar</div>\",\n description: \"The HTML code to be embedded\",\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 {\n ComponentMeta,\n DataProvider,\n registerComponent,\n repeatedElement,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nconst defaultItemName = \"currentItem\";\nconst defaultIndexName = \"currentIndex\";\n\ninterface RepeaterProps<T> {\n children: React.ReactNode;\n items: T[];\n itemName?: string;\n indexName?: string;\n}\n\nfunction Repeater<T>(props: RepeaterProps<T>) {\n const { children, items, itemName, indexName } = props;\n\n if (!Array.isArray(items)) {\n throw new Error(\"Repeater received an invalid collection: not an array.\");\n }\n\n return (\n <>\n {items.map((item, index) => (\n <DataProvider\n key={index.toString()}\n name={itemName || defaultItemName}\n data={item}\n >\n <DataProvider name={indexName || defaultIndexName} data={index}>\n {repeatedElement(index, children)}\n </DataProvider>\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const repeaterMeta: ComponentMeta<RepeaterProps<any>> = {\n name: `plasmic-repeater`,\n displayName: \"Repeater\",\n importName: \"Repeater\",\n importPath: thisModule,\n providesData: true,\n props: {\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n items: {\n type: \"array\",\n defaultValue: [1, 2, 3],\n displayName: \"Collection\",\n description: \"Items array (JavaScript expression).\",\n },\n itemName: {\n type: \"string\",\n defaultValue: defaultItemName,\n defaultValueHint: defaultItemName,\n displayName: \"Item\",\n description: \"Data context key for the current item.\",\n },\n indexName: {\n type: \"string\",\n defaultValue: defaultIndexName,\n defaultValueHint: defaultIndexName,\n displayName: \"Index\",\n description: \"Data context key for the index of the current item.\",\n },\n },\n};\n\nexport function registerRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customRepeaterMeta?: ComponentMeta<RepeaterProps<any>>\n) {\n if (loader) {\n loader.registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n } else {\n registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n }\n}\n\nexport default Repeater;\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. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work.\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n defaultValue: true,\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":["thisModule","applySelector","console","warn","_applySelector","useSelector","_useSelector","useSelectors","_useSelectors","useDataEnv","_useDataEnv","DataProvider","_DataProvider","DynamicElement","tag","className","children","propSelectors","props","computed","createElement","DynamicText","selector","React","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","data","finalData","map","item","index","key","name","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","isRepeated","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","providesData","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","ensure","x","undefined","Error","Embed","code","hideInEditor","rootElt","useRef","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","value","appendChild","createTextNode","innerHTML","parentNode","replaceChild","effectiveCode","ref","dangerouslySetInnerHTML","__html","whiteSpace","embedMeta","lang","editOnly","defaultStyles","maxWidth","registerEmbed","customEmbedMeta","Iframe","preview","isEditing","useContext","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","registerIframe","customIframeMeta","defaultItemName","defaultIndexName","Repeater","items","itemName","indexName","isArray","toString","repeaterMeta","registerRepeater","customRepeaterMeta","useDirectionalIntersection","scrollDownThreshold","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","handler","entries","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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,UAAU,GAAG,uCAAuC;AAE1D;;;IAGaC,aAAa,GAA0B,SAAvCA,aAAa;EACxBC,OAAO,CAACC,IAAI,CACV,iEAAiE,CAClE;EACD,OAAOC,eAAc,yBAAS;AAChC;AAEA;;;IAGaC,WAAW,GAAwB,SAAnCA,WAAW;EACtBH,OAAO,CAACC,IAAI,CAAC,+DAA+D,CAAC;EAC7E,OAAOG,aAAY,yBAAS;AAC9B;AAEA;;;IAGaC,YAAY,GAAyB,SAArCA,YAAY;EACvBL,OAAO,CAACC,IAAI,CACV,gEAAgE,CACjE;EACD,OAAOK,cAAa,yBAAS;AAC/B;AAEA;;;IAGaC,UAAU,GAAuB,SAAjCA,UAAU;EACrBP,OAAO,CAACC,IAAI,CAAC,8DAA8D,CAAC;EAC5E,OAAOO,YAAW,yBAAS;AAC7B;IAEaC,YAAY,GAAyB,SAArCA,YAAY;EACvB,OAAOC,cAAa,yBAAS;AAC/B;SAQgBC,cAAc;sBAG5BC,GAAG;IAAHA,GAAG,yBAAG,KAAK;IACXC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IACRC,aAAa,QAAbA,aAAa;IACVC,KAAK;EAER,IAAMC,QAAQ,GAAGX,cAAa,CAACS,aAAa,CAAC;EAC7C,OAAOG,aAAa,CAACN,GAAG;IACtBE,QAAQ,EAARA;KACGE,KAAK,EACLC,QAAQ;IACXJ,SAAS,EAAEA,SAAS,GAAG,GAAG,GAAGI,QAAQ,CAACJ;KACtC;AACJ;SAMgBM,WAAW;MACzBC,QAAQ,SAARA,QAAQ;IACRL,aAAa,SAAbA,aAAa;IACVC,KAAK;EAER,OACEK,oBAACV,cA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AAS;MACfK,WAAW,EAAE,eAAe;MAC5BJ,WAAW,EAAE,uDAAuD;MACpEC,YAAY,EAAE;KACf;IACDgI,WAAW,EAAE;MACXlI,IAAI,EAAE,SAAS;MACfK,WAAW,EAAE,cAAc;MAC3BJ,WAAW,EACT;KACH;IACDkI,IAAI,EAAE;MACJnI,IAAI,EAAE,SAAS;MACfK,WAAW,EAAE,MAAM;MACnBJ,WAAW,EAAE;KACd;IACDmI,KAAK,EAAE;MACLpI,IAAI,EAAE,SAAS;MACfK,WAAW,EAAE,OAAO;MACpBJ,WAAW,EAAE;KACd;IACDoI,MAAM,EAAE;MACNrI,IAAI,EAAE,UAAU;MAChBK,WAAW,EAAE,4BAA4B;MACzCJ,WAAW,EAAE;KACd;IACDqI,OAAO,EAAE;MACPtI,IAAI,EAAE,QAAQ;MACduI,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC;MACrClI,WAAW,EAAE,SAAS;MACtBJ,WAAW,EACT;;GAEL;EACDgE,aAAa,EAAE;IACbyB,MAAM,EAAE,KAAK;IACbD,KAAK,EAAE,OAAO;IACdvB,QAAQ,EAAE;;CAEb;AAED,SAAgBsE,aAAa,CAC3B/H,MAAwD,EACxDgI,eAA2C;EAE3C,IAAIhI,MAAM,EAAE;IACVA,MAAM,CAACE,iBAAiB,CAACkH,KAAK,EAAEY,eAAe,WAAfA,eAAe,GAAIV,SAAS,CAAC;GAC9D,MAAM;IACLpH,iBAAiB,CAACkH,KAAK,EAAEY,eAAe,WAAfA,eAAe,GAAIV,SAAS,CAAC;;AAE1D;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicpkgs/plasmic-basic-components",
3
- "version": "0.0.98",
3
+ "version": "0.0.100",
4
4
  "description": "Plasmic registration call for the HTML5 video element",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "analyze": "size-limit --why"
29
29
  },
30
30
  "devDependencies": {
31
- "@plasmicapp/host": "1.0.91",
31
+ "@plasmicapp/host": "1.0.93",
32
32
  "@size-limit/preset-small-lib": "^4.11.0",
33
33
  "@types/node": "^14.0.26",
34
34
  "@types/react": "^17.0.39",
@@ -43,5 +43,5 @@
43
43
  "react": ">=16.8.0",
44
44
  "react-dom": ">=16.8.0"
45
45
  },
46
- "gitHead": "2c34343c228b8b1eea911d030db0e02c811ea70c"
46
+ "gitHead": "e282c9cca3a168a822b34a1a5e6de3a6a072c00f"
47
47
  }