/** Local title/description length report. Not a Google ranking or SERP simulation. */ export function describeSnippet({title='',description='',canonical=''}){ const t=String(title).trim(), d=String(description).trim(), c=String(canonical).trim(); const notes=[]; if(!t)notes.push('Başlık boş.'); if(!d)notes.push('Açıklama boş.'); if(t.length>60)notes.push('Başlık uzun olabilir; arama motoru farklı biçimde gösterebilir.'); if(d.length>160)notes.push('Açıklama uzun olabilir; görüntülenmesi garanti değildir.'); if(c){try{if(!['https:','http:'].includes(new URL(c).protocol))notes.push('Canonical HTTP(S) olmalı.')}catch{notes.push('Canonical adresi geçersiz.')}} return {titleLength:[...t].length,descriptionLength:[...d].length,notes}; }