{"version":3,"file":"ProgressiveBlur.BZFdbKBc.mjs","names":[],"sources":["https:/framerusercontent.com/modules/HOnj00ArPqRkWwsBHJwG/NyfmfiwtPm7OgAKZ9QVl/ProgressiveBlur.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";// Constants\n// Which way the mask opens up. The blur is strongest at the named edge, so the\n// gradient has to run toward it. The arrow keys are here because Framer stores\n// the segmented control's displayed title, not the option value — without them\n// every direction would quietly fall back to the default.\nconst TOWARD={Top:\"to top\",\"↑\":\"to top\",Bottom:\"to bottom\",\"↓\":\"to bottom\",Left:\"to left\",\"←\":\"to left\",Right:\"to right\",\"→\":\"to right\"};// Component\n/**\n * Progressive Blur\n * Blur that ramps across the frame, with an optional colour wash.\n *\n * @author Shokhnur — https://www.framer.com/@shokhnur\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 1200\n * @framerIntrinsicHeight 320\n */export default function ProgressiveBlur(props){const{edge,blur,layers,curve,tint,tintFade,tintCoverage,style}=props;const dir=TOWARD[edge]||TOWARD.Bottom;const count=Math.max(2,Math.min(10,Math.round(layers)));const root={position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",// Decoration only — it sits over content and must never eat clicks.\npointerEvents:\"none\",...style};const bands=[];for(let i=0;i<count;i++){const start=i/count*100;const end=(i+1)/count*100;// Doubling each step matches how blur reads to the eye; linear is there\n// for when a flatter, more even wash is wanted.\nconst radius=curve===\"Linear\"?blur*(i+1)/count:blur*Math.pow(2,i-(count-1));const mask=`linear-gradient(${dir}, rgba(0,0,0,0) ${start}%, rgba(0,0,0,1) ${end}%)`;bands.push(/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,backdropFilter:`blur(${radius.toFixed(2)}px)`,WebkitBackdropFilter:`blur(${radius.toFixed(2)}px)`,maskImage:mask,WebkitMaskImage:mask}},i));}const wash={position:\"absolute\",inset:0,background:tintFade?`linear-gradient(${dir}, rgba(0,0,0,0) ${100-tintCoverage}%, ${tint} 100%)`:tint};return /*#__PURE__*/_jsxs(\"div\",{style:root,\"aria-hidden\":\"true\",children:[bands,/*#__PURE__*/_jsx(\"div\",{style:wash})]});}ProgressiveBlur.displayName=\"Progressive Blur\";// Property Controls\naddPropertyControls(ProgressiveBlur,{edge:{type:ControlType.Enum,title:\"Strongest\",options:[\"Top\",\"Bottom\",\"Left\",\"Right\"],// Enum controls take no icons — arrows as titles are the closest the\n// API allows, and they point at the edge the blur builds toward.\noptionTitles:[\"↑\",\"↓\",\"←\",\"→\"],defaultValue:\"Bottom\",displaySegmentedControl:true},blur:{type:ControlType.Number,title:\"Blur\",defaultValue:24,min:0,max:120,step:1},layers:{type:ControlType.Number,title:\"Layers\",defaultValue:6,min:2,max:10,step:1,displayStepper:true,description:\"More layers = smoother ramp, more GPU cost.\"},curve:{type:ControlType.Enum,title:\"Curve\",options:[\"Exponential\",\"Linear\"],defaultValue:\"Exponential\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},tint:{type:ControlType.Color,title:\"Tint\",defaultValue:\"rgb(251, 243, 233)\"},tintFade:{type:ControlType.Boolean,title:\"Fade Tint\",defaultValue:true},tintCoverage:{type:ControlType.Number,title:\"Coverage\",defaultValue:100,min:0,max:100,step:1,unit:\"%\",hidden:p=>!p.tintFade,description:\"How far the tint reaches back from the edge.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProgressiveBlur\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"320\",\"framerIntrinsicWidth\":\"1200\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProgressiveBlur.map"],"mappings":"8JAgBG,SAAwB,EAAg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