 (ns greffe.doc-comps
+  (:require-macros [cljs.core.async.macros :refer [go alt! go-loop]])
   (:require
    [om.core :as om :include-macros true]
    [om.dom :as dom :include-macros true]
+   [cljs-uuid-utils.core :as uuid]
+   [cljs.core.async :refer [<! chan put! sub pub unsub sliding-buffer alts! mult tap untap]]
    [cljs-xml.core :as cx]
    [gmark.core :as gm]
    [gmark.tei-elems :as gmt]

             (dom/div #js {:className "controls"}
               (dom/a #js {:onClick
                           (fn [ev]
                             (when-not (om/get-state owner :editText)
                               (om/set-state! owner
                                 :editContent (gm/to-gmark @elem tei)))
                             (om/set-state!
                               owner
                               :editText

    (init-state [_] {:hoverTimeout nil
                     :showButton false
                     :editText false    ; are we in editing mode?
                     :editContent nil   ; "cache" for editing content
                     :uuid (uuid/make-random-uuid)
                     :local-edit-chan (chan)})          ; for subscribing 
    
    om/IRenderState
    (render-state [_ state]
