TyphonJS

T

TyphonJS

Join the community to ask questions about TyphonJS and get answers from other members.

Join

typhonjs-runtime

packages

Fabricate

@MisterPotts. Just starting a forum post to keep track of the conversation.
Fabricate doesn't maintain any of its own documents; it only records metadata in its settings. Do you think that would be a problem for TRL? For example, is there an assumption that applications are tied to documents? I would be surprised, but thought it worth asking up front...

Svelte 5 TJSDocument Prototype

Greets @FVTT ▹ Developer. As some of you might have seen there is a bit of paradigm shift that is going to occur when Svelte 5 drops with a new way of defining reactive state. Please check some of the recent discussion in the #dev-lounge for links to the Svelte 5 blog post and a few other things. https://svelte.dev/blog/runes https://svelte-5-preview.vercel.app/docs/introduction...

Funky interaction with fokus management

TJS's Focus Management is creating fun issues for me again. focusKeep = true causes my drag and drop sortable list to break (@jhubbardsf/svelte-sortablejs) but focusKeep = false causes my dropdown menu component to break (svelte-select). I have now defaulted to focusAuto = false because I do not have the energy to fix either of them on my own right now. I think having at least a foundry-ish dropdown menu might be a fun idea for a svelte-standard component though.

How to get rid of funky Prosemirror overlap

Hi. I'm getting some overlap with Prosemirror (see image) any ideas how to avoid that? ``` "@typhonjs-fvtt/runtime": "^0.1.0", "@typhonjs-fvtt/svelte-standard": "^0.1.0",...
No description

TJSDocument not working properly with Module Sub-Types (Data Models)

In Foundry, modules can define a Sub-Types using Data Models. On Data Models we can also define functions. We can also update the parent document using this.updateSource(), for example: ```js...

TRL `0.1.2` - Fine Tuning release

Greets @FVTT ▹ Developer! I have just released a fine tuning release that brings a few more features, but really shores up a few things that slipped by initial testing of the beta release. I got in several small enhancements suggested by the dev community. There is one possible breaking change, but it is minor and I will discuss it after the release notes below. Do keep the conversation going and let me know about things that you encounter. The API docs are updated:...

Embed a DropDown/MenuList made with Svelte

Hello again! 😄 I've been pondering creating a second module for Foundry and a few questions popped up. The idea is to display a Menu/MenuItem using Svelte/TyphonJS when the user clicks on a specific element within a Journal. Now, since the journal is an integral part of Foundry, I'm a bit uncertain about the feasibility of this. Any advice? My initial idea was to trigger the creation of a SvelteApplication ( EmptyApplicationShell ) with an invisible bkg which opens a MenuList. As soon as the MenuItem is selected it will close the app. By doing so I can work in isolation....

Slide Animations for SvelteApplication

I'd like my window ( which is an EmptyApplicationShell ) to play a slide-in animation when open and a slide-out animation when closed. Something where I see it coming out from the border of the main app. Is it feasible?

Bug: Multiple ProseMirror editors on same svelte component do not save properly

Simple reproduction in a foundry world with at least one actor defined: ``` <svelte:options accessors={true} /> <script>...

System Works in Dev Mode but not after build

After updating to 0.1.1, I noticed something odd happening. The TITAN system now seems to work when I run in dev mode. But when I run a built version, there is nothing. It's just the base foundry system....

Error building after updating to TRL 0.1.1

Recently updated the TITAN system to TRL 0.1.1, but when I npm run build it errors out. Not sure why. ```js [commonjs--resolver] Missing "./svelte/store" specifier in "@typhonjs-fvtt/runtime" package error during build:...

TJSApplication Character Sheet odd behavior with unlinked tokens

Has anyone else experienced weird when using a TJSApplication as a character sheet with unlinked tokens? In my system, updating the base actor attempts to render the actor sheet for every token on the scene, regardless of whether that token's sheet was open previously. Every token whose sheet hasn't been rendered yet, will cause a fairly predictable "TypeError: An error occurred while rendering TJSDocSheet 45. this._element is null" - the sheet isn't mounted anywhere, so big surprise there. All other sheets will be made visible simultaneously. I think the SvelteApplication _render is missing the following check from foundry.js:
// Applications which are not currently rendered must be forced
if ( !force && (this._state <= states.NONE) ) return;
// Applications which are not currently rendered must be forced
if ( !force && (this._state <= states.NONE) ) return;
...

TJSDocumentCollection best practices?

Hi! I've got a little component I'm using whose purpose is basically to just show a tiny preview of a resolved actor UUID. However, I want it to "short-circuit" (really more like long circuit) so that it grabs a world actor with the same name first, so repeated drag-drops of the same actor onto a scene doesn't infinitely duplicate... TL;DR: I need to be reactive on game.actors, and to do so was going to use a TJSDocumentCollection. Now for my actual ask. Within my component I have the following code. ```JS <script>...

Release `TRL 0.1.1` - Patch release

Greets @FVTT ▹ Developer! I have just released a patch / fix release that fixes a small oversight in the 0.1.0 release regarding the internally used ResizableHandle Svelte component for application windows via ApplicationShell. In the 0.1.0 release if you set width or height to auto and the app window is resizable an error occured. This was just a missed refactoring aspect to some internal code and I happened to not catch it in testing for the 0.1.0 release as it was data specific in how an app is setup. Another fix is passing the element as a JQuery element in the SvelteApplication hook invocation for closeApplication. ...

Uncaught TypeError: $storeElementRoot is undefined

Hi! Encountering the following error when trying to resize an application based on a TJSApplicationShell. Exception: ``` Uncaught TypeError: $storeElementRoot is undefined onResizePointerDown ResizableHandle.svelte:128 resizeDown ResizableHandle.svelte:71...

Popcorn Initiative

Just opening a forum post to track @gerark progress w/ TRL & Svelte + an initial idea of implementing "popcorn initiative"... 😄

Token Action HUD

Let's continue chatting about TAH here to keep track of discussion @larkinabout

PostcssConfig seem not workin with 0.1.0

@mleahy sorry to bother i'm trying to use the postccs feature of the @typhonjs-fvtt/runtime on the module Tidy5eSheet, but for some reason is seem not to work , the 'autoprefixer' in the specific. Can you take a quick look at the vite configuration when you can ? https://raw.githubusercontent.com/sdenec/tidy5e-sheet/master/vite.config.mjs

TJSDocument for aggregating actor flags for Svelte Component

I'm sure this is very simple, but I'm having a hard time understanding how to get this to work. Maybe someone can provide a quicker pointer or two. For a module I'm working on, I'm storing attributes as flags on the Actors document. An example is as such: ``` _ActorPF2e2 : {...

Update to ChatMessage outside of Svelte doesn't trigger reactivity on linked TJSDocument

I'm a bit confused about this... 1. When I render a ChatMessage via svelte, in the chat message svelte component I do: ```javascript let foundryChatMessageDocument = new TJSDocument(void 0, { delete: () => {} }),...