     (as-> shape $
       (merge $ {:width width :height height :x x :y y})
       (container-rect $))))
+
+(defmethod -outer-rect :default
+  [shape _]
+  (throw (ex-info "Not implemented" (select-keys shape [:type]))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Helpers


(def ^:static +hierarchy+
  (as-> (make-hierarchy) $
    (derive $ :builtin/icon ::shape)
    (derive $ :builtin/rect ::shape)
    (derive $ :builtin/line ::shape)
    (derive $ :builtin/circle ::shape)
    (derive $ :builtin/text ::shape)
    (derive $ :builtin/group ::shape)))

(defn shape?
  [type]

  [shape _]
  (throw (ex-info "Not implemented" (select-keys shape [:type]))))

(defmethod -resize' ::rect
  [shape [width height]]
  (merge shape
         (when width {:width width})
         (when height {:height height})))

(defmethod -resize' :default
  [shape _]
  (throw (ex-info "Not implemented" (select-keys shape [:type]))))

;; Move

(defmethod -move ::rect
  [shape {:keys [dx dy] :as opts}]
  (assoc shape
         :x (+ (:x shape) dx)
         :y (+ (:y shape) dy)))

(defmethod -move :builtin/line
  [shape {:keys [dx dy] :as opts}]
