docs/user-guide.mddocs/keyboard-shortcuts.mddocs/scene-json-schema.mddocs/developer-setup.mddocs/known-limitations.md
- Use
pnpm release:patch,pnpm release:minor, orpnpm release:major. - Each command requires a clean git working tree and a non-detached branch.
- The command runs a push preflight check, then bumps
package.jsonversion, createschore(release): vX.Y.Zcommit andvX.Y.Ztag, then pushes both. - If pushing fails after tag creation, the script deletes the created tag (local and remote if needed) before exiting.
- Pushing the tag triggers
.github/workflows/release-on-tag.yml, which installs withpnpm, builds the library, and publishes to GitHub Packages. - CI rejects the release when the pushed tag does not match
package.json.version. - CI uses
GITHUB_TOKENfor package publishing.
The VisionSimulator export is local-only: it loads and saves scene data
from localStorage via Zustand persistence (scoped by visionSimulatorId).
mapboxToken is optional but required for Mapbox map tiles and location search.
import {VisionSimulator} from '@vega-tek-hub/vision-simulator-v2'
interface AppProps {
visionSimulatorId: string
mapboxToken?: string
mode?: 'editor' | 'preview'
}
export const App: React.FC<AppProps> = ({
mapboxToken,
visionSimulatorId,
}) => {
return (
<VisionSimulator
mapboxToken={mapboxToken}
mode='editor'
visionSimulatorId={visionSimulatorId}
/>
)
}mode is optional and defaults to 'editor'.
mode='editor': full editor UI and standard preview toggle behavior.mode='preview': simulation-only view (no top bar or editor surfaces).
<VisionSimulator
mapboxToken={mapboxToken}
mode='preview'
visionSimulatorId={visionSimulatorId}
/><VisionSimulator
mapboxToken={mapboxToken}
mode='editor'
visionSimulatorId={visionSimulatorId}
/>uiOverrides components are rendered in the normal DOM tree and use the app's
regular stylesheet pipeline.
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Note: This will impact Vite dev & build performances.
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])