packages/docs/docs/editor-starter/tracks-items-assets.mdx
The state of the Editor Starter contains different data types:
The relationship between these entities is as following:
The type of an item is defined by the union EditorStarterItem.
By default, there are the following items:
To add a new item type, copy the logic of one of the items, change it, and add it to the EditorStarterItem union.
A lot of errors should appear when you run the typechecker in your console: npx tsc -w
These errors are intentional and are supposed to guide you towards where in the code you need to add implementations for certain things in order to support the new item type.
The different asset types are defined by the union EditorStarterAsset.
By default, there are the following items:
To add a new item type, copy the logic of one of the items, change it, and add it to the EditorStarterAsset union.
Some errors should appear when you run the type checker in your console: npx tsc -w
Resolve these errors to complete the implementation of your new asset type.
Each item type has an "Inspector" component which is a React component which can be mounted in the right sidebar.
The inspector may also show information about the asset that is associated with the item.
If no item is selected, a special inspector for the global settings is shown.
See the source code for the <Inspector /> component.