{"version":3,"file":"LinePattern.oICp9_-R.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/2VkztSwBHstbEHVzimly/DWQmfrmr1escxe105kzm/LinePattern.js"],"sourcesContent":["import{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 LinePattern(props){const{backgroundColor,lineColor,lineWidth,cellSize,angle,patternType,lineStyle,opacity}=props;const backgroundImage=useMemo(()=>{const dashAttrs=lineStyle===\"dashed\"?`stroke-dasharray='${lineWidth*6} ${lineWidth*4}'`:lineStyle===\"dotted\"?`stroke-linecap='round' stroke-dasharray='${lineWidth} ${lineWidth*3}'`:\"\";const makePattern=(id,rotateAngle)=>`<pattern id='${id}' width='${cellSize}' height='${cellSize}' patternUnits='userSpaceOnUse' patternTransform='rotate(${rotateAngle})'><line x1='0' y1='${-cellSize*2}' x2='0' y2='${cellSize*3}' stroke='${lineColor}' stroke-width='${lineWidth}' ${dashAttrs}/></pattern>`;let defs;let rects;if(patternType===\"grid\"){defs=`<defs>${makePattern(\"p1\",angle)}${makePattern(\"p2\",angle+90)}</defs>`;rects=`<rect width='99999' height='99999' fill='url(#p1)'/><rect width='99999' height='99999' fill='url(#p2)'/>`;}else{defs=`<defs>${makePattern(\"p1\",angle)}</defs>`;rects=`<rect width='99999' height='99999' fill='url(#p1)'/>`;}const svg=`<svg xmlns='http://www.w3.org/2000/svg' width='99999' height='99999'>${defs}${rects}</svg>`;return`url(\"data:image/svg+xml,${encodeURIComponent(svg)}\")`;},[angle,cellSize,lineColor,lineStyle,lineWidth,patternType]);return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":true,style:{position:\"relative\",width:\"100%\",height:\"100%\",backgroundColor,backgroundImage,backgroundRepeat:\"no-repeat\",backgroundSize:\"99999px 99999px\",backgroundPosition:\"0 0\",opacity,pointerEvents:\"none\"}});}LinePattern.displayName=\"Line Pattern\";addPropertyControls(LinePattern,{backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgba(0,0,0,1)\"},lineColor:{type:ControlType.Color,title:\"Line\",defaultValue:\"rgba(255,255,255,0.15)\"},lineWidth:{type:ControlType.Number,title:\"Line Width\",defaultValue:1,min:.5,max:10,step:.5},cellSize:{type:ControlType.Number,title:\"Cell Size\",defaultValue:40,min:10,max:200,step:2},angle:{type:ControlType.Number,title:\"Angle\",defaultValue:45,min:0,max:180,step:1},patternType:{type:ControlType.Enum,title:\"Type\",defaultValue:\"lines\",options:[\"lines\",\"grid\"],optionTitles:[\"Lines\",\"Grid\"],displaySegmentedControl:true,segmentedControlDirection:\"horizontal\"},lineStyle:{type:ControlType.Enum,title:\"Line Style\",defaultValue:\"solid\",options:[\"solid\",\"dashed\",\"dotted\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\"],displaySegmentedControl:true},opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:1,min:0,max:1,step:.01}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LinePattern\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LinePattern.map"],"mappings":"qKAGG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,kBAAgB,YAAU,YAAU,WAAS,QAAM,cAAY,YAAU,WAAS,EAAglC,OAAoB,EAAK,MAAM,CAAC,cAAc,GAAK,MAAM,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,kBAAgB,gBAA7qCA,MAAY,CAAC,IAAM,EAAU,IAAY,SAAS,qBAAqB,EAAU,EAAE,GAAG,EAAU,EAAE,GAAG,IAAY,SAAS,4CAA4C,EAAU,GAAG,EAAU,EAAE,GAAG,GAAS,GAAa,EAAG,IAAc,gBAAgB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