diff --git a/docs/assets/app.css b/docs/assets/app.css
index 78f774a..e8e314a 100644
--- a/docs/assets/app.css
+++ b/docs/assets/app.css
@@ -7202,8 +7202,7 @@ body[data-active-view="ask"] section[data-view="ask"] {
.check-run:hover { filter: brightness(1.08); }
.check-toggle { margin-left: auto; }
.check-output { border-top: 1px solid var(--rule); padding-top: 16px; }
-.check-summary { font-size: 16px; margin: 0 0 10px; }
-.check-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
+.check-summary { font-size: 16px; margin: 0 0 14px; }
.ck-pill {
display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em;
padding: 2px 8px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper-2); color: var(--ink-2);
@@ -7243,8 +7242,28 @@ mark.ck ins { color: var(--status-good, #2f6b3a); text-decoration: none; font-st
.ck-raw .dim { font-size: 12px; }
.ck-resolved { margin-top: 6px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ck-resolved .badge { margin-right: 2px; }
-.ck-copy-cite { font: inherit; font-size: 12px; background: none; border: 1px solid var(--rule); border-radius: 2px; padding: 1px 8px; color: var(--garnet); cursor: pointer; }
-.ck-copy-cite:hover { background: var(--garnet); color: var(--paper); border-color: var(--garnet); }
+/* Row actions: the same three, in the same place, on every resolved row. */
+.ck-actions { margin-left: auto; display: inline-flex; gap: 6px; flex-wrap: wrap; }
+.ck-act {
+ font: inherit; font-size: 12px; line-height: 1.5; background: none; border: 1px solid var(--rule); border-radius: 2px;
+ padding: 1px 8px; color: var(--garnet); cursor: pointer; text-decoration: none; white-space: nowrap;
+}
+.ck-act:hover, .ck-act:focus-visible { background: var(--garnet); color: var(--paper); border-color: var(--garnet); }
+.ck-cand { white-space: nowrap; }
+.ck-cand-src { margin-left: 3px; font-size: 11px; color: var(--ink-3, var(--ink-2)); text-decoration: none; }
+.ck-cand-src:hover { color: var(--garnet); }
+/* Status counts = legend + filter. */
+.ck-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
+.ck-filter { font: inherit; font-size: 13px; cursor: pointer; background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 2px 10px; color: var(--ink-2); }
+.ck-filter.ck-pill { font-size: 12px; }
+.ck-filter.is-on { box-shadow: 0 0 0 2px var(--ink-2) inset; }
+.ck-filter:hover { border-color: var(--ink-2); }
+.ck-quotes-line { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
+.ck-more { margin: 6px 0 0; font-size: 12px; color: var(--ink-3, var(--ink-2)); }
+.ck-more > summary { cursor: pointer; }
+.ck-note-ok .ck-para-summary { color: inherit; }
+.ck-notes-more { margin: 4px 0 0; padding-left: 18px; }
+@media (max-width: 600px) { .ck-actions { margin-left: 0; width: 100%; } }
.ck-notes { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.ck-note { margin: 3px 0; }
.ck-note-bad { color: var(--status-bad, #8b1e2b); }
diff --git a/docs/assets/app.js b/docs/assets/app.js
index 260a998..58b9891 100644
--- a/docs/assets/app.js
+++ b/docs/assets/app.js
@@ -5162,7 +5162,7 @@ function checkParaBlock(it) {
const shown = paras.slice(0, CHECK_PARA_CAP);
const url = checkOpenUrl(it);
return `Show ${label} of ${escape(it.doc.signature || formatDocHeadline(it.doc))}
+ ${escape(String(it.pinResult.text).replace(/\.$/, ''))} · show text
${qbits.join(' — ')}
`); } - const orphan = quoteList.filter(q => !q.owner).length; - if (orphan) parts.push(`${orphan} quotation${orphan === 1 ? '' : 's'} without a nearby resolvable citation`); - return parts.join(' — '); + return lines.join(''); +} +function applyCheckFilter() { + const f = state.check.filter || ''; + for (const row of document.querySelectorAll('#check-list .ck-row')) row.hidden = !!f && row.dataset.ckStatus !== f; } function checkReportMarkdown(items, quoteList) { const lines = ['| # | As written | Status | Resolved to | Notes |', '|---|---|---|---|---|']; @@ -5273,6 +5311,15 @@ function paintCheckView() { catch { showFeedbackToast({ ok: false, _msg: 'Clipboard write failed', _mark: '⚠' }); } return; } + const chip = e.target.closest('[data-ck-filter]'); + if (chip) { + const f = chip.dataset.ckFilter; + state.check.filter = state.check.filter === f ? '' : f; + const last = state.check.last; + if (last) $('#check-summary').innerHTML = checkSummary(last.items, last.quotes); + applyCheckFilter(); + return; + } const scopeLink = e.target.closest('a[data-check-scope]'); if (scopeLink) { e.preventDefault(); @@ -5287,6 +5334,7 @@ async function runCitationCheck() { const out = $('#check-output'), status = $('#check-status'), summary = $('#check-summary'), ann = $('#check-annotated'), list = $('#check-list'); if (!out || !summary || !ann || !list) return; const run = ++state.check.run; + state.check.filter = ''; if (!text.trim()) { if (status) status.textContent = 'Paste some text first.'; return; } if (status) status.textContent = 'Resolving citations…'; const found = checkDetect(text); diff --git a/docs/assets/i18n-es.js b/docs/assets/i18n-es.js index 3deb773..175358b 100644 --- a/docs/assets/i18n-es.js +++ b/docs/assets/i18n-es.js @@ -466,10 +466,28 @@ export default { 'Try again in a minute, or use': 'Inténtelo de nuevo dentro de un minuto o use', 'in the meantime.': 'mientras tanto.', 'Ask is not configured for this deploy.': 'La función Preguntar no está configurada en esta instalación.', + + // ── Check: actions and status filter ── + 'Reader': 'Lector', + 'UN source ↗': 'Fuente ONU ↗', + 'How it was resolved': 'Cómo se resolvió', + '· show text': '· ver texto', + 'citations': 'citas', + 'citation': 'cita', + 'Show citations by status': 'Mostrar las citas por estado', + 'Official UN document': 'Documento oficial de la ONU', + 'Open the cited paragraph in the UNHRDB reader': 'Abrir el párrafo citado en el lector de UNHRDB', + 'Open the document in the UNHRDB reader': 'Abrir el documento en el lector de UNHRDB', + 'Copy the citation in your default format': 'Copiar la cita en su formato predeterminado', }, // Strings with numbers or a query: [RegExp, replacement]. Tried when the exact table misses. patterns: [ + [/^(✓|⚠|✖|\?|○) (\d+) (found|to check|not found|ambiguous|outside this database)$/, (m, mark, n, w) => + `${mark} ${n} ${({ found: 'encontradas', 'to check': 'por comprobar', 'not found': 'no encontradas', ambiguous: 'ambiguas', 'outside this database': 'fuera de esta base' })[w]}`], + [/^Paragraph (\S+) exists$/, 'El párrafo $1 existe'], + [/^Paragraphs (\S+) exist$/, 'Los párrafos $1 existen'], + [/^Open the official UN document \((.+)\)$/, 'Abrir el documento oficial de la ONU ($1)'], [/^Adopted (\d{1,2}) (\w+) (\d{4})$/, (m, d, mo, y) => `Aprobada el ${d} de ${ES_MONTH[mo] || mo} de ${y}`], [/^Decision adopted (\d{1,2}) (\w+) (\d{4})$/, (m, d, mo, y) => `Decisión adoptada el ${d} de ${ES_MONTH[mo] || mo} de ${y}`], [/^Issued (\d{1,2}) (\w+) (\d{4})$/, (m, d, mo, y) => `Publicado el ${d} de ${ES_MONTH[mo] || mo} de ${y}`], diff --git a/docs/index.html b/docs/index.html index 2a9fa32..0ece552 100644 --- a/docs/index.html +++ b/docs/index.html @@ -155,8 +155,8 @@ } - - + +