The library is already established with existing customers as equal parts developers and enterprise.<p>1.What can you do to your source code to make it less usable by others who wish to just copy and use it?
2. How to distribute it via something like npm?
3.How to check with a license file for validity?
4.How to publish trial versions without limited functionality, only watermark?
Can't you serve it out of your domain, accessible only with an API key? This is pretty much what all map services do, and is a pretty well established pattern.