TyphonJS (Michael)
TTyphonJS
•Created by TyphonJS (Michael) on 10/26/2024 in #typhonjs-runtime
TRL `0.2.0-next.X` Update Marathon
Just bumped
@typhonjs-fvtt/runtime
to 0.2.0-next.3
. No changes / fixes to API. I just moved all dependencies
to peerDependencies
with open forward versioning.
This benefits anyone using pnpm though you will need to use pnpm install --legacy-peer-deps
.
TRL takes advantage of the flat node_modules
structure created by NPM to install dependencies like Vite, Svelte, and everything else required as peer dependencies without requiring explicit configuration in a local project package.json
. You can now however provide explicit package dependency if desired.
----
I'll be available on Sunday to help out with any potential PRs for folks running into trouble updating to 0.2.0
. Unless any problems arise after this weekend I'll be making the final release on Monday. Just to be prudent I figured I'd give just a little more time for anyone to start the update process and report any issues. If you have the time to update this weekend please give it a shot. This is an opportunity to provide any feedback before 0.2.0
ships. It's rock solid now and there are no expected changes before final release.9 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/26/2024 in #typhonjs-runtime
TRL `0.2.0-next.X` Update Marathon
The percentage support is new. The underlying TJSPosition which is what you are working with as
SvelteApplication.position
vs a bare object in the core API is quite robust / fully reactive positional store + animation / movement validation. I recommend folks check out the App Control / Animation
demo in essential-svelte-esm
.
You can do all sorts of fancy things now like relaitive adjustments: app.position.width = '+=100px'
to add 100px to current width or app.position.width = '150%~'
to make the width 150% of the current width.9 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/26/2024 in #typhonjs-runtime
TRL `0.2.0-next.X` Update Marathon
Oh hey.... Just noticed some funky bits in the image; IE:
TRL
0.2.0
is more capable than core AppV1/V2. You can use percentages for width / height data ala
Also TRL supports setting minWidth
/ maxWidth
as data values. There are many other handy positional features.
I also highly recommend never using JQuery at this point and learning the DOM API. IE window.offsetHeight
is the same value.
Granted this thread is to support folks upgrading to 0.2.0
, but worth mentioning the above.9 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/26/2024 in #typhonjs-runtime
TRL `0.2.0-next.X` Update Marathon
---
What I am working on the next two days is adding as much detail / additional API docs to in the source JSDoc / various sub-path package descriptions. I'm also going to try and get basic architecture overview / programmers guide / getting started resources together and clean up various repo guides / info.
9 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/26/2024 in #typhonjs-runtime
TRL `0.2.0-next.X` Update Marathon
Right on.. For folks that haven't dug in too deep or that are already on
0.1.x
the upgrade shouldn't be too bad. Mostly just changing sub-path exports to more refined paths. The callback changes to an object and not argument list for app header buttons / TJSDialog are a point to watch out for if used.
For instance the Automatic Animations PR was deep, but it also was coded at a much earlier point in time and uses more of TRL, so many of the points above in the list of things to watch out for were applied. AA also had problems being a large Handlebars package before conversion to Svelte. It works, but isn't a good example of how to go about things per se; no fault of the original author though. IE a very good MVP that in a professional context would get an architecture overhaul / restructure.
Regarding types for anything that touches Foundry like #runtime/svelte/application
types are withheld / not hooked up because there are no minimal types for Foundry core API / IE Application
and whatever else is referenced that are suitable to hook up. If things were quiet on the Foundry front without a looming need to address v13
immediately I was planning on making a minimal set of Foundry types for just the aspects where TRL touches Foundry, but alas things are not quiet and v13
/ 0.3.0
work to adjust to Foundry platform CSS / style changes must commence immediately to get ahead of those changes and give folks using TRL enough time to test packages on v13
. Alas I can't tie TRL to the Foundry community types for several reasons despite the effort expended by folks in that area.
I will get a types solution in place for those sub-path exports soonish, but alas not likely before v13
concerns are solved and this is mostly due to "unknowns" in Foundry platform changes at this time. As things go first / early Foundry prototype release can also be incomplete / far from finished. The big problem there is that there is no visibility when v13
will be released, so the cautious approach is to drop everything and work on that ASAP.9 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/26/2024 in #typhonjs-runtime
TRL `0.2.0-next.X` Update Marathon
9 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
So, @typhonjs-fvtt/runtime
0.2.0-next.1
is out. For now do refer to the message in the dev-lounge for initial comments.
Take note that @typhonjs-fvtt/standard replaces @typhonjs-fvtt/svelte-standard
which is now deprecated.
Installing essential-svelte-esm
from the source repo and checking things out is recommended.
Updating depending on what your package uses / does w/ TRL can be relatively quick. Only took ~5 minutes per package... for me but that is an unfair shake because I know TRL in and out.
Please post any comments or concerns in this forum post. Hopefully some folks can attempt the upgrade this weekend.
I'd like to release the final 0.2.0
next Wednesday / Oct. 30th. If there are any changes / fixes you need let's suss them out ASAP. Things should be rock solid though.
Do remember that due to widespread / large shift in styles / CSS for Foundry v13
that impact TRL that 0.3.0
is coming out ASAP such that you'll have plenty of time to test your packages in the v13
dev / test / release cycle. 0.3.0
will have no API changes and just fix the platform style changes. Updating to 0.2.0
is the first step on this path.104 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
No worries.. Indeed a bit less focused on the pre-release angle, but larger conversations that are useful.
0.2.0
is a thorough pass through everything / streamlining the API. Definitely a focus on hardening the API too making things less error prone. An example there is that TJSDocument
is significantly more resilent to how and when it attaches to the backing Foundry document. It is now "fire and forget" / use in Svelte like normal. The 1st gen implementation had some manual management aspects required which weren't thoroughly communicated.104 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
I think it's good that you are thinking about dynamic loading. Now just convince the rest of the Foundry 3rd party developer community.. ;P
104 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
I'm actually really hoping someone takes on making a killer cards implementation w/ TRL / TJSPosition / GSAP. That will make the implementation so much easier and effective especially since you can have it over the other UI.
104 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
Nice... Re: "Splash Scene" approach. You'll definitely like the
TJSPosition
to GSAP bridge. It really makes it easy to work with GSAP in a data oriented way vs the functional API.
The box demo in essential-svelte-esm
is a great example. BUT just wait for 0.2.0
to take a look. I also cleaned up the box demo code to make it a bit nicer. It really should be out tomorrow. Just doing some final testing / adding last new demo, etc. today.104 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
Just DOM / Svelte. I'm sure Pixi or a plugin addon that can handle animation / tweening if not built into Pixi.
The nice thing about
TJSPosition
is that it is not something hard coded into just SvelteApplication
. You can broadly use it for any DOM element positional use case including tweening and easy hookup to GSAP when extra firepower is needed.104 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
Ah I do have a question about Position, as it came up in the size discussion. I assume it is used internally for the SvelteApplication stuff, which is why it auto-imports?Yes..
app.position
is a TJSPosition instance.104 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
The initial
0.2.0-next.1
release handles all of the big stuff / sub-path changes / fixes to TRL like TJSGameSettings
, etc. Types for TRL parts have improved of course over the year. Record
was just the old recommended way via JSDoc though the { [key: string]: any }
way is now recommended. Glad to learn it makes a difference.104 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
Well all of that is slated for the 2nd
beta
release 0.2.0-next.2
, so good to get input from folks.104 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
Yep.. That is an alternate way of doing it (newerish in terms for folks working with JSDoc / new recommended approach) and you'll see that more in other areas of the TRL types. It's a process.
104 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
The
0.1.3
types for svelte
in options is not as precise.
For TJSSvelteConfig
:
- 0.1.2
- 0.2.0
It's correct in the 0.2.0
docs for class
.
That being said I'm planning on spending 3-5 days after 0.2.0-next.1
drops to add lots of general API docs in addition to making things more accurate in the TRL part of types.104 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
Basically, what I'm getting at is that I can't wait to figure out the type declaration solution for Svelte 5.. 😮 That is going to be a ~2 week dive into the depths.
104 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
In the TRL docs where you see class / namespace for each component. Default Svelte generates class / generic type aliases Events / Props / Slots completely separated making it practically impossible to generate API docs from types. The descriptions and many other compoenent comments in the TRL types are added through declaration modification and not supported by default Svelte type generation.
104 replies
TTyphonJS
•Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
The ESM / JSDoc typing for Svelte 4 is specifically enhanced by my declaration tooling
esm-d-ts
and Svelte 4 plugin I've made for it. I do quite a bit of additional TS declaration modification to make the generated types more effective.
The type declaration aspect of Svelte / what is provided out of the box is just for functional types and not very good / lots of duct tape. If you generate API docs from the types SvelteKit produces it just sucks / is very bad.104 replies