{"version":3,"file":"SchemaMarkup.DdUOOg7x.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/fBMl56LlBReFy7AGadI5/T8MQLhXzQaWnhh9Uotq6/SchemaMarkup.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";function cleanValue(value){if(value===null||value===undefined)return undefined;if(typeof value===\"string\"){const trimmed=value.trim();return trimmed===\"\"?undefined:trimmed;}if(Array.isArray(value)){const cleanedArray=value.map(item=>cleanValue(item)).filter(item=>item!==undefined);return cleanedArray.length>0?cleanedArray:undefined;}if(typeof value===\"object\"){const cleanedEntries=Object.entries(value).map(([key,entryValue])=>[key,cleanValue(entryValue)]).filter(([,entryValue])=>entryValue!==undefined);return cleanedEntries.length>0?Object.fromEntries(cleanedEntries):undefined;}return value;}function normalizeUrl(url){return url.trim().replace(/\\/+$/,\"\");}function normalizeSlug(slug){return slug.trim().replace(/^\\/+/,\"\").replace(/\\/+$/,\"\");}function formatDateForSchema(value){const trimmed=value.trim();if(!trimmed)return trimmed;const parsed=new Date(trimmed);if(Number.isNaN(parsed.getTime()))return trimmed;return parsed.toISOString().slice(0,10);}/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function SchemaMarkup(props){const{schemaType,siteName,siteUrl,logoUrl,description,headline,articleDescription,imageUrl,datePublished,slug,authorName,blogTitle,blogDescription}=props;const jsonLd=useMemo(()=>{const safeSiteUrl=normalizeUrl(siteUrl||\"https://pixlform.com\");const organizationId=`${safeSiteUrl}#organization`;const websiteId=`${safeSiteUrl}#website`;const safeSlug=normalizeSlug(slug);const articleUrl=safeSlug?`${safeSiteUrl}/blog/${safeSlug}`:`${safeSiteUrl}/blog`;const articleImageUrl=imageUrl?.src?.trim();const normalizedDatePublished=formatDateForSchema(datePublished);if(schemaType===\"Site\"){return cleanValue({\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":organizationId,name:siteName,url:safeSiteUrl,logo:logoUrl?{\"@type\":\"ImageObject\",url:logoUrl}:undefined,description},{\"@type\":\"WebSite\",\"@id\":websiteId,name:siteName,url:safeSiteUrl,publisher:{\"@id\":organizationId}}]});}if(schemaType===\"Blog\"){return cleanValue({\"@context\":\"https://schema.org\",\"@type\":\"Blog\",name:blogTitle,description:blogDescription,url:`${safeSiteUrl}/blog`,publisher:{\"@type\":\"Organization\",\"@id\":organizationId,name:siteName,url:safeSiteUrl,logo:logoUrl?{\"@type\":\"ImageObject\",url:logoUrl}:undefined,description}});}return cleanValue({\"@context\":\"https://schema.org\",\"@type\":\"BlogPosting\",headline,description:articleDescription,image:articleImageUrl?[articleImageUrl]:undefined,datePublished:normalizedDatePublished,dateModified:normalizedDatePublished,author:{\"@type\":\"Person\",name:authorName},publisher:{\"@type\":\"Organization\",name:siteName,url:safeSiteUrl,logo:logoUrl?{\"@type\":\"ImageObject\",url:logoUrl}:undefined},mainEntityOfPage:{\"@type\":\"WebPage\",\"@id\":articleUrl,url:articleUrl},url:articleUrl});},[schemaType,siteUrl,slug,siteName,logoUrl,description,blogTitle,blogDescription,headline,articleDescription,imageUrl,datePublished,authorName]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:1,height:1,overflow:\"hidden\",pointerEvents:\"none\"},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:JSON.stringify(jsonLd)}})});}addPropertyControls(SchemaMarkup,{schemaType:{type:ControlType.Enum,title:\"Schema Type\",defaultValue:\"Site\",options:[\"Site\",\"Blog\",\"Article\"]},siteName:{type:ControlType.String,title:\"Site Name\",defaultValue:\"PixlForm\"},siteUrl:{type:ControlType.String,title:\"Site URL\",defaultValue:\"https://pixlform.com\"},logoUrl:{type:ControlType.String,title:\"Logo URL\",defaultValue:\"\",placeholder:\"https://...\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\",displayTextArea:true},blogTitle:{type:ControlType.String,title:\"Blog Title\",defaultValue:\"PixlForm Blog\",hidden:props=>props.schemaType!==\"Blog\"},blogDescription:{type:ControlType.String,title:\"Blog Desc\",defaultValue:\"\",displayTextArea:true,hidden:props=>props.schemaType!==\"Blog\"},headline:{type:ControlType.String,title:\"Headline\",defaultValue:\"\",hidden:props=>props.schemaType!==\"Article\"},articleDescription:{type:ControlType.String,title:\"Article Desc\",defaultValue:\"\",displayTextArea:true,hidden:props=>props.schemaType!==\"Article\"},imageUrl:{type:ControlType.ResponsiveImage,title:\"Image\",hidden:props=>props.schemaType!==\"Article\"},datePublished:{type:ControlType.String,title:\"Published\",defaultValue:\"\",placeholder:\"2026-01-01\",hidden:props=>props.schemaType!==\"Article\"},slug:{type:ControlType.String,title:\"Slug\",defaultValue:\"\",placeholder:\"my-article\",hidden:props=>props.schemaType!==\"Article\"},authorName:{type:ControlType.String,title:\"Author\",defaultValue:\"PixlForm Team\",hidden:props=>props.schemaType!==\"Article\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SchemaMarkup\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SchemaMarkup.map"],"mappings":"0KAA0H,SAAS,EAAW,EAAM,CAAI,MAAQ,KAAyC,IAAG,OAAO,GAAQ,SAAS,CAAC,IAAM,EAAQ,EAAM,KAAK,EAAE,OAAO,IAAU,GAAG,IAAA,GAAU,CAAQ,CAAC,GAAG,MAAM,QAAQ,CAAK,EAAE,CAAC,IAAM,EAAa,EAAM,IAAI,GAAM,EAAW,CAAI,CAAC,CAAC,CAAC,OAAO,GAAM,IAAO,IAAA,EAAS,EAAE,OAAO,EAAa,OAAO,EAAE,EAAa,IAAA,EAAU,CAAC,GAAG,OAAO,GAAQ,SAAS,CAAC,IAAM,EAA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