nuxt-seo-utils 8.1.2 → 8.1.3
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/dist/cli.mjs +1 -1
- package/dist/devtools/200.html +1 -1
- package/dist/devtools/404.html +1 -1
- package/dist/devtools/_nuxt/{BcWmxi8A.js → BFYrtQoE.js} +1 -1
- package/dist/devtools/_nuxt/{fl08PdQo.js → BMEK-YQR.js} +1 -1
- package/dist/devtools/_nuxt/{BLzUgHsL.js → C9Hi2KVm.js} +1 -1
- package/dist/devtools/_nuxt/{V_pMFIP3.js → CFjIu9of.js} +3 -3
- package/dist/devtools/_nuxt/{CnDdOR4U.js → CrqYYvHl.js} +1 -1
- package/dist/devtools/_nuxt/{BcMdz6-c.js → DDqZOOL4.js} +1 -1
- package/dist/devtools/_nuxt/builds/latest.json +1 -1
- package/dist/devtools/_nuxt/builds/meta/668e2166-bb07-4e7f-a101-55cab3316289.json +1 -0
- package/dist/devtools/_nuxt/{Dp5u6Va_.js → dmEKVLxd.js} +1 -1
- package/dist/devtools/_nuxt/{CuTEUKU2.js → tuRrUv9a.js} +1 -1
- package/dist/devtools/debug/index.html +1 -1
- package/dist/devtools/docs/index.html +1 -1
- package/dist/devtools/identity/index.html +1 -1
- package/dist/devtools/index.html +1 -1
- package/dist/devtools/social/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +71 -48
- package/package.json +1 -1
- package/dist/devtools/_nuxt/builds/meta/54b86ea9-8a8b-4391-9b24-d67fd4c26ab7.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as K,u as Q,s as Y,q as G,v as H,x as Z,o as l,g as i,c as h,y as ee,w as c,b as r,e as te,F as k,i as t,n as _,z as b,j as a,A as se,p as ae,a as v,B as M,m as $,k as oe,C as ne,r as I,f as u,l as le}from"./V_pMFIP3.js";import{_ as re,S as p,e as ie,a as ce,t as ue,d as ge,p as ve}from"./CuTEUKU2.js";import{_ as de}from"./BcWmxi8A.js";const _e={class:"space-y-5 stagger-children"},pe={class:"seo-score-ring"},me={viewBox:"0 0 36 36",class:"seo-score-ring__svg"},he=["stroke-dasharray"],fe={class:"seo-score-ring__text"},xe={class:"font-medium text-sm"},ye={class:"text-xs text-[var(--color-text-muted)]"},we={class:"serp-preview-container"},ke={class:"serp-preview"},be={class:"flex items-center gap-3 mb-2"},Te={class:"serp-preview__favicon"},Ce={class:"text-xs text-gray-600 dark:text-[#bdc1c6] leading-tight"},Se={class:"serp-preview__title"},Me={class:"serp-preview__description"},$e={class:"grid md:grid-cols-2 gap-4"},Ae={class:"space-y-3"},Ee={class:"flex items-center justify-between"},Ne={class:"text-xs font-mono text-[var(--color-text-muted)]"},Be={class:"seo-progress-track"},Le={class:"text-xs text-[var(--color-text-muted)] truncate"},Re={class:"space-y-3"},De={class:"flex items-center justify-between"},ze={class:"text-xs font-mono text-[var(--color-text-muted)]"},He={class:"seo-progress-track"},Ie={class:"text-xs text-[var(--color-text-muted)] truncate"},Oe={class:"space-y-1"},Ue={class:"min-w-0"},Ge={class:"text-sm font-mono"},Pe={class:"text-xs text-[var(--color-text-muted)]"},Xe={class:"space-y-5"},We={class:"seo-category-header"},Fe={class:"seo-checklist"},Ve={class:"text-sm font-mono flex-1 min-w-0 truncate"},je={key:0,class:"seo-checklist__value"},Je={class:"seo-meta-table"},qe={class:"text-sm font-mono shrink-0 text-[var(--color-text)]"},Ke={class:"text-xs text-[var(--color-text-muted)] truncate min-w-0 flex-1 text-right font-mono"},Qe=K({__name:"index",setup(Ye){const P=/\/$/,{copy:X,copied:W}=Q(),A=I(!1),T=I(null),e=I(null),E=u(()=>e.value?.title.length||0),N=u(()=>e.value?.description.length||0),f=u(()=>ue(E.value)),x=u(()=>ge(N.value)),F=u(()=>{if(!e.value?.url)return"";try{const s=new URL(e.value.url);return s.hostname+(s.pathname==="/"?"":s.pathname.replace(P,""))}catch{return e.value.url}}),B=u(()=>e.value?[{category:"Basic",name:"title",present:!!e.value.title,value:e.value.title},{category:"Basic",name:"description",present:!!e.value.description,value:e.value.description},{category:"Basic",name:"canonical",present:!!e.value.canonical,value:e.value.canonical},{category:"Open Graph",name:"og:title",present:!!e.value.ogTags["og:title"],value:e.value.ogTags["og:title"]},{category:"Open Graph",name:"og:description",present:!!e.value.ogTags["og:description"],value:e.value.ogTags["og:description"]},{category:"Open Graph",name:"og:image",present:!!e.value.ogTags["og:image"],value:e.value.ogTags["og:image"]},{category:"Open Graph",name:"og:url",present:!!e.value.ogTags["og:url"],value:e.value.ogTags["og:url"]},{category:"Twitter",name:"twitter:card",present:!!e.value.twitterTags["twitter:card"],value:e.value.twitterTags["twitter:card"]},{category:"Twitter",name:"twitter:title",present:!!e.value.twitterTags["twitter:title"],value:e.value.twitterTags["twitter:title"],fallback:e.value.ogTags["og:title"]?"og:title":void 0},{category:"Twitter",name:"twitter:image",present:!!e.value.twitterTags["twitter:image"],value:e.value.twitterTags["twitter:image"],fallback:e.value.ogTags["og:image"]?"og:image":void 0}]:[]),V=u(()=>{const s={};return B.value.forEach(o=>{s[o.category]||(s[o.category]=[]),s[o.category].push(o)}),s}),y=u(()=>({present:B.value.filter(o=>o.present||o.fallback).length,total:B.value.length})),j=u(()=>{const{present:s,total:o}=y.value;return o>0?Math.round(s/o*100):0}),d=u(()=>{if(!e.value)return[];const s=[];return e.value.title||s.push({tag:"title",severity:"error",message:"No title tag found."}),e.value.description||s.push({tag:"meta description",severity:"warning",message:"Missing meta description."}),e.value.ogTags["og:title"]||s.push({tag:"og:title",severity:"warning",message:"Missing og:title for social sharing."}),e.value.ogTags["og:description"]||s.push({tag:"og:description",severity:"warning",message:"Missing og:description for social sharing."}),e.value.ogTags["og:image"]||s.push({tag:"og:image",severity:"warning",message:"Missing og:image. Posts with images get higher click rates."}),e.value.canonical||s.push({tag:"canonical",severity:"warning",message:"Missing canonical URL."}),s}),L=u(()=>{if(!e.value)return null;const s=d.value.some(w=>w.severity==="error")||f.value==="error"||x.value==="error",o=d.value.length>0||f.value==="warning"||x.value==="warning";return s?{variant:"warning",message:"Issues found",icon:"carbon:warning-alt"}:o?{variant:"warning",message:"Some suggestions",icon:"carbon:warning"}:{variant:"success",message:"Looking good!",icon:"carbon:checkmark-filled"}});function O(s){return s==="success"?"Good":s==="warning"?"Needs work":"Too long"}async function U(){A.value=!0,T.value=null,e.value=null;try{const s=window.parent?.location?.origin||window.location.origin,o=await fetch(`${s}${H.value}`,{headers:{Accept:"text/html"}});if(!o.ok)throw new Error(`HTTP ${o.status}`);const w=await o.text(),C=ve(w);e.value={...C,url:`${s}${H.value}`}}catch(s){T.value=s.message||"Failed to fetch page"}finally{A.value=!1}}return Y([()=>G.value,H,Z],()=>{G.value&&U()},{immediate:!0}),(s,o)=>{const w=ee,C=te,J=re,R=se,m=ae,D=de,z=ne,q=ce;return l(),i("div",_e,[A.value?(l(),h(w,{key:0})):T.value?(l(),h(J,{key:1,error:T.value,title:"Failed to check page"},{default:c(()=>[r(C,{size:"sm",variant:"ghost",icon:"carbon:reset",label:"Retry",onClick:U})]),_:1},8,["error"])):e.value?(l(),i(k,{key:2},[t("div",{class:_(["seo-status-card",`seo-status-card--${L.value?.variant}`])},[t("div",pe,[(l(),i("svg",me,[o[1]||(o[1]=t("circle",{cx:"18",cy:"18",r:"15.5",fill:"none",stroke:"var(--color-border-subtle)","stroke-width":"2.5"},null,-1)),t("circle",{cx:"18",cy:"18",r:"15.5",fill:"none",class:_(["seo-score-ring__progress",`seo-score-ring__progress--${L.value?.variant}`]),"stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${j.value*.974}, 100`,transform:"rotate(-90 18 18)"},null,10,he)])),t("span",fe,[b(a(y.value.present),1),o[2]||(o[2]=t("span",{class:"seo-score-ring__separator"},"/",-1)),b(a(y.value.total),1)])]),t("div",null,[t("p",xe,a(L.value?.message),1),t("p",ye,a(y.value.present)+" of "+a(y.value.total)+" essential tags present ",1)])],2),r(m,{icon:"carbon:search",text:"Google Search Preview"},{default:c(()=>[t("div",we,[t("div",ke,[t("div",be,[t("div",Te,[r(R,{name:"carbon:earth",class:"w-3.5 h-3.5 text-gray-400"})]),t("div",null,[t("div",Ce,a(F.value),1)])]),t("h3",Se,a(e.value.title||"No title found"),1),t("p",Me,a(e.value.description||"No description found"),1)])])]),_:1}),t("div",$e,[r(m,{icon:"carbon:text-short-paragraph",text:"Title",collapse:!1},{default:c(()=>[t("div",Ae,[t("div",Ee,[t("span",{class:_(["seo-length-status",`seo-length-status--${f.value}`])},a(O(f.value)),3),t("span",Ne,a(E.value)+"/"+a(v(p).TITLE_MAX_CHARS)+" chars · ~"+a(v(ie)(e.value.title))+"px ",1)]),t("div",Be,[t("div",{class:_(["seo-progress-fill",`seo-progress-fill--${f.value}`]),style:M({width:`${Math.min(100,E.value/v(p).TITLE_MAX_CHARS*100)}%`})},null,6),t("div",{class:"seo-progress-marker",style:M({left:`${30/v(p).TITLE_MAX_CHARS*100}%`})},null,4)]),t("p",Le,a(e.value.title||"Not set"),1)])]),_:1}),r(m,{icon:"carbon:text-long-paragraph",text:"Description",collapse:!1},{default:c(()=>[t("div",Re,[t("div",De,[t("span",{class:_(["seo-length-status",`seo-length-status--${x.value}`])},a(O(x.value)),3),t("span",ze,a(N.value)+"/"+a(v(p).DESC_MAX_CHARS)+" chars ",1)]),t("div",He,[t("div",{class:_(["seo-progress-fill",`seo-progress-fill--${x.value}`]),style:M({width:`${Math.min(100,N.value/v(p).DESC_MAX_CHARS*100)}%`})},null,6),t("div",{class:"seo-progress-marker",style:M({left:`${v(p).DESC_WARN_CHARS/v(p).DESC_MAX_CHARS*100}%`})},null,4)]),t("p",Ie,a(e.value.description||"Not set"),1)])]),_:1})]),d.value.length?(l(),h(m,{key:0,icon:"carbon:warning",text:"Missing Tags"},{actions:c(()=>[r(D,{value:d.value.filter(n=>n.severity==="error").length,label:"errors",variant:d.value.some(n=>n.severity==="error")?"danger":void 0},null,8,["value","variant"]),r(D,{value:d.value.filter(n=>n.severity==="warning").length,label:"warnings",variant:d.value.some(n=>n.severity==="warning")?"warning":void 0},null,8,["value","variant"])]),default:c(()=>[t("div",Oe,[(l(!0),i(k,null,$(d.value,n=>(l(),i("div",{key:n.tag,class:"seo-issue-row"},[r(R,{name:n.severity==="error"?"carbon:close-filled":"carbon:warning-filled",class:_(["text-base mt-0.5 shrink-0",n.severity==="error"?"text-red-500":"text-amber-500"])},null,8,["name","class"]),t("div",Ue,[t("span",Ge,a(n.tag),1),t("p",Pe,a(n.message),1)])]))),128))])]),_:1})):oe("",!0),r(m,{icon:"carbon:task",text:"Essential Tags Checklist"},{default:c(()=>[t("div",Xe,[(l(!0),i(k,null,$(V.value,(n,S)=>(l(),i("div",{key:S},[t("div",We,[t("span",null,a(S),1)]),t("div",Fe,[(l(!0),i(k,null,$(n,g=>(l(),i("div",{key:g.name,class:"seo-checklist__item"},[r(R,{name:g.present?"carbon:checkmark-filled":g.fallback?"carbon:information-filled":"carbon:close-filled",class:_(["text-sm shrink-0",g.present?"text-green-500":g.fallback?"text-gray-400":"text-red-400"])},null,8,["name","class"]),t("span",Ve,a(g.name),1),g.value?(l(),i("span",je,a(g.value),1)):g.fallback?(l(),h(z,{key:1,color:"neutral",variant:"subtle",size:"xs"},{default:c(()=>[b(" falls back to "+a(g.fallback),1)]),_:2},1024)):(l(),h(z,{key:2,color:"neutral",variant:"subtle",size:"xs"},{default:c(()=>[...o[3]||(o[3]=[b(" missing ",-1)])]),_:1}))]))),128))])]))),128))])]),_:1}),r(m,{icon:"carbon:list",text:"All Meta Tags"},{actions:c(()=>[r(D,{value:e.value.allMeta.length,label:"tags"},null,8,["value"]),r(C,{size:"xs",variant:"ghost",color:"neutral",icon:"carbon:copy",label:v(W)?"Copied!":"Copy JSON",onClick:o[0]||(o[0]=n=>v(X)(JSON.stringify({title:e.value.title,description:e.value.description,canonical:e.value.canonical,og:e.value.ogTags,twitter:e.value.twitterTags},null,2)))},null,8,["label"])]),default:c(()=>[t("div",Je,[(l(!0),i(k,null,$(e.value.allMeta,(n,S)=>(l(),i("div",{key:n.name+S,class:"seo-meta-table__row"},[r(z,{color:n.type==="property"?"primary":n.type==="name"?"neutral":"warning",variant:"subtle",size:"xs"},{default:c(()=>[b(a(n.type),1)]),_:2},1032,["color"]),t("span",qe,a(n.name),1),t("span",Ke,a(n.content),1)]))),128))])]),_:1})],64)):(l(),h(q,{key:3,icon:"carbon:plug",title:"Waiting for connection",description:"Waiting for connection to host app..."}))])}}}),st=le(Qe,[["__scopeId","data-v-270956ec"]]);export{st as default};
|
|
1
|
+
import{d as K,u as Q,s as Y,q as G,v as H,x as Z,o as l,g as i,c as h,y as ee,w as c,b as r,e as te,F as k,i as t,n as _,z as b,j as a,A as se,p as ae,a as v,B as M,m as $,k as oe,C as ne,r as I,f as u,l as le}from"./CFjIu9of.js";import{_ as re,S as p,e as ie,a as ce,t as ue,d as ge,p as ve}from"./tuRrUv9a.js";import{_ as de}from"./BFYrtQoE.js";const _e={class:"space-y-5 stagger-children"},pe={class:"seo-score-ring"},me={viewBox:"0 0 36 36",class:"seo-score-ring__svg"},he=["stroke-dasharray"],fe={class:"seo-score-ring__text"},xe={class:"font-medium text-sm"},ye={class:"text-xs text-[var(--color-text-muted)]"},we={class:"serp-preview-container"},ke={class:"serp-preview"},be={class:"flex items-center gap-3 mb-2"},Te={class:"serp-preview__favicon"},Ce={class:"text-xs text-gray-600 dark:text-[#bdc1c6] leading-tight"},Se={class:"serp-preview__title"},Me={class:"serp-preview__description"},$e={class:"grid md:grid-cols-2 gap-4"},Ae={class:"space-y-3"},Ee={class:"flex items-center justify-between"},Ne={class:"text-xs font-mono text-[var(--color-text-muted)]"},Be={class:"seo-progress-track"},Le={class:"text-xs text-[var(--color-text-muted)] truncate"},Re={class:"space-y-3"},De={class:"flex items-center justify-between"},ze={class:"text-xs font-mono text-[var(--color-text-muted)]"},He={class:"seo-progress-track"},Ie={class:"text-xs text-[var(--color-text-muted)] truncate"},Oe={class:"space-y-1"},Ue={class:"min-w-0"},Ge={class:"text-sm font-mono"},Pe={class:"text-xs text-[var(--color-text-muted)]"},Xe={class:"space-y-5"},We={class:"seo-category-header"},Fe={class:"seo-checklist"},Ve={class:"text-sm font-mono flex-1 min-w-0 truncate"},je={key:0,class:"seo-checklist__value"},Je={class:"seo-meta-table"},qe={class:"text-sm font-mono shrink-0 text-[var(--color-text)]"},Ke={class:"text-xs text-[var(--color-text-muted)] truncate min-w-0 flex-1 text-right font-mono"},Qe=K({__name:"index",setup(Ye){const P=/\/$/,{copy:X,copied:W}=Q(),A=I(!1),T=I(null),e=I(null),E=u(()=>e.value?.title.length||0),N=u(()=>e.value?.description.length||0),f=u(()=>ue(E.value)),x=u(()=>ge(N.value)),F=u(()=>{if(!e.value?.url)return"";try{const s=new URL(e.value.url);return s.hostname+(s.pathname==="/"?"":s.pathname.replace(P,""))}catch{return e.value.url}}),B=u(()=>e.value?[{category:"Basic",name:"title",present:!!e.value.title,value:e.value.title},{category:"Basic",name:"description",present:!!e.value.description,value:e.value.description},{category:"Basic",name:"canonical",present:!!e.value.canonical,value:e.value.canonical},{category:"Open Graph",name:"og:title",present:!!e.value.ogTags["og:title"],value:e.value.ogTags["og:title"]},{category:"Open Graph",name:"og:description",present:!!e.value.ogTags["og:description"],value:e.value.ogTags["og:description"]},{category:"Open Graph",name:"og:image",present:!!e.value.ogTags["og:image"],value:e.value.ogTags["og:image"]},{category:"Open Graph",name:"og:url",present:!!e.value.ogTags["og:url"],value:e.value.ogTags["og:url"]},{category:"Twitter",name:"twitter:card",present:!!e.value.twitterTags["twitter:card"],value:e.value.twitterTags["twitter:card"]},{category:"Twitter",name:"twitter:title",present:!!e.value.twitterTags["twitter:title"],value:e.value.twitterTags["twitter:title"],fallback:e.value.ogTags["og:title"]?"og:title":void 0},{category:"Twitter",name:"twitter:image",present:!!e.value.twitterTags["twitter:image"],value:e.value.twitterTags["twitter:image"],fallback:e.value.ogTags["og:image"]?"og:image":void 0}]:[]),V=u(()=>{const s={};return B.value.forEach(o=>{s[o.category]||(s[o.category]=[]),s[o.category].push(o)}),s}),y=u(()=>({present:B.value.filter(o=>o.present||o.fallback).length,total:B.value.length})),j=u(()=>{const{present:s,total:o}=y.value;return o>0?Math.round(s/o*100):0}),d=u(()=>{if(!e.value)return[];const s=[];return e.value.title||s.push({tag:"title",severity:"error",message:"No title tag found."}),e.value.description||s.push({tag:"meta description",severity:"warning",message:"Missing meta description."}),e.value.ogTags["og:title"]||s.push({tag:"og:title",severity:"warning",message:"Missing og:title for social sharing."}),e.value.ogTags["og:description"]||s.push({tag:"og:description",severity:"warning",message:"Missing og:description for social sharing."}),e.value.ogTags["og:image"]||s.push({tag:"og:image",severity:"warning",message:"Missing og:image. Posts with images get higher click rates."}),e.value.canonical||s.push({tag:"canonical",severity:"warning",message:"Missing canonical URL."}),s}),L=u(()=>{if(!e.value)return null;const s=d.value.some(w=>w.severity==="error")||f.value==="error"||x.value==="error",o=d.value.length>0||f.value==="warning"||x.value==="warning";return s?{variant:"warning",message:"Issues found",icon:"carbon:warning-alt"}:o?{variant:"warning",message:"Some suggestions",icon:"carbon:warning"}:{variant:"success",message:"Looking good!",icon:"carbon:checkmark-filled"}});function O(s){return s==="success"?"Good":s==="warning"?"Needs work":"Too long"}async function U(){A.value=!0,T.value=null,e.value=null;try{const s=window.parent?.location?.origin||window.location.origin,o=await fetch(`${s}${H.value}`,{headers:{Accept:"text/html"}});if(!o.ok)throw new Error(`HTTP ${o.status}`);const w=await o.text(),C=ve(w);e.value={...C,url:`${s}${H.value}`}}catch(s){T.value=s.message||"Failed to fetch page"}finally{A.value=!1}}return Y([()=>G.value,H,Z],()=>{G.value&&U()},{immediate:!0}),(s,o)=>{const w=ee,C=te,J=re,R=se,m=ae,D=de,z=ne,q=ce;return l(),i("div",_e,[A.value?(l(),h(w,{key:0})):T.value?(l(),h(J,{key:1,error:T.value,title:"Failed to check page"},{default:c(()=>[r(C,{size:"sm",variant:"ghost",icon:"carbon:reset",label:"Retry",onClick:U})]),_:1},8,["error"])):e.value?(l(),i(k,{key:2},[t("div",{class:_(["seo-status-card",`seo-status-card--${L.value?.variant}`])},[t("div",pe,[(l(),i("svg",me,[o[1]||(o[1]=t("circle",{cx:"18",cy:"18",r:"15.5",fill:"none",stroke:"var(--color-border-subtle)","stroke-width":"2.5"},null,-1)),t("circle",{cx:"18",cy:"18",r:"15.5",fill:"none",class:_(["seo-score-ring__progress",`seo-score-ring__progress--${L.value?.variant}`]),"stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${j.value*.974}, 100`,transform:"rotate(-90 18 18)"},null,10,he)])),t("span",fe,[b(a(y.value.present),1),o[2]||(o[2]=t("span",{class:"seo-score-ring__separator"},"/",-1)),b(a(y.value.total),1)])]),t("div",null,[t("p",xe,a(L.value?.message),1),t("p",ye,a(y.value.present)+" of "+a(y.value.total)+" essential tags present ",1)])],2),r(m,{icon:"carbon:search",text:"Google Search Preview"},{default:c(()=>[t("div",we,[t("div",ke,[t("div",be,[t("div",Te,[r(R,{name:"carbon:earth",class:"w-3.5 h-3.5 text-gray-400"})]),t("div",null,[t("div",Ce,a(F.value),1)])]),t("h3",Se,a(e.value.title||"No title found"),1),t("p",Me,a(e.value.description||"No description found"),1)])])]),_:1}),t("div",$e,[r(m,{icon:"carbon:text-short-paragraph",text:"Title",collapse:!1},{default:c(()=>[t("div",Ae,[t("div",Ee,[t("span",{class:_(["seo-length-status",`seo-length-status--${f.value}`])},a(O(f.value)),3),t("span",Ne,a(E.value)+"/"+a(v(p).TITLE_MAX_CHARS)+" chars · ~"+a(v(ie)(e.value.title))+"px ",1)]),t("div",Be,[t("div",{class:_(["seo-progress-fill",`seo-progress-fill--${f.value}`]),style:M({width:`${Math.min(100,E.value/v(p).TITLE_MAX_CHARS*100)}%`})},null,6),t("div",{class:"seo-progress-marker",style:M({left:`${30/v(p).TITLE_MAX_CHARS*100}%`})},null,4)]),t("p",Le,a(e.value.title||"Not set"),1)])]),_:1}),r(m,{icon:"carbon:text-long-paragraph",text:"Description",collapse:!1},{default:c(()=>[t("div",Re,[t("div",De,[t("span",{class:_(["seo-length-status",`seo-length-status--${x.value}`])},a(O(x.value)),3),t("span",ze,a(N.value)+"/"+a(v(p).DESC_MAX_CHARS)+" chars ",1)]),t("div",He,[t("div",{class:_(["seo-progress-fill",`seo-progress-fill--${x.value}`]),style:M({width:`${Math.min(100,N.value/v(p).DESC_MAX_CHARS*100)}%`})},null,6),t("div",{class:"seo-progress-marker",style:M({left:`${v(p).DESC_WARN_CHARS/v(p).DESC_MAX_CHARS*100}%`})},null,4)]),t("p",Ie,a(e.value.description||"Not set"),1)])]),_:1})]),d.value.length?(l(),h(m,{key:0,icon:"carbon:warning",text:"Missing Tags"},{actions:c(()=>[r(D,{value:d.value.filter(n=>n.severity==="error").length,label:"errors",variant:d.value.some(n=>n.severity==="error")?"danger":void 0},null,8,["value","variant"]),r(D,{value:d.value.filter(n=>n.severity==="warning").length,label:"warnings",variant:d.value.some(n=>n.severity==="warning")?"warning":void 0},null,8,["value","variant"])]),default:c(()=>[t("div",Oe,[(l(!0),i(k,null,$(d.value,n=>(l(),i("div",{key:n.tag,class:"seo-issue-row"},[r(R,{name:n.severity==="error"?"carbon:close-filled":"carbon:warning-filled",class:_(["text-base mt-0.5 shrink-0",n.severity==="error"?"text-red-500":"text-amber-500"])},null,8,["name","class"]),t("div",Ue,[t("span",Ge,a(n.tag),1),t("p",Pe,a(n.message),1)])]))),128))])]),_:1})):oe("",!0),r(m,{icon:"carbon:task",text:"Essential Tags Checklist"},{default:c(()=>[t("div",Xe,[(l(!0),i(k,null,$(V.value,(n,S)=>(l(),i("div",{key:S},[t("div",We,[t("span",null,a(S),1)]),t("div",Fe,[(l(!0),i(k,null,$(n,g=>(l(),i("div",{key:g.name,class:"seo-checklist__item"},[r(R,{name:g.present?"carbon:checkmark-filled":g.fallback?"carbon:information-filled":"carbon:close-filled",class:_(["text-sm shrink-0",g.present?"text-green-500":g.fallback?"text-gray-400":"text-red-400"])},null,8,["name","class"]),t("span",Ve,a(g.name),1),g.value?(l(),i("span",je,a(g.value),1)):g.fallback?(l(),h(z,{key:1,color:"neutral",variant:"subtle",size:"xs"},{default:c(()=>[b(" falls back to "+a(g.fallback),1)]),_:2},1024)):(l(),h(z,{key:2,color:"neutral",variant:"subtle",size:"xs"},{default:c(()=>[...o[3]||(o[3]=[b(" missing ",-1)])]),_:1}))]))),128))])]))),128))])]),_:1}),r(m,{icon:"carbon:list",text:"All Meta Tags"},{actions:c(()=>[r(D,{value:e.value.allMeta.length,label:"tags"},null,8,["value"]),r(C,{size:"xs",variant:"ghost",color:"neutral",icon:"carbon:copy",label:v(W)?"Copied!":"Copy JSON",onClick:o[0]||(o[0]=n=>v(X)(JSON.stringify({title:e.value.title,description:e.value.description,canonical:e.value.canonical,og:e.value.ogTags,twitter:e.value.twitterTags},null,2)))},null,8,["label"])]),default:c(()=>[t("div",Je,[(l(!0),i(k,null,$(e.value.allMeta,(n,S)=>(l(),i("div",{key:n.name+S,class:"seo-meta-table__row"},[r(z,{color:n.type==="property"?"primary":n.type==="name"?"neutral":"warning",variant:"subtle",size:"xs"},{default:c(()=>[b(a(n.type),1)]),_:2},1032,["color"]),t("span",qe,a(n.name),1),t("span",Ke,a(n.content),1)]))),128))])]),_:1})],64)):(l(),h(q,{key:3,icon:"carbon:plug",title:"Waiting for connection",description:"Waiting for connection to host app..."}))])}}}),st=le(Qe,[["__scopeId","data-v-270956ec"]]);export{st as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as c,o as t,g as n,i as l,l as r,c as a}from"./
|
|
1
|
+
import{d as c,o as t,g as n,i as l,l as r,c as a}from"./CFjIu9of.js";const _={class:"h-full max-h-full overflow-hidden"},u=["src","title"],i=c({__name:"DevtoolsDocs",props:{url:{}},setup(e){return(s,o)=>(t(),n("div",_,[l("iframe",{src:e.url,title:`Documentation - ${e.url}`,class:"w-full h-full border-none",style:{"min-height":"calc(100vh - 100px)"}},null,8,u)]))}}),m=Object.assign(i,{__name:"DevtoolsDocs"}),d={};function f(e,s){const o=m;return t(),a(o,{url:"https://nuxtseo.com/docs/seo-utils"})}const p=r(d,[["render",f]]);export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"668e2166-bb07-4e7f-a101-55cab3316289","timestamp":1774587854022}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"668e2166-bb07-4e7f-a101-55cab3316289","timestamp":1774587854022,"prerendered":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as H,u as J,s as j,q as A,v as W,x as K,o,g as i,c as P,y as Q,w as x,b as r,e as X,F as f,i as e,n as B,z as p,j as a,A as Y,m as S,k as h,a as E,p as Z,B as ee,r as G,f as v,l as se}from"./V_pMFIP3.js";import{_ as te,a as oe,p as ae}from"./CuTEUKU2.js";import{_ as ne}from"./BcWmxi8A.js";const ie={class:"space-y-5 stagger-children"},le={class:"id-hero__left"},re={class:"id-score-ring"},ce={viewBox:"0 0 36 36",class:"id-score-ring__svg"},de=["stroke-dasharray"],ue={class:"id-score-ring__text"},me={class:"font-medium text-sm"},_e={class:"text-xs text-[var(--color-text-muted)]"},pe={class:"id-browser-tab"},ge={class:"id-browser-tab__chrome"},ve={class:"id-browser-tab__tab"},he=["src"],fe={class:"id-browser-tab__title"},xe={class:"id-browser-tab__bar"},be={class:"id-browser-tab__url"},ye={class:"id-group-header"},ke={class:"id-group-count"},we={class:"text-xs text-[var(--color-text-muted)] mb-3"},Ce={class:"id-icon-grid"},Se={class:"id-icon-preview"},Te=["src","alt"],ze={class:"id-icon-meta"},$e=["href"],Pe={class:"id-icon-badges"},Ie={key:0,class:"id-badge"},Ae={key:1,class:"id-badge"},Be={key:2,class:"id-badge id-badge--accent"},Ge={key:1,class:"id-empty panel-grids"},Ne={class:"id-empty__inner"},De={class:"id-empty__icon-ring"},Le={class:"id-terminal"},Me={class:"id-terminal__body"},Ue={class:"id-gen-files"},Ve={class:"id-gen-name"},We={class:"id-gen-size"},Ee={class:"id-gen-desc"},Fe={class:"hint-callout mt-4 w-full"},Re={key:0,class:"mb-5"},qe={class:"id-color-scheme-row"},Oe={class:"text-sm font-mono font-medium"},He={key:1},Je={class:"id-color-grid"},je={class:"id-color-card__meta"},Ke={class:"id-color-card__value"},Qe={key:1,class:"text-[0.625rem] text-[var(--color-text-subtle)] block mt-0.5 font-mono"},Xe={key:1,class:"hint-callout"},Ye={class:"id-guide-grid"},Ze={class:"id-guide-card"},es={class:"id-guide-card__icon"},ss={class:"id-guide-card"},ts={class:"id-guide-card__icon"},os={class:"id-file-list"},as={class:"id-file-name"},ns={class:"id-file-desc"},is={class:"id-guide-card"},ls={class:"id-guide-card__icon"},rs={class:"id-terminal__body !mt-auto !rounded-[var(--radius-sm)]"},F="npx nuxt-seo-utils icons --source <your-logo.svg>",cs=H({__name:"identity",setup(ds){const{copy:N}=J(),T=G(!1),b=G(null),d=G(null),g=v(()=>A.value?.siteConfig||null),y=v(()=>d.value?.icons||[]),D=v(()=>y.value.length>0),R=v(()=>{const n={};return y.value.forEach(s=>{const m=s.rel||"icon";n[m]||(n[m]=[]),n[m].push(s)}),n}),L={icon:{label:"Favicon",description:"Browser tab icons used across the site"},"apple-touch-icon":{label:"Apple Touch Icon",description:"High resolution icon for iOS home screen"}},k=v(()=>{if(!g.value||!d.value)return{present:0,total:0};const n=[!!g.value.name,!!g.value.url&&g.value.url!=="http://localhost:3000",!!g.value.description,D.value,d.value.ogImages.length>0,d.value.themeColors.length>0];return{present:n.filter(Boolean).length,total:n.length}}),z=v(()=>{const{present:n,total:s}=k.value;return s>0?Math.round(n/s*100):0}),M=v(()=>{const n=z.value;return n>=80?"success":(n>=50,"warning")}),U=v(()=>{const n=y.value.find(m=>m.href?.includes("favicon.ico"));return n?n.href:y.value.find(m=>m.rel==="icon")?.href||null}),q=v(()=>{if(!g.value?.url)return"localhost:3000";try{return new URL(g.value.url).hostname}catch{return g.value.url}});async function V(){T.value=!0,b.value=null,d.value=null;try{const n=window.parent?.location?.origin||window.location.origin,s=await fetch(`${n}${W.value}`,{headers:{Accept:"text/html"}});if(!s.ok)throw new Error(`HTTP ${s.status}`);const m=await s.text(),c=ae(m),$=[];c.allMeta.filter(t=>t.name==="theme-color").forEach(t=>{let _="default";const l=t.media||null;l?.includes("prefers-color-scheme: light")?_="light":l?.includes("prefers-color-scheme: dark")&&(_="dark"),$.push({color:t.content,media:l||void 0,context:_})});const u=[];c.ogTags["og:image"]&&u.push({url:c.ogTags["og:image"],width:c.ogTags["og:image:width"],height:c.ogTags["og:image:height"],alt:c.ogTags["og:image:alt"]});const w=[];c.twitterTags["twitter:image"]&&w.push({url:c.twitterTags["twitter:image"],width:c.twitterTags["twitter:image:width"],height:c.twitterTags["twitter:image:height"]});const C=c.allMeta.find(t=>t.name==="color-scheme"),I=c.iconLinks.map(t=>({...t,href:t.href.startsWith("http")?t.href:`${n}${t.href.startsWith("/")?"":"/"}${t.href}`}));d.value={icons:I,ogImages:u,twitterImages:w,themeColors:$,colorScheme:C?.content||null}}catch(n){b.value=n.message||"Failed to fetch page"}finally{T.value=!1}}j([()=>A.value,W,K],()=>{A.value&&V()},{immediate:!0});const O=[{name:"favicon.ico",size:"32x32",desc:"Browser tab"},{name:"icon-16x16.png",size:"16x16",desc:"Small favicon"},{name:"icon-32x32.png",size:"32x32",desc:"Standard favicon"},{name:"apple-touch-icon.png",size:"180x180",desc:"iOS home screen"},{name:"icon-192x192.png",size:"192x192",desc:"Android/PWA"},{name:"icon-512x512.png",size:"512x512",desc:"PWA splash"}];return(n,s)=>{const m=Q,c=X,$=te,u=Y,w=ne,C=Z,I=oe;return o(),i("div",ie,[T.value?(o(),P(m,{key:0})):b.value?(o(),P($,{key:1,error:b.value,title:"Failed to check page"},{default:x(()=>[r(c,{size:"sm",variant:"ghost",icon:"carbon:reset",label:"Retry",onClick:V})]),_:1},8,["error"])):d.value?(o(),i(f,{key:2},[e("div",{class:B(["id-hero",`id-hero--${M.value}`])},[e("div",le,[e("div",re,[(o(),i("svg",ce,[s[2]||(s[2]=e("circle",{cx:"18",cy:"18",r:"15.5",fill:"none",stroke:"var(--color-border-subtle)","stroke-width":"2.5"},null,-1)),e("circle",{cx:"18",cy:"18",r:"15.5",fill:"none",class:B(["id-score-ring__progress",`id-score-ring__progress--${M.value}`]),"stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${z.value*.974}, 100`,transform:"rotate(-90 18 18)"},null,10,de)])),e("span",ue,[p(a(k.value.present),1),s[3]||(s[3]=e("span",{class:"id-score-ring__sep"},"/",-1)),p(a(k.value.total),1)])]),e("div",null,[e("p",me,a(z.value>=80?"Identity configured":z.value>=50?"Partially configured":"Needs setup"),1),e("p",_e,a(k.value.present)+" of "+a(k.value.total)+" identity checks passing ",1)])]),e("div",pe,[e("div",ge,[s[4]||(s[4]=e("div",{class:"id-browser-tab__dots"},[e("span"),e("span"),e("span")],-1)),e("div",ve,[U.value?(o(),i("img",{key:0,src:U.value,class:"id-browser-tab__favicon",alt:""},null,8,he)):(o(),P(u,{key:1,name:"carbon:earth",class:"id-browser-tab__favicon-placeholder"})),e("span",fe,a(g.value?.name||"Untitled"),1)])]),e("div",xe,[r(u,{name:"carbon:locked",class:"id-browser-tab__lock"}),e("span",be,a(q.value),1)])])],2),r(C,{icon:"carbon:image",text:"Icons"},{actions:x(()=>[r(w,{value:y.value.length,label:"icons"},null,8,["value"])]),default:x(()=>[D.value?(o(!0),i(f,{key:0},S(R.value,(t,_)=>(o(),i("div",{key:_,class:"mb-5 last:mb-0"},[e("div",ye,[e("span",null,a(L[_]?.label||_),1),e("span",ke,a(t.length),1)]),e("p",we,a(L[_]?.description||""),1),e("div",Ce,[(o(!0),i(f,null,S(t,l=>(o(),i("div",{key:l.href,class:"id-icon-card"},[e("div",Se,[e("img",{src:l.href,alt:l.rel,class:"id-icon-img"},null,8,Te)]),e("div",ze,[e("a",{href:l.href,target:"_blank",class:"id-icon-href"},a(l.href),9,$e),e("div",Pe,[l.sizes?(o(),i("span",Ie,a(l.sizes),1)):h("",!0),l.type?(o(),i("span",Ae,a(l.type),1)):h("",!0),l.media?(o(),i("span",Be,a(l.media.includes("dark")?"Dark":l.media.includes("light")?"Light":l.media),1)):h("",!0)])])]))),128))])]))),128)):(o(),i("div",Ge,[e("div",Ne,[e("div",De,[r(u,{name:"carbon:image",class:"text-xl"})]),s[8]||(s[8]=e("p",{class:"font-medium text-sm mb-0.5"}," No favicons detected ",-1)),s[9]||(s[9]=e("p",{class:"text-xs text-[var(--color-text-muted)] mb-5 max-w-xs text-center"}," Generate all required icon variants from a single source image. ",-1)),e("div",Le,[s[6]||(s[6]=e("div",{class:"id-terminal__chrome"},[e("span",{class:"id-terminal__dot id-terminal__dot--red"}),e("span",{class:"id-terminal__dot id-terminal__dot--yellow"}),e("span",{class:"id-terminal__dot id-terminal__dot--green"}),e("span",{class:"id-terminal__label"},"Terminal")],-1)),e("div",Me,[s[5]||(s[5]=e("span",{class:"id-terminal__prompt"},"$",-1)),e("code",null,a(F)),r(c,{size:"xs",variant:"ghost",color:"neutral",icon:"carbon:copy",class:"id-terminal__copy",onClick:s[0]||(s[0]=t=>E(N)(F))})])]),e("div",Ue,[(o(),i(f,null,S(O,t=>e("div",{key:t.name,class:"id-gen-row"},[r(u,{name:"carbon:arrow-right",class:"id-gen-arrow"}),e("span",Ve,a(t.name),1),e("span",We,a(t.size),1),e("span",Ee,a(t.desc),1)])),64))]),e("div",Fe,[r(u,{name:"carbon:information",class:"hint-callout-icon text-sm mt-0.5 shrink-0"}),s[7]||(s[7]=e("div",{class:"text-xs text-[var(--color-text-muted)]"},[p(" Place a source image (SVG, PNG, or JPG) in your "),e("code",{class:"id-code"},"public/"),p(" directory, then run the command above. Requires "),e("code",{class:"id-code"},"sharp"),p(" as a dev dependency: "),e("pre",{class:"id-snippet !mt-2 !mb-0"},"pnpm add -D sharp")],-1))])])]))]),_:1}),r(C,{icon:"carbon:color-palette",text:"Theme Colors"},{actions:x(()=>[r(w,{value:d.value.themeColors.length,label:"colors"},null,8,["value"])]),default:x(()=>[d.value.themeColors.length||d.value.colorScheme?(o(),i(f,{key:0},[d.value.colorScheme?(o(),i("div",Re,[s[12]||(s[12]=e("div",{class:"id-group-header"},[e("span",null,"Color Scheme")],-1)),e("div",qe,[s[11]||(s[11]=e("div",{class:"id-color-scheme-swatch"},null,-1)),e("div",null,[e("span",Oe,a(d.value.colorScheme),1),s[10]||(s[10]=e("p",{class:"text-xs text-[var(--color-text-muted)]"}," Supported color schemes for system preferences ",-1))])])])):h("",!0),d.value.themeColors.length?(o(),i("div",He,[s[13]||(s[13]=e("div",{class:"id-group-header"},[e("span",null,"Theme Colors")],-1)),e("div",Je,[(o(!0),i(f,null,S(d.value.themeColors,(t,_)=>(o(),i("div",{key:_,class:"id-color-card"},[e("div",{class:"id-color-card__swatch",style:ee({backgroundColor:t.color})},null,4),e("div",je,[e("span",Ke,a(t.color),1),t.context!=="default"?(o(),i("span",{key:0,class:B(["id-badge",t.context==="dark"?"id-badge--dark":"id-badge--light"])},a(t.context),3)):h("",!0),t.media?(o(),i("span",Qe,a(t.media),1)):h("",!0)])]))),128))])])):h("",!0)],64)):(o(),i("div",Xe,[r(u,{name:"carbon:information",class:"hint-callout-icon text-sm mt-0.5 shrink-0"}),s[14]||(s[14]=e("div",{class:"text-xs text-[var(--color-text-muted)]"},[p(" No theme colors found. Add theme color meta tags in your "),e("code",{class:"id-code"},"nuxt.config.ts"),p(": "),e("pre",{class:"id-snippet !mt-2"},`app: {
|
|
1
|
+
import{d as H,u as J,s as j,q as A,v as W,x as K,o,g as i,c as P,y as Q,w as x,b as r,e as X,F as f,i as e,n as B,z as p,j as a,A as Y,m as S,k as h,a as E,p as Z,B as ee,r as G,f as v,l as se}from"./CFjIu9of.js";import{_ as te,a as oe,p as ae}from"./tuRrUv9a.js";import{_ as ne}from"./BFYrtQoE.js";const ie={class:"space-y-5 stagger-children"},le={class:"id-hero__left"},re={class:"id-score-ring"},ce={viewBox:"0 0 36 36",class:"id-score-ring__svg"},de=["stroke-dasharray"],ue={class:"id-score-ring__text"},me={class:"font-medium text-sm"},_e={class:"text-xs text-[var(--color-text-muted)]"},pe={class:"id-browser-tab"},ge={class:"id-browser-tab__chrome"},ve={class:"id-browser-tab__tab"},he=["src"],fe={class:"id-browser-tab__title"},xe={class:"id-browser-tab__bar"},be={class:"id-browser-tab__url"},ye={class:"id-group-header"},ke={class:"id-group-count"},we={class:"text-xs text-[var(--color-text-muted)] mb-3"},Ce={class:"id-icon-grid"},Se={class:"id-icon-preview"},Te=["src","alt"],ze={class:"id-icon-meta"},$e=["href"],Pe={class:"id-icon-badges"},Ie={key:0,class:"id-badge"},Ae={key:1,class:"id-badge"},Be={key:2,class:"id-badge id-badge--accent"},Ge={key:1,class:"id-empty panel-grids"},Ne={class:"id-empty__inner"},De={class:"id-empty__icon-ring"},Le={class:"id-terminal"},Me={class:"id-terminal__body"},Ue={class:"id-gen-files"},Ve={class:"id-gen-name"},We={class:"id-gen-size"},Ee={class:"id-gen-desc"},Fe={class:"hint-callout mt-4 w-full"},Re={key:0,class:"mb-5"},qe={class:"id-color-scheme-row"},Oe={class:"text-sm font-mono font-medium"},He={key:1},Je={class:"id-color-grid"},je={class:"id-color-card__meta"},Ke={class:"id-color-card__value"},Qe={key:1,class:"text-[0.625rem] text-[var(--color-text-subtle)] block mt-0.5 font-mono"},Xe={key:1,class:"hint-callout"},Ye={class:"id-guide-grid"},Ze={class:"id-guide-card"},es={class:"id-guide-card__icon"},ss={class:"id-guide-card"},ts={class:"id-guide-card__icon"},os={class:"id-file-list"},as={class:"id-file-name"},ns={class:"id-file-desc"},is={class:"id-guide-card"},ls={class:"id-guide-card__icon"},rs={class:"id-terminal__body !mt-auto !rounded-[var(--radius-sm)]"},F="npx nuxt-seo-utils icons --source <your-logo.svg>",cs=H({__name:"identity",setup(ds){const{copy:N}=J(),T=G(!1),b=G(null),d=G(null),g=v(()=>A.value?.siteConfig||null),y=v(()=>d.value?.icons||[]),D=v(()=>y.value.length>0),R=v(()=>{const n={};return y.value.forEach(s=>{const m=s.rel||"icon";n[m]||(n[m]=[]),n[m].push(s)}),n}),L={icon:{label:"Favicon",description:"Browser tab icons used across the site"},"apple-touch-icon":{label:"Apple Touch Icon",description:"High resolution icon for iOS home screen"}},k=v(()=>{if(!g.value||!d.value)return{present:0,total:0};const n=[!!g.value.name,!!g.value.url&&g.value.url!=="http://localhost:3000",!!g.value.description,D.value,d.value.ogImages.length>0,d.value.themeColors.length>0];return{present:n.filter(Boolean).length,total:n.length}}),z=v(()=>{const{present:n,total:s}=k.value;return s>0?Math.round(n/s*100):0}),M=v(()=>{const n=z.value;return n>=80?"success":(n>=50,"warning")}),U=v(()=>{const n=y.value.find(m=>m.href?.includes("favicon.ico"));return n?n.href:y.value.find(m=>m.rel==="icon")?.href||null}),q=v(()=>{if(!g.value?.url)return"localhost:3000";try{return new URL(g.value.url).hostname}catch{return g.value.url}});async function V(){T.value=!0,b.value=null,d.value=null;try{const n=window.parent?.location?.origin||window.location.origin,s=await fetch(`${n}${W.value}`,{headers:{Accept:"text/html"}});if(!s.ok)throw new Error(`HTTP ${s.status}`);const m=await s.text(),c=ae(m),$=[];c.allMeta.filter(t=>t.name==="theme-color").forEach(t=>{let _="default";const l=t.media||null;l?.includes("prefers-color-scheme: light")?_="light":l?.includes("prefers-color-scheme: dark")&&(_="dark"),$.push({color:t.content,media:l||void 0,context:_})});const u=[];c.ogTags["og:image"]&&u.push({url:c.ogTags["og:image"],width:c.ogTags["og:image:width"],height:c.ogTags["og:image:height"],alt:c.ogTags["og:image:alt"]});const w=[];c.twitterTags["twitter:image"]&&w.push({url:c.twitterTags["twitter:image"],width:c.twitterTags["twitter:image:width"],height:c.twitterTags["twitter:image:height"]});const C=c.allMeta.find(t=>t.name==="color-scheme"),I=c.iconLinks.map(t=>({...t,href:t.href.startsWith("http")?t.href:`${n}${t.href.startsWith("/")?"":"/"}${t.href}`}));d.value={icons:I,ogImages:u,twitterImages:w,themeColors:$,colorScheme:C?.content||null}}catch(n){b.value=n.message||"Failed to fetch page"}finally{T.value=!1}}j([()=>A.value,W,K],()=>{A.value&&V()},{immediate:!0});const O=[{name:"favicon.ico",size:"32x32",desc:"Browser tab"},{name:"icon-16x16.png",size:"16x16",desc:"Small favicon"},{name:"icon-32x32.png",size:"32x32",desc:"Standard favicon"},{name:"apple-touch-icon.png",size:"180x180",desc:"iOS home screen"},{name:"icon-192x192.png",size:"192x192",desc:"Android/PWA"},{name:"icon-512x512.png",size:"512x512",desc:"PWA splash"}];return(n,s)=>{const m=Q,c=X,$=te,u=Y,w=ne,C=Z,I=oe;return o(),i("div",ie,[T.value?(o(),P(m,{key:0})):b.value?(o(),P($,{key:1,error:b.value,title:"Failed to check page"},{default:x(()=>[r(c,{size:"sm",variant:"ghost",icon:"carbon:reset",label:"Retry",onClick:V})]),_:1},8,["error"])):d.value?(o(),i(f,{key:2},[e("div",{class:B(["id-hero",`id-hero--${M.value}`])},[e("div",le,[e("div",re,[(o(),i("svg",ce,[s[2]||(s[2]=e("circle",{cx:"18",cy:"18",r:"15.5",fill:"none",stroke:"var(--color-border-subtle)","stroke-width":"2.5"},null,-1)),e("circle",{cx:"18",cy:"18",r:"15.5",fill:"none",class:B(["id-score-ring__progress",`id-score-ring__progress--${M.value}`]),"stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${z.value*.974}, 100`,transform:"rotate(-90 18 18)"},null,10,de)])),e("span",ue,[p(a(k.value.present),1),s[3]||(s[3]=e("span",{class:"id-score-ring__sep"},"/",-1)),p(a(k.value.total),1)])]),e("div",null,[e("p",me,a(z.value>=80?"Identity configured":z.value>=50?"Partially configured":"Needs setup"),1),e("p",_e,a(k.value.present)+" of "+a(k.value.total)+" identity checks passing ",1)])]),e("div",pe,[e("div",ge,[s[4]||(s[4]=e("div",{class:"id-browser-tab__dots"},[e("span"),e("span"),e("span")],-1)),e("div",ve,[U.value?(o(),i("img",{key:0,src:U.value,class:"id-browser-tab__favicon",alt:""},null,8,he)):(o(),P(u,{key:1,name:"carbon:earth",class:"id-browser-tab__favicon-placeholder"})),e("span",fe,a(g.value?.name||"Untitled"),1)])]),e("div",xe,[r(u,{name:"carbon:locked",class:"id-browser-tab__lock"}),e("span",be,a(q.value),1)])])],2),r(C,{icon:"carbon:image",text:"Icons"},{actions:x(()=>[r(w,{value:y.value.length,label:"icons"},null,8,["value"])]),default:x(()=>[D.value?(o(!0),i(f,{key:0},S(R.value,(t,_)=>(o(),i("div",{key:_,class:"mb-5 last:mb-0"},[e("div",ye,[e("span",null,a(L[_]?.label||_),1),e("span",ke,a(t.length),1)]),e("p",we,a(L[_]?.description||""),1),e("div",Ce,[(o(!0),i(f,null,S(t,l=>(o(),i("div",{key:l.href,class:"id-icon-card"},[e("div",Se,[e("img",{src:l.href,alt:l.rel,class:"id-icon-img"},null,8,Te)]),e("div",ze,[e("a",{href:l.href,target:"_blank",class:"id-icon-href"},a(l.href),9,$e),e("div",Pe,[l.sizes?(o(),i("span",Ie,a(l.sizes),1)):h("",!0),l.type?(o(),i("span",Ae,a(l.type),1)):h("",!0),l.media?(o(),i("span",Be,a(l.media.includes("dark")?"Dark":l.media.includes("light")?"Light":l.media),1)):h("",!0)])])]))),128))])]))),128)):(o(),i("div",Ge,[e("div",Ne,[e("div",De,[r(u,{name:"carbon:image",class:"text-xl"})]),s[8]||(s[8]=e("p",{class:"font-medium text-sm mb-0.5"}," No favicons detected ",-1)),s[9]||(s[9]=e("p",{class:"text-xs text-[var(--color-text-muted)] mb-5 max-w-xs text-center"}," Generate all required icon variants from a single source image. ",-1)),e("div",Le,[s[6]||(s[6]=e("div",{class:"id-terminal__chrome"},[e("span",{class:"id-terminal__dot id-terminal__dot--red"}),e("span",{class:"id-terminal__dot id-terminal__dot--yellow"}),e("span",{class:"id-terminal__dot id-terminal__dot--green"}),e("span",{class:"id-terminal__label"},"Terminal")],-1)),e("div",Me,[s[5]||(s[5]=e("span",{class:"id-terminal__prompt"},"$",-1)),e("code",null,a(F)),r(c,{size:"xs",variant:"ghost",color:"neutral",icon:"carbon:copy",class:"id-terminal__copy",onClick:s[0]||(s[0]=t=>E(N)(F))})])]),e("div",Ue,[(o(),i(f,null,S(O,t=>e("div",{key:t.name,class:"id-gen-row"},[r(u,{name:"carbon:arrow-right",class:"id-gen-arrow"}),e("span",Ve,a(t.name),1),e("span",We,a(t.size),1),e("span",Ee,a(t.desc),1)])),64))]),e("div",Fe,[r(u,{name:"carbon:information",class:"hint-callout-icon text-sm mt-0.5 shrink-0"}),s[7]||(s[7]=e("div",{class:"text-xs text-[var(--color-text-muted)]"},[p(" Place a source image (SVG, PNG, or JPG) in your "),e("code",{class:"id-code"},"public/"),p(" directory, then run the command above. Requires "),e("code",{class:"id-code"},"sharp"),p(" as a dev dependency: "),e("pre",{class:"id-snippet !mt-2 !mb-0"},"pnpm add -D sharp")],-1))])])]))]),_:1}),r(C,{icon:"carbon:color-palette",text:"Theme Colors"},{actions:x(()=>[r(w,{value:d.value.themeColors.length,label:"colors"},null,8,["value"])]),default:x(()=>[d.value.themeColors.length||d.value.colorScheme?(o(),i(f,{key:0},[d.value.colorScheme?(o(),i("div",Re,[s[12]||(s[12]=e("div",{class:"id-group-header"},[e("span",null,"Color Scheme")],-1)),e("div",qe,[s[11]||(s[11]=e("div",{class:"id-color-scheme-swatch"},null,-1)),e("div",null,[e("span",Oe,a(d.value.colorScheme),1),s[10]||(s[10]=e("p",{class:"text-xs text-[var(--color-text-muted)]"}," Supported color schemes for system preferences ",-1))])])])):h("",!0),d.value.themeColors.length?(o(),i("div",He,[s[13]||(s[13]=e("div",{class:"id-group-header"},[e("span",null,"Theme Colors")],-1)),e("div",Je,[(o(!0),i(f,null,S(d.value.themeColors,(t,_)=>(o(),i("div",{key:_,class:"id-color-card"},[e("div",{class:"id-color-card__swatch",style:ee({backgroundColor:t.color})},null,4),e("div",je,[e("span",Ke,a(t.color),1),t.context!=="default"?(o(),i("span",{key:0,class:B(["id-badge",t.context==="dark"?"id-badge--dark":"id-badge--light"])},a(t.context),3)):h("",!0),t.media?(o(),i("span",Qe,a(t.media),1)):h("",!0)])]))),128))])])):h("",!0)],64)):(o(),i("div",Xe,[r(u,{name:"carbon:information",class:"hint-callout-icon text-sm mt-0.5 shrink-0"}),s[14]||(s[14]=e("div",{class:"text-xs text-[var(--color-text-muted)]"},[p(" No theme colors found. Add theme color meta tags in your "),e("code",{class:"id-code"},"nuxt.config.ts"),p(": "),e("pre",{class:"id-snippet !mt-2"},`app: {
|
|
2
2
|
head: {
|
|
3
3
|
meta: [
|
|
4
4
|
{ name: 'theme-color', content: '#00dc82' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as E,o as a,g as c,i as d,b,A as C,j as p,k as m,h as A,l as k,n as $,z as w}from"./
|
|
1
|
+
import{d as E,o as a,g as c,i as d,b,A as C,j as p,k as m,h as A,l as k,n as $,z as w}from"./CFjIu9of.js";const q={class:"devtools-error"},D={class:"devtools-error-icon-wrap"},M={class:"devtools-error-title"},R={key:0,class:"devtools-error-message"},N={key:1,class:"devtools-error-actions"},L=E({__name:"DevtoolsError",props:{icon:{default:"carbon:warning"},title:{default:"Something went wrong"},error:{}},setup(t){return(n,s)=>{const i=C;return a(),c("div",q,[d("div",D,[b(i,{name:t.icon,class:"devtools-error-icon"},null,8,["name"])]),d("p",M,p(t.title),1),t.error?(a(),c("p",R,p(typeof t.error=="string"?t.error:t.error.message),1)):m("",!0),n.$slots.default?(a(),c("div",N,[A(n.$slots,"default",{},void 0,!0)])):m("",!0)])}}}),P=Object.assign(k(L,[["__scopeId","data-v-98d242a0"]]),{__name:"DevtoolsError"}),X={class:"devtools-empty"},H={class:"devtools-empty-title"},O={key:0,class:"devtools-empty-description"},x={key:1,class:"devtools-empty-actions"},j=E({__name:"DevtoolsEmptyState",props:{icon:{default:"carbon:search"},title:{},description:{},variant:{default:"default"}},setup(t){return(n,s)=>{const i=C;return a(),c("div",X,[d("div",{class:$(["devtools-empty-icon",`devtools-empty-icon-${t.variant}`])},[b(i,{name:t.icon,class:"w-8 h-8","aria-hidden":"true"},null,8,["name"])],2),d("h2",H,p(t.title),1),t.description||n.$slots.description?(a(),c("p",O,[A(n.$slots,"description",{},()=>[w(p(t.description),1)],!0)])):m("",!0),n.$slots.default?(a(),c("div",x,[A(n.$slots,"default",{},void 0,!0)])):m("",!0)])}}}),V=Object.assign(k(j,[["__scopeId","data-v-72d2ca37"]]),{__name:"DevtoolsEmptyState"}),y={TITLE_MAX_CHARS:60,TITLE_WARN_CHARS:50,TITLE_MAX_PIXELS:580,DESC_MAX_CHARS:160,DESC_WARN_CHARS:150,DESC_MAX_PIXELS:920};function W(t,n=16){return Math.round(t.length*n*.55)}function B(t){const s=new DOMParser().parseFromString(t,"text/html"),i=s.querySelector("title")?.textContent?.trim()||"",I=s.querySelector('meta[name="description"]')?.getAttribute("content")?.trim()||"",T=s.querySelector('link[rel="canonical"]')?.getAttribute("href")||"",v={};s.querySelectorAll('meta[property^="og:"]').forEach(e=>{const o=e.getAttribute("property"),r=e.getAttribute("content");o&&r&&(v[o]=r)});const g={};s.querySelectorAll('meta[name^="twitter:"]').forEach(e=>{const o=e.getAttribute("name"),r=e.getAttribute("content");o&&r&&(g[o]=r)});const l=[];s.querySelectorAll("meta").forEach(e=>{const o=e.getAttribute("name"),r=e.getAttribute("property"),u=e.getAttribute("http-equiv"),h=e.getAttribute("content")||"",f=e.getAttribute("media")||void 0;o?l.push({name:o,content:h,type:"name",media:f}):r?l.push({name:r,content:h,type:"property",media:f}):u&&l.push({name:u,content:h,type:"http-equiv",media:f})});const _=[];s.querySelectorAll('script[type="application/ld+json"]').forEach(e=>{const o=e.textContent?.trim()||"";try{const r=JSON.parse(o),u=r["@type"]||(r["@graph"]?"Graph":"Unknown");_.push({type:u,data:r,raw:o})}catch{_.push({type:"Invalid JSON",data:null,raw:o})}});const S=[];return s.querySelectorAll('link[rel="icon"], link[rel="apple-touch-icon"], link[rel="shortcut icon"]').forEach(e=>{const o=e.getAttribute("href");o&&S.push({rel:e.getAttribute("rel")||"icon",href:o,type:e.getAttribute("type")||void 0,sizes:e.getAttribute("sizes")||void 0,media:e.getAttribute("media")||void 0})}),{title:i,description:I,ogTags:v,twitterTags:g,allMeta:l,canonical:T,schemas:_,iconLinks:S}}function U(t){return t>y.TITLE_MAX_CHARS?"error":t<30?"warning":"success"}function J(t){return t>y.DESC_MAX_CHARS?"error":t>y.DESC_WARN_CHARS||t<70?"warning":"success"}export{y as S,P as _,V as a,J as d,W as e,B as p,U as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-seo-utils/_nuxt/entry.p5YGwGey.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-seo-utils/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-seo-utils/_nuxt/entry.p5YGwGey.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-seo-utils/_nuxt/CFjIu9of.js"><script type="module" src="/__nuxt-seo-utils/_nuxt/CFjIu9of.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{i18n:{baseUrl:"",defaultLocale:"",rootRedirect:"",redirectStatusCode:302,skipSettingLocaleOnNavigate:false,locales:[],detectBrowserLanguage:{alwaysRedirect:false,cookieCrossOrigin:false,cookieDomain:"",cookieKey:"i18n_redirected",cookieSecure:false,fallbackLocale:"",redirectOn:"root",useCookie:true},experimental:{localeDetector:"",typedPages:true,typedOptionsAndMessages:false,alternateLinkCanonicalQueries:true,devCache:false,cacheLifetime:"",stripMessagesPayload:false,preload:false,strictSeo:false,nitroContextDetection:true,httpCacheDuration:10},domainLocales:{}}},app:{baseURL:"/__nuxt-seo-utils",buildId:"668e2166-bb07-4e7f-a101-55cab3316289",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774587864639,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-seo-utils/_nuxt/entry.p5YGwGey.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-seo-utils/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-seo-utils/_nuxt/entry.p5YGwGey.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-seo-utils/_nuxt/CFjIu9of.js"><script type="module" src="/__nuxt-seo-utils/_nuxt/CFjIu9of.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{i18n:{baseUrl:"",defaultLocale:"",rootRedirect:"",redirectStatusCode:302,skipSettingLocaleOnNavigate:false,locales:[],detectBrowserLanguage:{alwaysRedirect:false,cookieCrossOrigin:false,cookieDomain:"",cookieKey:"i18n_redirected",cookieSecure:false,fallbackLocale:"",redirectOn:"root",useCookie:true},experimental:{localeDetector:"",typedPages:true,typedOptionsAndMessages:false,alternateLinkCanonicalQueries:true,devCache:false,cacheLifetime:"",stripMessagesPayload:false,preload:false,strictSeo:false,nitroContextDetection:true,httpCacheDuration:10},domainLocales:{}}},app:{baseURL:"/__nuxt-seo-utils",buildId:"668e2166-bb07-4e7f-a101-55cab3316289",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774587864641,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-seo-utils/_nuxt/entry.p5YGwGey.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-seo-utils/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-seo-utils/_nuxt/entry.p5YGwGey.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-seo-utils/_nuxt/CFjIu9of.js"><script type="module" src="/__nuxt-seo-utils/_nuxt/CFjIu9of.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{i18n:{baseUrl:"",defaultLocale:"",rootRedirect:"",redirectStatusCode:302,skipSettingLocaleOnNavigate:false,locales:[],detectBrowserLanguage:{alwaysRedirect:false,cookieCrossOrigin:false,cookieDomain:"",cookieKey:"i18n_redirected",cookieSecure:false,fallbackLocale:"",redirectOn:"root",useCookie:true},experimental:{localeDetector:"",typedPages:true,typedOptionsAndMessages:false,alternateLinkCanonicalQueries:true,devCache:false,cacheLifetime:"",stripMessagesPayload:false,preload:false,strictSeo:false,nitroContextDetection:true,httpCacheDuration:10},domainLocales:{}}},app:{baseURL:"/__nuxt-seo-utils",buildId:"668e2166-bb07-4e7f-a101-55cab3316289",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774587864641,false]</script></body></html>
|
package/dist/devtools/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-seo-utils/_nuxt/entry.p5YGwGey.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-seo-utils/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-seo-utils/_nuxt/entry.p5YGwGey.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-seo-utils/_nuxt/CFjIu9of.js"><script type="module" src="/__nuxt-seo-utils/_nuxt/CFjIu9of.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15},env:"production"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{i18n:{baseUrl:"",defaultLocale:"",rootRedirect:"",redirectStatusCode:302,skipSettingLocaleOnNavigate:false,locales:[],detectBrowserLanguage:{alwaysRedirect:false,cookieCrossOrigin:false,cookieDomain:"",cookieKey:"i18n_redirected",cookieSecure:false,fallbackLocale:"",redirectOn:"root",useCookie:true},experimental:{localeDetector:"",typedPages:true,typedOptionsAndMessages:false,alternateLinkCanonicalQueries:true,devCache:false,cacheLifetime:"",stripMessagesPayload:false,preload:false,strictSeo:false,nitroContextDetection:true,httpCacheDuration:10},domainLocales:{}}},app:{baseURL:"/__nuxt-seo-utils",buildId:"668e2166-bb07-4e7f-a101-55cab3316289",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774587864641,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-seo-utils/_nuxt/entry.p5YGwGey.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-seo-utils/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-seo-utils/_nuxt/entry.p5YGwGey.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-seo-utils/_nuxt/CFjIu9of.js"><script type="module" src="/__nuxt-seo-utils/_nuxt/CFjIu9of.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{i18n:{baseUrl:"",defaultLocale:"",rootRedirect:"",redirectStatusCode:302,skipSettingLocaleOnNavigate:false,locales:[],detectBrowserLanguage:{alwaysRedirect:false,cookieCrossOrigin:false,cookieDomain:"",cookieKey:"i18n_redirected",cookieSecure:false,fallbackLocale:"",redirectOn:"root",useCookie:true},experimental:{localeDetector:"",typedPages:true,typedOptionsAndMessages:false,alternateLinkCanonicalQueries:true,devCache:false,cacheLifetime:"",stripMessagesPayload:false,preload:false,strictSeo:false,nitroContextDetection:true,httpCacheDuration:10},domainLocales:{}}},app:{baseURL:"/__nuxt-seo-utils",buildId:"668e2166-bb07-4e7f-a101-55cab3316289",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774587864641,false]</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { unpackMeta } from '@unhead/vue/utils';
|
|
|
9
9
|
import { glob } from 'tinyglobby';
|
|
10
10
|
import { encodePath, joinURL } from 'ufo';
|
|
11
11
|
import escapeRE from 'escape-string-regexp';
|
|
12
|
-
import { readFile } from 'node:fs/promises';
|
|
12
|
+
import { readFile, readdir } from 'node:fs/promises';
|
|
13
13
|
import imageSize from 'image-size';
|
|
14
14
|
import { setupDevToolsUI as setupDevToolsUI$1 } from 'nuxtseo-shared/devtools';
|
|
15
15
|
|
|
@@ -70,18 +70,22 @@ export {}
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
const
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
73
|
+
const MetaTagFileDeepGlobs = [
|
|
74
|
+
"**/og-image.{png,jpg,jpeg,gif}",
|
|
75
|
+
"**/opengraph-image.{png,jpg,jpeg,gif}",
|
|
76
|
+
"**/twitter-image.{png,jpg,jpeg,gif}",
|
|
77
|
+
"**/apple-icon.{jpg,jpeg,png}",
|
|
78
|
+
"**/apple-touch.{jpg,jpeg,png}",
|
|
79
|
+
"**/apple-touch-*.{jpg,jpeg,png}",
|
|
80
|
+
"**/apple-touch-icon.{jpg,jpeg,png}",
|
|
81
|
+
"**/apple-touch-icon-*.{jpg,jpeg,png}",
|
|
82
|
+
"**/icon.{ico,jpg,jpeg,png,svg}",
|
|
83
|
+
"**/icon-*.{ico,jpg,jpeg,png,svg}"
|
|
84
84
|
];
|
|
85
|
+
const META_TAG_FILE_RE = /^(?:(?:og-image|opengraph-image)\.(?:png|jpe?g|gif)|twitter-image\.(?:png|jpe?g|gif)|apple-(?:icon|touch|touch-icon)(?:-[^.]+)?\.(?:jpe?g|png)|icon(?:-[^.]+)?\.(?:ico|jpe?g|png|svg)|favicon\.ico)$/;
|
|
86
|
+
function isMetaTagFile(filename) {
|
|
87
|
+
return META_TAG_FILE_RE.test(filename);
|
|
88
|
+
}
|
|
85
89
|
|
|
86
90
|
const INDEX_SUFFIX_RE = /-index$/;
|
|
87
91
|
function generateNuxtPageFromFile(file, pagesDir) {
|
|
@@ -229,40 +233,43 @@ async function getImageDimensions(absolutePath) {
|
|
|
229
233
|
|
|
230
234
|
const DIR_SUFFIX_RE = /\/_dir$/;
|
|
231
235
|
async function generateTagsFromPageDirImages(nuxt = useNuxt()) {
|
|
232
|
-
const
|
|
233
|
-
const files = await glob(MetaTagFileGlobs, { cwd: pagesDir, onlyFiles: true });
|
|
236
|
+
const pagesDirs = nuxt.options._layers.map((layer) => resolve(layer.config.rootDir, layer.config.dir?.pages || "pages")).filter((dir) => fs.existsSync(dir));
|
|
234
237
|
const appendRouteRules = {};
|
|
235
238
|
const devMiddlewareMap = {};
|
|
236
239
|
const nitroOutputMap = [];
|
|
237
|
-
for (const
|
|
238
|
-
const
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
240
|
+
for (const pagesDir of pagesDirs) {
|
|
241
|
+
const files = await glob(MetaTagFileDeepGlobs, { cwd: pagesDir, onlyFiles: true });
|
|
242
|
+
for (const file of files) {
|
|
243
|
+
const fileName = basename(file);
|
|
244
|
+
const keyword = fileName.split(".")[0] || "";
|
|
245
|
+
let { path } = generateNuxtPageFromFile(resolve(pagesDir, dirname(file)), pagesDir);
|
|
246
|
+
const meta = await getImageMeta(pagesDir, file);
|
|
247
|
+
if (path.endsWith("/_dir"))
|
|
248
|
+
path = path.replace(DIR_SUFFIX_RE, "");
|
|
249
|
+
const src = joinURL(path, fileName);
|
|
250
|
+
if (appendRouteRules[`${path}/**`])
|
|
251
|
+
continue;
|
|
252
|
+
if (["icon", "apple-touch-icon", "apple-icon"].includes(keyword) || keyword.startsWith("icon-")) {
|
|
253
|
+
appendRouteRules[`${path}/**`] = {
|
|
254
|
+
head: {
|
|
255
|
+
link: [
|
|
256
|
+
{ rel: keyword, type: meta.type, href: src, sizes: meta.sizes }
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
} else {
|
|
261
|
+
appendRouteRules[`${path}/**`] = {
|
|
262
|
+
seoMeta: {
|
|
263
|
+
[["opengraph-image", "og-image"].includes(keyword) ? "ogImage" : "twitterImage"]: [{ url: src, ...meta, sizes: void 0 }]
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
devMiddlewareMap[src] = resolve(pagesDir, file);
|
|
268
|
+
nitroOutputMap.push({
|
|
269
|
+
src: resolve(pagesDir, file),
|
|
270
|
+
dest: src.slice(1)
|
|
271
|
+
});
|
|
259
272
|
}
|
|
260
|
-
devMiddlewareMap[src] = resolve(pagesDir, file);
|
|
261
|
-
nitroOutputMap.push({
|
|
262
|
-
src: resolve(pagesDir, file),
|
|
263
|
-
dest: src.slice(1)
|
|
264
|
-
// remove leading slash
|
|
265
|
-
});
|
|
266
273
|
}
|
|
267
274
|
nuxt.options.routeRules = defu(appendRouteRules, nuxt.options.routeRules);
|
|
268
275
|
nuxt.options.nitro.routeRules = defu(appendRouteRules, nuxt.options.nitro.routeRules);
|
|
@@ -284,9 +291,24 @@ async function generateTagsFromPageDirImages(nuxt = useNuxt()) {
|
|
|
284
291
|
});
|
|
285
292
|
}
|
|
286
293
|
|
|
294
|
+
async function listMetaTagFiles(dir) {
|
|
295
|
+
const entries = await readdir(dir, { withFileTypes: true }).catch(() => []);
|
|
296
|
+
return entries.filter((e) => e.isFile() && isMetaTagFile(e.name)).map((e) => e.name);
|
|
297
|
+
}
|
|
287
298
|
async function generateTagsFromPublicFiles(nuxt = useNuxt()) {
|
|
288
|
-
const
|
|
289
|
-
const
|
|
299
|
+
const publicDirs = nuxt.options._layers.map((layer) => resolve(layer.config.rootDir, layer.config.dir?.public || "public"));
|
|
300
|
+
const seen = /* @__PURE__ */ new Set();
|
|
301
|
+
const fileEntries = [];
|
|
302
|
+
for (const dir of publicDirs) {
|
|
303
|
+
const files = await listMetaTagFiles(dir);
|
|
304
|
+
for (const file of files) {
|
|
305
|
+
if (!seen.has(file)) {
|
|
306
|
+
seen.add(file);
|
|
307
|
+
fileEntries.push({ file, dir });
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
const rootPublicFiles = fileEntries.map((e) => e.file);
|
|
290
312
|
const headConfig = defu(nuxt.options.app.head, {
|
|
291
313
|
link: [],
|
|
292
314
|
meta: []
|
|
@@ -301,10 +323,11 @@ async function generateTagsFromPublicFiles(nuxt = useNuxt()) {
|
|
|
301
323
|
}
|
|
302
324
|
const isIcon = (file) => file.includes("icon") && !file.endsWith(".ico");
|
|
303
325
|
const isAppleTouchIcon = (file) => file.includes("apple-icon") || file.includes("apple-touch-icon") || file.includes("apple-touch");
|
|
326
|
+
const resolveDir = (file) => fileEntries.find((e) => e.file === file).dir;
|
|
304
327
|
headConfig.link.push(
|
|
305
328
|
...await Promise.all([
|
|
306
329
|
...rootPublicFiles.filter((file) => isIcon(file) && !isAppleTouchIcon(file)).sort().map(async (iconFile) => {
|
|
307
|
-
const meta = await getImageMeta(
|
|
330
|
+
const meta = await getImageMeta(resolveDir(iconFile), iconFile, true);
|
|
308
331
|
return {
|
|
309
332
|
rel: "icon",
|
|
310
333
|
href: joinURL(nuxt.options.app.baseURL, iconFile),
|
|
@@ -312,7 +335,7 @@ async function generateTagsFromPublicFiles(nuxt = useNuxt()) {
|
|
|
312
335
|
};
|
|
313
336
|
}),
|
|
314
337
|
...rootPublicFiles.filter((file) => isAppleTouchIcon(file)).sort().map(async (appleIconFile) => {
|
|
315
|
-
const meta = await getImageMeta(
|
|
338
|
+
const meta = await getImageMeta(resolveDir(appleIconFile), appleIconFile, true);
|
|
316
339
|
return {
|
|
317
340
|
rel: "apple-touch-icon",
|
|
318
341
|
href: joinURL(nuxt.options.app.baseURL, appleIconFile),
|
|
@@ -328,7 +351,7 @@ async function generateTagsFromPublicFiles(nuxt = useNuxt()) {
|
|
|
328
351
|
if (twitterImageFiles.length) {
|
|
329
352
|
headConfig.meta.push(
|
|
330
353
|
...(await Promise.all(twitterImageFiles.map(async (twitterImageFile) => {
|
|
331
|
-
const dimensions = await getImageDimensions(resolve(
|
|
354
|
+
const dimensions = await getImageDimensions(resolve(fileEntries.find((e) => e.file === twitterImageFile).dir, twitterImageFile));
|
|
332
355
|
return unpackMeta({
|
|
333
356
|
twitterImage: {
|
|
334
357
|
url: twitterImageFile,
|
|
@@ -346,7 +369,7 @@ async function generateTagsFromPublicFiles(nuxt = useNuxt()) {
|
|
|
346
369
|
if (ogImageFiles.length) {
|
|
347
370
|
headConfig.meta.push(
|
|
348
371
|
...(await Promise.all(ogImageFiles.map(async (src) => {
|
|
349
|
-
const meta = await getImageMeta(
|
|
372
|
+
const meta = await getImageMeta(fileEntries.find((e) => e.file === src).dir, src, false);
|
|
350
373
|
delete meta.sizes;
|
|
351
374
|
const seoMeta = {
|
|
352
375
|
ogImage: {
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"54b86ea9-8a8b-4391-9b24-d67fd4c26ab7","timestamp":1774546180435,"prerendered":[]}
|