mirror of
https://github.com/penpot/penpot.git
synced 2026-04-27 04:08:23 +00:00
✨ Spec definition for guides
This commit is contained in:
parent
64e7cad292
commit
d356a3fa56
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user