Provides a series of essential ES Module demos from "Hello World" to more involved examples of using the TyphonJS Runtime Library and Svelte on Foundry VTT.
Getting started with a new library or development methodology can be difficult. This demo module provides the essentials with working with Svelte and various aspects that are provided with the TyphonJS Runtime Library. Please stop by the Discord server to ask any questions.
essential-svelte-esm
as the folder installed in your module directory as this is the name
used in module.json
).npm install
build
to create the production bundle or dev
to run in developer mode which uses esbuild
&
HMR (hot module replacement) to dynamically update your running module in real time for all Svelte related components.Essential Svelte (ESM)
visible in your modules list.Essential Svelte (ESM)
under Manage Modules
.You may also install this demo module directly with the following link by pasting it into manifest URL
field in the
add-on modules / install module
screen:
https://github.com/typhonjs-fvtt-demo/essential-svelte-esm/releases/latest/download/module.json
Presently there are two demo examples. The first is the "Hello Foundry / World" example:
Hello Foundry
.Launch a modal dialog
button shows off the really neat modal dialog capability of TRL. This creates
a dialog using a "glasspane" approach that prevents users from interacting with the rest of the Foundry UI without
causing Foundry itself to pause. (TJSDialog.prompt
)draggable
, minimizable
and resizable
show a few of the reactive Application options that
can be dynamically changed during runtime. If you click off 'draggable' the application window is no longer draggable;
likewise turn off minimizable prevents the window from being minimized when clicking the title bar. Clicking off
resizable dynamically turns off the resize capability of the window. There are several additional standard application
options that are reactive with TRL application shells.The second example shows the reactive positional capabilities of TRL:
The TyphonJS Runtime Library (TRL) brings an exciting new library resource for all Foundry VTT developers to build advanced modules and game systems using Svelte. A Svelte UI component library built for Foundry and extensions to the core Foundry UI / Application framework make it easy to create declarative Svelte based UIs in a method familiar to Foundry VTT developers. The core UI component framework contains reactive "application shells" that provide an enhanced ability to control your UI / window experience including intro and outro transitions along with support key UI elements like context menus and a new backward compatible and API compliant Dialog component that features a modal dialog option.