Skip to content

Commit

Permalink
Remove unsupported platforms for now, remove headers, clarify comments
Browse files Browse the repository at this point in the history
  • Loading branch information
theolampert committed Nov 3, 2023
1 parent 89817aa commit 7b8c4dd
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 75 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// swift-tools-version: 5.7
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Quilt",
platforms: [.iOS(.v14), .macOS(.v12), .watchOS(.v4)],
platforms: [.macOS(.v12)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand Down
7 changes: 0 additions & 7 deletions Sources/Quilt/Array+safeIndex.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
//
// Array+safeIndex.swift
//
//
// Created by Theodore Lampert on 08.12.22.
//

public extension Array {
subscript(safeIndex index: Int) -> Element? {
guard index >= 0, index < endIndex else {
Expand Down
7 changes: 0 additions & 7 deletions Sources/Quilt/MarkType.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
//
// MarkType.swift
//
//
// Created by Theodore Lampert on 15.12.22.
//

public enum MarkType: Codable, Equatable {
case bold
case italic
Expand Down
7 changes: 0 additions & 7 deletions Sources/Quilt/NSAttributedString+Extensions.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
//
// NSAttributedString+Extensions.swift
//
//
// Created by Theodore Lampert on 15.05.23.
//

import Foundation

public extension NSAttributedString {
Expand Down
7 changes: 0 additions & 7 deletions Sources/Quilt/NSMutableAttributedString+Extensions.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
//
// NSMutableAttributedString+setTextAttribute.swift
//
//
// Created by Theodore Lampert on 15.05.23.
//

import Foundation

public extension NSMutableAttributedString {
Expand Down
7 changes: 0 additions & 7 deletions Sources/Quilt/OpID.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
//
// OpID.swift
//
//
// Created by Theodore Lampert on 15.12.22.
//

import Foundation

public struct OpID: Comparable, Hashable, Codable, Equatable, CustomStringConvertible {
Expand Down
7 changes: 0 additions & 7 deletions Sources/Quilt/OpType.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
//
// OpType.swift
//
//
// Created by Theodore Lampert on 15.12.22.
//

public enum OpType: Codable, Equatable {
case insert(String)
case remove(OpID)
Expand Down
7 changes: 0 additions & 7 deletions Sources/Quilt/Operation.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
//
// Operation.swift
//
//
// Created by Theodore Lampert on 15.12.22.
//

public struct Operation: Identifiable, Codable, Equatable {
public var id: OpID { opId }

Expand Down
2 changes: 1 addition & 1 deletion Sources/Quilt/Quilt.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import SwiftUI

public struct Quilt: Codable {
private var counter: Int = 0
Expand All @@ -18,6 +17,7 @@ public struct Quilt: Codable {
/*
Optimisation: Assume that text is inserted and removed sequentially
and cache the last known index to avoid scanning the whole document.
This was cribbed from how Y.js does it.
*/
var lastIdx: (OpID, Int)?

Expand Down
7 changes: 0 additions & 7 deletions Sources/Quilt/QuiltString+Extensions.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
//
// QuiltString.swift
//
//
// Created by Theodore Lampert on 15.05.23.
//

import AppKit
import Foundation

Expand Down
9 changes: 0 additions & 9 deletions Sources/Quilt/QuiltString.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
//
// File.swift
//
//
// Created by Theodore Lampert on 15.12.22.
//

import AppKit
import Foundation
import SwiftUI

public class QuiltString: ObservableObject {
public init(
Expand Down
7 changes: 0 additions & 7 deletions Sources/Quilt/SpanMarker.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
//
// SpanMarker.swift
//
//
// Created by Theodore Lampert on 15.12.22.
//

public enum SpanMarker: Codable, Equatable {
case before(OpID)
case after(OpID)
Expand Down

0 comments on commit 7b8c4dd

Please sign in to comment.