{"version":3,"file":"SchemaJsonLd.DRR-a6pm.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/mfweyabZKLLWS7snCQ13/OJZwUbKWVImFaOVUYd3A/SchemaJsonLd.js"],"sourcesContent":["// User request: Create a new code component file \"SEO/SchemaJsonLd.tsx\" with display name \"Schema JSON-LD\". Purpose: inject Schema.org structured data into the page for SEO. It must render ONLY a `<script type=\"application/ld+json\">` element via dangerouslySetInnerHTML (so it is server-side rendered into the static HTML and readable by Google). Expose a single property control `json` (ControlType.String, displayTextArea: true, title \"JSON-LD\") with a minimal default like {\"@context\":\"https://schema.org\",\"@type\":\"Organization\",\"name\":\"Example\"}. Before rendering, try JSON.parse + JSON.stringify to minify/validate; if invalid, render nothing in production but on canvas (RenderTarget.current() === RenderTarget.canvas) show a small red text \"Invalid JSON-LD\". On canvas when valid, render a tiny unobtrusive label \"Schema JSON-LD\" (11px, gray) so the user can find it; on live site render only the script tag with no visible output. Escape \"</\" as \"<\\/\" in the output string to avoid breaking the script tag. Use @framerSupportedLayoutWidth auto and @framerSupportedLayoutHeight auto. No other controls.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function SchemaJsonLd(props){const{json}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const processedJson=useMemo(()=>{try{const parsed=JSON.parse(json);const minified=JSON.stringify(parsed);return{isValid:true,escaped:minified.replace(/<\\//g,\"<\\\\/\")};}catch(error){return{isValid:false,escaped:\"\"};}},[json]);if(!processedJson.isValid){if(isCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",fontSize:11,lineHeight:1.2,color:\"#d32f2f\",width:\"max-content\"},children:\"Invalid JSON-LD\"});}return null;}if(isCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",fontSize:11,lineHeight:1.2,color:\"#888888\",width:\"max-content\"},children:\"Schema JSON-LD\"});}return /*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:processedJson.escaped}});}SchemaJsonLd.displayName=\"Schema JSON-LD\";addPropertyControls(SchemaJsonLd,{json:{type:ControlType.String,title:\"JSON-LD\",displayTextArea:true,defaultValue:'{\"@context\":\"https://schema.org\",\"@type\":\"Organization\",\"name\":\"Example\"}'}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SchemaJsonLd\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SchemaJsonLd.map"],"mappings":"iLAIG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,EAAY,EAAS,EAAa,QAAQ,IAAI,EAAa,OAAa,EAAcA,MAAY,CAAC,GAAG,CAAC,IAAM,EAAO,KAAK,MAAM,CAAI,EAAwC,MAAM,CAAC,QAAQ,GAAK,QAA3C,KAAK,UAAU,CAA2C,CAAC,CAAC,QAAQ,OAAO,MAAM,CAAC,CAAE,MAAa,CAAC,MAAM,CAAC,QAAQ,GAAM,QAAQ,EAAE,CAAE,CAAC,EAAE,CAAC,CAAI,CAAC,EAAqX,OAA/W,EAAc,QAA+L,EAA8B,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,SAAS,GAAG,WAAW,IAAI,MAAM,UAAU,MAAM,aAAa,EAAE,SAAS,gBAAgB,CAAC,EAAuB,EAAK,SAAS,CAAC,KAAK,sBAAsB,wBAAwB,CAAC,OAAO,EAAc,OAAO,CAAC,CAAC,EAA1c,EAA8B,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,SAAS,GAAG,WAAW,IAAI,MAAM,UAAU,MAAM,aAAa,EAAE,SAAS,iBAAiB,CAAC,EAAU,IAAkS,iBAH7xB,IAA2B,IAAiE,EAGksB,EAAa,YAAY,iBAAiB,EAAoB,EAAa,CAAC,KAAK,CAAC,KAAK,EAAY,OAAO,MAAM,UAAU,gBAAgB,GAAK,aAAa,2EAA2E,CAAC,CAAC"}