We define a representation of HTML trees together with a JSX-like DSL for writing them.
A HTML tree which may contain widget components.
- element: String → Array (String × Lean.Json) → Array ProofWidgets.Html → ProofWidgets.Html
An
element "tag" attrs children
represents<tag {...attrs}>{...children}</tag>
. - text: String → ProofWidgets.Html
Raw HTML text.
- component: UInt64 → String → ProofWidgets.LazyEncodable Lean.Json → Array ProofWidgets.Html → ProofWidgets.Html
A
component h e props children
represents<Foo {...props}>{...children}</Foo>
, whereFoo : Component Props
is some component such thath = hash Foo.javascript
,e = Foo.«export»
, andprops
will produce a JSON-encoded value of typeProps
.
Instances For
Equations
- ProofWidgets.instInhabitedHtml = { default := ProofWidgets.Html.element default default default }
Equations
- One or more equations did not get rendered due to their size.
def
ProofWidgets.Html.ofComponent
{Props : Type}
[Lean.Server.RpcEncodable Props]
(c : ProofWidgets.Component Props)
(props : Props)
(children : Array ProofWidgets.Html)
:
Equations
- ProofWidgets.Html.ofComponent c props children = ProofWidgets.Html.component (hash c.javascript) c.export (Lean.Server.rpcEncode props) children
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- ProofWidgets.Jsx.jsxAttrVal_ = Lean.ParserDescr.node `ProofWidgets.Jsx.jsxAttrVal_ 1022 (Lean.ParserDescr.const `str)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- ProofWidgets.Jsx.getJsxText x = let stx := x; Lean.Syntax.getAtomVal stx.raw[0]
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- ProofWidgets.Jsx.jsxChild_ = Lean.ParserDescr.node `ProofWidgets.Jsx.jsxChild_ 1022 (Lean.ParserDescr.parser `ProofWidgets.Jsx.jsxText)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- ProofWidgets.Jsx.jsxChild__1 = Lean.ParserDescr.node `ProofWidgets.Jsx.jsxChild__1 1022 (Lean.ParserDescr.cat `jsxElement 0)
Instances For
Equations
- ProofWidgets.Jsx.term_ = Lean.ParserDescr.node `ProofWidgets.Jsx.term_ 1024 (Lean.ParserDescr.cat `jsxElement 0)
Instances For
def
ProofWidgets.Jsx.transformTag
(n : Lean.Ident)
(m : Lean.Ident)
(ns : Array Lean.Ident)
(vs : Array (Lean.TSyntax `jsxAttrVal))
(cs : Array (Lean.TSyntax `jsxChild))
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
ProofWidgets.Jsx.delabJsxChildren :
Lean.PrettyPrinter.Delaborator.DelabM (Array (Lean.TSyntax `jsxChild))
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.