{"version":3,"file":"PathLine.Y4FwhMtx.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/SY18Bxn2swRTQz0AMijB/8Rb7RLMETp21aOQZU77A/PathLine.js"],"sourcesContent":["// Dynamic line component that can run vertically, horizontally, and at diagonal angles across the page\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function PathLine(props){const{segments=[{length:100,angle:0},{length:100,angle:90},{length:100,angle:45}],strokeWidth=4,strokeColor=\"#FF0000\",strokeStyle=\"solid\",dashLength=5,gapLength=5,lineCap=\"round\",lineJoin=\"round\",opacity=1,startX=50,startY=50}=props;const pathData=useMemo(()=>{if(segments.length===0)return\"\";let currentX=startX;let currentY=startY;let path=`M ${currentX} ${currentY}`;segments.forEach(segment=>{const angleRad=segment.angle*Math.PI/180;const deltaX=segment.length*Math.cos(angleRad);const deltaY=segment.length*Math.sin(angleRad);currentX+=deltaX;currentY+=deltaY;path+=` L ${currentX} ${currentY}`;});return path;},[segments,startX,startY]);const strokeDasharray=useMemo(()=>{if(strokeStyle===\"dashed\"){return`${dashLength} ${gapLength}`;}else if(strokeStyle===\"dotted\"){return`${strokeWidth} ${gapLength}`;}return\"none\";},[strokeStyle,dashLength,gapLength,strokeWidth]);return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"visible\"},children:/*#__PURE__*/_jsx(\"svg\",{width:\"100%\",height:\"100%\",style:{position:\"absolute\",top:0,left:0,overflow:\"visible\"},children:/*#__PURE__*/_jsx(\"path\",{d:pathData,stroke:strokeColor,strokeWidth:strokeWidth,strokeDasharray:strokeDasharray,strokeLinecap:lineCap,strokeLinejoin:lineJoin,fill:\"none\",opacity:opacity,vectorEffect:\"non-scaling-stroke\"})})});}addPropertyControls(PathLine,{startX:{type:ControlType.Number,title:\"Start X\",defaultValue:50,min:0,max:100,step:1,unit:\"%\"},startY:{type:ControlType.Number,title:\"Start Y\",defaultValue:50,min:0,max:100,step:1,unit:\"%\"},segments:{type:ControlType.Array,title:\"Segments\",control:{type:ControlType.Object,controls:{length:{type:ControlType.Number,title:\"Length\",defaultValue:100,min:1,max:2500,step:1,unit:\"px\"},angle:{type:ControlType.Number,title:\"Angle\",defaultValue:0,min:-180,max:180,step:1,unit:\"\\xb0\"}}},defaultValue:[{length:100,angle:0},{length:100,angle:90},{length:100,angle:45}],maxCount:20},strokeWidth:{type:ControlType.Number,title:\"Line Width\",defaultValue:4,min:1,max:20,step:1,unit:\"px\"},strokeColor:{type:ControlType.Color,title:\"Line Color\",defaultValue:\"#FF0000\"},strokeStyle:{type:ControlType.Enum,title:\"Line Style\",options:[\"solid\",\"dashed\",\"dotted\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\"],defaultValue:\"solid\",displaySegmentedControl:true},dashLength:{type:ControlType.Number,title:\"Dash Length\",defaultValue:5,min:1,max:20,step:1,unit:\"px\",hidden:({strokeStyle})=>strokeStyle!==\"dashed\"},gapLength:{type:ControlType.Number,title:\"Gap Length\",defaultValue:5,min:1,max:20,step:1,unit:\"px\",hidden:({strokeStyle})=>strokeStyle===\"solid\"},lineCap:{type:ControlType.Enum,title:\"Line Cap\",options:[\"butt\",\"round\",\"square\"],optionTitles:[\"Butt\",\"Round\",\"Square\"],defaultValue:\"round\"},lineJoin:{type:ControlType.Enum,title:\"Line Join\",options:[\"miter\",\"round\",\"bevel\"],optionTitles:[\"Miter\",\"Round\",\"Bevel\"],defaultValue:\"round\"},opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:1,min:0,max:1,step:.1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PathLine\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\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