TyphonJS
Join the TyphonJS server to ask questions!
Join ServerTyphonJS
Join the community to ask questions about TyphonJS and get answers from other members.
Join ServerCommunity questions
Channels
Fabricate
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
There are no particular data / document associations for TRL apps. Depending on where you are storing the metadata there are several reac...
Svelte 5 TJSDocument Prototype
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
I just worked up a potential prototype in the Svelte 5 REPL for what this could bring to TJSDocument for direc...
Funky interaction with fokus management
How to get rid of funky Prosemirror overlap
"@typhonjs-fvtt/runtime": "^0.1.0",
"@typhonjs-fvtt/svelte-standard": "^0.1.0",
It's like the Prosemirror component doesn't expand the height of it's container while editing. It's fine after the edit, i.e. the rendered content doesn't overflow the container once the content is saved and the editor closed.
Looking at the prosemirror npm repo it looks like it has been discontinued. What include...
TJSDocument not working properly with Module Sub-Types (Data Models)
On Data Models we can also define functions. We can also update the parent document using
this.updateSource()
, for example:```js
export default class MyCustomDataModel extends foundry.abstract.TypeDataModel {
static defineSchema() {
const fields = foundry.data.fields;
return {
customField: new fields.Stri...
TRL `0.1.2` - Fine Tuning release
I have just released a fine tuning release that brings a few more features, but really shores up a few things that slipped by initial testing of the beta release. I got in several small enhancements suggested by the dev community. There is one possible breaking change, but it is minor and I will discuss it after the release notes below. Do keep the conversation going and let me know about things that you encounter.
The API docs are updated:
<https://typhonjs-fvtt-lib....
Embed a DropDown/MenuList made with Svelte
I've been pondering creating a second module for Foundry and a few questions popped up. The idea is to display a Menu/MenuItem using Svelte/TyphonJS when the user clicks on a specific element within a Journal. Now, since the journal is an integral part of Foundry, I'm a bit uncertain about the feasibility of this. Any advice?
My initial idea was to trigger the creation of a SvelteApplication ( EmptyApplicationShell ) with an invisible bkg which opens a MenuList. As soon as the...
Slide Animations for SvelteApplication
Bug: Multiple ProseMirror editors on same svelte component do not save properly
```
<svelte:options accessors={true} />
<script>
import { ApplicationShell } from "#runtime/svelte/component/core";
import { TJSDocument } from "#runtime/svelte/store/fvtt/document";
import { TJSProseMirror } from "#standard/component";
export let elementRoot;
let actor = new TJSDocument(game.actors.contents[0]);
let base_options = {
document: $actor,
fieldName: "name",
coll...
System Works in Dev Mode but not after build
The TITAN system now seems to work when I run in dev mode.
But when I run a built version, there is nothing. It's just the base foundry system.
Some debugging shows me that the init hook is not getting called, and I have no idea why.
Any idea what could cause this?
Error building after updating to TRL 0.1.1
npm run build
it errors out. Not sure why.```js
[commonjs--resolver] Missing "./svelte/store" specifier in "@typhonjs-fvtt/runtime" package
error during build:
Error: Missing "./svelte/store" specifier in "@typhonjs-fvtt/runtime" package
at e (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/titan/node_modules/vite/dist/node/chunks/dep-75f53616.js:21416:25)
at n (file:///C:/FoundryVTT/Dev/foundryuserdata/Data/systems/ti...
TJSApplication Character Sheet odd behavior with unlinked tokens
TJSDocumentCollection best practices?
game.actors
, and to do so was going to use a TJSDocumentCollection
.Now for my actual ask. Within my component I have the follo...
Release `TRL 0.1.1` - Patch release
I have just released a patch / fix release that fixes a small oversight in the
0.1.0
release regarding the internally used ResizableHandle Svelte component for application windows via ApplicationShell
. In the 0.1.0
release if you set width
or height
to auto
and the app window is resizable an error occured. This was just a missed refactoring aspect to some internal code and I happened to not catch it in testing for the 0.1.0
release as it was data specific...Uncaught TypeError: $storeElementRoot is undefined
Uncaught TypeError: $storeElementRoot is undefined
onResizePointerDown ResizableHandle.svelte:128
resizeDown ResizableHandle.svelte:71
activateListeners ResizableHandle.svelte:82
resizable ResizableHandle.svelte:109
Popcorn Initiative
PostcssConfig seem not workin with 0.1.0
TJSDocument for aggregating actor flags for Svelte Component
For a module I'm working on, I'm storing attributes as flags on the Actors document. An example is as such:
_ActorPF2e2 : {
....
flags: {
fvtt-knowledge-recalled-pf2e: {
npcFlags: *myFlags exist here*
}
}
}
To gather this data with the TJSDocument method I have the following code
```
const doc = new TJSDocument();
con...
Update to ChatMessage outside of Svelte doesn't trigger reactivity on linked TJSDocument
1. When I render a ChatMessage via svelte, in the chat message svelte component I do:
let foundryChatMessageDocument = new TJSDocument(void 0, { delete: () => {} }),
onMount(async () => {
await foundryChatMessageDocument.set(await game.messages.get(messageId));
2. At various points in the workflow I save updates to the chat message using:
```javascript
await $foundryChatMessageDocument.update({
flags: {
surge: { data: { co...