{"version":3,"file":"TextVideoMask.PiE77TPF.mjs","names":[],"sources":["https:/framerusercontent.com/modules/g2P5pMK1acsdX3cwyXTu/5D05uprmgYr7nCdN85TJ/TextVideoMask.js"],"sourcesContent":["// Video mask component that uses text to mask a video with full text control\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function TextVideoMask(props){const{useVideoFile=true,videoFile=\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",videoUrl=\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",text=\"VIDEO\",font,textColor=\"#FFFFFF\",backgroundColor=\"#000000\",autoplay=true,loop=true,muted=true}=props;const maskId=`video-mask-${Math.random().toString(36).substr(2,9)}`;const videoSource=useVideoFile?videoFile:videoUrl;return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",backgroundColor,overflow:\"hidden\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"},children:/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsxs(\"mask\",{id:maskId,children:[/*#__PURE__*/_jsx(\"rect\",{width:\"100%\",height:\"100%\",fill:\"black\"}),/*#__PURE__*/_jsx(\"text\",{x:\"50%\",y:\"50%\",textAnchor:\"middle\",dominantBaseline:\"middle\",fill:\"white\",style:{fontSize:font?.fontSize||\"48px\",fontFamily:font?.fontFamily||\"Inter\",fontWeight:font?.fontWeight||700,fontStyle:font?.fontStyle||\"normal\",letterSpacing:font?.letterSpacing||\"-0.02em\"},children:text})]})})}),/*#__PURE__*/_jsx(\"video\",{src:videoSource,autoPlay:autoplay,loop:loop,muted:muted,playsInline:true,style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",mask:`url(#${maskId})`,WebkitMask:`url(#${maskId})`}})]});}addPropertyControls(TextVideoMask,{useVideoFile:{type:ControlType.Boolean,title:\"Video\",defaultValue:true,enabledTitle:\"Upload\",disabledTitle:\"URL\"},videoFile:{type:ControlType.File,allowedFileTypes:[\"mp4\",\"webm\",\"mov\"],title:\"Upload\",hidden:({useVideoFile})=>!useVideoFile},videoUrl:{type:ControlType.String,title:\"Video URL\",defaultValue:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",placeholder:\"Enter video URL...\",hidden:({useVideoFile})=>useVideoFile},text:{type:ControlType.String,title:\"Mask Text\",defaultValue:\"VIDEO\"},font:{type:ControlType.Font,title:\"Text Font\",defaultValue:{fontSize:\"48px\",variant:\"Bold\",letterSpacing:\"-0.02em\",lineHeight:\"1em\",textAlign:\"center\"},controls:\"extended\",defaultFontType:\"sans-serif\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#000000\"},autoplay:{type:ControlType.Boolean,title:\"Autoplay\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},muted:{type:ControlType.Boolean,title:\"Muted\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextVideoMask\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextVideoMask.map"],"mappings":"oKAIG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,eAAa,GAAK,YAA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