{"version":3,"file":"FAQSchema.dB2bK080.mjs","names":["useMemo","__esmMin","init_npm_react_18_3_1","pe","init_jsx_runtime","c","p","addPropertyControls","RenderTarget","init_framer_DxfB3JJo","ControlType","FAQSchema","props","json","data","items","i","init_FAQSchema"],"sources":["https:/framerusercontent.com/modules/2LaDgnUZdNMKyJB8Df6g/qMgAqEd1UFCuUPKVaaD3/FAQSchema.js"],"sourcesContent":["// User request: add FAQPage JSON-LD schema to the website's FAQ sections for indexing and SEO.\n// Drop one instance inside each FAQ section and fill in the Q&A list in the properties panel.\n// It renders an invisible <script type=\"application/ld+json\"> on the published site\n// (server-rendered, so crawlers see it in the HTML). On the canvas it shows a small label.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useMemo}from\"react\";/**\n * FAQ Schema (JSON-LD)\n *\n * @framerIntrinsicWidth 160\n * @framerIntrinsicHeight 24\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function FAQSchema(props){const{items=[]}=props;const json=useMemo(()=>{const clean=items.filter(i=>i&&i.question?.trim()&&i.answer?.trim());const data={\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",mainEntity:clean.map(i=>({\"@type\":\"Question\",name:i.question.trim(),acceptedAnswer:{\"@type\":\"Answer\",text:i.answer.trim()}}))};// Escape \"<\" so answer text can never close the script tag\nreturn JSON.stringify(data).replace(/</g,\"\\\\u003c\");},[items]);const isCanvas=RenderTarget.current()===RenderTarget.canvas;if(isCanvas){return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",padding:\"4px 8px\",borderRadius:6,background:\"#F5F5F5\",color:\"#666\",fontSize:11,fontFamily:\"monospace\",minWidth:\"max-content\"},children:[\"FAQ Schema \\xb7 \",items.length,\" Q&A\"]});}return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:0,height:0,overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:json}})});}addPropertyControls(FAQSchema,{items:{type:ControlType.Array,title:\"Q&A\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\",defaultValue:\"Question?\"},answer:{type:ControlType.String,title:\"Answer\",displayTextArea:true,defaultValue:\"Answer.\"}}},defaultValue:[{question:\"Question?\",answer:\"Answer.\"}]}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQSchema\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"24\",\"framerIntrinsicWidth\":\"160\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQSchema.map"],"mappings":"A,0LAYG,SAAwBW,EAAU,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,GAAGC,EAAYC,EAAKb,MAAY,CAAsE,IAAMc,EAAK,CAAC,WAAW,qBAAqB,QAAQ,UAAU,WAAvHC,EAAM,OAAO,GAAGC,GAAGA,EAAE,UAAU,KAAK,GAAGA,EAAE,QAAQ,KAAK,CAAgF,CAAC,CAAC,IAAI,IAAI,CAAC,QAAQ,WAAW,KAAKA,EAAE,SAAS,KAAK,EAAE,eAAe,CAAC,QAAQ,SAAS,KAAKA,EAAE,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC,EAC1V,OAAO,KAAK,UAAUF,CAAI,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAE,EAAE,CAACC,CAAK,CAAC,EAA0T,OAAzSP,EAAa,QAAQ,IAAIA,EAAa,OAAwC,gBAAM,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,QAAQ,UAAU,aAAa,EAAE,WAAW,UAAU,MAAM,OAAO,SAAS,GAAG,WAAW,YAAY,SAAS,aAAa,EAAE,SAAS,CAAC,gBAAmBO,EAAM,OAAO,MAAM,CAAC,CAA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