{"version":3,"file":"TextMarker.BLlabOn4.mjs","names":["_Fragment","__esmMin","init_npm_react_18_3_1","l","p","c","init_jsx_runtime","ce","createMarkerHOC","props","element","match","backgroundColor","Component","withOrangeMarker","init_TextMarker"],"sources":["https:/framerusercontent.com/modules/bQQM1js2VShuPRkY81bU/n4pkeh1XWqcx0CT1uC0s/TextMarker.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect}from\"react\";function createMarkerHOC(backgroundColor){return function(Component){return props=>{useEffect(()=>{const elements=document.querySelectorAll(`.${props.className}`);elements.forEach(element=>{const originalHTML=element.innerHTML;// \"**...**\" を <mark><span>...</span></mark> に変換\nconst updatedHTML=originalHTML.replace(/\\*\\*(.+?)\\*\\*/g,(_,match)=>`<mark><span>${match}</span></mark>`);element.innerHTML=updatedHTML;});},[props]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n.${props.className} mark {\n  background: transparent;\n  --highlight: ${backgroundColor};\n}\n\n.${props.className} mark span {\n  /* 下方向をメインに塗るため、斜め（120度）の境界を作りつつ background-position で下に寄せる */\n  background: linear-gradient(\n      120deg,\n      var(--highlight) 50%,\n      transparent 50%\n  ) no-repeat;\n\n  /* まずはサイズ: 幅200%, 高さ50% にして「行全体の下50%を塗る」イメージ */\n  background-size: 200% 50%;\n  /* 位置を left bottom にして、要素の左下を基点に配置 */\n  background-position: left bottom;\n\n  /* テキスト色は変えない */\n  color: inherit;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props})]});};};}export function withYellowMarker(Component){return createMarkerHOC(\"rgba(255, 255, 0, 0.8)\")(Component);}export function withBlueMarker(Component){return createMarkerHOC(\"rgba(0, 128, 255, 0.5)\")(Component);}export function withPinkMarker(Component){return createMarkerHOC(\"rgba(255, 182, 193, 0.8)\")(Component);}export function withGreenMarker(Component){return createMarkerHOC(\"rgba(144, 238, 144, 0.8)\")(Component);}export function withOrangeMarker(Component){return createMarkerHOC(\"rgba(255, 195, 0, 0.8)\")(Component);}export function withRedMarker(Component){return createMarkerHOC(\"rgba(255, 0, 0, 0.5)\")(Component);}\nexport const __FramerMetadata__ = {\"exports\":{\"withBlueMarker\":{\"type\":\"reactHoc\",\"name\":\"withBlueMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPinkMarker\":{\"type\":\"reactHoc\",\"name\":\"withPinkMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withYellowMarker\":{\"type\":\"reactHoc\",\"name\":\"withYellowMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGreenMarker\":{\"type\":\"reactHoc\",\"name\":\"withGreenMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOrangeMarker\":{\"type\":\"reactHoc\",\"name\":\"withOrangeMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRedMarker\":{\"type\":\"reactHoc\",\"name\":\"withRedMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextMarker.map"],"mappings":"A,gIAA4G,SAASQ,EAAgB,EAAgB,CAAC,OAAO,SAAS,EAAU,CAAC,MAAO,KAAQD,MAAc,CAAiE,SAAxC,iBAAiB,IAAIE,EAAM,WAAoB,CAAC,CAAC,QAAQ,GAAS,CAChM,EAAQ,UAD4MC,EAAQ,UACtS,QAAQ,kBAAkB,EAAE,IAAQ,eAAeC,EAAM,eAA6C,CAAE,CAAC,CAAE,EAAE,CAACF,CAAK,CAAC,EAAsB,gBAAMT,EAAU,CAAC,SAAS,CAAc,gBAAK,QAAQ,CAAC,SAAS;GACrOS,EAAM,UAAU;;iBAEFG,EAAgB;;;GAG9BH,EAAM,UAAU;;;;;;;;;;;;;;;;CAgBlB,CAAC,EAAe,gBAAKI,EAAU,CAAC,GAAGJ,CAAK,CAAC,CAAC,CAAC,CAAC,EAAI,CAAE,CAAoa,SAAgBK,EAAiB,EAAU,CAAC,OAAON,EAAgB,wBAAwB,CAAC,CAACK,CAAS,CAAE,C"}