🎉 Allow complex interactions

This commit is contained in:
Andrés Moya 2021-09-06 15:53:44 +02:00 committed by Andrey Antukh
parent 6c332b949b
commit c7252a950b
16 changed files with 306 additions and 159 deletions

View file

@ -185,9 +185,9 @@
;; Interactions
(s/def :internal.shape.interaction/event-type #{:click}) ; In the future we will have more options
(s/def :internal.shape.interaction/action-type #{:navigate})
(s/def :internal.shape.interaction/destination ::uuid)
(s/def :internal.shape.interaction/event-type #{:click :hover})
(s/def :internal.shape.interaction/action-type #{:navigate :open-overlay :close-overlay})
(s/def :internal.shape.interaction/destination (s/nilable ::uuid))
(s/def :internal.shape/interaction
(s/keys :req-un [:internal.shape.interaction/event-type
@ -197,6 +197,11 @@
(s/def :internal.shape/interactions
(s/coll-of :internal.shape/interaction :kind vector?))
(def default-interaction
{:event-type :click
:action-type :navigate
:destination nil})
;; Size constraints
(s/def :internal.shape/constraints-h #{:left :right :leftright :center :scale})