{"version":3,"file":"GridBandV002.BoxjY4AP.mjs","names":["useRef","useState","__esmMin","init_npm_react_18_3_1","_e","p","c","init_jsx_runtime","ce","de","init_framer_DDfsYcI0","ControlType","addPropertyControls","GridBandV002","props","rp","CELL_H","rowPitch","nc","innerCols","ref","size","setSize","W","rows","fullBleed","el","ro","e","entries","width","height","w","CELL_W","h","verticals","centre","x","j","horizontals","rowCount","k","color","showBorder","y","init_GridBandV002"],"sources":["https:/framerusercontent.com/modules/YnJbIzrDMblf7iIo9tEu/8OkeFwy1cpNrG0ndZy1d/GridBandV002.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useRef,useState}from\"react\";const CELL_W=127.27;const CELL_H=81.82;const W=1400;/**\n * Blueprint grid band for the V002 home. 10 inner columns on a 127.27px\n * pitch, `rows` rows on an 81.82px pitch, optional outer border. In\n * `fullBleed` mode the component measures its container and extends the\n * column pattern outward from the centre, staying aligned with the\n * 1400px design column at any viewport width.\n *\n * @framerIntrinsicWidth 1400\n * @framerIntrinsicHeight 900\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function GridBandV002(props){const{color=\"#3d3d3d\",strokeWidth=1,opacity=.05,rows=11,showBorder=true,fullBleed=false}=props;const rp=Number.parseFloat(String(props.rowPitchPx??CELL_H));const rowPitch=Number.isFinite(rp)&&rp>4?rp:CELL_H;const nc=Math.round(Number.parseFloat(String(props.cols??10)));const innerCols=Number.isFinite(nc)&&nc>=1?nc:10;const ref=useRef(null);const[size,setSize]=useState({w:W,h:CELL_H*rows});useEffect(()=>{if(!fullBleed||!ref.current||typeof ResizeObserver===\"undefined\")return;const el=ref.current;const ro=new ResizeObserver(entries=>{for(const e of entries){const{width,height}=e.contentRect;if(width&&height)setSize({w:width,h:height});}});ro.observe(el);return()=>ro.disconnect();},[fullBleed]);const w=fullBleed?size.w:(innerCols+1)*CELL_W;const h=fullBleed?size.h:rowPitch*rows;const verticals=[];if(fullBleed){/* Columns mirror out from the centre so they line up with the\n           centred 1400 design column at every width. */const centre=w/2;for(let x=centre%CELL_W;x<w+1;x+=CELL_W)verticals.push(x);}else{for(let j=1;j<=innerCols;j++)verticals.push(CELL_W*j);}const horizontals=[];const rowCount=fullBleed?Math.ceil(h/rowPitch):rows;for(let k=1;k<rowCount;k++)horizontals.push(rowPitch*k);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{position:\"relative\",width:\"100%\",height:\"100%\",...props.style},children:/*#__PURE__*/_jsx(\"svg\",{width:\"100%\",height:\"100%\",viewBox:`0 0 ${w} ${h}`,preserveAspectRatio:\"none\",style:{display:\"block\",overflow:\"visible\",opacity},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsxs(\"g\",{fill:\"none\",stroke:color,strokeWidth:strokeWidth,vectorEffect:\"non-scaling-stroke\",children:[!fullBleed&&showBorder&&/*#__PURE__*/_jsx(\"rect\",{x:\"0\",y:\"0\",width:w,height:h,vectorEffect:\"non-scaling-stroke\"}),verticals.map(x=>/*#__PURE__*/_jsx(\"line\",{x1:x,y1:\"0\",x2:x,y2:h,vectorEffect:\"non-scaling-stroke\"},`v${x}`)),horizontals.map(y=>/*#__PURE__*/_jsx(\"line\",{x1:\"0\",y1:y,x2:w,y2:y,vectorEffect:\"non-scaling-stroke\"},`h${y}`))]})})});}addPropertyControls(GridBandV002,{color:{type:ControlType.Color,title:\"Line Color\",defaultValue:\"#3d3d3d\"},strokeWidth:{type:ControlType.Number,title:\"Thickness\",defaultValue:1,min:.5,max:4,step:.5},opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:.05,min:0,max:1,step:.01},rows:{type:ControlType.Number,title:\"Rows\",defaultValue:11,min:1,max:40,step:1},showBorder:{type:ControlType.Boolean,title:\"Border\",defaultValue:true},fullBleed:{type:ControlType.Boolean,title:\"Full Bleed\",defaultValue:false},rowPitchPx:{type:ControlType.Number,title:\"Row Pitch\",defaultValue:81.82,min:5,max:400,step:.01,unit:\"px\"},cols:{type:ControlType.Number,title:\"Inner Cols\",defaultValue:10,min:1,max:40,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GridBandV002\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"900\",\"framerIntrinsicWidth\":\"1400\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GridBandV002.map"],"mappings":"A,+LAWG,SAAwBa,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,UAAU,cAAY,EAAE,UAAQ,IAAI,OAAK,GAAG,aAAW,GAAK,YAAU,IAAOC,EAAYC,EAAG,OAAO,WAAW,OAAOD,EAAM,YAAYE,CAAM,CAAC,EAAQC,EAAS,OAAO,SAASF,CAAE,GAAGA,EAAG,EAAEA,EAAGC,EAAaE,EAAG,KAAK,MAAM,OAAO,WAAW,OAAOJ,EAAM,MAAM,EAAE,CAAC,CAAC,EAAQK,EAAU,OAAO,SAASD,CAAE,GAAGA,GAAI,EAAEA,EAAG,GAASE,EAAIpB,EAAO,IAAI,EAAO,CAACqB,EAAKC,GAASrB,EAAS,CAAC,EAAEsB,EAAE,EAAEP,EAAOQ,CAAI,CAAC,EAAEhB,MAAc,CAAC,GAAG,CAACiB,GAAW,CAACL,EAAI,SAAS,OAAO,eAAiB,IAAY,OAAO,IAAMM,EAAGN,EAAI,QAAcO,EAAG,IAAI,eAAe,GAAS,CAAC,IAAI,IAAMC,KAAKC,EAAQ,CAAC,GAAK,CAAC,QAAM,UAAQD,EAAE,YAAeE,GAAOC,GAAOT,EAAQ,CAAC,EAAEQ,EAAM,EAAEC,CAAM,CAAC,CAAE,CAAC,CAAC,EAAiB,OAAfJ,EAAG,QAAQD,CAAE,MAAYC,EAAG,WAAW,CAAE,E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