Appearance
Simulator debug design
Context
The docs need an embedded simulator panel so developers can paste map payloads and validate rendering without leaving VitePress.
Scope
- Add a new top-level docs section:
simulator. - Build a lightweight playground component with a clean UI.
- Support
mapHex(required),pathHex(optional), androomPropertiesJSON (optional).
Design choices
- Keep implementation independent from
src/app/debugTools. - Use a browser-only VitePress component and wrap it with
ClientOnly. - Determine map type from input prefix:
7b22: structured map- otherwise: raster map
- Default sample input uses only
mapHexfrom existing mock data. - Provide full-screen editing for long payloads.
UX
- Two-column layout on desktop, stacked layout on mobile.
- Explicit render action instead of auto-render while typing.
- Inline status and error messages with field-level failure context.
Verification
- New nav item
模拟调试appears next to参考. /simulator/renders and can draw map from default sample.- Optional inputs can be empty without blocking map rendering.