 (ns uxbox.core
+  (:require-macros [uxbox.util.syntax :refer [define-once]])
   (:require [beicon.core :as rx]
             [cats.labs.lens :as l]
             [uxbox.state :as st]

                    (rx/tap #(println "[save]")))]
    (rx/on-value stream #(dl/persist-state %))))

(defonce +setup+
  (do
    (println "bootstrap")

    (st/init)
    (rt/init)
    (ui/init)

    (rs/emit! (dl/load-data))
    (main)))


(enable-console-print!)

(defn- main
  []
  (let [lens (l/select-keys [:pages-by-id
                             :shapes-by-id
