Appearance
Simulator playground plan (March 10, 2026)
Background
Developers need a direct way to validate raw map payloads while reading the SDK docs. The goal is to avoid switching to a separate demo app for basic integration checks.
Goal and scope
Add a new documentation section named simulator with a browser-only playground that:
- Accepts
mapHexas required input. - Accepts optional
pathHexand optionalroomPropertiesJSON. - Renders the map in real time after an explicit action.
- Uses a clean and minimal UI suited for long payload input.
Out of scope:
- Sharing logic with
src/app/debugTools. - Heatmap and other advanced layers in this first version.
Chosen approach
Implement a standalone VitePress component (MapPlayground.vue) and register it globally in the VitePress theme. The component owns parsing, rendering, error display, and long-text editing mode.
Parsing rule:
- If normalized
mapHexstarts with7b22, treat it as structured map data. - Otherwise, treat it as raster map data.
Impacted files and modules
docs/.vitepress/config.tsdocs/.vitepress/theme/index.tsdocs/.vitepress/theme/components/MapPlayground.vuedocs/simulator/index.md
Verification checklist
- [ ] Navigation includes
模拟调试and routes to/simulator/. - [ ]
mapHexis required and has default sample data. - [ ]
pathHexandroomPropertiesare optional. - [ ] Structured/raster branch follows the
7b22rule. - [ ] Long inputs can be edited in full-screen mode.
- [ ] Errors are scoped to each optional field when possible.
- [ ]
npm run lintpasses. - [ ]
npx tsc --noEmitpasses.