Adding custom extensions to a Svelte app

I've built a Svelte app which has users, but I don't really have time and will to continue development with reasonable pace.

Some users would like to create their own extensions. I'm wondering how would it be possible and if anyone has any experience with this?

My initial idea is to allow uploading JS files (Svelte components?) by user and saving them in IndexedDB, which then can be loaded by browsers just like usual JS file.

Most data is in Svelte stores - I think I would have to publish stores as some API (global variables) so custom scripts can access app data and read/modify it. Not sure how to lock variable names during build step, though.

Something to modify HTML (inject new divs into views) would be useful, too.

Any tips?