To implement this status bar as a plugin (https://github.com/mosaic-org/status-bar/blob/master/src/main.rs), the following bits of infrastructure were changed:
- Layouts can now have an exact size constraint (1 row high, for example)
- Unconstrained blocks in a layout are now grown to fill the remaining space
- Default plugins and layouts are now stored in an OS-dependent data directory. The initial installation of these assets is done a build-time via `build.rs`
- All new tabs are created with a user-configurable default layout, unless provided with a different layout
- Plugins can now capture *all* key presses detected by Mosaic via `global_handle_key()`
- Plugins can now control whether or not they are selectable via `set_selectable()`
- Plugins can now fetch a vector of help-strings from Mosaic, which is currently being used to display helpful keybindings, via `get_help()`
- Also patched up all remaining compiler warnings and 23 of the 25 clippy lints on main
* refactor(grid): move from scroll to grid (prototype with tests passing)
* refactor(grid): remove scrollbuffer
* fix(terminal): do not overflow cursor y position when resizing
* refactor(file-structure): move grid to different file
* fix(compatibility): vim horizontal resize
* fix(compatibility): various fixes for cursor movement
* style(grid): remove unused imports
* style(grid): remove debugging
* style(fmt): rustfmt
* style(fmt): rustfmt
- Added the ability to load and keep track of several plugins at once
- Removed `wasm-wip` feature flag, enabling plugins in all builds
- `split_space` now returns a tuple with the `part_position_and_size` (as before) plus a cloned version of the part, so plugins and terminals can be distinguished by its users
- Added a `Draw` instruction for rendering plugins when asked to by Mosaic
- Added a new `PluginPane`, implementing `Pane` for plugins!
- Replaced RawFd as a pane-identifier with the `PaneId` enum in most places
- `change_size` -> `change_pos_and_size`, with the functionality updated to fit the new name
- `buffer_as_vte_output` -> `render`
- `pid()` on the `Pane` trait now returns a `PaneId`
- Changed lots of functions in `tab.rs` to be more pane oriented, renaming some to remove the `terminal` and switching to `PaneId`s
- splitting functions in `tab.rs` now correctly update the positions of returned fragments
- Used `PaneId`'s as a replacement for `PaneKind` in the tab `BTreeMap`
- Removed `get_rows` and `get_columns` from the `Pane` trait
- Layouts can now create plugin panes!
- Changed lots of the `active_terminal` stuff in `tab.rs` to work with all panes
- Changed the `Tab` `render` function, so that common requirements are moved there and out of the `Pane::render()` methods
- Added a `shared.rs` to `utils` with a couple of useful functions
- We can now accept input and pass it to plugins via serialised JSON
- Trigger a screen render after handling input meant for a plugin
- Allow plugins to be properly closed
- Allow plugin panes to be split (opening a new terminal)
- Allow plugin API functions to send messages on the PTY bus
- Added the API functionality needed for a plugin to open a file in a new pane
- No more compiler warnings!
- Fixed 53 clippy lints!