{"id":16870286,"url":"https://github.com/ringabout/starlight","last_synced_at":"2025-04-11T10:41:45.568Z","repository":{"id":113184421,"uuid":"474829069","full_name":"ringabout/starlight","owner":"ringabout","description":"Another front-end framework in Nim (working in progress)","archived":false,"fork":false,"pushed_at":"2022-06-05T09:03:05.000Z","size":116,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-14T15:03:36.436Z","etag":null,"topics":["js","karax","nim","react","vue"],"latest_commit_sha":null,"homepage":"","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ringabout.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-03-28T03:16:37.000Z","updated_at":"2024-08-05T21:29:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7a4a9bc-28be-4fca-a6de-e4bee0f8a263","html_url":"https://github.com/ringabout/starlight","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/ringabout%2Fstarlight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringabout%2Fstarlight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringabout%2Fstarlight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringabout%2Fstarlight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ringabout","download_url":"https://codeload.github.com/ringabout/starlight/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248377710,"owners_count":21093864,"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":["js","karax","nim","react","vue"],"created_at":"2024-10-13T15:03:41.363Z","updated_at":"2025-04-11T10:41:45.559Z","avatar_url":"https://github.com/ringabout.png","language":"Nim","readme":"# starlight\nAnother front-end framework in Nim (working in progress). It directly compiles to the `DOM` and uses `Proxy` to implement reactivity.\n\n## Reactivity\n\n```nim\ntype\n  Card = ref object\n    id: int\n  Counter = ref object\n    num: int\n    card: Card\n\nvar x = reactive Counter(num: 0) # = x := Counter(num: 0)\nwatch:\n  console.log \"run: \", x.?num\n\nconsole.log \"here: \", effectsTable\n\nwatch:\n  console.log \"run2: \", x.?num\n\n# use `.?` to access the attributes of Reactive\nx.?num += 1\nx.?num = 182\n\nx \u003c- Counter(num: 1) # reassign; complete replacement\nx.?num += 1\n\nvar y = reactive Counter(card: Card(id: 16))\nwatch:\n  console.log \"card: \", y.?card.id\n\ny.?card.id += 1\n\ny \u003c- Counter(card: Card(id: -1)) \n```\n\n### primitives\n```nim\nproc createDom(): Element =\n  var count = reactive(0)\n  buildHtml(`div`):\n    text count\n    button(onClick = (e: Event) =\u003e (count += 1)): text \"Count\"\n\nsetRenderer createDom\n```\n\n### ref object\n```nim\ntype\n  Counter = ref object\n    c: int\n\nproc createDom(): Element =\n  var count = reactive(Counter(c: 12))\n  buildHtml(`div`):\n    text count.?c\n    button(onClick = (e: Event) =\u003e (count.?c += 1)): text \"Count\"\n\nsetRenderer createDom\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringabout%2Fstarlight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fringabout%2Fstarlight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringabout%2Fstarlight/lists"}