-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lazar Otasevic
committed
Sep 10, 2024
1 parent
6da8ad8
commit f7accd5
Showing
24 changed files
with
42 additions
and
56 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...spection/Elements/Extensions/_OnTap.swift → ...ewInspection/Elements/_onTapGesture.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import SwiftUI | ||
|
||
@available(tvOS 16.0, *) | ||
extension InspectableType._OnTap { | ||
extension InspectableType._onTapGesture { | ||
func tap() throws { | ||
try node.one(.closureWithVoidParam).castValue(()) | ||
} | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
...on/Elements/Extensions/_Refreshable.swift → ...iewInspection/Elements/_refreshable.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import SwiftUI | ||
|
||
extension InspectableType._Refreshable { | ||
extension InspectableType._refreshable { | ||
func refresh() async throws { | ||
try await node.one(.asyncClosure).castValue() | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Sources/ViewInspection/Inspection/AnyInspectable+Modifiers.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
extension AnyInspectable { | ||
@available(tvOS 16.0, *) | ||
static var onTapGesture: AnyInspectable<InspectableType._onTapGesture> { .some } | ||
|
||
static var refreshable: AnyInspectable<InspectableType._refreshable> { .some } | ||
} |
6 changes: 6 additions & 0 deletions
6
Sources/ViewInspection/Inspection/AnyInspectable+Values.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
extension AnyInspectable { | ||
static var closure: AnyInspectable<ClosureElement<() -> Void>> { .some } | ||
static var closureWithVoidParam: AnyInspectable<ClosureElement<(()) -> Void>> { .some } | ||
static var asyncClosure: AnyInspectable<ClosureElement<() async -> Void>> { .some } | ||
static var string: AnyInspectable<SameTypeElement<String>> { .some } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
enum AnyInspectable<T: InspectionElement> { | ||
case some | ||
} |
6 changes: 3 additions & 3 deletions
6
.../Elements/InspectableType+Modifiers.swift → ...nspection/InspectableType+Modifiers.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import SwiftUI | ||
|
||
extension InspectableType { | ||
struct _Refreshable: ModifierDerivedElement { | ||
struct _refreshable: ModifierDerivedElement { | ||
let node: ReflectionNode | ||
static func makeModifiedContent() -> Any { EmptyView().refreshable {} } | ||
} | ||
|
||
@available(tvOS 16.0, *) | ||
struct _OnTap: ModifierDerivedElement { | ||
struct _onTapGesture: ModifierDerivedElement { | ||
let node: ReflectionNode | ||
static func makeModifiedContent() -> Any { EmptyView().onTapGesture {} } | ||
} | ||
} | ||
} |
2 changes: 0 additions & 2 deletions
2
...Inspection/Elements/InspectableType.swift → ...spection/Inspection/InspectableType.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
import SwiftUI | ||
|
||
enum InspectableType {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../ViewInspection/ViewInspectionError.swift → ...spection/Inspection/InspectionError.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
enum ViewInspectionError: Error { | ||
enum InspectionError: Error { | ||
case wrongNumberOfItems | ||
case wrongType | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters