react-ssr-seo-toolkit 1.0.5 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +633 -460
- package/dist/adapters/nextjs.cjs +2 -0
- package/dist/adapters/nextjs.cjs.map +1 -0
- package/dist/adapters/nextjs.d.cts +86 -0
- package/dist/adapters/nextjs.d.ts +86 -0
- package/dist/adapters/nextjs.js +2 -0
- package/dist/adapters/nextjs.js.map +1 -0
- package/dist/adapters/react-router.cjs +2 -0
- package/dist/adapters/react-router.cjs.map +1 -0
- package/dist/adapters/react-router.d.cts +71 -0
- package/dist/adapters/react-router.d.ts +71 -0
- package/dist/adapters/react-router.js +2 -0
- package/dist/adapters/react-router.js.map +1 -0
- package/dist/chunk-3UCLUFOI.js +5 -0
- package/dist/chunk-3UCLUFOI.js.map +1 -0
- package/dist/chunk-A62THBIS.cjs +3 -0
- package/dist/chunk-A62THBIS.cjs.map +1 -0
- package/dist/chunk-FKDMHECL.cjs +2 -0
- package/dist/chunk-FKDMHECL.cjs.map +1 -0
- package/dist/chunk-GNLXGAS6.js +3 -0
- package/dist/chunk-GNLXGAS6.js.map +1 -0
- package/dist/chunk-LEOORZQY.cjs +5 -0
- package/dist/chunk-LEOORZQY.cjs.map +1 -0
- package/dist/chunk-LP66SUGR.js +2 -0
- package/dist/chunk-LP66SUGR.js.map +1 -0
- package/dist/chunk-ROA74LH6.cjs +61 -0
- package/dist/chunk-ROA74LH6.cjs.map +1 -0
- package/dist/chunk-WM5VVPED.js +61 -0
- package/dist/chunk-WM5VVPED.js.map +1 -0
- package/dist/chunk-X535MU7Z.js +5 -0
- package/dist/chunk-X535MU7Z.js.map +1 -0
- package/dist/chunk-ZADUJHVR.cjs +5 -0
- package/dist/chunk-ZADUJHVR.cjs.map +1 -0
- package/dist/chunk-ZECSTNEE.cjs +3 -0
- package/dist/chunk-ZECSTNEE.cjs.map +1 -0
- package/dist/chunk-ZVFEGG25.js +3 -0
- package/dist/chunk-ZVFEGG25.js.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.d.cts +2 -2
- package/dist/components.d.ts +2 -2
- package/dist/components.js +1 -1
- package/dist/index-Br7Sh9Ur.d.cts +329 -0
- package/dist/index-Br7Sh9Ur.d.ts +329 -0
- package/dist/{index-DAGfo2Fc.d.ts → index-CKNcgAj8.d.ts} +10 -2
- package/dist/{index-RBSUcdqN.d.cts → index-Wgogf4CX.d.cts} +10 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +1 -1
- package/dist/og.cjs +2 -0
- package/dist/og.cjs.map +1 -0
- package/dist/og.d.cts +5 -0
- package/dist/og.d.ts +5 -0
- package/dist/og.js +2 -0
- package/dist/og.js.map +1 -0
- package/dist/schema.cjs +1 -1
- package/dist/schema.d.cts +6 -2
- package/dist/schema.d.ts +6 -2
- package/dist/schema.js +1 -1
- package/dist/sitemap.cjs +2 -0
- package/dist/sitemap.cjs.map +1 -0
- package/dist/sitemap.d.cts +12 -0
- package/dist/sitemap.d.ts +12 -0
- package/dist/sitemap.js +2 -0
- package/dist/sitemap.js.map +1 -0
- package/dist/validation.cjs +2 -0
- package/dist/validation.cjs.map +1 -0
- package/dist/validation.d.cts +8 -0
- package/dist/validation.d.ts +8 -0
- package/dist/validation.js +2 -0
- package/dist/validation.js.map +1 -0
- package/package.json +58 -2
- package/dist/chunk-63ETSZTD.cjs +0 -3
- package/dist/chunk-63ETSZTD.cjs.map +0 -1
- package/dist/chunk-ES4OXVOR.js +0 -3
- package/dist/chunk-ES4OXVOR.js.map +0 -1
- package/dist/chunk-QBHCTDUJ.cjs +0 -2
- package/dist/chunk-QBHCTDUJ.cjs.map +0 -1
- package/dist/chunk-YMCW2G4X.js +0 -2
- package/dist/chunk-YMCW2G4X.js.map +0 -1
- package/dist/index-Dr2yktvz.d.cts +0 -136
- package/dist/index-Dr2yktvz.d.ts +0 -136
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
'use strict';var chunkFKDMHECL_cjs=require('./chunk-FKDMHECL.cjs'),t=require('react');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var t__default=/*#__PURE__*/_interopDefault(t);function _({title:e,titleTemplate:n,description:o,canonical:i,robots:c,openGraph:s,twitter:f,alternates:g,additionalMetaTags:h,additionalLinkTags:u,jsonLd:d,nonce:y}){let l=[],O=0,m=()=>`seo-${O++}`,x=chunkFKDMHECL_cjs.i(e,n);x&&l.push(t__default.default.createElement("title",{key:m()},x)),o?.trim()&&l.push(t__default.default.createElement("meta",{key:m(),name:"description",content:o.trim()})),i?.trim()&&l.push(t__default.default.createElement("link",{key:m(),rel:"canonical",href:i.trim()}));let k=chunkFKDMHECL_cjs.l(c);k&&l.push(t__default.default.createElement("meta",{key:m(),name:"robots",content:k}));let H=chunkFKDMHECL_cjs.o(s);for(let r of H)l.push(t__default.default.createElement("meta",{key:m(),property:r.property,content:r.content}));let B=chunkFKDMHECL_cjs.p(f);for(let r of B)l.push(t__default.default.createElement("meta",{key:m(),name:r.name,content:r.content}));let I=chunkFKDMHECL_cjs.q(g);for(let r of I)l.push(t__default.default.createElement("link",{key:m(),rel:r.rel,hrefLang:r.hreflang,href:r.href}));if(h)for(let r of h){let E={content:r.content};r.name&&(E.name=r.name),r.property&&(E.property=r.property),l.push(t__default.default.createElement("meta",{key:m(),...E}));}if(u)for(let r of u)l.push(t__default.default.createElement("link",{key:m(),...r}));if(d){let r=Array.isArray(d)?d:[d];for(let E of r)l.push(t__default.default.createElement("script",{key:m(),type:"application/ld+json",nonce:y,dangerouslySetInnerHTML:{__html:chunkFKDMHECL_cjs.a(E)}}));}return t__default.default.createElement(t__default.default.Fragment,null,...l)}function $({data:e,nonce:n}){return t__default.default.createElement("script",{type:"application/ld+json",nonce:n,dangerouslySetInnerHTML:{__html:chunkFKDMHECL_cjs.a(e)}})}function b(e){if(!e)return "example.com";try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e.replace(/^https?:\/\/(www\.)?/,"").split("/")[0]}}function p(e,n){return e?e.length>n?`${e.slice(0,n-1)}\u2026`:e:""}var v={fontFamily:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",boxSizing:"border-box",userSelect:"none"};function R({src:e,height:n,bg:o="#e4e6ea"}){let i={width:"100%",height:n,background:o,display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",flexShrink:0};return e?t__default.default.createElement("div",{style:i},t__default.default.createElement("img",{src:e,alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}})):t__default.default.createElement("div",{style:i},t__default.default.createElement("span",{style:{color:"#bcc0c9",fontSize:13}},"No image"))}function W({config:e,style:n}){let o=p(e.openGraph?.title??e.title,70),i=p(e.openGraph?.description??e.description,125),c=e.openGraph?.images?.[0]?.url??e.twitter?.image,s=b(e.canonical??e.openGraph?.url),f=e.twitter?.card!=="summary",g={...v,border:"1px solid #cfd9de",borderRadius:16,overflow:"hidden",maxWidth:550,background:"#fff",...n},h={padding:"12px 14px"},u={fontSize:13,color:"#536471",marginBottom:4},d={fontSize:15,fontWeight:700,color:"#0f1419",lineHeight:1.3,marginBottom:4},y={fontSize:15,color:"#536471",lineHeight:1.4};return f?t__default.default.createElement("div",{style:g},t__default.default.createElement(R,{src:c,height:275,bg:"#e7e9ea"}),t__default.default.createElement("div",{style:h},t__default.default.createElement("div",{style:u},s),t__default.default.createElement("div",{style:d},o),t__default.default.createElement("div",{style:y},i))):t__default.default.createElement("div",{style:{...g,display:"flex",alignItems:"center"}},t__default.default.createElement(R,{src:c,height:110,bg:"#e7e9ea"}),t__default.default.createElement("div",{style:{...h,flex:1}},t__default.default.createElement("div",{style:u},s),t__default.default.createElement("div",{style:d},o),t__default.default.createElement("div",{style:y},i)))}function T({config:e,style:n}){let o=p(e.openGraph?.title??e.title,88),i=p(e.openGraph?.description??e.description,110),c=e.openGraph?.images?.[0]?.url,s=b(e.canonical??e.openGraph?.url),f={...v,border:"1px solid #dddfe2",maxWidth:527,background:"#fff",...n};return t__default.default.createElement("div",{style:f},t__default.default.createElement(R,{src:c,height:275}),t__default.default.createElement("div",{style:{background:"#f0f2f5",padding:"10px 12px"}},t__default.default.createElement("div",{style:{color:"#606770",fontSize:11,textTransform:"uppercase",marginBottom:4,letterSpacing:"0.5px"}},s),t__default.default.createElement("div",{style:{fontWeight:600,fontSize:14,color:"#1c2b33",lineHeight:1.3,marginBottom:2}},o),t__default.default.createElement("div",{style:{color:"#606770",fontSize:14,lineHeight:1.4}},i)))}function F({config:e,style:n}){let o=p(e.openGraph?.title??e.title,120),i=e.openGraph?.images?.[0]?.url,c=b(e.canonical??e.openGraph?.url),s={...v,border:"1px solid #e0e0e0",borderRadius:2,maxWidth:552,background:"#fff",...n};return t__default.default.createElement("div",{style:s},t__default.default.createElement(R,{src:i,height:288,bg:"#dce6f1"}),t__default.default.createElement("div",{style:{padding:"8px 12px 12px"}},t__default.default.createElement("div",{style:{fontSize:14,fontWeight:600,color:"rgba(0,0,0,0.9)",lineHeight:1.4,marginBottom:4}},o),t__default.default.createElement("div",{style:{fontSize:12,color:"rgba(0,0,0,0.6)"}},c)))}function A({config:e,style:n}){let o=p(e.openGraph?.title??e.title,60),i=p(e.openGraph?.description??e.description,160),c=e.openGraph?.siteName??b(e.canonical),s=e.canonical??e.openGraph?.url??"https://example.com";return t__default.default.createElement("div",{style:{...v,fontFamily:"arial,sans-serif",maxWidth:600,padding:4,...n}},t__default.default.createElement("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4}},t__default.default.createElement("div",{style:{width:26,height:26,borderRadius:"50%",background:"#e8eaed",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,color:"#444",fontWeight:600}},c[0].toUpperCase()),t__default.default.createElement("div",null,t__default.default.createElement("div",{style:{fontSize:14,color:"#202124",lineHeight:1.3}},c),t__default.default.createElement("div",{style:{fontSize:12,color:"#4d5156",lineHeight:1.3}},p(s,60)))),t__default.default.createElement("div",{style:{fontSize:20,color:"#1a0dab",lineHeight:1.3,marginBottom:4,cursor:"pointer"}},o),t__default.default.createElement("div",{style:{fontSize:14,color:"#4d5156",lineHeight:1.5}},i))}function Q({config:e,platform:n="twitter",style:o}){switch(n){case "facebook":return t__default.default.createElement(T,{config:e,style:o});case "linkedin":return t__default.default.createElement(F,{config:e,style:o});case "google":return t__default.default.createElement(A,{config:e,style:o});default:return t__default.default.createElement(W,{config:e,style:o})}}
|
|
2
|
+
exports.a=_;exports.b=$;exports.c=Q;//# sourceMappingURL=chunk-ZECSTNEE.cjs.map
|
|
3
|
+
//# sourceMappingURL=chunk-ZECSTNEE.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/SEOHead.tsx","../src/components/JsonLd.tsx","../src/components/SEOPreview.tsx"],"names":["SEOHead","title","titleTemplate","description","canonical","robots","openGraph","twitter","alternates","additionalMetaTags","additionalLinkTags","jsonLd","nonce","elements","key","k","resolvedTitle","buildTitle","React","robotsContent","buildRobotsDirectives","ogTags","buildOpenGraph","tag","twitterTags","buildTwitterMetadata","altLinks","buildAlternateLinks","link","meta","props","schemas","schema","safeJsonLdSerialize","JsonLd","data","extractDomain","url","truncate","str","max","BASE","ImagePlaceholder","src","height","bg","style","TwitterCard","config","image","domain","isLarge","card","domainStyle","titleStyle","descStyle","FacebookCard","LinkedInCard","GoogleCard","siteName","SEOPreview","platform"],"mappings":"sMA4BO,SAASA,CAAAA,CAAQ,CACtB,KAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,YAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,EACA,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,WAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,EACA,MAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CACF,EAAqC,CACnC,IAAMC,CAAAA,CAAiC,GACnCC,CAAAA,CAAM,CAAA,CACJC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d,OAAQ,SACV,CACF,CAAA,CACAjB,CACF,EACAiB,kBAAAA,CAAM,aAAA,CACJ,KAAA,CACA,CAAE,MAAO,CAAE,QAAA,CAAU,EAAA,CAAI,KAAA,CAAO,SAAA,CAAW,UAAA,CAAY,GAAI,CAAE,EAC7Df,CACF,CACF,CACF,CAEO,SAASyD,CAAAA,CAAW,CACzB,MAAA,CAAAZ,CAAAA,CACA,SAAAa,CAAAA,CAAW,SAAA,CACX,KAAA,CAAAf,CACF,EAAwC,CACtC,OAAQe,CAAAA,EACN,KAAK,UAAA,CACH,OAAO3C,kBAAAA,CAAM,aAAA,CAAcsC,EAAc,CAAE,MAAA,CAAAR,CAAAA,CAAQ,KAAA,CAAAF,CAAM,CAAC,CAAA,CAC5D,KAAK,UAAA,CACH,OAAO5B,kBAAAA,CAAM,aAAA,CAAcuC,CAAAA,CAAc,CAAE,OAAAT,CAAAA,CAAQ,KAAA,CAAAF,CAAM,CAAC,EAC5D,KAAK,QAAA,CACH,OAAO5B,kBAAAA,CAAM,cAAcwC,CAAAA,CAAY,CAAE,MAAA,CAAAV,CAAAA,CAAQ,MAAAF,CAAM,CAAC,CAAA,CAC1D,QACE,OAAO5B,kBAAAA,CAAM,aAAA,CAAc6B,CAAAA,CAAa,CAAE,OAAAC,CAAAA,CAAQ,KAAA,CAAAF,CAAM,CAAC,CAC7D,CACF","file":"chunk-ZECSTNEE.cjs","sourcesContent":["import React from \"react\";\nimport type { SEOConfig } from \"../types/index.js\";\nimport {\n buildTitle,\n buildRobotsDirectives,\n buildOpenGraph,\n buildTwitterMetadata,\n buildAlternateLinks,\n} from \"../core/index.js\";\nimport { safeJsonLdSerialize } from \"../utils/index.js\";\n\nexport interface SEOHeadProps extends SEOConfig {\n /**\n * Optional nonce for CSP-compatible script tags.\n */\n nonce?: string;\n}\n\n/**\n * Generic SSR-safe React component that renders SEO-related tags.\n *\n * Renders: title, meta description, canonical link, robots meta,\n * Open Graph tags, Twitter tags, alternate/hreflang links,\n * additional meta/link tags, and JSON-LD scripts.\n *\n * Designed to be placed inside a <head> element in SSR apps.\n * Does NOT use any browser globals — fully SSR-compatible.\n */\nexport function SEOHead({\n title,\n titleTemplate,\n description,\n canonical,\n robots,\n openGraph,\n twitter,\n alternates,\n additionalMetaTags,\n additionalLinkTags,\n jsonLd,\n nonce,\n}: SEOHeadProps): React.ReactElement {\n const elements: React.ReactElement[] = [];\n let key = 0;\n const k = () => `seo-${key++}`;\n\n // Title\n const resolvedTitle = buildTitle(title, titleTemplate);\n if (resolvedTitle) {\n elements.push(React.createElement(\"title\", { key: k() }, resolvedTitle));\n }\n\n // Description\n if (description?.trim()) {\n elements.push(\n React.createElement(\"meta\", {\n key: k(),\n name: \"description\",\n content: description.trim(),\n })\n );\n }\n\n // Canonical\n if (canonical?.trim()) {\n elements.push(\n React.createElement(\"link\", {\n key: k(),\n rel: \"canonical\",\n href: canonical.trim(),\n })\n );\n }\n\n // Robots\n const robotsContent = buildRobotsDirectives(robots);\n if (robotsContent) {\n elements.push(\n React.createElement(\"meta\", {\n key: k(),\n name: \"robots\",\n content: robotsContent,\n })\n );\n }\n\n // Open Graph\n const ogTags = buildOpenGraph(openGraph);\n for (const tag of ogTags) {\n elements.push(\n React.createElement(\"meta\", {\n key: k(),\n property: tag.property,\n content: tag.content,\n })\n );\n }\n\n // Twitter\n const twitterTags = buildTwitterMetadata(twitter);\n for (const tag of twitterTags) {\n elements.push(\n React.createElement(\"meta\", {\n key: k(),\n name: tag.name,\n content: tag.content,\n })\n );\n }\n\n // Hreflang alternates\n const altLinks = buildAlternateLinks(alternates);\n for (const link of altLinks) {\n elements.push(\n React.createElement(\"link\", {\n key: k(),\n rel: link.rel,\n hrefLang: link.hreflang,\n href: link.href,\n })\n );\n }\n\n // Additional meta tags\n if (additionalMetaTags) {\n for (const meta of additionalMetaTags) {\n const props: Record<string, string> = { content: meta.content };\n if (meta.name) props.name = meta.name;\n if (meta.property) props.property = meta.property;\n elements.push(React.createElement(\"meta\", { key: k(), ...props }));\n }\n }\n\n // Additional link tags\n if (additionalLinkTags) {\n for (const link of additionalLinkTags) {\n elements.push(React.createElement(\"link\", { key: k(), ...link }));\n }\n }\n\n // JSON-LD\n if (jsonLd) {\n const schemas = Array.isArray(jsonLd) ? jsonLd : [jsonLd];\n for (const schema of schemas) {\n elements.push(\n React.createElement(\"script\", {\n key: k(),\n type: \"application/ld+json\",\n nonce,\n dangerouslySetInnerHTML: {\n __html: safeJsonLdSerialize(schema),\n },\n })\n );\n }\n }\n\n return React.createElement(React.Fragment, null, ...elements);\n}\n","import React from \"react\";\nimport { safeJsonLdSerialize } from \"../utils/index.js\";\n\nexport interface JsonLdProps {\n data: Record<string, unknown> | Array<Record<string, unknown>>;\n nonce?: string;\n}\n\n/**\n * Renders a <script type=\"application/ld+json\"> tag with safely serialized JSON-LD.\n * SSR-safe: no browser globals used.\n */\nexport function JsonLd({ data, nonce }: JsonLdProps): React.ReactElement {\n return React.createElement(\"script\", {\n type: \"application/ld+json\",\n nonce,\n dangerouslySetInnerHTML: {\n __html: safeJsonLdSerialize(data),\n },\n });\n}\n","import React from \"react\";\nimport type { SEOConfig } from \"../types/index.js\";\n\nexport interface SEOPreviewProps {\n config: SEOConfig;\n platform?: \"twitter\" | \"facebook\" | \"linkedin\" | \"google\";\n className?: string;\n style?: React.CSSProperties;\n}\n\nfunction extractDomain(url?: string): string {\n if (!url) return \"example.com\";\n try {\n return new URL(url).hostname.replace(/^www\\./, \"\");\n } catch {\n return url.replace(/^https?:\\/\\/(www\\.)?/, \"\").split(\"/\")[0];\n }\n}\n\nfunction truncate(str: string | undefined, max: number): string {\n if (!str) return \"\";\n return str.length > max ? `${str.slice(0, max - 1)}…` : str;\n}\n\nconst BASE: React.CSSProperties = {\n fontFamily: \"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n boxSizing: \"border-box\",\n userSelect: \"none\",\n};\n\nfunction ImagePlaceholder({\n src,\n height,\n bg = \"#e4e6ea\",\n}: {\n src?: string;\n height: number;\n bg?: string;\n}): React.ReactElement {\n const style: React.CSSProperties = {\n width: \"100%\",\n height,\n background: bg,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n flexShrink: 0,\n };\n if (src) {\n return React.createElement(\n \"div\",\n { style },\n React.createElement(\"img\", {\n src,\n alt: \"\",\n style: { width: \"100%\", height: \"100%\", objectFit: \"cover\" },\n })\n );\n }\n return React.createElement(\n \"div\",\n { style },\n React.createElement(\n \"span\",\n { style: { color: \"#bcc0c9\", fontSize: 13 } },\n \"No image\"\n )\n );\n}\n\nfunction TwitterCard({\n config,\n style,\n}: {\n config: SEOConfig;\n style?: React.CSSProperties;\n}): React.ReactElement {\n const title = truncate(config.openGraph?.title ?? config.title, 70);\n const description = truncate(\n config.openGraph?.description ?? config.description,\n 125\n );\n const image = config.openGraph?.images?.[0]?.url ?? config.twitter?.image;\n const domain = extractDomain(config.canonical ?? config.openGraph?.url);\n const isLarge = config.twitter?.card !== \"summary\";\n\n const card: React.CSSProperties = {\n ...BASE,\n border: \"1px solid #cfd9de\",\n borderRadius: 16,\n overflow: \"hidden\",\n maxWidth: 550,\n background: \"#fff\",\n ...style,\n };\n\n const meta: React.CSSProperties = {\n padding: \"12px 14px\",\n };\n\n const domainStyle: React.CSSProperties = {\n fontSize: 13,\n color: \"#536471\",\n marginBottom: 4,\n };\n\n const titleStyle: React.CSSProperties = {\n fontSize: 15,\n fontWeight: 700,\n color: \"#0f1419\",\n lineHeight: 1.3,\n marginBottom: 4,\n };\n\n const descStyle: React.CSSProperties = {\n fontSize: 15,\n color: \"#536471\",\n lineHeight: 1.4,\n };\n\n if (!isLarge) {\n return React.createElement(\n \"div\",\n { style: { ...card, display: \"flex\", alignItems: \"center\" } },\n React.createElement(ImagePlaceholder, {\n src: image,\n height: 110,\n bg: \"#e7e9ea\",\n }),\n React.createElement(\n \"div\",\n { style: { ...meta, flex: 1 } },\n React.createElement(\"div\", { style: domainStyle }, domain),\n React.createElement(\"div\", { style: titleStyle }, title),\n React.createElement(\"div\", { style: descStyle }, description)\n )\n );\n }\n\n return React.createElement(\n \"div\",\n { style: card },\n React.createElement(ImagePlaceholder, { src: image, height: 275, bg: \"#e7e9ea\" }),\n React.createElement(\n \"div\",\n { style: meta },\n React.createElement(\"div\", { style: domainStyle }, domain),\n React.createElement(\"div\", { style: titleStyle }, title),\n React.createElement(\"div\", { style: descStyle }, description)\n )\n );\n}\n\nfunction FacebookCard({\n config,\n style,\n}: {\n config: SEOConfig;\n style?: React.CSSProperties;\n}): React.ReactElement {\n const title = truncate(config.openGraph?.title ?? config.title, 88);\n const description = truncate(\n config.openGraph?.description ?? config.description,\n 110\n );\n const image = config.openGraph?.images?.[0]?.url;\n const domain = extractDomain(config.canonical ?? config.openGraph?.url);\n\n const card: React.CSSProperties = {\n ...BASE,\n border: \"1px solid #dddfe2\",\n maxWidth: 527,\n background: \"#fff\",\n ...style,\n };\n\n return React.createElement(\n \"div\",\n { style: card },\n React.createElement(ImagePlaceholder, { src: image, height: 275 }),\n React.createElement(\n \"div\",\n { style: { background: \"#f0f2f5\", padding: \"10px 12px\" } },\n React.createElement(\n \"div\",\n {\n style: {\n color: \"#606770\",\n fontSize: 11,\n textTransform: \"uppercase\" as const,\n marginBottom: 4,\n letterSpacing: \"0.5px\",\n },\n },\n domain\n ),\n React.createElement(\n \"div\",\n {\n style: {\n fontWeight: 600,\n fontSize: 14,\n color: \"#1c2b33\",\n lineHeight: 1.3,\n marginBottom: 2,\n },\n },\n title\n ),\n React.createElement(\n \"div\",\n { style: { color: \"#606770\", fontSize: 14, lineHeight: 1.4 } },\n description\n )\n )\n );\n}\n\nfunction LinkedInCard({\n config,\n style,\n}: {\n config: SEOConfig;\n style?: React.CSSProperties;\n}): React.ReactElement {\n const title = truncate(config.openGraph?.title ?? config.title, 120);\n const image = config.openGraph?.images?.[0]?.url;\n const domain = extractDomain(config.canonical ?? config.openGraph?.url);\n\n const card: React.CSSProperties = {\n ...BASE,\n border: \"1px solid #e0e0e0\",\n borderRadius: 2,\n maxWidth: 552,\n background: \"#fff\",\n ...style,\n };\n\n return React.createElement(\n \"div\",\n { style: card },\n React.createElement(ImagePlaceholder, { src: image, height: 288, bg: \"#dce6f1\" }),\n React.createElement(\n \"div\",\n { style: { padding: \"8px 12px 12px\" } },\n React.createElement(\n \"div\",\n {\n style: {\n fontSize: 14,\n fontWeight: 600,\n color: \"rgba(0,0,0,0.9)\",\n lineHeight: 1.4,\n marginBottom: 4,\n },\n },\n title\n ),\n React.createElement(\n \"div\",\n { style: { fontSize: 12, color: \"rgba(0,0,0,0.6)\" } },\n domain\n )\n )\n );\n}\n\nfunction GoogleCard({\n config,\n style,\n}: {\n config: SEOConfig;\n style?: React.CSSProperties;\n}): React.ReactElement {\n const title = truncate(config.openGraph?.title ?? config.title, 60);\n const description = truncate(\n config.openGraph?.description ?? config.description,\n 160\n );\n const siteName = config.openGraph?.siteName ?? extractDomain(config.canonical);\n const canonical = config.canonical ?? config.openGraph?.url ?? \"https://example.com\";\n\n return React.createElement(\n \"div\",\n {\n style: {\n ...BASE,\n fontFamily: \"arial,sans-serif\",\n maxWidth: 600,\n padding: 4,\n ...style,\n },\n },\n React.createElement(\n \"div\",\n { style: { display: \"flex\", alignItems: \"center\", gap: 8, marginBottom: 4 } },\n React.createElement(\n \"div\",\n {\n style: {\n width: 26,\n height: 26,\n borderRadius: \"50%\",\n background: \"#e8eaed\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n fontSize: 11,\n color: \"#444\",\n fontWeight: 600,\n },\n },\n siteName[0].toUpperCase()\n ),\n React.createElement(\n \"div\",\n null,\n React.createElement(\n \"div\",\n { style: { fontSize: 14, color: \"#202124\", lineHeight: 1.3 } },\n siteName\n ),\n React.createElement(\n \"div\",\n { style: { fontSize: 12, color: \"#4d5156\", lineHeight: 1.3 } },\n truncate(canonical, 60)\n )\n )\n ),\n React.createElement(\n \"div\",\n {\n style: {\n fontSize: 20,\n color: \"#1a0dab\",\n lineHeight: 1.3,\n marginBottom: 4,\n cursor: \"pointer\",\n },\n },\n title\n ),\n React.createElement(\n \"div\",\n { style: { fontSize: 14, color: \"#4d5156\", lineHeight: 1.5 } },\n description\n )\n );\n}\n\nexport function SEOPreview({\n config,\n platform = \"twitter\",\n style,\n}: SEOPreviewProps): React.ReactElement {\n switch (platform) {\n case \"facebook\":\n return React.createElement(FacebookCard, { config, style });\n case \"linkedin\":\n return React.createElement(LinkedInCard, { config, style });\n case \"google\":\n return React.createElement(GoogleCard, { config, style });\n default:\n return React.createElement(TwitterCard, { config, style });\n }\n}\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var i="https://schema.org";function c(e){let r={"@context":i,"@type":"Organization",name:e.name,url:e.url};if(e.logo&&(r.logo=e.logo),e.description&&(r.description=e.description),e.sameAs?.length&&(r.sameAs=e.sameAs),e.contactPoint){let a={"@type":"ContactPoint"};e.contactPoint.telephone&&(a.telephone=e.contactPoint.telephone),e.contactPoint.contactType&&(a.contactType=e.contactPoint.contactType),e.contactPoint.email&&(a.email=e.contactPoint.email),e.contactPoint.areaServed&&(a.areaServed=e.contactPoint.areaServed),e.contactPoint.availableLanguage&&(a.availableLanguage=e.contactPoint.availableLanguage),r.contactPoint=a;}return r}function m(e){let r={"@context":i,"@type":"WebSite",name:e.name,url:e.url};return e.description&&(r.description=e.description),e.searchUrl&&(r.potentialAction={"@type":"SearchAction",target:{"@type":"EntryPoint",urlTemplate:`${e.searchUrl}?${e.searchQueryParam??"q"}={search_term_string}`},"query-input":"required name=search_term_string"}),r}function l(e){return {"@context":i,"@type":"BreadcrumbList",itemListElement:e.map((r,a)=>({"@type":"ListItem",position:a+1,name:r.name,item:r.url}))}}function d(e){let r={"@context":i,"@type":"Article",headline:e.headline,url:e.url};if(e.description&&(r.description=e.description),e.images?.length&&(r.image=e.images),e.datePublished&&(r.datePublished=e.datePublished),e.dateModified&&(r.dateModified=e.dateModified),e.section&&(r.articleSection=e.section),e.keywords?.length&&(r.keywords=e.keywords),e.author){let a=Array.isArray(e.author)?e.author:[e.author];r.author=a.map(o=>{let t={"@type":"Person",name:o.name};return o.url&&(t.url=o.url),t});}if(e.publisher){let a={"@type":"Organization",name:e.publisher.name};e.publisher.logo&&(a.logo={"@type":"ImageObject",url:e.publisher.logo}),r.publisher=a;}return r}function g(e){let r={"@context":i,"@type":"Product",name:e.name,url:e.url};if(e.description&&(r.description=e.description),e.images?.length&&(r.image=e.images),e.brand&&(r.brand={"@type":"Brand",name:e.brand}),e.sku&&(r.sku=e.sku),e.gtin&&(r.gtin=e.gtin),e.price!==void 0){let a={"@type":"Offer",price:e.price,priceCurrency:e.priceCurrency??"USD"};e.availability&&(a.availability=`https://schema.org/${e.availability}`),r.offers=a;}if(e.ratingValue!==void 0){let a={"@type":"AggregateRating",ratingValue:e.ratingValue};e.reviewCount!==void 0&&(a.reviewCount=e.reviewCount),r.aggregateRating=a;}return r}function f(e){return {"@context":i,"@type":"FAQPage",mainEntity:e.map(r=>({"@type":"Question",name:r.question,acceptedAnswer:{"@type":"Answer",text:r.answer}}))}}function h(e){let r=!!(e.sport??e.homeTeam??e.awayTeam),a={"@context":i,"@type":r?"SportsEvent":"Event",name:e.name,startDate:e.startDate};if(e.endDate&&(a.endDate=e.endDate),e.description&&(a.description=e.description),e.url&&(a.url=e.url),e.images?.length&&(a.image=e.images),e.eventStatus&&(a.eventStatus=`https://schema.org/${e.eventStatus}`),e.eventAttendanceMode&&(a.eventAttendanceMode=`https://schema.org/${e.eventAttendanceMode}`),e.location){let o=e.location;if(o.url&&!o.address)a.location={"@type":"VirtualLocation",name:o.name,url:o.url};else {let t={"@type":"Place",name:o.name};o.url&&(t.url=o.url),o.address&&(t.address=typeof o.address=="string"?o.address:{"@type":"PostalAddress",...o.address}),a.location=t;}}if(e.organizer){let o={"@type":"Organization",name:e.organizer.name};e.organizer.url&&(o.url=e.organizer.url),a.organizer=o;}if(e.performer){let t=(Array.isArray(e.performer)?e.performer:[e.performer]).map(n=>{let s={"@type":"Person",name:n.name};return n.url&&(s.url=n.url),s});a.performer=t.length===1?t[0]:t;}if(r){if(e.sport&&(a.sport=e.sport),e.homeTeam){let o={"@type":"SportsTeam",name:e.homeTeam.name};e.homeTeam.url&&(o.url=e.homeTeam.url),a.homeTeam=o;}if(e.awayTeam){let o={"@type":"SportsTeam",name:e.awayTeam.name};e.awayTeam.url&&(o.url=e.awayTeam.url),a.awayTeam=o;}}return a}function y(e){let r={"@context":i,"@type":"Person",name:e.name};if(e.url&&(r.url=e.url),e.image&&(r.image=e.image),e.jobTitle&&(r.jobTitle=e.jobTitle),e.description&&(r.description=e.description),e.email&&(r.email=e.email),e.telephone&&(r.telephone=e.telephone),e.birthDate&&(r.birthDate=e.birthDate),e.sameAs?.length&&(r.sameAs=e.sameAs),e.worksFor){let a={"@type":"Organization",name:e.worksFor.name};e.worksFor.url&&(a.url=e.worksFor.url),r.worksFor=a;}return e.address&&(r.address=typeof e.address=="string"?e.address:{"@type":"PostalAddress",...e.address}),r}function S(e){let r={"@context":i,"@type":"Recipe",name:e.name};if(e.description&&(r.description=e.description),e.images?.length&&(r.image=e.images),e.datePublished&&(r.datePublished=e.datePublished),e.prepTime&&(r.prepTime=e.prepTime),e.cookTime&&(r.cookTime=e.cookTime),e.totalTime&&(r.totalTime=e.totalTime),e.recipeYield!==void 0&&(r.recipeYield=String(e.recipeYield)),e.recipeCategory&&(r.recipeCategory=e.recipeCategory),e.recipeCuisine&&(r.recipeCuisine=e.recipeCuisine),e.recipeIngredient?.length&&(r.recipeIngredient=e.recipeIngredient),e.keywords?.length&&(r.keywords=e.keywords.join(", ")),e.author){let a={"@type":"Person",name:e.author.name};e.author.url&&(a.url=e.author.url),r.author=a;}if(e.recipeInstructions?.length&&(r.recipeInstructions=e.recipeInstructions.map(a=>{if(typeof a=="string")return {"@type":"HowToStep",text:a};let o={"@type":"HowToStep",text:a.text};return a.name&&(o.name=a.name),a.url&&(o.url=a.url),a.image&&(o.image=a.image),o})),e.nutrition&&Object.keys(e.nutrition).length&&(r.nutrition={"@type":"NutritionInformation",...e.nutrition}),e.ratingValue!==void 0){let a={"@type":"AggregateRating",ratingValue:e.ratingValue};e.reviewCount!==void 0&&(a.reviewCount=e.reviewCount),r.aggregateRating=a;}return r}function b(e){let r={"@context":i,"@type":"JobPosting",title:e.title,description:e.description,datePosted:e.datePosted};e.validThrough&&(r.validThrough=e.validThrough),e.url&&(r.url=e.url),e.experienceRequirements&&(r.experienceRequirements=e.experienceRequirements),e.educationRequirements&&(r.educationRequirements={"@type":"EducationalOccupationalCredential",credentialCategory:e.educationRequirements}),e.employmentType&&(r.employmentType=(Array.isArray(e.employmentType),e.employmentType)),e.skills&&(r.skills=Array.isArray(e.skills)?e.skills.join(", "):e.skills);let a={"@type":"Organization",name:e.hiringOrganization.name};if(e.hiringOrganization.sameAs&&(a.sameAs=e.hiringOrganization.sameAs),e.hiringOrganization.logo&&(a.logo=e.hiringOrganization.logo),r.hiringOrganization=a,e.remote&&(r.jobLocationType="TELECOMMUTE"),e.jobLocation&&(r.jobLocation={"@type":"Place",address:{"@type":"PostalAddress",...e.jobLocation}}),e.baseSalary){let{currency:o,value:t,unitText:n="YEAR"}=e.baseSalary,s={"@type":"MonetaryAmount",currency:o};typeof t=="number"?s.value=t:s.value={"@type":"QuantitativeValue",minValue:t.minValue,maxValue:t.maxValue,unitText:n},r.baseSalary=s;}return e.identifier&&(r.identifier={"@type":"PropertyValue",name:e.identifier.name,value:e.identifier.value}),r}function T(...e){return {"@context":i,"@type":"ItemList","@graph":e.map(({"@context":r,...a})=>a)}}
|
|
2
|
+
export{c as a,m as b,l as c,d,g as e,f,h as g,y as h,S as i,b as j,T as k};//# sourceMappingURL=chunk-ZVFEGG25.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-ZVFEGG25.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schema/index.ts"],"names":["CONTEXT","createOrganizationSchema","input","schema","cp","createWebsiteSchema","createBreadcrumbSchema","items","item","index","createArticleSchema","authors","a","person","pub","createProductSchema","offer","rating","createFAQSchema","createEventSchema","isSports","loc","place","org","mapped","p","entry","t","createPersonSchema","createRecipeSchema","step","s","createJobPostingSchema","currency","value","unitText","monetaryAmount","composeSchemas","schemas","_ctx","rest"],"mappings":"AAcA,IAAMA,CAAAA,CAAU,oBAAA,CAIT,SAASC,CAAAA,CACdC,EACY,CACZ,IAAMC,CAAAA,CAAqB,CACzB,WAAYH,CAAAA,CACZ,OAAA,CAAS,cAAA,CACT,IAAA,CAAME,EAAM,IAAA,CACZ,GAAA,CAAKA,CAAAA,CAAM,GACb,EAMA,GAJIA,CAAAA,CAAM,IAAA,GAAMC,CAAAA,CAAO,KAAOD,CAAAA,CAAM,IAAA,CAAA,CAChCA,CAAAA,CAAM,WAAA,GAAaC,EAAO,WAAA,CAAcD,CAAAA,CAAM,WAAA,CAAA,CAC9CA,CAAAA,CAAM,QAAQ,MAAA,GAAQC,CAAAA,CAAO,MAAA,CAASD,CAAAA,CAAM,QAE5CA,CAAAA,CAAM,YAAA,CAAc,CACtB,IAAME,EAA8B,CAClC,OAAA,CAAS,cACX,CAAA,CACIF,EAAM,YAAA,CAAa,SAAA,GACrBE,CAAAA,CAAG,SAAA,CAAYF,EAAM,YAAA,CAAa,SAAA,CAAA,CAChCA,CAAAA,CAAM,YAAA,CAAa,cACrBE,CAAAA,CAAG,WAAA,CAAcF,CAAAA,CAAM,YAAA,CAAa,aAClCA,CAAAA,CAAM,YAAA,CAAa,KAAA,GAAOE,CAAAA,CAAG,MAAQF,CAAAA,CAAM,YAAA,CAAa,KAAA,CAAA,CACxDA,CAAAA,CAAM,aAAa,UAAA,GACrBE,CAAAA,CAAG,UAAA,CAAaF,CAAAA,CAAM,aAAa,UAAA,CAAA,CACjCA,CAAAA,CAAM,YAAA,CAAa,iBAAA,GACrBE,EAAG,iBAAA,CAAoBF,CAAAA,CAAM,YAAA,CAAa,iBAAA,CAAA,CAC5CC,EAAO,YAAA,CAAe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B,SAAUA,CAAAA,CAAM,QAAA,CAChB,QAAA,CAAAC,CACF,EAEFhC,CAAAA,CAAO,UAAA,CAAaiC,EACtB,CAEA,OAAIlC,CAAAA,CAAM,UAAA,GACRC,CAAAA,CAAO,UAAA,CAAa,CAClB,OAAA,CAAS,eAAA,CACT,IAAA,CAAMD,CAAAA,CAAM,WAAW,IAAA,CACvB,KAAA,CAAOA,CAAAA,CAAM,UAAA,CAAW,KAC1B,CAAA,CAAA,CAGKC,CACT,CAQO,SAASkC,KAAkBC,CAAAA,CAAmC,CACnE,OAAO,CACL,WAAYtC,CAAAA,CACZ,OAAA,CAAS,UAAA,CACT,QAAA,CAAUsC,EAAQ,GAAA,CAAI,CAAC,CAAE,UAAA,CAAYC,EAAM,GAAGC,CAAK,CAAA,GAAMA,CAAI,CAC/D,CACF","file":"chunk-ZVFEGG25.js","sourcesContent":["import type {\n JSONLDBase,\n BreadcrumbItem,\n OrganizationSchemaInput,\n WebsiteSchemaInput,\n ArticleSchemaInput,\n ProductSchemaInput,\n FAQItem,\n EventSchemaInput,\n PersonSchemaInput,\n RecipeSchemaInput,\n JobPostingSchemaInput,\n} from \"../types/index.js\";\n\nconst CONTEXT = \"https://schema.org\";\n\n// ─── Organization ─────────────────────────────────────────────\n\nexport function createOrganizationSchema(\n input: OrganizationSchemaInput\n): JSONLDBase {\n const schema: JSONLDBase = {\n \"@context\": CONTEXT,\n \"@type\": \"Organization\",\n name: input.name,\n url: input.url,\n };\n\n if (input.logo) schema.logo = input.logo;\n if (input.description) schema.description = input.description;\n if (input.sameAs?.length) schema.sameAs = input.sameAs;\n\n if (input.contactPoint) {\n const cp: Record<string, unknown> = {\n \"@type\": \"ContactPoint\",\n };\n if (input.contactPoint.telephone)\n cp.telephone = input.contactPoint.telephone;\n if (input.contactPoint.contactType)\n cp.contactType = input.contactPoint.contactType;\n if (input.contactPoint.email) cp.email = input.contactPoint.email;\n if (input.contactPoint.areaServed)\n cp.areaServed = input.contactPoint.areaServed;\n if (input.contactPoint.availableLanguage)\n cp.availableLanguage = input.contactPoint.availableLanguage;\n schema.contactPoint = cp;\n }\n\n return schema;\n}\n\n// ─── Website ──────────────────────────────────────────────────\n\nexport function createWebsiteSchema(input: WebsiteSchemaInput): JSONLDBase {\n const schema: JSONLDBase = {\n \"@context\": CONTEXT,\n \"@type\": \"WebSite\",\n name: input.name,\n url: input.url,\n };\n\n if (input.description) schema.description = input.description;\n\n if (input.searchUrl) {\n schema.potentialAction = {\n \"@type\": \"SearchAction\",\n target: {\n \"@type\": \"EntryPoint\",\n urlTemplate: `${input.searchUrl}?${input.searchQueryParam ?? \"q\"}={search_term_string}`,\n },\n \"query-input\": \"required name=search_term_string\",\n };\n }\n\n return schema;\n}\n\n// ─── Breadcrumb ───────────────────────────────────────────────\n\nexport function createBreadcrumbSchema(items: BreadcrumbItem[]): JSONLDBase {\n return {\n \"@context\": CONTEXT,\n \"@type\": \"BreadcrumbList\",\n itemListElement: items.map((item, index) => ({\n \"@type\": \"ListItem\",\n position: index + 1,\n name: item.name,\n item: item.url,\n })),\n };\n}\n\n// ─── Article ──────────────────────────────────────────────────\n\nexport function createArticleSchema(input: ArticleSchemaInput): JSONLDBase {\n const schema: JSONLDBase = {\n \"@context\": CONTEXT,\n \"@type\": \"Article\",\n headline: input.headline,\n url: input.url,\n };\n\n if (input.description) schema.description = input.description;\n if (input.images?.length) schema.image = input.images;\n if (input.datePublished) schema.datePublished = input.datePublished;\n if (input.dateModified) schema.dateModified = input.dateModified;\n if (input.section) schema.articleSection = input.section;\n if (input.keywords?.length) schema.keywords = input.keywords;\n\n if (input.author) {\n const authors = Array.isArray(input.author)\n ? input.author\n : [input.author];\n schema.author = authors.map((a) => {\n const person: Record<string, string> = {\n \"@type\": \"Person\",\n name: a.name,\n };\n if (a.url) person.url = a.url;\n return person;\n });\n }\n\n if (input.publisher) {\n const pub: Record<string, unknown> = {\n \"@type\": \"Organization\",\n name: input.publisher.name,\n };\n if (input.publisher.logo) {\n pub.logo = {\n \"@type\": \"ImageObject\",\n url: input.publisher.logo,\n };\n }\n schema.publisher = pub;\n }\n\n return schema;\n}\n\n// ─── Product ──────────────────────────────────────────────────\n\nexport function createProductSchema(input: ProductSchemaInput): JSONLDBase {\n const schema: JSONLDBase = {\n \"@context\": CONTEXT,\n \"@type\": \"Product\",\n name: input.name,\n url: input.url,\n };\n\n if (input.description) schema.description = input.description;\n if (input.images?.length) schema.image = input.images;\n if (input.brand) {\n schema.brand = { \"@type\": \"Brand\", name: input.brand };\n }\n if (input.sku) schema.sku = input.sku;\n if (input.gtin) schema.gtin = input.gtin;\n\n if (input.price !== undefined) {\n const offer: Record<string, unknown> = {\n \"@type\": \"Offer\",\n price: input.price,\n priceCurrency: input.priceCurrency ?? \"USD\",\n };\n if (input.availability) {\n offer.availability = `https://schema.org/${input.availability}`;\n }\n schema.offers = offer;\n }\n\n if (input.ratingValue !== undefined) {\n const rating: Record<string, unknown> = {\n \"@type\": \"AggregateRating\",\n ratingValue: input.ratingValue,\n };\n if (input.reviewCount !== undefined) rating.reviewCount = input.reviewCount;\n schema.aggregateRating = rating;\n }\n\n return schema;\n}\n\n// ─── FAQ ──────────────────────────────────────────────────────\n\nexport function createFAQSchema(items: FAQItem[]): JSONLDBase {\n return {\n \"@context\": CONTEXT,\n \"@type\": \"FAQPage\",\n mainEntity: items.map((item) => ({\n \"@type\": \"Question\",\n name: item.question,\n acceptedAnswer: {\n \"@type\": \"Answer\",\n text: item.answer,\n },\n })),\n };\n}\n\n// ─── Event / SportsEvent ─────────────────────────────────────\n\nexport function createEventSchema(input: EventSchemaInput): JSONLDBase {\n const isSports = !!(input.sport ?? input.homeTeam ?? input.awayTeam);\n\n const schema: JSONLDBase = {\n \"@context\": CONTEXT,\n \"@type\": isSports ? \"SportsEvent\" : \"Event\",\n name: input.name,\n startDate: input.startDate,\n };\n\n if (input.endDate) schema.endDate = input.endDate;\n if (input.description) schema.description = input.description;\n if (input.url) schema.url = input.url;\n if (input.images?.length) schema.image = input.images;\n\n if (input.eventStatus) {\n schema.eventStatus = `https://schema.org/${input.eventStatus}`;\n }\n if (input.eventAttendanceMode) {\n schema.eventAttendanceMode = `https://schema.org/${input.eventAttendanceMode}`;\n }\n\n if (input.location) {\n const loc = input.location;\n if (loc.url && !loc.address) {\n schema.location = {\n \"@type\": \"VirtualLocation\",\n name: loc.name,\n url: loc.url,\n };\n } else {\n const place: Record<string, unknown> = {\n \"@type\": \"Place\",\n name: loc.name,\n };\n if (loc.url) place.url = loc.url;\n if (loc.address) {\n place.address =\n typeof loc.address === \"string\"\n ? loc.address\n : { \"@type\": \"PostalAddress\", ...loc.address };\n }\n schema.location = place;\n }\n }\n\n if (input.organizer) {\n const org: Record<string, string> = {\n \"@type\": \"Organization\",\n name: input.organizer.name,\n };\n if (input.organizer.url) org.url = input.organizer.url;\n schema.organizer = org;\n }\n\n if (input.performer) {\n const performers = Array.isArray(input.performer)\n ? input.performer\n : [input.performer];\n const mapped = performers.map((p) => {\n const entry: Record<string, string> = { \"@type\": \"Person\", name: p.name };\n if (p.url) entry.url = p.url;\n return entry;\n });\n schema.performer = mapped.length === 1 ? mapped[0] : mapped;\n }\n\n if (isSports) {\n if (input.sport) schema.sport = input.sport;\n if (input.homeTeam) {\n const t: Record<string, string> = {\n \"@type\": \"SportsTeam\",\n name: input.homeTeam.name,\n };\n if (input.homeTeam.url) t.url = input.homeTeam.url;\n schema.homeTeam = t;\n }\n if (input.awayTeam) {\n const t: Record<string, string> = {\n \"@type\": \"SportsTeam\",\n name: input.awayTeam.name,\n };\n if (input.awayTeam.url) t.url = input.awayTeam.url;\n schema.awayTeam = t;\n }\n }\n\n return schema;\n}\n\n// ─── Person ───────────────────────────────────────────────────\n\nexport function createPersonSchema(input: PersonSchemaInput): JSONLDBase {\n const schema: JSONLDBase = {\n \"@context\": CONTEXT,\n \"@type\": \"Person\",\n name: input.name,\n };\n\n if (input.url) schema.url = input.url;\n if (input.image) schema.image = input.image;\n if (input.jobTitle) schema.jobTitle = input.jobTitle;\n if (input.description) schema.description = input.description;\n if (input.email) schema.email = input.email;\n if (input.telephone) schema.telephone = input.telephone;\n if (input.birthDate) schema.birthDate = input.birthDate;\n if (input.sameAs?.length) schema.sameAs = input.sameAs;\n\n if (input.worksFor) {\n const org: Record<string, string> = { \"@type\": \"Organization\", name: input.worksFor.name };\n if (input.worksFor.url) org.url = input.worksFor.url;\n schema.worksFor = org;\n }\n\n if (input.address) {\n schema.address =\n typeof input.address === \"string\"\n ? input.address\n : { \"@type\": \"PostalAddress\", ...input.address };\n }\n\n return schema;\n}\n\n// ─── Recipe ───────────────────────────────────────────────────\n\nexport function createRecipeSchema(input: RecipeSchemaInput): JSONLDBase {\n const schema: JSONLDBase = {\n \"@context\": CONTEXT,\n \"@type\": \"Recipe\",\n name: input.name,\n };\n\n if (input.description) schema.description = input.description;\n if (input.images?.length) schema.image = input.images;\n if (input.datePublished) schema.datePublished = input.datePublished;\n if (input.prepTime) schema.prepTime = input.prepTime;\n if (input.cookTime) schema.cookTime = input.cookTime;\n if (input.totalTime) schema.totalTime = input.totalTime;\n if (input.recipeYield !== undefined) schema.recipeYield = String(input.recipeYield);\n if (input.recipeCategory) schema.recipeCategory = input.recipeCategory;\n if (input.recipeCuisine) schema.recipeCuisine = input.recipeCuisine;\n if (input.recipeIngredient?.length) schema.recipeIngredient = input.recipeIngredient;\n if (input.keywords?.length) schema.keywords = input.keywords.join(\", \");\n\n if (input.author) {\n const person: Record<string, string> = { \"@type\": \"Person\", name: input.author.name };\n if (input.author.url) person.url = input.author.url;\n schema.author = person;\n }\n\n if (input.recipeInstructions?.length) {\n schema.recipeInstructions = input.recipeInstructions.map((step) => {\n if (typeof step === \"string\") {\n return { \"@type\": \"HowToStep\", text: step };\n }\n const s: Record<string, unknown> = { \"@type\": \"HowToStep\", text: step.text };\n if (step.name) s.name = step.name;\n if (step.url) s.url = step.url;\n if (step.image) s.image = step.image;\n return s;\n });\n }\n\n if (input.nutrition && Object.keys(input.nutrition).length) {\n schema.nutrition = { \"@type\": \"NutritionInformation\", ...input.nutrition };\n }\n\n if (input.ratingValue !== undefined) {\n const rating: Record<string, unknown> = {\n \"@type\": \"AggregateRating\",\n ratingValue: input.ratingValue,\n };\n if (input.reviewCount !== undefined) rating.reviewCount = input.reviewCount;\n schema.aggregateRating = rating;\n }\n\n return schema;\n}\n\n// ─── JobPosting ───────────────────────────────────────────────\n\nexport function createJobPostingSchema(input: JobPostingSchemaInput): JSONLDBase {\n const schema: JSONLDBase = {\n \"@context\": CONTEXT,\n \"@type\": \"JobPosting\",\n title: input.title,\n description: input.description,\n datePosted: input.datePosted,\n };\n\n if (input.validThrough) schema.validThrough = input.validThrough;\n if (input.url) schema.url = input.url;\n if (input.experienceRequirements) schema.experienceRequirements = input.experienceRequirements;\n if (input.educationRequirements) {\n schema.educationRequirements = {\n \"@type\": \"EducationalOccupationalCredential\",\n credentialCategory: input.educationRequirements,\n };\n }\n\n if (input.employmentType) {\n schema.employmentType = Array.isArray(input.employmentType)\n ? input.employmentType\n : input.employmentType;\n }\n\n if (input.skills) {\n schema.skills = Array.isArray(input.skills) ? input.skills.join(\", \") : input.skills;\n }\n\n const org: Record<string, unknown> = {\n \"@type\": \"Organization\",\n name: input.hiringOrganization.name,\n };\n if (input.hiringOrganization.sameAs) org.sameAs = input.hiringOrganization.sameAs;\n if (input.hiringOrganization.logo) org.logo = input.hiringOrganization.logo;\n schema.hiringOrganization = org;\n\n if (input.remote) {\n schema.jobLocationType = \"TELECOMMUTE\";\n }\n\n if (input.jobLocation) {\n schema.jobLocation = {\n \"@type\": \"Place\",\n address: { \"@type\": \"PostalAddress\", ...input.jobLocation },\n };\n }\n\n if (input.baseSalary) {\n const { currency, value, unitText = \"YEAR\" } = input.baseSalary;\n const monetaryAmount: Record<string, unknown> = {\n \"@type\": \"MonetaryAmount\",\n currency,\n };\n if (typeof value === \"number\") {\n monetaryAmount.value = value;\n } else {\n monetaryAmount.value = {\n \"@type\": \"QuantitativeValue\",\n minValue: value.minValue,\n maxValue: value.maxValue,\n unitText,\n };\n }\n schema.baseSalary = monetaryAmount;\n }\n\n if (input.identifier) {\n schema.identifier = {\n \"@type\": \"PropertyValue\",\n name: input.identifier.name,\n value: input.identifier.value,\n };\n }\n\n return schema;\n}\n\n// ─── Schema composition ───────────────────────────────────────\n\n/**\n * Compose multiple JSON-LD schemas into a single @graph array.\n * Useful for embedding multiple structured data blocks in one script tag.\n */\nexport function composeSchemas(...schemas: JSONLDBase[]): JSONLDBase {\n return {\n \"@context\": CONTEXT,\n \"@type\": \"ItemList\",\n \"@graph\": schemas.map(({ \"@context\": _ctx, ...rest }) => rest),\n };\n}\n"]}
|
package/dist/components.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkZECSTNEE_cjs=require('./chunk-ZECSTNEE.cjs');require('./chunk-FKDMHECL.cjs');Object.defineProperty(exports,"JsonLd",{enumerable:true,get:function(){return chunkZECSTNEE_cjs.b}});Object.defineProperty(exports,"SEOHead",{enumerable:true,get:function(){return chunkZECSTNEE_cjs.a}});Object.defineProperty(exports,"SEOPreview",{enumerable:true,get:function(){return chunkZECSTNEE_cjs.c}});//# sourceMappingURL=components.cjs.map
|
|
2
2
|
//# sourceMappingURL=components.cjs.map
|
package/dist/components.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { J as JsonLd, S as SEOHead } from './index-
|
|
1
|
+
export { J as JsonLd, S as SEOHead, c as SEOPreview, d as SEOPreviewProps } from './index-Wgogf4CX.cjs';
|
|
2
2
|
import 'react';
|
|
3
|
-
import './index-
|
|
3
|
+
import './index-Br7Sh9Ur.cjs';
|
package/dist/components.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { J as JsonLd, S as SEOHead } from './index-
|
|
1
|
+
export { J as JsonLd, S as SEOHead, c as SEOPreview, d as SEOPreviewProps } from './index-CKNcgAj8.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import './index-
|
|
3
|
+
import './index-Br7Sh9Ur.js';
|
package/dist/components.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{b as JsonLd,a as SEOHead,c as SEOPreview}from'./chunk-GNLXGAS6.js';import'./chunk-LP66SUGR.js';//# sourceMappingURL=components.js.map
|
|
2
2
|
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
type OpenGraphType = "website" | "article" | "product" | "profile" | "book" | "music.song" | "music.album" | "video.movie" | "video.episode" | (string & {});
|
|
2
|
+
interface OpenGraphImage {
|
|
3
|
+
url: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
type?: string;
|
|
8
|
+
}
|
|
9
|
+
interface OpenGraphConfig {
|
|
10
|
+
title?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
siteName?: string;
|
|
14
|
+
type?: OpenGraphType;
|
|
15
|
+
locale?: string;
|
|
16
|
+
images?: OpenGraphImage[];
|
|
17
|
+
}
|
|
18
|
+
type TwitterCardType = "summary" | "summary_large_image" | "app" | "player";
|
|
19
|
+
interface TwitterConfig {
|
|
20
|
+
card?: TwitterCardType;
|
|
21
|
+
site?: string;
|
|
22
|
+
creator?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
image?: string;
|
|
26
|
+
imageAlt?: string;
|
|
27
|
+
}
|
|
28
|
+
interface RobotsConfig {
|
|
29
|
+
index?: boolean;
|
|
30
|
+
follow?: boolean;
|
|
31
|
+
noarchive?: boolean;
|
|
32
|
+
nosnippet?: boolean;
|
|
33
|
+
noimageindex?: boolean;
|
|
34
|
+
notranslate?: boolean;
|
|
35
|
+
maxSnippet?: number;
|
|
36
|
+
maxImagePreview?: "none" | "standard" | "large";
|
|
37
|
+
maxVideoPreview?: number;
|
|
38
|
+
}
|
|
39
|
+
interface AlternateLink {
|
|
40
|
+
hreflang: string;
|
|
41
|
+
href: string;
|
|
42
|
+
}
|
|
43
|
+
interface SEOConfig {
|
|
44
|
+
title?: string;
|
|
45
|
+
titleTemplate?: string;
|
|
46
|
+
description?: string;
|
|
47
|
+
canonical?: string;
|
|
48
|
+
robots?: RobotsConfig;
|
|
49
|
+
openGraph?: OpenGraphConfig;
|
|
50
|
+
twitter?: TwitterConfig;
|
|
51
|
+
alternates?: AlternateLink[];
|
|
52
|
+
additionalMetaTags?: Array<{
|
|
53
|
+
name?: string;
|
|
54
|
+
property?: string;
|
|
55
|
+
content: string;
|
|
56
|
+
}>;
|
|
57
|
+
additionalLinkTags?: Array<{
|
|
58
|
+
rel: string;
|
|
59
|
+
href: string;
|
|
60
|
+
hreflang?: string;
|
|
61
|
+
type?: string;
|
|
62
|
+
sizes?: string;
|
|
63
|
+
}>;
|
|
64
|
+
jsonLd?: Record<string, unknown> | Array<Record<string, unknown>>;
|
|
65
|
+
}
|
|
66
|
+
interface JSONLDBase {
|
|
67
|
+
"@context"?: string;
|
|
68
|
+
"@type": string;
|
|
69
|
+
[key: string]: unknown;
|
|
70
|
+
}
|
|
71
|
+
interface BreadcrumbItem {
|
|
72
|
+
name: string;
|
|
73
|
+
url: string;
|
|
74
|
+
}
|
|
75
|
+
interface OrganizationSchemaInput {
|
|
76
|
+
name: string;
|
|
77
|
+
url: string;
|
|
78
|
+
logo?: string;
|
|
79
|
+
description?: string;
|
|
80
|
+
sameAs?: string[];
|
|
81
|
+
contactPoint?: {
|
|
82
|
+
telephone?: string;
|
|
83
|
+
contactType?: string;
|
|
84
|
+
email?: string;
|
|
85
|
+
areaServed?: string | string[];
|
|
86
|
+
availableLanguage?: string | string[];
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
interface WebsiteSchemaInput {
|
|
90
|
+
name: string;
|
|
91
|
+
url: string;
|
|
92
|
+
description?: string;
|
|
93
|
+
searchUrl?: string;
|
|
94
|
+
searchQueryParam?: string;
|
|
95
|
+
}
|
|
96
|
+
interface ArticleSchemaInput {
|
|
97
|
+
headline: string;
|
|
98
|
+
url: string;
|
|
99
|
+
description?: string;
|
|
100
|
+
images?: string[];
|
|
101
|
+
datePublished?: string;
|
|
102
|
+
dateModified?: string;
|
|
103
|
+
author?: {
|
|
104
|
+
name: string;
|
|
105
|
+
url?: string;
|
|
106
|
+
} | Array<{
|
|
107
|
+
name: string;
|
|
108
|
+
url?: string;
|
|
109
|
+
}>;
|
|
110
|
+
publisher?: {
|
|
111
|
+
name: string;
|
|
112
|
+
logo?: string;
|
|
113
|
+
};
|
|
114
|
+
section?: string;
|
|
115
|
+
keywords?: string[];
|
|
116
|
+
}
|
|
117
|
+
interface ProductSchemaInput {
|
|
118
|
+
name: string;
|
|
119
|
+
url: string;
|
|
120
|
+
description?: string;
|
|
121
|
+
images?: string[];
|
|
122
|
+
brand?: string;
|
|
123
|
+
sku?: string;
|
|
124
|
+
gtin?: string;
|
|
125
|
+
price?: number | string;
|
|
126
|
+
priceCurrency?: string;
|
|
127
|
+
availability?: "InStock" | "OutOfStock" | "PreOrder" | "Discontinued" | (string & {});
|
|
128
|
+
ratingValue?: number;
|
|
129
|
+
reviewCount?: number;
|
|
130
|
+
}
|
|
131
|
+
interface FAQItem {
|
|
132
|
+
question: string;
|
|
133
|
+
answer: string;
|
|
134
|
+
}
|
|
135
|
+
interface PersonSchemaInput {
|
|
136
|
+
name: string;
|
|
137
|
+
url?: string;
|
|
138
|
+
image?: string;
|
|
139
|
+
jobTitle?: string;
|
|
140
|
+
description?: string;
|
|
141
|
+
email?: string;
|
|
142
|
+
telephone?: string;
|
|
143
|
+
sameAs?: string[];
|
|
144
|
+
worksFor?: {
|
|
145
|
+
name: string;
|
|
146
|
+
url?: string;
|
|
147
|
+
};
|
|
148
|
+
birthDate?: string;
|
|
149
|
+
address?: string | {
|
|
150
|
+
streetAddress?: string;
|
|
151
|
+
addressLocality?: string;
|
|
152
|
+
addressRegion?: string;
|
|
153
|
+
postalCode?: string;
|
|
154
|
+
addressCountry?: string;
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
type RecipeInstruction = string | {
|
|
158
|
+
text: string;
|
|
159
|
+
name?: string;
|
|
160
|
+
url?: string;
|
|
161
|
+
image?: string;
|
|
162
|
+
};
|
|
163
|
+
interface RecipeSchemaInput {
|
|
164
|
+
name: string;
|
|
165
|
+
description?: string;
|
|
166
|
+
images?: string[];
|
|
167
|
+
author?: {
|
|
168
|
+
name: string;
|
|
169
|
+
url?: string;
|
|
170
|
+
};
|
|
171
|
+
datePublished?: string;
|
|
172
|
+
prepTime?: string;
|
|
173
|
+
cookTime?: string;
|
|
174
|
+
totalTime?: string;
|
|
175
|
+
recipeYield?: string | number;
|
|
176
|
+
recipeCategory?: string;
|
|
177
|
+
recipeCuisine?: string;
|
|
178
|
+
recipeIngredient?: string[];
|
|
179
|
+
recipeInstructions?: RecipeInstruction[];
|
|
180
|
+
nutrition?: Record<string, string>;
|
|
181
|
+
ratingValue?: number;
|
|
182
|
+
reviewCount?: number;
|
|
183
|
+
keywords?: string[];
|
|
184
|
+
}
|
|
185
|
+
interface JobPostingSchemaInput {
|
|
186
|
+
title: string;
|
|
187
|
+
description: string;
|
|
188
|
+
datePosted: string;
|
|
189
|
+
validThrough?: string;
|
|
190
|
+
employmentType?: string | string[];
|
|
191
|
+
hiringOrganization: {
|
|
192
|
+
name: string;
|
|
193
|
+
sameAs?: string;
|
|
194
|
+
logo?: string;
|
|
195
|
+
};
|
|
196
|
+
jobLocation?: {
|
|
197
|
+
addressLocality?: string;
|
|
198
|
+
addressRegion?: string;
|
|
199
|
+
addressCountry?: string;
|
|
200
|
+
};
|
|
201
|
+
remote?: boolean;
|
|
202
|
+
baseSalary?: {
|
|
203
|
+
currency: string;
|
|
204
|
+
value: number | {
|
|
205
|
+
minValue: number;
|
|
206
|
+
maxValue: number;
|
|
207
|
+
};
|
|
208
|
+
unitText?: "HOUR" | "DAY" | "WEEK" | "MONTH" | "YEAR";
|
|
209
|
+
};
|
|
210
|
+
experienceRequirements?: string;
|
|
211
|
+
educationRequirements?: string;
|
|
212
|
+
skills?: string | string[];
|
|
213
|
+
url?: string;
|
|
214
|
+
identifier?: {
|
|
215
|
+
name: string;
|
|
216
|
+
value: string;
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
type ChangeFreq = "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never";
|
|
220
|
+
interface SitemapRoute {
|
|
221
|
+
path: string;
|
|
222
|
+
lastmod?: string;
|
|
223
|
+
changefreq?: ChangeFreq;
|
|
224
|
+
priority?: number;
|
|
225
|
+
}
|
|
226
|
+
interface GenerateSitemapOptions {
|
|
227
|
+
routes: string[] | SitemapRoute[];
|
|
228
|
+
baseUrl: string;
|
|
229
|
+
exclude?: string[];
|
|
230
|
+
defaultChangefreq?: ChangeFreq;
|
|
231
|
+
defaultPriority?: number;
|
|
232
|
+
}
|
|
233
|
+
interface RobotsRule {
|
|
234
|
+
userAgent?: string | string[];
|
|
235
|
+
allow?: string | string[];
|
|
236
|
+
disallow?: string | string[];
|
|
237
|
+
crawlDelay?: number;
|
|
238
|
+
}
|
|
239
|
+
interface GenerateRobotsOptions {
|
|
240
|
+
rules?: RobotsRule | RobotsRule[];
|
|
241
|
+
sitemap?: string | string[];
|
|
242
|
+
}
|
|
243
|
+
interface SEOValidationIssue {
|
|
244
|
+
page: string;
|
|
245
|
+
field: string;
|
|
246
|
+
message: string;
|
|
247
|
+
severity: "error" | "warning";
|
|
248
|
+
}
|
|
249
|
+
interface RouteWithSEO {
|
|
250
|
+
path: string;
|
|
251
|
+
name?: string;
|
|
252
|
+
seo?: SEOConfig;
|
|
253
|
+
}
|
|
254
|
+
interface SEOScoreCheck {
|
|
255
|
+
name: string;
|
|
256
|
+
passed: boolean;
|
|
257
|
+
points: number;
|
|
258
|
+
maxPoints: number;
|
|
259
|
+
message?: string;
|
|
260
|
+
}
|
|
261
|
+
interface SEOScoreResult {
|
|
262
|
+
page: string;
|
|
263
|
+
score: number;
|
|
264
|
+
maxScore: number;
|
|
265
|
+
percentage: number;
|
|
266
|
+
checks: SEOScoreCheck[];
|
|
267
|
+
}
|
|
268
|
+
type OGImageTemplate = "default" | "article" | "sports-event";
|
|
269
|
+
interface OGImageOptions {
|
|
270
|
+
title: string;
|
|
271
|
+
description?: string;
|
|
272
|
+
template?: OGImageTemplate;
|
|
273
|
+
brand?: string;
|
|
274
|
+
backgroundColor?: string;
|
|
275
|
+
textColor?: string;
|
|
276
|
+
accentColor?: string;
|
|
277
|
+
category?: string;
|
|
278
|
+
author?: string;
|
|
279
|
+
dateString?: string;
|
|
280
|
+
homeTeam?: string;
|
|
281
|
+
awayTeam?: string;
|
|
282
|
+
eventDate?: string;
|
|
283
|
+
}
|
|
284
|
+
type EventStatus = "EventScheduled" | "EventCancelled" | "EventPostponed" | "EventRescheduled";
|
|
285
|
+
type EventAttendanceMode = "OfflineEventAttendanceMode" | "OnlineEventAttendanceMode" | "MixedEventAttendanceMode";
|
|
286
|
+
interface EventSchemaInput {
|
|
287
|
+
name: string;
|
|
288
|
+
startDate: string;
|
|
289
|
+
endDate?: string;
|
|
290
|
+
description?: string;
|
|
291
|
+
url?: string;
|
|
292
|
+
images?: string[];
|
|
293
|
+
location?: {
|
|
294
|
+
name: string;
|
|
295
|
+
url?: string;
|
|
296
|
+
address?: string | {
|
|
297
|
+
streetAddress?: string;
|
|
298
|
+
addressLocality?: string;
|
|
299
|
+
addressRegion?: string;
|
|
300
|
+
postalCode?: string;
|
|
301
|
+
addressCountry?: string;
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
organizer?: {
|
|
305
|
+
name: string;
|
|
306
|
+
url?: string;
|
|
307
|
+
};
|
|
308
|
+
performer?: {
|
|
309
|
+
name: string;
|
|
310
|
+
url?: string;
|
|
311
|
+
} | Array<{
|
|
312
|
+
name: string;
|
|
313
|
+
url?: string;
|
|
314
|
+
}>;
|
|
315
|
+
eventStatus?: EventStatus;
|
|
316
|
+
eventAttendanceMode?: EventAttendanceMode;
|
|
317
|
+
/** Presence of any sports-specific field switches @type to "SportsEvent" */
|
|
318
|
+
sport?: string;
|
|
319
|
+
homeTeam?: {
|
|
320
|
+
name: string;
|
|
321
|
+
url?: string;
|
|
322
|
+
};
|
|
323
|
+
awayTeam?: {
|
|
324
|
+
name: string;
|
|
325
|
+
url?: string;
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export type { ArticleSchemaInput as A, BreadcrumbItem as B, ChangeFreq as C, EventSchemaInput as E, FAQItem as F, GenerateRobotsOptions as G, JSONLDBase as J, OrganizationSchemaInput as O, PersonSchemaInput as P, RecipeSchemaInput as R, SEOScoreResult as S, TwitterConfig as T, WebsiteSchemaInput as W, JobPostingSchemaInput as a, ProductSchemaInput as b, GenerateSitemapOptions as c, SEOConfig as d, SEOValidationIssue as e, RouteWithSEO as f, OGImageOptions as g, AlternateLink as h, OpenGraphConfig as i, RobotsConfig as j, EventAttendanceMode as k, EventStatus as l, OGImageTemplate as m, OpenGraphImage as n, OpenGraphType as o, RecipeInstruction as p, RobotsRule as q, SEOScoreCheck as r, SitemapRoute as s, TwitterCardType as t };
|