Packages

package dsl

Linear Supertypes
Optimize, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. dsl
  2. Optimize
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait AttrDef extends AnyRef
  2. final class DslOptimizerMacro extends AnyRef
  3. trait Optimize extends AnyRef
  4. trait StyleDef extends AnyRef
  5. class SymbolDsl[MiscType] extends AnyRef

    Symbol based DSL allows to define documents.

    Symbol based DSL allows to define documents. Deprecated because Scala 2.13 drops support of symbol literals.

    'body(
      'h1(class /= "title", "Hello World"),
      'p("Lorem ipsum dolor")
    )
  6. final class SymbolDslMacro extends AnyRef
  7. trait TagDef extends AnyRef

Value Members

  1. def AttrDef(namespace: XmlNs, attrName: String): AttrDef
  2. def AttrDef(attrName: String): AttrDef
  3. def StyleDef(styleName: String): StyleDef
  4. def TagDef(namespace: XmlNs, tagName: String): TagDef
  5. def TagDef(tagName: String): TagDef
  6. implicit def arbitraryOptionToNode[M, T](value: Option[T])(implicit ev: (T) => Node[M]): Node[M]

    Converts option of T (which can be converted to Node) to document node

  7. implicit def arbitrarySeqToNode[M, T](xs: Iterable[T])(implicit ev: (T) => Node[M]): Node[M]

    Converts sequence of T (which can be converted to Node) to document fragment

  8. implicit def miscToNode[M](value: M): Node[M]

    Converts MiscType to text document node

  9. macro def optimize[T](node: Node[T]): Node[T]

    Optimize template to monolith (if possible) levsha.Document.Node in compile time.

    Optimize template to monolith (if possible) levsha.Document.Node in compile time. Note this method touched by non-idempotent typechecking bug of Scala compiler. It means, sometimes your code could be broken. Try not to insert non-DSL code into optimize {} call.

    Definition Classes
    Optimize
    See also

    https://github.com/scala/bug/issues/5464

    https://github.com/fomkin/levsha#memory-allocation-model-explanation

  10. implicit def optionToAttr[M](value: Option[Attr[M]]): Attr[M]

    Implicitly unwraps optional attributes

  11. implicit def optionToNode[M](value: Option[Node[M]]): Node[M]

    Implicitly unwraps optional documents

  12. implicit def optionToStyle[M](value: Option[Style[M]]): Style[M]

    Implicitly unwraps optional styles

  13. val preventDefaultClickBehavior: Attr[Nothing]

    Use it when want overwrite default click behavior.

    Use it when want overwrite default click behavior.

    a(href := "http://example.com", preventDefaultClickBehavior)
  14. implicit def seqToAttr[M](xs: Iterable[Attr[M]]): Attr[M]

    Converts iterable of attributes to document one attr

  15. implicit def seqToNode[M](xs: Iterable[Node[M]]): Node[M]

    Converts iterable of templates to document fragment

  16. implicit def seqToStyle[M](xs: Iterable[Style[M]]): Style[M]

    Converts iterable of attributes to document one style

  17. implicit def stringToNode[M](value: String): Node[M]

    Converts String to text document node

  18. def void[T]: Node[T] with Attr[T]
  19. def when[T](condition: Boolean)(doc: Document[T]): Document[T]

    Add node or attribute conditionally

    Add node or attribute conditionally

    Example:
    1. button(
        when(inProgress)(disabled)
        "Push me"
      )
  20. object html

    HTML Tags, Attributes, and Styles specification

  21. object svg

    https://developer.mozilla.org/en-US/docs/Web/SVG

Inherited from Optimize

Inherited from AnyRef

Inherited from Any

Ungrouped