{"id":18269818,"url":"https://github.com/dwarvesf/CodeViewer","last_synced_at":"2025-04-04T23:31:36.064Z","repository":{"id":56511495,"uuid":"290435706","full_name":"dwarvesf/CodeViewer","owner":"dwarvesf","description":"A custom code editor SwiftUI view","archived":false,"fork":false,"pushed_at":"2023-04-28T15:37:31.000Z","size":2354,"stargazers_count":150,"open_issues_count":7,"forks_count":20,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-20T09:58:21.929Z","etag":null,"topics":["codeviewer","ios","macos","swift","swiftui"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/dwarvesf.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,"publiccode":null,"codemeta":null}},"created_at":"2020-08-26T08:08:20.000Z","updated_at":"2025-03-10T06:42:55.000Z","dependencies_parsed_at":"2024-11-05T11:52:01.141Z","dependency_job_id":null,"html_url":"https://github.com/dwarvesf/CodeViewer","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwarvesf%2FCodeViewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwarvesf%2FCodeViewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwarvesf%2FCodeViewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwarvesf%2FCodeViewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwarvesf","download_url":"https://codeload.github.com/dwarvesf/CodeViewer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266476,"owners_count":20910831,"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":["codeviewer","ios","macos","swift","swiftui"],"created_at":"2024-11-05T11:37:21.710Z","updated_at":"2025-04-04T23:31:31.665Z","avatar_url":"https://github.com/dwarvesf.png","language":"JavaScript","readme":"# CodeViewer\n\n\u003cp align=\"left\"\u003e\n\t\u003ca href=\"https://webuild.community\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/webuild-community/badge/master/svg/made.svg\" /\u003e\n\t\u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/badge/platform-macOS | iOS-lightgrey.svg\" alt=\"platform\" /\u003e\n\u003c/p\u003e\n\nCodeViewer is a custom code editor SwiftUI view, which wrap around the [ace](http://ace.c9.io) editor.\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg width=\"500\" alt=\"image\" src=\"./misc/img.png\"\u003e\n\t\u003cimg width=\"200\" alt=\"image\" src=\"./misc/img-ios.png\"\u003e\n\u003c/p\u003e\n\n## Features\n\n- [x] Darkmode, lightmode adopt automatically\n- [x] Syntax highlighting for over 110 languages (TextMate/Sublime Text.tmlanguage files can be imported)\n- [x] Over 20 themes (TextMate/Sublime Text .tmtheme files can be imported)\n- [x] Support SwiftUI\n\n## Usage\n\n```Swift\nimport SwiftUI\nimport CodeViewer\n\nstruct ContentView: View {\n    @State private var json = \"\"\n    \n    var body: some View {\n        CodeViewer(\n            content: $json,\n            mode: .json,\n            darkTheme: .solarized_dark,\n            lightTheme: .solarized_light,\n            isReadOnly: true,\n            fontSize: 54\n        )\n        .onAppear {\n            json = \"\"\"\n            {\n                \"hello\": \"world\"\n            }\n            \"\"\"\n        }\n    }\n}\n\n```\n\n## Requirement\n- iOS \u003e= v13\n- macOS \u003e= v10.15\n","funding_links":[],"categories":["swiftui"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwarvesf%2FCodeViewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwarvesf%2FCodeViewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwarvesf%2FCodeViewer/lists"}