diff --git a/Sources/LiveViewNative/Image Modifiers/AntialiasedModifier.swift b/Sources/LiveViewNative/Image Modifiers/AntialiasedModifier.swift index e0153df23..fd5849d69 100644 --- a/Sources/LiveViewNative/Image Modifiers/AntialiasedModifier.swift +++ b/Sources/LiveViewNative/Image Modifiers/AntialiasedModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Enables/disables antialiasing. /// /// ```html -/// +/// /// ``` /// /// ## Arguments diff --git a/Sources/LiveViewNative/Image Modifiers/InterpolationModifier.swift b/Sources/LiveViewNative/Image Modifiers/InterpolationModifier.swift index 6d1e23246..814288688 100644 --- a/Sources/LiveViewNative/Image Modifiers/InterpolationModifier.swift +++ b/Sources/LiveViewNative/Image Modifiers/InterpolationModifier.swift @@ -15,11 +15,11 @@ import SwiftUI /// ```html /// resizable() |> interpolation(interpolation: :none)} +/// modifiers={resizable([]) |> interpolation(:none)} /// /> /// resizable() |> interpolation(interpolation: :medium)} +/// modifiers={resizable([]) |> interpolation(:medium)} /// /> /// ``` /// diff --git a/Sources/LiveViewNative/Image Modifiers/RenderingModeModifier.swift b/Sources/LiveViewNative/Image Modifiers/RenderingModeModifier.swift index 7f7eb1161..4819b1029 100644 --- a/Sources/LiveViewNative/Image Modifiers/RenderingModeModifier.swift +++ b/Sources/LiveViewNative/Image Modifiers/RenderingModeModifier.swift @@ -13,8 +13,8 @@ import SwiftUI /// The `template` mode renders nontransparent pixels as the foreground color. /// /// ```html -/// -/// +/// +/// /// ``` /// /// This modifier can also be used to render multicolor SF Symbols. @@ -23,7 +23,7 @@ import SwiftUI /// ```html /// /// ``` /// diff --git a/Sources/LiveViewNative/Image Modifiers/ResizableModifier.swift b/Sources/LiveViewNative/Image Modifiers/ResizableModifier.swift index 4bba51617..4fafd8897 100644 --- a/Sources/LiveViewNative/Image Modifiers/ResizableModifier.swift +++ b/Sources/LiveViewNative/Image Modifiers/ResizableModifier.swift @@ -10,8 +10,8 @@ import SwiftUI /// Enables an image to fill the available space. /// /// ```html -/// -/// +/// +/// /// ``` /// /// ## Arguments diff --git a/Sources/LiveViewNative/Modifiers/Animations Modifiers/AnimationModifier.swift b/Sources/LiveViewNative/Modifiers/Animations Modifiers/AnimationModifier.swift index 8b89d864f..dda175c05 100644 --- a/Sources/LiveViewNative/Modifiers/Animations Modifiers/AnimationModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Animations Modifiers/AnimationModifier.swift @@ -16,8 +16,8 @@ import SwiftUI /// /// ```html /// /// ``` /// @@ -27,8 +27,8 @@ import SwiftUI /// /// ```html /// /// ``` /// diff --git a/Sources/LiveViewNative/Modifiers/Animations Modifiers/ContentTransitionModifier.swift b/Sources/LiveViewNative/Modifiers/Animations Modifiers/ContentTransitionModifier.swift index b7f8e7a71..700784732 100644 --- a/Sources/LiveViewNative/Modifiers/Animations Modifiers/ContentTransitionModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Animations Modifiers/ContentTransitionModifier.swift @@ -13,13 +13,12 @@ import SwiftUI /// /// ```html /// content_transition(transition: :numeric_text) -/// |> animation(value: @count) -/// } +/// modifiers={ +/// content_transition(:numeric_text) +/// |> animation(value: @count) +/// } /// > -/// <%= @count %> +/// <%= @count %> /// /// ``` /// diff --git a/Sources/LiveViewNative/Modifiers/Animations Modifiers/KeyframeAnimatorModifier.swift b/Sources/LiveViewNative/Modifiers/Animations Modifiers/KeyframeAnimatorModifier.swift index ad0f51b68..f26b5b026 100644 --- a/Sources/LiveViewNative/Modifiers/Animations Modifiers/KeyframeAnimatorModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Animations Modifiers/KeyframeAnimatorModifier.swift @@ -19,7 +19,7 @@ import SwiftUI /// keyframe_animator( +/// keyframe_animator( /// initial_value: 1.0, /// trigger: "#{@liked}", /// keyframes: [ @@ -27,7 +27,7 @@ import SwiftUI /// {:spring, 1.5, [duration: 0.8, spring: :bouncy]}, /// {:spring, 1.0, [spring: :bouncy]} /// ], -/// modifiers: @native |> scale_effect(x: 1.0, y: 1.0), +/// modifiers: scale_effect(x: 1.0, y: 1.0), /// properties: [scale_effect: [:x, :y]] /// ) /// } diff --git a/Sources/LiveViewNative/Modifiers/Animations Modifiers/MatchedGeometryEffectModifier.swift b/Sources/LiveViewNative/Modifiers/Animations Modifiers/MatchedGeometryEffectModifier.swift index c500df921..466baee4a 100644 --- a/Sources/LiveViewNative/Modifiers/Animations Modifiers/MatchedGeometryEffectModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Animations Modifiers/MatchedGeometryEffectModifier.swift @@ -21,13 +21,13 @@ import SwiftUI /// Use the same `id` argument for elements that should be paired. /// /// ```html -/// animation(value: Atom.to_string(@is_flipped))}> +/// /// <%= if @is_flipped do %> -/// matched_geometry_effect(id: "a", namespace: :animation)}>A -/// matched_geometry_effect(id: "b", namespace: :animation)}>B +/// A +/// B /// <% else %> -/// matched_geometry_effect(id: "b", namespace: :animation)}>B -/// matched_geometry_effect(id: "a", namespace: :animation)}>A +/// B +/// A /// <% end %> /// /// diff --git a/Sources/LiveViewNative/Modifiers/Animations Modifiers/TransitionModifier.swift b/Sources/LiveViewNative/Modifiers/Animations Modifiers/TransitionModifier.swift index 60259a660..087ae196c 100644 --- a/Sources/LiveViewNative/Modifiers/Animations Modifiers/TransitionModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Animations Modifiers/TransitionModifier.swift @@ -13,7 +13,7 @@ import SwiftUI /// /// ```html /// <%= if @show do %> -/// Scaled +/// Scaled /// <% end %> /// ``` /// diff --git a/Sources/LiveViewNative/Modifiers/Controls and Indicators Modifiers/ButtonBorderShapeModifier.swift b/Sources/LiveViewNative/Modifiers/Controls and Indicators Modifiers/ButtonBorderShapeModifier.swift index 2906f9033..8ffc75530 100644 --- a/Sources/LiveViewNative/Modifiers/Controls and Indicators Modifiers/ButtonBorderShapeModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Controls and Indicators Modifiers/ButtonBorderShapeModifier.swift @@ -10,10 +10,10 @@ import SwiftUI /// Alters the shape of any bordered buttons' borders. /// /// ```html -/// -/// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Controls and Indicators Modifiers/ControlSizeModifier.swift b/Sources/LiveViewNative/Modifiers/Controls and Indicators Modifiers/ControlSizeModifier.swift index 9468e9a23..45a449b77 100644 --- a/Sources/LiveViewNative/Modifiers/Controls and Indicators Modifiers/ControlSizeModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Controls and Indicators Modifiers/ControlSizeModifier.swift @@ -10,8 +10,8 @@ import SwiftUI /// Sets the size of controls within this view. /// /// ```html -/// -/// +/// +/// /// ``` /// /// ## Arguments diff --git a/Sources/LiveViewNative/Modifiers/Controls and Indicators Modifiers/HorizontalRadioGroupLayoutModifier.swift b/Sources/LiveViewNative/Modifiers/Controls and Indicators Modifiers/HorizontalRadioGroupLayoutModifier.swift index f215b46d2..b51971473 100644 --- a/Sources/LiveViewNative/Modifiers/Controls and Indicators Modifiers/HorizontalRadioGroupLayoutModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Controls and Indicators Modifiers/HorizontalRadioGroupLayoutModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Changes radio-group style ``Picker``s to lay out horizontally. /// /// ```html -/// horizontal_radio_group_layout()}> +/// horizontal_radio_group_layout()}> /// ... /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Documents Modifiers/RenameActionModifier.swift b/Sources/LiveViewNative/Modifiers/Documents Modifiers/RenameActionModifier.swift index 8b204235b..362b85491 100644 --- a/Sources/LiveViewNative/Modifiers/Documents Modifiers/RenameActionModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Documents Modifiers/RenameActionModifier.swift @@ -14,7 +14,7 @@ import SwiftUI /// ```html /// /// ``` @@ -30,33 +30,21 @@ struct RenameActionModifier: ViewModifier, Decodable { #if swift(>=5.8) @_documentation(visibility: public) #endif - private let event: String - /// The LiveView or LiveComponent to perform the event on. - /// - /// In a component, you may use the `@myself` assign to handle the event on the LiveComponent. - #if swift(>=5.8) - @_documentation(visibility: public) - #endif - private let target: Int? - @Environment(\.coordinatorEnvironment) private var coordinatorEnvironment + @Event private var action: Event.EventHandler init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - self.event = try container.decode(String.self, forKey: .event) - self.target = try container.decode(Int?.self, forKey: .target) + self._action = try container.decode(Event.self, forKey: .action) } private enum CodingKeys: String, CodingKey { - case event - case target + case action } func body(content: Content) -> some View { content .renameAction { - Task { - try await coordinatorEnvironment?.pushEvent("click", event, [String:Any](), target) - } + action(value: [String:String]()) } } } diff --git a/Sources/LiveViewNative/Modifiers/Drag and Drop Modifiers/DraggableModifier.swift b/Sources/LiveViewNative/Modifiers/Drag and Drop Modifiers/DraggableModifier.swift index 2269ad01e..d598ccee8 100644 --- a/Sources/LiveViewNative/Modifiers/Drag and Drop Modifiers/DraggableModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drag and Drop Modifiers/DraggableModifier.swift @@ -10,8 +10,8 @@ import SwiftUI /// Activates this view as the source of a drag and drop operation. /// /// ```html -/// ABC -/// +/// ABC +/// /// ABC /// /// diff --git a/Sources/LiveViewNative/Modifiers/Drag and Drop Modifiers/DropDestinationModifier.swift b/Sources/LiveViewNative/Modifiers/Drag and Drop Modifiers/DropDestinationModifier.swift index c04de90f7..5953f20e1 100644 --- a/Sources/LiveViewNative/Modifiers/Drag and Drop Modifiers/DropDestinationModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drag and Drop Modifiers/DropDestinationModifier.swift @@ -10,8 +10,8 @@ import SwiftUI /// Defines the destination of a drag and drop operation that handles the dropped content with an event that you specify. /// /// ```html -/// ABC -/// +/// ABC +/// /// Drop Here /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BlendModeModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BlendModeModifier.swift index ebb8fd2f2..8ceb935e2 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BlendModeModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BlendModeModifier.swift @@ -11,14 +11,13 @@ import SwiftUI /// /// ```html /// -/// frame(width: 50, height: 50, alignment: :center)} /> +/// /// frame(width: 50, height: 50, alignment: :center) -/// |> rotation_effect(angle: {:degrees, 45}) -/// |> padding(all: -20) -/// |> blend_mode(blend_mode: :color_burn) +/// frame(width: 50, height: 50, alignment: :center) +/// |> rotation_effect({:degrees, 45}) +/// |> padding(-20) +/// |> blend_mode(:color_burn) /// } /// /> /// diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BlurModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BlurModifier.swift index 1afca8e1f..ce71c1368 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BlurModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BlurModifier.swift @@ -12,7 +12,7 @@ import SwiftUI /// Set the ``radius`` to control the strength of the blur. /// /// ```html -/// Hello, world! +/// Hello, world! /// ``` /// /// ## Arguments diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BorderModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BorderModifier.swift index 098d5808a..3e12b364a 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BorderModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BorderModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Applies a border to any element. /// /// ```html -/// +/// /// Purple border inside the view bounds. /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BrightnessModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BrightnessModifier.swift index cff87e6ae..52faf6354 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BrightnessModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/BrightnessModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Brighten the intensity of the colors in a view. /// /// ```html -/// brightness(amount: 0.5)} /> +/// /// ``` /// /// ## Arguments diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ClipShapeModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ClipShapeModifier.swift index c27dc836d..a609cc0dc 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ClipShapeModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ClipShapeModifier.swift @@ -12,7 +12,7 @@ import SwiftUI /// Provide a ``ShapeReference`` to clip the element with. /// /// ```html -/// +/// /// Hello, /// world! /// @@ -22,10 +22,10 @@ import SwiftUI /// This lets you apply modifiers to the clip shape. /// /// ```html -/// +/// /// Hello, /// world! -/// rotation(angle: {:degrees, 45})} /> +/// /// /// ``` /// diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ClippedModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ClippedModifier.swift index fc59fabc8..698eda2f5 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ClippedModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ClippedModifier.swift @@ -12,8 +12,7 @@ import SwiftUI /// ```html /// foreground_color(color: :mint) +/// foreground_color(:mint) /// |> frame(width: 20, height: 20) /// |> clipped(antialiased: true) /// } diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ColorInvertModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ColorInvertModifier.swift index bf83e523f..f41c97309 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ColorInvertModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ColorInvertModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Inverts the colors in this view. /// /// ```html -/// foreground_style(primary: {:color, :red}) |> color_invert()} /> +/// color_invert()} /> /// ``` #if swift(>=5.8) @_documentation(visibility: public) diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ColorMultiplyModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ColorMultiplyModifier.swift index 43133fadc..63a38a923 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ColorMultiplyModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ColorMultiplyModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Adds a color multiplication effect to this view. /// /// ```html -/// +/// /// ``` /// /// ## Arguments diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/CompositingGroupModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/CompositingGroupModifier.swift index 49c88d6c0..84d0716ec 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/CompositingGroupModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/CompositingGroupModifier.swift @@ -15,13 +15,12 @@ import SwiftUI /// /// compositing_group() -/// |> opacity(opacity: 0.5) +/// compositing_group([]) +/// |> opacity(0.5) /// } /// > /// Hello, world! -/// Hello, world! +/// Hello, world! /// /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ContrastModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ContrastModifier.swift index bda669ca7..bf8fd3f45 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ContrastModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ContrastModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Sets the contrast and separation between similar colors in this view. /// /// ```html -/// foreground_style(primary: {:color, :red}) |> contrast(amount: 0.5)} /> +/// contrast(0.5)} /> /// ``` /// /// ## Arguments diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/CornerRadiusModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/CornerRadiusModifier.swift index 3ad2118f9..05c38eab2 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/CornerRadiusModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/CornerRadiusModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Clips this view to its bounding frame, with the specified corner ``radius``. /// /// ```html -/// corner_radius(radius: 8)} /> +/// /// ``` /// /// ## Arguments diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/DrawingGroupModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/DrawingGroupModifier.swift index 980de8b3e..80714c976 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/DrawingGroupModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/DrawingGroupModifier.swift @@ -11,16 +11,15 @@ import SwiftUI /// /// ```html /// -/// drawing_group(opaque: false, color_mode: :non_linear) -/// |> opacity(opacity: 0.5) -/// } -/// > -/// Hello, world! -/// Hello, world! -/// +/// opacity(opacity: 0.5) +/// } +/// > +/// Hello, world! +/// Hello, world! +/// /// /// ``` /// diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ForegroundColorModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ForegroundColorModifier.swift index 3dcb404c5..6e1823309 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ForegroundColorModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ForegroundColorModifier.swift @@ -9,7 +9,7 @@ import SwiftUI /// Applies a foreground color to a view. /// ```html -/// +/// /// Minty fresh text. /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/GrayscaleModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/GrayscaleModifier.swift index 709715759..2fb45f8c4 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/GrayscaleModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/GrayscaleModifier.swift @@ -12,7 +12,7 @@ import SwiftUI /// A grayscale effect reduces the intensity of colors in this view. /// /// ```html -/// +/// /// ``` /// /// ## Arguments diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/HueRotationModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/HueRotationModifier.swift index 032b481ed..f0c62d12a 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/HueRotationModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/HueRotationModifier.swift @@ -17,9 +17,8 @@ import SwiftUI /// foreground_style(primary: {:linear_gradient, %{ :gradient => {:colors, [:blue, :red, :green]}, :start_point => {0.5, 0}, :end_point => {0.5, 1} }}) -/// |> hue_rotation(angle: {:degrees, item * 36}) +/// foreground_style({:linear_gradient, %{ :gradient => {:colors, [:blue, :red, :green]}, :start_point => {0.5, 0}, :end_point => {0.5, 1} }}) +/// |> hue_rotation({:degrees, item * 36}) /// |> frame(width: 60, height: 60, alignment: :center) /// } /// /> diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/LuminanceToAlphaModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/LuminanceToAlphaModifier.swift index 45163f57c..86ff9b2f3 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/LuminanceToAlphaModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/LuminanceToAlphaModifier.swift @@ -15,14 +15,13 @@ import SwiftUI /// background(alignment: :center, content: :heart_bg) -/// |> foreground_color(color: :red) +/// background(alignment: :center, content: :heart_bg) +/// |> foreground_color(:red) /// |> luminance_to_alpha() /// } /// > /// -/// frame(width: 32, height: 32) |> foreground_color(color: :red)} /> +/// foreground_color(:red)} /> /// /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/MaskModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/MaskModifier.swift index f030aa263..968138035 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/MaskModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/MaskModifier.swift @@ -12,13 +12,12 @@ import SwiftUI /// ```html /// foreground_color(color: :blue) -/// |> font(font: {:system, :large_title}) -/// |> mask(alignment: :center, content: :mask) +/// foreground_color(:blue) +/// |> font({:system, :large_title}) +/// |> mask(alignment: :center, mask: :mask) /// } /// > -/// opacity(opacity: 0.1)} /> +/// /// /// ``` /// @@ -41,7 +40,7 @@ struct MaskModifier: ViewModifier, Decodable { #if swift(>=5.8) @_documentation(visibility: public) #endif - private let content: String + private let mask: String @ObservedElement private var element @LiveContext private var context @@ -50,17 +49,17 @@ struct MaskModifier: ViewModifier, Decodable { let container = try decoder.container(keyedBy: CodingKeys.self) self.alignment = try container.decode(Alignment.self, forKey: .alignment) - self.content = try container.decode(String.self, forKey: .content) + self.mask = try container.decode(String.self, forKey: .mask) } func body(content: Content) -> some View { content.mask(alignment: alignment) { - context.buildChildren(of: element, forTemplate: self.content) + context.buildChildren(of: element, forTemplate: self.mask) } } enum CodingKeys: String, CodingKey { case alignment - case content + case mask } } diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ProjectionEffectModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ProjectionEffectModifier.swift index a0438e4ce..973bb9004 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ProjectionEffectModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ProjectionEffectModifier.swift @@ -14,7 +14,7 @@ import SwiftUI /// - Note: The frame of the element is not affected. /// /// ```html -/// +/// /// Rotation by passing an angle in degrees /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/RotationEffectModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/RotationEffectModifier.swift index 5341491ea..284ec8f5f 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/RotationEffectModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/RotationEffectModifier.swift @@ -12,7 +12,7 @@ import SwiftUI /// Pass an ``angle`` in degrees or radians to rotate the element. /// /// ```html -/// +/// /// Rotation by passing an angle in degrees /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/SaturationModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/SaturationModifier.swift index d0ea77c89..a3b02a41a 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/SaturationModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/SaturationModifier.swift @@ -12,7 +12,7 @@ import SwiftUI /// Use color saturation to increase or decrease the intensity of colors in a view. /// /// ```html -/// +/// /// ``` /// /// ## Arguments diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ScaleEffectModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ScaleEffectModifier.swift index 69b06bb61..1405a3480 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ScaleEffectModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ScaleEffectModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Scales this view’s rendered output by the given vertical and horizontal size amounts, relative to an anchor point. /// /// ```html -/// +/// /// Scale by a width and height factor /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ScaledToFillModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ScaledToFillModifier.swift index 0c7b0c933..05a3bde99 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ScaledToFillModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ScaledToFillModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Scales this view to fill its parent, maintaining this view’s aspect ratio. /// /// ```html -/// +/// /// This view will fill its parent. /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ScaledToFitModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ScaledToFitModifier.swift index 07c67a600..52c350873 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ScaledToFitModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ScaledToFitModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Scales this view to fit its parent, maintaining this view’s aspect ratio. /// /// ```html -/// +/// /// This view will fit its parent. /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ShadowModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ShadowModifier.swift index 699162bf1..05c9a73fd 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ShadowModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/ShadowModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Adds a shadow to this view. /// /// ```html -/// Shadowed Text +/// Shadowed Text /// ``` /// /// ## Arguments diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/SymbolVariantModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/SymbolVariantModifier.swift index 933511d6e..e417ee3aa 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/SymbolVariantModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/SymbolVariantModifier.swift @@ -12,8 +12,8 @@ import SwiftUI /// See ``LiveViewNative/SwiftUI/SymbolVariants`` for a list of possible values. /// /// ```html -/// -/// +/// +/// /// ``` /// /// ## Arguments diff --git a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/TransformEffectModifier.swift b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/TransformEffectModifier.swift index 6a359549c..8fde576d5 100644 --- a/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/TransformEffectModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Drawing and Graphics Modifiers/TransformEffectModifier.swift @@ -14,7 +14,7 @@ import SwiftUI /// - Note: The frame of the element is not affected. /// /// ```html -/// -/// +/// /// Username -/// Password +/// Password /// /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Focus Modifiers/FocusSectionModifier.swift b/Sources/LiveViewNative/Modifiers/Focus Modifiers/FocusSectionModifier.swift index af56e948e..01eac6474 100644 --- a/Sources/LiveViewNative/Modifiers/Focus Modifiers/FocusSectionModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Focus Modifiers/FocusSectionModifier.swift @@ -19,7 +19,7 @@ import SwiftUI /// /// ```html /// -/// +/// /// /// /// diff --git a/Sources/LiveViewNative/Modifiers/Focus Modifiers/FocusableModifier.swift b/Sources/LiveViewNative/Modifiers/Focus Modifiers/FocusableModifier.swift index cf7be84c5..dbc33a267 100644 --- a/Sources/LiveViewNative/Modifiers/Focus Modifiers/FocusableModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Focus Modifiers/FocusableModifier.swift @@ -12,12 +12,12 @@ import SwiftUI /// You can apply this modifier to elements that do not receive focus by default. /// /// ```html -/// +/// /// ``` /// /// Or disable focusability for an element. /// ```html -/// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Focus Modifiers/PrefersDefaultFocusModifier.swift b/Sources/LiveViewNative/Modifiers/Focus Modifiers/PrefersDefaultFocusModifier.swift index fbba730bc..0467692bc 100644 --- a/Sources/LiveViewNative/Modifiers/Focus Modifiers/PrefersDefaultFocusModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Focus Modifiers/PrefersDefaultFocusModifier.swift @@ -13,9 +13,9 @@ import SwiftUI /// /// ```html /// -/// +/// /// Username -/// Password +/// Password /// /// /// diff --git a/Sources/LiveViewNative/Modifiers/Gestures Modifiers/DefersSystemGesturesModifier.swift b/Sources/LiveViewNative/Modifiers/Gestures Modifiers/DefersSystemGesturesModifier.swift index 8964dbe1e..277b79cdd 100644 --- a/Sources/LiveViewNative/Modifiers/Gestures Modifiers/DefersSystemGesturesModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Gestures Modifiers/DefersSystemGesturesModifier.swift @@ -13,9 +13,8 @@ import SwiftUI /// /// ```html /// gesture(...) -/// |> defers_system_gestures(edges: :vertical) +/// gesture(...) +/// |> defers_system_gestures(on: :vertical) /// } /> /// ``` /// diff --git a/Sources/LiveViewNative/Modifiers/Gestures Modifiers/GestureModifier.swift b/Sources/LiveViewNative/Modifiers/Gestures Modifiers/GestureModifier.swift index c67bf77c9..fd1ded9b8 100644 --- a/Sources/LiveViewNative/Modifiers/Gestures Modifiers/GestureModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Gestures Modifiers/GestureModifier.swift @@ -14,7 +14,7 @@ import SwiftUI /// Pass in a ``gesture`` and an event name. /// /// ```html -/// +/// /// ``` /// /// ```elixir @@ -122,7 +122,7 @@ enum GesturePriority: String, Decodable { /// ```html /// @@ -136,7 +136,7 @@ enum GesturePriority: String, Decodable { /// ```html /// @@ -150,7 +150,7 @@ enum GesturePriority: String, Decodable { /// ```html /// diff --git a/Sources/LiveViewNative/Modifiers/Images Modifiers/ImageScaleModifier.swift b/Sources/LiveViewNative/Modifiers/Images Modifiers/ImageScaleModifier.swift index 17bfef8bc..9d87ccd9d 100644 --- a/Sources/LiveViewNative/Modifiers/Images Modifiers/ImageScaleModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Images Modifiers/ImageScaleModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Adjusts the scaling of images within an element. /// /// ```html -/// +/// /// /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Images Modifiers/SymbolRenderingModeModifier.swift b/Sources/LiveViewNative/Modifiers/Images Modifiers/SymbolRenderingModeModifier.swift index 7f551028d..c0d6eece2 100644 --- a/Sources/LiveViewNative/Modifiers/Images Modifiers/SymbolRenderingModeModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Images Modifiers/SymbolRenderingModeModifier.swift @@ -10,7 +10,7 @@ import SwiftUI /// Sets the rendering mode for symbol images within this view. /// /// ```html -/// +/// /// /// /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Input Events Modifiers/AllowsHitTestingModifier.swift b/Sources/LiveViewNative/Modifiers/Input Events Modifiers/AllowsHitTestingModifier.swift index 62597de69..2c2850e4e 100644 --- a/Sources/LiveViewNative/Modifiers/Input Events Modifiers/AllowsHitTestingModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Input Events Modifiers/AllowsHitTestingModifier.swift @@ -12,9 +12,8 @@ import SwiftUI /// ```html /// frame(width: 32, height: 32) -/// |> allows_hit_testing(enabled: true) +/// frame(width: 32, height: 32) +/// |> allows_hit_testing(true) /// } /// /> /// ``` diff --git a/Sources/LiveViewNative/Modifiers/Input Events Modifiers/DigitalCrownAccessoryModifier.swift b/Sources/LiveViewNative/Modifiers/Input Events Modifiers/DigitalCrownAccessoryModifier.swift index 9b991dc47..6079b26c7 100644 --- a/Sources/LiveViewNative/Modifiers/Input Events Modifiers/DigitalCrownAccessoryModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Input Events Modifiers/DigitalCrownAccessoryModifier.swift @@ -13,9 +13,8 @@ import SwiftUI /// /// ```html /// digital_crown_accessory(content: :dca_view) -/// |> digital_crown_accessory_visibility(visibility: :visible) +/// digital_crown_accessory(content: :dca_view) +/// |> digital_crown_accessory_visibility(:visible) /// }> /// /// diff --git a/Sources/LiveViewNative/Modifiers/Input Events Modifiers/DigitalCrownAccessoryVisibilityModifier.swift b/Sources/LiveViewNative/Modifiers/Input Events Modifiers/DigitalCrownAccessoryVisibilityModifier.swift index 91fd23b40..ccc532ef1 100644 --- a/Sources/LiveViewNative/Modifiers/Input Events Modifiers/DigitalCrownAccessoryVisibilityModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Input Events Modifiers/DigitalCrownAccessoryVisibilityModifier.swift @@ -13,13 +13,10 @@ import SwiftUI /// /// ```html /// digital_crown_accessory(content: :dca_view) -/// |> digital_crown_accessory_visibility(visibility: :visible) +/// digital_crown_accessory(content: :dca_view) +/// |> digital_crown_accessory_visibility(:visible) /// }> -/// -/// -/// +/// /// /// ``` /// diff --git a/Sources/LiveViewNative/Modifiers/Input Events Modifiers/HoverEffectModifier.swift b/Sources/LiveViewNative/Modifiers/Input Events Modifiers/HoverEffectModifier.swift index 9eb69816b..cb9f7c143 100644 --- a/Sources/LiveViewNative/Modifiers/Input Events Modifiers/HoverEffectModifier.swift +++ b/Sources/LiveViewNative/Modifiers/Input Events Modifiers/HoverEffectModifier.swift @@ -12,7 +12,7 @@ import SwiftUI /// Note: The system may fall back to a more appropriate effect. /// /// ```html -///