From 26d26af9273d7e73d2ab1346bfeff84b7a9a4702 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Thu, 29 Jan 2015 17:50:35 -0800 Subject: [PATCH] react door --- main/mar/react/door.hook | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 main/mar/react/door.hook diff --git a/main/mar/react/door.hook b/main/mar/react/door.hook new file mode 100644 index 0000000000..9b402a03f0 --- /dev/null +++ b/main/mar/react/door.hook @@ -0,0 +1,59 @@ +:: +:::: /hoon/core/react/mar + :: +/? 314 +/= react-elems + /; sa /~ + :~ %a %abbr %address %area %article %aside %audio %b %base + %bdi %bdo %big %blockquote %body %br %button %canvas %caption + %cite %code %col %colgroup %data %datalist %dd %del %details + %dfn %dialog %div %dl %dt %em %embed %fieldset %figcaption + %figure %footer %form %h1 %h2 %h3 %h4 %h5 %h6 %head %header + %hr %html %i %iframe %img %input %ins %kbd %keygen %label + %legend %li %link %main %map %mark %menu %menuitem %meta + %meter %nav %noscript %object %ol %optgroup %option %output %p + %param %picture %pre %progress %q %rp %rt %ruby %s %samp + %script %section %select %small %source %span %strong %style + %sub %summary %sup %table %tbody %td %textarea %tfoot %th + %thead %time %title %tr %track %u %ul %var %video %wbr + %circle %defs %ellipse %g %line %linear-gradient %mask %path + %pattern %polygon %polyline %radial-gradient %rect %stop %svg + %text %tspan + == +!: +:::: + :: +|_ own=manx +:: +++ vale ~(has in react-elems) +++ grow :: convert to + |% + ++ tape + ;: weld + "React.createElement(" + =* tan n.g.own + ?^ tan !! :: namespaces unsupported + ?: (vale tan) + "'{(trip tan)}'" + (trip tan) + :: + ", " + =- (pojo (jobe (turn a.g.own -))) + |= [a=mane b=^tape] + ?^(a !! [a (jape b)]) + ", " + :: + =- ~(ram re %rose [", " "[" "]"] (turn c.own -)) + |= a=manx + ?: ?=(_:/(**) a) + leaf/(pojo (jape v.i.a.g.a)) + leaf/tape(own a) + :: + ")" + == + ++ js (crip tape) :: convert to %js + ++ mime [/text/javascript (taco js)] :: convert to %mime + -- +++ grab |% :: convert from + ++ noun manx :: clam from %noun +-- --