mirror of
https://github.com/penpot/penpot.git
synced 2025-05-14 09:46:37 +02:00
Merge branch 'main' into staging.
This commit is contained in:
commit
bfef94dbfb
4 changed files with 62 additions and 45 deletions
75
.gitignore
vendored
75
.gitignore
vendored
|
@ -1,49 +1,50 @@
|
||||||
figwheel_server.log
|
|
||||||
*jar
|
|
||||||
*-init.clj
|
*-init.clj
|
||||||
|
*.jar
|
||||||
|
*.penpot
|
||||||
|
.calva
|
||||||
|
.clj-kondo
|
||||||
|
.cpcache
|
||||||
.lein-deps-sum
|
.lein-deps-sum
|
||||||
.lein-failures
|
.lein-failures
|
||||||
.lein-repl-history
|
|
||||||
.lein-plugins/
|
.lein-plugins/
|
||||||
.repl
|
.lein-repl-history
|
||||||
|
.lsp
|
||||||
.nrepl-port
|
.nrepl-port
|
||||||
.cpcache
|
|
||||||
.rebel_readline_history
|
|
||||||
.nyc_output
|
.nyc_output
|
||||||
/vendor/**/target
|
.rebel_readline_history
|
||||||
/cd.md
|
.repl
|
||||||
node_modules
|
/.clj-kondo/.cache
|
||||||
/backend/target/
|
/_dump
|
||||||
/backend/resources/public/media
|
/backend/-
|
||||||
/backend/resources/public/assets
|
|
||||||
/backend/assets/
|
/backend/assets/
|
||||||
/backend/dist/
|
/backend/dist/
|
||||||
/backend/logs/
|
/backend/logs/
|
||||||
/backend/-
|
/backend/resources/public/assets
|
||||||
/telemetry/
|
/backend/resources/public/media
|
||||||
/frontend/npm-debug.log
|
/backend/target/
|
||||||
/frontend/target/
|
|
||||||
/frontend/dist/
|
|
||||||
/frontend/out/
|
|
||||||
/frontend/.shadow-cljs
|
|
||||||
/frontend/resources/public/*
|
|
||||||
/frontend/resources/fonts/experiments
|
|
||||||
/exporter/target
|
|
||||||
/exporter/.shadow-cljs
|
|
||||||
/docker/images/bundle*
|
|
||||||
/common/.shadow-cljs
|
|
||||||
/common/target
|
|
||||||
/common/coverage
|
|
||||||
/.clj-kondo/.cache
|
|
||||||
clj-profiler/
|
|
||||||
/bundle*
|
/bundle*
|
||||||
/media
|
/cd.md
|
||||||
|
/clj-profiler/
|
||||||
|
/common/.shadow-cljs
|
||||||
|
/common/coverage
|
||||||
|
/common/target
|
||||||
/deploy
|
/deploy
|
||||||
/web
|
/docker/images/bundle*
|
||||||
/_dump
|
/exporter/.shadow-cljs
|
||||||
/vendor/svgclean/bundle*.js
|
/exporter/target
|
||||||
|
/frontend/.shadow-cljs
|
||||||
.calva
|
|
||||||
.clj-kondo
|
|
||||||
.lsp
|
|
||||||
/frontend/cypress/videos/*/
|
/frontend/cypress/videos/*/
|
||||||
|
/frontend/dist/
|
||||||
|
/frontend/npm-debug.log
|
||||||
|
/frontend/out/
|
||||||
|
/frontend/resources/fonts/experiments
|
||||||
|
/frontend/resources/public/*
|
||||||
|
/frontend/target/
|
||||||
|
/media
|
||||||
|
/telemetry/
|
||||||
|
/vendor/**/target
|
||||||
|
/vendor/svgclean/bundle*.js
|
||||||
|
/web
|
||||||
|
clj-profiler/
|
||||||
|
figwheel_server.log
|
||||||
|
node_modules
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
"A main namespace for server repl."
|
"A main namespace for server repl."
|
||||||
#_:clj-kondo/ignore
|
#_:clj-kondo/ignore
|
||||||
(:require
|
(:require
|
||||||
|
[app.common.data :as d]
|
||||||
[app.common.pages :as cp]
|
[app.common.pages :as cp]
|
||||||
[app.common.uuid :as uuid]
|
|
||||||
[app.common.pages.migrations :as pmg]
|
[app.common.pages.migrations :as pmg]
|
||||||
|
[app.common.uuid :as uuid]
|
||||||
[app.config :as cfg]
|
[app.config :as cfg]
|
||||||
[app.db :as db]
|
[app.db :as db]
|
||||||
[app.db.sql :as sql]
|
[app.db.sql :as sql]
|
||||||
|
@ -12,12 +13,12 @@
|
||||||
[app.rpc.queries.profile :as prof]
|
[app.rpc.queries.profile :as prof]
|
||||||
[app.srepl.dev :as dev]
|
[app.srepl.dev :as dev]
|
||||||
[app.util.blob :as blob]
|
[app.util.blob :as blob]
|
||||||
[cuerdas.core :as str]
|
[clojure.pprint :refer [pprint]]
|
||||||
[clojure.pprint :refer [pprint]]))
|
[cuerdas.core :as str]))
|
||||||
|
|
||||||
(defn update-file
|
(defn update-file
|
||||||
([id f] (update-file id f false))
|
([system id f] (update-file system id f false))
|
||||||
([id f save?]
|
([system id f save?]
|
||||||
(db/with-atomic [conn (:app.db/pool system)]
|
(db/with-atomic [conn (:app.db/pool system)]
|
||||||
(let [file (db/get-by-id conn :file id {:for-update true})
|
(let [file (db/get-by-id conn :file id {:for-update true})
|
||||||
file (-> file
|
file (-> file
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
(ns app.main.ui.shapes.path
|
(ns app.main.ui.shapes.path
|
||||||
(:require
|
(:require
|
||||||
|
[app.common.logging :as log]
|
||||||
[app.main.ui.shapes.attrs :as attrs]
|
[app.main.ui.shapes.attrs :as attrs]
|
||||||
[app.main.ui.shapes.custom-stroke :refer [shape-custom-stroke]]
|
[app.main.ui.shapes.custom-stroke :refer [shape-custom-stroke]]
|
||||||
[app.util.object :as obj]
|
[app.util.object :as obj]
|
||||||
|
@ -19,10 +20,21 @@
|
||||||
[props]
|
[props]
|
||||||
(let [shape (unchecked-get props "shape")
|
(let [shape (unchecked-get props "shape")
|
||||||
content (:content shape)
|
content (:content shape)
|
||||||
pdata (mf/use-memo (mf/deps content) #(upf/format-path content))
|
pdata (mf/use-memo
|
||||||
|
(mf/deps content)
|
||||||
|
(fn []
|
||||||
|
(try
|
||||||
|
(upf/format-path content)
|
||||||
|
(catch :default e
|
||||||
|
(log/error :hint "unexpected error on formating path"
|
||||||
|
:shape-name (:name shape)
|
||||||
|
:shape-id (:id shape)
|
||||||
|
:cause e)
|
||||||
|
""))))
|
||||||
|
|
||||||
props (-> (attrs/extract-style-attrs shape)
|
props (-> (attrs/extract-style-attrs shape)
|
||||||
(obj/merge!
|
(obj/merge!
|
||||||
#js {:d pdata}))]
|
#js {:d pdata}))]
|
||||||
|
|
||||||
[:& shape-custom-stroke {:shape shape}
|
[:& shape-custom-stroke {:shape shape}
|
||||||
[:> :path props]]))
|
[:> :path props]]))
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
(ns app.main.ui.workspace.viewport.outline
|
(ns app.main.ui.workspace.viewport.outline
|
||||||
(:require
|
(:require
|
||||||
|
[app.common.exceptions :as ex]
|
||||||
[app.common.geom.shapes :as gsh]
|
[app.common.geom.shapes :as gsh]
|
||||||
[app.common.pages :as cp]
|
[app.common.pages :as cp]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
|
@ -27,7 +28,9 @@
|
||||||
path-data
|
path-data
|
||||||
(mf/use-memo
|
(mf/use-memo
|
||||||
(mf/deps shape)
|
(mf/deps shape)
|
||||||
#(when path? (upf/format-path (:content shape))))
|
#(when path?
|
||||||
|
(or (ex/ignoring (upf/format-path (:content shape)))
|
||||||
|
"")))
|
||||||
|
|
||||||
{:keys [x y width height selrect]} shape
|
{:keys [x y width height selrect]} shape
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue