Add stricter validation for gradient stop offset

It should be from a number from 0 to 1 inclusive
This commit is contained in:
Andrey Antukh
2025-05-28 14:40:59 +02:00
parent 5c225a51ce
commit 91807151ba

View File

@@ -98,7 +98,7 @@
[:map {:title "GradientStop"}
[:color schema:hex-color]
[:opacity {:optional true} [::sm/number {:min 0 :max 1}]]
[:offset ::sm/safe-number]]]]])
[:offset [::sm/number {:min 0 :max 1}]]]]]])
(def schema:gradient-color
[:map [:gradient schema:gradient]])