diff --git a/base/lib/react.hoon b/base/lib/react.hoon index d4aae3e0b..98d62c580 100644 --- a/base/lib/react.hoon +++ b/base/lib/react.hoon @@ -18,13 +18,38 @@ %pattern %polygon %polyline %radial-gradient %rect %stop %svg %text %tspan == -++ react-vale +++ react-vale ~(has in react-elems) ++ react-to-tape |= src=manx ^- tape ?: (~(has by (mo a.g.src)) [%urb %codemirror]) ?> ?=([[%pre *] _:/(**) ~] src) $(src ;codemirror(value "{v.i.a.g.i.c.src}");) + ?: (~(has by (mo a.g.src)) [%urb %exec]) :: runnable code attribute tag + ?> ?=([[%pre *] _:/(**) ~] src) :: verify its only a text node + =* code v.i.a.g.i.c.src + =+ ^= result + (mule |.((slap !>(.) (ream (crip code))))) :: compile and run safely + ?: ?=(%.y -.result) :: it was ok + =+ ^= new + ;div(class "rancode") + ;pre:"{code}" + ;code:"{~(ram re (sell p.result))}" + == + $(src new) + =+ ^= error + ;div(class "failedcode") + ;pre:"{code}" + ;pre + ;div:"error" + ;* %+ turn + (scag (dec (lent p.result)) p.result) :: hide react trace + |= a=tank + ^- manx + ;div:"{~(ram re a)}" + == + == + $(src error) ;: weld "React.createElement(" =* tan n.g.src @@ -41,7 +66,7 @@ ", " :: =< ~(ram re %rose [", " "[" "]"] (turn c.src .)) - |= a=manx + |= a=manx ?: ?=(_:/(**) a) leaf/(pojo (jape v.i.a.g.a)) leaf/^$(src a) diff --git a/base/pub/doc/arvo/util.md b/base/pub/doc/arvo/util.md index d53607020..9449da42f 100644 --- a/base/pub/doc/arvo/util.md +++ b/base/pub/doc/arvo/util.md @@ -109,7 +109,7 @@ reloaded, vanes depending on the changes must be reloaded as well. For example `:reload %zuse %ford` is necessary to make use of changes in application code or the REPL. -Possible values for %vane-name see [Overview](overview.md "overview"): +Possible values for %vane-name see [Overview](overview "overview"): ------------------------------------------------------------------------ diff --git a/base/pub/doc/guide/b-cli.md b/base/pub/doc/guide/b-cli.md index 8e55405c2..b3f598556 100644 --- a/base/pub/doc/guide/b-cli.md +++ b/base/pub/doc/guide/b-cli.md @@ -13,7 +13,7 @@ great place to test out your hoon knowledge. In this guide we're just going to talk about some basic system utilities and get comfortable moving around in `%clay`. If you'd just like to see a list of command-line utilities, you can find the Arvo man pages -[here](../arvo/util.md). +[here](../arvo/util). This rudimentary tour should work well in both places.