mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
Merge remote-tracking branch 'origin/staging' into develop
Some checks failed
_DEVELOP / build-bundle (push) Has been cancelled
_DEVELOP / build-docker (push) Has been cancelled
_STAGING / build-bundle (push) Has been cancelled
_STAGING / build-docker (push) Has been cancelled
_NITRATE MODULE / build-bundle (push) Has been cancelled
_NITRATE MODULE / build-docker (push) Has been cancelled
Commit Message Check / Check Commit Message (push) Has been cancelled
CI / Linter (push) Has been cancelled
CI / Common Tests (push) Has been cancelled
CI / Frontend Tests (push) Has been cancelled
CI / Render WASM Tests (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Library Tests (push) Has been cancelled
CI / Build Integration Bundle (push) Has been cancelled
CI / Integration Tests 1/4 (push) Has been cancelled
CI / Integration Tests 2/4 (push) Has been cancelled
CI / Integration Tests 3/4 (push) Has been cancelled
CI / Integration Tests 4/4 (push) Has been cancelled
Some checks failed
_DEVELOP / build-bundle (push) Has been cancelled
_DEVELOP / build-docker (push) Has been cancelled
_STAGING / build-bundle (push) Has been cancelled
_STAGING / build-docker (push) Has been cancelled
_NITRATE MODULE / build-bundle (push) Has been cancelled
_NITRATE MODULE / build-docker (push) Has been cancelled
Commit Message Check / Check Commit Message (push) Has been cancelled
CI / Linter (push) Has been cancelled
CI / Common Tests (push) Has been cancelled
CI / Frontend Tests (push) Has been cancelled
CI / Render WASM Tests (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Library Tests (push) Has been cancelled
CI / Build Integration Bundle (push) Has been cancelled
CI / Integration Tests 1/4 (push) Has been cancelled
CI / Integration Tests 2/4 (push) Has been cancelled
CI / Integration Tests 3/4 (push) Has been cancelled
CI / Integration Tests 4/4 (push) Has been cancelled
This commit is contained in:
@@ -114,6 +114,7 @@ example. It's still usable as before, we just removed the example.
|
|||||||
- Fix unpublish library modal not scrolling a long file list [Taiga #12285](https://tree.taiga.io/project/penpot/issue/12285)
|
- Fix unpublish library modal not scrolling a long file list [Taiga #12285](https://tree.taiga.io/project/penpot/issue/12285)
|
||||||
- Fix incorrect interaction betwen hower and scroll on assets sidebar [Taiga #12389](https://tree.taiga.io/project/penpot/issue/12389)
|
- Fix incorrect interaction betwen hower and scroll on assets sidebar [Taiga #12389](https://tree.taiga.io/project/penpot/issue/12389)
|
||||||
- Fix switch variants with paths [Taiga #12841](https://tree.taiga.io/project/penpot/issue/12841)
|
- Fix switch variants with paths [Taiga #12841](https://tree.taiga.io/project/penpot/issue/12841)
|
||||||
|
- Fix referencing typography tokens on font-family tokens [Taiga #12492](https://tree.taiga.io/project/penpot/issue/12492)
|
||||||
|
|
||||||
## 2.11.1
|
## 2.11.1
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
:file-uri "https://github.com/penpot/penpot-files/raw/refs/heads/main/Tokens%20starter%20kit.penpot"}
|
:file-uri "https://github.com/penpot/penpot-files/raw/refs/heads/main/Tokens%20starter%20kit.penpot"}
|
||||||
{:id "penpot-design-system"
|
{:id "penpot-design-system"
|
||||||
:name "Penpot Design System | Pencil"
|
:name "Penpot Design System | Pencil"
|
||||||
:file-uri "https://github.com/penpot/penpot-files/raw/refs/heads/main/penpot-app.penpot"}
|
:file-uri "https://github.com/penpot/penpot-files/raw/refs/heads/main/Pencil-Penpot-Design-System.penpot"}
|
||||||
{:id "wireframing-kit"
|
{:id "wireframing-kit"
|
||||||
:name "Wireframe library"
|
:name "Wireframe library"
|
||||||
:file-uri "https://github.com/penpot/penpot-files/raw/refs/heads/main/Wireframing%20kit%20v1.1.penpot"}
|
:file-uri "https://github.com/penpot/penpot-files/raw/refs/heads/main/Wireframing%20kit%20v1.1.penpot"}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
"raw-body": "^3.0.1",
|
"raw-body": "^3.0.1",
|
||||||
"source-map-support": "^0.5.21",
|
"source-map-support": "^0.5.21",
|
||||||
"svgo": "penpot/svgo#v3.1",
|
"svgo": "penpot/svgo#v3.1",
|
||||||
|
"undici": "^7.16.0",
|
||||||
"xml-js": "^1.6.11",
|
"xml-js": "^1.6.11",
|
||||||
"xregexp": "^5.1.2"
|
"xregexp": "^5.1.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -7,5 +7,4 @@ bb -i '(babashka.wait/wait-for-port "localhost" 9630)';
|
|||||||
bb -i '(babashka.wait/wait-for-path "target/app.js")';
|
bb -i '(babashka.wait/wait-for-path "target/app.js")';
|
||||||
sleep 2;
|
sleep 2;
|
||||||
|
|
||||||
export NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
||||||
exec node target/app.js
|
exec node target/app.js
|
||||||
|
|||||||
@@ -107,12 +107,12 @@
|
|||||||
:on-progress on-progress)
|
:on-progress on-progress)
|
||||||
|
|
||||||
append (fn [{:keys [filename path] :as resource}]
|
append (fn [{:keys [filename path] :as resource}]
|
||||||
(rsc/add-to-zip! zip path (str/replace filename sanitize-file-regex "_")))
|
(rsc/add-to-zip zip path (str/replace filename sanitize-file-regex "_")))
|
||||||
|
|
||||||
proc (->> exports
|
proc (->> exports
|
||||||
(map (fn [export] (rd/render export append)))
|
(map (fn [export] (rd/render export append)))
|
||||||
(p/all)
|
(p/all)
|
||||||
(p/fnly (fn [_] (.finalize zip)))
|
(p/mcat (fn [_] (rsc/close-zip zip)))
|
||||||
(p/fmap (constantly resource))
|
(p/fmap (constantly resource))
|
||||||
(p/mcat (partial rsc/upload-resource auth-token))
|
(p/mcat (partial rsc/upload-resource auth-token))
|
||||||
(p/fmap (fn [resource]
|
(p/fmap (fn [resource]
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
["node:fs" :as fs]
|
["node:fs" :as fs]
|
||||||
["node:fs/promises" :as fsp]
|
["node:fs/promises" :as fsp]
|
||||||
["node:path" :as path]
|
["node:path" :as path]
|
||||||
|
["undici" :as http]
|
||||||
[app.common.exceptions :as ex]
|
[app.common.exceptions :as ex]
|
||||||
[app.common.transit :as t]
|
[app.common.transit :as t]
|
||||||
[app.common.uri :as u]
|
[app.common.uri :as u]
|
||||||
@@ -53,30 +54,40 @@
|
|||||||
(.pipe zip out)
|
(.pipe zip out)
|
||||||
zip))
|
zip))
|
||||||
|
|
||||||
(defn add-to-zip!
|
(defn add-to-zip
|
||||||
[zip path name]
|
[zip path name]
|
||||||
(.file ^js zip path #js {:name name}))
|
(.file ^js zip path #js {:name name}))
|
||||||
|
|
||||||
(defn close-zip!
|
(defn close-zip
|
||||||
[zip]
|
[zip]
|
||||||
(.finalize ^js zip))
|
(p/create (fn [resolve]
|
||||||
|
(.on ^js zip "close" resolve)
|
||||||
|
(.finalize ^js zip))))
|
||||||
|
|
||||||
(defn upload-resource
|
(defn upload-resource
|
||||||
[auth-token resource]
|
[auth-token resource]
|
||||||
(->> (fsp/readFile (:path resource))
|
(->> (fsp/readFile (:path resource))
|
||||||
(p/fmap (fn [buffer]
|
(p/fmap (fn [buffer]
|
||||||
|
(js/console.log buffer)
|
||||||
(new js/Blob #js [buffer] #js {:type (:mtype resource)})))
|
(new js/Blob #js [buffer] #js {:type (:mtype resource)})))
|
||||||
(p/mcat (fn [blob]
|
(p/mcat (fn [blob]
|
||||||
(let [fdata (new js/FormData)
|
(let [fdata (new http/FormData)
|
||||||
uri (-> (cf/get :public-uri)
|
agent (new http/Agent #js {:connect #js {:rejectUnauthorized false}})
|
||||||
(u/ensure-path-slash)
|
headers #js {"X-Shared-Key" cf/management-key
|
||||||
(u/join "api/management/methods/upload-tempfile")
|
"Authorization" (str "Bearer " auth-token)}
|
||||||
(str))]
|
|
||||||
|
request #js {:headers headers
|
||||||
|
:method "POST"
|
||||||
|
:body fdata
|
||||||
|
:dispatcher agent}
|
||||||
|
uri (-> (cf/get :public-uri)
|
||||||
|
(u/ensure-path-slash)
|
||||||
|
(u/join "api/management/methods/upload-tempfile")
|
||||||
|
(str))]
|
||||||
|
|
||||||
(.append fdata "content" blob (:filename resource))
|
(.append fdata "content" blob (:filename resource))
|
||||||
(js/fetch uri #js {:headers #js {"X-Shared-Key" cf/management-key
|
(http/fetch uri request))))
|
||||||
"Authorization" (str "Bearer " auth-token)}
|
|
||||||
:method "POST"
|
|
||||||
:body fdata}))))
|
|
||||||
(p/mcat (fn [response]
|
(p/mcat (fn [response]
|
||||||
(if (not= (.-status response) 200)
|
(if (not= (.-status response) 200)
|
||||||
(ex/raise :type :internal
|
(ex/raise :type :internal
|
||||||
|
|||||||
@@ -75,7 +75,8 @@
|
|||||||
[path]
|
[path]
|
||||||
(->> (.stat fs/promises path)
|
(->> (.stat fs/promises path)
|
||||||
(p/fmap (fn [data]
|
(p/fmap (fn [data]
|
||||||
{:created-at (inst-ms (.-ctime ^js data))
|
{:path path
|
||||||
|
:created-at (inst-ms (.-ctime ^js data))
|
||||||
:size (.-size data)}))
|
:size (.-size data)}))
|
||||||
(p/merr (fn [_cause]
|
(p/merr (fn [_cause]
|
||||||
(p/resolved nil)))))
|
(p/resolved nil)))))
|
||||||
|
|||||||
@@ -582,6 +582,7 @@ __metadata:
|
|||||||
raw-body: "npm:^3.0.1"
|
raw-body: "npm:^3.0.1"
|
||||||
source-map-support: "npm:^0.5.21"
|
source-map-support: "npm:^0.5.21"
|
||||||
svgo: "penpot/svgo#v3.1"
|
svgo: "penpot/svgo#v3.1"
|
||||||
|
undici: "npm:^7.16.0"
|
||||||
ws: "npm:^8.18.3"
|
ws: "npm:^8.18.3"
|
||||||
xml-js: "npm:^1.6.11"
|
xml-js: "npm:^1.6.11"
|
||||||
xregexp: "npm:^5.1.2"
|
xregexp: "npm:^5.1.2"
|
||||||
@@ -1513,6 +1514,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"undici@npm:^7.16.0":
|
||||||
|
version: 7.16.0
|
||||||
|
resolution: "undici@npm:7.16.0"
|
||||||
|
checksum: 10c0/efd867792e9f233facf9efa0a087e2d9c3e4415c0b234061b9b40307ca4fa01d945fee4d43c7b564e1b80e0d519bcc682f9f6e0de13c717146c00a80e2f1fb0f
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"unique-filename@npm:^4.0.0":
|
"unique-filename@npm:^4.0.0":
|
||||||
version: 4.0.0
|
version: 4.0.0
|
||||||
resolution: "unique-filename@npm:4.0.0"
|
resolution: "unique-filename@npm:4.0.0"
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
(mf/defc color-token-row*
|
(mf/defc color-token-row*
|
||||||
{::mf/private true}
|
{::mf/private true}
|
||||||
[{:keys [active-tokens color-token color on-swatch-click-token detach-token open-modal-from-token]}]
|
[{:keys [active-tokens applied-token-name color on-swatch-click-token detach-token open-modal-from-token]}]
|
||||||
(let [;; `active-tokens` may be provided as a `delay` (lazy computation).
|
(let [;; `active-tokens` may be provided as a `delay` (lazy computation).
|
||||||
;; In that case we must deref it (`@active-tokens`) to force evaluation
|
;; In that case we must deref it (`@active-tokens`) to force evaluation
|
||||||
;; and obtain the actual value. If it’s already realized (not a delay),
|
;; and obtain the actual value. If it’s already realized (not a delay),
|
||||||
@@ -77,21 +77,22 @@
|
|||||||
@active-tokens
|
@active-tokens
|
||||||
active-tokens)
|
active-tokens)
|
||||||
|
|
||||||
color-tokens (:color active-tokens)
|
active-color-tokens (:color active-tokens)
|
||||||
|
|
||||||
token (some #(when (= (:name %) color-token) %) color-tokens)
|
token (some #(when (= (:name %) applied-token-name) %) active-color-tokens)
|
||||||
|
|
||||||
on-detach-token
|
on-detach-token
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps detach-token token color-token)
|
(mf/deps detach-token token applied-token-name)
|
||||||
(fn []
|
(fn []
|
||||||
(let [token (or token color-token)]
|
(let [token (or token applied-token-name)]
|
||||||
(detach-token token))))
|
(detach-token token))))
|
||||||
|
|
||||||
has-errors (some? (:errors token))
|
has-errors (some? (:errors token))
|
||||||
token-name (:name token)
|
token-name (:name token)
|
||||||
resolved (:resolved-value token)
|
resolved (:resolved-value token)
|
||||||
not-active (and (some? active-tokens) (nil? token))
|
not-active (and (empty? active-tokens)
|
||||||
|
(nil? token))
|
||||||
id (dm/str (:id token) "-name")
|
id (dm/str (:id token) "-name")
|
||||||
swatch-tooltip-content (cond
|
swatch-tooltip-content (cond
|
||||||
not-active
|
not-active
|
||||||
@@ -109,7 +110,7 @@
|
|||||||
#(mf/html
|
#(mf/html
|
||||||
[:div
|
[:div
|
||||||
[:span (dm/str (tr "workspace.tokens.token-name") ": ")]
|
[:span (dm/str (tr "workspace.tokens.token-name") ": ")]
|
||||||
[:span {:class (stl/css :token-name-tooltip)} color-token]]))]
|
[:span {:class (stl/css :token-name-tooltip)} applied-token-name]]))]
|
||||||
|
|
||||||
[:div {:class (stl/css :color-info)}
|
[:div {:class (stl/css :color-info)}
|
||||||
[:div {:class (stl/css-case :token-color-wrapper true
|
[:div {:class (stl/css-case :token-color-wrapper true
|
||||||
@@ -128,7 +129,7 @@
|
|||||||
:class (stl/css :token-tooltip)}
|
:class (stl/css :token-tooltip)}
|
||||||
[:div {:class (stl/css :token-name)
|
[:div {:class (stl/css :token-name)
|
||||||
:aria-labelledby id}
|
:aria-labelledby id}
|
||||||
(or token-name color-token)]]
|
(or token-name applied-token-name)]]
|
||||||
[:div {:class (stl/css :token-actions)}
|
[:div {:class (stl/css :token-actions)}
|
||||||
[:> icon-button*
|
[:> icon-button*
|
||||||
{:variant "action"
|
{:variant "action"
|
||||||
@@ -146,7 +147,11 @@
|
|||||||
on-change on-reorder on-detach on-open on-close on-remove origin on-detach-token
|
on-change on-reorder on-detach on-open on-close on-remove origin on-detach-token
|
||||||
disable-drag on-focus on-blur select-only select-on-focus on-token-change applied-token]}]
|
disable-drag on-focus on-blur select-only select-on-focus on-token-change applied-token]}]
|
||||||
|
|
||||||
(let [token-color (contains? cfg/flags :token-color)
|
(let [;; TODO: Remove this workaround fixing `get-attrs*` fn on sidebar/options/shapes/multiple.cljs
|
||||||
|
applied-token (if (= :multiple applied-token)
|
||||||
|
nil
|
||||||
|
applied-token)
|
||||||
|
token-color (contains? cfg/flags :token-color)
|
||||||
libraries (mf/deref refs/files)
|
libraries (mf/deref refs/files)
|
||||||
|
|
||||||
color-without-hash (mf/use-memo
|
color-without-hash (mf/use-memo
|
||||||
@@ -177,7 +182,6 @@
|
|||||||
(-> (deref active-tokens*)
|
(-> (deref active-tokens*)
|
||||||
(select-keys (get tk/tokens-by-input origin))
|
(select-keys (get tk/tokens-by-input origin))
|
||||||
(not-empty)))))
|
(not-empty)))))
|
||||||
|
|
||||||
on-focus'
|
on-focus'
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps on-focus)
|
(mf/deps on-focus)
|
||||||
@@ -352,7 +356,7 @@
|
|||||||
(cond
|
(cond
|
||||||
(and token-color applied-token)
|
(and token-color applied-token)
|
||||||
[:> color-token-row* {:active-tokens tokens
|
[:> color-token-row* {:active-tokens tokens
|
||||||
:color-token applied-token
|
:applied-token-name applied-token
|
||||||
:color (dissoc color :ref-id :ref-file)
|
:color (dissoc color :ref-id :ref-file)
|
||||||
:on-swatch-click-token on-swatch-click-token
|
:on-swatch-click-token on-swatch-click-token
|
||||||
:detach-token detach-token
|
:detach-token detach-token
|
||||||
|
|||||||
@@ -63,7 +63,8 @@
|
|||||||
:data {:index index})
|
:data {:index index})
|
||||||
[nil nil])
|
[nil nil])
|
||||||
|
|
||||||
stroke-color-token (:stroke-color applied-tokens)
|
stroke-color-token
|
||||||
|
(:stroke-color applied-tokens)
|
||||||
|
|
||||||
on-color-change-refactor
|
on-color-change-refactor
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
|||||||
Reference in New Issue
Block a user