{"version":3,"file":"ExampleEmbed.CUGaFbOO.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/N0rT3EmFcANMLsxdnAsq/pjmlGIK4qIVqlQQ5c9cd/ExampleEmbed.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{ControlType,addPropertyControls,RenderTarget,motion}from\"framer\";import{useState,useEffect,useRef}from\"react\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ExampleEmbed({platform=\"react\",name,showBorder=false}){const isCanvas=RenderTarget.current()===RenderTarget.canvas;const[opacity,setOpacity]=useState(0);const iframeRef=useRef(null);useEffect(()=>{// if (iframeRef.current?.complete) {\nsetOpacity(1);// }\n},[]);return!isCanvas?/*#__PURE__*/_jsxs(\"div\",{style:{...iframeContainerStyle,border:showBorder?\"1px solid rgba(255,255,255,0.06)\":\"none\"},children:[/*#__PURE__*/_jsx(\"div\",{style:loadingStyle,children:\"Loading...\"}),/*#__PURE__*/_jsx(motion.iframe,{ref:iframeRef,loading:\"lazy\",onLoad:()=>setOpacity(1),src:`https://examples.motion.dev/${platform}/${name}?utm_source=embed&is_plus=true`,style:iframeStyle,initial:false,animate:{opacity},allow:\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; pointer-lock; usb; vr; xr-spatial-tracking; clipboard-write;\",sandbox:\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts allow-top-navigation allow-top-navigation-by-user-activation\"})]}):/*#__PURE__*/_jsx(\"div\",{style:placeholderStyle});}addPropertyControls(ExampleEmbed,{platform:{type:ControlType.Enum,defaultValue:\"react\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",options:[\"react\",\"js\",\"vue\"],optionTitles:[\"React\",\"JavaScript\",\"Vue\"]},name:{title:\"ID\",type:ControlType.String},showBorder:{type:ControlType.Boolean,defaultValue:false}});const borderRadius=10;// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\nconst containerStyle={width:\"100%\",position:\"relative\"};const iframeContainerStyle={width:\"100%\",height:\"100%\",border:0,position:\"absolute\",top:0,left:0,borderRadius,overflow:\"hidden\"};const spreadStyle={position:\"absolute\",top:0,left:0,right:0,bottom:0};const iframeStyle={...spreadStyle,width:\"100%\",height:\"100%\",border:0};const loadingStyle={...spreadStyle,background:\"#8DF0CC11\",color:\"#8DF0CC11\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"};const placeholderStyle={width:\"100%\",height:\"100%\",border:0,position:\"absolute\",top:0,left:0,background:\"rgba(255,255,255,0.2)\",borderRadius};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ExampleEmbed\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ExampleEmbed.map"],"mappings":"0VAMG,SAAwB,EAAa,CAAC,WAAS,QAAQ,OAAK,aAAW,IAAO,CAAC,IAAM,EAAS,EAAa,SAAS,GAAG,EAAa,OAAY,CAAC,EAAQ,GAAYA,EAAS,EAAE,CAAO,EAAUC,EAAO,KAAK,CAE1M,OAF2M,MAAc,CAC/N,EAAW,EAAE,EACX,EAAE,CAAC,CAAQ,EAAuxB,EAAK,MAAM,CAAC,MAAM,EAAiB,CAAC,CAAryB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAqB,OAAO,EAAW,mCAAmC,OAAO,CAAC,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,EAAa,SAAS,aAAa,CAAC,CAAc,EAAK,EAAO,OAAO,CAAC,IAAI,EAAU,QAAQ,OAAO,WAAW,EAAW,EAAE,CAAC,IAAI,+BAA+B,EAAS,GAAG,EAAK,gCAA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