Skip to content

Commit

Permalink
Remove deprecated properties
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsaidi committed Mar 4, 2024
1 parent 0339b75 commit 7e40f0e
Showing 1 changed file with 4 additions and 42 deletions.
46 changes: 4 additions & 42 deletions Sources/RichTextKit/Context/RichTextContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class RichTextContext: ObservableObject {
/// The currently selected range, if any.
public internal(set) var selectedRange = NSRange()


// MARK: - Bindable Properies

/// Whether or not the text is currently being edited.
Expand All @@ -66,55 +67,16 @@ public class RichTextContext: ObservableObject {
@Published
public var lineSpacing: CGFloat = 10.0


// MARK: - Properties

/// This publisher can emit actions to the coordinator.
public let actionPublisher = RichTextAction.Publisher()

/// The currently highlighted range, if any.
public var highlightedRange: NSRange?

// MARK: - Deprecated Colors

@available(*, deprecated, renamed: "colors")
public var backgroundColor: ColorRepresentable? {
colors[.background]
}

@available(*, deprecated, renamed: "colors")
public var foregroundColor: ColorRepresentable? {
colors[.foreground]
}

@available(*, deprecated, renamed: "colors")
public var strikethroughColor: ColorRepresentable? {
colors[.strikethrough]
}

@available(*, deprecated, renamed: "colors")
public var strokeColor: ColorRepresentable? {
colors[.stroke]
}

@available(*, deprecated, renamed: "colors")
public var underlineColor: ColorRepresentable? {
colors[.underline]
}

// MARK: - Deprecated Styles

@available(*, deprecated, renamed: "styles")
public var isBold: Bool { hasStyle(.bold) }

@available(*, deprecated, renamed: "styles")
public var isItalic: Bool { hasStyle(.italic) }

@available(*, deprecated, renamed: "styles")
public var isStrikethrough: Bool { hasStyle(.strikethrough) }

@available(*, deprecated, renamed: "styles")
public var isUnderlined: Bool { hasStyle(.underlined) }



// MARK: - Observable Properties

/// Whether or not the current rich text can be copied.
Expand Down

0 comments on commit 7e40f0e

Please sign in to comment.