Architecture

svelte-put is currently migrating away from Typescript for package source code to vanilla Javascript with JSDoc. This is very much inspired by the initiative taken by the svelte core team that did the same for svelte & kit repo. You can track the progress at this Github issue .
Note that packages are still fully typed, the experience stays the same for Typescript users.

Packages within the svelte-put collection follow, as much as possible, the following design decisions:

  • Minimalism. Stay small, with as few dependencies as possible. Do one thing at a time, and do it well.
  • Headless UI. Stay away from UI component abstraction as much as possible to avoid opinionated UI patterns and lock-in solutions, and in turn enable greater flexibility for users.
  • Typescript support. Provide type-safety with self-documented code for code discovery and intellisense.

Because of the philosophies above, you will find that the majority of packages rely primarily on svelte action and svelte store to encapsulate only the necessary logics and leave the UI to be defined by users.

The tradeoff, however, is that sometimes it takes more verbose setup to achieve a desired system (in packages such as @svelte-put/noti and @svelte-put/tooltip , for example). In my case, this forces me to "own" my code and get familiar with pieces of the package; if issues or customization demand arises, I will be more capable of providing solutions than say if I were to use a highly abstract prebuilt component.