Skip to content

Commit 600856f

Browse files
committedDec 2, 2024
1.9.2
1 parent 4170c4d commit 600856f

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed
 

‎Example/Example.xcodeproj/project.pbxproj

+7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
38ECF3472926D25400A7973C /* Engine in Frameworks */ = {isa = PBXBuildFile; productRef = 38ECF3462926D25400A7973C /* Engine */; };
2020
38ECF34F292848B200A7973C /* UserInterfaceIdiomExamples.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38ECF34E292848B200A7973C /* UserInterfaceIdiomExamples.swift */; };
2121
38F3B4A92BA566F000374669 /* StyleContextExamples.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38F3B4A82BA566F000374669 /* StyleContextExamples.swift */; };
22+
38F8DFAA2CFE2BB400705B02 /* EngineMacros in Frameworks */ = {isa = PBXBuildFile; productRef = 38F8DFA92CFE2BB400705B02 /* EngineMacros */; };
2223
/* End PBXBuildFile section */
2324

2425
/* Begin PBXFileReference section */
@@ -44,6 +45,7 @@
4445
buildActionMask = 2147483647;
4546
files = (
4647
38ECF3472926D25400A7973C /* Engine in Frameworks */,
48+
38F8DFAA2CFE2BB400705B02 /* EngineMacros in Frameworks */,
4749
);
4850
runOnlyForDeploymentPostprocessing = 0;
4951
};
@@ -128,6 +130,7 @@
128130
name = Example;
129131
packageProductDependencies = (
130132
38ECF3462926D25400A7973C /* Engine */,
133+
38F8DFA92CFE2BB400705B02 /* EngineMacros */,
131134
);
132135
productName = Example;
133136
productReference = 385C289329209E5C00E0A600 /* Example.app */;
@@ -431,6 +434,10 @@
431434
isa = XCSwiftPackageProductDependency;
432435
productName = Engine;
433436
};
437+
38F8DFA92CFE2BB400705B02 /* EngineMacros */ = {
438+
isa = XCSwiftPackageProductDependency;
439+
productName = EngineMacros;
440+
};
434441
/* End XCSwiftPackageProductDependency section */
435442
};
436443
rootObject = 385C288B29209E5C00E0A600 /* Project object */;

‎Example/Example/ViewStyleExamples.swift

+6
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ struct ViewStyleExamples: View {
171171
Text("@ViewStyle")
172172
.font(.headline)
173173

174+
_LabeledView {
175+
Text("Content")
176+
} content: {
177+
Text("Label")
178+
}
179+
174180
_LabeledView {
175181
Text("Content")
176182
} content: {

‎Sources/EngineMacros/StyledView.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -98,28 +98,28 @@ public macro StyledView() = #externalMacro(module: "EngineMacrosCore", type: "St
9898
/// A protocol intended to be used with the ``@StyledView`` macro define a
9999
/// ``ViewStyle`` and all it's related components.
100100
@MainActor @preconcurrency
101-
public protocol StyledView: PrimitiveView, DynamicProperty {
101+
public protocol StyledView: View, DynamicProperty {
102102
associatedtype _Body: View
103103
@ViewBuilder @MainActor @preconcurrency var _body: _Body { get }
104104
}
105105

106106
extension StyledView {
107-
public static func makeView(
107+
public static func _makeView(
108108
view: _GraphValue<Self>,
109109
inputs: _ViewInputs
110110
) -> _ViewOutputs {
111111
_Body._makeView(view: view[\._body], inputs: inputs)
112112
}
113113

114-
public static func makeViewList(
114+
public static func _makeViewList(
115115
view: _GraphValue<Self>,
116116
inputs: _ViewListInputs
117117
) -> _ViewListOutputs {
118118
_Body._makeViewList(view: view[\._body], inputs: inputs)
119119
}
120120

121121
@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
122-
public static func viewListCount(
122+
public static func _viewListCount(
123123
inputs: _ViewListCountInputs
124124
) -> Int? {
125125
_Body._viewListCount(inputs: inputs)

0 commit comments

Comments
 (0)
Please sign in to comment.