@consilioweb/payload-seo-analyzer 1.11.0 → 1.13.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 +2 -0
- package/dist/client.cjs +527 -188
- package/dist/client.js +527 -188
- package/dist/index.cjs +423 -83
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +423 -83
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -1060,8 +1060,15 @@ var fr = {
|
|
|
1060
1060
|
markCornerstone: "Marquer pilier",
|
|
1061
1061
|
unmarkCornerstone: "D\xE9marquer pilier",
|
|
1062
1062
|
bulkOptimizeMeta: "Optimiser m\xE9ta (IA)",
|
|
1063
|
-
bulkOptimizing: "
|
|
1063
|
+
bulkOptimizing: "Analyse\u2026",
|
|
1064
1064
|
bulkConfirm: "Confirmer ?",
|
|
1065
|
+
bulkPreviewTitle: "Corrections m\xE9ta propos\xE9es",
|
|
1066
|
+
bulkApply: "Appliquer",
|
|
1067
|
+
bulkApplying: "Application\u2026",
|
|
1068
|
+
bulkCancel: "Annuler",
|
|
1069
|
+
bulkExport: "Exporter CSV",
|
|
1070
|
+
bulkNoChanges: "Aucune correction n\xE9cessaire sur la s\xE9lection.",
|
|
1071
|
+
bulkCappedNote: "limite atteinte (affine la s\xE9lection)",
|
|
1065
1072
|
searchPlaceholder: "Rechercher (titre, slug, keyword)...",
|
|
1066
1073
|
allCollections: "Toutes les collections",
|
|
1067
1074
|
allScores: "Tous les scores",
|
|
@@ -1655,8 +1662,15 @@ var en = {
|
|
|
1655
1662
|
markCornerstone: "Mark as cornerstone",
|
|
1656
1663
|
unmarkCornerstone: "Unmark cornerstone",
|
|
1657
1664
|
bulkOptimizeMeta: "Optimize meta (AI)",
|
|
1658
|
-
bulkOptimizing: "
|
|
1665
|
+
bulkOptimizing: "Analyzing\u2026",
|
|
1659
1666
|
bulkConfirm: "Confirm?",
|
|
1667
|
+
bulkPreviewTitle: "Proposed meta corrections",
|
|
1668
|
+
bulkApply: "Apply",
|
|
1669
|
+
bulkApplying: "Applying\u2026",
|
|
1670
|
+
bulkCancel: "Cancel",
|
|
1671
|
+
bulkExport: "Export CSV",
|
|
1672
|
+
bulkNoChanges: "No corrections needed on the selection.",
|
|
1673
|
+
bulkCappedNote: "limit reached (narrow the selection)",
|
|
1660
1674
|
searchPlaceholder: "Search (title, slug, keyword)...",
|
|
1661
1675
|
allCollections: "All collections",
|
|
1662
1676
|
allScores: "All scores",
|
|
@@ -9205,7 +9219,6 @@ function BulkActionBar({
|
|
|
9205
9219
|
optimizing,
|
|
9206
9220
|
t
|
|
9207
9221
|
}) {
|
|
9208
|
-
const [confirmOptimize, setConfirmOptimize] = useState(false);
|
|
9209
9222
|
if (count === 0) return null;
|
|
9210
9223
|
return /* @__PURE__ */ jsxs(
|
|
9211
9224
|
"div",
|
|
@@ -9255,18 +9268,11 @@ function BulkActionBar({
|
|
|
9255
9268
|
"button",
|
|
9256
9269
|
{
|
|
9257
9270
|
onClick: () => {
|
|
9258
|
-
if (optimizing)
|
|
9259
|
-
if (confirmOptimize) {
|
|
9260
|
-
setConfirmOptimize(false);
|
|
9261
|
-
onOptimizeMeta();
|
|
9262
|
-
} else {
|
|
9263
|
-
setConfirmOptimize(true);
|
|
9264
|
-
setTimeout(() => setConfirmOptimize(false), 4e3);
|
|
9265
|
-
}
|
|
9271
|
+
if (!optimizing) onOptimizeMeta();
|
|
9266
9272
|
},
|
|
9267
9273
|
disabled: optimizing,
|
|
9268
9274
|
style: { ...btnBase, backgroundColor: "#7c3aed", color: "#fff", opacity: optimizing ? 0.6 : 1 },
|
|
9269
|
-
children: optimizing ? t.seoView.bulkOptimizing :
|
|
9275
|
+
children: optimizing ? t.seoView.bulkOptimizing : `\u2728 ${t.seoView.bulkOptimizeMeta}`
|
|
9270
9276
|
}
|
|
9271
9277
|
),
|
|
9272
9278
|
/* @__PURE__ */ jsx(
|
|
@@ -9310,6 +9316,8 @@ function SeoView() {
|
|
|
9310
9316
|
const [saving, setSaving] = useState(false);
|
|
9311
9317
|
const [saveError, setSaveError] = useState(null);
|
|
9312
9318
|
const [bulkOptimizing, setBulkOptimizing] = useState(false);
|
|
9319
|
+
const [bulkApplying, setBulkApplying] = useState(false);
|
|
9320
|
+
const [bulkPreview, setBulkPreview] = useState(null);
|
|
9313
9321
|
const PAGE_SIZE = 50;
|
|
9314
9322
|
const fetchAudit = useCallback(async (forceRefresh = false) => {
|
|
9315
9323
|
setLoading(true);
|
|
@@ -9531,44 +9539,83 @@ function SeoView() {
|
|
|
9531
9539
|
[selectedIds, fetchAudit]
|
|
9532
9540
|
);
|
|
9533
9541
|
const handleBulkOptimizeMeta = useCallback(async () => {
|
|
9534
|
-
const
|
|
9535
|
-
if (
|
|
9542
|
+
const ids = Array.from(selectedIds).filter((k) => !k.startsWith("global:"));
|
|
9543
|
+
if (ids.length === 0) return;
|
|
9536
9544
|
setBulkOptimizing(true);
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
});
|
|
9547
|
-
if (!res.ok) continue;
|
|
9545
|
+
setBulkPreview(null);
|
|
9546
|
+
try {
|
|
9547
|
+
const res = await fetch("/api/seo-plugin/ai-optimize-bulk", {
|
|
9548
|
+
method: "POST",
|
|
9549
|
+
headers: { "Content-Type": "application/json" },
|
|
9550
|
+
credentials: "include",
|
|
9551
|
+
body: JSON.stringify({ ids, apply: false, limit: 100 })
|
|
9552
|
+
});
|
|
9553
|
+
if (res.ok) {
|
|
9548
9554
|
const data = await res.json();
|
|
9549
|
-
const
|
|
9550
|
-
|
|
9551
|
-
if (sug.metaTitle || sug.metaDescription) {
|
|
9552
|
-
patch.meta = { title: sug.metaTitle, description: sug.metaDescription };
|
|
9553
|
-
}
|
|
9554
|
-
if (sug.focusKeyword && sug.focusKeyword !== data.current?.focusKeyword) {
|
|
9555
|
-
patch.focusKeyword = sug.focusKeyword;
|
|
9556
|
-
}
|
|
9557
|
-
if (Object.keys(patch).length > 0) {
|
|
9558
|
-
await fetch(`/api/${collection}/${id}`, {
|
|
9559
|
-
method: "PATCH",
|
|
9560
|
-
headers: { "Content-Type": "application/json" },
|
|
9561
|
-
credentials: "include",
|
|
9562
|
-
body: JSON.stringify(patch)
|
|
9563
|
-
});
|
|
9564
|
-
}
|
|
9565
|
-
} catch {
|
|
9555
|
+
const changed = (data.results || []).filter((r) => r.changed && !r.error);
|
|
9556
|
+
setBulkPreview({ results: changed, capped: !!data.capped, total: data.processed || 0 });
|
|
9566
9557
|
}
|
|
9558
|
+
} catch {
|
|
9567
9559
|
}
|
|
9568
9560
|
setBulkOptimizing(false);
|
|
9561
|
+
}, [selectedIds]);
|
|
9562
|
+
const handleBulkApplyPreview = useCallback(async () => {
|
|
9563
|
+
if (!bulkPreview || bulkPreview.results.length === 0) return;
|
|
9564
|
+
setBulkApplying(true);
|
|
9565
|
+
const corrections = bulkPreview.results.map((r) => ({
|
|
9566
|
+
collection: r.collection,
|
|
9567
|
+
id: r.id,
|
|
9568
|
+
metaTitle: r.after.metaTitle,
|
|
9569
|
+
metaDescription: r.after.metaDescription,
|
|
9570
|
+
focusKeyword: r.after.focusKeyword
|
|
9571
|
+
}));
|
|
9572
|
+
try {
|
|
9573
|
+
await fetch("/api/seo-plugin/ai-optimize-bulk", {
|
|
9574
|
+
method: "POST",
|
|
9575
|
+
headers: { "Content-Type": "application/json" },
|
|
9576
|
+
credentials: "include",
|
|
9577
|
+
body: JSON.stringify({ corrections, apply: true, limit: 100 })
|
|
9578
|
+
});
|
|
9579
|
+
} catch {
|
|
9580
|
+
}
|
|
9581
|
+
setBulkApplying(false);
|
|
9582
|
+
setBulkPreview(null);
|
|
9569
9583
|
setSelectedIds(/* @__PURE__ */ new Set());
|
|
9570
9584
|
fetchAudit();
|
|
9571
|
-
}, [
|
|
9585
|
+
}, [bulkPreview, fetchAudit]);
|
|
9586
|
+
const handleExportBulkPreviewCsv = useCallback(() => {
|
|
9587
|
+
if (!bulkPreview) return;
|
|
9588
|
+
const header = [
|
|
9589
|
+
"collection",
|
|
9590
|
+
"id",
|
|
9591
|
+
"title",
|
|
9592
|
+
"before_title",
|
|
9593
|
+
"after_title",
|
|
9594
|
+
"before_description",
|
|
9595
|
+
"after_description",
|
|
9596
|
+
"before_keyword",
|
|
9597
|
+
"after_keyword"
|
|
9598
|
+
];
|
|
9599
|
+
const rows = bulkPreview.results.map((r) => [
|
|
9600
|
+
r.collection,
|
|
9601
|
+
r.id,
|
|
9602
|
+
r.title,
|
|
9603
|
+
r.before.metaTitle,
|
|
9604
|
+
r.after.metaTitle,
|
|
9605
|
+
r.before.metaDescription,
|
|
9606
|
+
r.after.metaDescription,
|
|
9607
|
+
r.before.focusKeyword,
|
|
9608
|
+
r.after.focusKeyword
|
|
9609
|
+
]);
|
|
9610
|
+
const csv = [header, ...rows].map((row) => row.map((c) => `"${String(c ?? "").replace(/"/g, '""')}"`).join(",")).join("\n");
|
|
9611
|
+
const blob = new Blob([csv], { type: "text/csv;charset=utf-8;" });
|
|
9612
|
+
const url = URL.createObjectURL(blob);
|
|
9613
|
+
const a = document.createElement("a");
|
|
9614
|
+
a.href = url;
|
|
9615
|
+
a.download = `seo-bulk-optimize-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`;
|
|
9616
|
+
a.click();
|
|
9617
|
+
URL.revokeObjectURL(url);
|
|
9618
|
+
}, [bulkPreview]);
|
|
9572
9619
|
const handleInlineSave = useCallback(
|
|
9573
9620
|
async (item, metaTitle, metaDescription) => {
|
|
9574
9621
|
setSaving(true);
|
|
@@ -10321,6 +10368,96 @@ function SeoView() {
|
|
|
10321
10368
|
optimizing: bulkOptimizing,
|
|
10322
10369
|
t
|
|
10323
10370
|
}
|
|
10371
|
+
),
|
|
10372
|
+
bulkPreview && /* @__PURE__ */ jsx(
|
|
10373
|
+
"div",
|
|
10374
|
+
{
|
|
10375
|
+
style: {
|
|
10376
|
+
position: "fixed",
|
|
10377
|
+
inset: 0,
|
|
10378
|
+
backgroundColor: "rgba(0,0,0,0.5)",
|
|
10379
|
+
zIndex: 100,
|
|
10380
|
+
display: "flex",
|
|
10381
|
+
alignItems: "center",
|
|
10382
|
+
justifyContent: "center",
|
|
10383
|
+
padding: 24,
|
|
10384
|
+
fontFamily: "var(--font-body, system-ui)"
|
|
10385
|
+
},
|
|
10386
|
+
onClick: () => {
|
|
10387
|
+
if (!bulkApplying) setBulkPreview(null);
|
|
10388
|
+
},
|
|
10389
|
+
children: /* @__PURE__ */ jsxs(
|
|
10390
|
+
"div",
|
|
10391
|
+
{
|
|
10392
|
+
onClick: (e) => e.stopPropagation(),
|
|
10393
|
+
style: {
|
|
10394
|
+
width: "min(900px, 100%)",
|
|
10395
|
+
maxHeight: "85vh",
|
|
10396
|
+
display: "flex",
|
|
10397
|
+
flexDirection: "column",
|
|
10398
|
+
backgroundColor: V2.bgCard,
|
|
10399
|
+
border: `1px solid ${V2.border}`,
|
|
10400
|
+
borderRadius: 12,
|
|
10401
|
+
overflow: "hidden"
|
|
10402
|
+
},
|
|
10403
|
+
children: [
|
|
10404
|
+
/* @__PURE__ */ jsxs("div", { style: { padding: "16px 20px", borderBottom: `1px solid ${V2.border}` }, children: [
|
|
10405
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 16, fontWeight: 800, color: V2.text }, children: t.seoView.bulkPreviewTitle }),
|
|
10406
|
+
/* @__PURE__ */ jsxs("div", { style: { fontSize: 12, color: V2.textSecondary, marginTop: 4 }, children: [
|
|
10407
|
+
bulkPreview.results.length,
|
|
10408
|
+
" / ",
|
|
10409
|
+
bulkPreview.total,
|
|
10410
|
+
bulkPreview.capped ? ` \xB7 ${t.seoView.bulkCappedNote}` : ""
|
|
10411
|
+
] })
|
|
10412
|
+
] }),
|
|
10413
|
+
/* @__PURE__ */ jsxs("div", { style: { overflowY: "auto", padding: "8px 20px", flex: 1 }, children: [
|
|
10414
|
+
bulkPreview.results.length === 0 && /* @__PURE__ */ jsx("div", { style: { padding: 24, textAlign: "center", color: V2.textSecondary, fontSize: 14 }, children: t.seoView.bulkNoChanges }),
|
|
10415
|
+
bulkPreview.results.map((r) => {
|
|
10416
|
+
const fields = [];
|
|
10417
|
+
if (r.before.metaTitle !== r.after.metaTitle) fields.push({ label: "Title", before: r.before.metaTitle, after: r.after.metaTitle });
|
|
10418
|
+
if (r.before.metaDescription !== r.after.metaDescription) fields.push({ label: "Description", before: r.before.metaDescription, after: r.after.metaDescription });
|
|
10419
|
+
if (r.before.focusKeyword !== r.after.focusKeyword) fields.push({ label: "Keyword", before: r.before.focusKeyword, after: r.after.focusKeyword });
|
|
10420
|
+
return /* @__PURE__ */ jsxs("div", { style: { padding: "10px 0", borderBottom: `1px solid ${V2.border}` }, children: [
|
|
10421
|
+
/* @__PURE__ */ jsxs("div", { style: { fontSize: 13, fontWeight: 700, color: V2.text, marginBottom: 6 }, children: [
|
|
10422
|
+
r.title || `${r.collection}/${r.id}`,
|
|
10423
|
+
" ",
|
|
10424
|
+
/* @__PURE__ */ jsx("span", { style: { fontSize: 10, color: V2.textSecondary, fontWeight: 400 }, children: r.collection })
|
|
10425
|
+
] }),
|
|
10426
|
+
fields.map((f, i) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: 4, fontSize: 12 }, children: [
|
|
10427
|
+
/* @__PURE__ */ jsx("span", { style: { fontSize: 10, fontWeight: 700, color: V2.textSecondary, textTransform: "uppercase" }, children: f.label }),
|
|
10428
|
+
/* @__PURE__ */ jsx("div", { style: { color: V2.red, textDecoration: f.before ? "line-through" : "none", opacity: 0.75 }, children: f.before || t.seoAnalyzer.emptyValue }),
|
|
10429
|
+
/* @__PURE__ */ jsx("div", { style: { color: V2.green, fontWeight: 600 }, children: f.after || t.seoAnalyzer.emptyValue })
|
|
10430
|
+
] }, i))
|
|
10431
|
+
] }, `${r.collection}::${r.id}`);
|
|
10432
|
+
})
|
|
10433
|
+
] }),
|
|
10434
|
+
/* @__PURE__ */ jsxs("div", { style: { padding: "14px 20px", borderTop: `1px solid ${V2.border}`, display: "flex", justifyContent: "space-between", gap: 8 }, children: [
|
|
10435
|
+
/* @__PURE__ */ jsx(
|
|
10436
|
+
"button",
|
|
10437
|
+
{
|
|
10438
|
+
onClick: handleExportBulkPreviewCsv,
|
|
10439
|
+
disabled: bulkPreview.results.length === 0,
|
|
10440
|
+
style: { ...btnBase, backgroundColor: V2.cyan, color: "#000", opacity: bulkPreview.results.length === 0 ? 0.5 : 1 },
|
|
10441
|
+
children: t.seoView.bulkExport
|
|
10442
|
+
}
|
|
10443
|
+
),
|
|
10444
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8 }, children: [
|
|
10445
|
+
/* @__PURE__ */ jsx("button", { onClick: () => setBulkPreview(null), disabled: bulkApplying, style: { ...btnBase, backgroundColor: V2.bg, color: V2.text }, children: t.seoView.bulkCancel }),
|
|
10446
|
+
/* @__PURE__ */ jsx(
|
|
10447
|
+
"button",
|
|
10448
|
+
{
|
|
10449
|
+
onClick: handleBulkApplyPreview,
|
|
10450
|
+
disabled: bulkApplying || bulkPreview.results.length === 0,
|
|
10451
|
+
style: { ...btnBase, backgroundColor: "#7c3aed", color: "#fff", opacity: bulkApplying || bulkPreview.results.length === 0 ? 0.6 : 1 },
|
|
10452
|
+
children: bulkApplying ? t.seoView.bulkApplying : `${t.seoView.bulkApply} (${bulkPreview.results.length})`
|
|
10453
|
+
}
|
|
10454
|
+
)
|
|
10455
|
+
] })
|
|
10456
|
+
] })
|
|
10457
|
+
]
|
|
10458
|
+
}
|
|
10459
|
+
)
|
|
10460
|
+
}
|
|
10324
10461
|
)
|
|
10325
10462
|
]
|
|
10326
10463
|
}
|
|
@@ -17212,9 +17349,210 @@ var C7 = {
|
|
|
17212
17349
|
green: "#22c55e",
|
|
17213
17350
|
red: "#ef4444",
|
|
17214
17351
|
amber: "#f59e0b",
|
|
17215
|
-
|
|
17352
|
+
violet: "#7c3aed"
|
|
17216
17353
|
};
|
|
17217
17354
|
var S4 = {
|
|
17355
|
+
fr: {
|
|
17356
|
+
title: "Opportunit\xE9s CTR (faible clic / bonne position)",
|
|
17357
|
+
subtitle: "Pages bien positionn\xE9es mais peu cliqu\xE9es (m\xE9ta peu attractive). Donn\xE9es Google Search Console \u2192 r\xE9\xE9criture m\xE9ta cibl\xE9e.",
|
|
17358
|
+
needGsc: "Connectez Google Search Console ci-dessus pour activer les opportunit\xE9s CTR.",
|
|
17359
|
+
none: "Aucune opportunit\xE9 d\xE9tect\xE9e sur la p\xE9riode. \u{1F389}",
|
|
17360
|
+
loading: "Analyse des donn\xE9es GSC\u2026",
|
|
17361
|
+
page: "Page",
|
|
17362
|
+
pos: "Pos.",
|
|
17363
|
+
ctr: "CTR",
|
|
17364
|
+
expected: "attendu",
|
|
17365
|
+
potential: "Clics/mois potentiels",
|
|
17366
|
+
optimize: "Optimiser",
|
|
17367
|
+
optimizing: "\u2026",
|
|
17368
|
+
apply: "Appliquer",
|
|
17369
|
+
applied: "Appliqu\xE9 \u2713",
|
|
17370
|
+
noKey: "Cl\xE9 API Claude requise (ANTHROPIC_API_KEY).",
|
|
17371
|
+
open: "Ouvrir",
|
|
17372
|
+
refresh: "Rafra\xEEchir"
|
|
17373
|
+
},
|
|
17374
|
+
en: {
|
|
17375
|
+
title: "CTR opportunities (low clicks / good rank)",
|
|
17376
|
+
subtitle: "Pages that rank well but get few clicks (weak meta). Google Search Console data \u2192 targeted meta rewrite.",
|
|
17377
|
+
needGsc: "Connect Google Search Console above to enable CTR opportunities.",
|
|
17378
|
+
none: "No opportunities for the period. \u{1F389}",
|
|
17379
|
+
loading: "Analyzing GSC data\u2026",
|
|
17380
|
+
page: "Page",
|
|
17381
|
+
pos: "Pos.",
|
|
17382
|
+
ctr: "CTR",
|
|
17383
|
+
expected: "expected",
|
|
17384
|
+
potential: "Potential clicks/mo",
|
|
17385
|
+
optimize: "Optimize",
|
|
17386
|
+
optimizing: "\u2026",
|
|
17387
|
+
apply: "Apply",
|
|
17388
|
+
applied: "Applied \u2713",
|
|
17389
|
+
noKey: "Claude API key required (ANTHROPIC_API_KEY).",
|
|
17390
|
+
open: "Open",
|
|
17391
|
+
refresh: "Refresh"
|
|
17392
|
+
}
|
|
17393
|
+
};
|
|
17394
|
+
function CtrOpportunitiesPanel({ locale }) {
|
|
17395
|
+
const s = S4[locale] ?? S4.fr;
|
|
17396
|
+
const [opps, setOpps] = useState(null);
|
|
17397
|
+
const [loading, setLoading] = useState(true);
|
|
17398
|
+
const [notConnected, setNotConnected] = useState(false);
|
|
17399
|
+
const [error, setError] = useState(null);
|
|
17400
|
+
const [state, setState] = useState({});
|
|
17401
|
+
const load = useCallback(async () => {
|
|
17402
|
+
setLoading(true);
|
|
17403
|
+
setError(null);
|
|
17404
|
+
try {
|
|
17405
|
+
const res = await fetch("/api/seo-plugin/ctr-opportunities", { credentials: "include", cache: "no-store" });
|
|
17406
|
+
if (res.status === 403 || res.status === 409 || res.status === 400) {
|
|
17407
|
+
setNotConnected(true);
|
|
17408
|
+
return;
|
|
17409
|
+
}
|
|
17410
|
+
const json = await res.json();
|
|
17411
|
+
if (!res.ok) {
|
|
17412
|
+
setError(json.error || `Error ${res.status}`);
|
|
17413
|
+
return;
|
|
17414
|
+
}
|
|
17415
|
+
setNotConnected(false);
|
|
17416
|
+
setOpps(json.opportunities || []);
|
|
17417
|
+
} catch (e) {
|
|
17418
|
+
setError(e instanceof Error ? e.message : "Network error");
|
|
17419
|
+
} finally {
|
|
17420
|
+
setLoading(false);
|
|
17421
|
+
}
|
|
17422
|
+
}, []);
|
|
17423
|
+
useEffect(() => {
|
|
17424
|
+
void load();
|
|
17425
|
+
}, [load]);
|
|
17426
|
+
const setRow = (url, patch) => setState((p) => ({ ...p, [url]: { ...p[url], ...patch } }));
|
|
17427
|
+
const optimize = async (o) => {
|
|
17428
|
+
if (!o.doc) return;
|
|
17429
|
+
setRow(o.url, { busy: true, error: void 0 });
|
|
17430
|
+
try {
|
|
17431
|
+
const res = await fetch("/api/seo-plugin/ai-optimize", {
|
|
17432
|
+
method: "POST",
|
|
17433
|
+
credentials: "include",
|
|
17434
|
+
headers: { "Content-Type": "application/json" },
|
|
17435
|
+
body: JSON.stringify({ collection: o.doc.collection, id: o.doc.id })
|
|
17436
|
+
});
|
|
17437
|
+
const json = await res.json();
|
|
17438
|
+
if (!res.ok) {
|
|
17439
|
+
setRow(o.url, { busy: false, error: json.code === "no_api_key" ? s.noKey : json.error || `Error ${res.status}` });
|
|
17440
|
+
return;
|
|
17441
|
+
}
|
|
17442
|
+
setRow(o.url, { busy: false, suggestion: { ...json.suggestions, current: json.current } });
|
|
17443
|
+
} catch (e) {
|
|
17444
|
+
setRow(o.url, { busy: false, error: e instanceof Error ? e.message : "Network error" });
|
|
17445
|
+
}
|
|
17446
|
+
};
|
|
17447
|
+
const apply = async (o) => {
|
|
17448
|
+
const rs = state[o.url];
|
|
17449
|
+
if (!o.doc || !rs?.suggestion) return;
|
|
17450
|
+
setRow(o.url, { busy: true, error: void 0 });
|
|
17451
|
+
const patch = {};
|
|
17452
|
+
if (rs.suggestion.metaTitle || rs.suggestion.metaDescription) {
|
|
17453
|
+
patch.meta = { title: rs.suggestion.metaTitle, description: rs.suggestion.metaDescription };
|
|
17454
|
+
}
|
|
17455
|
+
if (rs.suggestion.focusKeyword && rs.suggestion.focusKeyword !== rs.suggestion.current?.focusKeyword) {
|
|
17456
|
+
patch.focusKeyword = rs.suggestion.focusKeyword;
|
|
17457
|
+
}
|
|
17458
|
+
try {
|
|
17459
|
+
await fetch(`/api/${o.doc.collection}/${o.doc.id}`, {
|
|
17460
|
+
method: "PATCH",
|
|
17461
|
+
credentials: "include",
|
|
17462
|
+
headers: { "Content-Type": "application/json" },
|
|
17463
|
+
body: JSON.stringify(patch)
|
|
17464
|
+
});
|
|
17465
|
+
setRow(o.url, { busy: false, applied: true });
|
|
17466
|
+
} catch (e) {
|
|
17467
|
+
setRow(o.url, { busy: false, error: e instanceof Error ? e.message : "Network error" });
|
|
17468
|
+
}
|
|
17469
|
+
};
|
|
17470
|
+
const card = { padding: 16, borderRadius: 12, border: `1px solid ${C7.border}`, backgroundColor: C7.card, marginBottom: 20 };
|
|
17471
|
+
const btn = (bg) => ({
|
|
17472
|
+
padding: "5px 10px",
|
|
17473
|
+
borderRadius: 6,
|
|
17474
|
+
border: `1px solid ${bg}`,
|
|
17475
|
+
backgroundColor: bg,
|
|
17476
|
+
color: "#fff",
|
|
17477
|
+
fontSize: 11,
|
|
17478
|
+
fontWeight: 700,
|
|
17479
|
+
cursor: "pointer"
|
|
17480
|
+
});
|
|
17481
|
+
return /* @__PURE__ */ jsxs("div", { style: card, children: [
|
|
17482
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 8, flexWrap: "wrap" }, children: [
|
|
17483
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
17484
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 16, fontWeight: 800, color: C7.text }, children: s.title }),
|
|
17485
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 12, color: C7.sub, marginTop: 2 }, children: s.subtitle })
|
|
17486
|
+
] }),
|
|
17487
|
+
!notConnected && /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void load(), style: btn(C7.sub), children: s.refresh })
|
|
17488
|
+
] }),
|
|
17489
|
+
error && /* @__PURE__ */ jsx("div", { style: { color: C7.red, fontSize: 13, fontWeight: 600, marginTop: 10 }, children: error }),
|
|
17490
|
+
notConnected && /* @__PURE__ */ jsx("div", { style: { marginTop: 12, fontSize: 13, color: C7.sub }, children: s.needGsc }),
|
|
17491
|
+
loading && !notConnected && /* @__PURE__ */ jsx("div", { style: { marginTop: 12, fontSize: 13, color: C7.sub }, children: s.loading }),
|
|
17492
|
+
!loading && !notConnected && opps && opps.length === 0 && /* @__PURE__ */ jsx("div", { style: { marginTop: 12, fontSize: 13, color: C7.sub }, children: s.none }),
|
|
17493
|
+
!notConnected && opps && opps.length > 0 && /* @__PURE__ */ jsx("div", { style: { overflowX: "auto", marginTop: 12 }, children: /* @__PURE__ */ jsxs("table", { style: { width: "100%", borderCollapse: "collapse", fontSize: 12 }, children: [
|
|
17494
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { style: { textAlign: "left", color: C7.sub }, children: [
|
|
17495
|
+
/* @__PURE__ */ jsx("th", { style: { padding: "6px 8px" }, children: s.page }),
|
|
17496
|
+
/* @__PURE__ */ jsx("th", { style: { padding: "6px 8px", textAlign: "right" }, children: s.pos }),
|
|
17497
|
+
/* @__PURE__ */ jsx("th", { style: { padding: "6px 8px", textAlign: "right" }, children: s.ctr }),
|
|
17498
|
+
/* @__PURE__ */ jsx("th", { style: { padding: "6px 8px", textAlign: "right" }, children: s.potential }),
|
|
17499
|
+
/* @__PURE__ */ jsx("th", { style: { padding: "6px 8px" } })
|
|
17500
|
+
] }) }),
|
|
17501
|
+
/* @__PURE__ */ jsx("tbody", { children: opps.slice(0, 50).map((o) => {
|
|
17502
|
+
const rs = state[o.url] || {};
|
|
17503
|
+
const path = (() => {
|
|
17504
|
+
try {
|
|
17505
|
+
return new URL(o.url).pathname;
|
|
17506
|
+
} catch {
|
|
17507
|
+
return o.url;
|
|
17508
|
+
}
|
|
17509
|
+
})();
|
|
17510
|
+
return /* @__PURE__ */ jsxs(React4.Fragment, { children: [
|
|
17511
|
+
/* @__PURE__ */ jsxs("tr", { style: { borderTop: `1px solid ${C7.border}`, color: C7.text }, children: [
|
|
17512
|
+
/* @__PURE__ */ jsx("td", { style: { padding: "6px 8px", maxWidth: 320, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: path }),
|
|
17513
|
+
/* @__PURE__ */ jsx("td", { style: { padding: "6px 8px", textAlign: "right" }, children: o.position.toFixed(1) }),
|
|
17514
|
+
/* @__PURE__ */ jsxs("td", { style: { padding: "6px 8px", textAlign: "right" }, children: [
|
|
17515
|
+
/* @__PURE__ */ jsxs("span", { style: { color: C7.red }, children: [
|
|
17516
|
+
(o.ctr * 100).toFixed(1),
|
|
17517
|
+
"%"
|
|
17518
|
+
] }),
|
|
17519
|
+
/* @__PURE__ */ jsxs("span", { style: { color: C7.sub }, children: [
|
|
17520
|
+
" / ",
|
|
17521
|
+
(o.expectedCtr * 100).toFixed(0),
|
|
17522
|
+
"% ",
|
|
17523
|
+
s.expected
|
|
17524
|
+
] })
|
|
17525
|
+
] }),
|
|
17526
|
+
/* @__PURE__ */ jsxs("td", { style: { padding: "6px 8px", textAlign: "right", fontWeight: 700, color: C7.amber }, children: [
|
|
17527
|
+
"+",
|
|
17528
|
+
o.potentialClicks
|
|
17529
|
+
] }),
|
|
17530
|
+
/* @__PURE__ */ jsx("td", { style: { padding: "6px 8px", textAlign: "right" }, children: rs.applied ? /* @__PURE__ */ jsx("span", { style: { fontSize: 11, fontWeight: 700, color: C7.green }, children: s.applied }) : o.doc ? rs.suggestion ? /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void apply(o), disabled: rs.busy, style: btn(C7.green), children: rs.busy ? s.optimizing : s.apply }) : /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void optimize(o), disabled: rs.busy, style: btn(C7.violet), children: rs.busy ? s.optimizing : `\u2728 ${s.optimize}` }) : /* @__PURE__ */ jsxs("a", { href: o.url, target: "_blank", rel: "noopener noreferrer", style: { fontSize: 11, color: C7.sub }, children: [
|
|
17531
|
+
s.open,
|
|
17532
|
+
" \u2197"
|
|
17533
|
+
] }) })
|
|
17534
|
+
] }),
|
|
17535
|
+
rs.suggestion && !rs.applied && /* @__PURE__ */ jsx("tr", { style: { color: C7.text }, children: /* @__PURE__ */ jsxs("td", { colSpan: 5, style: { padding: "0 8px 8px 8px" }, children: [
|
|
17536
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 11, color: C7.green, fontWeight: 600 }, children: rs.suggestion.metaTitle }),
|
|
17537
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 11, color: C7.sub }, children: rs.suggestion.metaDescription })
|
|
17538
|
+
] }) }),
|
|
17539
|
+
rs.error && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 5, style: { padding: "0 8px 6px 8px", fontSize: 11, color: C7.red }, children: rs.error }) })
|
|
17540
|
+
] }, o.url);
|
|
17541
|
+
}) })
|
|
17542
|
+
] }) })
|
|
17543
|
+
] });
|
|
17544
|
+
}
|
|
17545
|
+
var C8 = {
|
|
17546
|
+
text: "var(--theme-text, #1a1a1a)",
|
|
17547
|
+
sub: "var(--theme-elevation-600, #6b7280)",
|
|
17548
|
+
card: "var(--theme-elevation-50, #f9fafb)",
|
|
17549
|
+
border: "var(--theme-elevation-200, #e5e7eb)",
|
|
17550
|
+
green: "#22c55e",
|
|
17551
|
+
red: "#ef4444",
|
|
17552
|
+
amber: "#f59e0b",
|
|
17553
|
+
blue: "#3b82f6"
|
|
17554
|
+
};
|
|
17555
|
+
var S5 = {
|
|
17218
17556
|
fr: {
|
|
17219
17557
|
title: "Monitoring & alertes",
|
|
17220
17558
|
subtitle: "Digest p\xE9riodique : r\xE9gressions de score, nouveaux 404, chutes de position (webhook / email).",
|
|
@@ -17257,7 +17595,7 @@ var S4 = {
|
|
|
17257
17595
|
}
|
|
17258
17596
|
};
|
|
17259
17597
|
function AlertsPanel({ locale }) {
|
|
17260
|
-
const s =
|
|
17598
|
+
const s = S5[locale] ?? S5.fr;
|
|
17261
17599
|
const [digest, setDigest] = useState(null);
|
|
17262
17600
|
const [config, setConfig] = useState(null);
|
|
17263
17601
|
const [loading, setLoading] = useState(true);
|
|
@@ -17312,15 +17650,15 @@ function AlertsPanel({ locale }) {
|
|
|
17312
17650
|
const card = {
|
|
17313
17651
|
padding: 16,
|
|
17314
17652
|
borderRadius: 12,
|
|
17315
|
-
border: `1px solid ${
|
|
17316
|
-
backgroundColor:
|
|
17653
|
+
border: `1px solid ${C8.border}`,
|
|
17654
|
+
backgroundColor: C8.card,
|
|
17317
17655
|
marginBottom: 20
|
|
17318
17656
|
};
|
|
17319
17657
|
const btn = {
|
|
17320
17658
|
padding: "8px 12px",
|
|
17321
17659
|
borderRadius: 8,
|
|
17322
|
-
border: `1px solid ${
|
|
17323
|
-
backgroundColor:
|
|
17660
|
+
border: `1px solid ${C8.blue}`,
|
|
17661
|
+
backgroundColor: C8.blue,
|
|
17324
17662
|
color: "#fff",
|
|
17325
17663
|
fontSize: 12,
|
|
17326
17664
|
fontWeight: 700,
|
|
@@ -17333,32 +17671,32 @@ function AlertsPanel({ locale }) {
|
|
|
17333
17671
|
padding: "3px 8px",
|
|
17334
17672
|
borderRadius: 999,
|
|
17335
17673
|
color: "#fff",
|
|
17336
|
-
backgroundColor: ok ?
|
|
17674
|
+
backgroundColor: ok ? C8.green : C8.sub,
|
|
17337
17675
|
marginRight: 6
|
|
17338
17676
|
});
|
|
17339
17677
|
const hasChannel = config && (config.webhookConfigured || config.emailConfigured);
|
|
17340
17678
|
const list = (title, rows) => rows.length ? /* @__PURE__ */ jsxs("div", { style: { marginTop: 10 }, children: [
|
|
17341
|
-
/* @__PURE__ */ jsxs("div", { style: { fontSize: 12, fontWeight: 700, color:
|
|
17679
|
+
/* @__PURE__ */ jsxs("div", { style: { fontSize: 12, fontWeight: 700, color: C8.text, marginBottom: 4 }, children: [
|
|
17342
17680
|
title,
|
|
17343
17681
|
" ",
|
|
17344
|
-
/* @__PURE__ */ jsxs("span", { style: { color:
|
|
17682
|
+
/* @__PURE__ */ jsxs("span", { style: { color: C8.amber }, children: [
|
|
17345
17683
|
"(",
|
|
17346
17684
|
rows.length,
|
|
17347
17685
|
")"
|
|
17348
17686
|
] })
|
|
17349
17687
|
] }),
|
|
17350
|
-
/* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 12, color:
|
|
17688
|
+
/* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 12, color: C8.sub, lineHeight: 1.6 }, children: rows.slice(0, 8).map((r, i) => /* @__PURE__ */ jsx("li", { children: r }, i)) })
|
|
17351
17689
|
] }) : null;
|
|
17352
17690
|
return /* @__PURE__ */ jsxs("div", { style: card, children: [
|
|
17353
17691
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8, flexWrap: "wrap" }, children: [
|
|
17354
17692
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
17355
|
-
/* @__PURE__ */ jsx("div", { style: { fontSize: 16, fontWeight: 800, color:
|
|
17356
|
-
/* @__PURE__ */ jsx("div", { style: { fontSize: 12, color:
|
|
17693
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 16, fontWeight: 800, color: C8.text }, children: s.title }),
|
|
17694
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 12, color: C8.sub, marginTop: 2 }, children: s.subtitle })
|
|
17357
17695
|
] }),
|
|
17358
17696
|
hasChannel && /* @__PURE__ */ jsx("button", { type: "button", onClick: sendNow, disabled: busy, style: btn, children: busy ? s.sending : s.sendNow })
|
|
17359
17697
|
] }),
|
|
17360
|
-
error && /* @__PURE__ */ jsx("div", { style: { color:
|
|
17361
|
-
notice && /* @__PURE__ */ jsx("div", { style: { color:
|
|
17698
|
+
error && /* @__PURE__ */ jsx("div", { style: { color: C8.red, fontSize: 13, fontWeight: 600, marginTop: 10 }, children: error }),
|
|
17699
|
+
notice && /* @__PURE__ */ jsx("div", { style: { color: C8.green, fontSize: 13, fontWeight: 600, marginTop: 10 }, children: notice }),
|
|
17362
17700
|
config && /* @__PURE__ */ jsxs("div", { style: { marginTop: 12 }, children: [
|
|
17363
17701
|
/* @__PURE__ */ jsxs("span", { style: chip(config.webhookConfigured, s.webhook), children: [
|
|
17364
17702
|
s.webhook,
|
|
@@ -17371,15 +17709,15 @@ function AlertsPanel({ locale }) {
|
|
|
17371
17709
|
config.emailConfigured ? s.configured : s.missing
|
|
17372
17710
|
] })
|
|
17373
17711
|
] }),
|
|
17374
|
-
!loading && !hasChannel && /* @__PURE__ */ jsx("div", { style: { marginTop: 12, fontSize: 13, color:
|
|
17375
|
-
loading && /* @__PURE__ */ jsx("div", { style: { marginTop: 12, fontSize: 13, color:
|
|
17712
|
+
!loading && !hasChannel && /* @__PURE__ */ jsx("div", { style: { marginTop: 12, fontSize: 13, color: C8.sub }, children: s.notConfigured }),
|
|
17713
|
+
loading && /* @__PURE__ */ jsx("div", { style: { marginTop: 12, fontSize: 13, color: C8.sub }, children: s.loading }),
|
|
17376
17714
|
digest && /* @__PURE__ */ jsxs("div", { style: { marginTop: 8 }, children: [
|
|
17377
|
-
/* @__PURE__ */ jsxs("div", { style: { fontSize: 12, color:
|
|
17715
|
+
/* @__PURE__ */ jsxs("div", { style: { fontSize: 12, color: C8.sub, marginTop: 6 }, children: [
|
|
17378
17716
|
digest.totalIssues,
|
|
17379
17717
|
" ",
|
|
17380
17718
|
s.issues
|
|
17381
17719
|
] }),
|
|
17382
|
-
digest.totalIssues === 0 && /* @__PURE__ */ jsx("div", { style: { marginTop: 8, fontSize: 13, color:
|
|
17720
|
+
digest.totalIssues === 0 && /* @__PURE__ */ jsx("div", { style: { marginTop: 8, fontSize: 13, color: C8.sub }, children: s.noIssues }),
|
|
17383
17721
|
list(
|
|
17384
17722
|
s.scoreReg,
|
|
17385
17723
|
digest.scoreRegressions.map((r) => `${r.collection}/${r.documentId} \u2014 ${r.from} \u2192 ${r.to} (\u2212${r.drop})`)
|
|
@@ -17389,7 +17727,7 @@ function AlertsPanel({ locale }) {
|
|
|
17389
17727
|
] })
|
|
17390
17728
|
] });
|
|
17391
17729
|
}
|
|
17392
|
-
var
|
|
17730
|
+
var C9 = {
|
|
17393
17731
|
text: "var(--theme-text, #1a1a1a)",
|
|
17394
17732
|
sub: "var(--theme-elevation-600, #6b7280)",
|
|
17395
17733
|
card: "var(--theme-elevation-50, #f9fafb)",
|
|
@@ -17399,7 +17737,7 @@ var C8 = {
|
|
|
17399
17737
|
red: "#ef4444",
|
|
17400
17738
|
violet: "#7c3aed"
|
|
17401
17739
|
};
|
|
17402
|
-
var
|
|
17740
|
+
var S6 = {
|
|
17403
17741
|
fr: {
|
|
17404
17742
|
title: "Alt-text IA des images",
|
|
17405
17743
|
subtitle: "G\xE9n\xE8re l'attribut alt des images qui n'en ont pas (Claude vision), pour l'accessibilit\xE9 et le SEO.",
|
|
@@ -17432,7 +17770,7 @@ var S5 = {
|
|
|
17432
17770
|
}
|
|
17433
17771
|
};
|
|
17434
17772
|
function AltTextPanel({ locale }) {
|
|
17435
|
-
const s =
|
|
17773
|
+
const s = S6[locale] ?? S6.fr;
|
|
17436
17774
|
const [items, setItems] = useState(null);
|
|
17437
17775
|
const [collection, setCollection] = useState("media");
|
|
17438
17776
|
const [missingCount, setMissingCount] = useState(0);
|
|
@@ -17509,8 +17847,8 @@ function AltTextPanel({ locale }) {
|
|
|
17509
17847
|
const card = {
|
|
17510
17848
|
padding: 16,
|
|
17511
17849
|
borderRadius: 12,
|
|
17512
|
-
border: `1px solid ${
|
|
17513
|
-
backgroundColor:
|
|
17850
|
+
border: `1px solid ${C9.border}`,
|
|
17851
|
+
backgroundColor: C9.card,
|
|
17514
17852
|
marginBottom: 20
|
|
17515
17853
|
};
|
|
17516
17854
|
const btn = (bg) => ({
|
|
@@ -17526,18 +17864,18 @@ function AltTextPanel({ locale }) {
|
|
|
17526
17864
|
return /* @__PURE__ */ jsxs("div", { style: card, children: [
|
|
17527
17865
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8, flexWrap: "wrap" }, children: [
|
|
17528
17866
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
17529
|
-
/* @__PURE__ */ jsx("div", { style: { fontSize: 16, fontWeight: 800, color:
|
|
17530
|
-
/* @__PURE__ */ jsx("div", { style: { fontSize: 12, color:
|
|
17867
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 16, fontWeight: 800, color: C9.text }, children: s.title }),
|
|
17868
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 12, color: C9.sub, marginTop: 2 }, children: s.subtitle })
|
|
17531
17869
|
] }),
|
|
17532
|
-
status === "ok" && /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void load(), style: btn(
|
|
17870
|
+
status === "ok" && /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void load(), style: btn(C9.sub), children: s.refresh })
|
|
17533
17871
|
] }),
|
|
17534
|
-
status === "forbidden" && /* @__PURE__ */ jsx("div", { style: { marginTop: 12, fontSize: 13, color:
|
|
17535
|
-
status === "disabled" && /* @__PURE__ */ jsx("div", { style: { marginTop: 12, fontSize: 13, color:
|
|
17872
|
+
status === "forbidden" && /* @__PURE__ */ jsx("div", { style: { marginTop: 12, fontSize: 13, color: C9.sub }, children: s.forbidden }),
|
|
17873
|
+
status === "disabled" && /* @__PURE__ */ jsx("div", { style: { marginTop: 12, fontSize: 13, color: C9.sub }, children: s.disabled }),
|
|
17536
17874
|
status === "ok" && /* @__PURE__ */ jsxs("div", { style: { marginTop: 12 }, children: [
|
|
17537
|
-
loading && /* @__PURE__ */ jsx("div", { style: { fontSize: 13, color:
|
|
17538
|
-
!loading && items && items.length === 0 && /* @__PURE__ */ jsx("div", { style: { fontSize: 13, color:
|
|
17875
|
+
loading && /* @__PURE__ */ jsx("div", { style: { fontSize: 13, color: C9.sub }, children: s.loading }),
|
|
17876
|
+
!loading && items && items.length === 0 && /* @__PURE__ */ jsx("div", { style: { fontSize: 13, color: C9.sub }, children: s.none }),
|
|
17539
17877
|
!loading && items && items.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17540
|
-
/* @__PURE__ */ jsxs("div", { style: { fontSize: 12, color:
|
|
17878
|
+
/* @__PURE__ */ jsxs("div", { style: { fontSize: 12, color: C9.sub, marginBottom: 10 }, children: [
|
|
17541
17879
|
missingCount,
|
|
17542
17880
|
" ",
|
|
17543
17881
|
s.missing
|
|
@@ -17553,8 +17891,8 @@ function AltTextPanel({ locale }) {
|
|
|
17553
17891
|
alignItems: "center",
|
|
17554
17892
|
padding: 8,
|
|
17555
17893
|
borderRadius: 8,
|
|
17556
|
-
border: `1px solid ${
|
|
17557
|
-
backgroundColor:
|
|
17894
|
+
border: `1px solid ${C9.border}`,
|
|
17895
|
+
backgroundColor: C9.bg
|
|
17558
17896
|
},
|
|
17559
17897
|
children: [
|
|
17560
17898
|
/* @__PURE__ */ jsx(
|
|
@@ -17562,11 +17900,11 @@ function AltTextPanel({ locale }) {
|
|
|
17562
17900
|
{
|
|
17563
17901
|
src: item.url,
|
|
17564
17902
|
alt: "",
|
|
17565
|
-
style: { width: 48, height: 48, objectFit: "cover", borderRadius: 6, flexShrink: 0, border: `1px solid ${
|
|
17903
|
+
style: { width: 48, height: 48, objectFit: "cover", borderRadius: 6, flexShrink: 0, border: `1px solid ${C9.border}` }
|
|
17566
17904
|
}
|
|
17567
17905
|
),
|
|
17568
17906
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
17569
|
-
/* @__PURE__ */ jsx("div", { style: { fontSize: 11, color:
|
|
17907
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 11, color: C9.sub, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: item.filename }),
|
|
17570
17908
|
rs.alt !== void 0 ? /* @__PURE__ */ jsx(
|
|
17571
17909
|
"input",
|
|
17572
17910
|
{
|
|
@@ -17580,15 +17918,15 @@ function AltTextPanel({ locale }) {
|
|
|
17580
17918
|
padding: "4px 8px",
|
|
17581
17919
|
fontSize: 12,
|
|
17582
17920
|
borderRadius: 6,
|
|
17583
|
-
border: `1px solid ${
|
|
17584
|
-
backgroundColor:
|
|
17585
|
-
color:
|
|
17921
|
+
border: `1px solid ${C9.border}`,
|
|
17922
|
+
backgroundColor: C9.bg,
|
|
17923
|
+
color: C9.text
|
|
17586
17924
|
}
|
|
17587
17925
|
}
|
|
17588
|
-
) : /* @__PURE__ */ jsx("div", { style: { fontSize: 12, color:
|
|
17589
|
-
rs.error && /* @__PURE__ */ jsx("div", { style: { fontSize: 11, color:
|
|
17926
|
+
) : /* @__PURE__ */ jsx("div", { style: { fontSize: 12, color: C9.sub, marginTop: 4, fontStyle: "italic" }, children: "\u2014" }),
|
|
17927
|
+
rs.error && /* @__PURE__ */ jsx("div", { style: { fontSize: 11, color: C9.red, marginTop: 2 }, children: rs.error })
|
|
17590
17928
|
] }),
|
|
17591
|
-
/* @__PURE__ */ jsx("div", { style: { flexShrink: 0 }, children: rs.applied ? /* @__PURE__ */ jsx("span", { style: { fontSize: 11, fontWeight: 700, color:
|
|
17929
|
+
/* @__PURE__ */ jsx("div", { style: { flexShrink: 0 }, children: rs.applied ? /* @__PURE__ */ jsx("span", { style: { fontSize: 11, fontWeight: 700, color: C9.green }, children: s.applied }) : rs.alt !== void 0 ? /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void apply(item), disabled: rs.busy, style: btn(C9.green), children: rs.busy ? s.generating : s.apply }) : /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void generate(item), disabled: rs.busy, style: btn(C9.violet), children: rs.busy ? s.generating : s.generate }) })
|
|
17592
17930
|
]
|
|
17593
17931
|
},
|
|
17594
17932
|
item.id
|
|
@@ -18013,6 +18351,7 @@ function PerformanceView() {
|
|
|
18013
18351
|
/* @__PURE__ */ jsx(CoreWebVitalsPanel, { locale }),
|
|
18014
18352
|
/* @__PURE__ */ jsx(GscPanel, { locale }),
|
|
18015
18353
|
/* @__PURE__ */ jsx(RankTrackingPanel, { locale }),
|
|
18354
|
+
/* @__PURE__ */ jsx(CtrOpportunitiesPanel, { locale }),
|
|
18016
18355
|
/* @__PURE__ */ jsx(AlertsPanel, { locale }),
|
|
18017
18356
|
/* @__PURE__ */ jsx(AltTextPanel, { locale }),
|
|
18018
18357
|
showImport && /* @__PURE__ */ jsxs(
|
|
@@ -18538,7 +18877,7 @@ function PerformanceView() {
|
|
|
18538
18877
|
}
|
|
18539
18878
|
);
|
|
18540
18879
|
}
|
|
18541
|
-
var
|
|
18880
|
+
var C10 = {
|
|
18542
18881
|
text: "var(--theme-text, #1a1a1a)",
|
|
18543
18882
|
sub: "var(--theme-elevation-600, #6b7280)",
|
|
18544
18883
|
card: "var(--theme-elevation-50, #f9fafb)",
|
|
@@ -18548,7 +18887,7 @@ var C9 = {
|
|
|
18548
18887
|
red: "#ef4444",
|
|
18549
18888
|
blue: "#3b82f6"
|
|
18550
18889
|
};
|
|
18551
|
-
var
|
|
18890
|
+
var S7 = {
|
|
18552
18891
|
fr: {
|
|
18553
18892
|
title: "Brief de contenu IA",
|
|
18554
18893
|
subtitle: "G\xE9n\xE8re un plan r\xE9dactionnel optimis\xE9 pour un mot-cl\xE9 (plan, entit\xE9s, questions, longueur cible).",
|
|
@@ -18583,7 +18922,7 @@ var S6 = {
|
|
|
18583
18922
|
}
|
|
18584
18923
|
};
|
|
18585
18924
|
function ContentBriefPanel({ locale }) {
|
|
18586
|
-
const s =
|
|
18925
|
+
const s = S7[locale] ?? S7.fr;
|
|
18587
18926
|
const [keyword, setKeyword] = useState("");
|
|
18588
18927
|
const [brief, setBrief] = useState(null);
|
|
18589
18928
|
const [busy, setBusy] = useState(false);
|
|
@@ -18619,8 +18958,8 @@ function ContentBriefPanel({ locale }) {
|
|
|
18619
18958
|
const card = {
|
|
18620
18959
|
padding: 16,
|
|
18621
18960
|
borderRadius: 12,
|
|
18622
|
-
border: `1px solid ${
|
|
18623
|
-
backgroundColor:
|
|
18961
|
+
border: `1px solid ${C10.border}`,
|
|
18962
|
+
backgroundColor: C10.card,
|
|
18624
18963
|
marginBottom: 20
|
|
18625
18964
|
};
|
|
18626
18965
|
const chip = {
|
|
@@ -18629,14 +18968,14 @@ function ContentBriefPanel({ locale }) {
|
|
|
18629
18968
|
padding: "3px 8px",
|
|
18630
18969
|
borderRadius: 999,
|
|
18631
18970
|
backgroundColor: "rgba(59,130,246,0.12)",
|
|
18632
|
-
color:
|
|
18633
|
-
border: `1px solid ${
|
|
18971
|
+
color: C10.blue,
|
|
18972
|
+
border: `1px solid ${C10.border}`,
|
|
18634
18973
|
margin: "0 6px 6px 0"
|
|
18635
18974
|
};
|
|
18636
|
-
const h4 = { fontSize: 12, fontWeight: 800, color:
|
|
18975
|
+
const h4 = { fontSize: 12, fontWeight: 800, color: C10.text, margin: "14px 0 6px", textTransform: "uppercase" };
|
|
18637
18976
|
return /* @__PURE__ */ jsxs("div", { style: card, children: [
|
|
18638
|
-
/* @__PURE__ */ jsx("div", { style: { fontSize: 16, fontWeight: 800, color:
|
|
18639
|
-
/* @__PURE__ */ jsx("div", { style: { fontSize: 12, color:
|
|
18977
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 16, fontWeight: 800, color: C10.text }, children: s.title }),
|
|
18978
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 12, color: C10.sub, marginTop: 2, marginBottom: 12 }, children: s.subtitle }),
|
|
18640
18979
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8, flexWrap: "wrap" }, children: [
|
|
18641
18980
|
/* @__PURE__ */ jsx(
|
|
18642
18981
|
"input",
|
|
@@ -18653,9 +18992,9 @@ function ContentBriefPanel({ locale }) {
|
|
|
18653
18992
|
padding: "8px 12px",
|
|
18654
18993
|
fontSize: 13,
|
|
18655
18994
|
borderRadius: 8,
|
|
18656
|
-
border: `1px solid ${
|
|
18657
|
-
backgroundColor:
|
|
18658
|
-
color:
|
|
18995
|
+
border: `1px solid ${C10.border}`,
|
|
18996
|
+
backgroundColor: C10.bg,
|
|
18997
|
+
color: C10.text
|
|
18659
18998
|
}
|
|
18660
18999
|
}
|
|
18661
19000
|
),
|
|
@@ -18668,8 +19007,8 @@ function ContentBriefPanel({ locale }) {
|
|
|
18668
19007
|
style: {
|
|
18669
19008
|
padding: "8px 14px",
|
|
18670
19009
|
borderRadius: 8,
|
|
18671
|
-
border: `1px solid ${
|
|
18672
|
-
backgroundColor:
|
|
19010
|
+
border: `1px solid ${C10.violet}`,
|
|
19011
|
+
backgroundColor: C10.violet,
|
|
18673
19012
|
color: "#fff",
|
|
18674
19013
|
fontSize: 12,
|
|
18675
19014
|
fontWeight: 700,
|
|
@@ -18680,12 +19019,12 @@ function ContentBriefPanel({ locale }) {
|
|
|
18680
19019
|
}
|
|
18681
19020
|
)
|
|
18682
19021
|
] }),
|
|
18683
|
-
error && /* @__PURE__ */ jsx("div", { style: { color:
|
|
19022
|
+
error && /* @__PURE__ */ jsx("div", { style: { color: C10.red, fontSize: 13, fontWeight: 600, marginTop: 10 }, children: error }),
|
|
18684
19023
|
brief && /* @__PURE__ */ jsxs("div", { style: { marginTop: 8 }, children: [
|
|
18685
|
-
brief.recommendedWordCount > 0 && /* @__PURE__ */ jsxs("div", { style: { fontSize: 12, color:
|
|
19024
|
+
brief.recommendedWordCount > 0 && /* @__PURE__ */ jsxs("div", { style: { fontSize: 12, color: C10.sub, marginTop: 10 }, children: [
|
|
18686
19025
|
s.words,
|
|
18687
19026
|
": ",
|
|
18688
|
-
/* @__PURE__ */ jsxs("b", { style: { color:
|
|
19027
|
+
/* @__PURE__ */ jsxs("b", { style: { color: C10.text }, children: [
|
|
18689
19028
|
"~",
|
|
18690
19029
|
brief.recommendedWordCount,
|
|
18691
19030
|
" ",
|
|
@@ -18694,7 +19033,7 @@ function ContentBriefPanel({ locale }) {
|
|
|
18694
19033
|
] }),
|
|
18695
19034
|
brief.outline.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18696
19035
|
/* @__PURE__ */ jsx("div", { style: h4, children: s.outline }),
|
|
18697
|
-
/* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 13, color:
|
|
19036
|
+
/* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 13, color: C10.text, lineHeight: 1.6 }, children: brief.outline.map((o, i) => /* @__PURE__ */ jsx("li", { style: { marginLeft: o.level === "h3" ? 18 : 0, color: o.level === "h3" ? C10.sub : C10.text, fontWeight: o.level === "h2" ? 700 : 400 }, children: o.text }, i)) })
|
|
18698
19037
|
] }),
|
|
18699
19038
|
brief.entities.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18700
19039
|
/* @__PURE__ */ jsx("div", { style: h4, children: s.entities }),
|
|
@@ -18702,7 +19041,7 @@ function ContentBriefPanel({ locale }) {
|
|
|
18702
19041
|
] }),
|
|
18703
19042
|
brief.questions.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18704
19043
|
/* @__PURE__ */ jsx("div", { style: h4, children: s.questions }),
|
|
18705
|
-
/* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 13, color:
|
|
19044
|
+
/* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 13, color: C10.text, lineHeight: 1.6 }, children: brief.questions.map((q, i) => /* @__PURE__ */ jsx("li", { children: q }, i)) })
|
|
18706
19045
|
] }),
|
|
18707
19046
|
brief.internalLinkIdeas.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18708
19047
|
/* @__PURE__ */ jsx("div", { style: h4, children: s.links }),
|
|
@@ -18710,7 +19049,7 @@ function ContentBriefPanel({ locale }) {
|
|
|
18710
19049
|
] }),
|
|
18711
19050
|
brief.notes.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18712
19051
|
/* @__PURE__ */ jsx("div", { style: h4, children: s.notes }),
|
|
18713
|
-
/* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 12, color:
|
|
19052
|
+
/* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 12, color: C10.sub, lineHeight: 1.6 }, children: brief.notes.map((n, i) => /* @__PURE__ */ jsx("li", { children: n }, i)) })
|
|
18714
19053
|
] })
|
|
18715
19054
|
] })
|
|
18716
19055
|
] });
|
|
@@ -19852,7 +20191,7 @@ var controlBtnStyle = {
|
|
|
19852
20191
|
cursor: "pointer",
|
|
19853
20192
|
lineHeight: 1.4
|
|
19854
20193
|
};
|
|
19855
|
-
var
|
|
20194
|
+
var C11 = {
|
|
19856
20195
|
cyan: "#00E5FF",
|
|
19857
20196
|
black: "#000",
|
|
19858
20197
|
green: "#22c55e",
|
|
@@ -19867,10 +20206,10 @@ var C10 = {
|
|
|
19867
20206
|
var TITLE_MIN = 30;
|
|
19868
20207
|
var TITLE_MAX = 60;
|
|
19869
20208
|
function getCharColor(len) {
|
|
19870
|
-
if (len === 0) return
|
|
19871
|
-
if (len >= TITLE_MIN && len <= TITLE_MAX) return
|
|
19872
|
-
if (len > 0 && len < TITLE_MIN) return
|
|
19873
|
-
return
|
|
20209
|
+
if (len === 0) return C11.textSecondary;
|
|
20210
|
+
if (len >= TITLE_MIN && len <= TITLE_MAX) return C11.green;
|
|
20211
|
+
if (len > 0 && len < TITLE_MIN) return C11.orange;
|
|
20212
|
+
return C11.red;
|
|
19874
20213
|
}
|
|
19875
20214
|
function getProgressPercent(len) {
|
|
19876
20215
|
if (len === 0) return 0;
|
|
@@ -19878,9 +20217,9 @@ function getProgressPercent(len) {
|
|
|
19878
20217
|
}
|
|
19879
20218
|
function getProgressColor(len) {
|
|
19880
20219
|
if (len === 0) return "var(--theme-elevation-200, #e5e7eb)";
|
|
19881
|
-
if (len >= TITLE_MIN && len <= TITLE_MAX) return
|
|
19882
|
-
if (len < TITLE_MIN) return
|
|
19883
|
-
return
|
|
20220
|
+
if (len >= TITLE_MIN && len <= TITLE_MAX) return C11.green;
|
|
20221
|
+
if (len < TITLE_MIN) return C11.orange;
|
|
20222
|
+
return C11.red;
|
|
19884
20223
|
}
|
|
19885
20224
|
function MetaTitleField({
|
|
19886
20225
|
path,
|
|
@@ -19951,7 +20290,7 @@ function MetaTitleField({
|
|
|
19951
20290
|
style: {
|
|
19952
20291
|
fontSize: 13,
|
|
19953
20292
|
fontWeight: 700,
|
|
19954
|
-
color:
|
|
20293
|
+
color: C11.textPrimary
|
|
19955
20294
|
},
|
|
19956
20295
|
children: t.metaTitle.label
|
|
19957
20296
|
}
|
|
@@ -19991,9 +20330,9 @@ function MetaTitleField({
|
|
|
19991
20330
|
fontSize: 14,
|
|
19992
20331
|
fontFamily: "inherit",
|
|
19993
20332
|
borderRadius: 8,
|
|
19994
|
-
border: `2px solid ${
|
|
19995
|
-
backgroundColor:
|
|
19996
|
-
color:
|
|
20333
|
+
border: `2px solid ${C11.border}`,
|
|
20334
|
+
backgroundColor: C11.surfaceBg,
|
|
20335
|
+
color: C11.textPrimary,
|
|
19997
20336
|
outline: "none",
|
|
19998
20337
|
boxShadow: "2px 2px 0 0 var(--theme-border-color, rgba(0,0,0,1))"
|
|
19999
20338
|
}
|
|
@@ -20011,9 +20350,9 @@ function MetaTitleField({
|
|
|
20011
20350
|
gap: 5,
|
|
20012
20351
|
padding: "8px 14px",
|
|
20013
20352
|
borderRadius: 8,
|
|
20014
|
-
border: `2px solid ${
|
|
20015
|
-
backgroundColor: loading ?
|
|
20016
|
-
color: loading ?
|
|
20353
|
+
border: `2px solid ${C11.border}`,
|
|
20354
|
+
backgroundColor: loading ? C11.surface50 : C11.cyan,
|
|
20355
|
+
color: loading ? C11.textSecondary : C11.black,
|
|
20017
20356
|
fontWeight: 800,
|
|
20018
20357
|
fontSize: 11,
|
|
20019
20358
|
textTransform: "uppercase",
|
|
@@ -20060,7 +20399,7 @@ function MetaTitleField({
|
|
|
20060
20399
|
justifyContent: "space-between",
|
|
20061
20400
|
marginTop: 4,
|
|
20062
20401
|
fontSize: 10,
|
|
20063
|
-
color:
|
|
20402
|
+
color: C11.textSecondary
|
|
20064
20403
|
},
|
|
20065
20404
|
children: [
|
|
20066
20405
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -20094,9 +20433,9 @@ function MetaTitleField({
|
|
|
20094
20433
|
borderRadius: 6,
|
|
20095
20434
|
fontSize: 11,
|
|
20096
20435
|
fontWeight: 600,
|
|
20097
|
-
color:
|
|
20436
|
+
color: C11.red,
|
|
20098
20437
|
backgroundColor: "rgba(239,68,68,0.08)",
|
|
20099
|
-
border: `1px solid ${
|
|
20438
|
+
border: `1px solid ${C11.red}`
|
|
20100
20439
|
},
|
|
20101
20440
|
children: error
|
|
20102
20441
|
}
|
|
@@ -20105,7 +20444,7 @@ function MetaTitleField({
|
|
|
20105
20444
|
}
|
|
20106
20445
|
);
|
|
20107
20446
|
}
|
|
20108
|
-
var
|
|
20447
|
+
var C12 = {
|
|
20109
20448
|
cyan: "#00E5FF",
|
|
20110
20449
|
black: "#000",
|
|
20111
20450
|
green: "#22c55e",
|
|
@@ -20120,10 +20459,10 @@ var C11 = {
|
|
|
20120
20459
|
var DESC_MIN = 120;
|
|
20121
20460
|
var DESC_MAX = 160;
|
|
20122
20461
|
function getCharColor2(len) {
|
|
20123
|
-
if (len === 0) return
|
|
20124
|
-
if (len >= DESC_MIN && len <= DESC_MAX) return
|
|
20125
|
-
if (len > 0 && len < DESC_MIN) return
|
|
20126
|
-
return
|
|
20462
|
+
if (len === 0) return C12.textSecondary;
|
|
20463
|
+
if (len >= DESC_MIN && len <= DESC_MAX) return C12.green;
|
|
20464
|
+
if (len > 0 && len < DESC_MIN) return C12.orange;
|
|
20465
|
+
return C12.red;
|
|
20127
20466
|
}
|
|
20128
20467
|
function getProgressPercent2(len) {
|
|
20129
20468
|
if (len === 0) return 0;
|
|
@@ -20131,9 +20470,9 @@ function getProgressPercent2(len) {
|
|
|
20131
20470
|
}
|
|
20132
20471
|
function getProgressColor2(len) {
|
|
20133
20472
|
if (len === 0) return "var(--theme-elevation-200, #e5e7eb)";
|
|
20134
|
-
if (len >= DESC_MIN && len <= DESC_MAX) return
|
|
20135
|
-
if (len < DESC_MIN) return
|
|
20136
|
-
return
|
|
20473
|
+
if (len >= DESC_MIN && len <= DESC_MAX) return C12.green;
|
|
20474
|
+
if (len < DESC_MIN) return C12.orange;
|
|
20475
|
+
return C12.red;
|
|
20137
20476
|
}
|
|
20138
20477
|
function MetaDescriptionField({
|
|
20139
20478
|
path,
|
|
@@ -20204,7 +20543,7 @@ function MetaDescriptionField({
|
|
|
20204
20543
|
style: {
|
|
20205
20544
|
fontSize: 13,
|
|
20206
20545
|
fontWeight: 700,
|
|
20207
|
-
color:
|
|
20546
|
+
color: C12.textPrimary
|
|
20208
20547
|
},
|
|
20209
20548
|
children: t.metaDescription.label
|
|
20210
20549
|
}
|
|
@@ -20244,9 +20583,9 @@ function MetaDescriptionField({
|
|
|
20244
20583
|
fontSize: 14,
|
|
20245
20584
|
fontFamily: "inherit",
|
|
20246
20585
|
borderRadius: 8,
|
|
20247
|
-
border: `2px solid ${
|
|
20248
|
-
backgroundColor:
|
|
20249
|
-
color:
|
|
20586
|
+
border: `2px solid ${C12.border}`,
|
|
20587
|
+
backgroundColor: C12.surfaceBg,
|
|
20588
|
+
color: C12.textPrimary,
|
|
20250
20589
|
outline: "none",
|
|
20251
20590
|
resize: "vertical",
|
|
20252
20591
|
lineHeight: 1.5,
|
|
@@ -20266,9 +20605,9 @@ function MetaDescriptionField({
|
|
|
20266
20605
|
gap: 5,
|
|
20267
20606
|
padding: "8px 14px",
|
|
20268
20607
|
borderRadius: 8,
|
|
20269
|
-
border: `2px solid ${
|
|
20270
|
-
backgroundColor: loading ?
|
|
20271
|
-
color: loading ?
|
|
20608
|
+
border: `2px solid ${C12.border}`,
|
|
20609
|
+
backgroundColor: loading ? C12.surface50 : C12.cyan,
|
|
20610
|
+
color: loading ? C12.textSecondary : C12.black,
|
|
20272
20611
|
fontWeight: 800,
|
|
20273
20612
|
fontSize: 11,
|
|
20274
20613
|
textTransform: "uppercase",
|
|
@@ -20316,7 +20655,7 @@ function MetaDescriptionField({
|
|
|
20316
20655
|
justifyContent: "space-between",
|
|
20317
20656
|
marginTop: 4,
|
|
20318
20657
|
fontSize: 10,
|
|
20319
|
-
color:
|
|
20658
|
+
color: C12.textSecondary
|
|
20320
20659
|
},
|
|
20321
20660
|
children: [
|
|
20322
20661
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -20350,9 +20689,9 @@ function MetaDescriptionField({
|
|
|
20350
20689
|
borderRadius: 6,
|
|
20351
20690
|
fontSize: 11,
|
|
20352
20691
|
fontWeight: 600,
|
|
20353
|
-
color:
|
|
20692
|
+
color: C12.red,
|
|
20354
20693
|
backgroundColor: "rgba(239,68,68,0.08)",
|
|
20355
|
-
border: `1px solid ${
|
|
20694
|
+
border: `1px solid ${C12.red}`
|
|
20356
20695
|
},
|
|
20357
20696
|
children: error
|
|
20358
20697
|
}
|
|
@@ -20361,7 +20700,7 @@ function MetaDescriptionField({
|
|
|
20361
20700
|
}
|
|
20362
20701
|
);
|
|
20363
20702
|
}
|
|
20364
|
-
var
|
|
20703
|
+
var C13 = {
|
|
20365
20704
|
cyan: "#00E5FF",
|
|
20366
20705
|
black: "#000",
|
|
20367
20706
|
white: "#fff",
|
|
@@ -20438,8 +20777,8 @@ function MetaImageField({
|
|
|
20438
20777
|
gap: 10,
|
|
20439
20778
|
padding: "10px 14px",
|
|
20440
20779
|
borderRadius: 8,
|
|
20441
|
-
border: `2px solid ${
|
|
20442
|
-
backgroundColor:
|
|
20780
|
+
border: `2px solid ${C13.border}`,
|
|
20781
|
+
backgroundColor: C13.surfaceBg,
|
|
20443
20782
|
boxShadow: "2px 2px 0 0 var(--theme-border-color, rgba(0,0,0,1))"
|
|
20444
20783
|
},
|
|
20445
20784
|
children: [
|
|
@@ -20458,7 +20797,7 @@ function MetaImageField({
|
|
|
20458
20797
|
fontWeight: 900,
|
|
20459
20798
|
backgroundColor: hasImage ? "rgba(34,197,94,0.15)" : "rgba(255,138,0,0.15)",
|
|
20460
20799
|
color: hasImage ? "#16a34a" : "#d97706",
|
|
20461
|
-
border: `1px solid ${hasImage ?
|
|
20800
|
+
border: `1px solid ${hasImage ? C13.green : C13.orange}`
|
|
20462
20801
|
},
|
|
20463
20802
|
children: hasImage ? "\u2713" : "!"
|
|
20464
20803
|
}
|
|
@@ -20470,7 +20809,7 @@ function MetaImageField({
|
|
|
20470
20809
|
style: {
|
|
20471
20810
|
fontSize: 12,
|
|
20472
20811
|
fontWeight: 700,
|
|
20473
|
-
color:
|
|
20812
|
+
color: C13.textPrimary
|
|
20474
20813
|
},
|
|
20475
20814
|
children: t.metaImage.label
|
|
20476
20815
|
}
|
|
@@ -20480,7 +20819,7 @@ function MetaImageField({
|
|
|
20480
20819
|
{
|
|
20481
20820
|
style: {
|
|
20482
20821
|
fontSize: 10,
|
|
20483
|
-
color:
|
|
20822
|
+
color: C13.textSecondary,
|
|
20484
20823
|
lineHeight: 1.4
|
|
20485
20824
|
},
|
|
20486
20825
|
children: hasImage ? t.metaImage.imageSet : t.metaImage.noImage
|
|
@@ -20500,9 +20839,9 @@ function MetaImageField({
|
|
|
20500
20839
|
gap: 5,
|
|
20501
20840
|
padding: "8px 14px",
|
|
20502
20841
|
borderRadius: 8,
|
|
20503
|
-
border: `2px solid ${
|
|
20504
|
-
backgroundColor: loading ?
|
|
20505
|
-
color: loading ?
|
|
20842
|
+
border: `2px solid ${C13.border}`,
|
|
20843
|
+
backgroundColor: loading ? C13.surface50 : success ? C13.green : C13.cyan,
|
|
20844
|
+
color: loading ? C13.textSecondary : success ? C13.white : C13.black,
|
|
20506
20845
|
fontWeight: 800,
|
|
20507
20846
|
fontSize: 11,
|
|
20508
20847
|
textTransform: "uppercase",
|
|
@@ -20529,9 +20868,9 @@ function MetaImageField({
|
|
|
20529
20868
|
borderRadius: 6,
|
|
20530
20869
|
fontSize: 11,
|
|
20531
20870
|
fontWeight: 600,
|
|
20532
|
-
color:
|
|
20871
|
+
color: C13.red,
|
|
20533
20872
|
backgroundColor: "rgba(239,68,68,0.08)",
|
|
20534
|
-
border: `1px solid ${
|
|
20873
|
+
border: `1px solid ${C13.red}`
|
|
20535
20874
|
},
|
|
20536
20875
|
children: error
|
|
20537
20876
|
}
|
|
@@ -20540,7 +20879,7 @@ function MetaImageField({
|
|
|
20540
20879
|
}
|
|
20541
20880
|
);
|
|
20542
20881
|
}
|
|
20543
|
-
var
|
|
20882
|
+
var C14 = {
|
|
20544
20883
|
black: "#000",
|
|
20545
20884
|
white: "#fff",
|
|
20546
20885
|
green: "#22c55e",
|
|
@@ -20554,15 +20893,15 @@ var C13 = {
|
|
|
20554
20893
|
function getCompletenessColor(count) {
|
|
20555
20894
|
switch (count) {
|
|
20556
20895
|
case 0:
|
|
20557
|
-
return
|
|
20896
|
+
return C14.red;
|
|
20558
20897
|
case 1:
|
|
20559
|
-
return
|
|
20898
|
+
return C14.orange;
|
|
20560
20899
|
case 2:
|
|
20561
|
-
return
|
|
20900
|
+
return C14.yellow;
|
|
20562
20901
|
case 3:
|
|
20563
|
-
return
|
|
20902
|
+
return C14.green;
|
|
20564
20903
|
default:
|
|
20565
|
-
return
|
|
20904
|
+
return C14.textSecondary;
|
|
20566
20905
|
}
|
|
20567
20906
|
}
|
|
20568
20907
|
function getCompletenessLabel(count, ov) {
|
|
@@ -20620,8 +20959,8 @@ function OverviewField({
|
|
|
20620
20959
|
fontFamily: "var(--font-body, Inter, system-ui, sans-serif)",
|
|
20621
20960
|
padding: "12px 14px",
|
|
20622
20961
|
borderRadius: 10,
|
|
20623
|
-
border: `2px solid ${
|
|
20624
|
-
backgroundColor:
|
|
20962
|
+
border: `2px solid ${C14.border}`,
|
|
20963
|
+
backgroundColor: C14.surfaceBg,
|
|
20625
20964
|
boxShadow: "3px 3px 0 0 var(--theme-border-color, rgba(0,0,0,1))",
|
|
20626
20965
|
marginBottom: 12
|
|
20627
20966
|
},
|
|
@@ -20644,7 +20983,7 @@ function OverviewField({
|
|
|
20644
20983
|
fontWeight: 800,
|
|
20645
20984
|
textTransform: "uppercase",
|
|
20646
20985
|
letterSpacing: "0.04em",
|
|
20647
|
-
color:
|
|
20986
|
+
color: C14.textPrimary
|
|
20648
20987
|
},
|
|
20649
20988
|
children: t.overview.metaCompleteness
|
|
20650
20989
|
}
|
|
@@ -20659,8 +20998,8 @@ function OverviewField({
|
|
|
20659
20998
|
fontSize: 11,
|
|
20660
20999
|
fontWeight: 800,
|
|
20661
21000
|
backgroundColor: completenessColor,
|
|
20662
|
-
color: completenessColor ===
|
|
20663
|
-
border: `2px solid ${
|
|
21001
|
+
color: completenessColor === C14.yellow ? C14.black : C14.white,
|
|
21002
|
+
border: `2px solid ${C14.border}`,
|
|
20664
21003
|
textTransform: "uppercase",
|
|
20665
21004
|
letterSpacing: "0.03em"
|
|
20666
21005
|
},
|
|
@@ -20758,7 +21097,7 @@ function OverviewField({
|
|
|
20758
21097
|
style: {
|
|
20759
21098
|
fontSize: 12,
|
|
20760
21099
|
fontWeight: 600,
|
|
20761
|
-
color: item.filled ?
|
|
21100
|
+
color: item.filled ? C14.textPrimary : C14.textSecondary
|
|
20762
21101
|
},
|
|
20763
21102
|
children: item.label
|
|
20764
21103
|
}
|
|
@@ -20770,7 +21109,7 @@ function OverviewField({
|
|
|
20770
21109
|
marginLeft: "auto",
|
|
20771
21110
|
fontSize: 10,
|
|
20772
21111
|
fontWeight: 700,
|
|
20773
|
-
color: item.filled ?
|
|
21112
|
+
color: item.filled ? C14.green : C14.red,
|
|
20774
21113
|
textTransform: "uppercase",
|
|
20775
21114
|
letterSpacing: "0.03em"
|
|
20776
21115
|
},
|
|
@@ -20787,7 +21126,7 @@ function OverviewField({
|
|
|
20787
21126
|
}
|
|
20788
21127
|
);
|
|
20789
21128
|
}
|
|
20790
|
-
var
|
|
21129
|
+
var C15 = {
|
|
20791
21130
|
cyan: "#00E5FF",
|
|
20792
21131
|
black: "#000",
|
|
20793
21132
|
white: "#fff",
|
|
@@ -20806,10 +21145,10 @@ var G = {
|
|
|
20806
21145
|
descGrey: "#4d5156",
|
|
20807
21146
|
faviconBg: "#e8eaed"};
|
|
20808
21147
|
function charCountColor2(len, min, max) {
|
|
20809
|
-
if (len >= min && len <= max) return
|
|
20810
|
-
if (len > 0 && len < min) return
|
|
20811
|
-
if (len > max) return
|
|
20812
|
-
return
|
|
21148
|
+
if (len >= min && len <= max) return C15.green;
|
|
21149
|
+
if (len > 0 && len < min) return C15.orange;
|
|
21150
|
+
if (len > max) return C15.red;
|
|
21151
|
+
return C15.textSecondary;
|
|
20813
21152
|
}
|
|
20814
21153
|
function truncateText(text, maxChars) {
|
|
20815
21154
|
if (text.length <= maxChars) return text;
|
|
@@ -20864,8 +21203,8 @@ function SerpPreview({
|
|
|
20864
21203
|
padding: "10px 12px",
|
|
20865
21204
|
cursor: "pointer",
|
|
20866
21205
|
borderRadius: 8,
|
|
20867
|
-
border: `2px solid ${
|
|
20868
|
-
backgroundColor:
|
|
21206
|
+
border: `2px solid ${C15.border}`,
|
|
21207
|
+
backgroundColor: C15.surface50,
|
|
20869
21208
|
userSelect: "none"
|
|
20870
21209
|
},
|
|
20871
21210
|
children: [
|
|
@@ -20880,7 +21219,7 @@ function SerpPreview({
|
|
|
20880
21219
|
fontWeight: 800,
|
|
20881
21220
|
textTransform: "uppercase",
|
|
20882
21221
|
letterSpacing: "0.04em",
|
|
20883
|
-
color:
|
|
21222
|
+
color: C15.textPrimary
|
|
20884
21223
|
},
|
|
20885
21224
|
children: [
|
|
20886
21225
|
/* @__PURE__ */ jsxs(
|
|
@@ -20912,7 +21251,7 @@ function SerpPreview({
|
|
|
20912
21251
|
transition: "transform 0.2s",
|
|
20913
21252
|
display: "inline-block",
|
|
20914
21253
|
transform: open ? "rotate(90deg)" : "none",
|
|
20915
|
-
color:
|
|
21254
|
+
color: C15.textSecondary
|
|
20916
21255
|
},
|
|
20917
21256
|
children: "\u25B6"
|
|
20918
21257
|
}
|
|
@@ -20945,10 +21284,10 @@ function SerpPreview({
|
|
|
20945
21284
|
"div",
|
|
20946
21285
|
{
|
|
20947
21286
|
style: {
|
|
20948
|
-
backgroundColor:
|
|
20949
|
-
border: `2px solid ${
|
|
21287
|
+
backgroundColor: C15.white,
|
|
21288
|
+
border: `2px solid ${C15.border}`,
|
|
20950
21289
|
borderRadius: 12,
|
|
20951
|
-
boxShadow: `3px 3px 0 0 ${
|
|
21290
|
+
boxShadow: `3px 3px 0 0 ${C15.border}`,
|
|
20952
21291
|
padding: isDesktop ? 20 : 14,
|
|
20953
21292
|
maxWidth: isDesktop ? 650 : 380,
|
|
20954
21293
|
overflow: "hidden"
|
|
@@ -21011,7 +21350,7 @@ function SerpPreview({
|
|
|
21011
21350
|
style: {
|
|
21012
21351
|
fontSize: 14,
|
|
21013
21352
|
fontWeight: 400,
|
|
21014
|
-
color:
|
|
21353
|
+
color: C15.black,
|
|
21015
21354
|
lineHeight: 1.3,
|
|
21016
21355
|
whiteSpace: "nowrap",
|
|
21017
21356
|
overflow: "hidden",
|
|
@@ -21075,7 +21414,7 @@ function SerpPreview({
|
|
|
21075
21414
|
"span",
|
|
21076
21415
|
{
|
|
21077
21416
|
style: {
|
|
21078
|
-
color:
|
|
21417
|
+
color: C15.textSecondary,
|
|
21079
21418
|
fontStyle: "italic",
|
|
21080
21419
|
fontSize: titleFontSize - 2
|
|
21081
21420
|
},
|
|
@@ -21104,7 +21443,7 @@ function SerpPreview({
|
|
|
21104
21443
|
"span",
|
|
21105
21444
|
{
|
|
21106
21445
|
style: {
|
|
21107
|
-
color:
|
|
21446
|
+
color: C15.textSecondary,
|
|
21108
21447
|
fontStyle: "italic",
|
|
21109
21448
|
fontSize: descFontSize - 1
|
|
21110
21449
|
},
|
|
@@ -21137,7 +21476,7 @@ function SerpPreview({
|
|
|
21137
21476
|
fontSize: 11
|
|
21138
21477
|
},
|
|
21139
21478
|
children: [
|
|
21140
|
-
/* @__PURE__ */ jsx("span", { style: { color:
|
|
21479
|
+
/* @__PURE__ */ jsx("span", { style: { color: C15.textSecondary, fontWeight: 600 }, children: t.serpPreview.previewTitle }),
|
|
21141
21480
|
/* @__PURE__ */ jsxs(
|
|
21142
21481
|
"span",
|
|
21143
21482
|
{
|
|
@@ -21166,7 +21505,7 @@ function SerpPreview({
|
|
|
21166
21505
|
fontSize: 11
|
|
21167
21506
|
},
|
|
21168
21507
|
children: [
|
|
21169
|
-
/* @__PURE__ */ jsx("span", { style: { color:
|
|
21508
|
+
/* @__PURE__ */ jsx("span", { style: { color: C15.textSecondary, fontWeight: 600 }, children: t.serpPreview.previewDescription }),
|
|
21170
21509
|
/* @__PURE__ */ jsxs(
|
|
21171
21510
|
"span",
|
|
21172
21511
|
{
|
|
@@ -21195,14 +21534,14 @@ function SerpPreview({
|
|
|
21195
21534
|
fontSize: 11
|
|
21196
21535
|
},
|
|
21197
21536
|
children: [
|
|
21198
|
-
/* @__PURE__ */ jsx("span", { style: { color:
|
|
21537
|
+
/* @__PURE__ */ jsx("span", { style: { color: C15.textSecondary, fontWeight: 600 }, children: t.serpPreview.url }),
|
|
21199
21538
|
/* @__PURE__ */ jsxs(
|
|
21200
21539
|
"span",
|
|
21201
21540
|
{
|
|
21202
21541
|
style: {
|
|
21203
21542
|
fontWeight: 700,
|
|
21204
21543
|
fontVariantNumeric: "tabular-nums",
|
|
21205
|
-
color: fullUrl.length <= 75 ?
|
|
21544
|
+
color: fullUrl.length <= 75 ? C15.green : C15.red
|
|
21206
21545
|
},
|
|
21207
21546
|
children: [
|
|
21208
21547
|
fullUrl.length,
|
|
@@ -21237,13 +21576,13 @@ function DeviceButton({
|
|
|
21237
21576
|
gap: 5,
|
|
21238
21577
|
padding: "4px 12px",
|
|
21239
21578
|
borderRadius: 6,
|
|
21240
|
-
border: `2px solid ${
|
|
21579
|
+
border: `2px solid ${C15.border}`,
|
|
21241
21580
|
fontSize: 11,
|
|
21242
21581
|
fontWeight: 700,
|
|
21243
21582
|
cursor: "pointer",
|
|
21244
|
-
backgroundColor: active ?
|
|
21245
|
-
color: active ?
|
|
21246
|
-
boxShadow: active ? `2px 2px 0 0 ${
|
|
21583
|
+
backgroundColor: active ? C15.cyan : C15.surfaceBg,
|
|
21584
|
+
color: active ? C15.black : C15.textPrimary,
|
|
21585
|
+
boxShadow: active ? `2px 2px 0 0 ${C15.border}` : "none",
|
|
21247
21586
|
transition: "background-color 0.15s"
|
|
21248
21587
|
},
|
|
21249
21588
|
children: [
|