mirror of
https://github.com/penpot/penpot.git
synced 2026-11-20 17:11:15 +00:00
With the tokenscript flag every resolution rebuilt the whole library: each sidebar render, each propagation and each keystroke in a token form. The adapter now keeps the interpreter state of the last resolutions and updates it with set-sets, so only the tokens that changed and their dependents are re-resolved and converted. Every other output token stays the same object. - common/deps.edn moves penpot/tokenscript-interpreter to v0.3.0: token readers and writers and a set-sets that looks only into changed sets (#1), on top of the DTCG import and export (#4) Penpot already uses. - The sidebar, token propagation, token application and the plugin API pass the active sets unmerged (cfo/get-active-token-sets and its force variant); the interpreter merges them. The plugin API's own resolution cache is gone. - The adapter hands Penpot's token records to the interpreter with a reader (value and DTCG type, an error for a token without a value) and a writer (the conversion to :resolved-value or :errors), which runs only for the re-resolved names. - The cache resolves new sets from the last resolution with the same set ids, else from one sharing a set id, else from scratch. - The token form controls resolve the draft in a set of its own on top of the library's sets, the selected set last (cfo/get-token-sets-for-edit). The form leaves the edited token's old name out of them (cfo/without-token). A keystroke re-resolves only the draft and its dependents. The last draft is cached apart, so typing doesn't evict the sidebar's resolutions. Without the flag the controls don't build these sets. The plugin API's token name and value setters validate the candidate the same way. - The token form hint shows resolved font families as a name list. - Tests cover the unmerged set helpers, a plugin rename to a name below the old one (which needs the old name left out), and compare renames, with and without updating the references, against StyleDictionary. Signed-off-by: Florian Schroedl <flo.schroedl@gmail.com>
97 lines
3.4 KiB
Clojure
97 lines
3.4 KiB
Clojure
{:deps
|
|
{org.clojure/clojure {:mvn/version "1.12.7"}
|
|
org.clojure/data.json {:mvn/version "2.5.2"}
|
|
org.clojure/tools.cli {:mvn/version "1.4.256"}
|
|
org.clojure/test.check {:mvn/version "1.1.3"}
|
|
org.clojure/data.fressian {:mvn/version "1.1.1"}
|
|
org.clojure/clojurescript {:mvn/version "1.12.145"}
|
|
|
|
org.apache.commons/commons-pool2 {:mvn/version "2.13.1"}
|
|
|
|
;; Logging
|
|
org.apache.logging.log4j/log4j-api {:mvn/version "2.26.1"}
|
|
org.apache.logging.log4j/log4j-core {:mvn/version "2.26.1"}
|
|
org.apache.logging.log4j/log4j-web {:mvn/version "2.26.1"}
|
|
org.apache.logging.log4j/log4j-jul {:mvn/version "2.26.1"}
|
|
org.apache.logging.log4j/log4j-slf4j2-impl {:mvn/version "2.26.1"}
|
|
org.slf4j/slf4j-api {:mvn/version "2.0.20"}
|
|
pl.tkowalcz.tjahzi/log4j2-appender {:mvn/version "0.9.43"}
|
|
|
|
selmer/selmer {:mvn/version "1.13.5"}
|
|
criterium/criterium {:mvn/version "0.4.6"}
|
|
|
|
metosin/jsonista {:mvn/version "1.0.2"
|
|
:exclusions [com.fasterxml.jackson.core/jackson-core
|
|
com.fasterxml.jackson.core/jackson-databind]}
|
|
com.fasterxml.jackson.core/jackson-core {:mvn/version "2.23.0"}
|
|
com.fasterxml.jackson.core/jackson-databind {:mvn/version "2.23.0"}
|
|
|
|
|
|
metosin/malli {:mvn/version "0.20.3"}
|
|
|
|
expound/expound {:mvn/version "0.9.0"}
|
|
com.cognitect/transit-clj {:mvn/version "1.2.372"}
|
|
com.cognitect/transit-cljs {:mvn/version "0.8.280"}
|
|
java-http-clj/java-http-clj {:mvn/version "0.4.3"}
|
|
integrant/integrant {:mvn/version "1.0.1"}
|
|
|
|
funcool/cuerdas {:mvn/version "2026.415"}
|
|
funcool/promesa {:mvn/version "12.0.1"}
|
|
|
|
funcool/datoteka
|
|
{:git/tag "4.0.0"
|
|
:git/sha "3372f3a"
|
|
:git/url "https://github.com/funcool/datoteka"}
|
|
|
|
lambdaisland/uri {:mvn/version "1.19.155"
|
|
:exclusions [org.clojure/data.json]}
|
|
|
|
frankiesardo/linked {:mvn/version "1.3.0"}
|
|
|
|
;; Resolves token values, reads and writes token files.
|
|
penpot/tokenscript-interpreter
|
|
{:git/tag "v0.3.0"
|
|
:git/sha "040583ad348e215b78ad1e4075759a9b7ec52750"
|
|
:git/url "https://github.com/penpot/tokenscript-interpreter.git"}
|
|
|
|
com.sun.mail/jakarta.mail {:mvn/version "2.0.2"}
|
|
org.la4j/la4j {:mvn/version "0.6.0"}
|
|
|
|
me.flowthing/pp {:mvn/version "2026-03-01.107"}
|
|
|
|
io.aviso/pretty {:mvn/version "1.4.4"}
|
|
environ/environ {:mvn/version "1.2.0"}}
|
|
:paths ["src" "vendor" "resources" "target/classes"]
|
|
:aliases
|
|
{:dev
|
|
{:extra-deps
|
|
{org.clojure/tools.namespace {:mvn/version "1.5.1"}
|
|
thheller/shadow-cljs {:mvn/version "3.5.3"}
|
|
com.clojure-goes-fast/clj-async-profiler {:mvn/version "2.0.0-beta1"}
|
|
com.bhauman/rebel-readline {:mvn/version "0.1.11"}
|
|
criterium/criterium {:mvn/version "0.4.6"}
|
|
mockery/mockery {:mvn/version "0.1.4"}}
|
|
:extra-paths ["test" "dev"]}
|
|
|
|
:build
|
|
{:extra-deps
|
|
{io.github.clojure/tools.build {:mvn/version "0.10.14"}}
|
|
:ns-default build}
|
|
|
|
:test
|
|
{:main-opts ["-m" "kaocha.runner"]
|
|
:extra-deps {lambdaisland/kaocha {:mvn/version "1.91.1392"}}}
|
|
|
|
;; Use after :test (`-M:dev:test:coverage`) to run the suite with cloverage.
|
|
:coverage
|
|
{:main-opts ["-m" "kaocha.runner" "--plugin" "cloverage"]
|
|
:extra-deps {lambdaisland/kaocha-cloverage {:mvn/version "1.1.89"}}}
|
|
|
|
:shadow-cljs
|
|
{:main-opts ["-m" "shadow.cljs.devtools.cli"]
|
|
:jvm-opts ["--sun-misc-unsafe-memory-access=allow"]}
|
|
|
|
:outdated
|
|
{:extra-deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}
|
|
:main-opts ["-m" "antq.core"]}}}
|