io.eezo.core.html

Members list

Type members

Classlikes

final case class Attr

An attribute. The value is optional rather than a plain AttrValue so that value := "" and disabled stay distinct: None renders the bare name, Some(Literal("")) renders value="". Collapsing the two would make an empty text input indistinguishable from a boolean flag.

An attribute. The value is optional rather than a plain AttrValue so that value := "" and disabled stay distinct: None renders the bare name, Some(Literal("")) renders value="". Collapsing the two would make an empty text input indistinguishable from a boolean flag.

The constructor is package private, the same shape as Html.Text, so := on an AttrName is the only way to build one from outside io.eezo.core.html, while the pattern match that the differ in modules/live needs still compiles from anywhere. Pairing a name of a call site's own choosing with an AttrValue.Link is what would otherwise reopen the set of url bearing names that Attrs closes.

Attributes

Source
Html.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed class AttrName(val name: String)

An attribute name, waiting for its value.

An attribute name, waiting for its value.

sealed rather than final so that UrlAttrName can add the one arm the url bearing names need, and no view file can invent a fourth kind of attribute name from outside this file.

Attributes

Source
Tag.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class UrlAttrName
enum AttrValue

What an attribute carries.

What an attribute carries.

Two cases because a mount has to tell them apart: text is finished, and a Url is a value Route.under can still move. Only the url bearing names build a Link, so the arm exists exactly where prefixing an address is meaningful.

Attributes

Source
Html.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Attrs

The attribute names, qualified rather than wildcard imported, because they collide with the tags on title, style, label, form, value, name, data and span.

The attribute names, qualified rather than wildcard imported, because they collide with the tags on title, style, label, form, value, name, data and span.

The three Scala keywords are spelled cls, tpe and htmlFor rather than backticked, because a backticked `for` is a papercut on every label in every form, and forms are the framework's most written markup.

Attributes

Source
Attrs.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Attrs.type
enum Html

eezo's HTML node tree.

eezo's HTML node tree.

Four cases and no more. There is no Comment case, because nothing eezo renders emits one and Html.raw covers it if something ever does, and no Doctype case, because Html.doctype is a Raw the caller puts first. A case that may legally appear at exactly one position in the tree is a case every match in modules/live has to handle and then ignore.

Attributes

Companion
object
Source
Html.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Html

Attributes

Companion
enum
Source
Html.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Html.type
final case class Key(value: String)

A list child's identity, which modules/live needs to tell one row from another across a diff. It reaches Html.Element.key through its own type rather than through an intercepted attribute name, because interception by string is exactly the convention-not-type problem the field exists to avoid.

A list child's identity, which modules/live needs to tell one row from another across a diff. It reaches Html.Element.key through its own type rather than through an intercepted attribute name, because interception by string is exactly the convention-not-type problem the field exists to avoid.

Attributes

Source
Tag.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Tag

Attributes

Companion
class
Source
Tag.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Tag.type
final class Tag(val name: String)

A tag name, applied to build an element.

A tag name, applied to build an element.

Attributes

Companion
object
Source
Tag.scala
Supertypes
class Object
trait Matchable
class Any
object Tags

The tags. Wildcard imported, because a view file mentions far more distinct tags than distinct attributes; Attrs stays qualified, because the two collide on title, style, label, form, value, name, data and span.

The tags. Wildcard imported, because a view file mentions far more distinct tags than distinct attributes; Attrs stays qualified, because the two collide on title, style, label, form, value, name, data and span.

Coverage is the floor the seven derived routes need: document, structure, text, lists, forms, media and tables, which is everything they render.

Attributes

Source
Tags.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Tags.type
object Url

Attributes

Companion
enum
Source
Url.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Url.type
enum Url

A URL a page emits, in the two kinds a mount has to tell apart.

A URL a page emits, in the two kinds a mount has to tell apart.

A String in an href is a finished address, and finished is exactly what a mounted application's own links are not: Route.under("/admin") moves the route and the page has no way to hear about it. The two cases are that difference, made a type rather than a convention, so that relocation is decided where the URL is written instead of guessed where it is served.

There is no third case for "resolved". Prefixing a Mounted keeps it Mounted, because a set of routes can be mounted again, and a case saying the work is done would have to be undone by the next layer.

Attributes

Companion
object
Source
Url.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class UrlAttrName extends AttrName

An attribute name whose value is an address: href, action, src.

An attribute name whose value is an address: href, action, src.

Separate from AttrName because a Url means something only where a browser will follow it. Restricting the arm to these three is what makes Attrs.cls := Url.Mounted("/posts") a compile error rather than a class attribute that quietly moves under a mount. The constructor stays private[html] so Attrs is the one list that decides which names carry a Url, and the constructors of Attr and AttrValue.Link are package private for the same reason: either of them left public would let a call site outside io.eezo.core.html pair a name of its own with an AttrValue.Link, minting one outright or lifting one out of an href attribute it had just built, and so mint a fourth url bearing name that a mount would then rewrite.

Attributes

Source
Tag.scala
Supertypes
class AttrName
class Object
trait Matchable
class Any

Types

type Mod = Attr | Key | Html | String | Int | Long | Double | Iterable[Attr | Key | Html | String | Int | Long | Double]

Everything a tag accepts as an argument.

Everything a tag accepts as an argument.

A union rather than a Modifier trait with a given Conversion: under this build's own -feature -Werror, a conversion is a hard error at every use site unless the view file opens with import scala.language.implicitConversions, and a language import in every view file is the opposite of effortless.

Users cannot add their own arm today. That loss is recoverable: widening a union parameter is both source and binary compatible, so | Modifier can be added the day somebody needs it.

Attributes

Source
Tag.scala

Value members

Concrete methods

def key(value: String): Key

Builds a list child's Key.

Builds a list child's Key.

Attributes

Source
Tag.scala

Exports

Defined exports

val a: Tag
Exported from Tags

Attributes

Source
Tags.scala
val article: Tag
Exported from Tags

Attributes

Source
Tags.scala
val aside: Tag
Exported from Tags

Attributes

Source
Tags.scala
val audio: Tag
Exported from Tags

Attributes

Source
Tags.scala
val base: Tag
Exported from Tags

Attributes

Source
Tags.scala
Exported from Tags

Attributes

Source
Tags.scala
val body: Tag
Exported from Tags

Attributes

Source
Tags.scala
val br: Tag
Exported from Tags

Attributes

Source
Tags.scala
val button: Tag
Exported from Tags

Attributes

Source
Tags.scala
val caption: Tag
Exported from Tags

Attributes

Source
Tags.scala
val code: Tag
Exported from Tags

Attributes

Source
Tags.scala
val dd: Tag
Exported from Tags

Attributes

Source
Tags.scala
val div: Tag
Exported from Tags

Attributes

Source
Tags.scala
val dl: Tag
Exported from Tags

Attributes

Source
Tags.scala
val dt: Tag
Exported from Tags

Attributes

Source
Tags.scala
val em: Tag
Exported from Tags

Attributes

Source
Tags.scala
val fieldset: Tag
Exported from Tags

Attributes

Source
Tags.scala
Exported from Tags

Attributes

Source
Tags.scala
val figure: Tag
Exported from Tags

Attributes

Source
Tags.scala
val form: Tag
Exported from Tags

Attributes

Source
Tags.scala
val h1: Tag
Exported from Tags

Attributes

Source
Tags.scala
val h2: Tag
Exported from Tags

Attributes

Source
Tags.scala
val h3: Tag
Exported from Tags

Attributes

Source
Tags.scala
val h4: Tag
Exported from Tags

Attributes

Source
Tags.scala
val h5: Tag
Exported from Tags

Attributes

Source
Tags.scala
val h6: Tag
Exported from Tags

Attributes

Source
Tags.scala
val head: Tag
Exported from Tags

Attributes

Source
Tags.scala
val header: Tag
Exported from Tags

Attributes

Source
Tags.scala
val hr: Tag
Exported from Tags

Attributes

Source
Tags.scala
val html: Tag
Exported from Tags

Attributes

Source
Tags.scala
val img: Tag
Exported from Tags

Attributes

Source
Tags.scala
val input: Tag
Exported from Tags

Attributes

Source
Tags.scala
val label: Tag
Exported from Tags

Attributes

Source
Tags.scala
val legend: Tag
Exported from Tags

Attributes

Source
Tags.scala
val li: Tag
Exported from Tags

Attributes

Source
Tags.scala
val main: Tag
Exported from Tags

Attributes

Source
Tags.scala
val meta: Tag
Exported from Tags

Attributes

Source
Tags.scala
val ol: Tag
Exported from Tags

Attributes

Source
Tags.scala
val option: Tag
Exported from Tags

Attributes

Source
Tags.scala
val p: Tag
Exported from Tags

Attributes

Source
Tags.scala
val pre: Tag
Exported from Tags

Attributes

Source
Tags.scala
val script: Tag
Exported from Tags

Attributes

Source
Tags.scala
val section: Tag
Exported from Tags

Attributes

Source
Tags.scala
val select: Tag
Exported from Tags

Attributes

Source
Tags.scala
val small: Tag
Exported from Tags

Attributes

Source
Tags.scala
val source: Tag
Exported from Tags

Attributes

Source
Tags.scala
val span: Tag
Exported from Tags

Attributes

Source
Tags.scala
val strong: Tag
Exported from Tags

Attributes

Source
Tags.scala
val style: Tag
Exported from Tags

Attributes

Source
Tags.scala
val table: Tag
Exported from Tags

Attributes

Source
Tags.scala
val tbody: Tag
Exported from Tags

Attributes

Source
Tags.scala
val td: Tag
Exported from Tags

Attributes

Source
Tags.scala
val textarea: Tag
Exported from Tags

Attributes

Source
Tags.scala
val tfoot: Tag
Exported from Tags

Attributes

Source
Tags.scala
val th: Tag
Exported from Tags

Attributes

Source
Tags.scala
val thead: Tag
Exported from Tags

Attributes

Source
Tags.scala
val title: Tag
Exported from Tags

Attributes

Source
Tags.scala
val tr: Tag
Exported from Tags

Attributes

Source
Tags.scala
val ul: Tag
Exported from Tags

Attributes

Source
Tags.scala
val video: Tag
Exported from Tags

Attributes

Source
Tags.scala