@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.cjs
CHANGED
|
@@ -1066,8 +1066,15 @@ var fr = {
|
|
|
1066
1066
|
markCornerstone: "Marquer pilier",
|
|
1067
1067
|
unmarkCornerstone: "D\xE9marquer pilier",
|
|
1068
1068
|
bulkOptimizeMeta: "Optimiser m\xE9ta (IA)",
|
|
1069
|
-
bulkOptimizing: "
|
|
1069
|
+
bulkOptimizing: "Analyse\u2026",
|
|
1070
1070
|
bulkConfirm: "Confirmer ?",
|
|
1071
|
+
bulkPreviewTitle: "Corrections m\xE9ta propos\xE9es",
|
|
1072
|
+
bulkApply: "Appliquer",
|
|
1073
|
+
bulkApplying: "Application\u2026",
|
|
1074
|
+
bulkCancel: "Annuler",
|
|
1075
|
+
bulkExport: "Exporter CSV",
|
|
1076
|
+
bulkNoChanges: "Aucune correction n\xE9cessaire sur la s\xE9lection.",
|
|
1077
|
+
bulkCappedNote: "limite atteinte (affine la s\xE9lection)",
|
|
1071
1078
|
searchPlaceholder: "Rechercher (titre, slug, keyword)...",
|
|
1072
1079
|
allCollections: "Toutes les collections",
|
|
1073
1080
|
allScores: "Tous les scores",
|
|
@@ -1661,8 +1668,15 @@ var en = {
|
|
|
1661
1668
|
markCornerstone: "Mark as cornerstone",
|
|
1662
1669
|
unmarkCornerstone: "Unmark cornerstone",
|
|
1663
1670
|
bulkOptimizeMeta: "Optimize meta (AI)",
|
|
1664
|
-
bulkOptimizing: "
|
|
1671
|
+
bulkOptimizing: "Analyzing\u2026",
|
|
1665
1672
|
bulkConfirm: "Confirm?",
|
|
1673
|
+
bulkPreviewTitle: "Proposed meta corrections",
|
|
1674
|
+
bulkApply: "Apply",
|
|
1675
|
+
bulkApplying: "Applying\u2026",
|
|
1676
|
+
bulkCancel: "Cancel",
|
|
1677
|
+
bulkExport: "Export CSV",
|
|
1678
|
+
bulkNoChanges: "No corrections needed on the selection.",
|
|
1679
|
+
bulkCappedNote: "limit reached (narrow the selection)",
|
|
1666
1680
|
searchPlaceholder: "Search (title, slug, keyword)...",
|
|
1667
1681
|
allCollections: "All collections",
|
|
1668
1682
|
allScores: "All scores",
|
|
@@ -9211,7 +9225,6 @@ function BulkActionBar({
|
|
|
9211
9225
|
optimizing,
|
|
9212
9226
|
t
|
|
9213
9227
|
}) {
|
|
9214
|
-
const [confirmOptimize, setConfirmOptimize] = React4.useState(false);
|
|
9215
9228
|
if (count === 0) return null;
|
|
9216
9229
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9217
9230
|
"div",
|
|
@@ -9261,18 +9274,11 @@ function BulkActionBar({
|
|
|
9261
9274
|
"button",
|
|
9262
9275
|
{
|
|
9263
9276
|
onClick: () => {
|
|
9264
|
-
if (optimizing)
|
|
9265
|
-
if (confirmOptimize) {
|
|
9266
|
-
setConfirmOptimize(false);
|
|
9267
|
-
onOptimizeMeta();
|
|
9268
|
-
} else {
|
|
9269
|
-
setConfirmOptimize(true);
|
|
9270
|
-
setTimeout(() => setConfirmOptimize(false), 4e3);
|
|
9271
|
-
}
|
|
9277
|
+
if (!optimizing) onOptimizeMeta();
|
|
9272
9278
|
},
|
|
9273
9279
|
disabled: optimizing,
|
|
9274
9280
|
style: { ...btnBase, backgroundColor: "#7c3aed", color: "#fff", opacity: optimizing ? 0.6 : 1 },
|
|
9275
|
-
children: optimizing ? t.seoView.bulkOptimizing :
|
|
9281
|
+
children: optimizing ? t.seoView.bulkOptimizing : `\u2728 ${t.seoView.bulkOptimizeMeta}`
|
|
9276
9282
|
}
|
|
9277
9283
|
),
|
|
9278
9284
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9316,6 +9322,8 @@ function SeoView() {
|
|
|
9316
9322
|
const [saving, setSaving] = React4.useState(false);
|
|
9317
9323
|
const [saveError, setSaveError] = React4.useState(null);
|
|
9318
9324
|
const [bulkOptimizing, setBulkOptimizing] = React4.useState(false);
|
|
9325
|
+
const [bulkApplying, setBulkApplying] = React4.useState(false);
|
|
9326
|
+
const [bulkPreview, setBulkPreview] = React4.useState(null);
|
|
9319
9327
|
const PAGE_SIZE = 50;
|
|
9320
9328
|
const fetchAudit = React4.useCallback(async (forceRefresh = false) => {
|
|
9321
9329
|
setLoading(true);
|
|
@@ -9537,44 +9545,83 @@ function SeoView() {
|
|
|
9537
9545
|
[selectedIds, fetchAudit]
|
|
9538
9546
|
);
|
|
9539
9547
|
const handleBulkOptimizeMeta = React4.useCallback(async () => {
|
|
9540
|
-
const
|
|
9541
|
-
if (
|
|
9548
|
+
const ids = Array.from(selectedIds).filter((k) => !k.startsWith("global:"));
|
|
9549
|
+
if (ids.length === 0) return;
|
|
9542
9550
|
setBulkOptimizing(true);
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
});
|
|
9553
|
-
if (!res.ok) continue;
|
|
9551
|
+
setBulkPreview(null);
|
|
9552
|
+
try {
|
|
9553
|
+
const res = await fetch("/api/seo-plugin/ai-optimize-bulk", {
|
|
9554
|
+
method: "POST",
|
|
9555
|
+
headers: { "Content-Type": "application/json" },
|
|
9556
|
+
credentials: "include",
|
|
9557
|
+
body: JSON.stringify({ ids, apply: false, limit: 100 })
|
|
9558
|
+
});
|
|
9559
|
+
if (res.ok) {
|
|
9554
9560
|
const data = await res.json();
|
|
9555
|
-
const
|
|
9556
|
-
|
|
9557
|
-
if (sug.metaTitle || sug.metaDescription) {
|
|
9558
|
-
patch.meta = { title: sug.metaTitle, description: sug.metaDescription };
|
|
9559
|
-
}
|
|
9560
|
-
if (sug.focusKeyword && sug.focusKeyword !== data.current?.focusKeyword) {
|
|
9561
|
-
patch.focusKeyword = sug.focusKeyword;
|
|
9562
|
-
}
|
|
9563
|
-
if (Object.keys(patch).length > 0) {
|
|
9564
|
-
await fetch(`/api/${collection}/${id}`, {
|
|
9565
|
-
method: "PATCH",
|
|
9566
|
-
headers: { "Content-Type": "application/json" },
|
|
9567
|
-
credentials: "include",
|
|
9568
|
-
body: JSON.stringify(patch)
|
|
9569
|
-
});
|
|
9570
|
-
}
|
|
9571
|
-
} catch {
|
|
9561
|
+
const changed = (data.results || []).filter((r) => r.changed && !r.error);
|
|
9562
|
+
setBulkPreview({ results: changed, capped: !!data.capped, total: data.processed || 0 });
|
|
9572
9563
|
}
|
|
9564
|
+
} catch {
|
|
9573
9565
|
}
|
|
9574
9566
|
setBulkOptimizing(false);
|
|
9567
|
+
}, [selectedIds]);
|
|
9568
|
+
const handleBulkApplyPreview = React4.useCallback(async () => {
|
|
9569
|
+
if (!bulkPreview || bulkPreview.results.length === 0) return;
|
|
9570
|
+
setBulkApplying(true);
|
|
9571
|
+
const corrections = bulkPreview.results.map((r) => ({
|
|
9572
|
+
collection: r.collection,
|
|
9573
|
+
id: r.id,
|
|
9574
|
+
metaTitle: r.after.metaTitle,
|
|
9575
|
+
metaDescription: r.after.metaDescription,
|
|
9576
|
+
focusKeyword: r.after.focusKeyword
|
|
9577
|
+
}));
|
|
9578
|
+
try {
|
|
9579
|
+
await fetch("/api/seo-plugin/ai-optimize-bulk", {
|
|
9580
|
+
method: "POST",
|
|
9581
|
+
headers: { "Content-Type": "application/json" },
|
|
9582
|
+
credentials: "include",
|
|
9583
|
+
body: JSON.stringify({ corrections, apply: true, limit: 100 })
|
|
9584
|
+
});
|
|
9585
|
+
} catch {
|
|
9586
|
+
}
|
|
9587
|
+
setBulkApplying(false);
|
|
9588
|
+
setBulkPreview(null);
|
|
9575
9589
|
setSelectedIds(/* @__PURE__ */ new Set());
|
|
9576
9590
|
fetchAudit();
|
|
9577
|
-
}, [
|
|
9591
|
+
}, [bulkPreview, fetchAudit]);
|
|
9592
|
+
const handleExportBulkPreviewCsv = React4.useCallback(() => {
|
|
9593
|
+
if (!bulkPreview) return;
|
|
9594
|
+
const header = [
|
|
9595
|
+
"collection",
|
|
9596
|
+
"id",
|
|
9597
|
+
"title",
|
|
9598
|
+
"before_title",
|
|
9599
|
+
"after_title",
|
|
9600
|
+
"before_description",
|
|
9601
|
+
"after_description",
|
|
9602
|
+
"before_keyword",
|
|
9603
|
+
"after_keyword"
|
|
9604
|
+
];
|
|
9605
|
+
const rows = bulkPreview.results.map((r) => [
|
|
9606
|
+
r.collection,
|
|
9607
|
+
r.id,
|
|
9608
|
+
r.title,
|
|
9609
|
+
r.before.metaTitle,
|
|
9610
|
+
r.after.metaTitle,
|
|
9611
|
+
r.before.metaDescription,
|
|
9612
|
+
r.after.metaDescription,
|
|
9613
|
+
r.before.focusKeyword,
|
|
9614
|
+
r.after.focusKeyword
|
|
9615
|
+
]);
|
|
9616
|
+
const csv = [header, ...rows].map((row) => row.map((c) => `"${String(c ?? "").replace(/"/g, '""')}"`).join(",")).join("\n");
|
|
9617
|
+
const blob = new Blob([csv], { type: "text/csv;charset=utf-8;" });
|
|
9618
|
+
const url = URL.createObjectURL(blob);
|
|
9619
|
+
const a = document.createElement("a");
|
|
9620
|
+
a.href = url;
|
|
9621
|
+
a.download = `seo-bulk-optimize-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`;
|
|
9622
|
+
a.click();
|
|
9623
|
+
URL.revokeObjectURL(url);
|
|
9624
|
+
}, [bulkPreview]);
|
|
9578
9625
|
const handleInlineSave = React4.useCallback(
|
|
9579
9626
|
async (item, metaTitle, metaDescription) => {
|
|
9580
9627
|
setSaving(true);
|
|
@@ -10327,6 +10374,96 @@ function SeoView() {
|
|
|
10327
10374
|
optimizing: bulkOptimizing,
|
|
10328
10375
|
t
|
|
10329
10376
|
}
|
|
10377
|
+
),
|
|
10378
|
+
bulkPreview && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10379
|
+
"div",
|
|
10380
|
+
{
|
|
10381
|
+
style: {
|
|
10382
|
+
position: "fixed",
|
|
10383
|
+
inset: 0,
|
|
10384
|
+
backgroundColor: "rgba(0,0,0,0.5)",
|
|
10385
|
+
zIndex: 100,
|
|
10386
|
+
display: "flex",
|
|
10387
|
+
alignItems: "center",
|
|
10388
|
+
justifyContent: "center",
|
|
10389
|
+
padding: 24,
|
|
10390
|
+
fontFamily: "var(--font-body, system-ui)"
|
|
10391
|
+
},
|
|
10392
|
+
onClick: () => {
|
|
10393
|
+
if (!bulkApplying) setBulkPreview(null);
|
|
10394
|
+
},
|
|
10395
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10396
|
+
"div",
|
|
10397
|
+
{
|
|
10398
|
+
onClick: (e) => e.stopPropagation(),
|
|
10399
|
+
style: {
|
|
10400
|
+
width: "min(900px, 100%)",
|
|
10401
|
+
maxHeight: "85vh",
|
|
10402
|
+
display: "flex",
|
|
10403
|
+
flexDirection: "column",
|
|
10404
|
+
backgroundColor: V2.bgCard,
|
|
10405
|
+
border: `1px solid ${V2.border}`,
|
|
10406
|
+
borderRadius: 12,
|
|
10407
|
+
overflow: "hidden"
|
|
10408
|
+
},
|
|
10409
|
+
children: [
|
|
10410
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "16px 20px", borderBottom: `1px solid ${V2.border}` }, children: [
|
|
10411
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 16, fontWeight: 800, color: V2.text }, children: t.seoView.bulkPreviewTitle }),
|
|
10412
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 12, color: V2.textSecondary, marginTop: 4 }, children: [
|
|
10413
|
+
bulkPreview.results.length,
|
|
10414
|
+
" / ",
|
|
10415
|
+
bulkPreview.total,
|
|
10416
|
+
bulkPreview.capped ? ` \xB7 ${t.seoView.bulkCappedNote}` : ""
|
|
10417
|
+
] })
|
|
10418
|
+
] }),
|
|
10419
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { overflowY: "auto", padding: "8px 20px", flex: 1 }, children: [
|
|
10420
|
+
bulkPreview.results.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: 24, textAlign: "center", color: V2.textSecondary, fontSize: 14 }, children: t.seoView.bulkNoChanges }),
|
|
10421
|
+
bulkPreview.results.map((r) => {
|
|
10422
|
+
const fields = [];
|
|
10423
|
+
if (r.before.metaTitle !== r.after.metaTitle) fields.push({ label: "Title", before: r.before.metaTitle, after: r.after.metaTitle });
|
|
10424
|
+
if (r.before.metaDescription !== r.after.metaDescription) fields.push({ label: "Description", before: r.before.metaDescription, after: r.after.metaDescription });
|
|
10425
|
+
if (r.before.focusKeyword !== r.after.focusKeyword) fields.push({ label: "Keyword", before: r.before.focusKeyword, after: r.after.focusKeyword });
|
|
10426
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "10px 0", borderBottom: `1px solid ${V2.border}` }, children: [
|
|
10427
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 13, fontWeight: 700, color: V2.text, marginBottom: 6 }, children: [
|
|
10428
|
+
r.title || `${r.collection}/${r.id}`,
|
|
10429
|
+
" ",
|
|
10430
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 10, color: V2.textSecondary, fontWeight: 400 }, children: r.collection })
|
|
10431
|
+
] }),
|
|
10432
|
+
fields.map((f, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 4, fontSize: 12 }, children: [
|
|
10433
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 10, fontWeight: 700, color: V2.textSecondary, textTransform: "uppercase" }, children: f.label }),
|
|
10434
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: V2.red, textDecoration: f.before ? "line-through" : "none", opacity: 0.75 }, children: f.before || t.seoAnalyzer.emptyValue }),
|
|
10435
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: V2.green, fontWeight: 600 }, children: f.after || t.seoAnalyzer.emptyValue })
|
|
10436
|
+
] }, i))
|
|
10437
|
+
] }, `${r.collection}::${r.id}`);
|
|
10438
|
+
})
|
|
10439
|
+
] }),
|
|
10440
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "14px 20px", borderTop: `1px solid ${V2.border}`, display: "flex", justifyContent: "space-between", gap: 8 }, children: [
|
|
10441
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10442
|
+
"button",
|
|
10443
|
+
{
|
|
10444
|
+
onClick: handleExportBulkPreviewCsv,
|
|
10445
|
+
disabled: bulkPreview.results.length === 0,
|
|
10446
|
+
style: { ...btnBase, backgroundColor: V2.cyan, color: "#000", opacity: bulkPreview.results.length === 0 ? 0.5 : 1 },
|
|
10447
|
+
children: t.seoView.bulkExport
|
|
10448
|
+
}
|
|
10449
|
+
),
|
|
10450
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
|
|
10451
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => setBulkPreview(null), disabled: bulkApplying, style: { ...btnBase, backgroundColor: V2.bg, color: V2.text }, children: t.seoView.bulkCancel }),
|
|
10452
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10453
|
+
"button",
|
|
10454
|
+
{
|
|
10455
|
+
onClick: handleBulkApplyPreview,
|
|
10456
|
+
disabled: bulkApplying || bulkPreview.results.length === 0,
|
|
10457
|
+
style: { ...btnBase, backgroundColor: "#7c3aed", color: "#fff", opacity: bulkApplying || bulkPreview.results.length === 0 ? 0.6 : 1 },
|
|
10458
|
+
children: bulkApplying ? t.seoView.bulkApplying : `${t.seoView.bulkApply} (${bulkPreview.results.length})`
|
|
10459
|
+
}
|
|
10460
|
+
)
|
|
10461
|
+
] })
|
|
10462
|
+
] })
|
|
10463
|
+
]
|
|
10464
|
+
}
|
|
10465
|
+
)
|
|
10466
|
+
}
|
|
10330
10467
|
)
|
|
10331
10468
|
]
|
|
10332
10469
|
}
|
|
@@ -17218,9 +17355,210 @@ var C7 = {
|
|
|
17218
17355
|
green: "#22c55e",
|
|
17219
17356
|
red: "#ef4444",
|
|
17220
17357
|
amber: "#f59e0b",
|
|
17221
|
-
|
|
17358
|
+
violet: "#7c3aed"
|
|
17222
17359
|
};
|
|
17223
17360
|
var S4 = {
|
|
17361
|
+
fr: {
|
|
17362
|
+
title: "Opportunit\xE9s CTR (faible clic / bonne position)",
|
|
17363
|
+
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.",
|
|
17364
|
+
needGsc: "Connectez Google Search Console ci-dessus pour activer les opportunit\xE9s CTR.",
|
|
17365
|
+
none: "Aucune opportunit\xE9 d\xE9tect\xE9e sur la p\xE9riode. \u{1F389}",
|
|
17366
|
+
loading: "Analyse des donn\xE9es GSC\u2026",
|
|
17367
|
+
page: "Page",
|
|
17368
|
+
pos: "Pos.",
|
|
17369
|
+
ctr: "CTR",
|
|
17370
|
+
expected: "attendu",
|
|
17371
|
+
potential: "Clics/mois potentiels",
|
|
17372
|
+
optimize: "Optimiser",
|
|
17373
|
+
optimizing: "\u2026",
|
|
17374
|
+
apply: "Appliquer",
|
|
17375
|
+
applied: "Appliqu\xE9 \u2713",
|
|
17376
|
+
noKey: "Cl\xE9 API Claude requise (ANTHROPIC_API_KEY).",
|
|
17377
|
+
open: "Ouvrir",
|
|
17378
|
+
refresh: "Rafra\xEEchir"
|
|
17379
|
+
},
|
|
17380
|
+
en: {
|
|
17381
|
+
title: "CTR opportunities (low clicks / good rank)",
|
|
17382
|
+
subtitle: "Pages that rank well but get few clicks (weak meta). Google Search Console data \u2192 targeted meta rewrite.",
|
|
17383
|
+
needGsc: "Connect Google Search Console above to enable CTR opportunities.",
|
|
17384
|
+
none: "No opportunities for the period. \u{1F389}",
|
|
17385
|
+
loading: "Analyzing GSC data\u2026",
|
|
17386
|
+
page: "Page",
|
|
17387
|
+
pos: "Pos.",
|
|
17388
|
+
ctr: "CTR",
|
|
17389
|
+
expected: "expected",
|
|
17390
|
+
potential: "Potential clicks/mo",
|
|
17391
|
+
optimize: "Optimize",
|
|
17392
|
+
optimizing: "\u2026",
|
|
17393
|
+
apply: "Apply",
|
|
17394
|
+
applied: "Applied \u2713",
|
|
17395
|
+
noKey: "Claude API key required (ANTHROPIC_API_KEY).",
|
|
17396
|
+
open: "Open",
|
|
17397
|
+
refresh: "Refresh"
|
|
17398
|
+
}
|
|
17399
|
+
};
|
|
17400
|
+
function CtrOpportunitiesPanel({ locale }) {
|
|
17401
|
+
const s = S4[locale] ?? S4.fr;
|
|
17402
|
+
const [opps, setOpps] = React4.useState(null);
|
|
17403
|
+
const [loading, setLoading] = React4.useState(true);
|
|
17404
|
+
const [notConnected, setNotConnected] = React4.useState(false);
|
|
17405
|
+
const [error, setError] = React4.useState(null);
|
|
17406
|
+
const [state, setState] = React4.useState({});
|
|
17407
|
+
const load = React4.useCallback(async () => {
|
|
17408
|
+
setLoading(true);
|
|
17409
|
+
setError(null);
|
|
17410
|
+
try {
|
|
17411
|
+
const res = await fetch("/api/seo-plugin/ctr-opportunities", { credentials: "include", cache: "no-store" });
|
|
17412
|
+
if (res.status === 403 || res.status === 409 || res.status === 400) {
|
|
17413
|
+
setNotConnected(true);
|
|
17414
|
+
return;
|
|
17415
|
+
}
|
|
17416
|
+
const json = await res.json();
|
|
17417
|
+
if (!res.ok) {
|
|
17418
|
+
setError(json.error || `Error ${res.status}`);
|
|
17419
|
+
return;
|
|
17420
|
+
}
|
|
17421
|
+
setNotConnected(false);
|
|
17422
|
+
setOpps(json.opportunities || []);
|
|
17423
|
+
} catch (e) {
|
|
17424
|
+
setError(e instanceof Error ? e.message : "Network error");
|
|
17425
|
+
} finally {
|
|
17426
|
+
setLoading(false);
|
|
17427
|
+
}
|
|
17428
|
+
}, []);
|
|
17429
|
+
React4.useEffect(() => {
|
|
17430
|
+
void load();
|
|
17431
|
+
}, [load]);
|
|
17432
|
+
const setRow = (url, patch) => setState((p) => ({ ...p, [url]: { ...p[url], ...patch } }));
|
|
17433
|
+
const optimize = async (o) => {
|
|
17434
|
+
if (!o.doc) return;
|
|
17435
|
+
setRow(o.url, { busy: true, error: void 0 });
|
|
17436
|
+
try {
|
|
17437
|
+
const res = await fetch("/api/seo-plugin/ai-optimize", {
|
|
17438
|
+
method: "POST",
|
|
17439
|
+
credentials: "include",
|
|
17440
|
+
headers: { "Content-Type": "application/json" },
|
|
17441
|
+
body: JSON.stringify({ collection: o.doc.collection, id: o.doc.id })
|
|
17442
|
+
});
|
|
17443
|
+
const json = await res.json();
|
|
17444
|
+
if (!res.ok) {
|
|
17445
|
+
setRow(o.url, { busy: false, error: json.code === "no_api_key" ? s.noKey : json.error || `Error ${res.status}` });
|
|
17446
|
+
return;
|
|
17447
|
+
}
|
|
17448
|
+
setRow(o.url, { busy: false, suggestion: { ...json.suggestions, current: json.current } });
|
|
17449
|
+
} catch (e) {
|
|
17450
|
+
setRow(o.url, { busy: false, error: e instanceof Error ? e.message : "Network error" });
|
|
17451
|
+
}
|
|
17452
|
+
};
|
|
17453
|
+
const apply = async (o) => {
|
|
17454
|
+
const rs = state[o.url];
|
|
17455
|
+
if (!o.doc || !rs?.suggestion) return;
|
|
17456
|
+
setRow(o.url, { busy: true, error: void 0 });
|
|
17457
|
+
const patch = {};
|
|
17458
|
+
if (rs.suggestion.metaTitle || rs.suggestion.metaDescription) {
|
|
17459
|
+
patch.meta = { title: rs.suggestion.metaTitle, description: rs.suggestion.metaDescription };
|
|
17460
|
+
}
|
|
17461
|
+
if (rs.suggestion.focusKeyword && rs.suggestion.focusKeyword !== rs.suggestion.current?.focusKeyword) {
|
|
17462
|
+
patch.focusKeyword = rs.suggestion.focusKeyword;
|
|
17463
|
+
}
|
|
17464
|
+
try {
|
|
17465
|
+
await fetch(`/api/${o.doc.collection}/${o.doc.id}`, {
|
|
17466
|
+
method: "PATCH",
|
|
17467
|
+
credentials: "include",
|
|
17468
|
+
headers: { "Content-Type": "application/json" },
|
|
17469
|
+
body: JSON.stringify(patch)
|
|
17470
|
+
});
|
|
17471
|
+
setRow(o.url, { busy: false, applied: true });
|
|
17472
|
+
} catch (e) {
|
|
17473
|
+
setRow(o.url, { busy: false, error: e instanceof Error ? e.message : "Network error" });
|
|
17474
|
+
}
|
|
17475
|
+
};
|
|
17476
|
+
const card = { padding: 16, borderRadius: 12, border: `1px solid ${C7.border}`, backgroundColor: C7.card, marginBottom: 20 };
|
|
17477
|
+
const btn = (bg) => ({
|
|
17478
|
+
padding: "5px 10px",
|
|
17479
|
+
borderRadius: 6,
|
|
17480
|
+
border: `1px solid ${bg}`,
|
|
17481
|
+
backgroundColor: bg,
|
|
17482
|
+
color: "#fff",
|
|
17483
|
+
fontSize: 11,
|
|
17484
|
+
fontWeight: 700,
|
|
17485
|
+
cursor: "pointer"
|
|
17486
|
+
});
|
|
17487
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: card, children: [
|
|
17488
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 8, flexWrap: "wrap" }, children: [
|
|
17489
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
17490
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 16, fontWeight: 800, color: C7.text }, children: s.title }),
|
|
17491
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: C7.sub, marginTop: 2 }, children: s.subtitle })
|
|
17492
|
+
] }),
|
|
17493
|
+
!notConnected && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => void load(), style: btn(C7.sub), children: s.refresh })
|
|
17494
|
+
] }),
|
|
17495
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: C7.red, fontSize: 13, fontWeight: 600, marginTop: 10 }, children: error }),
|
|
17496
|
+
notConnected && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 12, fontSize: 13, color: C7.sub }, children: s.needGsc }),
|
|
17497
|
+
loading && !notConnected && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 12, fontSize: 13, color: C7.sub }, children: s.loading }),
|
|
17498
|
+
!loading && !notConnected && opps && opps.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 12, fontSize: 13, color: C7.sub }, children: s.none }),
|
|
17499
|
+
!notConnected && opps && opps.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto", marginTop: 12 }, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse", fontSize: 12 }, children: [
|
|
17500
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { style: { textAlign: "left", color: C7.sub }, children: [
|
|
17501
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { style: { padding: "6px 8px" }, children: s.page }),
|
|
17502
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { style: { padding: "6px 8px", textAlign: "right" }, children: s.pos }),
|
|
17503
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { style: { padding: "6px 8px", textAlign: "right" }, children: s.ctr }),
|
|
17504
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { style: { padding: "6px 8px", textAlign: "right" }, children: s.potential }),
|
|
17505
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { style: { padding: "6px 8px" } })
|
|
17506
|
+
] }) }),
|
|
17507
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: opps.slice(0, 50).map((o) => {
|
|
17508
|
+
const rs = state[o.url] || {};
|
|
17509
|
+
const path = (() => {
|
|
17510
|
+
try {
|
|
17511
|
+
return new URL(o.url).pathname;
|
|
17512
|
+
} catch {
|
|
17513
|
+
return o.url;
|
|
17514
|
+
}
|
|
17515
|
+
})();
|
|
17516
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React4__default.default.Fragment, { children: [
|
|
17517
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { style: { borderTop: `1px solid ${C7.border}`, color: C7.text }, children: [
|
|
17518
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "6px 8px", maxWidth: 320, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: path }),
|
|
17519
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "6px 8px", textAlign: "right" }, children: o.position.toFixed(1) }),
|
|
17520
|
+
/* @__PURE__ */ jsxRuntime.jsxs("td", { style: { padding: "6px 8px", textAlign: "right" }, children: [
|
|
17521
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { color: C7.red }, children: [
|
|
17522
|
+
(o.ctr * 100).toFixed(1),
|
|
17523
|
+
"%"
|
|
17524
|
+
] }),
|
|
17525
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { color: C7.sub }, children: [
|
|
17526
|
+
" / ",
|
|
17527
|
+
(o.expectedCtr * 100).toFixed(0),
|
|
17528
|
+
"% ",
|
|
17529
|
+
s.expected
|
|
17530
|
+
] })
|
|
17531
|
+
] }),
|
|
17532
|
+
/* @__PURE__ */ jsxRuntime.jsxs("td", { style: { padding: "6px 8px", textAlign: "right", fontWeight: 700, color: C7.amber }, children: [
|
|
17533
|
+
"+",
|
|
17534
|
+
o.potentialClicks
|
|
17535
|
+
] }),
|
|
17536
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "6px 8px", textAlign: "right" }, children: rs.applied ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 11, fontWeight: 700, color: C7.green }, children: s.applied }) : o.doc ? rs.suggestion ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => void apply(o), disabled: rs.busy, style: btn(C7.green), children: rs.busy ? s.optimizing : s.apply }) : /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => void optimize(o), disabled: rs.busy, style: btn(C7.violet), children: rs.busy ? s.optimizing : `\u2728 ${s.optimize}` }) : /* @__PURE__ */ jsxRuntime.jsxs("a", { href: o.url, target: "_blank", rel: "noopener noreferrer", style: { fontSize: 11, color: C7.sub }, children: [
|
|
17537
|
+
s.open,
|
|
17538
|
+
" \u2197"
|
|
17539
|
+
] }) })
|
|
17540
|
+
] }),
|
|
17541
|
+
rs.suggestion && !rs.applied && /* @__PURE__ */ jsxRuntime.jsx("tr", { style: { color: C7.text }, children: /* @__PURE__ */ jsxRuntime.jsxs("td", { colSpan: 5, style: { padding: "0 8px 8px 8px" }, children: [
|
|
17542
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: C7.green, fontWeight: 600 }, children: rs.suggestion.metaTitle }),
|
|
17543
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: C7.sub }, children: rs.suggestion.metaDescription })
|
|
17544
|
+
] }) }),
|
|
17545
|
+
rs.error && /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: 5, style: { padding: "0 8px 6px 8px", fontSize: 11, color: C7.red }, children: rs.error }) })
|
|
17546
|
+
] }, o.url);
|
|
17547
|
+
}) })
|
|
17548
|
+
] }) })
|
|
17549
|
+
] });
|
|
17550
|
+
}
|
|
17551
|
+
var C8 = {
|
|
17552
|
+
text: "var(--theme-text, #1a1a1a)",
|
|
17553
|
+
sub: "var(--theme-elevation-600, #6b7280)",
|
|
17554
|
+
card: "var(--theme-elevation-50, #f9fafb)",
|
|
17555
|
+
border: "var(--theme-elevation-200, #e5e7eb)",
|
|
17556
|
+
green: "#22c55e",
|
|
17557
|
+
red: "#ef4444",
|
|
17558
|
+
amber: "#f59e0b",
|
|
17559
|
+
blue: "#3b82f6"
|
|
17560
|
+
};
|
|
17561
|
+
var S5 = {
|
|
17224
17562
|
fr: {
|
|
17225
17563
|
title: "Monitoring & alertes",
|
|
17226
17564
|
subtitle: "Digest p\xE9riodique : r\xE9gressions de score, nouveaux 404, chutes de position (webhook / email).",
|
|
@@ -17263,7 +17601,7 @@ var S4 = {
|
|
|
17263
17601
|
}
|
|
17264
17602
|
};
|
|
17265
17603
|
function AlertsPanel({ locale }) {
|
|
17266
|
-
const s =
|
|
17604
|
+
const s = S5[locale] ?? S5.fr;
|
|
17267
17605
|
const [digest, setDigest] = React4.useState(null);
|
|
17268
17606
|
const [config, setConfig] = React4.useState(null);
|
|
17269
17607
|
const [loading, setLoading] = React4.useState(true);
|
|
@@ -17318,15 +17656,15 @@ function AlertsPanel({ locale }) {
|
|
|
17318
17656
|
const card = {
|
|
17319
17657
|
padding: 16,
|
|
17320
17658
|
borderRadius: 12,
|
|
17321
|
-
border: `1px solid ${
|
|
17322
|
-
backgroundColor:
|
|
17659
|
+
border: `1px solid ${C8.border}`,
|
|
17660
|
+
backgroundColor: C8.card,
|
|
17323
17661
|
marginBottom: 20
|
|
17324
17662
|
};
|
|
17325
17663
|
const btn = {
|
|
17326
17664
|
padding: "8px 12px",
|
|
17327
17665
|
borderRadius: 8,
|
|
17328
|
-
border: `1px solid ${
|
|
17329
|
-
backgroundColor:
|
|
17666
|
+
border: `1px solid ${C8.blue}`,
|
|
17667
|
+
backgroundColor: C8.blue,
|
|
17330
17668
|
color: "#fff",
|
|
17331
17669
|
fontSize: 12,
|
|
17332
17670
|
fontWeight: 700,
|
|
@@ -17339,32 +17677,32 @@ function AlertsPanel({ locale }) {
|
|
|
17339
17677
|
padding: "3px 8px",
|
|
17340
17678
|
borderRadius: 999,
|
|
17341
17679
|
color: "#fff",
|
|
17342
|
-
backgroundColor: ok ?
|
|
17680
|
+
backgroundColor: ok ? C8.green : C8.sub,
|
|
17343
17681
|
marginRight: 6
|
|
17344
17682
|
});
|
|
17345
17683
|
const hasChannel = config && (config.webhookConfigured || config.emailConfigured);
|
|
17346
17684
|
const list = (title, rows) => rows.length ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: 10 }, children: [
|
|
17347
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 12, fontWeight: 700, color:
|
|
17685
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 12, fontWeight: 700, color: C8.text, marginBottom: 4 }, children: [
|
|
17348
17686
|
title,
|
|
17349
17687
|
" ",
|
|
17350
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { color:
|
|
17688
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { color: C8.amber }, children: [
|
|
17351
17689
|
"(",
|
|
17352
17690
|
rows.length,
|
|
17353
17691
|
")"
|
|
17354
17692
|
] })
|
|
17355
17693
|
] }),
|
|
17356
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 12, color:
|
|
17694
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 12, color: C8.sub, lineHeight: 1.6 }, children: rows.slice(0, 8).map((r, i) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: r }, i)) })
|
|
17357
17695
|
] }) : null;
|
|
17358
17696
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: card, children: [
|
|
17359
17697
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8, flexWrap: "wrap" }, children: [
|
|
17360
17698
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
17361
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 16, fontWeight: 800, color:
|
|
17362
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color:
|
|
17699
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 16, fontWeight: 800, color: C8.text }, children: s.title }),
|
|
17700
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: C8.sub, marginTop: 2 }, children: s.subtitle })
|
|
17363
17701
|
] }),
|
|
17364
17702
|
hasChannel && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: sendNow, disabled: busy, style: btn, children: busy ? s.sending : s.sendNow })
|
|
17365
17703
|
] }),
|
|
17366
|
-
error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color:
|
|
17367
|
-
notice && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color:
|
|
17704
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: C8.red, fontSize: 13, fontWeight: 600, marginTop: 10 }, children: error }),
|
|
17705
|
+
notice && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: C8.green, fontSize: 13, fontWeight: 600, marginTop: 10 }, children: notice }),
|
|
17368
17706
|
config && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: 12 }, children: [
|
|
17369
17707
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: chip(config.webhookConfigured, s.webhook), children: [
|
|
17370
17708
|
s.webhook,
|
|
@@ -17377,15 +17715,15 @@ function AlertsPanel({ locale }) {
|
|
|
17377
17715
|
config.emailConfigured ? s.configured : s.missing
|
|
17378
17716
|
] })
|
|
17379
17717
|
] }),
|
|
17380
|
-
!loading && !hasChannel && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 12, fontSize: 13, color:
|
|
17381
|
-
loading && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 12, fontSize: 13, color:
|
|
17718
|
+
!loading && !hasChannel && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 12, fontSize: 13, color: C8.sub }, children: s.notConfigured }),
|
|
17719
|
+
loading && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 12, fontSize: 13, color: C8.sub }, children: s.loading }),
|
|
17382
17720
|
digest && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: 8 }, children: [
|
|
17383
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 12, color:
|
|
17721
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 12, color: C8.sub, marginTop: 6 }, children: [
|
|
17384
17722
|
digest.totalIssues,
|
|
17385
17723
|
" ",
|
|
17386
17724
|
s.issues
|
|
17387
17725
|
] }),
|
|
17388
|
-
digest.totalIssues === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 8, fontSize: 13, color:
|
|
17726
|
+
digest.totalIssues === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 8, fontSize: 13, color: C8.sub }, children: s.noIssues }),
|
|
17389
17727
|
list(
|
|
17390
17728
|
s.scoreReg,
|
|
17391
17729
|
digest.scoreRegressions.map((r) => `${r.collection}/${r.documentId} \u2014 ${r.from} \u2192 ${r.to} (\u2212${r.drop})`)
|
|
@@ -17395,7 +17733,7 @@ function AlertsPanel({ locale }) {
|
|
|
17395
17733
|
] })
|
|
17396
17734
|
] });
|
|
17397
17735
|
}
|
|
17398
|
-
var
|
|
17736
|
+
var C9 = {
|
|
17399
17737
|
text: "var(--theme-text, #1a1a1a)",
|
|
17400
17738
|
sub: "var(--theme-elevation-600, #6b7280)",
|
|
17401
17739
|
card: "var(--theme-elevation-50, #f9fafb)",
|
|
@@ -17405,7 +17743,7 @@ var C8 = {
|
|
|
17405
17743
|
red: "#ef4444",
|
|
17406
17744
|
violet: "#7c3aed"
|
|
17407
17745
|
};
|
|
17408
|
-
var
|
|
17746
|
+
var S6 = {
|
|
17409
17747
|
fr: {
|
|
17410
17748
|
title: "Alt-text IA des images",
|
|
17411
17749
|
subtitle: "G\xE9n\xE8re l'attribut alt des images qui n'en ont pas (Claude vision), pour l'accessibilit\xE9 et le SEO.",
|
|
@@ -17438,7 +17776,7 @@ var S5 = {
|
|
|
17438
17776
|
}
|
|
17439
17777
|
};
|
|
17440
17778
|
function AltTextPanel({ locale }) {
|
|
17441
|
-
const s =
|
|
17779
|
+
const s = S6[locale] ?? S6.fr;
|
|
17442
17780
|
const [items, setItems] = React4.useState(null);
|
|
17443
17781
|
const [collection, setCollection] = React4.useState("media");
|
|
17444
17782
|
const [missingCount, setMissingCount] = React4.useState(0);
|
|
@@ -17515,8 +17853,8 @@ function AltTextPanel({ locale }) {
|
|
|
17515
17853
|
const card = {
|
|
17516
17854
|
padding: 16,
|
|
17517
17855
|
borderRadius: 12,
|
|
17518
|
-
border: `1px solid ${
|
|
17519
|
-
backgroundColor:
|
|
17856
|
+
border: `1px solid ${C9.border}`,
|
|
17857
|
+
backgroundColor: C9.card,
|
|
17520
17858
|
marginBottom: 20
|
|
17521
17859
|
};
|
|
17522
17860
|
const btn = (bg) => ({
|
|
@@ -17532,18 +17870,18 @@ function AltTextPanel({ locale }) {
|
|
|
17532
17870
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: card, children: [
|
|
17533
17871
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8, flexWrap: "wrap" }, children: [
|
|
17534
17872
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
17535
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 16, fontWeight: 800, color:
|
|
17536
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color:
|
|
17873
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 16, fontWeight: 800, color: C9.text }, children: s.title }),
|
|
17874
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: C9.sub, marginTop: 2 }, children: s.subtitle })
|
|
17537
17875
|
] }),
|
|
17538
|
-
status === "ok" && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => void load(), style: btn(
|
|
17876
|
+
status === "ok" && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => void load(), style: btn(C9.sub), children: s.refresh })
|
|
17539
17877
|
] }),
|
|
17540
|
-
status === "forbidden" && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 12, fontSize: 13, color:
|
|
17541
|
-
status === "disabled" && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 12, fontSize: 13, color:
|
|
17878
|
+
status === "forbidden" && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 12, fontSize: 13, color: C9.sub }, children: s.forbidden }),
|
|
17879
|
+
status === "disabled" && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 12, fontSize: 13, color: C9.sub }, children: s.disabled }),
|
|
17542
17880
|
status === "ok" && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: 12 }, children: [
|
|
17543
|
-
loading && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 13, color:
|
|
17544
|
-
!loading && items && items.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 13, color:
|
|
17881
|
+
loading && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 13, color: C9.sub }, children: s.loading }),
|
|
17882
|
+
!loading && items && items.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 13, color: C9.sub }, children: s.none }),
|
|
17545
17883
|
!loading && items && items.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17546
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 12, color:
|
|
17884
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 12, color: C9.sub, marginBottom: 10 }, children: [
|
|
17547
17885
|
missingCount,
|
|
17548
17886
|
" ",
|
|
17549
17887
|
s.missing
|
|
@@ -17559,8 +17897,8 @@ function AltTextPanel({ locale }) {
|
|
|
17559
17897
|
alignItems: "center",
|
|
17560
17898
|
padding: 8,
|
|
17561
17899
|
borderRadius: 8,
|
|
17562
|
-
border: `1px solid ${
|
|
17563
|
-
backgroundColor:
|
|
17900
|
+
border: `1px solid ${C9.border}`,
|
|
17901
|
+
backgroundColor: C9.bg
|
|
17564
17902
|
},
|
|
17565
17903
|
children: [
|
|
17566
17904
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17568,11 +17906,11 @@ function AltTextPanel({ locale }) {
|
|
|
17568
17906
|
{
|
|
17569
17907
|
src: item.url,
|
|
17570
17908
|
alt: "",
|
|
17571
|
-
style: { width: 48, height: 48, objectFit: "cover", borderRadius: 6, flexShrink: 0, border: `1px solid ${
|
|
17909
|
+
style: { width: 48, height: 48, objectFit: "cover", borderRadius: 6, flexShrink: 0, border: `1px solid ${C9.border}` }
|
|
17572
17910
|
}
|
|
17573
17911
|
),
|
|
17574
17912
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
17575
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color:
|
|
17913
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: C9.sub, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: item.filename }),
|
|
17576
17914
|
rs.alt !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17577
17915
|
"input",
|
|
17578
17916
|
{
|
|
@@ -17586,15 +17924,15 @@ function AltTextPanel({ locale }) {
|
|
|
17586
17924
|
padding: "4px 8px",
|
|
17587
17925
|
fontSize: 12,
|
|
17588
17926
|
borderRadius: 6,
|
|
17589
|
-
border: `1px solid ${
|
|
17590
|
-
backgroundColor:
|
|
17591
|
-
color:
|
|
17927
|
+
border: `1px solid ${C9.border}`,
|
|
17928
|
+
backgroundColor: C9.bg,
|
|
17929
|
+
color: C9.text
|
|
17592
17930
|
}
|
|
17593
17931
|
}
|
|
17594
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color:
|
|
17595
|
-
rs.error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color:
|
|
17932
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: C9.sub, marginTop: 4, fontStyle: "italic" }, children: "\u2014" }),
|
|
17933
|
+
rs.error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: C9.red, marginTop: 2 }, children: rs.error })
|
|
17596
17934
|
] }),
|
|
17597
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flexShrink: 0 }, children: rs.applied ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 11, fontWeight: 700, color:
|
|
17935
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flexShrink: 0 }, children: rs.applied ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 11, fontWeight: 700, color: C9.green }, children: s.applied }) : rs.alt !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => void apply(item), disabled: rs.busy, style: btn(C9.green), children: rs.busy ? s.generating : s.apply }) : /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => void generate(item), disabled: rs.busy, style: btn(C9.violet), children: rs.busy ? s.generating : s.generate }) })
|
|
17598
17936
|
]
|
|
17599
17937
|
},
|
|
17600
17938
|
item.id
|
|
@@ -18019,6 +18357,7 @@ function PerformanceView() {
|
|
|
18019
18357
|
/* @__PURE__ */ jsxRuntime.jsx(CoreWebVitalsPanel, { locale }),
|
|
18020
18358
|
/* @__PURE__ */ jsxRuntime.jsx(GscPanel, { locale }),
|
|
18021
18359
|
/* @__PURE__ */ jsxRuntime.jsx(RankTrackingPanel, { locale }),
|
|
18360
|
+
/* @__PURE__ */ jsxRuntime.jsx(CtrOpportunitiesPanel, { locale }),
|
|
18022
18361
|
/* @__PURE__ */ jsxRuntime.jsx(AlertsPanel, { locale }),
|
|
18023
18362
|
/* @__PURE__ */ jsxRuntime.jsx(AltTextPanel, { locale }),
|
|
18024
18363
|
showImport && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -18544,7 +18883,7 @@ function PerformanceView() {
|
|
|
18544
18883
|
}
|
|
18545
18884
|
);
|
|
18546
18885
|
}
|
|
18547
|
-
var
|
|
18886
|
+
var C10 = {
|
|
18548
18887
|
text: "var(--theme-text, #1a1a1a)",
|
|
18549
18888
|
sub: "var(--theme-elevation-600, #6b7280)",
|
|
18550
18889
|
card: "var(--theme-elevation-50, #f9fafb)",
|
|
@@ -18554,7 +18893,7 @@ var C9 = {
|
|
|
18554
18893
|
red: "#ef4444",
|
|
18555
18894
|
blue: "#3b82f6"
|
|
18556
18895
|
};
|
|
18557
|
-
var
|
|
18896
|
+
var S7 = {
|
|
18558
18897
|
fr: {
|
|
18559
18898
|
title: "Brief de contenu IA",
|
|
18560
18899
|
subtitle: "G\xE9n\xE8re un plan r\xE9dactionnel optimis\xE9 pour un mot-cl\xE9 (plan, entit\xE9s, questions, longueur cible).",
|
|
@@ -18589,7 +18928,7 @@ var S6 = {
|
|
|
18589
18928
|
}
|
|
18590
18929
|
};
|
|
18591
18930
|
function ContentBriefPanel({ locale }) {
|
|
18592
|
-
const s =
|
|
18931
|
+
const s = S7[locale] ?? S7.fr;
|
|
18593
18932
|
const [keyword, setKeyword] = React4.useState("");
|
|
18594
18933
|
const [brief, setBrief] = React4.useState(null);
|
|
18595
18934
|
const [busy, setBusy] = React4.useState(false);
|
|
@@ -18625,8 +18964,8 @@ function ContentBriefPanel({ locale }) {
|
|
|
18625
18964
|
const card = {
|
|
18626
18965
|
padding: 16,
|
|
18627
18966
|
borderRadius: 12,
|
|
18628
|
-
border: `1px solid ${
|
|
18629
|
-
backgroundColor:
|
|
18967
|
+
border: `1px solid ${C10.border}`,
|
|
18968
|
+
backgroundColor: C10.card,
|
|
18630
18969
|
marginBottom: 20
|
|
18631
18970
|
};
|
|
18632
18971
|
const chip = {
|
|
@@ -18635,14 +18974,14 @@ function ContentBriefPanel({ locale }) {
|
|
|
18635
18974
|
padding: "3px 8px",
|
|
18636
18975
|
borderRadius: 999,
|
|
18637
18976
|
backgroundColor: "rgba(59,130,246,0.12)",
|
|
18638
|
-
color:
|
|
18639
|
-
border: `1px solid ${
|
|
18977
|
+
color: C10.blue,
|
|
18978
|
+
border: `1px solid ${C10.border}`,
|
|
18640
18979
|
margin: "0 6px 6px 0"
|
|
18641
18980
|
};
|
|
18642
|
-
const h4 = { fontSize: 12, fontWeight: 800, color:
|
|
18981
|
+
const h4 = { fontSize: 12, fontWeight: 800, color: C10.text, margin: "14px 0 6px", textTransform: "uppercase" };
|
|
18643
18982
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: card, children: [
|
|
18644
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 16, fontWeight: 800, color:
|
|
18645
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color:
|
|
18983
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 16, fontWeight: 800, color: C10.text }, children: s.title }),
|
|
18984
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: C10.sub, marginTop: 2, marginBottom: 12 }, children: s.subtitle }),
|
|
18646
18985
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 8, flexWrap: "wrap" }, children: [
|
|
18647
18986
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18648
18987
|
"input",
|
|
@@ -18659,9 +18998,9 @@ function ContentBriefPanel({ locale }) {
|
|
|
18659
18998
|
padding: "8px 12px",
|
|
18660
18999
|
fontSize: 13,
|
|
18661
19000
|
borderRadius: 8,
|
|
18662
|
-
border: `1px solid ${
|
|
18663
|
-
backgroundColor:
|
|
18664
|
-
color:
|
|
19001
|
+
border: `1px solid ${C10.border}`,
|
|
19002
|
+
backgroundColor: C10.bg,
|
|
19003
|
+
color: C10.text
|
|
18665
19004
|
}
|
|
18666
19005
|
}
|
|
18667
19006
|
),
|
|
@@ -18674,8 +19013,8 @@ function ContentBriefPanel({ locale }) {
|
|
|
18674
19013
|
style: {
|
|
18675
19014
|
padding: "8px 14px",
|
|
18676
19015
|
borderRadius: 8,
|
|
18677
|
-
border: `1px solid ${
|
|
18678
|
-
backgroundColor:
|
|
19016
|
+
border: `1px solid ${C10.violet}`,
|
|
19017
|
+
backgroundColor: C10.violet,
|
|
18679
19018
|
color: "#fff",
|
|
18680
19019
|
fontSize: 12,
|
|
18681
19020
|
fontWeight: 700,
|
|
@@ -18686,12 +19025,12 @@ function ContentBriefPanel({ locale }) {
|
|
|
18686
19025
|
}
|
|
18687
19026
|
)
|
|
18688
19027
|
] }),
|
|
18689
|
-
error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color:
|
|
19028
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: C10.red, fontSize: 13, fontWeight: 600, marginTop: 10 }, children: error }),
|
|
18690
19029
|
brief && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: 8 }, children: [
|
|
18691
|
-
brief.recommendedWordCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 12, color:
|
|
19030
|
+
brief.recommendedWordCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 12, color: C10.sub, marginTop: 10 }, children: [
|
|
18692
19031
|
s.words,
|
|
18693
19032
|
": ",
|
|
18694
|
-
/* @__PURE__ */ jsxRuntime.jsxs("b", { style: { color:
|
|
19033
|
+
/* @__PURE__ */ jsxRuntime.jsxs("b", { style: { color: C10.text }, children: [
|
|
18695
19034
|
"~",
|
|
18696
19035
|
brief.recommendedWordCount,
|
|
18697
19036
|
" ",
|
|
@@ -18700,7 +19039,7 @@ function ContentBriefPanel({ locale }) {
|
|
|
18700
19039
|
] }),
|
|
18701
19040
|
brief.outline.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18702
19041
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: h4, children: s.outline }),
|
|
18703
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 13, color:
|
|
19042
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 13, color: C10.text, lineHeight: 1.6 }, children: brief.outline.map((o, i) => /* @__PURE__ */ jsxRuntime.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)) })
|
|
18704
19043
|
] }),
|
|
18705
19044
|
brief.entities.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18706
19045
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: h4, children: s.entities }),
|
|
@@ -18708,7 +19047,7 @@ function ContentBriefPanel({ locale }) {
|
|
|
18708
19047
|
] }),
|
|
18709
19048
|
brief.questions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18710
19049
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: h4, children: s.questions }),
|
|
18711
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 13, color:
|
|
19050
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 13, color: C10.text, lineHeight: 1.6 }, children: brief.questions.map((q, i) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: q }, i)) })
|
|
18712
19051
|
] }),
|
|
18713
19052
|
brief.internalLinkIdeas.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18714
19053
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: h4, children: s.links }),
|
|
@@ -18716,7 +19055,7 @@ function ContentBriefPanel({ locale }) {
|
|
|
18716
19055
|
] }),
|
|
18717
19056
|
brief.notes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18718
19057
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: h4, children: s.notes }),
|
|
18719
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 12, color:
|
|
19058
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { style: { margin: 0, paddingLeft: 18, fontSize: 12, color: C10.sub, lineHeight: 1.6 }, children: brief.notes.map((n, i) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: n }, i)) })
|
|
18720
19059
|
] })
|
|
18721
19060
|
] })
|
|
18722
19061
|
] });
|
|
@@ -19858,7 +20197,7 @@ var controlBtnStyle = {
|
|
|
19858
20197
|
cursor: "pointer",
|
|
19859
20198
|
lineHeight: 1.4
|
|
19860
20199
|
};
|
|
19861
|
-
var
|
|
20200
|
+
var C11 = {
|
|
19862
20201
|
cyan: "#00E5FF",
|
|
19863
20202
|
black: "#000",
|
|
19864
20203
|
green: "#22c55e",
|
|
@@ -19873,10 +20212,10 @@ var C10 = {
|
|
|
19873
20212
|
var TITLE_MIN = 30;
|
|
19874
20213
|
var TITLE_MAX = 60;
|
|
19875
20214
|
function getCharColor(len) {
|
|
19876
|
-
if (len === 0) return
|
|
19877
|
-
if (len >= TITLE_MIN && len <= TITLE_MAX) return
|
|
19878
|
-
if (len > 0 && len < TITLE_MIN) return
|
|
19879
|
-
return
|
|
20215
|
+
if (len === 0) return C11.textSecondary;
|
|
20216
|
+
if (len >= TITLE_MIN && len <= TITLE_MAX) return C11.green;
|
|
20217
|
+
if (len > 0 && len < TITLE_MIN) return C11.orange;
|
|
20218
|
+
return C11.red;
|
|
19880
20219
|
}
|
|
19881
20220
|
function getProgressPercent(len) {
|
|
19882
20221
|
if (len === 0) return 0;
|
|
@@ -19884,9 +20223,9 @@ function getProgressPercent(len) {
|
|
|
19884
20223
|
}
|
|
19885
20224
|
function getProgressColor(len) {
|
|
19886
20225
|
if (len === 0) return "var(--theme-elevation-200, #e5e7eb)";
|
|
19887
|
-
if (len >= TITLE_MIN && len <= TITLE_MAX) return
|
|
19888
|
-
if (len < TITLE_MIN) return
|
|
19889
|
-
return
|
|
20226
|
+
if (len >= TITLE_MIN && len <= TITLE_MAX) return C11.green;
|
|
20227
|
+
if (len < TITLE_MIN) return C11.orange;
|
|
20228
|
+
return C11.red;
|
|
19890
20229
|
}
|
|
19891
20230
|
function MetaTitleField({
|
|
19892
20231
|
path,
|
|
@@ -19957,7 +20296,7 @@ function MetaTitleField({
|
|
|
19957
20296
|
style: {
|
|
19958
20297
|
fontSize: 13,
|
|
19959
20298
|
fontWeight: 700,
|
|
19960
|
-
color:
|
|
20299
|
+
color: C11.textPrimary
|
|
19961
20300
|
},
|
|
19962
20301
|
children: t.metaTitle.label
|
|
19963
20302
|
}
|
|
@@ -19997,9 +20336,9 @@ function MetaTitleField({
|
|
|
19997
20336
|
fontSize: 14,
|
|
19998
20337
|
fontFamily: "inherit",
|
|
19999
20338
|
borderRadius: 8,
|
|
20000
|
-
border: `2px solid ${
|
|
20001
|
-
backgroundColor:
|
|
20002
|
-
color:
|
|
20339
|
+
border: `2px solid ${C11.border}`,
|
|
20340
|
+
backgroundColor: C11.surfaceBg,
|
|
20341
|
+
color: C11.textPrimary,
|
|
20003
20342
|
outline: "none",
|
|
20004
20343
|
boxShadow: "2px 2px 0 0 var(--theme-border-color, rgba(0,0,0,1))"
|
|
20005
20344
|
}
|
|
@@ -20017,9 +20356,9 @@ function MetaTitleField({
|
|
|
20017
20356
|
gap: 5,
|
|
20018
20357
|
padding: "8px 14px",
|
|
20019
20358
|
borderRadius: 8,
|
|
20020
|
-
border: `2px solid ${
|
|
20021
|
-
backgroundColor: loading ?
|
|
20022
|
-
color: loading ?
|
|
20359
|
+
border: `2px solid ${C11.border}`,
|
|
20360
|
+
backgroundColor: loading ? C11.surface50 : C11.cyan,
|
|
20361
|
+
color: loading ? C11.textSecondary : C11.black,
|
|
20023
20362
|
fontWeight: 800,
|
|
20024
20363
|
fontSize: 11,
|
|
20025
20364
|
textTransform: "uppercase",
|
|
@@ -20066,7 +20405,7 @@ function MetaTitleField({
|
|
|
20066
20405
|
justifyContent: "space-between",
|
|
20067
20406
|
marginTop: 4,
|
|
20068
20407
|
fontSize: 10,
|
|
20069
|
-
color:
|
|
20408
|
+
color: C11.textSecondary
|
|
20070
20409
|
},
|
|
20071
20410
|
children: [
|
|
20072
20411
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
@@ -20100,9 +20439,9 @@ function MetaTitleField({
|
|
|
20100
20439
|
borderRadius: 6,
|
|
20101
20440
|
fontSize: 11,
|
|
20102
20441
|
fontWeight: 600,
|
|
20103
|
-
color:
|
|
20442
|
+
color: C11.red,
|
|
20104
20443
|
backgroundColor: "rgba(239,68,68,0.08)",
|
|
20105
|
-
border: `1px solid ${
|
|
20444
|
+
border: `1px solid ${C11.red}`
|
|
20106
20445
|
},
|
|
20107
20446
|
children: error
|
|
20108
20447
|
}
|
|
@@ -20111,7 +20450,7 @@ function MetaTitleField({
|
|
|
20111
20450
|
}
|
|
20112
20451
|
);
|
|
20113
20452
|
}
|
|
20114
|
-
var
|
|
20453
|
+
var C12 = {
|
|
20115
20454
|
cyan: "#00E5FF",
|
|
20116
20455
|
black: "#000",
|
|
20117
20456
|
green: "#22c55e",
|
|
@@ -20126,10 +20465,10 @@ var C11 = {
|
|
|
20126
20465
|
var DESC_MIN = 120;
|
|
20127
20466
|
var DESC_MAX = 160;
|
|
20128
20467
|
function getCharColor2(len) {
|
|
20129
|
-
if (len === 0) return
|
|
20130
|
-
if (len >= DESC_MIN && len <= DESC_MAX) return
|
|
20131
|
-
if (len > 0 && len < DESC_MIN) return
|
|
20132
|
-
return
|
|
20468
|
+
if (len === 0) return C12.textSecondary;
|
|
20469
|
+
if (len >= DESC_MIN && len <= DESC_MAX) return C12.green;
|
|
20470
|
+
if (len > 0 && len < DESC_MIN) return C12.orange;
|
|
20471
|
+
return C12.red;
|
|
20133
20472
|
}
|
|
20134
20473
|
function getProgressPercent2(len) {
|
|
20135
20474
|
if (len === 0) return 0;
|
|
@@ -20137,9 +20476,9 @@ function getProgressPercent2(len) {
|
|
|
20137
20476
|
}
|
|
20138
20477
|
function getProgressColor2(len) {
|
|
20139
20478
|
if (len === 0) return "var(--theme-elevation-200, #e5e7eb)";
|
|
20140
|
-
if (len >= DESC_MIN && len <= DESC_MAX) return
|
|
20141
|
-
if (len < DESC_MIN) return
|
|
20142
|
-
return
|
|
20479
|
+
if (len >= DESC_MIN && len <= DESC_MAX) return C12.green;
|
|
20480
|
+
if (len < DESC_MIN) return C12.orange;
|
|
20481
|
+
return C12.red;
|
|
20143
20482
|
}
|
|
20144
20483
|
function MetaDescriptionField({
|
|
20145
20484
|
path,
|
|
@@ -20210,7 +20549,7 @@ function MetaDescriptionField({
|
|
|
20210
20549
|
style: {
|
|
20211
20550
|
fontSize: 13,
|
|
20212
20551
|
fontWeight: 700,
|
|
20213
|
-
color:
|
|
20552
|
+
color: C12.textPrimary
|
|
20214
20553
|
},
|
|
20215
20554
|
children: t.metaDescription.label
|
|
20216
20555
|
}
|
|
@@ -20250,9 +20589,9 @@ function MetaDescriptionField({
|
|
|
20250
20589
|
fontSize: 14,
|
|
20251
20590
|
fontFamily: "inherit",
|
|
20252
20591
|
borderRadius: 8,
|
|
20253
|
-
border: `2px solid ${
|
|
20254
|
-
backgroundColor:
|
|
20255
|
-
color:
|
|
20592
|
+
border: `2px solid ${C12.border}`,
|
|
20593
|
+
backgroundColor: C12.surfaceBg,
|
|
20594
|
+
color: C12.textPrimary,
|
|
20256
20595
|
outline: "none",
|
|
20257
20596
|
resize: "vertical",
|
|
20258
20597
|
lineHeight: 1.5,
|
|
@@ -20272,9 +20611,9 @@ function MetaDescriptionField({
|
|
|
20272
20611
|
gap: 5,
|
|
20273
20612
|
padding: "8px 14px",
|
|
20274
20613
|
borderRadius: 8,
|
|
20275
|
-
border: `2px solid ${
|
|
20276
|
-
backgroundColor: loading ?
|
|
20277
|
-
color: loading ?
|
|
20614
|
+
border: `2px solid ${C12.border}`,
|
|
20615
|
+
backgroundColor: loading ? C12.surface50 : C12.cyan,
|
|
20616
|
+
color: loading ? C12.textSecondary : C12.black,
|
|
20278
20617
|
fontWeight: 800,
|
|
20279
20618
|
fontSize: 11,
|
|
20280
20619
|
textTransform: "uppercase",
|
|
@@ -20322,7 +20661,7 @@ function MetaDescriptionField({
|
|
|
20322
20661
|
justifyContent: "space-between",
|
|
20323
20662
|
marginTop: 4,
|
|
20324
20663
|
fontSize: 10,
|
|
20325
|
-
color:
|
|
20664
|
+
color: C12.textSecondary
|
|
20326
20665
|
},
|
|
20327
20666
|
children: [
|
|
20328
20667
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
@@ -20356,9 +20695,9 @@ function MetaDescriptionField({
|
|
|
20356
20695
|
borderRadius: 6,
|
|
20357
20696
|
fontSize: 11,
|
|
20358
20697
|
fontWeight: 600,
|
|
20359
|
-
color:
|
|
20698
|
+
color: C12.red,
|
|
20360
20699
|
backgroundColor: "rgba(239,68,68,0.08)",
|
|
20361
|
-
border: `1px solid ${
|
|
20700
|
+
border: `1px solid ${C12.red}`
|
|
20362
20701
|
},
|
|
20363
20702
|
children: error
|
|
20364
20703
|
}
|
|
@@ -20367,7 +20706,7 @@ function MetaDescriptionField({
|
|
|
20367
20706
|
}
|
|
20368
20707
|
);
|
|
20369
20708
|
}
|
|
20370
|
-
var
|
|
20709
|
+
var C13 = {
|
|
20371
20710
|
cyan: "#00E5FF",
|
|
20372
20711
|
black: "#000",
|
|
20373
20712
|
white: "#fff",
|
|
@@ -20444,8 +20783,8 @@ function MetaImageField({
|
|
|
20444
20783
|
gap: 10,
|
|
20445
20784
|
padding: "10px 14px",
|
|
20446
20785
|
borderRadius: 8,
|
|
20447
|
-
border: `2px solid ${
|
|
20448
|
-
backgroundColor:
|
|
20786
|
+
border: `2px solid ${C13.border}`,
|
|
20787
|
+
backgroundColor: C13.surfaceBg,
|
|
20449
20788
|
boxShadow: "2px 2px 0 0 var(--theme-border-color, rgba(0,0,0,1))"
|
|
20450
20789
|
},
|
|
20451
20790
|
children: [
|
|
@@ -20464,7 +20803,7 @@ function MetaImageField({
|
|
|
20464
20803
|
fontWeight: 900,
|
|
20465
20804
|
backgroundColor: hasImage ? "rgba(34,197,94,0.15)" : "rgba(255,138,0,0.15)",
|
|
20466
20805
|
color: hasImage ? "#16a34a" : "#d97706",
|
|
20467
|
-
border: `1px solid ${hasImage ?
|
|
20806
|
+
border: `1px solid ${hasImage ? C13.green : C13.orange}`
|
|
20468
20807
|
},
|
|
20469
20808
|
children: hasImage ? "\u2713" : "!"
|
|
20470
20809
|
}
|
|
@@ -20476,7 +20815,7 @@ function MetaImageField({
|
|
|
20476
20815
|
style: {
|
|
20477
20816
|
fontSize: 12,
|
|
20478
20817
|
fontWeight: 700,
|
|
20479
|
-
color:
|
|
20818
|
+
color: C13.textPrimary
|
|
20480
20819
|
},
|
|
20481
20820
|
children: t.metaImage.label
|
|
20482
20821
|
}
|
|
@@ -20486,7 +20825,7 @@ function MetaImageField({
|
|
|
20486
20825
|
{
|
|
20487
20826
|
style: {
|
|
20488
20827
|
fontSize: 10,
|
|
20489
|
-
color:
|
|
20828
|
+
color: C13.textSecondary,
|
|
20490
20829
|
lineHeight: 1.4
|
|
20491
20830
|
},
|
|
20492
20831
|
children: hasImage ? t.metaImage.imageSet : t.metaImage.noImage
|
|
@@ -20506,9 +20845,9 @@ function MetaImageField({
|
|
|
20506
20845
|
gap: 5,
|
|
20507
20846
|
padding: "8px 14px",
|
|
20508
20847
|
borderRadius: 8,
|
|
20509
|
-
border: `2px solid ${
|
|
20510
|
-
backgroundColor: loading ?
|
|
20511
|
-
color: loading ?
|
|
20848
|
+
border: `2px solid ${C13.border}`,
|
|
20849
|
+
backgroundColor: loading ? C13.surface50 : success ? C13.green : C13.cyan,
|
|
20850
|
+
color: loading ? C13.textSecondary : success ? C13.white : C13.black,
|
|
20512
20851
|
fontWeight: 800,
|
|
20513
20852
|
fontSize: 11,
|
|
20514
20853
|
textTransform: "uppercase",
|
|
@@ -20535,9 +20874,9 @@ function MetaImageField({
|
|
|
20535
20874
|
borderRadius: 6,
|
|
20536
20875
|
fontSize: 11,
|
|
20537
20876
|
fontWeight: 600,
|
|
20538
|
-
color:
|
|
20877
|
+
color: C13.red,
|
|
20539
20878
|
backgroundColor: "rgba(239,68,68,0.08)",
|
|
20540
|
-
border: `1px solid ${
|
|
20879
|
+
border: `1px solid ${C13.red}`
|
|
20541
20880
|
},
|
|
20542
20881
|
children: error
|
|
20543
20882
|
}
|
|
@@ -20546,7 +20885,7 @@ function MetaImageField({
|
|
|
20546
20885
|
}
|
|
20547
20886
|
);
|
|
20548
20887
|
}
|
|
20549
|
-
var
|
|
20888
|
+
var C14 = {
|
|
20550
20889
|
black: "#000",
|
|
20551
20890
|
white: "#fff",
|
|
20552
20891
|
green: "#22c55e",
|
|
@@ -20560,15 +20899,15 @@ var C13 = {
|
|
|
20560
20899
|
function getCompletenessColor(count) {
|
|
20561
20900
|
switch (count) {
|
|
20562
20901
|
case 0:
|
|
20563
|
-
return
|
|
20902
|
+
return C14.red;
|
|
20564
20903
|
case 1:
|
|
20565
|
-
return
|
|
20904
|
+
return C14.orange;
|
|
20566
20905
|
case 2:
|
|
20567
|
-
return
|
|
20906
|
+
return C14.yellow;
|
|
20568
20907
|
case 3:
|
|
20569
|
-
return
|
|
20908
|
+
return C14.green;
|
|
20570
20909
|
default:
|
|
20571
|
-
return
|
|
20910
|
+
return C14.textSecondary;
|
|
20572
20911
|
}
|
|
20573
20912
|
}
|
|
20574
20913
|
function getCompletenessLabel(count, ov) {
|
|
@@ -20626,8 +20965,8 @@ function OverviewField({
|
|
|
20626
20965
|
fontFamily: "var(--font-body, Inter, system-ui, sans-serif)",
|
|
20627
20966
|
padding: "12px 14px",
|
|
20628
20967
|
borderRadius: 10,
|
|
20629
|
-
border: `2px solid ${
|
|
20630
|
-
backgroundColor:
|
|
20968
|
+
border: `2px solid ${C14.border}`,
|
|
20969
|
+
backgroundColor: C14.surfaceBg,
|
|
20631
20970
|
boxShadow: "3px 3px 0 0 var(--theme-border-color, rgba(0,0,0,1))",
|
|
20632
20971
|
marginBottom: 12
|
|
20633
20972
|
},
|
|
@@ -20650,7 +20989,7 @@ function OverviewField({
|
|
|
20650
20989
|
fontWeight: 800,
|
|
20651
20990
|
textTransform: "uppercase",
|
|
20652
20991
|
letterSpacing: "0.04em",
|
|
20653
|
-
color:
|
|
20992
|
+
color: C14.textPrimary
|
|
20654
20993
|
},
|
|
20655
20994
|
children: t.overview.metaCompleteness
|
|
20656
20995
|
}
|
|
@@ -20665,8 +21004,8 @@ function OverviewField({
|
|
|
20665
21004
|
fontSize: 11,
|
|
20666
21005
|
fontWeight: 800,
|
|
20667
21006
|
backgroundColor: completenessColor,
|
|
20668
|
-
color: completenessColor ===
|
|
20669
|
-
border: `2px solid ${
|
|
21007
|
+
color: completenessColor === C14.yellow ? C14.black : C14.white,
|
|
21008
|
+
border: `2px solid ${C14.border}`,
|
|
20670
21009
|
textTransform: "uppercase",
|
|
20671
21010
|
letterSpacing: "0.03em"
|
|
20672
21011
|
},
|
|
@@ -20764,7 +21103,7 @@ function OverviewField({
|
|
|
20764
21103
|
style: {
|
|
20765
21104
|
fontSize: 12,
|
|
20766
21105
|
fontWeight: 600,
|
|
20767
|
-
color: item.filled ?
|
|
21106
|
+
color: item.filled ? C14.textPrimary : C14.textSecondary
|
|
20768
21107
|
},
|
|
20769
21108
|
children: item.label
|
|
20770
21109
|
}
|
|
@@ -20776,7 +21115,7 @@ function OverviewField({
|
|
|
20776
21115
|
marginLeft: "auto",
|
|
20777
21116
|
fontSize: 10,
|
|
20778
21117
|
fontWeight: 700,
|
|
20779
|
-
color: item.filled ?
|
|
21118
|
+
color: item.filled ? C14.green : C14.red,
|
|
20780
21119
|
textTransform: "uppercase",
|
|
20781
21120
|
letterSpacing: "0.03em"
|
|
20782
21121
|
},
|
|
@@ -20793,7 +21132,7 @@ function OverviewField({
|
|
|
20793
21132
|
}
|
|
20794
21133
|
);
|
|
20795
21134
|
}
|
|
20796
|
-
var
|
|
21135
|
+
var C15 = {
|
|
20797
21136
|
cyan: "#00E5FF",
|
|
20798
21137
|
black: "#000",
|
|
20799
21138
|
white: "#fff",
|
|
@@ -20812,10 +21151,10 @@ var G = {
|
|
|
20812
21151
|
descGrey: "#4d5156",
|
|
20813
21152
|
faviconBg: "#e8eaed"};
|
|
20814
21153
|
function charCountColor2(len, min, max) {
|
|
20815
|
-
if (len >= min && len <= max) return
|
|
20816
|
-
if (len > 0 && len < min) return
|
|
20817
|
-
if (len > max) return
|
|
20818
|
-
return
|
|
21154
|
+
if (len >= min && len <= max) return C15.green;
|
|
21155
|
+
if (len > 0 && len < min) return C15.orange;
|
|
21156
|
+
if (len > max) return C15.red;
|
|
21157
|
+
return C15.textSecondary;
|
|
20819
21158
|
}
|
|
20820
21159
|
function truncateText(text, maxChars) {
|
|
20821
21160
|
if (text.length <= maxChars) return text;
|
|
@@ -20870,8 +21209,8 @@ function SerpPreview({
|
|
|
20870
21209
|
padding: "10px 12px",
|
|
20871
21210
|
cursor: "pointer",
|
|
20872
21211
|
borderRadius: 8,
|
|
20873
|
-
border: `2px solid ${
|
|
20874
|
-
backgroundColor:
|
|
21212
|
+
border: `2px solid ${C15.border}`,
|
|
21213
|
+
backgroundColor: C15.surface50,
|
|
20875
21214
|
userSelect: "none"
|
|
20876
21215
|
},
|
|
20877
21216
|
children: [
|
|
@@ -20886,7 +21225,7 @@ function SerpPreview({
|
|
|
20886
21225
|
fontWeight: 800,
|
|
20887
21226
|
textTransform: "uppercase",
|
|
20888
21227
|
letterSpacing: "0.04em",
|
|
20889
|
-
color:
|
|
21228
|
+
color: C15.textPrimary
|
|
20890
21229
|
},
|
|
20891
21230
|
children: [
|
|
20892
21231
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -20918,7 +21257,7 @@ function SerpPreview({
|
|
|
20918
21257
|
transition: "transform 0.2s",
|
|
20919
21258
|
display: "inline-block",
|
|
20920
21259
|
transform: open ? "rotate(90deg)" : "none",
|
|
20921
|
-
color:
|
|
21260
|
+
color: C15.textSecondary
|
|
20922
21261
|
},
|
|
20923
21262
|
children: "\u25B6"
|
|
20924
21263
|
}
|
|
@@ -20951,10 +21290,10 @@ function SerpPreview({
|
|
|
20951
21290
|
"div",
|
|
20952
21291
|
{
|
|
20953
21292
|
style: {
|
|
20954
|
-
backgroundColor:
|
|
20955
|
-
border: `2px solid ${
|
|
21293
|
+
backgroundColor: C15.white,
|
|
21294
|
+
border: `2px solid ${C15.border}`,
|
|
20956
21295
|
borderRadius: 12,
|
|
20957
|
-
boxShadow: `3px 3px 0 0 ${
|
|
21296
|
+
boxShadow: `3px 3px 0 0 ${C15.border}`,
|
|
20958
21297
|
padding: isDesktop ? 20 : 14,
|
|
20959
21298
|
maxWidth: isDesktop ? 650 : 380,
|
|
20960
21299
|
overflow: "hidden"
|
|
@@ -21017,7 +21356,7 @@ function SerpPreview({
|
|
|
21017
21356
|
style: {
|
|
21018
21357
|
fontSize: 14,
|
|
21019
21358
|
fontWeight: 400,
|
|
21020
|
-
color:
|
|
21359
|
+
color: C15.black,
|
|
21021
21360
|
lineHeight: 1.3,
|
|
21022
21361
|
whiteSpace: "nowrap",
|
|
21023
21362
|
overflow: "hidden",
|
|
@@ -21081,7 +21420,7 @@ function SerpPreview({
|
|
|
21081
21420
|
"span",
|
|
21082
21421
|
{
|
|
21083
21422
|
style: {
|
|
21084
|
-
color:
|
|
21423
|
+
color: C15.textSecondary,
|
|
21085
21424
|
fontStyle: "italic",
|
|
21086
21425
|
fontSize: titleFontSize - 2
|
|
21087
21426
|
},
|
|
@@ -21110,7 +21449,7 @@ function SerpPreview({
|
|
|
21110
21449
|
"span",
|
|
21111
21450
|
{
|
|
21112
21451
|
style: {
|
|
21113
|
-
color:
|
|
21452
|
+
color: C15.textSecondary,
|
|
21114
21453
|
fontStyle: "italic",
|
|
21115
21454
|
fontSize: descFontSize - 1
|
|
21116
21455
|
},
|
|
@@ -21143,7 +21482,7 @@ function SerpPreview({
|
|
|
21143
21482
|
fontSize: 11
|
|
21144
21483
|
},
|
|
21145
21484
|
children: [
|
|
21146
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color:
|
|
21485
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: C15.textSecondary, fontWeight: 600 }, children: t.serpPreview.previewTitle }),
|
|
21147
21486
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
21148
21487
|
"span",
|
|
21149
21488
|
{
|
|
@@ -21172,7 +21511,7 @@ function SerpPreview({
|
|
|
21172
21511
|
fontSize: 11
|
|
21173
21512
|
},
|
|
21174
21513
|
children: [
|
|
21175
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color:
|
|
21514
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: C15.textSecondary, fontWeight: 600 }, children: t.serpPreview.previewDescription }),
|
|
21176
21515
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
21177
21516
|
"span",
|
|
21178
21517
|
{
|
|
@@ -21201,14 +21540,14 @@ function SerpPreview({
|
|
|
21201
21540
|
fontSize: 11
|
|
21202
21541
|
},
|
|
21203
21542
|
children: [
|
|
21204
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color:
|
|
21543
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: C15.textSecondary, fontWeight: 600 }, children: t.serpPreview.url }),
|
|
21205
21544
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
21206
21545
|
"span",
|
|
21207
21546
|
{
|
|
21208
21547
|
style: {
|
|
21209
21548
|
fontWeight: 700,
|
|
21210
21549
|
fontVariantNumeric: "tabular-nums",
|
|
21211
|
-
color: fullUrl.length <= 75 ?
|
|
21550
|
+
color: fullUrl.length <= 75 ? C15.green : C15.red
|
|
21212
21551
|
},
|
|
21213
21552
|
children: [
|
|
21214
21553
|
fullUrl.length,
|
|
@@ -21243,13 +21582,13 @@ function DeviceButton({
|
|
|
21243
21582
|
gap: 5,
|
|
21244
21583
|
padding: "4px 12px",
|
|
21245
21584
|
borderRadius: 6,
|
|
21246
|
-
border: `2px solid ${
|
|
21585
|
+
border: `2px solid ${C15.border}`,
|
|
21247
21586
|
fontSize: 11,
|
|
21248
21587
|
fontWeight: 700,
|
|
21249
21588
|
cursor: "pointer",
|
|
21250
|
-
backgroundColor: active ?
|
|
21251
|
-
color: active ?
|
|
21252
|
-
boxShadow: active ? `2px 2px 0 0 ${
|
|
21589
|
+
backgroundColor: active ? C15.cyan : C15.surfaceBg,
|
|
21590
|
+
color: active ? C15.black : C15.textPrimary,
|
|
21591
|
+
boxShadow: active ? `2px 2px 0 0 ${C15.border}` : "none",
|
|
21253
21592
|
transition: "background-color 0.15s"
|
|
21254
21593
|
},
|
|
21255
21594
|
children: [
|