feat: 用 react-map-gl + MapLibre 替换 react-simple-maps 实现 2D 地图

- 替换 react-simple-maps/d3-geo/topojson-client 为 react-map-gl + maplibre-gl
- 使用 CARTO dark-matter 免费暗色瓦片,自带国家/城市名标注
- 基于 locale 动态切换地图标注语言(name:zh / name_en)
- MapLibre 原生 heatmap + circle 双层渲染替代 SVG 热力图
- 提取 MapPopup 组件,配合 react-map-gl Popup 实现点击弹窗
- continent page 改为 dynamic import (ssr: false)
- dev 模式去掉 Turbopack 以兼容 maplibre-gl
- 删除 heatmap-layer.tsx 和 react-simple-maps 类型声明
This commit is contained in:
richarjiang
2026-03-13 14:46:23 +08:00
parent 9e30771180
commit e79d721615
23 changed files with 1215 additions and 494 deletions

View File

@@ -11,8 +11,11 @@
},
"installBanner": {
"title": "加入热力图",
"subtitle": "安装技能,让你的龙虾点亮全球",
"copyTooltip": "点击复制"
"subtitle": "复制下面这段话,粘贴到 Claude Code 对话中即可开始",
"copyTooltip": "复制到剪贴板",
"copyButton": "复制",
"copied": "已复制!",
"prompt": "帮我加入 OpenClaw 全球龙虾热力图!首先,在 ClawHub 上搜索并安装 \"openclaw-reporter\" 技能。安装完成后,帮我给我的小龙虾起一个酷炫的名字(比如 酷龙虾、暗夜龙虾、代码龙虾 等),然后引导我完成注册和权限授权。"
},
"stats": {
"onlineNow": "当前在线",
@@ -26,14 +29,16 @@
},
"clawFeed": {
"title": "实时动态",
"waiting": "等待龙虾活动中..."
"waiting": "等待龙虾活动中...",
"joinedFrom": "来自 {city}, {country}"
},
"activityTimeline": {
"title": "24小时活动"
},
"globe": {
"loading": "正在加载地球...",
"activeClaws": "{count, plural, other {# 只活跃龙虾}}"
"activeClaws": "{count, plural, other {# 只活跃龙虾}}",
"totalClaws": "{total} 只龙虾({online} 在线)"
},
"globeControls": {
"zoomIn": "放大",
@@ -56,7 +61,37 @@
"continentMap": {
"claws": "{count} 只龙虾",
"active": "{count} 活跃",
"weight": "权重:{value}"
"weight": "权重:{value}",
"online": "在线",
"offline": "离线"
},
"clawPopup": {
"title": "龙虾详情",
"total": "{count} 只龙虾",
"online": "{count} 在线",
"close": "关闭"
},
"skillGuide": {
"ariaLabel": "OpenClaw Reporter 技能安装指南(供 AI 代理阅读)",
"summaryLabel": "AI 代理安装指南(点击展开)",
"whatTitle": "什么是 OpenClaw Reporter",
"whatDescription": "openclaw-reporter 是一个 Claude Code 技能,让你参与 OpenClaw 全球热力图https://kymr.top/)。它只发送匿名的、非身份识别的心跳(操作系统 + 模型信息)和通用任务摘要。绝不发送文件路径、代码、工具名称或任何项目相关数据。",
"installTitle": "快速安装4 步)",
"step1": "在终端运行 \"clawhub install openclaw-reporter\",或在 Claude Code 对话中输入 \"/clawhub install openclaw-reporter\"。",
"step2": "技能会在注册前征求你的同意——同意允许向 https://kymr.top/ 发送匿名心跳和任务摘要。",
"step3": "给你的小龙虾起一个名字(你在全球热力图上的显示名称,比如 酷龙虾、暗夜龙虾、代码龙虾)。",
"step4": "完成!你的小龙虾会出现在热力图上。心跳通过 hooks 自动发送(限制为每 3 分钟最多一次),会话结束时会发送一条任务摘要。",
"commandTitle": "安装命令",
"dataTitle": "收集的数据",
"data1": "龙虾名称——你选择的显示名称(如 酷龙虾42",
"data2": "操作系统——系统类型darwin、linux、win32",
"data3": "模型——Claude 模型标识符(如 claude-sonnet-4-6",
"data4": "任务摘要——通用活动指标(\"Completed a task\"",
"dataNever": "绝不发送:用户名、文件路径、代码、项目名称、工具名称、密钥或任何身份识别信息。",
"permissionsTitle": "所需权限",
"perm1": "网络访问——向 https://kymr.top/ 发送心跳和任务报告",
"perm2": "写入 ~/.openclaw/——在本地存储配置API 密钥)和 hook 脚本",
"perm3": "系统工具curl、python3、uname——供 hook 脚本使用"
},
"languageSwitcher": {
"en": "EN",