{"version":3,"file":"GlassSlab.BsP7vUAn.mjs","names":["_Fragment"],"sources":["https:/framerusercontent.com/modules/kMMYS8UBn6GnLD47s0s6/owmo08TCoV4k0Gt2mIUB/GlassSlab.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{ControlType}from\"framer\";/*\n * GlassSlab — the shared acrylic-cube card body used by both ProjectCard and\n * ProjectCarousel. Import from \"./GlassSlab\" so every slider (thickness,\n * border, tints, opacities, grain, edge lines, shadow) is defined in exactly\n * one place and both components stay in sync.\n *\n * Geometry: a closed box. The front face sits at z = 0, the back face at\n * z = -thickness, and the four side faces are hinged exactly on the front\n * face's edges and rotated 90° — no pixel trims. Hinged planes share their\n * corner lines exactly, so the corners meet by construction; the old ±1px\n * insets were what carved notches at every corner.\n */// Grain texture for frosted acrylic faces — opacity is parameterized so it\n// can be driven by a slider. Baked into the SVG so it scales with the face.\nconst grainUrl=opacity=>`url(\"data:image/svg+xml,%3Csvg%20xmlns%3D%27http://www.w3.org/2000/svg%27%20width%3D%27200%27%20height%3D%27200%27%3E%3Cfilter%20id%3D%27g%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.65%27%20numOctaves%3D%274%27%20stitchTiles%3D%27stitch%27/%3E%3CfeColorMatrix%20type%3D%27saturate%27%20values%3D%270%27/%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url(%23g)%27%20opacity%3D%27${opacity}%27/%3E%3C%2Fsvg%3E\")`;// Convert any CSS color (hex, rgb, rgba) into rgba() with a custom alpha.\n// Framer's Color control often resolves to \"rgb(...)\" rather than hex.\nconst withAlpha=(color,alpha)=>{if(typeof color!==\"string\")return`rgba(0,0,0,${alpha})`;const c=color.trim();if(c[0]===\"#\"){let h=c.slice(1);if(h.length===3)h=h.split(\"\").map(x=>x+x).join(\"\");const r=parseInt(h.slice(0,2),16);const g=parseInt(h.slice(2,4),16);const b=parseInt(h.slice(4,6),16);return`rgba(${r}, ${g}, ${b}, ${alpha})`;}const m=c.match(/rgba?\\(([^)]+)\\)/);if(m){const[r,g,b]=m[1].split(\",\").map(s=>s.trim());return`rgba(${r}, ${g}, ${b}, ${alpha})`;}return c// named color / var() — can't re-alpha, use as-is\n;};// Directional shading wash — positive lightens (light catches the face),\n// negative darkens (face turned away from the light). Implies a top-down\n// light source consistent with the floor shadow under the card.\nconst shadeLayer=shade=>{const col=shade>=0?`rgba(255,255,255,${shade})`:`rgba(0,0,0,${-shade})`;return`linear-gradient(${col}, ${col})`;};// Layers that would be invisible (grain 0, no shading) are left out entirely:\n// the grain is an SVG noise filter, and even at opacity 0 the browser still\n// renders it for every face, which is costly on iPad while the stack moves.\nconst faceStyle=(tint,opacity,grain,shade)=>{const layers=[];const sizes=[];if(grain>0){layers.push(grainUrl(grain));sizes.push(\"200px 200px\");}if(shade!==0){layers.push(shadeLayer(shade));sizes.push(\"100% 100%\");}return{backgroundColor:withAlpha(tint,opacity),backgroundImage:layers.length?layers.join(\", \"):\"none\",backgroundSize:sizes.length?sizes.join(\", \"):\"auto\"};};// Reference design width: Thickness / Border (and lift + shadow) are\n// specified as if the card were 350px wide; callers pass scale = width / 350\n// so the card is a perfect scaled copy of the reference at any size.\nexport const REF_WIDTH=350;export function GlassSlab({scale=1,cardThickness=25,borderWidth=5,borderTint=\"#ffffff\",borderOpacity=1,borderGrain=0,edgeTint=\"#ffffff\",edgeOpacity=.35,edgeGrain=.28,lightContrast=.6,edgeLines=.5,edgeLineTint=\"#ffffff\",shadowIntensity=1,cornerReveal=true,lift=0,isHovered=false,children,back=null}){const t=cardThickness*scale;const b=borderWidth*scale;// Bright seam lines along every edge — this is what makes the reference\n// cube read as one object. Drawn as a 1px inset ring on each face, so all\n// 12 box edges get a rim without any extra geometry.\nconst rim=edgeLines>0?`inset 0 0 0 1px ${withAlpha(edgeLineTint,edgeLines)}`:\"none\";// See-through faces (glass) want visible backfaces so the inside of the\n// far wall reads through the near one, exactly like real acrylic.\nconst backface=cornerReveal?\"visible\":\"hidden\";const side=shade=>({position:\"absolute\",...faceStyle(edgeTint,edgeOpacity,edgeGrain,shade*lightContrast),backfaceVisibility:backface,boxShadow:rim});return /*#__PURE__*/_jsxs(_Fragment,{children:[shadowIntensity>0&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",bottom:0,left:\"50%\",width:\"100%\",height:70*scale,background:\"radial-gradient(closest-side, rgba(0,0,0,1) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0) 100%)\",pointerEvents:\"none\",transform:isHovered?`translateX(-50%) translateY(${58*scale}px) scale(1.35, 1.8)`:`translateX(-50%) translateY(${28*scale}px) scale(0.85, 1)`,opacity:(isHovered?.15:.6)*shadowIntensity,transition:\"transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.45s ease\"}}),/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",transform:`translateY(-${lift}px)`,transition:\"transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1)\"},children:[back?/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",inset:0,transform:`translateZ(${-t}px) rotateY(180deg)`,boxSizing:\"border-box\",padding:b,...faceStyle(borderTint,borderOpacity,borderGrain,0),overflow:\"hidden\",backfaceVisibility:backface,boxShadow:rim},children:[back,edgeLines>0&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,boxSizing:\"border-box\",border:`1px solid ${withAlpha(edgeLineTint,edgeLines)}`,pointerEvents:\"none\"}})]}):/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,transform:`translateZ(${-t}px)`,...faceStyle(edgeTint,edgeOpacity,edgeGrain,-.25*lightContrast),backfaceVisibility:backface,boxShadow:rim}}),/*#__PURE__*/_jsx(\"div\",{style:{...side(-.15),top:0,left:\"100%\",width:t,height:\"100%\",transformOrigin:\"left center\",transform:\"rotateY(90deg)\"}}),/*#__PURE__*/_jsx(\"div\",{style:{...side(-.15),top:0,right:\"100%\",width:t,height:\"100%\",transformOrigin:\"right center\",transform:\"rotateY(-90deg)\"}}),/*#__PURE__*/_jsx(\"div\",{style:{...side(-.4),top:\"100%\",left:0,width:\"100%\",height:t,transformOrigin:\"top center\",transform:\"rotateX(-90deg)\"}}),/*#__PURE__*/_jsx(\"div\",{style:{...side(.18),bottom:\"100%\",left:0,width:\"100%\",height:t,transformOrigin:\"bottom center\",transform:\"rotateX(90deg)\"}}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",boxSizing:\"border-box\",padding:b,...faceStyle(borderTint,borderOpacity,borderGrain,0),overflow:\"hidden\"},children:[children,edgeLines>0&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,boxSizing:\"border-box\",border:`1px solid ${withAlpha(edgeLineTint,edgeLines)}`,pointerEvents:\"none\"}})]})]})]});}// Slight bleed closes the hairline between the image and the border frame.\nexport const frontImageStyle={width:\"calc(100% + 2px)\",height:\"calc(100% + 2px)\",margin:-1,objectFit:\"cover\",display:\"block\",pointerEvents:\"none\",userSelect:\"none\"};// One set of property controls shared by both components — spread this into\n// addPropertyControls() so the panels can never drift apart.\nexport const slabControls={cardThickness:{type:ControlType.Number,title:\"Thickness\",defaultValue:25,min:0,max:60,step:1,description:\"Box depth at 350px card width — scales with size\"},borderWidth:{type:ControlType.Number,title:\"Border\",defaultValue:5,min:0,max:60,step:1,description:\"Frame width at 350px card width — scales with size\"},borderTint:{type:ControlType.Color,title:\"Border Tint\",defaultValue:\"#ffffff\",hidden:props=>!props.borderWidth},borderOpacity:{type:ControlType.Number,title:\"Border Opacity\",defaultValue:1,min:0,max:1,step:.01,displayStepper:true,hidden:props=>!props.borderWidth},borderGrain:{type:ControlType.Number,title:\"Border Grain\",defaultValue:0,min:0,max:1,step:.01,displayStepper:true,description:\"Frosted texture on the frame\",hidden:props=>!props.borderWidth},edgeTint:{type:ControlType.Color,title:\"Edge Tint\",defaultValue:\"#ffffff\"},edgeOpacity:{type:ControlType.Number,title:\"Edge Opacity\",defaultValue:.35,min:0,max:1,step:.01,displayStepper:true},edgeGrain:{type:ControlType.Number,title:\"Edge Grain\",defaultValue:.28,min:0,max:1,step:.01,displayStepper:true,description:\"Texture amount on the box sides\"},lightContrast:{type:ControlType.Number,title:\"Edge Light\",defaultValue:.6,min:0,max:3,step:.05,displayStepper:true,description:\"Top-lit contrast between faces\"},edgeLines:{type:ControlType.Number,title:\"Edge Lines\",defaultValue:.5,min:0,max:1,step:.01,displayStepper:true,description:\"Seam lines along the cube edges — 0 hides them\"},edgeLineTint:{type:ControlType.Color,title:\"Line Tint\",defaultValue:\"#ffffff\",description:\"Color of the seam lines\",hidden:props=>!props.edgeLines},shadowIntensity:{type:ControlType.Number,title:\"Shadow\",defaultValue:1,min:0,max:1.5,step:.05,displayStepper:true,description:\"Floor shadow strength — 0 hides it\"},cornerReveal:{type:ControlType.Boolean,title:\"See Through\",defaultValue:true,description:\"Show the inside of far walls through translucent faces\"}};\nexport const __FramerMetadata__ = {\"exports\":{\"GlassSlab\":{\"type\":\"reactComponent\",\"name\":\"GlassSlab\",\"slots\":[\"children\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"frontImageStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"REF_WIDTH\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"slabControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GlassSlab.map"],"mappings":"mKAyB2B,SAAgB,EAAU,CAAC,QAAM,EAAE,gBAAc,GAAG,cAAY,EAAE,aAAW,UAAU,gBAAc,EAAE,cAAY,EAAE,WAAS,UAAU,cAAY,IAAI,YAAU,IAAI,gBAAc,GAAG,YAAU,GAAG,eAAa,UAAU,kBAAgB,EAAE,eA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