geoidesic
TTyphonJS
•Created by geoidesic on 12/24/2024 in #typhonjs-runtime
Can the application to respond reactively to game.combat?
I tried this:
But it's not reactive.
I also tried:
And also tried with
game.combat.active
, which provides a boolean value, but still not reactively.22 replies
TTyphonJS
•Created by geoidesic on 12/15/2024 in #typhonjs-runtime
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?
2 replies
TTyphonJS
•Created by geoidesic on 12/14/2024 in #typhonjs-runtime
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?
5 replies
TTyphonJS
•Created by geoidesic on 11/29/2024 in #typhonjs-runtime
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?
10 replies
TTyphonJS
•Created by geoidesic on 10/15/2024 in #typhonjs-runtime
Is there any way to avoid 'game' is not defined lint error for vite build?
8 replies
TTyphonJS
•Created by geoidesic on 9/26/2024 in #typhonjs-runtime
TJSGameSettings doesn't respect `onChange` option?
So if I have a standard settings registration:
The alert will trigger.
However, if I wrap a setting via
TJSGameSettings
it won't trigger the onChange
hook. E.g.
Am I doing it wrong?3 replies
TTyphonJS
•Created by geoidesic on 8/10/2024 in #typhonjs-runtime
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?
30 replies
TTyphonJS
•Created by geoidesic on 8/1/2024 in #typhonjs-runtime
What's the best way to control default header items in a TJS application window?
27 replies
TTyphonJS
•Created by geoidesic on 7/24/2024 in #typhonjs-runtime
[vite] warning: Could not resolve import "#runtime/svelte/component/core"
I haven't seen this error before.
WelcomeAppShell.svelte
Foundry v12, developing a new system.
Any clues?18 replies
TTyphonJS
•Created by geoidesic on 6/28/2024 in #typhonjs-runtime
$actor.toObject() for a TJSDocument isn't reactive
I'm creating an actor in memory and assigning that to the TJSDocument on my application
Then to open the application:
PCAppShell does:
Then later in another componentI do this:
4 replies
TTyphonJS
•Created by geoidesic on 6/21/2024 in #typhonjs-runtime
v12 seems to break item reactivity for createFilterQuery
I've been trying out my system on v12. Something I notice is that some of my reactive components are no longer reactive. Specifically where I've used
createFilterQuery
. I don't get any errors but when the items in the wildcard list are changed, the view doesn't update.
I mean the filter select still works reactively but if any of the values of the items in the list are altered, or if the core list changes (e.g. item is added or deleted from the original unfiltered list) those changes aren't reactively rendered.
I don't understand why that might be but I've tested the same code in both v11 and v12 and it's working in v11.
My svelte component looks something like this:
It might not precisely be to do with createFilterQuery
. I'm not sure yet why it's happening, but certainly, what was working in v11 is not working in v12.4 replies
TTyphonJS
•Created by geoidesic on 6/19/2024 in #typhonjs-runtime
How to avoid Foundry Globals from causing vite build warnings?
I'm getting a lot of warnings from
vite-plugin-svelte
for foundry globals like TextEditor.enrichHTML(item.system.description.value || '')
. Any idea how I can make it ignore those or register them?
E.g.:
26 replies
TTyphonJS
•Created by geoidesic on 6/15/2024 in #typhonjs-runtime
Dynamic Imports work on dev server but not in build?
I'm having something weird. I'm doing dynamic async imports for certain dynamic components. It's working just find when run via a dev server (e.g. npm run dev) but once I build it, then the imports break.
From the error message it seems that the import is done via URL, rather than via code. The URL exists and is browsable in the dev server, but not once built.
Am I doing it wrong? Or are dynamic imports not available to the build?
E.g.
So this works if I run the dev server. It seems to find it via URL:
However, once built, the path it looks for changes, leaving out the module id and reporting a 404:
Even if I correct the ommssion in the URL manually I still see a 404
Any ideas?
22 replies
TTyphonJS
•Created by geoidesic on 6/10/2024 in #typhonjs-runtime
Can I use markdown with TJSProseMirror?
2 replies
TTyphonJS
•Created by geoidesic on 5/31/2024 in #typhonjs-runtime
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:
But I would like that CompendiumSourcesSubmenu
to be a svelte component, rather than the TypeScript / Handlebars extension to FormApplication
that it currently is (as it has been ported from an existing module)9 replies
TTyphonJS
•Created by geoidesic on 5/23/2024 in #typhonjs-runtime
dnd5e reactivity with race.advancement.byID
I'm having trouble when fetching a race
byUuid
with one particular reactive var:
Any ideas? Why adv
is undefined?
(The only special thing about byId
is that it's a getter)7 replies
TTyphonJS
•Created by geoidesic on 5/21/2024 in #typhonjs-runtime
Error in $doc.update()?
I'm not quite sure if I'm doing it wrong. The error I'm getting is:
Here's the component
Normally (e.g. in my system, as opposed to this module)
$doc.update()
just works for me. I haven't seen this _id
error before. It seems weird because update
is being called on $doc
, which is a TJSDocument
instance of the actor
, so it has the _id
already I would expect.5 replies
TTyphonJS
•Created by geoidesic on 5/11/2024 in #typhonjs-runtime
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 [email protected]: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?
Specifically I want to edit and debug in @typhonjs-fvtt/runtime/_dist/svelte/component/core/application/ApplicationShell
7 replies
TTyphonJS
•Created by geoidesic on 5/10/2024 in #typhonjs-runtime
importing from the runtime
I see this in the
template-svelte-esm
example:
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.5 replies
TTyphonJS
•Created by geoidesic on 5/10/2024 in #typhonjs-runtime
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:
... but no go33 replies