{"version":3,"file":"Logo_Distribution.YftSdSnT.mjs","names":["useRef","useState","useCallback","useMemo"],"sources":["https:/framerusercontent.com/modules/6CXwmwXpRUIUq5moKRT2/1Tw9odzmpowGFvEmJ0ZE/Logo_Distribution.js"],"sourcesContent":["// Component that distributes 12 items equally around a circle with visible stroke\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useMemo,useRef,useEffect,useState,useCallback}from\"react\";import{motion}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function RadialDistribution(props){const{itemCount=12,itemSize=56,itemColor=\"#0099FF\",strokeColor=\"#CCCCCC\",strokeWidth=2,showStroke=true,itemShape=\"circle\",animate=false,animationDuration=2,animationDirection=\"clockwise\",images=[]}=props;const containerRef=useRef(null);const[dimensions,setDimensions]=useState({width:200,height:200});const isStatic=useIsStaticRenderer();// Debounced resize handler to prevent excessive updates\nconst updateSize=useCallback(()=>{if(containerRef.current){const rect=containerRef.current.getBoundingClientRect();setDimensions(prev=>{// Only update if dimensions actually changed\nif(prev.width!==rect.width||prev.height!==rect.height){return{width:rect.width,height:rect.height};}return prev;});}},[]);useEffect(()=>{// Initial size calculation\nupdateSize();if(typeof window!==\"undefined\"&&!isStatic){let timeoutId;const debouncedUpdate=()=>{clearTimeout(timeoutId);timeoutId=window.setTimeout(updateSize,16)// ~60fps throttle\n;};const resizeObserver=new ResizeObserver(debouncedUpdate);if(containerRef.current){resizeObserver.observe(containerRef.current);}return()=>{clearTimeout(timeoutId);resizeObserver.disconnect();};}},[updateSize,isStatic]);// Memoize expensive calculations - only recalculate when dependencies change\nconst{containerSize,radius,centerX,centerY,items}=useMemo(()=>{const containerSize=Math.min(dimensions.width,dimensions.height);const radius=(containerSize-itemSize-strokeWidth*2)/2;const centerX=dimensions.width/2;const centerY=dimensions.height/2;const angleStep=2*Math.PI/itemCount;const items=Array.from({length:itemCount},(_,index)=>{const angle=index*angleStep-Math.PI/2// Start from top\n;const x=centerX+radius*Math.cos(angle)-itemSize/2;const y=centerY+radius*Math.sin(angle)-itemSize/2;return{x,y,key:index,image:images[index]||null};});return{containerSize,radius,centerX,centerY,items};},[itemCount,itemSize,images,dimensions.width,dimensions.height,strokeWidth]);// Animation variants for better performance\nconst containerVariants={animate:animate?{rotate:animationDirection===\"clockwise\"?360:-360}:{}};const itemVariants={animate:animate?{rotate:animationDirection===\"clockwise\"?-360:360}:{}};const transition={duration:animationDuration,repeat:animate?Infinity:0,ease:\"linear\",// Use will-change for better performance\nwillChange:animate?\"transform\":\"auto\"};return /*#__PURE__*/_jsxs(motion.div,{ref:containerRef,style:{position:\"relative\",width:\"100%\",height:\"100%\",pointerEvents:\"none\",userSelect:\"none\",// Hardware acceleration\ntransform:\"translate3d(0, 0, 0)\",willChange:animate?\"transform\":\"auto\",...props.style},variants:containerVariants,animate:animate&&!isStatic?\"animate\":\"\",transition:transition,children:[showStroke&&/*#__PURE__*/_jsx(\"svg\",{width:dimensions.width,height:dimensions.height,style:{position:\"absolute\",top:0,left:0},children:/*#__PURE__*/_jsx(\"circle\",{cx:centerX,cy:centerY,r:radius,fill:\"none\",stroke:strokeColor,strokeWidth:strokeWidth})}),items.map(item=>/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",left:item.x,top:item.y,width:itemSize,height:itemSize,backgroundColor:item.image?\"transparent\":itemColor,borderRadius:item.image?\"0\":itemShape===\"circle\"?\"50%\":\"0\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"hidden\",// Hardware acceleration\n    transform:\"translate3d(0, 0, 0)\",willChange:animate?\"transform\":\"auto\"},variants:itemVariants,animate:animate&&!isStatic?\"animate\":\"\",transition:transition,children:item.image?/*#__PURE__*/_jsx(\"img\",{src:item.image.src,alt:item.image.alt,style:{width:\"100%\",height:\"100%\",objectFit:\"contain\"}}):null},item.key))]});}addPropertyControls(RadialDistribution,{itemCount:{type:ControlType.Number,title:\"Item Count\",defaultValue:12,min:3,max:24,step:1},itemSize:{type:ControlType.Number,title:\"Item Size\",defaultValue:56,min:5,max:128,step:1,unit:\"px\"},itemColor:{type:ControlType.Color,title:\"Item Color\",defaultValue:\"#0099FF\"},itemShape:{type:ControlType.Enum,title:\"Item Shape\",options:[\"circle\",\"square\"],optionTitles:[\"Circle\",\"Square\"],defaultValue:\"circle\",displaySegmentedControl:true},images:{type:ControlType.Array,title:\"Images\",control:{type:ControlType.ResponsiveImage},maxCount:24},showStroke:{type:ControlType.Boolean,title:\"Show Circle\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},strokeColor:{type:ControlType.Color,title:\"Circle Color\",defaultValue:\"#CCCCCC\",hidden:({showStroke})=>!showStroke},strokeWidth:{type:ControlType.Number,title:\"Circle Width\",defaultValue:2,min:1,max:10,step:1,unit:\"px\",hidden:({showStroke})=>!showStroke},animate:{type:ControlType.Boolean,title:\"Animate\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},animationDuration:{type:ControlType.Number,title:\"Duration\",defaultValue:70,min:1,max:120,step:1,unit:\"s\",hidden:({animate})=>!animate},animationDirection:{type:ControlType.Enum,title:\"Direction\",options:[\"clockwise\",\"counterclockwise\"],optionTitles:[\"Clockwise\",\"Counter-clockwise\"],defaultValue:\"clockwise\",displaySegmentedControl:true,hidden:({animate})=>!animate}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RadialDistribution\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Logo_Distribution.map"],"mappings":"+QAIG,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,YAAU,GAAG,WAAS,GAAG,YAAU,UAAU,cAAY,UAAU,cAAY,EA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