Add the news report model, markers and source

The pure half of a news layer: validated records for a news server's
`/api/news/hotspots|feed|outline` contract, a presentation model and canvas
markers and picture cards, and a fetch client.

- Colour carries severity only (0 no physical event, 1 minor, 2 significant,
  3 major), never a side; the category is the icon, the rim is attestation
  (confirmed, a claim, one side's own press), size grows with sources and
  markers fade with age.
- Cards say "Reported by {side} sources" and mark official channels; a
  machine-read English headline is labelled as such.
- `createNewsSource` reads same-origin routes with a 15 s timeout, a 4 MiB cap
  and record-by-record validation; `NEWS_API_PATHS` and `newsQueryAllowed`
  let a host proxy exactly what the client sends. A 503 marked unavailable
  means "not configured": no retries.
- Exported as `./layers/news/source`, with its own package boundary.
This commit is contained in:
Denis Groshev committed 2026-11-06 00:45:22 +01:00
1 parent dd83812a21
commit 2d9d518946
21 files changed
+2653

No files matched your search

+53
View File
@@ -1,4 +1,57 @@
{
"News feed unavailable": "Feed de notícias indisponível",
"Disputed: {name}": "Em disputa: {name}",
"Administered by {holder} · claimed by {claimant}": "Administrado por {holder} · reivindicado por {claimant}",
"Self-administered · claimed by {claimant}": "Autogovernado · reivindicado por {claimant}",
"UN-patrolled zone": "Zona patrulhada pela ONU",
"Claimed by neither neighbour": "Nenhum vizinho o reivindica",
"Video": "Vídeo",
"Photos": "Fotos",
"Claimed by {who}": "Segundo {who}",
"Claimed": "Alegação",
"Not yet confirmed by others": "Ainda não confirmado por outros",
"Reported by {side} sources": "Noticiado por fontes de {side}",
"Reported by {sides}": "Noticiado por {sides}",
"{side} sources": "fontes de {side}",
"Official": "Oficial",
"Reported by both sides": "Noticiado por ambos os lados",
"Independently reported": "Noticiado de forma independente",
"Single source": "Fonte única",
"International": "Internacional",
"Independent": "Independente",
"Unattributed": "Sem atribuição",
"Outside party": "Parte externa",
"Ukraine–Russia": "Ucrânia–Rússia",
"Israel–Gaza–Lebanon": "Israel–Gaza–Líbano",
"Iran–Hormuz": "Irã–Ormuz",
"Yemen–Red Sea": "Iêmen–Mar Vermelho",
"Sudan": "Sudão",
"Sahel": "Sahel",
"Elsewhere": "Outros lugares",
"Strike": "Ataque",
"Alert": "Alerta",
"Air defence": "Defesa aérea",
"Ground fighting": "Combates terrestres",
"Casualties": "Vítimas",
"Humanitarian": "Humanitário",
"Disaster": "Desastre",
"Protest": "Protesto",
"Political": "Político",
"No physical event": "Sem evento físico",
"Minor incident": "Incidente menor",
"Significant": "Significativo",
"Major": "Grave",
"age|now": "agora",
"{minutes} min": "{minutes} min",
"{hours} h": "{hours} h",
"{count} sources": {
"one": "{count} fonte",
"many": "{count} fontes",
"other": "{count} fontes"
},
"News feed not configured on this server": "Feed de notícias não configurado neste servidor",
"Malformed news hotspots response": "Resposta de focos de notícias malformada",
"Malformed news feed response": "Resposta do feed de notícias malformada",
"Pick a shape, then click the map.": "Escolha uma forma e clique no mapa.",
"Enter to place the pin, Esc to cancel.": "Enter para colocar o marcador, Esc para cancelar.",
"Click where the pin goes.": "Clique onde o marcador deve ficar.",