 (defn -initial-model-view
   [initial-model]
   [:div
-   [:hr]
    [:strong "Initial model:"]
    [:div (pr-str initial-model)]])
 

  [signal-events action-events dispatch]
  [:div
   (doall
     (for [[signal-id signal] (reverse signal-events)]
       ^{:key signal-id}
       [:div {:title "Signal"}
        [:div {:style    {:padding-left     4

                   :component-did-mount (fn [this] (.resizable (js/$ (r/dom-node this))
                                                               (clj->js {:grid    25
                                                                         :handles "n, e, s, w, ne, se, sw, nw"})))}))

(defn -autoscrollable-div
  "Will scroll to bottom on any update."
  [_attrs & _body]
  (letfn [(scroll [this]
            (set! (.-scrollTop (r/dom-node this))
                  (.-scrollHeight (r/dom-node this))))]
    (r/create-class {:reagent-render       (fn [attrs & body]
                                             (into [:div attrs] body))
                     :component-did-mount  scroll
                     :component-did-update scroll})))

(defn -overlay
  [& body]
