{"version":3,"file":"ThemeText.DtccCDJM.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/BgYsA55LjrcVDLaSLnMM/E4x1gieU6LTSGbgpoEgL/ThemeText.js"],"sourcesContent":["// ThemeText.tsx — Framer Code Component\n// Uses CSS var() for flash-free rendering\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// ── Theme data ───────────────────────────────────────────\nconst THEMES={yellow:{\"--accent\":\"#D2FF03\",\"--text-on-accent\":\"#10100F\",\"--accent-on-dark\":\"#D2FF03\"},blue:{\"--accent\":\"#0038FF\",\"--text-on-accent\":\"#FEFEFE\",\"--accent-on-dark\":\"#FEFEFE\"},orange:{\"--accent\":\"#FF6B00\",\"--text-on-accent\":\"#10100F\",\"--accent-on-dark\":\"#FF6B00\"}};const STORAGE_KEY=\"mc2-theme\";function getCookie(name){try{const match=document.cookie.match(new RegExp(`(?:^|; )${name}=([^;]*)`));return match?match[1]:null;}catch{}return null;}function getStoredTheme(){try{const match=window.location.hash.match(/mc2=(\\w+)/);if(match&&match[1]&&THEMES[match[1]])return match[1];}catch{}const fromCookie=getCookie(STORAGE_KEY);if(fromCookie&&THEMES[fromCookie])return fromCookie;try{const stored=localStorage.getItem(STORAGE_KEY);if(stored&&THEMES[stored])return stored;}catch{}return\"yellow\";}function applyCSSVars(themeName){const tokens=THEMES[themeName]||THEMES.yellow;const root=document.documentElement;for(const[key,value]of Object.entries(tokens)){root.style.setProperty(key,value);}}// ── Hook ─────────────────────────────────────────────────\nfunction useTheme(){const[theme,setTheme]=useState(()=>typeof window!==\"undefined\"?getStoredTheme():\"yellow\");useEffect(()=>{const stored=getStoredTheme();setTheme(stored);applyCSSVars(stored);const onChange=e=>{const name=e.detail;if(name&&THEMES[name]){setTheme(name);applyCSSVars(name);}};const onStorage=e=>{if(e.key===STORAGE_KEY&&e.newValue&&THEMES[e.newValue]){setTheme(e.newValue);applyCSSVars(e.newValue);}};window.addEventListener(\"themechange\",onChange);window.addEventListener(\"storage\",onStorage);return()=>{window.removeEventListener(\"themechange\",onChange);window.removeEventListener(\"storage\",onStorage);};},[]);return theme;}// ── Helpers ──────────────────────────────────────────────\nfunction parseBold(text,color){const parts=text.split(/(\\*\\*[^*]+\\*\\*)/);return parts.map((part,i)=>{if(part.startsWith(\"**\")&&part.endsWith(\"**\")){return /*#__PURE__*/_jsx(\"span\",{style:{fontWeight:700,color},children:part.slice(2,-2)},i);}return /*#__PURE__*/_jsx(\"span\",{children:part},i);});}export default function ThemeText({headingLine1=\"Focus.\",headingLine2=\"Systematic Thinking.\",headingLine3=\"Iteration.\",body=\"My logo captures how I work. The circle stands for **focus** — understanding the problem fully and keeping it central throughout the project. The squared letterforms reflect **systematic thinking**: structured, precise, intentional. And the squared notation shows **iteration**, because version two is always better than version one.\",token=\"--text-on-accent\",headingSize=36,headingLineHeight=1.2,headingGap=0,bodySize=18,bodyCenter=false,showHeading=true,showBody=true,paddingTop=0,paddingRight=0,paddingBottom=0,paddingLeft=0,gap=40}){useTheme();const fallback=THEMES.yellow[token]||\"#10100F\";const color=`var(${token}, ${fallback})`;return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap,width:\"100%\",height:\"100%\",padding:`${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,boxSizing:\"border-box\"},children:[showHeading&&/*#__PURE__*/_jsxs(\"div\",{style:{fontFamily:\"Inter, sans-serif\",fontWeight:700,fontSize:headingSize,lineHeight:headingLineHeight,letterSpacing:\"-0.03em\",color,display:\"flex\",flexDirection:\"column\",gap:headingGap},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:0},children:headingLine1}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0},children:headingLine2}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0},children:headingLine3})]}),showBody&&/*#__PURE__*/_jsx(\"p\",{style:{fontFamily:\"Inter, sans-serif\",fontWeight:400,fontSize:bodySize,lineHeight:1.2,color,margin:0,maxWidth:630,textAlign:bodyCenter?\"center\":\"left\",...bodyCenter&&{alignSelf:\"center\"}},children:parseBold(body,color)})]});}addPropertyControls(ThemeText,{token:{type:ControlType.Enum,title:\"Color Token\",options:[\"--text-on-accent\",\"--accent\",\"--accent-on-dark\"],optionTitles:[\"--text-on-accent\",\"--accent\",\"--accent-on-dark\"],defaultValue:\"--text-on-accent\"},showHeading:{type:ControlType.Boolean,title:\"Show Heading\",defaultValue:true},headingLine1:{type:ControlType.String,title:\"Heading Line 1\",defaultValue:\"Focus.\",hidden:props=>!props.showHeading},headingLine2:{type:ControlType.String,title:\"Heading Line 2\",defaultValue:\"Systematic Thinking.\",hidden:props=>!props.showHeading},headingLine3:{type:ControlType.String,title:\"Heading Line 3\",defaultValue:\"Iteration.\",hidden:props=>!props.showHeading},headingSize:{type:ControlType.Number,title:\"Heading Size\",defaultValue:36,min:12,max:140,step:1,hidden:props=>!props.showHeading},headingLineHeight:{type:ControlType.Number,title:\"Heading Line Height\",defaultValue:1.2,min:.8,max:2.5,step:.05,hidden:props=>!props.showHeading},headingGap:{type:ControlType.Number,title:\"Heading Line Gap\",defaultValue:0,min:0,max:60,step:1,hidden:props=>!props.showHeading},showBody:{type:ControlType.Boolean,title:\"Show Body\",defaultValue:true},body:{type:ControlType.String,title:\"Body\",defaultValue:\"My logo captures how I work. The circle stands for **focus** — understanding the problem fully and keeping it central throughout the project. The squared letterforms reflect **systematic thinking**: structured, precise, intentional. And the squared notation shows **iteration**, because version two is always better than version one.\",displayTextArea:true,hidden:props=>!props.showBody},bodySize:{type:ControlType.Number,title:\"Body Size\",defaultValue:18,min:10,max:72,step:1,hidden:props=>!props.showBody},bodyCenter:{type:ControlType.Boolean,title:\"Center Body\",defaultValue:false,hidden:props=>!props.showBody},paddingTop:{type:ControlType.Number,title:\"Padding Top\",defaultValue:0,min:0,max:200,step:1},paddingRight:{type:ControlType.Number,title:\"Padding Right\",defaultValue:0,min:0,max:200,step:1},paddingBottom:{type:ControlType.Number,title:\"Padding Bottom\",defaultValue:0,min:0,max:200,step:1},paddingLeft:{type:ControlType.Number,title:\"Padding Left\",defaultValue:0,min:0,max:200,step:1},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:40,min:0,max:120,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ThemeText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ThemeText.map"],"mappings":"sMAGmT,SAAS,EAAU,EAAK,CAAC,GAAG,CAAC,IAAM,EAAM,SAAS,OAAO,MAAU,OAAO,WAAW,EAAK,UAAU,CAAC,CAAC,OAAO,EAAM,EAAM,GAAG,UAAW,EAAE,OAAO,KAAM,SAAS,GAAgB,CAAC,GAAG,CAAC,IAAM,EAAM,EAAO,SAAS,KAAK,MAAM,YAAY,CAAC,GAAG,GAAO,EAAM,IAAI,EAAO,EAAM,IAAI,OAAO,EAAM,QAAS,EAAE,IAAM,EAAW,EAAU,EAAY,CAAC,GAAG,GAAY,EAAO,GAAY,OAAO,EAAW,GAAG,CAAC,IAAM,EAAO,aAAa,QAAQ,EAAY,CAAC,GAAG,GAAQ,EAAO,GAAQ,OAAO,OAAa,EAAE,MAAM,SAAU,SAAS,EAAa,EAAU,CAAC,IAAM,EAAO,EAAO,IAAY,EAAO,OAAa,EAAK,SAAS,gBAAgB,IAAI,GAAK,CAAC,EAAI,KAAS,OAAO,QAAQ,EAAO,CAAE,EAAK,MAAM,YAAY,EAAI,EAAM,CAC1+B,SAAS,GAAU,CAAC,GAAK,CAAC,EAAM,GAAUA,MAAoB,IAAS,OAA6B,SAAjB,GAAgB,CAAU,CAAugB,OAAtgB,MAAc,CAAC,IAAM,EAAO,GAAgB,CAAC,EAAS,EAAO,CAAC,EAAa,EAAO,CAAC,IAAM,EAAS,GAAG,CAAC,IAAM,EAAK,EAAE,OAAU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