Compare commits
13 Commits
fix-thumbn
...
hiru-add-v
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
094ad897ab | ||
|
|
b2c45f6e1d | ||
|
|
7a377258d3 | ||
|
|
dd4a18a3ff | ||
|
|
bff005a951 | ||
|
|
776c62051d | ||
|
|
952f622ce9 | ||
|
|
a6c6f97f47 | ||
|
|
88424eb54a | ||
|
|
de9a21121a | ||
|
|
cea10308b7 | ||
|
|
5223c9c881 | ||
|
|
be62fa10c4 |
2
.github/workflows/build-tag.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
||||
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK }}
|
||||
MATTERMOST_CHANNEL: bot-alerts-cicd
|
||||
TEXT: |
|
||||
🐳 *[PENPOT] Docker image available: {{ github.ref_name }}*
|
||||
🐳 *[PENPOT] Docker image available: ${{ github.ref_name }}*
|
||||
🔗 Run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
@infra
|
||||
|
||||
|
||||
2
.github/workflows/commit-checker.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
- name: Check Commit Type
|
||||
uses: gsactions/commit-message-checker@v2
|
||||
with:
|
||||
pattern: '^(((:(lipstick|globe_with_meridians|wrench|books|arrow_up|arrow_down|zap|ambulance|construction|boom|fire|whale|bug|sparkles|paperclip|tada|recycle|rewind|construction_worker):)\s[A-Z].*[^.])|(Merge|Revert).+[^.])$'
|
||||
pattern: '^(((:(lipstick|globe_with_meridians|wrench|books|arrow_up|arrow_down|zap|ambulance|construction|boom|fire|whale|bug|sparkles|paperclip|tada|recycle|rewind|construction_worker):)\s[A-Z].*[^.])|(Merge|Revert|Reapply).+[^.])$'
|
||||
flags: 'gm'
|
||||
error: 'Commit should match CONTRIBUTING.md guideline'
|
||||
checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request
|
||||
|
||||
21
CHANGES.md
@@ -1,5 +1,18 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 2.14.0 (Unreleased)
|
||||
|
||||
### :boom: Breaking changes & Deprecations
|
||||
|
||||
### :rocket: Epics and highlights
|
||||
|
||||
### :heart: Community contributions (Thank you!)
|
||||
|
||||
### :sparkles: New features & Enhancements
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
|
||||
## 2.13.0 (Unreleased)
|
||||
|
||||
### :boom: Breaking changes & Deprecations
|
||||
@@ -23,13 +36,7 @@
|
||||
- Fix wrong board size presets in Android [Taiga #12339](https://tree.taiga.io/project/penpot/issue/12339)
|
||||
- Fix problem with grid layout components and auto sizing [Github #7797](https://github.com/penpot/penpot/issues/7797)
|
||||
- Fix some alignments on inspect tab [Taiga #12915](https://tree.taiga.io/project/penpot/issue/12915)
|
||||
- Fix color assets from shared libraries not appearing as assets in Selected colors panel [Taiga #12957](https://tree.taiga.io/project/penpot/issue/12957)
|
||||
- Fix CSS generated box-shadow property [Taiga #12997](https://tree.taiga.io/project/penpot/issue/12997)
|
||||
- Fix inner shadow selector on shadow token [Taiga #12951](https://tree.taiga.io/project/penpot/issue/12951)
|
||||
- Fix missing text color token from selected shapes in selected colors list [Taiga #12956](https://tree.taiga.io/project/penpot/issue/12956)
|
||||
- Fix dropdown option width in Guides columns dropdown [Taiga #12959](https://tree.taiga.io/project/penpot/issue/12959)
|
||||
- Fix typos on download modal [Taiga #12865](https://tree.taiga.io/project/penpot/issue/12865)
|
||||
- Fix problem with text editor maintaining previous styles [Taiga #12835](https://tree.taiga.io/project/penpot/issue/12835)
|
||||
|
||||
|
||||
## 2.12.1
|
||||
|
||||
|
||||
@@ -97,8 +97,8 @@
|
||||
|
||||
:jmx-remote
|
||||
{:jvm-opts ["-Dcom.sun.management.jmxremote"
|
||||
"-Dcom.sun.management.jmxremote.port=9000"
|
||||
"-Dcom.sun.management.jmxremote.rmi.port=9000"
|
||||
"-Dcom.sun.management.jmxremote.port=9090"
|
||||
"-Dcom.sun.management.jmxremote.rmi.port=9090"
|
||||
"-Dcom.sun.management.jmxremote.local.only=false"
|
||||
"-Dcom.sun.management.jmxremote.authenticate=false"
|
||||
"-Dcom.sun.management.jmxremote.ssl=false"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
inner join team_profile_rel as tpr on (tpr.team_id = p.team_id)
|
||||
where tpr.profile_id = ?
|
||||
and p.team_id = ?
|
||||
and (p.deleted_at is null)
|
||||
and (p.deleted_at is null or p.deleted_at > now())
|
||||
and (tpr.is_admin = true or
|
||||
tpr.is_owner = true or
|
||||
tpr.can_edit = true)
|
||||
@@ -29,7 +29,7 @@
|
||||
inner join project_profile_rel as ppr on (ppr.project_id = p.id)
|
||||
where ppr.profile_id = ?
|
||||
and p.team_id = ?
|
||||
and (p.deleted_at is null)
|
||||
and (p.deleted_at is null or p.deleted_at > now())
|
||||
and (ppr.is_admin = true or
|
||||
ppr.is_owner = true or
|
||||
ppr.can_edit = true)
|
||||
@@ -47,7 +47,7 @@
|
||||
left join file_thumbnail as ft on (ft.file_id = f.id and ft.revn = f.revn)
|
||||
inner join projects as pr on (f.project_id = pr.id)
|
||||
where f.name ilike ('%' || ? || '%')
|
||||
and (f.deleted_at is null)
|
||||
and (f.deleted_at is null or f.deleted_at > now())
|
||||
order by f.created_at asc")
|
||||
|
||||
(defn search-files
|
||||
|
||||
@@ -526,25 +526,20 @@
|
||||
ids))
|
||||
|
||||
(defn clean-loops
|
||||
"Clean a list of ids from circular references. Optimized fast-path for single selections."
|
||||
"Clean a list of ids from circular references."
|
||||
[objects ids]
|
||||
(if (<= (count ids) 1)
|
||||
;; For single selection, there can't be circularity; return as ordered-set.
|
||||
(into (d/ordered-set) ids)
|
||||
(let [ids-set (if (set? ids) ids (set ids))
|
||||
parent-selected?
|
||||
(fn [id]
|
||||
;; Stop early as soon as we find any selected parent
|
||||
(let [parents (get-parent-ids objects id)]
|
||||
(some #(contains? ids-set %) parents)))
|
||||
(let [parent-selected?
|
||||
(fn [id]
|
||||
(let [parents (get-parent-ids objects id)]
|
||||
(some ids parents)))
|
||||
|
||||
add-element
|
||||
(fn [result id]
|
||||
(cond-> result
|
||||
(not (parent-selected? id))
|
||||
(conj id)))]
|
||||
add-element
|
||||
(fn [result id]
|
||||
(cond-> result
|
||||
(not (parent-selected? id))
|
||||
(conj id)))]
|
||||
|
||||
(reduce add-element (d/ordered-set) ids))))
|
||||
(reduce add-element (d/ordered-set) ids)))
|
||||
|
||||
(defn- indexed-shapes
|
||||
"Retrieves a vector with the indexes for each element in the layer
|
||||
|
||||
@@ -1766,6 +1766,59 @@
|
||||
(update :pages-index d/update-vals update-container)
|
||||
(d/update-when :components d/update-vals update-container))))
|
||||
|
||||
(defmethod migrate-data "0017-remove-unneeded-objects-from-components"
|
||||
[data _]
|
||||
;; Some components have an `:objects` attribute, despite not being
|
||||
;; deleted. This migration removes it.
|
||||
(letfn [(check-component [component]
|
||||
(if (and (not (:deleted component))
|
||||
(contains? component :objects))
|
||||
(dissoc component :objects)
|
||||
component))]
|
||||
(d/update-when data :components d/update-vals check-component)))
|
||||
|
||||
(defmethod migrate-data "0018-sync-component-id-with-near-main"
|
||||
[data _]
|
||||
(let [libs (some-> (:libs data) deref)]
|
||||
(letfn [(fix-shape
|
||||
[data page shape]
|
||||
(if (and (ctk/subcopy-head? shape)
|
||||
(nil? (ctk/get-swap-slot shape)))
|
||||
(let [file {:id (:id data) :data data}
|
||||
ref-shape (ctf/find-ref-shape file page libs shape {:include-deleted? true :with-context? true})]
|
||||
(if (and (some? ref-shape)
|
||||
(or (not= (:component-id shape) (:component-id ref-shape))
|
||||
(not= (:component-file shape) (:component-file ref-shape))))
|
||||
(cond-> shape
|
||||
(some? (:component-id ref-shape))
|
||||
(assoc :component-id (:component-id ref-shape))
|
||||
|
||||
(nil? (:component-id ref-shape))
|
||||
(dissoc :component-id)
|
||||
|
||||
(some? (:component-file ref-shape))
|
||||
(assoc :component-file (:component-file ref-shape))
|
||||
|
||||
(nil? (:component-file ref-shape))
|
||||
(dissoc :component-file))
|
||||
shape))
|
||||
shape))
|
||||
|
||||
(update-page
|
||||
[data page]
|
||||
(d/update-when page :objects d/update-vals (partial fix-shape data page)))
|
||||
|
||||
(fix-data [data]
|
||||
(loop [current-data data
|
||||
iteration 0]
|
||||
(let [next-data (update current-data :pages-index d/update-vals (partial update-page current-data))]
|
||||
(if (or (= current-data next-data)
|
||||
(> iteration 20)) ;; safety bound
|
||||
next-data
|
||||
(recur next-data (inc iteration))))))]
|
||||
(fix-data data))))
|
||||
|
||||
|
||||
(def available-migrations
|
||||
(into (d/ordered-set)
|
||||
["legacy-2"
|
||||
@@ -1839,4 +1892,6 @@
|
||||
"0014-clear-components-nil-objects"
|
||||
"0015-fix-text-attrs-blank-strings"
|
||||
"0015-clean-shadow-color"
|
||||
"0016-copy-fills-from-position-data-to-text-node"]))
|
||||
"0016-copy-fills-from-position-data-to-text-node"
|
||||
"0017-remove-unneeded-objects-from-components"
|
||||
"0018-sync-component-id-with-near-main"]))
|
||||
|
||||
@@ -333,6 +333,31 @@
|
||||
(pcb/with-file-data file-data)
|
||||
(pcb/update-shapes [(:id shape)] repair-shape))))
|
||||
|
||||
(defmethod repair-error :component-id-mismatch
|
||||
[_ {:keys [shape page-id args] :as error} file-data _]
|
||||
(let [repair-shape
|
||||
(fn [shape]
|
||||
; Set the component-id and component-file to the ones of the near main
|
||||
(log/debug :hint (str " -> set component-id to " (:component-id args)))
|
||||
(log/debug :hint (str " -> set component-file to " (:component-file args)))
|
||||
(cond-> shape
|
||||
(some? (:component-id args))
|
||||
(assoc :component-id (:component-id args))
|
||||
|
||||
(nil? (:component-id args))
|
||||
(dissoc :component-id)
|
||||
|
||||
(some? (:component-file args))
|
||||
(assoc :component-file (:component-file args))
|
||||
|
||||
(nil? (:component-file args))
|
||||
(dissoc :component-file)))]
|
||||
|
||||
(log/dbg :hint "repairing shape :component-id-mismatch" :id (:id shape) :name (:name shape) :page-id page-id)
|
||||
(-> (pcb/empty-changes nil page-id)
|
||||
(pcb/with-file-data file-data)
|
||||
(pcb/update-shapes [(:id shape)] repair-shape))))
|
||||
|
||||
(defmethod repair-error :ref-shape-is-head
|
||||
[_ {:keys [shape page-id args] :as error} file-data _]
|
||||
(let [repair-shape
|
||||
@@ -499,7 +524,7 @@
|
||||
(pcb/update-shapes [(:id shape)] repair-shape))))
|
||||
|
||||
(defmethod repair-error :component-nil-objects-not-allowed
|
||||
[_ {:keys [shape] :as error} file-data _]
|
||||
[_ {component :shape} file-data _] ; in this error the :shape argument is the component
|
||||
(let [repair-component
|
||||
(fn [component]
|
||||
; Remove the objects key, or set it to {} if the component is deleted
|
||||
@@ -511,10 +536,26 @@
|
||||
(log/debug :hint " -> remove :objects")
|
||||
(dissoc component :objects))))]
|
||||
|
||||
(log/dbg :hint "repairing component :component-nil-objects-not-allowed" :id (:id shape) :name (:name shape))
|
||||
(log/dbg :hint "repairing component :component-nil-objects-not-allowed" :id (:id component) :name (:name component))
|
||||
(-> (pcb/empty-changes nil)
|
||||
(pcb/with-library-data file-data)
|
||||
(pcb/update-component (:id shape) repair-component))))
|
||||
(pcb/update-component (:id component) repair-component))))
|
||||
|
||||
(defmethod repair-error :non-deleted-component-cannot-have-objects
|
||||
[_ {component :shape} file-data _] ; in this error the :shape argument is the component
|
||||
(let [repair-component
|
||||
(fn [component]
|
||||
; Remove the :objects field
|
||||
(if-not (:deleted component)
|
||||
(do
|
||||
(log/debug :hint " -> remove :objects")
|
||||
(dissoc component :objects))
|
||||
component))]
|
||||
|
||||
(log/dbg :hint "repairing component :non-deleted-component-cannot-have-objects" :id (:id component) :name (:name component))
|
||||
(-> (pcb/empty-changes nil)
|
||||
(pcb/with-library-data file-data)
|
||||
(pcb/update-component (:id component) repair-component))))
|
||||
|
||||
(defmethod repair-error :invalid-text-touched
|
||||
[_ {:keys [shape page-id] :as error} file-data _]
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
:ref-shape-is-head
|
||||
:ref-shape-is-not-head
|
||||
:shape-ref-in-main
|
||||
:component-id-mismatch
|
||||
:root-main-not-allowed
|
||||
:nested-main-not-allowed
|
||||
:root-copy-not-allowed
|
||||
@@ -59,6 +60,7 @@
|
||||
:not-head-copy-not-allowed
|
||||
:not-component-not-allowed
|
||||
:component-nil-objects-not-allowed
|
||||
:non-deleted-component-cannot-have-objects
|
||||
:instance-head-not-frame
|
||||
:invalid-text-touched
|
||||
:misplaced-slot
|
||||
@@ -326,6 +328,20 @@
|
||||
:component-file (:component-file ref-shape)
|
||||
:component-id (:component-id ref-shape)))))
|
||||
|
||||
(defn- check-ref-component-id
|
||||
"Validate that if the copy has not been swwpped, the component-id and component-file are
|
||||
the same as in the referenced shape in the near main."
|
||||
[shape file page libraries]
|
||||
(when (nil? (ctk/get-swap-slot shape))
|
||||
(when-let [ref-shape (ctf/find-ref-shape file page libraries shape :include-deleted? true)]
|
||||
(when (or (not= (:component-id shape) (:component-id ref-shape))
|
||||
(not= (:component-file shape) (:component-file ref-shape)))
|
||||
(report-error :component-id-mismatch
|
||||
"Nested copy component-id and component-file must be the same as the near main"
|
||||
shape file page
|
||||
:component-id (:component-id ref-shape)
|
||||
:component-file (:component-file ref-shape))))))
|
||||
|
||||
(defn- check-empty-swap-slot
|
||||
"Validate that this shape does not have any swap slot."
|
||||
[shape file page]
|
||||
@@ -418,6 +434,7 @@
|
||||
(check-component-not-main-head shape file page libraries)
|
||||
(check-component-not-root shape file page)
|
||||
(check-valid-touched shape file page)
|
||||
(check-ref-component-id shape file page libraries)
|
||||
;; We can have situations where the nested copy and the ancestor copy come from different libraries and some of them have been dettached
|
||||
;; so we only validate the shape-ref if the ancestor is from a valid library
|
||||
(when library-exists
|
||||
@@ -648,6 +665,13 @@
|
||||
"Component main not allowed inside other component"
|
||||
main-instance file component-page))))
|
||||
|
||||
(defn- check-not-objects
|
||||
[component file]
|
||||
(when (d/not-empty? (:objects component))
|
||||
(report-error :non-deleted-component-cannot-have-objects
|
||||
"A non-deleted component cannot have shapes inside"
|
||||
component file nil)))
|
||||
|
||||
(defn- check-component
|
||||
"Validate semantic coherence of a component. Report all errors found."
|
||||
[component file]
|
||||
@@ -656,7 +680,8 @@
|
||||
"Objects list cannot be nil"
|
||||
component file nil))
|
||||
(when-not (:deleted component)
|
||||
(check-main-inside-main component file))
|
||||
(check-main-inside-main component file)
|
||||
(check-not-objects component file))
|
||||
(when (:deleted component)
|
||||
(check-component-duplicate-swap-slot component file)
|
||||
(check-ref-cycles component file))
|
||||
|
||||
@@ -1769,6 +1769,23 @@
|
||||
(pcb/update-shapes changes [(:id dest-shape)] ctk/unhead-shape {:ignore-touched true})
|
||||
changes))
|
||||
|
||||
(defn- check-swapped-main
|
||||
[changes dest-shape origin-shape]
|
||||
;; Only for direct updates (from main to copy). Check if the main shape
|
||||
;; has been swapped. If so, the new component-id and component-file must
|
||||
;; be put into the copy.
|
||||
(if (and (= (:shape-ref dest-shape) (:id origin-shape))
|
||||
(ctk/instance-head? dest-shape)
|
||||
(ctk/instance-head? origin-shape)
|
||||
(or (not= (:component-id dest-shape) (:component-id origin-shape))
|
||||
(not= (:component-file dest-shape) (:component-file origin-shape))))
|
||||
(pcb/update-shapes changes [(:id dest-shape)]
|
||||
#(assoc %
|
||||
:component-id (:component-id origin-shape)
|
||||
:component-file (:component-file origin-shape))
|
||||
{:ignore-touched true})
|
||||
changes))
|
||||
|
||||
(defn- update-attrs
|
||||
"The main function that implements the attribute sync algorithm. Copy
|
||||
attributes that have changed in the origin shape to the dest shape.
|
||||
@@ -1811,6 +1828,8 @@
|
||||
:always
|
||||
(check-detached-main dest-shape origin-shape)
|
||||
:always
|
||||
(check-swapped-main dest-shape origin-shape)
|
||||
:always
|
||||
(generate-update-tokens container dest-shape origin-shape touched omit-touched? nil))
|
||||
|
||||
(let [attr-group (get ctk/sync-attrs attr)
|
||||
|
||||
@@ -132,3 +132,94 @@ Some naming conventions:
|
||||
(if-let [last-period (str/last-index-of s ".")]
|
||||
[(subs s 0 (inc last-period)) (subs s (inc last-period))]
|
||||
[s ""]))
|
||||
|
||||
;; Tree building functions --------------------------------------------------
|
||||
|
||||
"Build tree structure from flat list of paths"
|
||||
|
||||
"`build-tree-root` is the main function to build the tree."
|
||||
|
||||
"Receives a list of segments with 'name' properties representing paths,
|
||||
and a separator string."
|
||||
"E.g segments = [{... :name 'one/two/three'} {... :name 'one/two/four'} {... :name 'one/five'}]"
|
||||
|
||||
"Transforms into a tree structure like:
|
||||
[{:name 'one'
|
||||
:path 'one'
|
||||
:depth 0
|
||||
:leaf nil
|
||||
:children-fn (fn [] [{:name 'two'
|
||||
:path 'one.two'
|
||||
:depth 1
|
||||
:leaf nil
|
||||
:children-fn (fn [] [{... :name 'three'} {... :name 'four'}])}
|
||||
{:name 'five'
|
||||
:path 'one.five'
|
||||
:depth 1
|
||||
:leaf {... :name 'five'}
|
||||
...}])}]"
|
||||
|
||||
(defn- sort-by-children
|
||||
"Sorts segments so that those with children come first."
|
||||
[segments separator]
|
||||
(sort-by (fn [segment]
|
||||
(let [path (split-path (:name segment) :separator separator)
|
||||
path-length (count path)]
|
||||
(if (= path-length 1)
|
||||
1
|
||||
0)))
|
||||
segments))
|
||||
|
||||
(defn- group-by-first-segment
|
||||
"Groups segments by their first path segment and update segment name."
|
||||
[segments separator]
|
||||
(reduce (fn [acc segment]
|
||||
(let [[first-segment & remaining-segments] (split-path (:name segment) :separator separator)
|
||||
rest-path (when (seq remaining-segments) (join-path remaining-segments :separator separator :with-spaces? false))]
|
||||
(update acc first-segment (fnil conj [])
|
||||
(if rest-path
|
||||
(assoc segment :name rest-path)
|
||||
segment))))
|
||||
{}
|
||||
segments))
|
||||
|
||||
(defn- sort-and-group-segments
|
||||
"Sorts elements and groups them by their first path segment."
|
||||
[segments separator]
|
||||
(let [sorted (sort-by-children segments separator)
|
||||
grouped (group-by-first-segment sorted separator)]
|
||||
grouped))
|
||||
|
||||
(defn- build-tree-node
|
||||
"Builds a single tree node with lazy children."
|
||||
[segment-name remaining-segments separator parent-path depth]
|
||||
(let [current-path (if parent-path
|
||||
(str parent-path "." segment-name)
|
||||
segment-name)
|
||||
|
||||
is-leaf? (and (seq remaining-segments)
|
||||
(every? (fn [segment]
|
||||
(let [remaining-segment-name (first (split-path (:name segment) :separator separator))]
|
||||
(= segment-name remaining-segment-name)))
|
||||
remaining-segments))
|
||||
|
||||
leaf-segment (when is-leaf? (first remaining-segments))
|
||||
node {:name segment-name
|
||||
:path current-path
|
||||
:depth depth
|
||||
:leaf leaf-segment
|
||||
:children-fn (when-not is-leaf?
|
||||
(fn []
|
||||
(let [grouped-elements (sort-and-group-segments remaining-segments separator)]
|
||||
(mapv (fn [[child-segment-name remaining-child-segments]]
|
||||
(build-tree-node child-segment-name remaining-child-segments separator current-path (inc depth)))
|
||||
grouped-elements))))}]
|
||||
node))
|
||||
|
||||
(defn build-tree-root
|
||||
"Builds the root level of the tree."
|
||||
[segments separator]
|
||||
(let [grouped-elements (sort-and-group-segments segments separator)]
|
||||
(mapv (fn [[segment-name remaining-segments]]
|
||||
(build-tree-node segment-name remaining-segments separator nil 0))
|
||||
grouped-elements)))
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
file-id
|
||||
{file-id file}
|
||||
file-id))]
|
||||
(thf/apply-changes file changes)))
|
||||
(thf/apply-changes file changes :validate? false)))
|
||||
|
||||
(defn swap-component
|
||||
"Swap the specified shape by the component specified by component-tag"
|
||||
@@ -305,12 +305,13 @@
|
||||
[changes nil])
|
||||
|
||||
|
||||
file' (thf/apply-changes file changes)]
|
||||
file' (thf/apply-changes file changes :validate? (not propagate-fn))]
|
||||
(when new-shape-label
|
||||
(thi/rm-id! (:id new-shape))
|
||||
(thi/set-id! new-shape-label (:id new-shape)))
|
||||
(if propagate-fn
|
||||
(propagate-fn file')
|
||||
(-> (propagate-fn file')
|
||||
(thf/validate-file!))
|
||||
file')))
|
||||
|
||||
(defn swap-component-in-shape [file shape-tag component-tag & {:keys [page-label propagate-fn]}]
|
||||
@@ -339,9 +340,10 @@
|
||||
(assoc shape :fills (ths/sample-fills-color :fill-color color)))
|
||||
(:objects page)
|
||||
{})
|
||||
file' (thf/apply-changes file changes)]
|
||||
file' (thf/apply-changes file changes :validate? (not propagate-fn))]
|
||||
(if propagate-fn
|
||||
(propagate-fn file')
|
||||
(-> (propagate-fn file')
|
||||
(thf/validate-file!))
|
||||
file')))
|
||||
|
||||
(defn update-bottom-color
|
||||
@@ -357,9 +359,10 @@
|
||||
(assoc shape :fills (ths/sample-fills-color :fill-color color)))
|
||||
(:objects page)
|
||||
{})
|
||||
file' (thf/apply-changes file changes)]
|
||||
file' (thf/apply-changes file changes :validate? (not propagate-fn))]
|
||||
(if propagate-fn
|
||||
(propagate-fn file')
|
||||
(-> (propagate-fn file')
|
||||
(thf/validate-file!))
|
||||
file')))
|
||||
|
||||
(defn reset-overrides [file shape & {:keys [page-label propagate-fn]}]
|
||||
@@ -374,9 +377,10 @@
|
||||
{file-id file}
|
||||
(ctn/make-container container :page)
|
||||
(:id shape)))
|
||||
file' (thf/apply-changes file changes)]
|
||||
file' (thf/apply-changes file changes :validate? (not propagate-fn))]
|
||||
(if propagate-fn
|
||||
(propagate-fn file')
|
||||
(-> (propagate-fn file')
|
||||
(thf/validate-file!))
|
||||
file')))
|
||||
|
||||
(defn reset-overrides-in-first-child [file shape-tag & {:keys [page-label propagate-fn]}]
|
||||
@@ -398,9 +402,10 @@
|
||||
#{(-> (ths/get-shape file shape-tag :page-label page-label)
|
||||
:id)}
|
||||
{})
|
||||
file' (thf/apply-changes file changes)]
|
||||
file' (thf/apply-changes file changes :validate? (not propagate-fn))]
|
||||
(if propagate-fn
|
||||
(propagate-fn file')
|
||||
(-> (propagate-fn file')
|
||||
(thf/validate-file!))
|
||||
file')))
|
||||
|
||||
(defn duplicate-shape [file shape-tag & {:keys [page-label propagate-fn]}]
|
||||
@@ -419,8 +424,9 @@
|
||||
(:id file)) ;; file-id
|
||||
(cll/generate-duplicate-changes-update-indices (:objects page) ;; objects
|
||||
#{(:id shape)}))
|
||||
file' (thf/apply-changes file changes)]
|
||||
file' (thf/apply-changes file changes :validate? (not propagate-fn))]
|
||||
(if propagate-fn
|
||||
(propagate-fn file')
|
||||
(-> (propagate-fn file')
|
||||
(thf/validate-file!))
|
||||
file')))
|
||||
|
||||
|
||||
@@ -54,12 +54,14 @@
|
||||
([file] (validate-file! file {}))
|
||||
([file libraries]
|
||||
(cfv/validate-file-schema! file)
|
||||
(cfv/validate-file! file libraries)))
|
||||
(cfv/validate-file! file libraries)
|
||||
file))
|
||||
|
||||
(defn apply-changes
|
||||
[file changes]
|
||||
[file changes & {:keys [validate?] :or {validate? true}}]
|
||||
(let [file' (ctf/update-file-data file #(cfc/process-changes % (:redo-changes changes) true))]
|
||||
(validate-file! file')
|
||||
(when validate?
|
||||
(validate-file! file'))
|
||||
file'))
|
||||
|
||||
(defn apply-undo-changes
|
||||
|
||||
@@ -146,12 +146,15 @@
|
||||
"Check if some attribute is one that is involved in component syncrhonization.
|
||||
Note that design tokens also are involved, although they go by an alternate
|
||||
route and thus they are not part of :sync-attrs.
|
||||
Also when detaching a nested copy it also needs to trigger a synchronization,
|
||||
even though :shape-ref is not a synced attribute per se"
|
||||
Also when detaching a nested copy or it also needs to trigger a synchronization,
|
||||
even though :shape-ref or :component-id are not synced attribute per se"
|
||||
[attr]
|
||||
(or (get sync-attrs attr)
|
||||
(= :shape-ref attr)
|
||||
(= :applied-tokens attr)))
|
||||
(= :applied-tokens attr)
|
||||
(= :component-id attr)
|
||||
(= :component-file attr)
|
||||
(= :component-root attr)))
|
||||
|
||||
(defn instance-root?
|
||||
"Check if this shape is the head of a top instance."
|
||||
|
||||
@@ -60,6 +60,9 @@
|
||||
(some? objects)
|
||||
(assoc :objects objects)
|
||||
|
||||
(nil? objects)
|
||||
(dissoc :objects)
|
||||
|
||||
(some? modified-at)
|
||||
(assoc :modified-at modified-at)
|
||||
|
||||
|
||||
@@ -465,9 +465,10 @@
|
||||
page
|
||||
{(:id file) file}
|
||||
(thi/id :nested-h-ellipse))
|
||||
file' (-> (thf/apply-changes file changes)
|
||||
file' (-> (thf/apply-changes file changes :validate? false)
|
||||
(tho/propagate-component-changes :c-board-with-ellipse)
|
||||
(tho/propagate-component-changes :c-big-board))
|
||||
(tho/propagate-component-changes :c-big-board)
|
||||
(thf/validate-file!))
|
||||
|
||||
;; ==== Get
|
||||
nested2-h-ellipse (ths/get-shape file' :nested-h-ellipse)
|
||||
|
||||
@@ -64,9 +64,8 @@
|
||||
|
||||
(reset-all-overrides [file]
|
||||
(-> file
|
||||
(tho/reset-overrides-in-first-child :frame-board-1 :page-label :page-1)
|
||||
(tho/reset-overrides-in-first-child :copy-board-1 :page-label :page-2)
|
||||
(propagate-all-component-changes)))
|
||||
(tho/reset-overrides-in-first-child :frame-board-1 :page-label :page-1 :propagate-fn propagate-all-component-changes)
|
||||
(tho/reset-overrides-in-first-child :copy-board-1 :page-label :page-2 :propagate-fn propagate-all-component-changes)))
|
||||
|
||||
(fill-colors [file]
|
||||
[(tho/bottom-fill-color file :frame-ellipse-1 :page-label :page-1)
|
||||
|
||||
@@ -56,10 +56,9 @@
|
||||
|
||||
(reset-all-overrides [file]
|
||||
(-> file
|
||||
(tho/reset-overrides (ths/get-shape file :copy-simple-1))
|
||||
(tho/reset-overrides (ths/get-shape file :copy-frame-composed-1))
|
||||
(tho/reset-overrides (ths/get-shape file :composed-1-composed-2-copy))
|
||||
(propagate-all-component-changes)))
|
||||
(tho/reset-overrides (ths/get-shape file :copy-simple-1 :propagate-fn propagate-all-component-changes))
|
||||
(tho/reset-overrides (ths/get-shape file :copy-frame-composed-1 :propagate-fn propagate-all-component-changes))
|
||||
(tho/reset-overrides (ths/get-shape file :composed-1-composed-2-copy :propagate-fn propagate-all-component-changes))))
|
||||
|
||||
(fill-colors [file]
|
||||
[(tho/bottom-fill-color file :frame-simple-1)
|
||||
|
||||
@@ -6,20 +6,12 @@
|
||||
|
||||
(ns common-tests.logic.swap-as-override-test
|
||||
(:require
|
||||
[app.common.files.changes :as ch]
|
||||
[app.common.files.changes-builder :as pcb]
|
||||
[app.common.logic.libraries :as cll]
|
||||
[app.common.logic.shapes :as cls]
|
||||
[app.common.pprint :as pp]
|
||||
[app.common.data :as d]
|
||||
[app.common.test-helpers.components :as thc]
|
||||
[app.common.test-helpers.compositions :as tho]
|
||||
[app.common.test-helpers.files :as thf]
|
||||
[app.common.test-helpers.ids-map :as thi]
|
||||
[app.common.test-helpers.shapes :as ths]
|
||||
[app.common.types.component :as ctk]
|
||||
[app.common.types.container :as ctn]
|
||||
[app.common.types.file :as ctf]
|
||||
[app.common.uuid :as uuid]
|
||||
[clojure.test :as t]))
|
||||
|
||||
(t/use-fixtures :each thi/test-fixture)
|
||||
@@ -27,23 +19,40 @@
|
||||
(defn- setup []
|
||||
(-> (thf/sample-file :file1)
|
||||
|
||||
(tho/add-simple-component :component-1 :frame-component-1 :child-component-1 :child-params {:name "child-component-1" :type :rect :fills (ths/sample-fills-color :fill-color "#111111")})
|
||||
(tho/add-simple-component :component-2 :frame-component-2 :child-component-2 :child-params {:name "child-component-2" :type :rect :fills (ths/sample-fills-color :fill-color "#222222")})
|
||||
(tho/add-simple-component :component-3 :frame-component-3 :child-component-3 :child-params {:name "child-component-3" :type :rect :fills (ths/sample-fills-color :fill-color "#333333")})
|
||||
(tho/add-simple-component :component-1 :frame-component-1 :child-component-1
|
||||
:root-params {:name "component-1"}
|
||||
:child-params {:name "child-component-1"
|
||||
:type :rect
|
||||
:fills (ths/sample-fills-color :fill-color "#111111")})
|
||||
(tho/add-simple-component :component-2 :frame-component-2 :child-component-2
|
||||
:root-params {:name "component-2"}
|
||||
:child-params {:name "child-component-2"
|
||||
:type :rect
|
||||
:fills (ths/sample-fills-color :fill-color "#222222")})
|
||||
(tho/add-simple-component :component-3 :frame-component-3 :child-component-3
|
||||
:root-params {:name "component-3"}
|
||||
:child-params {:name "child-component-3"
|
||||
:type :rect
|
||||
:fills (ths/sample-fills-color :fill-color "#333333")})
|
||||
|
||||
(tho/add-frame :frame-icon-and-text)
|
||||
(thc/instantiate-component :component-1 :copy-component-1 :parent-label :frame-icon-and-text :children-labels [:component-1-icon-and-text])
|
||||
(tho/add-frame :frame-icon-and-text :name "copy-component-1")
|
||||
(thc/instantiate-component :component-1 :copy-component-1
|
||||
:parent-label :frame-icon-and-text
|
||||
:children-labels [:component-1-icon-and-text])
|
||||
(ths/add-sample-shape :text
|
||||
{:type :text
|
||||
:name "icon+text"
|
||||
:parent-label :frame-icon-and-text})
|
||||
(thc/make-component :icon-and-text :frame-icon-and-text)
|
||||
|
||||
(tho/add-frame :frame-panel)
|
||||
(thc/instantiate-component :icon-and-text :copy-icon-and-text :parent-label :frame-panel :children-labels [:icon-and-text-panel])
|
||||
(tho/add-frame :frame-panel :name "icon-and-text")
|
||||
(thc/instantiate-component :icon-and-text :copy-icon-and-text
|
||||
:parent-label :frame-panel
|
||||
:children-labels [:icon-and-text-panel])
|
||||
(thc/make-component :panel :frame-panel)
|
||||
|
||||
(thc/instantiate-component :panel :copy-panel :children-labels [:copy-icon-and-text-panel])))
|
||||
(thc/instantiate-component :panel :copy-panel
|
||||
:children-labels [:copy-icon-and-text-panel])))
|
||||
|
||||
(defn- propagate-all-component-changes [file]
|
||||
(-> file
|
||||
|
||||
@@ -41,10 +41,7 @@ services:
|
||||
- 6062:6062
|
||||
- 6063:6063
|
||||
- 6064:6064
|
||||
- 9000:9000
|
||||
- 9001:9001
|
||||
- 9090:9090
|
||||
- 9091:9091
|
||||
|
||||
environment:
|
||||
- EXTERNAL_UID=${CURRENT_USER_ID}
|
||||
|
||||
@@ -145,8 +145,8 @@ http {
|
||||
proxy_pass http://127.0.0.1:3000/;
|
||||
}
|
||||
|
||||
location /wasm-playground {
|
||||
alias /home/penpot/penpot/frontend/resources/public/wasm-playground/;
|
||||
location /playground {
|
||||
alias /home/penpot/penpot/experiments/;
|
||||
add_header Cache-Control "no-cache, max-age=0";
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
@@ -130,6 +130,12 @@ services:
|
||||
environment:
|
||||
<< : [*penpot-flags, *penpot-public-uri, *penpot-http-body-size, *penpot-secret-key]
|
||||
|
||||
## The PREPL host. Mainly used for external programatic access to penpot backend
|
||||
## (example: admin). By default it will listen on `localhost` but if you are going to use
|
||||
## the `admin`, you will need to uncomment this and set the host to `0.0.0.0`.
|
||||
|
||||
# PENPOT_PREPL_HOST: 0.0.0.0
|
||||
|
||||
## Database connection parameters. Don't touch them unless you are using custom
|
||||
## postgresql connection parameters.
|
||||
|
||||
@@ -145,8 +151,8 @@ services:
|
||||
## Default configuration for assets storage: using filesystem based with all files
|
||||
## stored in a docker volume.
|
||||
|
||||
PENPOT_OBJECTS_STORAGE_BACKEND: fs
|
||||
PENPOT_OBJECTS_STORAGE_FS_DIRECTORY: /opt/data/assets
|
||||
PENPOT_ASSETS_STORAGE_BACKEND: assets-fs
|
||||
PENPOT_STORAGE_ASSETS_FS_DIRECTORY: /opt/data/assets
|
||||
|
||||
## Also can be configured to to use a S3 compatible storage.
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
@@ -1,10 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source ~/.bashrc
|
||||
|
||||
set -ex
|
||||
|
||||
corepack enable;
|
||||
corepack install;
|
||||
|
||||
rm -rf ./_dist
|
||||
yarn install
|
||||
yarn
|
||||
yarn run build
|
||||
|
||||
@@ -19,12 +19,6 @@ desc: Begin with the Penpot user guide! Get quickstarts, shortcuts, and tutorial
|
||||
<p>Create and manage your teams</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/user-guide/account-teams/projects-files">
|
||||
<h2>Projects and Files →</h2>
|
||||
<p>Organize your work with projects and files</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/user-guide/account-teams/comments/">
|
||||
<h2>Comments →</h2>
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
---
|
||||
title: Projects and Files
|
||||
order: 3
|
||||
desc: Learn how to organize your work in Penpot. Create, manage and organize projects and files, work with drafts, and handle deleted items.
|
||||
---
|
||||
|
||||
<h1 id="projects-files">Projects and Files</h1>
|
||||
<p class="main-paragraph">Projects and files are the core organizational structure in Penpot. Projects work like folders that contain multiple design files, helping you organize your work efficiently. Files are your actual design documents where you create boards, pages, and all your design elements.</p>
|
||||
<p class="main-paragraph">Understanding how to manage projects and files will help you keep your workspace organized and make it easier to collaborate with your team.</p>
|
||||
|
||||
<h2 id="projects-management">Projects</h2>
|
||||
<p>Projects are containers that help you organize and group related design files together. Think of them as folders in a file system. You can create as many projects as you need to organize your work by client, product, feature, or any other structure that fits your workflow.</p>
|
||||
<p>If you're working with others, projects should be created inside a team so that team members can collaborate on the files within them. Projects created in your personal space ("Your Penpot") remain private to you.</p>
|
||||
<figure>
|
||||
<img src="/img/files-projects/01-projects.webp" alt="Projects view in dashboard" />
|
||||
</figure>
|
||||
|
||||
<h3 id="create-project">Create a project</h3>
|
||||
<p>To create a new project, use the <strong>+ New project</strong> button in the dashboard. You can also use the keyboard shortcut <kbd>+</kbd> when you're on the dashboard. A dialog will appear where you can enter the project name. Once created, the project will appear in your projects list.</p>
|
||||
<p>When you create a project, you can immediately start adding files to it, or create files first and move them into the project later.</p>
|
||||
|
||||
<h3 id="edit-project">Edit a project</h3>
|
||||
<p>To edit a project's name, right-click on the project in the sidebar or click the three-dot menu next to the project name. Select <strong>Edit</strong> or <strong>Rename</strong> to change the project name. You can also update the project's profile picture from the same menu.</p>
|
||||
|
||||
<h3 id="pin-project">Pin a project</h3>
|
||||
<p>Projects can be pinned to the sidebar for quick access. Right-click on a project and select <strong>Pin</strong> to keep it visible in the sidebar even when you have many projects. Pinned projects appear at the top of your projects list for easy access.</p>
|
||||
<p>To unpin a project, right-click on it and select <strong>Unpin</strong>. The project will remain in your list but won't be pinned to the sidebar anymore.</p>
|
||||
<figure>
|
||||
<img src="/img/files-projects/04-pin-project.webp" alt="Pin project option" />
|
||||
</figure>
|
||||
|
||||
<h3 id="move-project">Move a project</h3>
|
||||
<p>Projects can be moved between teams. To move a project, right-click on it and select <strong>Move to</strong> from the context menu. A dialog will appear showing all available teams where you can move the project. Select the destination team and confirm the move.</p>
|
||||
<figure>
|
||||
<img src="/img/files-projects/06-move-project.webp" alt="Move project to another team" />
|
||||
</figure>
|
||||
<p>When you move a project to another team, all files within the project are moved along with it. Team members of the destination team will gain access to the project and its files according to their permissions.</p>
|
||||
<p class="advice">Moving a project to another team changes its ownership and access permissions. Make sure the destination team has the appropriate members and permissions for the work contained in the project.</p>
|
||||
|
||||
<h3 id="delete-project">Delete a project</h3>
|
||||
<p>To delete a project, right-click on it and select <strong>Delete</strong> from the menu. You'll be asked to confirm the deletion. Keep in mind that deleting a project will also delete all files within it. Make sure you have backed up any important files before deleting a project.</p>
|
||||
<p class="advice">Deleted projects and their files are moved to the trash area where they can be restored or permanently deleted.</p>
|
||||
|
||||
<h2 id="files-management">Files</h2>
|
||||
<p>Files are your design documents in Penpot. Each file contains pages, boards, and all the design elements you create. Files can be created within a project or in the drafts section, and you can move them between projects as needed.</p>
|
||||
|
||||
<h3 id="create-file">Create a file</h3>
|
||||
<p>To create a new file, you have several options:</p>
|
||||
<ul>
|
||||
<li>Click the <strong>+</strong> button in a project to create a file inside that project</li>
|
||||
<li>Use the keyboard shortcut <kbd>+</kbd> when you have a project selected</li>
|
||||
<li>Create a file directly in the drafts section if you're not ready to organize it into a project yet</li>
|
||||
</ul>
|
||||
<figure>
|
||||
<img src="/img/files-projects/05-create-file.webp" alt="Create a new file" />
|
||||
</figure>
|
||||
<p>When creating a file, you'll be asked to give it a name. The file will open in the workspace where you can start designing immediately.</p>
|
||||
|
||||
<h3 id="edit-file">Edit a file</h3>
|
||||
<p>To rename a file, right-click on the file card in the dashboard and select <strong>Rename</strong>, or click on the three-dot menu on the file card. Enter the new name and confirm the change. You can also access file settings and other options from the file's context menu.</p>
|
||||
|
||||
<h3 id="move-file">Move a file</h3>
|
||||
<p>Files can be moved between projects, from drafts to a project, or even to projects in other teams. To move a file, right-click on the file card and select <strong>Move to</strong> from the context menu. A dialog will appear showing all available projects across your teams where you can choose the destination. Select the project where you want to move the file and confirm.</p>
|
||||
<p>You can also drag and drop files between projects in the dashboard for a quick way to reorganize your files within the same team.</p>
|
||||
<p>When moving a file to a project in another team, the file becomes accessible to members of that team according to their permissions. Moving a file doesn't affect its content or any shared libraries it might be using. Only its location in your project structure changes.</p>
|
||||
<p class="advice">When moving files between teams, be aware that this changes who has access to the file. Make sure the destination team has the appropriate members and permissions for the work contained in the file.</p>
|
||||
|
||||
<h3 id="duplicate-file">Duplicate a file</h3>
|
||||
<p>To create a copy of an existing file, right-click on the file card and select <strong>Duplicate</strong>. The duplicated file will be created in the same location (project or drafts) with the same name plus "Copy" added to it. You can then rename or move it as needed.</p>
|
||||
<p>Duplicating a file creates a complete copy including all pages, boards, and design elements. This is useful when you want to create variations of a design or use a file as a starting point for a new project.</p>
|
||||
|
||||
<h3 id="delete-file">Delete a file</h3>
|
||||
<p>To delete a file, right-click on the file card and select <strong>Delete</strong>. You'll be asked to confirm the deletion. The file will be moved to the trash area where it can be restored or permanently deleted later.</p>
|
||||
<p class="advice">Deleting a file doesn't immediately remove it permanently. You can recover deleted files from the trash area within a certain time period.</p>
|
||||
|
||||
<h2 id="drafts">Drafts</h2>
|
||||
<p>The drafts section is a fixed, non-deletable space in your dashboard where you can create and store files that aren't part of any specific project yet. This is useful for quick sketches, experimental designs, or files you're not ready to organize into projects.</p>
|
||||
<figure>
|
||||
<img src="/img/files-projects/02-drafts.webp" alt="Drafts section" />
|
||||
</figure>
|
||||
<p>Drafts appear in a dedicated section in the dashboard sidebar, separate from your projects. All team members can see and access files in the drafts section, depending on their permissions.</p>
|
||||
<p>You can create files directly in drafts, or move existing files from projects into drafts if you want to temporarily remove them from a project's organization. Files in drafts work exactly like files in projects - they have the same functionality and features.</p>
|
||||
<p>When you're ready to organize a file from drafts, you can move it into an appropriate project using the move option in the file's context menu.</p>
|
||||
|
||||
<h2 id="trash-area">Trash area</h2>
|
||||
<p>When you delete projects or files, they are not removed permanently. Instead, they are moved to a trash area, a dedicated space for deleted content. This allows you to recover mistakenly deleted content or permanently remove items when you're sure you don't need them anymore.</p>
|
||||
<p>The trash applies to both files and projects. Items in the trash remain there for a certain period depending on your Penpot subscription plan before being automatically deleted permanently.</p>
|
||||
|
||||
<h3 id="access-trash">Access the trash</h3>
|
||||
<p>A <strong>Trash</strong> section is accessible from the dashboard navigation. When you access it, you'll see all your deleted files and projects, each clearly labeled so you can easily identify what you want to restore or permanently delete.</p>
|
||||
<figure>
|
||||
<img src="/img/files-projects/03-trash.webp" alt="Trash area" />
|
||||
</figure>
|
||||
|
||||
<h3 id="trash-permissions">Trash permissions</h3>
|
||||
<p>Access to the trash and the actions you can perform depend on your role in the team:</p>
|
||||
<ul>
|
||||
<li><strong>Owner, Admin, and Editor:</strong> Can view the trash, restore deleted items, and permanently delete items from the trash.</li>
|
||||
<li><strong>Viewer:</strong> Cannot access the trash or manage deleted content.</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="restore-items">Restore items</h3>
|
||||
<p>To restore a deleted file or project, access the trash area and find the item you want to recover. Select the item and choose <strong>Restore</strong>. The item will be restored to its original location (the project it belonged to, or the drafts section if it wasn't in a project).</p>
|
||||
|
||||
<h3 id="permanently-delete">Permanently delete items</h3>
|
||||
<p>If you're sure you don't need an item anymore, you can permanently delete it from the trash. Select the item and choose <strong>Permanently delete</strong>. This action cannot be undone, so make sure you really want to remove the item permanently.</p>
|
||||
<p class="advice">Items in the trash are automatically deleted after a certain period depending on your subscription plan. If you want to keep something, restore it before the auto-deletion period expires.</p>
|
||||
@@ -455,43 +455,6 @@ ExtraBold Italic
|
||||
<p>A <strong>Typography composite token</strong> can be applied to a full text layer to set all typography properties at once. This lets you manage complete text styles using a single token instead of combining multiple individual ones.</p>
|
||||
<p>When applying a Typography composite token to a layer, any previously applied <em>Typography composite token</em> or <em>style</em> will be detached. The same happens in reverse. Only one of them can be active at a time.</p>
|
||||
|
||||
<h3 id="design-tokens-shadow">Shadow</h3>
|
||||
<p>Shadow tokens are composite entities that encapsulate the properties of one or more shadows into a single token definition. This token can contain a single shadow or an array of multiple shadows that can be reordered.</p>
|
||||
<p>Shadow tokens support both <strong>Drop Shadow</strong> and <strong>Inner Shadow</strong> types. When creating or editing a shadow token, you can select the type of shadow you want to use. The default selection is Drop Shadow.</p>
|
||||
<figure>
|
||||
<img src="/img/design-tokens/37-tokens-shadow-individual.webp" alt="Shadow token creation with individual values" />
|
||||
</figure>
|
||||
|
||||
<h4 id="design-tokens-shadow-properties">Shadow properties</h4>
|
||||
<p>Each shadow within a shadow token contains a set of properties that define how the shadow appears:</p>
|
||||
<ul>
|
||||
<li><strong>Color:</strong> The color of the shadow. Accepts the same values as <a href="#design-tokens-color">color tokens</a> (Hex, RGB, RGBA, ARGB, HSL, HSLA), and you can reference existing color tokens. The color picker is available when defining the value.</li>
|
||||
<li><strong>X offset:</strong> The horizontal offset of the shadow. Can be unit or unitless, and accepts negative values. You can use a number or reference a <a href="#design-tokens-number">number</a> or <a href="#design-tokens-dimensions">dimension</a> token.</li>
|
||||
<li><strong>Y offset:</strong> The vertical offset of the shadow. Can be unit or unitless, and accepts negative values. You can use a number or reference a <a href="#design-tokens-number">number</a> or <a href="#design-tokens-dimensions">dimension</a> token.</li>
|
||||
<li><strong>Blur:</strong> The blur radius of the shadow. Can be unit or unitless. You can use a number or reference a <a href="#design-tokens-number">number</a> or <a href="#design-tokens-dimensions">dimension</a> token.</li>
|
||||
<li><strong>Spread:</strong> The spread radius of the shadow. Can be unit or unitless. You can use a number or reference a <a href="#design-tokens-number">number</a> or <a href="#design-tokens-dimensions">dimension</a> token.</li>
|
||||
<li><strong>Type:</strong> Whether the shadow is a drop shadow or an inner shadow. Selected via a dropdown menu, with Drop Shadow as the default.</li>
|
||||
</ul>
|
||||
<p>Each property within a shadow token can reference existing tokens or be assigned hardcoded values. Shadows can also reference other shadow tokens (the type of shadow must match when using references).</p>
|
||||
<p class="advice">Not all properties are mandatory to save a shadow token. Some can be empty (and will be computed as 0). Only the color property is mandatory. In an array of shadows, if any shadow does not have the color set, the form cannot be saved.</p>
|
||||
|
||||
<h4 id="design-tokens-shadow-create">Creating shadow tokens</h4>
|
||||
<p>To create a shadow token, click on the <strong>+</strong> next to <strong>Shadow</strong> in the Tokens panel. Shadow tokens can be created in two ways:</p>
|
||||
<ul>
|
||||
<li><strong>Individual values:</strong> You can create one shadow or multiple shadows with individual property values. Click the <strong>+</strong> button to add more shadows to the array. New shadows are added at the top of the list.</li>
|
||||
<li><strong>Single reference:</strong> You can reference another existing shadow token. When using a single reference, you cannot add more than one shadow. The resolved value will display the shadow or list of shadows that the referenced token contains.</li>
|
||||
</ul>
|
||||
<figure>
|
||||
<img src="/img/design-tokens/38-tokens-shadow-reference.webp" alt="Shadow token creation with reference" />
|
||||
</figure>
|
||||
<p>When creating a shadow with individual values, the color value starts empty, but the other inputs have default values (X: 4, Y: 4, Blur: 4, Spread: 0). You can reorder shadows by hovering over a shadow form and using the reorder button to drag it to a different position.</p>
|
||||
<p>You can also reference another existing shadow token instead of defining each property manually. When doing so, Penpot resolves all shadow properties from the referenced token.</p>
|
||||
|
||||
<h4 id="design-tokens-shadow-apply">Applying shadow tokens</h4>
|
||||
<p>Shadow tokens can be applied to any layer type. Clicking on a shadow token will apply it to the selected layer. Right-clicking on a shadow token shows the context menu with the <strong>Shadow</strong> option to apply it.</p>
|
||||
<p class="advice">Text elements in CSS do not support inner shadows, but Penpot does, since it uses the filter property internally instead of the box-shadow property.</p>
|
||||
<p>When applying a shadow token, any existing shadow on the layer will be overridden (whether it's a raw shadow or an applied token shadow). If the token contains an array of shadows, each shadow will be added in the same order as in the creation form.</p>
|
||||
<p class="advice">In Penpot, an element can have multiple shadows, but only one token of the same type can be applied. This means that applying a second shadow token would override the first one, regardless of how many shadows the shape currently has.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 23 KiB |
@@ -20,7 +20,12 @@ test.describe("Dashboard Deleted Page", () => {
|
||||
// Navigate directly to deleted page
|
||||
await dashboardPage.goToDeleted();
|
||||
|
||||
// Check for the delete-page-section element
|
||||
await expect(page.getByTestId("deleted-page-section")).toBeVisible();
|
||||
// Check for the restore all and clear trash buttons
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Restore All" }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Clear trash" }),
|
||||
).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -40,6 +40,7 @@ const setupEmptyTokensFile = async (page, options = {}) => {
|
||||
tokensUpdateCreateModal: workspacePage.tokensUpdateCreateModal,
|
||||
tokenThemesSetsSidebar: workspacePage.tokenThemesSetsSidebar,
|
||||
tokenSetItems: workspacePage.tokenSetItems,
|
||||
tokensSidebar: workspacePage.tokensSidebar,
|
||||
tokenSetGroupItems: workspacePage.tokenSetGroupItems,
|
||||
tokenContextMenuForSet: workspacePage.tokenContextMenuForSet,
|
||||
};
|
||||
@@ -110,15 +111,12 @@ const checkInputFieldWithError = async (
|
||||
).toBeVisible();
|
||||
};
|
||||
|
||||
const checkInputFieldWithoutError = async (
|
||||
tokenThemeUpdateCreateModal,
|
||||
inputLocator,
|
||||
) => {
|
||||
const checkInputFieldWithoutError = async (inputLocator) => {
|
||||
expect(await inputLocator.getAttribute("aria-invalid")).toBeNull();
|
||||
expect(await inputLocator.getAttribute("aria-describedby")).toBeNull();
|
||||
};
|
||||
|
||||
async function testTokenCreationFlow(
|
||||
const testTokenCreationFlow = async (
|
||||
page,
|
||||
{
|
||||
tokenLabel,
|
||||
@@ -132,7 +130,7 @@ async function testTokenCreationFlow(
|
||||
resolvedValueText,
|
||||
secondResolvedValueText,
|
||||
},
|
||||
) {
|
||||
) => {
|
||||
const invalidValueError = "Invalid token value";
|
||||
const emptyNameError = "Name should be at least 1 character";
|
||||
const selfReferenceError = "Token has self reference";
|
||||
@@ -242,7 +240,45 @@ async function testTokenCreationFlow(
|
||||
await expect(
|
||||
tokensTabPanel.getByRole("button", { name: "my-token-2" }),
|
||||
).toBeEnabled();
|
||||
}
|
||||
};
|
||||
|
||||
const unfoldTokenTree = async (tokensTabPanel, type, tokenName) => {
|
||||
const tokenSegments = tokenName.split(".");
|
||||
const tokenFolderTree = tokenSegments.slice(0, -1);
|
||||
const tokenLeafName = tokenSegments.pop();
|
||||
|
||||
const typeParentWrapper = tokensTabPanel.getByTestId(`section-${type}`);
|
||||
const typeSectionButton = typeParentWrapper
|
||||
.getByRole("button", {
|
||||
name: type,
|
||||
})
|
||||
.first();
|
||||
|
||||
const isSectionExpanded =
|
||||
await typeSectionButton.getAttribute("aria-expanded");
|
||||
|
||||
if (isSectionExpanded === "false") {
|
||||
await typeSectionButton.click();
|
||||
}
|
||||
|
||||
for (const segment of tokenFolderTree) {
|
||||
const segmentButton = typeParentWrapper
|
||||
.getByRole("listitem")
|
||||
.getByRole("button", { name: segment })
|
||||
.first();
|
||||
|
||||
const isExpanded = await segmentButton.getAttribute("aria-expanded");
|
||||
if (isExpanded === "false") {
|
||||
await segmentButton.click();
|
||||
}
|
||||
}
|
||||
|
||||
await expect(
|
||||
typeParentWrapper.getByRole("button", {
|
||||
name: tokenLeafName,
|
||||
}),
|
||||
).toBeEnabled();
|
||||
};
|
||||
|
||||
test.describe("Tokens: Tokens Tab", () => {
|
||||
test("Clicking tokens tab button opens tokens sidebar tab", async ({
|
||||
@@ -398,15 +434,12 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
const emptyNameError = "Name should be at least 1 character";
|
||||
const selfReferenceError = "Token has self reference";
|
||||
const missingReferenceError = "Missing token references";
|
||||
const { tokensUpdateCreateModal, tokenThemesSetsSidebar } =
|
||||
const { tokensUpdateCreateModal, tokenThemesSetsSidebar, tokensSidebar } =
|
||||
await setupEmptyTokensFile(page);
|
||||
|
||||
const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" });
|
||||
const addTokenButton = tokensTabPanel.getByRole("button", {
|
||||
name: `Add Token: Color`,
|
||||
});
|
||||
|
||||
await addTokenButton.click();
|
||||
await tokensSidebar
|
||||
.getByRole("button", { name: "Add Token: Color" })
|
||||
.click();
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
|
||||
// Placeholder checks
|
||||
@@ -471,38 +504,34 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
await expect(submitButton).toBeEnabled();
|
||||
await submitButton.click();
|
||||
|
||||
await expect(
|
||||
tokensTabPanel.getByRole("button", {
|
||||
name: "color.primary",
|
||||
}),
|
||||
).toBeEnabled();
|
||||
await unfoldTokenTree(tokensSidebar, "color", "color.primary");
|
||||
|
||||
// Create token referencing the previous one with keyboard
|
||||
|
||||
await tokensTabPanel
|
||||
await tokensSidebar
|
||||
.getByRole("button", { name: "Add Token: Color" })
|
||||
.click();
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
|
||||
await nameField.click();
|
||||
await nameField.fill("color.secondary");
|
||||
await nameField.fill("secondary");
|
||||
await nameField.press("Tab");
|
||||
|
||||
await valueField.click();
|
||||
await valueField.fill("{color.primary}");
|
||||
|
||||
await expect(submitButton).toBeEnabled();
|
||||
await nameField.press("Enter");
|
||||
await submitButton.press("Enter");
|
||||
|
||||
await expect(
|
||||
tokensTabPanel.getByRole("button", {
|
||||
name: "color.secondary",
|
||||
tokensSidebar.getByRole("button", {
|
||||
name: "secondary",
|
||||
}),
|
||||
).toBeEnabled();
|
||||
|
||||
// Tokens tab panel should have two tokens with the color red / #ff0000
|
||||
await expect(
|
||||
tokensTabPanel.getByRole("button", { name: "#ff0000" }),
|
||||
tokensSidebar.getByRole("button", { name: "#ff0000" }),
|
||||
).toHaveCount(2);
|
||||
|
||||
// Global set has been auto created and is active
|
||||
@@ -518,7 +547,7 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
).toHaveAttribute("aria-checked", "true");
|
||||
|
||||
// Check color picker
|
||||
await tokensTabPanel
|
||||
await tokensSidebar
|
||||
.getByRole("button", { name: "Add Token: Color" })
|
||||
.click();
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
@@ -1079,7 +1108,7 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
const emptyNameError = "Name should be at least 1 character";
|
||||
|
||||
const { tokensUpdateCreateModal, tokenThemesSetsSidebar } =
|
||||
await setupEmptyTokensFile(page, {flags: ["enable-token-shadow"]});
|
||||
await setupEmptyTokensFile(page, { flags: ["enable-token-shadow"] });
|
||||
|
||||
// Open modal
|
||||
const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" });
|
||||
@@ -1507,24 +1536,15 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
test("User edits token and auto created set show up in the sidebar", async ({
|
||||
page,
|
||||
}) => {
|
||||
const {
|
||||
workspacePage,
|
||||
tokensUpdateCreateModal,
|
||||
tokenThemesSetsSidebar,
|
||||
tokensSidebar,
|
||||
tokenContextMenuForToken,
|
||||
} = await setupTokensFile(page);
|
||||
const { tokensUpdateCreateModal, tokensSidebar, tokenContextMenuForToken } =
|
||||
await setupTokensFile(page);
|
||||
|
||||
await expect(tokensSidebar).toBeVisible();
|
||||
|
||||
const tokensColorGroup = tokensSidebar.getByRole("button", {
|
||||
name: "Color 92",
|
||||
});
|
||||
await expect(tokensColorGroup).toBeVisible();
|
||||
await tokensColorGroup.click();
|
||||
await unfoldTokenTree(tokensSidebar, "color", "colors.blue.100");
|
||||
|
||||
const colorToken = tokensSidebar.getByRole("button", {
|
||||
name: "colors.blue.100",
|
||||
name: "100",
|
||||
});
|
||||
await expect(colorToken).toBeVisible();
|
||||
await colorToken.click({ button: "right" });
|
||||
@@ -1541,8 +1561,10 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
|
||||
await expect(tokensUpdateCreateModal).not.toBeVisible();
|
||||
|
||||
await unfoldTokenTree(tokensSidebar, "color", "colors.blue.100.changed");
|
||||
|
||||
const colorTokenChanged = tokensSidebar.getByRole("button", {
|
||||
name: "colors.blue.100.changed",
|
||||
name: "changed",
|
||||
});
|
||||
await expect(colorTokenChanged).toBeVisible();
|
||||
});
|
||||
@@ -1633,11 +1655,10 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
});
|
||||
|
||||
test("User creates grouped color token", async ({ page }) => {
|
||||
const { workspacePage, tokensUpdateCreateModal, tokenThemesSetsSidebar } =
|
||||
const { workspacePage, tokensUpdateCreateModal, tokensSidebar } =
|
||||
await setupEmptyTokensFile(page);
|
||||
|
||||
const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" });
|
||||
await tokensTabPanel
|
||||
await tokensSidebar
|
||||
.getByRole("button", { name: "Add Token: Color" })
|
||||
.click();
|
||||
|
||||
@@ -1649,7 +1670,7 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
const valueField = tokensUpdateCreateModal.getByLabel("Value");
|
||||
|
||||
await nameField.click();
|
||||
await nameField.fill("color.dark.primary");
|
||||
await nameField.fill("dark.primary");
|
||||
|
||||
await valueField.click();
|
||||
await valueField.fill("red");
|
||||
@@ -1660,7 +1681,9 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
await expect(submitButton).toBeEnabled();
|
||||
await submitButton.click();
|
||||
|
||||
await expect(tokensTabPanel.getByLabel("color.dark.primary")).toBeEnabled();
|
||||
await unfoldTokenTree(tokensSidebar, "color", "dark.primary");
|
||||
|
||||
await expect(tokensSidebar.getByLabel("primary")).toBeEnabled();
|
||||
});
|
||||
|
||||
test("User cant create regular token with value missing", async ({
|
||||
@@ -1676,7 +1699,6 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
|
||||
const nameField = tokensUpdateCreateModal.getByLabel("Name");
|
||||
const valueField = tokensUpdateCreateModal.getByLabel("Value");
|
||||
const submitButton = tokensUpdateCreateModal.getByRole("button", {
|
||||
name: "Save",
|
||||
});
|
||||
@@ -1686,7 +1708,7 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
|
||||
// Fill in name but leave value empty
|
||||
await nameField.click();
|
||||
await nameField.fill("color.primary");
|
||||
await nameField.fill("primary");
|
||||
|
||||
// Submit button should remain disabled when value is empty
|
||||
await expect(submitButton).toBeDisabled();
|
||||
@@ -1704,7 +1726,6 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
.click();
|
||||
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
const nameField = tokensUpdateCreateModal.getByLabel("Name");
|
||||
const valueField = tokensUpdateCreateModal.getByLabel("Value");
|
||||
|
||||
await valueField.click();
|
||||
@@ -1754,15 +1775,10 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
|
||||
await expect(tokensSidebar).toBeVisible();
|
||||
|
||||
const tokensColorGroup = tokensSidebar.getByRole("button", {
|
||||
name: "Color 92",
|
||||
});
|
||||
|
||||
await expect(tokensColorGroup).toBeVisible();
|
||||
await tokensColorGroup.click();
|
||||
unfoldTokenTree(tokensSidebar, "color", "colors.blue.100");
|
||||
|
||||
const colorToken = tokensSidebar.getByRole("button", {
|
||||
name: "colors.blue.100",
|
||||
name: "100",
|
||||
});
|
||||
|
||||
await colorToken.click({ button: "right" });
|
||||
@@ -1782,15 +1798,10 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
|
||||
await expect(tokensSidebar).toBeVisible();
|
||||
|
||||
const tokensColorGroup = tokensSidebar.getByRole("button", {
|
||||
name: "Color 92",
|
||||
});
|
||||
await expect(tokensColorGroup).toBeVisible();
|
||||
|
||||
await tokensColorGroup.click();
|
||||
unfoldTokenTree(tokensSidebar, "color", "colors.blue.100");
|
||||
|
||||
const colorToken = tokensSidebar.getByRole("button", {
|
||||
name: "colors.blue.100",
|
||||
name: "100",
|
||||
});
|
||||
await expect(colorToken).toBeVisible();
|
||||
await colorToken.click({ button: "right" });
|
||||
@@ -1803,8 +1814,7 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
});
|
||||
|
||||
test("User fold/unfold color tokens", async ({ page }) => {
|
||||
const { tokensSidebar, tokenContextMenuForToken } =
|
||||
await setupTokensFile(page);
|
||||
const { tokensSidebar } = await setupTokensFile(page);
|
||||
|
||||
await expect(tokensSidebar).toBeVisible();
|
||||
|
||||
@@ -1814,8 +1824,10 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
await expect(tokensColorGroup).toBeVisible();
|
||||
await tokensColorGroup.click();
|
||||
|
||||
unfoldTokenTree(tokensSidebar, "color", "colors.blue.100");
|
||||
|
||||
const colorToken = tokensSidebar.getByRole("button", {
|
||||
name: "colors.blue.100",
|
||||
name: "100",
|
||||
});
|
||||
await expect(colorToken).toBeVisible();
|
||||
await tokensColorGroup.click();
|
||||
@@ -2218,13 +2230,10 @@ test.describe("Tokens: Apply token", () => {
|
||||
const tokensTabButton = page.getByRole("tab", { name: "Tokens" });
|
||||
await tokensTabButton.click();
|
||||
|
||||
await tokensSidebar
|
||||
.getByRole("button")
|
||||
.filter({ hasText: "Color" })
|
||||
.click();
|
||||
unfoldTokenTree(tokensSidebar, "color", "colors.black");
|
||||
|
||||
await tokensSidebar
|
||||
.getByRole("button", { name: "colors.black" })
|
||||
.getByRole("button", { name: "black" })
|
||||
.click({ button: "right" });
|
||||
await tokenContextMenuForToken.getByText("Fill").click();
|
||||
|
||||
@@ -2462,7 +2471,7 @@ test.describe("Tokens: Apply token", () => {
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
|
||||
const nameField = tokensUpdateCreateModal.getByLabel("Name");
|
||||
await nameField.fill("shadow.primary");
|
||||
await nameField.fill("primary");
|
||||
|
||||
// User adds first shadow with a color from the color ramp
|
||||
const firstShadowFields = tokensUpdateCreateModal.getByTestId(
|
||||
@@ -2709,9 +2718,11 @@ test.describe("Tokens: Apply token", () => {
|
||||
await submitButton.click();
|
||||
await expect(tokensUpdateCreateModal).not.toBeVisible();
|
||||
|
||||
unfoldTokenTree(tokensSidebar, "shadow", "primary");
|
||||
|
||||
// Verify token appears in sidebar
|
||||
const shadowToken = tokensSidebar.getByRole("button", {
|
||||
name: "shadow.primary",
|
||||
name: "primary",
|
||||
});
|
||||
await expect(shadowToken).toBeEnabled();
|
||||
|
||||
|
||||
@@ -667,9 +667,6 @@
|
||||
}
|
||||
|
||||
// UI ELEMENTS
|
||||
|
||||
// FIXME: This is used multiple times accross the app. We should design this in
|
||||
// the DS and create a proper component for it.
|
||||
.asset-element {
|
||||
@include bodySmallTypography;
|
||||
display: flex;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<body>
|
||||
<canvas id="canvas"></canvas>
|
||||
<script type="module">
|
||||
import initWasmModule from '/js/render-wasm.js';
|
||||
import initWasmModule from '/js/render_wasm.js';
|
||||
import {
|
||||
init, addShapeSolidFill, assignCanvas, hexToU32ARGB, getRandomInt, getRandomColor,
|
||||
getRandomFloat, useShape, setShapeChildren, setupInteraction, addShapeSolidStrokeFill,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<body>
|
||||
<canvas id="canvas"></canvas>
|
||||
<script type="module">
|
||||
import initWasmModule from '/js/render-wasm.js';
|
||||
import initWasmModule from '/js/render_wasm.js';
|
||||
import {
|
||||
init, addShapeSolidFill, assignCanvas, hexToU32ARGB, getRandomInt, getRandomColor,
|
||||
getRandomFloat, useShape, setShapeChildren, setupInteraction, set_parent
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<body>
|
||||
<canvas id="canvas"></canvas>
|
||||
<script type="module">
|
||||
import initWasmModule from '/js/render-wasm.js';
|
||||
import initWasmModule from '/js/render_wasm.js';
|
||||
import {
|
||||
init, addShapeSolidFill, assignCanvas, hexToU32ARGB, getRandomInt, getRandomColor,
|
||||
getRandomFloat, useShape, setShapeChildren, setupInteraction, set_parent, draw_star,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<body>
|
||||
<canvas id="canvas"></canvas>
|
||||
<script type="module">
|
||||
import initWasmModule from '/js/render-wasm.js';
|
||||
import initWasmModule from '/js/render_wasm.js';
|
||||
import {
|
||||
init, addShapeSolidFill, assignCanvas, hexToU32ARGB, getRandomInt, getRandomColor,
|
||||
getRandomFloat, useShape, setShapeChildren, setupInteraction, set_parent, allocBytes,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<body>
|
||||
<canvas id="canvas"></canvas>
|
||||
<script type="module">
|
||||
import initWasmModule from '/js/render-wasm.js';
|
||||
import initWasmModule from '/js/render_wasm.js';
|
||||
import {
|
||||
init, addShapeSolidFill, assignCanvas, hexToU32ARGB, getRandomInt, getRandomColor,
|
||||
getRandomFloat, useShape, setShapeChildren, setupInteraction, addShapeSolidStrokeFill
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<body>
|
||||
<canvas id="canvas"></canvas>
|
||||
<script type="module">
|
||||
import initWasmModule from '/js/render-wasm.js';
|
||||
import initWasmModule from '/js/render_wasm.js';
|
||||
import {
|
||||
init, assignCanvas, setupInteraction, useShape, setShapeChildren, addTextShape, hexToU32ARGB,getRandomInt, getRandomColor, getRandomFloat, addShapeSolidFill, addShapeSolidStrokeFill
|
||||
} from './js/lib.js';
|
||||
@@ -102,4 +102,4 @@
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -61,11 +61,6 @@
|
||||
;; Def micro-benchmark iterations
|
||||
(def micro-benchmark-iterations 1e6)
|
||||
|
||||
;; Performance logs
|
||||
(defonce ^:private longtask-observer* (atom nil))
|
||||
(defonce ^:private stall-timer* (atom nil))
|
||||
(defonce ^:private current-op* (atom nil))
|
||||
|
||||
;; --- CONTEXT
|
||||
|
||||
(defn- collect-context
|
||||
@@ -469,72 +464,3 @@
|
||||
(defn event
|
||||
[props]
|
||||
(ptk/data-event ::event props))
|
||||
|
||||
;; --- DEVTOOLS PERF LOGGING
|
||||
|
||||
(defn install-long-task-observer! []
|
||||
(when (and (some? (.-PerformanceObserver js/window)) (nil? @longtask-observer*))
|
||||
(let [observer (js/PerformanceObserver.
|
||||
(fn [list _]
|
||||
(doseq [entry (.getEntries list)]
|
||||
(let [dur (.-duration entry)
|
||||
start (.-startTime entry)
|
||||
attrib (.-attribution entry)
|
||||
attrib-count (when attrib (.-length attrib))
|
||||
first-attrib (when (and attrib-count (> attrib-count 0)) (aget attrib 0))
|
||||
attrib-name (when first-attrib (.-name first-attrib))
|
||||
attrib-ctype (when first-attrib (.-containerType first-attrib))
|
||||
attrib-cid (when first-attrib (.-containerId first-attrib))
|
||||
attrib-csrc (when first-attrib (.-containerSrc first-attrib))]
|
||||
|
||||
(.warn js/console (str "[perf] long task " (Math/round dur) "ms at " (Math/round start) "ms"
|
||||
(when first-attrib
|
||||
(str " attrib:name=" attrib-name
|
||||
" ctype=" attrib-ctype
|
||||
" cid=" attrib-cid
|
||||
" csrc=" attrib-csrc))))))))]
|
||||
(.observe observer #js{:entryTypes #js["longtask"]})
|
||||
(reset! longtask-observer* observer))))
|
||||
|
||||
(defn start-event-loop-stall-logger!
|
||||
"Log event loop stalls by measuring setInterval drift.
|
||||
interval-ms: base interval
|
||||
threshold-ms: drift over which we report"
|
||||
[interval-ms threshold-ms]
|
||||
(when (nil? @stall-timer*)
|
||||
(let [last (atom (.now js/performance))
|
||||
id (js/setInterval
|
||||
(fn []
|
||||
(let [now (.now js/performance)
|
||||
expected (+ @last interval-ms)
|
||||
drift (- now expected)
|
||||
current-op @current-op*
|
||||
measures (.getEntriesByType js/performance "measure")
|
||||
mlen (.-length measures)
|
||||
last-measure (when (> mlen 0) (aget measures (dec mlen)))
|
||||
meas-name (when last-measure (.-name last-measure))
|
||||
meas-detail (when last-measure (.-detail last-measure))
|
||||
meas-count (when meas-detail (unchecked-get meas-detail "count"))]
|
||||
(reset! last now)
|
||||
(when (> drift threshold-ms)
|
||||
(.warn js/console
|
||||
(str "[perf] event loop stall: " (Math/round drift) "ms"
|
||||
(when current-op (str " op=" current-op))
|
||||
(when meas-name (str " last=" meas-name))
|
||||
(when meas-count (str " count=" meas-count)))))))
|
||||
interval-ms)]
|
||||
(reset! stall-timer* id))))
|
||||
|
||||
(defn init!
|
||||
"Install perf observers in dev builds. Safe to call multiple times."
|
||||
[]
|
||||
(when ^boolean js/goog.DEBUG
|
||||
(install-long-task-observer!)
|
||||
(start-event-loop-stall-logger! 50 100)
|
||||
;; Expose simple API on window for manual control in devtools
|
||||
(let [api #js {:reset (fn []
|
||||
(try
|
||||
(.clearMarks js/performance)
|
||||
(.clearMeasures js/performance)
|
||||
(catch :default _ nil)))}]
|
||||
(aset js/window "PenpotPerf" api))))
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
Uses `font-size-value` to calculate the relative line-height value.
|
||||
Returns an error for an invalid font-size value."
|
||||
[line-height-value font-size-value font-size-errors]
|
||||
(let [missing-references (seq (cto/find-token-value-references line-height-value))
|
||||
(let [missing-references (seq (some cto/find-token-value-references line-height-value))
|
||||
error
|
||||
(cond
|
||||
missing-references
|
||||
|
||||
@@ -347,12 +347,6 @@
|
||||
(with-meta {:team-id team-id
|
||||
:file-id file-id}))))))
|
||||
|
||||
;; Install dev perf observers once the workspace is ready
|
||||
(->> stream
|
||||
(rx/filter (ptk/type? ::workspace-initialized))
|
||||
(rx/take 1)
|
||||
(rx/map (fn [_] (ev/init!))))
|
||||
|
||||
(->> stream
|
||||
(rx/filter (ptk/type? ::dps/persistence-notification))
|
||||
(rx/take 1)
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(let [expand-fn (fn [expanded]
|
||||
(let [parents-seqs (map (fn [x] (cfh/get-parent-ids objects x)) ids)
|
||||
flat-parents (apply concat parents-seqs)
|
||||
non-root-parents (remove #(= % uuid/zero) flat-parents)
|
||||
distinct-parents (into #{} non-root-parents)]
|
||||
(merge expanded
|
||||
(into {}
|
||||
(map (fn [id] {id true}) distinct-parents)))))]
|
||||
(merge expanded
|
||||
(->> ids
|
||||
(map #(cfh/get-parent-ids objects %))
|
||||
flatten
|
||||
(remove #(= % uuid/zero))
|
||||
(map (fn [id] {id true}))
|
||||
(into {}))))]
|
||||
(update-in state [:workspace-local :expanded] expand-fn)))))
|
||||
|
||||
|
||||
|
||||
@@ -1122,7 +1122,7 @@
|
||||
ref-id (:stroke-color-ref-id stroke)
|
||||
|
||||
colors (-> libraries
|
||||
(get ref-file)
|
||||
(get ref-id)
|
||||
(get :data)
|
||||
(ctl/get-colors))
|
||||
shared? (contains? colors ref-id)
|
||||
@@ -1167,7 +1167,7 @@
|
||||
ref-file (get color :ref-file)
|
||||
ref-id (get color :ref-id)
|
||||
colors (-> libraries
|
||||
(get ref-file)
|
||||
(get ref-id)
|
||||
(get :data)
|
||||
(ctl/get-colors))
|
||||
shared? (contains? colors ref-id)
|
||||
@@ -1180,20 +1180,19 @@
|
||||
:index (:index shadow)}))
|
||||
|
||||
(defn- text->color-att
|
||||
[fill file-id libraries & {:keys [has-token-applied token-name]}]
|
||||
[fill file-id libraries]
|
||||
(let [ref-file (:fill-color-ref-file fill)
|
||||
ref-id (:fill-color-ref-id fill)
|
||||
colors (-> libraries
|
||||
(get ref-file)
|
||||
(get ref-id)
|
||||
(get :data)
|
||||
(ctl/get-colors))
|
||||
|
||||
shared? (contains? colors ref-id)
|
||||
base-attrs (cond-> (types.fills/fill->color fill)
|
||||
(not (or shared? (= ref-file file-id)))
|
||||
(dissoc :ref-file :ref-id))
|
||||
attrs (cond-> base-attrs
|
||||
has-token-applied (assoc :has-token-applied true)
|
||||
token-name (assoc :token-name token-name))]
|
||||
attrs (cond-> (types.fills/fill->color fill)
|
||||
(not (or shared? (= ref-file file-id)))
|
||||
(dissoc :ref-file :ref-id))]
|
||||
|
||||
{:attrs attrs
|
||||
:prop :content
|
||||
:shape-id (:shape-id fill)
|
||||
@@ -1201,18 +1200,13 @@
|
||||
|
||||
(defn- extract-text-colors
|
||||
[text file-id libraries]
|
||||
(let [applied-fill-token (get-in text [:applied-tokens :fill])
|
||||
treat-node
|
||||
(let [treat-node
|
||||
(fn [node shape-id]
|
||||
(map-indexed (fn [idx fill]
|
||||
(let [args (cond-> []
|
||||
(and (= idx 0) applied-fill-token)
|
||||
(conj :has-token-applied true :token-name applied-fill-token))]
|
||||
(apply text->color-att (assoc fill :shape-id shape-id :index idx) file-id libraries args)))
|
||||
node))]
|
||||
(map-indexed #(assoc %2 :shape-id shape-id :index %1) node))]
|
||||
(->> (txt/node-seq txt/is-text-node? (:content text))
|
||||
(map :fills)
|
||||
(mapcat #(treat-node % (:id text))))))
|
||||
(mapcat #(treat-node % (:id text)))
|
||||
(map #(text->color-att % file-id libraries)))))
|
||||
|
||||
(defn- fill->color-att
|
||||
"Given a fill map enriched with :shape-id, :index, and optionally
|
||||
@@ -1238,7 +1232,7 @@
|
||||
ref-id (:fill-color-ref-id fill)
|
||||
|
||||
colors (-> libraries
|
||||
(get ref-file)
|
||||
(get ref-id)
|
||||
(get :data)
|
||||
(ctl/get-colors))
|
||||
shared? (contains? colors ref-id)
|
||||
|
||||
@@ -264,13 +264,10 @@
|
||||
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [objects (dsh/lookup-page-objects state)
|
||||
;; Schedule expanding parents asynchronously to avoid blocking
|
||||
;; the event loop
|
||||
expand-s (->> (rx/of (dwc/expand-all-parents ids objects))
|
||||
(rx/observe-on :async))
|
||||
interrupt-s (rx/of ::dwsp/interrupt)]
|
||||
(rx/merge expand-s interrupt-s)))))
|
||||
(let [objects (dsh/lookup-page-objects state)]
|
||||
(rx/of
|
||||
(dwc/expand-all-parents ids objects)
|
||||
::dwsp/interrupt)))))
|
||||
|
||||
(defn select-all
|
||||
[]
|
||||
|
||||
@@ -305,7 +305,7 @@
|
||||
(l/derived #(dsh/lookup-shape % page-id shape-id) st/state =))
|
||||
|
||||
(def workspace-page-objects
|
||||
(l/derived dsh/lookup-page-objects st/state identical?))
|
||||
(l/derived dsh/lookup-page-objects st/state))
|
||||
|
||||
(def workspace-read-only?
|
||||
(l/derived :read-only? workspace-global))
|
||||
|
||||
@@ -4,29 +4,22 @@
|
||||
//
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
// FIXME: we need this import for .asset-element
|
||||
@use "refactor/basic-rules.scss" as deprecated;
|
||||
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
@use "ds/_utils.scss" as *;
|
||||
@use "ds/spacing.scss" as *;
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
|
||||
.editable-select {
|
||||
@extend .asset-element;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: $b-1 solid var(--input-border-color);
|
||||
border: deprecated.$s-1 solid var(--input-border-color);
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: $sz-32;
|
||||
height: deprecated.$s-32;
|
||||
width: 100%;
|
||||
padding: var(--sp-s);
|
||||
border-radius: $br-8;
|
||||
padding: deprecated.$s-8;
|
||||
border-radius: deprecated.$br-8;
|
||||
cursor: pointer;
|
||||
.dropdown-button {
|
||||
display: flex;
|
||||
place-content: center;
|
||||
@include deprecated.flexCenter;
|
||||
svg {
|
||||
@extend .button-icon-small;
|
||||
transform: rotate(90deg);
|
||||
@@ -36,11 +29,10 @@
|
||||
|
||||
.custom-select-dropdown {
|
||||
@extend .dropdown-wrapper;
|
||||
width: fit-content;
|
||||
max-height: px2rem(320); // TODO: when this gets addressed in the DS, use a token
|
||||
max-height: deprecated.$s-320;
|
||||
.separator {
|
||||
margin: 0;
|
||||
height: $sz-12;
|
||||
height: deprecated.$s-12;
|
||||
}
|
||||
.dropdown-element {
|
||||
@extend .dropdown-element-base;
|
||||
@@ -51,8 +43,7 @@
|
||||
}
|
||||
|
||||
.check-icon {
|
||||
display: flex;
|
||||
place-content: center;
|
||||
@include deprecated.flexCenter;
|
||||
svg {
|
||||
@extend .button-icon-small;
|
||||
visibility: hidden;
|
||||
|
||||
@@ -32,27 +32,6 @@
|
||||
(def ^:private menu-icon
|
||||
(deprecated-icon/icon-xref :menu (stl/css :menu-icon)))
|
||||
|
||||
(defn- on-restore-project
|
||||
[project]
|
||||
(let [on-accept #(st/emit! (dd/restore-project-immediately project))]
|
||||
(st/emit! (modal/show
|
||||
{:type :confirm
|
||||
:title (tr "dashboard.restore-project-confirmation.title")
|
||||
:message (tr "dashboard.restore-project-confirmation.description" (:name project))
|
||||
:accept-style :primary
|
||||
:accept-label (tr "labels.continue")
|
||||
:on-accept on-accept}))))
|
||||
|
||||
(defn- on-delete-project
|
||||
[project]
|
||||
(let [accept-fn #(st/emit! (dd/delete-project-immediately project))]
|
||||
(st/emit! (modal/show
|
||||
{:type :confirm
|
||||
:title (tr "dashboard.delete-forever-confirmation.title")
|
||||
:message (tr "dashboard.delete-project-forever-confirmation.description" (:name project))
|
||||
:accept-label (tr "dashboard.delete-forever-confirmation.title")
|
||||
:on-accept accept-fn}))))
|
||||
|
||||
(mf/defc header*
|
||||
{::mf/props :obj
|
||||
::mf/private true}
|
||||
@@ -61,8 +40,7 @@
|
||||
[:div#dashboard-deleted-title {:class (stl/css :dashboard-title)}
|
||||
[:h1 (tr "dashboard.projects-title")]]])
|
||||
|
||||
(mf/defc project-context-menu*
|
||||
{::mf/private true}
|
||||
(mf/defc deleted-project-menu*
|
||||
[{:keys [project show on-close top left]}]
|
||||
(let [top (d/nilv top 0)
|
||||
left (d/nilv left 0)
|
||||
@@ -70,13 +48,25 @@
|
||||
on-restore-project
|
||||
(mf/use-fn
|
||||
(mf/deps project)
|
||||
(partial on-restore-project project))
|
||||
(fn []
|
||||
(let [on-accept #(st/emit! (dd/restore-project-immediately project))]
|
||||
(st/emit! (modal/show {:type :confirm
|
||||
:title (tr "dashboard.restore-project-confirmation.title")
|
||||
:message (tr "dashboard.restore-project-confirmation.description" (:name project))
|
||||
:accept-style :primary
|
||||
:accept-label (tr "labels.continue")
|
||||
:on-accept on-accept})))))
|
||||
|
||||
on-delete-project
|
||||
(mf/use-fn
|
||||
(mf/deps project)
|
||||
(partial on-delete-project project))
|
||||
|
||||
(fn []
|
||||
(let [accept-fn #(st/emit! (dd/delete-project-immediately project))]
|
||||
(st/emit! (modal/show {:type :confirm
|
||||
:title (tr "dashboard.delete-forever-confirmation.title")
|
||||
:message (tr "dashboard.delete-project-forever-confirmation.description" (:name project))
|
||||
:accept-label (tr "dashboard.delete-forever-confirmation.title")
|
||||
:on-accept accept-fn})))))
|
||||
options
|
||||
(mf/with-memo [on-restore-project on-delete-project]
|
||||
[{:name (tr "dashboard.restore-project-button")
|
||||
@@ -161,7 +151,7 @@
|
||||
menu-icon]]
|
||||
|
||||
(when (:menu-open @local)
|
||||
[:> project-context-menu*
|
||||
[:> deleted-project-menu*
|
||||
{:project project
|
||||
:show (:menu-open @local)
|
||||
:left (+ 24 (:x (:menu-pos @local)))
|
||||
@@ -184,8 +174,8 @@
|
||||
:limit limit
|
||||
:selected-files selected-files}])]]))
|
||||
|
||||
|
||||
(mf/defc menu*
|
||||
{::mf/private true}
|
||||
[{:keys [team-id section]}]
|
||||
(let [on-recent-click
|
||||
(mf/use-fn
|
||||
@@ -232,8 +222,7 @@
|
||||
(some #(= (:id project) (:project-id %))
|
||||
(vals deleted-map)))))
|
||||
(sort-by :modified-at)
|
||||
(reverse)
|
||||
(not-empty)))
|
||||
(reverse)))
|
||||
|
||||
team-id
|
||||
(get team :id)
|
||||
@@ -284,44 +273,37 @@
|
||||
|
||||
[:*
|
||||
[:> header* {:team team}]
|
||||
[:section {:class (stl/css :dashboard-container :no-bg)
|
||||
:data-testid "deleted-page-section"}
|
||||
[:section {:class (stl/css :dashboard-container :no-bg)}
|
||||
[:*
|
||||
[:div {:class (stl/css :no-bg)}
|
||||
|
||||
[:> menu* {:team-id team-id :section :dashboard-deleted}]
|
||||
|
||||
(if (seq projects)
|
||||
[:*
|
||||
[:div {:class (stl/css :deleted-info-content)}
|
||||
[:p {:class (stl/css :deleted-info)}
|
||||
(tr "dashboard.trash-info-text-part1")
|
||||
[:span {:class (stl/css :info-text-highlight)}
|
||||
(tr "dashboard.trash-info-text-part2" deletion-days)]
|
||||
(tr "dashboard.trash-info-text-part3")
|
||||
[:br]
|
||||
(tr "dashboard.trash-info-text-part4")]
|
||||
[:div {:class (stl/css :deleted-options)}
|
||||
[:> button* {:variant "ghost"
|
||||
:type "button"
|
||||
:on-click on-restore-all}
|
||||
(tr "dashboard.restore-all-deleted-button")]
|
||||
[:> button* {:variant "destructive"
|
||||
:type "button"
|
||||
:icon "delete"
|
||||
:on-click on-delete-all}
|
||||
(tr "dashboard.clear-trash-button")]]]
|
||||
[:div {:class (stl/css :deleted-info-content)}
|
||||
[:p {:class (stl/css :deleted-info)}
|
||||
(tr "dashboard.trash-info-text-part1")
|
||||
[:span {:class (stl/css :info-text-highlight)}
|
||||
(tr "dashboard.trash-info-text-part2" deletion-days)]
|
||||
(tr "dashboard.trash-info-text-part3")
|
||||
[:br]
|
||||
(tr "dashboard.trash-info-text-part4")]
|
||||
[:div {:class (stl/css :deleted-options)}
|
||||
[:> button* {:variant "ghost"
|
||||
:type "button"
|
||||
:on-click on-restore-all}
|
||||
(tr "dashboard.restore-all-deleted-button")]
|
||||
[:> button* {:variant "destructive"
|
||||
:type "button"
|
||||
:icon "delete"
|
||||
:on-click on-delete-all}
|
||||
(tr "dashboard.clear-trash-button")]]]
|
||||
|
||||
(for [{:keys [id] :as project} projects]
|
||||
(let [files (when deleted-map
|
||||
(->> (vals deleted-map)
|
||||
(filterv #(= id (:project-id %)))
|
||||
(sort-by :modified-at #(compare %2 %1))))]
|
||||
[:> deleted-project-item* {:project project
|
||||
:files files
|
||||
:key id}]))]
|
||||
|
||||
;; when no deleted projects
|
||||
[:div {:class (stl/css :deleted-info-content)}
|
||||
[:p {:class (stl/css :deleted-info)}
|
||||
(tr "dashboard.deleted.empty-state-description")]])]]]]))
|
||||
(when (seq projects)
|
||||
(for [{:keys [id] :as project} projects]
|
||||
(let [files (when deleted-map
|
||||
(->> (vals deleted-map)
|
||||
(filterv #(= id (:project-id %)))
|
||||
(sort-by :modified-at #(compare %2 %1))))]
|
||||
[:> deleted-project-item* {:project project
|
||||
:files files
|
||||
:key id}])))]]]]))
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
(ns app.main.ui.dashboard.file-menu
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.main.data.common :as dcm]
|
||||
[app.main.data.dashboard :as dd]
|
||||
[app.main.data.event :as-alias ev]
|
||||
@@ -90,12 +89,12 @@
|
||||
on-duplicate
|
||||
(fn [_]
|
||||
(apply st/emit! (map dd/duplicate-file files))
|
||||
(st/emit! (ntf/success (tr "dashboard.success-duplicate-file" (i18n/c file-count)))))
|
||||
(st/emit! (ntf/success (tr "dashboard.success-duplicate-file" (i18n/c (count files))))))
|
||||
|
||||
on-delete-accept
|
||||
(fn [_]
|
||||
(apply st/emit! (map dd/delete-file files))
|
||||
(st/emit! (ntf/success (tr "dashboard.success-delete-file" (i18n/c file-count)))
|
||||
(st/emit! (ntf/success (tr "dashboard.success-delete-file" (i18n/c (count files))))
|
||||
(dd/clear-selected-files)))
|
||||
|
||||
on-delete
|
||||
@@ -194,7 +193,7 @@
|
||||
(fn [_]
|
||||
(st/emit! (dd/restore-files-immediately
|
||||
(with-meta {:team-id (:id current-team)
|
||||
:ids (into #{} d/xf:map-id files)}
|
||||
:ids #{(:id file)}}
|
||||
{:on-success #(st/emit! (ntf/success (tr "dashboard.restore-success-notification" (:name file)))
|
||||
(dd/fetch-projects (:id current-team))
|
||||
(dd/fetch-deleted-files (:id current-team)))
|
||||
@@ -202,7 +201,6 @@
|
||||
|
||||
on-restore-immediately
|
||||
(fn []
|
||||
(prn files)
|
||||
(st/emit!
|
||||
(modal/show {:type :confirm
|
||||
:title (tr "dashboard-restore-file-confirmation.title")
|
||||
@@ -215,7 +213,7 @@
|
||||
(fn []
|
||||
(let [accept-fn #(st/emit! (dd/delete-files-immediately
|
||||
{:team-id (:id current-team)
|
||||
:ids (into #{} d/xf:map-id files)}))]
|
||||
:ids #{(:id file)}}))]
|
||||
(st/emit!
|
||||
(modal/show {:type :confirm
|
||||
:title (tr "dashboard.delete-forever-confirmation.title")
|
||||
@@ -262,12 +260,14 @@
|
||||
|
||||
options
|
||||
(if can-restore
|
||||
[{:name (tr "dashboard.file-menu.restore-files-option" (i18n/c file-count))
|
||||
:id "restore-file"
|
||||
:handler on-restore-immediately}
|
||||
{:name (tr "dashboard.file-menu.delete-files-permanently-option" (i18n/c file-count))
|
||||
:id "delete-file"
|
||||
:handler on-delete-immediately}]
|
||||
[(when can-restore
|
||||
{:name (tr "dashboard.restore-file-button")
|
||||
:id "restore-file"
|
||||
:handler on-restore-immediately})
|
||||
(when can-restore
|
||||
{:name (tr "dashboard.delete-file-button")
|
||||
:id "delete-file"
|
||||
:handler on-delete-immediately})]
|
||||
(if multi?
|
||||
[(when can-edit
|
||||
{:name (tr "dashboard.duplicate-multi" file-count)
|
||||
|
||||
@@ -4,36 +4,35 @@
|
||||
//
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "common/refactor/common-refactor.scss" as deprecated;
|
||||
@use "common/refactor/common-dashboard";
|
||||
@use "ds/typography.scss" as t;
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/spacing.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
@use "ds/z-index.scss" as *;
|
||||
@use "ds/mixins.scss" as *;
|
||||
@use "ds/_utils.scss" as *;
|
||||
@use "../ds/typography.scss" as t;
|
||||
@use "../ds/_borders.scss" as *;
|
||||
@use "../ds/spacing.scss" as *;
|
||||
@use "../ds/_sizes.scss" as *;
|
||||
@use "../ds/z-index.scss" as *;
|
||||
|
||||
.dashboard-container {
|
||||
flex: 1 0 0;
|
||||
inline-size: 100%;
|
||||
width: 100%;
|
||||
margin-inline-end: var(--sp-l);
|
||||
border-block-start: $b-1 solid var(--panel-border-color);
|
||||
border-top: $b-1 solid var(--panel-border-color);
|
||||
overflow-y: auto;
|
||||
padding-block-end: var(--sp-xxxl);
|
||||
padding-bottom: var(--sp-xxxl);
|
||||
}
|
||||
|
||||
.dashboard-projects {
|
||||
user-select: none;
|
||||
block-size: calc(100vh - px2rem(64));
|
||||
height: calc(100vh - deprecated.$s-64);
|
||||
}
|
||||
|
||||
.with-team-hero {
|
||||
block-size: calc(100vh - px2rem(280));
|
||||
height: calc(100vh - deprecated.$s-280);
|
||||
}
|
||||
|
||||
.dashboard-shared {
|
||||
inline-size: calc(100vw - px2rem(320));
|
||||
margin-inline-end: px2rem(52);
|
||||
width: calc(100vw - deprecated.$s-320);
|
||||
margin-inline-end: deprecated.$s-52;
|
||||
}
|
||||
|
||||
.search {
|
||||
@@ -67,8 +66,8 @@
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--sp-s);
|
||||
inline-size: 99%;
|
||||
max-block-size: $sz-40;
|
||||
width: 99%;
|
||||
max-height: $sz-40;
|
||||
padding: var(--sp-s) var(--sp-s) var(--sp-s) var(--sp-l);
|
||||
margin-block-start: var(--sp-l);
|
||||
border-radius: $br-4;
|
||||
@@ -78,19 +77,19 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
inline-size: 100%;
|
||||
min-block-size: $sz-32;
|
||||
width: 100%;
|
||||
min-height: var(--sp-xxxl);
|
||||
margin-inline-start: var(--sp-s);
|
||||
}
|
||||
|
||||
.project-name {
|
||||
@include textEllipsis;
|
||||
@include t.use-typography("body-large");
|
||||
width: fit-content;
|
||||
margin-inline-end: var(--sp-m);
|
||||
line-height: 0.8;
|
||||
color: var(--title-foreground-color-hover);
|
||||
cursor: pointer;
|
||||
block-size: $sz-16;
|
||||
line-height: 0.8;
|
||||
margin-inline-end: var(--sp-m);
|
||||
height: var(--sp-l);
|
||||
}
|
||||
|
||||
.info-wrapper {
|
||||
@@ -117,8 +116,8 @@
|
||||
.add-file-btn,
|
||||
.options-btn {
|
||||
@extend .button-tertiary;
|
||||
block-size: $sz-32;
|
||||
inline-size: $sz-32;
|
||||
height: var(--sp-xxxl);
|
||||
width: var(--sp-xxxl);
|
||||
margin: 0 var(--sp-s);
|
||||
padding: var(--sp-s);
|
||||
}
|
||||
@@ -130,7 +129,7 @@
|
||||
}
|
||||
|
||||
.grid-container {
|
||||
inline-size: 100%;
|
||||
width: 100%;
|
||||
padding: 0 var(--sp-xs);
|
||||
}
|
||||
|
||||
@@ -140,13 +139,11 @@
|
||||
|
||||
.show-more {
|
||||
--show-more-color: var(--button-secondary-foreground-color-rest);
|
||||
@include deprecated.buttonStyle;
|
||||
@include t.use-typography("body-medium");
|
||||
border: none;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
inset-block-start: var(--sp-s);
|
||||
inset-inline-end: px2rem(52);
|
||||
top: var(--sp-s);
|
||||
right: deprecated.$s-52;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@@ -159,8 +156,8 @@
|
||||
}
|
||||
|
||||
.show-more-icon {
|
||||
block-size: $sz-16;
|
||||
inline-size: $sz-16;
|
||||
height: var(--sp-l);
|
||||
width: var(--sp-l);
|
||||
fill: none;
|
||||
stroke: var(--show-more-color);
|
||||
}
|
||||
@@ -168,7 +165,7 @@
|
||||
// Team hero
|
||||
.team-hero {
|
||||
background-color: var(--color-background-tertiary);
|
||||
border-radius: $br-8;
|
||||
border-radius: deprecated.$br-8;
|
||||
border: none;
|
||||
display: flex;
|
||||
margin: var(--sp-l);
|
||||
@@ -177,11 +174,12 @@
|
||||
|
||||
img {
|
||||
border-radius: $br-4;
|
||||
inline-size: auto;
|
||||
height: var(--sp-xl) 0;
|
||||
width: auto;
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
display: none;
|
||||
inline-size: 0;
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -195,8 +193,9 @@
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: $sz-24;
|
||||
color: var(--color-foreground-primary);
|
||||
font-size: px2rem(24);
|
||||
font-weight: deprecated.$fw400;
|
||||
}
|
||||
|
||||
.info {
|
||||
@@ -216,8 +215,8 @@
|
||||
--close-icon-foreground-color: var(--icon-foreground);
|
||||
position: absolute;
|
||||
top: var(--sp-xl);
|
||||
inset-inline-end: var(--sp-xxl);
|
||||
inline-size: var(--sp-xxl);
|
||||
right: var(--sp-xxl);
|
||||
width: var(--sp-xxl);
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
@@ -232,20 +231,20 @@
|
||||
}
|
||||
|
||||
.invite {
|
||||
block-size: $sz-32;
|
||||
inline-size: px2rem(180);
|
||||
height: var(--sp-xxxl);
|
||||
width: deprecated.$s-180;
|
||||
}
|
||||
|
||||
.img-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
inline-size: var(--sp-xl) 0;
|
||||
block-size: var(--sp-xl) 0;
|
||||
width: var(--sp-xl) 0;
|
||||
height: var(--sp-xl) 0;
|
||||
overflow: hidden;
|
||||
border-radius: $br-4;
|
||||
border-radius: deprecated.$br-4;
|
||||
@media (max-width: 1200px) {
|
||||
display: none;
|
||||
inline-size: 0;
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
49
frontend/src/app/main/ui/ds/layers/layer_button.cljs
Normal file
@@ -0,0 +1,49 @@
|
||||
;; 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.ui.ds.layers.layer-button
|
||||
(:require-macros
|
||||
[app.main.style :as stl])
|
||||
(:require
|
||||
[app.main.ui.ds.foundations.assets.icon :as i :refer [icon*]]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(def ^:private schema:layer-button
|
||||
[:map
|
||||
[:label :string]
|
||||
[:description {:optional true} [:maybe :string]]
|
||||
[:class {:optional true} :string]
|
||||
[:expandable {:optional true} :boolean]
|
||||
[:expanded {:optional true} :boolean]
|
||||
[:icon {:optional true} :string]
|
||||
[:on-toggle-expand fn?]])
|
||||
|
||||
(mf/defc layer-button*
|
||||
{::mf/schema schema:layer-button}
|
||||
[{:keys [label description class is-expandable expanded icon on-toggle-expand children] :rest props}]
|
||||
(let [button-props (mf/spread-props props
|
||||
{:class [class (stl/css-case :layer-button true
|
||||
:layer-button--expandable is-expandable
|
||||
:layer-button--expanded expanded)]
|
||||
:type "button"
|
||||
:on-click on-toggle-expand})]
|
||||
[:div {:class (stl/css :layer-button-wrapper)}
|
||||
[:> "button" button-props
|
||||
[:div {:class (stl/css :layer-button-content)}
|
||||
(when is-expandable
|
||||
(if expanded
|
||||
[:> icon* {:icon-id i/arrow-down :class (stl/css :folder-node-icon)}]
|
||||
[:> icon* {:icon-id i/arrow-right :class (stl/css :folder-node-icon)}]))
|
||||
(when icon
|
||||
[:> icon* {:icon-id icon :class (stl/css :layer-button-icon)}])
|
||||
[:span {:class (stl/css :layer-button-name)}
|
||||
label]
|
||||
(when description
|
||||
[:span {:class (stl/css :layer-button-description)}
|
||||
description])
|
||||
[:span {:class (stl/css :layer-button-quantity)}]]]
|
||||
[:div {:class (stl/css :layer-button-actions)}
|
||||
children]]))
|
||||
56
frontend/src/app/main/ui/ds/layers/layer_button.scss
Normal file
@@ -0,0 +1,56 @@
|
||||
// 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
|
||||
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
@use "ds/typography.scss" as *;
|
||||
@use "ds/colors.scss" as *;
|
||||
|
||||
.layer-button-wrapper {
|
||||
--layer-button-block-size: #{$sz-32};
|
||||
--layer-button-background: var(--color-background-primary);
|
||||
--layer-button-text: var(--color-foreground-secondary);
|
||||
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
block-size: var(--layer-button-block-size);
|
||||
|
||||
background: var(--layer-button-background);
|
||||
color: var(--layer-button-text);
|
||||
}
|
||||
|
||||
.layer-button {
|
||||
@include use-typography("body-small");
|
||||
|
||||
appearance: none;
|
||||
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
border: none;
|
||||
background: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.layer-button--expanded {
|
||||
& .layer-button-name {
|
||||
color: var(--color-foreground-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.layer-button-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--sp-xs);
|
||||
}
|
||||
|
||||
.layer-button-description {
|
||||
padding: var(--sp-xs);
|
||||
background-color: var(--color-background-tertiary);
|
||||
border-radius: $br-6;
|
||||
}
|
||||
@@ -10,7 +10,6 @@ $z-index-200: 200;
|
||||
$z-index-300: 300;
|
||||
$z-index-400: 400;
|
||||
$z-index-500: 500;
|
||||
$z-index-600: 600;
|
||||
|
||||
:global(:root) {
|
||||
--z-index-auto: #{$z-index-auto}; // Index for elements such as workspace, rulers ...
|
||||
@@ -19,5 +18,4 @@ $z-index-600: 600;
|
||||
--z-index-set: #{$z-index-300}; // Index for configuration elements like modals, color picker, grid edition elements
|
||||
--z-index-dropdown: #{$z-index-400}; // Index for dropdown like elements, selects, menus, dropdowns
|
||||
--z-index-notifications: #{$z-index-500}; // Index for notification
|
||||
--z-index-loaders: #{$z-index-600}; // Index for loaders
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
[:div {:class (stl/css :modal-container)}
|
||||
[:div {:class (stl/css :modal-header)}
|
||||
[:h2 {:class (stl/css :modal-title)}
|
||||
(tr "files-download-modal.title")]
|
||||
(tr "dashboard.export.title")]
|
||||
[:button {:class (stl/css :modal-close-btn)
|
||||
:on-click on-cancel} deprecated-icon/close]]
|
||||
|
||||
@@ -129,8 +129,8 @@
|
||||
(= status :prepare)
|
||||
[:*
|
||||
[:div {:class (stl/css :modal-content)}
|
||||
[:p {:class (stl/css :modal-msg)} (tr "files-download-modal.description-1")]
|
||||
[:p {:class (stl/css :modal-scd-msg)} (tr "files-download-modal.description-2")]
|
||||
[:p {:class (stl/css :modal-msg)} (tr "dashboard.export.explain")]
|
||||
[:p {:class (stl/css :modal-scd-msg)} (tr "dashboard.export.detail")]
|
||||
|
||||
(for [type fexp/valid-types]
|
||||
[:div {:class (stl/css :export-option true)
|
||||
@@ -138,20 +138,20 @@
|
||||
[:label {:for (str "export-" type)
|
||||
:class (stl/css-case :global/checked (= selected type))}
|
||||
;; Execution time translation strings:
|
||||
;; (tr "files-download-modal.options.all.message")
|
||||
;; (tr "files-download-modal.options.all.title")
|
||||
;; (tr "files-download-modal.options.detach.message")
|
||||
;; (tr "files-download-modal.options.detach.title")
|
||||
;; (tr "files-download-modal.options.merge.message")
|
||||
;; (tr "files-download-modal.options.merge.title")
|
||||
;; (tr "dashboard.export.options.all.message")
|
||||
;; (tr "dashboard.export.options.all.title")
|
||||
;; (tr "dashboard.export.options.detach.message")
|
||||
;; (tr "dashboard.export.options.detach.title")
|
||||
;; (tr "dashboard.export.options.merge.message")
|
||||
;; (tr "dashboard.export.options.merge.title")
|
||||
[:span {:class (stl/css-case :global/checked (= selected type))}
|
||||
(when (= selected type)
|
||||
deprecated-icon/status-tick)]
|
||||
[:div {:class (stl/css :option-content)}
|
||||
[:h3 {:class (stl/css :modal-subtitle)}
|
||||
(tr (dm/str "files-download-modal.options." (d/name type) ".title"))]
|
||||
(tr (dm/str "dashboard.export.options." (d/name type) ".title"))]
|
||||
[:p {:class (stl/css :modal-msg)}
|
||||
(tr (dm/str "files-download-modal.options." (d/name type) ".message"))]]
|
||||
(tr (dm/str "dashboard.export.options." (d/name type) ".message"))]]
|
||||
|
||||
[:input {:type "radio"
|
||||
:class (stl/css :option-input)
|
||||
|
||||
@@ -308,16 +308,6 @@
|
||||
[:div {:class (stl/css :sign-info)}
|
||||
[:button {:on-click on-click} (tr "labels.retry")]]]))
|
||||
|
||||
(mf/defc webgl-context-lost*
|
||||
[]
|
||||
(let [on-reload (mf/use-fn #(js/location.reload))]
|
||||
[:> error-container* {}
|
||||
[:div {:class (stl/css :main-message)} (tr "errors.webgl-context-lost.main-message")]
|
||||
[:div {:class (stl/css :desc-message)} (tr "errors.webgl-context-lost.desc-message")]
|
||||
[:div {:class (stl/css :buttons-container)}
|
||||
[:> button* {:variant "primary" :on-click on-reload}
|
||||
(tr "labels.reload-page")]]]))
|
||||
|
||||
(defn- generate-report
|
||||
[data]
|
||||
(try
|
||||
@@ -447,7 +437,6 @@
|
||||
(rx/of default)
|
||||
(rx/throw cause)))))))
|
||||
|
||||
|
||||
(mf/defc exception-section*
|
||||
{::mf/private true}
|
||||
[{:keys [data route] :as props}]
|
||||
@@ -480,9 +469,6 @@
|
||||
:service-unavailable
|
||||
[:> service-unavailable*]
|
||||
|
||||
:webgl-context-lost
|
||||
[:> webgl-context-lost*]
|
||||
|
||||
[:> internal-error* props])))
|
||||
|
||||
(mf/defc context-wrapper*
|
||||
|
||||
@@ -217,10 +217,6 @@
|
||||
|
||||
design-tokens? (features/use-feature "design-tokens/v1")
|
||||
|
||||
wasm-renderer-enabled? (features/use-feature "render-wasm/v1")
|
||||
|
||||
first-frame-rendered? (mf/use-state false)
|
||||
|
||||
background-color (:background-color wglobal)]
|
||||
|
||||
(mf/with-effect []
|
||||
@@ -245,17 +241,6 @@
|
||||
(when (and file-loaded? (not page-id))
|
||||
(st/emit! (dcm/go-to-workspace :file-id file-id ::rt/replace true))))
|
||||
|
||||
(mf/with-effect [file-id page-id]
|
||||
(reset! first-frame-rendered? false))
|
||||
|
||||
(mf/with-effect []
|
||||
(let [handle-wasm-render
|
||||
(fn [_]
|
||||
(reset! first-frame-rendered? true))
|
||||
listener-key (events/listen globals/document "penpot:wasm:render" handle-wasm-render)]
|
||||
(fn []
|
||||
(events/unlistenByKey listener-key))))
|
||||
|
||||
[:> (mf/provider ctx/current-project-id) {:value project-id}
|
||||
[:> (mf/provider ctx/current-file-id) {:value file-id}
|
||||
[:> (mf/provider ctx/current-page-id) {:value page-id}
|
||||
@@ -264,22 +249,15 @@
|
||||
[:> modal-container*]
|
||||
[:section {:class (stl/css :workspace)
|
||||
:style {:background-color background-color
|
||||
:touch-action "none"
|
||||
:position "relative"}}
|
||||
:touch-action "none"}}
|
||||
[:> context-menu*]
|
||||
(when (and file-loaded? page-id)
|
||||
(if (and file-loaded? page-id)
|
||||
[:> workspace-inner*
|
||||
{:page-id page-id
|
||||
:file-id file-id
|
||||
:file file
|
||||
:wglobal wglobal
|
||||
:layout layout}])
|
||||
(when (or (not (and file-loaded? page-id))
|
||||
;; in wasm renderer, extend the pixel loader until the first frame is rendered
|
||||
;; but do not apply it when switching pages
|
||||
(and wasm-renderer-enabled?
|
||||
(not file-loaded?)
|
||||
(not @first-frame-rendered?)))
|
||||
:layout layout}]
|
||||
[:> workspace-loader*])]]]]]]))
|
||||
|
||||
(mf/defc workspace-page*
|
||||
|
||||
@@ -20,13 +20,7 @@
|
||||
}
|
||||
|
||||
.workspace-loader {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: var(--z-index-loaders);
|
||||
background-color: var(--color-background-primary);
|
||||
grid-area: viewport;
|
||||
}
|
||||
|
||||
.workspace-content {
|
||||
|
||||
@@ -33,24 +33,9 @@
|
||||
[okulary.core :as l]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
;; Coalesce sidebar hover highlights to 1 frame to avoid long tasks
|
||||
(defonce ^:private sidebar-hover-queue (atom {:enter #{} :leave #{}}))
|
||||
(defonce ^:private sidebar-hover-pending? (atom false))
|
||||
|
||||
(defn- schedule-sidebar-hover-flush []
|
||||
(when (compare-and-set! sidebar-hover-pending? false true)
|
||||
(ts/raf
|
||||
(fn []
|
||||
(let [{:keys [enter leave]} (swap! sidebar-hover-queue (constantly {:enter #{} :leave #{}}))]
|
||||
(reset! sidebar-hover-pending? false)
|
||||
(when (seq leave)
|
||||
(apply st/emit! (map dw/dehighlight-shape leave)))
|
||||
(when (seq enter)
|
||||
(apply st/emit! (map dw/highlight-shape enter))))))))
|
||||
|
||||
(mf/defc layer-item-inner
|
||||
{::mf/wrap-props false}
|
||||
[{:keys [item depth parent-size name-ref children ref style
|
||||
[{:keys [item depth parent-size name-ref children ref
|
||||
;; Flags
|
||||
read-only? highlighted? selected? component-tree?
|
||||
filtered? expanded? dnd-over? dnd-over-top? dnd-over-bot? hide-toggle?
|
||||
@@ -97,8 +82,7 @@
|
||||
:dnd-over dnd-over?
|
||||
:dnd-over-top dnd-over-top?
|
||||
:dnd-over-bot dnd-over-bot?
|
||||
:root-board parent-board?)
|
||||
:style style}
|
||||
:root-board parent-board?)}
|
||||
[:span {:class (stl/css-case
|
||||
:tab-indentation true
|
||||
:filtered filtered?)
|
||||
@@ -182,12 +166,10 @@
|
||||
|
||||
children]))
|
||||
|
||||
;; Memoized for performance
|
||||
(mf/defc layer-item
|
||||
{::mf/props :obj
|
||||
::mf/wrap [mf/memo]}
|
||||
[{:keys [index item selected objects sortable? filtered? depth parent-size component-child? highlighted style render-children?]
|
||||
:or {render-children? true}}]
|
||||
::mf/memo true}
|
||||
[{:keys [index item selected objects sortable? filtered? depth parent-size component-child? highlighted]}]
|
||||
(let [id (:id item)
|
||||
blocked? (:blocked item)
|
||||
hidden? (:hidden item)
|
||||
@@ -264,21 +246,13 @@
|
||||
(mf/use-fn
|
||||
(mf/deps id)
|
||||
(fn [_]
|
||||
(swap! sidebar-hover-queue (fn [{:keys [enter leave] :as q}]
|
||||
(-> q
|
||||
(assoc :enter (conj enter id))
|
||||
(assoc :leave (disj leave id)))))
|
||||
(schedule-sidebar-hover-flush)))
|
||||
(st/emit! (dw/highlight-shape id))))
|
||||
|
||||
on-pointer-leave
|
||||
(mf/use-fn
|
||||
(mf/deps id)
|
||||
(fn [_]
|
||||
(swap! sidebar-hover-queue (fn [{:keys [enter leave] :as q}]
|
||||
(-> q
|
||||
(assoc :enter (disj enter id))
|
||||
(assoc :leave (conj leave id)))))
|
||||
(schedule-sidebar-hover-flush)))
|
||||
(st/emit! (dw/dehighlight-shape id))))
|
||||
|
||||
on-context-menu
|
||||
(mf/use-fn
|
||||
@@ -364,18 +338,14 @@
|
||||
component-tree? (or component-child? (ctk/instance-root? item) (ctk/instance-head? item))
|
||||
|
||||
enable-drag (mf/use-fn #(reset! drag-disabled* false))
|
||||
disable-drag (mf/use-fn #(reset! drag-disabled* true))
|
||||
|
||||
;; Lazy loading of child elements via IntersectionObserver
|
||||
children-count* (mf/use-state 0)
|
||||
children-count (deref children-count*)
|
||||
lazy-ref (mf/use-ref nil)
|
||||
observer-var (mf/use-var nil)
|
||||
chunk-size 50]
|
||||
disable-drag (mf/use-fn #(reset! drag-disabled* true))]
|
||||
|
||||
(mf/with-effect [selected? selected]
|
||||
(let [single? (= (count selected) 1)
|
||||
node (mf/ref-val ref)
|
||||
;; NOTE: Neither get-parent-at nor get-parent-with-selector
|
||||
;; work if the component template changes, so we need to
|
||||
;; seek for an alternate solution. Maybe use-context?
|
||||
scroll-node (dom/get-parent-with-data node "scroll-container")
|
||||
parent-node (dom/get-parent-at node 2)
|
||||
first-child-node (dom/get-first-child parent-node)
|
||||
@@ -393,61 +363,6 @@
|
||||
#(when (some? subid)
|
||||
(rx/dispose! subid))))
|
||||
|
||||
;; Setup scroll-driven lazy loading when expanded
|
||||
;; and ensures selected children are loaded immediately
|
||||
(mf/with-effect [expanded? (:shapes item) selected]
|
||||
(let [shapes-vec (:shapes item)
|
||||
total (count shapes-vec)]
|
||||
(if expanded?
|
||||
(let [;; Children are rendered in reverse order, so index 0 in render = last in shapes-vec
|
||||
;; Find if any selected id is a direct child and get its render index
|
||||
selected-child-render-idx
|
||||
(when (and (> total chunk-size) (seq selected))
|
||||
(let [shapes-reversed (vec (reverse shapes-vec))]
|
||||
(some (fn [sel-id]
|
||||
(let [idx (.indexOf shapes-reversed sel-id)]
|
||||
(when (>= idx 0) idx)))
|
||||
selected)))
|
||||
;; Load at least enough to include the selected child plus extra
|
||||
;; for context (so it can be centered in the scroll view)
|
||||
min-count (if selected-child-render-idx
|
||||
(+ selected-child-render-idx chunk-size)
|
||||
chunk-size)
|
||||
current @children-count*
|
||||
new-count (min total (max current chunk-size min-count))]
|
||||
(reset! children-count* new-count))
|
||||
(reset! children-count* 0)))
|
||||
(fn []
|
||||
(when-let [obs ^js @observer-var]
|
||||
(.disconnect obs)
|
||||
(reset! observer-var nil))))
|
||||
|
||||
;; Re-observe sentinel whenever children-count changes (sentinel moves)
|
||||
(mf/with-effect [children-count expanded?]
|
||||
(let [total (count (:shapes item))
|
||||
node (mf/ref-val ref)
|
||||
scroll-node (dom/get-parent-with-data node "scroll-container")
|
||||
lazy-node (mf/ref-val lazy-ref)]
|
||||
;; Disconnect previous observer
|
||||
(when-let [obs ^js @observer-var]
|
||||
(.disconnect obs)
|
||||
(reset! observer-var nil))
|
||||
;; Setup new observer if there are more children to load
|
||||
(when (and expanded?
|
||||
(< children-count total)
|
||||
scroll-node
|
||||
lazy-node)
|
||||
(let [cb (fn [entries]
|
||||
(when (and (seq entries)
|
||||
(.-isIntersecting (first entries)))
|
||||
;; Load next chunk when sentinel intersects
|
||||
(let [current @children-count*
|
||||
next-count (min total (+ current chunk-size))]
|
||||
(reset! children-count* next-count))))
|
||||
observer (js/IntersectionObserver. cb #js {:root scroll-node})]
|
||||
(.observe observer lazy-node)
|
||||
(reset! observer-var observer)))))
|
||||
|
||||
[:& layer-item-inner
|
||||
{:ref dref
|
||||
:item item
|
||||
@@ -472,32 +387,24 @@
|
||||
:on-enable-drag enable-drag
|
||||
:on-disable-drag disable-drag
|
||||
:on-toggle-visibility toggle-visibility
|
||||
:on-toggle-blocking toggle-blocking
|
||||
:style style}
|
||||
:on-toggle-blocking toggle-blocking}
|
||||
|
||||
(when (and render-children?
|
||||
(:shapes item)
|
||||
expanded?)
|
||||
(when (and (:shapes item) expanded?)
|
||||
[:div {:class (stl/css-case
|
||||
:element-children true
|
||||
:parent-selected selected?
|
||||
:sticky-children parent-board?)
|
||||
:data-testid (dm/str "children-" id)}
|
||||
(let [all-children (reverse (d/enumerate (:shapes item)))
|
||||
visible (take children-count all-children)]
|
||||
(for [[index id] visible]
|
||||
(when-let [item (get objects id)]
|
||||
[:& layer-item
|
||||
{:item item
|
||||
:highlighted highlighted
|
||||
:selected selected
|
||||
:index index
|
||||
:objects objects
|
||||
:key (dm/str id)
|
||||
:sortable? sortable?
|
||||
:depth depth
|
||||
:parent-size parent-size
|
||||
:component-child? component-tree?}])))
|
||||
(when (< children-count (count (:shapes item)))
|
||||
[:div {:ref lazy-ref
|
||||
:style {:min-height 1}}])])]))
|
||||
(for [[index id] (reverse (d/enumerate (:shapes item)))]
|
||||
(when-let [item (get objects id)]
|
||||
[:& layer-item
|
||||
{:item item
|
||||
:highlighted highlighted
|
||||
:selected selected
|
||||
:index index
|
||||
:objects objects
|
||||
:key (dm/str id)
|
||||
:sortable? sortable?
|
||||
:depth depth
|
||||
:parent-size parent-size
|
||||
:component-child? component-tree?}]))])]))
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
modifiers (dm/get-in modifiers [shape-id :modifiers])
|
||||
|
||||
shape (gsh/transform-shape shape modifiers)
|
||||
props (mf/spread-props props {:shape shape :file-id file-id :page-id page-id :libraries libraries})]
|
||||
props (mf/spread-props props {:shape shape :file-id file-id :page-id page-id})]
|
||||
|
||||
(case shape-type
|
||||
:frame [:> frame/options* props]
|
||||
@@ -116,29 +116,13 @@
|
||||
(->> (dm/get-in grid-edition [edition :selected])
|
||||
(map #(dm/get-in objects [edition :layout-grid-cells %])))
|
||||
|
||||
shapes-with-children*
|
||||
(mf/use-state nil)
|
||||
|
||||
_ (mf/use-effect
|
||||
(mf/deps selected objects shapes)
|
||||
(fn []
|
||||
(reset! shapes-with-children* nil)
|
||||
(let [result
|
||||
(loop [queue (into #queue [] selected)
|
||||
visited selected]
|
||||
(if-let [id (peek queue)]
|
||||
(let [shape (get objects id)
|
||||
children (:shapes shape)]
|
||||
(if (seq children)
|
||||
(let [new-children (remove visited children)]
|
||||
(recur (into (pop queue) new-children)
|
||||
(into visited new-children)))
|
||||
(recur (pop queue) visited)))
|
||||
(sequence (keep (d/getf objects)) visited)))]
|
||||
(reset! shapes-with-children* result))))
|
||||
|
||||
shapes-with-children
|
||||
(deref shapes-with-children*)
|
||||
(mf/with-memo [selected objects shapes]
|
||||
(let [xform (comp (remove nil?)
|
||||
(mapcat #(cfh/get-children-ids objects %)))
|
||||
selected (into selected xform selected)]
|
||||
(sequence (keep (d/getf objects)) selected)))
|
||||
|
||||
|
||||
total-selected
|
||||
(count selected)]
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
[app.main.data.helpers :as dsh]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.data.workspace :as dw]
|
||||
[app.main.features :as features]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.store :as st]
|
||||
[app.main.ui.components.title-bar :refer [title-bar*]]
|
||||
@@ -23,11 +22,9 @@
|
||||
[app.main.ui.hooks :as hooks]
|
||||
[app.main.ui.icons :as deprecated-icon]
|
||||
[app.main.ui.notifications.badge :refer [badge-notification]]
|
||||
[app.render-wasm.api :as wasm.api]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.i18n :as i18n :refer [tr]]
|
||||
[app.util.keyboard :as kbd]
|
||||
[app.util.timers :as timers]
|
||||
[cuerdas.core :as str]
|
||||
[okulary.core :as l]
|
||||
[rumext.v2 :as mf]))
|
||||
@@ -55,8 +52,6 @@
|
||||
refs/workspace-data
|
||||
=))
|
||||
|
||||
|
||||
|
||||
;; --- Page Item
|
||||
|
||||
(mf/defc page-item
|
||||
@@ -68,22 +63,6 @@
|
||||
navigate-fn (mf/use-fn (mf/deps id) #(st/emit! :interrupt (dcm/go-to-workspace :page-id id)))
|
||||
read-only? (mf/use-ctx ctx/workspace-read-only?)
|
||||
|
||||
on-click
|
||||
(mf/use-fn
|
||||
(mf/deps id)
|
||||
(fn []
|
||||
;; when using the wasm renderer, apply a blur effect to the viewport canvas
|
||||
(if (features/active-feature? @st/state "render-wasm/v1")
|
||||
(do
|
||||
(wasm.api/capture-canvas-pixels)
|
||||
(wasm.api/apply-canvas-blur)
|
||||
;; NOTE: it seems we need two RAF so the blur is actually applied and visible
|
||||
;; in the canvas :(
|
||||
(timers/raf
|
||||
(fn []
|
||||
(timers/raf navigate-fn))))
|
||||
(navigate-fn))))
|
||||
|
||||
on-delete
|
||||
(mf/use-fn
|
||||
(mf/deps id)
|
||||
@@ -176,7 +155,7 @@
|
||||
:selected selected?)
|
||||
:data-testid (dm/str "page-" id)
|
||||
:tab-index "0"
|
||||
:on-click on-click
|
||||
:on-click navigate-fn
|
||||
:on-double-click on-double-click
|
||||
:on-context-menu on-context-menu}
|
||||
[:div {:class (stl/css :page-icon)}
|
||||
|
||||
@@ -44,6 +44,39 @@
|
||||
[(seq (array/sort! empty))
|
||||
(seq (array/sort! filled))]))))
|
||||
|
||||
(mf/defc selected-set-info*
|
||||
{::mf/private true}
|
||||
[{:keys [tokens-lib selected-token-set-id]}]
|
||||
(let [selected-token-set
|
||||
(mf/with-memo [tokens-lib]
|
||||
(when selected-token-set-id
|
||||
(some-> tokens-lib (ctob/get-set selected-token-set-id))))
|
||||
|
||||
active-token-sets-names
|
||||
(mf/with-memo [tokens-lib]
|
||||
(some-> tokens-lib (ctob/get-active-themes-set-names)))
|
||||
|
||||
token-set-active?
|
||||
(mf/use-fn
|
||||
(mf/deps active-token-sets-names)
|
||||
(fn [name]
|
||||
(contains? active-token-sets-names name)))]
|
||||
[:div {:class (stl/css :sets-header-container)}
|
||||
[:> text* {:as "span"
|
||||
:typography "headline-small"
|
||||
:class (stl/css :sets-header)}
|
||||
(tr "workspace.tokens.tokens-section-title" (ctob/get-name selected-token-set))]
|
||||
[:div {:class (stl/css :sets-header-status) :title (tr "workspace.tokens.inactive-set-description")}
|
||||
;; NOTE: when no set in tokens-lib, the selected-token-set-id
|
||||
;; will be `nil`, so for properly hide the inactive message we
|
||||
;; check that at least `selected-token-set-id` has a value
|
||||
(when (and (some? selected-token-set-id)
|
||||
(not (token-set-active? (ctob/get-name selected-token-set))))
|
||||
[:*
|
||||
[:> icon* {:class (stl/css :sets-header-status-icon) :icon-id i/eye-off}]
|
||||
[:> text* {:as "span" :typography "body-small" :class (stl/css :sets-header-status-text)}
|
||||
(tr "workspace.tokens.inactive-set")]])]]))
|
||||
|
||||
(mf/defc tokens-section*
|
||||
{::mf/private true}
|
||||
[{:keys [tokens-lib active-tokens resolved-active-tokens]}]
|
||||
@@ -65,9 +98,7 @@
|
||||
selected-token-set-id
|
||||
(mf/deref refs/selected-token-set-id)
|
||||
|
||||
selected-token-set
|
||||
(when selected-token-set-id
|
||||
(some-> tokens-lib (ctob/get-set selected-token-set-id)))
|
||||
|
||||
|
||||
;; If we have not selected any set explicitly we just
|
||||
;; select the first one from the list of sets
|
||||
@@ -92,15 +123,9 @@
|
||||
tokens)]
|
||||
(ctob/group-by-type tokens)))
|
||||
|
||||
active-token-sets-names
|
||||
(mf/with-memo [tokens-lib]
|
||||
(some-> tokens-lib (ctob/get-active-themes-set-names)))
|
||||
|
||||
token-set-active?
|
||||
(mf/use-fn
|
||||
(mf/deps active-token-sets-names)
|
||||
(fn [name]
|
||||
(contains? active-token-sets-names name)))
|
||||
|
||||
|
||||
|
||||
[empty-group filled-group]
|
||||
(mf/with-memo [tokens-by-type]
|
||||
@@ -118,34 +143,27 @@
|
||||
|
||||
[:*
|
||||
[:& token-context-menu]
|
||||
[:div {:class (stl/css :sets-header-container)}
|
||||
[:> text* {:as "span" :typography "headline-small" :class (stl/css :sets-header)} (tr "workspace.tokens.tokens-section-title" (ctob/get-name selected-token-set))]
|
||||
[:div {:class (stl/css :sets-header-status) :title (tr "workspace.tokens.inactive-set-description")}
|
||||
;; NOTE: when no set in tokens-lib, the selected-token-set-id
|
||||
;; will be `nil`, so for properly hide the inactive message we
|
||||
;; check that at least `selected-token-set-id` has a value
|
||||
(when (and (some? selected-token-set-id)
|
||||
(not (token-set-active? (ctob/get-name selected-token-set))))
|
||||
[:*
|
||||
[:> icon* {:class (stl/css :sets-header-status-icon) :icon-id i/eye-off}]
|
||||
[:> text* {:as "span" :typography "body-small" :class (stl/css :sets-header-status-text)}
|
||||
(tr "workspace.tokens.inactive-set")]])]]
|
||||
|
||||
[:& selected-set-info* {:tokens-lib tokens-lib
|
||||
:selected-token-set-id selected-token-set-id}]
|
||||
|
||||
(for [type filled-group]
|
||||
(let [tokens (get tokens-by-type type)]
|
||||
[:> token-group* {:key (name type)
|
||||
:is-open (get open-status type false)
|
||||
:tokens tokens
|
||||
:is-expanded (get open-status type false)
|
||||
:type type
|
||||
:selected-ids selected
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens resolved-active-tokens
|
||||
:tokens tokens}]))
|
||||
:tokens-lib tokens-lib
|
||||
:selected-token-set-id selected-token-set-id}]))
|
||||
|
||||
(for [type empty-group]
|
||||
[:> token-group* {:key (name type)
|
||||
:tokens []
|
||||
:type type
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout :is-selected-inside-layout
|
||||
:active-theme-tokens resolved-active-tokens
|
||||
:tokens []}])]))
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens resolved-active-tokens}])]))
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
(ns app.main.ui.workspace.tokens.management.forms.controls.input
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.files.tokens :as cft]
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[app.main.data.style-dictionary :as sd]
|
||||
[app.main.data.workspace.tokens.format :as dwtf]
|
||||
@@ -293,7 +292,7 @@
|
||||
(mf/spread-props props {:hint-formated true})
|
||||
props)]
|
||||
|
||||
(mf/with-effect [resolve-stream tokens token input-name name]
|
||||
(mf/with-effect [resolve-stream tokens token input-name]
|
||||
(let [subs (->> resolve-stream
|
||||
(rx/debounce 300)
|
||||
(rx/mapcat (partial resolve-value tokens token))
|
||||
@@ -318,21 +317,11 @@
|
||||
(reset! hint* {:message error' :type "error"}))
|
||||
|
||||
:else
|
||||
(let [input-value (get-in @form [:data :value input-name] "")
|
||||
resolved-value (if (= name :line-height)
|
||||
(when-let [{:keys [unit value]} (cft/parse-token-value input-value)]
|
||||
(let [font-size (get-in @form [:data :value :font-size] "")
|
||||
calculated (case unit
|
||||
"%" (/ (d/parse-double value) 100)
|
||||
"px" (/ (d/parse-double value) (d/parse-double font-size))
|
||||
nil value
|
||||
nil)]
|
||||
(dwtf/format-token-value calculated)))
|
||||
(dwtf/format-token-value value))
|
||||
message (tr "workspace.tokens.resolved-value" (or resolved-value value))]
|
||||
(let [message (tr "workspace.tokens.resolved-value" (dwtf/format-token-value value))
|
||||
input-value (get-in @form [:data :value input-name] "")]
|
||||
(swap! form update :errors dissoc :value)
|
||||
(swap! form update :extra-errors dissoc :value)
|
||||
(if (= input-value (str resolved-value))
|
||||
(if (= input-value (str value))
|
||||
(reset! hint* {})
|
||||
(reset! hint* {:message message :type "hint"})))))))]
|
||||
(fn []
|
||||
@@ -360,7 +349,6 @@
|
||||
(let [form (mf/use-ctx fc/context)
|
||||
input-name name
|
||||
|
||||
|
||||
error
|
||||
(get-in @form [:errors :value value-subfield index input-name])
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
on-change
|
||||
(mf/use-fn
|
||||
(mf/deps input-name)
|
||||
(fn [id]
|
||||
(let [is-inner? (= id "inner")]
|
||||
(fn [type]
|
||||
(let [is-inner? (= type "inner")]
|
||||
(swap! form assoc-in [:data :value indexed-type index input-name] is-inner?))))
|
||||
|
||||
props (mf/spread-props props {:default-selected (if value "inner" "drop")
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
[token index prop value-subfield]
|
||||
(let [value (get-in token [:value value-subfield index prop])]
|
||||
(d/without-nils
|
||||
{:type (if (= prop :color) :color :dimensions)
|
||||
{:type (if (= prop :color) :color :number)
|
||||
:value value})))
|
||||
|
||||
(mf/defc shadow-formset*
|
||||
@@ -114,7 +114,7 @@
|
||||
:token inset-token
|
||||
:tokens tokens
|
||||
:index index
|
||||
:indexed-type value-subfield
|
||||
:value-subfield value-subfield
|
||||
:name :inset}]
|
||||
(when show-button
|
||||
[:> icon-button* {:variant "ghost"
|
||||
@@ -269,25 +269,13 @@
|
||||
|
||||
[:value
|
||||
[:map
|
||||
[:shadow {:optional true}
|
||||
[:shadow {:optinal true}
|
||||
[:vector
|
||||
[:map
|
||||
[:offset-x {:optional true} [:maybe :string]]
|
||||
[:offset-y {:optional true} [:maybe :string]]
|
||||
[:blur {:optional true}
|
||||
[:and
|
||||
[:maybe :string]
|
||||
[:fn {:error/fn #(tr "workspace.tokens.shadow-token-blur-value-error")}
|
||||
(fn [blur]
|
||||
(let [n (d/parse-double blur)]
|
||||
(or (nil? n) (not (< n 0)))))]]]
|
||||
[:spread {:optional true}
|
||||
[:and
|
||||
[:maybe :string]
|
||||
[:fn {:error/fn #(tr "workspace.tokens.shadow-token-spread-value-error")}
|
||||
(fn [spread]
|
||||
(let [n (d/parse-double spread)]
|
||||
(or (nil? n) (not (< n 0)))))]]]
|
||||
[:blur {:optional true} [:maybe :string]]
|
||||
[:spread {:optional true} [:maybe :string]]
|
||||
[:color {:optional true} [:maybe :string]]
|
||||
[:color-result {:optional true} ::sm/any]
|
||||
[:inset {:optional true} [:maybe :boolean]]]]]
|
||||
|
||||
@@ -93,9 +93,9 @@
|
||||
line-height-sub-token
|
||||
(mf/with-memo [token]
|
||||
(if-let [value (get token :value)]
|
||||
{:type :dimensions
|
||||
{:type :number
|
||||
:value (get value :line-height)}
|
||||
{:type :dimensions}))
|
||||
{:type :number}))
|
||||
|
||||
text-case-sub-token
|
||||
(mf/with-memo [token]
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
(ns app.main.ui.workspace.tokens.management.group
|
||||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.data.workspace.tokens.application :as dwta]
|
||||
[app.main.data.workspace.tokens.library-edit :as dwtl]
|
||||
@@ -16,51 +19,70 @@
|
||||
[app.main.ui.context :as ctx]
|
||||
[app.main.ui.ds.buttons.icon-button :refer [icon-button*]]
|
||||
[app.main.ui.ds.foundations.assets.icon :as i]
|
||||
[app.main.ui.workspace.sidebar.assets.common :as cmm]
|
||||
[app.main.ui.workspace.tokens.management.token-pill :refer [token-pill*]]
|
||||
[app.main.ui.ds.layers.layer-button :refer [layer-button*]]
|
||||
[app.main.ui.workspace.tokens.management.token-tree :refer [token-tree*]]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.i18n :refer [tr]]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
|
||||
(defn token-section-icon
|
||||
[type]
|
||||
(case type
|
||||
:border-radius "corner-radius"
|
||||
:color "drop"
|
||||
:boolean "boolean-difference"
|
||||
:font-family "text-font-family"
|
||||
:font-size "text-font-size"
|
||||
:letter-spacing "text-letterspacing"
|
||||
:text-case "text-mixed"
|
||||
:text-decoration "text-underlined"
|
||||
:font-weight "text-font-weight"
|
||||
:typography "text-typography"
|
||||
:opacity "percentage"
|
||||
:number "number"
|
||||
:rotation "rotation"
|
||||
:spacing "padding-extended"
|
||||
:string "text-mixed"
|
||||
:stroke-width "stroke-size"
|
||||
:dimensions "expand"
|
||||
:sizing "expand"
|
||||
:shadow "drop-shadow"
|
||||
:border-radius i/corner-radius
|
||||
:color i/drop
|
||||
:boolean i/boolean-difference
|
||||
:font-family i/text-font-family
|
||||
:font-size i/text-font-size
|
||||
:letter-spacing i/text-letterspacing
|
||||
:text-case i/text-mixed
|
||||
:text-decoration i/text-underlined
|
||||
:font-weight i/text-font-weight
|
||||
:typography i/text-typography
|
||||
:opacity i/percentage
|
||||
:number i/number
|
||||
:rotation i/rotation
|
||||
:spacing i/padding-extended
|
||||
:string i/text-mixed
|
||||
:stroke-width i/stroke-size
|
||||
:dimensions i/expand
|
||||
:sizing i/expand
|
||||
:shadow i/drop-shadow
|
||||
"add"))
|
||||
|
||||
(def ^:private schema:token-group
|
||||
[:map
|
||||
[:type :keyword]
|
||||
[:tokens :any]
|
||||
[:selected-shapes :any]
|
||||
[:is-selected-inside-layout {:optional true} [:maybe :boolean]]
|
||||
[:active-theme-tokens {:optional true} :any]
|
||||
[:selected-token-set-id {:optional true} :any]
|
||||
[:tokens-lib {:optional true} :any]
|
||||
[:on-token-pill-click {:optional true} fn?]
|
||||
[:on-context-menu {:optional true} fn?]])
|
||||
|
||||
(mf/defc token-group*
|
||||
{::mf/private true}
|
||||
[{:keys [type tokens selected-shapes is-selected-inside-layout active-theme-tokens is-open selected-ids]}]
|
||||
{::mf/schema schema:token-group}
|
||||
[{:keys [type tokens selected-shapes is-selected-inside-layout active-theme-tokens selected-token-set-id tokens-lib is-expanded selected-ids]}]
|
||||
(let [{:keys [modal title]}
|
||||
(get dwta/token-properties type)
|
||||
editing-ref (mf/deref refs/workspace-editor-state)
|
||||
not-editing? (empty? editing-ref)
|
||||
|
||||
is-expanded (d/nilv is-expanded false)
|
||||
|
||||
can-edit?
|
||||
(mf/use-ctx ctx/can-edit?)
|
||||
|
||||
is-selected-inside-layout (d/nilv is-selected-inside-layout false)
|
||||
|
||||
tokens
|
||||
(mf/with-memo [tokens]
|
||||
(vec (sort-by :name tokens)))
|
||||
|
||||
expandable? (d/nilv (seq tokens) false)
|
||||
|
||||
on-context-menu
|
||||
(mf/use-fn
|
||||
(fn [event token]
|
||||
@@ -73,8 +95,8 @@
|
||||
|
||||
on-toggle-open-click
|
||||
(mf/use-fn
|
||||
(mf/deps is-open type)
|
||||
#(st/emit! (dwtl/set-token-type-section-open type (not is-open))))
|
||||
(mf/deps is-expanded type)
|
||||
#(st/emit! (dwtl/set-token-type-section-open type (not is-expanded))))
|
||||
|
||||
on-popover-open-click
|
||||
(mf/use-fn
|
||||
@@ -96,33 +118,36 @@
|
||||
(mf/use-fn
|
||||
(mf/deps not-editing? selected-ids)
|
||||
(fn [event token]
|
||||
(dom/stop-propagation event)
|
||||
(when (and not-editing? (seq selected-shapes) (not= (:type token) :number))
|
||||
(st/emit! (dwta/toggle-token {:token token
|
||||
:shape-ids selected-ids})))))]
|
||||
(let [token (ctob/get-token tokens-lib selected-token-set-id (:id token))]
|
||||
(dom/stop-propagation event)
|
||||
(when (and not-editing? (seq selected-shapes) (not= (:type token) :number))
|
||||
(st/emit! (dwta/toggle-token {:token token
|
||||
:shape-ids selected-ids}))))))]
|
||||
|
||||
[:div {:on-click on-toggle-open-click :class (stl/css :token-section-wrapper)}
|
||||
[:> cmm/asset-section* {:icon (token-section-icon type)
|
||||
:title title
|
||||
:section :tokens
|
||||
:assets-count (count tokens)
|
||||
:is-open is-open}
|
||||
[:> cmm/asset-section-block* {:role :title-button}
|
||||
(when can-edit?
|
||||
[:> icon-button* {:on-click on-popover-open-click
|
||||
:variant "ghost"
|
||||
:icon i/add
|
||||
:id (str "add-token-button-" title)
|
||||
:aria-label (tr "workspace.tokens.add-token" title)}])]
|
||||
(when is-open
|
||||
[:> cmm/asset-section-block* {:role :content}
|
||||
[:div {:class (stl/css :token-pills-wrapper)}
|
||||
(for [token tokens]
|
||||
[:> token-pill*
|
||||
{:key (:name token)
|
||||
:token token
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:on-click on-token-pill-click
|
||||
:on-context-menu on-context-menu}])]])]]))
|
||||
[:div {:class (stl/css :token-section-wrapper)
|
||||
:data-testid (dm/str "section-" (name type))}
|
||||
[:> layer-button* {:label title
|
||||
:expanded is-expanded
|
||||
:description (when expandable? (dm/str (count tokens)))
|
||||
:is-expandable expandable?
|
||||
:aria-expanded is-expanded
|
||||
:aria-controls (dm/str "token-tree-" (name type))
|
||||
:on-toggle-expand on-toggle-open-click
|
||||
:icon (token-section-icon type)}
|
||||
(when can-edit?
|
||||
[:> icon-button* {:id (str "add-token-button-" title)
|
||||
:icon "add"
|
||||
:aria-label (tr "workspace.tokens.add-token" title)
|
||||
:variant "ghost"
|
||||
:on-click on-popover-open-click
|
||||
:class (stl/css :token-section-icon)}])]
|
||||
(when is-expanded
|
||||
[:> token-tree* {:tokens tokens
|
||||
:id (dm/str "token-tree-" (name type))
|
||||
:tokens-lib tokens-lib
|
||||
:selected-shapes selected-shapes
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:selected-token-set-id selected-token-set-id
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:on-token-pill-click on-token-pill-click
|
||||
:on-context-menu on-context-menu}])]))
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
// 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
|
||||
|
||||
.token-pills-wrapper {
|
||||
display: flex;
|
||||
gap: var(--sp-xs);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
@@ -307,10 +307,9 @@
|
||||
:class (stl/css :token-pill-icon)}])
|
||||
|
||||
(if contains-path?
|
||||
(let [[first-part last-part] (cpn/split-by-last-period name)]
|
||||
(let [[_ last-part] (cpn/split-by-last-period name)]
|
||||
[:span {:class (stl/css :divided-name-wrapper)
|
||||
:aria-label name}
|
||||
[:span {:class (stl/css :first-name-wrapper)} first-part]
|
||||
[:span {:class (stl/css :last-name-wrapper)} last-part]])
|
||||
[:span {:class (stl/css :name-wrapper)
|
||||
:aria-label name}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
;; 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.ui.workspace.tokens.management.token-tree
|
||||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.path-names :as cpn]
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[app.main.ui.ds.layers.layer-button :refer [layer-button*]]
|
||||
[app.main.ui.workspace.tokens.management.token-pill :refer [token-pill*]]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(def ^:private schema:folder-node
|
||||
[:map
|
||||
[:node :any]
|
||||
[:selected-shapes :any]
|
||||
[:is-selected-inside-layout {:optional true} :boolean]
|
||||
[:active-theme-tokens {:optional true} :any]
|
||||
[:selected-token-set-id {:optional true} :any]
|
||||
[:tokens-lib {:optional true} :any]
|
||||
[:on-token-pill-click {:optional true} fn?]
|
||||
[:on-context-menu {:optional true} fn?]])
|
||||
|
||||
(mf/defc folder-node*
|
||||
{::mf/schema schema:folder-node}
|
||||
[{:keys [node selected-shapes is-selected-inside-layout active-theme-tokens selected-token-set-id tokens-lib on-token-pill-click on-context-menu]}]
|
||||
(let [expanded* (mf/use-state false)
|
||||
expanded (deref expanded*)
|
||||
swap-folder-expanded #(swap! expanded* not)]
|
||||
[:li {:class (stl/css :folder-node)}
|
||||
[:> layer-button* {:label (:name node)
|
||||
:expanded expanded
|
||||
:aria-expanded expanded
|
||||
:aria-controls (str "folder-children-" (:path node))
|
||||
:is-expandable (not (:leaf node))
|
||||
:on-toggle-expand swap-folder-expanded}]
|
||||
(when expanded
|
||||
(let [children-fn (:children-fn node)]
|
||||
[:div {:class (stl/css :folder-children-wrapper)
|
||||
:id (str "folder-children-" (:path node))}
|
||||
(when children-fn
|
||||
(let [children (children-fn)]
|
||||
(for [child children]
|
||||
(if (not (:leaf child))
|
||||
[:ul {:class (stl/css :node-parent)}
|
||||
[:> folder-node* {:key (:path child)
|
||||
:node child
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:on-token-pill-click on-token-pill-click
|
||||
:on-context-menu on-context-menu
|
||||
:tokens-lib tokens-lib
|
||||
:selected-token-set-id selected-token-set-id}]]
|
||||
(let [id (:id (:leaf child))
|
||||
token (ctob/get-token tokens-lib selected-token-set-id id)]
|
||||
[:> token-pill*
|
||||
{:key id
|
||||
:token token
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:on-click on-token-pill-click
|
||||
:on-context-menu on-context-menu}])))))]))]))
|
||||
|
||||
(def ^:private schema:token-tree
|
||||
[:map
|
||||
[:tokens :any]
|
||||
[:selected-shapes :any]
|
||||
[:is-selected-inside-layout {:optional true} :boolean]
|
||||
[:active-theme-tokens {:optional true} :any]
|
||||
[:selected-token-set-id {:optional true} :any]
|
||||
[:tokens-lib {:optional true} :any]
|
||||
[:on-token-pill-click {:optional true} fn?]
|
||||
[:on-context-menu {:optional true} fn?]])
|
||||
|
||||
(mf/defc token-tree*
|
||||
{::mf/schema schema:token-tree}
|
||||
[{:keys [tokens selected-shapes is-selected-inside-layout active-theme-tokens tokens-lib selected-token-set-id on-token-pill-click on-context-menu]}]
|
||||
(let [separator "."
|
||||
tree (mf/use-memo
|
||||
(mf/deps tokens)
|
||||
(fn []
|
||||
(cpn/build-tree-root tokens separator)))]
|
||||
[:div {:class (stl/css :token-tree-wrapper)}
|
||||
(for [node tree]
|
||||
[:ul {:class (stl/css :node-parent)
|
||||
:key (:path node)
|
||||
:style {:--node-depth (inc (:depth node))}}
|
||||
(if (:leaf node)
|
||||
(let [token (ctob/get-token tokens-lib selected-token-set-id (get-in node [:leaf :id]))]
|
||||
[:> token-pill*
|
||||
{:token token
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:on-click on-token-pill-click
|
||||
:on-context-menu on-context-menu}])
|
||||
;; Render segment folder
|
||||
[:> folder-node* {:node node
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:on-token-pill-click on-token-pill-click
|
||||
:on-context-menu on-context-menu
|
||||
:tokens-lib tokens-lib
|
||||
:selected-token-set-id selected-token-set-id}])])]))
|
||||
@@ -0,0 +1,39 @@
|
||||
// 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
|
||||
|
||||
@use "ds/_borders.scss" as *;
|
||||
|
||||
.token-tree-wrapper {
|
||||
padding-block-end: var(--sp-s);
|
||||
}
|
||||
|
||||
.node-parent {
|
||||
--node-spacing: var(--sp-l);
|
||||
--node-depth: 0;
|
||||
|
||||
margin-block-end: 0;
|
||||
padding-inline-start: calc(var(--node-spacing) * var(--node-depth));
|
||||
}
|
||||
|
||||
.folder-children-wrapper:has(> button) {
|
||||
margin-inline-start: var(--sp-s);
|
||||
padding-inline-start: var(--sp-s);
|
||||
border-inline-start: $b-2 solid var(--color-background-quaternary);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
column-gap: var(--sp-xs);
|
||||
|
||||
& .node-parent {
|
||||
flex: 1 0 100%;
|
||||
|
||||
&:last-of-type {
|
||||
margin-block-end: var(--sp-s);
|
||||
}
|
||||
}
|
||||
& .token-pill {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
}
|
||||
@@ -312,11 +312,6 @@
|
||||
(js/console.error "Error initializing canvas context:" e)
|
||||
false))]
|
||||
(reset! canvas-init? init?)
|
||||
(when init?
|
||||
;; Restore previous canvas pixels immediately after context initialization
|
||||
;; This happens before initialize-viewport is called
|
||||
(wasm.api/apply-canvas-blur)
|
||||
(wasm.api/restore-previous-canvas-pixels))
|
||||
(when-not init?
|
||||
(js/alert "WebGL not supported")
|
||||
(st/emit! (dcm/go-to-dashboard-recent))))))))
|
||||
@@ -345,7 +340,6 @@
|
||||
|
||||
(mf/with-effect [@canvas-init? zoom vbox background]
|
||||
(when (and @canvas-init? (not @initialized?))
|
||||
(wasm.api/clear-canvas-pixels)
|
||||
(wasm.api/initialize-viewport base-objects zoom vbox background)
|
||||
(reset! initialized? true)))
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
["react-dom/server" :as rds]
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.exceptions :as ex]
|
||||
[app.common.files.helpers :as cfh]
|
||||
[app.common.logging :as log]
|
||||
[app.common.math :as mth]
|
||||
@@ -22,6 +21,7 @@
|
||||
[app.common.types.text :as txt]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.config :as cf]
|
||||
[app.main.data.render-wasm :as drw]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.render :as render]
|
||||
[app.main.store :as st]
|
||||
@@ -29,7 +29,6 @@
|
||||
[app.main.worker :as mw]
|
||||
[app.render-wasm.api.fonts :as f]
|
||||
[app.render-wasm.api.texts :as t]
|
||||
[app.render-wasm.api.webgl :as webgl]
|
||||
[app.render-wasm.deserializers :as dr]
|
||||
[app.render-wasm.helpers :as h]
|
||||
[app.render-wasm.mem :as mem]
|
||||
@@ -38,6 +37,7 @@
|
||||
[app.render-wasm.serializers :as sr]
|
||||
[app.render-wasm.serializers.color :as sr-clr]
|
||||
[app.render-wasm.svg-filters :as svg-filters]
|
||||
;; FIXME: rename; confunsing name
|
||||
[app.render-wasm.wasm :as wasm]
|
||||
[app.util.debug :as dbg]
|
||||
[app.util.dom :as dom]
|
||||
@@ -279,6 +279,30 @@
|
||||
[string]
|
||||
(+ (count string) 1))
|
||||
|
||||
(defn- create-webgl-texture-from-image
|
||||
"Creates a WebGL texture from an HTMLImageElement or ImageBitmap and returns the texture object"
|
||||
[gl image-element]
|
||||
(let [texture (.createTexture ^js gl)]
|
||||
(.bindTexture ^js gl (.-TEXTURE_2D ^js gl) texture)
|
||||
(.texParameteri ^js gl (.-TEXTURE_2D ^js gl) (.-TEXTURE_WRAP_S ^js gl) (.-CLAMP_TO_EDGE ^js gl))
|
||||
(.texParameteri ^js gl (.-TEXTURE_2D ^js gl) (.-TEXTURE_WRAP_T ^js gl) (.-CLAMP_TO_EDGE ^js gl))
|
||||
(.texParameteri ^js gl (.-TEXTURE_2D ^js gl) (.-TEXTURE_MIN_FILTER ^js gl) (.-LINEAR ^js gl))
|
||||
(.texParameteri ^js gl (.-TEXTURE_2D ^js gl) (.-TEXTURE_MAG_FILTER ^js gl) (.-LINEAR ^js gl))
|
||||
(.texImage2D ^js gl (.-TEXTURE_2D ^js gl) 0 (.-RGBA ^js gl) (.-RGBA ^js gl) (.-UNSIGNED_BYTE ^js gl) image-element)
|
||||
(.bindTexture ^js gl (.-TEXTURE_2D ^js gl) nil)
|
||||
texture))
|
||||
|
||||
(defn- get-webgl-context
|
||||
"Gets the WebGL context from the WASM module"
|
||||
[]
|
||||
(when wasm/context-initialized?
|
||||
(let [gl-obj (unchecked-get wasm/internal-module "GL")]
|
||||
(when gl-obj
|
||||
;; Get the current WebGL context from Emscripten
|
||||
;; The GL object has a currentContext property that contains the context handle
|
||||
(let [current-ctx (.-currentContext ^js gl-obj)]
|
||||
(when current-ctx
|
||||
(.-GLctx ^js current-ctx)))))))
|
||||
|
||||
(defn- get-texture-id-for-gl-object
|
||||
"Registers a WebGL texture with Emscripten's GL object system and returns its ID"
|
||||
@@ -308,8 +332,8 @@
|
||||
(->> (retrieve-image url)
|
||||
(rx/map
|
||||
(fn [img]
|
||||
(when-let [gl (webgl/get-webgl-context)]
|
||||
(let [texture (webgl/create-webgl-texture-from-image gl img)
|
||||
(when-let [gl (get-webgl-context)]
|
||||
(let [texture (create-webgl-texture-from-image gl img)
|
||||
texture-id (get-texture-id-for-gl-object texture)
|
||||
width (.-width ^js img)
|
||||
height (.-height ^js img)
|
||||
@@ -1031,9 +1055,8 @@
|
||||
(perf/end-measure "set-objects")
|
||||
(process-pending shapes thumbnails full noop-fn
|
||||
(fn []
|
||||
(if render-callback
|
||||
(render-callback)
|
||||
(render-finish))
|
||||
(when render-callback (render-callback))
|
||||
(render-finish)
|
||||
(ug/dispatch! (ug/event "penpot:wasm:set-objects")))))))
|
||||
|
||||
(defn clear-focus-mode
|
||||
@@ -1213,8 +1236,7 @@
|
||||
(dom/prevent-default event)
|
||||
(reset! wasm/context-lost? true)
|
||||
(log/warn :hint "WebGL context lost")
|
||||
(ex/raise :type :webgl-context-lost
|
||||
:hint "WebGL context lost"))
|
||||
(st/emit! (drw/context-lost)))
|
||||
|
||||
(defn init-canvas-context
|
||||
[canvas]
|
||||
@@ -1425,12 +1447,6 @@
|
||||
|
||||
result)))
|
||||
|
||||
(defn apply-canvas-blur
|
||||
[]
|
||||
(when wasm/canvas
|
||||
(dom/set-style! wasm/canvas "filter" "blur(4px)")))
|
||||
|
||||
|
||||
(defn init-wasm-module
|
||||
[module]
|
||||
(let [default-fn (unchecked-get module "default")
|
||||
@@ -1452,8 +1468,3 @@
|
||||
(js/console.error cause)
|
||||
(p/resolved false)))))
|
||||
(p/resolved false))))
|
||||
|
||||
;; Re-export public WebGL functions
|
||||
(def capture-canvas-pixels webgl/capture-canvas-pixels)
|
||||
(def restore-previous-canvas-pixels webgl/restore-previous-canvas-pixels)
|
||||
(def clear-canvas-pixels webgl/clear-canvas-pixels)
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
;; 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.render-wasm.api.webgl
|
||||
"WebGL utilities for pixel capture and rendering"
|
||||
(:require
|
||||
[app.common.logging :as log]
|
||||
[app.render-wasm.wasm :as wasm]
|
||||
[app.util.dom :as dom]))
|
||||
|
||||
(defn get-webgl-context
|
||||
"Gets the WebGL context from the WASM module"
|
||||
[]
|
||||
(when wasm/context-initialized?
|
||||
(let [gl-obj (unchecked-get wasm/internal-module "GL")]
|
||||
(when gl-obj
|
||||
;; Get the current WebGL context from Emscripten
|
||||
;; The GL object has a currentContext property that contains the context handle
|
||||
(let [current-ctx (.-currentContext ^js gl-obj)]
|
||||
(when current-ctx
|
||||
(.-GLctx ^js current-ctx)))))))
|
||||
|
||||
(defn create-webgl-texture-from-image
|
||||
"Creates a WebGL texture from an HTMLImageElement or ImageBitmap and returns the texture object"
|
||||
[gl image-element]
|
||||
(let [texture (.createTexture ^js gl)]
|
||||
(.bindTexture ^js gl (.-TEXTURE_2D ^js gl) texture)
|
||||
(.texParameteri ^js gl (.-TEXTURE_2D ^js gl) (.-TEXTURE_WRAP_S ^js gl) (.-CLAMP_TO_EDGE ^js gl))
|
||||
(.texParameteri ^js gl (.-TEXTURE_2D ^js gl) (.-TEXTURE_WRAP_T ^js gl) (.-CLAMP_TO_EDGE ^js gl))
|
||||
(.texParameteri ^js gl (.-TEXTURE_2D ^js gl) (.-TEXTURE_MIN_FILTER ^js gl) (.-LINEAR ^js gl))
|
||||
(.texParameteri ^js gl (.-TEXTURE_2D ^js gl) (.-TEXTURE_MAG_FILTER ^js gl) (.-LINEAR ^js gl))
|
||||
(.texImage2D ^js gl (.-TEXTURE_2D ^js gl) 0 (.-RGBA ^js gl) (.-RGBA ^js gl) (.-UNSIGNED_BYTE ^js gl) image-element)
|
||||
(.bindTexture ^js gl (.-TEXTURE_2D ^js gl) nil)
|
||||
texture))
|
||||
|
||||
;; FIXME: temporary function until we are able to keep the same <canvas> across pages.
|
||||
(defn- draw-imagedata-to-webgl
|
||||
"Draws ImageData to a WebGL2 context by creating a texture"
|
||||
[gl image-data]
|
||||
(let [width (.-width ^js image-data)
|
||||
height (.-height ^js image-data)
|
||||
texture (.createTexture ^js gl)]
|
||||
;; Bind texture and set parameters
|
||||
(.bindTexture ^js gl (.-TEXTURE_2D ^js gl) texture)
|
||||
(.texParameteri ^js gl (.-TEXTURE_2D ^js gl) (.-TEXTURE_WRAP_S ^js gl) (.-CLAMP_TO_EDGE ^js gl))
|
||||
(.texParameteri ^js gl (.-TEXTURE_2D ^js gl) (.-TEXTURE_WRAP_T ^js gl) (.-CLAMP_TO_EDGE ^js gl))
|
||||
(.texParameteri ^js gl (.-TEXTURE_2D ^js gl) (.-TEXTURE_MIN_FILTER ^js gl) (.-LINEAR ^js gl))
|
||||
(.texParameteri ^js gl (.-TEXTURE_2D ^js gl) (.-TEXTURE_MAG_FILTER ^js gl) (.-LINEAR ^js gl))
|
||||
(.texImage2D ^js gl (.-TEXTURE_2D ^js gl) 0 (.-RGBA ^js gl) (.-RGBA ^js gl) (.-UNSIGNED_BYTE ^js gl) image-data)
|
||||
|
||||
;; Set up viewport
|
||||
(.viewport ^js gl 0 0 width height)
|
||||
|
||||
;; Vertex & Fragment shaders
|
||||
;; Since we are only calling this function once (on page switch), we don't need
|
||||
;; to cache the compiled shaders somewhere else (cannot be reused in a differen context).
|
||||
(let [vertex-shader-source "#version 300 es
|
||||
in vec2 a_position;
|
||||
in vec2 a_texCoord;
|
||||
out vec2 v_texCoord;
|
||||
void main() {
|
||||
gl_Position = vec4(a_position, 0.0, 1.0);
|
||||
v_texCoord = a_texCoord;
|
||||
}"
|
||||
fragment-shader-source "#version 300 es
|
||||
precision highp float;
|
||||
in vec2 v_texCoord;
|
||||
uniform sampler2D u_texture;
|
||||
out vec4 fragColor;
|
||||
void main() {
|
||||
fragColor = texture(u_texture, v_texCoord);
|
||||
}"
|
||||
vertex-shader (.createShader ^js gl (.-VERTEX_SHADER ^js gl))
|
||||
fragment-shader (.createShader ^js gl (.-FRAGMENT_SHADER ^js gl))
|
||||
program (.createProgram ^js gl)]
|
||||
(.shaderSource ^js gl vertex-shader vertex-shader-source)
|
||||
(.compileShader ^js gl vertex-shader)
|
||||
(when-not (.getShaderParameter ^js gl vertex-shader (.-COMPILE_STATUS ^js gl))
|
||||
(log/error :hint "Vertex shader compilation failed"
|
||||
:log (.getShaderInfoLog ^js gl vertex-shader)))
|
||||
|
||||
(.shaderSource ^js gl fragment-shader fragment-shader-source)
|
||||
(.compileShader ^js gl fragment-shader)
|
||||
(when-not (.getShaderParameter ^js gl fragment-shader (.-COMPILE_STATUS ^js gl))
|
||||
(log/error :hint "Fragment shader compilation failed"
|
||||
:log (.getShaderInfoLog ^js gl fragment-shader)))
|
||||
|
||||
(.attachShader ^js gl program vertex-shader)
|
||||
(.attachShader ^js gl program fragment-shader)
|
||||
(.linkProgram ^js gl program)
|
||||
|
||||
(if (.getProgramParameter ^js gl program (.-LINK_STATUS ^js gl))
|
||||
(do
|
||||
(.useProgram ^js gl program)
|
||||
|
||||
;; Create full-screen quad vertices (normalized device coordinates)
|
||||
(let [position-location (.getAttribLocation ^js gl program "a_position")
|
||||
texcoord-location (.getAttribLocation ^js gl program "a_texCoord")
|
||||
position-buffer (.createBuffer ^js gl)
|
||||
texcoord-buffer (.createBuffer ^js gl)
|
||||
positions #js [-1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 1.0]
|
||||
texcoords #js [0.0 0.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0 1.0]]
|
||||
;; Set up position buffer
|
||||
(.bindBuffer ^js gl (.-ARRAY_BUFFER ^js gl) position-buffer)
|
||||
(.bufferData ^js gl (.-ARRAY_BUFFER ^js gl) (js/Float32Array. positions) (.-STATIC_DRAW ^js gl))
|
||||
(.enableVertexAttribArray ^js gl position-location)
|
||||
(.vertexAttribPointer ^js gl position-location 2 (.-FLOAT ^js gl) false 0 0)
|
||||
;; Set up texcoord buffer
|
||||
(.bindBuffer ^js gl (.-ARRAY_BUFFER ^js gl) texcoord-buffer)
|
||||
(.bufferData ^js gl (.-ARRAY_BUFFER ^js gl) (js/Float32Array. texcoords) (.-STATIC_DRAW ^js gl))
|
||||
(.enableVertexAttribArray ^js gl texcoord-location)
|
||||
(.vertexAttribPointer ^js gl texcoord-location 2 (.-FLOAT ^js gl) false 0 0)
|
||||
;; Set texture uniform
|
||||
(.activeTexture ^js gl (.-TEXTURE0 ^js gl))
|
||||
(.bindTexture ^js gl (.-TEXTURE_2D ^js gl) texture)
|
||||
(let [texture-location (.getUniformLocation ^js gl program "u_texture")]
|
||||
(.uniform1i ^js gl texture-location 0))
|
||||
|
||||
;; draw
|
||||
(.drawArrays ^js gl (.-TRIANGLES ^js gl) 0 6)
|
||||
|
||||
;; cleanup
|
||||
(.deleteBuffer ^js gl position-buffer)
|
||||
(.deleteBuffer ^js gl texcoord-buffer)
|
||||
(.deleteShader ^js gl vertex-shader)
|
||||
(.deleteShader ^js gl fragment-shader)
|
||||
(.deleteProgram ^js gl program)))
|
||||
(log/error :hint "Program linking failed"
|
||||
:log (.getProgramInfoLog ^js gl program)))
|
||||
|
||||
(.bindTexture ^js gl (.-TEXTURE_2D ^js gl) nil)
|
||||
(.deleteTexture ^js gl texture))))
|
||||
|
||||
(defn restore-previous-canvas-pixels
|
||||
"Restores previous canvas pixels into the new canvas"
|
||||
[]
|
||||
(when-let [previous-canvas-pixels wasm/canvas-pixels]
|
||||
(when-let [gl wasm/gl-context]
|
||||
(draw-imagedata-to-webgl gl previous-canvas-pixels)
|
||||
(set! wasm/canvas-pixels nil))))
|
||||
|
||||
(defn clear-canvas-pixels
|
||||
[]
|
||||
(when wasm/canvas
|
||||
(let [context wasm/gl-context]
|
||||
(.clearColor ^js context 0 0 0 0.0)
|
||||
(.clear ^js context (.-COLOR_BUFFER_BIT ^js context))
|
||||
(.clear ^js context (.-DEPTH_BUFFER_BIT ^js context))
|
||||
(.clear ^js context (.-STENCIL_BUFFER_BIT ^js context)))
|
||||
(dom/set-style! wasm/canvas "filter" "none")
|
||||
(set! wasm/canvas-pixels nil)))
|
||||
|
||||
(defn capture-canvas-pixels
|
||||
"Captures the pixels of the viewport canvas"
|
||||
[]
|
||||
(when wasm/canvas
|
||||
(let [context wasm/gl-context
|
||||
width (.-width wasm/canvas)
|
||||
height (.-height wasm/canvas)
|
||||
buffer (js/Uint8ClampedArray. (* width height 4))
|
||||
_ (.readPixels ^js context 0 0 width height (.-RGBA ^js context) (.-UNSIGNED_BYTE ^js context) buffer)
|
||||
image-data (js/ImageData. buffer width height)]
|
||||
(set! wasm/canvas-pixels image-data))))
|
||||
@@ -12,8 +12,6 @@
|
||||
|
||||
;; Reference to the HTML canvas element.
|
||||
(defonce canvas nil)
|
||||
;; Reference to the captured pixels of the canvas (for page switching effect)
|
||||
(defonce canvas-pixels nil)
|
||||
|
||||
;; Reference to the Emscripten GL context wrapper.
|
||||
(defonce gl-context-handle nil)
|
||||
@@ -58,4 +56,3 @@
|
||||
:stroke-linecap shared/RawStrokeLineCap
|
||||
:stroke-linejoin shared/RawStrokeLineJoin
|
||||
:fill-rule shared/RawFillRule})
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
:string-or-size-array (format-string-or-size-array value)
|
||||
:keyword (format-keyword value)
|
||||
:tracks (format-tracks value)
|
||||
:shadows (format-shadow value options)
|
||||
:shadow (format-shadow value options)
|
||||
:blur (format-blur value)
|
||||
:matrix (format-matrix value)
|
||||
(if (keyword? value) (d/name value) value))))
|
||||
|
||||
@@ -47,18 +47,17 @@
|
||||
[acc {:keys [schema in value type] :as problem}]
|
||||
(let [props (m/properties schema)
|
||||
tprops (m/type-properties schema)
|
||||
field (or (:error/field props)
|
||||
in)
|
||||
field (or (first in)
|
||||
(:error/field props))
|
||||
|
||||
field (if (vector? field)
|
||||
field
|
||||
[field])]
|
||||
|
||||
(if (and (= 1 (count field))
|
||||
(contains? acc (first field)))
|
||||
(if (contains? acc field)
|
||||
acc
|
||||
(cond
|
||||
(or (nil? field)
|
||||
(empty? field))
|
||||
(nil? field)
|
||||
acc
|
||||
|
||||
(or (= type :malli.core/missing-key)
|
||||
|
||||
@@ -179,7 +179,6 @@
|
||||
|
||||
(->> (render-canvas-blob canvas width height bgcolor)
|
||||
(p/fnly (fn [data cause]
|
||||
(wasm.api/clear-canvas)
|
||||
(if cause
|
||||
(rx/error! subs cause)
|
||||
(rx/push! subs
|
||||
|
||||
@@ -242,6 +242,7 @@ export class SelectionController extends EventTarget {
|
||||
continue;
|
||||
}
|
||||
let styleValue = element.style.getPropertyValue(styleName);
|
||||
|
||||
if (styleName === "font-family") {
|
||||
styleValue = sanitizeFontFamily(styleValue);
|
||||
}
|
||||
@@ -276,29 +277,22 @@ export class SelectionController extends EventTarget {
|
||||
this.#applyDefaultStylesToCurrentStyle();
|
||||
const root = startNode.parentElement.parentElement.parentElement;
|
||||
this.#applyStylesFromElementToCurrentStyle(root);
|
||||
if (startNode === endNode) {
|
||||
const paragraph = startNode.parentElement.parentElement;
|
||||
// FIXME: I don't like this approximation. Having to iterate nodes twice
|
||||
// is bad for performance. I think we need another way of "computing"
|
||||
// the cascade.
|
||||
for (const textNode of this.#textNodeIterator.iterateFrom(
|
||||
startNode,
|
||||
endNode,
|
||||
)) {
|
||||
const paragraph = textNode.parentElement.parentElement;
|
||||
this.#applyStylesFromElementToCurrentStyle(paragraph);
|
||||
const textSpan = startNode.parentElement;
|
||||
this.#applyStylesFromElementToCurrentStyle(textSpan);
|
||||
} else {
|
||||
// FIXME: I don't like this approximation. Having to iterate nodes twice
|
||||
// is bad for performance. I think we need another way of "computing"
|
||||
// the cascade.
|
||||
for (const textNode of this.#textNodeIterator.iterateFrom(
|
||||
startNode,
|
||||
endNode,
|
||||
)) {
|
||||
const paragraph = textNode.parentElement.parentElement;
|
||||
this.#applyStylesFromElementToCurrentStyle(paragraph);
|
||||
}
|
||||
for (const textNode of this.#textNodeIterator.iterateFrom(
|
||||
startNode,
|
||||
endNode,
|
||||
)) {
|
||||
const textSpan = textNode.parentElement;
|
||||
this.#mergeStylesFromElementToCurrentStyle(textSpan);
|
||||
}
|
||||
}
|
||||
for (const textNode of this.#textNodeIterator.iterateFrom(
|
||||
startNode,
|
||||
endNode,
|
||||
)) {
|
||||
const textSpan = textNode.parentElement;
|
||||
this.#mergeStylesFromElementToCurrentStyle(textSpan);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "تحميل %s ملفات أساسية (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* ربما يحتوي على مكوّنات، رسوميات والوان و/أو خطوط."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -403,30 +403,30 @@ msgstr ""
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
#, fuzzy
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"سيتم ادراج الملفات التي لها مكتبات مشتركة في التصدير، مع الحفاظ على روابطهم."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "صدّر المكتبات المشتركة"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"لن يتم تضمين المكتبات المشتركة في التصدير ولن يتم إضافة أي أصول إلى "
|
||||
"المكتبة. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "عامل أصول المكتبة المشتركة كعناصر بسيطة"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr "سيتم تصدير ملفك مع دمج جميع الأصول الخارجية في مكتبة الملفات."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "تضمين أصول المكتبة المشتركة في مكتبات الملفات"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
|
||||
@@ -380,7 +380,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Baixa %s fitxers estàndard (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* Pot incloure components, gràfics, colors i/o tipografies."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -390,33 +390,33 @@ msgstr ""
|
||||
"voleu fer amb els seus recursos*?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Els fitxers amb biblioteques compartides s’inclouran a l’exportació, "
|
||||
"mantenint la vinculació."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Exporta les biblioteques compartides"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Les biblioteques compartides no s'inclouran en l'exportació i no s'afegiran "
|
||||
"recursos a la biblioteca. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Tracta els recursos de la biblioteca compartida com a objectes bàsics"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"El fitxer s'exportarà amb tots els recursos externs fusionats a la "
|
||||
"biblioteca de fitxers."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr ""
|
||||
"Inclou els recursos de la biblioteca compartida a les biblioteques del "
|
||||
"fitxer"
|
||||
|
||||
@@ -530,7 +530,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Stáhnout %s soubory (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* Může obsahovat komponenty, grafiku, barvy a/nebo typografii."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -540,33 +540,33 @@ msgstr ""
|
||||
"Co chcete dělat s jejich položkami*?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Soubory se sdílenými knihovnami budou zahrnuty do exportu, čímž se zachová "
|
||||
"jejich propojení."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Exportovat sdílené knihovny"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Sdílené knihovny nebudou zahrnuty do exportu a do knihovny nebudou přidány "
|
||||
"žádné položky. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Zacházet s položkami sdílené knihovny jako se základními objekty"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"Váš soubor bude exportován se všemi externími položkami sloučenými do "
|
||||
"knihovny souborů."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "Zahrnout sdílené položky knihovny do knihoven souborů"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
@@ -6456,6 +6456,10 @@ msgstr "Nástroje"
|
||||
msgid "workspace.tokens.value-not-valid"
|
||||
msgstr "Hodnota není platná"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:181, src/app/main/ui/workspace/tokens/management/create/form.cljs:602
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr "Přejmenováním tohoto tokenu se přeruší jakýkoli odkaz na jeho starý název."
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar.cljs:139, src/app/main/ui/workspace/sidebar.cljs:146
|
||||
msgid "workspace.toolbar.assets"
|
||||
msgstr "Položky"
|
||||
|
||||
@@ -573,7 +573,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "%s Standarddateien herunterladen (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* kann Komponenten, Grafiken, Farben und/oder Textstile enthalten."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -585,33 +585,33 @@ msgstr ""
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
#, fuzzy
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Dateien mit geteilten Bibliotheken werden exportiert, und ihre Verknüpfungen "
|
||||
"bleiben erhalten."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Geteilte Bibliotheken exportieren"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Geteilte Bibliotheken werden nicht exportiert und der Bibliothek werden "
|
||||
"keine Assets hinzugefügt. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Assets aus geteilten Bibliotheken als gewöhnliche Objekte behandeln"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"Ihre Datei wird exportiert, und alle externen Assets werden der "
|
||||
"Dateibibliothek hinzugefügt."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "Assets aus geteilten Bibliotheken in die Dateibibliothek aufnehmen"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
@@ -7175,6 +7175,12 @@ msgstr "Der Wert ist nicht gültig"
|
||||
msgid "workspace.tokens.value-with-percent"
|
||||
msgstr "Ungültiger Wert: % ist nicht zulässig."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:181, src/app/main/ui/workspace/tokens/management/create/form.cljs:602
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr ""
|
||||
"Die Umbenennung dieses Tokens macht jeden Verweis auf seinen alten Namen "
|
||||
"kaputt."
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar.cljs:139, src/app/main/ui/workspace/sidebar.cljs:146
|
||||
msgid "workspace.toolbar.assets"
|
||||
msgstr "Assets"
|
||||
|
||||
@@ -564,48 +564,48 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Download %s standard files (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* Might include components, graphics, colors and/or typographies."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
msgid "dashboard.export.explain"
|
||||
msgstr ""
|
||||
"One or more files that you want to download are using shared libraries. What "
|
||||
"One or more files that you want to export are using shared libraries. What "
|
||||
"do you want to do with their assets*?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Files with shared libraries will be included in the export, maintaining "
|
||||
"their linkage."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Export shared libraries"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Shared libraries will not be included in the export and no assets will be "
|
||||
"added to the library. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Treat shared library assets as basic objects"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"Your file will be exported with all external assets merged into the file "
|
||||
"library."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "Include shared library assets in file libraries"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
msgid "files-download-modal.title"
|
||||
msgstr "Download files"
|
||||
msgid "dashboard.export.title"
|
||||
msgstr "Export files"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/typography.cljs:317
|
||||
msgid "dashboard.fonts.deleted-placeholder"
|
||||
@@ -1559,12 +1559,6 @@ msgstr "Old password is incorrect"
|
||||
msgid "feedback.description"
|
||||
msgstr "Description"
|
||||
|
||||
msgid "errors.webgl-context-lost.main-message"
|
||||
msgstr "Oops! The canvas context was lost"
|
||||
|
||||
msgid "errors.webgl-context-lost.desc-message"
|
||||
msgstr "WebGL has stopped working. Please reload the page to reset it"
|
||||
|
||||
#: src/app/main/ui/settings/feedback.cljs:122
|
||||
msgid "feedback.description-placeholder"
|
||||
msgstr "Please describe the reason of your feedback"
|
||||
@@ -2527,9 +2521,6 @@ msgstr "Release notes"
|
||||
msgid "labels.reload-file"
|
||||
msgstr "Reload file"
|
||||
|
||||
msgid "labels.reload-page"
|
||||
msgstr "Reload page"
|
||||
|
||||
#: src/app/main/ui/workspace/libraries.cljs, src/app/main/ui/dashboard/team.cljs
|
||||
#, unused
|
||||
msgid "labels.remove"
|
||||
@@ -7552,46 +7543,6 @@ msgstr "Color"
|
||||
msgid "workspace.tokens.composite-line-height-needs-font-size"
|
||||
msgstr "Line Height depends on Font Size. Add a Font Size to get the resolved value."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remap-token-references"
|
||||
msgstr "Remap Token References"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.renaming-token-from-to"
|
||||
msgstr "Renaming token from '%s' to '%s'"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/forms/generic_form.cljs
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr "Renaming this token will break any reference to its old name"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.references-found"
|
||||
msgstr "%s references found in your design"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remap-explanation"
|
||||
msgstr "All references to this token will be automatically updated to use the new name."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.no-references-found"
|
||||
msgstr "No references found"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.no-remap-needed"
|
||||
msgstr "This token is not currently used in your design, so no remapping is needed."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remapping-in-progress"
|
||||
msgstr "Remapping token references..."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remap-and-rename"
|
||||
msgstr "Remap & Rename"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.rename-only"
|
||||
msgstr "Rename"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/themes/create_modal.cljs:78
|
||||
msgid "workspace.tokens.create-new-theme"
|
||||
msgstr "Create your first theme now."
|
||||
@@ -8081,14 +8032,6 @@ msgstr "Name"
|
||||
msgid "workspace.tokens.token-name-duplication-validation-error"
|
||||
msgstr "A token already exists at the path: %s"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/forms/shadow.cljs
|
||||
msgid "workspace.tokens.shadow-token-blur-value-error"
|
||||
msgstr "Blur value cannot be negative"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/forms/shadow.cljs
|
||||
msgid "workspace.tokens.shadow-token-spread-value-error"
|
||||
msgstr "Spread value cannot be negative"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:42, src/app/main/ui/workspace/tokens/management/create/form.cljs:68
|
||||
msgid "workspace.tokens.token-name-length-validation-error"
|
||||
msgstr "Name should be at least 1 character"
|
||||
@@ -8133,7 +8076,7 @@ msgstr "Type '%s' is not supported (%s)\n"
|
||||
msgid "workspace.tokens.use-reference"
|
||||
msgstr "Use a reference"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/token_pill.cljs:133
|
||||
#: src/app/main/ui/workspace/tokens/management/token_pill.cljs:131
|
||||
msgid "workspace.tokens.value-not-valid"
|
||||
msgstr "The value is not valid"
|
||||
|
||||
@@ -8145,6 +8088,10 @@ msgstr "Invalid value: % is not allowed."
|
||||
msgid "workspace.tokens.value-with-units"
|
||||
msgstr "Invalid value: Units are not allowed."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:181, src/app/main/ui/workspace/tokens/management/create/form.cljs:602
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr "Renaming this token will break any reference to its old name."
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar.cljs:139, src/app/main/ui/workspace/sidebar.cljs:146
|
||||
msgid "workspace.toolbar.assets"
|
||||
msgstr "Assets"
|
||||
@@ -8490,15 +8437,11 @@ msgstr "Restore All"
|
||||
msgid "dashboard.clear-trash-button"
|
||||
msgstr "Clear trash"
|
||||
|
||||
msgid "dashboard.file-menu.restore-files-option"
|
||||
msgid_plural "dashboard.file-menu.restore-files-option"
|
||||
msgstr[0] "Restore file"
|
||||
msgstr[1] "Restore files"
|
||||
msgid "dashboard.restore-file-button"
|
||||
msgstr "Restore file"
|
||||
|
||||
msgid "dashboard.file-menu.delete-files-permanently-option"
|
||||
msgid_plural "dashboard.file-menu.delete-files-permanently-option"
|
||||
msgstr[0] "Delete file"
|
||||
msgstr[1] "Delete files"
|
||||
msgid "dashboard.delete-file-button"
|
||||
msgstr "Delete file"
|
||||
|
||||
msgid "dashboard.restore-project-button"
|
||||
msgstr "Restore project"
|
||||
@@ -8589,6 +8532,3 @@ msgstr "Restore unexpectedly slow"
|
||||
|
||||
msgid "dashboard.progress-notification.slow-delete"
|
||||
msgstr "Deletion unexpectedly slow"
|
||||
|
||||
msgid "dashboard.deleted.empty-state-description"
|
||||
msgstr "Your trash is empty. Deleted files and projects will appear here."
|
||||
|
||||
@@ -573,48 +573,48 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Descargar %s archivos estándar (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* Pueden incluir components, gráficos, colores y/o tipografias."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
msgid "dashboard.export.explain"
|
||||
msgstr ""
|
||||
"Uno o mas ficheros que quieres descargar usan librerias compartidas. ¿Qué "
|
||||
"Uno o mas ficheros que quieres exportar usan librerias compartidas. ¿Qué "
|
||||
"quieres hacer con los recursos*?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Ficheros con librerias compartidas se inclurán en el paquete de exportación "
|
||||
"y mantendrán los enlaces."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Exportar librerias compartidas"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Las biblioteca compartidas no se incluirán en la exportación y ningún "
|
||||
"recurso será incluido en la biblioteca. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Usar los recursos como objetos básicos"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"Tu fichero será exportado con todos los recursos dentro de la libreria del "
|
||||
"propio fichero."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "Incluir librerias compartidas dentro de las librerias del fichero"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
msgid "files-download-modal.title"
|
||||
msgstr "Descargar ficheros"
|
||||
msgid "dashboard.export.title"
|
||||
msgstr "Exportar ficheros"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/typography.cljs:317
|
||||
msgid "dashboard.fonts.deleted-placeholder"
|
||||
@@ -1552,12 +1552,6 @@ msgstr "El email o la contraseña son incorrectos."
|
||||
msgid "errors.wrong-old-password"
|
||||
msgstr "La contraseña anterior no es correcta"
|
||||
|
||||
msgid "errors.webgl-context-lost.main-message"
|
||||
msgstr "Ups! Se ha perdido el contexto del canvas"
|
||||
|
||||
msgid "errors.webgl-context-lost.desc-message"
|
||||
msgstr "WebGL ha dejado de funcionar. Por favor, recarga la página para restaurarlo"
|
||||
|
||||
#: src/app/main/ui/settings/feedback.cljs:120
|
||||
msgid "feedback.description"
|
||||
msgstr "Descripción"
|
||||
@@ -2508,9 +2502,6 @@ msgstr "Notas de versión"
|
||||
msgid "labels.reload-file"
|
||||
msgstr "Recargar archivo"
|
||||
|
||||
msgid "labels.reload-page"
|
||||
msgstr "Recargar página"
|
||||
|
||||
#: src/app/main/ui/workspace/libraries.cljs, src/app/main/ui/dashboard/team.cljs
|
||||
#, unused
|
||||
msgid "labels.remove"
|
||||
@@ -4429,46 +4420,6 @@ msgstr "Mostrar/ocultar recursos"
|
||||
msgid "shortcuts.toggle-colorpalette"
|
||||
msgstr "Mostrar/ocultar paleta de colores"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remap-token-references"
|
||||
msgstr "Actualizar referencias de token"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.renaming-token-from-to"
|
||||
msgstr "Renombrando el token de '%s' a '%s'"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/forms/generic_form.cljs
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr "Cambiar el nombre de este token romperá cualquier referencia a su nombre anterior."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.references-found"
|
||||
msgstr "%s referencias encontradas en tu diseño"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remap-explanation"
|
||||
msgstr "Todas las referencias a este token se actualizarán automáticamente para usar el nuevo nombre."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.no-references-found"
|
||||
msgstr "No se encontraron referencias"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.no-remap-needed"
|
||||
msgstr "Este token no se utiliza actualmente en tu diseño, por lo que no es necesario actualizar referencias."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remapping-in-progress"
|
||||
msgstr "Actualizando referencias de token..."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remap-and-rename"
|
||||
msgstr "Actualizar referencias y renombrar"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.rename-only"
|
||||
msgstr "Renombrar"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:185
|
||||
msgid "shortcuts.toggle-focus-mode"
|
||||
msgstr "Mostrar/ocultar focus mode"
|
||||
@@ -7957,14 +7908,6 @@ msgstr "Nombre"
|
||||
msgid "workspace.tokens.token-name-duplication-validation-error"
|
||||
msgstr "Ya existe un token en la ruta: %s"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/forms/shadow.cljs
|
||||
msgid "workspace.tokens.shadow-token-blur-value-error"
|
||||
msgstr "El valor de blur no puede ser negativo"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/forms/shadow.cljs
|
||||
msgid "workspace.tokens.shadow-token-spread-value-error"
|
||||
msgstr "El valor de spread no puede ser negativo"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:42, src/app/main/ui/workspace/tokens/management/create/form.cljs:68
|
||||
msgid "workspace.tokens.token-name-length-validation-error"
|
||||
msgstr "El nombre debería ser de al menos 1 caracter"
|
||||
@@ -8015,6 +7958,10 @@ msgstr "El valor no es válido"
|
||||
msgid "workspace.tokens.value-with-units"
|
||||
msgstr "Valor no válido: No se permiten unidades."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:181, src/app/main/ui/workspace/tokens/management/create/form.cljs:602
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr "Al renombrar este token se romperán las referencias al nombre anterior"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar.cljs:139, src/app/main/ui/workspace/sidebar.cljs:146
|
||||
msgid "workspace.toolbar.assets"
|
||||
msgstr "Recursos"
|
||||
@@ -8343,15 +8290,11 @@ msgstr "Restaurar todo"
|
||||
msgid "dashboard.clear-trash-button"
|
||||
msgstr "Vaciar papelera"
|
||||
|
||||
msgid "dashboard.file-menu.restore-files-option"
|
||||
msgid_plural "dashboard.file-menu.restore-files-option"
|
||||
msgstr[0] "Restaurar archivo"
|
||||
msgstr[1] "Restaurar archivos"
|
||||
msgid "dashboard.restore-file-button"
|
||||
msgstr "Restaurar archivo"
|
||||
|
||||
msgid "dashboard.file-menu.delete-files-permanently-option"
|
||||
msgid_plural "dashboard.file-menu.delete-files-permanently-option"
|
||||
msgstr[0] "Eliminar archivo"
|
||||
msgstr[1] "Eliminar archivos"
|
||||
msgid "dashboard.delete-file-button"
|
||||
msgstr "Eliminar archivo"
|
||||
|
||||
msgid "dashboard.restore-project-button"
|
||||
msgstr "Restaurar proyecto"
|
||||
@@ -8371,6 +8314,9 @@ msgstr "Después de eso, serán eliminados permanentemente."
|
||||
msgid "dashboard.trash-info-text-part4"
|
||||
msgstr "Si cambias de opinión, puedes restaurarlos o eliminarlos permanentemente desde el menú de cada archivo."
|
||||
|
||||
msgid "dashboard.deleted.delete-forever"
|
||||
msgstr "Eliminar para siempre"
|
||||
|
||||
msgid "dashboard.restore-all-confirmation.title"
|
||||
msgstr "Restaurar todos los proyectos y archivos"
|
||||
|
||||
@@ -8419,6 +8365,9 @@ msgstr "Hubo un error al restaurar los archivos."
|
||||
msgid "dashboard.errors.error-on-restore-file"
|
||||
msgstr "Hubo un error al restaurar el archivo %s."
|
||||
|
||||
msgid "dashboard.errors.error-on-restoring-files"
|
||||
msgstr "Hubo un error al restaurar archivos."
|
||||
|
||||
msgid "dashboard.errors.error-on-delete-files"
|
||||
msgstr "Hubo un error al eliminar archivos."
|
||||
|
||||
@@ -8436,6 +8385,3 @@ msgstr "Restauración inesperadamente lenta"
|
||||
|
||||
msgid "dashboard.progress-notification.slow-delete"
|
||||
msgstr "Eliminación inesperadamente lenta"
|
||||
|
||||
msgid "dashboard.deleted.empty-state-description"
|
||||
msgstr "Tu papelera está vacía. Los archivos y proyectos eliminados aparecerán aquí."
|
||||
|
||||
@@ -444,7 +444,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Descargar %s archivos estándar (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* Puede incluir componentes, gráficos, colores y/o tipografías."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -455,33 +455,33 @@ msgstr ""
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
#, fuzzy
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Los archivos con bibliotecas compartidas se incluirán en la exportación, "
|
||||
"manteniendo su vinculación."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Exportar bibliotecas compartidas"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Las bibliotecas compartidas no se incluirán en la exportación y no se "
|
||||
"agregarán activos a la biblioteca. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Trate los activos de biblioteca compartidos como objetos básicos"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"Su archivo se exportará con todos los activos externos combinados en la "
|
||||
"biblioteca de archivos."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "Incluir recursos de biblioteca compartidos en bibliotecas de archivos"
|
||||
|
||||
#: src/app/main/ui/dashboard/import.cljs:131
|
||||
|
||||
@@ -358,7 +358,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Deskargatu %s fitxategi estandar (.svn + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* Osagaiak, grafikoak, koloreak edo/eta tipografiak izan ditzakete."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -368,31 +368,31 @@ msgstr ""
|
||||
"darabiltzate. Zer egin nahi duzu baliabideekin*?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Partekatutako liburutegiak dituzten fitxategiak esportazio paketean sartuko "
|
||||
"dira eta loturak mantenduko dituzte."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Esportatu partekatutako liburutegiak"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Partekatutako liburutegiak ez dira esportazioan sartuko eta baliabide bat "
|
||||
"ere ez da liburutegian sartuko. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Erabili baliabideak oinarrizko objektu bezala"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr "Zure fitxategia baliabide guztiak bere baitan dituela esportatuko da."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "Sartu partekatutako liburutegiak fitxategiaren liburutegietan"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
|
||||
@@ -491,7 +491,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "دانلود %s عدد فایل های استاندارد (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* ممکن است شامل کامپوننتها، گرافیک، رنگها و/یا تایپوگرافی باشد."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -502,33 +502,33 @@ msgstr ""
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
#, fuzzy
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"فایلهای دارای کتابخانههای مشترک در اکسپورت گنجانده میشوند و پیوند خود را حفظ "
|
||||
"میکنند."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "اکسپورت کتابخانههای مشترک"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"کتابخانههای مشترک در صادرات گنجانده نخواهند شد و هیچ دارایی به کتابخانه "
|
||||
"اضافه نخواهد شد. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "داراییهای کتابخانه مشترک را به عنوان اشیاء اساسی در نظر بگیرید"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"فایل شما با تمام داراییهای خارجی که در کتابخانه فایل ادغام شدهاند اکسپورت "
|
||||
"میشود."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "داراییهای کتابخانه مشترک را در کتابخانههای فایل قرار دهید"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
|
||||
@@ -381,7 +381,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Heinta %s standarafílur (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Útflyt deild søvn"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
|
||||
@@ -573,7 +573,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Télécharger %s fichiers standard (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr ""
|
||||
"* Peut inclure les composants, les éléments graphiques, les couleurs et/ou "
|
||||
"les polices de caractère."
|
||||
@@ -586,35 +586,35 @@ msgstr ""
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
#, fuzzy
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Les fichiers avec des bibliothèques partagées seront inclus dans "
|
||||
"l'exportation, en maintenant leur liaison."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Exporter les bibliothèques partagées"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Les bibliothèques partagées ne seront pas incluses dans l'exportation et "
|
||||
"aucune ressource ne sera ajoutée à la bibliothèque. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr ""
|
||||
"Considérer les ressources des bibliothèques partagées comme des objets "
|
||||
"basiques"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"Votre fichier sera exporté avec toutes les ressources externes fusionnées "
|
||||
"dans la bibliothèque de fichiers."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr ""
|
||||
"Inclure les ressources des bibliothèques partagées dans les bibliothèques "
|
||||
"de fichiers"
|
||||
@@ -7893,6 +7893,10 @@ msgstr "Valeur non valide : % n'est pas autorisé."
|
||||
msgid "workspace.tokens.value-with-units"
|
||||
msgstr "Valeur non valide : les unités ne sont pas autorisées."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:181, src/app/main/ui/workspace/tokens/management/create/form.cljs:602
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr "Si vous renommez ce token, toute référence à son ancien nom sera incorrecte."
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar.cljs:139, src/app/main/ui/workspace/sidebar.cljs:146
|
||||
msgid "workspace.toolbar.assets"
|
||||
msgstr "Ressources"
|
||||
|
||||
@@ -356,7 +356,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Descargar %s ficheiros estándar (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* Pode incluir compoñentes, gráficos, cores e/ou fontes."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -366,33 +366,33 @@ msgstr ""
|
||||
"Que queres facer cos recursos?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Os ficheiros con bibliotecas compartidas incluiranse na exportación "
|
||||
"mantendo os vínculos."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Exportar bibliotecas compartidas"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"As bibliotecas compartidas non se incluirán na exportación e non se "
|
||||
"engadirán recursos á biblioteca. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Tratar os recursos da biblioteca compartida coma obxetos básicos"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"O teu ficheiro exportarase con todos os recursos externos metidos na "
|
||||
"biblioteca do ficheiro."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "Incluir os recursos de bibliotecas compartidas na biblioteca do ficheiro"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
|
||||
@@ -421,7 +421,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Sauke %s cikakken kundi (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "*akwai sassan,hotuna,launuka,da/kozane-zane."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -429,29 +429,29 @@ msgid "dashboard.export.explain"
|
||||
msgstr "za ka iya fitar da kundi daya ko fiye ta hanyar tura taska. \"me \"*?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr "Manhajar tura kundi ta kunshi fitarwa, tattali mahaxarsu."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "fitar da manhajar tura kundi"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr "manhajar tura kundi ba ta shiga cikin fitarwa, wani amfaniqarawa a taska. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "lura da bayanan da ke cikin manhajar tura kundi"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"za ka iya fitar da kundi tare da haxe muhimman abubuwa, na waje a "
|
||||
"kunditaskira."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "tura taska ya qunshi bayanan da ke cikin kundin taskoki"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2026-01-03 20:01+0000\n"
|
||||
"PO-Revision-Date: 2025-12-22 15:34+0000\n"
|
||||
"Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>\n"
|
||||
"Language-Team: Hebrew <https://hosted.weblate.org/projects/penpot/frontend/"
|
||||
"he/>\n"
|
||||
@@ -554,7 +554,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "הורדת %s קבצים תקניים (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* עשוי לכלול רכיבים, גרפיקה, צבעים ו/או טיפוגרפיות."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -564,27 +564,28 @@ msgstr ""
|
||||
"המשאבים שלהן*?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
#, fuzzy
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr "קבצים עם ספריות משותפות יצורפו לייצוא, תוך שימור הקישוריות שלהם."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "ייצוא ספריות משותפות"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr "ספריות משותפות לא יצורפו לייצוא ואף משאב לא יתווסף לספריה. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "להתייחס למשאבים בספריות משותפות כעצמים בסיסיים"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr "הקובץ שלך ייוצא כשכל המשאבים החיצוניים ממוזגים לספריית הקבצים."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "לכלול משאבי ספריה משותפת בספריות הקבצים"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
@@ -1774,8 +1775,9 @@ msgid "inspect.empty.select"
|
||||
msgstr "ניתן לבחור צורה, לוח או קבוצה ולראות את המאפיינים והקוד שלהם"
|
||||
|
||||
#: src/app/main/ui/inspect/right_sidebar.cljs:166
|
||||
#, fuzzy
|
||||
msgid "inspect.layer-info"
|
||||
msgstr "פרטי שכבה"
|
||||
msgstr "בחירת לשונית חקירה"
|
||||
|
||||
#: src/app/main/ui/inspect/right_sidebar.cljs:137
|
||||
msgid "inspect.multiple-selected"
|
||||
@@ -7808,6 +7810,10 @@ msgstr "ערך שגוי: אסור %."
|
||||
msgid "workspace.tokens.value-with-units"
|
||||
msgstr "ערך שגוי: אסור יחידות."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:181, src/app/main/ui/workspace/tokens/management/create/form.cljs:602
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr "שינוי שם האסימון הזה יפגע בכל הפניה לשם הישן שלו."
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar.cljs:139, src/app/main/ui/workspace/sidebar.cljs:146
|
||||
msgid "workspace.toolbar.assets"
|
||||
msgstr "משאבים"
|
||||
@@ -8346,25 +8352,3 @@ msgstr "אורך השם חייב להיות תו אחד לפחות"
|
||||
#: src/app/main/data/workspace/tokens/errors.cljs:85
|
||||
msgid "workspace.tokens.invalid-text-decoration-token-value"
|
||||
msgstr "ערך אסימון שגוי: מותר רק none, underline ו־strike-through"
|
||||
|
||||
#: src/app/main/ui/inspect/right_sidebar.cljs:240
|
||||
msgid "inspect.empty.more"
|
||||
msgstr "פרטים נוספים"
|
||||
|
||||
msgid "subscription.settings.management-dialog.step-2-description"
|
||||
msgstr ""
|
||||
"אפשר להוסיף את פרטי התשלום שלך היית כדי להשאיר את המינוי שלך פעיל ונטול "
|
||||
"תקלות גם אחרי תקופת הניסיון וגם כדי להמשיך לתמוך במיזם הקוד הפתוח שלנו. לא "
|
||||
"יתבצע שום חיוב עדיין."
|
||||
|
||||
#: src/app/main/data/workspace/tokens/errors.cljs:93
|
||||
msgid "workspace.tokens.invalid-font-family-token-value"
|
||||
msgstr "ערך אסימון שגוי: אפשר להפנות לאסימון font-family (משפחת גופנים) בלבד"
|
||||
|
||||
#: src/app/main/data/workspace/tokens/errors.cljs
|
||||
msgid "workspace.tokens.invalid-token-value-shadow"
|
||||
msgstr "ערך שגוי: יש להפנות לאסימון הצללה מורכבת."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/form.cljs:775
|
||||
msgid "workspace.tokens.reference-composite-shadow"
|
||||
msgstr "נא למלא כינוי הצללת אסימון"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2025-12-27 05:00+0000\n"
|
||||
"PO-Revision-Date: 2025-12-22 15:34+0000\n"
|
||||
"Last-Translator: VKing9 <vaibhavrathod2282@gmail.com>\n"
|
||||
"Language-Team: Hindi <https://hosted.weblate.org/projects/penpot/frontend/"
|
||||
"hi/>\n"
|
||||
@@ -559,7 +559,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "%s मानक फ़ाइलें डाउनलोड करें (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* इसमें कॉम्पोनेंट्स, ग्राफिक्स, रंग और/या टाइपोग्राफ़ी शामिल हो सकते हैं।"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -569,33 +569,34 @@ msgstr ""
|
||||
"लाइब्रेरीज़ का उपयोग कर रही हैं। आप उनके एसेट्स के साथ क्या करना चाहते हैं?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
#, fuzzy
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"साझा की गई लाइब्रेरीज़ वाली फ़ाइलें निर्यात में शामिल की जाएँगी, और उनका लिंक बनाए रखा "
|
||||
"जाएगा।"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "साझा लाइब्रेरीज़ निर्यात करें"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"साझा की गई लाइब्रेरीज़ निर्यात में शामिल नहीं की जाएँगी और लाइब्रेरी में "
|
||||
"कोई एसेट्स नहीं जोड़े जाएँगे। "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "साझा की गई लाइब्रेरी के एसेट्स को बुनियादी ऑब्जेक्ट्स के रूप में मानें"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"आपकी फ़ाइल निर्यात की जाएगी और सभी बाहरी एसेट्स(assets) फ़ाइल लाइब्रेरी में "
|
||||
"विलय कर दिए जाएँगे।"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "साझा की गई लाइब्रेरी के एसेट्स को फ़ाइल लाइब्रेरी में शामिल करें"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
@@ -7299,6 +7300,10 @@ msgstr "मान मान्य नहीं है"
|
||||
msgid "workspace.tokens.value-with-units"
|
||||
msgstr "अमान्य मान: इकाइयाँ अनुमति नहीं हैं।"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:181, src/app/main/ui/workspace/tokens/management/create/form.cljs:602
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr "इस टोकन का नाम बदलने से इसके पुराने नाम के किसी भी संदर्भ टूट जाएंगे।"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar.cljs:139, src/app/main/ui/workspace/sidebar.cljs:146
|
||||
msgid "workspace.toolbar.assets"
|
||||
msgstr "एसेट्स"
|
||||
@@ -7747,8 +7752,9 @@ msgid "inspect.color-space-label"
|
||||
msgstr "रंग स्थान चुनें"
|
||||
|
||||
#: src/app/main/ui/inspect/right_sidebar.cljs:166
|
||||
#, fuzzy
|
||||
msgid "inspect.layer-info"
|
||||
msgstr "परत जानकारी"
|
||||
msgstr "निरीक्षण टैब चुनें"
|
||||
|
||||
#: src/app/main/ui/inspect/styles/panels/tokens_panel.cljs:26
|
||||
msgid "inspect.tabs.styles.active-sets"
|
||||
@@ -8438,19 +8444,3 @@ msgstr "यह संस्करण आपके द्वारा लॉक
|
||||
#, unused
|
||||
msgid "workspace.versions.tooltip.locked-version"
|
||||
msgstr "लॉक किया गया संस्करण - केवल निर्माता ही इसे संशोधित कर सकता है"
|
||||
|
||||
#: src/app/main/ui/inspect/right_sidebar.cljs:240
|
||||
msgid "inspect.empty.more"
|
||||
msgstr "और जानकारी"
|
||||
|
||||
#: src/app/main/data/workspace/tokens/errors.cljs:93
|
||||
msgid "workspace.tokens.invalid-font-family-token-value"
|
||||
msgstr "Invalid token value: आप केवल फ़ॉन्ट-परिवार token का संदर्भ ले सकते हैं"
|
||||
|
||||
#: src/app/main/data/workspace/tokens/errors.cljs
|
||||
msgid "workspace.tokens.invalid-token-value-shadow"
|
||||
msgstr "अमान्य मूल्य: एक समग्र छाया टोकन का संदर्भ देना चाहिए।।"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/form.cljs:775
|
||||
msgid "workspace.tokens.reference-composite-shadow"
|
||||
msgstr "एक token छाया आलिया दर्ज करें"
|
||||
|
||||