TyphonJS

T

TyphonJS

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

Join

typhonjs-runtime

packages

v11 Debug embedded collection changes

Just a post to track the v11 changes to embedded collections and what needs to be updated in an interim TRL release to support this change.

How can I create an embeddedCollection in a chat message?

I have this: ```javascript const messageDocument = game.messages.get(message._id); const doc = new TJSDocument(messageDocument); doc.embedded.create("Targets", targets);...

Hooks in svelte component? (not really a typhon question but nowhere else to ask :)

In my foundry index.js I'm listening for hook:
Hooks.on('renderChatMessage', doSomething);
Hooks.on('renderChatMessage', doSomething);
However I want to also listen for that hook in a chat card svelte component (one that is already rendered to the Chat panel):...

Actor update error, TRL/Svelte Token interaction?

Ran into a bug I think, not sure if this is with Foundry or TRL. Related to the duplicate actor sheet issue Geoidesic ran into a few months back. Same issue, I'm getting duplicate character sheets when I try to run
actor.update()
actor.update()
. I traced the error back, looks like it's coming from
TokenDocument._onUpdateBaseActor()
TokenDocument._onUpdateBaseActor()
making a
this.actor.sheet.render(false)
this.actor.sheet.render(false)
call on line 565 in Foundry client/data/documents/token.js. I think this call to render is unnecessary for TRL and is causing SvelteApplication.js to throw a cannot read properties of null error on line 876 at
this.onSvelteMount({ element: this._element[0]...
this.onSvelteMount({ element: this._element[0]...
, _element[0] is undefined in this case. Looks like
TokenDocument._onUpdatedBaseActor()
TokenDocument._onUpdatedBaseActor()
isn't respecting the
{render: false}
{render: false}
context property, so passing render: false doesn't fix the issue. Not sure if that's intended behavior or not....

Debugging TJSMenu for Auto Animations on Level Up - 5e

Just a forum thread to discuss and explore an interesting phenomenon w/ TJSMenu not responding on the Level Up - 5e system. Both the module and system use TRL.

Z-index on TJSDialogs

For some reason TJSDialogs have an insane z-index value which makes them always appear on top of other dialogs. This leads to some dialogs opening up behind the TJSDialogs leading users to believe that a dialog hasn't been opened. Example dialog ```js export default class ActionConfigDialog extends TJSDialog {...
No description

Question: Modifying class list of SvelteApplication

A question from @dorako:
so, my module hooks into renderApplication and modifies the html[0].classList to add a .dorako-ui class to most Applications, but this strategy does not work for Svelte Applications. I had suspected this would be the case, but I'm not sure why or how to fix it.
Would I need to submit some sort of update to the SvelteApplication to push my dorako-ui class to the options.classes?...

Blur on moving elements

After a few months of being gone, this started showing up for me again. Not sure why. It seems that while an element is transitioning, it blurs, and sometimes doesn't unblur. Only happens when zoomed in larger than 100%. Only happens on Chromium browsers. Does not seem to consistently happen with the same elements from session to session....
No description

Creating a svelte store of a document's flags

Is this wise, if even possible? Like I want to create a writable store of a message's flags, so that I can freely edit it without having to worry about Foundry's update functions....

Dropdowns are not mouse-interactable inside ApplicationShell

I can't click on the entries created by either Svelecte or svelte-select if that dropdown is inside an ApplicationShell

Chat Message Failed to Render

Attempting to load multiple svelte elements into a chat message. So far I was successful, but the moment I try to add a specific anchor to the svelte component, it breaks, resulting in:
No description

Settings are not a store and Chat Messages Talk

I wanted to grab the TJSGameSettings stores, but it seems that they are not actual stores? They have subscribe, set, and update methods... What I am doing here is essentially ```js gameSettings = new TJSGameSettings("pf2e-target-damage") console.log($gameSettings.getWritableStore("classic"))...
No description

Settings Page

I was looking at ways to override the default foundry tab for settings and was wondering if there's a way to use svelte/TRL to display our system settings instead of core behavior. I also tried creating a new settings menu and instead of extending FormApplication using either SvelteApplication or TJSDialog but foundry doesn't seem to register those as clickable buttons in the settings menu.

Release: `svelte-standard` 0.0.23 - "secrets" in editor components respect GM user level.

Greets @FVTT ▹ Developer! Just a small patch note for svelte-standard that went out earlier this week. I fixed TJSTinyMCE and TJSProseMirror editor components to respect the GM user level when enriching content. These components now properly hide secret blocks in the editor content for non-GM users. ---...

Release: `svelte-standard` 0.0.22 - small fix for new a11y warnings in latest Svelte.

Greets @FVTT ▹ Developer. I just pushed out a small update to svelte-standard to handle the new a11y warning, no-noninteractive-element-to-interactive-role that popped up in Svelte 3.57.0. Despite having what I think are proper role and tabindex settings for TJSMenu and TJSContextMenu Svelte complained w/ this new a11y warning. This is now resolved. So nothing groundbreaking here, just making sure you have a warning free build process w/ the latest Svelte....

Core chat sidebar extension

Continuing a discussion with @voodoofrog about a project to extend the core chat sidebar panel.

Release: `svelte-standard` 0.0.21 - Svelte sidebar apps refinement (final?)

Greets @FVTT ▹ Developer. This update provides what should be the final refinement for FVTTSidebarControl. Given some initial feedback a few more features have been added. Usually there isn't this much incremental additions so quickly w/ svelte-standard, but this update really should finalize FVTTSidebarControl. The add, remove, replace methods now take an optional condition field that can be a boolean or function that returns a truthy value to conditionally run the sidebar action. This allows you to add condition: () => game.user.isGM for instance to only add / replace, etc. the sidebar for GM users. Another useful new field particularly for replacing core Foundry sidebars is mergeAppImpl. This allows you to provide the control / model code that implements whatever API the core sidebar app may provide directly in the add / replace data. Instead of augmenting the globalThis.ui.<SIDEBAR ID> field via FVTTSidebarControl.wait().then() you can directly include a custom implementation to merge directly in add / replace....

Sequencer: Powered by Svelte

I've started on the long overdue conversion for sequencer to have its UI powered by Svelte, which allows for much easier visualization of its database. Next up, the effect manager!

Release: `svelte-standard` 0.0.20 - More Svelte sidebar apps

Greets @FVTT ▹ Developer. Following on the heels of svelte-standard 0.0.19 the latest release further extends FVTTSidebarControl allowing you to replace an existing Foundry sidebar app w/ a Svelte powered sidebar and also the ability to remove a stock Foundry sidebar app from the core Sidebar app. The replacement aspect was requested and I had a good idea that it would be useful. Please do report any problems using this new API. Replacing existing sidebars will require you to augment required methods in the given core sidebar app being replaced. Use FVTTSidebarControl.wait().then() to augment as necessary. A very basic and incomplete example of augmenting combat tracker replacement is in the sample code below. There is no new developer overview video as the essentials are more or less the same except there are new FVTTSidebarControl.remove and FVTTSidebarControl.replace methods. Do feel free to checkout the last update video though: https://www.youtube.com/watch?v=otmXoOtp7NQ Basic usage:...

Release: `svelte-standard` 0.0.19 - Svelte sidebar applications

Greets @FVTT ▹ Developer. I have put out a patch to svelte-standard fixing the ProseMirror library incompatibility for a corner case, but more exciting is a new API to add Svelte powered sidebar applications to the main Foundry sidebar easily and with lots of options that are all data defined. You mainly just have to provide a component for the sidebar and the provided API does the rest. I have made a video overview of this feature. I'll attach it to this post when it finishes processing. There is no new demo in essential-svelte-esm, but the video should give you all the info needed to get started. ...