From 4d9e070bcd7eb8e1fdbe79c609393d6b20f41b46 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 25 Jul 2025 09:01:57 +0200 Subject: [PATCH] :sparkles: Add reader tag support for types path data --- backend/src/data_readers.clj | 1 + common/src/app/common/types/path/impl.cljc | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/backend/src/data_readers.clj b/backend/src/data_readers.clj index a326552da9..d15ece02fa 100644 --- a/backend/src/data_readers.clj +++ b/backend/src/data_readers.clj @@ -1,5 +1,6 @@ {penpot/inst app.common.time/inst penpot/cron app.util.cron/cron penpot/duration app.common.time/duration + penpot/path-data app.common.types.path/from-string penpot/matrix app.common.geom.matrix/decode-matrix penpot/point app.common.geom.point/decode-point} diff --git a/common/src/app/common/types/path/impl.cljc b/common/src/app/common/types/path/impl.cljc index ae1520e78b..1efb35c152 100644 --- a/common/src/app/common/types/path/impl.cljc +++ b/common/src/app/common/types/path/impl.cljc @@ -451,6 +451,16 @@ (-pr-writer [this writer _] (cljs.core/-write writer (str "#penpot/path-data \"" (.toString this) "\""))))) +#?(:clj + (defmethod print-method PathData + [o w] + (print-dup o w))) + +#?(:clj + (defmethod print-dup PathData + [^PathData o ^java.io.Writer writer] + (.write writer (str "#penpot/path-data \"" (.toString o) "\"")))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; SCHEMA ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;