@yam8d/m8-sdk 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/index.js +932 -551
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/types/engine/astar.d.ts +7 -6
- package/types/engine/engine.d.ts +2 -1
- package/types/engine/host/hostMethods.d.ts +1 -1
- package/types/engine/viewGraph.d.ts +18 -2
- package/types/engine/viewNavigation.d.ts +9 -4
- package/types/fxInsight.d.ts +3 -1
package/README.md
CHANGED
|
@@ -153,7 +153,9 @@ m8.onConnectionChange((connected) => updateUi(connected))
|
|
|
153
153
|
|
|
154
154
|
#### `navigateToView(viewName: string): Promise<boolean>`
|
|
155
155
|
|
|
156
|
-
Asks the host to navigate to a named view (e.g. `'song'`, `'phrase'`). Returns `true`
|
|
156
|
+
Asks the host to navigate to a named view (e.g. `'song'`, `'phrase'`, `'systemsettings'`, `'mixeq'`). Returns `true` when the view is reached, `false` when no way is left or a newer navigation took over.
|
|
157
|
+
|
|
158
|
+
The views and the moves between them are in `m8Graph.generated.json`: Shift+arrows between the main views, buttons that open sub-views (the cursor goes to the button, found by its label, then Edit or Shift+Right), and Option to leave a sub-view. The path is recomputed after every step from the view the M8 actually shows, and what each move did is remembered for the rest of the navigation: a move that changed nothing (Shift+Right on an empty chain) is avoided, so the Instrument view is then reached through Project > View Inst. Pool. Some keys go back to the previous view (the Mixer's Shift+Up; the Instrument's Shift+Left after the Instrument Pool), so the planner keeps track of where the M8 came from. On a view the graph does not know, Option is tried first, then Shift+Up. A button is pressed only when the cursor is on it. The project file browser has no way in (on a changed song, LOAD asks to lose the changes with OK selected); navigation can only leave it.
|
|
157
159
|
|
|
158
160
|
```ts
|
|
159
161
|
await m8.navigateToView('phrase')
|