Hi Richard,
I will be following the guidance from @GoToLoop so the version number and link will change so perhaps ask OP to wait a bit until I get the release setup right.
Thanks
Peter
It seemed to me that key advice was to create a Release in github which can then be accessed using the CDN. The actual location of the library files is not that important so I decided to leave them where they are as I wasn’t keen on having them in the root folder (personal preference). Admittedly it makes the CDN link longer but then it will be copied and pasted rather than typed from scratch.
All the versions of canvasGUI prior to 0.9.6 where created during the development stage and I believe it is now production ready for release, hence the new version number (1.0.0). I will be not be creating Releases for earlier versions as making them available via CDN is superfluous.
So to use canvasGUI the user just has to copy and paste this link into in the head section of their webpage.
This is the final link which I have tested in p5js web-editor and have updated all pages on my website that use canvasGUI. Obviously I can not test this in Open Processing.
This explanation differs from the npm docs. So I will not be changing these for the moment especially since canvasGUI does not use modules. I will change the version number - just an over-site on my part
You are correct there and I will be making a formal announcement of canvasGUI 1.0.0 and include links for both current (1.0.0) and latest versions that users can copy. Before that I will be including these links in github and my website documentation. So much to remember
Creating github releases and CDN links has been a useful learning experience for me so thanks again for your help.
In Node.JS, JS files are always treated as a module, regardless it’s CommonJS (.cjs) or ESM (.mjs), or it’s just using extension “.js”.
Even though the entry “main” has a specific meaning in Node.JS, some CDNs may read the root “package.json” and identify paths for it and other properties, such as “browser”, “types”, “module”, “exports”, etc.
BtW, “index.js” doesn’t even exist in your repo’s root, and having “main” pointing to the actual library file “dist/lib/gui.js” can help CDNs and, if you end up publishing your library as an NPM package as well, identify the real executable file!
As an example, p5.js 1.x.x has a “main” entry pointing to “lib/p5.min.js”:
There is no control of type ‘Titles’ but from your description I assume you mean CvsTextField controls.
When I created canvasGUI my priority was to provide a range of colour schemes for users to choose from so they could quickly create an attractive GUI and then get on with the code logic needed for the actual sketch.
So at the moment it is not possible to change the colour of individual elements of a control, including font colour.
There seem to be two options
add functionality to change individual colour elements on a control-by-control basis
enable users to create and apply their own colour schemes, probably using one of the predefined schemes as a starting point.
I have not decided on which approach I might take as I need to consider how it will affect the current implementation and the user experience.
If you are interested having this features please add an issue to the github repo