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

+51
View File
@@ -1,4 +1,55 @@
{
"News feed unavailable": "新闻源不可用",
"Disputed: {name}": "争议地区:{name}",
"Administered by {holder} · claimed by {claimant}": "由{holder}管辖 · {claimant}主张主权",
"Self-administered · claimed by {claimant}": "自治 · {claimant}主张主权",
"UN-patrolled zone": "联合国巡逻区",
"Claimed by neither neighbour": "两个邻国均未主张",
"Video": "视频",
"Photos": "照片",
"Claimed by {who}": "{who}声称",
"Claimed": "声称",
"Not yet confirmed by others": "尚未获他方证实",
"Reported by {side} sources": "{side}方来源报道",
"Reported by {sides}": "报道来源:{sides}",
"{side} sources": "{side}方来源",
"Official": "官方",
"Reported by both sides": "双方均有报道",
"Independently reported": "有独立来源报道",
"Single source": "单一来源",
"International": "国际",
"Independent": "独立",
"Unattributed": "未注明来源",
"Outside party": "外部方",
"Ukraine–Russia": "乌克兰–俄罗斯",
"Israel–Gaza–Lebanon": "以色列–加沙–黎巴嫩",
"Iran–Hormuz": "伊朗–霍尔木兹",
"Yemen–Red Sea": "也门–红海",
"Sudan": "苏丹",
"Sahel": "萨赫勒",
"Elsewhere": "其他地区",
"Strike": "打击",
"Alert": "警报",
"Air defence": "防空",
"Ground fighting": "地面战斗",
"Casualties": "伤亡",
"Humanitarian": "人道",
"Disaster": "灾害",
"Protest": "抗议",
"Political": "政治",
"No physical event": "无实际事件",
"Minor incident": "轻微事件",
"Significant": "重大",
"Major": "严重",
"age|now": "刚刚",
"{minutes} min": "{minutes} 分钟",
"{hours} h": "{hours} 小时",
"{count} sources": {
"other": "{count} 个来源"
},
"News feed not configured on this server": "此服务器未配置新闻源",
"Malformed news hotspots response": "新闻热点响应格式错误",
"Malformed news feed response": "新闻源响应格式错误",
"Pick a shape, then click the map.": "先选择形状,再在地图上点击。",
"Enter to place the pin, Esc to cancel.": "按 Enter 放置图钉,按 Esc 取消。",
"Click where the pin goes.": "点击图钉的放置位置。",