From d356a3fa5661eb3b32557c9e7dd4e9bc7c5f292f Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 20 Jan 2022 22:28:57 +0100 Subject: [PATCH] :sparkles: Spec definition for guides --- common/src/app/common/types/page_options.cljc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/common/src/app/common/types/page_options.cljc b/common/src/app/common/types/page_options.cljc index 4901b87222..f7927363f5 100644 --- a/common/src/app/common/types/page_options.cljc +++ b/common/src/app/common/types/page_options.cljc @@ -61,12 +61,29 @@ (s/def ::flows (s/coll-of ::flow :kind vector?)) +;; --- Guides + +(s/def :guides/id ::us/uuid) +(s/def :guides/axis #{:x :y}) +(s/def :guides/position ::us/safe-number) +(s/def :guides/frame-id (s/nilable ::us/uuid)) + +(s/def ::guide + (s/keys :req-un [:guides/id + :guides/axis + :guides/position] + :opt-un [:guides/frame-id])) + +(s/def ::guides + (s/map-of uuid? ::shape)) + ;; --- Options (s/def ::options (s/keys :opt-un [::background ::saved-grids - ::flows])) + ::flows + ::guides])) ;; --- Helpers for flow