Skip to content

Commit e08a43e

Browse files
Rename Package to CodeEditSourceEditor (#223)
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description - Changes the package name to CodeEditSourceEditor. - Uses the new CodeEditTextView repository instead of containing two targets for the source editor and text view. - Updates all repo names, fixes all headers (thanks @0xWDG for pointing that out in #211). - Marks the `CodeEditTextView` struct as deprecated in favor of `CodeEditSourceEditor`. - Fixes a small bug with cursor position that left out column info. ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code
1 parent 40d8e88 commit e08a43e

File tree

113 files changed

+159
-6319
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+159
-6319
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ body:
3939
description: >-
4040
click on the version number on the welcome screen
4141
value: |
42-
CodeEditTextView: [e.g. 0.x.y]
42+
CodeEditSourceEditor: [e.g. 0.x.y]
4343
macOS: [e.g. 13.2.1]
4444
Xcode: [e.g. 14.2]
4545

.github/scripts/build-docc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
export LC_CTYPE=en_US.UTF-8
44

5-
set -o pipefail && xcodebuild clean docbuild -scheme CodeEditTextView \
5+
set -o pipefail && xcodebuild clean docbuild -scheme CodeEditSourceEditor \
66
-destination generic/platform=macos \
77
-skipPackagePluginValidation \
8-
OTHER_DOCC_FLAGS="--transform-for-static-hosting --hosting-base-path CodeEditTextView --output-path ./docs" | xcpretty
8+
OTHER_DOCC_FLAGS="--transform-for-static-hosting --hosting-base-path CodeEditSourceEditor --output-path ./docs" | xcpretty

.github/scripts/tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ echo "Building with arch: ${ARCH}"
1414
export LC_CTYPE=en_US.UTF-8
1515

1616
set -o pipefail && arch -"${ARCH}" xcodebuild \
17-
-scheme CodeEditTextView \
17+
-scheme CodeEditSourceEditor \
1818
-derivedDataPath ".build" \
1919
-destination "platform=macos,arch=${ARCH}" \
2020
-skipPackagePluginValidation \

.github/workflows/CI-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
uses: ./.github/workflows/swiftlint.yml
1111
secrets: inherit
1212
test:
13-
name: Testing CodeEditTextView
13+
name: Testing CodeEditSourceEditor
1414
needs: swiftlint
1515
uses: ./.github/workflows/tests.yml
1616
secrets: inherit

.github/workflows/CI-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
uses: ./.github/workflows/swiftlint.yml
1111
secrets: inherit
1212
test:
13-
name: Testing CodeEditTextView
13+
name: Testing CodeEditSourceEditor
1414
needs: swiftlint
1515
uses: ./.github/workflows/tests.yml
1616
secrets: inherit

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55
jobs:
66
code-edit-text-view-tests:
7-
name: Testing CodeEditTextView
7+
name: Testing CodeEditSourceEditor
88
runs-on: [self-hosted, macOS]
99
steps:
1010
- name: Checkout repository

Package.resolved

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 12 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44
import PackageDescription
55

66
let package = Package(
7-
name: "CodeEditTextView",
7+
name: "CodeEditSourceEditor",
88
platforms: [.macOS(.v13)],
99
products: [
1010
// A source editor with useful features for code editing.
1111
.library(
12-
name: "CodeEditTextView",
13-
targets: ["CodeEditTextView"]
14-
),
15-
// A Fast, Efficient text view for code.
16-
.library(
17-
name: "CodeEditInputView",
18-
targets: ["CodeEditInputView"]
12+
name: "CodeEditSourceEditor",
13+
targets: ["CodeEditSourceEditor"]
1914
)
2015
],
2116
dependencies: [
17+
// A fast, efficient, text view for code.
18+
.package(
19+
url: "https://github.com/CodeEditApp/CodeEditTextView.git",
20+
from: "0.7.0"
21+
),
2222
// tree-sitter languages
2323
.package(
2424
url: "https://github.com/CodeEditApp/CodeEditLanguages.git",
@@ -29,28 +29,18 @@ let package = Package(
2929
url: "https://github.com/lukepistrol/SwiftLintPlugin",
3030
from: "0.2.2"
3131
),
32-
// Text mutation, storage helpers
33-
.package(
34-
url: "https://github.com/ChimeHQ/TextStory",
35-
from: "0.8.0"
36-
),
3732
// Rules for indentation, pair completion, whitespace
3833
.package(
3934
url: "https://github.com/ChimeHQ/TextFormation",
4035
from: "0.8.1"
41-
),
42-
// Useful data structures
43-
.package(
44-
url: "https://github.com/apple/swift-collections.git",
45-
.upToNextMajor(from: "1.0.0")
4636
)
4737
],
4838
targets: [
4939
// A source editor with useful features for code editing.
5040
.target(
51-
name: "CodeEditTextView",
41+
name: "CodeEditSourceEditor",
5242
dependencies: [
53-
"CodeEditInputView",
43+
"CodeEditTextView",
5444
"CodeEditLanguages",
5545
"TextFormation",
5646
],
@@ -59,40 +49,16 @@ let package = Package(
5949
]
6050
),
6151

62-
// The underlying text rendering view for CodeEditTextView
63-
.target(
64-
name: "CodeEditInputView",
65-
dependencies: [
66-
"TextStory",
67-
"TextFormation",
68-
.product(name: "Collections", package: "swift-collections")
69-
],
70-
plugins: [
71-
.plugin(name: "SwiftLint", package: "SwiftLintPlugin")
72-
]
73-
),
74-
7552
// Tests for the source editor
7653
.testTarget(
77-
name: "CodeEditTextViewTests",
54+
name: "CodeEditSourceEditorTests",
7855
dependencies: [
79-
"CodeEditTextView",
56+
"CodeEditSourceEditor",
8057
"CodeEditLanguages",
8158
],
8259
plugins: [
8360
.plugin(name: "SwiftLint", package: "SwiftLintPlugin")
8461
]
8562
),
86-
87-
// Tests for the input view
88-
.testTarget(
89-
name: "CodeEditInputViewTests",
90-
dependencies: [
91-
"CodeEditInputView",
92-
],
93-
plugins: [
94-
.plugin(name: "SwiftLint", package: "SwiftLintPlugin")
95-
]
96-
),
9763
]
9864
)

README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
<p align="center">
2-
<img src="https://github.com/CodeEditApp/CodeEditTextView/assets/806104/b304b004-3bfc-413b-9db6-76d2af122acc" height="128">
3-
<h1 align="center">CodeEditTextView</h1>
2+
<img src="https://github.com/CodeEditApp/CodeEditTextView/blob/main/.github/[email protected]?raw=true" height="128">
3+
<h1 align="center">CodeEditSourceEditor</h1>
44
</p>
55

6+
67
<p align="center">
78
<a aria-label="Follow CodeEdit on Twitter" href="https://twitter.com/CodeEditApp" target="_blank">
89
<img alt="" src="https://img.shields.io/badge/Follow%[email protected]?style=for-the-badge&logo=Twitter">
910
</a>
1011
<a aria-label="Join the community on Discord" href="https://discord.gg/vChUXVf9Em" target="_blank">
1112
<img alt="" src="https://img.shields.io/badge/Join%20the%20community-black.svg?style=for-the-badge&logo=Discord">
1213
</a>
13-
<a aria-label="Read the Documentation" href="https://codeeditapp.github.io/CodeEditTextView/documentation/codeedittextview/" target="_blank">
14+
<a aria-label="Read the Documentation" href="https://codeeditapp.github.io/CodeEditSourceEditor/documentation/codeeditsourceeditor/" target="_blank">
1415
<img alt="" src="https://img.shields.io/badge/Documentation-black.svg?style=for-the-badge&logo=readthedocs&logoColor=blue">
1516
</a>
1617
</p>
@@ -19,24 +20,24 @@ An Xcode-inspired code editor view written in Swift powered by tree-sitter for [
1920

2021
<img width="1012" alt="social-cover-textview" src="https://user-images.githubusercontent.com/806104/194083584-91555dce-ad4c-4066-922e-1eab889134be.png">
2122

22-
![GitHub release](https://img.shields.io/github/v/release/CodeEditApp/CodeEditTextView?color=orange&label=latest%20release&sort=semver&style=flat-square)
23-
![Github Tests](https://img.shields.io/github/actions/workflow/status/CodeEditApp/CodeEditTextView/tests.yml?branch=main&label=tests&style=flat-square)
24-
![Documentation](https://img.shields.io/github/actions/workflow/status/CodeEditApp/CodeEditTextView/build-documentation.yml?branch=main&label=docs&style=flat-square)
25-
![GitHub Repo stars](https://img.shields.io/github/stars/CodeEditApp/CodeEditTextView?style=flat-square)
26-
![GitHub forks](https://img.shields.io/github/forks/CodeEditApp/CodeEditTextView?style=flat-square)
23+
![GitHub release](https://img.shields.io/github/v/release/CodeEditApp/CodeEditSourceEditor?color=orange&label=latest%20release&sort=semver&style=flat-square)
24+
![Github Tests](https://img.shields.io/github/actions/workflow/status/CodeEditApp/CodeEditSourceEditor/tests.yml?branch=main&label=tests&style=flat-square)
25+
![Documentation](https://img.shields.io/github/actions/workflow/status/CodeEditApp/CodeEditSourceEditor/build-documentation.yml?branch=main&label=docs&style=flat-square)
26+
![GitHub Repo stars](https://img.shields.io/github/stars/CodeEditApp/CodeEditSourceEditor?style=flat-square)
27+
![GitHub forks](https://img.shields.io/github/forks/CodeEditApp/CodeEditSourceEditor?style=flat-square)
2728
[![Discord Badge](https://img.shields.io/discord/951544472238444645?color=5865F2&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/vChUXVf9Em)
2829

29-
| :warning: | **CodeEditTextView is currently in development and it is not ready for production use.** <br> Please check back later for updates on this project. Contributors are welcome as we build out the features mentioned above! |
30+
| :warning: | **CodeEditSourceEditor is currently in development and it is not ready for production use.** <br> Please check back later for updates on this project. Contributors are welcome as we build out the features mentioned above! |
3031
| - |:-|
3132

3233
## Documentation
3334

34-
This package is fully documented [here](https://codeeditapp.github.io/CodeEditTextView/documentation/codeedittextview/).
35+
This package is fully documented [here](https://codeeditapp.github.io/CodeEditSourceEditor/documentation/codeeditsourceeditor/).
3536

3637
## Usage
3738

3839
```swift
39-
import CodeEditTextView
40+
import CodeEditSourceEditor
4041

4142
struct ContentView: View {
4243

@@ -48,7 +49,7 @@ struct ContentView: View {
4849
@State var editorOverscroll = 0.3
4950

5051
var body: some View {
51-
CodeEditTextView(
52+
CodeEditSourceEditor(
5253
$text,
5354
language: .swift,
5455
theme: $theme,
@@ -87,6 +88,12 @@ Licensed under the [MIT license](https://github.com/CodeEditApp/CodeEdit/blob/ma
8788
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeEdit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
8889
</a>
8990
</td>
91+
<td align="center">
92+
<a href="https://github.com/CodeEditApp/CodeEditTextView">
93+
<img src="https://github.com/CodeEditApp/CodeEditTextView/blob/main/.github/[email protected]?raw=true" height="128">
94+
</a>
95+
<p><a href="https://github.com/CodeEditApp/CodeEditTextView">CodeEditTextView</a></p>
96+
</td>
9097
<td align="center">
9198
<a href="https://github.com/CodeEditApp/CodeEditKit">
9299
<img src="https://user-images.githubusercontent.com/806104/193877051-c60d255d-0b6a-408c-bb21-6fabc5e0e60c.png" height="128">
@@ -107,4 +114,3 @@ Licensed under the [MIT license](https://github.com/CodeEditApp/CodeEdit/blob/ma
107114
</td>
108115
</tr>
109116
</table>
110-

Sources/CodeEditInputView/Documentation.docc/Documentation.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)