TyphonJS

T

TyphonJS

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

Join

typhonjs-runtime

packages

SidebarControl musings

I got very intrigued by FVTTSidebarControl and it calls to me to make PF2e Graphics basically have its own sidebar for displaying stored animations. I'd even indulge in that calling but do you have any ideas on how to make such a thing work without an actual collection to save all of it in? I thought of maybe some kind of derived store that takes in all user flags and world setting but that sounds... inefficient....

TJS ChatMessage doesn't include the standard chat header

I'm having a weird problem (as usual for me) where in this paraticular system, chat messages that use a Svelte template are being generated without the standard header (i.e. time ago and trash can for deletion). I had it working fine in another system, ported it over to this system and now it's excluding the headers and I can't for the life of me figure out why. Any clues?...

[Discussion] template-svelte-ts

Just ongoing discussion about new TS features of TRL and template-svelte-ts.

Get dynamic application width

I think there was a way to do this? I had a look at essential-svelte-esm but couldn't quite grok how to access application width from within my svelte app shell?

Minimal.... Nah Maximal FVTT types for TRL

Heya... @Faey, @Vauxs, and others interested in discussing / iterating on some common / minimal types for the areas of the core Foundry API that are touched by TRL. I am starting a new repo / project types-core. providing the minimum amount of core types useful in fulfilling interface aspects. This will be exposed in the runtime library via a new sub-path export #runtime/types/fvtt . I'd like to get a rough version up today. Some of it will just be pulling a minimal set of things from the v12 community types, but making sure things / distributed in a way that makes sense for TRL. At least with the AppV1 Application class things should be firmly defined....

Can't open more than one character sheet at a time

I'm having some trouble figuring out what's causing this behaviour. Any clues? ```javascript foundry.js:655 Error: An error occurred while rendering FF15ActorSheet 27. Cannot read properties of undefined (reading 'parentElement') at Hooks.onError (foundry.js:654:24) at 🎁call_wrapped [as call_wrapped] (libWrapper-wrapper.js:507:22)...

TRL `0.2.0-next.X` Update Marathon

Greets @FVTT ▹ Developer, I am starting a new post to discuss / troubleshoot any problems or concerns you might have in regard to updating to the beta build of TRL 0.2.0-next.2 and beyond. The 0.2.x release series of TRL is all about hardening & streamlining the API taking a solid 2nd+ pass over everything. It represents "peak TRL" for Svelte 4. My goal is to ship 0.2.0 on Wednesday. It's API / feature complete, but receiving any early feedback and learning about any problems you have in updating will help me create a better official release video where I can mention aspects that will help others update. If you have time before Wednesday to start your effort now is appreciated. If you are having problems let me know here or get in contact directly. I can help out with a PR if necessary....

Is there any way to avoid 'game' is not defined lint error for vite build?

7:09:30 PM [vite-plugin-svelte] /Users/noeldacosta/code/foundryvtt-final-fantasy/src/components/organisms/item/shared/EffectsTab.svelte:172:768 'game' is not defined
170:
7:09:30 PM [vite-plugin-svelte] /Users/noeldacosta/code/foundryvtt-final-fantasy/src/components/organisms/item/shared/EffectsTab.svelte:172:768 'game' is not defined
170:
...

Injecting .svelte code into existing Foundry Document

okay, now that I've got my project set up with Svelte, how would I go about injecting the html from my .svelte file into existing html? In my existing code, I was able to use html.find('.sub-nav:not(.sub-sub-nav)').append('<a data-tab="subsystems" class="">Subsystems</a>') to add the subsystems tab in that top block, and I have an append statement prepped to get the rest of my html in the appropriate place as shown below: html.find('.container').append('<div class="tab" data-tab="subsystems" data-region="subsystems"> CODE HERE </div>')...
No description

Failed to resolve module specifier "#runtime/svelte/application"

Trying to set up a new module from the following repository. https://github.com/typhonjs-fvtt-demo/template-svelte-esm I followed all the instructions listed in the readme (though I did have to install Node.js separately, which wasn't specified) and everything seems fine except when I launch the world, I get this error. Any advice on how to resolve this? Did I not install something or install the wrong version? I downloaded Node.js 20.18.0...
No description

Discussion: TRL 0.2.0-next.1 Pre-release

Greets @FVTT ▹ Developer, I'd like to open a discussion prior to the initial 0.2.0-next.1 release to set expectations and address concerns. When released I recommend as many folks to upgrade as soon as possible to get a better testing pool. Like all of the TRL releases even the first "beta" release will be rock solid and production ready. The further next.X series of releases will mostly be refining types particularly new Foundry core types and other odds and ends. All of the major refactoring of sub-path exports will be present from the initial release as well as various fixes reported since v12 dropped and many other useful enhancements to TRL. The discussion below relates to 0.2.0 update concerns and not TRL 0.1.x. ...

TJSGameSettings doesn't respect `onChange` option?

So if I have a standard settings registration: ```javascript function dontShowWelcome() { game.settings.register(MODULE_ID, 'dontShowWelcome', { name: game.i18n.localize('GAS.Setting.DontShowWelcome.Name'),...

Derived Store - To use or not to use

From #dev-lounge - I'm thinking of rewriting my monolithic class-based stores in Item Piles to something more maintainable - when I create a derived store based on a value in another large store, is that faster/better than just creating multiple stores for the properties of the large store?

Separate components unintentionally updating one another

I don't know how I ended up here, but I have a bizarre bug where I have two windows open and one of them sends data to another. There is no code that shares state between the two.

How can I respond to the _onDrop event in the shell?

I'm working with a SvelteApplication. I can edit the _onDrop method on the sheet but how do I react to it in the svelte shell?

TJSGameSettings getStore not saving properly?

I have a bizzare interaction right now with TJSGameSettings.getStore / getWritableStore. It gets updated, I even see in the console through game.settings.get that the setting has been "updated" Then I refresh and the changes made disappear. What gives?...

ProseMirror UUID discussion

Hi @Jons. I'd be glad to continue the discussion here. I don't see anything immediately that is related to the TJSProseMirror component. The actual editor and such is the Foundry implementation underneath. There are additional plugins and such added, but it's not clear yet if what you are doing in regard to interaction would hit any of the aspects added by TJSProseMirror Can you more specifically outline the problem that you are seeing and perhaps put some console.log statements in foundry-esm.js to verify the UUID being parsed. The drag and drop of documents into the editor when active should be something completely controlled by the underlying Foundry implementation....

TJSDocumentProperty Prototype

So I implemented a prototype of a custom store implementation that wraps a TJSDocument instance that allows dynamic store access to property accessors. TJSDocumentProperty is a complete Writable instance allowing update to be used when more complex modification is required for the underlying property; IE pushing to an array or modifying a nested object. I included TJSDocumentProperty as an attachment to this post. Also is a demo Svelte component that can be copied to BasicDocAppShell in essential-svelte-esm. This demo is what is shown in the video preview. Note: That I'm using the internal 0.2.0 pre-release code and likely there are modifications necessary to get this to work with 0.1.3 which likely has slightly different context callback data. Also note that the core v12 changes for renderContext are not normalized yet. TJSDocument will receive a facelift for the 0.2.0 release and quite likely a solution related to TJSDocumentProperty will be available built-in to TJSDocument...

TinyTJS Enriched options

So for the tinymce editor https://github.com/typhonjs-fvtt-lib/svelte-standard/blob/main/src/component/standard/editor/tinymce/TJSTinyMCE.svelte the repo shows that you can pass in options.enrichOptions. But in the browser enrichOptions doesn't exist that file.
No description

What's the best way to control default header items in a TJS application window?

I tried the ESM example: ```javascript <svelte:options accessors={true} /> <script>javascript...
No description
Next