{"version":3,"file":"SVGComponent.onjapsU4.mjs","names":["useState","useMemo","startTransition"],"sources":["https:/framerusercontent.com/modules/jsd9bAs3tcXwny3iop3B/TD23g7uXx0qxQCmLtpE4/SVGComponent.js"],"sourcesContent":["// SVG component with customizable color and animations\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{startTransition,useMemo,useState}from\"react\";const themePalettes={custom:{color:\"#000000\",strokeColor:\"#000000\"},mono:{color:\"#000000\",strokeColor:\"#000000\"},sunset:{color:\"#F45B48\",strokeColor:\"#7A2B23\"},ocean:{color:\"#0066FF\",strokeColor:\"#003399\"},forest:{color:\"#22CC66\",strokeColor:\"#116633\"},midnight:{color:\"#111827\",strokeColor:\"#6B7280\"},pastel:{color:\"#A78BFA\",strokeColor:\"#60A5FA\"},neon:{color:\"#22D3EE\",strokeColor:\"#A3E635\"}};const presetIcons={home:'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z\"/></svg>',houseDoor:'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5\"/></svg>',search:'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"/></svg>',user:'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"/></svg>',settings:'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84a.484.484 0 00-.48.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L3.16 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.27.41.48.41h3.84c.24 0 .44-.17.48-.41l.36-2.54c.59-.24 1.13-.58 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z\"/></svg>',heart:'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z\"/></svg>',bell:'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z\"/></svg>',menu:'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z\"/></svg>'};const animations={pulse:`\n        @keyframes pulse {\n            0%, 100% { transform: scale(1); }\n            50% { transform: scale(1.1); }\n        }\n    `,spin:`\n        @keyframes spin {\n            from { transform: rotate(0deg); }\n            to { transform: rotate(360deg); }\n        }\n    `,bounce:`\n        @keyframes bounce {\n            0%, 100% { transform: translateY(0); }\n            50% { transform: translateY(-25%); }\n        }\n    `};/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function SVGComponent(props){const{svgCode,theme,color,stroke,strokeColor,animation,animationDuration,presetIcon,style}=props;const[isHovered,setIsHovered]=useState(false);const themedColor=theme===\"custom\"?color:themePalettes[theme].color;const themedStrokeColor=theme===\"custom\"?strokeColor:themePalettes[theme].strokeColor;const effectiveSvgCode=presetIcon!==\"custom\"?presetIcons[presetIcon]:svgCode;const processedSVG=useMemo(()=>{if(!effectiveSvgCode)return\"\";let processed=effectiveSvgCode.trim();if(processed.startsWith(\"<svg\")){// Replace fill/stroke attributes (avoid overwriting fill=\"none\"), support both quote styles, and handle style-based fills.\nprocessed=processed.replace(/\\sfill=([\"'])(?!none\\b)[^\"']*[\"']/g,` fill=\"${themedColor}\"`);processed=processed.replace(/fill\\s*:\\s*(?!none\\b)[^;\"]+/g,`fill: ${themedColor}`);if(stroke){processed=processed.replace(/\\sstroke=([\"'])[^\"']*\\1/g,` stroke=\"${themedStrokeColor}\"`);}else{processed=processed.replace(/\\sstroke=([\"'])[^\"']*\\1/g,\"\");}if(stroke&&!processed.includes(\"stroke=\")){processed=processed.replace(\"<svg\",`<svg stroke=\"${themedStrokeColor}\"`);}// Ensure theming works even when the SVG relies on default fill/currentColor.\n// Only add fill to the root <svg> tag if it doesn't already declare one.\nif(!/^<svg[^>]*\\sfill=/.test(processed)){processed=processed.replace(/<svg(\\s|>)/,`<svg fill=\"${themedColor}\"$1`);}processed=processed.replace(/width=\"[^\"]*\"/,'width=\"100%\"');processed=processed.replace(/height=\"[^\"]*\"/,'height=\"100%\"');if(!processed.includes(\"width=\")){processed=processed.replace(\"<svg\",'<svg width=\"100%\"');}if(!processed.includes(\"height=\")){processed=processed.replace(\"<svg\",'<svg height=\"100%\"');}// Add animation class\nif(animation!==\"none\"&&animation!==\"hover-scale\"&&animation!==\"hover-bounce\"){processed=processed.replace(\"<svg\",`<svg class=\"svg-animate\"`);}}return processed;},[effectiveSvgCode,themedColor,stroke,themedStrokeColor,animation]);const getAnimationStyles=()=>{if(animation===\"none\")return{};const duration=`${animationDuration}s`;if(animation===\"hover-scale\"){return{transform:isHovered?\"scale(1.15)\":\"scale(1)\",transition:`transform ${animationDuration}s ease`};}if(animation===\"hover-bounce\"){return{transform:isHovered?\"translateY(-15%)\":\"translateY(0)\",transition:`transform ${animationDuration}s ease`};}return{animation:`${animation} ${duration} infinite`};};return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",position:\"relative\",// Allows SVGs using fill=\"currentColor\" to inherit themed color.\ncolor:themedColor,...getAnimationStyles(),...style},onMouseEnter:()=>startTransition(()=>setIsHovered(true)),onMouseLeave:()=>startTransition(()=>setIsHovered(false)),children:[animation!==\"none\"&&animation!==\"hover-scale\"&&animation!==\"hover-bounce\"&&/*#__PURE__*/_jsx(\"style\",{children:animations[animation]}),/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",...animation===\"hover-scale\"||animation===\"hover-bounce\"?getAnimationStyles():{}},dangerouslySetInnerHTML:{__html:processedSVG}})]});}addPropertyControls(SVGComponent,{theme:{type:ControlType.Enum,title:\"Theme\",options:[\"custom\",\"mono\",\"sunset\",\"ocean\",\"forest\",\"midnight\",\"pastel\",\"neon\"],optionTitles:[\"Custom\",\"Mono\",\"Sunset\",\"Ocean\",\"Forest\",\"Midnight\",\"Pastel\",\"Neon\"],defaultValue:\"custom\"},presetIcon:{type:ControlType.Enum,title:\"Icon\",options:[\"custom\",\"home\",\"houseDoor\",\"search\",\"user\",\"settings\",\"heart\",\"bell\",\"menu\"],optionTitles:[\"Custom SVG\",\"Home\",\"House Door\",\"Search\",\"User\",\"Settings\",\"Heart\",\"Bell\",\"Menu\"],defaultValue:\"custom\"},svgCode:{type:ControlType.String,title:\"SVG Code\",displayTextArea:true,defaultValue:'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z\"/></svg>'},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\",hidden:({theme})=>theme!==\"custom\"},stroke:{type:ControlType.Boolean,title:\"Stroke\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},strokeColor:{type:ControlType.Color,title:\"Stroke Color\",defaultValue:\"#000000\",hidden:({stroke,theme})=>!stroke||theme!==\"custom\"},animation:{type:ControlType.Enum,title:\"Animation\",options:[\"none\",\"pulse\",\"spin\",\"bounce\",\"hover-scale\",\"hover-bounce\"],optionTitles:[\"None\",\"Pulse\",\"Spin\",\"Bounce\",\"Hover Scale\",\"Hover Bounce\"],defaultValue:\"none\"},animationDuration:{type:ControlType.Number,title:\"Duration\",defaultValue:1,min:.1,max:5,step:.1,unit:\"s\",hidden:({animation})=>animation===\"none\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SVGComponent\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SVGComponent.map"],"mappings":"+LAmBG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,UAAQ,QAAM,QAAM,SAAO,cAAY,YAAU,oBAAkB,aAAW,SAAO,EAAW,CAAC,EAAU,GAAcA,EAAS,EAAK,EAAQ,EAAY,IAAQ,SAAS,EAAM,EAAc,EAAM,CAAC,MAAY,EAAkB,IAAQ,SAAS,EAAY,EAAc,EAAM,CAAC,YAAkB,EAAiB,IAAa,SAAiC,EAAxB,EAAY,GAA0B,EAAaC,MAAY,CAAC,GAAG,CAAC,EAAiB,MAAM,GAAG,IAAI,EAAU,EAAiB,KAAK,EAIxX,OAJ6X,EAAU,WAAW,MAAM,IACviB,EAAU,EAAU,QAAQ,qCAAqC,UAAU,EAAY,EAAE,EAAE,EAAU,EAAU,QAAQ,+BAA+B,SAAS,GAAa,EAAE,AAA0G,EAAvG,EAAkB,EAAU,QAAQ,2BAA2B,YAAY,EAAkB,EAAE,EAAkB,EAAU,QAAQ,2BAA2B,EAAE,EAAM,GAAQ,CAAC,EAAU,SAAS,SAAS,IAAG,EAAU,EAAU,QAAQ,OAAO,gBAAgB,EAAkB,EAAE,GAElc,oBAAoB,KAAK,CAAS,IAAG,EAAU,EAAU,QAAQ,aAAa,cAAc,EAAY,IAAI,GAAG,EAAU,EAAU,QAAQ,gBAAgB,cAAc,EAAE,EAAU,EAAU,QAAQ,iBAAiB,eAAe,EAAM,EAAU,SAAS,QAAQ,IAAG,EAAU,EAAU,QAAQ,OAAO,mBAAmB,GAAO,EAAU,SAAS,SAAS,IAAG,EAAU,EAAU,QAAQ,OAAO,oBAAoB,GAC/Z,IAAY,QAAQ,IAAY,eAAe,IAAY,iBAAgB,EAAU,EAA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