T
Join ServerTyphonJS
typhonjs-runtime
Release: `svelte-standard` 0.0.19 - Svelte sidebar applications
Greets @Developer. I have put out a patch to
You mainly just have to provide a component for the sidebar and the provided API does the rest.
I have made a video overview of this feature. I'll attach it to this post when it finishes processing. There is no new demo in
You can read the docs in the main API / implementation:
https://github.com/typhonjs-fvtt-lib/svelte-standard/blob/main/src/application/FVTTSidebarControl.js
Everything works w/ Vite dev server / HMR and is ready to go for any custom Svelte sidebar apps. Also this API is accessible for any developers including those making modules.
For game system devs I'd be glad to get more feedback on the API. I was thinking maybe it would be cool to make an API method to replace an existing default sidebar app w/ a Svelte powered one. If there are any ideas that make sense please do mention them. Right now the API only lets you add sidebar apps.
Basic usage:
https://www.youtube.com/watch?v=otmXoOtp7NQ
svelte-standard
fixing the ProseMirror library incompatibility for a corner case, but more exciting is a new API to add Svelte powered sidebar applications to the main Foundry sidebar easily and with lots of options that are all data defined. You mainly just have to provide a component for the sidebar and the provided API does the rest.
I have made a video overview of this feature. I'll attach it to this post when it finishes processing. There is no new demo in
essential-svelte-esm
, but the video should give you all the info needed to get started. You can read the docs in the main API / implementation:
https://github.com/typhonjs-fvtt-lib/svelte-standard/blob/main/src/application/FVTTSidebarControl.js
Everything works w/ Vite dev server / HMR and is ready to go for any custom Svelte sidebar apps. Also this API is accessible for any developers including those making modules.
For game system devs I'd be glad to get more feedback on the API. I was thinking maybe it would be cool to make an API method to replace an existing default sidebar app w/ a Svelte powered one. If there are any ideas that make sense please do mention them. Right now the API only lets you add sidebar apps.
Basic usage:
import { FVTTSidebarControl } from '@typhonjs-fvtt/svelte-standard/application';
Hooks.once('setup', () =>
{
FVTTSidebarControl.add({
beforeId: 'items', // Place new tab before the 'items' tab.
id: 'test', // A unique CSS ID.
icon: 'fas fa-dice-d10', // FontAwesome icon.
title: 'Test Directory', // Title of popout sidebar app; can be language string.
tooltip: 'Tests', // Tooltip for sidebar tab.
svelte: { // Svelte configuration object...
class: TestTab // A Svelte component.
props: { } // Props / pass your control / model code through here.
}
});
});
https://www.youtube.com/watch?v=otmXoOtp7NQ
Oh wow. Will have to dive into this. Thanks a bunch Typhon!
3 Messages Not Public
Sign In & Join Server To View
Lets go!
Yeah.. It's definitely possible to have the same kind of API like the
You can do more than what is in the code snippet as well.. A bit more in the video which I added to the post above, but here is the link:
https://www.youtube.com/watch?v=otmXoOtp7NQ
add
method and the data required and make it work to replace a stock Foundry sidebar app. It's a bit more involved behind the scene as I need to cleanup any resources from the stock implementation, but it should be possible and I believe useful. You can do more than what is in the code snippet as well.. A bit more in the video which I added to the post above, but here is the link:
https://www.youtube.com/watch?v=otmXoOtp7NQ
That's amazing!