runtime Svelte Themes

Runtime

Provides a common runtime library module for Foundry VTT distributing: @typhonjs-fvtt/svelte, @typhonjs-plugin/manager, and DOMPurify.

About:

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 supporting key UI elements like context menus and a new backward compatible and API compliant Dialog component that features a modal dialog option.

TRL is innovative as it delivers a runtime library module for Foundry that packages up the runtime in a way that can be shared across any number of modules / game systems utilizing it thereby saving a lot of space in any given module or game system and across all Foundry packages that incorporate the runtime library module. Optionally, it is possible to also bundle TRL directly into your module or game system. The TRL is both a Foundry library module (forthcoming) and a NPM package providing the development dependency utilized while authoring a Foundry package.

Installation:

In your package.json imports and dependencies include:

{
  "imports": {
    "#runtime/*": "@typhonjs-fvtt/runtime/*"
  },
  "dependencies": {
    "@typhonjs-fvtt/runtime": "^0.2.0",
    "svelte": "^4.0.0"
  }
}

You may use the highest released Svelte version greater than 4.0.0. It is recommended that you view the demo examples for the rest of the standard configuration details which use Vite for building your package.

API Documentation:

The initial beta release of TRL now has unified API documentation for all ESM packages available here. Work is still ongoing to provide type declarations and documentation for all of the Svelte components available in TRL.

ES Module Demo Module:

Roadmap:

The following roadmap contains a high level overview of aspects that will be added to the TRL.

  • Complete native Svelte drag and drop support with support for reactive embedded collections.
  • Continue to add relevant core components useful in standard Foundry UI development.

Top categories

Loading Svelte Themes