{"id":19188798,"url":"https://github.com/miquido/aegithalos","last_synced_at":"2025-06-19T12:40:18.113Z","repository":{"id":42988795,"uuid":"278642229","full_name":"miquido/Aegithalos","owner":"miquido","description":"Function composition for functional scared. The project was made by Miquido. https://www.miquido.com/","archived":false,"fork":false,"pushed_at":"2022-03-24T14:47:03.000Z","size":174,"stargazers_count":9,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T02:47:49.853Z","etag":null,"topics":["function-composition","styling","swift","uikit"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/miquido.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}},"created_at":"2020-07-10T13:35:58.000Z","updated_at":"2023-04-12T17:49:08.000Z","dependencies_parsed_at":"2022-08-29T14:41:31.632Z","dependency_job_id":null,"html_url":"https://github.com/miquido/Aegithalos","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/miquido/Aegithalos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2FAegithalos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2FAegithalos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2FAegithalos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2FAegithalos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miquido","download_url":"https://codeload.github.com/miquido/Aegithalos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2FAegithalos/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260754344,"owners_count":23057760,"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":["function-composition","styling","swift","uikit"],"created_at":"2024-11-09T11:26:04.512Z","updated_at":"2025-06-19T12:40:13.094Z","avatar_url":"https://github.com/miquido.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./logo.svg\" width=600\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/apple/swift-package-manager\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Swift%20Package%20Manager-compatible-green.svg\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/platform-iOS%20|%20iPadOS%20|%20macOS-blue.svg?style=flat\"\u003e\n\u003c/p\u003e\n\nAegithalos is a library focused on composition of mutating functions. It is useful for preparing repeatable and composable setup for any types i.e views or network requests.\n\n## Instalation\n\nEasiest way to use Aegithalos is to add it as you Swift package dependency:\n\n```swift\n.package(url: \"https://github.com/miquido/aegithalos.git\", from: \"2.0.0\")\n```\n\nYou can also use Xcode add SPM dependency option using this URL:  `https://github.com/miquido/aegithalos.git`\n\n## Common usage\n\nMain component of this library is `Mutation` struct. It is used to encapsulate and compose mutating functions. You can use it to define any kind of mutating function that can be passed around and applied on multiple subjects. For example - to prepare common style for UILabel applied on different screens in your application.\n\n```swift\nlet labelSetup = Mutation { (label: UILabel) in\n  label.textAlignment = .center\n  label.textColor = .gray\n}\n```\n\nYou can use it to apply same setup whenever it is needed...\n\n```swift\nlabelSetup.apply(on: myLabel)\n```\n\n... or even instantiate new subjects (conforming to `EmptyInstantiable`) with mutations applied.\n\n```swift\nlet newLabelAfterSetup = labelSetup.instantiate()\n```\n\nMoreover mutations can be composed to refine and apply large sets of mutations on complex subjects.\n\n```swift\nlet baseLabelSetup = Mutation { (label: UILabel) in\n    /* do some base setup */\n  }\nlet errorLabelSetup = Mutation\n  .combined(\n    baseLabelSetup,\n    Mutation { (label: UILabel) in\n      /* add setup for errors */\n    }\n  )\n```\n\n## AegithalosCocoa\n\nAegithalos comes with set of usefull extensions for UIKit already prepared in AegithalosCocoa package. You can easily prapare any kind of UI setup with it, even layout constraints. Lets have a Signin with Apple button:\n\n```swift\nimport AegithalosCocoa\n\nlet signinWithAppleButtonSetup = Mutation\u003cUIButton\u003e\n  .combined(\n    .backgroundColor(.black),\n    .cornerRadius(5),\n    .heightAnchor(.equalTo, 50),\n    .titleColor(.white),\n    .titleAlignment(.center),\n    .titleFont(.systemFont(ofSize: 14, weight: .medium)),\n    .title(localized: \"com.miquido.signin.apple.button.tittle\"),\n    .titleInsets(UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 0)),\n    .tintColor(.white),\n    .image(symbol: \"applelogo\")\n  )\n```\n\n## License\n\nCopyright 2020-2021 Miquido\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiquido%2Faegithalos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiquido%2Faegithalos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiquido%2Faegithalos/lists"}