@plasmicpkgs/plasmic-basic-components 0.0.11 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Embed.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import registerComponent, { ComponentMeta } from "@plasmicapp/host/registerComponent";
3
2
  export interface EmbedProps {
4
3
  className?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import registerComponent, { ComponentMeta } from "@plasmicapp/host/registerComponent";
3
2
  export interface EmbedCssProps {
4
3
  css: string;
package/dist/Iframe.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ComponentMeta } from "@plasmicapp/host";
3
2
  import registerComponent from "@plasmicapp/host/registerComponent";
4
3
  export interface IframeProps {
@@ -42,6 +42,9 @@ function _objectWithoutPropertiesLoose(source, excluded) {
42
42
  return target;
43
43
  }
44
44
 
45
+ var _excluded = ["tag", "className", "children", "propSelectors"],
46
+ _excluded2 = ["selector", "propSelectors"],
47
+ _excluded3 = ["selector", "propSelectors"];
45
48
  var thisModule = "@plasmicpkgs/plasmic-basic-components";
46
49
  /**
47
50
  * @deprecated This should be imported from @plasmicapp/host instead.
@@ -89,7 +92,7 @@ function DynamicElement(_ref) {
89
92
  className = _ref.className,
90
93
  children = _ref.children,
91
94
  propSelectors = _ref.propSelectors,
92
- props = _objectWithoutPropertiesLoose(_ref, ["tag", "className", "children", "propSelectors"]);
95
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
93
96
 
94
97
  var computed = host.useSelectors(propSelectors);
95
98
 
@@ -102,7 +105,7 @@ function DynamicElement(_ref) {
102
105
  function DynamicText(_ref2) {
103
106
  var selector = _ref2.selector,
104
107
  propSelectors = _ref2.propSelectors,
105
- props = _objectWithoutPropertiesLoose(_ref2, ["selector", "propSelectors"]);
108
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
106
109
 
107
110
  return React__default.createElement(DynamicElement, Object.assign({}, props, {
108
111
  propSelectors: _extends({}, propSelectors, {
@@ -113,7 +116,7 @@ function DynamicText(_ref2) {
113
116
  function DynamicImage(_ref3) {
114
117
  var selector = _ref3.selector,
115
118
  propSelectors = _ref3.propSelectors,
116
- props = _objectWithoutPropertiesLoose(_ref3, ["selector", "propSelectors"]);
119
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
117
120
 
118
121
  return React__default.createElement(DynamicElement, Object.assign({
119
122
  tag: "img",
@@ -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/ScrollRevealer.tsx","../src/Video.tsx","../src/EmbedCss.tsx"],"sourcesContent":["import {\n ComponentMeta,\n repeatedElement,\n SelectorDict,\n useSelectors as _useSelectors,\n useSelector as _useSelector,\n DataProvider as _DataProvider,\n DataProviderProps,\n applySelector as _applySelector,\n useDataEnv as _useDataEnv,\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\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const DataProvider: typeof _DataProvider = function(...args) {\n console.warn(\n \"DEPRECATED: Import DataProvider from @plasmicapp/host instead.\"\n );\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 === 0, children)}\n </_DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: \"slot\",\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: \"hostless-dynamic-text\",\n props: {\n selector: \"celebrities.0.name\",\n },\n },\n {\n type: \"component\",\n name: \"hostless-dynamic-image\",\n props: {\n selector: \"celebrities.0.profilePicture\",\n },\n },\n ],\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(\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 />\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: \"<!-- HTML snippet -->\",\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 registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css: string;\n}\n\nexport default function EmbedCss({\n css\n}: EmbedCssProps) {\n return (\n <style\n dangerouslySetInnerHTML={{ __html: css }}\n />\n );\n}\n\nexport const embedCssMeta: ComponentMeta<EmbedCssProps> = { \n name: \"hostless-embed-css\",\n displayName: \"Embed Css\",\n importName: \"EmbedCss\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n css: {\n type: \"code\",\n lang: \"css\",\n defaultValueHint: \"/* CSS snippet */\",\n description: \"CSS rules to be inserted\",\n },\n },\n};\n\nexport function registerEmbedCss(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedCssMeta?: ComponentMeta<EmbedCssProps>\n) {\n if (loader) {\n loader.registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n } else {\n registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n }\n}\n"],"names":["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","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","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","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","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","EmbedCss","css","embedCssMeta","registerEmbedCss","customEmbedCssMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,UAAU,GAAG,uCAAnB;AAEA;;;;IAGaC,aAAa,GAA0B,SAAvCA,aAAuC;AAClDC,EAAAA,OAAO,CAACC,IAAR,CACE,iEADF;AAGA,SAAOC,kBAAc,MAAd,mBAAP;AACD;AAED;;;;IAGaC,WAAW,GAAwB,SAAnCA,WAAmC;AAC9CH,EAAAA,OAAO,CAACC,IAAR,CAAa,+DAAb;AACA,SAAOG,gBAAY,MAAZ,mBAAP;AACD;AAED;;;;IAGaC,YAAY,GAAyB,SAArCA,YAAqC;AAChDL,EAAAA,OAAO,CAACC,IAAR,CACE,gEADF;AAGA,SAAOK,iBAAa,MAAb,mBAAP;AACD;AAED;;;;IAGaC,UAAU,GAAuB,SAAjCA,UAAiC;AAC5CP,EAAAA,OAAO,CAACC,IAAR,CAAa,8DAAb;AACA,SAAOO,eAAW,MAAX,mBAAP;AACD;AAED;;;;IAGaC,YAAY,GAAyB,SAArCA,YAAqC;AAChDT,EAAAA,OAAO,CAACC,IAAR,CACE,gEADF;AAGA,SAAOS,iBAAa,MAAb,mBAAP;AACD;SAQeC;sBAGdC;MAAAA,4BAAM;MACNC,iBAAAA;MACAC,gBAAAA;MACAC,qBAAAA;MACGC;;AAEH,MAAMC,QAAQ,GAAGX,iBAAa,CAACS,aAAD,CAA9B;;AACA,SAAOG,mBAAa,CAACN,GAAD;AAClBE,IAAAA,QAA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AEC,MAAAA,MAAM,EAAEmE;AAAV;GAD3B,CADF;AAKD;AAED,IAAaC,YAAY,GAAiC;AACxDjI,EAAAA,IAAI,EAAE,oBADkD;AAExDO,EAAAA,WAAW,EAAE,WAF2C;AAGxDC,EAAAA,UAAU,EAAE,UAH4C;AAIxDC,EAAAA,UAAU,EAAE,uCAJ4C;AAKxD7B,EAAAA,KAAK,EAAE;AACLoJ,IAAAA,GAAG,EAAE;AACH7H,MAAAA,IAAI,EAAE,MADH;AAEH4D,MAAAA,IAAI,EAAE,KAFH;AAGH3C,MAAAA,gBAAgB,EAAE,mBAHf;AAIHhB,MAAAA,WAAW,EAAE;AAJV;AADA;AALiD,CAAnD;AAeP,SAAgB8H,iBACdvH,QACAwH;AAEA,MAAIxH,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACE,iBAAP,CAAyBkH,QAAzB,EAAmCI,kBAAnC,WAAmCA,kBAAnC,GAAyDF,YAAzD;AACD,GAFD,MAEO;AACLpH,IAAAA,iBAAiB,CAACkH,QAAD,EAAWI,kBAAX,WAAWA,kBAAX,GAAiCF,YAAjC,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/ScrollRevealer.tsx","../src/Video.tsx","../src/EmbedCss.tsx"],"sourcesContent":["import {\n ComponentMeta,\n repeatedElement,\n SelectorDict,\n useSelectors as _useSelectors,\n useSelector as _useSelector,\n DataProvider as _DataProvider,\n DataProviderProps,\n applySelector as _applySelector,\n useDataEnv as _useDataEnv,\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\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const DataProvider: typeof _DataProvider = function(...args) {\n console.warn(\n \"DEPRECATED: Import DataProvider from @plasmicapp/host instead.\"\n );\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 === 0, children)}\n </_DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: \"slot\",\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: \"hostless-dynamic-text\",\n props: {\n selector: \"celebrities.0.name\",\n },\n },\n {\n type: \"component\",\n name: \"hostless-dynamic-image\",\n props: {\n selector: \"celebrities.0.profilePicture\",\n },\n },\n ],\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(\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 />\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: \"<!-- HTML snippet -->\",\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 registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css: string;\n}\n\nexport default function EmbedCss({\n css\n}: EmbedCssProps) {\n return (\n <style\n dangerouslySetInnerHTML={{ __html: css }}\n />\n );\n}\n\nexport const embedCssMeta: ComponentMeta<EmbedCssProps> = { \n name: \"hostless-embed-css\",\n displayName: \"Embed Css\",\n importName: \"EmbedCss\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n css: {\n type: \"code\",\n lang: \"css\",\n defaultValueHint: \"/* CSS snippet */\",\n description: \"CSS rules to be inserted\",\n },\n },\n};\n\nexport function registerEmbedCss(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedCssMeta?: ComponentMeta<EmbedCssProps>\n) {\n if (loader) {\n loader.registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n } else {\n registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n }\n}\n"],"names":["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","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","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","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","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","EmbedCss","css","embedCssMeta","registerEmbedCss","customEmbedCssMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,UAAU,GAAG,uCAAnB;AAEA;;;;IAGaC,aAAa,GAA0B,SAAvCA,aAAuC;AAClDC,EAAAA,OAAO,CAACC,IAAR,CACE,iEADF;AAGA,SAAOC,kBAAc,MAAd,mBAAP;AACD;AAED;;;;IAGaC,WAAW,GAAwB,SAAnCA,WAAmC;AAC9CH,EAAAA,OAAO,CAACC,IAAR,CAAa,+DAAb;AACA,SAAOG,gBAAY,MAAZ,mBAAP;AACD;AAED;;;;IAGaC,YAAY,GAAyB,SAArCA,YAAqC;AAChDL,EAAAA,OAAO,CAACC,IAAR,CACE,gEADF;AAGA,SAAOK,iBAAa,MAAb,mBAAP;AACD;AAED;;;;IAGaC,UA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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 s(){return(s=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 n(e,t){if(null==e)return{};var r,o,a={},s=Object.keys(e);for(o=0;o<s.length;o++)t.indexOf(r=s[o])>=0||(a[r]=e[r]);return a}var i="@plasmicpkgs/plasmic-basic-components";function l(e){var r=e.tag,a=void 0===r?"div":r,i=e.className,l=e.children,p=e.propSelectors,c=n(e,["tag","className","children","propSelectors"]),m=t.useSelectors(p);return o.createElement(a,s({children:l},c,m,{className:i+" "+m.className}))}function p(e){var t=e.selector,r=e.propSelectors,o=n(e,["selector","propSelectors"]);return a.createElement(l,Object.assign({},o,{propSelectors:s({},r,{children:t})}),"(DynamicText requires a selector)")}function c(e){var t=e.selector,r=e.propSelectors,o=n(e,["selector","propSelectors"]);return a.createElement(l,Object.assign({tag:"img",loading:"lazy",style:{objectFit:"cover"}},o,{propSelectors:s({},r,{src:t}),src:"https://studio.plasmic.app/static/img/placeholder.png"}))}function m(e){var r,o=e.children,s=e.loopItemName,n=e.keySelector,i=e.data,l=null!=(r=null!=i?i:t.useSelector(e.selector))?r:[1,2,3];return a.createElement(a.Fragment,null,null==l||null==l.map?void 0:l.map((function(e,r){var i;return a.createElement(t.DataProvider,{key:null!=(i=t.applySelector(e,n))?i:r,name:s,data:e},t.repeatedElement(0===r,o))})))}var d={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:"slot"},u={name:"hostless-dynamic-repeater",displayName:"Dynamic Repeater",importName:"DynamicRepeater",importPath:i,props:d},h={name:"hostless-data-provider",displayName:"Data Provider",importName:"DataProvider",importPath:i,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",defaultValue:[{type:"component",name:"hostless-dynamic-text",props:{selector:"celebrities.0.name"}},{type:"component",name:"hostless-dynamic-image",props:{selector:"celebrities.0.profilePicture"}}]}}},y={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."}},f=s({},y,{tag:{type:"string",defaultValueHint:"div",description:"The HTML tag to use"}}),v={name:"hostless-dynamic-element",displayName:"Dynamic Element",importName:"DynamicElement",importPath:i,props:s({},f,{children:"slot"})},g={name:"hostless-dynamic-text",importName:"DynamicText",displayName:"Dynamic Text",importPath:i,props:s({},f,{selector:{type:"string",description:"The selector expression to use to get the text, such as: someVariable.0.someField"}})},b={name:"hostless-dynamic-image",displayName:"Dynamic Image",importName:"DynamicImage",importPath:i,props:s({},y,{selector:{type:"string",description:"The selector expression to use to get the image source URL, such as: someVariable.0.someField"}})};function x(e){if(null==e)throw new Error("Value must not be undefined or null");return e}function E(e){var t=e.className,r=e.code,s=e.hideInEditor,n=void 0!==s&&s,i=o.useRef(null);return o.useEffect((function(){n||Array.from(x(i.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)),x(e.parentNode).replaceChild(t,e)}))}),[r,n]),a.createElement("div",{ref:i,className:t,dangerouslySetInnerHTML:{__html:n?"":r}})}var w={name:"hostless-embed",displayName:"Embed HTML",importName:"Embed",importPath:"@plasmicpkgs/plasmic-basic-components",props:{code:{type:"code",lang:"html",defaultValueHint:"\x3c!-- HTML snippet --\x3e",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 N(e){var r=e.preview,s=e.src,n=e.className;return o.useContext(t.PlasmicCanvasContext)&&!r?a.createElement("div",{className:n},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:s,className:n})}var D={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 S(e){var t=e.ref,r=e.scrollDownThreshold,a=void 0===r?.5:r,s=e.scrollUpThreshold,n=void 0===s?0:s,i=o.useState(!1),l=i[0],p=i[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<=n&&p(!1)}),{root:null,rootMargin:"0%",threshold:[n,a]});return e.observe(t.current),function(){p(!1),e.disconnect()}}return function(){}}),[t.current,a,n]),l}function P(e){var t=e.children,r=e.className,s=e.scrollDownThreshold,n=void 0===s?.5:s,i=e.scrollUpThreshold,l=void 0===i?0:i,p=o.useRef(null),c=S({ref:p,scrollUpThreshold:l,scrollDownThreshold:n});return a.createElement("div",{className:r,ref:p},c?t:null)}var T={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%"}},C=a.forwardRef((function(e,t){return a.createElement("video",Object.assign({ref:t},e))})),I={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"},controls:{type:"boolean",displayName:"Show Controls",description:"Whether the video player controls should be displayed"},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%"}};function R(e){return a.createElement("style",{dangerouslySetInnerHTML:{__html:e.css}})}var M={name:"hostless-embed-css",displayName:"Embed Css",importName:"EmbedCss",importPath:"@plasmicpkgs/plasmic-basic-components",props:{css:{type:"code",lang:"css",defaultValueHint:"/* CSS snippet */",description:"CSS rules to be inserted"}}};exports.DataProvider=function(){return console.warn("DEPRECATED: Import DataProvider from @plasmicapp/host instead."),t.DataProvider.apply(void 0,arguments)},exports.DynamicElement=l,exports.DynamicImage=c,exports.DynamicRepeater=m,exports.DynamicText=p,exports.Embed=E,exports.EmbedCss=R,exports.Iframe=N,exports.ScrollRevealer=P,exports.Video=C,exports.applySelector=function(){return console.warn("DEPRECATED: Import applySelector from @plasmicapp/host instead."),t.applySelector.apply(void 0,arguments)},exports.dataProviderMeta=h,exports.dynamicElementMeta=v,exports.dynamicImageMeta=b,exports.dynamicRepeaterMeta=u,exports.dynamicRepeaterProps=d,exports.dynamicTextMeta=g,exports.embedCssMeta=M,exports.embedMeta=w,exports.iframeMeta=D,exports.registerDataProvider=function(e,o){e?e.registerComponent(t.DataProvider,null!=o?o:h):r(t.DataProvider,null!=o?o:h)},exports.registerDynamicElement=function(e,t){e?e.registerComponent(l,null!=t?t:v):r(l,null!=t?t:v)},exports.registerDynamicImage=function(e,t){e?e.registerComponent(c,null!=t?t:b):r(c,null!=t?t:b)},exports.registerDynamicRepeater=function(e,t){e?e.registerComponent(m,null!=t?t:u):r(m,null!=t?t:u)},exports.registerDynamicText=function(e,t){e?e.registerComponent(p,null!=t?t:g):r(p,null!=t?t:g)},exports.registerEmbed=function(e,t){e?e.registerComponent(E,null!=t?t:w):r(E,null!=t?t:w)},exports.registerEmbedCss=function(e,t){e?e.registerComponent(R,null!=t?t:M):r(R,null!=t?t:M)},exports.registerIframe=function(e,t){e?e.registerComponent(N,null!=t?t:D):r(N,null!=t?t:D)},exports.registerScrollRevealer=function(e,t){e?e.registerComponent(P,null!=t?t:T):r(P,null!=t?t:T)},exports.registerVideo=function(e,t){e?e.registerComponent(C,null!=t?t:I):r(C,null!=t?t:I)},exports.scrollRevealerMeta=T,exports.useDataEnv=function(){return console.warn("DEPRECATED: Import useDataEnv from @plasmicapp/host instead."),t.useDataEnv.apply(void 0,arguments)},exports.useDirectionalIntersection=S,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=I;
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 s(){return(s=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 n(e,t){if(null==e)return{};var r,o,a={},s=Object.keys(e);for(o=0;o<s.length;o++)t.indexOf(r=s[o])>=0||(a[r]=e[r]);return a}var i=["tag","className","children","propSelectors"],l=["selector","propSelectors"],p=["selector","propSelectors"],c="@plasmicpkgs/plasmic-basic-components";function m(e){var r=e.tag,a=void 0===r?"div":r,l=e.className,p=e.children,c=e.propSelectors,m=n(e,i),d=t.useSelectors(c);return o.createElement(a,s({children:p},m,d,{className:l+" "+d.className}))}function d(e){var t=e.selector,r=e.propSelectors,o=n(e,l);return a.createElement(m,Object.assign({},o,{propSelectors:s({},r,{children:t})}),"(DynamicText requires a selector)")}function u(e){var t=e.selector,r=e.propSelectors,o=n(e,p);return a.createElement(m,Object.assign({tag:"img",loading:"lazy",style:{objectFit:"cover"}},o,{propSelectors:s({},r,{src:t}),src:"https://studio.plasmic.app/static/img/placeholder.png"}))}function h(e){var r,o=e.children,s=e.loopItemName,n=e.keySelector,i=e.data,l=null!=(r=null!=i?i:t.useSelector(e.selector))?r:[1,2,3];return a.createElement(a.Fragment,null,null==l||null==l.map?void 0:l.map((function(e,r){var i;return a.createElement(t.DataProvider,{key:null!=(i=t.applySelector(e,n))?i:r,name:s,data:e},t.repeatedElement(0===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:"slot"},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,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",defaultValue:[{type:"component",name:"hostless-dynamic-text",props:{selector:"celebrities.0.name"}},{type:"component",name:"hostless-dynamic-image",props:{selector:"celebrities.0.profilePicture"}}]}}},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."}},b=s({},g,{tag:{type:"string",defaultValueHint:"div",description:"The HTML tag to use"}}),x={name:"hostless-dynamic-element",displayName:"Dynamic Element",importName:"DynamicElement",importPath:c,props:s({},b,{children:"slot"})},E={name:"hostless-dynamic-text",importName:"DynamicText",displayName:"Dynamic Text",importPath:c,props:s({},b,{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:s({},g,{selector:{type:"string",description:"The selector expression to use to get the image source URL, such as: someVariable.0.someField"}})};function N(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,s=e.hideInEditor,n=void 0!==s&&s,i=o.useRef(null);return o.useEffect((function(){n||Array.from(N(i.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)),N(e.parentNode).replaceChild(t,e)}))}),[r,n]),a.createElement("div",{ref:i,className:t,dangerouslySetInnerHTML:{__html:n?"":r}})}var S={name:"hostless-embed",displayName:"Embed HTML",importName:"Embed",importPath:"@plasmicpkgs/plasmic-basic-components",props:{code:{type:"code",lang:"html",defaultValueHint:"\x3c!-- HTML snippet --\x3e",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,s=e.src,n=e.className;return o.useContext(t.PlasmicCanvasContext)&&!r?a.createElement("div",{className:n},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:s,className:n})}var T={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 C(e){var t=e.ref,r=e.scrollDownThreshold,a=void 0===r?.5:r,s=e.scrollUpThreshold,n=void 0===s?0:s,i=o.useState(!1),l=i[0],p=i[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<=n&&p(!1)}),{root:null,rootMargin:"0%",threshold:[n,a]});return e.observe(t.current),function(){p(!1),e.disconnect()}}return function(){}}),[t.current,a,n]),l}function I(e){var t=e.children,r=e.className,s=e.scrollDownThreshold,n=void 0===s?.5:s,i=e.scrollUpThreshold,l=void 0===i?0:i,p=o.useRef(null),c=C({ref:p,scrollUpThreshold:l,scrollDownThreshold:n});return a.createElement("div",{className:r,ref:p},c?t:null)}var R={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%"}},M=a.forwardRef((function(e,t){return a.createElement("video",Object.assign({ref:t},e))})),V={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"},controls:{type:"boolean",displayName:"Show Controls",description:"Whether the video player controls should be displayed"},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%"}};function H(e){return a.createElement("style",{dangerouslySetInnerHTML:{__html:e.css}})}var j={name:"hostless-embed-css",displayName:"Embed Css",importName:"EmbedCss",importPath:"@plasmicpkgs/plasmic-basic-components",props:{css:{type:"code",lang:"css",defaultValueHint:"/* CSS snippet */",description:"CSS rules to be inserted"}}};exports.DataProvider=function(){return console.warn("DEPRECATED: Import DataProvider from @plasmicapp/host instead."),t.DataProvider.apply(void 0,arguments)},exports.DynamicElement=m,exports.DynamicImage=u,exports.DynamicRepeater=h,exports.DynamicText=d,exports.Embed=D,exports.EmbedCss=H,exports.Iframe=P,exports.ScrollRevealer=I,exports.Video=M,exports.applySelector=function(){return console.warn("DEPRECATED: Import applySelector from @plasmicapp/host instead."),t.applySelector.apply(void 0,arguments)},exports.dataProviderMeta=v,exports.dynamicElementMeta=x,exports.dynamicImageMeta=w,exports.dynamicRepeaterMeta=f,exports.dynamicRepeaterProps=y,exports.dynamicTextMeta=E,exports.embedCssMeta=j,exports.embedMeta=S,exports.iframeMeta=T,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:x):r(m,null!=t?t:x)},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:E):r(d,null!=t?t:E)},exports.registerEmbed=function(e,t){e?e.registerComponent(D,null!=t?t:S):r(D,null!=t?t:S)},exports.registerEmbedCss=function(e,t){e?e.registerComponent(H,null!=t?t:j):r(H,null!=t?t:j)},exports.registerIframe=function(e,t){e?e.registerComponent(P,null!=t?t:T):r(P,null!=t?t:T)},exports.registerScrollRevealer=function(e,t){e?e.registerComponent(I,null!=t?t:R):r(I,null!=t?t:R)},exports.registerVideo=function(e,t){e?e.registerComponent(M,null!=t?t:V):r(M,null!=t?t:V)},exports.scrollRevealerMeta=R,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=V;
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/ScrollRevealer.tsx","../src/Video.tsx","../src/EmbedCss.tsx"],"sourcesContent":["import {\n ComponentMeta,\n repeatedElement,\n SelectorDict,\n useSelectors as _useSelectors,\n useSelector as _useSelector,\n DataProvider as _DataProvider,\n DataProviderProps,\n applySelector as _applySelector,\n useDataEnv as _useDataEnv,\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\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const DataProvider: typeof _DataProvider = function(...args) {\n console.warn(\n \"DEPRECATED: Import DataProvider from @plasmicapp/host instead.\"\n );\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 === 0, children)}\n </_DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: \"slot\",\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: \"hostless-dynamic-text\",\n props: {\n selector: \"celebrities.0.name\",\n },\n },\n {\n type: \"component\",\n name: \"hostless-dynamic-image\",\n props: {\n selector: \"celebrities.0.profilePicture\",\n },\n },\n ],\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(\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 />\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: \"<!-- HTML snippet -->\",\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 registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css: string;\n}\n\nexport default function EmbedCss({\n css\n}: EmbedCssProps) {\n return (\n <style\n dangerouslySetInnerHTML={{ __html: css }}\n />\n );\n}\n\nexport const embedCssMeta: ComponentMeta<EmbedCssProps> = { \n name: \"hostless-embed-css\",\n displayName: \"Embed Css\",\n importName: \"EmbedCss\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n css: {\n type: \"code\",\n lang: \"css\",\n defaultValueHint: \"/* CSS snippet */\",\n description: \"CSS rules to be inserted\",\n },\n },\n};\n\nexport function registerEmbedCss(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedCssMeta?: ComponentMeta<EmbedCssProps>\n) {\n if (loader) {\n loader.registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n } else {\n registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n }\n}\n"],"names":["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","dynamicRepeaterMeta","displayName","importName","importPath","dataProviderMeta","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","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","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","EmbedCss","css","embedCssMeta","console","warn","loader","customDataProviderMeta","registerComponent","customDynamicElementMeta","customDynamicImageMeta","customDynamicRepeaterMeta","customDynamicTextMeta","customEmbedMeta","customEmbedCssMeta","customIframeMeta","customScrollRevealerMeta","customVideoMeta","_useDataEnv"],"mappings":"4kBAcA,IAAMA,EAAa,iDAsDHC,aAGdC,IAAAA,aAAM,QACNC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,cACGC,sDAEGC,EAAWC,eAAcH,UACxBI,gBAAcP,KACnBE,SAAAA,GACGE,EACAC,GACHJ,UAAWA,EAAY,IAAMI,EAASJ,sBAQ1BO,SACdC,IAAAA,SACAN,IAAAA,cACGC,2CAGDM,gBAACX,mBACKK,GACJD,mBAAoBA,GAAeD,SAAUO,oDAcnCE,SACdF,IAAAA,SACAN,IAAAA,cACGC,2CAGDM,gBAACX,iBACCC,IAAK,MACLY,QAAS,OACTC,MAAO,CACLC,UAAW,UAETV,GACJD,mBAAoBA,GAAeY,IAAKN,IAExCM,IAAI,oEAaMC,WACd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4I,EAAAA,EAA4B/F,0CAkDhC4F,EACAI,GAEIJ,EACFA,EAAOE,kBACL/H,QACAiI,EAAAA,EAA0B9F,GAG5B4F,EAAkB/H,QAAciI,EAAAA,EAA0B9F,6CArL5D0F,EACAK,GAEIL,EACFA,EAAOE,kBACL1H,QACA6H,EAAAA,EAA6B3G,GAG/BwG,EACE1H,QACA6H,EAAAA,EAA6B3G,yCAoIjCsG,EACAM,GAEIN,EACFA,EAAOE,kBACLlI,QACAsI,EAAAA,EAAyBjG,GAG3B6F,EAAkBlI,QAAasI,EAAAA,EAAyBjG,mCE/Q1D2F,EACAO,GAEIP,EACFA,EAAOE,kBAAkBxF,QAAO6F,EAAAA,EAAmBnE,GAEnD8D,EAAkBxF,QAAO6F,EAAAA,EAAmBnE,sCIxC9C4D,EACAQ,GAEIR,EACFA,EAAOE,kBAAkBP,QAAUa,EAAAA,EAAsBX,GAEzDK,EAAkBP,QAAUa,EAAAA,EAAsBX,oCHuBpDG,EACAS,GAEIT,EACFA,EAAOE,kBAAkBzD,QAAQgE,EAAAA,EAAoB9C,GAErDuC,EAAkBzD,QAAQgE,EAAAA,EAAoB9C,4CCyChDqC,EACAU,GAEIV,EACFA,EAAOE,kBACLrB,QACA6B,EAAAA,EAA4B3B,GAG9BmB,EACErB,QACA6B,EAAAA,EAA4B3B,mCCpChCiB,EACAW,GAEIX,EACFA,EAAOE,kBAAkBlB,QAAO2B,EAAAA,EAAmBzB,GAEnDgB,EAAkBlB,QAAO2B,EAAAA,EAAmBzB,oDL7CF,kBAC5CY,QAAQC,KAAK,gEACNa,+FApBuC,kBAC9Cd,QAAQC,KAAK,iEACNlH,4DAMyC,kBAChDiH,QAAQC,KACN,kEAEKjI"}
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/ScrollRevealer.tsx","../src/Video.tsx","../src/EmbedCss.tsx"],"sourcesContent":["import {\n ComponentMeta,\n repeatedElement,\n SelectorDict,\n useSelectors as _useSelectors,\n useSelector as _useSelector,\n DataProvider as _DataProvider,\n DataProviderProps,\n applySelector as _applySelector,\n useDataEnv as _useDataEnv,\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\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const DataProvider: typeof _DataProvider = function(...args) {\n console.warn(\n \"DEPRECATED: Import DataProvider from @plasmicapp/host instead.\"\n );\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 === 0, children)}\n </_DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: \"slot\",\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: \"hostless-dynamic-text\",\n props: {\n selector: \"celebrities.0.name\",\n },\n },\n {\n type: \"component\",\n name: \"hostless-dynamic-image\",\n props: {\n selector: \"celebrities.0.profilePicture\",\n },\n },\n ],\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(\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 />\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: \"<!-- HTML snippet -->\",\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 registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css: string;\n}\n\nexport default function EmbedCss({\n css\n}: EmbedCssProps) {\n return (\n <style\n dangerouslySetInnerHTML={{ __html: css }}\n />\n );\n}\n\nexport const embedCssMeta: ComponentMeta<EmbedCssProps> = { \n name: \"hostless-embed-css\",\n displayName: \"Embed Css\",\n importName: \"EmbedCss\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n css: {\n type: \"code\",\n lang: \"css\",\n defaultValueHint: \"/* CSS snippet */\",\n description: \"CSS rules to be inserted\",\n },\n },\n};\n\nexport function registerEmbedCss(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedCssMeta?: ComponentMeta<EmbedCssProps>\n) {\n if (loader) {\n loader.registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n } else {\n registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n }\n}\n"],"names":["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","dynamicRepeaterMeta","displayName","importName","importPath","dataProviderMeta","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","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","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","EmbedCss","css","embedCssMeta","console","warn","loader","customDataProviderMeta","registerComponent","customDynamicElementMeta","customDynamicImageMeta","customDynamicRepeaterMeta","customDynamicTextMeta","customEmbedMeta","customEmbedCssMeta","customIframeMeta","customScrollRevealerMeta","customVideoMeta","_useDataEnv"],"mappings":"+rBAcMA,EAAa,iDAsDHC,aAGdC,IAAAA,aAAM,QACNC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,cACGC,SAEGC,EAAWC,eAAcH,UACxBI,gBAAcP,KACnBE,SAAAA,GACGE,EACAC,GACHJ,UAAWA,EAAY,IAAMI,EAASJ,sBAQ1BO,SACdC,IAAAA,SACAN,IAAAA,cACGC,gBAGDM,gBAACX,mBACKK,GACJD,mBAAoBA,GAAeD,SAAUO,oDAcnCE,SACdF,IAAAA,SACAN,IAAAA,cACGC,gBAGD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
  return target;
36
36
  }
37
37
 
38
+ var _excluded = ["tag", "className", "children", "propSelectors"],
39
+ _excluded2 = ["selector", "propSelectors"],
40
+ _excluded3 = ["selector", "propSelectors"];
38
41
  var thisModule = "@plasmicpkgs/plasmic-basic-components";
39
42
  /**
40
43
  * @deprecated This should be imported from @plasmicapp/host instead.
@@ -82,7 +85,7 @@ function DynamicElement(_ref) {
82
85
  className = _ref.className,
83
86
  children = _ref.children,
84
87
  propSelectors = _ref.propSelectors,
85
- props = _objectWithoutPropertiesLoose(_ref, ["tag", "className", "children", "propSelectors"]);
88
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
86
89
 
87
90
  var computed = useSelectors$1(propSelectors);
88
91
 
@@ -95,7 +98,7 @@ function DynamicElement(_ref) {
95
98
  function DynamicText(_ref2) {
96
99
  var selector = _ref2.selector,
97
100
  propSelectors = _ref2.propSelectors,
98
- props = _objectWithoutPropertiesLoose(_ref2, ["selector", "propSelectors"]);
101
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
99
102
 
100
103
  return React.createElement(DynamicElement, Object.assign({}, props, {
101
104
  propSelectors: _extends({}, propSelectors, {
@@ -106,7 +109,7 @@ function DynamicText(_ref2) {
106
109
  function DynamicImage(_ref3) {
107
110
  var selector = _ref3.selector,
108
111
  propSelectors = _ref3.propSelectors,
109
- props = _objectWithoutPropertiesLoose(_ref3, ["selector", "propSelectors"]);
112
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
110
113
 
111
114
  return React.createElement(DynamicElement, Object.assign({
112
115
  tag: "img",
@@ -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/ScrollRevealer.tsx","../src/Video.tsx","../src/EmbedCss.tsx"],"sourcesContent":["import {\n ComponentMeta,\n repeatedElement,\n SelectorDict,\n useSelectors as _useSelectors,\n useSelector as _useSelector,\n DataProvider as _DataProvider,\n DataProviderProps,\n applySelector as _applySelector,\n useDataEnv as _useDataEnv,\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\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const DataProvider: typeof _DataProvider = function(...args) {\n console.warn(\n \"DEPRECATED: Import DataProvider from @plasmicapp/host instead.\"\n );\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 === 0, children)}\n </_DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: \"slot\",\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: \"hostless-dynamic-text\",\n props: {\n selector: \"celebrities.0.name\",\n },\n },\n {\n type: \"component\",\n name: \"hostless-dynamic-image\",\n props: {\n selector: \"celebrities.0.profilePicture\",\n },\n },\n ],\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(\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 />\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: \"<!-- HTML snippet -->\",\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 registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css: string;\n}\n\nexport default function EmbedCss({\n css\n}: EmbedCssProps) {\n return (\n <style\n dangerouslySetInnerHTML={{ __html: css }}\n />\n );\n}\n\nexport const embedCssMeta: ComponentMeta<EmbedCssProps> = { \n name: \"hostless-embed-css\",\n displayName: \"Embed Css\",\n importName: \"EmbedCss\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n css: {\n type: \"code\",\n lang: \"css\",\n defaultValueHint: \"/* CSS snippet */\",\n description: \"CSS rules to be inserted\",\n },\n },\n};\n\nexport function registerEmbedCss(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedCssMeta?: ComponentMeta<EmbedCssProps>\n) {\n if (loader) {\n loader.registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n } else {\n registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n }\n}\n"],"names":["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","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","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","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","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","EmbedCss","css","embedCssMeta","registerEmbedCss","customEmbedCssMeta"],"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,O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iBAAiB,CAACkH,QAAD,EAAWI,kBAAX,WAAWA,kBAAX,GAAiCF,YAAjC,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/ScrollRevealer.tsx","../src/Video.tsx","../src/EmbedCss.tsx"],"sourcesContent":["import {\n ComponentMeta,\n repeatedElement,\n SelectorDict,\n useSelectors as _useSelectors,\n useSelector as _useSelector,\n DataProvider as _DataProvider,\n DataProviderProps,\n applySelector as _applySelector,\n useDataEnv as _useDataEnv,\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\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const DataProvider: typeof _DataProvider = function(...args) {\n console.warn(\n \"DEPRECATED: Import DataProvider from @plasmicapp/host instead.\"\n );\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 === 0, children)}\n </_DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: \"slot\",\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: \"hostless-dynamic-text\",\n props: {\n selector: \"celebrities.0.name\",\n },\n },\n {\n type: \"component\",\n name: \"hostless-dynamic-image\",\n props: {\n selector: \"celebrities.0.profilePicture\",\n },\n },\n ],\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(\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 />\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: \"<!-- HTML snippet -->\",\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 registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css: string;\n}\n\nexport default function EmbedCss({\n css\n}: EmbedCssProps) {\n return (\n <style\n dangerouslySetInnerHTML={{ __html: css }}\n />\n );\n}\n\nexport const embedCssMeta: ComponentMeta<EmbedCssProps> = { \n name: \"hostless-embed-css\",\n displayName: \"Embed Css\",\n importName: \"EmbedCss\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n css: {\n type: \"code\",\n lang: \"css\",\n defaultValueHint: \"/* CSS snippet */\",\n description: \"CSS rules to be inserted\",\n },\n },\n};\n\nexport function registerEmbedCss(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedCssMeta?: ComponentMeta<EmbedCssProps>\n) {\n if (loader) {\n loader.registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n } else {\n registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n }\n}\n"],"names":["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","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","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","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","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","EmbedCss","css","embedCssMeta","registerEmbedCss","customEmbedCssMeta"],"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;AAED;;;;IAGaC,YAAY,GAAyB,SAArCA,YAAqC;AAChDT,EAAAA,OAAO,CAACC,IAAR,CACE,gEADF;AAGA,SAAOS,cAAa,MAAb,mBAAP;AACD;SAQeC;sBAGdC;MAAAA,4BAAM;MACNC,iBAAAA;MACAC,gBAAAA;MACAC,qBAAAA;MACGC;;AAEH,MAAMC,QAAQ,GAAGX,cAAa,CAACS,aAAD,CAA9B;;AACA,SAAOG,aAAa,CAACN,GAAD;AAClBE,IAAAA,QAAQ,EAARA;AADkB,KAEfE,KAFe,EAGfC,QAHe;AAIlBJ,IAAAA,SAAS,EAAEA,SAAS,GAAG,GAAZ,GAAkBI,QAAQ,CAACJ;AAJpB,KAApB;AAMD;SAMeM;MACdC,iBAAAA;MACAL,sBAAAA;MACGC;;AAEH,SACEK,mBAAA,CAACV,cAAD,oBACMK;AACJD,IAAAA,aAAa,eAAOA,aAAP;AAAsBD,M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EAAE;AACH7H,MAAAA,IAAI,EAAE,MADH;AAEH4D,MAAAA,IAAI,EAAE,KAFH;AAGH3C,MAAAA,gBAAgB,EAAE,mBAHf;AAIHhB,MAAAA,WAAW,EAAE;AAJV;AADA;AALiD,CAAnD;AAeP,SAAgB8H,iBACdvH,QACAwH;AAEA,MAAIxH,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACE,iBAAP,CAAyBkH,QAAzB,EAAmCI,kBAAnC,WAAmCA,kBAAnC,GAAyDF,YAAzD;AACD,GAFD,MAEO;AACLpH,IAAAA,iBAAiB,CAACkH,QAAD,EAAWI,kBAAX,WAAWA,kBAAX,GAAiCF,YAAjC,CAAjB;AACD;AACF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicpkgs/plasmic-basic-components",
3
- "version": "0.0.11",
3
+ "version": "0.0.16",
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,15 +28,16 @@
28
28
  "analyze": "size-limit --why"
29
29
  },
30
30
  "devDependencies": {
31
- "@plasmicapp/host": "^1.0.7",
31
+ "@plasmicapp/host": "1.0.14",
32
32
  "@size-limit/preset-small-lib": "^4.11.0",
33
33
  "@types/node": "^14.0.26",
34
+ "@types/react": "^16.9.46",
35
+ "@types/react-dom": "^16.9.8",
34
36
  "size-limit": "^4.11.0",
35
37
  "tsdx": "^0.14.1",
36
38
  "tslib": "^2.2.0",
37
39
  "typescript": "^3.9.7"
38
40
  },
39
- "dependencies": {},
40
41
  "peerDependencies": {
41
42
  "@plasmicapp/host": "^1.0.7",
42
43
  "react": ">=16.8.0",