{"version":3,"file":"Articleschema.BtSA-2WP.mjs","names":[],"sources":["https:/framerusercontent.com/modules/hhrqo0XdLTKAAnWY4EiJ/bPbW3m3rrkCWDHEMCqYe/Articleschema.js"],"sourcesContent":["// HEAVYT — Article Schema (JSON-LD) code component\n// Works for BOTH Features and News Feed templates.\n//\n// SETUP\n// 1. Assets > Code > new Component file > paste this in.\n// 2. Drag <ArticleSchema /> onto the Features template (bottom, invisible).\n// 3. Bind controls:\n//      Headline     -> Title\n//      Description  -> Excerpt (or SEO Description)\n//      Image        -> Hero (or OG Image)\n//      Publish Date -> Publish date (any readable format is fine)\n//      Is News      -> leave OFF on Features\n// 4. Repeat on the News Feed template with Is News turned ON\n//    (emits NewsArticle instead of Article).\n//\n// Validate at: https://search.google.com/test/rich-results\nimport{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const AUTHOR_NAME=\"Thai\";const SITE_NAME=\"Heavy T Likes to Eat\";function toISODate(raw){if(!raw)return null;const d=new Date(raw);if(isNaN(d.getTime()))return null;return d.toISOString().split(\"T\")[0];}export default function ArticleSchema(props){const{headline,description,image,publishDate,modifiedDate,isNews}=props;React.useEffect(()=>{if(!headline)return;const schema={\"@context\":\"https://schema.org\",\"@type\":isNews?\"NewsArticle\":\"Article\",headline,author:{\"@type\":\"Person\",name:AUTHOR_NAME},publisher:{\"@type\":\"Organization\",name:SITE_NAME},mainEntityOfPage:{\"@type\":\"WebPage\",\"@id\":window.location.href.split(\"?\")[0]}};if(description)schema.description=description;if(image)schema.image=[image];const published=toISODate(publishDate);const modified=toISODate(modifiedDate);if(published)schema.datePublished=published;// dateModified falls back to publish date when no update date is set\nif(modified||published)schema.dateModified=modified||published;const id=\"heavyt-article-schema\";document.getElementById(id)?.remove();const script=document.createElement(\"script\");script.type=\"application/ld+json\";script.id=id;script.textContent=JSON.stringify(schema);document.head.appendChild(script);return()=>document.getElementById(id)?.remove();},[headline,description,image,publishDate,modifiedDate,isNews]);return /*#__PURE__*/_jsx(\"div\",{style:{width:1,height:1}});}addPropertyControls(ArticleSchema,{headline:{type:ControlType.String,title:\"Headline\"},description:{type:ControlType.String,title:\"Description\",displayTextArea:true},image:{type:ControlType.Image,title:\"Image\"},publishDate:{type:ControlType.String,title:\"Publish Date\"},modifiedDate:{type:ControlType.String,title:\"Updated Date\"},isNews:{type:ControlType.Boolean,title:\"Is News\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ArticleSchema\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Articleschema.map"],"mappings":"wLAgB2L,SAAS,EAAU,EAAI,CAAC,GAAG,CAAC,EAAI,OAAO,KAAK,IAAM,EAAE,IAAI,KAAK,CAAG,EAAoC,OAA/B,MAAM,EAAE,QAAQ,CAAC,EAAS,KAAY,EAAE,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,EAAG,CAAC,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,WAAS,cAAY,QAAM,cAAY,eAAa,UAAQ,EACrB,OAD2B,MAAoB,CAAC,GAAG,CAAC,EAAS,OAAO,IAAM,EAAO,CAAC,WAAW,qBAAqB,QAAQ,EAAO,cAAc,UAAU,WAAS,OAAO,CAAC,QAAQ,SAAS,KAAK,CAAW,EAAE,UAAU,CAAC,QAAQ,eAAe,KAAK,CAAS,EAAE,iBAAiB,CAAC,QAAQ,UAAU,MAAM,EAAO,SAAS,KAAK,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAK,IAAY,EAAO,YAAY,GAAe,IAAM,EAAO,MAAM,CAAC,CAAK,GAAE,IAAM,EAAU,EAAU,CAAW,EAAQ,EAAS,EAAU,CAAY,EAAK,IAAU,EAAO,cAAc,IACt6B,GAAU,KAAU,EAAO,aAAa,GAAU,GAAU,IAAM,EAAG,wBAAwB,SAAS,eAAe,CAAE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