mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
683db071d6
13
CHANGES.md
13
CHANGES.md
@ -31,6 +31,7 @@
|
|||||||
### :heart: Community contributions (Thank you!)
|
### :heart: Community contributions (Thank you!)
|
||||||
|
|
||||||
### :sparkles: New features & Enhancements
|
### :sparkles: New features & Enhancements
|
||||||
|
|
||||||
- New composite token: Typography [Taiga #10200](https://tree.taiga.io/project/penpot/us/10200)
|
- New composite token: Typography [Taiga #10200](https://tree.taiga.io/project/penpot/us/10200)
|
||||||
- Show current Penpot version [Taiga #11603](https://tree.taiga.io/project/penpot/us/11603)
|
- Show current Penpot version [Taiga #11603](https://tree.taiga.io/project/penpot/us/11603)
|
||||||
- Switch several variant copies at the same time [Taiga #11411](https://tree.taiga.io/project/penpot/us/11411)
|
- Switch several variant copies at the same time [Taiga #11411](https://tree.taiga.io/project/penpot/us/11411)
|
||||||
@ -47,6 +48,18 @@
|
|||||||
- Fix component context menu options order in assets tab [Taiga #11941](https://tree.taiga.io/project/penpot/issue/11941)
|
- Fix component context menu options order in assets tab [Taiga #11941](https://tree.taiga.io/project/penpot/issue/11941)
|
||||||
- Fix error updating library [Taiga #12218](https://tree.taiga.io/project/penpot/issue/12218)
|
- Fix error updating library [Taiga #12218](https://tree.taiga.io/project/penpot/issue/12218)
|
||||||
|
|
||||||
|
|
||||||
|
## 2.10.1 (Unreleased)
|
||||||
|
|
||||||
|
### :sparkles: New features & Enhancements
|
||||||
|
|
||||||
|
- Improve workpace file loading [Github 7366](https://github.com/penpot/penpot/pull/7366)
|
||||||
|
|
||||||
|
### :bug: Bugs fixed
|
||||||
|
|
||||||
|
- Fix regression with text shapes creation with Plugins API [Taiga #12244](https://tree.taiga.io/project/penpot/issue/12244)
|
||||||
|
|
||||||
|
|
||||||
## 2.10.0
|
## 2.10.0
|
||||||
|
|
||||||
### :rocket: Epics and highlights
|
### :rocket: Epics and highlights
|
||||||
|
|||||||
@ -44,7 +44,8 @@
|
|||||||
(def default-headers
|
(def default-headers
|
||||||
{"Content-Type" "text/event-stream;charset=UTF-8"
|
{"Content-Type" "text/event-stream;charset=UTF-8"
|
||||||
"Cache-Control" "no-cache, no-store, max-age=0, must-revalidate"
|
"Cache-Control" "no-cache, no-store, max-age=0, must-revalidate"
|
||||||
"Pragma" "no-cache"})
|
"Pragma" "no-cache"
|
||||||
|
"X-Accel-Buffering" "no"})
|
||||||
|
|
||||||
(defn response
|
(defn response
|
||||||
[handler & {:keys [buf] :or {buf 32} :as opts}]
|
[handler & {:keys [buf] :or {buf 32} :as opts}]
|
||||||
|
|||||||
@ -8,11 +8,11 @@
|
|||||||
"Internal implementation of file builder. Mainly used as base impl
|
"Internal implementation of file builder. Mainly used as base impl
|
||||||
for penpot library"
|
for penpot library"
|
||||||
(:require
|
(:require
|
||||||
|
;; [app.common.features :as cfeat]
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.data.macros :as dm]
|
[app.common.data.macros :as dm]
|
||||||
[app.common.exceptions :as ex]
|
[app.common.exceptions :as ex]
|
||||||
[app.common.files.changes :as ch]
|
[app.common.files.changes :as ch]
|
||||||
;; [app.common.features :as cfeat]
|
|
||||||
[app.common.files.helpers :as cph]
|
[app.common.files.helpers :as cph]
|
||||||
[app.common.files.migrations :as fmig]
|
[app.common.files.migrations :as fmig]
|
||||||
[app.common.geom.shapes :as gsh]
|
[app.common.geom.shapes :as gsh]
|
||||||
@ -26,6 +26,7 @@
|
|||||||
[app.common.types.path :as types.path]
|
[app.common.types.path :as types.path]
|
||||||
[app.common.types.shape :as types.shape]
|
[app.common.types.shape :as types.shape]
|
||||||
[app.common.types.typography :as types.typography]
|
[app.common.types.typography :as types.typography]
|
||||||
|
[app.common.types.variant :as types.variant]
|
||||||
[app.common.uuid :as uuid]
|
[app.common.uuid :as uuid]
|
||||||
[cuerdas.core :as str]))
|
[cuerdas.core :as str]))
|
||||||
|
|
||||||
@ -126,10 +127,12 @@
|
|||||||
[:map
|
[:map
|
||||||
[:component-id ::sm/uuid]
|
[:component-id ::sm/uuid]
|
||||||
[:file-id {:optional true} ::sm/uuid]
|
[:file-id {:optional true} ::sm/uuid]
|
||||||
|
[:page-id {:optional true} ::sm/uuid]
|
||||||
|
[:frame-id {:optional true} ::sm/uuid]
|
||||||
[:name {:optional true} ::sm/text]
|
[:name {:optional true} ::sm/text]
|
||||||
[:path {:optional true} ::sm/text]
|
[:path {:optional true} ::sm/text]
|
||||||
[:frame-id {:optional true} ::sm/uuid]
|
[:variant-id {:optional true} ::sm/uuid]
|
||||||
[:page-id {:optional true} ::sm/uuid]])
|
[:variant-properties {:optional true} [:vector types.variant/schema:variant-property]]])
|
||||||
|
|
||||||
(def ^:private check-add-component
|
(def ^:private check-add-component
|
||||||
(sm/check-fn schema:add-component
|
(sm/check-fn schema:add-component
|
||||||
@ -200,7 +203,8 @@
|
|||||||
"layout/grid"
|
"layout/grid"
|
||||||
"components/v2"
|
"components/v2"
|
||||||
"plugins/runtime"
|
"plugins/runtime"
|
||||||
"design-tokens/v1"})
|
"design-tokens/v1"
|
||||||
|
"variants/v1"})
|
||||||
|
|
||||||
;; WORKAROUND: the same as features
|
;; WORKAROUND: the same as features
|
||||||
(def available-migrations
|
(def available-migrations
|
||||||
@ -443,7 +447,7 @@
|
|||||||
|
|
||||||
(defn add-component
|
(defn add-component
|
||||||
[state params]
|
[state params]
|
||||||
(let [{:keys [component-id file-id page-id frame-id name path]}
|
(let [{:keys [component-id file-id page-id frame-id name path variant-id variant-properties]}
|
||||||
(-> (check-add-component params)
|
(-> (check-add-component params)
|
||||||
(update :component-id default-uuid))
|
(update :component-id default-uuid))
|
||||||
|
|
||||||
@ -463,7 +467,9 @@
|
|||||||
:name (or name "anonmous")
|
:name (or name "anonmous")
|
||||||
:path path
|
:path path
|
||||||
:main-instance-id frame-id
|
:main-instance-id frame-id
|
||||||
:main-instance-page page-id})
|
:main-instance-page page-id
|
||||||
|
:variant-id variant-id
|
||||||
|
:variant-properties variant-properties})
|
||||||
|
|
||||||
change2
|
change2
|
||||||
{:type :mod-obj
|
{:type :mod-obj
|
||||||
|
|||||||
@ -320,14 +320,18 @@
|
|||||||
[:shapes {:optional true} [:vector {:gen/max 3} ::sm/any]]
|
[:shapes {:optional true} [:vector {:gen/max 3} ::sm/any]]
|
||||||
[:path {:optional true} :string]
|
[:path {:optional true} :string]
|
||||||
[:main-instance-id ::sm/uuid]
|
[:main-instance-id ::sm/uuid]
|
||||||
[:main-instance-page ::sm/uuid]]]
|
[:main-instance-page ::sm/uuid]
|
||||||
|
;; Only used by external processes (like Penpot SDK)
|
||||||
|
[:variant-id {:optional true} ::sm/uuid]
|
||||||
|
[:variant-properties {:optional true} [:vector ctv/schema:variant-property]]]]
|
||||||
|
|
||||||
[:mod-component
|
[:mod-component
|
||||||
[:map {:title "ModComponentChange"}
|
[:map {:title "ModComponentChange"}
|
||||||
[:type [:= :mod-component]]
|
[:type [:= :mod-component]]
|
||||||
[:id ::sm/uuid]
|
[:id ::sm/uuid]
|
||||||
[:shapes {:optional true} [:vector {:gen/max 3} ::sm/any]]
|
|
||||||
[:name {:optional true} :string]
|
[:name {:optional true} :string]
|
||||||
|
[:path {:optional true} :string]
|
||||||
|
[:shapes {:optional true} [:vector {:gen/max 3} ::sm/any]]
|
||||||
[:variant-id {:optional true} ::sm/uuid]
|
[:variant-id {:optional true} ::sm/uuid]
|
||||||
[:variant-properties {:optional true} [:vector ctv/schema:variant-property]]]]
|
[:variant-properties {:optional true} [:vector ctv/schema:variant-property]]]]
|
||||||
|
|
||||||
|
|||||||
@ -159,7 +159,8 @@
|
|||||||
:enable-component-thumbnails
|
:enable-component-thumbnails
|
||||||
:enable-render-wasm-dpr
|
:enable-render-wasm-dpr
|
||||||
:enable-token-units
|
:enable-token-units
|
||||||
:enable-token-typography-types])
|
:enable-token-typography-types
|
||||||
|
:enable-feature-fdata-objects-map])
|
||||||
|
|
||||||
(defn parse
|
(defn parse
|
||||||
[& flags]
|
[& flags]
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
(defn add-component
|
(defn add-component
|
||||||
[fdata {:keys [id name path main-instance-id main-instance-page annotation variant-id variant-properties]}]
|
[fdata {:keys [id name path main-instance-id main-instance-page annotation variant-id variant-properties]}]
|
||||||
(let [fdata (update fdata :components assoc id (touch {:id id :name name :path path}))]
|
(let [fdata (update fdata :components assoc id (touch {:id id :name name :path path}))]
|
||||||
(cond-> (update-in fdata [:components id] assoc :main-instance-id main-instance-id :main-instance-page main-instance-page)
|
(cond-> (update-in fdata [:components id] assoc :main-instance-id main-instance-id :main-instance-page main-instance-page)
|
||||||
annotation (update-in [:components id] assoc :annotation annotation)
|
annotation (update-in [:components id] assoc :annotation annotation)
|
||||||
variant-id (update-in [:components id] assoc :variant-id variant-id)
|
variant-id (update-in [:components id] assoc :variant-id variant-id)
|
||||||
@ -83,9 +83,11 @@
|
|||||||
|
|
||||||
(nil? variant-properties)
|
(nil? variant-properties)
|
||||||
(dissoc :variant-properties))
|
(dissoc :variant-properties))
|
||||||
|
|
||||||
|
;; The set of properties that doesn't mark a component as touched
|
||||||
diff (set/difference
|
diff (set/difference
|
||||||
(ctk/diff-components component new-comp)
|
(ctk/diff-components component new-comp)
|
||||||
#{:annotation :modified-at :variant-id :variant-properties})] ;; The set of properties that doesn't mark a component as touched
|
#{:annotation :modified-at :variant-id :variant-properties})]
|
||||||
|
|
||||||
(if (empty? diff)
|
(if (empty? diff)
|
||||||
new-comp
|
new-comp
|
||||||
|
|||||||
@ -118,7 +118,6 @@ http {
|
|||||||
|
|
||||||
location /api {
|
location /api {
|
||||||
proxy_pass http://127.0.0.1:6060/api;
|
proxy_pass http://127.0.0.1:6060/api;
|
||||||
proxy_buffering off;
|
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
"date-fns": "^4.1.0",
|
"date-fns": "^4.1.0",
|
||||||
"generic-pool": "^3.9.0",
|
"generic-pool": "^3.9.0",
|
||||||
"inflation": "^2.1.0",
|
"inflation": "^2.1.0",
|
||||||
"ioredis": "^5.7.0",
|
"ioredis": "^5.8.1",
|
||||||
"playwright": "^1.55.0",
|
"playwright": "^1.55.1",
|
||||||
"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",
|
||||||
|
|||||||
@ -577,8 +577,8 @@ __metadata:
|
|||||||
date-fns: "npm:^4.1.0"
|
date-fns: "npm:^4.1.0"
|
||||||
generic-pool: "npm:^3.9.0"
|
generic-pool: "npm:^3.9.0"
|
||||||
inflation: "npm:^2.1.0"
|
inflation: "npm:^2.1.0"
|
||||||
ioredis: "npm:^5.7.0"
|
ioredis: "npm:^5.8.1"
|
||||||
playwright: "npm:^1.55.0"
|
playwright: "npm:^1.55.1"
|
||||||
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"
|
||||||
@ -761,9 +761,9 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"ioredis@npm:^5.7.0":
|
"ioredis@npm:^5.8.1":
|
||||||
version: 5.8.0
|
version: 5.8.1
|
||||||
resolution: "ioredis@npm:5.8.0"
|
resolution: "ioredis@npm:5.8.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@ioredis/commands": "npm:1.4.0"
|
"@ioredis/commands": "npm:1.4.0"
|
||||||
cluster-key-slot: "npm:^1.1.0"
|
cluster-key-slot: "npm:^1.1.0"
|
||||||
@ -774,7 +774,7 @@ __metadata:
|
|||||||
redis-errors: "npm:^1.2.0"
|
redis-errors: "npm:^1.2.0"
|
||||||
redis-parser: "npm:^3.0.0"
|
redis-parser: "npm:^3.0.0"
|
||||||
standard-as-callback: "npm:^2.1.0"
|
standard-as-callback: "npm:^2.1.0"
|
||||||
checksum: 10c0/66fad6283c6d9052b4aa0987d592c1bf6c9471304eb0edf0c9d18024b1b38028adf29c05f1cf114b90f5bdb516576f897a654946e8c29568f404ac33cd3b9d19
|
checksum: 10c0/4ed66444017150da027bce940a24bf726994691e2a7b3aa11d52f8aeb37f258068cc171af4d9c61247acafc28eb086fa8a7c79420b8e8d2907d2f74f39584465
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@ -1114,7 +1114,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"playwright@npm:^1.55.0":
|
"playwright@npm:^1.55.1":
|
||||||
version: 1.55.1
|
version: 1.55.1
|
||||||
resolution: "playwright@npm:1.55.1"
|
resolution: "playwright@npm:1.55.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|||||||
@ -338,8 +338,9 @@
|
|||||||
:else
|
:else
|
||||||
(let [page (dsh/lookup-page @st/state)
|
(let [page (dsh/lookup-page @st/state)
|
||||||
shape (-> (cts/setup-shape {:type :text :x 0 :y 0 :grow-type :auto-width})
|
shape (-> (cts/setup-shape {:type :text :x 0 :y 0 :grow-type :auto-width})
|
||||||
(txt/change-text text)
|
(update :content txt/change-text text)
|
||||||
(assoc :position-data nil))
|
(assoc :position-data nil))
|
||||||
|
|
||||||
changes
|
changes
|
||||||
(-> (cb/empty-changes)
|
(-> (cb/empty-changes)
|
||||||
(cb/with-page page)
|
(cb/with-page page)
|
||||||
|
|||||||
@ -1,5 +1,11 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 1.0.10
|
||||||
|
|
||||||
|
- Enable variant/v1 feature by default
|
||||||
|
- Add variant attrs handling to addComponent method
|
||||||
|
|
||||||
|
|
||||||
## 1.0.9
|
## 1.0.9
|
||||||
|
|
||||||
- Fix dependencies declaration on package.json
|
- Fix dependencies declaration on package.json
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
:dev
|
:dev
|
||||||
{:extra-paths ["dev"]
|
{:extra-paths ["dev"]
|
||||||
:extra-deps
|
:extra-deps
|
||||||
{thheller/shadow-cljs {:mvn/version "3.1.7"}
|
{thheller/shadow-cljs {:mvn/version "3.2.1"}
|
||||||
com.bhauman/rebel-readline {:mvn/version "RELEASE"}
|
com.bhauman/rebel-readline {:mvn/version "RELEASE"}
|
||||||
org.clojure/tools.namespace {:mvn/version "RELEASE"}
|
org.clojure/tools.namespace {:mvn/version "RELEASE"}
|
||||||
criterium/criterium {:mvn/version "RELEASE"}}}
|
criterium/criterium {:mvn/version "RELEASE"}}}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@penpot/library",
|
"name": "@penpot/library",
|
||||||
"version": "1.0.9",
|
"version": "1.0.10",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"author": "Kaleidos INC",
|
"author": "Kaleidos INC",
|
||||||
"packageManager": "yarn@4.9.1+sha512.f95ce356460e05be48d66401c1ae64ef84d163dd689964962c6888a9810865e39097a5e9de748876c2e0bf89b232d583c33982773e9903ae7a76257270986538",
|
"packageManager": "yarn@4.9.1+sha512.f95ce356460e05be48d66401c1ae64ef84d163dd689964962c6888a9810865e39097a5e9de748876c2e0bf89b232d583c33982773e9903ae7a76257270986538",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user