{"id":20810087,"url":"https://github.com/schwa/swiftnodeeditor","last_synced_at":"2025-04-06T02:07:55.921Z","repository":{"id":60778883,"uuid":"544748296","full_name":"schwa/SwiftNodeEditor","owner":"schwa","description":"A package of SwiftUI code for making node editors","archived":false,"fork":false,"pushed_at":"2025-01-07T20:14:59.000Z","size":21298,"stargazers_count":124,"open_issues_count":1,"forks_count":8,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-30T01:05:49.542Z","etag":null,"topics":["edge","graph","node","swiftui","visual","visual-programming"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schwa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-10-03T06:42:34.000Z","updated_at":"2025-03-20T18:55:15.000Z","dependencies_parsed_at":"2025-02-23T07:10:47.978Z","dependency_job_id":"aed709a8-27b7-4d4e-833c-21b34cdf6740","html_url":"https://github.com/schwa/SwiftNodeEditor","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schwa%2FSwiftNodeEditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schwa%2FSwiftNodeEditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schwa%2FSwiftNodeEditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schwa%2FSwiftNodeEditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schwa","download_url":"https://codeload.github.com/schwa/SwiftNodeEditor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423513,"owners_count":20936626,"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":["edge","graph","node","swiftui","visual","visual-programming"],"created_at":"2024-11-17T20:19:33.375Z","updated_at":"2025-04-06T02:07:55.898Z","avatar_url":"https://github.com/schwa.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftNodeEditor\n\nA package of SwiftUI code for making node editors\n\n## Screenshot\n\n![Screen Recording 1](Documentation/Screen%20Recording%201.gif)\n\n## Usage\n\n1. `import SwiftNodeEditor`\n2. Conform your model types to `NodeProtocol` (nodes contain sockets), `SocketProtocol` (sockets are connected with wires) and `WireProtocol`.\n3. Implement a `PresentationProtocol` to control how your model types are presented and can be interacted with.\n4. Embed a `NodeGraphEditorView` in your SwiftUI view hierarchy and provide it with your model types and presentation protocol.\n\nSee SwiftNodeEditorDemo for a complex example showing multiple presentation protocols and several ways of interacting with your objects.\n\n## License\n\nSee [LICENSE.md](LICENSE.md).\n\n## Caveats\n\nThis project is (currently) undergoing active development and its API surface area is not yet stable.\n\nSee also [CAVEAT.md](CAVEAT.md).\n\n## TODO\n\n### High Priority\n\n- [ ] Grep code for TODOs \u0026 fix 'em.\n- [ ] Remove dependency on Everything (may need to put Everything's CoreGraphics in a new package?)\n- [ ] That GeometryReader makes it hard for wire/pin presentation to work without hard-coding size. (Would a layout help?)\n- [ ] Documentation.\n- [ ] Fix project structure - the app and demo package should be merged.\n- [ ] Simple demo.\n- [X] Add presentation for pins.\n- [X] Cannot debug in Xcode 14.0 beta 3 (TODO: file a feedback report).\n- [X] Add presentation for sockets.\n- [X] Add presentation for wires.\n\n### Nice to Have\n\n- [ ] The differences in the 'content(for:)' api are weird \n- [ ] It's silly that both pins and sockets need to register the same drag gesture - make one gesture and raise it above.\n- [ ] Interface protocols only need to be Identifiable not Hashable also.\n- [ ] Socket sizes are hard-coded.\n- [ ] Pins are not the same colours as their wires.\n- [ ] Add presentation for pins.\n- [ ] Investigating use NodeStyle/WireStyle etc inside Presentation\n- [ ] Turn README's TODO list into GitHub issues.\n- [ ] Add tools to layout nodes.\n- [ ] Add more streamlined HI for adding nodes.\n- [ ] Add better z-layer behaviour.\n- [ ] Unit tests for model-layer.\n- [ ] Labels on wires.\n- [ ] Marquee-based selection.\n- [ ] Keyboard shortcuts.\n- [ ] The Demo app needs a List representation.\n- [ ] Selector mechanism for sockets and wires (can I connect this wire to this socket?)\n- [ ] Many-to-many sockets\n- [ ] Use OrderedSet (from swift-collections) in correct places.\n- [ ] Use more from macOS13/iOS16 in this (layouts, backgroundStyle, etc?)\n- [X] Make demo a document-based app with JSON serialization.\n- [X] Make demo labels editable.\n- [X] Get rid of weird underscore naming with generics.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschwa%2Fswiftnodeeditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschwa%2Fswiftnodeeditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschwa%2Fswiftnodeeditor/lists"}