From 4ddc5dbb39862949ee3f82a78374c1470366eb17 Mon Sep 17 00:00:00 2001 From: rmorshea Date: Mon, 20 Dec 2021 00:02:01 -0800 Subject: [PATCH] add more standard html elements --- src/idom/html.py | 120 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 98 insertions(+), 22 deletions(-) diff --git a/src/idom/html.py b/src/idom/html.py index 3c1ac2404..2dc9a22e6 100644 --- a/src/idom/html.py +++ b/src/idom/html.py @@ -1,29 +1,32 @@ """ -**External sources** +**Dcument metadata** +- :func:`base` +- :func:`head` - :func:`link` +- :func:`meta` +- :func:`style` +- :func:`title` +**Content sectioning** -**Content Sectioning** - -- :func:`style` +- :func:`body` - :func:`address` - :func:`article` - :func:`aside` - :func:`footer` +- :func:`header` - :func:`h1` - :func:`h2` - :func:`h3` - :func:`h4` - :func:`h5` - :func:`h6` -- :func:`header` -- :func:`hgroup` +- :func:`main` - :func:`nav` - :func:`section` - -**Text Content** +**Text content** - :func:`blockquote` - :func:`dd` @@ -39,12 +42,13 @@ - :func:`pre` - :func:`ul` - -**Inline Text Semantics** +**Inline text semantics** - :func:`a` - :func:`abbr` - :func:`b` +- :func:`bdi` +- :func:`bdo` - :func:`br` - :func:`cite` - :func:`code` @@ -54,6 +58,9 @@ - :func:`kbd` - :func:`mark` - :func:`q` +- :func:`rp` +- :func:`rt` +- :func:`ruby` - :func:`s` - :func:`samp` - :func:`small` @@ -64,17 +71,44 @@ - :func:`time` - :func:`u` - :func:`var` - +- :func:`wbr` **Image and video** -- :func:`img` +- :func:`area` - :func:`audio` +- :func:`img` +- :func:`map` +- :func:`track` - :func:`video` + +**Embedded content** + +- :func:`embed` +- :func:`iframe` +- :func:`object` +- :func:`param` +- :func:`picture` +- :func:`portal` - :func:`source` +**SVG and MathML** + +- :func:`svg` +- :func:`math` + +**Scripting** + +- :func:`canvas` +- :func:`noscript` +- :func:`script` + +**Demarcating edits** -**Table Content** +- :func:`del_` +- :func:`ins` + +**Table content** - :func:`caption` - :func:`col` @@ -87,7 +121,6 @@ - :func:`thead` - :func:`tr` - **Forms** - :func:`button` @@ -103,36 +136,45 @@ - :func:`select` - :func:`textarea` - -**Interactive Elements** +**Interactive elements** - :func:`details` - :func:`dialog` - :func:`menu` - :func:`menuitem` - :func:`summary` + +**Web components** + +- :func:`slot` +- :func:`template` """ from .core.vdom import make_vdom_constructor -# External sources -link = make_vdom_constructor("link", allow_children=False) +# Dcument metadata +base = make_vdom_constructor("base") +head = make_vdom_constructor("head") +link = make_vdom_constructor("link") +meta = make_vdom_constructor("meta") +style = make_vdom_constructor("style") +title = make_vdom_constructor("title") # Content sectioning -style = make_vdom_constructor("style") +body = make_vdom_constructor("body") address = make_vdom_constructor("address") article = make_vdom_constructor("article") aside = make_vdom_constructor("aside") footer = make_vdom_constructor("footer") +header = make_vdom_constructor("header") h1 = make_vdom_constructor("h1") h2 = make_vdom_constructor("h2") h3 = make_vdom_constructor("h3") h4 = make_vdom_constructor("h4") h5 = make_vdom_constructor("h5") h6 = make_vdom_constructor("h6") -header = make_vdom_constructor("header") -hgroup = make_vdom_constructor("hgroup") +main = make_vdom_constructor("main") nav = make_vdom_constructor("nav") section = make_vdom_constructor("section") @@ -155,6 +197,8 @@ a = make_vdom_constructor("a") abbr = make_vdom_constructor("abbr") b = make_vdom_constructor("b") +bdi = make_vdom_constructor("bdi") +bdo = make_vdom_constructor("bdo") br = make_vdom_constructor("br", allow_children=False) cite = make_vdom_constructor("cite") code = make_vdom_constructor("code") @@ -164,6 +208,9 @@ kbd = make_vdom_constructor("kbd") mark = make_vdom_constructor("mark") q = make_vdom_constructor("q") +rp = make_vdom_constructor("rp") +rt = make_vdom_constructor("rt") +ruby = make_vdom_constructor("ruby") s = make_vdom_constructor("s") samp = make_vdom_constructor("samp") small = make_vdom_constructor("small") @@ -174,13 +221,38 @@ time = make_vdom_constructor("time") u = make_vdom_constructor("u") var = make_vdom_constructor("var") +wbr = make_vdom_constructor("wbr") # Image and video -img = make_vdom_constructor("img", allow_children=False) +area = make_vdom_constructor("area", allow_children=False) audio = make_vdom_constructor("audio") +img = make_vdom_constructor("img", allow_children=False) +map = make_vdom_constructor("map") +track = make_vdom_constructor("track") video = make_vdom_constructor("video") + +# Embedded content +embed = make_vdom_constructor("embed", allow_children=False) +iframe = make_vdom_constructor("iframe", allow_children=False) +object = make_vdom_constructor("object") +param = make_vdom_constructor("param") +picture = make_vdom_constructor("picture") +portal = make_vdom_constructor("portal", allow_children=False) source = make_vdom_constructor("source", allow_children=False) +# SVG and MathML +svg = make_vdom_constructor("svg") +math = make_vdom_constructor("math") + +# Scripting +canvas = make_vdom_constructor("canvas") +noscript = make_vdom_constructor("noscript") +script = make_vdom_constructor("script") + +# Demarcating edits +del_ = make_vdom_constructor("del") +ins = make_vdom_constructor("ins") + # Table content caption = make_vdom_constructor("caption") col = make_vdom_constructor("col") @@ -213,3 +285,7 @@ menu = make_vdom_constructor("menu") menuitem = make_vdom_constructor("menuitem") summary = make_vdom_constructor("summary") + +# Web components +slot = make_vdom_constructor("slot") +template = make_vdom_constructor("template")