Merge remote-tracking branch 'origin/staging-render' into develop

This commit is contained in:
Andrey Antukh 2025-12-22 17:28:18 +01:00
commit f478399ae0
12 changed files with 52 additions and 29 deletions

View File

@ -83,6 +83,7 @@ example. It's still usable as before, we just removed the example.
- Ensure consistent snap behavior across all zoom levels [Github #7774](https://github.com/penpot/penpot/pull/7774) by [@Tokytome](https://github.com/Tokytome) - Ensure consistent snap behavior across all zoom levels [Github #7774](https://github.com/penpot/penpot/pull/7774) by [@Tokytome](https://github.com/Tokytome)
- Fix crash in token grid view due to tooltip validation (by @dfelinto) [Github #7887](https://github.com/penpot/penpot/pull/7887) - Fix crash in token grid view due to tooltip validation (by @dfelinto) [Github #7887](https://github.com/penpot/penpot/pull/7887)
- Enable Hindi translations on the application
### :sparkles: New features & Enhancements ### :sparkles: New features & Enhancements

View File

@ -821,9 +821,10 @@
entries (keep (match-storage-entry-fn) entries)] entries (keep (match-storage-entry-fn) entries)]
(doseq [{:keys [id entry]} entries] (doseq [{:keys [id entry]} entries]
(let [object (->> (read-entry input entry) (let [object (-> (read-entry input entry)
(decode-storage-object) (decode-storage-object)
(validate-storage-object)) (update :bucket d/nilv sto/default-bucket)
(validate-storage-object))
ext (cmedia/mtype->extension (:content-type object)) ext (cmedia/mtype->extension (:content-type object))
path (str "objects/" id ext) path (str "objects/" id ext)

View File

@ -35,6 +35,9 @@
:assets-s3 :s3 :assets-s3 :s3
nil))) nil)))
(def default-bucket
"file-media-object")
(def valid-buckets (def valid-buckets
#{"file-media-object" #{"file-media-object"
"team-font-variant" "team-font-variant"

View File

@ -25,7 +25,7 @@
[app.common.time :as ct] [app.common.time :as ct]
[app.config :as cf] [app.config :as cf]
[app.db :as db] [app.db :as db]
[app.storage :as-alias sto] [app.storage :as sto]
[app.storage.impl :as impl] [app.storage.impl :as impl]
[integrant.core :as ig])) [integrant.core :as ig]))
@ -130,7 +130,7 @@
[{:keys [metadata]}] [{:keys [metadata]}]
(or (some-> metadata :bucket) (or (some-> metadata :bucket)
(some-> metadata :reference d/name) (some-> metadata :reference d/name)
"file-media-object")) sto/default-bucket))
(defn- process-objects! (defn- process-objects!
[conn has-refs? bucket objects] [conn has-refs? bucket objects]

View File

@ -276,6 +276,7 @@ export async function compileTranslations() {
"id", "id",
"ru", "ru",
"tr", "tr",
"hi",
"zh_CN", "zh_CN",
"zh_Hant", "zh_Hant",
"hr", "hr",

View File

@ -270,8 +270,12 @@
(ptk/reify ::process-wasm-object (ptk/reify ::process-wasm-object
ptk/EffectEvent ptk/EffectEvent
(effect [_ state _] (effect [_ state _]
(let [objects (dsh/lookup-page-objects state)] (let [objects (dsh/lookup-page-objects state)
(wasm.api/process-object (get objects id)))))) shape (get objects id)]
;; Only process objects that exist in the current page
;; This prevents errors when processing changes from other pages
(when shape
(wasm.api/process-object shape))))))
(defn initialize-workspace (defn initialize-workspace
[team-id file-id] [team-id file-id]

View File

@ -271,8 +271,10 @@
:font-variant-id new-variant-id :font-variant-id new-variant-id
:font-weight (:weight variant) :font-weight (:weight variant)
:font-style (:style variant)})) :font-style (:style variant)}))
;; NOTE: the select component we are using does not fire on-blur event
(dom/blur! (dom/get-target new-variant-id))))) ;; so we need to call on-blur manually
(when (some? on-blur)
(on-blur)))))
on-font-select on-font-select
(mf/use-fn (mf/use-fn

View File

@ -19,5 +19,5 @@
} }
.threads { .threads {
position: fixed; position: absolute;
} }

View File

@ -54,6 +54,7 @@
[app.plugins.ruler-guides :as rg] [app.plugins.ruler-guides :as rg]
[app.plugins.text :as text] [app.plugins.text :as text]
[app.plugins.utils :as u] [app.plugins.utils :as u]
[app.util.http :as http]
[app.util.object :as obj] [app.util.object :as obj]
[beicon.v2.core :as rx] [beicon.v2.core :as rx]
[cuerdas.core :as str])) [cuerdas.core :as str]))
@ -1195,7 +1196,12 @@
(js/Promise. (js/Promise.
(fn [resolve reject] (fn [resolve reject]
(->> (rp/cmd! :export payload) (->> (rp/cmd! :export payload)
(rx/mapcat #(rp/cmd! :export {:cmd :get-resource :wait true :id (:id %) :blob? true})) (rx/mapcat (fn [{:keys [uri]}]
(->> (http/send! {:method :get
:uri uri
:response-type :blob
:omit-default-headers true})
(rx/map :body))))
(rx/mapcat #(.arrayBuffer %)) (rx/mapcat #(.arrayBuffer %))
(rx/map #(js/Uint8Array. %)) (rx/map #(js/Uint8Array. %))
(rx/subs! resolve reject)))))))) (rx/subs! resolve reject))))))))

View File

@ -18,6 +18,7 @@
[app.common.types.path :as path] [app.common.types.path :as path]
[app.common.types.path.impl :as path.impl] [app.common.types.path.impl :as path.impl]
[app.common.types.shape.layout :as ctl] [app.common.types.shape.layout :as ctl]
[app.common.types.text :as txt]
[app.common.uuid :as uuid] [app.common.uuid :as uuid]
[app.config :as cf] [app.config :as cf]
[app.main.refs :as refs] [app.main.refs :as refs]
@ -964,8 +965,8 @@
(set-shape-children children) (set-shape-children children)
(set-shape-corners corners) (set-shape-corners corners)
(set-shape-blur blur) (set-shape-blur blur)
(when (and (= type :group) masked) (when (= type :group)
(set-masked masked)) (set-masked (boolean masked)))
(when (= type :bool) (when (= type :bool)
(set-shape-bool-type bool-type)) (set-shape-bool-type bool-type))
(when (and (some? content) (when (and (some? content)
@ -1411,20 +1412,23 @@
(get span)) (get span))
text (subs (:text element) start-pos end-pos)] text (subs (:text element) start-pos end-pos)]
{:x x (d/patch-object
:y (+ y height) txt/default-text-attrs
:width width (d/without-nils
:height height {:x x
:direction (dr/translate-direction direction) :y (+ y height)
:font-family (get element :font-family) :width width
:font-size (get element :font-size) :height height
:font-weight (get element :font-weight) :direction (dr/translate-direction direction)
:text-transform (get element :text-transform) :font-family (get element :font-family)
:text-decoration (get element :text-decoration) :font-size (get element :font-size)
:letter-spacing (get element :letter-spacing) :font-weight (get element :font-weight)
:font-style (get element :font-style) :text-transform (get element :text-transform)
:fills (get element :fills) :text-decoration (get element :text-decoration)
:text text}))))] :letter-spacing (get element :letter-spacing)
:font-style (get element :font-style)
:fills (get element :fills)
:text text}))))))]
(mem/free) (mem/free)
result))) result)))

View File

@ -233,8 +233,8 @@
(api/set-shape-shadows (:shadow shape))) (api/set-shape-shadows (:shadow shape)))
:masked-group :masked-group
(when (cfh/mask-shape? shape) (when (cfh/group-shape? shape)
(api/set-masked (:masked-group shape))) (api/set-masked (boolean (:masked-group shape))))
:content :content
(cond (cond

View File

@ -50,6 +50,7 @@
{:label "Føroyskt mál (community)" :value "fo"} {:label "Føroyskt mál (community)" :value "fo"}
{:label "Korean (community)" :value "ko"} {:label "Korean (community)" :value "ko"}
{:label "עִבְרִית (community)" :value "he"} {:label "עִבְרִית (community)" :value "he"}
{:label "आधुनिक मानक हिन्दी (community)" :value "hi"}
{:label "عربي/عربى (community)" :value "ar"} {:label "عربي/عربى (community)" :value "ar"}
{:label "فارسی (community)" :value "fa"} {:label "فارسی (community)" :value "fa"}
{:label "日本語 (Community)" :value "ja_jp"} {:label "日本語 (Community)" :value "ja_jp"}