{"id":23143089,"url":"https://github.com/cleancocoa/omnibar","last_synced_at":"2025-08-17T14:33:04.260Z","repository":{"id":65094337,"uuid":"93239106","full_name":"CleanCocoa/Omnibar","owner":"CleanCocoa","description":"Text field component that supports term auto-completion and keyboard navigation","archived":false,"fork":false,"pushed_at":"2025-01-06T09:59:49.000Z","size":1779,"stargazers_count":26,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-12T19:11:33.921Z","etag":null,"topics":["autocomplete","components","mac","search","swift","view"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CleanCocoa.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":"2017-06-03T09:45:44.000Z","updated_at":"2025-07-22T07:29:57.000Z","dependencies_parsed_at":"2024-11-13T15:30:59.505Z","dependency_job_id":null,"html_url":"https://github.com/CleanCocoa/Omnibar","commit_stats":{"total_commits":130,"total_committers":2,"mean_commits":65.0,"dds":0.09230769230769231,"last_synced_commit":"7128354192884f56c84ee404cf45d8a9e3c3b440"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/CleanCocoa/Omnibar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCocoa%2FOmnibar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCocoa%2FOmnibar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCocoa%2FOmnibar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCocoa%2FOmnibar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CleanCocoa","download_url":"https://codeload.github.com/CleanCocoa/Omnibar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCocoa%2FOmnibar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270859300,"owners_count":24658181,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["autocomplete","components","mac","search","swift","view"],"created_at":"2024-12-17T15:12:07.743Z","updated_at":"2025-08-17T14:33:04.210Z","avatar_url":"https://github.com/CleanCocoa.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Omnibar\n\n![Swift 5.7](https://img.shields.io/badge/Swift-5.7-blue.svg?style=flat)\n![Version](https://img.shields.io/github/tag/CleanCocoa/Omnibar.svg?style=flat)\n![Platform](https://img.shields.io/badge/platform-macOS-lightgrey.svg?style=flat)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\nA search field with support for auto-completion of typed strings.\n\n\u003e **Looking for RxSwift compatibility?** The reactive extensions (RxSwift) have moved to \u003chttps://github.com/CleanCocoa/RxOmnibar\u003e after v0.21.\n\n## Overview\n\nMade to satisfy these needs:\n\n1. Quickly filter search results;\n2. Change result selection through use of the arrow keys from within the Omnibar;\n3. Offer auto-completion of the search term inside the text field itself.\n\nSo if you type \"aard\", the Omnibar will suggest the term \"aardvark\" in the example app:\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"assets/suggestion.png\" /\u003e\n\u003c/div\u003e\n\n\n## Delegate-based Approach\n\n### Displaying Values\n\nCall `display(content: OmnibarContent)` to change the content of the Omnibar and affect the selection. You can also use the `stringValue` property to change the text and put the insertion point at the end like regular `NSTextField`s do.\n\n```swift\npublic enum OmnibarContent {\n\n    /// Empties the Omnibar.\n    case empty\n\n    /// Display `text` inside the Omnibar and select it all (like ⌘A) for\n    /// quick overwriting.\n    case selection(text: String)\n\n    /// Display `text` inside the Omnibar and put the insertion point\n    /// at the end.\n    case prefix(text: String)\n\n    /// Display `text`, followed by `appendix`, putting the insertion point\n    /// before `appendix` and selecting it so it can be overwritten.\n    case suggestion(text: String, appendix: String)\n}\n```\n\n### Reacting to Events\n\nSet `delegate` to be notified of changes. The `OmnibarDelegate` protocol offers these function signatures:\n\n- Optional: `omnibarSelectNext(_ omnibar: Omnibar)` and `omnibarSelectPrevious(_ omnibar: Omnibar)` to change the selected result without unfocusing the Omnibar.\n- Required: `omnibar(_ omnibar: Omnibar, contentChange: OmnibarContentChange, method: ChangeMethod)`, notifying the delegate about the last user interaction and typing change.\n\n`ChangeMethod` can be `.deletion`, `.insertion`, or `.appending` to convey what the user did so you can react to all cases differently.\n\n`OmnibarContentChange` is either a `.replacement` of the old stuff, or a `.continuation` of the last suggestion, if there was any; `.continuation` is just like a self-suggested `OmnibarContent.suggestion` waiting for approval.\n\n```swift\nenum OmnibarContentChange {\n    case replacement(text: String)\n    case continuation(text: String, remainingAppendix: String)\n}\n```\n\n# Attributions and Contributions\n\n## English Open Word List (EOWL) v1.1.2\n\nThe sample app uses a list of 12000+ english words to display and filter.\n\n\u003e The “English Open Word List” (EOWL) was developed by Ken Loge, but is almost entirely derived from the “UK Advanced Cryptics Dictionary” (UKACD) Version 1.6, by J Ross Beresford.\n\n- [English Open Word List](http://dreamsteep.com/projects/the-english-open-word-list.html)\n- \"UK Advanded Cryptics Dictionary\" was formerly available at \u003chttp://cfaj.freeshell.org/wordfinder/UKACD17.shtml\u003e but is now down\n\n## License\n\n### Omnibar\n\nCopyright (c) 2017 Christian Tietze. Distributed under the MIT License.\n\n### English Open Word List (EOWL)\n\nCopyright © J Ross Beresford 1993-1999. All Rights Reserved. The following restriction is placed on the use of this publication: if the UK Advanced Cryptics Dictionary is used in a software package or redistributed in any form, the copyright notice must be prominently displayed and the text of this document must be included verbatim.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleancocoa%2Fomnibar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleancocoa%2Fomnibar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleancocoa%2Fomnibar/lists"}