@eyeon/map

中文文档
2.0.56发布于 2026/11/11UNLICENSEDTypeScriptESM + CJS近 30 天下载 2097

EyeOn Center Map v2 — core, viewer, and editor

原始使用文档
文档目录4 节
  1. Subpath exports
  2. Typography
  3. Reversibility
  4. Scripts

@eyeon/map (Center Map v2)

DB-driven center map: pure-TS core, three.js viewer, SVG/DOM editor.

Subpath exports

import { importSvg, compileDocument, findPath } from '@eyeon/map/core';
import { MapViewer } from '@eyeon/map/viewer';
import { MapEditor } from '@eyeon/map/editor';
import '@eyeon/map/viewer/index.css';
import '@eyeon/map/editor/index.css'; // includes viewer chrome (floors / RESET / zoom)
  • MapEditor host="PORTAL" — staff editor. Left rail is Map options only (Floors, Kiosks, Style, Edit Map). Default center is MapViewer (click-to-assign; viewer chrome stays on the canvas). Edit Map swaps in the geometry canvas and editor grid.
  • MapViewer (WEBSITE / DISPLAY_APP) — public or kiosk chrome from viewerChrome(host). Never includes Map options.

Develop from Storybook: npm run storybook → a v2 Center Map story, then switch Host. See apps/storybook/README.md.

Typography

The map ships no font of its own — it inherits the font of whatever page mounts it (admin-portal gets Montserrat, a center website gets that site's font). To pin a different font just for the map, set the variable on the container:

.my-map-wrapper { --eyeon-map-font-family: 'Inter', sans-serif; }

Storybook loads Montserrat as its own host font, so stories match admin-portal.

Reversibility

  • v2 never writes mapit2_*
  • v2 S3 objects live under media/map/ only
  • centers.map_version (default 1) is the only coupling
  • Absent / unknown version → v1

Scripts

npm test
npm run build

版本与发布记录

@eyeon/map 共发布 36 个版本,首次发布于 2026/08/17;过去 12 个月发布了 36 个版本。

版本发布日期距今
2.0.56latest2026/11/112 天前
2.0.552026/11/113 天前
2.0.542026/11/068 天前
2.0.532026/11/059 天前
2.0.522026/11/059 天前
2.0.512026/11/049 天前

关于 @eyeon/map 的常见问题

@eyeon/map 是什么?

EyeOn Center Map v2 — core, viewer, and editor

如何安装 @eyeon/map?

在项目目录运行 npm install @eyeon/map,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^19.0.0)、react-dom(^19.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@eyeon/map 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@eyeon/map 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@eyeon/map 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^22.20.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@eyeon/map 可以商用吗?

@eyeon/map 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@eyeon/map 的下载量有多少?

根据 npm 官方下载统计,@eyeon/map 在 2026/10/14 – 2026/11/12 这 30 天内被下载 2,097 次,日均约 70 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@eyeon/map 还在维护吗?

最新版本 2.0.56 发布于 2026/11/11(2 天前);至今共发布 36 个版本,其中过去 12 个月发布了 36 个;首次发布于 2026/08/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。