{"id":16061232,"url":"https://github.com/krzyzanowskim/sttextview-plugin-annotations","last_synced_at":"2025-03-18T05:30:33.419Z","repository":{"id":194596544,"uuid":"690473957","full_name":"krzyzanowskim/STTextView-Plugin-Annotations","owner":"krzyzanowskim","description":"Annotations Plugin","archived":false,"fork":false,"pushed_at":"2024-02-05T01:24:09.000Z","size":48,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-14T07:11:18.816Z","etag":null,"topics":["plugin","sttextview","textview"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krzyzanowskim.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}},"created_at":"2023-09-12T09:08:44.000Z","updated_at":"2024-02-05T19:05:13.000Z","dependencies_parsed_at":"2024-01-19T02:25:11.792Z","dependency_job_id":"af4da4f9-e370-48de-aef3-6bc887fc9f67","html_url":"https://github.com/krzyzanowskim/STTextView-Plugin-Annotations","commit_stats":{"total_commits":21,"total_committers":2,"mean_commits":10.5,"dds":0.04761904761904767,"last_synced_commit":"5cf1c4084f1c50880c8375e29d367ba99fb1943f"},"previous_names":["krzyzanowskim/sttextview-plugin-annotations"],"tags_count":8,"template":false,"template_full_name":"krzyzanowskim/STTextView-Plugin-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzyzanowskim%2FSTTextView-Plugin-Annotations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzyzanowskim%2FSTTextView-Plugin-Annotations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzyzanowskim%2FSTTextView-Plugin-Annotations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzyzanowskim%2FSTTextView-Plugin-Annotations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krzyzanowskim","download_url":"https://codeload.github.com/krzyzanowskim/STTextView-Plugin-Annotations/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244164537,"owners_count":20408950,"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":["plugin","sttextview","textview"],"created_at":"2024-10-09T04:08:14.281Z","updated_at":"2025-03-18T05:30:33.407Z","avatar_url":"https://github.com/krzyzanowskim.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"[STTextView](https://github.com/krzyzanowskim/STTextView) Annotations Plugin\n\n## Installation\n\nAdd the plugin package as a dependency of your application, then register/add it to the STTextView instance:\n\n```swift\nimport STAnnotationsPlugin\n\nclass AnnotationDataSource: STAnnotationsDataSource {\n\n    // Optional. Default implementation provided.\n    // func textView(_ textView: STTextView, viewForLineAnnotation lineAnnotation: any STLineAnnotation, textLineFragment: NSTextLineFragment, proposedViewFrame: CGRect) -\u003e NSView? {\n    //    // view for annotation\n    // }\n\n    var textViewAnnotations: [any STLineAnnotation] = []\n}\n\nlet dataSource = AnnotationDataSource()\n\n// Implement AnnotationsDataSource protocol to provide annotations\nlet plugin = STAnnotationsPlugin(dataSource: dataSource)\n\n// Add/register the plugin in the STTextView instance\ntextView.addPlugin(plugin)\n```\n\nCheck the Demo application (AppKit or UIKit) for a reference implementation.\n\n![Untitled](https://github.com/user-attachments/assets/c29fb7c2-5417-4487-a67a-4e7e20758b73)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrzyzanowskim%2Fsttextview-plugin-annotations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrzyzanowskim%2Fsttextview-plugin-annotations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrzyzanowskim%2Fsttextview-plugin-annotations/lists"}