{"version":3,"file":"TextMaker.CLaJC35d.mjs","names":["_Fragment"],"sources":["https:/framerusercontent.com/modules/vB7uAKQ1uUfhaDP8V1cI/a4Vqe3mw6HVVghciQ4ci/TextMaker.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\":{\"withRedMarker\":{\"type\":\"reactHoc\",\"name\":\"withRedMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withYellowMarker\":{\"type\":\"reactHoc\",\"name\":\"withYellowMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPinkMarker\":{\"type\":\"reactHoc\",\"name\":\"withPinkMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGreenMarker\":{\"type\":\"reactHoc\",\"name\":\"withGreenMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOrangeMarker\":{\"type\":\"reactHoc\",\"name\":\"withOrangeMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBlueMarker\":{\"type\":\"reactHoc\",\"name\":\"withBlueMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextMaker.map"],"mappings":"yKAA4G,SAAS,EAAgB,EAAgB,CAAC,OAAO,SAAS,EAAU,CAAC,MAAO,KAAQ,MAAc,CAAgB,SAAS,iBAAiB,IAAI,EAAM,YAAY,CAAU,QAAQ,GAAS,CAChM,EAAQ,UAD4M,EAAQ,UACtS,QAAQ,kBAAkB,EAAE,IAAQ,eAAe,EAAM,gBAAgB,EAAiC,EAAG,CAAC,EAAM,CAAC,CAAqB,EAAMA,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS;GACrO,EAAM,UAAU;;iBAEF,EAAgB;;;GAG9B,EAAM,UAAU;;;;;;;;;;;;;;;;EAgBjB,CAAC,CAAc,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,CAAC,CAAC,CAAC,GAAM,SAAgB,EAAiB,EAAU,CAAC,OAAO,EAAgB,yBAAyB,CAAC,EAAU,CAAE,SAAgB,EAAe,EAAU,CAAC,OAAO,EAAgB,yBAAyB,CAAC,EAAU,kBAvBnL,IAA6B"}