svelte-konva icon indicating copy to clipboard operation
svelte-konva copied to clipboard

Update to Svelte 5 with runes

Open TeyKey1 opened this issue 1 year ago • 0 comments

This is a WIP PR aiming to update svelte-konva to Svelte 5 and the new Svelte runes. Currently based on the Svelte 5 preview releases.

svelte-konva aims to be compatible with Svelte 5's runes-only mode, to allow all dependents to use runes-only mode if desired.

Svelte 5 WIP docs: https://svelte-5-preview.vercel.app/docs Svelte 5 Runes: https://svelte.dev/blog/runes

TODO:

  • [ ] Make sure the basic examples in the svelte-konva examples work as expected
  • [ ] Update svelte-konva TS docs if needed
  • [ ] Create a migration guide for svelte-konva if needed
  • [ ] Update konva.org docs if needed
  • [ ] Update konva.org doc examples
  • [ ] Test for performance differences between the current and new version of svelte-konva

Known issues:

  • [x] The component config is not reactive when bound with staticConfig != true. The config data updates correctly, but any reactive statements depending on config do not trigger
  • [x] Stage handle cannot be exported as const prop due to being initialized once the wrapper div is rendered (Needs a solution possibly using stores)
  • [x] Tests currently do not work due to testing-library being on Svelte 4
  • [x] Figure out a way to split the konvaEvents from restProps in the Stage Component (otherwise konva event hooks might also be called on div events)
  • [ ] Tests not passing

TeyKey1 avatar Mar 03 '24 20:03 TeyKey1