use self::{
attributes::{
AnimationTiming, AnimationValue, ConditionalProcessing, FilterPrimitives, OtherAnimation,
Presentation, TransferFunction,
},
content_type::{AutoOrLength, Length},
};
use crate::{dom::Dom, elements::svg::content_type::NumberOrPercentage};
pub mod attributes;
pub mod content_type;
pub mod path;
svg_element!(
a = {
dom_type: web_sys::SvgaElement;
attributes {
download: String,
href: String,
hreflang: String,
ping: String,
referrerpolicy: String,
rel: String,
target: String,
r#type: String,
};
}
);
parent_element!(a);
impl<D: Dom> ConditionalProcessing for A<D> {}
impl<D: Dom> Presentation for A<D> {}
svg_element!(
animate = {
dom_type: web_sys::SvgAnimateElement;
}
);
impl<D: Dom> AnimationTiming for Animate<D> {}
impl<D: Dom> AnimationValue for Animate<D> {}
impl<D: Dom> OtherAnimation for Animate<D> {}
svg_element!(
animate_motion("animateMotion") = {
dom_type: web_sys::SvgAnimateMotionElement;
attributes {
key_points("keyPoints"): String,
path: String,
rotate: String,
};
}
);
impl<D: Dom> AnimationTiming for AnimateMotion<D> {}
impl<D: Dom> AnimationValue for AnimateMotion<D> {}
impl<D: Dom> OtherAnimation for AnimateMotion<D> {}
parent_element!(animate_motion);
svg_element!(
animate_transform("animateTransform") = {
dom_type: web_sys::SvgAnimateTransformElement;
attributes {
r#type: String,
};
}
);
impl<D: Dom> AnimationTiming for AnimateTransform<D> {}
impl<D: Dom> AnimationValue for AnimateTransform<D> {}
impl<D: Dom> OtherAnimation for AnimateTransform<D> {}
parent_element!(animate_transform);
svg_element!(
circle = {
dom_type: web_sys::SvgCircleElement;
attributes {
cx: Length,
cy: Length,
r: Length,
path_length("pathLength"): f64,
};
}
);
impl<D: Dom> ConditionalProcessing for Circle<D> {}
impl<D: Dom> Presentation for Circle<D> {}
parent_element!(circle);
svg_element!(
clip_path("clipPath") = {
dom_type: web_sys::SvgClipPathElement;
attributes {
clip_path_units("clipPathUnits"): String,
};
}
);
impl<D: Dom> ConditionalProcessing for ClipPath<D> {}
impl<D: Dom> Presentation for ClipPath<D> {}
parent_element!(clip_path);
svg_element!(
defs = {
dom_type: web_sys::SvgDefsElement;
}
);
parent_element!(defs);
impl<D: Dom> ConditionalProcessing for Defs<D> {}
impl<D: Dom> Presentation for Defs<D> {}
svg_element!(
desc = {
dom_type: web_sys::SvgDescElement;
}
);
parent_element!(desc);
svg_element!(
ellipse = {
dom_type: web_sys::SvgEllipseElement;
attributes {
cx: Length,
cy: Length,
rx: AutoOrLength,
ry: AutoOrLength,
};
}
);
parent_element!(ellipse);
impl<D: Dom> ConditionalProcessing for Ellipse<D> {}
impl<D: Dom> Presentation for Ellipse<D> {}
svg_element!(
fe_blend("feBlend") = {
dom_type: web_sys::SvgfeBlendElement;
attributes {
r#in: String,
in2: String,
mode: String,
};
}
);
impl<D: Dom> ConditionalProcessing for FeBlend<D> {}
impl<D: Dom> Presentation for FeBlend<D> {}
impl<D: Dom> FilterPrimitives for FeBlend<D> {}
parent_element!(fe_blend);
svg_element!(
fe_color_matrix("feColorMatrix") = {
dom_type: web_sys::SvgfeColorMatrixElement;
attributes {
r#in: String,
r#type: String,
values: String,
};
}
);
impl<D: Dom> ConditionalProcessing for FeColorMatrix<D> {}
impl<D: Dom> Presentation for FeColorMatrix<D> {}
impl<D: Dom> FilterPrimitives for FeColorMatrix<D> {}
parent_element!(fe_color_matrix);
svg_element!(
fe_component_transfer("feComponentTransfer") = {
dom_type: web_sys::SvgfeComponentTransferElement;
attributes { r#in: String };
}
);
impl<D: Dom> ConditionalProcessing for FeComponentTransfer<D> {}
impl<D: Dom> Presentation for FeComponentTransfer<D> {}
impl<D: Dom> FilterPrimitives for FeComponentTransfer<D> {}
parent_element!(fe_component_transfer);
svg_element!(
fe_composite("feComposite") = {
dom_type: web_sys::SvgfeCompositeElement;
attributes {
r#in: String,
in2: String,
operator: String,
k1: f64,
k2: f64,
k3: f64,
k4: f64,
};
}
);
impl<D: Dom> ConditionalProcessing for FeComposite<D> {}
impl<D: Dom> Presentation for FeComposite<D> {}
impl<D: Dom> FilterPrimitives for FeComposite<D> {}
parent_element!(fe_composite);
svg_element!(
fe_convolve_matrix("feConvolveMatrix") = {
dom_type: web_sys::SvgfeConvolveMatrixElement;
attributes {
r#in: String,
order: String,
kernel_matrix("kernelMatrix"): String,
divisor: f64,
bias: f64,
target_x("targetX"): u64,
target_y("targetY"): u64,
edge_mode("edgeMode"): String,
preserve_alpha("preserveAlpha"): bool,
};
}
);
impl<D: Dom> ConditionalProcessing for FeConvolveMatrix<D> {}
impl<D: Dom> Presentation for FeConvolveMatrix<D> {}
impl<D: Dom> FilterPrimitives for FeConvolveMatrix<D> {}
parent_element!(fe_convolve_matrix);
svg_element!(
fe_diffuse_lighting("feDiffuseLighting") = {
dom_type: web_sys::SvgfeDiffuseLightingElement;
attributes {
r#in: String,
surface_scale("surfaceScale"): f64,
diffuse_constant("diffuseConstant"): f64,
};
}
);
impl<D: Dom> ConditionalProcessing for FeDiffuseLighting<D> {}
impl<D: Dom> Presentation for FeDiffuseLighting<D> {}
impl<D: Dom> FilterPrimitives for FeDiffuseLighting<D> {}
parent_element!(fe_diffuse_lighting);
svg_element!(
fe_displacement_map("feDisplacementMap") = {
dom_type: web_sys::SvgfeDisplacementMapElement;
attributes {
r#in: String,
in2: String,
scale: f64,
x_channel_selector("xChannelSelector"): String,
y_channel_selector("yChannelSelector"): String,
};
}
);
impl<D: Dom> ConditionalProcessing for FeDisplacementMap<D> {}
impl<D: Dom> Presentation for FeDisplacementMap<D> {}
impl<D: Dom> FilterPrimitives for FeDisplacementMap<D> {}
parent_element!(fe_displacement_map);
svg_element!(
fe_distant_light("feDistantLight") = {
dom_type: web_sys::SvgfeDistantLightElement;
attributes {
azimuth: f64,
elevation: f64,
};
}
);
parent_element!(fe_distant_light);
svg_element!(
fe_drop_shadow("feDropShadow") = {
dom_type: web_sys::SvgfeDropShadowElement;
attributes {
dx: f64,
dy: f64,
std_deviation("stdDeviation"): String,
r#in: String,
};
}
);
impl<D: Dom> Presentation for FeDropShadow<D> {}
impl<D: Dom> FilterPrimitives for FeDropShadow<D> {}
parent_element!(fe_drop_shadow);
svg_element!(
fe_flood("feFlood") = {
dom_type: web_sys::SvgfeFloodElement;
attributes {
flood_color: String,
flood_opacity: NumberOrPercentage,
};
}
);
impl<D: Dom> ConditionalProcessing for FeFlood<D> {}
impl<D: Dom> Presentation for FeFlood<D> {}
impl<D: Dom> FilterPrimitives for FeFlood<D> {}
parent_element!(fe_flood);
svg_element!(
fe_func_a("feFuncA") = {
dom_type: web_sys::SvgfeFuncAElement;
attributes {};
}
);
impl<D: Dom> TransferFunction for FeFuncA<D> {}
parent_element!(fe_func_a);
svg_element!(
fe_func_b("feFuncB") = {
dom_type: web_sys::SvgfeFuncBElement;
attributes {};
}
);
impl<D: Dom> TransferFunction for FeFuncB<D> {}
parent_element!(fe_func_b);
svg_element!(
fe_func_g("feFuncG") = {
dom_type: web_sys::SvgfeFuncGElement;
attributes {};
}
);
impl<D: Dom> TransferFunction for FeFuncG<D> {}
parent_element!(fe_func_g);
svg_element!(
fe_func_r("feFuncR") = {
dom_type: web_sys::SvgfeFuncRElement;
attributes {};
}
);
impl<D: Dom> TransferFunction for FeFuncR<D> {}
parent_element!(fe_func_r);
svg_element!(
fe_gaussian_blur("feGaussianBlur") = {
dom_type: web_sys::SvgfeGaussianBlurElement;
attributes {
r#in: String,
std_deviation("stdDeviation"): String,
edge_mode("edgeMode"): String,
};
}
);
impl<D: Dom> ConditionalProcessing for FeGaussianBlur<D> {}
impl<D: Dom> Presentation for FeGaussianBlur<D> {}
impl<D: Dom> FilterPrimitives for FeGaussianBlur<D> {}
parent_element!(fe_gaussian_blur);
svg_element!(
fe_image("feImage") = {
dom_type: web_sys::SvgfeImageElement;
attributes {
preserve_aspect_ratio("preserveAspectRatio"): String,
};
}
);
impl<D: Dom> ConditionalProcessing for FeImage<D> {}
impl<D: Dom> Presentation for FeImage<D> {}
impl<D: Dom> FilterPrimitives for FeImage<D> {}
parent_element!(fe_image);
svg_element!(
fe_merge("feMerge") = {
dom_type: web_sys::SvgfeMergeElement;
attributes {};
}
);
impl<D: Dom> ConditionalProcessing for FeMerge<D> {}
impl<D: Dom> Presentation for FeMerge<D> {}
impl<D: Dom> FilterPrimitives for FeMerge<D> {}
parent_element!(fe_merge);
svg_element!(
fe_merge_node("feMergeNode") = {
dom_type: web_sys::SvgfeMergeNodeElement;
attributes { r#in: String };
}
);
parent_element!(fe_merge_node);
svg_element!(
fe_morphology("feMorphology") = {
dom_type: web_sys::SvgfeMorphologyElement;
attributes {
r#in: String,
operator: String,
radius: String,
};
}
);
impl<D: Dom> ConditionalProcessing for FeMorphology<D> {}
impl<D: Dom> Presentation for FeMorphology<D> {}
impl<D: Dom> FilterPrimitives for FeMorphology<D> {}
parent_element!(fe_morphology);
svg_element!(
fe_offset("feOffset") = {
dom_type: web_sys::SvgfeOffsetElement;
attributes {
r#in: String,
dx: f64,
dy: f64,
};
}
);
impl<D: Dom> ConditionalProcessing for FeOffset<D> {}
impl<D: Dom> Presentation for FeOffset<D> {}
impl<D: Dom> FilterPrimitives for FeOffset<D> {}
parent_element!(fe_offset);
svg_element!(
fe_point_light("fePointLight") = {
dom_type: web_sys::SvgfePointLightElement;
attributes {
x: f64,
y: f64,
z: f64,
};
}
);
parent_element!(fe_point_light);
svg_element!(
fe_specular_lighting("feSpecularLighting") = {
dom_type: web_sys::SvgfeSpecularLightingElement;
attributes {
r#in: String,
surface_scale("surfaceScale"): f64,
specular_constant("specularConstant"): f64,
specular_exponent("specularExponent"): f64,
};
}
);
impl<D: Dom> ConditionalProcessing for FeSpecularLighting<D> {}
impl<D: Dom> Presentation for FeSpecularLighting<D> {}
impl<D: Dom> FilterPrimitives for FeSpecularLighting<D> {}
parent_element!(fe_specular_lighting);
svg_element!(
fe_spot_light("feSpotLight") = {
dom_type: web_sys::SvgfeSpotLightElement;
attributes {
x: f64,
y: f64,
z: f64,
points_at_x("pointsAtX"): f64,
points_at_y("pointsAtY"): f64,
points_at_z("pointsAtZ"): f64,
specular_exponent("specularExponent"): f64,
limiting_cone_angle("limitingConeAngle"): f64,
};
}
);
impl<D: Dom> ConditionalProcessing for FeSpotLight<D> {}
impl<D: Dom> Presentation for FeSpotLight<D> {}
impl<D: Dom> FilterPrimitives for FeSpotLight<D> {}
parent_element!(fe_spot_light);
svg_element!(
fe_tile("feTile") = {
dom_type: web_sys::SvgfeTileElement;
attributes { r#in: String };
}
);
impl<D: Dom> ConditionalProcessing for FeTile<D> {}
impl<D: Dom> Presentation for FeTile<D> {}
impl<D: Dom> FilterPrimitives for FeTile<D> {}
parent_element!(fe_tile);
svg_element!(
fe_turbulence("feTurbulence") = {
dom_type: web_sys::SvgfeTurbulenceElement;
attributes {
base_frequency("baseFrequency"): String,
num_octaves("numOctaves"): u64,
seed: f64,
stitch_tiles("stitchTiles"): String,
r#type: String,
};
}
);
impl<D: Dom> ConditionalProcessing for FeTurbulence<D> {}
impl<D: Dom> Presentation for FeTurbulence<D> {}
impl<D: Dom> FilterPrimitives for FeTurbulence<D> {}
parent_element!(fe_turbulence);
svg_element!(
filter = {
dom_type: web_sys::SvgFilterElement;
attributes {
x: Length,
y: Length,
width: Length,
height: Length,
filter_units("filterUnits"): String,
primitive_units("primitiveUnits"): String,
};
}
);
parent_element!(filter);
impl<D: Dom> Presentation for Filter<D> {}
svg_element!(
foreign_object("foreignObject") = {
dom_type: web_sys::SvgFilterElement;
attributes {
width: AutoOrLength,
height: AutoOrLength,
x: Length,
y: Length,
};
}
);
parent_element!(foreign_object);
impl<D: Dom> ConditionalProcessing for ForeignObject<D> {}
svg_element!(
g = {
dom_type: web_sys::SvggElement;
}
);
parent_element!(g);
impl<D: Dom> ConditionalProcessing for G<D> {}
impl<D: Dom> Presentation for G<D> {}
svg_element!(
image = {
dom_type: web_sys::SvgImageElement;
attributes {
x: Length,
y: Length,
width: AutoOrLength,
height: AutoOrLength,
href: String,
preserve_aspect_ratio("preserveAspectRatio"): String,
crossorigin: String,
decoding: String,
};
}
);
impl<D: Dom> ConditionalProcessing for Image<D> {}
parent_element!(image);
svg_element!(
line = {
dom_type: web_sys::SvgLineElement;
attributes {
x1: Length,
x2: Length,
y1: Length,
y2: Length,
path_length("pathLength"): f64,
};
}
);
parent_element!(line);
impl<D: Dom> ConditionalProcessing for Line<D> {}
impl<D: Dom> Presentation for Line<D> {}
svg_element!(
linear_gradient("linearGradient") = {
dom_type: web_sys::SvgLinearGradientElement;
attributes {
gradient_units("gradientUnits"): String,
gradient_transform("gradientTransform"): String,
href: String,
spread_method("spreadMethod"): String,
x1: Length,
x2: Length,
y1: Length,
y2: Length,
};
}
);
parent_element!(linear_gradient);
svg_element!(
marker = {
dom_type: web_sys::SvgMarkerElement;
attributes {
marker_height("markerHeight"): Length,
marker_units("markerUnits"): String,
marker_width("markerWidth"): Length,
orient: String,
preserve_aspect_ratio("preserveAspectRatio"): String,
ref_x("refX"): String,
ref_y("refY"): String,
view_box("viewBox"): String,
};
}
);
parent_element!(marker);
impl<D: Dom> ConditionalProcessing for Marker<D> {}
impl<D: Dom> Presentation for Marker<D> {}
svg_element!(
mask = {
dom_type: web_sys::SvgMaskElement;
attributes {
height: Length,
mask_content_units("maskContentUnits"): String,
mask_units("maskUnits"): String,
x: Length,
y: Length,
width: Length,
};
}
);
parent_element!(mask);
impl<D: Dom> ConditionalProcessing for Mask<D> {}
impl<D: Dom> Presentation for Mask<D> {}
svg_element!(
metadata = {
dom_type: web_sys::SvgMetadataElement;
attributes {};
}
);
parent_element!(metadata);
svg_element!(
mpath = {
dom_type: web_sys::SvgmPathElement;
attributes {};
}
);
parent_element!(mpath);
svg_element!(
path = {
dom_type: web_sys::SvgPathElement;
attributes {
path_length("pathLength"): f64,
};
}
);
impl<D: Dom> ConditionalProcessing for Path<D> {}
impl<D: Dom> Presentation for Path<D> {}
parent_element!(path);
svg_element!(
pattern = {
dom_type: web_sys::SvgPatternElement;
attributes {
height: Length,
href: String,
pattern_content_units("patternContentUnits"): String,
pattern_transform("patternTransform"): String,
pattern_units("patternUnits"): String,
preserve_aspect_ratio("preserveAspectRatio"): String,
view_box("viewBox"): String,
width: Length,
x: Length,
y: Length,
};
}
);
parent_element!(pattern);
impl<D: Dom> ConditionalProcessing for Pattern<D> {}
impl<D: Dom> Presentation for Pattern<D> {}
svg_element!(
polygon = {
dom_type: web_sys::SvgPolygonElement;
attributes {
points: String,
path_length("pathLength"): f64,
};
}
);
parent_element!(polygon);
impl<D: Dom> ConditionalProcessing for Polygon<D> {}
impl<D: Dom> Presentation for Polygon<D> {}
svg_element!(
polyline = {
dom_type: web_sys::SvgPolylineElement;
attributes {
points: String,
path_length("pathLength"): f64,
};
}
);
parent_element!(polyline);
impl<D: Dom> ConditionalProcessing for Polyline<D> {}
impl<D: Dom> Presentation for Polyline<D> {}
svg_element!(
radial_gradient("radialGradient") = {
dom_type: web_sys::SvgRadialGradientElement;
attributes {
cx: Length,
cy: Length,
fr: Length,
fx: Length,
fy: Length,
gradient_units("gradientUnits"): String,
gradient_transform("gradientTransform"): String,
href: String,
r: String,
};
}
);
parent_element!(radial_gradient);
svg_element!(
rect = {
dom_type: web_sys::SvgRectElement;
attributes {
x: Length,
y: Length,
width: Length,
height: Length,
rx: Length,
ry: Length,
path_length("pathLength"): f64,
};
}
);
impl<D: Dom> ConditionalProcessing for Rect<D> {}
impl<D: Dom> Presentation for Rect<D> {}
parent_element!(rect);
svg_element!(
script = {
dom_type: web_sys::SvgScriptElement;
attributes {
crossorigin: String,
href: String,
r#type: String,
};
}
);
parent_element!(script);
svg_element!(
set = {
dom_type: web_sys::SvgSetElement;
attributes {
to: String,
};
}
);
parent_element!(set);
impl<D: Dom> AnimationTiming for Set<D> {}
impl<D: Dom> OtherAnimation for Set<D> {}
svg_element!(
stop = {
dom_type: web_sys::SvgStopElement;
attributes {
offset: Length,
stop_color: String,
stop_opacity: f64,
};
}
);
parent_element!(stop);
impl<D: Dom> Presentation for Stop<D> {}
svg_element!(
style = {
dom_type: web_sys::SvgStyleElement;
attributes {
r#type: String,
media: String,
title: String,
};
}
);
parent_element!(style);
svg_element!(
svg = {
dom_type: web_sys::SvgsvgElement;
attributes {
height: AutoOrLength,
preserve_aspect_ratio("preserveAspectRatio"): String,
view_box("viewBox"): String,
width: AutoOrLength,
x: Length,
y: Length,
};
}
);
impl<D: Dom> ConditionalProcessing for Svg<D> {}
impl<D: Dom> Presentation for Svg<D> {}
parent_element!(svg);
svg_element!(
switch = {
dom_type: web_sys::SvgSwitchElement;
attributes {};
}
);
parent_element!(switch);
impl<D: Dom> ConditionalProcessing for Switch<D> {}
impl<D: Dom> Presentation for Switch<D> {}
svg_element!(
symbol = {
dom_type: web_sys::SvgSymbolElement;
attributes {
height: Length,
preserve_aspect_ratio("preserveAspectRatio"): String,
ref_x("refX"): String,
ref_y("refY"): String,
view_box("viewBox"): String,
width: Length,
x: Length,
y: Length,
};
}
);
parent_element!(symbol);
impl<D: Dom> Presentation for Symbol<D> {}
svg_element!(
text = {
dom_type: web_sys::SvgTextElement;
attributes {
x: Length,
y: Length,
dx: Length,
dy: Length,
rotate: String,
length_adjust("lengthAdjust"): String,
text_length("textLength"): Length,
};
}
);
parent_element!(text);
impl<D: Dom> ConditionalProcessing for Text<D> {}
impl<D: Dom> Presentation for Text<D> {}
svg_element!(
text_path("textPath") = {
dom_type: web_sys::SvgTextPathElement;
attributes {
href: String,
length_adjust("lengthAdjust"): String,
method: String,
path: String,
side: String,
spacing: String,
start_offset("startOffset"): Length,
text_length("textLength"): Length,
};
}
);
parent_element!(text_path);
impl<D: Dom> ConditionalProcessing for TextPath<D> {}
impl<D: Dom> Presentation for TextPath<D> {}
svg_element!(
title = {
dom_type: web_sys::SvgTitleElement;
attributes {};
}
);
parent_element!(title);
svg_element!(
tspan = {
dom_type: web_sys::SvgtSpanElement;
attributes {
x: Length,
y: Length,
dx: Length,
dy: Length,
rotate: String,
length_adjust("lengthAdjust"): String,
text_length("textLength"): Length,
};
}
);
parent_element!(tspan);
impl<D: Dom> ConditionalProcessing for Tspan<D> {}
impl<D: Dom> Presentation for Tspan<D> {}
svg_element!(
r#use = {
dom_type: web_sys::SvgUseElement;
attributes {
href: String,
x: Length,
y: Length,
width: Length,
height: Length,
};
}
);
impl<D: Dom> ConditionalProcessing for Use<D> {}
impl<D: Dom> Presentation for Use<D> {}
parent_element!(use);
svg_element!(
view = {
dom_type: web_sys::SvgViewElement;
attributes {
view_box("viewBox"): String,
preserve_aspect_ratio("preserveAspectRatio"): String,
};
}
);
parent_element!(view);