TyphonJS

T

TyphonJS

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

Join Server
SSolidor3/15/2024

Dynamic Reducers use cases

I am currently in the process of rewriting how the Titan system handles some things, and I was wondering about whether I should start using the dynamic reducers. Way back when I first made the system, the TJS dynamic reducers didn't exist yet, so went through the process of setting up my own item list component for character sheets. Essentially, the component is a reactive list that looks through an actor's item using a filter function (such as type === 'spell', etc)....
VVauxs3/8/2024

ApplicationShell, elementRoot, and reactive offsetHeight with resizable: true

I am trying to make a menu that requires a bit of JS in order to work to set maximum heights for lists that otherwise should scroll. Problem is that I cannot find a way to get an up to date elementRoot.offsetHeight when the user resizes the application window. Is there a way to get those values?
TMTyphonJS (Michael)3/5/2024

TJSDocument discussion w/ VoodooFrog

Following up on this discussion from #dev-lounge from @VoodooFrog:
I have a TJSDocument for an actor in which I am creating an embedded store which filters out certain items on the actor. These are then each displayed with their own component which contains a select that sets some data. Now, I have created a new select control in the parent that sets all the items via an update to a given value, but upon doing so the child component is not reflecting the change in their own controls (and yes I am setting the selected value based on the data). Any ideas what might be happening or how I can fix it? I don't have the code in my repo yet, as I'm still working on it so I can't just link the source, unfortunately. ...
TMTyphonJS (Michael)2/6/2024

Advanced Templates Module (PF1)

A thread to discuss Svelte and the Advanced Templates module.
TMTyphonJS (Michael)1/30/2024

Automated Animations

This is a forum post to track discussion on Automated Animations. When TRL 0.2.0 is released I plan to update AA to the latest. In the meantime this post also is for discussing AA and an attempt to provide feedback for those that are trying to add new system support to it....
NDNekro Darkmoon1/19/2024

setPosition in SvelteApplication

The SvelteApplication class has a function called setPosition that is there to support core behavior. And while it exists and is called when opening the app. It isn't really called when minimizing, maximizing, or changing the position of the window itself. This means that any modules that try to wrap the setPosition function to extend features fail to do so.
MMagus12/17/2023

TJSDocument delete action

When emitting this event, TJSDocument passes "undefined" as the first argument instead of the document?
NDNekro Darkmoon11/30/2023

Creating a derived reducer for a DynMapReducer

Do you have an example of how to make a derived reducer for a reducer that's not part of a TJSDcoument? ```js const reducer = getContext("reducer"); let derived = [];...
WWasp11/5/2023

Item Piles: Auctioneer

A few people in the League & some that I know personally have commissioned an Item Piles powered auction house solution, so I have obliged. This is very WIP still!
No description
WWasp10/24/2023

Svelecte Alternatives

I'm looking to implement a searchable list of sorts, and I found Svelecte: https://mskocik.github.io/svelecte/ However, as with most plugins, obviously it has little chance to fit into Foundry applications - is there any similar things I could use in its place with TJS? TJSContextMenu seems the closest approximation!...
TMTyphonJS (Michael)10/24/2023

Setting up TRL / contributing to existing module (Item Piles)

Hi @Paith. I have started this forum post where we can continue to discuss setting up TRL and getting you on the path to potentially investigating / contributing to Item Piles. I'm going to include @Wasp as well who develops / maintains Item Piles. Lots to potentially discuss and I'm definitely keen to help. Check the pins in #welcome for an overview on TRL and various additional / demo resources that are available. Getting your developer setup via Node / NPM will be the first thing to make sure you have sorted....
TMTyphonJS (Michael)10/22/2023

Reactivty and prepareDerivedData

From @Wasp
So I'm using prepareDerivedData to, well, derive some data for my items; some of them are tied to each other (ie, an "equipment" type item affects a "skill" type item's bonus). I was hoping that re-calling the derived data methods would cause the TJSDocuments to pick up the alterations, but since it's not a database operation, it doesn't appear to pick that up. Is there a good way allow one item to cause the reactivity of another without manually creating stores?
Moving discusion to forum post....
TMTyphonJS (Michael)10/17/2023

Local Development w/ NPM Link

From @Gerark:
Hello! this is probably a base webdev question but I can't find a good reference for the issue I'm having atm. I'm working on a TyphonJS template project and I'm importing a custom svelte library ( basically a UI component library ). I'd like to use npm link to work a bit more effectively without having to publish to npm a new package over and over whenever I make changes to the custom library. Apart from the npm link command to call on both sides ( with different parameters ) is there anything I should take care of?...
MMagus10/15/2023

Issues Configuring TyphonJS in TS

I'm receiving this message in my TS Files: Cannot find module '#runtime/svelte/application' or its corresponding type declarations. I thought including a paths property in tsconfig.json would fix it, but no: ```...
TMTyphonJS (Michael)10/6/2023

TRL / Svelte based game systems

This post is a list of repos for game systems built with TRL / Svelte for Foundry. Please DM me if you'd like to add yours to the following lists. Released (available on Foundry package manager): - Level Up A5e: https://github.com/Pjb518/FoundryVTT-Level-Up-Official; @Nekro Darkmoon, @Phil ...
TMTyphonJS (Michael)9/26/2023

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...
TMTyphonJS (Michael)9/25/2023

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...
Ffaey9/19/2023

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.
Ggeoidesic9/19/2023

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
Next