{"version":3,"file":"FloatingMediaFrame.BTurED2l.mjs","names":[],"sources":["https:/framerusercontent.com/modules/fuE6k3plpglN8zD6wwUc/QjJdAM20fZ6FIzywSjRe/FloatingMediaFrame.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * FloatingMediaFrame\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function FloatingMediaFrame({mediaType=\"image\",mediaUrl=\"\",aspectRatio=1.778,fitMode=\"cover\",radius=0}){const box={width:\"100%\",aspectRatio:String(aspectRatio),borderRadius:radius,overflow:\"hidden\",display:\"block\",backgroundColor:\"rgb(238, 240, 246)\"};// Media fills the box via normal block flow — NOT position:absolute.\n// aspect-ratio only establishes height when children are in normal flow.\n// Absolute children take the box out of flow and collapse it to zero height.\nconst media={display:\"block\",width:\"100%\",height:\"100%\",objectFit:fitMode};if(!mediaUrl){return /*#__PURE__*/_jsx(\"div\",{style:{...box,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:\"'Chivo Mono',monospace\",fontSize:\"0.75rem\",color:\"rgb(138,145,155)\",userSelect:\"none\"},children:mediaType===\"video\"?\"Paste video URL →\":\"Paste image URL →\"})});}return /*#__PURE__*/_jsx(\"div\",{style:box,children:mediaType===\"video\"?/*#__PURE__*/_jsx(\"video\",{src:mediaUrl,style:media,autoPlay:true,muted:true,loop:true,playsInline:true}):/*#__PURE__*/_jsx(\"img\",{src:mediaUrl,alt:\"\",style:media})});}addPropertyControls(FloatingMediaFrame,{mediaType:{type:ControlType.Enum,title:\"Media Type\",options:[\"image\",\"video\"],optionTitles:[\"Image\",\"Video\"],defaultValue:\"image\"},mediaUrl:{type:ControlType.String,title:\"Media URL\",placeholder:\"https://…/image.jpg or video.mp4\",defaultValue:\"\"},aspectRatio:{type:ControlType.Number,title:\"Aspect Ratio\",description:\"Width \\xf7 Height. 1.778=16:9 \\xb7 1.0=square \\xb7 0.75=portrait\",defaultValue:1.778,min:.1,max:5,step:.01,displayStepper:true},fitMode:{type:ControlType.Enum,title:\"Fit Mode\",options:[\"cover\",\"contain\"],optionTitles:[\"Cover (fill frame)\",\"Contain (letterbox)\"],defaultValue:\"cover\"},radius:{type:ControlType.Number,title:\"Corner Radius\",defaultValue:0,min:0,max:120,step:2,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FloatingMediaFrame\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FloatingMediaFrame.map"],"mappings":"4JAIG,SAAwB,EAAmB,CAAC,YAAU,QAAQ,WAAS,GAAG,cAAY,MAAM,UAAQ,QAAQ,SAAO,GAAG,CAAC,IAAM,EAAI,CAAC,MAAM,OAAO,YAAY,OAAO,EAAY,CAAC,aAAa,EAAO,SAAS,SAAS,QAAQ,QAAQ,gBAAgB,qBAAqB,CAGvQ,EAAM,CAAC,QAAQ,QAAQ,MAAM,OAAO,OAAO,OAAO,UAAU,EAAQ,CAAgV,OAA3U,EAA+V,EAAK,MAAM,CAAC,MAAM,EAAI,SAAS,IAAY,QAAqB,EAAK,QAAQ,CAAC,IAAI,EAAS,MAAM,EAAM,SAAS,GAAK,MAAM,GAAK,KAAK,GAAK,YAAY,GAAK,CAAC,CAAc,EAAK,MAAM,CAAC,IAAI,EAAS,IAAI,GAAG,MAAM,EAAM,CAAC,CAAC,CAAC,CAA1hB,EAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAI,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,CAAC,SAAsB,EAAK,OAAO,CAAC,MAAM,CAAC,WAAW,yBAAyB,SAAS,UAAU,MAAM,mBAAmB,WAAW,OAAO,CAAC,SAAS,IAAY,QAAQ,oBAAoB,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