Skip to content

Commit

Permalink
1.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nathantannar4 committed Dec 2, 2024
1 parent 4170c4d commit 600856f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
7 changes: 7 additions & 0 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
38ECF3472926D25400A7973C /* Engine in Frameworks */ = {isa = PBXBuildFile; productRef = 38ECF3462926D25400A7973C /* Engine */; };
38ECF34F292848B200A7973C /* UserInterfaceIdiomExamples.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38ECF34E292848B200A7973C /* UserInterfaceIdiomExamples.swift */; };
38F3B4A92BA566F000374669 /* StyleContextExamples.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38F3B4A82BA566F000374669 /* StyleContextExamples.swift */; };
38F8DFAA2CFE2BB400705B02 /* EngineMacros in Frameworks */ = {isa = PBXBuildFile; productRef = 38F8DFA92CFE2BB400705B02 /* EngineMacros */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -44,6 +45,7 @@
buildActionMask = 2147483647;
files = (
38ECF3472926D25400A7973C /* Engine in Frameworks */,
38F8DFAA2CFE2BB400705B02 /* EngineMacros in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -128,6 +130,7 @@
name = Example;
packageProductDependencies = (
38ECF3462926D25400A7973C /* Engine */,
38F8DFA92CFE2BB400705B02 /* EngineMacros */,
);
productName = Example;
productReference = 385C289329209E5C00E0A600 /* Example.app */;
Expand Down Expand Up @@ -431,6 +434,10 @@
isa = XCSwiftPackageProductDependency;
productName = Engine;
};
38F8DFA92CFE2BB400705B02 /* EngineMacros */ = {
isa = XCSwiftPackageProductDependency;
productName = EngineMacros;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 385C288B29209E5C00E0A600 /* Project object */;
Expand Down
6 changes: 6 additions & 0 deletions Example/Example/ViewStyleExamples.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ struct ViewStyleExamples: View {
Text("@ViewStyle")
.font(.headline)

_LabeledView {
Text("Content")
} content: {
Text("Label")
}

_LabeledView {
Text("Content")
} content: {
Expand Down
8 changes: 4 additions & 4 deletions Sources/EngineMacros/StyledView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,28 +98,28 @@ public macro StyledView() = #externalMacro(module: "EngineMacrosCore", type: "St
/// A protocol intended to be used with the ``@StyledView`` macro define a
/// ``ViewStyle`` and all it's related components.
@MainActor @preconcurrency
public protocol StyledView: PrimitiveView, DynamicProperty {
public protocol StyledView: View, DynamicProperty {
associatedtype _Body: View
@ViewBuilder @MainActor @preconcurrency var _body: _Body { get }
}

extension StyledView {
public static func makeView(
public static func _makeView(
view: _GraphValue<Self>,
inputs: _ViewInputs
) -> _ViewOutputs {
_Body._makeView(view: view[\._body], inputs: inputs)
}

public static func makeViewList(
public static func _makeViewList(
view: _GraphValue<Self>,
inputs: _ViewListInputs
) -> _ViewListOutputs {
_Body._makeViewList(view: view[\._body], inputs: inputs)
}

@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
public static func viewListCount(
public static func _viewListCount(
inputs: _ViewListCountInputs
) -> Int? {
_Body._viewListCount(inputs: inputs)
Expand Down

0 comments on commit 600856f

Please sign in to comment.