{"id":15824477,"url":"https://github.com/luwes/sinuous-todomvc","last_synced_at":"2025-09-09T04:38:49.258Z","repository":{"id":41773407,"uuid":"204188066","full_name":"luwes/sinuous-todomvc","owner":"luwes","description":"TodoMVC implemented in Sinuous ~ 2.9kB gzip","archived":false,"fork":false,"pushed_at":"2023-10-28T15:39:42.000Z","size":333,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-06T08:42:16.592Z","etag":null,"topics":["sinuous","todomvc"],"latest_commit_sha":null,"homepage":"https://luwes.github.io/sinuous-todomvc/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luwes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-24T17:09:47.000Z","updated_at":"2023-10-28T15:37:06.000Z","dependencies_parsed_at":"2024-10-26T13:34:10.314Z","dependency_job_id":"0c882f39-2ca4-4784-9d12-4f96147dc561","html_url":"https://github.com/luwes/sinuous-todomvc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luwes%2Fsinuous-todomvc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luwes%2Fsinuous-todomvc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luwes%2Fsinuous-todomvc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luwes%2Fsinuous-todomvc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luwes","download_url":"https://codeload.github.com/luwes/sinuous-todomvc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232002540,"owners_count":18458604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sinuous","todomvc"],"created_at":"2024-10-05T08:42:20.659Z","updated_at":"2024-12-31T15:27:07.141Z","avatar_url":"https://github.com/luwes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sinuous TodoMVC\n\n[Sinuous](https://github.com/luwes/sinuous/) implementation of the [TodoMVC](http://todomvc.com/) example application.  \n[luwes.github.io/sinuous-todomvc](https://luwes.github.io/sinuous-todomvc).\n\nThe entire app weighs 2.9kb gzip.\n\n```js\nimport { h } from 'sinuous';\nimport { map } from 'sinuous/map';\nimport { addTodo, clearCompleted, completed, displayed, doneEditing, editing,\n  filter, remaining, remove, save, todos, toggle, toggleAll } from './controller.js';\nimport { cx, focus } from './utils.js';\n\nconst TodoApp = () =\u003e html`\n  \u003cheader class=header\u003e\n    \u003ch1\u003etodos\u003c/h1\u003e\n    \u003cinput\n      class=new-todo\n      placeholder=\"What needs to be done?\"\n      onkeyup=${addTodo}\n      autofocus\n    /\u003e\n  \u003c/header\u003e\n\n  \u003csection class=main hidden=${() =\u003e !todos().length}\u003e\n    \u003cinput\n      id=toggle-all\n      class=toggle-all\n      type=checkbox\n      oninput=${toggleAll}\n      checked=${() =\u003e !remaining().length}\n    /\u003e\n    \u003clabel htmlFor=toggle-all\u003eMark all as complete\u003c/label\u003e\n\n    \u003cul class=todo-list\u003e\n      ${map(displayed, ({ id, title, completed }) =\u003e html`\n        \u003cli class=${() =\u003e cx({ completed: completed(), editing: editing() === id })}\u003e\n          \u003cdiv class=view\u003e\n            \u003cinput\n              class=toggle\n              type=checkbox\n              checked=${completed}\n              oninput=${e =\u003e toggle(e, id)}\n            /\u003e\n            \u003clabel ondblclick=${() =\u003e editing(id)}\u003e${title}\u003c/label\u003e\n            \u003cbutton class=destroy onclick=${() =\u003e remove(id)}\u003e\u003c/button\u003e\n          \u003c/div\u003e\n          ${() =\u003e editing() === id \u0026\u0026 focus(html`\n            \u003cinput\n              class=edit\n              value=${title}\n              onfocusout=${e =\u003e save(e, id)}\n              onkeyup=${e =\u003e doneEditing(e, id)}\n            /\u003e`)\n          }\n        \u003c/li\u003e\n      `)}\n    \u003c/ul\u003e\n\n    \u003cfooter class=footer\u003e\n      \u003cspan class=todo-count\u003e\n        \u003cstrong\u003e${() =\u003e remaining().length}\u003c/strong\u003e\n        ${() =\u003e remaining().length === 1 ? ' item' : ' items'} left\n      \u003c/span\u003e\n      \u003cul class=filters\u003e\n        \u003cli\u003e\u003ca class=${() =\u003e cx({ selected: filter() === 'all' })} href=\"#/\"\u003eAll\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca class=${() =\u003e cx({ selected: filter() === 'active' })} href=\"#/active\"\u003eActive\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca class=${() =\u003e cx({ selected: filter() === 'completed' })} href=\"#/completed\"\u003eCompleted\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n      ${() =\u003e completed().length \u003e 0 \u0026\u0026 html`\n        \u003cbutton class=clear-completed onclick=${clearCompleted}\u003e\n          Clear completed\n        \u003c/button\u003e\n      `}\n    \u003c/footer\u003e\n  \u003c/section\u003e\n`;\n\nconst updateView = () =\u003e filter(location.hash.slice(2) || 'all');\nwindow.addEventListener('hashchange', updateView);\nupdateView();\n\ndocument.querySelector('.todoapp').append(TodoApp());\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluwes%2Fsinuous-todomvc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluwes%2Fsinuous-todomvc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluwes%2Fsinuous-todomvc/lists"}