Skip to content

Commit 8843046

Browse files
committed
Separate strings into separate package
1 parent 78b4483 commit 8843046

14 files changed

+12
-437
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/*.xcodeproj
55
xcuserdata/
66
DerivedData/
7+
.swiftpm
78
.swiftpm/config/registries.json
89
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
910
.netrc

.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

-8
This file was deleted.

.swiftpm/xcode/xcshareddata/xcbaselines/QuiltTests.xcbaseline/FC41A5B7-443F-4DCB-B9BB-EDD37CDE5D6E.plist

-29
This file was deleted.

.swiftpm/xcode/xcshareddata/xcbaselines/QuiltTests.xcbaseline/Info.plist

-33
This file was deleted.

.swiftpm/xcode/xcshareddata/xcschemes/Quilt.xcscheme

-102
This file was deleted.

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.7
1+
// swift-tools-version: 5.10
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription

Sources/Quilt/NSAttributedString+Extensions.swift

-10
This file was deleted.

Sources/Quilt/NSMutableAttributedString+Extensions.swift

-35
This file was deleted.

Sources/Quilt/OpID.swift

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import Foundation
22

33
public struct OpID: Comparable, Hashable, Codable, Equatable, CustomStringConvertible {
4+
public init(counter: Int, id: UUID) {
5+
self.counter = counter
6+
self.id = id
7+
}
8+
49
public static func < (lhs: OpID, rhs: OpID) -> Bool {
510
if lhs.counter == rhs.counter {
611
return lhs.id.uuidString < rhs.id.uuidString

Sources/Quilt/Operation.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ public struct Operation: Identifiable, Codable, Equatable {
1313

1414
public let opId: OpID
1515

16-
let type: OpType
17-
let afterId: OpID?
16+
public let type: OpType
17+
public let afterId: OpID?
1818
}

Sources/Quilt/Quilt.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public struct Quilt: Codable {
66

77
public var operations: [Operation] = []
88

9-
private(set) var appliedOps: [Operation] = []
9+
public private(set) var appliedOps: [Operation] = []
1010

1111
public init(user: UUID) {
1212
self.user = user
@@ -72,7 +72,7 @@ public struct Quilt: Codable {
7272
applyOperations()
7373
}
7474

75-
mutating func addMark(
75+
public mutating func addMark(
7676
mark: MarkType,
7777
fromIndex: Int,
7878
toIndex: Int
@@ -89,7 +89,7 @@ public struct Quilt: Codable {
8989
applyOperations()
9090
}
9191

92-
mutating func removeMark(
92+
public mutating func removeMark(
9393
mark: MarkType,
9494
fromIndex: Int,
9595
toIndex: Int

Sources/Quilt/QuiltString+Extensions.swift

-36
This file was deleted.

Sources/Quilt/QuiltString.swift

-69
This file was deleted.

0 commit comments

Comments
 (0)