{"version":3,"file":"TextMaker.07nEsQSV.mjs","names":["_Fragment"],"sources":["https:/framerusercontent.com/modules/DRN4Xz3UXfEAQGbOBgm0/fb8H70R4FZvPjeLG8f20/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\"}},\"withOrangeMarker\":{\"type\":\"reactHoc\",\"name\":\"withOrangeMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPinkMarker\":{\"type\":\"reactHoc\",\"name\":\"withPinkMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBlueMarker\":{\"type\":\"reactHoc\",\"name\":\"withBlueMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGreenMarker\":{\"type\":\"reactHoc\",\"name\":\"withGreenMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withYellowMarker\":{\"type\":\"reactHoc\",\"name\":\"withYellowMarker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextMaker.map"],"mappings":"yKAA4G,SAAS,EAAgB,EAAgB,CAAC,OAAO,SAAS,EAAU,CAAC,MAAO,CAAA,IAAQ,EAAU,IAAI,CAAC,IAAM,EAAS,SAAS,kBAAkB,GAAG,EAAM,YAAY,CAAC,EAAS,QAAQ,GAAS,CAAC,IAAM,EAAa,EAAQ,UAC/T,EAAY,EAAa,QAAQ,iBAAiB,CAAC,EAAE,KAAS,cAAc,EAAM,gBAAgB,CAAC,EAAQ,UAAU,CAAa,EAAC,AAAE,EAAC,CAAC,CAAM,EAAC,CAAqB,EAAMA,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,UAAU;GACtO,EAAM,UAAU;;iBAEF,EAAgB;;;GAG9B,EAAM,UAAU;;;;;;;;;;;;;;;;CAgBjB,EAAC,CAAc,EAAK,EAAU,CAAC,GAAG,CAAM,EAAC,AAAC,CAAC,EAAC,CAAI,CAAE,UAAgB,EAAiB,EAAU,CAAC,MAAO,GAAgB,yBAAyB,CAAC,EAAU,AAAE,cAvB7J,GAA+E,IAA6B"}