vkurko / calendar

Full-sized drag & drop JavaScript event calendar with resource & timeline views
https://vkurko.github.io/calendar/
MIT License
954 stars 80 forks source link

Svelte 5 support #235

Open geoextra opened 4 months ago

geoextra commented 4 months ago

When using the Calendar component in a Svelte 5 project it relies on get_current_component() from svelte/internal which has been removed. https://github.com/vkurko/calendar/blob/d337436bfebf7ddac21b1d787d5300f44744ef4d/packages/core/src/Calendar.svelte#L4

A possible solution is presented here with an example.

Tested with Svelte 5.0.0-next.50.

vkurko commented 4 months ago

Thanks for the tip. Svelte 5 support will definitely come in the future.

bayaderpack commented 1 month ago

This is not only place with svelte/internal there is like 100 more places unfortunately

dummdidumm commented 1 month ago

Svelte maintainer here. I'm interested in why you had to reach into svelte/internal. When you start the migration towards Svelte 5, I'm curious to hear if there's anything that Svelte 5 lacks that you need to not reach into internals again.

vkurko commented 1 month ago

Svelte maintainer here. I'm interested in why you had to reach into svelte/internal. When you start the migration towards Svelte 5, I'm curious to hear if there's anything that Svelte 5 lacks that you need to not reach into internals again.

Author of Event Calendar here :smiley:. @dummdidumm Thanks for the intervention. I would like to inform you that at the moment the migration to Svelte 5 has not yet been carried out.

The reason for using svelte/internal is that there are really useful functions there that will already be present in the final code, so it makes sense to reuse them in my library rather than write my own code. And for example get_current_component() it is impossible to write my own analogue.

HoekWax commented 2 weeks ago

Hello @vkurko, do you have a date in mind for svelte 5 support or not yet ? Thanks

vkurko commented 1 week ago

Not yet, unfortunately. Any help in this matter, including sponsorship, is welcome.