{"version":3,"file":"shared-lib.C7T5E2KA.mjs","names":[],"sources":["https:/framerusercontent.com/modules/3UqIplfvKhKEYXbMJU9B/LaxxdXQrbm6ENNGstFLU/Fillpattern.js","https:/framerusercontent.com/modules/VmF6M0JHnBvGvPHZTaPY/k456hAf3i4aepwgwmkAE/siteMetadata.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Fill Pattern\n *\n * A Framer code component that replicates Figma's Fill Pattern feature.\n * Upload any image and use it as a tiled pattern with full control over\n * tile size, spacing, offset, rotation, blend mode, and per-side borders.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 400\n */export default function FillPattern(props){const{// Pattern\npattern,backgroundColor,// Tile\ntileType,tileSize,tileWidth,tileHeight,spacingX,spacingY,offsetX,offsetY,// Appearance\nrotation,patternOpacity,blendMode,borderRadius,clipContent,// Border\nborderStyle,borderColor,borderTop,borderRight,borderBottom,borderLeft,style}=props;// Resolve final tile dimensions based on selected tile type.\nconst finalTileWidth=tileType===\"uniform\"?tileSize:tileWidth;const finalTileHeight=tileType===\"uniform\"?tileSize:tileHeight;// The background size represents one full repeat unit (tile + spacing).\n// This creates the illusion of gaps between tiles because the image\n// itself only fills the tile portion, leaving spacing transparent.\nconst repeatUnitWidth=finalTileWidth+spacingX;const repeatUnitHeight=finalTileHeight+spacingY;// When the pattern is rotated, corners of the container would show\n// empty space. Scaling the pattern layer up prevents that.\nconst needsRotationPadding=rotation!==0;const rotationScale=needsRotationPadding?1.5:1;const rotationOffset=(rotationScale-1)/2*100;const containerStyle={position:\"relative\",width:\"100%\",height:\"100%\",backgroundColor,borderRadius,overflow:clipContent?\"hidden\":\"visible\",boxSizing:\"border-box\",borderStyle:\"solid\",borderColor,borderTopWidth:borderTop,borderRightWidth:borderRight,borderBottomWidth:borderBottom,borderLeftWidth:borderLeft,...style};// Override border style for any side with zero width to avoid\n// rendering a thin visible line on some browsers.\nif(borderTop===0)containerStyle.borderTopStyle=\"none\";if(borderRight===0)containerStyle.borderRightStyle=\"none\";if(borderBottom===0)containerStyle.borderBottomStyle=\"none\";if(borderLeft===0)containerStyle.borderLeftStyle=\"none\";// Apply the selected style only if at least one side has a width.\nconst hasAnyBorder=borderTop>0||borderRight>0||borderBottom>0||borderLeft>0;if(hasAnyBorder){containerStyle.borderStyle=borderStyle;// Re-apply the \"none\" overrides since borderStyle above is a shorthand.\nif(borderTop===0)containerStyle.borderTopStyle=\"none\";if(borderRight===0)containerStyle.borderRightStyle=\"none\";if(borderBottom===0)containerStyle.borderBottomStyle=\"none\";if(borderLeft===0)containerStyle.borderLeftStyle=\"none\";}const patternLayerStyle={position:\"absolute\",top:`${-rotationOffset}%`,left:`${-rotationOffset}%`,width:`${rotationScale*100}%`,height:`${rotationScale*100}%`,backgroundImage:pattern?`url(${pattern})`:\"none\",backgroundSize:`${repeatUnitWidth}px ${repeatUnitHeight}px`,backgroundPosition:`${offsetX}px ${offsetY}px`,backgroundRepeat:\"repeat\",opacity:patternOpacity,mixBlendMode:blendMode,transform:`rotate(${rotation}deg)`,transformOrigin:\"center center\",pointerEvents:\"none\"};return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:pattern?/*#__PURE__*/_jsx(\"div\",{style:patternLayerStyle}):/*#__PURE__*/_jsx(EmptyState,{borderRadius:borderRadius})});}/**\n * Placeholder shown on the canvas before a pattern image is uploaded.\n */function EmptyState({borderRadius}){return /*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"rgba(0, 0, 0, 0.4)\",fontFamily:\"-apple-system, BlinkMacSystemFont, 'Inter', sans-serif\",fontSize:13,textAlign:\"center\",padding:16,borderRadius},children:\"Upload a pattern image in the property panel\"});}FillPattern.defaultProps={pattern:\"\",backgroundColor:\"#F5F1EB\",tileType:\"uniform\",tileSize:80,tileWidth:80,tileHeight:80,spacingX:0,spacingY:0,offsetX:0,offsetY:0,rotation:0,patternOpacity:1,blendMode:\"normal\",borderRadius:0,clipContent:true,borderStyle:\"solid\",borderColor:\"#000000\",borderTop:0,borderRight:0,borderBottom:0,borderLeft:0};addPropertyControls(FillPattern,{// Pattern\npattern:{type:ControlType.Image,title:\"Pattern\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#F5F1EB\"},// Tile\ntileType:{type:ControlType.Enum,title:\"Tile Type\",options:[\"uniform\",\"custom\"],optionTitles:[\"Uniform\",\"Custom\"],displaySegmentedControl:true,defaultValue:\"uniform\"},tileSize:{type:ControlType.Number,title:\"Size\",defaultValue:80,min:1,max:1e3,step:1,unit:\"px\",hidden:props=>props.tileType!==\"uniform\"},tileWidth:{type:ControlType.Number,title:\"Width\",defaultValue:80,min:1,max:1e3,step:1,unit:\"px\",hidden:props=>props.tileType!==\"custom\"},tileHeight:{type:ControlType.Number,title:\"Height\",defaultValue:80,min:1,max:1e3,step:1,unit:\"px\",hidden:props=>props.tileType!==\"custom\"},spacingX:{type:ControlType.Number,title:\"Spacing X\",defaultValue:0,min:0,max:500,step:1,unit:\"px\"},spacingY:{type:ControlType.Number,title:\"Spacing Y\",defaultValue:0,min:0,max:500,step:1,unit:\"px\"},offsetX:{type:ControlType.Number,title:\"Offset X\",defaultValue:0,min:-500,max:500,step:1,unit:\"px\"},offsetY:{type:ControlType.Number,title:\"Offset Y\",defaultValue:0,min:-500,max:500,step:1,unit:\"px\"},// Appearance\nrotation:{type:ControlType.Number,title:\"Rotation\",defaultValue:0,min:-180,max:180,step:1,unit:\"\\xb0\"},patternOpacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:1,min:0,max:1,step:.01},blendMode:{type:ControlType.Enum,title:\"Blend Mode\",options:[\"normal\",\"multiply\",\"screen\",\"overlay\",\"darken\",\"lighten\",\"color-dodge\",\"color-burn\",\"hard-light\",\"soft-light\",\"difference\",\"exclusion\",\"hue\",\"saturation\",\"color\",\"luminosity\"],optionTitles:[\"Normal\",\"Multiply\",\"Screen\",\"Overlay\",\"Darken\",\"Lighten\",\"Color Dodge\",\"Color Burn\",\"Hard Light\",\"Soft Light\",\"Difference\",\"Exclusion\",\"Hue\",\"Saturation\",\"Color\",\"Luminosity\"],defaultValue:\"normal\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:500,step:1,unit:\"px\"},clipContent:{type:ControlType.Boolean,title:\"Clip\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},// Border\nborderStyle:{type:ControlType.Enum,title:\"Border Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\",\"groove\",\"ridge\",\"inset\",\"outset\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\",\"Groove\",\"Ridge\",\"Inset\",\"Outset\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#000000\"},borderTop:{type:ControlType.Number,title:\"Top\",defaultValue:0,min:0,max:100,step:1,unit:\"px\"},borderRight:{type:ControlType.Number,title:\"Right\",defaultValue:0,min:0,max:100,step:1,unit:\"px\"},borderBottom:{type:ControlType.Number,title:\"Bottom\",defaultValue:0,min:0,max:100,step:1,unit:\"px\"},borderLeft:{type:ControlType.Number,title:\"Left\",defaultValue:0,min:0,max:100,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FillPattern\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"400\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"400\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Fillpattern.map","// Generated by Framer (0f5ea8b)\nexport default function metadata(params,activeLocale){return{description:\"Most contractor losses are predictable. Common Forge helps you plan labor by skill, not just headcount. Less rework. Better crews. Stronger margins.\",favicon:\"https://framerusercontent.com/assets/ZRfsuQbXzzJEmW89yExHKhQxIQ.png\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/OHVowxp60VSlyPBL28oUasCUbo.png\",title:\"Common Forge | Skills-Based Labor Planning for Contractors\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"4JAWG,SAAwB,EAAY,EAAM,CAAC,GAAK,CACnD,UAAQ,kBACR,WAAS,WAAS,YAAU,aAAW,WAAS,WAAS,UAAQ,UACjE,WAAS,iBAAe,YAAU,eAAa,cAC/C,cAAY,cAAY,YAAU,cAAY,eAAa,aAAW,SAAO,EACvE,EAAe,IAAW,UAAU,EAAS,EAAgB,EAAgB,IAAW,UAAU,EAAS,EAG3G,EAAgB,EAAe,EAAe,EAAiB,EAAgB,EAEvC,EAAnB,IAAW,EAA+C,EAAJ,IAAY,GAAgB,EAAc,GAAG,EAAE,IAAU,EAAe,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,kBAAgB,eAAa,SAAS,EAAY,SAAS,UAAU,UAAU,aAAa,YAAY,QAAQ,cAAY,eAAe,EAAU,iBAAiB,EAAY,kBAAkB,EAAa,gBAAgB,EAAW,GAAG,EAAM,CAE3b,IAAY,IAAE,EAAe,eAAe,QAAU,IAAc,IAAE,EAAe,iBAAiB,QAAU,IAAe,IAAE,EAAe,kBAAkB,QAAU,IAAa,IAAE,EAAe,gBAAgB,SAC1M,EAAU,GAAG,EAAY,GAAG,EAAa,GAAG,EAAW,KAAmB,EAAe,YAAY,EACrH,IAAY,IAAE,EAAe,eAAe,QAAU,IAAc,IAAE,EAAe,iBAAiB,QAAU,IAAe,IAAE,EAAe,kBAAkB,QAAU,IAAa,IAAE,EAAe,gBAAgB,SAAQ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