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




Can I use markdown with TJSProseMirror?

I.e. https://github.com/prosemirror/prosemirror-markdown and https://prosemirror.net/examples/markdown/ I notice that the text node in my journal's pages collection documents has a markdown key which is undefined. This suggests to me that it's supported – although I don't know how to enable it?...
No description

What's the TJS way to extend FormApplication?

Specifically I want a custom type to register a component via game.settings.register e.g. a multi-select or checkbox list. E.g. I currently have this: ```javascript game.settings.registerMenu(MODULE_ID, SettingKeys.SOURCES, {...

Global Arrays & Writable Stores

I currently have this set to use a settings array to use to pass data to the SanityApp and also check to see if the Application is live because the application is to close if the array is empty. It's "populating the app" part and checking if the array is empty part is working as intended, but the interval I have set up in the script of the SanityApp appears to not be working as it's not updating automatically. SanityApp and SanityApplication.js ```js import { SvelteApplication } from '#runtime/svelte/application'; import SanityApp from './templates/SanityApp.svelte'; import { FatesDescentRoll } from './FatesDescentRoll.js'; import { MODULE_ID } from './settings.js';...

dnd5e reactivity with race.advancement.byID

I'm having trouble when fetching a race byUuid with one particular reactive var: ```javascript const selectHandler = async (option) => { race = await fromUuid(option); console.log(source); //<-- works...

Application !Closing

Good day folk, first time Svelte app tinkerer here. I am having a little bit of an issue getting this app to close after either button is pressed. Any ideas where I am failing? ```html <script> import { createEventDispatcher } from 'svelte'; import { ApplicationShell } from '#runtime/svelte/component/core'; import { FatesDescentRoll } from '../FatesDescentRoll.js';...
No description

TRL `0.1.3` - v12 Hot Patch

Greets @FVTT ▹ Developer! I have just released a hot patch release that addresses the v12 Foundry update and fixes a few odds and ends. - Reactive embedded collections of TJSDocument continue to work on v12. - HMR for language files works again. - Default app position tweening reduced to 60ms....

Error in $doc.update()?

I'm not quite sure if I'm doing it wrong. The error I'm getting is: ``` foundry.js:13637 Uncaught (in promise) Error: You must provide an _id for every object in the update data Array. at #preUpdateDocumentArray (foundry.js:13637:32) at ClientDatabaseBackend._updateDocuments (foundry.js:13449:73)...

Rest & Recovery 5e

Just creating a forum post to chat about upgrading the Rest & Recovery 5e module to the latest TRL and future integration aspects w/ Tidy Sheets 5e. @Michael

local link of the runtime

Because the current runtime has some build issues and also because I am trying to debug something (i.e. application css overflow), I would like to be able to edit the runtime. I tried editing the runtime in node_modules but changes weren't seen (even after clearing vite-cache. Yarn offers yarn patch and yarn link which are potential solutions. However, when I tried to git clone git@github.com:typhonjs-fvtt-lib/typhonjs.git I got confused because it does not contain the same folders / files as in node_modules @typhonjs-fvtt/runtime. So the question is how do I get a local, editable copy of the runtime linked to my local module for debugging? ...

importing from the runtime

I see this in the template-svelte-esm example:
import { ApplicationShell } from '#runtime/svelte/component/core';
import { ApplicationShell } from '#runtime/svelte/component/core';
I'm not familiar with this syntax – i.e. the # here in the path. What does it mean and what enables it? I looked in vite.config.js and the # symbol doesn't appear in that file. I also couldn't find anything about that being standard sugar for ESM6 syntax....

lang localization in svelte template?

So far I've only managed to do this via data-tooltip, which picks up the localization string magically (presumably a FoundryVTT feature). What's the best way to use localization strings in a TJS-inspired svelte template directly? I tried this: ```javascript export const lang = game.i18n.localize;...

How can I use typescript with `template-svelte-esm`?

Is there a way to get the template-svelte-esm HMR working with typescript? I had a go but wasn't able. Like it builds but the URL doesn't work, can't serve the built index.js file for some reason. I'm guessing that HMR is not possible if I'm using typescript? So I'd have to build each time?...

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)....

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?

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. ...

Advanced Templates Module (PF1)

A thread to discuss Svelte and the Advanced Templates module.

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....

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.

TJSDocument delete action

When emitting this event, TJSDocument passes "undefined" as the first argument instead of the document?