mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 16:16:12 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
ab01f0b274
19 changed files with 121 additions and 21 deletions
|
@ -1,3 +1,9 @@
|
|||
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
|
||||
(ns app.main.data.style-dictionary
|
||||
(:require
|
||||
["@tokens-studio/sd-transforms" :as sd-transforms]
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
|
||||
(ns app.main.data.tinycolor
|
||||
"Bindings for tinycolor2 which supports a wide range of css compatible colors.
|
||||
|
||||
|
|
|
@ -582,11 +582,14 @@
|
|||
changes (-> (pcb/empty-changes it)
|
||||
(cll/generate-restore-component ldata component-id library-id page objects))
|
||||
|
||||
page-id
|
||||
(->> changes :redo-changes (keep :page-id) first)
|
||||
|
||||
frames
|
||||
(->> changes :redo-changes (keep :frame-id))]
|
||||
|
||||
(rx/of (dch/commit-changes changes)
|
||||
(ptk/data-event :layout/update {:ids frames}))))))
|
||||
(ptk/data-event :layout/update {:page-id page-id :ids frames}))))))
|
||||
|
||||
|
||||
(defn restore-components
|
||||
|
|
|
@ -98,18 +98,20 @@
|
|||
;; Never call this directly but through the data-event `:layout/update`
|
||||
;; Otherwise a lot of cycle dependencies could be generated
|
||||
(defn- update-layout-positions
|
||||
[{:keys [ids undo-group]}]
|
||||
[{:keys [page-id ids undo-group]}]
|
||||
(ptk/reify ::update-layout-positions
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [objects (dsh/lookup-page-objects state)
|
||||
(let [page-id (or page-id (:current-page-id state))
|
||||
objects (dsh/lookup-page-objects state page-id)
|
||||
ids (->> ids (filter #(contains? objects %)))]
|
||||
(if (d/not-empty? ids)
|
||||
(let [modif-tree (dwm/create-modif-tree ids (ctm/reflow-modifiers))]
|
||||
(if (features/active-feature? state "render-wasm/v1")
|
||||
(rx/of (dwm/apply-wasm-modifiers modif-tree :stack-undo? true :undo-group undo-group))
|
||||
|
||||
(rx/of (dwm/apply-modifiers {:modifiers modif-tree
|
||||
(rx/of (dwm/apply-modifiers {:page-id page-id
|
||||
:modifiers modif-tree
|
||||
:stack-undo? true
|
||||
:undo-group undo-group}))))
|
||||
(rx/empty))))))
|
||||
|
@ -131,8 +133,9 @@
|
|||
(rx/filter #(d/not-empty? %))
|
||||
(rx/map
|
||||
(fn [data]
|
||||
(let [ids (reduce #(into %1 (:ids %2)) #{} data)]
|
||||
(update-layout-positions {:ids ids}))))
|
||||
(let [page-id (->> data (keep :page-id) first)
|
||||
ids (reduce #(into %1 (:ids %2)) #{} data)]
|
||||
(update-layout-positions {:page-id page-id :ids ids}))))
|
||||
(rx/take-until stopper))))))
|
||||
|
||||
(defn finalize-shape-layout
|
||||
|
|
|
@ -464,11 +464,11 @@
|
|||
:subsections [:panels]
|
||||
:fn #(st/emit! (dcm/go-to-workspace :layout :assets))}
|
||||
|
||||
:toggle-history {:tooltip (ds/alt "H")
|
||||
:command (ds/a-mod "h")
|
||||
:toggle-history {:tooltip (ds/meta-alt "H")
|
||||
:command (ds/ca-mod "h")
|
||||
:subsections [:panels]
|
||||
:fn #(emit-when-no-readonly
|
||||
(dcm/go-to-workspace :layout :document-history))}
|
||||
(dw/toggle-layout-flag :document-history))}
|
||||
|
||||
:toggle-colorpalette {:tooltip (ds/alt "P")
|
||||
:command (ds/a-mod "p")
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
|
||||
(ns app.main.data.workspace.tokens.errors
|
||||
(:require
|
||||
[app.util.i18n :refer [tr]]
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
|
||||
(ns app.main.data.workspace.tokens.warnings
|
||||
(:require
|
||||
[app.util.i18n :refer [tr]]
|
||||
|
|
|
@ -198,7 +198,7 @@
|
|||
}
|
||||
|
||||
.import-error-disclaimer {
|
||||
color: var(--color-foreground-primary);
|
||||
color: var(--color-foreground-secondary);
|
||||
}
|
||||
|
||||
.import-error-list {
|
||||
|
|
|
@ -127,6 +127,7 @@
|
|||
width: $s-28;
|
||||
margin-left: $s-8;
|
||||
background-color: var(--viewer-controls-background-color);
|
||||
pointer-events: all;
|
||||
svg {
|
||||
@extend .button-icon;
|
||||
stroke: var(--icon-foreground);
|
||||
|
|
|
@ -618,7 +618,7 @@
|
|||
[:> dropdown-menu-item* {:class (stl/css :submenu-item)
|
||||
:on-click on-pin-version
|
||||
:on-key-down on-pin-version-key-down
|
||||
:id "file-menu-show-version-history"}
|
||||
:id "file-menu-create-version"}
|
||||
[:span {:class (stl/css :item-name)}
|
||||
(tr "dashboard.create-version-menu")]]
|
||||
|
||||
|
@ -627,7 +627,10 @@
|
|||
:on-key-down on-show-version-history-key-down
|
||||
:id "file-menu-show-version-history"}
|
||||
[:span {:class (stl/css :item-name)}
|
||||
(tr "dashboard.show-version-history")]]
|
||||
(tr "dashboard.show-version-history")]
|
||||
[:span {:class (stl/css :shortcut)}
|
||||
(for [sc (scd/split-sc (sc/get-tooltip :toggle-history))]
|
||||
[:span {:class (stl/css :shortcut-key) :key sc} sc])]]
|
||||
|
||||
[:div {:class (stl/css :separator)}]])
|
||||
|
||||
|
@ -786,6 +789,7 @@
|
|||
on-power-up-click
|
||||
(mf/use-fn
|
||||
(fn []
|
||||
(st/emit! (ptk/event ::ev/event {::ev/name "explore-pricing-click" ::ev/origin "workspace-menu"}))
|
||||
(dom/open-new-window "https://penpot.app/pricing")))
|
||||
|
||||
toggle-flag
|
||||
|
@ -900,14 +904,16 @@
|
|||
:id "file-menu-help-info"}
|
||||
[:span {:class (stl/css :item-name)} (tr "workspace.header.menu.option.help-info")]
|
||||
[:span {:class (stl/css :open-arrow)} i/arrow]]
|
||||
[:> dropdown-menu-item* {:class (stl/css-case :menu-item true)
|
||||
:on-click on-power-up-click
|
||||
:on-key-down (fn [event]
|
||||
(when (kbd/enter? event)
|
||||
(on-power-up-click)))
|
||||
:on-pointer-enter close-sub-menu
|
||||
:id "file-menu-power-up"}
|
||||
[:span {:class (stl/css :item-name)} (tr "workspace.header.menu.option.power-up")]]]
|
||||
;; TODO remove this block when subscriptions is full implemented
|
||||
(when (contains? cf/flags :subscriptions-old)
|
||||
[:> dropdown-menu-item* {:class (stl/css-case :menu-item true)
|
||||
:on-click on-power-up-click
|
||||
:on-key-down (fn [event]
|
||||
(when (kbd/enter? event)
|
||||
(on-power-up-click)))
|
||||
:on-pointer-enter close-sub-menu
|
||||
:id "file-menu-power-up"}
|
||||
[:span {:class (stl/css :item-name)} (tr "workspace.header.menu.option.power-up")]])]
|
||||
|
||||
(case sub-menu
|
||||
:file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue