         (update-in $ [:workspace-data :shapes] conj id))
       (assoc-in $ [:workspace-data :shapes-by-id id] shape))))
 
-(declare commit-shapes-changes)
 (declare select-shape)
 (declare recalculate-shape-canvas-relation)
 


(defn interrupt? [e] (= e :interrupt))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Websockets Events
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; --- Initialize WebSocket

(declare fetch-users)
(declare handle-who)

                    :operations operations}]
        (->> (rp/mutation :update-project-page params)
             (rx/map shapes-changes-commited))))))

(defn async-commit-shapes-changes
  [operations]
  (s/assert ::cp/operations operations)
  (ptk/reify ::async-commit-shapes-changes
    cljs.core/IDeref
    (-deref [_] operations)))

(s/def ::shapes-changes-commited
  (s/keys :req-un [::page-id ::version ::cp/operations]))
