From 0c66b5db733009d462f4f37667c7f2b640cc9801 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Fri, 31 Oct 2025 09:19:53 +0100 Subject: [PATCH] :paperclip: Set stronger text validation (#7646) --- common/src/app/common/types/shape/text.cljc | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/common/src/app/common/types/shape/text.cljc b/common/src/app/common/types/shape/text.cljc index fb6ed888c2..8669799604 100644 --- a/common/src/app/common/types/shape/text.cljc +++ b/common/src/app/common/types/shape/text.cljc @@ -34,13 +34,13 @@ [:fills {:optional true} [:maybe [:vector {:gen/max 2} schema:fill]]] - [:font-family {:optional true} :string] - [:font-size {:optional true} :string] - [:font-style {:optional true} :string] - [:font-weight {:optional true} :string] - [:direction {:optional true} :string] - [:text-decoration {:optional true} :string] - [:text-transform {:optional true} :string] + [:font-family {:optional true} ::sm/text] + [:font-size {:optional true} ::sm/text] + [:font-style {:optional true} ::sm/text] + [:font-weight {:optional true} ::sm/text] + [:direction {:optional true} ::sm/text] + [:text-decoration {:optional true} ::sm/text] + [:text-transform {:optional true} ::sm/text] [:typography-ref-id {:optional true} [:maybe ::sm/uuid]] [:typography-ref-file {:optional true} [:maybe ::sm/uuid]] [:children @@ -51,13 +51,13 @@ [:fills {:optional true} [:maybe [:vector {:gen/max 2} schema:fill]]] - [:font-family {:optional true} :string] - [:font-size {:optional true} :string] - [:font-style {:optional true} :string] - [:font-weight {:optional true} :string] - [:direction {:optional true} :string] - [:text-decoration {:optional true} :string] - [:text-transform {:optional true} :string] + [:font-family {:optional true} ::sm/text] + [:font-size {:optional true} ::sm/text] + [:font-style {:optional true} ::sm/text] + [:font-weight {:optional true} ::sm/text] + [:direction {:optional true} ::sm/text] + [:text-decoration {:optional true} ::sm/text] + [:text-transform {:optional true} ::sm/text] [:typography-ref-id {:optional true} [:maybe ::sm/uuid]] [:typography-ref-file {:optional true} [:maybe ::sm/uuid]]]]]]]]]]]]]) @@ -72,8 +72,8 @@ [:width ::sm/safe-number] [:height ::sm/safe-number] [:fills [:vector {:gen/max 2} schema:fill]] - [:font-family {:optional true} :string] - [:font-size {:optional true} :string] + [:font-family {:optional true} ::sm/text] + [:font-size {:optional true} ::sm/text] [:font-style {:optional true} :string] [:font-weight {:optional true} :string] [:rtl {:optional true} :boolean]