Skip to content

Commit 2099f4f

Browse files
committed
Cleanup: README, NumericTextStyles/Scheme.
1 parent 8fe65b0 commit 2099f4f

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ A text field that binds values and formats them as you type.
6767
|---|---------|-------------|
6868
| :iphone: | SwiftUI | Value, style, done |
6969
| :mountain: | Environment | Uses environment values |
70-
| :balance_scale: | Monospaced | The standard font is monospaced |
70+
| :balance_scale: | Monospaced | Standard font is monospaced |
7171
| :sewing_needle: | Customizable | Customized using [ProxyTextField](Sources/DiffableTextViewsXiOS/Views) |
7272
| :bulb: | Smart | Styles may provide sensible defaults |
7373

Sources/DiffableTextStylesXNumeric/Models/Scheme.swift

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import Foundation
2424
// MARK: * Translation
2525
//*============================================================================*
2626

27-
@dynamicMemberLookup public protocol NumericTextScheme: Identifiable {
27+
public protocol NumericTextScheme {
2828

2929
//=------------------------------------------------------------------------=
3030
// MARK: State
@@ -65,14 +65,6 @@ import Foundation
6565

6666
extension NumericTextScheme {
6767

68-
//=------------------------------------------------------------------------=
69-
// MARK: Accessors
70-
//=------------------------------------------------------------------------=
71-
72-
@inlinable subscript<T>(dynamicMember keyPath: KeyPath<ID, T>) -> T {
73-
id[keyPath: keyPath]
74-
}
75-
7668
//=------------------------------------------------------------------------=
7769
// MARK: Preferences
7870
//=------------------------------------------------------------------------=
@@ -96,7 +88,8 @@ extension NumericTextScheme {
9688
// MARK: * Scheme x Reusable
9789
//*============================================================================*
9890

99-
@usableFromInline protocol NumericTextSchemeXReuseable: AnyObject, Scheme {
91+
@dynamicMemberLookup @usableFromInline
92+
protocol NumericTextSchemeXReuseable: AnyObject, Identifiable, Scheme {
10093

10194
//=------------------------------------------------------------------------=
10295
// MARK: Initializers
@@ -124,4 +117,12 @@ extension NumericTextSchemeXReuseable {
124117
@inlinable static func reuse(_ id: ID) -> Self {
125118
cache.reuse(id, make: Self(id))
126119
}
120+
121+
//=------------------------------------------------------------------------=
122+
// MARK: Accessors
123+
//=------------------------------------------------------------------------=
124+
125+
@inlinable subscript<T>(dynamicMember keyPath: KeyPath<ID, T>) -> T {
126+
id[keyPath: keyPath]
127+
}
127128
}

0 commit comments

Comments
 (0)