Release: `svelte-standard` 0.0.21 - Svelte sidebar apps refinement (final?)
Greets @FVTT ▹ Developer. This update provides what should be the final refinement for
The
Another useful new field particularly for replacing core Foundry sidebars is
Other small changes include:
FVTTSidebarControl. Given some initial feedback a few more features have been added. Usually there isn't this much incremental additions so quickly w/ svelte-standard, but this update really should finalize FVTTSidebarControl.The
add, remove, replace methods now take an optional condition field that can be a boolean or function that returns a truthy value to conditionally run the sidebar action. This allows you to add condition: () => game.user.isGM for instance to only add / replace, etc. the sidebar for GM users. Another useful new field particularly for replacing core Foundry sidebars is
mergeAppImpl. This allows you to provide the control / model code that implements whatever API the core sidebar app may provide directly in the add / replace data. Instead of augmenting the globalThis.ui.<SIDEBAR ID> field via FVTTSidebarControl.wait().then() you can directly include a custom implementation to merge directly in add / replace.Other small changes include:
- `remove` / `replace` methods data fields `removeId` / `replaceId` is now just `id`. This makes for a little nicer data defined API.
- Enhanced error handling where an error in loading one sidebar will not affect other sidebar actions.