@plasmicpkgs/plasmic-basic-components 0.0.103 → 0.0.105

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.
@@ -282,8 +282,9 @@ function Embed(_ref) {
282
282
  _ref$hideInEditor = _ref.hideInEditor,
283
283
  hideInEditor = _ref$hideInEditor === void 0 ? false : _ref$hideInEditor;
284
284
  var rootElt = React.useRef(null);
285
+ var inEditor = host.usePlasmicCanvasContext();
285
286
  React.useEffect(function () {
286
- if (hideInEditor) {
287
+ if (hideInEditor && inEditor) {
287
288
  return;
288
289
  }
289
290
  Array.from(ensure(rootElt.current).querySelectorAll("script")).forEach(function (oldScript) {
@@ -295,7 +296,7 @@ function Embed(_ref) {
295
296
  ensure(oldScript.parentNode).replaceChild(newScript, oldScript);
296
297
  });
297
298
  }, [code, hideInEditor]);
298
- var effectiveCode = hideInEditor ? "" : code;
299
+ var effectiveCode = hideInEditor && inEditor ? "" : code;
299
300
  return React__default.createElement("div", {
300
301
  ref: rootElt,
301
302
  className: className,
@@ -1 +1 @@
1
- {"version":3,"file":"plasmic-basic-components.cjs.development.js","sources":["../src/Data.tsx","../src/common.ts","../src/Embed.tsx","../src/Iframe.tsx","../src/Repeater.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx"],"sourcesContent":["import {\n applySelector as _applySelector,\n ComponentMeta,\n DataProvider as _DataProvider,\n DataProviderProps,\n repeatedElement,\n SelectorDict,\n useDataEnv as _useDataEnv,\n useSelector as _useSelector,\n useSelectors as _useSelectors,\n} from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps, createElement, ReactNode } from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const applySelector: typeof _applySelector = function (...args) {\n console.warn(\n \"DEPRECATED: Import applySelector from @plasmicapp/host instead.\"\n );\n return _applySelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelector: typeof _useSelector = function (...args) {\n console.warn(\"DEPRECATED: Import useSelector from @plasmicapp/host instead.\");\n return _useSelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelectors: typeof _useSelectors = function (...args) {\n console.warn(\n \"DEPRECATED: Import useSelectors from @plasmicapp/host instead.\"\n );\n return _useSelectors(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useDataEnv: typeof _useDataEnv = function (...args) {\n console.warn(\"DEPRECATED: Import useDataEnv from @plasmicapp/host instead.\");\n return _useDataEnv(...args);\n};\n\nexport const DataProvider: typeof _DataProvider = function (...args) {\n return _DataProvider(...args);\n};\n\nexport interface CommonDynamicProps {\n className?: string;\n tag?: string;\n propSelectors?: SelectorDict;\n}\n\nexport function DynamicElement<\n Tag extends keyof JSX.IntrinsicElements = \"div\"\n>({\n tag = \"div\",\n className,\n children,\n propSelectors,\n ...props\n}: CommonDynamicProps & ComponentProps<Tag>) {\n const computed = _useSelectors(propSelectors);\n return createElement(tag, {\n children,\n ...props,\n ...computed,\n className: className + \" \" + computed.className,\n });\n}\n\nexport interface DynamicTextProps extends CommonDynamicProps {\n selector?: string;\n}\n\nexport function DynamicText({\n selector,\n propSelectors,\n ...props\n}: DynamicTextProps) {\n return (\n <DynamicElement\n {...props}\n propSelectors={{ ...propSelectors, children: selector }}\n >\n {/*This is the default text*/}\n (DynamicText requires a selector)\n </DynamicElement>\n );\n}\n\nexport interface DynamicImageProps\n extends CommonDynamicProps,\n ComponentProps<\"img\"> {\n selector?: string;\n}\n\nexport function DynamicImage({\n selector,\n propSelectors,\n ...props\n}: DynamicImageProps) {\n return (\n <DynamicElement<\"img\">\n tag={\"img\"}\n loading={\"lazy\"}\n style={{\n objectFit: \"cover\",\n }}\n {...props}\n propSelectors={{ ...propSelectors, src: selector }}\n // Default image placeholder\n src=\"https://studio.plasmic.app/static/img/placeholder.png\"\n />\n );\n}\n\nexport interface DynamicRepeaterProps {\n children?: ReactNode;\n loopItemName?: string;\n keySelector?: string;\n selector?: string;\n data?: any;\n}\n\nexport function DynamicRepeater({\n children,\n loopItemName,\n keySelector,\n selector,\n data,\n}: DynamicRepeaterProps) {\n // Defaults to an array of three items.\n const finalData = data ?? _useSelector(selector) ?? [1, 2, 3];\n return (\n <>\n {finalData?.map?.((item: any, index: number) => (\n <_DataProvider\n key={_applySelector(item, keySelector) ?? index}\n name={loopItemName}\n data={item}\n >\n {repeatedElement(index, children)}\n </_DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n providesData: true,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n }\n}\n\nconst dynamicPropsWithoutTag = {\n propSelectors: {\n type: \"object\",\n defaultValueHint: {},\n description:\n \"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.\",\n },\n} as const;\n\nconst dynamicProps = {\n ...dynamicPropsWithoutTag,\n tag: {\n type: \"string\",\n defaultValueHint: \"div\",\n description: \"The HTML tag to use\",\n },\n} as const;\n\n// TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.\n\nexport const dynamicElementMeta: ComponentMeta<CommonDynamicProps> = {\n name: \"hostless-dynamic-element\",\n displayName: \"Dynamic Element\",\n importName: \"DynamicElement\",\n importPath: thisModule,\n props: { ...dynamicProps, children: \"slot\" },\n};\n\nexport function registerDynamicElement(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicElementMeta?: ComponentMeta<CommonDynamicProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n } else {\n registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n }\n}\n\nexport const dynamicTextMeta: ComponentMeta<DynamicTextProps> = {\n name: \"hostless-dynamic-text\",\n importName: \"DynamicText\",\n displayName: \"Dynamic Text\",\n importPath: thisModule,\n props: {\n ...dynamicProps,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the text, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicText(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicTextMeta?: ComponentMeta<DynamicTextProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicText,\n customDynamicTextMeta ?? dynamicTextMeta\n );\n } else {\n registerComponent(DynamicText, customDynamicTextMeta ?? dynamicTextMeta);\n }\n}\n\nexport const dynamicImageMeta: ComponentMeta<DynamicImageProps> = {\n name: \"hostless-dynamic-image\",\n displayName: \"Dynamic Image\",\n importName: \"DynamicImage\",\n importPath: thisModule,\n props: {\n ...dynamicPropsWithoutTag,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the image source URL, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicImage(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicImageMeta?: ComponentMeta<DynamicImageProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicImage,\n customDynamicImageMeta ?? dynamicImageMeta\n );\n } else {\n registerComponent(DynamicImage, customDynamicImageMeta ?? dynamicImageMeta);\n }\n}\n","export const tuple = <T extends any[]>(...args: T): T => args;\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, { useEffect, useRef } from \"react\";\nimport { ensure } from \"./common\";\n\nexport interface EmbedProps {\n className?: string;\n code: string;\n hideInEditor?: boolean;\n}\n\nexport default function Embed({\n className,\n code,\n hideInEditor = false,\n}: EmbedProps) {\n const rootElt = useRef<HTMLDivElement>(null);\n useEffect(() => {\n if (hideInEditor) {\n return;\n }\n Array.from(ensure(rootElt.current).querySelectorAll(\"script\")).forEach(\n (oldScript) => {\n const newScript = document.createElement(\"script\");\n Array.from(oldScript.attributes).forEach((attr) =>\n newScript.setAttribute(attr.name, attr.value)\n );\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n ensure(oldScript.parentNode).replaceChild(newScript, oldScript);\n }\n );\n }, [code, hideInEditor]);\n const effectiveCode = hideInEditor ? \"\" : code;\n return (\n <div\n ref={rootElt}\n className={className}\n dangerouslySetInnerHTML={{ __html: effectiveCode }}\n style={{ whiteSpace: \"normal\" }}\n />\n );\n}\n\nexport const embedMeta: ComponentMeta<EmbedProps> = {\n name: \"hostless-embed\",\n displayName: \"Embed HTML\",\n importName: \"Embed\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n code: {\n type: \"code\",\n lang: \"html\",\n defaultValueHint:\n \"<div>Paste your embed code via the right sidebar</div>\",\n description: \"The HTML code to be embedded\",\n },\n hideInEditor: {\n type: \"boolean\",\n displayName: \"Hide in editor\",\n description:\n \"Disable running the code while editing in Plasmic Studio (may require reload)\",\n editOnly: true,\n },\n },\n defaultStyles: {\n maxWidth: \"100%\",\n },\n};\n\nexport function registerEmbed(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedMeta?: ComponentMeta<EmbedProps>\n) {\n if (loader) {\n loader.registerComponent(Embed, customEmbedMeta ?? embedMeta);\n } else {\n registerComponent(Embed, customEmbedMeta ?? embedMeta);\n }\n}\n","import { ComponentMeta, PlasmicCanvasContext } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { useContext } from \"react\";\n\nexport interface IframeProps {\n src: string;\n preview?: boolean;\n className?: string;\n}\n\nexport default function Iframe({ preview, src, className }: IframeProps) {\n const isEditing = useContext(PlasmicCanvasContext);\n if (isEditing && !preview) {\n return (\n <div className={className}>\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: \"#eee\",\n color: \"#888\",\n fontSize: \"36px\",\n fontFamily: \"sans-serif\",\n fontWeight: \"bold\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n }}\n >\n Iframe placeholder\n </div>\n </div>\n );\n }\n return <iframe src={src} className={className} />;\n}\n\nexport const iframeMeta: ComponentMeta<IframeProps> = {\n name: \"hostless-iframe\",\n displayName: \"Iframe\",\n importName: \"Iframe\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue: \"https://www.example.com\",\n },\n preview: {\n type: \"boolean\",\n description: \"Load the iframe while editing in Plasmic Studio\",\n },\n },\n defaultStyles: {\n width: \"300px\",\n height: \"150px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerIframe(\n loader?: { registerComponent: typeof registerComponent },\n customIframeMeta?: ComponentMeta<IframeProps>\n) {\n if (loader) {\n loader.registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n } else {\n registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n }\n}\n","import {\n ComponentMeta,\n DataProvider,\n registerComponent,\n repeatedElement,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nconst defaultItemName = \"currentItem\";\nconst defaultIndexName = \"currentIndex\";\n\ninterface RepeaterProps<T> {\n children: React.ReactNode;\n items: T[];\n itemName?: string;\n indexName?: string;\n}\n\nfunction Repeater<T>(props: RepeaterProps<T>) {\n const { children, items, itemName, indexName } = props;\n\n if (!Array.isArray(items)) {\n throw new Error(\"Repeater received an invalid collection: not an array.\");\n }\n\n return (\n <>\n {items.map((item, index) => (\n <DataProvider\n key={index.toString()}\n name={itemName || defaultItemName}\n data={item}\n >\n <DataProvider name={indexName || defaultIndexName} data={index}>\n {repeatedElement(index, children)}\n </DataProvider>\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const repeaterMeta: ComponentMeta<RepeaterProps<any>> = {\n name: `plasmic-repeater`,\n displayName: \"Repeater\",\n importName: \"Repeater\",\n importPath: thisModule,\n providesData: true,\n props: {\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n items: {\n type: \"array\",\n defaultValue: [1, 2, 3],\n displayName: \"Collection\",\n description: \"Items array (JavaScript expression).\",\n },\n itemName: {\n type: \"string\",\n defaultValue: defaultItemName,\n defaultValueHint: defaultItemName,\n displayName: \"Item\",\n description: \"Data context key for the current item.\",\n },\n indexName: {\n type: \"string\",\n defaultValue: defaultIndexName,\n defaultValueHint: defaultIndexName,\n displayName: \"Index\",\n description: \"Data context key for the index of the current item.\",\n },\n },\n};\n\nexport function registerRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customRepeaterMeta?: ComponentMeta<RepeaterProps<any>>\n) {\n if (loader) {\n loader.registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n } else {\n registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n }\n}\n\nexport default Repeater;\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work.\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n defaultValue: true,\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n"],"names":["thisModule","applySelector","console","warn","_applySelector","useSelector","_useSelector","useSelectors","_useSelectors","useDataEnv","_useDataEnv","DataProvider","_DataProvider","DynamicElement","tag","className","children","propSelectors","props","computed","createElement","DynamicText","selector","React","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","data","finalData","map","item","index","key","name","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","isRepeated","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","providesData","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","ensure","x","undefined","Error","Embed","code","hideInEditor","rootElt","useRef","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","value","appendChild","createTextNode","innerHTML","parentNode","replaceChild","effectiveCode","ref","dangerouslySetInnerHTML","__html","whiteSpace","embedMeta","lang","editOnly","defaultStyles","maxWidth","registerEmbed","customEmbedMeta","Iframe","preview","isEditing","useContext","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","registerIframe","customIframeMeta","defaultItemName","defaultIndexName","Repeater","items","itemName","indexName","isArray","toString","repeaterMeta","registerRepeater","customRepeaterMeta","useDirectionalIntersection","scrollDownThreshold","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","handler","entries","intersectionRatio","observer","root","rootMargin","threshold","observe","disconnect","ScrollRevealer","intersectionRef","scrollRevealerMeta","registerScrollRevealer","customScrollRevealerMeta","Video","forwardRef","videoMeta","autoPlay","controls","playsInline","loop","muted","poster","preload","options","registerVideo","customVideoMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,UAAU,GAAG,uCAAuC;AAE1D;;;IAGa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WAAW,EAAE,MAAM;MACnBJ,WAAW,EAAE;KACd;IACDmI,KAAK,EAAE;MACLpI,IAAI,EAAE,SAAS;MACfK,WAAW,EAAE,OAAO;MACpBJ,WAAW,EAAE;KACd;IACDoI,MAAM,EAAE;MACNrI,IAAI,EAAE,UAAU;MAChBK,WAAW,EAAE,4BAA4B;MACzCJ,WAAW,EAAE;KACd;IACDqI,OAAO,EAAE;MACPtI,IAAI,EAAE,QAAQ;MACduI,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC;MACrClI,WAAW,EAAE,SAAS;MACtBJ,WAAW,EACT;;GAEL;EACDgE,aAAa,EAAE;IACbyB,MAAM,EAAE,KAAK;IACbD,KAAK,EAAE,OAAO;IACdvB,QAAQ,EAAE;;CAEb;AAED,SAAgBsE,aAAa,CAC3B/H,MAAwD,EACxDgI,eAA2C;EAE3C,IAAIhI,MAAM,EAAE;IACVA,MAAM,CAACE,iBAAiB,CAACkH,KAAK,EAAEY,eAAe,WAAfA,eAAe,GAAIV,SAAS,CAAC;GAC9D,MAAM;IACLpH,iBAAiB,CAACkH,KAAK,EAAEY,eAAe,WAAfA,eAAe,GAAIV,SAAS,CAAC;;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plasmic-basic-components.cjs.development.js","sources":["../src/Data.tsx","../src/common.ts","../src/Embed.tsx","../src/Iframe.tsx","../src/Repeater.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx"],"sourcesContent":["import {\n applySelector as _applySelector,\n ComponentMeta,\n DataProvider as _DataProvider,\n DataProviderProps,\n repeatedElement,\n SelectorDict,\n useDataEnv as _useDataEnv,\n useSelector as _useSelector,\n useSelectors as _useSelectors,\n} from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps, createElement, ReactNode } from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const applySelector: typeof _applySelector = function (...args) {\n console.warn(\n \"DEPRECATED: Import applySelector from @plasmicapp/host instead.\"\n );\n return _applySelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelector: typeof _useSelector = function (...args) {\n console.warn(\"DEPRECATED: Import useSelector from @plasmicapp/host instead.\");\n return _useSelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelectors: typeof _useSelectors = function (...args) {\n console.warn(\n \"DEPRECATED: Import useSelectors from @plasmicapp/host instead.\"\n );\n return _useSelectors(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useDataEnv: typeof _useDataEnv = function (...args) {\n console.warn(\"DEPRECATED: Import useDataEnv from @plasmicapp/host instead.\");\n return _useDataEnv(...args);\n};\n\nexport const DataProvider: typeof _DataProvider = function (...args) {\n return _DataProvider(...args);\n};\n\nexport interface CommonDynamicProps {\n className?: string;\n tag?: string;\n propSelectors?: SelectorDict;\n}\n\nexport function DynamicElement<\n Tag extends keyof JSX.IntrinsicElements = \"div\"\n>({\n tag = \"div\",\n className,\n children,\n propSelectors,\n ...props\n}: CommonDynamicProps & ComponentProps<Tag>) {\n const computed = _useSelectors(propSelectors);\n return createElement(tag, {\n children,\n ...props,\n ...computed,\n className: className + \" \" + computed.className,\n });\n}\n\nexport interface DynamicTextProps extends CommonDynamicProps {\n selector?: string;\n}\n\nexport function DynamicText({\n selector,\n propSelectors,\n ...props\n}: DynamicTextProps) {\n return (\n <DynamicElement\n {...props}\n propSelectors={{ ...propSelectors, children: selector }}\n >\n {/*This is the default text*/}\n (DynamicText requires a selector)\n </DynamicElement>\n );\n}\n\nexport interface DynamicImageProps\n extends CommonDynamicProps,\n ComponentProps<\"img\"> {\n selector?: string;\n}\n\nexport function DynamicImage({\n selector,\n propSelectors,\n ...props\n}: DynamicImageProps) {\n return (\n <DynamicElement<\"img\">\n tag={\"img\"}\n loading={\"lazy\"}\n style={{\n objectFit: \"cover\",\n }}\n {...props}\n propSelectors={{ ...propSelectors, src: selector }}\n // Default image placeholder\n src=\"https://studio.plasmic.app/static/img/placeholder.png\"\n />\n );\n}\n\nexport interface DynamicRepeaterProps {\n children?: ReactNode;\n loopItemName?: string;\n keySelector?: string;\n selector?: string;\n data?: any;\n}\n\nexport function DynamicRepeater({\n children,\n loopItemName,\n keySelector,\n selector,\n data,\n}: DynamicRepeaterProps) {\n // Defaults to an array of three items.\n const finalData = data ?? _useSelector(selector) ?? [1, 2, 3];\n return (\n <>\n {finalData?.map?.((item: any, index: number) => (\n <_DataProvider\n key={_applySelector(item, keySelector) ?? index}\n name={loopItemName}\n data={item}\n >\n {repeatedElement(index, children)}\n </_DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n providesData: true,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n }\n}\n\nconst dynamicPropsWithoutTag = {\n propSelectors: {\n type: \"object\",\n defaultValueHint: {},\n description:\n \"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.\",\n },\n} as const;\n\nconst dynamicProps = {\n ...dynamicPropsWithoutTag,\n tag: {\n type: \"string\",\n defaultValueHint: \"div\",\n description: \"The HTML tag to use\",\n },\n} as const;\n\n// TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.\n\nexport const dynamicElementMeta: ComponentMeta<CommonDynamicProps> = {\n name: \"hostless-dynamic-element\",\n displayName: \"Dynamic Element\",\n importName: \"DynamicElement\",\n importPath: thisModule,\n props: { ...dynamicProps, children: \"slot\" },\n};\n\nexport function registerDynamicElement(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicElementMeta?: ComponentMeta<CommonDynamicProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n } else {\n registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n }\n}\n\nexport const dynamicTextMeta: ComponentMeta<DynamicTextProps> = {\n name: \"hostless-dynamic-text\",\n importName: \"DynamicText\",\n displayName: \"Dynamic Text\",\n importPath: thisModule,\n props: {\n ...dynamicProps,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the text, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicText(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicTextMeta?: ComponentMeta<DynamicTextProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicText,\n customDynamicTextMeta ?? dynamicTextMeta\n );\n } else {\n registerComponent(DynamicText, customDynamicTextMeta ?? dynamicTextMeta);\n }\n}\n\nexport const dynamicImageMeta: ComponentMeta<DynamicImageProps> = {\n name: \"hostless-dynamic-image\",\n displayName: \"Dynamic Image\",\n importName: \"DynamicImage\",\n importPath: thisModule,\n props: {\n ...dynamicPropsWithoutTag,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the image source URL, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicImage(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicImageMeta?: ComponentMeta<DynamicImageProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicImage,\n customDynamicImageMeta ?? dynamicImageMeta\n );\n } else {\n registerComponent(DynamicImage, customDynamicImageMeta ?? dynamicImageMeta);\n }\n}\n","export const tuple = <T extends any[]>(...args: T): T => args;\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n","import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport 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 const inEditor = usePlasmicCanvasContext();\n useEffect(() => {\n if (hideInEditor && inEditor) {\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 && inEditor ? \"\" : code;\n return (\n <div\n ref={rootElt}\n className={className}\n dangerouslySetInnerHTML={{ __html: effectiveCode }}\n style={{ whiteSpace: \"normal\" }}\n />\n );\n}\n\nexport const embedMeta: ComponentMeta<EmbedProps> = {\n name: \"hostless-embed\",\n displayName: \"Embed HTML\",\n importName: \"Embed\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n code: {\n type: \"code\",\n lang: \"html\",\n defaultValueHint:\n \"<div>Paste your embed code via the right sidebar</div>\",\n description: \"The HTML code to be embedded\",\n },\n hideInEditor: {\n type: \"boolean\",\n displayName: \"Hide in editor\",\n description:\n \"Disable running the code while editing in Plasmic Studio (may require reload)\",\n editOnly: true,\n },\n },\n defaultStyles: {\n maxWidth: \"100%\",\n },\n};\n\nexport function registerEmbed(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedMeta?: ComponentMeta<EmbedProps>\n) {\n if (loader) {\n loader.registerComponent(Embed, customEmbedMeta ?? embedMeta);\n } else {\n registerComponent(Embed, customEmbedMeta ?? embedMeta);\n }\n}\n","import { ComponentMeta, PlasmicCanvasContext } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { useContext } from \"react\";\n\nexport interface IframeProps {\n src: string;\n preview?: boolean;\n className?: string;\n}\n\nexport default function Iframe({ preview, src, className }: IframeProps) {\n const isEditing = useContext(PlasmicCanvasContext);\n if (isEditing && !preview) {\n return (\n <div className={className}>\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: \"#eee\",\n color: \"#888\",\n fontSize: \"36px\",\n fontFamily: \"sans-serif\",\n fontWeight: \"bold\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n }}\n >\n Iframe placeholder\n </div>\n </div>\n );\n }\n return <iframe src={src} className={className} />;\n}\n\nexport const iframeMeta: ComponentMeta<IframeProps> = {\n name: \"hostless-iframe\",\n displayName: \"Iframe\",\n importName: \"Iframe\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue: \"https://www.example.com\",\n },\n preview: {\n type: \"boolean\",\n description: \"Load the iframe while editing in Plasmic Studio\",\n },\n },\n defaultStyles: {\n width: \"300px\",\n height: \"150px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerIframe(\n loader?: { registerComponent: typeof registerComponent },\n customIframeMeta?: ComponentMeta<IframeProps>\n) {\n if (loader) {\n loader.registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n } else {\n registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n }\n}\n","import {\n ComponentMeta,\n DataProvider,\n registerComponent,\n repeatedElement,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nconst defaultItemName = \"currentItem\";\nconst defaultIndexName = \"currentIndex\";\n\ninterface RepeaterProps<T> {\n children: React.ReactNode;\n items: T[];\n itemName?: string;\n indexName?: string;\n}\n\nfunction Repeater<T>(props: RepeaterProps<T>) {\n const { children, items, itemName, indexName } = props;\n\n if (!Array.isArray(items)) {\n throw new Error(\"Repeater received an invalid collection: not an array.\");\n }\n\n return (\n <>\n {items.map((item, index) => (\n <DataProvider\n key={index.toString()}\n name={itemName || defaultItemName}\n data={item}\n >\n <DataProvider name={indexName || defaultIndexName} data={index}>\n {repeatedElement(index, children)}\n </DataProvider>\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const repeaterMeta: ComponentMeta<RepeaterProps<any>> = {\n name: `plasmic-repeater`,\n displayName: \"Repeater\",\n importName: \"Repeater\",\n importPath: thisModule,\n providesData: true,\n props: {\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n items: {\n type: \"array\",\n defaultValue: [1, 2, 3],\n displayName: \"Collection\",\n description: \"Items array (JavaScript expression).\",\n },\n itemName: {\n type: \"string\",\n defaultValue: defaultItemName,\n defaultValueHint: defaultItemName,\n displayName: \"Item\",\n description: \"Data context key for the current item.\",\n },\n indexName: {\n type: \"string\",\n defaultValue: defaultIndexName,\n defaultValueHint: defaultIndexName,\n displayName: \"Index\",\n description: \"Data context key for the index of the current item.\",\n },\n },\n};\n\nexport function registerRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customRepeaterMeta?: ComponentMeta<RepeaterProps<any>>\n) {\n if (loader) {\n loader.registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n } else {\n registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n }\n}\n\nexport default Repeater;\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work.\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n defaultValue: true,\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n"],"names":["thisModule","applySelector","console","warn","_applySelector","useSelector","_useSelector","useSelectors","_useSelectors","useDataEnv","_useDataEnv","DataProvider","_DataProvider","DynamicElement","tag","className","children","propSelectors","props","computed","createElement","DynamicText","selector","React","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","data","finalData","map","item","index","key","name","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","isRepeated","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","providesData","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","ensure","x","undefined","Error","Embed","code","hideInEditor","rootElt","useRef","inEditor","usePlasmicCanvasContext","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","value","appendChild","createTextNode","innerHTML","parentNode","replaceChild","effectiveCode","ref","dangerouslySetInnerHTML","__html","whiteSpace","embedMeta","lang","editOnly","defaultStyles","maxWidth","registerEmbed","customEmbedMeta","Iframe","preview","isEditing","useContext","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","registerIframe","customIframeMeta","defaultItemName","defaultIndexName","Repeater","items","itemName","indexName","isArray","toString","repeaterMeta","registerRepeater","customRepeaterMeta","useDirectionalIntersection","scrollDownThreshold","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","handler","entries","intersectionRatio","observer","root","rootMargin","threshold","observe","disconnect","ScrollRevealer","intersectionRef","scrollRevealerMeta","registerScrollRevealer","customScrollRevealerMeta","Video","forwardRef","videoMeta","autoPlay","controls","playsInline","loop","muted","poster","preload","options","registerVideo","customVideoMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,UAAU,GAAG,uCAAuC;AAE1D;;;IAGaC,aAAa,GAA0B,SAAvCA,aAAa;EACxBC,OAAO,CAACC,IAAI,CACV,iEAAiE,CAClE;EACD,OAAOC,kBAAc,yBAAS;AAChC;AAEA;;;IAGaC,WAAW,GAAwB,SAAnCA,WAAW;EACtBH,OAAO,CAACC,IAAI,CAAC,+DAA+D,CAAC;EAC7E,OAAOG,gBAAY,yBAAS;AAC9B;AAEA;;;IAGaC,YAAY,GAAyB,SAArCA,YAAY;EACvBL,OAAO,CAACC,IAAI,CACV,gEAAgE,CACjE;EACD,OAAOK,iBAAa,yBAAS;AAC/B;AAEA;;;IAGaC,UAAU,GAAuB,SAAjCA,UAAU;EACrBP,OAAO,CAACC,IAAI,CAAC,8DAA8D,CAAC;EAC5E,OAAOO,eAAW,yBAAS;AAC7B;IAEaC,YAAY,GAAyB,SAArCA,YAAY;EACvB,OAAOC,iBAAa,yBAAS;AAC/B;SAQgBC,cAAc;sBAG5BC,GAAG;IAAHA,GAAG,yBAAG,KAAK;IACXC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IACRC,aAAa,QAAbA,aAAa;IACVC,KAAK;EAER,IAAMC,QAAQ,GAAGX,iBAAa,CAACS,aAAa,CAAC;EAC7C,OAAOG,mBAAa,CAACN,GAAG;IACtBE,QAAQ,EAARA;KACGE,KAAK,EACLC,QAAQ;IACXJ,SAAS,EAAEA,SAAS,GAAG,GAAG,GAAGI,QAAQ,CAACJ;KACtC;AACJ;SAMgBM,WAAW;MACzBC,QAAQ,SAARA,QAAQ;IACRL,aAAa,SAAbA,aAAa;IACVC,KAAK;EAER,OACEK,6BAACV,cAAc,oBACT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S;MACfK,WAAW,EAAE,WAAW;MACxBJ,WAAW,EACT;KACH;IACDkI,QAAQ,EAAE;MACRnI,IAAI,EAAE,SAAS;MACfK,WAAW,EAAE,eAAe;MAC5BJ,WAAW,EAAE,uDAAuD;MACpEC,YAAY,EAAE;KACf;IACDkI,WAAW,EAAE;MACXpI,IAAI,EAAE,SAAS;MACfK,WAAW,EAAE,cAAc;MAC3BJ,WAAW,EACT;KACH;IACDoI,IAAI,EAAE;MACJrI,IAAI,EAAE,SAAS;MACfK,WAAW,EAAE,MAAM;MACnBJ,WAAW,EAAE;KACd;IACDqI,KAAK,EAAE;MACLtI,IAAI,EAAE,SAAS;MACfK,WAAW,EAAE,OAAO;MACpBJ,WAAW,EAAE;KACd;IACDsI,MAAM,EAAE;MACNvI,IAAI,EAAE,UAAU;MAChBK,WAAW,EAAE,4BAA4B;MACzCJ,WAAW,EAAE;KACd;IACDuI,OAAO,EAAE;MACPxI,IAAI,EAAE,QAAQ;MACdyI,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC;MACrCpI,WAAW,EAAE,SAAS;MACtBJ,WAAW,EACT;;GAEL;EACDkE,aAAa,EAAE;IACbyB,MAAM,EAAE,KAAK;IACbD,KAAK,EAAE,OAAO;IACdvB,QAAQ,EAAE;;CAEb;AAED,SAAgBsE,aAAa,CAC3BjI,MAAwD,EACxDkI,eAA2C;EAE3C,IAAIlI,MAAM,EAAE;IACVA,MAAM,CAACE,iBAAiB,CAACoH,KAAK,EAAEY,eAAe,WAAfA,eAAe,GAAIV,SAAS,CAAC;GAC9D,MAAM;IACLtH,iBAAiB,CAACoH,KAAK,EAAEY,eAAe,WAAfA,eAAe,GAAIV,SAAS,CAAC;;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@plasmicapp/host"),r=e(require("@plasmicapp/host/registerComponent")),a=require("react"),o=e(a);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function i(e,t){if(null==e)return{};var r,a,o={},n=Object.keys(e);for(a=0;a<n.length;a++)t.indexOf(r=n[a])>=0||(o[r]=e[r]);return o}var l=["tag","className","children","propSelectors"],s=["selector","propSelectors"],p=["selector","propSelectors"],c="@plasmicpkgs/plasmic-basic-components";function m(e){var r=e.tag,o=void 0===r?"div":r,s=e.className,p=e.children,c=e.propSelectors,m=i(e,l),d=t.useSelectors(c);return a.createElement(o,n({children:p},m,d,{className:s+" "+d.className}))}function d(e){var t=e.selector,r=e.propSelectors,a=i(e,s);return o.createElement(m,Object.assign({},a,{propSelectors:n({},r,{children:t})}),"(DynamicText requires a selector)")}function u(e){var t=e.selector,r=e.propSelectors,a=i(e,p);return o.createElement(m,Object.assign({tag:"img",loading:"lazy",style:{objectFit:"cover"}},a,{propSelectors:n({},r,{src:t}),src:"https://studio.plasmic.app/static/img/placeholder.png"}))}function h(e){var r,a=e.children,n=e.loopItemName,i=e.keySelector,l=e.data,s=null!=(r=null!=l?l:t.useSelector(e.selector))?r:[1,2,3];return o.createElement(o.Fragment,null,null==s||null==s.map?void 0:s.map((function(e,r){var l;return o.createElement(t.DataProvider,{key:null!=(l=t.applySelector(e,i))?l:r,name:n,data:e},t.repeatedElement(r,a))})))}var y={selector:{type:"string",description:"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField"},loopItemName:{type:"string",defaultValue:"item",description:"The name of the variable to use to store the current item in the loop"},children:{type:"slot",isRepeated:!0}},f={name:"hostless-dynamic-repeater",displayName:"Dynamic Repeater",importName:"DynamicRepeater",importPath:c,props:y},v={name:"hostless-data-provider",displayName:"Data Provider",importName:"DataProvider",importPath:c,providesData:!0,props:{name:{type:"string",defaultValue:"celebrities",description:"The name of the variable to store the data in"},data:{type:"object",defaultValue:[{name:"Fill Murray",birthYear:1950,profilePicture:["https://www.fillmurray.com/200/300"]},{name:"Place Cage",birthYear:1950,profilePicture:["https://www.placecage.com/200/300"]}]},children:{type:"slot"}}},g={propSelectors:{type:"object",defaultValueHint:{},description:"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value."}},x=n({},g,{tag:{type:"string",defaultValueHint:"div",description:"The HTML tag to use"}}),b={name:"hostless-dynamic-element",displayName:"Dynamic Element",importName:"DynamicElement",importPath:c,props:n({},x,{children:"slot"})},N={name:"hostless-dynamic-text",importName:"DynamicText",displayName:"Dynamic Text",importPath:c,props:n({},x,{selector:{type:"string",description:"The selector expression to use to get the text, such as: someVariable.0.someField"}})},w={name:"hostless-dynamic-image",displayName:"Dynamic Image",importName:"DynamicImage",importPath:c,props:n({},g,{selector:{type:"string",description:"The selector expression to use to get the image source URL, such as: someVariable.0.someField"}})};function E(e){if(null==e)throw new Error("Value must not be undefined or null");return e}function D(e){var t=e.className,r=e.code,n=e.hideInEditor,i=void 0!==n&&n,l=a.useRef(null);return a.useEffect((function(){i||Array.from(E(l.current).querySelectorAll("script")).forEach((function(e){var t=document.createElement("script");Array.from(e.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),t.appendChild(document.createTextNode(e.innerHTML)),E(e.parentNode).replaceChild(t,e)}))}),[r,i]),o.createElement("div",{ref:l,className:t,dangerouslySetInnerHTML:{__html:i?"":r},style:{whiteSpace:"normal"}})}var S={name:"hostless-embed",displayName:"Embed HTML",importName:"Embed",importPath:"@plasmicpkgs/plasmic-basic-components",props:{code:{type:"code",lang:"html",defaultValueHint:"<div>Paste your embed code via the right sidebar</div>",description:"The HTML code to be embedded"},hideInEditor:{type:"boolean",displayName:"Hide in editor",description:"Disable running the code while editing in Plasmic Studio (may require reload)",editOnly:!0}},defaultStyles:{maxWidth:"100%"}};function P(e){var r=e.preview,n=e.src,i=e.className;return a.useContext(t.PlasmicCanvasContext)&&!r?o.createElement("div",{className:i},o.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"#eee",color:"#888",fontSize:"36px",fontFamily:"sans-serif",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"}},"Iframe placeholder")):o.createElement("iframe",{src:n,className:i})}var I={name:"hostless-iframe",displayName:"Iframe",importName:"Iframe",importPath:"@plasmicpkgs/plasmic-basic-components",props:{src:{type:"string",defaultValue:"https://www.example.com"},preview:{type:"boolean",description:"Load the iframe while editing in Plasmic Studio"}},defaultStyles:{width:"300px",height:"150px",maxWidth:"100%"}};function T(e){var r=e.children,a=e.items,n=e.itemName,i=e.indexName;if(!Array.isArray(a))throw new Error("Repeater received an invalid collection: not an array.");return o.createElement(o.Fragment,null,a.map((function(e,a){return o.createElement(t.DataProvider,{key:a.toString(),name:n||"currentItem",data:e},o.createElement(t.DataProvider,{name:i||"currentIndex",data:a},t.repeatedElement(a,r)))})))}var R={name:"plasmic-repeater",displayName:"Repeater",importName:"Repeater",importPath:"@plasmicpkgs/plasmic-basic-components",providesData:!0,props:{children:{type:"slot",isRepeated:!0},items:{type:"array",defaultValue:[1,2,3],displayName:"Collection",description:"Items array (JavaScript expression)."},itemName:{type:"string",defaultValue:"currentItem",defaultValueHint:"currentItem",displayName:"Item",description:"Data context key for the current item."},indexName:{type:"string",defaultValue:"currentIndex",defaultValueHint:"currentIndex",displayName:"Index",description:"Data context key for the index of the current item."}}};function C(e){var t=e.ref,r=e.scrollDownThreshold,o=void 0===r?.5:r,n=e.scrollUpThreshold,i=void 0===n?0:n,l=a.useState(!1),s=l[0],p=l[1];return a.useEffect((function(){if(t.current&&"function"==typeof IntersectionObserver){var e=new IntersectionObserver((function(e){e[0].intersectionRatio>=o?p(!0):e[0].intersectionRatio<=i&&p(!1)}),{root:null,rootMargin:"0%",threshold:[i,o]});return e.observe(t.current),function(){p(!1),e.disconnect()}}return function(){}}),[t.current,o,i]),s}function V(e){var t=e.children,r=e.className,n=e.scrollDownThreshold,i=void 0===n?.5:n,l=e.scrollUpThreshold,s=void 0===l?0:l,p=a.useRef(null),c=C({ref:p,scrollUpThreshold:s,scrollDownThreshold:i});return o.createElement("div",{className:r,ref:p},c?t:null)}var M={name:"hostless-scroll-revealer",importName:"ScrollRevealer",displayName:"Scroll Revealer",importPath:"@plasmicpkgs/plasmic-basic-components",props:{children:"slot",scrollDownThreshold:{type:"number",displayName:"Scroll down threshold",defaultValueHint:.5,description:"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)"},scrollUpThreshold:{type:"number",displayName:"Scroll up threshold",defaultValueHint:0,description:"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)"}},defaultStyles:{width:"stretch",maxWidth:"100%"}},k=o.forwardRef((function(e,t){return o.createElement("video",Object.assign({ref:t},e))})),H={name:"hostless-html-video",importName:"Video",displayName:"HTML Video",importPath:"@plasmicpkgs/plasmic-basic-components",props:{src:{type:"string",defaultValue:"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm",displayName:"Source URL",description:"URL to a video file."},autoPlay:{type:"boolean",displayName:"Auto Play",description:"Whether the video show automatically start playing when the player loads. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work."},controls:{type:"boolean",displayName:"Show Controls",description:"Whether the video player controls should be displayed",defaultValue:!0},playsInline:{type:"boolean",displayName:"Plays inline",description:"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that."},loop:{type:"boolean",displayName:"Loop",description:"Whether the video should be played again after it finishes"},muted:{type:"boolean",displayName:"Muted",description:"Whether audio should be muted"},poster:{type:"imageUrl",displayName:"Poster (placeholder) image",description:"Image to show while video is downloading"},preload:{type:"choice",options:["none","metadata","auto"],displayName:"Preload",description:"Whether to preload nothing, metadata only, or the full video"}},defaultStyles:{height:"hug",width:"640px",maxWidth:"100%"}};exports.DataProvider=function(){return t.DataProvider.apply(void 0,arguments)},exports.DynamicElement=m,exports.DynamicImage=u,exports.DynamicRepeater=h,exports.DynamicText=d,exports.Embed=D,exports.Iframe=P,exports.Repeater=T,exports.ScrollRevealer=V,exports.Video=k,exports.applySelector=function(){return console.warn("DEPRECATED: Import applySelector from @plasmicapp/host instead."),t.applySelector.apply(void 0,arguments)},exports.dataProviderMeta=v,exports.dynamicElementMeta=b,exports.dynamicImageMeta=w,exports.dynamicRepeaterMeta=f,exports.dynamicRepeaterProps=y,exports.dynamicTextMeta=N,exports.embedMeta=S,exports.iframeMeta=I,exports.registerDataProvider=function(e,a){e?e.registerComponent(t.DataProvider,null!=a?a:v):r(t.DataProvider,null!=a?a:v)},exports.registerDynamicElement=function(e,t){e?e.registerComponent(m,null!=t?t:b):r(m,null!=t?t:b)},exports.registerDynamicImage=function(e,t){e?e.registerComponent(u,null!=t?t:w):r(u,null!=t?t:w)},exports.registerDynamicRepeater=function(e,t){e?e.registerComponent(h,null!=t?t:f):r(h,null!=t?t:f)},exports.registerDynamicText=function(e,t){e?e.registerComponent(d,null!=t?t:N):r(d,null!=t?t:N)},exports.registerEmbed=function(e,t){e?e.registerComponent(D,null!=t?t:S):r(D,null!=t?t:S)},exports.registerIframe=function(e,t){e?e.registerComponent(P,null!=t?t:I):r(P,null!=t?t:I)},exports.registerRepeater=function(e,r){e?e.registerComponent(T,null!=r?r:R):t.registerComponent(T,null!=r?r:R)},exports.registerScrollRevealer=function(e,t){e?e.registerComponent(V,null!=t?t:M):r(V,null!=t?t:M)},exports.registerVideo=function(e,t){e?e.registerComponent(k,null!=t?t:H):r(k,null!=t?t:H)},exports.repeaterMeta=R,exports.scrollRevealerMeta=M,exports.useDataEnv=function(){return console.warn("DEPRECATED: Import useDataEnv from @plasmicapp/host instead."),t.useDataEnv.apply(void 0,arguments)},exports.useDirectionalIntersection=C,exports.useSelector=function(){return console.warn("DEPRECATED: Import useSelector from @plasmicapp/host instead."),t.useSelector.apply(void 0,arguments)},exports.useSelectors=function(){return console.warn("DEPRECATED: Import useSelectors from @plasmicapp/host instead."),t.useSelectors.apply(void 0,arguments)},exports.videoMeta=H;
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@plasmicapp/host"),r=e(require("@plasmicapp/host/registerComponent")),a=require("react"),o=e(a);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function i(e,t){if(null==e)return{};var r,a,o={},n=Object.keys(e);for(a=0;a<n.length;a++)t.indexOf(r=n[a])>=0||(o[r]=e[r]);return o}var l=["tag","className","children","propSelectors"],s=["selector","propSelectors"],p=["selector","propSelectors"],c="@plasmicpkgs/plasmic-basic-components";function m(e){var r=e.tag,o=void 0===r?"div":r,s=e.className,p=e.children,c=e.propSelectors,m=i(e,l),d=t.useSelectors(c);return a.createElement(o,n({children:p},m,d,{className:s+" "+d.className}))}function d(e){var t=e.selector,r=e.propSelectors,a=i(e,s);return o.createElement(m,Object.assign({},a,{propSelectors:n({},r,{children:t})}),"(DynamicText requires a selector)")}function u(e){var t=e.selector,r=e.propSelectors,a=i(e,p);return o.createElement(m,Object.assign({tag:"img",loading:"lazy",style:{objectFit:"cover"}},a,{propSelectors:n({},r,{src:t}),src:"https://studio.plasmic.app/static/img/placeholder.png"}))}function h(e){var r,a=e.children,n=e.loopItemName,i=e.keySelector,l=e.data,s=null!=(r=null!=l?l:t.useSelector(e.selector))?r:[1,2,3];return o.createElement(o.Fragment,null,null==s||null==s.map?void 0:s.map((function(e,r){var l;return o.createElement(t.DataProvider,{key:null!=(l=t.applySelector(e,i))?l:r,name:n,data:e},t.repeatedElement(r,a))})))}var y={selector:{type:"string",description:"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField"},loopItemName:{type:"string",defaultValue:"item",description:"The name of the variable to use to store the current item in the loop"},children:{type:"slot",isRepeated:!0}},f={name:"hostless-dynamic-repeater",displayName:"Dynamic Repeater",importName:"DynamicRepeater",importPath:c,props:y},v={name:"hostless-data-provider",displayName:"Data Provider",importName:"DataProvider",importPath:c,providesData:!0,props:{name:{type:"string",defaultValue:"celebrities",description:"The name of the variable to store the data in"},data:{type:"object",defaultValue:[{name:"Fill Murray",birthYear:1950,profilePicture:["https://www.fillmurray.com/200/300"]},{name:"Place Cage",birthYear:1950,profilePicture:["https://www.placecage.com/200/300"]}]},children:{type:"slot"}}},g={propSelectors:{type:"object",defaultValueHint:{},description:"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value."}},x=n({},g,{tag:{type:"string",defaultValueHint:"div",description:"The HTML tag to use"}}),b={name:"hostless-dynamic-element",displayName:"Dynamic Element",importName:"DynamicElement",importPath:c,props:n({},x,{children:"slot"})},N={name:"hostless-dynamic-text",importName:"DynamicText",displayName:"Dynamic Text",importPath:c,props:n({},x,{selector:{type:"string",description:"The selector expression to use to get the text, such as: someVariable.0.someField"}})},w={name:"hostless-dynamic-image",displayName:"Dynamic Image",importName:"DynamicImage",importPath:c,props:n({},g,{selector:{type:"string",description:"The selector expression to use to get the image source URL, such as: someVariable.0.someField"}})};function E(e){if(null==e)throw new Error("Value must not be undefined or null");return e}function D(e){var r=e.className,n=e.code,i=e.hideInEditor,l=void 0!==i&&i,s=a.useRef(null),p=t.usePlasmicCanvasContext();return a.useEffect((function(){l&&p||Array.from(E(s.current).querySelectorAll("script")).forEach((function(e){var t=document.createElement("script");Array.from(e.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),t.appendChild(document.createTextNode(e.innerHTML)),E(e.parentNode).replaceChild(t,e)}))}),[n,l]),o.createElement("div",{ref:s,className:r,dangerouslySetInnerHTML:{__html:l&&p?"":n},style:{whiteSpace:"normal"}})}var S={name:"hostless-embed",displayName:"Embed HTML",importName:"Embed",importPath:"@plasmicpkgs/plasmic-basic-components",props:{code:{type:"code",lang:"html",defaultValueHint:"<div>Paste your embed code via the right sidebar</div>",description:"The HTML code to be embedded"},hideInEditor:{type:"boolean",displayName:"Hide in editor",description:"Disable running the code while editing in Plasmic Studio (may require reload)",editOnly:!0}},defaultStyles:{maxWidth:"100%"}};function P(e){var r=e.preview,n=e.src,i=e.className;return a.useContext(t.PlasmicCanvasContext)&&!r?o.createElement("div",{className:i},o.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"#eee",color:"#888",fontSize:"36px",fontFamily:"sans-serif",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"}},"Iframe placeholder")):o.createElement("iframe",{src:n,className:i})}var I={name:"hostless-iframe",displayName:"Iframe",importName:"Iframe",importPath:"@plasmicpkgs/plasmic-basic-components",props:{src:{type:"string",defaultValue:"https://www.example.com"},preview:{type:"boolean",description:"Load the iframe while editing in Plasmic Studio"}},defaultStyles:{width:"300px",height:"150px",maxWidth:"100%"}};function T(e){var r=e.children,a=e.items,n=e.itemName,i=e.indexName;if(!Array.isArray(a))throw new Error("Repeater received an invalid collection: not an array.");return o.createElement(o.Fragment,null,a.map((function(e,a){return o.createElement(t.DataProvider,{key:a.toString(),name:n||"currentItem",data:e},o.createElement(t.DataProvider,{name:i||"currentIndex",data:a},t.repeatedElement(a,r)))})))}var R={name:"plasmic-repeater",displayName:"Repeater",importName:"Repeater",importPath:"@plasmicpkgs/plasmic-basic-components",providesData:!0,props:{children:{type:"slot",isRepeated:!0},items:{type:"array",defaultValue:[1,2,3],displayName:"Collection",description:"Items array (JavaScript expression)."},itemName:{type:"string",defaultValue:"currentItem",defaultValueHint:"currentItem",displayName:"Item",description:"Data context key for the current item."},indexName:{type:"string",defaultValue:"currentIndex",defaultValueHint:"currentIndex",displayName:"Index",description:"Data context key for the index of the current item."}}};function C(e){var t=e.ref,r=e.scrollDownThreshold,o=void 0===r?.5:r,n=e.scrollUpThreshold,i=void 0===n?0:n,l=a.useState(!1),s=l[0],p=l[1];return a.useEffect((function(){if(t.current&&"function"==typeof IntersectionObserver){var e=new IntersectionObserver((function(e){e[0].intersectionRatio>=o?p(!0):e[0].intersectionRatio<=i&&p(!1)}),{root:null,rootMargin:"0%",threshold:[i,o]});return e.observe(t.current),function(){p(!1),e.disconnect()}}return function(){}}),[t.current,o,i]),s}function V(e){var t=e.children,r=e.className,n=e.scrollDownThreshold,i=void 0===n?.5:n,l=e.scrollUpThreshold,s=void 0===l?0:l,p=a.useRef(null),c=C({ref:p,scrollUpThreshold:s,scrollDownThreshold:i});return o.createElement("div",{className:r,ref:p},c?t:null)}var M={name:"hostless-scroll-revealer",importName:"ScrollRevealer",displayName:"Scroll Revealer",importPath:"@plasmicpkgs/plasmic-basic-components",props:{children:"slot",scrollDownThreshold:{type:"number",displayName:"Scroll down threshold",defaultValueHint:.5,description:"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)"},scrollUpThreshold:{type:"number",displayName:"Scroll up threshold",defaultValueHint:0,description:"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)"}},defaultStyles:{width:"stretch",maxWidth:"100%"}},k=o.forwardRef((function(e,t){return o.createElement("video",Object.assign({ref:t},e))})),H={name:"hostless-html-video",importName:"Video",displayName:"HTML Video",importPath:"@plasmicpkgs/plasmic-basic-components",props:{src:{type:"string",defaultValue:"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm",displayName:"Source URL",description:"URL to a video file."},autoPlay:{type:"boolean",displayName:"Auto Play",description:"Whether the video show automatically start playing when the player loads. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work."},controls:{type:"boolean",displayName:"Show Controls",description:"Whether the video player controls should be displayed",defaultValue:!0},playsInline:{type:"boolean",displayName:"Plays inline",description:"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that."},loop:{type:"boolean",displayName:"Loop",description:"Whether the video should be played again after it finishes"},muted:{type:"boolean",displayName:"Muted",description:"Whether audio should be muted"},poster:{type:"imageUrl",displayName:"Poster (placeholder) image",description:"Image to show while video is downloading"},preload:{type:"choice",options:["none","metadata","auto"],displayName:"Preload",description:"Whether to preload nothing, metadata only, or the full video"}},defaultStyles:{height:"hug",width:"640px",maxWidth:"100%"}};exports.DataProvider=function(){return t.DataProvider.apply(void 0,arguments)},exports.DynamicElement=m,exports.DynamicImage=u,exports.DynamicRepeater=h,exports.DynamicText=d,exports.Embed=D,exports.Iframe=P,exports.Repeater=T,exports.ScrollRevealer=V,exports.Video=k,exports.applySelector=function(){return console.warn("DEPRECATED: Import applySelector from @plasmicapp/host instead."),t.applySelector.apply(void 0,arguments)},exports.dataProviderMeta=v,exports.dynamicElementMeta=b,exports.dynamicImageMeta=w,exports.dynamicRepeaterMeta=f,exports.dynamicRepeaterProps=y,exports.dynamicTextMeta=N,exports.embedMeta=S,exports.iframeMeta=I,exports.registerDataProvider=function(e,a){e?e.registerComponent(t.DataProvider,null!=a?a:v):r(t.DataProvider,null!=a?a:v)},exports.registerDynamicElement=function(e,t){e?e.registerComponent(m,null!=t?t:b):r(m,null!=t?t:b)},exports.registerDynamicImage=function(e,t){e?e.registerComponent(u,null!=t?t:w):r(u,null!=t?t:w)},exports.registerDynamicRepeater=function(e,t){e?e.registerComponent(h,null!=t?t:f):r(h,null!=t?t:f)},exports.registerDynamicText=function(e,t){e?e.registerComponent(d,null!=t?t:N):r(d,null!=t?t:N)},exports.registerEmbed=function(e,t){e?e.registerComponent(D,null!=t?t:S):r(D,null!=t?t:S)},exports.registerIframe=function(e,t){e?e.registerComponent(P,null!=t?t:I):r(P,null!=t?t:I)},exports.registerRepeater=function(e,r){e?e.registerComponent(T,null!=r?r:R):t.registerComponent(T,null!=r?r:R)},exports.registerScrollRevealer=function(e,t){e?e.registerComponent(V,null!=t?t:M):r(V,null!=t?t:M)},exports.registerVideo=function(e,t){e?e.registerComponent(k,null!=t?t:H):r(k,null!=t?t:H)},exports.repeaterMeta=R,exports.scrollRevealerMeta=M,exports.useDataEnv=function(){return console.warn("DEPRECATED: Import useDataEnv from @plasmicapp/host instead."),t.useDataEnv.apply(void 0,arguments)},exports.useDirectionalIntersection=C,exports.useSelector=function(){return console.warn("DEPRECATED: Import useSelector from @plasmicapp/host instead."),t.useSelector.apply(void 0,arguments)},exports.useSelectors=function(){return console.warn("DEPRECATED: Import useSelectors from @plasmicapp/host instead."),t.useSelectors.apply(void 0,arguments)},exports.videoMeta=H;
2
2
  //# sourceMappingURL=plasmic-basic-components.cjs.production.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plasmic-basic-components.cjs.production.min.js","sources":["../src/Data.tsx","../src/common.ts","../src/Embed.tsx","../src/Iframe.tsx","../src/Repeater.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx"],"sourcesContent":["import {\n applySelector as _applySelector,\n ComponentMeta,\n DataProvider as _DataProvider,\n DataProviderProps,\n repeatedElement,\n SelectorDict,\n useDataEnv as _useDataEnv,\n useSelector as _useSelector,\n useSelectors as _useSelectors,\n} from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps, createElement, ReactNode } from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const applySelector: typeof _applySelector = function (...args) {\n console.warn(\n \"DEPRECATED: Import applySelector from @plasmicapp/host instead.\"\n );\n return _applySelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelector: typeof _useSelector = function (...args) {\n console.warn(\"DEPRECATED: Import useSelector from @plasmicapp/host instead.\");\n return _useSelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelectors: typeof _useSelectors = function (...args) {\n console.warn(\n \"DEPRECATED: Import useSelectors from @plasmicapp/host instead.\"\n );\n return _useSelectors(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useDataEnv: typeof _useDataEnv = function (...args) {\n console.warn(\"DEPRECATED: Import useDataEnv from @plasmicapp/host instead.\");\n return _useDataEnv(...args);\n};\n\nexport const DataProvider: typeof _DataProvider = function (...args) {\n return _DataProvider(...args);\n};\n\nexport interface CommonDynamicProps {\n className?: string;\n tag?: string;\n propSelectors?: SelectorDict;\n}\n\nexport function DynamicElement<\n Tag extends keyof JSX.IntrinsicElements = \"div\"\n>({\n tag = \"div\",\n className,\n children,\n propSelectors,\n ...props\n}: CommonDynamicProps & ComponentProps<Tag>) {\n const computed = _useSelectors(propSelectors);\n return createElement(tag, {\n children,\n ...props,\n ...computed,\n className: className + \" \" + computed.className,\n });\n}\n\nexport interface DynamicTextProps extends CommonDynamicProps {\n selector?: string;\n}\n\nexport function DynamicText({\n selector,\n propSelectors,\n ...props\n}: DynamicTextProps) {\n return (\n <DynamicElement\n {...props}\n propSelectors={{ ...propSelectors, children: selector }}\n >\n {/*This is the default text*/}\n (DynamicText requires a selector)\n </DynamicElement>\n );\n}\n\nexport interface DynamicImageProps\n extends CommonDynamicProps,\n ComponentProps<\"img\"> {\n selector?: string;\n}\n\nexport function DynamicImage({\n selector,\n propSelectors,\n ...props\n}: DynamicImageProps) {\n return (\n <DynamicElement<\"img\">\n tag={\"img\"}\n loading={\"lazy\"}\n style={{\n objectFit: \"cover\",\n }}\n {...props}\n propSelectors={{ ...propSelectors, src: selector }}\n // Default image placeholder\n src=\"https://studio.plasmic.app/static/img/placeholder.png\"\n />\n );\n}\n\nexport interface DynamicRepeaterProps {\n children?: ReactNode;\n loopItemName?: string;\n keySelector?: string;\n selector?: string;\n data?: any;\n}\n\nexport function DynamicRepeater({\n children,\n loopItemName,\n keySelector,\n selector,\n data,\n}: DynamicRepeaterProps) {\n // Defaults to an array of three items.\n const finalData = data ?? _useSelector(selector) ?? [1, 2, 3];\n return (\n <>\n {finalData?.map?.((item: any, index: number) => (\n <_DataProvider\n key={_applySelector(item, keySelector) ?? index}\n name={loopItemName}\n data={item}\n >\n {repeatedElement(index, children)}\n </_DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n providesData: true,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n }\n}\n\nconst dynamicPropsWithoutTag = {\n propSelectors: {\n type: \"object\",\n defaultValueHint: {},\n description:\n \"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.\",\n },\n} as const;\n\nconst dynamicProps = {\n ...dynamicPropsWithoutTag,\n tag: {\n type: \"string\",\n defaultValueHint: \"div\",\n description: \"The HTML tag to use\",\n },\n} as const;\n\n// TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.\n\nexport const dynamicElementMeta: ComponentMeta<CommonDynamicProps> = {\n name: \"hostless-dynamic-element\",\n displayName: \"Dynamic Element\",\n importName: \"DynamicElement\",\n importPath: thisModule,\n props: { ...dynamicProps, children: \"slot\" },\n};\n\nexport function registerDynamicElement(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicElementMeta?: ComponentMeta<CommonDynamicProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n } else {\n registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n }\n}\n\nexport const dynamicTextMeta: ComponentMeta<DynamicTextProps> = {\n name: \"hostless-dynamic-text\",\n importName: \"DynamicText\",\n displayName: \"Dynamic Text\",\n importPath: thisModule,\n props: {\n ...dynamicProps,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the text, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicText(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicTextMeta?: ComponentMeta<DynamicTextProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicText,\n customDynamicTextMeta ?? dynamicTextMeta\n );\n } else {\n registerComponent(DynamicText, customDynamicTextMeta ?? dynamicTextMeta);\n }\n}\n\nexport const dynamicImageMeta: ComponentMeta<DynamicImageProps> = {\n name: \"hostless-dynamic-image\",\n displayName: \"Dynamic Image\",\n importName: \"DynamicImage\",\n importPath: thisModule,\n props: {\n ...dynamicPropsWithoutTag,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the image source URL, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicImage(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicImageMeta?: ComponentMeta<DynamicImageProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicImage,\n customDynamicImageMeta ?? dynamicImageMeta\n );\n } else {\n registerComponent(DynamicImage, customDynamicImageMeta ?? dynamicImageMeta);\n }\n}\n","export const tuple = <T extends any[]>(...args: T): T => args;\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, { useEffect, useRef } from \"react\";\nimport { ensure } from \"./common\";\n\nexport interface EmbedProps {\n className?: string;\n code: string;\n hideInEditor?: boolean;\n}\n\nexport default function Embed({\n className,\n code,\n hideInEditor = false,\n}: EmbedProps) {\n const rootElt = useRef<HTMLDivElement>(null);\n useEffect(() => {\n if (hideInEditor) {\n return;\n }\n Array.from(ensure(rootElt.current).querySelectorAll(\"script\")).forEach(\n (oldScript) => {\n const newScript = document.createElement(\"script\");\n Array.from(oldScript.attributes).forEach((attr) =>\n newScript.setAttribute(attr.name, attr.value)\n );\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n ensure(oldScript.parentNode).replaceChild(newScript, oldScript);\n }\n );\n }, [code, hideInEditor]);\n const effectiveCode = hideInEditor ? \"\" : code;\n return (\n <div\n ref={rootElt}\n className={className}\n dangerouslySetInnerHTML={{ __html: effectiveCode }}\n style={{ whiteSpace: \"normal\" }}\n />\n );\n}\n\nexport const embedMeta: ComponentMeta<EmbedProps> = {\n name: \"hostless-embed\",\n displayName: \"Embed HTML\",\n importName: \"Embed\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n code: {\n type: \"code\",\n lang: \"html\",\n defaultValueHint:\n \"<div>Paste your embed code via the right sidebar</div>\",\n description: \"The HTML code to be embedded\",\n },\n hideInEditor: {\n type: \"boolean\",\n displayName: \"Hide in editor\",\n description:\n \"Disable running the code while editing in Plasmic Studio (may require reload)\",\n editOnly: true,\n },\n },\n defaultStyles: {\n maxWidth: \"100%\",\n },\n};\n\nexport function registerEmbed(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedMeta?: ComponentMeta<EmbedProps>\n) {\n if (loader) {\n loader.registerComponent(Embed, customEmbedMeta ?? embedMeta);\n } else {\n registerComponent(Embed, customEmbedMeta ?? embedMeta);\n }\n}\n","import { ComponentMeta, PlasmicCanvasContext } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { useContext } from \"react\";\n\nexport interface IframeProps {\n src: string;\n preview?: boolean;\n className?: string;\n}\n\nexport default function Iframe({ preview, src, className }: IframeProps) {\n const isEditing = useContext(PlasmicCanvasContext);\n if (isEditing && !preview) {\n return (\n <div className={className}>\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: \"#eee\",\n color: \"#888\",\n fontSize: \"36px\",\n fontFamily: \"sans-serif\",\n fontWeight: \"bold\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n }}\n >\n Iframe placeholder\n </div>\n </div>\n );\n }\n return <iframe src={src} className={className} />;\n}\n\nexport const iframeMeta: ComponentMeta<IframeProps> = {\n name: \"hostless-iframe\",\n displayName: \"Iframe\",\n importName: \"Iframe\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue: \"https://www.example.com\",\n },\n preview: {\n type: \"boolean\",\n description: \"Load the iframe while editing in Plasmic Studio\",\n },\n },\n defaultStyles: {\n width: \"300px\",\n height: \"150px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerIframe(\n loader?: { registerComponent: typeof registerComponent },\n customIframeMeta?: ComponentMeta<IframeProps>\n) {\n if (loader) {\n loader.registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n } else {\n registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n }\n}\n","import {\n ComponentMeta,\n DataProvider,\n registerComponent,\n repeatedElement,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nconst defaultItemName = \"currentItem\";\nconst defaultIndexName = \"currentIndex\";\n\ninterface RepeaterProps<T> {\n children: React.ReactNode;\n items: T[];\n itemName?: string;\n indexName?: string;\n}\n\nfunction Repeater<T>(props: RepeaterProps<T>) {\n const { children, items, itemName, indexName } = props;\n\n if (!Array.isArray(items)) {\n throw new Error(\"Repeater received an invalid collection: not an array.\");\n }\n\n return (\n <>\n {items.map((item, index) => (\n <DataProvider\n key={index.toString()}\n name={itemName || defaultItemName}\n data={item}\n >\n <DataProvider name={indexName || defaultIndexName} data={index}>\n {repeatedElement(index, children)}\n </DataProvider>\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const repeaterMeta: ComponentMeta<RepeaterProps<any>> = {\n name: `plasmic-repeater`,\n displayName: \"Repeater\",\n importName: \"Repeater\",\n importPath: thisModule,\n providesData: true,\n props: {\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n items: {\n type: \"array\",\n defaultValue: [1, 2, 3],\n displayName: \"Collection\",\n description: \"Items array (JavaScript expression).\",\n },\n itemName: {\n type: \"string\",\n defaultValue: defaultItemName,\n defaultValueHint: defaultItemName,\n displayName: \"Item\",\n description: \"Data context key for the current item.\",\n },\n indexName: {\n type: \"string\",\n defaultValue: defaultIndexName,\n defaultValueHint: defaultIndexName,\n displayName: \"Index\",\n description: \"Data context key for the index of the current item.\",\n },\n },\n};\n\nexport function registerRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customRepeaterMeta?: ComponentMeta<RepeaterProps<any>>\n) {\n if (loader) {\n loader.registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n } else {\n registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n }\n}\n\nexport default Repeater;\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work.\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n defaultValue: true,\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n"],"names":["thisModule","DynamicElement","tag","className","children","propSelectors","props","computed","_useSelectors","createElement","DynamicText","selector","React","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","data","finalData","_useSelector","map","item","index","_DataProvider","key","_applySelector","name","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","isRepeated","dynamicRepeaterMeta","displayName","importName","importPath","dataProviderMeta","providesData","birthYear","profilePicture","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","dynamicTextMeta","dynamicImageMeta","ensure","x","Error","Embed","code","_ref$hideInEditor","hideInEditor","rootElt","useRef","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","value","appendChild","createTextNode","innerHTML","parentNode","replaceChild","ref","dangerouslySetInnerHTML","__html","whiteSpace","embedMeta","lang","editOnly","defaultStyles","maxWidth","Iframe","preview","useContext","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","Repeater","items","itemName","indexName","isArray","DataProvider","toString","repeaterMeta","useDirectionalIntersection","_ref$scrollDownThresh","scrollDownThreshold","_ref$scrollUpThreshol","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","observer","entries","intersectionRatio","root","rootMargin","threshold","observe","disconnect","ScrollRevealer","_ref2$scrollDownThres","_ref2$scrollUpThresho","intersectionRef","scrollRevealerMeta","Video","forwardRef","videoMeta","autoPlay","controls","playsInline","loop","muted","poster","preload","options","console","warn","loader","customDataProviderMeta","registerComponent","customDynamicElementMeta","customDynamicImageMeta","customDynamicRepeaterMeta","customDynamicTextMeta","customEmbedMeta","customIframeMeta","customRepeaterMeta","customScrollRevealerMeta","customVideoMeta","_useDataEnv"],"mappings":"mtBAcMA,EAAa,iDAgDHC,aAGdC,IAAAA,aAAM,QACNC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,cACGC,SAEGC,EAAWC,eAAcH,GAC/B,OAAOI,gBAAcP,KACnBE,SAAAA,GACGE,EACAC,GACHJ,UAAWA,EAAY,IAAMI,EAASJ,sBAQ1BO,SACdC,IAAAA,SACAN,IAAAA,cACGC,SAEH,OACEM,gBAACX,mBACKK,GACJD,mBAAoBA,GAAeD,SAAUO,oDAcnCE,SACdF,IAAAA,SACAN,IAAAA,cACGC,SAEH,OACEM,gBAACX,iBACCC,IAAK,MACLY,QAAS,OACTC,MAAO,CACLC,UAAW,UAETV,GACJD,mBAAoBA,GAAeY,IAAKN,IAExCM,IAAI,oEAaMC,WACdd,IAAAA,SACAe,IAAAA,aACAC,IAAAA,YAEAC,IAAAA,KAGMC,iBAAYD,EAAAA,EAAQE,gBAJ1BZ,aAIoD,CAAC,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AAOE,kBAAkB7C,QAAUoD,EAAAA,EAAsB7C,GAEzDsC,oBAAkB7C,QAAUoD,EAAAA,EAAsB7C,4CC0BpDoC,EACAU,GAEIV,EACFA,EAAOE,kBACLpB,QACA4B,EAAAA,EAA4BxB,GAG9BgB,EACEpB,QACA4B,EAAAA,EAA4BxB,mCCnChCc,EACAW,GAEIX,EACFA,EAAOE,kBAAkBf,QAAOwB,EAAAA,EAAmBtB,GAEnDa,EAAkBf,QAAOwB,EAAAA,EAAmBtB,2EN9CF,WAE5C,OADAS,QAAQC,KAAK,gEACNa,+FApBuC,WAE9C,OADAd,QAAQC,KAAK,iEACN/H,4DAMyC,WAIhD,OAHA8H,QAAQC,KACN,kEAEK9I"}
1
+ {"version":3,"file":"plasmic-basic-components.cjs.production.min.js","sources":["../src/Data.tsx","../src/common.ts","../src/Embed.tsx","../src/Iframe.tsx","../src/Repeater.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx"],"sourcesContent":["import {\n applySelector as _applySelector,\n ComponentMeta,\n DataProvider as _DataProvider,\n DataProviderProps,\n repeatedElement,\n SelectorDict,\n useDataEnv as _useDataEnv,\n useSelector as _useSelector,\n useSelectors as _useSelectors,\n} from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps, createElement, ReactNode } from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const applySelector: typeof _applySelector = function (...args) {\n console.warn(\n \"DEPRECATED: Import applySelector from @plasmicapp/host instead.\"\n );\n return _applySelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelector: typeof _useSelector = function (...args) {\n console.warn(\"DEPRECATED: Import useSelector from @plasmicapp/host instead.\");\n return _useSelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelectors: typeof _useSelectors = function (...args) {\n console.warn(\n \"DEPRECATED: Import useSelectors from @plasmicapp/host instead.\"\n );\n return _useSelectors(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useDataEnv: typeof _useDataEnv = function (...args) {\n console.warn(\"DEPRECATED: Import useDataEnv from @plasmicapp/host instead.\");\n return _useDataEnv(...args);\n};\n\nexport const DataProvider: typeof _DataProvider = function (...args) {\n return _DataProvider(...args);\n};\n\nexport interface CommonDynamicProps {\n className?: string;\n tag?: string;\n propSelectors?: SelectorDict;\n}\n\nexport function DynamicElement<\n Tag extends keyof JSX.IntrinsicElements = \"div\"\n>({\n tag = \"div\",\n className,\n children,\n propSelectors,\n ...props\n}: CommonDynamicProps & ComponentProps<Tag>) {\n const computed = _useSelectors(propSelectors);\n return createElement(tag, {\n children,\n ...props,\n ...computed,\n className: className + \" \" + computed.className,\n });\n}\n\nexport interface DynamicTextProps extends CommonDynamicProps {\n selector?: string;\n}\n\nexport function DynamicText({\n selector,\n propSelectors,\n ...props\n}: DynamicTextProps) {\n return (\n <DynamicElement\n {...props}\n propSelectors={{ ...propSelectors, children: selector }}\n >\n {/*This is the default text*/}\n (DynamicText requires a selector)\n </DynamicElement>\n );\n}\n\nexport interface DynamicImageProps\n extends CommonDynamicProps,\n ComponentProps<\"img\"> {\n selector?: string;\n}\n\nexport function DynamicImage({\n selector,\n propSelectors,\n ...props\n}: DynamicImageProps) {\n return (\n <DynamicElement<\"img\">\n tag={\"img\"}\n loading={\"lazy\"}\n style={{\n objectFit: \"cover\",\n }}\n {...props}\n propSelectors={{ ...propSelectors, src: selector }}\n // Default image placeholder\n src=\"https://studio.plasmic.app/static/img/placeholder.png\"\n />\n );\n}\n\nexport interface DynamicRepeaterProps {\n children?: ReactNode;\n loopItemName?: string;\n keySelector?: string;\n selector?: string;\n data?: any;\n}\n\nexport function DynamicRepeater({\n children,\n loopItemName,\n keySelector,\n selector,\n data,\n}: DynamicRepeaterProps) {\n // Defaults to an array of three items.\n const finalData = data ?? _useSelector(selector) ?? [1, 2, 3];\n return (\n <>\n {finalData?.map?.((item: any, index: number) => (\n <_DataProvider\n key={_applySelector(item, keySelector) ?? index}\n name={loopItemName}\n data={item}\n >\n {repeatedElement(index, children)}\n </_DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n providesData: true,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n }\n}\n\nconst dynamicPropsWithoutTag = {\n propSelectors: {\n type: \"object\",\n defaultValueHint: {},\n description:\n \"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.\",\n },\n} as const;\n\nconst dynamicProps = {\n ...dynamicPropsWithoutTag,\n tag: {\n type: \"string\",\n defaultValueHint: \"div\",\n description: \"The HTML tag to use\",\n },\n} as const;\n\n// TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.\n\nexport const dynamicElementMeta: ComponentMeta<CommonDynamicProps> = {\n name: \"hostless-dynamic-element\",\n displayName: \"Dynamic Element\",\n importName: \"DynamicElement\",\n importPath: thisModule,\n props: { ...dynamicProps, children: \"slot\" },\n};\n\nexport function registerDynamicElement(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicElementMeta?: ComponentMeta<CommonDynamicProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n } else {\n registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n }\n}\n\nexport const dynamicTextMeta: ComponentMeta<DynamicTextProps> = {\n name: \"hostless-dynamic-text\",\n importName: \"DynamicText\",\n displayName: \"Dynamic Text\",\n importPath: thisModule,\n props: {\n ...dynamicProps,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the text, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicText(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicTextMeta?: ComponentMeta<DynamicTextProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicText,\n customDynamicTextMeta ?? dynamicTextMeta\n );\n } else {\n registerComponent(DynamicText, customDynamicTextMeta ?? dynamicTextMeta);\n }\n}\n\nexport const dynamicImageMeta: ComponentMeta<DynamicImageProps> = {\n name: \"hostless-dynamic-image\",\n displayName: \"Dynamic Image\",\n importName: \"DynamicImage\",\n importPath: thisModule,\n props: {\n ...dynamicPropsWithoutTag,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the image source URL, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicImage(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicImageMeta?: ComponentMeta<DynamicImageProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicImage,\n customDynamicImageMeta ?? dynamicImageMeta\n );\n } else {\n registerComponent(DynamicImage, customDynamicImageMeta ?? dynamicImageMeta);\n }\n}\n","export const tuple = <T extends any[]>(...args: T): T => args;\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n","import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport 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 const inEditor = usePlasmicCanvasContext();\n useEffect(() => {\n if (hideInEditor && inEditor) {\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 && inEditor ? \"\" : code;\n return (\n <div\n ref={rootElt}\n className={className}\n dangerouslySetInnerHTML={{ __html: effectiveCode }}\n style={{ whiteSpace: \"normal\" }}\n />\n );\n}\n\nexport const embedMeta: ComponentMeta<EmbedProps> = {\n name: \"hostless-embed\",\n displayName: \"Embed HTML\",\n importName: \"Embed\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n code: {\n type: \"code\",\n lang: \"html\",\n defaultValueHint:\n \"<div>Paste your embed code via the right sidebar</div>\",\n description: \"The HTML code to be embedded\",\n },\n hideInEditor: {\n type: \"boolean\",\n displayName: \"Hide in editor\",\n description:\n \"Disable running the code while editing in Plasmic Studio (may require reload)\",\n editOnly: true,\n },\n },\n defaultStyles: {\n maxWidth: \"100%\",\n },\n};\n\nexport function registerEmbed(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedMeta?: ComponentMeta<EmbedProps>\n) {\n if (loader) {\n loader.registerComponent(Embed, customEmbedMeta ?? embedMeta);\n } else {\n registerComponent(Embed, customEmbedMeta ?? embedMeta);\n }\n}\n","import { ComponentMeta, PlasmicCanvasContext } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { useContext } from \"react\";\n\nexport interface IframeProps {\n src: string;\n preview?: boolean;\n className?: string;\n}\n\nexport default function Iframe({ preview, src, className }: IframeProps) {\n const isEditing = useContext(PlasmicCanvasContext);\n if (isEditing && !preview) {\n return (\n <div className={className}>\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: \"#eee\",\n color: \"#888\",\n fontSize: \"36px\",\n fontFamily: \"sans-serif\",\n fontWeight: \"bold\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n }}\n >\n Iframe placeholder\n </div>\n </div>\n );\n }\n return <iframe src={src} className={className} />;\n}\n\nexport const iframeMeta: ComponentMeta<IframeProps> = {\n name: \"hostless-iframe\",\n displayName: \"Iframe\",\n importName: \"Iframe\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue: \"https://www.example.com\",\n },\n preview: {\n type: \"boolean\",\n description: \"Load the iframe while editing in Plasmic Studio\",\n },\n },\n defaultStyles: {\n width: \"300px\",\n height: \"150px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerIframe(\n loader?: { registerComponent: typeof registerComponent },\n customIframeMeta?: ComponentMeta<IframeProps>\n) {\n if (loader) {\n loader.registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n } else {\n registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n }\n}\n","import {\n ComponentMeta,\n DataProvider,\n registerComponent,\n repeatedElement,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nconst defaultItemName = \"currentItem\";\nconst defaultIndexName = \"currentIndex\";\n\ninterface RepeaterProps<T> {\n children: React.ReactNode;\n items: T[];\n itemName?: string;\n indexName?: string;\n}\n\nfunction Repeater<T>(props: RepeaterProps<T>) {\n const { children, items, itemName, indexName } = props;\n\n if (!Array.isArray(items)) {\n throw new Error(\"Repeater received an invalid collection: not an array.\");\n }\n\n return (\n <>\n {items.map((item, index) => (\n <DataProvider\n key={index.toString()}\n name={itemName || defaultItemName}\n data={item}\n >\n <DataProvider name={indexName || defaultIndexName} data={index}>\n {repeatedElement(index, children)}\n </DataProvider>\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const repeaterMeta: ComponentMeta<RepeaterProps<any>> = {\n name: `plasmic-repeater`,\n displayName: \"Repeater\",\n importName: \"Repeater\",\n importPath: thisModule,\n providesData: true,\n props: {\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n items: {\n type: \"array\",\n defaultValue: [1, 2, 3],\n displayName: \"Collection\",\n description: \"Items array (JavaScript expression).\",\n },\n itemName: {\n type: \"string\",\n defaultValue: defaultItemName,\n defaultValueHint: defaultItemName,\n displayName: \"Item\",\n description: \"Data context key for the current item.\",\n },\n indexName: {\n type: \"string\",\n defaultValue: defaultIndexName,\n defaultValueHint: defaultIndexName,\n displayName: \"Index\",\n description: \"Data context key for the index of the current item.\",\n },\n },\n};\n\nexport function registerRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customRepeaterMeta?: ComponentMeta<RepeaterProps<any>>\n) {\n if (loader) {\n loader.registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n } else {\n registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n }\n}\n\nexport default Repeater;\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work.\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n defaultValue: true,\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n"],"names":["thisModule","DynamicElement","tag","className","children","propSelectors","props","computed","_useSelectors","createElement","DynamicText","selector","React","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","data","finalData","_useSelector","map","item","index","_DataProvider","key","_applySelector","name","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","isRepeated","dynamicRepeaterMeta","displayName","importName","importPath","dataProviderMeta","providesData","birthYear","profilePicture","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","dynamicTextMeta","dynamicImageMeta","ensure","x","Error","Embed","code","_ref$hideInEditor","hideInEditor","rootElt","useRef","inEditor","usePlasmicCanvasContext","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","value","appendChild","createTextNode","innerHTML","parentNode","replaceChild","ref","dangerouslySetInnerHTML","__html","whiteSpace","embedMeta","lang","editOnly","defaultStyles","maxWidth","Iframe","preview","useContext","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","Repeater","items","itemName","indexName","isArray","DataProvider","toString","repeaterMeta","useDirectionalIntersection","_ref$scrollDownThresh","scrollDownThreshold","_ref$scrollUpThreshol","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","observer","entries","intersectionRatio","root","rootMargin","threshold","observe","disconnect","ScrollRevealer","_ref2$scrollDownThres","_ref2$scrollUpThresho","intersectionRef","scrollRevealerMeta","Video","forwardRef","videoMeta","autoPlay","controls","playsInline","loop","muted","poster","preload","options","console","warn","loader","customDataProviderMeta","registerComponent","customDynamicElementMeta","customDynamicImageMeta","customDynamicRepeaterMeta","customDynamicTextMeta","customEmbedMeta","customIframeMeta","customRepeaterMeta","customScrollRevealerMeta","customVideoMeta","_useDataEnv"],"mappings":"mtBAcMA,EAAa,iDAgDHC,aAGdC,IAAAA,aAAM,QACNC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,cACGC,SAEGC,EAAWC,eAAcH,GAC/B,OAAOI,gBAAcP,KACnBE,SAAAA,GACGE,EACAC,GACHJ,UAAWA,EAAY,IAAMI,EAASJ,sBAQ1BO,SACdC,IAAAA,SACAN,IAAAA,cACGC,SAEH,OACEM,gBAACX,mBACKK,GACJD,mBAAoBA,GAAeD,SAAUO,oDAcnC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EAAkBjJ,QAAaqJ,EAAAA,EAAyB9G,mCEzP1DwG,EACAO,GAEIP,EACFA,EAAOE,kBAAkBrG,QAAO0G,EAAAA,EAAmB5E,GAEnDuE,EAAkBrG,QAAO0G,EAAAA,EAAmB5E,oCCf9CqE,EACAQ,GAEIR,EACFA,EAAOE,kBAAkBlE,QAAQwE,EAAAA,EAAoBtD,GAErDgD,EAAkBlE,QAAQwE,EAAAA,EAAoBtD,sCCShD8C,EACAS,GAEIT,EACFA,EAAOE,kBAAkB7C,QAAUoD,EAAAA,EAAsB7C,GAEzDsC,oBAAkB7C,QAAUoD,EAAAA,EAAsB7C,4CC0BpDoC,EACAU,GAEIV,EACFA,EAAOE,kBACLpB,QACA4B,EAAAA,EAA4BxB,GAG9BgB,EACEpB,QACA4B,EAAAA,EAA4BxB,mCCnChCc,EACAW,GAEIX,EACFA,EAAOE,kBAAkBf,QAAOwB,EAAAA,EAAmBtB,GAEnDa,EAAkBf,QAAOwB,EAAAA,EAAmBtB,2EN9CF,WAE5C,OADAS,QAAQC,KAAK,gEACNa,+FApBuC,WAE9C,OADAd,QAAQC,KAAK,iEACNjI,4DAMyC,WAIhD,OAHAgI,QAAQC,KACN,kEAEKhJ"}
@@ -1,4 +1,4 @@
1
- import { applySelector as applySelector$1, useSelector as useSelector$1, useSelectors as useSelectors$1, useDataEnv as useDataEnv$1, DataProvider as DataProvider$1, repeatedElement, PlasmicCanvasContext, registerComponent as registerComponent$1 } from '@plasmicapp/host';
1
+ import { applySelector as applySelector$1, useSelector as useSelector$1, useSelectors as useSelectors$1, useDataEnv as useDataEnv$1, DataProvider as DataProvider$1, repeatedElement, usePlasmicCanvasContext, PlasmicCanvasContext, registerComponent as registerComponent$1 } from '@plasmicapp/host';
2
2
  import registerComponent from '@plasmicapp/host/registerComponent';
3
3
  import React, { createElement, useRef, useEffect, useContext, useState } from 'react';
4
4
 
@@ -275,8 +275,9 @@ function Embed(_ref) {
275
275
  _ref$hideInEditor = _ref.hideInEditor,
276
276
  hideInEditor = _ref$hideInEditor === void 0 ? false : _ref$hideInEditor;
277
277
  var rootElt = useRef(null);
278
+ var inEditor = usePlasmicCanvasContext();
278
279
  useEffect(function () {
279
- if (hideInEditor) {
280
+ if (hideInEditor && inEditor) {
280
281
  return;
281
282
  }
282
283
  Array.from(ensure(rootElt.current).querySelectorAll("script")).forEach(function (oldScript) {
@@ -288,7 +289,7 @@ function Embed(_ref) {
288
289
  ensure(oldScript.parentNode).replaceChild(newScript, oldScript);
289
290
  });
290
291
  }, [code, hideInEditor]);
291
- var effectiveCode = hideInEditor ? "" : code;
292
+ var effectiveCode = hideInEditor && inEditor ? "" : code;
292
293
  return React.createElement("div", {
293
294
  ref: rootElt,
294
295
  className: className,
@@ -1 +1 @@
1
- {"version":3,"file":"plasmic-basic-components.esm.js","sources":["../src/Data.tsx","../src/common.ts","../src/Embed.tsx","../src/Iframe.tsx","../src/Repeater.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx"],"sourcesContent":["import {\n applySelector as _applySelector,\n ComponentMeta,\n DataProvider as _DataProvider,\n DataProviderProps,\n repeatedElement,\n SelectorDict,\n useDataEnv as _useDataEnv,\n useSelector as _useSelector,\n useSelectors as _useSelectors,\n} from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps, createElement, ReactNode } from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const applySelector: typeof _applySelector = function (...args) {\n console.warn(\n \"DEPRECATED: Import applySelector from @plasmicapp/host instead.\"\n );\n return _applySelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelector: typeof _useSelector = function (...args) {\n console.warn(\"DEPRECATED: Import useSelector from @plasmicapp/host instead.\");\n return _useSelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelectors: typeof _useSelectors = function (...args) {\n console.warn(\n \"DEPRECATED: Import useSelectors from @plasmicapp/host instead.\"\n );\n return _useSelectors(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useDataEnv: typeof _useDataEnv = function (...args) {\n console.warn(\"DEPRECATED: Import useDataEnv from @plasmicapp/host instead.\");\n return _useDataEnv(...args);\n};\n\nexport const DataProvider: typeof _DataProvider = function (...args) {\n return _DataProvider(...args);\n};\n\nexport interface CommonDynamicProps {\n className?: string;\n tag?: string;\n propSelectors?: SelectorDict;\n}\n\nexport function DynamicElement<\n Tag extends keyof JSX.IntrinsicElements = \"div\"\n>({\n tag = \"div\",\n className,\n children,\n propSelectors,\n ...props\n}: CommonDynamicProps & ComponentProps<Tag>) {\n const computed = _useSelectors(propSelectors);\n return createElement(tag, {\n children,\n ...props,\n ...computed,\n className: className + \" \" + computed.className,\n });\n}\n\nexport interface DynamicTextProps extends CommonDynamicProps {\n selector?: string;\n}\n\nexport function DynamicText({\n selector,\n propSelectors,\n ...props\n}: DynamicTextProps) {\n return (\n <DynamicElement\n {...props}\n propSelectors={{ ...propSelectors, children: selector }}\n >\n {/*This is the default text*/}\n (DynamicText requires a selector)\n </DynamicElement>\n );\n}\n\nexport interface DynamicImageProps\n extends CommonDynamicProps,\n ComponentProps<\"img\"> {\n selector?: string;\n}\n\nexport function DynamicImage({\n selector,\n propSelectors,\n ...props\n}: DynamicImageProps) {\n return (\n <DynamicElement<\"img\">\n tag={\"img\"}\n loading={\"lazy\"}\n style={{\n objectFit: \"cover\",\n }}\n {...props}\n propSelectors={{ ...propSelectors, src: selector }}\n // Default image placeholder\n src=\"https://studio.plasmic.app/static/img/placeholder.png\"\n />\n );\n}\n\nexport interface DynamicRepeaterProps {\n children?: ReactNode;\n loopItemName?: string;\n keySelector?: string;\n selector?: string;\n data?: any;\n}\n\nexport function DynamicRepeater({\n children,\n loopItemName,\n keySelector,\n selector,\n data,\n}: DynamicRepeaterProps) {\n // Defaults to an array of three items.\n const finalData = data ?? _useSelector(selector) ?? [1, 2, 3];\n return (\n <>\n {finalData?.map?.((item: any, index: number) => (\n <_DataProvider\n key={_applySelector(item, keySelector) ?? index}\n name={loopItemName}\n data={item}\n >\n {repeatedElement(index, children)}\n </_DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n providesData: true,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n }\n}\n\nconst dynamicPropsWithoutTag = {\n propSelectors: {\n type: \"object\",\n defaultValueHint: {},\n description:\n \"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.\",\n },\n} as const;\n\nconst dynamicProps = {\n ...dynamicPropsWithoutTag,\n tag: {\n type: \"string\",\n defaultValueHint: \"div\",\n description: \"The HTML tag to use\",\n },\n} as const;\n\n// TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.\n\nexport const dynamicElementMeta: ComponentMeta<CommonDynamicProps> = {\n name: \"hostless-dynamic-element\",\n displayName: \"Dynamic Element\",\n importName: \"DynamicElement\",\n importPath: thisModule,\n props: { ...dynamicProps, children: \"slot\" },\n};\n\nexport function registerDynamicElement(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicElementMeta?: ComponentMeta<CommonDynamicProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n } else {\n registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n }\n}\n\nexport const dynamicTextMeta: ComponentMeta<DynamicTextProps> = {\n name: \"hostless-dynamic-text\",\n importName: \"DynamicText\",\n displayName: \"Dynamic Text\",\n importPath: thisModule,\n props: {\n ...dynamicProps,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the text, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicText(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicTextMeta?: ComponentMeta<DynamicTextProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicText,\n customDynamicTextMeta ?? dynamicTextMeta\n );\n } else {\n registerComponent(DynamicText, customDynamicTextMeta ?? dynamicTextMeta);\n }\n}\n\nexport const dynamicImageMeta: ComponentMeta<DynamicImageProps> = {\n name: \"hostless-dynamic-image\",\n displayName: \"Dynamic Image\",\n importName: \"DynamicImage\",\n importPath: thisModule,\n props: {\n ...dynamicPropsWithoutTag,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the image source URL, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicImage(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicImageMeta?: ComponentMeta<DynamicImageProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicImage,\n customDynamicImageMeta ?? dynamicImageMeta\n );\n } else {\n registerComponent(DynamicImage, customDynamicImageMeta ?? dynamicImageMeta);\n }\n}\n","export const tuple = <T extends any[]>(...args: T): T => args;\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, { useEffect, useRef } from \"react\";\nimport { ensure } from \"./common\";\n\nexport interface EmbedProps {\n className?: string;\n code: string;\n hideInEditor?: boolean;\n}\n\nexport default function Embed({\n className,\n code,\n hideInEditor = false,\n}: EmbedProps) {\n const rootElt = useRef<HTMLDivElement>(null);\n useEffect(() => {\n if (hideInEditor) {\n return;\n }\n Array.from(ensure(rootElt.current).querySelectorAll(\"script\")).forEach(\n (oldScript) => {\n const newScript = document.createElement(\"script\");\n Array.from(oldScript.attributes).forEach((attr) =>\n newScript.setAttribute(attr.name, attr.value)\n );\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n ensure(oldScript.parentNode).replaceChild(newScript, oldScript);\n }\n );\n }, [code, hideInEditor]);\n const effectiveCode = hideInEditor ? \"\" : code;\n return (\n <div\n ref={rootElt}\n className={className}\n dangerouslySetInnerHTML={{ __html: effectiveCode }}\n style={{ whiteSpace: \"normal\" }}\n />\n );\n}\n\nexport const embedMeta: ComponentMeta<EmbedProps> = {\n name: \"hostless-embed\",\n displayName: \"Embed HTML\",\n importName: \"Embed\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n code: {\n type: \"code\",\n lang: \"html\",\n defaultValueHint:\n \"<div>Paste your embed code via the right sidebar</div>\",\n description: \"The HTML code to be embedded\",\n },\n hideInEditor: {\n type: \"boolean\",\n displayName: \"Hide in editor\",\n description:\n \"Disable running the code while editing in Plasmic Studio (may require reload)\",\n editOnly: true,\n },\n },\n defaultStyles: {\n maxWidth: \"100%\",\n },\n};\n\nexport function registerEmbed(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedMeta?: ComponentMeta<EmbedProps>\n) {\n if (loader) {\n loader.registerComponent(Embed, customEmbedMeta ?? embedMeta);\n } else {\n registerComponent(Embed, customEmbedMeta ?? embedMeta);\n }\n}\n","import { ComponentMeta, PlasmicCanvasContext } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { useContext } from \"react\";\n\nexport interface IframeProps {\n src: string;\n preview?: boolean;\n className?: string;\n}\n\nexport default function Iframe({ preview, src, className }: IframeProps) {\n const isEditing = useContext(PlasmicCanvasContext);\n if (isEditing && !preview) {\n return (\n <div className={className}>\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: \"#eee\",\n color: \"#888\",\n fontSize: \"36px\",\n fontFamily: \"sans-serif\",\n fontWeight: \"bold\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n }}\n >\n Iframe placeholder\n </div>\n </div>\n );\n }\n return <iframe src={src} className={className} />;\n}\n\nexport const iframeMeta: ComponentMeta<IframeProps> = {\n name: \"hostless-iframe\",\n displayName: \"Iframe\",\n importName: \"Iframe\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue: \"https://www.example.com\",\n },\n preview: {\n type: \"boolean\",\n description: \"Load the iframe while editing in Plasmic Studio\",\n },\n },\n defaultStyles: {\n width: \"300px\",\n height: \"150px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerIframe(\n loader?: { registerComponent: typeof registerComponent },\n customIframeMeta?: ComponentMeta<IframeProps>\n) {\n if (loader) {\n loader.registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n } else {\n registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n }\n}\n","import {\n ComponentMeta,\n DataProvider,\n registerComponent,\n repeatedElement,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nconst defaultItemName = \"currentItem\";\nconst defaultIndexName = \"currentIndex\";\n\ninterface RepeaterProps<T> {\n children: React.ReactNode;\n items: T[];\n itemName?: string;\n indexName?: string;\n}\n\nfunction Repeater<T>(props: RepeaterProps<T>) {\n const { children, items, itemName, indexName } = props;\n\n if (!Array.isArray(items)) {\n throw new Error(\"Repeater received an invalid collection: not an array.\");\n }\n\n return (\n <>\n {items.map((item, index) => (\n <DataProvider\n key={index.toString()}\n name={itemName || defaultItemName}\n data={item}\n >\n <DataProvider name={indexName || defaultIndexName} data={index}>\n {repeatedElement(index, children)}\n </DataProvider>\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const repeaterMeta: ComponentMeta<RepeaterProps<any>> = {\n name: `plasmic-repeater`,\n displayName: \"Repeater\",\n importName: \"Repeater\",\n importPath: thisModule,\n providesData: true,\n props: {\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n items: {\n type: \"array\",\n defaultValue: [1, 2, 3],\n displayName: \"Collection\",\n description: \"Items array (JavaScript expression).\",\n },\n itemName: {\n type: \"string\",\n defaultValue: defaultItemName,\n defaultValueHint: defaultItemName,\n displayName: \"Item\",\n description: \"Data context key for the current item.\",\n },\n indexName: {\n type: \"string\",\n defaultValue: defaultIndexName,\n defaultValueHint: defaultIndexName,\n displayName: \"Index\",\n description: \"Data context key for the index of the current item.\",\n },\n },\n};\n\nexport function registerRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customRepeaterMeta?: ComponentMeta<RepeaterProps<any>>\n) {\n if (loader) {\n loader.registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n } else {\n registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n }\n}\n\nexport default Repeater;\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work.\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n defaultValue: true,\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n"],"names":["thisModule","applySelector","console","warn","_applySelector","useSelector","_useSelector","useSelectors","_useSelectors","useDataEnv","_useDataEnv","DataProvider","_DataProvider","DynamicElement","tag","className","children","propSelectors","props","computed","createElement","DynamicText","selector","React","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","data","finalData","map","item","index","key","name","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","isRepeated","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","providesData","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","ensure","x","undefined","Error","Embed","code","hideInEditor","rootElt","useRef","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","value","appendChild","createTextNode","innerHTML","parentNode","replaceChild","effectiveCode","ref","dangerouslySetInnerHTML","__html","whiteSpace","embedMeta","lang","editOnly","defaultStyles","maxWidth","registerEmbed","customEmbedMeta","Iframe","preview","isEditing","useContext","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","registerIframe","customIframeMeta","defaultItemName","defaultIndexName","Repeater","items","itemName","indexName","isArray","toString","repeaterMeta","registerRepeater","customRepeaterMeta","useDirectionalIntersection","scrollDownThreshold","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","handler","entries","intersectionRatio","observer","root","rootMargin","threshold","observe","disconnect","ScrollRevealer","intersectionRef","scrollRevealerMeta","registerScrollRevealer","customScrollRevealerMeta","Video","forwardRef","videoMeta","autoPlay","controls","playsInline","loop","muted","poster","preload","options","registerVideo","customVideoMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,UAAU,GAAG,uCAAuC;AAE1D;;;IAGaC,aAAa,GAA0B,SAAvCA,aAAa;EACxBC,OAAO,CAACC,IAAI,CACV,iEAAiE,CAClE;EACD,OAAOC,eAAc,yBAAS;AAChC;AAEA;;;IAGaC,WAAW,GAAwB,SAAnCA,WAAW;EACtBH,OAAO,CAACC,IAAI,CAAC,+DAA+D,CAAC;EAC7E,OAAOG,aAAY,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IACDqI,OAAO,EAAE;MACPtI,IAAI,EAAE,QAAQ;MACduI,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC;MACrClI,WAAW,EAAE,SAAS;MACtBJ,WAAW,EACT;;GAEL;EACDgE,aAAa,EAAE;IACbyB,MAAM,EAAE,KAAK;IACbD,KAAK,EAAE,OAAO;IACdvB,QAAQ,EAAE;;CAEb;AAED,SAAgBsE,aAAa,CAC3B/H,MAAwD,EACxDgI,eAA2C;EAE3C,IAAIhI,MAAM,EAAE;IACVA,MAAM,CAACE,iBAAiB,CAACkH,KAAK,EAAEY,eAAe,WAAfA,eAAe,GAAIV,SAAS,CAAC;GAC9D,MAAM;IACLpH,iBAAiB,CAACkH,KAAK,EAAEY,eAAe,WAAfA,eAAe,GAAIV,SAAS,CAAC;;AAE1D;;;;"}
1
+ {"version":3,"file":"plasmic-basic-components.esm.js","sources":["../src/Data.tsx","../src/common.ts","../src/Embed.tsx","../src/Iframe.tsx","../src/Repeater.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx"],"sourcesContent":["import {\n applySelector as _applySelector,\n ComponentMeta,\n DataProvider as _DataProvider,\n DataProviderProps,\n repeatedElement,\n SelectorDict,\n useDataEnv as _useDataEnv,\n useSelector as _useSelector,\n useSelectors as _useSelectors,\n} from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps, createElement, ReactNode } from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const applySelector: typeof _applySelector = function (...args) {\n console.warn(\n \"DEPRECATED: Import applySelector from @plasmicapp/host instead.\"\n );\n return _applySelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelector: typeof _useSelector = function (...args) {\n console.warn(\"DEPRECATED: Import useSelector from @plasmicapp/host instead.\");\n return _useSelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelectors: typeof _useSelectors = function (...args) {\n console.warn(\n \"DEPRECATED: Import useSelectors from @plasmicapp/host instead.\"\n );\n return _useSelectors(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useDataEnv: typeof _useDataEnv = function (...args) {\n console.warn(\"DEPRECATED: Import useDataEnv from @plasmicapp/host instead.\");\n return _useDataEnv(...args);\n};\n\nexport const DataProvider: typeof _DataProvider = function (...args) {\n return _DataProvider(...args);\n};\n\nexport interface CommonDynamicProps {\n className?: string;\n tag?: string;\n propSelectors?: SelectorDict;\n}\n\nexport function DynamicElement<\n Tag extends keyof JSX.IntrinsicElements = \"div\"\n>({\n tag = \"div\",\n className,\n children,\n propSelectors,\n ...props\n}: CommonDynamicProps & ComponentProps<Tag>) {\n const computed = _useSelectors(propSelectors);\n return createElement(tag, {\n children,\n ...props,\n ...computed,\n className: className + \" \" + computed.className,\n });\n}\n\nexport interface DynamicTextProps extends CommonDynamicProps {\n selector?: string;\n}\n\nexport function DynamicText({\n selector,\n propSelectors,\n ...props\n}: DynamicTextProps) {\n return (\n <DynamicElement\n {...props}\n propSelectors={{ ...propSelectors, children: selector }}\n >\n {/*This is the default text*/}\n (DynamicText requires a selector)\n </DynamicElement>\n );\n}\n\nexport interface DynamicImageProps\n extends CommonDynamicProps,\n ComponentProps<\"img\"> {\n selector?: string;\n}\n\nexport function DynamicImage({\n selector,\n propSelectors,\n ...props\n}: DynamicImageProps) {\n return (\n <DynamicElement<\"img\">\n tag={\"img\"}\n loading={\"lazy\"}\n style={{\n objectFit: \"cover\",\n }}\n {...props}\n propSelectors={{ ...propSelectors, src: selector }}\n // Default image placeholder\n src=\"https://studio.plasmic.app/static/img/placeholder.png\"\n />\n );\n}\n\nexport interface DynamicRepeaterProps {\n children?: ReactNode;\n loopItemName?: string;\n keySelector?: string;\n selector?: string;\n data?: any;\n}\n\nexport function DynamicRepeater({\n children,\n loopItemName,\n keySelector,\n selector,\n data,\n}: DynamicRepeaterProps) {\n // Defaults to an array of three items.\n const finalData = data ?? _useSelector(selector) ?? [1, 2, 3];\n return (\n <>\n {finalData?.map?.((item: any, index: number) => (\n <_DataProvider\n key={_applySelector(item, keySelector) ?? index}\n name={loopItemName}\n data={item}\n >\n {repeatedElement(index, children)}\n </_DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n providesData: true,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n }\n}\n\nconst dynamicPropsWithoutTag = {\n propSelectors: {\n type: \"object\",\n defaultValueHint: {},\n description:\n \"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.\",\n },\n} as const;\n\nconst dynamicProps = {\n ...dynamicPropsWithoutTag,\n tag: {\n type: \"string\",\n defaultValueHint: \"div\",\n description: \"The HTML tag to use\",\n },\n} as const;\n\n// TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.\n\nexport const dynamicElementMeta: ComponentMeta<CommonDynamicProps> = {\n name: \"hostless-dynamic-element\",\n displayName: \"Dynamic Element\",\n importName: \"DynamicElement\",\n importPath: thisModule,\n props: { ...dynamicProps, children: \"slot\" },\n};\n\nexport function registerDynamicElement(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicElementMeta?: ComponentMeta<CommonDynamicProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n } else {\n registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n }\n}\n\nexport const dynamicTextMeta: ComponentMeta<DynamicTextProps> = {\n name: \"hostless-dynamic-text\",\n importName: \"DynamicText\",\n displayName: \"Dynamic Text\",\n importPath: thisModule,\n props: {\n ...dynamicProps,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the text, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicText(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicTextMeta?: ComponentMeta<DynamicTextProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicText,\n customDynamicTextMeta ?? dynamicTextMeta\n );\n } else {\n registerComponent(DynamicText, customDynamicTextMeta ?? dynamicTextMeta);\n }\n}\n\nexport const dynamicImageMeta: ComponentMeta<DynamicImageProps> = {\n name: \"hostless-dynamic-image\",\n displayName: \"Dynamic Image\",\n importName: \"DynamicImage\",\n importPath: thisModule,\n props: {\n ...dynamicPropsWithoutTag,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the image source URL, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicImage(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicImageMeta?: ComponentMeta<DynamicImageProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicImage,\n customDynamicImageMeta ?? dynamicImageMeta\n );\n } else {\n registerComponent(DynamicImage, customDynamicImageMeta ?? dynamicImageMeta);\n }\n}\n","export const tuple = <T extends any[]>(...args: T): T => args;\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n","import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport 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 const inEditor = usePlasmicCanvasContext();\n useEffect(() => {\n if (hideInEditor && inEditor) {\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 && inEditor ? \"\" : code;\n return (\n <div\n ref={rootElt}\n className={className}\n dangerouslySetInnerHTML={{ __html: effectiveCode }}\n style={{ whiteSpace: \"normal\" }}\n />\n );\n}\n\nexport const embedMeta: ComponentMeta<EmbedProps> = {\n name: \"hostless-embed\",\n displayName: \"Embed HTML\",\n importName: \"Embed\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n code: {\n type: \"code\",\n lang: \"html\",\n defaultValueHint:\n \"<div>Paste your embed code via the right sidebar</div>\",\n description: \"The HTML code to be embedded\",\n },\n hideInEditor: {\n type: \"boolean\",\n displayName: \"Hide in editor\",\n description:\n \"Disable running the code while editing in Plasmic Studio (may require reload)\",\n editOnly: true,\n },\n },\n defaultStyles: {\n maxWidth: \"100%\",\n },\n};\n\nexport function registerEmbed(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedMeta?: ComponentMeta<EmbedProps>\n) {\n if (loader) {\n loader.registerComponent(Embed, customEmbedMeta ?? embedMeta);\n } else {\n registerComponent(Embed, customEmbedMeta ?? embedMeta);\n }\n}\n","import { ComponentMeta, PlasmicCanvasContext } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { useContext } from \"react\";\n\nexport interface IframeProps {\n src: string;\n preview?: boolean;\n className?: string;\n}\n\nexport default function Iframe({ preview, src, className }: IframeProps) {\n const isEditing = useContext(PlasmicCanvasContext);\n if (isEditing && !preview) {\n return (\n <div className={className}>\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: \"#eee\",\n color: \"#888\",\n fontSize: \"36px\",\n fontFamily: \"sans-serif\",\n fontWeight: \"bold\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n }}\n >\n Iframe placeholder\n </div>\n </div>\n );\n }\n return <iframe src={src} className={className} />;\n}\n\nexport const iframeMeta: ComponentMeta<IframeProps> = {\n name: \"hostless-iframe\",\n displayName: \"Iframe\",\n importName: \"Iframe\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue: \"https://www.example.com\",\n },\n preview: {\n type: \"boolean\",\n description: \"Load the iframe while editing in Plasmic Studio\",\n },\n },\n defaultStyles: {\n width: \"300px\",\n height: \"150px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerIframe(\n loader?: { registerComponent: typeof registerComponent },\n customIframeMeta?: ComponentMeta<IframeProps>\n) {\n if (loader) {\n loader.registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n } else {\n registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n }\n}\n","import {\n ComponentMeta,\n DataProvider,\n registerComponent,\n repeatedElement,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nconst defaultItemName = \"currentItem\";\nconst defaultIndexName = \"currentIndex\";\n\ninterface RepeaterProps<T> {\n children: React.ReactNode;\n items: T[];\n itemName?: string;\n indexName?: string;\n}\n\nfunction Repeater<T>(props: RepeaterProps<T>) {\n const { children, items, itemName, indexName } = props;\n\n if (!Array.isArray(items)) {\n throw new Error(\"Repeater received an invalid collection: not an array.\");\n }\n\n return (\n <>\n {items.map((item, index) => (\n <DataProvider\n key={index.toString()}\n name={itemName || defaultItemName}\n data={item}\n >\n <DataProvider name={indexName || defaultIndexName} data={index}>\n {repeatedElement(index, children)}\n </DataProvider>\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const repeaterMeta: ComponentMeta<RepeaterProps<any>> = {\n name: `plasmic-repeater`,\n displayName: \"Repeater\",\n importName: \"Repeater\",\n importPath: thisModule,\n providesData: true,\n props: {\n children: {\n type: \"slot\",\n isRepeated: true,\n },\n items: {\n type: \"array\",\n defaultValue: [1, 2, 3],\n displayName: \"Collection\",\n description: \"Items array (JavaScript expression).\",\n },\n itemName: {\n type: \"string\",\n defaultValue: defaultItemName,\n defaultValueHint: defaultItemName,\n displayName: \"Item\",\n description: \"Data context key for the current item.\",\n },\n indexName: {\n type: \"string\",\n defaultValue: defaultIndexName,\n defaultValueHint: defaultIndexName,\n displayName: \"Index\",\n description: \"Data context key for the index of the current item.\",\n },\n },\n};\n\nexport function registerRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customRepeaterMeta?: ComponentMeta<RepeaterProps<any>>\n) {\n if (loader) {\n loader.registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n } else {\n registerComponent(Repeater, customRepeaterMeta ?? repeaterMeta);\n }\n}\n\nexport default Repeater;\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads. Chrome and other browsers require 'muted' to also be set for 'autoplay' to work.\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n defaultValue: true,\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n"],"names":["thisModule","applySelector","console","warn","_applySelector","useSelector","_useSelector","useSelectors","_useSelectors","useDataEnv","_useDataEnv","DataProvider","_DataProvider","DynamicElement","tag","className","children","propSelectors","props","computed","createElement","DynamicText","selector","React","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","data","finalData","map","item","index","key","name","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","isRepeated","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","providesData","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","ensure","x","undefined","Error","Embed","code","hideInEditor","rootElt","useRef","inEditor","usePlasmicCanvasContext","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","value","appendChild","createTextNode","innerHTML","parentNode","replaceChild","effectiveCode","ref","dangerouslySetInnerHTML","__html","whiteSpace","embedMeta","lang","editOnly","defaultStyles","maxWidth","registerEmbed","customEmbedMeta","Iframe","preview","isEditing","useContext","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","registerIframe","customIframeMeta","defaultItemName","defaultIndexName","Repeater","items","itemName","indexName","isArray","toString","repeaterMeta","registerRepeater","customRepeaterMeta","useDirectionalIntersection","scrollDownThreshold","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","handler","entries","intersectionRatio","observer","root","rootMargin","threshold","observe","disconnect","ScrollRevealer","intersectionRef","scrollRevealerMeta","registerScrollRevealer","customScrollRevealerMeta","Video","forwardRef","videoMeta","autoPlay","controls","playsInline","loop","muted","poster","preload","options","registerVideo","customVideoMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,UAAU,GAAG,uCAAuC;AAE1D;;;IAGaC,aAAa,GAA0B,SAAvCA,aAAa;EACxBC,OAAO,CAACC,IAAI,CAC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AAS;MACfK,WAAW,EAAE,MAAM;MACnBJ,WAAW,EAAE;KACd;IACDqI,KAAK,EAAE;MACLtI,IAAI,EAAE,SAAS;MACfK,WAAW,EAAE,OAAO;MACpBJ,WAAW,EAAE;KACd;IACDsI,MAAM,EAAE;MACNvI,IAAI,EAAE,UAAU;MAChBK,WAAW,EAAE,4BAA4B;MACzCJ,WAAW,EAAE;KACd;IACDuI,OAAO,EAAE;MACPxI,IAAI,EAAE,QAAQ;MACdyI,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC;MACrCpI,WAAW,EAAE,SAAS;MACtBJ,WAAW,EACT;;GAEL;EACDkE,aAAa,EAAE;IACbyB,MAAM,EAAE,KAAK;IACbD,KAAK,EAAE,OAAO;IACdvB,QAAQ,EAAE;;CAEb;AAED,SAAgBsE,aAAa,CAC3BjI,MAAwD,EACxDkI,eAA2C;EAE3C,IAAIlI,MAAM,EAAE;IACVA,MAAM,CAACE,iBAAiB,CAACoH,KAAK,EAAEY,eAAe,WAAfA,eAAe,GAAIV,SAAS,CAAC;GAC9D,MAAM;IACLtH,iBAAiB,CAACoH,KAAK,EAAEY,eAAe,WAAfA,eAAe,GAAIV,SAAS,CAAC;;AAE1D;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicpkgs/plasmic-basic-components",
3
- "version": "0.0.103",
3
+ "version": "0.0.105",
4
4
  "description": "Plasmic registration call for the HTML5 video element",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "analyze": "size-limit --why"
29
29
  },
30
30
  "devDependencies": {
31
- "@plasmicapp/host": "1.0.96",
31
+ "@plasmicapp/host": "1.0.97",
32
32
  "@size-limit/preset-small-lib": "^4.11.0",
33
33
  "@types/node": "^14.0.26",
34
34
  "@types/react": "^17.0.39",
@@ -43,5 +43,5 @@
43
43
  "react": ">=16.8.0",
44
44
  "react-dom": ">=16.8.0"
45
45
  },
46
- "gitHead": "cbf237ebd479221a7de2947b2d8179133fec5ed5"
46
+ "gitHead": "c0d4c077a6b8dbf77513d9c3f25e885618adffb1"
47
47
  }