From 310dac9e423aaaf87975457ed7582671bc039cb7 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 12 Nov 2026 20:14:13 +0100 Subject: [PATCH] :sparkles: Generate border radius tokens in component histories The random histories never applied a design token. The token programs give the file an active set of three border radius tokens and add token steps: apply a token to every corner of a rectangle or board, main or copy; take one off; set a corner's radius by hand, which takes its token off; and edit a token's value, which sets it on every shape that applies it, without touching, as the token editor and its propagation do. The model learns what tokens change: - the tokens of a shape's corners go with its radius group, so a copy that applies or takes off a token authors its radius; - a token edit sets the authored corners that apply it; a token names the corners as a flipped shape shows them, so they are set mirrored; - a switch carries each corner's token, or its lack of one, with its radius. The undo and redo checks compare the tokens library by its exported content, as undo gives it back with new modification times. The golden master of case AY is recorded again for that: its token library is now written as that content, key by key, with the same values. A token edit does not reach the shapes deleted components store, so a copy of a deleted main loses the edit at its next sync; no token edit is made while a deleted component stores a shape that applies the token. Tests: random-token-compositions, 200 programs pass; a-token-edit-sets-the-corners-of-a-flipped-copy-as-it-shows-them, switching-a-copy-carries-the-radius-tokens-it-applied, switching-a-copy-carries-each-corner-token-with-its-radius. Harness only; the benchmark is not run. Also in this commit: - Leave undone creations out of the harness sync comparisons. Undoing a new variant set leaves its component deleted, its stored objects holding the nested copies as they were. Undoing an earlier edit of a main restores the main, but an undo starts no sync, so those stored copies keep the edit. Only redo brings that component back, and redo restores the edit first, so no user sees them. The I5 and I6 checks compare the settled file with a full sync, which rewrites them. AI-assisted-by: claude-opus-5-5 --- .../test_helpers/composable/comp/nodes.cljc | 58 +++++++++++++ .../common/test_helpers/composable/gen.cljc | 81 ++++++++++++++++++- .../test_helpers/composable/oracle.cljc | 35 +++++++- .../test_helpers/composable/shadow.cljc | 49 ++++++++++- .../app/common/test_helpers/normalize.cljc | 5 ++ .../logic/composable_gen_test.cljc | 34 ++++++++ .../test/common_tests/logic/golden_master.edn | 8 +- 7 files changed, 256 insertions(+), 14 deletions(-) diff --git a/common/src/app/common/test_helpers/composable/comp/nodes.cljc b/common/src/app/common/test_helpers/composable/comp/nodes.cljc index 5d5ece463c..275569f10b 100644 --- a/common/src/app/common/test_helpers/composable/comp/nodes.cljc +++ b/common/src/app/common/test_helpers/composable/comp/nodes.cljc @@ -2528,6 +2528,64 @@ [target token-name] (tm/assign-id (->UnapplyToken target token-name))) +(defn token-value + "The value of the border radius token `token-name` in the active set of + `file`, nil when it has none." + [file token-name] + (some-> (cfo/get-tokens-lib (:data file)) + (ctob/get-token-by-name "composable" token-name) + :value)) + +(defn token-corners + "The corners of `shape` that apply the token `token-name`." + [shape token-name] + (into #{} (filter #(= token-name (get-in shape [:applied-tokens %]))) radius-attrs)) + +(defrecord EditTokenValue [token-name value] + IComponentOperation + (op-kind [_] :user) + + tm/IOperation + (apply-to [this situation] + ;; as the token editor commits it: the token's new value, and its + ;; propagation to the corners of every shape that applies it, without + ;; touching + (let [the-file (tm/file situation) + lib (cfo/get-tokens-lib (:data the-file)) + set-id (ctob/get-id (ctob/get-set-by-name lib "composable")) + token (ctob/get-token-by-name lib "composable" token-name) + changes (-> (pcb/empty-changes nil) + (pcb/with-library-data (:data the-file)) + (pcb/set-token set-id (:id token) (assoc token :value value))) + changes (reduce (fn [changes page] + (let [objects (:objects page) + ids (into #{} + (comp (filter #(seq (token-corners % token-name))) + (map :id)) + (vals objects))] + (cond-> changes + (seq ids) + (-> (pcb/with-page page) + (pcb/with-objects objects) + (cls/generate-update-shapes + ids + #(ctsr/set-radius-for-corners % (token-corners % token-name) value) + objects + {:ignore-touched true :attrs radius-attrs}))))) + changes + (vals (get-in the-file [:data :pages-index]))) + file' (thf/apply-changes the-file changes)] + (-> situation + (tm/with-file file') + (record-changes changes) + (tm/record-application this {:token-name token-name :value value}))))) + +(defn edit-token-value + "Give the border radius token `token-name` the value `value` and set it + on the shapes that apply it (token edit and propagation on the frontend)." + [token-name value] + (tm/assign-id (->EditTokenValue token-name value))) + (defn has-token? "Whether `shape` has the border radius token `token-name` on every corner, with radius `value`." diff --git a/common/src/app/common/test_helpers/composable/gen.cljc b/common/src/app/common/test_helpers/composable/gen.cljc index 6bd624f363..0770fc7166 100644 --- a/common/src/app/common/test_helpers/composable/gen.cljc +++ b/common/src/app/common/test_helpers/composable/gen.cljc @@ -281,6 +281,14 @@ [(:id shape) source])))] (shadow/settle model (all-objects situation) references synced?))) +(def token-names + "The border radius tokens of the token programs." + ["radius.s" "radius.m" "radius.l"]) + +(def token-values + "The first values of `token-names`, and the values a token edit gives." + [4 12 24 8 16 32]) + (defn world [[components depth opts]] (thi/reset-idmap!) @@ -335,6 +343,7 @@ (and (= :grid (:layout opts)) (:grid-empty opts)) (with-empty-grid "random-0") ;; Files open with their layouts already computed. (:layout opts) (r/settle-layout) + (:tokens opts) (as-> s (tm/apply-to (n/add-tokens (mapv vector token-names token-values)) s)) (:library opts) (with-library opts) (:stale-libraries opts) (cf/freeze-libraries) (:rich-variants opts) (as-> s (assoc s :shape-budget (+ 80 (count (tree s))))) @@ -386,6 +395,9 @@ 4 (top-copy shape))) (:text :text-style) (= :text (:type shape)) :add-child (ctk/main-instance? shape) + :apply-token (and (#{:rect :frame} (:type shape)) + (not (ctk/is-variant-container? shape))) + :unapply-token (some #(get-in shape [:applied-tokens %]) n/radius-attrs) ;; a shape a main holds, other than its root :structure (and (nil? (:shape-ref shape)) (not (ctk/main-instance? shape)) (some ctk/main-instance? (cfh/get-parents objects (:id shape)))) @@ -750,6 +762,17 @@ (tm/file situation)) (get-in selected [:shape :id])) (or property 0) (or value 0) (or scope 0))) + token-name (case kind + :unapply-token (when selected + (let [names (->> (select-keys (get-in selected [:shape :applied-tokens]) n/radius-attrs) + vals distinct sort vec)] + (nth names (mod (or property 0) (count names))))) + (:apply-token :token-value) (nth token-names (mod (or property 0) (count token-names))) + nil) + token-value (case kind + :apply-token (n/token-value (tm/file situation) token-name) + :token-value (nth token-values (mod (or value 0) (count token-values))) + nil) property (if (= kind :style) style-property (nth [:fills :opacity :name] (mod (or property 0) 3))) value (if (= kind :style) (nth style-values (mod (or value 0) (count style-values))) @@ -767,6 +790,14 @@ :library-accept (when selected (n/sync-from-library (:source-id selected))) :library-undo (when selected (n/undo)) :library-redo (when selected (n/redo)) + ;; a token edit does not reach the shapes deleted components store + ;; (F506), so none is made while one of them applies the token + :token-value (when-not (some #(seq (n/token-corners % token-name)) + (for [component (vals (get-in (tm/file situation) [:data :components])) + :when (:deleted component) + shape (vals (:objects component))] + shape)) + (n/edit-token-value token-name token-value)) (when target (case kind (:edit :style) (n/change-property target property value) @@ -816,6 +847,8 @@ {:typography {:id (thi/id :generated-typography) :file-id file-id}}))) :add-child (n/add-child target (keyword (str "generated-" (count (:applied situation)))) :width 20 :height 20 :x 10 :y 10) + :apply-token (n/apply-token target token-name token-value) + :unapply-token (n/unapply-token target token-name) :remove-child (n/remove-child target) :duplicate (n/duplicate target) :nest (n/nest-copy target (constantly (get-in selected [:parent :id]))) @@ -830,7 +863,7 @@ (:combine :library-combine) (n/combine-as-variants [target (constantly (get-in selected [:with :shape :id]))]))))] {:op op :library-id (:library-id selected) :shape (:shape selected) :destination (:shape (:destination selected)) :property property :value value :set-edit set-edit - :with (:shape (:with selected)) + :with (:shape (:with selected)) :token-name token-name :token-value token-value :opportunities (if (seq items) (count items) (if (or op (= kind :sync)) 1 0)) :trace (cond-> {:kind kind :tuple tuple :status (if (or op (= kind :sync)) :executed :skip)} @@ -840,6 +873,7 @@ (= kind :switch) (assoc :property-pos (:variant-pos selected)) set-edit (assoc :edit (:edit set-edit)) (:with selected) (assoc :with (get-in selected [:with :path])) + token-name (assoc :token token-name) (and (nil? op) (not= kind :sync)) (assoc :reason (str "No eligible " (name kind) " target")))})) @@ -919,7 +953,8 @@ all (into (set (synchronizable-components situation)) (r/pending-components situation)) full-before (r/settle situation all) full (:situation (cf/sync-world settled all)) - opts {:free-head-placement false} + ;; an undone creation keeps its stored copies as they were when it was undone + opts {:free-head-placement false :unreferenced-deleted-components false} settled-design (oracle/canonical settled opts) full-before-design (oracle/canonical full-before opts) full-design (oracle/canonical full opts) @@ -1002,7 +1037,7 @@ (if library-id (get (cf/all-files situation) library-id) (tm/file situation))) (defn- update-model - [model before after {:keys [shape property value op library-id]} kind] + [model before after {:keys [shape property value op library-id token-name token-value]} kind] (let [objects (all-objects before) id (:id shape) kind (get local-variant-kind kind kind)] @@ -1039,6 +1074,9 @@ (:grid-cell :grid-direction) (grid/edit model shape (:action op) (:value op)) :grid-track (grid/edit-tracks model shape (:action op) (:value op)) :reset (shadow/clear-subtree model objects id) + :apply-token (shadow/apply-token model shape token-name token-value) + :unapply-token (shadow/apply-token model shape token-name nil) + :token-value (shadow/edit-token-value model objects token-name token-value) :update-main (shadow/update-main model objects (all-objects after) id) :detach (shadow/detach model objects (all-objects after) id) :nest (let [parent (get objects (tm/target-shape-id before (:into op)))] @@ -1236,6 +1274,16 @@ :add-variant (check-requested-variant file-before file resolved) (:make-variant :combine) (check-requested-variant-set file-before file resolved variant-kind) nil)) + (case kind + :apply-token (when-not (n/has-token? (tm/shape-by-id after (get-in resolved [:shape :id])) + (:token-name resolved) (:token-value resolved)) + (oracle/fail :I9 {:phase :requested-token :token (:token-name resolved)})) + :unapply-token (when (seq (n/token-corners (tm/shape-by-id after (get-in resolved [:shape :id])) + (:token-name resolved))) + (oracle/fail :I9 {:phase :requested-token-removal :token (:token-name resolved)})) + :token-value (when-not (= (:token-value resolved) (n/token-value (tm/file after) (:token-name resolved))) + (oracle/fail :I9 {:phase :requested-token-value :token (:token-name resolved)})) + nil) (when (#{:swap :switch} kind) (let [head (tm/shape-by-id after (get-in resolved [:shape :id]))] (when-not (= (get-in resolved [:destination :component-id]) (:component-id head)) @@ -1431,6 +1479,15 @@ (conj [6 (gen/fmap (fn [[parent index edit value]] [[:add-child parent] [:structure index edit value]]) (gen/tuple gen/nat gen/nat (gen/choose 0 (dec (count structure-edits))) gen/nat))]) + (every? (set kinds) [:apply-token :token-value]) + (conj [6 (gen/fmap (fn [[index token value]] + [[:apply-token index token] [:token-value 0 token value]]) + (gen/tuple gen/nat gen/nat gen/nat))]) + (every? (set kinds) [:apply-token :style]) + (conj [3 (gen/fmap (fn [[index token value]] + ;; a copy that applies a token and then sets a radius by hand + [[:apply-token index token] [:style index 3 value 1]]) + (gen/tuple gen/nat gen/nat gen/nat))]) (contains? (set kinds) :grid-track) (conj [6 (gen/fmap (fn [[index edit value scope]] [[:grid-track index edit value scope]]) (gen/tuple gen/nat (gen/choose 0 (dec (count grid-track-edits))) gen/nat gen/nat))]) @@ -1571,6 +1628,24 @@ :layout-copies true :layout-children layout-children}] :ops ops})) +(def token-kinds (into swap-kinds [:apply-token :unapply-token :token-value])) + +(def token-coverage-kinds + "The kinds the token programs must cover: applying, taking off and + editing tokens, and the steps that carry them into copies." + [:apply-token :unapply-token :token-value :style :update-main :reset :swap :sync :undo :redo]) + +(def token-program-gen + "Histories that apply border radius tokens to mains and copies, take them + off, set radii by hand and edit the tokens' values." + (gen/let [components (gen/choose 2 3) + depth (gen/choose 0 2) + layout (gen/elements [nil :flex :grid]) + ops (operation-gen token-kinds)] + {:world [components depth {:tokens true :variants true :rich-variants true :text true + :layout layout :layout-copies true}] + :ops ops})) + (def grid-kinds (into swap-kinds [:grid-track])) (def grid-coverage-kinds diff --git a/common/src/app/common/test_helpers/composable/oracle.cljc b/common/src/app/common/test_helpers/composable/oracle.cljc index 530459cdd5..9174bef268 100644 --- a/common/src/app/common/test_helpers/composable/oracle.cljc +++ b/common/src/app/common/test_helpers/composable/oracle.cljc @@ -160,12 +160,38 @@ (def ^:private corner-order (juxt #(Math/round (* 100.0 (:x %))) #(Math/round (* 100.0 (:y %))))) +(defn- without-unreferenced-deleted + "The snapshot `files` without the deleted components no shape outside + their own objects refers to, as an undone creation: only redo brings one + back, so no sync reaches its stored copies." + [files] + (let [referenced (into #{} + (for [[_ file] files + [owner objects] (concat (map (fn [page] [nil (:objects page)]) + (vals (get-in file [:data :pages-index]))) + (keep (fn [[id component]] + (when (:objects component) [id (:objects component)])) + (get-in file [:data :components]))) + shape (vals objects) + :let [id (:component-id shape)] + :when (and id (not= id owner))] + id))] + (update-vals files + (fn [file] + (d/update-in-when file [:data :components] + (fn [components] + (into {} (remove (fn [[id component]] + (and (:deleted component) (not (contains? referenced id))))) + components))))))) + (defn design-snapshot "Design inputs without derived placement, dimensions and bookkeeping. - Geometry remains unrounded; equivalent? applies its tolerance directly." + Geometry remains unrounded; equivalent? applies its tolerance directly. + With `:unreferenced-deleted-components false`, the deleted components + nothing refers to are left out." ([situation] (design-snapshot situation {})) - ([situation {:keys [free-head-placement relative-free-head-placement] - :or {free-head-placement true}}] + ([situation {:keys [free-head-placement relative-free-head-placement unreferenced-deleted-components] + :or {free-head-placement true unreferenced-deleted-components true}}] (let [origins (when (and free-head-placement relative-free-head-placement) (get-derived-reference-origins situation))] (walk/postwalk @@ -236,7 +262,8 @@ (cons (:id shape) (cfh/get-parent-ids objects (:id shape))))) (dissoc :x :y :width :height :points :selrect :transform :transform-inverse)))])) objects))) value)) - (snapshot situation)))))) + (cond-> (snapshot situation) + (not unreferenced-deleted-components) without-unreferenced-deleted)))))) (defn canonical "Design data with shape, component and grid-cell IDs named by tree path. diff --git a/common/src/app/common/test_helpers/composable/shadow.cljc b/common/src/app/common/test_helpers/composable/shadow.cljc index dbb1766718..77273fa7ae 100644 --- a/common/src/app/common/test_helpers/composable/shadow.cljc +++ b/common/src/app/common/test_helpers/composable/shadow.cljc @@ -17,7 +17,8 @@ [app.common.test-helpers.texts :as thtx] [app.common.types.container :as ctn] [app.common.types.modifiers :as ctm] - [app.common.types.shape.layout :as ctl])) + [app.common.types.shape.layout :as ctl] + [app.common.types.shape.radius :as ctsr])) ;; This table is a specification, deliberately not ctk/sync-attrs. (def groups @@ -117,7 +118,10 @@ (= group :layout-grid-cells) {:layout-grid-cells (grid/get-cells shape)} (contains? text-groups group) {:content (:content shape)} - :else (into {} (map #(vector % (get shape %))) (get attributes group)))) + :else (cond-> (into {} (map #(vector % (get shape %))) (get attributes group)) + ;; the tokens a shape applies to its corners go with their radius + (= group :radius-group) + (assoc :applied-tokens (not-empty (select-keys (:applied-tokens shape) n/radius-attrs)))))) (defn author-geometry "The geometry `shape` authors, with the `parent` it is placed in, which @@ -267,12 +271,46 @@ (defn edit [model before property value] - (let [after (n/set-property before property value) + (let [after (cond-> (n/set-property before property value) + ;; a radius set by hand takes off the token its corner applied + (contains? n/radius-attrs property) (update :applied-tokens dissoc property)) group (get groups property)] (if (and (:shape-ref before) (not= (get before property) (get after property))) (assoc-in model [(:id before) group] (values after group)) model))) +(defn apply-token + "A copy shape that applies the radius token `token-name` of `value`, or + with a nil `value` takes it off, authors its radius when that changes + the tokens of its corners." + [model before token-name value] + (let [after (if (some? value) + (-> (reduce #(assoc %1 %2 value) before n/radius-attrs) + (update :applied-tokens merge (zipmap n/radius-attrs (repeat token-name)))) + (update before :applied-tokens #(apply dissoc % (n/token-corners before token-name))))] + (if (and (:shape-ref before) + (not= (:applied-tokens (values before :radius-group)) + (:applied-tokens (values after :radius-group)))) + (assoc-in model [(:id before) :radius-group] (values after :radius-group)) + model))) + +(defn edit-token-value + "The authored corners that apply the token `token-name` take its new + `value`. A token names the corners as a flipped shape shows them, so + they are stored mirrored." + [model objects token-name value] + (into {} + (map (fn [[id groups]] + [id (cond-> groups + (:radius-group groups) + (update :radius-group + (fn [radius] + (let [shape (merge (select-keys (get objects id) [:type :flip-x :flip-y]) radius) + corners (n/token-corners radius token-name)] + (merge radius (select-keys (ctsr/set-radius-for-corners shape corners value) + n/radius-attrs))))))])) + model)) + (defn clear-subtree [model objects root-id] (letfn [(clear [model id] @@ -901,6 +939,11 @@ (when (and root? (= :geometry-group group)) position-orientation) ;; an attribute the copy leaves unset carries as unset (into {} (map #(vector % (get old %))) carried)) + ;; a corner carries its token, or its lack of one, with its radius + (= group :radius-group) + (assoc :applied-tokens + (not-empty (merge (apply dissoc (:applied-tokens placed) carried) + (select-keys (:applied-tokens old) carried)))) ;; a carried geometry sits in the new parent, whose later ;; resizes move and size it through its constraints (and (= :geometry-group group) new-parent (not root?)) diff --git a/common/src/app/common/test_helpers/normalize.cljc b/common/src/app/common/test_helpers/normalize.cljc index c96bf20d5c..c8ee3c6500 100644 --- a/common/src/app/common/test_helpers/normalize.cljc +++ b/common/src/app/common/test_helpers/normalize.cljc @@ -14,6 +14,9 @@ change, undo and redo included; - a linked file's `:synced-at`, the server sync status rather than authored design data; + - the modification times in the tokens library, bumped by every change + of a token, undo and redo included: the library becomes its exported + content; - with `{:position-data? false}`, the shapes' `:position-data`, the text layout that WASM measurement regenerates; - with `{:deleted-components? false}`, the deleted components, which an @@ -24,6 +27,7 @@ Everything else is kept, `:touched` and `:remote-synced` included." (:require [app.common.data :as d] + [app.common.types.tokens-lib :as ctob] [clojure.data :as data])) (defn- map-vals @@ -62,6 +66,7 @@ (update :data (fn [data] (-> data + (d/update-when :tokens-lib ctob/export-dtcg-json) (d/update-when :pages-index (partial map-vals #(normalize-page % opts))) (d/update-when :components diff --git a/common/test/common_tests/logic/composable_gen_test.cljc b/common/test/common_tests/logic/composable_gen_test.cljc index 1b03e200cd..53ab0c56d7 100644 --- a/common/test/common_tests/logic/composable_gen_test.cljc +++ b/common/test/common_tests/logic/composable_gen_test.cljc @@ -2450,6 +2450,28 @@ :ops [[:add-variant] [:variant-property 0 9 25] [:make-variant 11] [:resize 19] [:add-child] [:style 19 9 1] [:switch 9]]})))) +(t/deftest undoing-an-edit-leaves-the-copies-an-undone-creation-stored + (t/is (map? (cg/run {:world [1 2 {:variants false :text-styles false :scale false :layout nil :variant-diff false + :grid-square false :copies 5 :rich-variants false :layout-children false + :grid-empty false :layout-copies false :text false}] + :ops [[:make-variant] [:edit 0 0 0 :copy-head] [:make-variant 1] [:undo] [:undo]]})))) + +(t/deftest a-token-edit-sets-the-corners-of-a-flipped-copy-as-it-shows-them + (t/is (map? (cg/run {:world [1 0 {:tokens true :variants true :rich-variants false :text false :layout :flex + :layout-copies false}] + :ops [[:transform 0 10 0 8] [:apply-token 12 11] [:style 12 3 0 1] [:token-value 0 2]]})))) + +(t/deftest switching-a-copy-carries-the-radius-tokens-it-applied + (t/is (map? (cg/run {:world [1 0 {:tokens true :variants true :rich-variants false :text false :layout :flex + :layout-copies false}] + :ops [[:apply-token 11] [:switch 7]]})))) + +(t/deftest switching-a-copy-carries-each-corner-token-with-its-radius + (t/is (map? (cg/run {:world [1 0 {:tokens true :variants true :rich-variants false :text false :layout :grid + :layout-copies false}] + :ops [[:remove-child 1] [:delete] [:apply-token 0 1] [:style 0 3 0 1] [:apply-token 1] + [:token-value 0 1] [:switch]]})))) + (t/deftest settling-a-bool-in-a-grid-copy-twice-keeps-its-shapes-in-place (t/is (map? (cg/run {:world [3 0 {:variants true :rich-variants true :text true :layout :grid :layout-copies true :layout-children true}] @@ -2503,6 +2525,18 @@ (t/is (empty? (cg/coverage-errors @coverage cg/grid-coverage-kinds)) (pr-str (cg/coverage-errors @coverage cg/grid-coverage-kinds))))) +(t/deftest random-token-compositions + (let [coverage (atom {}) + failure (atom nil)] + (smt/check! + (smt/for [program cg/token-program-gen] + (cg/check-program program coverage failure)) + :max-size 30 + :default-num coverage-programs) + (println "Token operation coverage:" (pr-str @coverage)) + (t/is (empty? (cg/coverage-errors @coverage cg/token-coverage-kinds)) + (pr-str (cg/coverage-errors @coverage cg/token-coverage-kinds))))) + (t/deftest random-scale-compositions ;; scale programs run several times longer than the others; the gates draw more (let [coverage (atom {}) diff --git a/common/test/common_tests/logic/golden_master.edn b/common/test/common_tests/logic/golden_master.edn index 95f128f664..a1ac903643 100644 --- a/common/test/common_tests/logic/golden_master.edn +++ b/common/test/common_tests/logic/golden_master.edn @@ -52,10 +52,10 @@ :aw [{:transcript "create-component {:component \"main\", :id sync-main-component}\n make-variant-container {:variant-set \"vset\", :variant-id sync-vset-vcontainer, :count 2}\n make-nested-component-with-variant {:component \"main\", :level 0, :outer sync-main-outercomp-0}\n instantiate-copy {:component \"main\", :copy sync-main-copyhead-0}\n change-property {:target #fn, :property :fills, :value \"#00ff00\"}\n edit-variant-property {:set-name \"vset\", :edit :rename-in-layers, :params {:member \"a\", :name \"Property 1=a2, Size=S\"}}\n test\n edit-variant-property {:set-name \"vset\", :edit :add, :params {:property-name \"Empty\"}}\n edit-variant-property {:set-name \"vset\", :edit :remove-empty, :params {}}\n test\n edit-variant-property {:set-name \"vset\", :edit :rename-in-layers, :params {:member \"a\", :name \"Property 1=a2\"}}\n test\n edit-variant-property {:set-name \"vset\", :edit :error, :params {:member \"b\", :value \"Duplicated\"}}\n test\n edit-variant-property {:set-name \"vset\", :edit :error, :params {:member \"b\", :value nil}}\n test\n switch-variant {:target-component sync-vset-v1-component}", :states ["1247c1fd53a5de3f" "6fdf7a1f1ec406b9" "8c9e9ff80c81a9c2" "6fdf7a1f1ec406b9" "2282ac416e81ba91" "ac2b1a3ccb8fc65c" "2282ac416e81ba91" "c18d55a87e1dcc61" "bd2d896527a50108"]}] :ay - [{:transcript "create-component {:component \"main\", :id sync-main-component}\n add-tokens {:tokens [[\"radius.s\" 10] [\"radius.l\" 30]]}\n instantiate-copy {:component \"main\", :copy sync-main-copyhead-0}\n apply-token {:target #fn, :token-name \"radius.s\", :value 10}\n apply-token {:target #fn, :token-name \"radius.l\", :value 30}\n test\n unapply-token {:target #fn, :token-name \"radius.l\"}", :states ["59efd69700884e48" "abf5f79fd6265aff" "39b3757cf3962625" "90094c5af982b268"]} - {:transcript "create-component {:component \"main\", :id sync-main-component}\n add-tokens {:tokens [[\"radius.s\" 10] [\"radius.l\" 30]]}\n instantiate-copy {:component \"main\", :copy sync-main-copyhead-0}\n apply-token {:target #fn, :token-name \"radius.s\", :value 10}\n apply-token {:target #fn, :token-name \"radius.l\", :value 30}\n test\n one-of -> skip", :states ["59efd69700884e48" "abf5f79fd6265aff" "35f26a160913fed7"]} - {:transcript "create-component {:component \"main\", :id sync-main-component}\n add-tokens {:tokens [[\"radius.s\" 10] [\"radius.l\" 30]]}\n instantiate-copy {:component \"main\", :copy sync-main-copyhead-0}\n one-of -> skip\n apply-token {:target #fn, :token-name \"radius.l\", :value 30}\n test\n unapply-token {:target #fn, :token-name \"radius.l\"}", :states ["b59fbe5fc9ca6e6b" "6f8d6e70db24f3ee" "0ca3152225a95d53"]} - {:transcript "create-component {:component \"main\", :id sync-main-component}\n add-tokens {:tokens [[\"radius.s\" 10] [\"radius.l\" 30]]}\n instantiate-copy {:component \"main\", :copy sync-main-copyhead-0}\n one-of -> skip\n apply-token {:target #fn, :token-name \"radius.l\", :value 30}\n test\n one-of -> skip", :states ["b59fbe5fc9ca6e6b" "1b4cbbfda551811b"]}] + [{:transcript "create-component {:component \"main\", :id sync-main-component}\n add-tokens {:tokens [[\"radius.s\" 10] [\"radius.l\" 30]]}\n instantiate-copy {:component \"main\", :copy sync-main-copyhead-0}\n apply-token {:target #fn, :token-name \"radius.s\", :value 10}\n apply-token {:target #fn, :token-name \"radius.l\", :value 30}\n test\n unapply-token {:target #fn, :token-name \"radius.l\"}", :states ["55cd1498cac3f9ae" "28f067d6d9dea716" "7e63361b804e3776" "05e94aa84c6c1ed3"]} + {:transcript "create-component {:component \"main\", :id sync-main-component}\n add-tokens {:tokens [[\"radius.s\" 10] [\"radius.l\" 30]]}\n instantiate-copy {:component \"main\", :copy sync-main-copyhead-0}\n apply-token {:target #fn, :token-name \"radius.s\", :value 10}\n apply-token {:target #fn, :token-name \"radius.l\", :value 30}\n test\n one-of -> skip", :states ["55cd1498cac3f9ae" "28f067d6d9dea716" "111f2070942a8607"]} + {:transcript "create-component {:component \"main\", :id sync-main-component}\n add-tokens {:tokens [[\"radius.s\" 10] [\"radius.l\" 30]]}\n instantiate-copy {:component \"main\", :copy sync-main-copyhead-0}\n one-of -> skip\n apply-token {:target #fn, :token-name \"radius.l\", :value 30}\n test\n unapply-token {:target #fn, :token-name \"radius.l\"}", :states ["2bcdf6d40b47eea3" "3dabf53ca39c6d4d" "af5ac8a5ea672f3b"]} + {:transcript "create-component {:component \"main\", :id sync-main-component}\n add-tokens {:tokens [[\"radius.s\" 10] [\"radius.l\" 30]]}\n instantiate-copy {:component \"main\", :copy sync-main-copyhead-0}\n one-of -> skip\n apply-token {:target #fn, :token-name \"radius.l\", :value 30}\n test\n one-of -> skip", :states ["2bcdf6d40b47eea3" "0d34ab60457acb76"]}] :az [{:transcript "create-component {:component \"main\", :id sync-main-component}\n make-nested-component {:component \"main\", :level 0, :outer sync-main-outercomp-0}\n change-property {:target #fn, :property :fills, :value \"#00ff00\"}\n make-nested-component {:component \"main\", :level 1, :outer sync-main-outercomp-1}\n paste-to-root {:target #fn, :new-head 5}\n test\n change-property {:target #fn, :property :fills, :value \"#ff0000\"}", :states ["c8c845596f55aa86" "1d1b26cfc6a035e4" "cdcb72926d45d3db" "c6ccfcd10b8e16a3"]} {:transcript "create-component {:component \"main\", :id sync-main-component}\n make-nested-component {:component \"main\", :level 0, :outer sync-main-outercomp-0}\n change-property {:target #fn, :property :fills, :value \"#00ff00\"}\n one-of -> skip\n paste-to-root {:target #fn, :new-head 3}\n test\n change-property {:target #fn, :property :fills, :value \"#ff0000\"}", :states ["c8c845596f55aa86" "a6a97a3d3298a63a" "a47933c7e373dfd7" "75123b44e98d2e2c"]}]