Packages
lustre
5.5.0
5.7.1
5.7.0
5.6.0
5.5.2
5.5.1
5.5.0
5.4.0
5.3.5
5.3.4
5.3.3
5.3.2
5.3.1
5.3.0
5.2.1
5.2.0
5.1.1
5.1.0
5.0.3
5.0.2
5.0.1
5.0.0
4.6.4
4.6.3
4.6.2
4.6.1
4.6.0
4.5.1
4.5.0
4.4.4
4.4.3
4.4.1
4.4.0
4.3.6
4.3.5
4.3.4
4.3.3
4.3.2
4.3.1
4.3.0
4.2.6
4.2.5
4.2.4
4.2.3
4.2.2
4.2.1
4.2.0
4.1.8
4.1.7
4.1.6
4.1.5
4.1.4
4.1.3
4.1.2
4.1.1
4.1.0
4.0.0
4.0.0-rc1
4.0.0-rc.2
3.1.4
3.1.3
3.1.2
3.1.1
3.1.0
3.0.12
3.0.11
3.0.10
3.0.9
3.0.8
3.0.7
3.0.6
3.0.5
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
3.0.0-rc.8
3.0.0-rc.7
3.0.0-rc.6
3.0.0-rc.5
3.0.0-rc.4
3.0.0-rc.3
3.0.0-rc.2
3.0.0-rc.1
2.0.1
2.0.0
1.3.0
1.2.0
1.1.0
1.0.0
Create HTML templates, single page applications, Web Components, and real-time server components in Gleam!
Current section
Files
Jump to
Current section
Files
src/lustre/element/mathml.gleam
// IMPORTS ---------------------------------------------------------------------
import lustre/attribute.{type Attribute}
import lustre/element.{type Element, namespaced}
// CONSTANTS -------------------------------------------------------------------
/// The MathML namespace URI: `"http://www.w3.org/1998/Math/MathML"`. You might use this
/// with [`element.namespaced`](../element.html#namespaced) to create elements
/// in the MathML namespace not provided here.
///
pub const namespace = "http://www.w3.org/1998/Math/MathML"
// The doc comments (and order) for functions in this module are taken from the
// MathML Core W3C technical report:
//
// https://www.w3.org/TR/mathml-core/#mathml-elements-and-attributes
//
// MATHML ELEMENTS: GROUPING ---------------------------------------------------
///
pub fn merror(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "merror", attrs, children)
}
///
pub fn mphantom(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "mphantom", attrs, children)
}
///
pub fn mprescripts(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "mprescripts", attrs, children)
}
///
pub fn mrow(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "mrow", attrs, children)
}
///
pub fn mstyle(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "mstyle", attrs, children)
}
///
pub fn semantics(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "semantics", attrs, children)
}
// MATHML ELEMENTS: SCRIPTED ---------------------------------------------------
///
pub fn mmultiscripts(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "mmultiscripts", attrs, children)
}
///
pub fn mover(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "mover", attrs, children)
}
///
pub fn msub(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "msub", attrs, children)
}
///
pub fn msubsup(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "msubsup", attrs, children)
}
///
pub fn msup(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "msup", attrs, children)
}
///
pub fn munder(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "munder", attrs, children)
}
///
pub fn munderover(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "munderover", attrs, children)
}
// MATHML ELEMENTS: RADICAL ----------------------------------------------------
///
pub fn mroot(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "mroot", attrs, children)
}
///
pub fn msqrt(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "msqrt", attrs, children)
}
// MATHML ELEMENTS: OTHER ------------------------------------------------------
///
pub fn annotation(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "annotation", attrs, children)
}
///
pub fn annotation_xml(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "annotation-xml", attrs, children)
}
///
pub fn mfrac(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "mfrac", attrs, children)
}
///
pub fn mn(attrs: List(Attribute(msg)), text: String) -> Element(msg) {
namespaced(namespace, "mn", attrs, [element.text(text)])
}
///
pub fn mo(attrs: List(Attribute(msg)), text: String) -> Element(msg) {
namespaced(namespace, "mo", attrs, [element.text(text)])
}
///
pub fn mi(attrs: List(Attribute(msg)), text: String) -> Element(msg) {
namespaced(namespace, "mi", attrs, [element.text(text)])
}
///
pub fn mpadded(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "mpadded", attrs, children)
}
///
pub fn ms(attrs: List(Attribute(msg)), text: String) -> Element(msg) {
namespaced(namespace, "ms", attrs, [element.text(text)])
}
///
pub fn mspace(attrs: List(Attribute(msg))) -> Element(msg) {
namespaced(namespace, "mspace", attrs, [])
}
///
pub fn mtable(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "mtable", attrs, children)
}
///
pub fn mtd(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "mtd", attrs, children)
}
///
pub fn mtext(attrs: List(Attribute(msg)), text: String) -> Element(msg) {
namespaced(namespace, "mtext", attrs, [element.text(text)])
}
///
pub fn mtr(
attrs: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
namespaced(namespace, "mtr", attrs, children)
}