{"id":27173729,"url":"https://github.com/danielsaidi/textreplacements","last_synced_at":"2025-04-14T20:19:25.537Z","repository":{"id":286825737,"uuid":"962654150","full_name":"danielsaidi/TextReplacements","owner":"danielsaidi","description":"TextReplacements is a SwiftUI library that extends the Text view with ways to customize the rendering of any parts of its text.","archived":false,"fork":false,"pushed_at":"2025-04-08T20:22:21.000Z","size":298,"stargazers_count":43,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T20:19:20.781Z","etag":null,"topics":["ios","macos","swiftui","text","tvos","visionos","watchos"],"latest_commit_sha":null,"homepage":"https://danielsaidi.com/opensource","language":"Shell","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/danielsaidi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["danielsaidi"]}},"created_at":"2025-04-08T13:29:23.000Z","updated_at":"2025-04-14T20:07:35.000Z","dependencies_parsed_at":"2025-04-10T04:32:43.903Z","dependency_job_id":null,"html_url":"https://github.com/danielsaidi/TextReplacements","commit_stats":null,"previous_names":["danielsaidi/textreplacementview","danielsaidi/textreplacements"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsaidi%2FTextReplacements","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsaidi%2FTextReplacements/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsaidi%2FTextReplacements/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsaidi%2FTextReplacements/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielsaidi","download_url":"https://codeload.github.com/danielsaidi/TextReplacements/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248952355,"owners_count":21188427,"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":["ios","macos","swiftui","text","tvos","visionos","watchos"],"created_at":"2025-04-09T11:23:12.652Z","updated_at":"2025-04-14T20:19:25.511Z","avatar_url":"https://github.com/danielsaidi.png","language":"Shell","funding_links":["https://github.com/sponsors/danielsaidi"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"Resources/Icon.png\" alt=\"Project Icon\" width=\"250\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/danielsaidi/TextReplacements?color=%2300550\u0026sort=semver\" alt=\"Version\" title=\"Version\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/swift-6.1-orange.svg\" alt=\"Swift 6.1\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/platform-SwiftUI-blue.svg\" alt=\"Swift UI\" title=\"SwiftUI\" /\u003e\n    \u003ca href=\"https://danielsaidi.github.io/TextReplacements\"\u003e\u003cimg src=\"https://img.shields.io/badge/documentation-web-blue.svg\" alt=\"Documentation\" /\u003e\u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/danielsaidi/TextReplacements\" alt=\"MIT License\" title=\"MIT License\" /\u003e\n\u003c/p\u003e\n\n\n\n# TextReplacements\n\nTextReplacements is a SwiftUI library that extends the `Text` view with ways to customize any parts of its text.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"Resources/Preview.jpeg\" /\u003e\n\u003c/p\u003e\n\nTextReplacements works on all major Apple platforms and is designed to be easy to use.\n\n\n\n## Installation\n\nTextReplacements can be installed with the Swift Package Manager:\n\n```\nhttps://github.com/danielsaidi/TextReplacements.git\n```\n\n\n\n## Usage\n\nTextReplacements let you initialize a `Text` view with a string and one or multiple text replacements.\n\nThe text view in the preview above is created like this:\n\n```swift\nText(\n    \"TextReplacements is a SwiftUI library that extends the Text view with ways to customize any parts of its text. The result is a Text with customized segments that can flow nicely over multiple lines.\",\n    replacements: [\n        \"TextReplacements\": {\n            Text($0)\n                .font(.title)\n                .fontWeight(.black)\n                .fontDesign(.rounded)\n                .foregroundColor(.green)\n        },\n        \"SwiftUI\": {\n            Text($0)\n                .font(.headline)\n                .fontWeight(.black)\n                .fontDesign(.rounded)\n                .foregroundColor(.blue)\n        },\n        \"Text\": {\n            Text($0)\n                .fontWeight(.black)\n                .fontDesign(.rounded)\n                .foregroundColor(.black.opacity(0.6))\n        },\n        \"customize\": {\n            Text($0)\n                .italic()\n                .underline()\n                .font(.body)\n                .fontWeight(.heavy)\n                .fontDesign(.monospaced)\n                .foregroundColor(.purple)\n        },\n        \"par\": {\n            Text($0)\n                .font(.headline)\n                .fontWeight(.black)\n                .fontDesign(.rounded)\n                .foregroundColor(.red)\n        },\n        \"can flow nicely over multiple lines\": {\n            Text($0)\n                .foregroundColor(.orange)\n        }\n    ]\n)\n```\n\nYou can perform any modification that result in new `Text` views. This brings some limitations, like not being able to apply a background color, but lets you highlight certain parts of a text with very little effort.\n\n\n\n## Documentation\n\nThis package will be documented once it gets more than 100 stars.\n\n\n\n## Demo Application\n\nThis package will get a demo application once it gets more than 100 stars.\n\n\n\n## Support my work\n\nYou can [sponsor me][Sponsors] on GitHub Sponsors or [reach out][Email] for paid support, to help support my [open-source projects][OpenSource].\n\nYour support makes it possible for me to put more work into these projects and make them the best they can be.\n\n\n\n## Contact\n\nFeel free to reach out if you have questions or want to contribute in any way:\n\n* Website: [danielsaidi.com][Website]\n* E-mail: [daniel.saidi@gmail.com][Email]\n* Bluesky: [@danielsaidi@bsky.social][Bluesky]\n* Mastodon: [@danielsaidi@mastodon.social][Mastodon]\n\n\n\n## License\n\nTextReplacements is available under the MIT license. See the [LICENSE][License] file for more info.\n\n\n\n[Email]: mailto:daniel.saidi@gmail.com\n[Website]: https://danielsaidi.com\n[GitHub]: https://github.com/danielsaidi\n[OpenSource]: https://danielsaidi.com/opensource\n[Sponsors]: https://github.com/sponsors/danielsaidi\n\n[Bluesky]: https://bsky.app/profile/danielsaidi.bsky.social\n[Mastodon]: https://mastodon.social/@danielsaidi\n[Twitter]: https://twitter.com/danielsaidi\n\n[Documentation]: https://danielsaidi.github.io/TextReplacements/\n[Getting-Started]: https://danielsaidi.github.io/TextReplacements/documentation/textreplacements/getting-started\n[License]: https://github.com/danielsaidi/TextReplacements/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielsaidi%2Ftextreplacements","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielsaidi%2Ftextreplacements","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielsaidi%2Ftextreplacements/lists"}