diff --git a/@webwriter/website/package.json b/@webwriter/website/package.json index ab0ad10f..14c0818c 100644 --- a/@webwriter/website/package.json +++ b/@webwriter/website/package.json @@ -1,5 +1,5 @@ { - "name": "webwriter-website", + "name": "@webwriter/website", "type": "module", "version": "0.1.0", "scripts": { diff --git a/@webwriter/website/public/assets/widget-data-flow.drawio.svg b/@webwriter/website/public/assets/widget-data-flow.drawio.svg new file mode 100644 index 00000000..56668c3b --- /dev/null +++ b/@webwriter/website/public/assets/widget-data-flow.drawio.svg @@ -0,0 +1,4 @@ + + + +Code Editor
Package
Directory with package.json
Package...
Assets
Assets
Assets
Assets
Widget Definition
.js / .ts File
Widget Definition...
package.jsonWebWriter
Explorable
Explorable
Widget Card
Widget Card
Widget Instance
HTMLElement
Widget Instance...
add
add
NPM
NPM
Package
Package
publish
publish
install
install
Text is not SVG - cannot display
\ No newline at end of file diff --git a/@webwriter/website/public/releases.json b/@webwriter/website/public/releases.json index 4feedfa5..67091859 100644 --- a/@webwriter/website/public/releases.json +++ b/@webwriter/website/public/releases.json @@ -1 +1 @@ -{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/88988100","assets_url":"https://api.github.com/repos/webwriter-app/webwriter/releases/88988100/assets","upload_url":"https://uploads.github.com/repos/webwriter-app/webwriter/releases/88988100/assets{?name,label}","html_url":"https://github.com/webwriter-app/webwriter/releases/tag/v0.4.1","id":88988100,"author":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"node_id":"RE_kwDOHcrSLs4FTdnE","tag_name":"v0.4.1","target_commitish":"db46e1b9949a1f2cea9bdd8217b7a3a1adfef6cc","name":"v0.4.1","draft":false,"prerelease":false,"created_at":"2023-01-14T20:47:28Z","published_at":"2023-01-14T21:07:25Z","assets":[{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/91706950","id":91706950,"node_id":"RA_kwDOHcrSLs4Fd1ZG","name":"latest.json","label":null,"uploader":{"login":"salmenf","id":4583669,"node_id":"MDQ6VXNlcjQ1ODM2Njk=","avatar_url":"https://avatars.githubusercontent.com/u/4583669?v=4","gravatar_id":"","url":"https://api.github.com/users/salmenf","html_url":"https://github.com/salmenf","followers_url":"https://api.github.com/users/salmenf/followers","following_url":"https://api.github.com/users/salmenf/following{/other_user}","gists_url":"https://api.github.com/users/salmenf/gists{/gist_id}","starred_url":"https://api.github.com/users/salmenf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salmenf/subscriptions","organizations_url":"https://api.github.com/users/salmenf/orgs","repos_url":"https://api.github.com/users/salmenf/repos","events_url":"https://api.github.com/users/salmenf/events{/privacy}","received_events_url":"https://api.github.com/users/salmenf/received_events","type":"User","site_admin":false},"content_type":"application/json","state":"uploaded","size":2474,"download_count":479,"created_at":"2023-01-14T21:45:52Z","updated_at":"2023-01-14T21:45:52Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.4.1/latest.json"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/91703107","id":91703107,"node_id":"RA_kwDOHcrSLs4Fd0dD","name":"web-writer_0.4.1_amd64.AppImage","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":101717184,"download_count":30,"created_at":"2023-01-14T20:58:28Z","updated_at":"2023-01-14T20:58:33Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.4.1/web-writer_0.4.1_amd64.AppImage"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/91703109","id":91703109,"node_id":"RA_kwDOHcrSLs4Fd0dF","name":"web-writer_0.4.1_amd64.AppImage.tar.gz","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":100923208,"download_count":4,"created_at":"2023-01-14T20:58:33Z","updated_at":"2023-01-14T20:58:38Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.4.1/web-writer_0.4.1_amd64.AppImage.tar.gz"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/91703116","id":91703116,"node_id":"RA_kwDOHcrSLs4Fd0dM","name":"web-writer_0.4.1_amd64.AppImage.tar.gz.sig","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":432,"download_count":4,"created_at":"2023-01-14T20:58:38Z","updated_at":"2023-01-14T20:58:38Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.4.1/web-writer_0.4.1_amd64.AppImage.tar.gz.sig"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/91703494","id":91703494,"node_id":"RA_kwDOHcrSLs4Fd0jG","name":"WebWriter_0.4.1_x64.dmg","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":27813909,"download_count":12,"created_at":"2023-01-14T21:03:56Z","updated_at":"2023-01-14T21:03:58Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.4.1/WebWriter_0.4.1_x64.dmg"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/91703267","id":91703267,"node_id":"RA_kwDOHcrSLs4Fd0fj","name":"WebWriter_0.4.1_x64_en-US.msi","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":23887872,"download_count":44,"created_at":"2023-01-14T21:00:47Z","updated_at":"2023-01-14T21:00:48Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.4.1/WebWriter_0.4.1_x64_en-US.msi"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/91703268","id":91703268,"node_id":"RA_kwDOHcrSLs4Fd0fk","name":"WebWriter_0.4.1_x64_en-US.msi.zip","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":23888028,"download_count":4,"created_at":"2023-01-14T21:00:48Z","updated_at":"2023-01-14T21:00:50Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.4.1/WebWriter_0.4.1_x64_en-US.msi.zip"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/91703269","id":91703269,"node_id":"RA_kwDOHcrSLs4Fd0fl","name":"WebWriter_0.4.1_x64_en-US.msi.zip.sig","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":424,"download_count":5,"created_at":"2023-01-14T21:00:50Z","updated_at":"2023-01-14T21:00:50Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.4.1/WebWriter_0.4.1_x64_en-US.msi.zip.sig"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/91703498","id":91703498,"node_id":"RA_kwDOHcrSLs4Fd0jK","name":"WebWriter_x64.app.tar.gz","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":31375100,"download_count":3,"created_at":"2023-01-14T21:03:58Z","updated_at":"2023-01-14T21:03:59Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.4.1/WebWriter_x64.app.tar.gz"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/91703504","id":91703504,"node_id":"RA_kwDOHcrSLs4Fd0jQ","name":"WebWriter_x64.app.tar.gz.sig","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":408,"download_count":3,"created_at":"2023-01-14T21:04:00Z","updated_at":"2023-01-14T21:04:00Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.4.1/WebWriter_x64.app.tar.gz.sig"}],"tarball_url":"https://api.github.com/repos/webwriter-app/webwriter/tarball/v0.4.1","zipball_url":"https://api.github.com/repos/webwriter-app/webwriter/zipball/v0.4.1","body":"See the assets to download this version and install."} \ No newline at end of file +{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/105264664","assets_url":"https://api.github.com/repos/webwriter-app/webwriter/releases/105264664/assets","upload_url":"https://uploads.github.com/repos/webwriter-app/webwriter/releases/105264664/assets{?name,label}","html_url":"https://github.com/webwriter-app/webwriter/releases/tag/v0.5.0","id":105264664,"author":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"node_id":"RE_kwDOHcrSLs4GRjYY","tag_name":"v0.5.0","target_commitish":"e51763916a83ba292aed29b3dfbcf6c361f9a442","name":"v0.5.0","draft":false,"prerelease":false,"created_at":"2023-05-29T16:11:37Z","published_at":"2023-05-29T17:03:38Z","assets":[{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337931","id":110337931,"node_id":"RA_kwDOHcrSLs4Gk5-L","name":"latest.json","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":1924,"download_count":181,"created_at":"2023-05-29T17:21:47Z","updated_at":"2023-05-29T17:21:47Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/latest.json"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337215","id":110337215,"node_id":"RA_kwDOHcrSLs4Gk5y_","name":"web-writer_0.5.0_amd64.AppImage","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":102110400,"download_count":7,"created_at":"2023-05-29T17:15:00Z","updated_at":"2023-05-29T17:15:02Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/web-writer_0.5.0_amd64.AppImage"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337218","id":110337218,"node_id":"RA_kwDOHcrSLs4Gk5zC","name":"web-writer_0.5.0_amd64.AppImage.tar.gz","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":101338759,"download_count":2,"created_at":"2023-05-29T17:15:03Z","updated_at":"2023-05-29T17:15:05Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/web-writer_0.5.0_amd64.AppImage.tar.gz"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337220","id":110337220,"node_id":"RA_kwDOHcrSLs4Gk5zE","name":"web-writer_0.5.0_amd64.AppImage.tar.gz.sig","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":432,"download_count":2,"created_at":"2023-05-29T17:15:05Z","updated_at":"2023-05-29T17:15:06Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/web-writer_0.5.0_amd64.AppImage.tar.gz.sig"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337212","id":110337212,"node_id":"RA_kwDOHcrSLs4Gk5y8","name":"web-writer_0.5.0_amd64.deb","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":32695236,"download_count":2,"created_at":"2023-05-29T17:14:58Z","updated_at":"2023-05-29T17:14:59Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/web-writer_0.5.0_amd64.deb"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337510","id":110337510,"node_id":"RA_kwDOHcrSLs4Gk53m","name":"WebWriter_0.5.0_x64-setup.exe","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":19532875,"download_count":2,"created_at":"2023-05-29T17:18:16Z","updated_at":"2023-05-29T17:18:17Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/WebWriter_0.5.0_x64-setup.exe"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337511","id":110337511,"node_id":"RA_kwDOHcrSLs4Gk53n","name":"WebWriter_0.5.0_x64-setup.nsis.zip","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":19533031,"download_count":2,"created_at":"2023-05-29T17:18:17Z","updated_at":"2023-05-29T17:18:18Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/WebWriter_0.5.0_x64-setup.nsis.zip"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337513","id":110337513,"node_id":"RA_kwDOHcrSLs4Gk53p","name":"WebWriter_0.5.0_x64-setup.nsis.zip.sig","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":428,"download_count":2,"created_at":"2023-05-29T17:18:18Z","updated_at":"2023-05-29T17:18:19Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/WebWriter_0.5.0_x64-setup.nsis.zip.sig"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337918","id":110337918,"node_id":"RA_kwDOHcrSLs4Gk59-","name":"WebWriter_0.5.0_x64.dmg","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":28337283,"download_count":6,"created_at":"2023-05-29T17:21:41Z","updated_at":"2023-05-29T17:21:43Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/WebWriter_0.5.0_x64.dmg"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337502","id":110337502,"node_id":"RA_kwDOHcrSLs4Gk53e","name":"WebWriter_0.5.0_x64_en-US.msi","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":24195072,"download_count":15,"created_at":"2023-05-29T17:18:12Z","updated_at":"2023-05-29T17:18:13Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/WebWriter_0.5.0_x64_en-US.msi"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337507","id":110337507,"node_id":"RA_kwDOHcrSLs4Gk53j","name":"WebWriter_0.5.0_x64_en-US.msi.zip","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":24195228,"download_count":8,"created_at":"2023-05-29T17:18:14Z","updated_at":"2023-05-29T17:18:15Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/WebWriter_0.5.0_x64_en-US.msi.zip"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337508","id":110337508,"node_id":"RA_kwDOHcrSLs4Gk53k","name":"WebWriter_0.5.0_x64_en-US.msi.zip.sig","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":424,"download_count":2,"created_at":"2023-05-29T17:18:15Z","updated_at":"2023-05-29T17:18:15Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/WebWriter_0.5.0_x64_en-US.msi.zip.sig"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337921","id":110337921,"node_id":"RA_kwDOHcrSLs4Gk5-B","name":"WebWriter_x64.app.tar.gz","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":31799283,"download_count":2,"created_at":"2023-05-29T17:21:43Z","updated_at":"2023-05-29T17:21:45Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/WebWriter_x64.app.tar.gz"},{"url":"https://api.github.com/repos/webwriter-app/webwriter/releases/assets/110337928","id":110337928,"node_id":"RA_kwDOHcrSLs4Gk5-I","name":"WebWriter_x64.app.tar.gz.sig","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/zip","state":"uploaded","size":408,"download_count":2,"created_at":"2023-05-29T17:21:45Z","updated_at":"2023-05-29T17:21:45Z","browser_download_url":"https://github.com/webwriter-app/webwriter/releases/download/v0.5.0/WebWriter_x64.app.tar.gz.sig"}],"tarball_url":"https://api.github.com/repos/webwriter-app/webwriter/tarball/v0.5.0","zipball_url":"https://api.github.com/repos/webwriter-app/webwriter/zipball/v0.5.0","body":"See the assets to download this version and install."} \ No newline at end of file diff --git a/@webwriter/website/resources/widgets.json b/@webwriter/website/resources/widgets.json index f863a566..8ccb7a9b 100644 --- a/@webwriter/website/resources/widgets.json +++ b/@webwriter/website/resources/widgets.json @@ -66,7 +66,7 @@ "vitest": "^0.30.1" }, "bundleSize": { - "js": 415052, + "js": 415041, "css": 0 }, "installSize": 3029 @@ -144,20 +144,95 @@ "@smui/common": "^6.1.4" }, "bundleSize": { - "js": 387316, + "js": 387303, "css": 20450 }, "installSize": 535193 }, + { + "name": "@webwriter/ww-code", + "scope": "webwriter", + "version": "0.3.0", + "description": "The code widget allows for coding exercises to be embedded into the worksheet. The code widget is a wrapper around the [CodeMirror](https://codemirror.net/) editor. The code widget supports the following languages:", + "keywords": [ + "webwriter-widget", + "codeWidget" + ], + "date": "2023-06-20T10:00:03.440Z", + "links": { + "npm": "https://www.npmjs.com/package/%40webwriter%2Fww-code" + }, + "publisher": { + "username": "k1r0j", + "email": "jorik@vangenuchten.de" + }, + "maintainers": [ + { + "username": "k1r0j", + "email": "jorik@vangenuchten.de" + }, + { + "username": "salmenf", + "email": "frederic@fsalmen.de" + } + ], + "license": "MIT", + "main": "src/ww-code.ts", + "type": "module", + "contributors": [ + "Erik Viere", + "Jorik van Genuchten" + ], + "scripts": { + "dev": "vite --port 3000", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "@codemirror/lang-css": "^6.2.0", + "@codemirror/lang-html": "^6.2.0", + "@codemirror/lang-javascript": "^6.0.2", + "@codemirror/lang-python": "^6.0.2", + "@codemirror/state": "^6.1.2", + "@codemirror/theme-one-dark": "^6.1.0", + "@codemirror/view": "^6.2.5", + "@open-wc/scoped-elements": "^2.0.0-next.6", + "@replit/codemirror-indentation-markers": "^6.1.0", + "@shoelace-style/shoelace": "^2.0.0-beta.83", + "@webwriter/lit": "^0.3.0", + "codemirror": "^6.0.1", + "codemirror-readonly-ranges": "^0.1.0-alpha.1", + "lit": "2.3.1", + "pyodide": "^0.23.3", + "range-analyzer": "^0.1.1-alpha.2", + "tslib": "^2.4.0" + }, + "devDependencies": { + "@types/node": "^18.7.21", + "@typescript-eslint/eslint-plugin": "^5.38.1", + "eslint": "^8.24.0", + "eslint-config-standard-with-typescript": "^23.0.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-n": "^15.3.0", + "eslint-plugin-promise": "^6.0.1", + "typescript": "^4.8.3", + "vite": "^3.0.0" + }, + "bundleSize": { + "js": 683353, + "css": 17952 + }, + "installSize": 5394 + }, { "name": "ww-formula", "scope": "unscoped", - "version": "0.1.73", - "description": "Clone with `git clone` via SSH or HTTP", + "version": "0.2.31", + "description": "Widget for editing formulas. Use the buttons to insert math and edit it directly insinde the textarea.", "keywords": [ "webwriter-widget" ], - "date": "2023-05-04T12:51:20.903Z", + "date": "2023-07-13T12:07:40.398Z", "links": { "npm": "https://www.npmjs.com/package/ww-formula" }, @@ -182,7 +257,13 @@ "@shoelace-style/shoelace": "^2.4.0", "@webwriter/lit": "^0.4.1", "lit": "^2.6.1", - "mathjax-full": "^3.2.2" + "mathjax-full": "^3.2.2", + "prosemirror-example-setup": "^1.2.1", + "prosemirror-menu": "^1.2.2", + "prosemirror-model": "^1.19.2", + "prosemirror-schema-basic": "^1.2.2", + "prosemirror-state": "^1.4.3", + "prosemirror-view": "^1.31.4" }, "devDependencies": { "typescript": "^4.9.3", @@ -193,10 +274,55 @@ "access": "public" }, "bundleSize": { - "js": 30014, + "js": 30118, + "css": 0 + }, + "installSize": 2918 + }, + { + "name": "ww-flowchart", + "scope": "unscoped", + "version": "0.5.1", + "description": "Create programme flowcharts!", + "keywords": [ + "webwriter-widget" + ], + "date": "2023-06-14T14:01:32.740Z", + "links": { + "npm": "https://www.npmjs.com/package/ww-flowchart" + }, + "author": "Kevin Lu", + "publisher": { + "username": "k.lu", + "email": "kevin.lu@live.de" + }, + "maintainers": [ + { + "username": "k.lu", + "email": "kevin.lu@live.de" + } + ], + "scripts": { + "dev": "vite --open", + "build": "vite build" + }, + "dependencies": { + "@webwriter/lit": "latest", + "axios": "^1.4.0", + "dotenv": "^16.1.4", + "lit": "^2.4.0", + "uuid": "^9.0.0" + }, + "devDependencies": { + "typescript": "^4.8.4", + "vite": "^3.1.6" + }, + "license": "MIT", + "bundleSize": { + "js": 120876, "css": 0 }, - "installSize": 3045 + "installSize": 50343 }, { "name": "ww-manualgraphviz", @@ -243,7 +369,7 @@ }, "description": "", "bundleSize": { - "js": 109343, + "js": 109289, "css": 0 }, "installSize": 13398 @@ -293,7 +419,7 @@ }, "description": "", "bundleSize": { - "js": 109297, + "js": 109238, "css": 0 }, "installSize": 13253 @@ -339,10 +465,10 @@ "scripts": {}, "gitHead": "ee667087d26ca3ba189e094a17d45d10ff1ae89d", "bundleSize": { - "js": 70274, + "js": 50171, "css": 17952 }, - "installSize": 1818 + "installSize": 1796 }, { "name": "@webwriter/ww-figure", @@ -389,24 +515,85 @@ }, "gitHead": "ee667087d26ca3ba189e094a17d45d10ff1ae89d", "bundleSize": { - "js": 144546, + "js": 125304, "css": 17952 }, - "installSize": 7058 + "installSize": 7032 }, { - "name": "@webwriter/ww-code", + "name": "@christiankoch/ww-deeplearning", + "scope": "christiankoch", + "version": "0.1.1", + "description": "Deep learning visualizer for WebWriter", + "keywords": [ + "webwriter-widget" + ], + "date": "2023-07-12T09:58:20.464Z", + "links": { + "npm": "https://www.npmjs.com/package/%40christiankoch%2Fww-deeplearning" + }, + "author": "Christian Koch", + "publisher": { + "username": "christiankoch", + "email": "mail@christian-koch.eu" + }, + "maintainers": [ + { + "username": "christiankoch", + "email": "mail@christian-koch.eu" + } + ], + "license": "MIT", + "type": "module", + "main": "/dist/index.js", + "files": [ + "dist", + "src" + ], + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "@lit-labs/context": "^0.3.3", + "@shoelace-style/shoelace": "^2.2.0", + "@tensorflow/tfjs": "^4.2.0", + "@tensorflow/tfjs-vis": "^1.5.1", + "@types/cytoscape": "^3.19.9", + "@webwriter/create-widget": "^0.4.1", + "@webwriter/lit": "^0.4.2", + "cytoscape": "^3.23.0", + "lit": "^2.4.0" + }, + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.44.0", + "eslint-plugin-lit": "^1.8.3", + "eslint-plugin-wc": "^1.5.0", + "prettier": "^2.8.8", + "typescript": "^5.1.6", + "vite": "^3.1.6", + "vite-plugin-static-copy": "^0.13.1" + }, + "bundleSize": { + "js": 457929, + "css": 0 + }, + "installSize": 53588 + }, + { + "name": "@webwriter/ww-image", "scope": "webwriter", "version": "0.1.0", "keywords": [ - "webwriter-widget", - "codeWidget" + "webwriter-widget" ], - "date": "2023-05-23T14:56:15.352Z", + "date": "2023-06-27T12:34:41.280Z", "links": { - "npm": "https://www.npmjs.com/package/%40webwriter%2Fww-code" + "npm": "https://www.npmjs.com/package/%40webwriter%2Fww-image" }, - "author": "Erik Viere", "publisher": { "username": "k1r0j", "email": "jorik@vangenuchten.de" @@ -421,46 +608,24 @@ "email": "frederic@fsalmen.de" } ], - "license": "MIT", - "main": "src/ww-code.ts", - "type": "module", + "description": "", + "main": "index.js", + "contributors": [ + "Jorik van Genuchten" + ], "scripts": { - "dev": "vite --port 3000", - "build": "vite build", - "preview": "vite preview" + "dev": "vite --open", + "build": "vite build" }, "dependencies": { - "@codemirror/lang-html": "^6.2.0", - "@codemirror/lang-javascript": "^6.0.2", - "@codemirror/lang-python": "^6.0.2", - "@codemirror/state": "^6.1.2", - "@codemirror/theme-one-dark": "^6.1.0", - "@codemirror/view": "^6.2.5", - "@open-wc/scoped-elements": "^2.0.0-next.6", - "@replit/codemirror-indentation-markers": "^6.1.0", - "@shoelace-style/shoelace": "^2.0.0-beta.83", + "@shoelace-style/shoelace": "^2.4.0", "@webwriter/lit": "^0.3.0", - "codemirror": "^6.0.1", - "codemirror-readonly-ranges": "^0.1.0-alpha.1", - "lit": "2.3.1", - "range-analyzer": "^0.1.1-alpha.2", - "tslib": "^2.4.0" + "jimp": "0.22.7", + "lit": "^2.4.0" }, "devDependencies": { - "@types/node": "^18.7.21", - "@typescript-eslint/eslint-plugin": "^5.38.1", - "eslint": "^8.24.0", - "eslint-config-standard-with-typescript": "^23.0.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-n": "^15.3.0", - "eslint-plugin-promise": "^6.0.1", - "typescript": "^4.8.3", - "vite": "^3.0.0" - }, - "bundleSize": { - "js": 702643, - "css": 17952 - }, - "installSize": 3811 + "typescript": "^4.8.4", + "vite": "^3.1.6" + } } ] \ No newline at end of file diff --git a/@webwriter/website/resources/widgets.ts b/@webwriter/website/resources/widgets.ts deleted file mode 100644 index f8c7a9e0..00000000 --- a/@webwriter/website/resources/widgets.ts +++ /dev/null @@ -1,7 +0,0 @@ -import '@luiskugel/ww-chart' -import 'ww-formula' -import 'ww-quiz' -import 'ww-manualgraphviz' -import 'ww-algographviz' -import '@webwriter/ww-textarea' -import '@webwriter/ww-figure' \ No newline at end of file diff --git a/@webwriter/website/scripts/installwidgets.js b/@webwriter/website/scripts/installwidgets.js index 8c528935..e0a402c3 100644 --- a/@webwriter/website/scripts/installwidgets.js +++ b/@webwriter/website/scripts/installwidgets.js @@ -22,7 +22,7 @@ const body = await response.json() const widgets = body.objects.map(obj => obj.package) const names = widgets.map(widget => widget.name) -fs.ensureDir("public/widgetsrc") +fs.ensureDirSync("public/widgetsrc") fs.writeJSONSync("public/widgetsrc/package.json", { name: "@webwriter/website-dependencies", version: "0.0.0", @@ -34,11 +34,13 @@ fs.writeJSONSync("public/widgetsrc/package.json", { scripts: {"esbuild": "esbuild"} }, {spaces: "\t"}) -execSync(`npm --prefix ./public/widgetsrc install`, (error, stdout, stderr) => { - error && console.error(error.message) - stderr && console.error(stderr) - stdout && console.log(stdout) -}) +try { + console.log(execSync(`npm install`, {cwd: "./public/widgetsrc"}).toString()) +} +catch(err) { + throw err +} + const importStatements = Object.fromEntries(names.map(name => [ name, @@ -47,6 +49,15 @@ const importStatements = Object.fromEntries(names.map(name => [ const esbuildPath = path.normalize("public/widgetsrc/node_modules/.bin/esbuild") +const tsconfigPath = path.normalize("tmp/tsconfig.json") +fs.ensureFileSync(tsconfigPath) +fs.writeFileSync(tsconfigPath, `{ + "compilerOptions": { + "experimentalDecorators": true + } +} +`, {encoding: "utf8"}) + const bundleSizes = [] const installSizes = [] for(const [i, name] of names.entries()) { @@ -55,10 +66,13 @@ for(const [i, name] of names.entries()) { fs.writeFileSync(jsFile, importStatements[name], {encoding: "utf8"}) const outFileJs = `public/widgetsrc/${name}.js` const outFileCss = outFileJs.slice(0, -3) + ".css" - - execSync(`${esbuildPath} --bundle ${jsFile} --outfile=${outFileJs} --minify`, {env: {"NODE_PATH": "public/widgetsrc/node_modules"}}, (error, stdout, stderr) => { - error && console.error(error.message) - }) + try { + execSync(`${esbuildPath} --bundle ${jsFile} --tsconfig=tmp/tsconfig.json --outfile=${outFileJs} --minify`, {env: {"NODE_PATH": "public/widgetsrc/node_modules"}}) + } + catch(err) { + console.error(err) + continue + } const js = fs.statSync(outFileJs).size const css = fs.existsSync(outFileCss)? fs.statSync(outFileCss).size: 0 const installSize = await dirSize(`public/widgetsrc/node_modules/${name}`) @@ -66,7 +80,7 @@ for(const [i, name] of names.entries()) { installSizes.push(installSize) } -fs.rm("tmp", {recursive: true}) +// fs.rm("tmp", {recursive: true}) const packages = names .map(name => JSON.parse(fs.readFileSync(`public/widgetsrc/node_modules/${name}/package.json`, "utf8"))) diff --git a/@webwriter/website/src/content/docs/coreideas.md b/@webwriter/website/src/content/docs/coreideas.md deleted file mode 100644 index effd643f..00000000 --- a/@webwriter/website/src/content/docs/coreideas.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -order: 2 -title: "Core ideas" ---- -# Explainer: Core ideas -This article summarizes the core technical aspects such as data structures, IO, and so on. It is a helpful introduction to understand WebWriter before extending it with your own widgets. - -## Explorables -WebWriter is built to edit Explorables, which are... -- **web based**, built with client-side web standards and deployable on the web -- **file oriented**, available as all-in-one, standalone, offline-capable files -- **open**, conformant with OER principles allowing easy reuse -- **multimedia**, combining many media types such as text, audio, video, etc. -- **interactive**, allowing users to interact and receive feedback - -At the core, Explorables are simply HTML documents. Viewed as data structure, an Explorable is simply a DOM tree that be displayed by browsers and serialized to or parsed from HTML. WebWriter uses ProseMirror to make Explorables editable. - -| Concept | DOM representation | File representation | -|-----------------|--------------------|-----------------------| -| Explorable | `HTMLDocument` | `.html`/`.h5p` | -| Widget | `HTMLElement` | HTML tag + attributes | -| Package | - | npm/yarn package | - -Another way to look at this is to consider the flow of data through WebWriter and related environments: -![WebWriter Data Flow Diagram](/src/public/assets/webwriter-data-architecture.drawio.svg) - - -## Widgets -Corresponding to Explorables, Widgets are simply HTML elements, again implementing the same APIs (`HTMLElement`). This means that any element that can be defined in HTML can become a Widget, as well. New HTML elements can be defined as Web Components. - -## Packages -Packages are npm packages containing a main file that can be bundled by esbuild (JS .js file or TypeScript .ts file). Each package should register exactly one custom element with the same name as the package on import. - -### Built-in Packages -The only difference between built-in and all other packages is that built-in packages come pre-installed with the editor. Otherwise, they implement the same interface. - -## I/O -All widget attributes are persisted, so widget instance state should be stored as attributes. This allows learners to save their changes locally just using the save function of their web browser since browsers implement the same behavior of persisting attributes. \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/creatingwidgets.md b/@webwriter/website/src/content/docs/creatingwidgets.md deleted file mode 100644 index 7b7d9454..00000000 --- a/@webwriter/website/src/content/docs/creatingwidgets.md +++ /dev/null @@ -1,222 +0,0 @@ ---- -order: 3 -title: "Creating widgets" ---- -# Guide: Creating a widget - -Widgets are what makes up a WebWriter document. Developers create widgets while authors, users and analysts interact with them. This guide explains how to implement a widget from a developer perspective. - -This guide assumes you use the `ts-lit-vite` setup from the [quick start guide](quickstart.md). For other setups, see the [guide on other libraries](./usingotherlibraries.md). - -### The target environment: What you need to know -Viewed technically, widgets are Custom Elements. This means a widget can support any and every web technology capable of running in the browser. This includes [standard web APIs](https://developer.mozilla.org/en-US/docs/Web/API), [JS packages/modules for the browser](https://www.npmjs.com/), and so on. -As each widget comes in a Package (see the [package guide](./publishingwidgets.md) for more infos) that is loaded and bundled with `esbuild` when a document is saved, -[all content types of esbuild are supported](https://esbuild.github.io/content-types/). -**Practically, this means you can use JavaScript-adjacent technology such TypeScript, CSS, JSON and more.** - -## Prerequisites -You have... -- [ ] ...completed the [quick start guide](./quickstart.md) -- [ ] ...basic knowledge of [Lit](https://lit.dev/) and [TypeScript](https://www.typescriptlang.org/) (for the examples) - - -## Improving your widget with features - -### Rendering: Display your widget to users and authors -Arguably the most basic feature is giving the widget a render function so it can be displayed. - -In this example, we simply render a [vanilla `textarea` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea) into the widget: - -```ts -import {LitElementWw} from "@webwriter/lit" -import {html, css} from "lit" -import {property, query} from "lit/decorators.js" - -export default class CoolWidget extends LitElementWw { - render() { - return html`` - } -} -``` - -*Note: In the following examples, we will omit the imports for readability.* - -### Statefulness: Allow users to save their progress -Usually, you want users to be able to save their progress. To support this, all state must be stored as attributes of the widget's custom element, or as child nodes. - -In this example, we save our textarea's content in an attribute `value` which we create with Lit, also adding a change listener on the `textarea`: - -```ts -export default class CoolWidget extends LitElementWw { - - @property({attribute: true}) - value: string - - render() { - return html`` - } -} -``` - -#### Notes -- Please note that [attributes are different from properties](https://stackoverflow.com/a/6004028) and properties will not be saved. - -### `editable`: Allow authors to customize your widget -With statefulness, we already allow authors to "prefill" the widget with some state. But often, authors should be able to customize widgets further than users, allowing more complex interaction with the widget than would be reasonable for users. - -For example, we may want to add the ability for authors to add a placeholder text to the textarea that is shown when it is empty. To accomplish that, we add a `placeholder` attribute, an `input` element and CSS to make sure the `input` element is only shown when the widget is being edited (`editable`): - -```ts -export default class CoolWidget extends LitElementWw { - - @property({attribute: true}) - value: string - - @property({attribute: true}) - placeholder: string - - static get styles() { - return css` - :host(:not([editable])) .placeholder { - display: none; - } - ` - } - - render() { - return html` - this.placeholder = e.target.value}> - ` - } -} -``` - -### Use a part-based layout -As an extra feature, WebWriter can display your widget's editing elements separately from the widget's content. - -For this, the widget's editing element needs the attribute `part="action"`. It should be a single element and a direct child of the widget. - -To accomplish this for our example above, we simply add the `part="action"`to the our input element: - -```ts -export default class CoolWidget extends LitElementWw { - - @property({attribute: true}) - value: string - - @property({attribute: true}) - placeholder: string - - static get styles() { - return css` - :host(:not([editable])) .placeholder { - display: none; - } - ` - } - - render() { - return html` - this.placeholder = e.target.value}> - ` - } -} -``` - -#### Notes -- The part-based layout is preferable for more complex widgets since it makes better use of screen space in WebWriter. -- To have multiple elements for the `action` part, simply add a wrapper element (`
...
`). Only the wrapper needs the `part="action"`, other elements may - -### `printable`: Allow users to print your widget -Sometimes, users and authors may want to fall back to printed versions of documents. Only some widgets work well in a printed representation. - -For example, we could let the interactive textarea become simply a box with a black outline where (paper) users can write text: - -```ts -export default class CoolWidget extends LitElementWw { - - @property({attribute: true}) - value: string - - @property({attribute: true}) - placeholder: string - - static get styles() { - return css` - :host(:not([editable])) .placeholder { - display: none; - } - - :host([printable]) textarea { - border: 2px solid black; - border-radius: 2px; - } - ` - } - - render() { - return html` - this.placeholder = e.target.value}> - ` - } -} -``` - -#### Notes -- Links could be represented as QR codes. -- If the widget can't be represented properly, `printable=true` could simply mean showing a hint to that effect. -- [Media queries (`@media print`)](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries) can also be used to support printing. - -### `analyzable`: Allow analysts to observe interaction with your widget -Not implemented yet... - -### `focus()`: Handle when the widget receives focus -To improve the authoring experience and accessibility for keyboard users, the widget should react sensibly when receiving focus. Usually, this means delegating the focus to a child element. - -In our example, we implement `focus()` on the element such that the `textarea` is focused when the widget is focused: -```ts -export default class CoolWidget extends LitElementWw { - - @property({attribute: true}) - value: string - - @property({attribute: true}) - placeholder: string - - @query("textarea") - textarea: HTMLTextAreaElement - - focus(options: FocusOptions) { - this.textarea?.focus(options) - } - - static get styles() { - return css` - :host([editable]) .placeholder { - display: none; - } - - :host([printable]) textarea { - border: 2px solid black; - border-radius: 2px; - } - ` - } - - render() { - return html` - this.placeholder = e.target.value}> - ` - } -} -``` \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/explorables/explorables.md b/@webwriter/website/src/content/docs/explorables/explorables.md new file mode 100644 index 00000000..b886464a --- /dev/null +++ b/@webwriter/website/src/content/docs/explorables/explorables.md @@ -0,0 +1,26 @@ +--- +order: 300 +title: Explorables +--- + + +# Explorables +WebWriter is built to edit explorables, which are... +- **open**, conformant with OER principles allowing easy reuse +- **multimedia**, combining many media types such as text, audio, video, etc. +- **interactive**, allowing users to interact and receive feedback +- **web based**, built with client-side web standards and deployable on the web +- **file oriented**, available as all-in-one, standalone, offline-capable files + + +## Technical View +At the core, explorables are HTML documents. Viewed as data structure, an explorable is a DOM tree that be displayed by browsers and serialized to or parsed from HTML. + +| Concept | DOM representation | File representation | +|-------------------|--------------------|--------------------------| +| Explorable | `HTMLDocument` | `.html`/`.h5p` | +| Widget | `HTMLElement` | - | +| Package | - | node package (directory) | + +## Author/User View +To authors, explorables are the main entity they are creating with WebWriter. To users, explorables (with embedded widgets) are the only part of WebWriter they experience at all. \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/index.md b/@webwriter/website/src/content/docs/index.md index e666ffac..399236ac 100644 --- a/@webwriter/website/src/content/docs/index.md +++ b/@webwriter/website/src/content/docs/index.md @@ -3,4 +3,6 @@ This documentation provides instructions on how to extend WebWriter. It is inten WebWriter is a system for creating digital worksheets. It can be extended with widgets. Widgets are implemented as [Web Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components) and distributed as [NPM Packages](https://docs.npmjs.com/about-packages-and-modules). -Widgets can be created with any library that outputs web components. A recommended choice is [Lit](https://lit.dev), which is a lightweight solution that builds on existing web standards as much as possible. \ No newline at end of file +Widgets can be created with any library that outputs web components. A recommended choice is [Lit](https://lit.dev), which is a lightweight solution that builds on existing web standards as much as possible. + +![Data Flow](assets/widget-data-flow.drawio.svg) \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/usingotherlibraries.md b/@webwriter/website/src/content/docs/othercomponentlibraries.md similarity index 86% rename from @webwriter/website/src/content/docs/usingotherlibraries.md rename to @webwriter/website/src/content/docs/othercomponentlibraries.md index 42df85b5..28f72d06 100644 --- a/@webwriter/website/src/content/docs/usingotherlibraries.md +++ b/@webwriter/website/src/content/docs/othercomponentlibraries.md @@ -1,12 +1,11 @@ --- -order: 5 -title: "Using other libraries" +order: 400 +title: "Using Other Libraries" --- -# Guide: Using other libraries - -This guide summarizes options to use component libraries other than the recommended Lit to implement widgets, and also how to use techonology not [supported by esbuild](https://esbuild.github.io/content-types/). +# Using Other Libraries +This guide summarizes options to use component libraries other than the recommended Lit to implement widgets. ## Choose your own web component library There are [many approaches to create web components](https://webcomponents.dev/blog/all-the-ways-to-make-a-web-component/) other than Lit. While those are technically supported, you may run into unknown issues employing these. @@ -60,9 +59,4 @@ export default class CoolWidget extends HTMLElement { - `Widget` is the interface widgets should support. It defines three core boolean properties that widgets may support: 1. `editable`: If `true`, the widget should render UI elements so that authors can edit the widget. If `false`, no such UI elements should be rendered. 2. `printable`: If `true`, the widget should render itself so that it may be printed easily. -3. `analyzable`: Not implemented yet... - - -## Using technology not supported by esbuild -In WebWriter, only [content types of esbuild are supported](https://esbuild.github.io/content-types/). If you want to use something else, such as SASS, Elm, etc., you need to add a build step to your package. -Take SASS for example: `esbuild` only supports importing `.css`, not `.scss`. To solve this, you could use the CLI `sass` to compile `.scss` files down to `.css` files first, then import those in your main file. \ No newline at end of file +3. `analyzable`: Not implemented yet... \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/packages/documenting.md b/@webwriter/website/src/content/docs/packages/documenting.md new file mode 100644 index 00000000..2d1c8f04 --- /dev/null +++ b/@webwriter/website/src/content/docs/packages/documenting.md @@ -0,0 +1,11 @@ +--- +order: 202 +title: Documenting +--- + +# Documenting +Packages support many types of metadata to make them more easily searchable and usable to authors, and also more easy to modify and extend for other developers. + + +## Not supported yet +... \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/packages/packages.md b/@webwriter/website/src/content/docs/packages/packages.md new file mode 100644 index 00000000..e6b1d201 --- /dev/null +++ b/@webwriter/website/src/content/docs/packages/packages.md @@ -0,0 +1,17 @@ +--- +order: 200 +title: Packages +--- + + +# Packages +Packages are the publishing format for widgets. Users can get developed widgets by installing published packages via WebWriter. + +## Technical View +Packages are npm packages containing a main file that can be bundled by esbuild (JS .js file or TypeScript .ts file). Each package should register exactly one custom element with the same name as the package on import. + +### Built-in Packages +The only difference between built-in and all other packages is that built-in packages come pre-installed with the editor. Otherwise, they implement the same interface. + +## Author/User View +To authors, packages are mostly indistinguishable from widgets. This is especially true because each package holds exactly one widget. They install/update/uninstall packages from WebWriter's package manager. To users, packages are no concern at all - they only interact with the widgets bundled into explorables. \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/publishingwidgets.md b/@webwriter/website/src/content/docs/packages/publishing.md similarity index 98% rename from @webwriter/website/src/content/docs/publishingwidgets.md rename to @webwriter/website/src/content/docs/packages/publishing.md index e5ef0847..3d1f8f28 100644 --- a/@webwriter/website/src/content/docs/publishingwidgets.md +++ b/@webwriter/website/src/content/docs/packages/publishing.md @@ -1,8 +1,8 @@ --- -order: 4 -title: "Publishing widgets" +order: 203 +title: "Publishing" --- -# Guide: Publishing widgets +# Publishing WebWriter uses [npm packages](https://docs.npmjs.com/packages-and-modules) to provide an easy way of extending the authoring tool with new widgets. WebWriter will discover any package published on npm ([read more about npm here](https://docs.npmjs.com/about-npm)) if it is tagged with the keyword `webwriter-widget`. diff --git a/@webwriter/website/src/content/docs/quickstart.md b/@webwriter/website/src/content/docs/quickstart.md index e811bbfa..9fffa744 100644 --- a/@webwriter/website/src/content/docs/quickstart.md +++ b/@webwriter/website/src/content/docs/quickstart.md @@ -1,5 +1,5 @@ --- -order: 1 +order: 0 title: "Quick start" --- # Guide: Quick start diff --git a/@webwriter/website/src/content/docs/widgetquality.md b/@webwriter/website/src/content/docs/widgetquality.md index d50e3a87..bb63efdc 100644 --- a/@webwriter/website/src/content/docs/widgetquality.md +++ b/@webwriter/website/src/content/docs/widgetquality.md @@ -1,9 +1,10 @@ --- -order: 6 -title: "Widget quality" +order: 500 +title: "Evaluating Widgets" +type: "explainer" --- -# Explainer: Designing Widgets -This explainer outlines different criteria for what makes a good widget. It can help you to improve your widget's design. +# Evaluating Widgets +There are different criteria for what makes a good widget. This guide outlines a few to help you improve your widget's design. ## Criteria for widget quality As outlined in the [guide for creating widgets](./creatingwidgets.md), a widget can support many different attributes from the widget interface. Ideally, as many of these attributes as possible are supported. As such, this level of attribute coverage is an important measure of widget quality and can guide authors when picking widgets to install. Another measure is performance, considering both time requirements (loading time) and space requirements (bundle size). Finally, widget quality does not only from hard criteria like functionality and performance, but also from soft criteria that depend on the value the widget provides to the authors and learners. @@ -43,8 +44,3 @@ There are several sets of usability principles. For this explainer, we apply [Ni 9. **Help users recognize, diagnose, and recover from errors**: Error messages should be expressed in plain language (no error codes), precisely indicate the problem, and constructively suggest a solution. 10. **Help and documentation**: It’s best if the system doesn’t need any additional explanation. However, it may be necessary to provide documentation to help users understand how to complete their tasks. - -## Value -*Work in Progress*: -- Usefulness for education as evaluated by experts - diff --git a/@webwriter/website/src/content/docs/widgets/analyzing.md b/@webwriter/website/src/content/docs/widgets/analyzing.md new file mode 100644 index 00000000..0b884ca9 --- /dev/null +++ b/@webwriter/website/src/content/docs/widgets/analyzing.md @@ -0,0 +1,12 @@ +--- +order: 109 +title: "Analyzing" +--- + + +# Analyzing + +To understand the experience of users interacting with a widget, authors and researchers need fine-grained data of this interaction. To support this, widgets may produce events that are translated into xAPI statements. + +## Not supported yet +Analyzing is a work in progress and not supported yet. \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/widgets/assets.md b/@webwriter/website/src/content/docs/widgets/assets.md new file mode 100644 index 00000000..cb733682 --- /dev/null +++ b/@webwriter/website/src/content/docs/widgets/assets.md @@ -0,0 +1,92 @@ +--- +title: "Assets" +order: 107 +--- + +# Assets +Widgets may use different external assets such as images (or even audio and video), WebAssembly files, custom resources, and so on. This section shows how to use some of the most common types of assets in a widget. + +## How assets are handled in WebWriter +When a widget is loaded into WebWriter (by installing a package), WebWriter bundles the package using [`esbuild`](https://esbuild.github.io/) and imports the resulting bundle. This means that a widget may include any [type of asset that `esbuild` allows](https://esbuild.github.io/content-types/). Bundling is used again when the author saves the explorable, as all widgets are combined into a single, minimal bundle and the bundle source is embedded into the explorable. + +## JS +JS is the default asset type. It can be the entry point of your widget with `"main": "myfile.js"` configured in `package.json`. Any files imported in your entry point are also bundled (this applies recursively) according to normal bundler behavior. + +`mywidget.js` +```js +import MySubComponent from "./mysubcomponent" +``` + +More details can be found in the [esbuild documentation on JS](https://esbuild.github.io/content-types/#javascript). + +## TypeScript +[TypeScript (TS)](https://www.typescriptlang.org/) is a strongly typed language building on JS. In WebWriter, TypeScript has first-class support: A TypeScript file can also be an entry point with `"main": "myfile.ts"`, configured in `package.json`. The same rules as for JS generally apply. Additionally, if your package includes a [`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html), it is used when bundling. + +`mywidget.ts` +```ts +import MySubComponent from "./mysubcomponent" +``` + +More details can be found in the [esbuild documentation on TypeScript](https://esbuild.github.io/content-types/#typescript). + +## JSX/TSX +JSX is a syntax for JS to create React elements with an XML-like syntax. Some component libraries, most prominently React, use this syntax. + +More details can be found in the [esbuild documentation on JSX](https://esbuild.github.io/content-types/#jsx). + +## JSON +JSON can be imported directly, as well. When a JSON file is imported, it is converted into a JS object at build time. + +`mywidget.js` +```js +import config from "./config.json" +``` + +This means that you can also import the package's `package.json` if you want to reuse metadata you stored there for the widget. + +More details can be found in the [esbuild documentation on JSON](https://esbuild.github.io/content-types/#json). + +## CSS +The recommended way to include styles in a widget is to use a CSS-in-JS approach such as [lit's support for styles](https://lit.dev/docs/components/styles/). + +Alternatively, CSS files can be imported from JS/TS. This will generate a CSS bundle that WebWriter will import along with the widget. Note that the CSS will still not affect your component's shadow DOM, so this is typically not what you want. + +```js +import "./mystyle.css" +``` + +More details can be found in the [esbuild documentation on CSS](https://esbuild.github.io/content-types/#json). + +## Text +Any text file with the `.txt` extension can be imported as a string. + +```js +import string from './myfile.txt' +console.log(string) +``` + +More details can be found in the [esbuild documentation on text](https://esbuild.github.io/content-types/#text). + +## Media: Images, (Audio, Video) +Small media assets (< 1.45MB) can be imported in your JS/TS code. These assets are converted into a Base64-encoded data URI that can be used directly in any place a URI would be used. The limit of 1.45MB results from [the 2MB limit of data URIs in Chrome](https://stackoverflow.com/a/41755526) and the [~37% size increase of binary data in Base64 encoding](https://stackoverflow.com/a/11402374). Bigger files may work on browsers with higher limits but will break in Chrome. + +```js +import myicon from "./myicon.svg" + +class MyWidget extends LitElement { + render() { + // This will the icon at + return html`` + } +} +``` + +As shown in the example, this approach is most useful for using multiple small assets such as a set of icons for the widget. + +Larger media assets such as most video and audio files are not intended to be part of a widget's source. Since these assets would be bundled into every explorable that includes the widget, they would massively increase the widget's size. + +## WebAssembly +WebAssembly is not supported yet. + +## Other assets +Other types of assets are not directly supported. However, some other types of assets can be supported by adding a build step to your widget's development. To achieve this, you need to convert/compile the unsupported asset type into one of the supported asset types. \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/widgets/editingandsaving.md b/@webwriter/website/src/content/docs/widgets/editingandsaving.md new file mode 100644 index 00000000..16536ede --- /dev/null +++ b/@webwriter/website/src/content/docs/widgets/editingandsaving.md @@ -0,0 +1,66 @@ +--- +title: "Saving and Editing" +order: 102 +--- + +# Saving and Editing +Usually, you want users to be able to save their progress. Also, you may decide that some options of your widget should only be accessible to authors, but not to users. This sections outlines how to save widget state and how to limit options to authors. + + +## Saving widget state + To support saving, all state must be stored as **attributes** of the widget's custom element, or as **child nodes**. Anything else, including properties and the content of the shadow DOM, will not be saved. + +In this example, we save our textarea's content in an attribute `value` which we create with Lit, also adding a change listener on the `textarea`: + +```ts +export default class CoolWidget extends LitElementWw { + + @property({attribute: true}) + value: string + + render() { + return html`` + } +} +``` + +### Notes +- Please note that [attributes are different from properties](https://stackoverflow.com/a/6004028) and properties will not be saved. +- This allows learners to save their changes locally just using the save function of their web browser since browsers implement the same behavior of persisting attributes. + +## `editable`: Limit options to authors +With statefulness, we already allow authors to "prefill" the widget with some state. But often, authors should be able to customize widgets further than users, allowing more complex interaction with the widget than would be reasonable for users. + +For example, we may want to add the ability for authors to add a placeholder text to the textarea that is shown when it is empty. To accomplish that, we add a `placeholder` attribute, an `input` element and CSS to make sure the `input` element is only shown when the widget is being edited (`editable`): + +```ts +export default class CoolWidget extends LitElementWw { + + @property({attribute: true}) + value: string + + @property({attribute: true}) + placeholder: string + + static get styles() { + return css` + :host(:not([editable])) .placeholder { + display: none; + } + ` + } + + render() { + return html` + this.placeholder = e.target.value}> + ` + } +} +``` + +## Separate editor widget +Not supported yet diff --git a/@webwriter/website/src/content/docs/widgets/focusmanagement.md b/@webwriter/website/src/content/docs/widgets/focusmanagement.md new file mode 100644 index 00000000..462e4065 --- /dev/null +++ b/@webwriter/website/src/content/docs/widgets/focusmanagement.md @@ -0,0 +1,50 @@ +--- +title: Managing Focus +order: 103 +--- + +# Managing Focus +To improve the authoring experience and accessibility for keyboard users, the widget should react sensibly when receiving focus. + +## `focus()`: Handle when the widget receives focus +A simple way of handling focus is delegating the focus to a child element. + +In our example, we implement `focus()` on the element such that the `textarea` is focused when the widget is focused: +```ts +export default class CoolWidget extends LitElementWw { + + @property({attribute: true}) + value: string + + @property({attribute: true}) + placeholder: string + + @query("textarea") + textarea: HTMLTextAreaElement + + focus(options: FocusOptions) { + this.textarea?.focus(options) + } + + static get styles() { + return css` + :host([editable]) .placeholder { + display: none; + } + + :host([printable]) textarea { + border: 2px solid black; + border-radius: 2px; + } + ` + } + + render() { + return html` + this.placeholder = e.target.value}> + ` + } +} +``` \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/widgets/localization.md b/@webwriter/website/src/content/docs/widgets/localization.md new file mode 100644 index 00000000..06755eeb --- /dev/null +++ b/@webwriter/website/src/content/docs/widgets/localization.md @@ -0,0 +1,43 @@ +--- +title: Localizing +order: 105 +--- + +# Localizing + +Widgets can support different languages. WebWriter automatically sets each widget's language to the Explorable's language. + +## Supporting languages with `lang` +WebWriter passes the configured language to each widget using the [Web Standard `lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang). Widgets should change the displayed language based on that attribute. + +Consider this example for a widget only providing a German translation: +```ts + +export default class CoolWidget extends LitElementWw { + + static LOCALIZED = { + "What's your name?": {"de": "Wie heißt du?"} + } + + // Helper function: Get localized form of `str` if available, otherwise fall back to `str` + msg = (str: string) => CoolWidget.LOCALIZED[str][this.lang] ?? str + + // `this.lang` exists by default, but we still need to make it reactive so our component updates when it is changed + @property({attribute: true}) + lang: string + + @property({attribute: true}) + value: string + + render() { + return html` + ${this.msg("What's your name?")} + ` + } +} +``` + +### Localizing with lit +For the most simple cases, keeping an object with strings for each language would be sufficient. For more advanced cases, lit provides [`@lit/localize`](https://lit.dev/docs/localization/overview/). This is especially useful if you are dealing with sub-components in your widgets, or need to translate expressions that include variables. \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/widgets/nestingandcontent.md b/@webwriter/website/src/content/docs/widgets/nestingandcontent.md new file mode 100644 index 00000000..24b297fa --- /dev/null +++ b/@webwriter/website/src/content/docs/widgets/nestingandcontent.md @@ -0,0 +1,11 @@ +--- +title: Nesting and Content +order: 104 +--- + +# Nesting and Content + +Often, widgets can contain other editable content. This may include text, specific media types, any block nodes, or even other widgets. + +## Not supported yet +Nesting is a work in progress and not supported yet. \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/widgets/printing.md b/@webwriter/website/src/content/docs/widgets/printing.md new file mode 100644 index 00000000..b740d785 --- /dev/null +++ b/@webwriter/website/src/content/docs/widgets/printing.md @@ -0,0 +1,50 @@ +--- +title: Printing +order: 106 +--- + +# Printing +Sometimes, users and authors may want to fall back to printed versions of Explorables. + + +## `printable`: Allow users to print your widget +Before an explorable is printed, the `printable` attribute is applied to each widget. Widget developers can use this to prepare the widget display for printing. + +For example, we could let the interactive textarea become simply a box with a black outline where (paper) users can write text: + +```ts +export default class CoolWidget extends LitElementWw { + + @property({attribute: true}) + value: string + + @property({attribute: true}) + placeholder: string + + static get styles() { + return css` + :host(:not([editable])) .placeholder { + display: none; + } + + :host([printable]) textarea { + border: 2px solid black; + border-radius: 2px; + } + ` + } + + render() { + return html` + this.placeholder = e.target.value}> + ` + } +} +``` + +### Notes +- Only some widgets work well in a printed representation. If the widget can't be represented properly, `printable=true` could simply mean showing a hint to that effect. +- Links could be represented as QR codes. +- [Media queries (`@media print`)](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries) can also be used to support printing. \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/widgets/rendering.md b/@webwriter/website/src/content/docs/widgets/rendering.md new file mode 100644 index 00000000..c5fed1d2 --- /dev/null +++ b/@webwriter/website/src/content/docs/widgets/rendering.md @@ -0,0 +1,62 @@ +--- +title: Displaying +order: 101 +--- + +# Displaying +Widgets need to shown to both users and authors. This section explains how to implement a display for your widget and how to use WebWriter's sidebar feature to improve your layout. + +## Define a `render` method +To display a widget, a render function returning a template needs to be defined. + +In this example, we simply render a [vanilla `textarea` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea) into the widget: + +```ts +import {LitElementWw} from "@webwriter/lit" +import {html, css} from "lit" +import {property, query} from "lit/decorators.js" + +export default class CoolWidget extends LitElementWw { + render() { + return html`` + } +} +``` + +## Use a part-based layout +As an extra feature, WebWriter can display your widget's editing elements separately from the widget's content. + +For this, the widget's editing element needs the attribute `part="action"`. It should be a single element and a direct child of the widget. + +To accomplish this for our example above, we simply add the `part="action"`to the our input element: + +```ts +export default class CoolWidget extends LitElementWw { + + @property({attribute: true}) + value: string + + @property({attribute: true}) + placeholder: string + + static get styles() { + return css` + :host(:not([editable])) .placeholder { + display: none; + } + ` + } + + render() { + return html` + this.placeholder = e.target.value}> + ` + } +} +``` + +#### Notes +- The part-based layout is preferable for more complex widgets since it makes better use of screen space in WebWriter. +- To have multiple elements for the `action` part, simply add a wrapper element (`
...
`). Only the wrapper needs the `part="action"`, other elements may \ No newline at end of file diff --git a/@webwriter/website/src/content/docs/widgets/widgets.md b/@webwriter/website/src/content/docs/widgets/widgets.md new file mode 100644 index 00000000..4544bf44 --- /dev/null +++ b/@webwriter/website/src/content/docs/widgets/widgets.md @@ -0,0 +1,17 @@ +--- +order: 100 +title: Widgets +--- + + +# Widgets +Widgets are interactive multimedia elements that can be part of an explorable. They can developed using web technologies and published as packages. + +## Technical View +Corresponding to Explorables, Widgets are simply HTML elements, again implementing the same APIs (`HTMLElement`). This means that any element that can be defined in HTML can become a Widget, as well. New HTML elements can be defined as Web Components. This means a widget can support any and every web technology capable of running in the browser. This includes [standard web APIs](https://developer.mozilla.org/en-US/docs/Web/API), [JS packages/modules for the browser](https://www.npmjs.com/), and so on. +As each widget comes in a [Package](../packages/packages.md) that is loaded and bundled with `esbuild` when a document is saved, +[all content types of esbuild are supported](https://esbuild.github.io/content-types/). +**Practically, this means you can use JavaScript-adjacent technology such TypeScript, CSS, JSON and more.** + +## Author/User View +To authors, widgets are part of a broad palette to create an explorable. They may use the different rich text elements provided by WebWriter and mix them with other available widgets. To users, widgets are just parts of the explorable they are viewing. Widgets are a seamless part of the page and probably not considered very closely by users. \ No newline at end of file diff --git a/@webwriter/website/src/layouts/DocPage.astro b/@webwriter/website/src/layouts/DocPage.astro index 318b18eb..4d007fb9 100644 --- a/@webwriter/website/src/layouts/DocPage.astro +++ b/@webwriter/website/src/layouts/DocPage.astro @@ -5,6 +5,12 @@ import Layout from "@layouts/Layout.astro" const allDocs = (await getCollection('docs')) .filter(doc => doc.slug !== "index") .sort((a, b) => a.data.order - b.data.order) + .map(doc => ({...doc, level: new Set(doc.slug.split("/")).size})) + +const categories = new Set(allDocs.reduce((acc, doc) => { + return doc.slug.includes("/")? [...acc, doc.slug.split("/")[0]]: acc +}, [] as string[])) + const docUrls = allDocs.map(doc => { const url = new URL(Astro.request.url) url.pathname = `docs/${doc.slug}` @@ -26,7 +32,7 @@ const docActive = allDocs.map((doc, i) =>{ Documentation
    - {allDocs.map((doc, i) => )} + {allDocs.map((doc, i) => )}
@@ -149,7 +155,7 @@ const docActive = allDocs.map((doc, i) =>{ display: inline-flex; text-decoration: none; font-size: 1rem; - height: 2.5rem; + height: 1.5rem; color: var(--sl-color-gray-950); width: 100%; flex-direction: row; @@ -170,6 +176,15 @@ const docActive = allDocs.map((doc, i) =>{ text-decoration: 2px solid underline; } + .doc-link[data-level=1] { + margin-top: 0.5rem; + font-weight: bold; + } + + .doc-link[data-level=2] { + margin-left: 1ch; + } + @media (max-width: 1000px) { #docsNavToggle { @@ -208,6 +223,11 @@ const docActive = allDocs.map((doc, i) =>{